Commit a5f8e809 authored by huhaiqing's avatar huhaiqing

海运操作提货单开发

parent d631fa3c
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
<el-dropdown-item command="error">异常登记</el-dropdown-item> <el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item> <el-dropdown-item command="cost">费用登记</el-dropdown-item>
<el-dropdown-item command="delete">删除</el-dropdown-item> <el-dropdown-item command="delete">删除</el-dropdown-item>
<el-dropdown-item command="editLadingBill">编辑提货单</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-dropdown trigger="click"> <el-dropdown trigger="click">
...@@ -143,15 +144,18 @@ ...@@ -143,15 +144,18 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body class="shippingSea-dialog"> <el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.open" :width="dialogCfg.width" append-to-body class="shippingSea-dialog">
<template v-if="dialogType === 'edit' || dialogType === 'add'"> <template v-if="dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'">
<editForm v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" /> <editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template> </template>
<template v-if="dialogType === 'cost'"> <template v-if="dialogCfg.dialogType === 'cost'">
<costForm v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" /> <costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
<template v-if="dialogType === 'error'"> <template v-if="dialogCfg.dialogType === 'error'">
<regError v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" /> <regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
...@@ -165,6 +169,7 @@ import { getListTree } from "@/api/ecw/region"; ...@@ -165,6 +169,7 @@ import { getListTree } from "@/api/ecw/region";
import costForm from "./costForm.vue"; import costForm from "./costForm.vue";
import regError from "./regError.vue"; import regError from "./regError.vue";
import editForm from "./editForm.vue"; import editForm from "./editForm.vue";
import ladingBill from "./ladingBill.vue";
export default { export default {
name: "indexSea", name: "indexSea",
...@@ -172,6 +177,7 @@ export default { ...@@ -172,6 +177,7 @@ export default {
costForm, costForm,
regError, regError,
editForm, editForm,
ladingBill,
}, },
data() { data() {
return { return {
...@@ -194,13 +200,16 @@ export default { ...@@ -194,13 +200,16 @@ export default {
// 出货列表 // 出货列表
list: [], list: [],
// 弹出层标题 // 弹出层标题
title: "",
// 弹出类型 // 弹出类型
dialogType: "", dialogCfg: {
title: "",
dialogType: "",
width: "600px",
// 是否显示弹出层
open: false,
},
// 当前行 // 当前行
currRow: {}, currRow: {},
// 是否显示弹出层
open: false,
dateRangeCreateTime: [], dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
...@@ -281,18 +290,20 @@ export default { ...@@ -281,18 +290,20 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.open = true; this.$set(this.dialogCfg, "open", true);
this.title = "添加出货"; this.$set(this.dialogCfg, "title", "添加出货");
this.dialogType = "add"; this.$set(this.dialogCfg, "dialogType", "add");
this.$set(this.dialogCfg, "width", "600px");
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
const id = row.id; const id = row.id;
getbox(id).then((response) => { getbox(id).then((response) => {
this.currRow = response.data; this.currRow = response.data;
this.open = true; this.$set(this.dialogCfg, "open", true);
this.title = "修改出货"; this.$set(this.dialogCfg, "title", "修改出货");
this.dialogType = "edit"; this.$set(this.dialogCfg, "dialogType", "edit");
this.$set(this.dialogCfg, "width", "600px");
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
...@@ -330,7 +341,7 @@ export default { ...@@ -330,7 +341,7 @@ export default {
}, },
/* 关闭弹窗 */ /* 关闭弹窗 */
closeDialog(type) { closeDialog(type) {
this.open = false; this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") { if (type === "add" || type === "edit") {
this.getList(); this.getList();
} }
...@@ -346,22 +357,36 @@ export default { ...@@ -346,22 +357,36 @@ export default {
this.handleUpdate(row); this.handleUpdate(row);
break; break;
case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = `查看提单 ${row.selfNo} 柜号:${row.cubNo} 柜型:${cabinetLabel}`;
this.$set(this.dialogCfg, "open", true);
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "dialogType", "editLadingBill");
this.$set(this.dialogCfg, "width", "60%");
this.currRow = row;
break;
case "delete": case "delete":
this.handleDelete(row); this.handleDelete(row);
break; break;
case "cost": case "cost":
this.title = "费用登记"; this.$set(this.dialogCfg, "open", true);
this.dialogType = "cost"; this.$set(this.dialogCfg, "title", "费用登记");
this.open = true; this.$set(this.dialogCfg, "dialogType", "cost");
this.$set(this.dialogCfg, "width", "600px");
this.currRow = row; this.currRow = row;
break; break;
case "error": case "error":
this.title = "异常登记"; this.$set(this.dialogCfg, "open", true);
this.dialogType = "error"; this.$set(this.dialogCfg, "title", "异常登记");
this.open = true; this.$set(this.dialogCfg, "dialogType", "error");
this.$set(this.dialogCfg, "width", "600px");
this.currRow = row; this.currRow = row;
break; break;
case "detail": case "detail":
this.$router.push("/boxSea/query/" + row.id); this.$router.push("/boxSea/query/" + row.id);
break; break;
......
<template>
</template>
<script>
export default {
name: "ladingBill",
};
</script>
<style lang="scss" scoped>
</style>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<!-- 操作 --> <!-- 操作 -->
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">封柜</el-button> <el-button type="success" @click="onSubmit(2)" :disabled="isStartCabinet">封柜</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
<el-button type="danger" @click="startCabinet" :disabled="isStartCabinet">开始装柜</el-button> <el-button type="danger" @click="startCabinet" :disabled="isStartCabinet">开始装柜</el-button>
</el-row> </el-row>
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
isStartCabinet() { isStartCabinet() {
const { currNode, shipmentObj } = this.$attrs; const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName]; const status = shipmentObj[currNode.keyName];
return status === 46 ? true : false; return status === 47 ? true : false;
}, },
}, },
}; };
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<p>容量:</p> <p>容量:</p>
<p>{{calcCapacity}}</p> <p>{{calcCapacity}}</p>
</div> </div>
<div>已装 无返回</div> <div>已装 {{getInstallNumCount}}</div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -244,10 +244,6 @@ export default { ...@@ -244,10 +244,6 @@ export default {
listData: [], listData: [],
// 表格数据 // 表格数据
tableData: {}, tableData: {},
// 统计数据
sumData: {
count: { num: 0, volume: 0, weight: 0 },
},
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
title: "", title: "",
...@@ -515,7 +511,7 @@ export default { ...@@ -515,7 +511,7 @@ export default {
canclAudit() { canclAudit() {
approvalCancel({ approvalCancel({
applyReason: "取消审核", applyReason: "取消审核",
id: this.shipmentObj['cabinetApprovalInfo'].id, id: this.shipmentObj["cabinetApprovalInfo"].id,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
...@@ -524,12 +520,6 @@ export default { ...@@ -524,12 +520,6 @@ export default {
}); });
}, },
}, },
watch: {
listData(val) {
const count = sumStatistics(val);
this.$set(this.sumData, "count", count);
},
},
computed: { computed: {
/* 是否审核中 */ /* 是否审核中 */
isUnderReview() { isUnderReview() {
...@@ -552,6 +542,19 @@ export default { ...@@ -552,6 +542,19 @@ export default {
getSumData() { getSumData() {
return sumStatistics(this.listData); return sumStatistics(this.listData);
}, },
/* 已装总数 */
getInstallNumCount() {
let count = 0;
if (Array.isArray(this.listData)) {
this.listData.forEach((item) => {
const { sectionOrderList } = item;
sectionOrderList.forEach((item) => {
count = count + item.installNum;
});
});
}
return count;
},
}, },
}; };
</script> </script>
......
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