修改引入场站数据

szh_zidingyibiaoti
sunzehua 2 years ago
parent af540093b3
commit c5be53ca47

@ -1545,18 +1545,16 @@ export default {
.then((res) => {
if (res.success) {
const data = JSON.parse(res.data)
console.log(data)
const addTable = []
const cntrnoArr = []
let kindpkgsOld = ''
this.tableData.map((item, index) => {
console.log(item.kindpkgs)
if (!item.cntrno) {
// delete this.tableData[index]
this.tableData.splice(index, 1)
} else {
cntrnoArr.push(item.cntrno)
}
console.log(item.kindpkgs)
if (item.kindpkgs !== '') {
kindpkgsOld = item.kindpkgs
}
@ -1567,6 +1565,7 @@ export default {
this.tableData[cntrnoArr.indexOf(item.CNTRNO)] = {
rowKey: lastNum + index,
ctnall: item.CTNALL,
CtnCode: item.CtnCode,
ctnnum: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].ctnnum,
cntrno: item.CNTRNO,
sealno: item.SEALNO,
@ -1586,6 +1585,7 @@ export default {
ctnnum: '1',
cntrno: item.CNTRNO,
sealno: item.SEALNO,
CtnCode: item.CtnCode,
pkgs: item.PKGS,
kindpkgs: kindpkgsOld || item.KINDPKGS,
kgs: item.KGS,

Loading…
Cancel
Save