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

订单管理联调2

上级 e087cd4b
此差异已折叠。
......@@ -14,8 +14,8 @@
</div>
<div class="address-info">
<!--<p>{{receiveInfo.receiverAddr}}</p>-->
<p>{{receiveInfo.provinceName}}{{receiveInfo.cityName}}{{receiveInfo.countyName}}{{receiveInfo.townName}}{{receiveInfo.address}}</p>
<p>{{receiveInfo.receiver}} {{receiveInfo.receiverMobile}}</p>
<p>{{setReceiveInfo.provinceName}}{{setReceiveInfo.cityName}}{{setReceiveInfo.countyName}}{{setReceiveInfo.townName}}{{setReceiveInfo.address}}</p>
<p>{{setReceiveInfo.receiver}} {{setReceiveInfo.receiverMobile}}</p>
</div>
</div>
<div v-if="dialogTitle == '发货设置'">
......@@ -61,7 +61,7 @@
<el-button size="small" type="primary" @click="submitSendSet">完成</el-button>
</span>
</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>
</template>
<script>
......@@ -99,7 +99,21 @@
sender: '',
senderMobile: '',
},
receiveInfo: {},
receiveInfo: {
receiver: '',
receiverMobile: '',
area: [],
address: '',
provinceName: '',
cityName: '',
countyName: '',
townName: '',
provinceId: null,
cityId: null,
countyId: null,
townId: null,
},
setReceiveInfo: {},
showContent: 0,
showChangeInfo: false,
rules: {
......@@ -129,24 +143,35 @@
sendGoodsDialog(val) {
if (val) {
this.receiveInfo = this.sendSetFormData;
console.log('所传的row',this.receiveInfo)
this.setReceiveInfo = Object.assign({}, this.sendSetFormData);
// console.log('当前订单详情数据',this.receiveInfo)
}
},
},
methods: {
//发货
cancelSendSet() {
this.$refs.sendSetForm.resetFields();
this.sendSetForm.remark = '';
this.$emit('closeSendSet',{type: 1})
},
submitSendSet() {
this.$refs.sendSetForm.validate((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 => {
console.log('保存结果',res)
if (res.code == '000000') {
this.$message.success('操作成功')
this.$refs.sendSetForm.resetFields();
this.sendSetForm.remark = '';
this.$emit('closeSendSet',{type: 2})
}else {
this.$message.error('操作失败,请重试')
}
});
} else {
......@@ -162,17 +187,17 @@
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.setReceiveInfo.provinceName = receiveData.provinceName;
this.setReceiveInfo.provinceId = receiveData.provinceId;
this.setReceiveInfo.cityName = receiveData.cityName;
this.setReceiveInfo.cityId = receiveData.cityId;
this.setReceiveInfo.countyName = receiveData.countyName;
this.setReceiveInfo.countyId = receiveData.countyId;
this.setReceiveInfo.townName = receiveData.townName;
this.setReceiveInfo.townId = receiveData.townId;
this.setReceiveInfo.address = receiveData.address;
this.setReceiveInfo.receiver = receiveData.receiver;
this.setReceiveInfo.receiverMobile = receiveData.receiverMobile;
}
this.showChangeInfo = false;
},
......
......@@ -56,3 +56,14 @@ export const updateExpress = (params) => {
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 @@
</el-card>
</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"></el-table-column>
<el-table-column prop="size" label="规格" min-width="100" align="center">
<!--<template slot-scope="scope">-->
<!--<span>{{ scope.row.type | dynamicFlagStatus }}</span>-->
<!--</template>-->
<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.goodsQuantity }}</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>
......@@ -168,6 +168,7 @@
},
showSendDialog() {
this.sendGoodsDialog = true;
this.sendSetForm = this.orderDetailData;
if (this.storeType == 1) {
this.dialogTitle = '发货设置'
}else {
......@@ -175,13 +176,22 @@
}
},
closeSendSet(val) {
console.log('关闭时传递参数',val)
//保存操作
if (val.type == 2) {
this.init();
}
this.sendGoodsDialog = false;
},
//跳转至商品编辑页
goGoodsEdit(row) {
this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this.$router.push({
path: '/create-good',
query: {
id: row.id
}
})
},
},
}
</script>
......
<template>
<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="header-title">订单管理</div>
<el-form ref="searchForm" :model="searchForm" label-width="80px" label-suffix=":" :inline="true">
......@@ -188,7 +188,7 @@
// import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import SendSetDialog from "@/components/shop/send-set-dialog";
import { queryOrderList } from "@/utils/shop";
import { queryOrderList, updateExpress } from "@/utils/shop";
export default {
components: {
SendSetDialog,
......@@ -196,7 +196,8 @@
},
data(){
return{
curmbFirst: '订单管理',
curmbFirst: '店铺管理',
curmbSecond: '订单管理',
activeName: 'all',
showAllFlag: false,
showNewFlag: false,
......@@ -242,8 +243,9 @@
dialogTitle: '',
sendSetForm: {},
viewLogisticsDialog: false,
logisticeInfo: '申通快递 1234567890',
logisticeInfo: '',//复制物流信息
disCompleteDialog: false,
disCompleteData: {},
rules: {
name: [
{ required: true, message: '请输入快递公司', trigger: "blur"},
......@@ -260,7 +262,6 @@
methods: {
searchList(){
queryOrderList(this.searchForm).then(res => {
console.log('查询结果',res)
if (res.code == '000000') {
this.tableData = res.data.orderSingleDtoList;
this.totalRows = res.data.totalNum;
......@@ -281,36 +282,6 @@
};
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) {
this.searchForm.pageSize = val;
this.searchForm.pageNo = 1;
......@@ -365,7 +336,6 @@
this.sendSetForm = row;
},
closeSendSet(val) {
console.log('关闭时传递参数',val)
//保存操作
if (val.type == 2) {
this.resetForm();//更新列表
......@@ -376,10 +346,12 @@
distribute(row) {
this.sendGoodsDialog = true;
this.dialogTitle = '配送设置';
this.sendSetForm = row;
},
//查看物流
viewLogistics(row) {
this.viewLogisticsDialog = true;
this.logisticeInfo = `${row.expressName} ${row.expressNo}`;
},
cancelView() {
this.viewLogisticsDialog = false;
......@@ -416,12 +388,24 @@
//配送完成
distributeComplete(row) {
this.disCompleteDialog = true;
this.disCompleteData = row;
},
cancelDis() {
this.disCompleteDialog = false;
},
//确认配送完成
submitDisComplete() {
let para = this.disCompleteData;
para.type = 3;
updateExpress(para).then(res => {
if (res.code == '000000') {
this.$message.success('操作成功')
this.disCompleteDialog = false;
this.resetForm();//更新列表
}else {
this.$message.error('操作失败,请重试')
}
});
},
//查看详情
goDetail(row) {
......
......@@ -870,17 +870,17 @@
more: "imgUrl1More",
show: "uploadImgMessage1"
};
this.beforeUpload(file, fileLimit);
this.beforeUpload1(file, fileLimit);
},
setOption(type) {
this.currentOption.aspectRatio = 1/1;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 160;
this.currentOption.minCropBoxHeight = 160;
this.currentOption.currentPic = type;
// this.currentOption.aspectRatio = 1/1;
// this.currentOption.cropBoxResizable = true;
// this.currentOption.minCropBoxWidth = 160;
// this.currentOption.minCropBoxHeight = 160;
// this.currentOption.currentPic = type;
let fileLimit = {
width: 160,
height: 160,
width: '',
height: '',
size: 3,
sizeText: "3M",
key: type,
......@@ -912,8 +912,44 @@
let fileLimit = this.setOption('imgUrlC3');
this.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;
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
......
......@@ -44,7 +44,7 @@
<span>{{ scope.row.tradeStore.id }}</span>
</template>
</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">
<span>{{ scope.row.tradeStore.storeName }}</span>
</template>
......@@ -97,7 +97,7 @@
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { queryStore } from '@/utils/shop';
import { queryStore, queryShopAuth } from '@/utils/shop';
export default {
components: {
BreadCrumb
......@@ -133,9 +133,15 @@
},
created() {
// this.initPrivilege();
this.getAddAuth();
this.searchList();
},
methods: {
getAddAuth() {
queryShopAuth().then(res => {
console.log('权限接口',res)
})
},
initPrivilege(){
let idType = localStorage.getItem('storageIdType');
this.searchForm.userType = idType;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册