szh_zidingyibiaoti
lilu 2 years ago
parent ebc6699e2f
commit 7b14e2407a

@ -921,7 +921,7 @@ export default {
if (res.data.ctnInputs.length > 0) {
res.data.ctnInputs.map((item, index) => {
if (item.weightype === '累加') {
item.weighkgs = this.calc(Number(item['kgs']), Number(item['tareweight']), '+')
item.weighkgs = item.weighkgs ? item.weighkgs : this.calc(Number(item['kgs']), Number(item['tareweight']), '+')
}
})
}

@ -620,6 +620,7 @@ export default {
tableData: [],
editOption: {
beforeCellValueChange: ({ row, column, changeValue }) => {
if (this.inTableLoad) { return false }
console.log('=== table表格编辑 - beforeCellValueChange ===')
if (
['pkgs', 'kgs', 'cbm', 'tareweight'].includes(column.field) &&
@ -666,6 +667,7 @@ export default {
},
afterCellValueChange: ({ row, column, changeValue }) => {
console.log('=== table表格编辑 - afterCellValueChange ===')
if (this.inTableLoad) { return false }
if (['kgs', 'cbm', 'tareweight', 'weighkgs'].includes(column.field)) {
changeValue = changeValue + ''
const valIndex = changeValue.includes('.') ? changeValue.indexOf('.') + 1 : false
@ -767,6 +769,7 @@ export default {
}
}
if (column.field === 'kgs' || column.field === 'tareweight') {
console.log('======= 这里开始改变称重重量 =========')
// let nowIndex = 0
// this.tableData.map((item, index) => {
// if (item.rowKey === row.rowKey) {
@ -1135,7 +1138,7 @@ export default {
this.$refs['tableRef'].setCellSelection({ rowKey, colKey });
},
init() {
console.log('== 箱信息 - init ==')
console.log('== 箱信息 - init ==', this.details.ctnInputs)
this.inTableLoad = true
if (Object.keys(this.details).length > 0) {
const arr = []

Loading…
Cancel
Save