|
|
@@ -77,6 +77,15 @@
|
|
|
>
|
|
|
查看放箱号
|
|
|
</el-button>
|
|
|
+ <!-- <el-button
|
|
|
+ v-if="row.id && row.containerNumberStatus == '已选择' && assemblyForm.billType != 'MM'"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click.stop="rowFix(row)"
|
|
|
+ :disabled="seeDisabled"
|
|
|
+ >
|
|
|
+ 修改箱量
|
|
|
+ </el-button> -->
|
|
|
</template>
|
|
|
<template slot-scope="{ row }" slot="cntrTypeCodeForm">
|
|
|
<search-query
|
|
|
@@ -95,6 +104,19 @@
|
|
|
>
|
|
|
</search-query>
|
|
|
</template>
|
|
|
+ <template slot="quantityForm" slot-scope="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ style="width: 100%;"
|
|
|
+ v-model="row.quantity"
|
|
|
+ size="small"
|
|
|
+ autocomplete="off"
|
|
|
+ min="0"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入箱量"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ row.quantity }}</span>
|
|
|
+ </template>
|
|
|
<template slot="number" slot-scope="{ row }">
|
|
|
<el-input
|
|
|
v-if="row.$cellEdit"
|
|
|
@@ -140,7 +162,9 @@
|
|
|
</avue-crud>
|
|
|
<el-dialog title="查看放箱号" :visible.sync="dialogVisible" width="50%" :before-close="handleClose" append-to-body>
|
|
|
<span>
|
|
|
+ <avue-form ref="form" v-if="dialogVisible" :option="optionForm" v-model="boxForm"></avue-form>
|
|
|
<avue-crud
|
|
|
+ v-if="dialogVisible"
|
|
|
ref="crud2"
|
|
|
:option="containerOption"
|
|
|
:data="containerNumberItemList"
|
|
|
@@ -149,7 +173,7 @@
|
|
|
>
|
|
|
<template slot="occupyNum" slot-scope="{ row }">
|
|
|
<el-input-number
|
|
|
- v-if="!row.id"
|
|
|
+ v-if="!row.id || editStatus"
|
|
|
v-model="row.occupyNum"
|
|
|
:min="0"
|
|
|
:max="row.remainingNum"
|
|
|
@@ -160,15 +184,23 @@
|
|
|
></el-input-number>
|
|
|
<span v-else>{{ row.occupyNum }}</span>
|
|
|
</template>
|
|
|
+ <template slot-scope="{ row, index }" slot="menu">
|
|
|
+ <el-button v-if="row.id && row.whetherAppearStatus == 1" size="mini" type="text" @click.stop="rowFix(row)" :disabled="seeDisabled">
|
|
|
+ 确认操作占用
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</span>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false" size="mini">{{ editStatus ? "取 消" : "关 闭" }}</el-button>
|
|
|
- <el-button v-if="editStatus" type="primary" @click="submit" size="mini">确 定</el-button>
|
|
|
+ <el-button v-if="editStatus" type="primary" @click="submit" size="mini">{{
|
|
|
+ boxForm.containerNumberStatus == "录入" ? "确 定" : "修 改"
|
|
|
+ }}</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<import-temp ref="importTemp" @importData="importTemp"></import-temp>
|
|
|
<send-edi ref="sendEdi" @importData="sendEdi"></send-edi>
|
|
|
+ <fix-boxQuantity ref="fixBoxQuantity" @getUpdate="getUpdate"></fix-boxQuantity>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
@@ -182,7 +214,8 @@ import {
|
|
|
getItemListHY,
|
|
|
selectedContainerNumber,
|
|
|
revokeSelectedContainerNumber,
|
|
|
- sendVerificationPrompt
|
|
|
+ sendVerificationPrompt,
|
|
|
+ actualOccupyNumUpdate
|
|
|
} from "@/api/iosBasicData/ReceivingOrders/precontainers";
|
|
|
import { getWorkDicts } from "@/api/system/dictbiz";
|
|
|
import { mapGetters } from "vuex";
|
|
|
@@ -193,8 +226,10 @@ import { requiredMessage } from "@/util/messageReminder";
|
|
|
import { Header } from "element-ui";
|
|
|
import importTemp from "./components/importTemp.vue";
|
|
|
import sendEdi from "./components/sendEdi.vue";
|
|
|
+import fixBoxQuantity from "./components/fixBoxQuantity.vue";
|
|
|
+import { isProcurement } from "@/api/basicData/configuration";
|
|
|
export default {
|
|
|
- components: { SearchQuery, importTemp, sendEdi },
|
|
|
+ components: { SearchQuery, importTemp, sendEdi, fixBoxQuantity },
|
|
|
props: {
|
|
|
pid: {},
|
|
|
assemblyForm: {
|
|
|
@@ -212,11 +247,40 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isOccupyNum: false,
|
|
|
editStatus: false,
|
|
|
dialogVisible: false,
|
|
|
// 集装箱尺码箱型
|
|
|
cntrTypeCodeData: [],
|
|
|
+ boxForm: {},
|
|
|
containerNumberItemList: [],
|
|
|
+ optionForm: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ disabled: false,
|
|
|
+ labelWidth: 50,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: this.$t("sea118n.ctnrType"),
|
|
|
+ prop: "cntrTypeCode",
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: this.$t("sea118n.ctnrQty"),
|
|
|
+ prop: "quantity",
|
|
|
+ type: "number",
|
|
|
+ controls: false,
|
|
|
+ precision: 0,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
form: {},
|
|
|
query: {},
|
|
|
loading: false,
|
|
|
@@ -256,13 +320,14 @@ export default {
|
|
|
message: "请选择箱型",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: this.$t("sea118n.ctnrQty"),
|
|
|
prop: "quantity",
|
|
|
type: "number",
|
|
|
- cell: true,
|
|
|
+ slot: true,
|
|
|
controls: false,
|
|
|
precision: 0,
|
|
|
width: "120",
|
|
|
@@ -272,7 +337,8 @@ export default {
|
|
|
message: "请输入箱量",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: this.$t("sea118n.QTY"),
|
|
|
@@ -280,7 +346,7 @@ export default {
|
|
|
type: "number",
|
|
|
width: "120",
|
|
|
// cell:true,
|
|
|
- controls: false,
|
|
|
+ overHidden: true,
|
|
|
precision: 0
|
|
|
},
|
|
|
{
|
|
|
@@ -289,7 +355,8 @@ export default {
|
|
|
width: "120",
|
|
|
type: "number",
|
|
|
// cell:true,
|
|
|
- controls: false
|
|
|
+ controls: false,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: this.$t("sea118n.CBM"),
|
|
|
@@ -297,7 +364,8 @@ export default {
|
|
|
width: "120",
|
|
|
type: "number",
|
|
|
// cell:true,
|
|
|
- controls: false
|
|
|
+ controls: false,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "temperature",
|
|
|
@@ -305,7 +373,8 @@ export default {
|
|
|
cell: true,
|
|
|
controls: false,
|
|
|
// type:"number",
|
|
|
- width: "120"
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "temperatureUnit",
|
|
|
@@ -321,7 +390,8 @@ export default {
|
|
|
label: "华氏度",
|
|
|
value: "F"
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "通风度",
|
|
|
@@ -329,7 +399,8 @@ export default {
|
|
|
cell: true,
|
|
|
controls: false,
|
|
|
// type:"number",
|
|
|
- width: "120"
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "湿度",
|
|
|
@@ -337,7 +408,8 @@ export default {
|
|
|
cell: true,
|
|
|
controls: false,
|
|
|
// type:"number",
|
|
|
- width: "120"
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "SOC",
|
|
|
@@ -354,7 +426,8 @@ export default {
|
|
|
label: "是",
|
|
|
value: 1
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "单程",
|
|
|
@@ -370,7 +443,8 @@ export default {
|
|
|
label: "是",
|
|
|
value: 1
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "NOR",
|
|
|
@@ -387,7 +461,8 @@ export default {
|
|
|
label: "是",
|
|
|
value: 1
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "OOG",
|
|
|
@@ -404,42 +479,48 @@ export default {
|
|
|
label: "是",
|
|
|
value: 1
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "左超(CM)",
|
|
|
prop: "overLeft",
|
|
|
type: "number",
|
|
|
cell: true,
|
|
|
- controls: false
|
|
|
+ controls: false,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "右超(CM)",
|
|
|
prop: "overRight",
|
|
|
type: "number",
|
|
|
cell: true,
|
|
|
- controls: false
|
|
|
+ controls: false,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "前超(CM)",
|
|
|
prop: "overFront",
|
|
|
type: "number",
|
|
|
cell: true,
|
|
|
- controls: false
|
|
|
+ controls: false,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "后超(CM)",
|
|
|
prop: "overBack",
|
|
|
type: "number",
|
|
|
cell: true,
|
|
|
- controls: false
|
|
|
+ controls: false,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "超高(CM)",
|
|
|
prop: "overHeight",
|
|
|
type: "number",
|
|
|
cell: true,
|
|
|
- controls: false
|
|
|
+ controls: false,
|
|
|
+ overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
|
@@ -447,7 +528,8 @@ export default {
|
|
|
span: 24,
|
|
|
type: "textarea",
|
|
|
slot: true,
|
|
|
- minRows: 3
|
|
|
+ minRows: 3,
|
|
|
+ overHidden: true
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
@@ -457,7 +539,7 @@ export default {
|
|
|
height: "500",
|
|
|
// calcHeight: 30,
|
|
|
calcHeight: 30,
|
|
|
- menuWidth: 160,
|
|
|
+ menuWidth: 100,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
addBtn: false,
|
|
|
@@ -518,6 +600,12 @@ export default {
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
+ label: "实际操作占用",
|
|
|
+ prop: "actualOccupyNum",
|
|
|
+ width: 100,
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "优先等级",
|
|
|
prop: "priorityLevel",
|
|
|
type: "select",
|
|
|
@@ -529,14 +617,29 @@ export default {
|
|
|
width: 100,
|
|
|
overHidden: true
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
label: "箱管备注",
|
|
|
prop: "boxRemarks",
|
|
|
width: 100,
|
|
|
overHidden: true
|
|
|
},
|
|
|
-
|
|
|
+ {
|
|
|
+ label: "是否出场状态",
|
|
|
+ prop: "whetherAppearStatus",
|
|
|
+ width: 100,
|
|
|
+ type: "select",
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: "0"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: "1"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
{
|
|
|
label: "备注",
|
|
|
prop: "remarks",
|
|
|
@@ -568,6 +671,12 @@ export default {
|
|
|
async created() {
|
|
|
this.option = await this.getColumnData(this.getColumnName(487), this.optionBack);
|
|
|
this.containerOption = await this.getColumnData(this.getColumnName(488), this.containerOptionBack);
|
|
|
+ isProcurement({ param: "is.occupyNum" }).then(res => {
|
|
|
+ if (res.data.data == 1) {
|
|
|
+ this.containerOption.menu = true;
|
|
|
+ this.isOccupyNum = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
sendEdi() {
|
|
|
@@ -581,25 +690,61 @@ export default {
|
|
|
importTemp() {
|
|
|
this.$emit("billsDetailfun");
|
|
|
},
|
|
|
+ rowFix(row) {
|
|
|
+ this.$refs.fixBoxQuantity.openDialog(this.assemblyForm, row);
|
|
|
+ },
|
|
|
+ getUpdate() {
|
|
|
+ this.$emit("billsDetailfun");
|
|
|
+ },
|
|
|
submit() {
|
|
|
- // let obj = {
|
|
|
- // containerNumberItemList:
|
|
|
- // }
|
|
|
- // for (let item of ) {
|
|
|
- // if (!(item.occupyNum > 0)) {
|
|
|
- // return this.$message.error("占用箱量必须大于0!");
|
|
|
- // }
|
|
|
- // }
|
|
|
- if (this.containerNumberItemList.filter(item => item.occupyNum > 0).length == 0) {
|
|
|
- return this.$message.error("至少有一条占用箱量大于0!");
|
|
|
- }
|
|
|
- selectedContainerNumber(this.containerNumberItemList).then(res => {
|
|
|
- this.$message.success("操作成功!");
|
|
|
- this.dialogVisible = false;
|
|
|
- this.$emit("billsDetailfun");
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ if (this.boxForm.containerNumberStatus == "录入") {
|
|
|
+ if (this.containerNumberItemList.filter(item => item.occupyNum > 0).length == 0) {
|
|
|
+ return this.$message.error("至少有一条占用箱量大于0!");
|
|
|
+ }
|
|
|
+ let occupyNumSum = 0;
|
|
|
+ for (let item of this.containerNumberItemList) {
|
|
|
+ occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
|
|
|
+ }
|
|
|
+ if (occupyNumSum != this.boxForm.quantity) {
|
|
|
+ return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
|
|
|
+ }
|
|
|
+ selectedContainerNumber(this.containerNumberItemList).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$emit("billsDetailfun");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.boxForm.containerNumberStatus == "已选择") {
|
|
|
+ if (this.containerNumberItemList.filter(item => item.occupyNum > 0).length == 0) {
|
|
|
+ return this.$message.error("至少有一条占用箱量大于0!");
|
|
|
+ }
|
|
|
+ let occupyNumSum = 0;
|
|
|
+ for (let item of this.containerNumberItemList) {
|
|
|
+ occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
|
|
|
+ }
|
|
|
+ if (occupyNumSum != this.boxForm.quantity) {
|
|
|
+ return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
|
|
|
+ }
|
|
|
+ let obj = {
|
|
|
+ ...this.boxForm,
|
|
|
+ containerNumberItemList: this.containerNumberItemList
|
|
|
+ };
|
|
|
+ actualOccupyNumUpdate(obj).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$emit("billsDetailfun");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
pick(row) {
|
|
|
+ this.boxForm = {};
|
|
|
this.containerNumberItemList = [];
|
|
|
if (!this.assemblyForm.polId) {
|
|
|
return this.$message.error("请选择装货港");
|
|
|
@@ -615,6 +760,7 @@ export default {
|
|
|
airlineId: this.assemblyForm.airlineId,
|
|
|
etd: this.assemblyForm.etd + " 00:00:00"
|
|
|
};
|
|
|
+ this.boxForm = row;
|
|
|
getItemListHY(obj).then(res => {
|
|
|
if (res.data.data) {
|
|
|
res.data.data.forEach(item => {
|
|
|
@@ -637,9 +783,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rowView(row) {
|
|
|
+ this.boxForm = {};
|
|
|
this.containerNumberItemList = [];
|
|
|
- this.editStatus = false;
|
|
|
+ this.editStatus = true;
|
|
|
this.dialogVisible = true;
|
|
|
+ this.boxForm = row;
|
|
|
this.containerNumberItemList = this.assemblyForm.containerNumberItemList.filter(item => row.cntrTypeCode == item.boxType && item.occupyNum > 0);
|
|
|
},
|
|
|
handleClose() {
|
|
|
@@ -647,15 +795,6 @@ export default {
|
|
|
this.editStatus = false;
|
|
|
},
|
|
|
onclickEdit() {
|
|
|
- // for (let item of this.assemblyForm.preContainersList) {
|
|
|
- // if(item.containerNumberStatus == '已选择'){
|
|
|
- // return this.$message.error('请撤销放箱号,再进行编辑!')
|
|
|
- // }else{
|
|
|
- // this.$delete(item, '$cellEdit')
|
|
|
- // this.$set(item, '$cellEdit', true)
|
|
|
- // }
|
|
|
- // }
|
|
|
- console.log();
|
|
|
if (this.assemblyForm.containersList.length > 0) {
|
|
|
this.$alert("当前数据已经均分箱量,请撤销之后再修改", "提示", {
|
|
|
confirmButtonText: "确定"
|
|
|
@@ -666,6 +805,10 @@ export default {
|
|
|
this.$set(item, "$cellEdit", true);
|
|
|
}
|
|
|
}
|
|
|
+ // for (let item of this.assemblyForm.preContainersList) {
|
|
|
+ // this.$delete(item, "$cellEdit");
|
|
|
+ // this.$set(item, "$cellEdit", true);
|
|
|
+ // }
|
|
|
},
|
|
|
// 件数失焦事件
|
|
|
numberBlur(row) {
|
|
|
@@ -679,6 +822,30 @@ export default {
|
|
|
this.assemblyForm.quantity = quantityNum;
|
|
|
}
|
|
|
},
|
|
|
+ // quantityChange(row) {
|
|
|
+ // if (row.id && row.containerNumberStatus == "已选择" && this.assemblyForm.billType != "MM") {
|
|
|
+ // // this.dialogVisible = true;
|
|
|
+ // this.$confirm("是否保存当前修改的箱量?", "提示", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning"
|
|
|
+ // }).then(() => {
|
|
|
+ // precontainersSubmitList(this.assemblyForm.preContainersList).then(res => {
|
|
|
+ // this.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "操作成功!"
|
|
|
+ // });
|
|
|
+ // this.$emit("billsDetailfun");
|
|
|
+ // this.containerNumberItemList = [];
|
|
|
+ // this.editStatus = true;
|
|
|
+ // this.dialogVisible = true;
|
|
|
+ // this.containerNumberItemList = this.assemblyForm.containerNumberItemList.filter(
|
|
|
+ // item => row.cntrTypeCode == item.boxType && item.occupyNum > 0
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // },
|
|
|
// 毛重失焦事件
|
|
|
grossWeightBlur(row) {
|
|
|
let grossWeightNum = 0;
|
|
|
@@ -1156,6 +1323,9 @@ export default {
|
|
|
* 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
*/
|
|
|
const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
+ if (this.isOccupyNum == true) {
|
|
|
+ this.containerOption.menu = true;
|
|
|
+ }
|
|
|
if (inSave) {
|
|
|
this.$message.success("保存成功");
|
|
|
//关闭窗口
|
|
|
@@ -1166,6 +1336,9 @@ export default {
|
|
|
async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
this[option] = this[optionBack];
|
|
|
const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (this.isOccupyNum == true) {
|
|
|
+ this.containerOption.menu = true;
|
|
|
+ }
|
|
|
if (inSave) {
|
|
|
this.$message.success("重置成功");
|
|
|
this.$refs[ref].$refs.dialogColumn.columnBox = false;
|