提交 e087cd4b 编写于 作者: yi.li's avatar yi.li

订单详情和订单管理联调1

上级 9a52da0f
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
center center
class="send-set-body"> class="send-set-body">
<el-form ref="changeInfoForm" :model="changeInfoForm" :rules="rules" label-width="90px" label-suffix=":"> <el-form ref="changeInfoForm" :model="changeInfoForm" :rules="rules" label-width="90px" label-suffix=":">
<el-form-item label="收货人" prop="name"> <el-form-item label="收货人" prop="receiver">
<el-input type="text" v-model="changeInfoForm.name" placeholder="请输入快递公司"></el-input> <el-input type="text" v-model="changeInfoForm.receiver" placeholder="请输入收货人姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="phone"> <el-form-item label="手机号" prop="receiverMobile">
<el-input type="text" v-model="changeInfoForm.phone" placeholder="请输入快递单号"></el-input> <el-input type="text" v-model="changeInfoForm.receiverMobile" maxlength="11" placeholder="请输入收货人手机号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所在地区" prop="area"> <el-form-item label="所在地区" prop="area">
<el-cascader <el-cascader
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<el-input type="textarea" <el-input type="textarea"
v-model="changeInfoForm.address" v-model="changeInfoForm.address"
rows="5" rows="5"
placeholder="请输入备注内容" placeholder="请输入收货人详细地址"
style="width: 100%;"> style="width: 100%;">
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -45,16 +45,17 @@ ...@@ -45,16 +45,17 @@
<script> <script>
import { openLoading, closeLoading } from "@/utils/utils"; import { openLoading, closeLoading } from "@/utils/utils";
import * as operationData from "@/utils/operation"; import * as operationData from "@/utils/operation";
import { checkMobile } from '@/utils/patients/checkValid'
let vm = null; let vm = null;
export default { export default {
components: { components: {
}, },
props: { props: {
// sendSetFormData: { receiveInfo: {
// type: Object, type: Object,
// required: true, required: true,
// default: () => {} default: () => {}
// }, },
}, },
data(){ data(){
return{ return{
...@@ -62,11 +63,23 @@ ...@@ -62,11 +63,23 @@
optionsRegion: [], optionsRegion: [],
administrativeValue: '', administrativeValue: '',
changeInfoForm: { changeInfoForm: {
name: '', receiver: '',
phone: '', receiverMobile: '',
area: '', area: '',
address: '', address: '',
provinceName: '',
cityName: '',
countyName: '',
townName: '',
provinceId: null,
cityId: null,
countyId: null,
townId: null,
}, },
provinceList: [],
cityList: [],
countyList: [],
townList: [],
props: { props: {
lazy: true, lazy: true,
lazyLoad(node, resolve) { lazyLoad(node, resolve) {
...@@ -74,26 +87,35 @@ ...@@ -74,26 +87,35 @@
const { level } = node; const { level } = node;
console.log("当前点击的节点node", node); console.log("当前点击的节点node", node);
if (node.level == 1) { if (node.level == 1) {
vm.changeInfoForm.provinceName = node.data.label;
vm.changeInfoForm.provinceId = node.data.value;
let req = { let req = {
provinceId: node.data.value provinceId: node.data.value
}; };
vm.GET("basic-data/position/cities", req).then(res => { vm.GET("basic-data/position/cities", req).then(res => {
vm.cityList = res.data.cityList;
let newData = vm.setMoreOption(res.data.cityList, "cities"); let newData = vm.setMoreOption(res.data.cityList, "cities");
resolve(newData); resolve(newData);
}); });
} else if (node.level == 2) { } else if (node.level == 2) {
vm.changeInfoForm.cityName = node.data.label;
vm.changeInfoForm.cityId = node.data.value;
let req = { let req = {
cityId: node.data.value cityId: node.data.value
}; };
vm.GET("basic-data/position/counties", req).then(res => { vm.GET("basic-data/position/counties", req).then(res => {
vm.countyList = res.data.countyList;
let newData = vm.setMoreOption(res.data.countyList, "counties"); let newData = vm.setMoreOption(res.data.countyList, "counties");
resolve(newData); resolve(newData);
}); });
} else if (node.level == 3) { } else if (node.level == 3) {
vm.changeInfoForm.countyName = node.data.label;
vm.changeInfoForm.countyId = node.data.value;
let req = { let req = {
countyId: node.data.value countyId: node.data.value
}; };
vm.GET("basic-data/position/towns", req).then(res => { vm.GET("basic-data/position/towns", req).then(res => {
vm.townList = res.data.townList;
let newData = vm.setMoreOption(res.data.townList, "towns"); let newData = vm.setMoreOption(res.data.townList, "towns");
resolve(newData); resolve(newData);
}); });
...@@ -101,11 +123,12 @@ ...@@ -101,11 +123,12 @@
} }
}, },
rules: { rules: {
name: [ receiver: [
{ required: true, message: '请输入收货人姓名', trigger: "blur"}, { required: true, message: '请输入收货人姓名', trigger: "blur"},
], ],
phone: [ receiverMobile: [
{ required: true, message: '请输入收货人手机号', trigger: "blur"}, { required: true, message: '请输入收货人手机号', trigger: "blur"},
{validator: checkMobile, trigger: ['change','blur']}
], ],
area: [ area: [
{ required: true, message: '请选择所在地区', trigger: "blur"}, { required: true, message: '请选择所在地区', trigger: "blur"},
...@@ -118,9 +141,28 @@ ...@@ -118,9 +141,28 @@
}, },
created() { created() {
vm = this; vm = this;
this.initData();
this.getRegionOption(); this.getRegionOption();
}, },
methods: { methods: {
initData() {
console.log('父级传入的值',this.receiveInfo);
const { receiver, receiverMobile, provinceId, provinceName, cityId, cityName, countyId, countyName, townId, townName, address } = this.receiveInfo;
this.changeInfoForm.receiver = receiver;
this.changeInfoForm.receiverMobile = receiverMobile;
this.changeInfoForm.address = address;
let arrayLike = {
0: provinceId,
1: cityId,
2: countyId,
3: townId,
'length': 4
}
let arr = Array.from(arrayLike)
console.log('初始化后的值',arr);
this.changeInfoForm.area = arr;
},
handleChange(value) { handleChange(value) {
let areaId = "000"; let areaId = "000";
for (let i = 0; i < value.length; i++) { for (let i = 0; i < value.length; i++) {
...@@ -128,6 +170,7 @@ ...@@ -128,6 +170,7 @@
} }
this.administrativeValue = areaId; this.administrativeValue = areaId;
console.log('修改后的值',value, this.administrativeValue); console.log('修改后的值',value, this.administrativeValue);
// 000_110_110100000000_110101000000_110101001000
}, },
//获取地区 //获取地区
getRegionOption() { getRegionOption() {
...@@ -136,9 +179,11 @@ ...@@ -136,9 +179,11 @@
vm.GET("basic-data/position/provinces", req).then(res => { vm.GET("basic-data/position/provinces", req).then(res => {
closeLoading(vm); closeLoading(vm);
if (res.code == "000000") { if (res.code == "000000") {
this.provinceList = res.data.provinceList;
vm.optionsRegion = operationData.setRegionOption3( vm.optionsRegion = operationData.setRegionOption3(
res.data.provinceList res.data.provinceList
); );
console.log('region',vm.optionsRegion)
} }
}); });
}, },
...@@ -166,7 +211,25 @@ ...@@ -166,7 +211,25 @@
this.$emit('closeChangeInfo',{type: 1}) this.$emit('closeChangeInfo',{type: 1})
}, },
submitChange() { submitChange() {
this.$emit('closeChangeInfo',{type: 2}) this.$refs.changeInfoForm.validate((valid) => {
if (valid) {
// this.submit();
this.changeInfoForm.townId = null;
this.changeInfoForm.townName = '';
if (this.changeInfoForm.area.length == 4) {
this.changeInfoForm.townId = this.changeInfoForm.area[3];
this.townList.map((item) => {
if (this.changeInfoForm.townId == item.townId) {
this.changeInfoForm.townName = item.townName;
}
})
}
console.log('确定值',this.changeInfoForm)
this.$emit('closeChangeInfo',{type: 2, data: this.changeInfoForm})
} else {
return false;
}
})
}, },
}, },
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="order-manage-wrapper" v-if="sendGoodsDialog"> <div class="order-manage-wrapper" v-if="sendGoodsDialog">
<el-dialog <el-dialog
:title="dialogTitle" :title="dialogTitle"
:visible="sendGoodsDialog" :visible="sendGoodsDialogIn"
@close="cancelSendSet" @close="cancelSendSet"
width="600px" width="600px"
center center
...@@ -13,45 +13,46 @@ ...@@ -13,45 +13,46 @@
<el-button type="text" size="small" @click="changeInfo">修改</el-button> <el-button type="text" size="small" @click="changeInfo">修改</el-button>
</div> </div>
<div class="address-info"> <div class="address-info">
<p>上海市浦东新区花木路世纪大厦22楼</p> <!--<p>{{receiveInfo.receiverAddr}}</p>-->
<p>张三 15829738940</p> <p>{{receiveInfo.provinceName}}{{receiveInfo.cityName}}{{receiveInfo.countyName}}{{receiveInfo.townName}}{{receiveInfo.address}}</p>
<p>{{receiveInfo.receiver}} {{receiveInfo.receiverMobile}}</p>
</div> </div>
</div> </div>
<div v-if="dialogTitle == '发货设置'"> <div v-if="dialogTitle == '发货设置'">
<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="name"> <el-form-item label="快递公司" prop="expressName">
<el-input type="text" v-model="sendSetForm.name" placeholder="请输入快递公司"></el-input> <el-input type="text" v-model="sendSetForm.expressName" placeholder="请输入快递公司"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="快递单号" prop="orderNum"> <el-form-item label="快递单号" prop="expressNo">
<el-input type="text" v-model="sendSetForm.orderNum" placeholder="请输入快递单号"></el-input> <el-input type="text" v-model="sendSetForm.expressNo" placeholder="请输入快递单号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" <el-input type="textarea"
v-model="sendSetForm.content" v-model="sendSetForm.remark"
rows="5" rows="5"
placeholder="请输入备注内容" placeholder="请输入备注内容"
style="width: 100%;"></el-input> style="width: 100%;"></el-input>
<span class="word-num" style="float: right">{{(sendSetForm.content).replace(/\s+/g,"").length}}/400</span> <span class="word-num" style="float: right">{{(sendSetForm.remark).replace(/\s+/g,"").length}}/400</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div v-if="dialogTitle == '配送设置'"> <div v-if="dialogTitle == '配送设置'">
<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="sendName"> <el-form-item label="姓名" prop="sender">
<el-input type="text" v-model="sendSetForm.sendName" placeholder="请输入配送员姓名"></el-input> <el-input type="text" v-model="sendSetForm.sender" placeholder="请输入配送员姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="sendPhone"> <el-form-item label="手机号" prop="senderMobile">
<el-input type="text" maxlength="11" v-model="sendSetForm.sendPhone" placeholder="请输入配送员手机号"></el-input> <el-input type="text" maxlength="11" v-model="sendSetForm.senderMobile" placeholder="请输入配送员手机号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" <el-input type="textarea"
v-model="sendSetForm.sendContent" v-model="sendSetForm.remark"
rows="5" rows="5"
placeholder="请输入备注内容" placeholder="请输入备注内容"
style="width: 100%;"></el-input> style="width: 100%;"></el-input>
<span class="word-num" style="float: right">{{(sendSetForm.sendContent).replace(/\s+/g,"").length}}/400</span> <span class="word-num" style="float: right">{{(sendSetForm.remark).replace(/\s+/g,"").length}}/400</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -60,13 +61,14 @@ ...@@ -60,13 +61,14 @@
<el-button size="small" type="primary" @click="submitSendSet">完成</el-button> <el-button size="small" type="primary" @click="submitSendSet">完成</el-button>
</span> </span>
</el-dialog> </el-dialog>
<change-info v-if="showChangeInfo" @closeChangeInfo="closeChangeInfo"></change-info> <change-info v-if="showChangeInfo" @closeChangeInfo="closeChangeInfo" :receiveInfo="receiveInfo"></change-info>
</div> </div>
</template> </template>
<script> <script>
// import { openLoading, closeLoading } from "../../utils/utils"; // import { openLoading, closeLoading } from "../../utils/utils";
import ChangeInfo from "./change-info"; import ChangeInfo from "./change-info";
import { checkMobile } from '@/utils/patients/checkValid' import { checkMobile } from '@/utils/patients/checkValid';
import { updateExpress } from "@/utils/shop";
export default { export default {
components: { components: {
...@@ -89,27 +91,28 @@ ...@@ -89,27 +91,28 @@
}, },
data(){ data(){
return{ return{
sendGoodsDialogIn: true,
sendSetForm: { sendSetForm: {
name: '', expressName: '',
orderNum: '', expressNo: '',
content: '', remark: '',
sendName: '', sender: '',
sendPhone: '', senderMobile: '',
sendContent: '',
}, },
receiveInfo: {},
showContent: 0, showContent: 0,
showChangeInfo: false, showChangeInfo: false,
rules: { rules: {
name: [ expressName: [
{ required: true, message: '请输入快递公司', trigger: "blur"}, { required: true, message: '请输入快递公司', trigger: "blur"},
], ],
orderNum: [ expressNo: [
{ required: true, message: '请输入快递单号', trigger: "blur"}, { required: true, message: '请输入快递单号', trigger: "blur"},
], ],
sendName: [ sender: [
{ required: true, message: '请输入配送员姓名', trigger: "blur"}, { required: true, message: '请输入配送员姓名', trigger: "blur"},
], ],
sendPhone: [ senderMobile: [
{ required: true, message: '请输入配送员手机号', trigger: "blur"}, { required: true, message: '请输入配送员手机号', trigger: "blur"},
{validator: checkMobile, trigger: ['change','blur']} {validator: checkMobile, trigger: ['change','blur']}
], ],
...@@ -122,7 +125,14 @@ ...@@ -122,7 +125,14 @@
mounted() { mounted() {
}, },
watch: {}, watch: {
sendGoodsDialog(val) {
if (val) {
this.receiveInfo = this.sendSetFormData;
console.log('所传的row',this.receiveInfo)
}
},
},
methods: { methods: {
//发货 //发货
cancelSendSet() { cancelSendSet() {
...@@ -131,11 +141,15 @@ ...@@ -131,11 +141,15 @@
submitSendSet() { submitSendSet() {
this.$refs.sendSetForm.validate((valid) => { this.$refs.sendSetForm.validate((valid) => {
if (valid) { if (valid) {
// this.submit(); let para = {...this.receiveInfo,...this.sendSetForm}
this.$message.success('操作成功') updateExpress(para).then(res => {
this.$emit('closeSendSet',{type: 2}) console.log('保存结果',res)
if (res.code == '000000') {
this.$message.success('操作成功')
this.$emit('closeSendSet',{type: 2})
}
});
} else { } else {
console.log('error submit!!');
return false; return false;
} }
}) })
...@@ -146,6 +160,20 @@ ...@@ -146,6 +160,20 @@
this.showChangeInfo = true; this.showChangeInfo = true;
}, },
closeChangeInfo(val) { closeChangeInfo(val) {
if (val.type == 2) {//保存
let receiveData = val.data;
this.receiveInfo.provinceName = receiveData.provinceName;
this.receiveInfo.provinceId = receiveData.provinceId;
this.receiveInfo.cityName = receiveData.cityName;
this.receiveInfo.cityId = receiveData.cityId;
this.receiveInfo.countyName = receiveData.countyName;
this.receiveInfo.countyId = receiveData.countyId;
this.receiveInfo.townName = receiveData.townName;
this.receiveInfo.townId = receiveData.townId;
this.receiveInfo.address = receiveData.address;
this.receiveInfo.receiver = receiveData.receiver;
this.receiveInfo.receiverMobile = receiveData.receiverMobile;
}
this.showChangeInfo = false; this.showChangeInfo = false;
}, },
}, },
......
...@@ -35,6 +35,7 @@ export const queryOrderDetail = (orderId) => { ...@@ -35,6 +35,7 @@ export const queryOrderDetail = (orderId) => {
}) })
}; };
///trade/order/admin/query/list ///trade/order/admin/query/list
//store/orders/111/express
export const queryOrderList = (params) => { export const queryOrderList = (params) => {
return fetch({ return fetch({
...@@ -44,4 +45,14 @@ export const queryOrderList = (params) => { ...@@ -44,4 +45,14 @@ export const queryOrderList = (params) => {
params: params, params: params,
description: '查询订单列表', description: '查询订单列表',
}) })
};
export const updateExpress = (params) => {
return fetch({
headers,
url: getBaseUrl(`store/orders/admin/${params.id}/express`),
method: 'post',
data: params,
description: '更新物流信息',
})
}; };
\ No newline at end of file
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
curmbSecond: '订单管理', curmbSecond: '订单管理',
jumPathThird: '/order-manage', jumPathThird: '/order-manage',
curmbThird: '订单详情', curmbThird: '订单详情',
orderId: 111, orderId: null,
showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭 showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
storeType: null,//店铺类型,1供应商,2医生小店,3小药房 storeType: null,//店铺类型,1供应商,2医生小店,3小药房
orderDetailData: { orderDetailData: {
......
...@@ -42,19 +42,19 @@ ...@@ -42,19 +42,19 @@
<el-table :data="tableData" border max-height="1000" class="item-table" style="width: 100%;margin-top: 10px;"> <el-table :data="tableData" border max-height="1000" class="item-table" style="width: 100%;margin-top: 10px;">
<el-table-column prop="id" label="订单号" min-width="100" align="center"></el-table-column> <el-table-column prop="id" label="订单号" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsName" label="商品名称" min-width="100" align="center"></el-table-column> <el-table-column prop="goodsName" label="商品名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="status" label="交易状态" min-width="100" align="center"> <el-table-column prop="showStatusStr" label="交易状态" min-width="100" align="center">
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<span>{{ scope.row.status | rangeStatus }}</span> <!--<span>{{ scope.row.status | rangeStatus }}</span>-->
</template> <!--</template>-->
</el-table-column> </el-table-column>
<el-table-column prop="name" label="实收款" min-width="100" align="center"></el-table-column> <el-table-column prop="amount" label="实收款" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="买家" min-width="100" align="center"></el-table-column> <el-table-column prop="receiver" label="买家" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center"></el-table-column> <el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center"></el-table-column>
<el-table-column prop="size" label="规格" min-width="100" align="center"></el-table-column> <el-table-column prop="size" label="规格" min-width="100" align="center"></el-table-column>
<el-table-column prop="price" label="单价" min-width="100" align="center"></el-table-column> <el-table-column prop="price" label="单价" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdTime" label="下单时间" min-width="100" align="center"> <el-table-column prop="createTime" label="下单时间" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createdTime | liveDateFilter }}</span> <span>{{ scope.row.createTime | liveDateFilter }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="comments" label="备注" min-width="100" align="center"></el-table-column> <el-table-column prop="comments" label="备注" min-width="100" align="center"></el-table-column>
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
<div> <div>
<!--<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 v-if="scope.row.storeType == 1 && scope.row.showStatus == 3" @click="sendGoods(scope.row)" type="text" size="small">发货</el-button>
<el-button @click="distribute(scope.row)" type="text" size="small">配送</el-button> <el-button v-if="scope.row.storeType == 3 && scope.row.showStatus == 3" @click="distribute(scope.row)" type="text" size="small">配送</el-button>
<el-button @click="viewLogistics(scope.row)" type="text" size="small">查看物流</el-button> <el-button v-if="scope.row.storeType == 1 && (scope.row.showStatus == 1 || scope.row.showStatus == 2)" @click="viewLogistics(scope.row)" type="text" size="small">查看物流</el-button>
<el-button @click="distributeComplete(scope.row)" type="text" size="small">配送完成</el-button> <el-button v-if="scope.row.storeType == 3 && scope.row.showStatus == 2" @click="distributeComplete(scope.row)" type="text" size="small">配送完成</el-button>
<el-button @click="goDetail(scope.row)" type="text" size="small">查看详情</el-button> <el-button @click="goDetail(scope.row)" type="text" size="small">查看详情</el-button>
</div> </div>
</template> </template>
...@@ -240,11 +240,7 @@ ...@@ -240,11 +240,7 @@
}, },
sendGoodsDialog: false, sendGoodsDialog: false,
dialogTitle: '', dialogTitle: '',
sendSetForm: { sendSetForm: {},
name: '',
orderNum: '',
content: '',
},
viewLogisticsDialog: false, viewLogisticsDialog: false,
logisticeInfo: '申通快递 1234567890', logisticeInfo: '申通快递 1234567890',
disCompleteDialog: false, disCompleteDialog: false,
...@@ -272,6 +268,7 @@ ...@@ -272,6 +268,7 @@
}) })
}, },
resetForm() { resetForm() {
this.activeName = 'all';
this.searchForm = { this.searchForm = {
showStatus: -1, showStatus: -1,
storeId: 0, storeId: 0,
...@@ -325,17 +322,17 @@ ...@@ -325,17 +322,17 @@
}, },
handleClick(tab, event) { handleClick(tab, event) {
//-1全部,1已完成,2已发货,3待发货,4待支付,5交易关闭 //-1全部,1已完成,2已发货,3待发货,4待支付,5交易关闭
if (tab == 'all') {//全部 if (this.activeName == 'all') {//全部
this.searchForm.showStatus = -1; this.searchForm.showStatus = -1;
}else if (tab == 'first') {//等待买家付款 }else if (this.activeName == 'first') {//等待买家付款
this.searchForm.showStatus = 4; this.searchForm.showStatus = 4;
}else if (tab == 'second') {//待发货 }else if (this.activeName == 'second') {//待发货
this.searchForm.showStatus = 3; this.searchForm.showStatus = 3;
}else if (tab == 'third') {//已发货 }else if (this.activeName == 'third') {//已发货
this.searchForm.showStatus = 2; this.searchForm.showStatus = 2;
}else if (tab == 'fourth') {//交易成功 }else if (this.activeName == 'fourth') {//交易成功
this.searchForm.showStatus = 1; this.searchForm.showStatus = 1;
}else if (tab == 'five') {//交易关闭 }else if (this.activeName == 'five') {//交易关闭
this.searchForm.showStatus = 5; this.searchForm.showStatus = 5;
} }
this.searchForm.pageNo = 1; this.searchForm.pageNo = 1;
...@@ -365,12 +362,13 @@ ...@@ -365,12 +362,13 @@
sendGoods(row) { sendGoods(row) {
this.sendGoodsDialog = true; this.sendGoodsDialog = true;
this.dialogTitle = '发货设置'; this.dialogTitle = '发货设置';
this.sendSetForm = row;
}, },
closeSendSet(val) { closeSendSet(val) {
console.log('关闭时传递参数',val) console.log('关闭时传递参数',val)
//保存操作 //保存操作
if (val.type == 2) { if (val.type == 2) {
this.resetForm();//更新列表
} }
this.sendGoodsDialog = false; this.sendGoodsDialog = false;
}, },
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
<div class="limit-text"> <div class="limit-text">
<p>限制大小: 500kb</p> <p>限制大小: 200kb</p>
<p>最小尺寸:160*160</p> <p>最小尺寸:128*128</p>
<p>支持jpeg, png格式</p> <p>支持jpeg, png格式</p>
</div> </div>
</el-upload> </el-upload>
...@@ -57,23 +57,24 @@ ...@@ -57,23 +57,24 @@
size="small" size="small"
v-model="formData.storeName" v-model="formData.storeName"
placeholder="请输入店铺名称" placeholder="请输入店铺名称"
maxlength="16"
style="width:85%;" style="width:85%;"
></el-input> ></el-input>
<span class="word-num">{{(formData.storeName).replace(/\s+/g,"").length}}/14</span> <span class="word-num">{{(formData.storeName).replace(/\s+/g,"").length}}/16</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="店铺简介" prop="storeDescription"> <el-form-item label="店铺简介" prop="storeDescription">
<el-col :span="10"> <el-col :span="10">
<el-input <el-input
type="textarea" type="textarea"
rows="2" rows="4"
maxlength="40" maxlength="400"
size="small" size="small"
v-model="formData.storeDescription" v-model="formData.storeDescription"
placeholder="请输入店铺简介" placeholder="请输入店铺简介"
style="width:85%;" style="width:85%;"
></el-input> ></el-input>
<span class="word-num">{{(formData.storeDescription).replace(/\s+/g,"").length}}/40</span> <span class="word-num">{{(formData.storeDescription).replace(/\s+/g,"").length}}/400</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="店铺类型" prop="storeType"> <el-form-item label="店铺类型" prop="storeType">
...@@ -82,6 +83,7 @@ ...@@ -82,6 +83,7 @@
placeholder="请选择店铺类型" placeholder="请选择店铺类型"
size="small" size="small"
clearable clearable
:disabled="isDisabled"
> >
<el-option <el-option
v-for="(item,index) in typeList" v-for="(item,index) in typeList"
...@@ -430,6 +432,7 @@ ...@@ -430,6 +432,7 @@
return{ return{
curmbFirst: '云鹊店铺', curmbFirst: '云鹊店铺',
curmbSecond: '新建店铺', curmbSecond: '新建店铺',
isDisabled: false,
storeData: {}, storeData: {},
typeList: [ typeList: [
{ {
...@@ -533,20 +536,14 @@ ...@@ -533,20 +536,14 @@
{ required: true, message: "请输入店铺名称", trigger: "blur" }, { required: true, message: "请输入店铺名称", trigger: "blur" },
{ {
min: 2, min: 2,
max: 14, max: 16,
message: "输入长度为2-14的内容,可包含中英文、数字及特殊符号", message: "输入长度为2-16的内容,可包含中英文、数字及特殊符号",
trigger: "blur" trigger: "blur"
}, },
{ validator: checkProjectStr, trigger: "blur" } { validator: checkProjectStr, trigger: "blur" }
], ],
storeDescription: [ storeDescription: [
{ required: false, message: "请输入店铺简介", trigger: "blur" }, { required: false, message: "请输入店铺简介", trigger: "blur" },
{
min: 2,
max: 40,
message: "输入长度为2-40的内容,可包含中英文、数字及特殊符号",
trigger: "blur"
},
{ validator: checkProjectStr, trigger: "blur" } { validator: checkProjectStr, trigger: "blur" }
], ],
storeType: [ storeType: [
...@@ -597,15 +594,18 @@ ...@@ -597,15 +594,18 @@
vm = this; vm = this;
this.formData.storeId = this.$route.query.storeId || null; this.formData.storeId = this.$route.query.storeId || null;
this.storeData = this.$route.query.storeData || {}; this.storeData = this.$route.query.storeData || {};
if (this.storeData) { // if (this.formData.storeId) {
this.storeData = JSON.parse(this.storeData); // this.storeData = JSON.parse(this.storeData);
} // }
if (this.formData.storeId) { if (this.formData.storeId) {
this.curmbSecond = '编辑店铺'; this.curmbSecond = '编辑店铺';
this.storeData = JSON.parse(this.storeData);
this.isDisabled = true;
// this.initInfo(); // this.initInfo();
this.getStoreInfo(); this.getStoreInfo();
}else { }else {
this.curmbSecond = '新建店铺'; this.curmbSecond = '新建店铺';
this.isDisabled = false;
} }
}, },
methods: { methods: {
...@@ -858,14 +858,14 @@ ...@@ -858,14 +858,14 @@
beforeUploadPic1(file) { beforeUploadPic1(file) {
this.currentOption.aspectRatio = 1/1; this.currentOption.aspectRatio = 1/1;
this.currentOption.cropBoxResizable = true; this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 160; this.currentOption.minCropBoxWidth = 128;
this.currentOption.minCropBoxHeight = 160; this.currentOption.minCropBoxHeight = 128;
this.currentOption.currentPic = 'storeLogo'; this.currentOption.currentPic = 'storeLogo';
let fileLimit = { let fileLimit = {
width: 160, width: 128,
height: 160, height: 128,
size: 0.5, size: 0.2,
sizeText: "500K", sizeText: "200K",
key: "storeLogo", key: "storeLogo",
more: "imgUrl1More", more: "imgUrl1More",
show: "uploadImgMessage1" show: "uploadImgMessage1"
...@@ -881,8 +881,8 @@ ...@@ -881,8 +881,8 @@
let fileLimit = { let fileLimit = {
width: 160, width: 160,
height: 160, height: 160,
size: 0.5, size: 3,
sizeText: "500K", sizeText: "3M",
key: type, key: type,
more: "imgUrlP1More", more: "imgUrlP1More",
}; };
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<span>{{ scope.row.tradeStore.id }}</span> <span>{{ scope.row.tradeStore.id }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="storeName" label="店铺名称" min-width="100" align="center"> <el-table-column prop="storeName" label="店铺名称" min-width="100" align="center" show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.tradeStore.storeName }}</span> <span>{{ scope.row.tradeStore.storeName }}</span>
</template> </template>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册