|
|
@@ -4,7 +4,7 @@
|
|
|
<BOMSearch @search="reload" :statusOpt="statusOpt" />
|
|
|
<ele-pro-table ref="table" :columns="columns" :datasource="datasource" class="dict-table"
|
|
|
tool-class="ele-toolbar-actions">
|
|
|
-
|
|
|
+
|
|
|
<template v-slot:toolbar>
|
|
|
<div class="toolbar_box">
|
|
|
<div v-if="attributeData.status != 1">
|
|
|
@@ -56,7 +56,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div v-else v-if="row.resourceBomVersion">
|
|
|
- {{'V' + row.resourceBomVersion + '.0' }}
|
|
|
+ {{ 'V' + row.resourceBomVersion + '.0' }}
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
@@ -479,22 +479,22 @@ export default {
|
|
|
if (element.categoryId == item2.id) {
|
|
|
item2.resourceBomVersionList.push(element);
|
|
|
}
|
|
|
-
|
|
|
- item2.resourceBomVersion = item2.resourceBomVersionList[0].versions;
|
|
|
- item2.resourceBomId = item2.resourceBomVersionList[0].resourceBomId;
|
|
|
+
|
|
|
+ item2.resourceBomVersion = item2.resourceBomVersionList[0].versions;
|
|
|
+ item2.resourceBomId = item2.resourceBomVersionList[0].resourceBomId;
|
|
|
|
|
|
setTimeout(() => {
|
|
|
item2.id = "";
|
|
|
}, 100);
|
|
|
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
- data.map(v=>{
|
|
|
+ data.map(v => {
|
|
|
v.id = "";
|
|
|
})
|
|
|
console.log(data, '++++++++++++++');
|
|
|
@@ -561,17 +561,21 @@ export default {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- // deleteBomTreeList([row.id]).then((msg) => {
|
|
|
- // this.$message.success('删除' + msg);
|
|
|
- // this.$refs.table.reload({
|
|
|
- // pageNum: 1
|
|
|
- // });
|
|
|
- // });
|
|
|
|
|
|
- let _list = this.$refs.table.getData() ?? [];
|
|
|
+ if (row.id) {
|
|
|
+ deleteBomTreeList([row.id]).then((msg) => {
|
|
|
+ this.$message.success('删除' + msg);
|
|
|
+ this.$refs.table.reload({
|
|
|
+ pageNum: 1
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ let _list = this.$refs.table.getData() ?? [];
|
|
|
+
|
|
|
+ _list = _list.filter((item) => item.id !== row.id);
|
|
|
+ this.$refs.table.setData(_list);
|
|
|
+ }
|
|
|
|
|
|
- _list = _list.filter((item) => item.id !== row.id);
|
|
|
- this.$refs.table.setData(_list);
|
|
|
})
|
|
|
.finally(() => { });
|
|
|
},
|
|
|
@@ -592,10 +596,13 @@ export default {
|
|
|
return this.$message.info('用量不能为空')
|
|
|
}
|
|
|
updateBatchBOM(list).then((res) => {
|
|
|
- this.$message.success('保存成功');
|
|
|
- this.$refs.table.reload({
|
|
|
- pageNum: 1
|
|
|
- });
|
|
|
+ if(res){
|
|
|
+ this.$message.success('保存成功');
|
|
|
+ this.$refs.table.reload({
|
|
|
+ pageNum: 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
}
|