|
|
@@ -51,10 +51,10 @@
|
|
|
<template v-slot:componentAttribute="{ row }">
|
|
|
<div>
|
|
|
<el-select v-model="row.componentAttribute" filterable multiple disabled class="ele-block" size="mini">
|
|
|
- <el-option v-for="item in sxtList" :key="item.value" :value="item.value" :label="item.label"></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-option v-for="item in sxtList" :key="item.value" :value="item.value" :label="item.label"></el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:resourceBomVersion="{ row }">
|
|
|
@@ -105,9 +105,9 @@
|
|
|
</template>
|
|
|
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-slot:action="{ row }">
|
|
|
+ <template v-slot:action="{ row,$index }">
|
|
|
<el-link v-if="attributeData.status != 1" type="danger" :underline="false" icon="el-icon-delete"
|
|
|
- @click="handleDel(row)">
|
|
|
+ @click="handleDel(row,$index)">
|
|
|
删除
|
|
|
</el-link>
|
|
|
</template>
|
|
|
@@ -292,15 +292,15 @@ export default {
|
|
|
},
|
|
|
|
|
|
dictList: [
|
|
|
- {
|
|
|
- label: '加工',
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: '装配',
|
|
|
- value: 3
|
|
|
- },
|
|
|
- ],
|
|
|
+ {
|
|
|
+ label: '加工',
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '装配',
|
|
|
+ value: 3
|
|
|
+ },
|
|
|
+ ],
|
|
|
|
|
|
|
|
|
attributeList: [
|
|
|
@@ -612,6 +612,7 @@ export default {
|
|
|
|
|
|
// 勾选
|
|
|
async chooseStandardList(data) {
|
|
|
+
|
|
|
const that = this;
|
|
|
const arrays = []
|
|
|
data.map((m) => {
|
|
|
@@ -619,6 +620,7 @@ export default {
|
|
|
m.createTime = '';
|
|
|
m.bomType = this.attributeData.bomType;
|
|
|
m.level = Number(this.attributeData.level) + 1;
|
|
|
+
|
|
|
m.versions = this.attributeData.versions;
|
|
|
m.categoryId = m.id;
|
|
|
// m.dosage = 1;
|
|
|
@@ -629,8 +631,6 @@ export default {
|
|
|
|
|
|
});
|
|
|
|
|
|
-
|
|
|
-
|
|
|
this.getResourceBomVersionListFn(arrays).then(v => {
|
|
|
if (v.length) {
|
|
|
v.map(element => {
|
|
|
@@ -638,9 +638,10 @@ export default {
|
|
|
if (element.categoryId == item2.id) {
|
|
|
item2.resourceBomVersionList.push(element);
|
|
|
}
|
|
|
-
|
|
|
- item2.resourceBomVersion = item2.resourceBomVersionList[0].versions;
|
|
|
- item2.resourceBomId = item2.resourceBomVersionList[0].resourceBomId;
|
|
|
+ if (item2.resourceBomVersionList.length) {
|
|
|
+ item2.resourceBomVersion = item2.resourceBomVersionList[0].versions;
|
|
|
+ item2.resourceBomId = item2.resourceBomVersionList[0].resourceBomId;
|
|
|
+ }
|
|
|
|
|
|
setTimeout(() => {
|
|
|
item2.id = "";
|
|
|
@@ -714,14 +715,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- handleDel(row) {
|
|
|
+ handleDel(row,i) {
|
|
|
this.$confirm('是否确认删除?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
-
|
|
|
if (row.id) {
|
|
|
deleteBomTreeList([row.id]).then((msg) => {
|
|
|
this.$message.success('删除' + msg);
|
|
|
@@ -730,9 +730,10 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
- let _list = this.$refs.table.getData() ?? [];
|
|
|
|
|
|
- _list = _list.filter((item) => item.id !== row.id);
|
|
|
+ let _list = this.$refs.table.getData() ?? [];
|
|
|
+ _list.splice(i, 1);
|
|
|
+ // _list = _list.filter((item) => item.id !== row.id);
|
|
|
this.$refs.table.setData(_list);
|
|
|
}
|
|
|
|