Commit a5f8e809 authored by huhaiqing's avatar huhaiqing

海运操作提货单开发

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