|
|
@ -644,9 +644,36 @@ export default {
|
|
|
|
maxCount: 3
|
|
|
|
maxCount: 3
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}, 2000)
|
|
|
|
}, 2000)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
const arrayNum = changeValue.split('.')
|
|
|
|
|
|
|
|
if (!/\./.test(changeValue)) {
|
|
|
|
|
|
|
|
row[column.field] = changeValue + '.00'
|
|
|
|
|
|
|
|
} else if (arrayNum[1].length < 2) {
|
|
|
|
|
|
|
|
row[column.field] = changeValue + '0'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (column.field === 'pkgs') {
|
|
|
|
if (column.field === 'pkgs') {
|
|
|
|
|
|
|
|
if (!(/(^[1-9]\d*$)/.test(changeValue))) {
|
|
|
|
|
|
|
|
console.log('== 非正整数 ==')
|
|
|
|
|
|
|
|
const height = document.body.clientHeight - 100
|
|
|
|
|
|
|
|
this.$message.config({
|
|
|
|
|
|
|
|
top: `${height}px`,
|
|
|
|
|
|
|
|
duration: 2,
|
|
|
|
|
|
|
|
maxCount: 3
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$message.error('件数请输入整数')
|
|
|
|
|
|
|
|
const cNum = changeValue.indexOf('.')
|
|
|
|
|
|
|
|
row[column.field] = changeValue.substr(0, cNum)
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
this.$message.destroy()
|
|
|
|
|
|
|
|
this.$message.config({
|
|
|
|
|
|
|
|
top: `100px`,
|
|
|
|
|
|
|
|
duration: 2,
|
|
|
|
|
|
|
|
maxCount: 3
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}, 2000)
|
|
|
|
|
|
|
|
}
|
|
|
|
let num = 0
|
|
|
|
let num = 0
|
|
|
|
this.tableData.map((item, index) => {
|
|
|
|
this.tableData.map((item, index) => {
|
|
|
|
num += Number(item.pkgs)
|
|
|
|
num += Number(item.pkgs)
|
|
|
@ -658,14 +685,30 @@ export default {
|
|
|
|
this.tableData.map((item, index) => {
|
|
|
|
this.tableData.map((item, index) => {
|
|
|
|
num += Number(item.kgs)
|
|
|
|
num += Number(item.kgs)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.totalKgs = num
|
|
|
|
num += ''
|
|
|
|
|
|
|
|
const pNum = num.split('.')
|
|
|
|
|
|
|
|
if (!/\./.test(num)) {
|
|
|
|
|
|
|
|
this.totalKgs = num + '.00'
|
|
|
|
|
|
|
|
} else if (pNum[1].length < 2) {
|
|
|
|
|
|
|
|
this.totalKgs = num + '0'
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.totalKgs = num
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (column.field === 'cbm') {
|
|
|
|
if (column.field === 'cbm') {
|
|
|
|
let num = 0
|
|
|
|
let num = 0
|
|
|
|
this.tableData.map((item, index) => {
|
|
|
|
this.tableData.map((item, index) => {
|
|
|
|
num += Number(item.cbm)
|
|
|
|
num += Number(item.cbm)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.totalCbm = num
|
|
|
|
num += ''
|
|
|
|
|
|
|
|
const pNum = num.split('.')
|
|
|
|
|
|
|
|
if (!/\./.test(num)) {
|
|
|
|
|
|
|
|
this.totalCbm = num + '.00'
|
|
|
|
|
|
|
|
} else if (pNum[1].length < 2) {
|
|
|
|
|
|
|
|
this.totalCbm = num + '0'
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.totalCbm = num
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (column.field === 'kgs' || column.field === 'tareweight') {
|
|
|
|
if (column.field === 'kgs' || column.field === 'tareweight') {
|
|
|
|
// let nowIndex = 0
|
|
|
|
// let nowIndex = 0
|
|
|
@ -682,6 +725,13 @@ export default {
|
|
|
|
const kgsCount = kgsVal.length - kgsIndex
|
|
|
|
const kgsCount = kgsVal.length - kgsIndex
|
|
|
|
if (kgsCount > 4) {
|
|
|
|
if (kgsCount > 4) {
|
|
|
|
row['weighkgs'] = kgsVal.substr(0, kgsIndex + 4)
|
|
|
|
row['weighkgs'] = kgsVal.substr(0, kgsIndex + 4)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
const arrayNum = kgsVal.split('.')
|
|
|
|
|
|
|
|
if (!/\./.test(kgsVal)) {
|
|
|
|
|
|
|
|
row['weighkgs'] = kgsVal + '.00'
|
|
|
|
|
|
|
|
} else if (arrayNum[1].length < 2) {
|
|
|
|
|
|
|
|
row['weighkgs'] = kgsVal + '0'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -1033,7 +1083,7 @@ export default {
|
|
|
|
cntrno: '',
|
|
|
|
cntrno: '',
|
|
|
|
sealno: '',
|
|
|
|
sealno: '',
|
|
|
|
pkgs: '',
|
|
|
|
pkgs: '',
|
|
|
|
kindpkgs: '',
|
|
|
|
kindpkgs: this.tableData.length > 0 ? this.tableData[0].kindpkgs : '',
|
|
|
|
kgs: '',
|
|
|
|
kgs: '',
|
|
|
|
cbm: '',
|
|
|
|
cbm: '',
|
|
|
|
tareweight: '',
|
|
|
|
tareweight: '',
|
|
|
|