|
@@ -29,6 +29,14 @@
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
+ <template v-slot:isTemp="{ row }">
|
|
|
|
|
+ <el-tag size="mini" v-if="row.isTemp == 1">主数据</el-tag>
|
|
|
|
|
+
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link type="primary" @click="handelDetail(row)">详情</el-link>
|
|
<el-link type="primary" @click="handelDetail(row)">详情</el-link>
|
|
@@ -45,6 +53,12 @@
|
|
|
@click="handSubmit(row)"
|
|
@click="handSubmit(row)"
|
|
|
>发布</el-link
|
|
>发布</el-link
|
|
|
>
|
|
>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <el-link type="danger" :underline="false" v-if="activeName == 1 && row.status == 0" @click="handDel(row)">
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
@@ -58,7 +72,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import BOMSearch from './components/BOM-search.vue';
|
|
import BOMSearch from './components/BOM-search.vue';
|
|
|
- import { getBomPageList, startAndStop, bomSubmit } from '@/api/material/BOM';
|
|
|
|
|
|
|
+ import { getBomPageList, startAndStop, bomSubmit, deleteBomTreeList } from '@/api/material/BOM';
|
|
|
import LCdetail from './components/LCdetail.vue'
|
|
import LCdetail from './components/LCdetail.vue'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'SystemDictionary',
|
|
name: 'SystemDictionary',
|
|
@@ -111,6 +125,15 @@
|
|
|
label: '审核状态',
|
|
label: '审核状态',
|
|
|
slot: 'approvalStatus'
|
|
slot: 'approvalStatus'
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 100,
|
|
|
|
|
+ prop: 'isTemp',
|
|
|
|
|
+ slot: 'isTemp',
|
|
|
|
|
+ label: '主数据',
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
prop: 'createName',
|
|
prop: 'createName',
|
|
|
label: '创建人',
|
|
label: '创建人',
|
|
@@ -212,6 +235,7 @@
|
|
|
return getBomPageList({
|
|
return getBomPageList({
|
|
|
...where,
|
|
...where,
|
|
|
bomType: Number(this.activeName),
|
|
bomType: Number(this.activeName),
|
|
|
|
|
+ isTemp: true,
|
|
|
pageNum: page,
|
|
pageNum: page,
|
|
|
size: limit
|
|
size: limit
|
|
|
});
|
|
});
|
|
@@ -225,7 +249,8 @@
|
|
|
noBack,
|
|
noBack,
|
|
|
bType: this.activeName,
|
|
bType: this.activeName,
|
|
|
categoryLevelPathIdParent: row.rootCategoryLevelId,
|
|
categoryLevelPathIdParent: row.rootCategoryLevelId,
|
|
|
- isProduct: true
|
|
|
|
|
|
|
+ isProduct: true,
|
|
|
|
|
+ isTemp: row.isTemp
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -233,67 +258,35 @@
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ where });
|
|
this.$refs.table.reload({ where });
|
|
|
},
|
|
},
|
|
|
- /* 显示编辑 */
|
|
|
|
|
- handelEdit(type, row) {
|
|
|
|
|
- this.$refs.editDialogRef.open(type, row);
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ handleClick(tab) {
|
|
|
|
|
+ this.activeName = tab.name;
|
|
|
|
|
+ this.reload();
|
|
|
},
|
|
},
|
|
|
- /* 删除 */
|
|
|
|
|
- remove() {
|
|
|
|
|
- this.$confirm('确定要删除选中的字典吗?', '提示', {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ handDel(row) {
|
|
|
|
|
+ this.$confirm('是否确认删除?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- if (this.$refs.dictData.selection.length == 0) {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- message: '当前未选择数据',
|
|
|
|
|
- type: 'error'
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- let ids = this.$refs.dictData.selection.map((item) => item.id);
|
|
|
|
|
- const loading = this.$loading({ lock: true });
|
|
|
|
|
-
|
|
|
|
|
- removeDictionary(ids, true)
|
|
|
|
|
- .then((msg) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.success(msg);
|
|
|
|
|
|
|
+ deleteBomTreeList([row.id])
|
|
|
|
|
+ .then(() => {
|
|
|
this.reload();
|
|
this.reload();
|
|
|
})
|
|
})
|
|
|
- .catch((e) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- // this.$message.error(e.message);
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {});
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- // 刷新数据
|
|
|
|
|
- refreshData() {
|
|
|
|
|
- this.loading = true;
|
|
|
|
|
- syncBom()
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- if (res == '0') {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- this.$message.success('数据刷新成功!');
|
|
|
|
|
- this.reload();
|
|
|
|
|
- }
|
|
|
|
|
})
|
|
})
|
|
|
- .catch((e) => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '已取消删除'
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- handleClick(tab) {
|
|
|
|
|
- this.activeName = tab.name;
|
|
|
|
|
- getBomPageList({
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- size: 10,
|
|
|
|
|
- bomType: Number(this.activeName)
|
|
|
|
|
- }).then((data) => {
|
|
|
|
|
- this.$refs.table.setData(data.list || []);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
handleDetails(row) {
|
|
handleDetails(row) {
|
|
|
if (!row.processInstanceId) {
|
|
if (!row.processInstanceId) {
|