提交 7ceb6393 编写于 作者: changdi.hao's avatar changdi.hao

Merge branch 'release'

因为 它太大了无法显示 源差异 。您可以改为 查看blob
...@@ -18,7 +18,14 @@ ...@@ -18,7 +18,14 @@
<p>{{setReceiveInfo.receiver}} {{setReceiveInfo.receiverMobile}}</p> <p>{{setReceiveInfo.receiver}} {{setReceiveInfo.receiverMobile}}</p>
</div> </div>
</div> </div>
<div v-if="dialogTitle == '发货设置'"> <div class="dt-wrap" v-if="dtType == 2">
<span class="dt-title">配送方式:</span>
<el-radio-group v-model="dtMode" @change="radioChange">
<el-radio :label="1">物流配送</el-radio>
<el-radio :label="2">线下配送</el-radio>
</el-radio-group>
</div>
<div v-if="dtType == 1 || dtMode == 1">
<p class="form-title">填写物流信息</p> <p class="form-title">填写物流信息</p>
<el-form ref="sendSetForm" :model="sendSetForm" :rules="rules" label-width="75px" label-suffix=":"> <el-form ref="sendSetForm" :model="sendSetForm" :rules="rules" label-width="75px" label-suffix=":">
<el-form-item label="快递公司" prop="expressName"> <el-form-item label="快递公司" prop="expressName">
...@@ -37,7 +44,7 @@ ...@@ -37,7 +44,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div v-if="dialogTitle == '配送设置'"> <div v-if="dtType == 2 && dtMode == 2 ">
<p class="form-title">填写配送员信息</p> <p class="form-title">填写配送员信息</p>
<el-form ref="sendSetForm" :model="sendSetForm" :rules="rules" label-width="75px" label-suffix=":"> <el-form ref="sendSetForm" :model="sendSetForm" :rules="rules" label-width="75px" label-suffix=":">
<el-form-item label="姓名" prop="sender"> <el-form-item label="姓名" prop="sender">
...@@ -79,15 +86,15 @@ ...@@ -79,15 +86,15 @@
type: Boolean, type: Boolean,
default: false, default: false,
}, },
dialogTitle: {
type: String,
default: ''
},
sendSetFormData: { sendSetFormData: {
type: Object, type: Object,
required: true, required: true,
default: () => {} default: () => {}
}, },
dtType: { // 弹框的类型 1 为发货 2为配送
type: Number,
default: 1
},
}, },
data(){ data(){
return{ return{
...@@ -116,6 +123,7 @@ ...@@ -116,6 +123,7 @@
setReceiveInfo: {}, setReceiveInfo: {},
showContent: 0, showContent: 0,
showChangeInfo: false, showChangeInfo: false,
dtMode: 1, //1.物流配送 2.线下配送
rules: { rules: {
expressName: [ expressName: [
{ required: true, message: '请输入快递公司', trigger: "blur"}, { required: true, message: '请输入快递公司', trigger: "blur"},
...@@ -134,10 +142,8 @@ ...@@ -134,10 +142,8 @@
} }
}, },
created() { created() {
}, },
mounted() { mounted() {
}, },
watch: { watch: {
sendGoodsDialog(val) { sendGoodsDialog(val) {
...@@ -148,6 +154,11 @@ ...@@ -148,6 +154,11 @@
} }
}, },
}, },
computed: {
dialogTitle(){
return this.dtType == 1 ? '发货设置' : '配送设置';
}
},
methods: { methods: {
cancelSendSet() { cancelSendSet() {
this.$refs.sendSetForm.resetFields(); this.$refs.sendSetForm.resetFields();
...@@ -158,15 +169,15 @@ ...@@ -158,15 +169,15 @@
this.$refs.sendSetForm.validate((valid) => { this.$refs.sendSetForm.validate((valid) => {
if (valid) { if (valid) {
let para = {...this.setReceiveInfo,...this.sendSetForm}; let para = {...this.setReceiveInfo,...this.sendSetForm};
if (this.dtType == 1) {//发货设置的type是1,配送设置的type是2,配送完成的type是3
if (this.dialogTitle == '发货设置') {//发货设置的type是1,配送设置的type是2,配送完成的type是3
para.type = 1; para.type = 1;
}else if (this.dialogTitle == '配送设置') { }else if (this.dtType == 2) {
para.type = 2; para.type = 2;
} }
if (para.orderNo) { if (para.orderNo) {
para.id = para.orderNo; para.id = para.orderNo;
} }
para.expressType = this.dtMode;
openLoading(this); openLoading(this);
updateExpress(para).then(res => { updateExpress(para).then(res => {
closeLoading(this); closeLoading(this);
...@@ -188,13 +199,10 @@ ...@@ -188,13 +199,10 @@
return false; return false;
} }
}) })
}, },
close(){ close(){
this.$emit('closeSendSet',{type: 2}) this.$emit('closeSendSet',{type: 2})
}, },
//修改买家收货信息 //修改买家收货信息
changeInfo() { changeInfo() {
this.showChangeInfo = true; this.showChangeInfo = true;
...@@ -216,10 +224,14 @@ ...@@ -216,10 +224,14 @@
} }
this.showChangeInfo = false; this.showChangeInfo = false;
}, },
radioChange() {
this.$refs.sendSetForm.resetFields();
this.sendSetForm.remark = '';
}
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss" >
.send-set-body{ .send-set-body{
.address-content{ .address-content{
width: 100%; width: 100%;
...@@ -242,6 +254,12 @@ ...@@ -242,6 +254,12 @@
} }
} }
} }
.dt-wrap {
margin-top: 20px;
.dt-title {
margin-right: 16px;
}
}
.form-title{ .form-title{
margin-top: 15px; margin-top: 15px;
margin-bottom: 15px; margin-bottom: 15px;
......
...@@ -236,4 +236,21 @@ ...@@ -236,4 +236,21 @@
.el-input__inner:focus, .el-textarea__inner:focus { .el-input__inner:focus, .el-textarea__inner:focus {
border-color: #449284 !important; border-color: #449284 !important;
} }
.el-table {
th.el-table__cell>.cell.highlight {
color: #449284 !important;
}
}
.el-table-filter {
.el-table-filter__content {
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #449284 !important;
}
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #449284 !important;
border-color: #449284 !important;
}
}
}
...@@ -123,3 +123,13 @@ export const getGoodsIdList = (params) => { ...@@ -123,3 +123,13 @@ export const getGoodsIdList = (params) => {
description: '商品ID列表查询', description: '商品ID列表查询',
}) })
}; };
export const getTypeCodeList = () => {
return fetch({
headers,
url: getBaseUrl(`basic-data/constants/app?typeCodeList=P306`),
method: "get",
description: "获取适用人群类别",
});
};
...@@ -128,3 +128,12 @@ export const brokerOwnerListAll = (params) => { ...@@ -128,3 +128,12 @@ export const brokerOwnerListAll = (params) => {
description: '云鹊店铺-订单管理-招募人列表', description: '云鹊店铺-订单管理-招募人列表',
}) })
}; };
// 获取退款说明
export const getRefundDesc = (aid) => {
return fetch({
headers,
url: getBaseUrl(`/store/orders/admin/queryRefundDesc/${aid}`),
method: 'get',
description: '退款说明',
})
};
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
v-model="formData2.suitableArr" v-model="formData2.suitableArr"
:multiple="true" :multiple="true"
placeholder="请选择" placeholder="请选择"
size="small" class="suitableList-select"
> >
<el-option <el-option
v-for="(item,index) in suitableList" v-for="(item,index) in suitableList"
...@@ -859,7 +859,7 @@ ...@@ -859,7 +859,7 @@
let vm = null; let vm = null;
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath } from "../../utils/qiniu-util"; import { doUpload, getFilePath } from "../../utils/qiniu-util";
import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList } from '@/utils/goods'; import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList, getTypeCodeList } from '@/utils/goods';
import Cropper from '@/components/common/cropper.vue' import Cropper from '@/components/common/cropper.vue'
import { originRules1, originRules2, originRules } from './rules'; import { originRules1, originRules2, originRules } from './rules';
...@@ -947,8 +947,8 @@ ...@@ -947,8 +947,8 @@
checkPackageIdList: [{name:'其他',content:0}], checkPackageIdList: [{name:'其他',content:0}],
hospitalTypeList: [{label:'村卫生室',value:1},{label:'乡镇卫生院/中心',value:2}], // 医疗机构类型 hospitalTypeList: [{label:'村卫生室',value:1},{label:'乡镇卫生院/中心',value:2}], // 医疗机构类型
checkTypeList: [{label:'常规检测',value:1}], // 检测类型 checkTypeList: [{label:'常规检测',value:1}], // 检测类型
suitableList: [{label:'儿童',value:'1'},{label:'青年',value:'2'},{label:'中年',value:'4'},{label:'老年',value:'8'},{label:'40-74岁的结直肠癌高风险人群',value:'10'}], // 适用人群 // suitableList: [{label:'儿童',value:'1'},{label:'青年',value:'2'},{label:'中年',value:'4'},{label:'老年',value:'8'},{label:'40-74岁的结直肠癌高风险人群',value:'10'}], // 适用人群
suitableList: [],
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
...@@ -1017,6 +1017,7 @@ ...@@ -1017,6 +1017,7 @@
this.isEdit = id != 'add'; this.isEdit = id != 'add';
this.curmbThird = this.title; this.curmbThird = this.title;
this.formData.storeId = Number(storeId) || ''; this.formData.storeId = Number(storeId) || '';
this.getTypeCodeList();
this.getLever(0,1) this.getLever(0,1)
dosageAll().then((res)=>{ dosageAll().then((res)=>{
this.doseAll = res.data this.doseAll = res.data
...@@ -1047,11 +1048,26 @@ ...@@ -1047,11 +1048,26 @@
} }
}, },
methods: { methods: {
// 获取适用人群
getTypeCodeList() {
return getTypeCodeList().then((res) => {
if (res.code == '000000') {
this.suitableList = [];
for (const item of res.data) {
this.suitableList.push({
label: item.value,
value: item.no + ''
})
}
}
}).catch((err)=>{})
},
//eidt状态 //eidt状态
async getDetailByEdit(id, goodsType){ async getDetailByEdit(id, goodsType){
this.goodsId = id ; this.goodsId = id ;
if(goodsType == 337){ if(goodsType == 337){
this.isCheckServe = true; this.isCheckServe = true;
await this.getTypeCodeList();
const res = await getGoodDetails(id); const res = await getGoodDetails(id);
console.log(`========================>`, res); console.log(`========================>`, res);
if(res.code != '000000'){ if(res.code != '000000'){
...@@ -1790,6 +1806,9 @@ ...@@ -1790,6 +1806,9 @@
} }
} }
} }
.suitableList-select {
width: 445px;
}
.el-button--text{ .el-button--text{
color: #449284; color: #449284;
font-size: 14px; font-size: 14px;
......
...@@ -2,38 +2,182 @@ ...@@ -2,38 +2,182 @@
<div class="order-detail-wrapper"> <div class="order-detail-wrapper">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :jumPathThird="jumPathThird"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :jumPathThird="jumPathThird"></bread-crumb>
<div class="order-detail-content screenSet" id="screenSet"> <div class="order-detail-content screenSet" id="screenSet">
<div class="header-title">订单详情</div> <el-row :gutter="20" class="order-detail-header">
<el-col :span="20"><div class="header-title">订单详情</div></el-col>
<el-col :span="4" >
<div class="trade-status"><img :src="statusImgUrl"/> {{showStatusStr}}</div>
</el-col>
</el-row>
<!-- <div class="header-title">订单详情</div> -->
<div class="detail-all-info"> <div class="detail-all-info">
<div class="trade-status" v-if="showStatus == 1"><img src="../../assets/image/order/order_status1.png"/>交易成功</div> <!-- <div class="trade-status" v-if="showStatus == 1"><img src="../../assets/image/order/order_status1.png"/>交易成功</div>
<div class="trade-status" v-if="showStatus == 2"><img src="../../assets/image/order/order_status2.png"/>已发货</div> <div class="trade-status" v-if="showStatus == 2"><img src="../../assets/image/order/order_status2.png"/>已发货</div>
<div class="trade-status" v-if="showStatus == 3"><img src="../../assets/image/order/order_status3.png"/>待发货</div> <div class="trade-status" v-if="showStatus == 3"><img src="../../assets/image/order/order_status3.png"/>待发货</div>
<div class="trade-status" v-if="showStatus == 4"><img src="../../assets/image/order/order_status4.png"/>等待买家付款</div> <div class="trade-status" v-if="showStatus == 4"><img src="../../assets/image/order/order_status4.png"/>等待买家付款</div>
<div class="trade-status" v-if="showStatus == 5"><img src="../../assets/image/order/order_status5.png"/>退款/关闭</div> <div class="trade-status" v-if="showStatus == 5"><img src="../../assets/image/order/order_status5.png"/>退款/关闭</div> -->
<!-- 表格 -->
<el-table :data="tableData" border class="item-table" style="width: 100%;margin-top: 30px;">
<el-table-column prop="goodsName" label="商品名称" min-width="100" align="center">
<template slot-scope="scope">
<div style="cursor: pointer;color: #449284" @click="goGoodsEdit(scope.row)">{{ scope.row.goodsName }}</div>
</template>
</el-table-column>
<el-table-column prop="size" label="规格" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center">
<template slot-scope="scope">
<span>×{{ scope.row.goodsQuantity }}</span>
</template>
</el-table-column>
<el-table-column prop="price" label="单价" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.price | toFixed2 }}</span>
</template>
</el-table-column>
<el-table-column prop="totalPrice" label="商品总额" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.totalPrice | toFixed2 }}</span>
</template>
</el-table-column>
<el-table-column prop="amount" label="商品实付" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.amount | toFixed2 }}</span>
</template>
</el-table-column>
<el-table-column
prop="goodsShowStatusStr"
label="状态"
min-width="100"
align="center"
:filters="getFilterArr('goodsShowStatusStr')"
:filter-method="filterStatusHandler"
>
</el-table-column>
<el-table-column prop="expressCompany" label="物流公司" min-width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.expressCompany || '--'}}</span>
</template>
</el-table-column>
<el-table-column prop="expressNo" label="物流公司单号" min-width="110" align="center">
<template slot-scope="scope">
<span>{{scope.row.expressNo || '--'}}</span>
</template>
</el-table-column>
<el-table-column
prop="belongPackage"
label="所属包裹"
min-width="100"
align="center"
:filters="getFilterArr('belongPackage')"
:filter-method="filterPackageHandler"
>
<template slot-scope="scope">
<span>{{scope.row.belongPackage || '--'}}</span>
</template>
</el-table-column>
<el-table-column prop="refundDesc" label="退款说明" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="[6, 7, 8].includes(scope.row.goodsShowStatus)" type="text" @click="showRefundDetail(scope.row.aid)">查看</el-button>
<span v-else> -- </span>
</template>
</el-table-column>
</el-table>
<div class="total-set">
<p><span>商品总额:</span><span>¥{{orderDetailData.totalPrice | toFixed2}}</span></p>
<p><span>优惠:</span><span>-¥{{orderDetailData.totalCouponFee | toFixed2}}</span></p>
<p><span>&nbsp;运费:</span>
<span v-if="orderDetailData.expressFee == 0">免运费</span>
<span v-else-if="orderDetailData.expressFee != 0">¥{{orderDetailData.expressFee | toFixed2}}</span>
</p>
<p class="total-price" v-if="showStatus == 4"><span>应付:</span><span>¥{{(orderDetailData.totalPrice)| toFixed2}}</span></p>
<p class="total-price" v-else-if="showStatus == 5 || showStatus == 7"><span>实付:</span><span>¥0.00</span></p>
<p class="total-price" v-else><span>实付:</span><span>¥{{orderDetailData.amount | toFixed2}}</span></p>
</div>
<!-- 物流信息 -->
<div class="trade-info"> <div class="trade-info">
<el-card class="left-card"> <el-card class="left-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{storeType == 1 ? '物流' : '配送'}}信息</span> <span>{{storeType == 1 ? '物流' : '配送'}}信息</span>
</div> </div>
<div v-if="showStatus == 1 || showStatus == 2"> <!-- 物流信息 -->
<!-- <div v-if="storeType == 3">--> <div class="logistics-info">
<!-- <p>无配送信息,买家自提</p>--> <div class="title">收货信息</div>
<!-- </div>--> <p>{{ orderDetailData.receiverAddr }}</p>
<p>{{orderDetailData.receiver}} {{ orderDetailData.receiverMobile }}</p>
</div>
<div v-if="showStatus == 1 || showStatus == 2 || showStatus == 6">
<div>
<!-- 多包裹 -->
<div class="multi-package">
<el-tabs v-model="packageName" @tab-click="handlePackageClick">
<el-tab-pane v-for="(item, index) in expressList" :key="index" :label="item.packageName" :name="item.packageName">
<div class="package-img">
<div class="img-box" v-for="(goodsval, goodsindex) in item.goodsInfoList" :key="goodsindex">
<img :src="goodsval.goodsImageUrl" alt="">
<span class="img-tips">{{goodsval.goodsQuantity}}件</span>
</div>
</div>
<!-- 云鹊配送 小药房 && 线下配送-->
<div class="yq-logistics" v-if="(storeType == 2 && item.expressType == 2)">
<div class="title">
{{item.expressStatus !== 4 ? '云鹊配送中' : '云鹊配送完成'}}
</div>
<p>配送员:{{ item.senderName }}</p>
<p>手机号:{{ item.senderMobile }}</p>
<p>备注:{{ item.remark }}</p>
</div>
<!-- 物流信息 供货商 || 小药房 && 物流信息-->
<div
v-if="storeType == 1 || (storeType == 2 && item.expressType == 1)"
class="package-detail"
>
<div>物流公司:{{ item.expressCompany }}</div>
<div>快递单号:{{item.expressNo }}
<el-button type="text" @click="copyTxt(item.expressNo,index)">复制单号</el-button>
<input type="text" :id="`copyInput_${index}`" class="hidden-input" />
</div>
<div>备注:{{ item.remark }}</div>
</div>
<!-- 线上物流时间线 -- 订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭 -->
<div class="steps-logistics" v-if="item.expressType == 1 && (showStatus === 1 || showStatus === 2 || showStatus === 6)">
<el-steps direction="vertical" :active="0">
<el-step
v-for="item in expressData"
:title="item.time"
:description="item.context"
:key="item.time"
>
<div slot="icon">
<div class="dot"></div>
</div>
</el-step>
</el-steps>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<!-- <div v-if="showStatus == 1 || showStatus == 2">
<div v-if="storeType == 3">
<p>无配送信息,买家自提</p>
</div>
<div> <div>
<p class="trade-status1"> <p class="trade-status1">
<i class="el-icon-truck" style="font-size: 18px"></i> <i class="el-icon-truck" style="font-size: 18px"></i>
<span class="send-status" v-if="storeType == 1">已发货</span> <span class="send-status" v-if="storeType == 1">已发货</span>
<span class="send-status" v-if="storeType == 2">云鹊配送中</span> <span class="send-status" v-if="storeType == 2 && showStatus == 2">{{expressType == 1 ? '已发货':'云鹊配送中'}}</span>
<span class="send-status" v-if="storeType == 2 && showStatus == 1">{{expressType == 1 ? '已收货':'云鹊配送完成'}}</span>
<span class="send-status" v-if="storeType == 3">已收货</span> <span class="send-status" v-if="storeType == 3">已收货</span>
</p> </p>
<p v-if="storeType == 1 || storeType == 2">收货地址:{{orderDetailData.receiverAddr}},{{orderDetailData.receiver}},{{orderDetailData.receiverMobile}}</p> <p v-if="storeType == 1 || storeType == 2">收货地址:{{orderDetailData.receiverAddr}},{{orderDetailData.receiver}},{{orderDetailData.receiverMobile}}</p>
<div v-if="storeType == 1"> <div v-if="storeType == 1 || (storeType == 2 && expressType == 1)">
<p>物流公司:{{orderDetailData.expressName}}</p> <p>物流公司:{{orderDetailData.expressName}}</p>
<p>快递单号:{{orderDetailData.expressNo}}</p> <p>快递单号:{{orderDetailData.expressNo}}</p>
<el-button type="text" @click="copyTxt">复制</el-button> <el-button type="text" @click="copyTxt">复制</el-button>
<el-button type="text" @click="updateOrderNo">修改物流单号</el-button> <el-button type="text" @click="updateOrderNo">修改物流单号</el-button>
<input type="text" id="copyInput" class="hidden-input" /> <input type="text" id="copyInput" class="hidden-input" />
</div> </div>
<div v-if="storeType == 2"> <div v-if="storeType == 2 && expressType == 2">
<p>配送员姓名:{{orderDetailData.sender}}</p> <p>配送员姓名:{{orderDetailData.sender}}</p>
<p>手机号:{{orderDetailData.senderMobile}}</p> <p>手机号:{{orderDetailData.senderMobile}}</p>
</div> </div>
...@@ -43,6 +187,20 @@ ...@@ -43,6 +187,20 @@
</div> </div>
<p v-if="storeType == 1 || storeType == 2">备注:{{orderDetailData.remark}}</p> <p v-if="storeType == 1 || storeType == 2">备注:{{orderDetailData.remark}}</p>
</div> </div>
<div class="steps-logistics" v-if="storeType == 1 || storeType == 3 || expressType == 1">
<el-steps direction="vertical" :active="0">
<el-step
v-for="item in expressData"
:title="item.time"
:description="item.context"
:key="item.time"
>
<div slot="icon">
<div class="dot"></div>
</div>
</el-step>
</el-steps>
</div>
</div> </div>
<div v-if="(showStatus == 3) && (storeType == 1 || storeType == 2)"> <div v-if="(showStatus == 3) && (storeType == 1 || storeType == 2)">
<div class="trade-status1"> <div class="trade-status1">
...@@ -57,7 +215,7 @@ ...@@ -57,7 +215,7 @@
<div v-if="showStatus == 4"> <div v-if="showStatus == 4">
<p>暂无{{storeType == 1 ? '物流' : '配送'}}信息,待买家支付</p> <p>暂无{{storeType == 1 ? '物流' : '配送'}}信息,待买家支付</p>
</div> </div>
<div v-if="showStatus == 5"><p>交易已关闭</p></div> <div v-if="showStatus == 5"><p>交易已关闭</p></div> -->
</el-card> </el-card>
<el-card class="right-card"> <el-card class="right-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
...@@ -70,57 +228,23 @@ ...@@ -70,57 +228,23 @@
<p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">支付时间:{{orderDetailData.paymentTime}}</p> <p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">支付时间:{{orderDetailData.paymentTime}}</p>
<p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">&nbsp;&nbsp;&nbsp;招募人:{{orderDetailData.ownerName}}</p> <p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">&nbsp;&nbsp;&nbsp;招募人:{{orderDetailData.ownerName}}</p>
<p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">所属药代:{{orderDetailData.brokerName}}</p> <p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">所属药代:{{orderDetailData.brokerName}}</p>
<p>下单人手机号:{{orderDetailData.prescriberMobile}}</p> <!-- <p>下单人手机号:{{orderDetailData.prescriberMobile}}</p>
<p>订单类型:{{orderDetailData.saleTypeStr}}</p> <p>订单类型:{{orderDetailData.saleTypeStr}}</p>
<p v-if="orderDetailData.refundReason">退款原因:{{orderDetailData.refundReason}}</p> <p v-if="orderDetailData.refundReason">退款原因:{{orderDetailData.refundReason}}</p> -->
<!--<p>发货时间:{{orderDetailData.sendTime}}</p>--> <!--<p>发货时间:{{orderDetailData.sendTime}}</p>-->
<!--<p>成交时间:{{orderDetailData.finishTime}}</p>--> <!--<p>成交时间:{{orderDetailData.finishTime}}</p>-->
</div> </div>
</el-card> </el-card>
</div> </div>
<el-table :data="tableData" border class="item-table" style="width: 100%;margin-top: 30px;">
<el-table-column prop="goodsName" label="商品名称" min-width="100" align="center">
<template slot-scope="scope">
<div style="cursor: pointer;color: #449284" @click="goGoodsEdit(scope.row)">{{ scope.row.goodsName }}</div>
</template>
</el-table-column>
<el-table-column prop="size" label="规格" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center">
<template slot-scope="scope">
<span>×{{ scope.row.goodsQuantity }}</span>
</template>
</el-table-column>
<el-table-column prop="price" label="单价" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.price | toFixed2 }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" min-width="100" align="center">
<template slot-scope="scope">
<span>{{orderDetailData.showStatusStr}}</span>
</template>
</el-table-column>
</el-table>
<div class="total-set">
<p><span>商品总额:</span><span>¥{{orderDetailData.totalPrice | toFixed2}}</span></p>
<p><span>优惠:</span><span>-¥{{orderDetailData.totalCouponFee | toFixed2}}</span></p>
<p><span>&nbsp;运费:</span>
<span v-if="orderDetailData.expressFee == 0">免运费</span>
<span v-else-if="orderDetailData.expressFee != 0">¥{{orderDetailData.expressFee | toFixed2}}</span>
</p>
<p class="total-price" v-if="showStatus == 1 || showStatus == 2 || showStatus == 3"><span>实付:</span><span>¥{{orderDetailData.amount | toFixed2}}</span></p>
<p class="total-price" v-if="showStatus == 4"><span>应付:</span><span>¥{{(orderDetailData.totalPrice)| toFixed2}}</span></p>
<p class="total-price" v-if="showStatus == 5"><span>实付:</span><span>¥0.00</span></p>
</div>
</div> </div>
<send-set-dialog <!-- <send-set-dialog
:sendGoodsDialog="sendGoodsDialog" :sendGoodsDialog="sendGoodsDialog"
:dialogTitle="dialogTitle" :dtType="dtType"
:sendSetFormData="sendSetForm" :sendSetFormData="sendSetForm"
@closeSendSet="closeSendSet"> @closeSendSet="closeSendSet">
</send-set-dialog> </send-set-dialog> -->
</div> </div>
<el-dialog <!-- <el-dialog
class="tui-dialog" class="tui-dialog"
title="修改物流单号" title="修改物流单号"
:visible="showOrderNoFlag" :visible="showOrderNoFlag"
...@@ -141,14 +265,29 @@ ...@@ -141,14 +265,29 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="confirmExpressNo">完成</el-button> <el-button size="small" type="primary" @click="confirmExpressNo">完成</el-button>
</span> </span>
</el-dialog> -->
<!-- 退款说明 -->
<el-dialog
class="refund-explain-dialog"
title="退款说明"
:visible.sync="refundDialog"
width="20%">
<div class="explain-content">退款方式:{{refundDialogData.refundWay}}</div>
<div class="explain-content">退款金额:{{refundDialogData.refundAmount | toFixed2}}</div>
<div class="explain-content">退款对象:{{refundDialogData.refundObject}}</div>
<div class="explain-content">退款理由:{{refundDialogData.refundReason}}</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="refundDialog = false">确 定</el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import { openLoading, closeLoading } from "../../utils/utils"; // import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/breadcrumb.vue";
import { queryOrderDetail, updateExpressNo } from '@/utils/shop'; import { queryOrderDetail, updateExpressNo, expressInfo, getRefundDesc } from '@/utils/shop';
import SendSetDialog from "@/components/shop/send-set-dialog"; import SendSetDialog from "@/components/shop/send-set-dialog";
export default { export default {
components: { components: {
BreadCrumb, BreadCrumb,
...@@ -187,6 +326,12 @@ ...@@ -187,6 +326,12 @@
// showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭 // showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
saleTypeStr:'',// 订单类型 saleTypeStr:'',// 订单类型
}, },
expressData:[
{
time: "",
context: "待揽收",
}
],
rulesExpress: { rulesExpress: {
expressName: [ expressName: [
{ required: true, message: '请输入快递公司', trigger: "blur"}, { required: true, message: '请输入快递公司', trigger: "blur"},
...@@ -197,9 +342,21 @@ ...@@ -197,9 +342,21 @@
}, },
tableData: [], tableData: [],
sendGoodsDialog: false, sendGoodsDialog: false,
dialogTitle: '', dtType: 1,
sendSetForm: {}, sendSetForm: {},
showOrderNoFlag: false, showOrderNoFlag: false,
expressType: 1,
isShowRefundDetail: false, // 是否展示退款说明弹窗
showStatusStr: '', // 订单状态文案
packageName: '包裹1', // 多包裹name
expressIndex: 0, // 修改物流单号下标
refundDialog: false, // 退款说明弹窗
refundDialogData: {
refundWay: '',
refundAmount: '',
refundObject: '',
refundReason: ''
}
} }
}, },
created() { created() {
...@@ -210,14 +367,80 @@ ...@@ -210,14 +367,80 @@
this.jumPathThird = `/order-manage?storeId=${this.storeId}`; this.jumPathThird = `/order-manage?storeId=${this.storeId}`;
this.init(); this.init();
}, },
computed:{
statusImgUrl() {
// "订单展示状态:1已完成,2已发货,3待发货,4待支付,5已关闭,6部分发货,7已取消"
let imgUrl = '';
console.log(imgUrl);
switch (this.showStatus) {
case 1:
return (imgUrl = require(`../../assets/image/order/order_status1.png`));
case 2:
case 6:
return (imgUrl = require(`../../assets/image/order/order_status2.png`));
case 3:
case 4:
return (imgUrl = require(`../../assets/image/order/order_status3.png`));
case 5:
case 7:
return (imgUrl = require(`../../assets/image/order/order_status5.png`));
default:
return (imgUrl = '');
}
}
},
methods: { methods: {
// 多包裹切换获取包裹物流信息
handlePackageClick(tab) {
this.expressList.forEach(item => {
if (item.packageName === tab.name) {
this.viewLogistics(item.expressNo, this.orderDetailData.receiverMobile);
}
})
},
getPrice(value) {
let val;
if (value) {
val = (value / 100).toFixed(2);
} else {
val = 0.00;
}
return val;
},
// 退款说明
showRefundDetail(aid) {
getRefundDesc(aid).then(res => {
if (res.code == "000000") {
this.isShowRefundDetail = true;
let refundWayStr = '';
let refundObjectStr = '';
this.refundDialog = true;
refundWayStr = res.data.refundWay == 0 ? '仅退款,无需退货' : '退款退货';
refundObjectStr = res.data.refundObject == 1 ? '开单医生' : '支付用户';
res.data.refundWay = refundWayStr;
res.data.refundObject = refundObjectStr;
this.refundDialogData = res.data;
}
})
},
init() { init() {
queryOrderDetail(this.orderId).then(res => { queryOrderDetail(this.orderId).then(res => {
if (res.code == '000000') { if (res.code == '000000') {
const { goodsInfoDtoList } = res.data; const { goodsInfoDtoList, expressList } = res.data;
this.orderDetailData = {...res.data}; this.orderDetailData = {...res.data};
this.showStatus = res.data.showStatus; this.showStatus = res.data.showStatus;
this.tableData = goodsInfoDtoList; this.showStatusStr = res.data.showStatusStr;
this.expressType = res.data.expressType; // 小店 1.普通快递,2云鹊快递
this.tableData = goodsInfoDtoList;
let expressNo = '';
goodsInfoDtoList.map(item => {
if (item.belongPackage == '包裹1') {
expressNo = item.expressNo
}
})
let receiverMobile = this.orderDetailData.receiverMobile;
this.expressList = expressList; // 包裹信息
this.viewLogistics(expressNo, receiverMobile);
} }
}) })
}, },
...@@ -225,9 +448,9 @@ ...@@ -225,9 +448,9 @@
this.sendGoodsDialog = true; this.sendGoodsDialog = true;
this.sendSetForm = this.orderDetailData; this.sendSetForm = this.orderDetailData;
if (this.storeType == 1) { if (this.storeType == 1) {
this.dialogTitle = '发货设置' this.dtType = 1;
}else { }else {
this.dialogTitle = '配送设置' this.dtType = 2;
} }
}, },
closeSendSet(val) { closeSendSet(val) {
...@@ -276,9 +499,9 @@ ...@@ -276,9 +499,9 @@
} }
}); });
}, },
copyTxt() { copyTxt(expressNo,index) {
let txt = document.getElementById("copyInput"); let txt = document.getElementById(`copyInput_${index}`);
txt.value = this.orderDetailData.expressNo; txt.value = expressNo;
// if (navigator.userAgent.match(/(iPhone|iPod|iPad|Mac);?/i)) { // if (navigator.userAgent.match(/(iPhone|iPod|iPad|Mac);?/i)) {
if (navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") < 1) { if (navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") < 1) {
var el = document.createElement('input'); var el = document.createElement('input');
...@@ -305,6 +528,49 @@ ...@@ -305,6 +528,49 @@
} }
this.$message.success('复制成功'); this.$message.success('复制成功');
}, },
//查看物流
viewLogistics(expressNo, receiverMobile) {
if (expressNo && receiverMobile)
expressInfo({
expressNo: expressNo,
receiverMobile: receiverMobile,
}).then((res) => {
if (res.code == "000000") {
if (res.data.data && res.data.data.length) {
this.expressData = res.data.data;
} else {
this.expressData = [{
time: res.data.updateTime || '',
context: "待揽收1"
}];
}
}
});
},
getFilterArr(value) {
let newFilterArr = [];
for (const newItem of this.tableData) {
let flag = true;
for (const item of newFilterArr) {
if(item.text == newItem[value]) {
flag = false;
}
}
if(newItem[value] && flag) {
newFilterArr.push({
text: newItem[value],
value: newItem[value]
})
}
}
return newFilterArr;
},
filterStatusHandler(value, row, column) {
return row.goodsShowStatusStr === value;
},
filterPackageHandler(value, row, column) {
return row.belongPackage === value;
},
}, },
filters: { filters: {
toFixed2: function (value) { toFixed2: function (value) {
...@@ -328,40 +594,82 @@ ...@@ -328,40 +594,82 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.order-detail-wrapper{ .order-detail-wrapper{
.el-dialog__wrapper {
.el-dialog {
.el-dialog__body {
padding: 0 20px;
.explain-content {
margin-bottom: 5px;
}
}
}
}
.el-table__column-filter-trigger i {
color: #0d9078;
font-size: 14px;
transform: scale(1);
}
.hidden-input {
height: 0;
}
.order-detail-content{ .order-detail-content{
background: #fff; background: #fff;
padding: 10px; padding: 10px;
.header-title{ .order-detail-header {
padding: 10px 12px; border-bottom: 1px solid #efefef;
font-size: 13px; }
color: #449284; .header-title {
border-bottom: 1px solid #efefef; font-size: 13px;
} color: #449284;
.detail-all-info{ line-height: 35px;
}
.trade-status{ .trade-status{
display: flex; font-size: 20px;
align-items: center; padding-bottom: 15px;
justify-content: center;
padding: 30px 0;
text-align: center;
font-size: 24px;
img{ img{
width: 25px; width: 25px;
height: 25px; height: 25px;
margin-right: 15px; margin-right: 15px;
vertical-align: -6px;
} }
.set-icon{ .set-icon{
color: #449284; color: #449284;
font-size: 28px; font-size: 20px;
margin-right: 10px; margin-right: 10px;
} }
} }
.total-set{
text-align: right;
margin-top: 20px;
p{
font-size: 13px;
color: #999999;
line-height: 24px;
span:first-child{
display: inline-block;
width: 72px;
text-align: left;
}
span:last-child{
display: inline-block;
width: 90px;
}
}
.total-price{
font-size: 15px;
color: #333333;
margin-top: 5px;
}
}
.detail-all-info{
padding-bottom: 30px;
.trade-info{ .trade-info{
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
font-size: 13px; font-size: 13px;
justify-content: space-between; justify-content: space-between;
margin-top: 30px;
.el-card__body{ .el-card__body{
padding-top: 10px; padding-top: 10px;
} }
...@@ -380,10 +688,59 @@ ...@@ -380,10 +688,59 @@
display: inline-block; display: inline-block;
} }
} }
.steps-logistics {
border-top: 2px solid #ddd;
padding-top: 20px;
margin-top: 20px;
height: 200px;
overflow-y: scroll;
}
.logistics-info {
.title {
padding-bottom: 10px;
}
}
.multi-package {
.package-img {
display: flex;
.img-box {
width: 88px;
height: 88px;
background-color: #ccc;
position: relative;
margin-right: 10px;
img {
width: 88px;
height: 88px;
}
.img-tips {
position: absolute;
right: 4px;
bottom: 4px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666666;
}
}
}
.yq-logistics {
padding-top: 25px;
.title {
padding-bottom: 20px;
}
}
.package-detail {
padding-top: 15px;
#copyInput {
display: none;
}
}
}
} }
.right-card{ .right-card{
width: 28%; width: 28%;
display: inline-block; display: inline-block;
max-height: 240px;
} }
.left-card, .right-card{ .left-card, .right-card{
p{ p{
...@@ -400,29 +757,6 @@ ...@@ -400,29 +757,6 @@
clear: both clear: both
} }
} }
.total-set{
text-align: right;
margin-top: 10px;
p{
font-size: 13px;
color: #999999;
line-height: 24px;
span:first-child{
display: inline-block;
width: 72px;
text-align: left;
}
span:last-child{
display: inline-block;
width: 90px;
}
}
.total-price{
font-size: 15px;
color: #333333;
margin-top: 5px;
}
}
} }
} }
.el-button--text{ .el-button--text{
...@@ -446,5 +780,26 @@ ...@@ -446,5 +780,26 @@
} }
} }
} }
.el-step__icon {
border: none;
background: transparent;
}
.el-step__title {
font-size: 14px;
}
.el-step:last-of-type .el-step__line {
display: block !important;
height: 30%;
}
.dot {
border-radius: 50%;
height: 8px;
width: 8px;
border: 1px solid #999999;
background-color: #b8b8b8;
}
.el-steps--vertical {
height: auto;
}
} }
</style> </style>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
>导出订单</el-button >导出订单</el-button
> >
</div> </div>
<div class="button-container"> <!-- <div class="button-container">
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
...@@ -136,18 +136,27 @@ ...@@ -136,18 +136,27 @@
@click="ShowExportDialog(2)" @click="ShowExportDialog(2)"
>批量取消订单</el-button >批量取消订单</el-button
> >
</div> </div> -->
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-tabs v-model="activeName" @tab-click="handleClick"> <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部" name="all"></el-tab-pane> <el-tab-pane label="全部" name="all"></el-tab-pane>
<el-tab-pane label="等待买家付款" name="first"></el-tab-pane> <el-tab-pane label="等待买家付款" name="first"></el-tab-pane>
<el-tab-pane label="等待发货" name="second"></el-tab-pane> <el-tab-pane label="等待发货" name="second"></el-tab-pane>
<el-tab-pane label="已发货" name="third"></el-tab-pane> <el-tab-pane label="已发货" name="third"></el-tab-pane>
<el-tab-pane label="交易成功" name="fourth"></el-tab-pane> <el-tab-pane label="交易成功" name="fourth"></el-tab-pane>
<el-tab-pane label="退款/关闭" name="five"></el-tab-pane> <el-tab-pane label="退款/关闭" name="five"></el-tab-pane>
</el-tabs> </el-tabs> -->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部" name="all"></el-tab-pane>
<el-tab-pane label="待支付" name="first"></el-tab-pane>
<el-tab-pane label="待发货" name="second"></el-tab-pane>
<el-tab-pane label="已发货" name="third"></el-tab-pane>
<el-tab-pane label="已完成" name="fourth"></el-tab-pane>
<el-tab-pane label="已取消" name="six"></el-tab-pane>
<el-tab-pane label="退款/售后" name="five"></el-tab-pane>
</el-tabs>
<el-table <el-table
:data="tableData" :data="tableData"
border border
...@@ -179,15 +188,25 @@ ...@@ -179,15 +188,25 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="showStatusStr" prop="goodsShowStatusStrList"
label="交易状态" label="交易状态"
min-width="100" min-width="100"
align="center" align="center"
> >
<template slot-scope="scope">
<!--<span>{{ scope.row.goodsName }}</span>-->
<p
v-for="(item, index) in scope.row.goodsShowStatusStrList"
:key="index"
class="p-normal"
>
{{ item }}
</p>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="amount" prop="amount"
label="实收款" label="订单实付"
min-width="100" min-width="100"
align="center" align="center"
> >
...@@ -195,6 +214,16 @@ ...@@ -195,6 +214,16 @@
<span>{{ scope.row.amount | toFixed2 }}</span> <span>{{ scope.row.amount | toFixed2 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="expressFee"
label="运费"
min-width="100"
align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.expressFee | toFixed2 }}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="prescriberName" prop="prescriberName"
label="创建人" label="创建人"
...@@ -258,6 +287,38 @@ ...@@ -258,6 +287,38 @@
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="goodsTotalPrice"
label="商品总额"
min-width="100"
align="center"
>
<template slot-scope="scope">
<p
v-for="(item, index) in scope.row.goodsTotalPriceList"
:key="index"
class="p-normal"
>
{{ item | toFixed2 }}
</p>
</template>
</el-table-column>
<el-table-column
prop="goodsRealPay"
label="商品实付"
min-width="100"
align="center"
>
<template slot-scope="scope">
<p
v-for="(item, index) in scope.row.goodsRealPayList"
:key="index"
class="p-normal"
>
{{ item | toFixed2 }}
</p>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="commissionAmount" prop="commissionAmount"
...@@ -265,13 +326,13 @@ ...@@ -265,13 +326,13 @@
min-width="100" min-width="100"
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!--<span>{{ scope.row.price }}</span>--> <p
<p v-if="scope.row.commissionAmount>0"> v-for="(item, index) in scope.row.goodsCommissionAmountList"
{{ scope.row.commissionAmount | toFixed2 }} :key="index"
</p> class="p-normal"
<p v-else> >
- {{ item | toFixed2 }}
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
...@@ -322,7 +383,7 @@ ...@@ -322,7 +383,7 @@
<!--<el-button @click="closeTrade(scope.row)" type="text" size="small">关闭交易</el-button>--> <!--<el-button @click="closeTrade(scope.row)" type="text" size="small">关闭交易</el-button>-->
<!--<el-button @click="changePrice(scope.row)" type="text" size="small">修改价格</el-button>--> <!--<el-button @click="changePrice(scope.row)" type="text" size="small">修改价格</el-button>-->
<!-- <el-button @click="sendGoods(scope.row)" type="text" size="small">发货</el-button>--> <!-- <el-button @click="sendGoods(scope.row)" type="text" size="small">发货</el-button>-->
<el-button <!-- <el-button
v-if=" v-if="
scope.row.storeType == 1 && scope.row.storeType == 1 &&
scope.row.showStatus == 3 && scope.row.showStatus == 3 &&
...@@ -346,7 +407,7 @@ ...@@ -346,7 +407,7 @@
> >
<el-button <el-button
v-if=" v-if="
scope.row.storeType == 1 && (scope.row.storeType == 1 || scope.row.storeType == 2) &&
(scope.row.showStatus == 1 || scope.row.showStatus == 2) (scope.row.showStatus == 1 || scope.row.showStatus == 2)
" "
@click="viewLogistics(scope.row)" @click="viewLogistics(scope.row)"
...@@ -355,16 +416,14 @@ ...@@ -355,16 +416,14 @@
>查看物流</el-button >查看物流</el-button
> >
<el-button <el-button
v-if="scope.row.storeType == 2 && scope.row.showStatus == 2" v-if="scope.row.storeType == 2 && scope.row.showStatus == 2 && scope.row.expressType == 2"
@click="distributeComplete(scope.row)" @click="distributeComplete(scope.row)"
type="text" type="text"
size="small" size="small"
>配送完成</el-button >配送完成</el-button
> > -->
<el-button @click="goDetail(scope.row)" type="text" size="small" <el-button type="text" size="small" @click="goDetail(scope.row)">查看详情</el-button>
>查看详情</el-button <!-- <el-button
>
<el-button
v-if=" v-if="
(scope.row.storeType == 1 || scope.row.storeType == 2) && (scope.row.storeType == 1 || scope.row.storeType == 2) &&
scope.row.showStatus == 3 && scope.row.showStatus == 3 &&
...@@ -374,7 +433,7 @@ ...@@ -374,7 +433,7 @@
type="text" type="text"
size="small" size="small"
>退款退货</el-button >退款退货</el-button
> > -->
<!-- <el-button type="text" size="small">查看物流</el-button> --> <!-- <el-button type="text" size="small">查看物流</el-button> -->
</div> </div>
</template> </template>
...@@ -392,6 +451,8 @@ ...@@ -392,6 +451,8 @@
:total="totalRows" :total="totalRows"
></el-pagination> ></el-pagination>
</div> </div>
<!-- 关闭交易 -->
<el-dialog <el-dialog
title="确定关闭交易吗?" title="确定关闭交易吗?"
:visible="closeTradeDialog" :visible="closeTradeDialog"
...@@ -441,6 +502,8 @@ ...@@ -441,6 +502,8 @@
> >
</span> </span>
</el-dialog> </el-dialog>
<!-- 修改价格 -->
<el-dialog <el-dialog
title="修改价格" title="修改价格"
:visible="changePriceDialog" :visible="changePriceDialog"
...@@ -472,13 +535,18 @@ ...@@ -472,13 +535,18 @@
> >
</span> </span>
</el-dialog> </el-dialog>
<!-- 配送信息 -->
<send-set-dialog <send-set-dialog
:sendGoodsDialog="sendGoodsDialog" :sendGoodsDialog="sendGoodsDialog"
:dialogTitle="dialogTitle"
:sendSetFormData="sendSetForm" :sendSetFormData="sendSetForm"
:dtType="dtType"
@closeSendSet="closeSendSet" @closeSendSet="closeSendSet"
> >
</send-set-dialog> </send-set-dialog>
<!-- 查看快递物流 -->
<el-dialog <el-dialog
title="查看物流" title="查看物流"
:visible="viewLogisticsDialog" :visible="viewLogisticsDialog"
...@@ -491,7 +559,7 @@ ...@@ -491,7 +559,7 @@
<div> <div>
<i class="el-icon-truck" style="font-size: 18px"></i <i class="el-icon-truck" style="font-size: 18px"></i
><span class="send-status">已发货</span> ><span class="send-status">已发货</span>
<span class="view-number">{{ logisticeInfo }}</span> <span class="view-number">{{ logisticeInfo.expressName }} {{logisticeInfo.expressNo}}</span>
</div> </div>
<div> <div>
<el-button type="text" @click="copyTxt">复制单号</el-button> <el-button type="text" @click="copyTxt">复制单号</el-button>
...@@ -503,10 +571,10 @@ ...@@ -503,10 +571,10 @@
<div class="steps-logistics"> <div class="steps-logistics">
<el-steps direction="vertical" :active="0"> <el-steps direction="vertical" :active="0">
<el-step <el-step
v-for="(item, index) in expressData" v-for="item in expressData"
:title="item.time" :title="item.time"
:description="item.context" :description="item.context"
:key="index" :key="item.time"
> >
<div slot="icon"> <div slot="icon">
<div class="dot"></div> <div class="dot"></div>
...@@ -521,6 +589,33 @@ ...@@ -521,6 +589,33 @@
> >
</span> </span>
</el-dialog> </el-dialog>
<!-- 查看线下配送(云鹊配送)物流 -->
<el-dialog
title="查看物流"
:visible="offlineDialog"
:show-close="false"
width="600px"
center
>
<div class="offline-content">
<p class="offline-title" v-if="offlinedata.showStatus == 1">云鹊配送完成</p>
<p class="offline-title" v-if="offlinedata.showStatus == 2">云鹊配送中</p>
<div class="offline-main">
<p class="offline-msg">配送员: {{offlinedata.sender || '--'}} </p>
<p class="offline-msg">手机号: {{offlinedata.senderMobile || '--'}}</p>
<p class="offline-msg ">备 注: {{offlinedata.remark || '--'}}</p>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="()=>offlineDialog = false"
>我知道了</el-button
>
</span>
</el-dialog>
<!-- 配送完成 -->
<el-dialog <el-dialog
title="" title=""
:visible="disCompleteDialog" :visible="disCompleteDialog"
...@@ -541,6 +636,8 @@ ...@@ -541,6 +636,8 @@
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<!-- 退款退货 -->
<el-dialog <el-dialog
class="tui-dialog" class="tui-dialog"
title="退款退货" title="退款退货"
...@@ -601,6 +698,8 @@ ...@@ -601,6 +698,8 @@
> >
</span> </span>
</el-dialog> </el-dialog>
<!-- 修改物流单号 -->
<el-dialog <el-dialog
class="tui-dialog" class="tui-dialog"
title="修改物流单号" title="修改物流单号"
...@@ -630,6 +729,7 @@ ...@@ -630,6 +729,7 @@
> >
</span> </span>
</el-dialog> </el-dialog>
<!-- 导入物流单号 dialog--> <!-- 导入物流单号 dialog-->
<el-dialog <el-dialog
class="exportlogistics-dialog" class="exportlogistics-dialog"
...@@ -680,6 +780,7 @@ ...@@ -680,6 +780,7 @@
> >
</div> </div>
</el-dialog> </el-dialog>
<!-- 导出进度loading --> <!-- 导出进度loading -->
<el-dialog <el-dialog
class="exportlogistics-dialog" class="exportlogistics-dialog"
...@@ -873,11 +974,21 @@ export default { ...@@ -873,11 +974,21 @@ export default {
updatePrice: "", updatePrice: "",
}, },
sendGoodsDialog: false, sendGoodsDialog: false,
dialogTitle: "", dtType: 1,
sendSetForm: {}, sendSetForm: {},
viewLogisticsDialog: false, viewLogisticsDialog: false,
logisticeInfo: "", //复制物流信息 logisticeInfo: {
expressName: '',
expressNo: ''
}, //复制物流信息
disCompleteDialog: false, disCompleteDialog: false,
offlineDialog: false, // 线下配送
offlinedata:{ //线下配送的物流信息
showStatus: 0,
sender: '',
senderMobile: '',
remark: ''
},
disCompleteData: {}, disCompleteData: {},
rules: { rules: {
name: [{ required: true, message: "请输入快递公司", trigger: "blur" }], name: [{ required: true, message: "请输入快递公司", trigger: "blur" }],
...@@ -890,7 +1001,7 @@ export default { ...@@ -890,7 +1001,7 @@ export default {
}, },
expressData: [ expressData: [
{ {
time: "2021-06-23 12:21:21", time: "",
context: "待揽收", context: "待揽收",
}, },
], ],
...@@ -985,7 +1096,7 @@ export default { ...@@ -985,7 +1096,7 @@ export default {
errorFileUrl: "", // 失败 原因文件 errorFileUrl: "", // 失败 原因文件
errorList: [], // 失败列表 errorList: [], // 失败列表
}, },
isLoading: false, isLoading: false
// errorFileUrl:"", // errorFileUrl:"",
}; };
}, },
...@@ -1060,7 +1171,6 @@ export default { ...@@ -1060,7 +1171,6 @@ export default {
closeLoading(this); closeLoading(this);
}); });
}, },
// 获取物流上传进度 // 获取物流上传进度
async getUploadExpressProgressInterval(id) { async getUploadExpressProgressInterval(id) {
clearInterval(this.timer); clearInterval(this.timer);
...@@ -1096,7 +1206,6 @@ export default { ...@@ -1096,7 +1206,6 @@ export default {
} }
}); });
}, },
// 获取批量取消进度 // 获取批量取消进度
async getUploadRefundProgressInterval(id) { async getUploadRefundProgressInterval(id) {
clearInterval(this.timer); clearInterval(this.timer);
...@@ -1107,7 +1216,6 @@ export default { ...@@ -1107,7 +1216,6 @@ export default {
}, 2000); }, 2000);
} }
}, },
getUploadRefundProgress(id) { getUploadRefundProgress(id) {
return getUploadRefundProgress(id).then((res) => { return getUploadRefundProgress(id).then((res) => {
if (res && res.code == "000000") { if (res && res.code == "000000") {
...@@ -1139,7 +1247,6 @@ export default { ...@@ -1139,7 +1247,6 @@ export default {
}), }),
(this.exportDialog = false); (this.exportDialog = false);
}, },
// 导入物流单号 // 导入物流单号
uploadfile(file) { uploadfile(file) {
let _this = this; let _this = this;
...@@ -1162,7 +1269,6 @@ export default { ...@@ -1162,7 +1269,6 @@ export default {
this.statFlg = false; this.statFlg = false;
this.FailureReasonFlag = true; this.FailureReasonFlag = true;
}, },
searchList() { searchList() {
this.searchForm.orderBeginTime = this.createRangeTime[0]; this.searchForm.orderBeginTime = this.createRangeTime[0];
this.searchForm.orderEndTime = this.createRangeTime[1]; this.searchForm.orderEndTime = this.createRangeTime[1];
...@@ -1231,6 +1337,9 @@ export default { ...@@ -1231,6 +1337,9 @@ export default {
} else if (this.activeName == "five") { } else if (this.activeName == "five") {
//交易关闭 //交易关闭
this.searchForm.showStatus = 5; this.searchForm.showStatus = 5;
} else if (this.activeName == "six") {
//交易关闭
this.searchForm.showStatus = 6;
} }
this.searchForm.pageNo = 1; this.searchForm.pageNo = 1;
this.searchList(); this.searchList();
...@@ -1257,8 +1366,8 @@ export default { ...@@ -1257,8 +1366,8 @@ export default {
}, },
//发货 //发货
sendGoods(row) { sendGoods(row) {
this.dtType = 1;
this.sendGoodsDialog = true; this.sendGoodsDialog = true;
this.dialogTitle = "发货设置";
this.sendSetForm = row; this.sendSetForm = row;
}, },
closeSendSet(val) { closeSendSet(val) {
...@@ -1272,17 +1381,30 @@ export default { ...@@ -1272,17 +1381,30 @@ export default {
}, },
//配送 //配送
distribute(row) { distribute(row) {
this.dtType = 2;
this.sendGoodsDialog = true; this.sendGoodsDialog = true;
this.dialogTitle = "配送设置";
this.sendSetForm = row; this.sendSetForm = row;
}, },
//查看物流 //查看物流
viewLogistics(row) { viewLogistics(row) {
console.log("row-----", row); console.log("row-----", row);
// expressType 1为物流配送 2为线下
if (row.expressType == 2) {
this.showOffline(row);
return;
}
expressInfo({ expressNo: row.expressNo,receiverMobile:row.receiverMobile }).then((res) => { expressInfo({ expressNo: row.expressNo,receiverMobile:row.receiverMobile }).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.expressData = [...res.data.data, ...this.expressData]; if (res.data.data && res.data.data.length) {
this.logisticeInfo = `${row.expressName} ${row.expressNo}`; this.expressData = res.data.data;
} else {
this.expressData[0].time = res.data.updateTime || '';
this.expressData = this.expressData;
}
this.logisticeInfo = {
expressName: row.expressName,
expressNo: row.expressNo
};
this.expressForm.order = row; this.expressForm.order = row;
this.expressForm.company = `${row.expressName}`; this.expressForm.company = `${row.expressName}`;
this.expressForm.no = `${row.expressNo}`; this.expressForm.no = `${row.expressNo}`;
...@@ -1292,13 +1414,18 @@ export default { ...@@ -1292,13 +1414,18 @@ export default {
} }
}); });
}, },
// 展示线下物流信息
showOffline(row) {
const {sender, senderMobile, remark, showStatus} = row;
this.offlinedata = {sender, senderMobile, remark, showStatus};
this.offlineDialog = true
},
cancelView() { cancelView() {
this.viewLogisticsDialog = false; this.viewLogisticsDialog = false;
}, },
copyTxt() { copyTxt() {
let txt = document.getElementById("copyInput"); let txt = document.getElementById("copyInput");
txt.value = this.logisticeInfo; txt.value = this.logisticeInfo.expressNo;
// if (navigator.userAgent.match(/(iPhone|iPod|iPad|Mac);?/i)) { // if (navigator.userAgent.match(/(iPhone|iPod|iPad|Mac);?/i)) {
if ( if (
navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Safari") > -1 &&
...@@ -1450,7 +1577,6 @@ export default { ...@@ -1450,7 +1577,6 @@ export default {
window.open(res.data); window.open(res.data);
}); });
}, },
// 云鹊店铺-订单管理-药代列表 // 云鹊店铺-订单管理-药代列表
brokerListAll() { brokerListAll() {
brokerListAll({ ownerId: this.ownerId }).then((res) => { brokerListAll({ ownerId: this.ownerId }).then((res) => {
...@@ -1469,7 +1595,6 @@ export default { ...@@ -1469,7 +1595,6 @@ export default {
} }
}); });
}, },
changeOwner(data) { changeOwner(data) {
this.ownerId = data; this.ownerId = data;
this.brokerListAll(); this.brokerListAll();
...@@ -1688,8 +1813,21 @@ export default { ...@@ -1688,8 +1813,21 @@ export default {
} }
} }
} }
.importUrl { .importUrl {
color: #449284; color: #449284;
} }
.offline-content {
.offline-title {
padding: 10px 0;
line-height: 24px;
font-size: 18px;
color: #303133;
border-bottom: 1px solid #ddd;
}
.offline-main {
.offline-msg {
line-height: 30px;
}
}
}
</style> </style>
<template> <template>
<div class="create-shop-wrapper"> <div class="create-shop-wrapper">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb> <bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond"
></bread-crumb>
<div class="create-shop-content screenSet" id="screenSet"> <div class="create-shop-content screenSet" id="screenSet">
<el-row class="step-content"> <el-row class="step-content">
<el-col :span="20"> <el-col :span="20">
<p class="title">新建店铺</p> <p class="title">新建店铺</p>
</el-col> </el-col>
<el-col :span="4" style="text-align: right"> <el-col :span="4" style="text-align: right">
<el-button size="small" type="primary" :disabled="storeData && storeData.tradeStore.storeType == 3" @click="complete">完成</el-button> <el-button
size="small"
type="primary"
:disabled="storeData && storeData.tradeStore.storeType == 3"
@click="complete"
>完成</el-button
>
<el-button size="small" type="primary" @click="back">返回</el-button> <el-button size="small" type="primary" @click="back">返回</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-form <el-form
ref="formData" ref="formData"
:model="formData" :model="formData"
:rules="rules" :rules="rules"
label-width="150px" label-width="150px"
label-suffix=":" label-suffix=":"
class="basic-form" class="basic-form"
style="margin-top: 15px" style="margin-top: 15px"
> >
<div class="basic-item-icon"> <div class="basic-item-icon">
<el-form-item label="店铺LOGO" class="required-label"> <el-form-item label="店铺LOGO" class="required-label">
<el-upload <el-upload
v-model="formData.storeLogo" v-model="formData.storeLogo"
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUploadPic1" :before-upload="beforeUploadPic1"
>
<img
v-if="formData.storeLogo"
:src="formData.storeLogo"
@mouseover.stop="imgMouseOver1 = true"
class="bg-img"
/>
<img
v-if="!formData.storeLogo"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
v-if="storeData && storeData.tradeStore.storeType == 3"
class="img-delete"
v-show="imgMouseOver1"
@click.stop="deleteImg('storeLogo')"
@mouseout.stop="imgMouseOver1 = false"
> >
<img <i class="el-icon-delete"></i>
v-if="formData.storeLogo" </div>
:src="formData.storeLogo" <div class="limit-text">
@mouseover.stop="imgMouseOver1=true" <p>限制大小: 200kb</p>
class="bg-img" <p>建议尺寸:128*128</p>
/> <p>支持jpeg, png格式</p>
<img v-if="!formData.storeLogo" class="bg-img" src="../../assets/image/small.png" /> </div>
<div v-if="storeData && storeData.tradeStore.storeType == 3" </el-upload>
class="img-delete" </el-form-item>
v-show="imgMouseOver1" <p class="upload-message" v-if="uploadImgMessage1">请上传店铺logo</p>
@click.stop="deleteImg('storeLogo')" </div>
@mouseout.stop="imgMouseOver1=false" <el-form-item label="店铺名称" prop="storeName">
> <el-col :span="10">
<i class="el-icon-delete"></i> <el-input
</div> :disabled="storeData && storeData.tradeStore.storeType == 3"
<div class="limit-text"> size="small"
<p>限制大小: 200kb</p> v-model="formData.storeName"
<p>建议尺寸:128*128</p> placeholder="请输入店铺名称"
<p>支持jpeg, png格式</p> maxlength="16"
</div> style="width: 85%"
</el-upload> ></el-input>
</el-form-item> <span class="word-num"
<p class="upload-message" v-if="uploadImgMessage1">请上传店铺logo</p> >{{ formData.storeName.replace(/\s+/g, "").length }}/16</span
</div> >
<el-form-item label="店铺名称" prop="storeName"> </el-col>
</el-form-item>
<el-form-item label="店铺简介" prop="storeDescription">
<el-col :span="10">
<el-input
:disabled="storeData && storeData.tradeStore.storeType == 3"
type="textarea"
rows="4"
maxlength="400"
size="small"
v-model="formData.storeDescription"
placeholder="请输入店铺简介"
style="width: 85%"
></el-input>
<span class="word-num"
>{{
formData.storeDescription.replace(/\s+/g, "").length
}}/400</span
>
</el-col>
</el-form-item>
<el-form-item label="店铺类型" prop="storeType">
<el-select
v-model="formData.storeType"
placeholder="请选择店铺类型"
size="small"
clearable
:disabled="isDisabled"
style="width: 35%"
>
<el-option
v-for="(item, index) in typeList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<div>
<div v-if="formData.storeType == 1">
<el-row>
<el-col :span="10"> <el-col :span="10">
<el-input <el-form-item
:disabled="storeData && storeData.tradeStore.storeType == 3" label="入驻企业名称"
prop="compainName"
class="required-label"
>
<el-input
type="text"
maxlength="50"
size="small" size="small"
v-model="formData.storeName" v-model="formData.compainName"
placeholder="请输入店铺名称" placeholder="请输入入驻企业名称"
maxlength="16" style="width: 85%"
style="width:85%;" ></el-input>
></el-input> <span class="word-num"
<span class="word-num">{{(formData.storeName).replace(/\s+/g,"").length}}/16</span> >{{
formData.compainName.replace(/\s+/g, "").length
}}/50</span
>
</el-form-item>
</el-col> </el-col>
</el-form-item> <el-col :span="10" :offset="1">
<el-form-item label="店铺简介" prop="storeDescription"> <el-form-item
<el-col :span="10"> label="联系手机号"
<el-input prop="phoneNum"
:disabled="storeData && storeData.tradeStore.storeType == 3" label-width="95px"
type="textarea" class="required-label"
rows="4" >
maxlength="400" <el-input
type="text"
size="small" size="small"
v-model="formData.storeDescription" maxlength="11"
placeholder="请输入店铺简介" :disabled="isDisabled"
style="width:85%;" v-model="formData.phoneNum"
></el-input> placeholder="请输入联系电话"
<span class="word-num">{{(formData.storeDescription).replace(/\s+/g,"").length}}/400</span> style="width: 85%"
></el-input>
</el-form-item>
</el-col> </el-col>
</el-form-item> </el-row>
<el-form-item label="店铺类型" prop="storeType"> <div
<el-select class="main-content"
v-model="formData.storeType" v-for="(item, index) in formData.adminList"
placeholder="请选择店铺类型" :key="index"
size="small"
clearable
:disabled="isDisabled"
style="width: 35%"
> >
<el-option
v-for="(item,index) in typeList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<div v-if="formData.storeType == 1">
<el-row>
<el-col :span="10">
<el-form-item label="入驻企业名称" prop="compainName" class="required-label">
<el-input
type="text"
maxlength="50"
size="small"
v-model="formData.compainName"
placeholder="请输入入驻企业名称"
style="width:85%;"
></el-input>
<span class="word-num">{{(formData.compainName).replace(/\s+/g,"").length}}/50</span>
</el-form-item>
</el-col>
<el-col :span="10" :offset="1">
<el-form-item label="联系手机号" prop="phoneNum" label-width="95px" class="required-label">
<el-input
type="text"
size="small"
maxlength="11"
:disabled="isDisabled"
v-model="formData.phoneNum"
placeholder="请输入联系电话"
style="width:85%;"
></el-input>
</el-form-item>
</el-col>
</el-row>
<div class="main-content" v-for="(item, index) in formData.adminList" :key="index">
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="管理员姓名" class="required-label"> <el-form-item label="管理员姓名" class="required-label">
<el-input <el-input
type="text" type="text"
maxlength="10" maxlength="10"
size="small" size="small"
v-model="item.adminName" v-model="item.adminName"
placeholder="请输入管理员姓名" placeholder="请输入管理员姓名"
style="width:85%;" style="width: 85%"
></el-input> ></el-input>
<span class="word-num">{{(item.adminName).replace(/\s+/g,"").length}}/10</span> <span class="word-num"
>{{ item.adminName.replace(/\s+/g, "").length }}/10</span
>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="1" style="text-align: right"> <el-col :span="1" style="text-align: right">
<img style="margin-top: 5px;" src="../../assets/image/lianjie_icon.png" /> <img
style="margin-top: 5px"
src="../../assets/image/lianjie_icon.png"
/>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="手机号" label-width="95px" class="required-label"> <el-form-item
label="手机号"
label-width="95px"
class="required-label"
>
<el-input <el-input
type="text" type="text"
size="small" size="small"
maxlength="11" maxlength="11"
v-model="item.adminMobile" v-model="item.adminMobile"
placeholder="请输入管理员手机号" placeholder="请输入管理员手机号"
style="width:85%;" style="width: 85%"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="2" class="span-mt-10"> <el-col :span="2" class="span-mt-10">
<img <img
v-if="index < 4 && (index == formData.adminList.length-1)" v-if="index < 4 && index == formData.adminList.length - 1"
@click="addItem(index)" @click="addItem(index)"
class="edit-img" class="edit-img"
src="../../assets/image/plus.png" src="../../assets/image/plus.png"
/> />
<img <img
v-if="formData.adminList.length > 1" v-if="formData.adminList.length > 1"
@click="deleteItem(index)" @click="deleteItem(index)"
class="edit-img" class="edit-img"
src="../../assets/image/trash.png" src="../../assets/image/trash.png"
/> />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-form-item label="营业证明">
<p class="p-tips">
若填写的联系人注册不是法定代表人,请上传委托书<br />
仅支持jpg、png图片文件,且文件小于3M<br />
上传的证件图片内,必须是加盖过红色公章和法人章,否则视为无效
</p>
<div style="display: flex">
<div class="flex-upload">
<el-upload
v-model="formData.imgUrlP1"
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadProve1"
>
<img
v-if="formData.imgUrlP1"
:src="formData.imgUrlP1"
@mouseover.stop="imgMouseOverP1 = true"
class="bg-img"
/>
<img
v-if="!formData.imgUrlP1"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete add-left-18"
v-show="imgMouseOverP1"
@click.stop="deleteImg('imgUrlP1')"
@mouseout.stop="imgMouseOverP1 = false"
>
<i class="el-icon-delete"></i>
</div>
</el-upload>
<p class="tips">营业执照</p>
</div>
<div class="flex-upload">
<el-upload
v-model="formData.imgUrlP2"
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadProve2"
>
<img
v-if="formData.imgUrlP2"
:src="formData.imgUrlP2"
@mouseover.stop="imgMouseOverP2 = true"
class="bg-img"
/>
<img
v-if="!formData.imgUrlP2"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete add-left-18"
v-show="imgMouseOverP2"
@click.stop="deleteImg('imgUrlP2')"
@mouseout.stop="imgMouseOverP2 = false"
>
<i class="el-icon-delete"></i>
</div>
</el-upload>
<p class="tips">药品经营许可证</p>
</div>
<div class="flex-upload">
<el-upload
v-model="formData.imgUrlP3"
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadProve3"
>
<img
v-if="formData.imgUrlP3"
:src="formData.imgUrlP3"
@mouseover.stop="imgMouseOverP3 = true"
class="bg-img"
/>
<img
v-if="!formData.imgUrlP3"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete add-left-18"
v-show="imgMouseOverP3"
@click.stop="deleteImg('imgUrlP3')"
@mouseout.stop="imgMouseOverP3 = false"
>
<i class="el-icon-delete"></i>
</div>
</el-upload>
<p class="tips">委托书</p>
</div>
</div>
</el-form-item>
</div>
<div v-if="formData.storeType == 3">
<el-form-item
label="医生姓名"
prop="docName"
class="required-label"
>
<el-input
:disabled="storeData && storeData.tradeStore.storeType == 3"
type="text"
maxlength="50"
size="small"
v-model="formData.docName"
placeholder="请输入医生姓名"
style="width: 35%"
></el-input>
<span class="word-num"
>{{ formData.docName.replace(/\s+/g, "").length }}/50</span
>
</el-form-item>
<el-form-item
label="联系手机号"
prop="docPhone"
class="required-label"
>
<el-input
type="text"
size="small"
maxlength="11"
v-model="formData.docPhone"
:disabled="isDisabled"
placeholder="请输入联系电话"
style="width: 35%"
></el-input>
</el-form-item>
</div>
<div v-if="formData.storeType == 2">
<el-col :span="10">
<el-form-item
label="入驻药店名称"
prop="drugstoreName"
class="required-label"
>
<el-input
type="text"
maxlength="50"
size="small"
v-model="formData.drugstoreName"
placeholder="请输入入驻药店名称"
style="width: 85%"
></el-input>
<span class="word-num"
>{{
formData.drugstoreName.replace(/\s+/g, "").length
}}/50</span
>
</el-form-item>
</el-col>
<el-col :span="10" :offset="1">
<el-form-item
label="联系电话"
prop="drugstorePhone"
label-width="95px"
class="required-label"
>
<el-input
type="text"
size="small"
maxlength="11"
v-model="formData.drugstorePhone"
:disabled="isDisabled"
placeholder="请输入联系电话"
style="width: 85%"
></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="营业证明"> <el-form-item label="营业证明">
<p class="p-tips">若填写的联系人注册不是法定代表人,请上传委托书<br/> <p class="p-tips">
仅支持jpg、png图片文件,且文件小于3M<br/> 若填写的联系人注册不是法定代表人,请上传委托书<br />
上传的证件图片内,必须是加盖过红色公章和法人章,否则视为无效</p> 仅支持jpg、png图片文件,且文件小于3M<br />
上传的证件图片内,必须是加盖过红色公章和法人章,否则视为无效
</p>
<div style="display: flex"> <div style="display: flex">
<div class="flex-upload"> <div class="flex-upload">
<el-upload <el-upload
v-model="formData.imgUrlP1" v-model="formData.imgUrlC1"
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUploadProve1" :before-upload="beforeUploadC1"
> >
<img <img
v-if="formData.imgUrlP1" v-if="formData.imgUrlC1"
:src="formData.imgUrlP1" :src="formData.imgUrlC1"
@mouseover.stop="imgMouseOverP1=true" @mouseover.stop="imgMouseOverC1 = true"
class="bg-img" class="bg-img"
/> />
<img v-if="!formData.imgUrlP1" class="bg-img" src="../../assets/image/small.png" /> <img
<div v-if="!formData.imgUrlC1"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete add-left-18" class="img-delete add-left-18"
v-show="imgMouseOverP1" v-show="imgMouseOverC1"
@click.stop="deleteImg('imgUrlP1')" @click.stop="deleteImg('imgUrlC1')"
@mouseout.stop="imgMouseOverP1=false" @mouseout.stop="imgMouseOverC1 = false"
> >
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
</el-upload> </el-upload>
<p class="tips">营业执照</p> <p class="tips">营业执照</p>
</div> </div>
<div class="flex-upload"> <div class="flex-upload">
<el-upload <el-upload
v-model="formData.imgUrlP2" v-model="formData.imgUrlC2"
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUploadProve2" :before-upload="beforeUploadC2"
> >
<img <img
v-if="formData.imgUrlP2" v-if="formData.imgUrlC2"
:src="formData.imgUrlP2" :src="formData.imgUrlC2"
@mouseover.stop="imgMouseOverP2=true" @mouseover.stop="imgMouseOverC2 = true"
class="bg-img" class="bg-img"
/> />
<img v-if="!formData.imgUrlP2" class="bg-img" src="../../assets/image/small.png" /> <img
<div v-if="!formData.imgUrlC2"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete add-left-18" class="img-delete add-left-18"
v-show="imgMouseOverP2" v-show="imgMouseOverC2"
@click.stop="deleteImg('imgUrlP2')" @click.stop="deleteImg('imgUrlC2')"
@mouseout.stop="imgMouseOverP2=false" @mouseout.stop="imgMouseOverC2 = false"
> >
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
</el-upload><p class="tips">药品经营许可证</p> </el-upload>
<p class="tips">药品经营许可证</p>
</div> </div>
<div class="flex-upload"> <div class="flex-upload">
<el-upload <el-upload
v-model="formData.imgUrlP3" v-model="formData.imgUrlC3"
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUploadProve3" :before-upload="beforeUploadC3"
> >
<img <img
v-if="formData.imgUrlP3" v-if="formData.imgUrlC3"
:src="formData.imgUrlP3" :src="formData.imgUrlC3"
@mouseover.stop="imgMouseOverP3=true" @mouseover.stop="imgMouseOverC3 = true"
class="bg-img" class="bg-img"
/> />
<img v-if="!formData.imgUrlP3" class="bg-img" src="../../assets/image/small.png" /> <img
<div v-if="!formData.imgUrlC3"
class="bg-img"
src="../../assets/image/small.png"
/>
<div
class="img-delete add-left-18" class="img-delete add-left-18"
v-show="imgMouseOverP3" v-show="imgMouseOverC3"
@click.stop="deleteImg('imgUrlP3')" @click.stop="deleteImg('imgUrlC3')"
@mouseout.stop="imgMouseOverP3=false" @mouseout.stop="imgMouseOverC3 = false"
> >
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
</el-upload><p class="tips">委托书</p> </el-upload>
<p class="tips">委托书</p>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
</div> </el-col>
<div v-if="formData.storeType == 3"> </div>
<el-col :span="10"> </div>
<el-form-item label="医生姓名" prop="docName" class="required-label">
<el-input <div>
:disabled="storeData && storeData.tradeStore.storeType == 3" <el-col :span="24">
type="text" <el-form-item
maxlength="50" label="医疗资质"
size="small" prop="storeQualityUrl"
v-model="formData.docName" >
placeholder="请输入医生姓名" <el-input
style="width:85%;" size="small"
></el-input> v-model="formData.storeQualityUrl"
<span class="word-num">{{(formData.docName).replace(/\s+/g,"").length}}/50</span> placeholder="请填写URL,仅对批发商品生效"
</el-form-item> style="width: 35%"
</el-col> ></el-input>
<el-col :span="10" :offset="1"> </el-form-item>
<el-form-item label="联系手机号" prop="docPhone" label-width="95px" class="required-label"> </el-col>
<el-input </div>
type="text"
size="small" </el-form>
maxlength="11"
v-model="formData.docPhone"
:disabled="isDisabled"
placeholder="请输入联系电话"
style="width:85%;"
></el-input>
</el-form-item>
</el-col>
</div>
<div v-if="formData.storeType == 2">
<el-col :span="10">
<el-form-item label="入驻药店名称" prop="drugstoreName" class="required-label">
<el-input
type="text"
maxlength="50"
size="small"
v-model="formData.drugstoreName"
placeholder="请输入入驻药店名称"
style="width:85%;"
></el-input>
<span class="word-num">{{(formData.drugstoreName).replace(/\s+/g,"").length}}/50</span>
</el-form-item>
</el-col>
<el-col :span="10" :offset="1">
<el-form-item label="联系电话" prop="drugstorePhone" label-width="95px" class="required-label">
<el-input
type="text"
size="small"
maxlength="11"
v-model="formData.drugstorePhone"
:disabled="isDisabled"
placeholder="请输入联系电话"
style="width:85%;"
></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="营业证明">
<p class="p-tips">若填写的联系人注册不是法定代表人,请上传委托书<br/>
仅支持jpg、png图片文件,且文件小于3M<br/>
上传的证件图片内,必须是加盖过红色公章和法人章,否则视为无效</p>
<div style="display: flex">
<div class="flex-upload">
<el-upload
v-model="formData.imgUrlC1"
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadC1"
>
<img
v-if="formData.imgUrlC1"
:src="formData.imgUrlC1"
@mouseover.stop="imgMouseOverC1=true"
class="bg-img"
/>
<img v-if="!formData.imgUrlC1" class="bg-img" src="../../assets/image/small.png" />
<div
class="img-delete add-left-18"
v-show="imgMouseOverC1"
@click.stop="deleteImg('imgUrlC1')"
@mouseout.stop="imgMouseOverC1=false"
>
<i class="el-icon-delete"></i>
</div>
</el-upload>
<p class="tips">营业执照</p>
</div>
<div class="flex-upload">
<el-upload
v-model="formData.imgUrlC2"
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadC2"
>
<img
v-if="formData.imgUrlC2"
:src="formData.imgUrlC2"
@mouseover.stop="imgMouseOverC2=true"
class="bg-img"
/>
<img v-if="!formData.imgUrlC2" class="bg-img" src="../../assets/image/small.png" />
<div
class="img-delete add-left-18"
v-show="imgMouseOverC2"
@click.stop="deleteImg('imgUrlC2')"
@mouseout.stop="imgMouseOverC2=false"
>
<i class="el-icon-delete"></i>
</div>
</el-upload><p class="tips">药品经营许可证</p>
</div>
<div class="flex-upload">
<el-upload
v-model="formData.imgUrlC3"
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadC3"
>
<img
v-if="formData.imgUrlC3"
:src="formData.imgUrlC3"
@mouseover.stop="imgMouseOverC3=true"
class="bg-img"
/>
<img v-if="!formData.imgUrlC3" class="bg-img" src="../../assets/image/small.png" />
<div
class="img-delete add-left-18"
v-show="imgMouseOverC3"
@click.stop="deleteImg('imgUrlC3')"
@mouseout.stop="imgMouseOverC3=false"
>
<i class="el-icon-delete"></i>
</div>
</el-upload><p class="tips">委托书</p>
</div>
</div>
</el-form-item>
</el-col>
</div>
</el-form>
<el-dialog <el-dialog
class="dialog-title-border-old" class="dialog-title-border-old"
title="图片裁剪" title="图片裁剪"
:visible.sync="showCropper" :visible.sync="showCropper"
:width="currentOption.cropDialogWidth" :width="currentOption.cropDialogWidth"
center> center
<div slot="title" style="text-align: left;"> >
<span style="font-weight: 700;">图片裁剪</span> <div slot="title" style="text-align: left">
<span style="font-weight: 700">图片裁剪</span>
</div> </div>
<div v-if="showCropper" style="margin-bottom: 20px;"> <div v-if="showCropper" style="margin-bottom: 20px">
<Cropper <Cropper
:cropOption="currentOption" :cropOption="currentOption"
@getCropImg="getCropImg(arguments)" @getCropImg="getCropImg(arguments)"
:originImg="slide2.oriUrl" :originImg="slide2.oriUrl"
/> />
</div> </div>
</el-dialog> </el-dialog>
...@@ -421,665 +538,704 @@ ...@@ -421,665 +538,704 @@
</div> </div>
</template> </template>
<script> <script>
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/breadcrumb.vue";
let vm = null; let vm = null;
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath } from "../../utils/qiniu-util"; import { doUpload, getFilePath } from "../../utils/qiniu-util";
import Cropper from '@/components/common/cropper.vue' import Cropper from "@/components/common/cropper.vue";
import { saveStore, queryStore } from '@/utils/shop'; import { saveStore, queryStore } from "@/utils/shop";
import { checkMobile } from '@/utils/patients/checkValid' import { checkMobile } from "@/utils/patients/checkValid";
export default { export default {
components: { components: {
BreadCrumb, BreadCrumb,
Cropper Cropper,
}, },
data(){ data() {
let checkProjectStr = (rule, value, callback) => { let checkProjectStr = (rule, value, callback) => {
if (value.indexOf("\\") != -1) { if (value.indexOf("\\") != -1) {
callback(new Error("请勿输入字符“ \\ ")); callback(new Error("请勿输入字符“ \\ "));
} else if (value.indexOf(".") != -1) { } else if (value.indexOf(".") != -1) {
callback(new Error("请勿输入字符“ . ")); callback(new Error("请勿输入字符“ . "));
} else { } else {
callback(); callback();
} }
}; };
return{ return {
curmbFirst: '云鹊店铺', curmbFirst: "云鹊店铺",
curmbSecond: '新建店铺', curmbSecond: "新建店铺",
isDisabled: false, isDisabled: false,
storeData: null, storeData: null,
typeList: [ typeList: [
{ {
label: '供货商', label: "供货商",
value: 1, value: 1,
}, {
label: '小药房',
value: 2,
}, {
label: '医生小店',
value: 3,
}
],
formData: {
storeId: null,
userId: null,
storeLogo: '',//店铺logo
storeName: '',
storeDescription: '',
storeType: '',
storeOwner: '',
storePhone: '',
imageList: [],
adminList: [
{
adminName: '',
adminMobile: '',
id: null,
}
],//供货商-管理员信息
compainName: '',//供货商-入驻企业名称
phoneNum: '',//供货商-联系电话
imgUrlP1: '',//证明图1
imgUrlP2: '',//证明图2
imgUrlP3: '',//证明图3
docName: '',//医生小店-医生姓名
docPhone: '',//医生小店-联系电话
drugstoreName: '',//小药房-药店名称
drugstorePhone: '',//小药房-联系电话
imgUrlC1: '',//证明图1
imgUrlC2: '',//证明图2
imgUrlC3: '',//证明图3
},
supplierImg1: {
id: null,
imageSort: 1,
imageType: 2,
imageUrl: '',
},
supplierImg2: {
id: null,
imageSort: 2,
imageType: 2,
imageUrl: '',
},
supplierImg3: {
id: null,
imageSort: 3,
imageType: 2,
imageUrl: '',
},
drugstoreImg1: {
id: null,
imageSort: 1,
imageType: 2,
imageUrl: '',
},
drugstoreImg2: {
id: null,
imageSort: 2,
imageType: 2,
imageUrl: '',
},
drugstoreImg3: {
id: null,
imageSort: 3,
imageType: 2,
imageUrl: '',
}, },
showCropper: false, {
currentOption: { label: "小药房",
offset_x: 120, value: 2,
offset_y: 185,
width: 160,
height: 120,
cvWidth: 1000,
cvHeight: 800,
uploadType: 1,
cropDialogWidth: '900px',
cropBoxResizable: true,
minCropBoxWidth: 100,
minCropBoxHeight: 100,
aspectRatio: 16/9,
currentPic: '',
}, },
slide2: { {
oriUrl: '', // 原图 label: "医生小店",
value: 3,
}, },
rules: { ],
storeName: [ formData: {
{ required: true, message: "请输入店铺名称", trigger: "blur" }, storeId: null,
userId: null,
storeQualityUrl:"",
storeLogo: "", //店铺logo
storeName: "",
storeDescription: "",
storeType: "",
storeOwner: "",
storePhone: "",
imageList: [],
adminList: [
{
adminName: "",
adminMobile: "",
id: null,
},
], //供货商-管理员信息
compainName: "", //供货商-入驻企业名称
phoneNum: "", //供货商-联系电话
imgUrlP1: "", //证明图1
imgUrlP2: "", //证明图2
imgUrlP3: "", //证明图3
docName: "", //医生小店-医生姓名
docPhone: "", //医生小店-联系电话
drugstoreName: "", //小药房-药店名称
drugstorePhone: "", //小药房-联系电话
imgUrlC1: "", //证明图1
imgUrlC2: "", //证明图2
imgUrlC3: "", //证明图3
},
supplierImg1: {
id: null,
imageSort: 1,
imageType: 2,
imageUrl: "",
},
supplierImg2: {
id: null,
imageSort: 2,
imageType: 2,
imageUrl: "",
},
supplierImg3: {
id: null,
imageSort: 3,
imageType: 2,
imageUrl: "",
},
drugstoreImg1: {
id: null,
imageSort: 1,
imageType: 2,
imageUrl: "",
},
drugstoreImg2: {
id: null,
imageSort: 2,
imageType: 2,
imageUrl: "",
},
drugstoreImg3: {
id: null,
imageSort: 3,
imageType: 2,
imageUrl: "",
},
showCropper: false,
currentOption: {
offset_x: 120,
offset_y: 185,
width: 160,
height: 120,
cvWidth: 1000,
cvHeight: 800,
uploadType: 1,
cropDialogWidth: "900px",
cropBoxResizable: true,
minCropBoxWidth: 100,
minCropBoxHeight: 100,
aspectRatio: 16 / 9,
currentPic: "",
},
slide2: {
oriUrl: "", // 原图
},
rules: {
storeName: [
{ required: true, message: "请输入店铺名称", trigger: "blur" },
{
min: 2,
max: 16,
message: "输入长度为2-16的内容,可包含中英文、数字及特殊符号",
trigger: "blur",
},
{ validator: checkProjectStr, trigger: "blur" },
],
storeDescription: [
{ required: false, message: "请输入店铺简介", trigger: "blur" },
{ validator: checkProjectStr, trigger: "blur" },
],
storeType: [
{ required: true, message: "请选择店铺类型", trigger: "blur" },
],
compainName: [
{ required: true, message: "请输入入驻企业名称", trigger: "blur" },
],
phoneNum: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{ validator: checkMobile, trigger: ["change", "blur"] },
],
docName: [
{ required: true, message: "请输入医生姓名", trigger: "blur" },
],
docPhone: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{ validator: checkMobile, trigger: ["change", "blur"] },
],
drugstoreName: [
{ required: true, message: "请输入入驻药店名称", trigger: "blur" },
],
drugstorePhone: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{ validator: checkMobile, trigger: ["change", "blur"] },
],
},
imgMouseOver1: false,
uploadImgMessage1: false, //未上传图片,校验提示语
imgMouseOverP1: false,
imgMouseOverP2: false,
imgMouseOverP3: false,
imgMouseOverC1: false,
imgMouseOverC2: false,
imgMouseOverC3: false,
addItemFlag: true,
enterType: 1,
};
},
watch: {},
created() {
vm = this;
this.formData.storeId = this.$route.query.storeId || null;
this.storeData = this.$route.query.storeData || null;
if (this.formData.storeId) {
this.curmbSecond = "编辑店铺";
this.storeData = JSON.parse(this.storeData);
this.isDisabled = true;
this.initInfo();
this.getStoreInfo();
} else {
this.curmbSecond = "新建店铺";
this.isDisabled = false;
}
},
methods: {
//回显数据处理
getStoreInfo() {
if (!this.storeData || !this.storeData.tradeStore) return;
const {
storeLogo,
storeName,
storeDescription,
storeType,
storeOwner,
storePhone,
storeQualityUrl
} = this.storeData.tradeStore;
this.formData.storeLogo = storeLogo;
this.formData.storeName = storeName;
this.formData.storeQualityUrl=storeQualityUrl;
this.formData.storeDescription = storeDescription;
this.formData.storeType = storeType;
if (storeType == 1) {
this.formData.compainName = storeOwner;
this.formData.phoneNum = storePhone;
if (this.storeData.imageList && this.storeData.imageList.length) {
this.storeData.imageList.map((item) => {
if (item.imageSort == 1) {
this.supplierImg1 = item;
this.formData.imgUrlP1 = item.imageUrl;
} else if (item.imageSort == 2) {
this.supplierImg2 = item;
this.formData.imgUrlP2 = item.imageUrl;
} else if (item.imageSort == 3) {
this.supplierImg3 = item;
this.formData.imgUrlP3 = item.imageUrl;
}
});
} else {
this.formData.imgUrlP1 = "";
this.formData.imgUrlP2 = "";
this.formData.imgUrlP3 = "";
}
//处理管理员数据
if (this.storeData.adminList && this.storeData.adminList.length) {
this.formData.adminList = this.storeData.adminList;
} else {
this.formData.adminList = [
{ {
min: 2, adminName: "",
max: 16, adminMobile: "",
message: "输入长度为2-16的内容,可包含中英文、数字及特殊符号", id: null,
trigger: "blur"
}, },
{ validator: checkProjectStr, trigger: "blur" } ];
], }
storeDescription: [ } else if (storeType == 3) {
{ required: false, message: "请输入店铺简介", trigger: "blur" }, this.formData.docName = storeOwner;
{ validator: checkProjectStr, trigger: "blur" } this.formData.docPhone = storePhone;
], } else if (storeType == 2) {
storeType: [ this.formData.drugstoreName = storeOwner;
{ required: true, message: "请选择店铺类型", trigger: "blur" }, this.formData.drugstorePhone = storePhone;
], if (this.storeData.imageList && this.storeData.imageList.length) {
compainName: [ this.storeData.imageList.map((item) => {
{ required: true, message: "请输入入驻企业名称", trigger: "blur" }, if (item.imageSort == 1) {
], this.drugstoreImg1 = item;
phoneNum: [ this.formData.imgUrlC1 = item.imageUrl;
{ required: true, message: "请输入联系电话", trigger: "blur" }, } else if (item.imageSort == 2) {
{validator: checkMobile, trigger: ['change','blur']} this.drugstoreImg2 = item;
], this.formData.imgUrlC2 = item.imageUrl;
docName: [ } else if (item.imageSort == 3) {
{ required: true, message: "请输入医生姓名", trigger: "blur" }, this.drugstoreImg3 = item;
], this.formData.imgUrlC3 = item.imageUrl;
docPhone: [ }
{ required: true, message: "请输入联系电话", trigger: "blur" }, });
{validator: checkMobile, trigger: ['change','blur']} } else {
], this.formData.imgUrlC1 = "";
drugstoreName: [ this.formData.imgUrlC2 = "";
{ required: true, message: "请输入入驻药店名称", trigger: "blur" }, this.formData.imgUrlC3 = "";
], }
drugstorePhone: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{validator: checkMobile, trigger: ['change','blur']}
],
},
imgMouseOver1: false,
uploadImgMessage1: false,//未上传图片,校验提示语
imgMouseOverP1: false,
imgMouseOverP2: false,
imgMouseOverP3: false,
imgMouseOverC1: false,
imgMouseOverC2: false,
imgMouseOverC3: false,
addItemFlag: true,
enterType: 1,
} }
}, },
watch: {}, initInfo() {
created() { let req = {
vm = this; storeId: this.formData.storeId,
this.formData.storeId = this.$route.query.storeId || null; };
this.storeData = this.$route.query.storeData || null; queryStore(req).then((res) => {
if (res.code == "000000") {
if (this.formData.storeId) { } else {
this.curmbSecond = '编辑店铺'; this.$message.error(res.message);
this.storeData = JSON.parse(this.storeData); }
this.isDisabled = true; });
this.initInfo(); },
this.getStoreInfo(); complete() {
}else { let flag = this.submitForm();
this.curmbSecond = '新建店铺'; if (flag) {
this.isDisabled = false; // let para = {
// storeId: this.formData.storeId,
// userId: this.formData.userId,
// storeLogo: this.formData.storeLogo,//店铺logo
// storeName: this.formData.storeName,
// storeDescription: this.formData.storeDescription,
// storeType: Number(this.formData.storeType),
// storeOwner:this.formData.storeOwner,
// storePhone: this.formData.storePhone,
// imageList: this.formData.imageList,
// adminList:this.formData.adminList,
// }
this.formData.storeType = Number(this.formData.storeType);
this.formData.storeEntry = "PCKAIDIAN"; // 添加店铺渠道
console.log("提交的数据", this.formData);
saveStore(this.formData).then((res) => {
if (res.code == "000000") {
this.$message.success("操作成功");
this.$router.push({
path: "/shop-list",
});
} else {
this.$message.error(res.message);
}
});
} }
}, },
methods: {
//回显数据处理
getStoreInfo() {
if (!this.storeData || !this.storeData.tradeStore) return;
const { storeLogo, storeName, storeDescription, storeType, storeOwner, storePhone, } = this.storeData.tradeStore;
this.formData.storeLogo = storeLogo;
this.formData.storeName = storeName;
this.formData.storeDescription = storeDescription;
this.formData.storeType = storeType;
if (storeType == 1) { // 返回
this.formData.compainName = storeOwner; back() {
this.formData.phoneNum = storePhone; this.$router.push({
if (this.storeData.imageList && this.storeData.imageList.length) { path: "/shop-list",
this.storeData.imageList.map(item => { });
if (item.imageSort == 1) { },
this.supplierImg1 = item; checkPhone(val) {
this.formData.imgUrlP1 = item.imageUrl; if (!/^1[3456789]\d{9}$/.test(val)) {
}else if (item.imageSort == 2) { return false;
this.supplierImg2 = item; } else {
this.formData.imgUrlP2 = item.imageUrl; return true;
}else if (item.imageSort == 3) { }
this.supplierImg3 = item; },
this.formData.imgUrlP3 = item.imageUrl; resetType(type) {
} this.formData.imageList = [];
}) if (type == 1) {
}else { this.formData.storeOwner = this.formData.compainName;
this.formData.imgUrlP1 = ''; this.formData.storePhone = this.formData.phoneNum;
this.formData.imgUrlP2 = ''; if (this.formData.imgUrlP1) {
this.formData.imgUrlP3 = ''; this.supplierImg1.imageUrl = this.formData.imgUrlP1;
} this.formData.imageList.push(this.supplierImg1);
//处理管理员数据
if (this.storeData.adminList && this.storeData.adminList.length) {
this.formData.adminList = this.storeData.adminList
}else {
this.formData.adminList = [{
adminName: '',
adminMobile: '',
id: null,
}]
}
}else if (storeType == 3) {
this.formData.docName = storeOwner;
this.formData.docPhone = storePhone;
}else if (storeType == 2) {
this.formData.drugstoreName = storeOwner;
this.formData.drugstorePhone = storePhone;
if (this.storeData.imageList && this.storeData.imageList.length) {
this.storeData.imageList.map(item => {
if (item.imageSort == 1) {
this.drugstoreImg1 = item;
this.formData.imgUrlC1 = item.imageUrl;
}else if (item.imageSort == 2) {
this.drugstoreImg2 = item;
this.formData.imgUrlC2 = item.imageUrl;
}else if (item.imageSort == 3) {
this.drugstoreImg3 = item;
this.formData.imgUrlC3 = item.imageUrl;
}
})
}else {
this.formData.imgUrlC1 = '';
this.formData.imgUrlC2 = '';
this.formData.imgUrlC3 = '';
}
} }
}, if (this.formData.imgUrlP2) {
initInfo() { this.supplierImg2.imageUrl = this.formData.imgUrlP2;
let req = { this.formData.imageList.push(this.supplierImg2);
storeId: this.formData.storeId
};
queryStore(req).then(res => {
if (res.code == '000000') {
}else {
this.$message.error(res.message);
}
})
},
complete() {
let flag = this.submitForm();
if (flag) {
// let para = {
// storeId: this.formData.storeId,
// userId: this.formData.userId,
// storeLogo: this.formData.storeLogo,//店铺logo
// storeName: this.formData.storeName,
// storeDescription: this.formData.storeDescription,
// storeType: Number(this.formData.storeType),
// storeOwner:this.formData.storeOwner,
// storePhone: this.formData.storePhone,
// imageList: this.formData.imageList,
// adminList:this.formData.adminList,
// }
this.formData.storeType = Number(this.formData.storeType);
this.formData.storeEntry = 'PCKAIDIAN'; // 添加店铺渠道
console.log('提交的数据',this.formData)
saveStore(this.formData).then(res => {
if (res.code == '000000') {
this.$message.success("操作成功");
this.$router.push({
path: '/shop-list'
})
}else {
this.$message.error(res.message);
}
})
} }
}, if (this.formData.imgUrlP3) {
this.supplierImg3.imageUrl = this.formData.imgUrlP3;
// 返回 this.formData.imageList.push(this.supplierImg3);
back() {
this.$router.push({
path: '/shop-list'
})
},
checkPhone(val) {
if(!(/^1[3456789]\d{9}$/.test(val))) {
return false;
} else {
return true;
} }
}, } else if (type == 3) {
resetType(type){ this.formData.storeOwner = this.formData.docName;
this.formData.imageList = []; this.formData.storePhone = this.formData.docPhone;
if (type == 1) { this.formData.adminList = [];
this.formData.storeOwner = this.formData.compainName; } else if (type == 2) {
this.formData.storePhone = this.formData.phoneNum; this.formData.storeOwner = this.formData.drugstoreName;
if (this.formData.imgUrlP1) { this.formData.storePhone = this.formData.drugstorePhone;
this.supplierImg1.imageUrl = this.formData.imgUrlP1; this.formData.adminList = [];
this.formData.imageList.push(this.supplierImg1); if (this.formData.imgUrlC1) {
} this.drugstoreImg1.imageUrl = this.formData.imgUrlC1;
if (this.formData.imgUrlP2) { this.formData.imageList.push(this.drugstoreImg1);
this.supplierImg2.imageUrl = this.formData.imgUrlP2;
this.formData.imageList.push(this.supplierImg2);
}
if (this.formData.imgUrlP3) {
this.supplierImg3.imageUrl = this.formData.imgUrlP3;
this.formData.imageList.push(this.supplierImg3);
}
}else if (type == 3) {
this.formData.storeOwner = this.formData.docName;
this.formData.storePhone = this.formData.docPhone;
this.formData.adminList = [];
}else if (type == 2) {
this.formData.storeOwner = this.formData.drugstoreName;
this.formData.storePhone = this.formData.drugstorePhone;
this.formData.adminList = [];
if (this.formData.imgUrlC1) {
this.drugstoreImg1.imageUrl = this.formData.imgUrlC1;
this.formData.imageList.push(this.drugstoreImg1);
}
if (this.formData.imgUrlC2) {
this.drugstoreImg2.imageUrl = this.formData.imgUrlC2;
this.formData.imageList.push(this.drugstoreImg2);
}
if (this.formData.imgUrlC3) {
this.drugstoreImg3.imageUrl = this.formData.imgUrlC3;
this.formData.imageList.push(this.drugstoreImg3);
}
} }
}, if (this.formData.imgUrlC2) {
setTypeForData() { this.drugstoreImg2.imageUrl = this.formData.imgUrlC2;
let flag = false; this.formData.imageList.push(this.drugstoreImg2);
if (this.formData.storeType == 1) { }
if (!this.formData.compainName) { if (this.formData.imgUrlC3) {
this.$message.warning('请输入入驻企业名称'); this.drugstoreImg3.imageUrl = this.formData.imgUrlC3;
this.formData.imageList.push(this.drugstoreImg3);
}
}
},
setTypeForData() {
let flag = false;
if (this.formData.storeType == 1) {
if (!this.formData.compainName) {
this.$message.warning("请输入入驻企业名称");
return;
}
if (!this.formData.phoneNum) {
this.$message.warning("请输入联系电话");
return;
} else {
if (!this.checkPhone(this.formData.phoneNum)) {
this.$message.warning("请输入正确的手机号");
return; return;
} }
if (!this.formData.phoneNum) { }
this.$message.warning('请输入联系电话'); if (this.formData.adminList && this.formData.adminList.length) {
return; for (let i = 0; i < this.formData.adminList.length; i++) {
}else { if (!this.formData.adminList[i].adminName) {
if(!this.checkPhone(this.formData.phoneNum)) { this.$message.warning(`请输入第${i + 1}个管理员的姓名`);
this.$message.warning('请输入正确的手机号');
return; return;
} }
} if (!this.formData.adminList[i].adminMobile) {
if (this.formData.adminList && this.formData.adminList.length) { this.$message.warning(`请输入第${i + 1}个管理员的联系电话`);
for(let i=0; i<this.formData.adminList.length; i++) { return;
if (!this.formData.adminList[i].adminName) { } else {
this.$message.warning(`请输入第${i+1}个管理员的姓名`); if (!this.checkPhone(this.formData.adminList[i].adminMobile)) {
return; this.$message.warning(`请输入第${i + 1}个管理员的正确联系电话`);
}
if(!this.formData.adminList[i].adminMobile) {
this.$message.warning(`请输入第${i+1}个管理员的联系电话`);
return; return;
}else {
if(!this.checkPhone(this.formData.adminList[i].adminMobile)) {
this.$message.warning(`请输入第${i+1}个管理员的正确联系电话`);
return;
}
} }
} }
} }
}
flag = true; flag = true;
}
if (this.formData.storeType == 3) {
if (!this.formData.docName) {
this.$message.warning("请输入医生姓名");
return;
} }
if (this.formData.storeType == 3) { if (!this.formData.docPhone) {
if (!this.formData.docName) { this.$message.warning("请输入联系电话");
this.$message.warning('请输入医生姓名'); return;
} else {
if (!this.checkPhone(this.formData.docPhone)) {
this.$message.warning("请输入正确的联系电话");
return; return;
} }
if (!this.formData.docPhone) {
this.$message.warning('请输入联系电话');
return;
}else {
if(!this.checkPhone(this.formData.docPhone)) {
this.$message.warning('请输入正确的联系电话');
return;
}
}
flag = true;
} }
if (this.formData.storeType == 2) { flag = true;
if (!this.formData.drugstoreName) { }
this.$message.warning('请输入入驻药店名称'); if (this.formData.storeType == 2) {
return; if (!this.formData.drugstoreName) {
} this.$message.warning("请输入入驻药店名称");
if (!this.formData.drugstorePhone) { return;
this.$message.warning('请输入联系电话'); }
if (!this.formData.drugstorePhone) {
this.$message.warning("请输入联系电话");
return;
} else {
if (!this.checkPhone(this.formData.drugstorePhone)) {
this.$message.warning("请输入正确的联系电话");
return; return;
}else {
if(!this.checkPhone(this.formData.drugstorePhone)) {
this.$message.warning('请输入正确的联系电话');
return;
}
} }
flag = true;
} }
return flag; flag = true;
}, }
//表单校验 return flag;
submitForm() { },
let formName = "formData"; //表单校验
let submitFlag = false; submitForm() {
let formName = "formData";
let submitFlag = false;
if (!this.formData.storeLogo){ if (!this.formData.storeLogo) {
this.uploadImgMessage1 = true; this.uploadImgMessage1 = true;
return; return;
}else { } else {
this.uploadImgMessage1 = false; this.uploadImgMessage1 = false;
} }
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if (!this.setTypeForData()) { if (!this.setTypeForData()) {
return; return;
}
this.resetType(this.formData.storeType);
submitFlag = true;
} else {
submitFlag = false;
} }
}); this.resetType(this.formData.storeType);
return submitFlag; submitFlag = true;
}, } else {
//上传店铺logo submitFlag = false;
beforeUploadPic1(file) {
this.currentOption.aspectRatio = 1/1;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 128;
this.currentOption.minCropBoxHeight = 128;
this.currentOption.currentPic = 'storeLogo';
let fileLimit = {
width: 128,
height: 128,
size: 0.2,
sizeText: "200K",
key: "storeLogo",
more: "imgUrl1More",
show: "uploadImgMessage1"
};
this.beforeUploadLogo(file,fileLimit)
//this.beforeUpload1(file, fileLimit);
},
//上传logo add
beforeUploadLogo(file, fileLimit) {
let vm = this;
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 < 200;
if (!isJPG && !isPNG) {
vm.$message.error("仅支持jpegpng格式");
// return;
}
if (!isLt2M) {
vm.$message.error("图片大小请控制在200kb以内");
return;
} }
});
return submitFlag;
},
//上传店铺logo
beforeUploadPic1(file) {
this.currentOption.aspectRatio = 1 / 1;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 128;
this.currentOption.minCropBoxHeight = 128;
this.currentOption.currentPic = "storeLogo";
let fileLimit = {
width: 128,
height: 128,
size: 0.2,
sizeText: "200K",
key: "storeLogo",
more: "imgUrl1More",
show: "uploadImgMessage1",
};
this.beforeUploadLogo(file, fileLimit);
//this.beforeUpload1(file, fileLimit);
},
//上传logo add
beforeUploadLogo(file, fileLimit) {
let vm = this;
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 < 200;
if (!isJPG && !isPNG) {
vm.$message.error("仅支持jpegpng格式");
// return;
}
if (!isLt2M) {
vm.$message.error("图片大小请控制在200kb以内");
return;
}
let _img = new FileReader(); let _img = new FileReader();
_img.readAsDataURL(file); _img.readAsDataURL(file);
_img.onload = function (theFile) { _img.onload = function (theFile) {
let image = new Image() let image = new Image();
image.src = theFile.target.result image.src = theFile.target.result;
//vm.slide2.oriUrl = theFile.target.result; //vm.slide2.oriUrl = theFile.target.result;
image.onload = function () { image.onload = function () {
let _this = this; let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) { // if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
let l = _this.width/_this.height let l = _this.width / _this.height;
if (l != 1) { if (l != 1) {
vm.$message.error("图片宽高比例请控制在1:1"); vm.$message.error("图片宽高比例请控制在1:1");
return; return;
} else { } else {
openLoading(vm); openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "preview4", "progress1", 1).then(function (path) { doUpload(
closeLoading(vm); vm,
file,
vm.formData[fileLimit.key] = path.fullPath; getFilePath(file, null),
vm.formData[fileLimit.more] = { "preview4",
attachmentName: path.storeName, "progress1",
attachmentExt: path.ext, 1
attachmentSize: path.size ).then(function (path) {
}; closeLoading(vm);
vm.$message.success("上传成功");
});
}
};
};
}, vm.formData[fileLimit.key] = path.fullPath;
setOption(type) { vm.formData[fileLimit.more] = {
// this.currentOption.aspectRatio = 1/1; attachmentName: path.storeName,
// this.currentOption.cropBoxResizable = true; attachmentExt: path.ext,
// this.currentOption.minCropBoxWidth = 160; attachmentSize: path.size,
// this.currentOption.minCropBoxHeight = 160; };
// this.currentOption.currentPic = type; vm.$message.success("上传成功");
let fileLimit = { });
width: '', }
height: '',
size: 3,
sizeText: "3M",
key: type,
more: "imgUrlP1More",
}; };
return fileLimit; };
}, },
beforeUploadProve1(file) { setOption(type) {
let fileLimit = this.setOption('imgUrlP1'); // this.currentOption.aspectRatio = 1/1;
this.beforeUpload(file, fileLimit); // this.currentOption.cropBoxResizable = true;
}, // this.currentOption.minCropBoxWidth = 160;
beforeUploadProve2(file) { // this.currentOption.minCropBoxHeight = 160;
let fileLimit = this.setOption('imgUrlP2'); // this.currentOption.currentPic = type;
this.beforeUpload(file, fileLimit); let fileLimit = {
}, width: "",
beforeUploadProve3(file) { height: "",
let fileLimit = this.setOption('imgUrlP3'); size: 3,
this.beforeUpload(file, fileLimit); sizeText: "3M",
}, key: type,
beforeUploadC1(file) { more: "imgUrlP1More",
let fileLimit = this.setOption('imgUrlC1'); };
this.beforeUpload(file, fileLimit); return fileLimit;
}, },
beforeUploadC2(file) { beforeUploadProve1(file) {
let fileLimit = this.setOption('imgUrlC2'); let fileLimit = this.setOption("imgUrlP1");
this.beforeUpload(file, fileLimit); this.beforeUpload(file, fileLimit);
}, },
beforeUploadC3(file) { beforeUploadProve2(file) {
let fileLimit = this.setOption('imgUrlC3'); let fileLimit = this.setOption("imgUrlP2");
this.beforeUpload(file, fileLimit); this.beforeUpload(file, fileLimit);
}, },
beforeUpload(file, fileLimit) { beforeUploadProve3(file) {
let vm = this; let fileLimit = this.setOption("imgUrlP3");
const isJPG = file.type === "image/jpeg"; this.beforeUpload(file, fileLimit);
const isPNG = file.type === "image/png"; },
const isLt2M = file.size / 1024 / 1024 < fileLimit.size; beforeUploadC1(file) {
if (!isJPG && !isPNG) { let fileLimit = this.setOption("imgUrlC1");
vm.$message.error("仅支持jpegpng格式"); this.beforeUpload(file, fileLimit);
return; },
} beforeUploadC2(file) {
if (!isLt2M) { let fileLimit = this.setOption("imgUrlC2");
vm.$message.error(`图片大小不可以超过${fileLimit.sizeText}`); this.beforeUpload(file, fileLimit);
return; },
} beforeUploadC3(file) {
let _img = new FileReader(); let fileLimit = this.setOption("imgUrlC3");
_img.readAsDataURL(file); this.beforeUpload(file, fileLimit);
_img.onload = function (theFile) { },
let image = new Image() beforeUpload(file, fileLimit) {
image.src = theFile.target.result let vm = this;
vm.slide2.oriUrl = theFile.target.result; const isJPG = file.type === "image/jpeg";
image.onload = function () { const isPNG = file.type === "image/png";
let _this = this; const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
openLoading(vm); if (!isJPG && !isPNG) {
doUpload(vm, file, getFilePath(file, null), "preview4", "progress1", 1).then(function (path) { vm.$message.error("仅支持jpegpng格式");
closeLoading(vm); return;
vm.formData[fileLimit.key] = path.fullPath; }
vm.formData[fileLimit.more] = { if (!isLt2M) {
attachmentName: path.storeName, vm.$message.error(`图片大小不可以超过${fileLimit.sizeText}`);
attachmentExt: path.ext, return;
attachmentSize: path.size }
}; let _img = new FileReader();
vm.$message.success("上传成功"); _img.readAsDataURL(file);
}); _img.onload = function (theFile) {
}; let image = new Image();
image.src = theFile.target.result;
vm.slide2.oriUrl = theFile.target.result;
image.onload = function () {
let _this = this;
openLoading(vm);
doUpload(
vm,
file,
getFilePath(file, null),
"preview4",
"progress1",
1
).then(function (path) {
closeLoading(vm);
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.storeName,
attachmentExt: path.ext,
attachmentSize: path.size,
};
vm.$message.success("上传成功");
});
}; };
return isJPG && isLt2M; };
}, return isJPG && isLt2M;
//上传图片 },
beforeUpload1(file, fileLimit) { //上传图片
let vm = this; beforeUpload1(file, fileLimit) {
const isJPG = file.type === "image/jpeg"; let vm = this;
const isPNG = file.type === "image/png"; const isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size; const isPNG = file.type === "image/png";
if (!isJPG && !isPNG) { const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
vm.$message.error("仅支持jpegpng格式"); if (!isJPG && !isPNG) {
// return; vm.$message.error("仅支持jpegpng格式");
} // return;
// if (!isLt2M) { }
// vm.$message.error("图片大小不符合规范,请根据规范上传图片 "); // if (!isLt2M) {
// return; // vm.$message.error("图片大小不符合规范,请根据规范上传图片 ");
// } // return;
let _img = new FileReader(); // }
_img.readAsDataURL(file); let _img = new FileReader();
_img.onload = function (theFile) { _img.readAsDataURL(file);
let image = new Image() _img.onload = function (theFile) {
image.src = theFile.target.result let image = new Image();
vm.slide2.oriUrl = theFile.target.result; image.src = theFile.target.result;
image.onload = function () { vm.slide2.oriUrl = theFile.target.result;
let _this = this; image.onload = function () {
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) { let _this = this;
if (_this.width < fileLimit.width || _this.height < fileLimit.height) { // if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
vm.$message.error("图片尺寸不符合规范,请根据规范上传图片"); if (
return; _this.width < fileLimit.width ||
} else if(_this.width > fileLimit.width || _this.height > fileLimit.height){ _this.height < fileLimit.height
vm.showCropper = true; ) {
vm.currentOption.cvWidth = _this.width; vm.$message.error("图片尺寸不符合规范,请根据规范上传图片");
vm.currentOption.cvHeight = _this.height; return;
return; } else if (
} else { _this.width > fileLimit.width ||
openLoading(vm); _this.height > fileLimit.height
doUpload(vm, file, getFilePath(file, null), "preview4", "progress1", 1).then(function (path) { ) {
closeLoading(vm); vm.showCropper = true;
if (fileLimit.show == "uploadImgMessage1") { vm.currentOption.cvWidth = _this.width;
vm.uploadImgMessage1 = false; vm.currentOption.cvHeight = _this.height;
} return;
vm.formData[fileLimit.key] = path.fullPath; } else {
vm.formData[fileLimit.more] = { openLoading(vm);
attachmentName: path.storeName, doUpload(
attachmentExt: path.ext, vm,
attachmentSize: path.size file,
}; getFilePath(file, null),
vm.$message.success("上传成功"); "preview4",
}); "progress1",
} 1
}; ).then(function (path) {
closeLoading(vm);
if (fileLimit.show == "uploadImgMessage1") {
vm.uploadImgMessage1 = false;
}
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.storeName,
attachmentExt: path.ext,
attachmentSize: path.size,
};
vm.$message.success("上传成功");
});
}
}; };
return isJPG && isLt2M; };
}, return isJPG && isLt2M;
//删除图片 },
deleteImg(type) { //删除图片
vm.formData[type] = ""; deleteImg(type) {
const testMouse = new Map() vm.formData[type] = "";
.set('storeLogo','imgMouseOver1') const testMouse = new Map()
.set('imgUrlP1','imgMouseOverP1') .set("storeLogo", "imgMouseOver1")
.set('imgUrlP2','imgMouseOverP2') .set("imgUrlP1", "imgMouseOverP1")
.set('imgUrlP3','imgMouseOverP3') .set("imgUrlP2", "imgMouseOverP2")
.set('imgUrlC1','imgMouseOverC1') .set("imgUrlP3", "imgMouseOverP3")
.set('imgUrlC2','imgMouseOverC2') .set("imgUrlC1", "imgMouseOverC1")
.set('imgUrlC3','imgMouseOverC3'); .set("imgUrlC2", "imgMouseOverC2")
.set("imgUrlC3", "imgMouseOverC3");
function matchType(type) { function matchType(type) {
return testMouse.get(type) || '' return testMouse.get(type) || "";
} }
let mark = matchType(type); let mark = matchType(type);
vm[mark] = false; vm[mark] = false;
/* if (type == 'storeLogo') { /* if (type == 'storeLogo') {
vm.imgMouseOver1 = false; vm.imgMouseOver1 = false;
}else if (type == 'imgUrlP1') { }else if (type == 'imgUrlP1') {
vm.imgMouseOverP1 = false; vm.imgMouseOverP1 = false;
...@@ -1088,184 +1244,191 @@ ...@@ -1088,184 +1244,191 @@
}else if (type == 'imgUrlP3') { }else if (type == 'imgUrlP3') {
vm.imgMouseOverP3 = false; vm.imgMouseOverP3 = false;
}*/ }*/
},
// 获取裁剪的图片数据
getCropImg(argument) {
this.showCropper = false;
this.cropData = argument[1]
vm.doUploadQiNiu(argument[2])
argument[3] && argument[3].destroy();
// vm.slide2.oriUrl = "";
},
// 上传七牛
doUploadQiNiu(file){
doUpload(this,file, getFilePath(file,null), 'preview4', 'uploadProgress1', '').then(function (path) {
vm.formData[vm.currentOption.currentPic] = path.fullPath;
vm.$message.success('上传成功');
});
},
//新增管理员
addItem(index) {
if(this.formData.adminList != null && this.formData.adminList.length >= 5){
this.$message.warning("只可新增5位管理员!");
} else {
let item = {
adminName: '',
adminMobile: '',
id: null,
};
this.formData.adminList.push(item);
}
},
//删除管理员
deleteItem(index) {
if ((this.formData.adminList.length == 1) && (index == 0)) {
this.$message.warning("最少需要1位管理员哦!");
return;
}
this.formData.adminList.splice(index, 1);
},
}, },
} // 获取裁剪的图片数据
getCropImg(argument) {
this.showCropper = false;
this.cropData = argument[1];
vm.doUploadQiNiu(argument[2]);
argument[3] && argument[3].destroy();
// vm.slide2.oriUrl = "";
},
// 上传七牛
doUploadQiNiu(file) {
doUpload(
this,
file,
getFilePath(file, null),
"preview4",
"uploadProgress1",
""
).then(function (path) {
vm.formData[vm.currentOption.currentPic] = path.fullPath;
vm.$message.success("上传成功");
});
},
//新增管理员
addItem(index) {
if (
this.formData.adminList != null &&
this.formData.adminList.length >= 5
) {
this.$message.warning("只可新增5位管理员!");
} else {
let item = {
adminName: "",
adminMobile: "",
id: null,
};
this.formData.adminList.push(item);
}
},
//删除管理员
deleteItem(index) {
if (this.formData.adminList.length == 1 && index == 0) {
this.$message.warning("最少需要1位管理员哦!");
return;
}
this.formData.adminList.splice(index, 1);
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
.create-shop-wrapper{ .create-shop-wrapper {
.create-shop-content{ .create-shop-content {
background: #fff; background: #fff;
padding: 10px; padding: 10px;
.step-content { .step-content {
overflow: hidden; overflow: hidden;
height: 60px; height: 60px;
padding: 10px 10px 50px ; padding: 10px 10px 50px;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
.title{ .title {
font-size: 13px; font-size: 13px;
color: #449284; color: #449284;
}
} }
} }
.el-button--text{ }
color: #449284; .el-button--text {
font-size: 14px; color: #449284;
&::after{ font-size: 14px;
content: ''; &::after {
content: "";
position: relative;
height: 14px;
/*border-right: 1px solid #EBEEF5;*/
border-right: 1px solid #aaaaaa;
padding-right: 10px;
}
&:last-of-type {
&::after {
content: "";
position: relative; position: relative;
width: 1px;
height: 14px; height: 14px;
/*border-right: 1px solid #EBEEF5;*/ border-right: none;
border-right: 1px solid #aaaaaa;
padding-right: 10px;
}
&:last-of-type{
&::after{
content: '';
position: relative;
width: 1px;
height: 14px;
border-right: none;
}
} }
} }
} }
.required-label .el-form-item__label::before { }
content: "*"; .required-label .el-form-item__label::before {
color: #f56c6c; content: "*";
margin-right: 4px; color: #f56c6c;
} margin-right: 4px;
.basic-item-icon { }
position: relative; .basic-item-icon {
position: relative;
.require {
position: absolute;
left: 67px;
top: 11px;
color: #f56c6c;
}
.upload-message {
position: absolute;
left: 160px;
top: 105px;
font-size: 12px;
color: #f56c6c;
}
.require {
position: absolute;
left: 67px;
top: 11px;
color: #f56c6c;
} }
.word-num { .upload-message {
position: absolute;
left: 160px;
top: 105px;
font-size: 12px; font-size: 12px;
color: #999; color: #f56c6c;
padding-top: 5px;
} }
}
.line { .word-num {
margin-left: 10px; font-size: 12px;
width: 20px; color: #999;
} padding-top: 5px;
}
.flex-upload{ .line {
width: 120px; margin-left: 10px;
text-align: center; width: 20px;
.tips{ }
font-size: 13px;
color: #8C8C8C;
line-height: 24px;
}
}
.bg-uploader {
position: relative;
/*margin-right: 20px;*/
.bg-img {
float: left;
width: 84px;
height: 100px;
}
.img-delete {
position: absolute;
left: 0px;
top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
&.add-left-18{
left: 18px;
}
i {
color: #fff;
margin-top: 39px;
margin-left: 0px;
}
}
.limit-text {
float: left;
margin-left: 10px;
margin-top: -10px;
p { .flex-upload {
font-size: 12px; width: 120px;
color: #999; text-align: center;
text-align: left; .tips {
} font-size: 13px;
} color: #8c8c8c;
line-height: 24px;
}
}
.bg-uploader {
position: relative;
/*margin-right: 20px;*/
.bg-img {
float: left;
width: 84px;
height: 100px;
} }
.el-upload__tip { .img-delete {
position: absolute; position: absolute;
top: -6px; left: 0px;
left: 130px; top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
&.add-left-18 {
left: 18px;
}
i {
color: #fff;
margin-top: 39px;
margin-left: 0px;
}
} }
.span-mt-10{ .limit-text {
.edit-img { float: left;
width: 20px; margin-left: 10px;
margin-top: 10px; margin-top: -10px;
p {
font-size: 12px;
color: #999;
text-align: left;
} }
} }
.p-tips{ }
font-size: 13px; .el-upload__tip {
color: #8C8C8C; position: absolute;
line-height: 26px; top: -6px;
margin-bottom: 15px; left: 130px;
}
.span-mt-10 {
.edit-img {
width: 20px;
margin-top: 10px;
} }
}
.p-tips {
font-size: 13px;
color: #8c8c8c;
line-height: 26px;
margin-bottom: 15px;
}
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册