|
|
@@ -21,10 +21,19 @@
|
|
|
v-model="currentNodeData.bomType"
|
|
|
@change="bomChange"
|
|
|
>
|
|
|
- <el-radio-button :label="1">PBOM</el-radio-button>
|
|
|
- <el-radio-button :label="2">MBOM</el-radio-button>
|
|
|
- <el-radio-button :label="3">ABOM</el-radio-button>
|
|
|
-
|
|
|
+ <el-radio-button :label="1"
|
|
|
+ >PBOM </el-radio-button
|
|
|
+ >
|
|
|
+ <el-radio-button
|
|
|
+ v-if="[1, 9].includes(rootPathIdParent)"
|
|
|
+ :label="2"
|
|
|
+ >MBOM</el-radio-button
|
|
|
+ >
|
|
|
+ <el-radio-button
|
|
|
+ v-if="[1, 9].includes(rootPathIdParent)"
|
|
|
+ :label="3"
|
|
|
+ >ABOM</el-radio-button
|
|
|
+ >
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
|
|
|
@@ -63,7 +72,8 @@
|
|
|
>
|
|
|
<el-button
|
|
|
v-if="
|
|
|
- (currentNodeData.bomType == 2 || currentNodeData.bomType == 3) &&
|
|
|
+ (currentNodeData.bomType == 2 ||
|
|
|
+ currentNodeData.bomType == 3) &&
|
|
|
currentNodeData.children?.length <= 0
|
|
|
"
|
|
|
type="danger"
|
|
|
@@ -81,7 +91,13 @@
|
|
|
plain
|
|
|
>导出</el-button
|
|
|
>
|
|
|
- <el-button @click="uploadFile" v-if="currentNodeData.bomType == 1" type="primary" size="mini" icon="el-icon-upload2" plain
|
|
|
+ <el-button
|
|
|
+ @click="uploadFile"
|
|
|
+ v-if="currentNodeData.bomType == 1"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-upload2"
|
|
|
+ plain
|
|
|
>导入</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -104,7 +120,6 @@
|
|
|
>转换ABOM</el-button
|
|
|
>
|
|
|
|
|
|
-
|
|
|
<div v-if="!noBack" class="back-btn">
|
|
|
<el-button size="mini" icon="el-icon-back" @click="back"
|
|
|
>返回</el-button
|
|
|
@@ -123,14 +138,23 @@
|
|
|
<el-tab-pane label="属性" name="属性">
|
|
|
<attribute :attributeData="currentNodeData"></attribute>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane :label="currentNodeData.bomType == 1 ? 'PBOM明细表' : currentNodeData.bomType == 2 ? 'MBOM明细表' : 'ABOM明细表' " name="明细表">
|
|
|
+ <el-tab-pane
|
|
|
+ :label="
|
|
|
+ currentNodeData.bomType == 1
|
|
|
+ ? 'PBOM明细表'
|
|
|
+ : currentNodeData.bomType == 2
|
|
|
+ ? 'MBOM明细表'
|
|
|
+ : 'ABOM明细表'
|
|
|
+ "
|
|
|
+ name="明细表"
|
|
|
+ >
|
|
|
<!-- <document></document> -->
|
|
|
- <detailedList :attributeData="currentNodeData"></detailedList>
|
|
|
+ <detailedList :attributeData="currentNodeData"></detailedList>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane
|
|
|
-
|
|
|
label="工艺路线"
|
|
|
name="工艺路线"
|
|
|
+ v-if="[1, 9].includes(rootPathIdParent)"
|
|
|
>
|
|
|
<routing
|
|
|
ref="routingRef"
|
|
|
@@ -138,9 +162,9 @@
|
|
|
></routing>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane
|
|
|
-
|
|
|
label="工序配置"
|
|
|
name="工序配置"
|
|
|
+ v-if="[1, 9].includes(rootPathIdParent)"
|
|
|
>
|
|
|
<workmanship
|
|
|
ref="workmanshipRef"
|
|
|
@@ -154,7 +178,11 @@
|
|
|
</el-card>
|
|
|
<bomTreeDialog ref="bomTreeDialogRef" @reload="bomTreeDialogReload" />
|
|
|
|
|
|
- <importDialog :defModule="moudleName" ref="importDialogRef" @success="reload" />
|
|
|
+ <importDialog
|
|
|
+ :defModule="moudleName"
|
|
|
+ ref="importDialogRef"
|
|
|
+ @success="reload"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -165,7 +193,7 @@
|
|
|
convert,
|
|
|
convertABom,
|
|
|
convertCBom,
|
|
|
- deleteBomTreeList,
|
|
|
+ deleteBomTreeList
|
|
|
} from '@/api/material/BOM.js';
|
|
|
import { getTreeByGroup } from '@/api/classifyManage';
|
|
|
import attribute from './components/attribute.vue';
|
|
|
@@ -174,8 +202,8 @@
|
|
|
// import document from './components/document.vue';
|
|
|
import workmanship from './components/workmanship.vue';
|
|
|
import bomTreeDialog from './components/bomTreeDialog.vue';
|
|
|
- import importDialog from "./qualityTesting/import-dialog.vue";
|
|
|
- import detailedList from './components/detailedList.vue'
|
|
|
+ import importDialog from './qualityTesting/import-dialog.vue';
|
|
|
+ import detailedList from './components/detailedList.vue';
|
|
|
export default {
|
|
|
name: 'BOMmanage',
|
|
|
components: {
|
|
|
@@ -212,9 +240,19 @@
|
|
|
noBack: false,
|
|
|
treeId: null,
|
|
|
|
|
|
- moudleName : "mainUser",
|
|
|
+ moudleName: 'mainUser',
|
|
|
+ rootPathIdParent: null
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ // 监听$route.query对象的变化
|
|
|
+ '$route.query': {
|
|
|
+ immediate: true, // 启用立即执行
|
|
|
+ handler(newQuery, oldQuery) {
|
|
|
+ this.rootPathIdParent = Number(newQuery.categoryLevelPathIdParent)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.initData();
|
|
|
},
|
|
|
@@ -233,11 +271,11 @@
|
|
|
this.getTreeData();
|
|
|
},
|
|
|
initData() {
|
|
|
- console.log('触发了!!!!');
|
|
|
this.versions = this.$route.query.versions;
|
|
|
this.categoryId = this.$route.query.categoryId;
|
|
|
this.noBack = this.$route.query.noBack;
|
|
|
|
|
|
+
|
|
|
(this.currentNodeData = {
|
|
|
bomType: this.$route.query.bType || 1,
|
|
|
children: []
|
|
|
@@ -252,7 +290,10 @@
|
|
|
this.$refs.routingRef.reload();
|
|
|
}
|
|
|
|
|
|
- if (tab.name === '工序配置' && this.currentNodeData.children?.length < 1) {
|
|
|
+ if (
|
|
|
+ tab.name === '工序配置' &&
|
|
|
+ this.currentNodeData.children?.length < 1
|
|
|
+ ) {
|
|
|
this.$refs.workmanshipRef.reload();
|
|
|
}
|
|
|
},
|
|
|
@@ -295,7 +336,7 @@
|
|
|
text: '转换中...',
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
});
|
|
|
- let ULR = tt == 'M' ? convert : tt == 'A' ? convertABom : ''
|
|
|
+ let ULR = tt == 'M' ? convert : tt == 'A' ? convertABom : '';
|
|
|
ULR({ versions: this.versions, categoryId: this.categoryId }).then(
|
|
|
(data) => {
|
|
|
if (data.code == '0') {
|
|
|
@@ -378,14 +419,13 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- uploadFile () {
|
|
|
- this.$refs.importDialogRef.open();
|
|
|
- },
|
|
|
-
|
|
|
- reload(where) {
|
|
|
- this.getTreeData();
|
|
|
+ uploadFile() {
|
|
|
+ this.$refs.importDialogRef.open();
|
|
|
},
|
|
|
|
|
|
+ reload(where) {
|
|
|
+ this.getTreeData();
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|