diff --git a/src/views/main/BookingLedger/detail/modules/goodsTable.vue b/src/views/main/BookingLedger/detail/modules/goodsTable.vue index 7492adc..a5bba06 100644 --- a/src/views/main/BookingLedger/detail/modules/goodsTable.vue +++ b/src/views/main/BookingLedger/detail/modules/goodsTable.vue @@ -472,30 +472,30 @@ export default { ) } }, - // { - // field: 'weighdate', - // key: 'weighdate', - // title: '称重日期', - // align: 'left', - // width: 120, - // edit: false, - // renderBodyCell: ({ row, column, rowIndex }, h) => { - // return ( - // { - // console.log('== 选择日期 ==', dateString) - // this.tableData[rowIndex].weighdate = dateString - // row['weighdate'] = dateString - // }} /> - // ) - // }, - // renderHeaderCell: ({ column }, h) => { - // return ( - // - // {this.rules.weightype.required ? * : ''} {column.title} - // - // ) - // } - // }, + { + field: 'weighdate', + key: 'weighdate', + title: '称重日期', + align: 'left', + width: 120, + edit: false, + renderBodyCell: ({ row, column, rowIndex }, h) => { + return ( + { + console.log('== 选择日期 ==', dateString) + this.tableData[rowIndex].weighdate = dateString + row['weighdate'] = dateString + }} /> + ) + }, + renderHeaderCell: ({ column }, h) => { + return ( + + {this.rules.weightype.required ? * : ''} {column.title} + + ) + } + }, ], modelColumns: [ { @@ -1017,7 +1017,7 @@ export default { watch: { details: { handler(nval, oval) { - console.log('=== 修改table内容 ===', nval.ctnInputs, this.pType, this.inTableLoad) + // console.log('=== 修改table内容 ===', nval.ctnInputs, this.pType, this.inTableLoad) if (!this.inSave && !this.inTableLoad) { this.$emit('changeDetail', { detail: nval, @@ -1216,6 +1216,7 @@ export default { this.tableData = arr this.tableLoaded = true this.totalCtnall = '' + console.log('== 箱信息 ==', this.tableData) } else { this.tableData = [] this.tableLoaded = true @@ -1262,6 +1263,7 @@ export default { tareweight: '', weightype: '累加', weighkgs: '', + weighdate: '', rowKey: this.tableData.length > 0 ? Number(this.tableData[this.tableData.length - 1].rowKey) + 1 : 0 } this.tableData.push(data) @@ -1479,7 +1481,8 @@ export default { cbm: item.CBM, tareweight: item.TAREWEIGHT, weightype: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weightype, - weighkgs: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weighkgs + weighkgs: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weighkgs, + weighdate: item.WEIGHDATE } } else { const _data = { @@ -1494,7 +1497,8 @@ export default { cbm: item.CBM, tareweight: item.TAREWEIGHT, weightype: '', - weighkgs: '' + weighkgs: '', + weighdate: item.WEIGHDATE } addTable.push(_data) } @@ -1634,7 +1638,8 @@ export default { cbm: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].cbm, tareweight: item.TAREWEIGHT, weightype: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weightype, - weighkgs: setWeighkgs + weighkgs: setWeighkgs, + weighdate: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weighdate } } else { const _data = { @@ -1649,7 +1654,8 @@ export default { cbm: '', tareweight: item.TAREWEIGHT, weightype: '', - weighkgs: '' + weighkgs: '', + weighdate: '' } addTable.push(_data) }