|
@@ -158,7 +158,8 @@ export default {
|
|
|
statusMap: {},
|
|
|
sbTypeTreeData: [],
|
|
|
typeMap: {},
|
|
|
- periodTypeMap: {}
|
|
|
+ periodTypeMap: {},
|
|
|
+ oldSpareId:null
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -177,9 +178,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
base (record) {
|
|
|
+ console.log(record)
|
|
|
this.visible = true
|
|
|
+ this.oldSpareId=record.spareId
|
|
|
if (this.BaseTool.Object.isBlank(record.modelId)) {
|
|
|
this.sbId = record.id
|
|
|
+ console.log(this.sbId)
|
|
|
this.modalTitle = '添加'
|
|
|
const { form: { setFieldsValue } } = this
|
|
|
// 日期处理
|
|
@@ -207,7 +211,8 @@ export default {
|
|
|
'spareName',
|
|
|
'period',
|
|
|
'periodType',
|
|
|
- 'num'
|
|
|
+ 'num',
|
|
|
+ 'oldSpareId'
|
|
|
])))
|
|
|
})
|
|
|
},
|
|
@@ -243,6 +248,8 @@ export default {
|
|
|
this.confirmLoading = false
|
|
|
})
|
|
|
} else {
|
|
|
+ values.oldSpareId = this.oldSpareId
|
|
|
+ console.log(values)
|
|
|
updateSbModelBom(values)
|
|
|
.then(() => {
|
|
|
this.handleCancel(values)
|