|
@@ -176,6 +176,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { getBomTreeList, saveBomTreeList } from '@/api/material/BOM.js';
|
|
import { getBomTreeList, saveBomTreeList } from '@/api/material/BOM.js';
|
|
|
|
|
+ import { getBomTreeListTemp, saveBomTreeListTemp } from '@/api/material/jgBom';
|
|
|
import selectTree from '@/components/selectTree';
|
|
import selectTree from '@/components/selectTree';
|
|
|
|
|
|
|
|
import userSearch from './user-search.vue';
|
|
import userSearch from './user-search.vue';
|
|
@@ -186,6 +187,13 @@
|
|
|
selectTree,
|
|
selectTree,
|
|
|
standardOutput
|
|
standardOutput
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ props: {
|
|
|
|
|
+ isJgBom: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
@@ -256,7 +264,8 @@
|
|
|
this.attributeData.level = 1;
|
|
this.attributeData.level = 1;
|
|
|
}
|
|
}
|
|
|
this.attributeData.category = this.category;
|
|
this.attributeData.category = this.category;
|
|
|
- saveBomTreeList(this.attributeData).then((res) => {
|
|
|
|
|
|
|
+ let ULR = this.isJgBom ? saveBomTreeListTemp : saveBomTreeList;
|
|
|
|
|
+ ULR(this.attributeData).then((res) => {
|
|
|
if (res.code == '0') {
|
|
if (res.code == '0') {
|
|
|
this.$message.success('保存成功');
|
|
this.$message.success('保存成功');
|
|
|
this.$emit('reload', this.attributeData.versions);
|
|
this.$emit('reload', this.attributeData.versions);
|
|
@@ -289,13 +298,13 @@
|
|
|
this.attributeData.versions = versions;
|
|
this.attributeData.versions = versions;
|
|
|
this.versions = versions;
|
|
this.versions = versions;
|
|
|
|
|
|
|
|
- console.log(treeId);
|
|
|
|
|
- const res = await getBomTreeList({
|
|
|
|
|
|
|
+ let ULR = this.isJgBom ? getBomTreeListTemp : getBomTreeList;
|
|
|
|
|
+ const res = await ULR({
|
|
|
categoryId,
|
|
categoryId,
|
|
|
versions,
|
|
versions,
|
|
|
bomType: type
|
|
bomType: type
|
|
|
});
|
|
});
|
|
|
- console.log(this.attributeData);
|
|
|
|
|
|
|
+
|
|
|
this.bomTreeList = res.data;
|
|
this.bomTreeList = res.data;
|
|
|
this.attributeData.parentId = treeId;
|
|
this.attributeData.parentId = treeId;
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|