|
@@ -182,23 +182,22 @@ export default {
|
|
|
this.modalTitle = '详情'
|
|
|
const that = this
|
|
|
selectSpareInfoListByModelId({ id: record.id }).then(res => {
|
|
|
- // getSpareStore({
|
|
|
- // spareVOS: res.data.map(item => {
|
|
|
- // return {
|
|
|
- // oldOrNew: item.oldOrNew,
|
|
|
- // beiJianCode: item.no
|
|
|
- // }
|
|
|
- // }),
|
|
|
- // sbId: record.id
|
|
|
- // }).then(response => {
|
|
|
- // console.log(response)
|
|
|
- that.data = res.data
|
|
|
- // .map(item => {
|
|
|
- // item.inventory = response.data.find(spare => spare.no === item.no) ? response.data.find(spare => spare.no === item.no).num : null
|
|
|
- // console.log(item)
|
|
|
- // return item
|
|
|
- // })
|
|
|
- // })
|
|
|
+ getSpareStore({
|
|
|
+ spareVOS: res.data.map(item => {
|
|
|
+ return {
|
|
|
+ oldOrNew: item.oldOrNew,
|
|
|
+ beiJianCode: item.no
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ sbId: record.id
|
|
|
+ }).then(response => {
|
|
|
+ console.log(response)
|
|
|
+ that.data = res.data.map(item => {
|
|
|
+ item.inventory = response.data.find(spare => spare.no === item.no) ? response.data.find(spare => spare.no === item.no).num : null
|
|
|
+ console.log(item)
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
handleOk () {
|