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

订单管理联调2

上级 e087cd4b
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
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="receiver"> <el-form-item label="收货人" prop="receiver">
<el-input type="text" v-model="changeInfoForm.receiver" placeholder="请输入收货人姓名"></el-input> <el-input type="text" v-model="changeInfoForm.receiver" placeholder="请输入收货人姓名" style="width: 100%"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="receiverMobile"> <el-form-item label="手机号" prop="receiverMobile">
<el-input type="text" v-model="changeInfoForm.receiverMobile" maxlength="11" placeholder="请输入收货人手机号"></el-input> <el-input type="text" v-model="changeInfoForm.receiverMobile" maxlength="11" placeholder="请输入收货人手机号" style="width: 100%"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所在地区" prop="area"> <el-form-item label="所在地区" prop="area">
<el-cascader <el-cascader
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
changeInfoForm: { changeInfoForm: {
receiver: '', receiver: '',
receiverMobile: '', receiverMobile: '',
area: '', area: [],
address: '', address: '',
provinceName: '', provinceName: '',
cityName: '', cityName: '',
...@@ -80,7 +80,70 @@ ...@@ -80,7 +80,70 @@
cityList: [], cityList: [],
countyList: [], countyList: [],
townList: [], townList: [],
region: [],
props: { props: {
value: "id",
label: "name",
children: "children",
lazy: true,
lazyLoad(node, resolve) {
const { level } = node;
console.log("node", node);
if (node.level == 1) {
vm.changeInfoForm.provinceName = node.data.label;
vm.changeInfoForm.provinceId = node.data.value;
let req = {
provinceId: node.data.id
};
vm.GET("basic-data/position/cities", req).then(res => {
let newData = res.data.cityList;
vm.cityList = res.data.cityList;
newData.map(item => {
vm.$set(item, "id", item.cityId);
vm.$set(item, "name", item.cityName);
vm.$set(item, "children", []);
});
// console.log("newData", newData);
resolve(newData);
});
} else if (node.level == 2) {
vm.changeInfoForm.cityName = node.data.label;
vm.changeInfoForm.cityId = node.data.value;
let req = {
cityId: node.data.id
};
vm.GET("basic-data/position/counties", req).then(res => {
let newData = res.data.countyList;
vm.countyList = res.data.countyList;
newData.map(item => {
vm.$set(item, "id", item.countyId);
vm.$set(item, "name", item.countyName);
vm.$set(item, "children", []);
});
// console.log("newData", newData);
resolve(newData);
});
} else if (node.level == 3) {
vm.changeInfoForm.countyName = node.data.label;
vm.changeInfoForm.countyId = node.data.value;
let req = {
countyId: node.data.id
};
vm.GET("basic-data/position/towns", req).then(res => {
let newData = res.data.townList;
vm.townList = res.data.townList;
newData.map(item => {
vm.$set(item, "id", item.townId);
vm.$set(item, "name", item.townName);
vm.$set(item, "leaf", true);
});
// console.log("newData", newData);
resolve(newData);
});
}
}
},
/*props: {
lazy: true, lazy: true,
lazyLoad(node, resolve) { lazyLoad(node, resolve) {
//第一个参数node为当前点击的节点,第二个resolve为数据加载完成的回调(必须调用) //第一个参数node为当前点击的节点,第二个resolve为数据加载完成的回调(必须调用)
...@@ -121,14 +184,14 @@ ...@@ -121,14 +184,14 @@
}); });
} }
} }
}, },*/
rules: { rules: {
receiver: [ receiver: [
{ required: true, message: '请输入收货人姓名', trigger: "blur"}, { required: true, message: '请输入收货人姓名', trigger: "blur"},
], ],
receiverMobile: [ receiverMobile: [
{ required: true, message: '请输入收货人手机号', trigger: "blur"}, { required: true, message: '请输入收货人手机号', trigger: "blur"},
{validator: checkMobile, trigger: ['change','blur']} {validator: checkMobile, trigger: 'blur'}
], ],
area: [ area: [
{ required: true, message: '请选择所在地区', trigger: "blur"}, { required: true, message: '请选择所在地区', trigger: "blur"},
...@@ -141,18 +204,44 @@ ...@@ -141,18 +204,44 @@
}, },
created() { created() {
vm = this; vm = this;
this.initData(); this.initData();
this.getRegionOption();
}, },
methods: { methods: {
initData() { async initData() {
await this.getRegionOption()
console.log('父级传入的值',this.receiveInfo); console.log('父级传入的值',this.receiveInfo);
const { receiver, receiverMobile, provinceId, provinceName, cityId, cityName, countyId, countyName, townId, townName, address } = this.receiveInfo; const { receiver, receiverMobile, provinceId, provinceName, cityId, cityName, countyId, countyName, townId, townName, address } = this.receiveInfo;
this.changeInfoForm.receiver = receiver; this.changeInfoForm.receiver = receiver;
this.changeInfoForm.receiverMobile = receiverMobile; this.changeInfoForm.receiverMobile = receiverMobile;
this.changeInfoForm.address = address; this.changeInfoForm.address = address;
let arrayLike = { this.changeInfoForm.provinceId = provinceId;
this.changeInfoForm.provinceName = provinceName;
this.changeInfoForm.cityId = cityId;
this.changeInfoForm.cityName = cityName;
this.changeInfoForm.countyId = countyId;
this.changeInfoForm.countyName = countyName;
this.changeInfoForm.townId = townId;
this.changeInfoForm.townName = townName;
//对地区数据做回显处理
if(provinceId) {
this.changeInfoForm.area = [Number(provinceId), Number(cityId), Number(countyId), Number(townId)];
// if(provinceId) {
await this.getCity(provinceId);
// }
if(cityId) {
await this.getCounty(provinceId, cityId);
}
if(countyId) {
await this.getTown(provinceId, cityId, countyId);
}
this.$forceUpdate();
}else {
this.changeInfoForm.area = [];
}
console.log('传入值处理后',this.changeInfoForm)
/*let arrayLike = {
0: provinceId, 0: provinceId,
1: cityId, 1: cityId,
2: countyId, 2: countyId,
...@@ -160,8 +249,7 @@ ...@@ -160,8 +249,7 @@
'length': 4 'length': 4
} }
let arr = Array.from(arrayLike) let arr = Array.from(arrayLike)
console.log('初始化后的值',arr); console.log('初始化后的值',arr);*/
this.changeInfoForm.area = arr;
}, },
handleChange(value) { handleChange(value) {
let areaId = "000"; let areaId = "000";
...@@ -171,21 +259,103 @@ ...@@ -171,21 +259,103 @@
this.administrativeValue = areaId; this.administrativeValue = areaId;
console.log('修改后的值',value, this.administrativeValue); console.log('修改后的值',value, this.administrativeValue);
// 000_110_110100000000_110101000000_110101001000 // 000_110_110100000000_110101000000_110101001000
setTimeout(function() {
let region = vm.$refs["cascaderRegion"].inputValue;
vm.region = region.split(" / ");
// console.log("vm.region",vm.region)
},20)
}, },
//获取地区 //获取地区
getRegionOption() { async getRegionOption() {
let req = {}; let req = {};
openLoading(vm); // openLoading(vm);
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; // this.provinceList = res.data.provinceList;
vm.optionsRegion = operationData.setRegionOption3( // vm.optionsRegion = operationData.setRegionOption3(
res.data.provinceList // res.data.provinceList
); // );
console.log('region',vm.optionsRegion) // console.log('region',vm.optionsRegion)
// }
// });
vm.GET("basic-data/position/provinces", req).then((data) => {
if(data.code == '000000') {
this.provinceList = data.data.provinceList;
this.provinceList.map(item => {
this.$set(item, "id", item.provinceId);
this.$set(item, "name", item.provinceName);
this.$set(item, "children", []);
});
this.optionsRegion = this.provinceList;
// this.$forceUpdate();
} }
})
},
async getCity(provinceId) {
await vm.GET("basic-data/position/cities", {provinceId: provinceId}).then((data) => {
if(data.code == '000000') {
this.cityList = data.data.cityList;
this.cityList.map(item => {
this.$set(item, "id", item.cityId);
this.$set(item, "name", item.cityName);
this.$set(item, "children", []);
}); });
this.optionsRegion.map((item, index) => {
if(item.id == provinceId) {
item.children = this.cityList;
}
})
}
})
},
async getCounty(provinceId, cityId) {
await vm.GET("basic-data/position/counties", {cityId: cityId}).then((data) => {
if(data.code == '000000') {
this.countyList = data.data.countyList;
this.countyList.map(item => {
this.$set(item, "id", item.countyId);
this.$set(item, "name", item.countyName);
this.$set(item, "children", []);
});
this.optionsRegion.map((item, index) => {
if(item.id == provinceId) {
item.children.map((city, idx) => {
if(city.id == cityId) {
city.children = this.countyList;
}
})
}
})
}
})
},
async getTown(provinceId, cityId, countyId) {
await vm.GET("basic-data/position/towns", {countyId: countyId}).then((data) => {
if(data.code == '000000') {
this.townList = data.data.townList;
this.townList.map(item => {
this.$set(item, "id", item.townId);
this.$set(item, "name", item.townName);
this.$set(item, "leaf", true);
});
this.optionsRegion.map((item, index) => {
if(item.id == provinceId) {
item.children.map((city, index2) => {
if(city.id == cityId) {
city.children.map((county, index3) => {
if(county.id == countyId) {
county.children = this.townList;
}
})
}
})
}
})
}
})
}, },
setMoreOption(data, type) { setMoreOption(data, type) {
let option = []; let option = [];
...@@ -210,20 +380,35 @@ ...@@ -210,20 +380,35 @@
cancelChangeInfo() { cancelChangeInfo() {
this.$emit('closeChangeInfo',{type: 1}) this.$emit('closeChangeInfo',{type: 1})
}, },
setAreaData() {
if(this.changeInfoForm.area.length > 0) {
this.changeInfoForm.provinceId = this.changeInfoForm.area[0];
this.changeInfoForm.cityId = this.changeInfoForm.area[1];
this.changeInfoForm.countyId = this.changeInfoForm.area[2];
this.changeInfoForm.townId = this.changeInfoForm.area[3];
if (vm.region.length) {
this.changeInfoForm.provinceName = vm.region[0];
this.changeInfoForm.cityName = vm.region[1];
this.changeInfoForm.countyName = vm.region[2];
this.changeInfoForm.townName = vm.region[3];
}
}
},
submitChange() { submitChange() {
this.$refs.changeInfoForm.validate((valid) => { this.$refs.changeInfoForm.validate((valid) => {
if (valid) { if (valid) {
// this.submit(); // this.submit();
this.changeInfoForm.townId = null; this.setAreaData();
this.changeInfoForm.townName = ''; // this.changeInfoForm.townId = null;
if (this.changeInfoForm.area.length == 4) { // this.changeInfoForm.townName = '';
this.changeInfoForm.townId = this.changeInfoForm.area[3]; // if (this.changeInfoForm.area.length == 4) {
this.townList.map((item) => { // this.changeInfoForm.townId = this.changeInfoForm.area[3];
if (this.changeInfoForm.townId == item.townId) { // this.townList.map((item) => {
this.changeInfoForm.townName = item.townName; // if (this.changeInfoForm.townId == item.townId) {
} // this.changeInfoForm.townName = item.townName;
}) // }
} // })
// }
console.log('确定值',this.changeInfoForm) console.log('确定值',this.changeInfoForm)
this.$emit('closeChangeInfo',{type: 2, data: this.changeInfoForm}) this.$emit('closeChangeInfo',{type: 2, data: this.changeInfoForm})
} else { } else {
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
</div> </div>
<div class="address-info"> <div class="address-info">
<!--<p>{{receiveInfo.receiverAddr}}</p>--> <!--<p>{{receiveInfo.receiverAddr}}</p>-->
<p>{{receiveInfo.provinceName}}{{receiveInfo.cityName}}{{receiveInfo.countyName}}{{receiveInfo.townName}}{{receiveInfo.address}}</p> <p>{{setReceiveInfo.provinceName}}{{setReceiveInfo.cityName}}{{setReceiveInfo.countyName}}{{setReceiveInfo.townName}}{{setReceiveInfo.address}}</p>
<p>{{receiveInfo.receiver}} {{receiveInfo.receiverMobile}}</p> <p>{{setReceiveInfo.receiver}} {{setReceiveInfo.receiverMobile}}</p>
</div> </div>
</div> </div>
<div v-if="dialogTitle == '发货设置'"> <div v-if="dialogTitle == '发货设置'">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<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" :receiveInfo="receiveInfo"></change-info> <change-info v-if="showChangeInfo" @closeChangeInfo="closeChangeInfo" :receiveInfo="setReceiveInfo"></change-info>
</div> </div>
</template> </template>
<script> <script>
...@@ -99,7 +99,21 @@ ...@@ -99,7 +99,21 @@
sender: '', sender: '',
senderMobile: '', senderMobile: '',
}, },
receiveInfo: {}, receiveInfo: {
receiver: '',
receiverMobile: '',
area: [],
address: '',
provinceName: '',
cityName: '',
countyName: '',
townName: '',
provinceId: null,
cityId: null,
countyId: null,
townId: null,
},
setReceiveInfo: {},
showContent: 0, showContent: 0,
showChangeInfo: false, showChangeInfo: false,
rules: { rules: {
...@@ -129,24 +143,35 @@ ...@@ -129,24 +143,35 @@
sendGoodsDialog(val) { sendGoodsDialog(val) {
if (val) { if (val) {
this.receiveInfo = this.sendSetFormData; this.receiveInfo = this.sendSetFormData;
console.log('所传的row',this.receiveInfo) this.setReceiveInfo = Object.assign({}, this.sendSetFormData);
// console.log('当前订单详情数据',this.receiveInfo)
} }
}, },
}, },
methods: { methods: {
//发货
cancelSendSet() { cancelSendSet() {
this.$refs.sendSetForm.resetFields();
this.sendSetForm.remark = '';
this.$emit('closeSendSet',{type: 1}) this.$emit('closeSendSet',{type: 1})
}, },
submitSendSet() { submitSendSet() {
this.$refs.sendSetForm.validate((valid) => { this.$refs.sendSetForm.validate((valid) => {
if (valid) { if (valid) {
let para = {...this.receiveInfo,...this.sendSetForm} let para = {...this.setReceiveInfo,...this.sendSetForm};
if (this.dialogTitle == '发货设置') {//发货设置的type是1,配送设置的type是2,配送完成的type是3
para.type = 1;
}else if (this.dialogTitle == '配送设置') {
para.type = 2;
}
updateExpress(para).then(res => { updateExpress(para).then(res => {
console.log('保存结果',res)
if (res.code == '000000') { if (res.code == '000000') {
this.$message.success('操作成功') this.$message.success('操作成功')
this.$refs.sendSetForm.resetFields();
this.sendSetForm.remark = '';
this.$emit('closeSendSet',{type: 2}) this.$emit('closeSendSet',{type: 2})
}else {
this.$message.error('操作失败,请重试')
} }
}); });
} else { } else {
...@@ -162,17 +187,17 @@ ...@@ -162,17 +187,17 @@
closeChangeInfo(val) { closeChangeInfo(val) {
if (val.type == 2) {//保存 if (val.type == 2) {//保存
let receiveData = val.data; let receiveData = val.data;
this.receiveInfo.provinceName = receiveData.provinceName; this.setReceiveInfo.provinceName = receiveData.provinceName;
this.receiveInfo.provinceId = receiveData.provinceId; this.setReceiveInfo.provinceId = receiveData.provinceId;
this.receiveInfo.cityName = receiveData.cityName; this.setReceiveInfo.cityName = receiveData.cityName;
this.receiveInfo.cityId = receiveData.cityId; this.setReceiveInfo.cityId = receiveData.cityId;
this.receiveInfo.countyName = receiveData.countyName; this.setReceiveInfo.countyName = receiveData.countyName;
this.receiveInfo.countyId = receiveData.countyId; this.setReceiveInfo.countyId = receiveData.countyId;
this.receiveInfo.townName = receiveData.townName; this.setReceiveInfo.townName = receiveData.townName;
this.receiveInfo.townId = receiveData.townId; this.setReceiveInfo.townId = receiveData.townId;
this.receiveInfo.address = receiveData.address; this.setReceiveInfo.address = receiveData.address;
this.receiveInfo.receiver = receiveData.receiver; this.setReceiveInfo.receiver = receiveData.receiver;
this.receiveInfo.receiverMobile = receiveData.receiverMobile; this.setReceiveInfo.receiverMobile = receiveData.receiverMobile;
} }
this.showChangeInfo = false; this.showChangeInfo = false;
}, },
......
...@@ -56,3 +56,14 @@ export const updateExpress = (params) => { ...@@ -56,3 +56,14 @@ export const updateExpress = (params) => {
description: '更新物流信息', description: '更新物流信息',
}) })
}; };
export const queryShopAuth = (params) => {
return fetch({
headers,
url: getBaseUrl(`user/storeid`),
method: 'get',
params: params,
description: '查询超级管理员权限',
})
};
\ No newline at end of file
...@@ -66,12 +66,12 @@ ...@@ -66,12 +66,12 @@
</el-card> </el-card>
</div> </div>
<el-table :data="tableData" border class="item-table" style="width: 100%;margin-top: 30px;"> <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"></el-table-column> <el-table-column prop="goodsName" label="商品名称" min-width="100" align="center">
<el-table-column prop="size" label="规格" min-width="100" align="center"> <template slot-scope="scope">
<!--<template slot-scope="scope">--> <div style="cursor: pointer;color: #449284" @click="goGoodsEdit(scope.row)">{{ scope.row.goodsQuantity }}</div>
<!--<span>{{ scope.row.type | dynamicFlagStatus }}</span>--> </template>
<!--</template>-->
</el-table-column> </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"> <el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>×{{ scope.row.goodsQuantity }}</span> <span>×{{ scope.row.goodsQuantity }}</span>
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
}, },
showSendDialog() { showSendDialog() {
this.sendGoodsDialog = true; this.sendGoodsDialog = true;
this.sendSetForm = this.orderDetailData;
if (this.storeType == 1) { if (this.storeType == 1) {
this.dialogTitle = '发货设置' this.dialogTitle = '发货设置'
}else { }else {
...@@ -175,13 +176,22 @@ ...@@ -175,13 +176,22 @@
} }
}, },
closeSendSet(val) { closeSendSet(val) {
console.log('关闭时传递参数',val)
//保存操作 //保存操作
if (val.type == 2) { if (val.type == 2) {
this.init();
} }
this.sendGoodsDialog = false; this.sendGoodsDialog = false;
}, },
//跳转至商品编辑页
goGoodsEdit(row) {
this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this.$router.push({
path: '/create-good',
query: {
id: row.id
}
})
},
}, },
} }
</script> </script>
......
<template> <template>
<div class="order-manage-wrapper"> <div class="order-manage-wrapper">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="order-manage-content screenSet" id="screenSet"> <div class="order-manage-content screenSet" id="screenSet">
<div class="header-title">订单管理</div> <div class="header-title">订单管理</div>
<el-form ref="searchForm" :model="searchForm" label-width="80px" label-suffix=":" :inline="true"> <el-form ref="searchForm" :model="searchForm" label-width="80px" label-suffix=":" :inline="true">
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
// 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 SendSetDialog from "@/components/shop/send-set-dialog"; import SendSetDialog from "@/components/shop/send-set-dialog";
import { queryOrderList } from "@/utils/shop"; import { queryOrderList, updateExpress } from "@/utils/shop";
export default { export default {
components: { components: {
SendSetDialog, SendSetDialog,
...@@ -196,7 +196,8 @@ ...@@ -196,7 +196,8 @@
}, },
data(){ data(){
return{ return{
curmbFirst: '订单管理', curmbFirst: '店铺管理',
curmbSecond: '订单管理',
activeName: 'all', activeName: 'all',
showAllFlag: false, showAllFlag: false,
showNewFlag: false, showNewFlag: false,
...@@ -242,8 +243,9 @@ ...@@ -242,8 +243,9 @@
dialogTitle: '', dialogTitle: '',
sendSetForm: {}, sendSetForm: {},
viewLogisticsDialog: false, viewLogisticsDialog: false,
logisticeInfo: '申通快递 1234567890', logisticeInfo: '',//复制物流信息
disCompleteDialog: false, disCompleteDialog: false,
disCompleteData: {},
rules: { rules: {
name: [ name: [
{ required: true, message: '请输入快递公司', trigger: "blur"}, { required: true, message: '请输入快递公司', trigger: "blur"},
...@@ -260,7 +262,6 @@ ...@@ -260,7 +262,6 @@
methods: { methods: {
searchList(){ searchList(){
queryOrderList(this.searchForm).then(res => { queryOrderList(this.searchForm).then(res => {
console.log('查询结果',res)
if (res.code == '000000') { if (res.code == '000000') {
this.tableData = res.data.orderSingleDtoList; this.tableData = res.data.orderSingleDtoList;
this.totalRows = res.data.totalNum; this.totalRows = res.data.totalNum;
...@@ -281,36 +282,6 @@ ...@@ -281,36 +282,6 @@
}; };
this.searchList(); this.searchList();
}, },
//上线
publishRange(row) {
this.$confirm(`确定上线“${row.name}”吗?`, '', {
confirmButtonText: '上线',
cancelButtonText: '取消',
type: 'warning',
customClass: 'range-make-box',
}).then(() => {
// confirm
this.updateStatus(row.id, "30");
}).catch(() => {
// cancel
// this.$message.error("上线失败");
});
},
//下线
unPublishRange(row) {
this.$confirm(`确定下线“${row.name}”吗?`, '', {
confirmButtonText: '下线',
cancelButtonText: '取消',
type: 'warning',
customClass: 'range-make-box',
}).then(() => {
this.updateStatus(row.id, "40");
// confirm
}).catch(() => {
// cancel
});
},
handleSizeChange(val) { handleSizeChange(val) {
this.searchForm.pageSize = val; this.searchForm.pageSize = val;
this.searchForm.pageNo = 1; this.searchForm.pageNo = 1;
...@@ -365,7 +336,6 @@ ...@@ -365,7 +336,6 @@
this.sendSetForm = row; this.sendSetForm = row;
}, },
closeSendSet(val) { closeSendSet(val) {
console.log('关闭时传递参数',val)
//保存操作 //保存操作
if (val.type == 2) { if (val.type == 2) {
this.resetForm();//更新列表 this.resetForm();//更新列表
...@@ -376,10 +346,12 @@ ...@@ -376,10 +346,12 @@
distribute(row) { distribute(row) {
this.sendGoodsDialog = true; this.sendGoodsDialog = true;
this.dialogTitle = '配送设置'; this.dialogTitle = '配送设置';
this.sendSetForm = row;
}, },
//查看物流 //查看物流
viewLogistics(row) { viewLogistics(row) {
this.viewLogisticsDialog = true; this.viewLogisticsDialog = true;
this.logisticeInfo = `${row.expressName} ${row.expressNo}`;
}, },
cancelView() { cancelView() {
this.viewLogisticsDialog = false; this.viewLogisticsDialog = false;
...@@ -416,12 +388,24 @@ ...@@ -416,12 +388,24 @@
//配送完成 //配送完成
distributeComplete(row) { distributeComplete(row) {
this.disCompleteDialog = true; this.disCompleteDialog = true;
this.disCompleteData = row;
}, },
cancelDis() { cancelDis() {
this.disCompleteDialog = false; this.disCompleteDialog = false;
}, },
//确认配送完成
submitDisComplete() { submitDisComplete() {
let para = this.disCompleteData;
para.type = 3;
updateExpress(para).then(res => {
if (res.code == '000000') {
this.$message.success('操作成功')
this.disCompleteDialog = false; this.disCompleteDialog = false;
this.resetForm();//更新列表
}else {
this.$message.error('操作失败,请重试')
}
});
}, },
//查看详情 //查看详情
goDetail(row) { goDetail(row) {
......
...@@ -870,17 +870,17 @@ ...@@ -870,17 +870,17 @@
more: "imgUrl1More", more: "imgUrl1More",
show: "uploadImgMessage1" show: "uploadImgMessage1"
}; };
this.beforeUpload(file, fileLimit); this.beforeUpload1(file, fileLimit);
}, },
setOption(type) { setOption(type) {
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 = 160;
this.currentOption.minCropBoxHeight = 160; // this.currentOption.minCropBoxHeight = 160;
this.currentOption.currentPic = type; // this.currentOption.currentPic = type;
let fileLimit = { let fileLimit = {
width: 160, width: '',
height: 160, height: '',
size: 3, size: 3,
sizeText: "3M", sizeText: "3M",
key: type, key: type,
...@@ -912,8 +912,44 @@ ...@@ -912,8 +912,44 @@
let fileLimit = this.setOption('imgUrlC3'); let fileLimit = this.setOption('imgUrlC3');
this.beforeUpload(file, fileLimit); this.beforeUpload(file, fileLimit);
}, },
//上传图片
beforeUpload(file, fileLimit) { beforeUpload(file, fileLimit) {
let vm = this;
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (!isJPG && !isPNG) {
vm.$message.error("图片格式不符合规范,请根据规范上传图片");
return;
}
if (!isLt2M) {
vm.$message.error("图片大小不符合规范,请根据规范上传图片 ");
return;
}
let _img = new FileReader();
_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;
},
//上传图片
beforeUpload1(file, fileLimit) {
let vm = this; let vm = this;
const isJPG = file.type === "image/jpeg"; const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png"; const isPNG = file.type === "image/png";
......
...@@ -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" show-overflow-tooltip="true"> <el-table-column prop="storeName" label="店铺名称" min-width="100" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.tradeStore.storeName }}</span> <span>{{ scope.row.tradeStore.storeName }}</span>
</template> </template>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<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 { queryStore } from '@/utils/shop'; import { queryStore, queryShopAuth } from '@/utils/shop';
export default { export default {
components: { components: {
BreadCrumb BreadCrumb
...@@ -133,9 +133,15 @@ ...@@ -133,9 +133,15 @@
}, },
created() { created() {
// this.initPrivilege(); // this.initPrivilege();
this.getAddAuth();
this.searchList(); this.searchList();
}, },
methods: { methods: {
getAddAuth() {
queryShopAuth().then(res => {
console.log('权限接口',res)
})
},
initPrivilege(){ initPrivilege(){
let idType = localStorage.getItem('storageIdType'); let idType = localStorage.getItem('storageIdType');
this.searchForm.userType = idType; this.searchForm.userType = idType;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册