|
@@ -66,8 +66,8 @@
|
|
|
|
|
|
<script>
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
-import { addSbModelBomBatch, selectSpareInfoListByModelId, deleteSbModelBoms, exportSbModelBom } from '@/api/sb/modelbom'
|
|
|
-import SparePartInfoSelectModal from '@/views/sqarepartmanage/sparepartinfo/modules/SparePartInfoSelectModal'
|
|
|
+import { addSbModelBomBatch, selectSpareInfoListByModelId, deleteSbModelBoms, exportSbModelBom, getSpareStore } from '@/api/sb/modelbom'
|
|
|
+import SparePartInfoSelectModal from '@/views/sqarepartmanage/sparepartinfo/modules/SparePartInfoSelectModal.vue'
|
|
|
import BaseForm from './BaseForm'
|
|
|
import ImportFormAdd from './ImportFormAdd'
|
|
|
import SpareBaseForm from '@/views/sqarepartmanage/sparepartinfo/modules/BaseForm'
|
|
@@ -135,10 +135,7 @@ export default {
|
|
|
return text + this.BaseTool.Table.getMapText(this.periodTypeMap, record.periodType)
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- title: '数量',
|
|
|
- dataIndex: 'num'
|
|
|
- },
|
|
|
+
|
|
|
{
|
|
|
title: '更换日期',
|
|
|
dataIndex: 'checkDate'
|
|
@@ -151,6 +148,10 @@ export default {
|
|
|
title: '助记码',
|
|
|
dataIndex: 'zjm'
|
|
|
}, */
|
|
|
+ {
|
|
|
+ title: '数量',
|
|
|
+ dataIndex: 'num'
|
|
|
+ },
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
@@ -180,7 +181,19 @@ export default {
|
|
|
this.model = record
|
|
|
this.modalTitle = '详情'
|
|
|
selectSpareInfoListByModelId({ id: record.id }).then(res => {
|
|
|
+ getSpareStore({
|
|
|
+ spareVOS: res.data.map(item => {
|
|
|
+ return {
|
|
|
+ oldOrNew: item.oldOrNew,
|
|
|
+ cInvCode: item.no
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ sbId: record.id
|
|
|
+ }).then(response => {
|
|
|
+ console.log(response)
|
|
|
+ })
|
|
|
this.data = res.data
|
|
|
+ console.log(this.data)
|
|
|
})
|
|
|
},
|
|
|
handleOk () {
|
|
@@ -198,6 +211,12 @@ export default {
|
|
|
},
|
|
|
handleSpareSelected (record, keys, rows) {
|
|
|
const addData = []
|
|
|
+ console.log(record, keys, rows)
|
|
|
+ // getSpareStore({
|
|
|
+ // spareVOS:{
|
|
|
+ // oldOrNew:
|
|
|
+ // }
|
|
|
+ // })
|
|
|
for (let i = 0; i < rows.length; i++) {
|
|
|
addData.push({ sbId: this.model.id, modelId: this.model.id, spareId: rows[i].id, spareName: rows[i].name, num: 1, period: 500, periodType: 6 })
|
|
|
}
|