szh_zidingyibiaoti
lilu 2 years ago
parent ebc6699e2f
commit 7b14e2407a

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

Loading…
Cancel
Save