|
@@ -170,7 +170,7 @@
|
|
|
v-model.number="scope.row.fQty"
|
|
|
style="width: 100%"
|
|
|
placeholder="件数"
|
|
|
- @change="dateSelected(scope,'fQty')"
|
|
|
+ @input="importComputer(scope.row)"
|
|
|
/>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fGrossweight'">
|
|
@@ -179,7 +179,6 @@
|
|
|
v-input-limit="2"
|
|
|
style="width: 100%"
|
|
|
placeholder="毛重"
|
|
|
- @change="dateSelected(scope,'fGrossweight')"
|
|
|
/>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fNetweight'">
|
|
@@ -188,7 +187,6 @@
|
|
|
v-input-limit="2"
|
|
|
style="width: 100%"
|
|
|
placeholder="净重"
|
|
|
- @change="dateSelected(scope,'fNetweight')"
|
|
|
/>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fPackagespecs'">
|
|
@@ -470,55 +468,55 @@ export default {
|
|
|
//CARGO_QUANTITY 件数
|
|
|
//TOTAL_GROSS_WEIGHT 重量
|
|
|
//BILL_OF_LADING_NO 提单号
|
|
|
- if (res.data.data[1].data.length == 0) {
|
|
|
- // XH 箱号
|
|
|
- // QFH1 铅封号
|
|
|
- //TDH 提单号
|
|
|
- res.data.data[0].data.map(e => {
|
|
|
- e.fMblno = e.TDH;
|
|
|
- e.fSealno = e.QFH1;
|
|
|
- e.fCntrno = e.XH;
|
|
|
- })
|
|
|
- // if (res.data.data[0].data.length == 1) {
|
|
|
- // res.data.data[0].data.map(e => {
|
|
|
- // e.fGrossweight = e.MZ;
|
|
|
- // e.fNetweight = e.MZ;
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // res.data.data[0].data.map(e => {
|
|
|
- // e.fGrossweight = '';
|
|
|
- // e.fNetweight = '';
|
|
|
- // })
|
|
|
- // }
|
|
|
- this.dataList = res.data.data[0].data
|
|
|
- } else {
|
|
|
- res.data.data[1].data.map(e => {
|
|
|
- e.fMblno = e.BILL_OF_LADING_NO;
|
|
|
- e.fSealno = e.SEAL_NO;
|
|
|
- // e.fQty = e.CARGO_QUANTITY;
|
|
|
- // e.fGrossweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
- // e.fNetweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
- e.fCntrno = e.CONTAINER_NO;
|
|
|
- })
|
|
|
- if (res.data.data[1].data.length == 1) {
|
|
|
- res.data.data[1].data.map(e => {
|
|
|
- e.fQty = e.CARGO_QUANTITY;
|
|
|
- e.fGrossweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
- e.fNetweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
- })
|
|
|
- } else {
|
|
|
- res.data.data[1].data.map(e => {
|
|
|
- e.fQty = '';
|
|
|
- e.fGrossweight = '';
|
|
|
- e.fNetweight = '';
|
|
|
- })
|
|
|
- }
|
|
|
- this.dataList = res.data.data[1].data
|
|
|
- }
|
|
|
+ // CGMX 车号(出港明细)
|
|
|
+ res.data.data[0].data.map(e => {
|
|
|
+ e.fMblno = e.TDH? e.TDH: null;
|
|
|
+ e.fSealno = e.QFH1? e.QFH1: null;
|
|
|
+ e.fCntrno = e.XH? e.XH: null;
|
|
|
+ e.fTruckno = e.CGMX? e.CGMX: null;
|
|
|
+ })
|
|
|
+ this.dataList = res.data.data[0].data
|
|
|
+ // if (res.data.data[1].data.length == 0) {
|
|
|
+ // // XH 箱号
|
|
|
+ // // QFH1 铅封号
|
|
|
+ // //TDH 提单号
|
|
|
+ // res.data.data[0].data.map(e => {
|
|
|
+ // e.fMblno = e.TDH;
|
|
|
+ // e.fSealno = e.QFH1;
|
|
|
+ // e.fCntrno = e.XH;
|
|
|
+ // })
|
|
|
+ // this.dataList = res.data.data[0].data
|
|
|
+ // } else {
|
|
|
+ // res.data.data[1].data.map(e => {
|
|
|
+ // e.fMblno = e.BILL_OF_LADING_NO;
|
|
|
+ // e.fSealno = e.SEAL_NO;
|
|
|
+ // // e.fQty = e.CARGO_QUANTITY;
|
|
|
+ // // e.fGrossweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
+ // // e.fNetweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
+ // e.fCntrno = e.CONTAINER_NO;
|
|
|
+ // })
|
|
|
+ // if (res.data.data[1].data.length == 1) {
|
|
|
+ // res.data.data[1].data.map(e => {
|
|
|
+ // e.fQty = e.CARGO_QUANTITY;
|
|
|
+ // e.fGrossweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
+ // e.fNetweight = e.TOTAL_GROSS_WEIGHT;
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // res.data.data[1].data.map(e => {
|
|
|
+ // e.fQty = '';
|
|
|
+ // e.fGrossweight = '';
|
|
|
+ // e.fNetweight = '';
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // this.dataList = res.data.data[1].data
|
|
|
+ // }
|
|
|
if (this.dataList.length > 0) {
|
|
|
this.dataList.map(e => {
|
|
|
this.$set(e, 'fBsdate', this.form.fBsdate);
|
|
|
this.$set(e, 'fGoodsid', this.form.fGoodsid);
|
|
|
+ this.$set(e, 'fPlanqty', this.form.fPlanqty);
|
|
|
+ this.$set(e, 'fPlangrossweight', this.form.fPlangrossweight);
|
|
|
+ this.$set(e, 'fPlannetweight', this.form.fPlannetweight);
|
|
|
this.$set(e, 'fBillstatus', 10)
|
|
|
})
|
|
|
}
|
|
@@ -607,40 +605,43 @@ export default {
|
|
|
if (this.dataList.length == 0) {
|
|
|
return this.$message.error('表格未有数据,请关闭')
|
|
|
}
|
|
|
- for (let item in this.dataList) {
|
|
|
- if (this.dataList[item].fBsdate == null) {
|
|
|
+ if (this.selection.length == 0) {
|
|
|
+ return this.$message.error('请选择导入的数据')
|
|
|
+ }
|
|
|
+ for (let item in this.selection) {
|
|
|
+ if (this.selection[item].fBsdate == null) {
|
|
|
return this.$message.error(
|
|
|
- "请选择第" + (Number(item) + 1) + "行的入库日期"
|
|
|
+ "请选择选中的第" + (Number(item) + 1) + "行的入库日期"
|
|
|
);
|
|
|
}
|
|
|
- if (this.dataList[item].fGoodsid == null) {
|
|
|
+ if (this.selection[item].fGoodsid == null) {
|
|
|
return this.$message.error(
|
|
|
- "请选择第" + (Number(item) + 1) + "行的品名"
|
|
|
+ "请选择选中的第" + (Number(item) + 1) + "行的品名"
|
|
|
);
|
|
|
}
|
|
|
- if (this.dataList[item].fBusinessType == null) {
|
|
|
+ if (this.selection[item].fBusinessType == null) {
|
|
|
return this.$message.error(
|
|
|
- "请选择第" + (Number(item) + 1) + "行的货物属性"
|
|
|
+ "请选择选中的第" + (Number(item) + 1) + "行的货物属性"
|
|
|
);
|
|
|
}
|
|
|
- if (this.dataList[item].fMarks == null) {
|
|
|
+ if (this.selection[item].fMarks == null) {
|
|
|
return this.$message.error(
|
|
|
- "请输入第" + (Number(item) + 1) + "行的属性详情"
|
|
|
+ "请输入选中的第" + (Number(item) + 1) + "行的属性详情"
|
|
|
);
|
|
|
}
|
|
|
- if (this.dataList[item].fQty == null) {
|
|
|
+ if (this.selection[item].fQty == null) {
|
|
|
return this.$message.error(
|
|
|
- "请输入第" + (Number(item) + 1) + "行的件数"
|
|
|
+ "请输入选中的第" + (Number(item) + 1) + "行的件数"
|
|
|
);
|
|
|
}
|
|
|
- if (this.dataList[item].fGrossweight == null) {
|
|
|
+ if (this.selection[item].fGrossweight == null) {
|
|
|
return this.$message.error(
|
|
|
- "请输入第" + (Number(item) + 1) + "行的毛重"
|
|
|
+ "请输入选中的第" + (Number(item) + 1) + "行的毛重"
|
|
|
);
|
|
|
}
|
|
|
- if (this.dataList[item].fNetweight == null) {
|
|
|
+ if (this.selection[item].fNetweight == null) {
|
|
|
return this.$message.error(
|
|
|
- "请输入第" + (Number(item) + 1) + "行的净重"
|
|
|
+ "请输入选中的第" + (Number(item) + 1) + "行的净重"
|
|
|
);
|
|
|
}
|
|
|
}
|
|
@@ -656,7 +657,7 @@ export default {
|
|
|
if (res.data.code == 500) {
|
|
|
return this.$message.error(res.data.msg)
|
|
|
}
|
|
|
- this.$emit('addDetailList', this.dataList)
|
|
|
+ this.$emit('addDetailList', this.selection)
|
|
|
this.buttonLoading = false;
|
|
|
this.visible = false;
|
|
|
}).finally(() => {
|
|
@@ -666,6 +667,20 @@ export default {
|
|
|
deleteRow(index) {
|
|
|
this.dataList.splice(index, 1)
|
|
|
},
|
|
|
+ importComputer(row) {
|
|
|
+ this.playcomputer(row);
|
|
|
+ },
|
|
|
+ playcomputer(row) {
|
|
|
+ let Num1 = Number(this.form.fPlannetweight) / Number(this.form.fPlanqty);
|
|
|
+ let Num2 =
|
|
|
+ Number(this.form.fPlangrossweight) / Number(this.form.fPlanqty);
|
|
|
+ row.fNetweight = Number(
|
|
|
+ (row.fQty * Num1).toFixed(4)
|
|
|
+ );
|
|
|
+ row.fGrossweight = Number(
|
|
|
+ (row.fQty * Num2).toFixed(4)
|
|
|
+ );
|
|
|
+ },
|
|
|
|
|
|
//列设置全选
|
|
|
allChecked() {
|