| | |
| | | :dataSource='sparesScrapRequirementDetailTable.dataSource' |
| | | :maxHeight='300' |
| | | :disabled='formDisabled' |
| | | @valueChange="changeAuxiliaryQuantity" |
| | | :alwaysEdit='true' |
| | | :rowNumber='true' |
| | | :bordered='bordered' |
| | |
| | | }, |
| | | |
| | | { |
| | | title: '主单位', |
| | | title: '单位', |
| | | key: 'mainUnitIdName', |
| | | type: JVXETypes.normal, |
| | | align:'center', |
| | |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '主单位', |
| | | title: '单位', |
| | | key: 'mainUnitId', |
| | | type: JVXETypes.hidden, |
| | | align:'center', |
| | |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | /* { |
| | | title: '辅单位', |
| | | key: 'auxiliaryUnitIdName', |
| | | align:'center', |
| | |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | }, */ |
| | | { |
| | | title: '主数量', |
| | | key: 'mainQuantity', |
| | |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: 0, |
| | | Function({cellValue, row, column}){ |
| | | /* Function({cellValue, row, column}){ |
| | | console.log(cellValue) |
| | | console.log(row) |
| | | console.log(column) |
| | |
| | | } |
| | | console.log(cellValue) |
| | | return cellValue |
| | | }, |
| | | }, */ |
| | | validateRules: [ |
| | | { |
| | | required: true, |
| | |
| | | ] |
| | | }, |
| | | |
| | | { |
| | | /* { |
| | | title: '辅数量', |
| | | key: 'auxiliaryQuantity', |
| | | type: JVXETypes.normal, |
| | |
| | | align:'center', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: 0 |
| | | }, |
| | | }, */ |
| | | { |
| | | title: '备件id', |
| | | key: 'sparePartId', |
| | |
| | | this.$emit('close') |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | changeAuxiliaryQuantity(target){ |
| | | /* changeAuxiliaryQuantity(target){ |
| | | console.log(target.columnIndex) |
| | | let num=target.columnIndex |
| | | if (target.columnIndex ===num){ |
| | | target.row.auxiliaryQuantity=Math.abs(target.row.conversionRatio*target.row.mainQuantity) |
| | | } |
| | | } |
| | | } */ |
| | | } |
| | | } |
| | | </script> |