|
@@ -1,10 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="ele-body">
|
|
<div class="ele-body">
|
|
|
- <BOMSearch
|
|
|
|
|
- @search="reload"
|
|
|
|
|
- :statusOpt="statusOpt"
|
|
|
|
|
-
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <BOMSearch @search="reload" :statusOpt="statusOpt" />
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
@@ -15,10 +11,14 @@
|
|
|
>
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
|
<div class="toolbar_box">
|
|
<div class="toolbar_box">
|
|
|
- <div>
|
|
|
|
|
- <el-button type="primary" size="mini" @click="handleAdd">新增</el-button>
|
|
|
|
|
- <el-button type="primary" size="mini" @click="handleAdd">保存</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="handleAdd"
|
|
|
|
|
+ >新增</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="handleAdd"
|
|
|
|
|
+ >保存</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
<div class="toolbar_box_right"
|
|
<div class="toolbar_box_right"
|
|
|
><span>基本数量</span>
|
|
><span>基本数量</span>
|
|
|
<el-input
|
|
<el-input
|
|
@@ -36,7 +36,7 @@
|
|
|
v-model="row.dosage"
|
|
v-model="row.dosage"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
- style="width: 68px;"
|
|
|
|
|
|
|
+ style="width: 68px"
|
|
|
>
|
|
>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</template>
|
|
</template>
|
|
@@ -99,23 +99,31 @@
|
|
|
|
|
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-link type="danger" :underline="false" icon="el-icon-delete" @click="handleDel(row)">
|
|
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
|
+ @click="handleDel(row)"
|
|
|
|
|
+ >
|
|
|
删除
|
|
删除
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
|
|
|
|
|
<bomTreeDialog ref="bomTreeDialogRef" @reload="bomClose" />
|
|
<bomTreeDialog ref="bomTreeDialogRef" @reload="bomClose" />
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import BOMSearch from './BOM-search.vue';
|
|
import BOMSearch from './BOM-search.vue';
|
|
|
- import { getBomPageCategoryId, contactList } from '@/api/material/BOM';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ getBomPageCategoryId,
|
|
|
|
|
+ contactList,
|
|
|
|
|
+ deleteBomTreeList
|
|
|
|
|
+ } from '@/api/material/BOM';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
|
|
|
|
|
- import bomTreeDialog from './bomTreeDialog.vue'
|
|
|
|
|
|
|
+ import bomTreeDialog from './bomTreeDialog.vue';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'SystemDictionary',
|
|
name: 'SystemDictionary',
|
|
|
components: { BOMSearch, bomTreeDialog },
|
|
components: { BOMSearch, bomTreeDialog },
|
|
@@ -264,12 +272,9 @@
|
|
|
treeId: {
|
|
treeId: {
|
|
|
type: String,
|
|
type: String,
|
|
|
default: ''
|
|
default: ''
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
watch: {
|
|
watch: {
|
|
|
attributeData(val) {
|
|
attributeData(val) {
|
|
|
this.attrObj = val;
|
|
this.attrObj = val;
|
|
@@ -283,7 +288,7 @@
|
|
|
|
|
|
|
|
treeId(val) {
|
|
treeId(val) {
|
|
|
this.newTreeId = val;
|
|
this.newTreeId = val;
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -318,7 +323,6 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
getContactList() {
|
|
getContactList() {
|
|
|
let param = {
|
|
let param = {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -338,11 +342,10 @@
|
|
|
this.attributeData.versions,
|
|
this.attributeData.versions,
|
|
|
this.attributeData.categoryId,
|
|
this.attributeData.categoryId,
|
|
|
this.newTreeId
|
|
this.newTreeId
|
|
|
- )
|
|
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
bomClose() {
|
|
bomClose() {
|
|
|
- this.$refs.table.setData([]);
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.table.reload({
|
|
this.$refs.table.reload({
|
|
|
pageNum: 1
|
|
pageNum: 1
|
|
@@ -351,9 +354,21 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
handleDel(row) {
|
|
handleDel(row) {
|
|
|
- console.log(row)
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.$confirm('是否确认删除?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ deleteBomTreeList([row.id]).then((msg) => {
|
|
|
|
|
+ this.$message.success('删除' + msg);
|
|
|
|
|
+ this.$refs.table.reload({
|
|
|
|
|
+ pageNum: 1
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .finally(() => {});
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|