Commit 356567e2 authored by zhoutong's avatar zhoutong

海运/空运 箱数加弹窗

parent 235469cd
...@@ -52,7 +52,12 @@ ...@@ -52,7 +52,12 @@
<el-table-column :label="$t('序号')" align="center" width="50" prop="tidanNum" /> <el-table-column :label="$t('序号')" align="center" width="50" prop="tidanNum" />
<el-table-column :label="$t('订单号')" align="center" prop="orderNo"> <el-table-column :label="$t('订单号')" align="center" prop="orderNo">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.orderNo }} <div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{scope.row.orderNo}}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px"> <el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px">
...@@ -73,8 +78,26 @@ ...@@ -73,8 +78,26 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('实装箱数')" align="center" prop="installNum" /> <el-table-column :label="$t('实装箱数')" align="center" prop="installNum">
<el-table-column :label="$t('到仓箱数')" align="center" prop="unloadNum" /> <template slot-scope="scope">
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{scope.row.installNum}}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('到仓箱数')" align="center" prop="unloadNum">
<template slot-scope="scope">
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{scope.row.unloadNum}}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('清关状态')" align="center" prop=""> <el-table-column :label="$t('清关状态')" align="center" prop="">
<template slot-scope="scope">{{clearStatus(scope.row)}}</template> <template slot-scope="scope">{{clearStatus(scope.row)}}</template>
</el-table-column> </el-table-column>
...@@ -141,7 +164,14 @@ ...@@ -141,7 +164,14 @@
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('异常')" :visible.sync="dialogVisible" width="600px" :modal-append-to-body=false append-to-body> <el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<!-- 已装未装订单 -->
<template v-if="dialogConfig.type === 'orderTable'">
<el-table :data="orderList" height="500px" border>
<el-table-column :label="$t('已到')" align="center" prop="loadTag" />
<el-table-column :label="$t('未到')" align="center" prop="unloadTag" />
</el-table>
</template>
<unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" /> <unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" />
</el-dialog> </el-dialog>
</div> </div>
...@@ -153,6 +183,7 @@ import { ...@@ -153,6 +183,7 @@ import {
loadGoodsList, loadGoodsList,
airBatchUnload, airBatchUnload,
airAllUnload, airAllUnload,
orderTagList,
approvalCreate, approvalCreate,
approvalCancel, approvalCancel,
getSectionList, getSectionList,
...@@ -181,7 +212,16 @@ export default { ...@@ -181,7 +212,16 @@ export default {
// 页面数据 // 页面数据
pageData: {}, pageData: {},
// 弹窗配置 // 弹窗配置
dialogConfig: {
title: "",
dialogVisible: false, dialogVisible: false,
width: "30%",
type: "",
fullscreen: false,
},
dialogVisible: false,
// 已装/未装
orderList: [],
// 自编号 // 自编号
selfNo: this.$attrs.shipmentObj.selfNo, selfNo: this.$attrs.shipmentObj.selfNo,
// 当前行 // 当前行
...@@ -247,6 +287,63 @@ export default { ...@@ -247,6 +287,63 @@ export default {
this.pageData = data; this.pageData = data;
this.loading = false; this.loading = false;
}); });
},
/** 表格订单号点击 */
orderClick(row) {
orderTagList({ orderId: row.orderId }).then((res) => {
const { data = {} } = res;
this.orderList = [];
// 取最长的list
let dataLength = data.loadList.length;
if (data.unLoadList.length > dataLength) {
dataLength = data.unLoadList.length;
}
// 组装数据,用一个table组件渲染
for (let index = 0; index < dataLength; index++) {
this.orderList.push({
loadTag: data.loadList[index],
unloadTag: data.unLoadList[index],
});
}
});
this.shwoDialog({
type: "orderTable",
title: row.selfNo,
});
},
/** 弹窗事件 */
shwoDialog(config) {
this.$set(this.dialogConfig, "title", config.title);
this.$set(this.dialogConfig, "type", config.type);
switch (config.type) {
case "orderTable":
this.$set(this.dialogConfig, "fullscreen", false);
break;
case "supplementOrder":
this.$set(this.dialogConfig, "fullscreen", true);
break;
case "batchInput":
this.$set(this.dialogConfig, "fullscreen", false);
this.batchObj = { boxNum: 0 };
this.boxOrderInfo = {};
break;
case "correction":
this.$set(this.dialogConfig, "fullscreen", false);
this.correctionObj = {};
break;
case "correctionOrder":
this.$set(this.dialogConfig, "fullscreen", false);
this.orderObj = {};
break;
case "modifyCabinet":
this.$set(this.dialogConfig, "fullscreen", false);
this.modifyCabinetObj = {};
this.$set(this.modifyCabinetObj,'cabinetId',this.shipmentObj.cabinetId)
this.$set(this.modifyCabinetObj,'cubNo',this.shipmentObj.cubNo)
break;
}
this.$set(this.dialogConfig, "dialogVisible", true);
}, },
/* 单个卸柜 */ /* 单个卸柜 */
modifyUnload() { modifyUnload() {
......
...@@ -34,7 +34,12 @@ ...@@ -34,7 +34,12 @@
<el-table-column :label="$t('序号')" align="center" width="50" prop="tidanNum" /> <el-table-column :label="$t('序号')" align="center" width="50" prop="tidanNum" />
<el-table-column :label="$t('订单号')" align="center" prop="orderNo"> <el-table-column :label="$t('订单号')" align="center" prop="orderNo">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.orderNo }} <div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.orderNo }}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px"> <el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px">
...@@ -55,8 +60,26 @@ ...@@ -55,8 +60,26 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('实装箱数')" align="center" prop="installNum" /> <el-table-column :label="$t('实装箱数')" align="center" prop="installNum">
<el-table-column :label="$t('卸柜箱数')" align="center" prop="unloadNum" /> <template slot-scope="scope">
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.installNum }}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('卸柜箱数')" align="center" prop="unloadNum">
<template slot-scope="scope">
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.unloadNum }}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('清关状态')" align="center" prop=""> <el-table-column :label="$t('清关状态')" align="center" prop="">
<template slot-scope="scope">{{clearStatus(scope.row)}}</template> <template slot-scope="scope">{{clearStatus(scope.row)}}</template>
</el-table-column> </el-table-column>
...@@ -120,7 +143,13 @@ ...@@ -120,7 +143,13 @@
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('异常')" :visible.sync="dialogVisible" width="600px" :modal-append-to-body=false append-to-body> <el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<template v-if="dialogConfig.type === 'orderTable'">
<el-table :data="orderList" height="500px" border>
<el-table-column :label="$t('已卸')" align="center" prop="loadTag" />
<el-table-column :label="$t('未卸')" align="center" prop="unloadTag" />
</el-table>
</template>
<unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" /> <unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" />
</el-dialog> </el-dialog>
</div> </div>
...@@ -131,6 +160,7 @@ import unloadingError from "./unloadingError.vue"; ...@@ -131,6 +160,7 @@ import unloadingError from "./unloadingError.vue";
import { import {
loadGoodsList, loadGoodsList,
batchUnload, batchUnload,
orderTagList,
allUnload, allUnload,
approvalCreate, approvalCreate,
approvalCancel, approvalCancel,
...@@ -168,6 +198,16 @@ export default { ...@@ -168,6 +198,16 @@ export default {
sectionList: [], sectionList: [],
// 已选部分 // 已选部分
sectionId: "0", sectionId: "0",
// 已卸/未卸
orderList: [],
// 弹窗配置
dialogConfig: {
title: "",
dialogVisible: false,
width: "30%",
type: "",
fullscreen: false,
},
// 部分订单商品 // 部分订单商品
sectionObj: { sectionObj: {
secStatistics: {}, secStatistics: {},
...@@ -272,10 +312,70 @@ export default { ...@@ -272,10 +312,70 @@ export default {
this.cancel(); this.cancel();
}); });
}); });
},
/** 表格订单号点击 */
orderClick(row) {
orderTagList({ orderId: row.orderId }).then((res) => {
const { data = {} } = res;
this.orderList = [];
// 取最长的list
let dataLength = data.loadList.length;
if (data.unLoadList.length > dataLength) {
dataLength = data.unLoadList.length;
}
// 组装数据,用一个table组件渲染
for (let index = 0; index < dataLength; index++) {
this.orderList.push({
loadTag: data.loadList[index],
unloadTag: data.unLoadList[index],
});
}
});
this.shwoDialog({
type: "orderTable",
title: row.selfNo,
});
}, },
/** 取消 */ /** 取消 */
cancel() { cancel() {
this.$emit("closeStart", "submit"); this.$emit("closeStart", "submit");
},
/** 弹窗事件 */
shwoDialog(config) {
this.$set(this.dialogConfig, "title", config.title);
this.$set(this.dialogConfig, "type", config.type);
switch (config.type) {
case "orderTable":
this.$set(this.dialogConfig, "fullscreen", false);
break;
case "supplementOrder":
this.$set(this.dialogConfig, "fullscreen", true);
break;
case "batchInput":
this.$set(this.dialogConfig, "fullscreen", false);
this.batchObj = { boxNum: 0 };
this.boxOrderInfo = {};
break;
case "correction":
this.$set(this.dialogConfig, "fullscreen", false);
this.correctionObj = {};
break;
case "correctionOrder":
this.$set(this.dialogConfig, "fullscreen", false);
this.orderObj = {};
break;
case "modifyCabinet":
this.$set(this.dialogConfig, "fullscreen", false);
this.modifyCabinetObj = {};
this.$set(this.modifyCabinetObj,'cabinetId',this.shipmentObj.cabinetId)
this.$set(this.modifyCabinetObj,'cubNo',this.shipmentObj.cubNo)
break;
case "splitOrder":
this.$set(this.dialogConfig, "fullscreen", true);
break;
}
this.$set(this.dialogConfig, "dialogVisible", true);
}, },
/* 关闭弹窗 */ /* 关闭弹窗 */
closeDialog(type) { closeDialog(type) {
......
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