| | |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> |
| | | <div :key="col.dataIndex"> |
| | | |
| | | <a-input-number |
| | | v-if="col.dataIndex === 'ratedLife'" |
| | | :disabled="record.outboundQuantity > 1" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | :min="1" |
| | | /> |
| | | <a-input-number |
| | | v-if="col.dataIndex === 'useLife'" |
| | | :disabled="record.outboundQuantity > 1" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | :min="1" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleOutbound(record)">出库</a> |
| | | </span> |
| | |
| | | align:"left", |
| | | dataIndex: 'outboundQuantity' |
| | | }, |
| | | { |
| | | title:'额定寿命', |
| | | align:"center", |
| | | dataIndex: 'ratedLife', |
| | | scopedSlots: { customRender: 'ratedLife' }, |
| | | }, |
| | | { |
| | | title:'使用寿命', |
| | | align:"center", |
| | | dataIndex: 'useLife', |
| | | scopedSlots: { customRender: 'useLife' }, |
| | | }, |
| | | // { |
| | | // title:'已出库数量', |
| | | // align:"left", |
| | |
| | | ], |
| | | url: { |
| | | list: "/tms/outboundOrder/listOutboundDetailByMainId", |
| | | outbound: "/tms/outboundOrder/outBound", |
| | | outbound: "/tms/outboundOrder/outBoundByApply", |
| | | delete: "/tms/outboundOrder/deleteOutboundDetail", |
| | | deleteBatch: "/tms/outboundOrder/deleteBatchOutboundDetail", |
| | | exportXlsUrl: "/tms/outboundOrder/exportOutboundDetail", |
| | |
| | | { |
| | | outBoundOrderId: this.mainId, |
| | | outboundDetailId: record.id, |
| | | outboundQuantity: record.outboundQuantity |
| | | outboundQuantity: record.outboundQuantity, |
| | | ratedLife:record.ratedLife, |
| | | useLife:record.useLife |
| | | } |
| | | ] |
| | | postAction(this.url.outbound, params).then(res=>{ |
| | |
| | | this.$message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | console.log(value, key, column, index) |
| | | const temp = [...this.dataSource] |
| | | const target = temp.filter(item => key === item.key)[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |