Commit 2a96bde2 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 7073c288 8013b41e
...@@ -334,6 +334,21 @@ export function approvalCreate(data) { ...@@ -334,6 +334,21 @@ export function approvalCreate(data) {
}); });
} }
/**
* 取消审核
*
* @export
* @param {*} data
* @return {*}
*/
export function approvalCancel(data) {
return request({
url: `/ecw/box-approval/cancel`,
method: "delete",
data,
});
}
/** /**
* 异常登记 * 异常登记
* *
......
import request from '@/utils/request'
// 根据合并订单编号(或订单号)获得已合单列表和待合单列表
export function getMergeListByOrderNo(query){
return request({
url:'/order/merge/getMergeListByOrderNo',
method: 'get',
params: query,
})
}
//创建订单合单申请
export function createMerge(data) {
return request({
url: '/order/merge/create',
method: 'post',
data: data
})
}
// 取消订单拆单
export function cancelMerge(data) {
return request({
url: '/order/merge/cancel',
method: 'delete',
data:data
})
}
//拆单申请提交
export function splitApply(data) {
return request({
url: '/order/split/apply',
method: 'put',
data: data
})
}
// 创建订单拆单
export function createSplit(data) {
return request({
url: '/order/split/create',
method: 'post',
data: data
})
}
// 更新订单拆单
export function updateSplit(data) {
return request({
url: '/order/split/update',
method: 'put',
data: data
})
}
// 删除订单拆单
export function deleteSplit(id) {
return request({
url: '/order/split/delete?id=' + id,
method: 'delete'
})
}
//取消申请拆单
export function cancelApply(data) {
return request({
url: '/order/split/cancel-apply',
method: 'put',
data:data
})
}
// 获得订单拆单
export function getSplit(id) {
return request({
url: '/order/split/get?id=' + id,
method: 'get'
})
}
// 获得订单拆单分页
export function getSplitPage(query) {
return request({
url: '/order/split/page',
method: 'get',
params: query
})
}
// 导出订单拆单 Excel
export function exportSplitExcel(query) {
return request({
url: '/order/split/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
//通过订单号获取拆单列表和拆单项明细
export function getSplitList(query) {
return request({
url: '/order/split/list-by-order-id',
method: 'get',
params: query
})
}
// 创建订单拆单项 - 放入
export function createSplitItem(data) {
return request({
url: '/order/split-item/create',
method: 'post',
data: data
})
}
// 删除订单拆单项
export function deleteSplitItem(id) {
return request({
url: '/order/split-item/delete?id=' + id,
method: 'delete'
})
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-descriptions border v-if="order.orderId"> <el-descriptions border v-if="order.orderId">
<el-descriptions-item label="唛头">{{ order.marks }}</el-descriptions-item> <el-descriptions-item label="唛头">{{ order.marks }}</el-descriptions-item>
<el-descriptions-item label="已到箱数">{{ order.sumNum }}</el-descriptions-item> <el-descriptions-item label="已到箱数">{{ order.sumNum }}</el-descriptions-item>
<el-descriptions-item label="订单状态"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" /></el-descriptions-item> <el-descriptions-item label="订单状态"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" :class="{red: order.status === 1, green: order.status === 5 || order.status === 2}" /></el-descriptions-item>
<el-descriptions-item label="送货时间">{{ order.consigneeVO && order.consigneeVO.deliveryDate || '' }}</el-descriptions-item> <el-descriptions-item label="送货时间">{{ order.consigneeVO && order.consigneeVO.deliveryDate || '' }}</el-descriptions-item>
<el-descriptions-item label="运输方式"> <el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.logisticsInfoDto.transportId"></dict-tag> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.logisticsInfoDto.transportId"></dict-tag>
...@@ -41,6 +41,12 @@ export default { ...@@ -41,6 +41,12 @@ export default {
} }
</script> </script>
<style scoped> <style scoped lang="scss">
@import "src/assets/styles/element-variables";
.red{
color: $--color-danger;
}
.green{
color: $--color-success;
}
</style> </style>
...@@ -280,11 +280,10 @@ export default { ...@@ -280,11 +280,10 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id;
this.$modal this.$modal
.confirm('是否确认删除出货编号为"' + id + '"的数据项?') .confirm(`是否确认删除出货编号为 ${row.selfNo} 的数据项?`)
.then(function () { .then(function () {
return deletebox(id); return deletebox(row.id);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
......
...@@ -9,9 +9,7 @@ ...@@ -9,9 +9,7 @@
<el-button size="small" @click="handleCommand('router')">操作</el-button> <el-button size="small" @click="handleCommand('router')">操作</el-button>
<el-button type="primary" size="small" @click="handleCommand('error')">异常登记</el-button> <el-button type="primary" size="small" @click="handleCommand('error')">异常登记</el-button>
<el-button type="primary" size="small" @click="handleCommand('cost')">费用登记</el-button> <el-button type="primary" size="small" @click="handleCommand('cost')">费用登记</el-button>
<el-popconfirm title="确定是否删除" @confirm="handleCommand('delete')" style="marginLeft:10px;"> <el-button type="danger" size="small" @click="handleCommand('delete')">删除</el-button>
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</div> </div>
</div> </div>
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px">
...@@ -22,10 +20,10 @@ ...@@ -22,10 +20,10 @@
<el-descriptions-item label="运输方式"> <el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出货渠道" v-if="shipmentObj.transportType !== '2'"> <!-- <el-descriptions-item label="出货渠道">
{{getShipChannelName(shipmentObj.shippingChannelId)}} {{getShipChannelName(shipmentObj.shippingChannelId)}}
</el-descriptions-item> </el-descriptions-item> -->
<el-descriptions-item label="柜型" v-if="shipmentObj.transportType === '2'"> <el-descriptions-item label="柜型">
{{getCabinetLabel(shipmentObj.cabinetId)}} {{getCabinetLabel(shipmentObj.cabinetId)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="状态"> <el-descriptions-item label="状态">
...@@ -66,7 +64,11 @@ ...@@ -66,7 +64,11 @@
</div> </div>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border> <el-table :data="sectionObj.sectionOrderList" style="width: 100%" border>
<el-table-column type="index" align="center" label="序号" width="50" /> <el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column prop="orderNo" label="订单号" align="center"></el-table-column> <el-table-column prop="orderNo" label="订单号" align="center">
<template v-slot="scope">
<a href="javascript:void(0)" @click="jumpOrderDetail(scope.row)">{{ scope.row.orderNo }}</a>
</template>
</el-table-column>
<el-table-column prop="goodsList" label="货物信息" width="250px" align="center"> <el-table-column prop="goodsList" label="货物信息" width="250px" align="center">
<template v-slot="{row}"> <template v-slot="{row}">
<section> <section>
...@@ -354,6 +356,13 @@ export default { ...@@ -354,6 +356,13 @@ export default {
}); });
}); });
}, },
/* 跳转订单详情 */
jumpOrderDetail(row) {
this.$router.push({
path: "/order/detail",
query: { orderId: row.orderId },
});
},
// 事件执行 // 事件执行
handleCommand(type) { handleCommand(type) {
switch (type) { switch (type) {
...@@ -378,11 +387,28 @@ export default { ...@@ -378,11 +387,28 @@ export default {
this.$set(this.dialogConfig, "type", "error"); this.$set(this.dialogConfig, "type", "error");
break; break;
case "delete": case "delete":
deletebox(this.shipmentId).then((res) => { this.$modal
serviceMsg(res, this).then((res) => { .confirm(
this.$router.push("/shipment/boxSea"); `是否确认删除出货编号为 ${this.shipmentObj.selfNo} 的数据项?`
}); )
}); .then(() => {
return deletebox(this.shipmentId);
})
.then((res) => {
serviceMsg(res, this).then((res) => {
// 获取当前path
const currPath = this.$router.currentRoute.path;
// 根据path获取view
const view = this.visitedViews.find(
(item) => item.path === currPath
);
if (view) {
this.$store.dispatch("tagsView/delView", view);
this.$router.push("/shipment/boxSea");
}
});
})
.catch(() => {});
break; break;
} }
}, },
...@@ -404,6 +430,9 @@ export default { ...@@ -404,6 +430,9 @@ export default {
formatDate, formatDate,
}, },
computed: { computed: {
visitedViews() {
return this.$store.state.tagsView.visitedViews;
},
// 单证状态 // 单证状态
getDocStatus() { getDocStatus() {
return (list = []) => { return (list = []) => {
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
/* 是否显示卸柜箱数 */ /* 是否显示卸柜箱数 */
isShowColumn() { isShowColumn() {
return (shippingVO) => { return (shippingVO) => {
return getSeaStatus(shippingVO) >= 142 ? true : false; return getSeaStatus(shippingVO) >= 182 ? true : false;
}; };
}, },
}, },
......
<template> <template>
<el-select filterable :value="value" @change="change" v-bind="$attrs"> <el-select filterable :value="value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="dock in getDock" :key="dock.id" :label="dock.titleZh" :value="dock.id"></el-option> <el-option v-for="dock in getDock" :key="dock.id" :label="dock.titleZh" :value="dock.id"></el-option>
</el-select> </el-select>
</template> </template>
......
<template> <template>
<el-select filterable :value="value" @change="change" v-bind="$attrs"> <el-select filterable :value="value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="supplier in getSuppliers" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option> <el-option v-for="supplier in getSuppliers" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option>
</el-select> </el-select>
</template> </template>
......
<template> <template>
<el-select filterable :value="value" @change="change" v-bind="$attrs"> <el-select filterable :value="value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="user in getUser" :key="user.id" :value="user.id" :label="user.nickname"></el-option> <el-option v-for="user in getUser" :key="user.id" :value="user.id" :label="user.nickname"></el-option>
</el-select> </el-select>
</template> </template>
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
name: "userSelect", name: "userSelect",
inheritAttrs: false, inheritAttrs: false,
props: { props: {
value: Number, value: Number | Array,
allUsers: Array, allUsers: Array,
}, },
model: { model: {
......
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</el-card> </el-card>
<!-- 操作员 --> <!-- 操作员 -->
<el-row style="margin-top: 15px"> <el-row style="margin-top: 15px" v-show="!isAudit">
<el-row> <el-row>
<el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules"> <el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules">
<el-form-item label="目的地操作员" prop="noticeUser"> <el-form-item label="目的地操作员" prop="noticeUser">
...@@ -268,10 +268,37 @@ ...@@ -268,10 +268,37 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
<el-row style="margin-top: 10px"> <el-row>
<el-button type="primary" @click="onSubmit">提交申请</el-button> <el-button type="primary" @click="onSubmit">提交申请</el-button>
</el-row> </el-row>
</el-row> </el-row>
<!-- 审核流程 -->
<el-row class="process-area" v-show="isAudit">
<div class="process">
<div>审批流程</div>
<div>流程图</div>
</div>
<!-- <div class="copy-user">
<div>
<label class="el-form-item__label">抄送</label>
<userSelect v-model="copyUser" placeholder="请选择抄送人" :allUsers="this.$attrs.allUsers" size="small" multiple collapse-tags />
</div>
<div>
<label class="el-form-item__label">抄送人</label>
<div class="copyUser-tag">
<el-tag v-for="user in copyUsers" :key="user.id" closable @close="removeCopyUser(user)">
{{user.nickname}}
</el-tag>
</div>
</div>
</div> -->
<div>
<el-button type="primary" :disabled=true>审核中</el-button>
<el-button type="primary" @click="canclAudit">取消审核</el-button>
<el-button type="primary" @click="closeDialog">返回</el-button>
</div>
</el-row>
</div> </div>
</template> </template>
...@@ -285,6 +312,7 @@ import { ...@@ -285,6 +312,7 @@ import {
createGoods, createGoods,
deleteGoods, deleteGoods,
approvalCreate, approvalCreate,
approvalCancel,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { formatDate, getTotlContent, serviceMsg } from "../utils"; import { formatDate, getTotlContent, serviceMsg } from "../utils";
...@@ -336,6 +364,10 @@ export default { ...@@ -336,6 +364,10 @@ export default {
}, },
// 出货信息 // 出货信息
shipmentObj: this.$attrs.shipmentObj, shipmentObj: this.$attrs.shipmentObj,
// 抄送人
copyUser: undefined,
// 抄送人数组
copyUsers: [],
}; };
}, },
computed: { computed: {
...@@ -351,6 +383,11 @@ export default { ...@@ -351,6 +383,11 @@ export default {
(item) => item.tradeType == "1" || item.type == "3" (item) => item.tradeType == "1" || item.type == "3"
); );
}, },
/* 是否审核中 */
isAudit() {
const { currNode, shipmentObj } = this.$attrs;
return shipmentObj[currNode.keyName] === 23;
},
}, },
created() { created() {
// 查询待预装 // 查询待预装
...@@ -504,7 +541,7 @@ export default { ...@@ -504,7 +541,7 @@ export default {
orderId: item.orderId, orderId: item.orderId,
}; };
if (type === "all") { if (type === "all") {
params.orderItemIdList = item.orderItemList.map( params.orderItemIdList = item.boxOrderItemList.map(
(data) => data.orderItemId (data) => data.orderItemId
); );
} else { } else {
...@@ -544,6 +581,7 @@ export default { ...@@ -544,6 +581,7 @@ export default {
this.pageParam.pageNo = 1; this.pageParam.pageNo = 1;
this.getPreLoad(); this.getPreLoad();
}, },
/* 获取参数 */
getParams() { getParams() {
const { rucangtime = [] } = this.queryParams; const { rucangtime = [] } = this.queryParams;
return { return {
...@@ -556,6 +594,39 @@ export default { ...@@ -556,6 +594,39 @@ export default {
: rucangtime[1], : rucangtime[1],
}; };
}, },
/* 删除抄送人 */
removeCopyUser(user) {
this.copyUser = this.copyUser.filter((id) => id !== user.id);
},
/* 关闭弹框 */
closeDialog() {
this.$emit("closeDialog");
},
/* 取消审核 */
canclAudit() {
const { currNode, shipmentObj } = this.$attrs;
const { voName } = currNode;
approvalCancel({
id: shipmentObj[voName].id,
shipmentId: shipmentObj.id,
applyReason: "取消审核",
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
},
},
watch: {
copyUser(val) {
const { allUsers } = this.$attrs;
let users = [];
for (const id of val) {
const user = allUsers.find((item) => item.id === id);
if (user) users.push(user);
}
this.copyUsers = users;
},
}, },
}; };
</script> </script>
...@@ -638,6 +709,7 @@ export default { ...@@ -638,6 +709,7 @@ export default {
} }
.preinstall-card { .preinstall-card {
min-height: 550px;
.el-card__body { .el-card__body {
height: 100%; height: 100%;
...@@ -646,5 +718,39 @@ export default { ...@@ -646,5 +718,39 @@ export default {
} }
} }
} }
.process-area {
margin-top: 15px;
padding-bottom: 30px;
.process {
display: flex;
flex-direction: column;
> :first-child {
color: #606266;
font-weight: bolder;
font-size: 16px;
}
> :last-child {
height: 300px;
}
}
.copy-user {
margin-bottom: 15px;
> div {
display: flex;
align-items: center;
}
> :last-child {
.copyUser-tag {
display: flex;
flex-wrap: wrap;
> span {
margin-right: 10px;
}
}
}
}
}
} }
</style> </style>
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
if (operateType === 2) { if (operateType === 2) {
const { keyName } = this.$attrs.currNode; const { keyName } = this.$attrs.currNode;
const ulStatus = this.$attrs.shipmentObj[keyName]; const ulStatus = this.$attrs.shipmentObj[keyName];
if (ulStatus !== 145) { if (ulStatus !== 185) {
this.$message.error("请先通过卸柜审批"); this.$message.error("请先通过卸柜审批");
return; return;
} }
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
isStartUnloading() { isStartUnloading() {
const { currNode, shipmentObj } = this.$attrs; const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName]; const status = shipmentObj[currNode.keyName];
return status === 146 ? true : false; return status === 186 ? true : false;
}, },
}, },
}; };
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
<!-- 当前部分 --> <!-- 当前部分 -->
<el-row class="number-area"> <el-row class="number-area">
<p class="label-font">当前部分:</p> <p class="label-font">当前部分:</p>
<el-select v-model="currPart" placeholder="请选择当前部分"> <el-select placeholder="请选择" v-model="sectionId" @change="sectionChange">
<el-option key="0" label="全部" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option>
</el-select> </el-select>
<p> <p>
<span>无返回 箱</span> {{getSectionInfo}}
<span>无返回 m3</span>
<span>无返回 kg</span>
</p> </p>
</el-row> </el-row>
...@@ -94,8 +94,9 @@ import { ...@@ -94,8 +94,9 @@ import {
batchUnload, batchUnload,
allUnload, allUnload,
approvalCreate, approvalCreate,
getSectionList,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { serviceMsg } from "../../utils"; import { serviceMsg, getTotlContent } from "../../utils";
/** /**
* 开始卸柜 * 开始卸柜
...@@ -120,18 +121,36 @@ export default { ...@@ -120,18 +121,36 @@ export default {
selfNo: this.$attrs.shipmentObj.selfNo, selfNo: this.$attrs.shipmentObj.selfNo,
// 当前行 // 当前行
currRow: {}, currRow: {},
// 部分
sectionList: [],
// 已选部分
sectionId: "0",
// 部分订单商品
sectionObj: {
secStatistics: {},
sectionOrderList: [],
totalStatistics: {},
},
}; };
}, },
created() { created() {
this.getLoadGoodsList(); this.getLoadGoodsList();
// 部分
getSectionList({ shipmentId: this.$attrs.shipmentObj.id }).then((res) => {
this.sectionList = res.data.map((item, index) => {
return {
...item,
title: `第${index + 1}部分`,
};
});
});
}, },
methods: { methods: {
/* 获取卸柜数据 */ /* 获取卸柜数据 */
getLoadGoodsList(params) { getLoadGoodsList() {
this.loading = true; this.loading = true;
params = { let params = {
secId: 0, secId: this.sectionId,
...params,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
}; };
loadGoodsList(params).then((res) => { loadGoodsList(params).then((res) => {
...@@ -208,6 +227,21 @@ export default { ...@@ -208,6 +227,21 @@ export default {
return "未清关"; return "未清关";
} }
}, },
// 部分切换
sectionChange() {
this.getLoadGoodsList();
},
},
computed: {
// 部分信息
getSectionInfo() {
const { totalStatistics, secStatistics } = this.pageData;
if (!this.sectionId) {
return getTotlContent(totalStatistics);
} else {
return getTotlContent(secStatistics);
}
},
}, },
}; };
</script> </script>
......
...@@ -5,13 +5,10 @@ ...@@ -5,13 +5,10 @@
<div v-for="(nodes,index) in seaBaseData" :key="index" class="chart-nodes"> <div v-for="(nodes,index) in seaBaseData" :key="index" class="chart-nodes">
<div class="node-area"> <div class="node-area">
<div v-for="node in nodes" :key="node.title" @click="nodeClick(index, node)" class="node-div"> <div v-for="node in nodes" :key="node.title" @click="nodeClick(index, node)" class="node-div">
<template v-if="!node.unNode"> <div v-show="isShowAgent(node.type)">
<img :src="getImgSrc(node)" alt=""> <img :src="getImgSrc(node)" alt="">
<p>{{node.title}}</p> <p>{{node.title}}</p>
</template> </div>
<template v-else-if="node.unNode">
<el-button type="primary" @click="nodeClick(index, node)" style="width:100px;">{{node.title}}</el-button>
</template>
</div> </div>
</div> </div>
<div class="arrow-area" v-if="index !== (seaBaseData.length-1)"> <div class="arrow-area" v-if="index !== (seaBaseData.length-1)">
...@@ -77,6 +74,7 @@ export default { ...@@ -77,6 +74,7 @@ export default {
seaBaseData: Array, seaBaseData: Array,
}, },
data() { data() {
console.log(this.$store.state.user);
return { return {
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
...@@ -94,6 +92,20 @@ export default { ...@@ -94,6 +92,20 @@ export default {
}; };
}, },
created() {}, created() {},
computed: {
isShowAgent() {
return (type) => {
if (type === "agent") {
const { preInstallInfo } = this.shipmentObj;
const user = this.$store.state.user;
if (preInstallInfo && preInstallInfo.noticeUser === user.id)
return true;
return false;
}
return true;
};
},
},
methods: { methods: {
/** 关闭弹窗 */ /** 关闭弹窗 */
closeDialog(type) { closeDialog(type) {
...@@ -130,7 +142,7 @@ export default { ...@@ -130,7 +142,7 @@ export default {
case "preinstall": case "preinstall":
// 预装反审 // 预装反审
const preStatus = this.shipmentObj[node.keyName]; const preStatus = this.shipmentObj[node.keyName];
if ([23, 24].includes(preStatus)) { if ([24, 25].includes(preStatus)) {
this.currentComponent = `ReviewWidget`; this.currentComponent = `ReviewWidget`;
this.$set(this.dialogConfig, "width", "700px"); this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "预装反审"); this.$set(this.dialogConfig, "title", "预装反审");
...@@ -142,7 +154,7 @@ export default { ...@@ -142,7 +154,7 @@ export default {
case "unloading": case "unloading":
// 卸柜反审 // 卸柜反审
const unStatus = this.shipmentObj[node.keyName]; const unStatus = this.shipmentObj[node.keyName];
if ([144, 145].includes(unStatus)) { if ([184, 185].includes(unStatus)) {
this.currentComponent = `ReviewWidget`; this.currentComponent = `ReviewWidget`;
this.$set(this.dialogConfig, "width", "700px"); this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "卸柜反审"); this.$set(this.dialogConfig, "title", "卸柜反审");
......
...@@ -12,9 +12,10 @@ function getStatusName(statu) { ...@@ -12,9 +12,10 @@ function getStatusName(statu) {
statusName.set(12, "已订舱"); statusName.set(12, "已订舱");
statusName.set(21, "未预装"); statusName.set(21, "未预装");
statusName.set(22, "预装审核中"); statusName.set(22, "预装中");
statusName.set(23, "预装审核失败"); statusName.set(23, "预装审核中");
statusName.set(24, "预装审核成功"); statusName.set(24, "预装审核失败");
statusName.set(25, "预装审核成功");
statusName.set(31, "未派车"); statusName.set(31, "未派车");
statusName.set(32, "已派车"); statusName.set(32, "已派车");
...@@ -54,16 +55,16 @@ function getStatusName(statu) { ...@@ -54,16 +55,16 @@ function getStatusName(statu) {
statusName.set(131, "未清关"); statusName.set(131, "未清关");
statusName.set(132, "已清关"); statusName.set(132, "已清关");
statusName.set(141, "未卸柜"); statusName.set(181, "未卸柜");
statusName.set(142, "卸柜中"); statusName.set(182, "卸柜中");
statusName.set(143, "卸柜审核中"); statusName.set(183, "卸柜审核中");
statusName.set(144, "卸柜审核失败"); statusName.set(184, "卸柜审核失败");
statusName.set(145, "卸柜审核成功"); statusName.set(185, "卸柜审核成功");
statusName.set(146, "已卸柜"); statusName.set(186, "已卸柜");
statusName.set(151, "未结算"); statusName.set(191, "未结算");
statusName.set(152, "结算中"); statusName.set(192, "结算中");
statusName.set(153, "已结算"); statusName.set(193, "已结算");
return statusName.get(statu); return statusName.get(statu);
} }
...@@ -107,14 +108,14 @@ function seaBaseData() { ...@@ -107,14 +108,14 @@ function seaBaseData() {
type: "preinstall", type: "preinstall",
dataKey: "2", // 字典数据键值 dataKey: "2", // 字典数据键值
/** /**
* 预装状态:21、未预装;22、预装审核中;23、预装审核失败;24、预装审核成功 * 预装状态:21、未预装;22、预装中;23、预装审核中;24、预装审核失败;25、预装审核成功
*/ */
voName: "preInstallInfo", voName: "preInstallInfo",
keyName: "prStatus", keyName: "prStatus",
status: { status: {
start: [21], start: [21],
wait: [22, 23], wait: [22, 23, 24],
end: [24], end: [25],
}, },
}, },
{ {
...@@ -374,14 +375,14 @@ function seaBaseData() { ...@@ -374,14 +375,14 @@ function seaBaseData() {
type: "unloading", type: "unloading",
dataKey: "14", // 字典数据键值 dataKey: "14", // 字典数据键值
/** /**
* 卸柜状态:141、未卸柜;142、卸柜中;143、卸柜审核中;144、卸柜审核失败;145、卸柜审核成功;146、已卸柜 * 卸柜状态:181、未卸柜;182、卸柜中;183、卸柜审核中;184、卸柜审核失败;185、卸柜审核成功;186、已卸柜
*/ */
voName: "cabinetUnloadInfo", voName: "cabinetUnloadInfo",
keyName: "ulStatus", keyName: "ulStatus",
status: { status: {
start: [141], start: [181],
wait: [142, 143, 144, 145], wait: [182, 183, 184, 185],
end: [146], end: [186],
}, },
}, },
], ],
...@@ -396,14 +397,14 @@ function seaBaseData() { ...@@ -396,14 +397,14 @@ function seaBaseData() {
type: "settlement", type: "settlement",
dataKey: "15", // 字典数据键值 dataKey: "15", // 字典数据键值
/** /**
* 结算状态:151、未结算;152、结算中;153、已结算 * 结算状态:191、未结算;192、结算中;193、已结算
*/ */
voName: "settlementInfo", voName: "settlementInfo",
keyName: "slStatus", keyName: "slStatus",
status: { status: {
start: [151], start: [191],
wait: [152], wait: [192],
end: [153], end: [193],
}, },
}, },
], ],
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" /> <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="送货日期"> <el-descriptions-item label="送货日期">
<span v-if="orderData">{{orderData.status>=5?(orderData.orderItemVOList.length>0?orderData.orderItemVOList[0].warehouseInInfoVO.firstInTime:''):(orderData.consigneeVO?orderData.consigneeVO.deliveryDate:'')}}</span> {{orderData.consigneeVO?orderData.consigneeVO.deliveryDate||'':''}}
<!-- <span v-if="orderData">{{orderData.status>=5?(orderData.orderItemVOList.length>0?parseTime(orderData.orderItemVOList[0].warehouseInInfoVO.firstInTime):''):(orderData.consigneeVO?orderData.consigneeVO.deliveryDate:'')}}</span> -->
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="运输方式"> <el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
...@@ -82,7 +83,11 @@ ...@@ -82,7 +83,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="处理人" align="center" prop="userName" /> <el-table-column label="处理人" align="center" prop="userName" />
<el-table-column label="处理时间" align="center" prop='handlerTime' /> <el-table-column label="处理时间" align="center">
<template slot-scope="scope">
<span>{{parseTime(scope.row.handlerTime)}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.orderExceptionStatus>0">已完成</el-tag> <el-tag v-if="scope.row.orderExceptionStatus>0">已完成</el-tag>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<el-row> <el-row>
<el-form-item label="运输路线:" > <el-form-item label="运输路线:" >
<span v-if="orderData"><dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /></span> <span v-if="orderData"><dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /></span>
{{orderData?getRouterNameById(orderData.lineId):''}} {{orderData?getRouterNameById():''}}
</el-form-item> </el-form-item>
</el-row> </el-row>
<div v-if="orderExceptionData.orderExceptionType!=3||orderExceptionData.orderExceptionType!=9||orderExceptionData.orderExceptionType!=10||orderExceptionData.orderExceptionType!=11"> <div v-if="orderExceptionData.orderExceptionType!=3||orderExceptionData.orderExceptionType!=9||orderExceptionData.orderExceptionType!=10||orderExceptionData.orderExceptionType!=11">
...@@ -174,7 +174,6 @@ ...@@ -174,7 +174,6 @@
<script> <script>
import FileUpload from '@/components/FileUpload' import FileUpload from '@/components/FileUpload'
import {getDictData, getDictDatas} from '@/utils/dict' import {getDictData, getDictDatas} from '@/utils/dict'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getOrder} from '@/api/ecw/order' import {getOrder} from '@/api/ecw/order'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById} from "@/api/ecw/orderException" import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById} from "@/api/ecw/orderException"
...@@ -240,27 +239,12 @@ ...@@ -240,27 +239,12 @@
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
// 获取路线
getOpenedRouterList(){
let params = {}
if(this.list.departureId){
params.startCityId = this.list.departureId
}
if(this.list.objectiveId){
params.destCityId = this.list.objectiveId
}
getOpenedRouterList(params).then(res => this.routerList = res.data)
},
// 根据线路id显示线路名称 // 根据线路id显示线路名称
getRouterNameById(routerId){ getRouterNameById(){
// return routerId => { if(this.orderData.logisticsInfoDto) {
let router = this.routerList.find(item => item.id == routerId) return ' 从【'+this.orderData.logisticsInfoDto.startTitleZh + '】发往【' + this.orderData.logisticsInfoDto.destTitleZh+''
console.log({router})
if(router){
return ' 从【'+router.startTitleZh + '】发往【' + router.destTitleZh+''
} }
return '' return ''
// }
}, },
submitForm(){ submitForm(){
console.log(this.handlerParams) console.log(this.handlerParams)
......
...@@ -2,31 +2,32 @@ ...@@ -2,31 +2,32 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-card> <el-card>
<div slot="header" class="card-title">合单申请-{{orderData.orderSn||''}}</div> <div slot="header" class="card-title">合单申请-{{orderData.orderNo||''}}</div>
<el-descriptions :column="4"> <el-descriptions :column="4">
<el-descriptions-item label="唛头"> <el-descriptions-item label="唛头">
{{orderData.marks?orderData.marks:''}} {{orderData.marks||''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数"> <el-descriptions-item label="已到箱数/总箱数">
{{orderData.sumNum?orderData.sumNum:0+'/'+orderData.totalNum?orderData.totalNum:0}} <span>{{orderData.sumNum||0}}/{{orderData.costVO?orderData.costVO.totalNum:0}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="订单状态"> <el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" /> <!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" /> -->
{{orderData.status==99?'异常':'正常'}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="送货日期"> <el-descriptions-item label="送货日期">
{{orderData.date?orderData.date:''}} {{orderData.consigneeVO?orderData.consigneeVO.deliveryDate:''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="运输方式"> <el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出货渠道"> <el-descriptions-item label="出货渠道">
{{orderData.channelName||'/'}} {{orderData.channelId?getChannelName(orderData.channelId):'/'}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="始发地"> <el-descriptions-item label="始发地">
{{importCityName(orderData.startWarehouseId)}} {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="目的地"> <el-descriptions-item label="目的地">
{{importCityName(orderData.startWarehouseId)}} {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destTitleZh:''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="发货人姓名"> <el-descriptions-item label="发货人姓名">
{{orderData.consignorVO?orderData.consignorVO.name||'':''}} {{orderData.consignorVO?orderData.consignorVO.name||'':''}}
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
{{orderData.consignorVO?orderData.consignorVO.company||'':''}} {{orderData.consignorVO?orderData.consignorVO.company||'':''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="发货电话"> <el-descriptions-item label="发货电话">
{{orderData.consignorVO?orderData.consignorVO.phone||'':''}} {{orderData.consignorVO?(orderData.consignorVO.phone?(orderData.consignorVO.countryCode+orderData.consignorVO.phone):''):''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4"> <el-descriptions :column="4">
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
{{orderData.consigneeVO?orderData.consigneeVO.company||'':''}} {{orderData.consigneeVO?orderData.consigneeVO.company||'':''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="收货电话"> <el-descriptions-item label="收货电话">
{{orderData.consigneeVO?orderData.consigneeVO.phone||'':''}} {{orderData.consigneeVO?(orderData.consigneeVO.phone?(orderData.consigneeVo.countryCode+orderData.consigneeVO.phone):''):''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -54,31 +55,39 @@ ...@@ -54,31 +55,39 @@
<el-card class="card"> <el-card class="card">
<!-- 列表 --> <!-- 列表 -->
<div slot="header" class="card-title">已合单订单</div> <div slot="header" class="card-title">已合单订单</div>
<el-table v-loading="loading" border :data="list"> <el-table v-loading="loading" border :data="list.mergedList" style="width: 200px;">
<el-table-column label="序号" align="center" prop="id" type="index"> <el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.$index + 1}}</span> <span>{{scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单号" align="center" scope="orderSn" /> <el-table-column label="订单号" align="center">
<el-table-column label="唛头" align="center" scope="marks" /> <template slot-scope="scope">
<span>{{scope.row.mergedOrder.orderNo}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="唛头" align="center">
<template slot-scope="scope">
<span>{{scope.row.mergedOrder.marks}}</span>
</template>
</el-table-column>
<el-table-column label="始发地" align="center"> <el-table-column label="始发地" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{importCityName(scope.row.startWarehouseId)}}</span> <span>{{importCityName(scope.row.mergedOrder.orderDepartureVO.departureId)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入仓货物属性" align="center"> <el-table-column label="入仓货物属性" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>合计:</span> <span>合计:</span>
<span>{{scope.row.totalNum+''+scope.row.volume+''+scope.row.weight+'kg'}}</span> <span>{{scope.row.mergedOrder.sumNum+'箱 '+scope.row.mergedOrder.sumVolume+'m³ '+scope.row.mergedOrder.sumWeight+'kg'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入仓时间" align="center" prop='createTime' /> <el-table-column label="入仓时间" align="center" prop='createTime' />
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
</el-card> </el-card>
<el-card class="card"> <el-card class="card">
...@@ -92,47 +101,68 @@ ...@@ -92,47 +101,68 @@
<span>{{scope.$index + 1}}</span> <span>{{scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单号" align="center" scope="orderSn" /> <el-table-column label="订单号" align="center">
<el-table-column label="唛头" align="center" scope="marks" /> <template slot-scope="scope">
<span>{{scope.row.orderNo}}</span>
</template>
</el-table-column>
<el-table-column label="唛头" align="center">
<template slot-scope="scope">
<span>{{scope.row.marks}}</span>
</template>
</el-table-column>
<el-table-column label="始发地" align="center"> <el-table-column label="始发地" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{importCityName(scope.row.startWarehouseId)}}</span> <span>{{importCityName(scope.row.scope.row.orderDepartureVO.departureId)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入仓货物属性" align="center"> <el-table-column label="入仓货物属性" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>合计:</span> <span>合计:</span>
<span>{{scope.row.totalNum+''+scope.row.volume+''+scope.row.weight+'kg'}}</span> <span>{{scope.row.sumNum+''+scope.row.sumVolume+''+scope.row.sumWeight+'kg'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入仓时间" align="center" prop='createTime' /> <el-table-column label="入仓时间" align="center">
<template slot-scope="scope">
<span>{{parseTime(scope.row.rucangTime)}}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" /> <!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" /> -->
{{scope.row.status==99?'异常':'正常'}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-row v-if="singleData.length>0"> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<!-- <el-row v-if="singleData.length>0">
<el-checkbox v-model="checked">需要仓库打包</el-checkbox> <el-checkbox v-model="checked">需要仓库打包</el-checkbox>
</el-row> </el-row> -->
</el-card> </el-card>
<div slot="footer" class="card"> <work-flow v-if='singleData.length>0' xmlkey="merge_order" v-model="selectedUsers"></work-flow>
<el-button type="primary" @click="submitForm">提交</el-button> <div slot="footer" class="card footer_btn" v-if="singleData.length>0">
<el-button plain type="primary" @click="submitForm">取消</el-button> <el-button v-if="orderData.status!=16" type="primary" @click="submitForm">提交申请</el-button>
<el-button v-if="orderData.status!=16" plain type="primary" @click="$router.back()">取消</el-button>
<el-button v-if="orderData.status==16" type="primary" disabled>审核中</el-button>
<el-button v-if="orderData.status==16" plain type="primary" @click="cancelMerge">取消审核</el-button>
<el-button v-if="orderData.status==16" plain type="primary" @click="$router.back()">返回</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {getOrderExceptionPage} from "@/api/ecw/orderException" import {getMergeListByOrderNo,createMerge,cancelMerge} from "@/api/ecw/orderHandle"
import {getTradeCityList} from '@/api/ecw/region' import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict' import {DICT_TYPE} from '@/utils/dict'
import {getChannel} from '@/api/ecw/channel' import {getChannel} from '@/api/ecw/channel'
import {getModel} from '@/api/bpm/model'
import WorkFlow from '@/components/WorkFlow/'
export default { export default {
name: "SingleApply", name: "SingleApply",
components: { components: {
WorkFlow
}, },
data() { data() {
return { return {
...@@ -142,12 +172,24 @@ export default { ...@@ -142,12 +172,24 @@ export default {
list: [], list: [],
singleData:[], singleData:[],
tradeCityList:[], tradeCityList:[],
multipleSelection:[], loading:false,
loading:false queryParams:{
mergedOrderNo:'UG2200012S',
page:1,
rosw:10
},
selectedUsers:[],
total:0,
orderNos:''
}; };
}, },
created() { created() {
// this.getList(); if (this.$route.query.orderNo) {
this.queryParams.mergedOrderNo = op.orderNo
this.getList()
}else{
this.getList()
}
getTradeCityList().then(res => this.tradeCityList = res.data) getTradeCityList().then(res => this.tradeCityList = res.data)
}, },
methods: { methods: {
...@@ -155,27 +197,62 @@ export default { ...@@ -155,27 +197,62 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
// 执行查询 // 执行查询
getOrderExceptionPage(this.queryParams).then(response => { getMergeListByOrderNo(this.queryParams).then(response => {
this.list = response.data.list; this.list = response.data;
this.total = response.data.total; this.total = response.data.unMergeList.total;
this.orderData = response.data this.orderData = response.data.orderInfo
this.loading = false; this.loading = false;
this.singleData = response.data.unMergeList.list;
}); });
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; var orderNo = []
val.forEach((item)=>{
orderNo.push(item.mergedOrder.orderNo)
})
this.orderNos = orderNo.join(',')
}, },
importCityName(id){ importCityName(id){
var arr = this.tradeCityList.filter(item => item.id == id) var arr = this.tradeCityList.filter(item => item.id == id)
return arr.length>0?arr[0].titleZh:'' return arr.length>0?arr[0].titleZh:''
}, },
getChannelName(){ getChannelName(id){
getChannel(this.orderData.channelId).then(res=>{ getChannel(id).then(res=>{
this.orderData.channelName = res.data.nameZh return res.data.nameZh
})
},
cancelMerge(){
let that = this
if(!that.orderNos){
that.$message.error("请选择取消合单的订单");
return
}
var params = {
id:that.orderData.orderId,
copyUserId:that.selectedUsers,
orderNos:that.orderNos,
}
cancelMerge(params).then(res=>{
that.$message.success("取消成功");
that.getList()
}) })
}, },
submitForm(){ submitForm(){
let that = this
if(!that.orderNos){
that.$message.error("请选择待合单的订单");
return
}
var params = {
applyOrderNo:queryParams.mergedOrderNo,
copyUserId:that.selectedUsers,
orderNos:that.orderNos,
status:1
}
createMerge(params).then(res=>{
that.$message.success("修改成功");
that.getList()
})
} }
} }
} }
...@@ -189,4 +266,7 @@ export default { ...@@ -189,4 +266,7 @@ export default {
.card{ .card{
margin-top: 20px; margin-top: 20px;
} }
.footer_btn{
padding-bottom: 60px;
}
</style> </style>
...@@ -2,27 +2,27 @@ ...@@ -2,27 +2,27 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-card> <el-card>
<div slot="header" class="card-title">拆单申请-{{orderData.orderSn||''}}</div> <div slot="header" class="card-title">拆单申请-{{orderData.orderNo||''}}</div>
<div class="btn-header"> <div class="btn-header">
<span class="card-title">原单信息</span> <span class="card-title">原单信息</span>
<div> <div>
<span v-if="orderData.status==0" class="red">异常无法拆单</span> <span v-if="orderData.status==99" class="red">异常无法拆单</span>
<el-button v-else type="primary" @click="addSplit">新建拆单 </el-button> <el-button v-else type="primary" @click="addSplit">新建拆单 </el-button>
</div> </div>
</div> </div>
<el-descriptions :column="4"> <el-descriptions :column="4">
<el-descriptions-item label="唛头"> <el-descriptions-item label="唛头">
{{orderData.marks?orderData.marks:''}} {{orderData.marks?orderData.marks:''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数"> <el-descriptions-item label="已到箱数/总箱数">
{{orderData.sumNum?orderData.sumNum:0+'/'+orderData.totalNum?orderData.totalNum:0}} <span>{{orderData.sumNum||0}}/{{orderData.costVO?orderData.costVO.totalNum:0}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="订单状态"> <el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" /> <!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" /> -->
{{orderData.status==99?'异常':'正常'}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="送货日期"> <el-descriptions-item label="送货日期">
{{orderData.date?orderData.date:''}} {{orderData.consigneeVO?orderData.consigneeVO.deliveryDate:''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4"> <el-descriptions :column="4">
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="始发地"> <el-descriptions-item label="始发地">
{{importCityName(orderData.startWarehouseId)}} {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="目的地"> <el-descriptions-item label="目的地">
{{importCityName(orderData.startWarehouseId)}} {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destTitleZh:''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4"> <el-descriptions :column="4">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
{{orderData.consignorVO?orderData.consignorVO.company||'':''}} {{orderData.consignorVO?orderData.consignorVO.company||'':''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="发货电话"> <el-descriptions-item label="发货电话">
{{orderData.consignorVO?orderData.consignorVO.phone||'':''}} {{orderData.consignorVO?(orderData.consignorVO.phone?(orderData.consignorVO.countryCode+orderData.consignorVO.phone):''):''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4"> <el-descriptions :column="4">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
{{orderData.consigneeVO?orderData.consigneeVO.company||'':''}} {{orderData.consigneeVO?orderData.consigneeVO.company||'':''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="收货电话"> <el-descriptions-item label="收货电话">
{{orderData.consigneeVO?orderData.consigneeVO.phone||'':''}} {{orderData.consigneeVO?(orderData.consigneeVO.phone?(orderData.consigneeVo.countryCode+orderData.consigneeVO.phone):''):''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -63,19 +63,19 @@ ...@@ -63,19 +63,19 @@
<el-card class="card"> <el-card class="card">
<!-- 列表 --> <!-- 列表 -->
<div slot="header" class="card-title">货物信息</div> <div slot="header" class="card-title">货物信息</div>
<el-table v-loading="loading" border :data="orderData.list" :summary-method="getSummaries" show-summary> <el-table id='table' v-loading="loading" border :data="orderData.orderItemVOList" :summary-method="getSummaries" show-summary>
<el-table-column label="序号" align="center" prop="id" type="index"> <el-table-column label="序号" align="center" prop="id" type="index" width="60">
<template slot-scope="scope"> <template slot-scope="scope" >
<span>{{scope.$index + 1}}</span> <span>{{scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="品名" align="center" scope="orderSn"> <el-table-column label="品名" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-row>{{scope.row.prodTitleEn}}</el-row> <el-row>{{scope.row.prodTitleEn}}</el-row>
<el-row>{{scope.row.prodTitleZh}}</el-row> <el-row>{{scope.row.prodTitleZh}}</el-row>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="填单货物属性" align="center"> <el-table-column label="填单货物属性" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-row> <el-row>
<span>品牌: <span>品牌:
...@@ -83,17 +83,17 @@ ...@@ -83,17 +83,17 @@
</span> </span>
</el-row> </el-row>
<el-row> <el-row>
<span>箱数:{{scope.row.totalNum}}</span> <span>箱数:{{scope.row.num||'未填'}}</span>
</el-row> </el-row>
<el-row> <el-row>
<span>体积:{{scope.row.volume}}</span> <span>体积:{{scope.row.volume||'未填'}}</span>
</el-row> </el-row>
<el-row> <el-row>
<span>重量:{{scope.row.weight}}kg</span> <span>重量:{{scope.row.weight||'未填'}}kg</span>
</el-row> </el-row>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库货物属性" align="center"> <el-table-column label="入库货物属性" align="center" width="400">
<template slot-scope="scope"> <template slot-scope="scope">
<el-row> <el-row>
<span>规格:{{scope.row.boxGauge}}</span> <span>规格:{{scope.row.boxGauge}}</span>
...@@ -102,13 +102,17 @@ ...@@ -102,13 +102,17 @@
<span>品牌: <span>品牌:
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" /> <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</span> </span>
<span style="margin-left: 10px;">箱数:{{scope.row.totalNum}}</span> <span style="margin-left: 10px;">箱数:{{scope.row.warehouseInInfoVO.cartonsNum}}</span>
<span style="margin-left: 10px;">体积:{{scope.row.volume}}</span> <span style="margin-left: 10px;">体积:{{scope.row.warehouseInInfoVO.volume}}</span>
<span style="margin-left: 10px;">重量:{{scope.row.weight}}kg</span> <span style="margin-left: 10px;">重量:{{scope.row.warehouseInInfoVO.weight}}kg</span>
</el-row> </el-row>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最后操作时间" align="center" prop='createTime' /> <el-table-column label="最后操作时间" align="center">
<template slot-scope="scope">
<span>{{parseTime(scope.row.updateTime)}}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
...@@ -122,26 +126,29 @@ ...@@ -122,26 +126,29 @@
<div v-for="(item, index) in splitData" :key="index"> <div v-for="(item, index) in splitData" :key="index">
<div class="btn-header"> <div class="btn-header">
<div> <div>
<span class="card-title"> <p class="card-info">
{{item.orderSn}} <span class="card-title">
</span> {{item.orderNo}}
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" /> </span>
<span>发往:{{importCityName(item.startWarehouseId)}}</span> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
<span>发往:{{importCityName(item.dstWarehouseId)}}</span>
</p>
</div> </div>
<div> <div>
<el-button type="primary" @click="addShop(index)">放入</el-button> <el-button v-if="index==0" disabled type="primary" @click="addShop(index)">放入</el-button>
<el-button type="primary" plain @click="deleteSplit(index)">删除</el-button> <el-button v-if="index!=0" type="primary" @click="addShop(index)">放入</el-button>
<el-button type="primary" plain @click="deleteSplit(item.id)">删除</el-button>
</div> </div>
</div> </div>
<el-table border :data="item.list"> <el-table border :data="item.orderSplitItemBackVOList">
<el-table-column label="序号" align="center" prop="id" type="index"> <el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.$index + 1}}</span> <span>{{scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="中文名" align="center" scope="prodTitleZh" /> <el-table-column label="中文名" align="center" prop="prodTitleZh" />
<el-table-column label="英文名" align="center" scope="prodTitleEn" /> <el-table-column label="英文名" align="center" prop="prodTitleEn" />
<el-table-column label="品牌" align="center" scope="brandType"> <el-table-column label="品牌" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" /> <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</template> </template>
...@@ -158,25 +165,29 @@ ...@@ -158,25 +165,29 @@
</el-table-column> </el-table-column>
<el-table-column label="箱数" align="center"> <el-table-column label="箱数" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.num}}</span> <span>{{scope.row.num}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" @click="removeShop(index,scope.$index)">移出</el-button> <el-button v-if="index==0" disabled size="mini" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">移出</el-button>
<el-button v-else size="mini" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">移出</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</el-card> </el-card>
<work-flow xmlkey="split_order" v-model="selectedUsers"></work-flow>
<div slot="footer" class="card"> <div slot="footer" class="card footer_btn" v-if="orderData.status!=99">
<el-button v-if="orderData.status!=0" type="primary" @click="submitForm">提交申请</el-button> <el-button v-if="orderData.status!=19" type="primary" @click="submitForm">提交申请</el-button>
<el-button plain type="primary" @click="submitForm">取消</el-button> <el-button v-if="orderData.status!=19" plain type="primary" @click="$router.back()">取消</el-button>
<el-button v-if="orderData.status==19" type="primary" disabled>审核中</el-button>
<el-button v-if="orderData.status==19" plain type="primary" @click="cancelSplit">取消审核</el-button>
<el-button v-if="orderData.status==19" plain type="primary" @click="$router.back()">返回</el-button>
</div> </div>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog title="新建拆单" :visible.sync="open" width="400px" append-to-body> <el-dialog title="新建拆单" :visible.sync="open" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="formSplit" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-form-item label="运输方式"> <el-form-item label="运输方式">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" formatter="number"/> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" formatter="number"/>
...@@ -184,13 +195,13 @@ ...@@ -184,13 +195,13 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="目的仓库:" > <el-form-item label="目的仓库:" >
<el-select v-model="form.destWarehouseId" placeholder="请选择目的仓库" @change="changeDest"> <el-select v-model="form.destWarehouseId" placeholder="请选择目的仓库" >
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id" ></el-option> <el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="出货渠道"> <el-form-item label="出货渠道" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" >
<el-select v-model="form.channelId" placeholder="请选择出货渠道"> <el-select v-model="form.channelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelData" :key="item.channelId" :label="item.nameZh" :value="item.channelId"/> <el-option :disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'" v-for="item in channelData" :key="item.channelId" :label="item.nameZh" :value="item.channelId"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -202,19 +213,19 @@ ...@@ -202,19 +213,19 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog title="放入品名" :visible.sync="openShop" width="400px" append-to-body> <el-dialog title="放入品名" :visible.sync="shopOpen" width="400px" append-to-body>
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="80px"> <el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="80px">
<el-row> <el-row>
<el-form-item label="中文品名:"> <el-form-item label="中文品名:">
<el-select v-model="shopForm.prodTitleZh" placeholder="请选择中文品名" @change="changeProdTitleZh"> <el-select v-model="shopForm.prodTitleZh" placeholder="请选择中文品名" @change="changeProdTitleZh">
<el-option v-for="item in splitData.list" :label="item.prodTitleZh" :value="item.prodTitleZh" :key="item.prodTitleZh" ></el-option> <el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleZh" :value="item.prodTitleZh" :key="item.prodTitleZh" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="英文品名:" > <el-form-item label="英文品名:" >
<el-select v-model="shopForm.prodTitleEn" placeholder="请选择英文品名" @change="changeProdTitleEn"> <el-select v-model="shopForm.prodTitleEn" placeholder="请选择英文品名" @change="changeProdTitleEn">
<el-option v-for="item in splitData.list" :label="item.prodTitleEn" :value="item.prodTitleEn" :key="item.prodTitleEn" ></el-option> <el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleEn" :value="item.prodTitleEn" :key="item.prodTitleEn" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="剩余箱数:"> <el-form-item label="剩余箱数:">
...@@ -237,15 +248,18 @@ ...@@ -237,15 +248,18 @@
</template> </template>
<script> <script>
import {getOrderExceptionPage} from "@/api/ecw/orderException" import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import {getSplitList,splitApply,createSplit,cancelApply,createSplitItem,deleteSplitItem,deleteSplit} from "@/api/ecw/orderHandle"
import {getTradeCityList} from '@/api/ecw/region' import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict' import {getChannelList} from '@/api/ecw/channel'
import {getChannelPage} from '@/api/ecw/channel' import WorkFlow from '@/components/WorkFlow'
import {getOrder} from '@/api/ecw/order'
export default { export default {
name: "SplitApply", name: "SplitApply",
components: { components: {
WorkFlow
}, },
data() { data() {
return { return {
...@@ -261,103 +275,153 @@ export default { ...@@ -261,103 +275,153 @@ export default {
form:{ form:{
}, },
openShop:false, selectedUsers:[],
shopOpen:false,
shopForm:{}, shopForm:{},
// 表单校验 // 表单校验
rules: { rules: {
transportId: [{ required: true, message: "请选择运输方式", trigger: "blur" }], transportId: [{ required: true, message: "请选择运输方式", trigger: "change" }],
warehouseIds: [{ required: true, message: "请选择目的仓库", trigger: "blur" }], warehouseIds: [{ required: true, message: "请选择目的仓库", trigger: "change" }],
channelId: [{ required: true, message: "请选择出货渠道", trigger: "blur" }], channelId: [{ required: true, message: "请选择出货渠道", trigger: "change" }],
}, },
// 表单校验 // 表单校验
shopRules: { shopRules: {
prodTitleZh: [{ required: true, message: "请选择中文品名", trigger: "blur" }], prodTitleZh: [{ required: true, message: "请选择中文品名", trigger: "change" }],
prodTitleEn: [{ required: true, message: "请选择英文品名", trigger: "blur" }], prodTitleEn: [{ required: true, message: "请选择英文品名", trigger: "change" }],
},
queryParams:{
orderId:96,
lang:0
}, },
query:{ query:{
pageSize:20, page:1,
pageNo:1, rows:20
} },
splitItemIndex:0
}; };
}, },
created() { created() {
// this.getList(); this.getChannel()
getTradeCityList().then(res => this.tradeCityList = res.data) getTradeCityList().then(res => this.tradeCityList = res.data)
if (this.$route.query.orderId) {
this.queryParams.orderId = op.orderId
this.getList()
this.getOrder()
}else{
this.getList()
this.getOrder()
}
}, },
watch: {
//监听table这个对象
tableData: {
// 立即监听
immediate: true,
handler() {
this.$nextTick(() => {
const tds = document.querySelectorAll(
"#table .el-table__footer-wrapper tr>td"
);
// colSpan合并列
tds[1].colSpan = 5;
tds[1].style.textAlign = "left";
tds[2].style.display = "none";
tds[3].style.display = "none";
tds[4].style.display = "none";
tds[5].style.display = "none";
});
},
},
},
computed:{ computed:{
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
getDictDatas(){
return getDictDatas
},
importCityList(){ importCityList(){
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter(item => item.type == 1)
} }
}, },
methods: { methods: {
getOrder(){
this.loading = true;
getOrder(this.queryParams.orderId).then(response => {
this.orderData = response.data;
this.query.destWarehouseId = response.data.logisticsInfoDto.startWarehouseId
this.loading = false
});
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// 执行查询 // 执行查询
getOrderExceptionPage(this.queryParams).then(response => { getSplitList(this.queryParams).then(response => {
this.orderData = response.data this.splitData = response.data
this.form.destWarehouseId = response.data.destWarehouseId
this.loading = false; this.loading = false;
this.query.warehouseIds = response.data.destWarehouseId
this.getChannel()
}); });
}, },
getChannel(){ getChannel(){
getChannelPage(this.query).then(res=>this.channelData = res.data.list) getChannelList().then(res=>this.channelData = res.data)
}, },
changeDest(){ changeDest(){
this.query.warehouseIds = this.form.destWarehouseId this.query.warehouseIds = this.form.destWarehouseId
this.getChannel() },
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
console.log(rowIndex)
if (rowIndex==this.orderData.orderItemVOList.length) {
if (columnIndex === 1) {
return [2, 3];
} else if (columnIndex > 1) {
return [0, 0];
}
}
}, },
getSummaries(){ getSummaries(){
const sums = []; const sums = [];
if(!this.orderData || !this.orderData.list ||ths.orderData.length==0){
sums[0] = '小计'
if(!this.orderData || !this.orderData.orderItemVOList ||this.orderData.length==0){
return sums return sums
} }
sums[0] = '小计'
var orderSum = 0 var orderSum = 0
var orderV = 0 var orderV = 0
var orderW = 0 var orderW = 0
var leviteSum = 0 var leviteSum = 0
var leviteV = 0 var leviteV = 0
var leviteW = 0 var leviteW = 0
this.orderData.list.forEach((column, index) => { this.orderData.orderItemVOList.forEach((column, index) => {
orderSum += column.orderSum orderSum += column.num
orderV += column.volume orderV += column.volume
orderW += column.weight orderW += column.weight
leviteSum += column.orderSum leviteSum += column.warehouseInInfoVO.cartonsNum
leviteV += column.volume leviteV += column.warehouseInInfoVO.volume
leviteW += column.weight leviteW += column.warehouseInInfoVO.weight
}); });
sums[1] = '' sums[1] = '下单统计:'+ orderSum+''+ orderV +'' + orderW + ' kg ' + ' 入仓统计:'+ leviteSum+''+ leviteV +'' + leviteW + ' kg'
sums[2] = '下单统计:'+ orderSum+''+ orderV +'' + orderW + ' kg'
sums[3] = '入仓统计:'+ leviteSum+''+ leviteV +'' + leviteW + ' kg'
sums[4] = ''
sums[5] = ''
return sums; return sums;
}, },
handleSelectionChange(val) {
this.multipleSelection = val;
},
importCityName(id){ importCityName(id){
var arr = this.tradeCityList.filter(item => item.id == id) var arr = this.tradeCityList.filter(item => item.id == id)
return arr.length>0?arr[0].titleZh:'' return arr.length>0?arr[0].titleZh:''
}, },
submitForm(){ submitForm(){
var params = {
orderId:this.queryParams.orderId,
copyUserId:this.selectedUsers
}
splitApply(params).then(res=>{
this.$modal.msgSuccess("申请成功");
that.getList()
})
}, },
addShop(index){ addShop(index){
this.splitIndex = index this.splitItemIndex = index
this.shopForm.prodTitleZh = this.orderData.list[0].prodTitleZh
this.shopForm.prodTitleEn = this.orderData.list[0].prodTitleEn
var sum = list.num
this.splitData.list.forEach((item)=>{
if(item.prodTitleZh == this.shopForm.prodTitleZh){
sum -= item.num
}
})
this.shopForm.sum = sum
this.shopOpen = true this.shopOpen = true
}, },
addSplit(){ addSplit(){
...@@ -365,39 +429,38 @@ export default { ...@@ -365,39 +429,38 @@ export default {
}, },
changeProdTitleZh(){ changeProdTitleZh(){
var list = [] var list = []
list = this.orderData.list.filter(item=>item.prodTitleZh == this.shopForm.prodTitleZh) list = this.orderData.orderItemVOList.filter(item=>item.prodTitleZh == this.shopForm.prodTitleZh)
var sum = list.num this.shopForm.sum = list[0].num
this.splitData.list.forEach((item)=>{ this.shopForm.orderItemId = list[0].orderItemId
if(item.prodTitleZh == this.shopForm.prodTitleZh){
sum -= item.num
}
})
this.shopForm.sum = sum
this.shopForm.prodTitleEn = list[0].prodTitleEn this.shopForm.prodTitleEn = list[0].prodTitleEn
}, },
changeProdTitleEn(){ changeProdTitleEn(){
var list = [] var list = []
list = this.orderData.list.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn) list = this.orderData.orderItemVOList.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn)
var sum = list.num this.shopForm.sum = list[0].num
this.splitData.list.forEach((item)=>{
if(item.prodTitleEn == this.shopForm.prodTitleEn){
sum -= item.num
}
})
this.shopForm.sum = sum
this.shopForm.prodTitleZh = list[0].prodTitleZh this.shopForm.prodTitleZh = list[0].prodTitleZh
}, },
haddleAdd(){ haddleAdd(){
this.$refs["form"].validate(valid => { let that = this
if (!valid) { if(!that.form.transportId){
return; that.$message.error("请选择运输方式");
}
})
this.splitData.push(this.form)
if(this.splitData.length==0){
this.splitData[0].list = this.orderData.list
} }
this.open = false if(!that.form.destWarehouseId){
that.$message.error("请选择目的仓库");
}
// if(!this.form.channelId){
// this.$modal.msgError("请选择出货渠道");
// }
var params = {
dstWarehouseId: that.form.destWarehouseId,
parentOrderId: that.orderData.orderId,
parentOrderNo: that.orderData.orderNo,
transportId: that.form.transportId
}
createSplit(params).then(res=>{
that.getList()
})
that.open = false
}, },
cancel(){ cancel(){
this.open = false this.open = false
...@@ -409,35 +472,51 @@ export default { ...@@ -409,35 +472,51 @@ export default {
return; return;
} }
}) })
var isExit = this.splitData[this.splitIndex].list.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn) var params = {
if(isExit&&isExit.length==1){ num:this.shopForm.num,
this.splitData[this.splitIndex].list.forEach((item)=>{ orderItemId:this.shopForm.orderItemId,
item.num = this.shopForm.num orderSplitId:this.splitData[this.splitItemIndex].id,
item.remarks = this.shopForm.remarks remarks:this.shopForm.remarks
})
}else{
var list = this.orderData.list.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn)
list.num = this.shopForm.num
list.remarks = this.shopForm.remarks
this.splitData[this.splitIndex].list.push(list)
} }
createSplitItem(params).then(res=>{
that.$message.success("放入成功");
this.getList()
this.shopForm = {}
})
this.shopOpen = false this.shopOpen = false
}, },
removeShop(splitIndex,index){ removeShop(id){
this.splitData[splitIndex].list.splice(index,1) let that = this
that.$confirm('是否移除货物吗?').then(function () {
deleteSplitItem(id).then(res=>{
that.$message.success("移除成功");
that.getList()
})
})
},
cancelSplit(){
let that = this
that.$confirm('是否取消审核吗?').then(function () {
cancelApply({orderId:that.queryParams.orderId}).then(res=>{
that.$message.success("取消成功");
that.getList()
})
})
}, },
shopCancel(){ shopCancel(){
this.shopOpen = false this.shopOpen = false
this.shopForm = {} this.shopForm = {}
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
deleteSplit(index) { deleteSplit(id) {
const orderId = this.splitData[index].orderSn let that = this
this.$modal.confirm('是否确认删除订单号为"' + orderId + '"的数据项?').then(function () { that.$confirm('是否确认删除新拆的订单吗?').then(function () {
this.splitData.splice(index,1) deleteSplit(id).then(res=>{
}).then(() => { that.$message.success("删除成功");
this.$modal.msgSuccess("删除成功"); that.getList()
}).catch(() => { }); })
})
}, },
} }
} }
...@@ -448,11 +527,14 @@ export default { ...@@ -448,11 +527,14 @@ export default {
font-weight: bold; font-weight: bold;
margin-top: 10px; margin-top: 10px;
} }
.card-info{
font-size: 16px;
}
.card{ .card{
margin-top: 20px; margin-top: 20px;
} }
.btn-header{ .btn-header{
width: 80%; width: 90%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -462,4 +544,7 @@ export default { ...@@ -462,4 +544,7 @@ export default {
color:#ff3430; color:#ff3430;
font-size: 15px; font-size: 15px;
} }
.footer_btn{
padding-bottom: 60px;
}
</style> </style>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
v-for="item in brandList" v-for="item in brandList"
:key="item.id" :key="item.id"
:label="item.titleZh" :label="item.titleZh"
:value="item.titleZh"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-descriptions-item> </el-descriptions-item>
...@@ -61,37 +61,39 @@ ...@@ -61,37 +61,39 @@
<el-table-column label="长(cm)"> <el-table-column label="长(cm)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span> <span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else v-model="tableData[$index].boxGauge1" placeholder=""></el-input> <el-input v-else v-model.number="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宽(cm)"> <el-table-column label="宽(cm)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span> <span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else v-model="tableData[$index].boxGauge2" placeholder=""></el-input> <el-input v-else v-model.number="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="高(cm)"> <el-table-column label="高(cm)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span> <span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else v-model="tableData[$index].boxGauge3" placeholder=""></el-input> <el-input v-else v-model.number="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="体积(m³)"> <el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].volume }}</span> <span v-if="tableData[$index].id">{{ tableData[$index].volume }}</span>
<el-input v-else v-model="tableData[$index].volume" placeholder=""></el-input> <el-input v-else v-model.number="tableData[$index].volume" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(Kg)"> <el-table-column label="重量(Kg)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].weight }}</span> <span v-if="tableData[$index].id">{{ tableData[$index].weight }}</span>
<el-input v-else v-model="tableData[$index].weight" placeholder=""></el-input> <el-input v-else v-model.number="tableData[$index].weight" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量"> <el-table-column label="数量">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].quantityAll }}</span> <span v-if="tableData[$index].id">{{ tableData[$index].quantityAll }}</span>
<el-input v-else v-model="tableData[$index].quantityAll" placeholder=""></el-input> <el-input v-else v-model.number="tableData[$index].quantityAll" placeholder="">
<template slot="append"></template>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="快递单号"> <el-table-column label="快递单号">
...@@ -145,6 +147,9 @@ export default { ...@@ -145,6 +147,9 @@ export default {
mounted() { mounted() {
getProductBrankPage({pageSize: 100000}).then(r => { getProductBrankPage({pageSize: 100000}).then(r => {
this.brandList = r.data.list.map(e => { this.brandList = r.data.list.map(e => {
if(e.id){
e.id = e.id.toString()
}
const boxGauge = e.boxGauge const boxGauge = e.boxGauge
if (boxGauge && boxGauge.length > 0) { if (boxGauge && boxGauge.length > 0) {
const boxGaugeList = boxGauge.split('*') const boxGaugeList = boxGauge.split('*')
...@@ -204,6 +209,14 @@ export default { ...@@ -204,6 +209,14 @@ export default {
}, },
methods: { methods: {
handleVolume(index){
const {boxGauge1, boxGauge2, boxGauge3} = this.tableData[index]
if (boxGauge1 && boxGauge2 && boxGauge3) {
this.tableData[index].volume = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000).toFixed(2)
} else {
this.tableData[index].volume = 0
}
},
handleSubmit() { handleSubmit() {
const orderWarehouseInItemDoList = this.form.orderWarehouseInItemDoList.map(e => { const orderWarehouseInItemDoList = this.form.orderWarehouseInItemDoList.map(e => {
return { return {
......
...@@ -47,17 +47,17 @@ ...@@ -47,17 +47,17 @@
{{ row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : '' }} {{ row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : '' }}
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="updateTime" prop="createTime"
label="最后操作时间"> label="最后操作时间">
<template v-slot="{row}"> <template v-slot="{row}">
{{ row.updateTime }} {{ parseTime(row.createTime) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="diffType" prop="diffType"
v-slot="{row}" v-slot="{row}"
label="状态"> label="状态">
<dict-tag :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" /> <dict-tag v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" class="red" :class="{green: row.warehouseInInfoVO.diffType === 4}"/>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
...@@ -149,6 +149,7 @@ import {DICT_TYPE} from "@/utils/dict" ...@@ -149,6 +149,7 @@ import {DICT_TYPE} from "@/utils/dict"
import PrintTag from "@/views/ecw/order/components/PrintTag" import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt" import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
import imageUpload from "@/components/ImageUpload"; import imageUpload from "@/components/ImageUpload";
import {parseTime} from "@/utils/ruoyi"
export default { export default {
name: "Warehousing", name: "Warehousing",
...@@ -174,6 +175,7 @@ export default { ...@@ -174,6 +175,7 @@ export default {
data() { data() {
return { return {
parseTime,
DICT_TYPE, DICT_TYPE,
areaVisible: false, areaVisible: false,
finishVisible: false, finishVisible: false,
...@@ -290,6 +292,12 @@ export default { ...@@ -290,6 +292,12 @@ export default {
} }
</script> </script>
<style scoped> <style scoped lang="scss">
@import "src/assets/styles/element-variables";
.red{
color: $--color-danger;
}
.green{
color: $--color-success;
}
</style> </style>
...@@ -156,6 +156,13 @@ ...@@ -156,6 +156,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="跟单客服">
<el-select v-model="form.customerServiceId" placeholder="请选择">
<el-option v-for="dict in followUpList" :key="parseInt(dict.id)" :label="dict.nickname" :value="parseInt(dict.id)"/>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
...@@ -231,7 +238,7 @@ import { ...@@ -231,7 +238,7 @@ import {
importTemplate, importTemplate,
listUser, listUser,
resetUserPwd, resetUserPwd,
updateUser updateUser, userList
} from "@/api/system/user"; } from "@/api/system/user";
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
...@@ -309,7 +316,7 @@ export default { ...@@ -309,7 +316,7 @@ export default {
username: undefined, username: undefined,
mobile: undefined, mobile: undefined,
status: undefined, status: undefined,
deptId: undefined deptId: undefined,
}, },
// 列信息 // 列信息
columns: [ columns: [
...@@ -355,6 +362,7 @@ export default { ...@@ -355,6 +362,7 @@ export default {
// 数据字典 // 数据字典
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS), statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
sexDictDatas: getDictDatas(DICT_TYPE.SYSTEM_USER_SEX), sexDictDatas: getDictDatas(DICT_TYPE.SYSTEM_USER_SEX),
followUpList:[],
}; };
}, },
watch: { watch: {
...@@ -369,6 +377,9 @@ export default { ...@@ -369,6 +377,9 @@ export default {
this.getConfigKey("sys.user.init-password").then(response => { this.getConfigKey("sys.user.init-password").then(response => {
this.initPassword = response.msg; this.initPassword = response.msg;
}); });
userList('documentary customer service').then(r => {
this.followUpList = r.data;
})
}, },
methods: { methods: {
// 更多操作 // 更多操作
...@@ -462,7 +473,8 @@ export default { ...@@ -462,7 +473,8 @@ export default {
status: "0", status: "0",
remark: undefined, remark: undefined,
postIds: [], postIds: [],
roleIds: [] roleIds: [],
customerServiceId:undefined
}; };
this.resetForm("form"); this.resetForm("form");
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment