| | |
| | | }, |
| | | |
| | | { |
| | | 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, |
| | | formatter({ cellValue, row, column }) { |
| | | |
| | | /* Function({cellValue, row, column}){ |
| | | console.log(cellValue) |
| | | console.log(row) |
| | | console.log(column) |
| | | if (cellValue != null) { |
| | | let conversionRatio = row.conversionRatio |
| | | |
| | | console.log(conversionRatio) |
| | | row.auxiliaryQuantity = Math.abs(cellValue * conversionRatio) |
| | | |
| | | } |
| | | console.log(cellValue) |
| | | return cellValue |
| | | |
| | | }, |
| | | }, */ |
| | | validateRules: [ |
| | | { |
| | | required: true, |
| | |
| | | ] |
| | | }, |
| | | |
| | | { |
| | | /* { |
| | | title: '辅数量', |
| | | key: 'auxiliaryQuantity', |
| | | type: JVXETypes.normal, |
| | |
| | | align:'center', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: 0 |
| | | }, |
| | | }, */ |
| | | { |
| | | title: '备件id', |
| | | key: 'sparePartId', |
| | |
| | | auxiliaryUnitId: data[i].auxiliaryUnitId, |
| | | mainUnitIdName: data[i].mainUnitId_dictText, |
| | | auxiliaryUnitIdName: data[i].auxiliaryUnitId_dictText, |
| | | mainQuantity: data[i].mainQuantity, |
| | | auxiliaryQuantity: data[i].auxiliaryQuantity, |
| | | requirementTime: data[i].requirementTime, |
| | | conversionRatio: data[i].conversionRatio |
| | | |
| | |
| | | this.visible = false |
| | | this.$emit('close') |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | }, |
| | | /* 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> |