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

订单管理联调2

上级 e087cd4b
此差异已折叠。
...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册