|
|
@@ -44,7 +44,10 @@
|
|
|
size="mini"
|
|
|
icon="el-icon-plus"
|
|
|
@click="handleAdd"
|
|
|
- v-if="$hasPermission('main:categoryparam:saveBom')"
|
|
|
+ v-if="
|
|
|
+ $hasPermission('main:categoryparam:saveBom') &&
|
|
|
+ currentNodeData.parentId == '0'
|
|
|
+ "
|
|
|
>
|
|
|
新建
|
|
|
</el-button>
|
|
|
@@ -57,14 +60,17 @@
|
|
|
v-if="
|
|
|
(currentNodeData.approvalStatus == 0 ||
|
|
|
currentNodeData.approvalStatus == 3) &&
|
|
|
- $hasPermission('main:categoryparam:deleteBom')
|
|
|
+ $hasPermission('main:categoryparam:deleteBom') &&
|
|
|
+ currentNodeData.parentId == '0'
|
|
|
"
|
|
|
>
|
|
|
删除
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
|
- v-if="currentNodeData.bomType == 1"
|
|
|
+ v-if="
|
|
|
+ currentNodeData.bomType == 1 && currentNodeData.parentId == '0'
|
|
|
+ "
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
icon="el-icon-download"
|
|
|
@@ -74,7 +80,9 @@
|
|
|
|
|
|
<el-button
|
|
|
@click="uploadFile"
|
|
|
- v-if="currentNodeData.bomType == 1"
|
|
|
+ v-if="
|
|
|
+ currentNodeData.bomType == 1 && currentNodeData.parentId == '0'
|
|
|
+ "
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
icon="el-icon-upload2"
|
|
|
@@ -88,7 +96,9 @@
|
|
|
icon="el-icon-refresh"
|
|
|
plain
|
|
|
@click="transformation('P')"
|
|
|
- v-if="currentNodeData.bomType == 4"
|
|
|
+ v-if="
|
|
|
+ currentNodeData.bomType == 4 && currentNodeData.parentId == '0'
|
|
|
+ "
|
|
|
>转换PBOM</el-button
|
|
|
>
|
|
|
|
|
|
@@ -98,7 +108,9 @@
|
|
|
icon="el-icon-refresh"
|
|
|
plain
|
|
|
@click="transformation('E')"
|
|
|
- v-if="currentNodeData.bomType == 1"
|
|
|
+ v-if="
|
|
|
+ currentNodeData.bomType == 1 && currentNodeData.parentId == '0'
|
|
|
+ "
|
|
|
>转换EBOM</el-button
|
|
|
>
|
|
|
|
|
|
@@ -111,7 +123,8 @@
|
|
|
v-if="
|
|
|
currentNodeData.bomType == 1 &&
|
|
|
(searchObj.isProduct ||
|
|
|
- ['1', '9'].includes(searchObj.rootPathIdParent))
|
|
|
+ ['1', '9'].includes(searchObj.rootPathIdParent)) &&
|
|
|
+ currentNodeData.parentId == '0'
|
|
|
"
|
|
|
>转换MBOM</el-button
|
|
|
>
|
|
|
@@ -125,7 +138,8 @@
|
|
|
v-if="
|
|
|
currentNodeData.bomType == 1 &&
|
|
|
(searchObj.isProduct ||
|
|
|
- ['1', '9'].includes(searchObj.rootPathIdParent))
|
|
|
+ ['1', '9'].includes(searchObj.rootPathIdParent)) &&
|
|
|
+ currentNodeData.parentId == '0'
|
|
|
"
|
|
|
>转换ABOM</el-button
|
|
|
>
|
|
|
@@ -135,8 +149,9 @@
|
|
|
size="mini"
|
|
|
@click="handSubmit"
|
|
|
v-if="
|
|
|
- currentNodeData.approvalStatus == 0 ||
|
|
|
- currentNodeData.approvalStatus == 3
|
|
|
+ (currentNodeData.approvalStatus == 0 ||
|
|
|
+ currentNodeData.approvalStatus == 3) &&
|
|
|
+ currentNodeData.parentId == '0'
|
|
|
"
|
|
|
>
|
|
|
提交发布
|
|
|
@@ -242,7 +257,10 @@
|
|
|
|
|
|
<template v-slot:content v-if="isNotData">
|
|
|
<!-- 基本信息 -->
|
|
|
- <baseInfo :dataInfo="currentNodeData" />
|
|
|
+ <baseInfo
|
|
|
+ :dataInfo="currentNodeData"
|
|
|
+ @getNewBomData="getNewBomData"
|
|
|
+ />
|
|
|
|
|
|
<!-- table -->
|
|
|
<el-tabs
|
|
|
@@ -459,6 +477,8 @@
|
|
|
open(row) {
|
|
|
this.searchObj = row;
|
|
|
|
|
|
+ console.log(row, 'rowrowrowrowrow');
|
|
|
+
|
|
|
if (Object.prototype.hasOwnProperty.call(row, 'isWt') && row.isWt) {
|
|
|
this.isWt = row.isWt;
|
|
|
this.isFullscreen = false;
|
|
|
@@ -484,6 +504,20 @@
|
|
|
this.drawer = false;
|
|
|
},
|
|
|
|
|
|
+ getNewBomData(data) {
|
|
|
+ let rowData = {
|
|
|
+ categoryId: data.categoryId,
|
|
|
+ categoryName: data.name,
|
|
|
+ code: data.code,
|
|
|
+ versions: data.versions,
|
|
|
+ rootPathIdParent: data.categoryLevelPathIdParent,
|
|
|
+ isProduct: true,
|
|
|
+ bomType: Number(data.bomType),
|
|
|
+ isTemp: data.isTemp
|
|
|
+ };
|
|
|
+ this.open(rowData);
|
|
|
+ },
|
|
|
+
|
|
|
handleFull() {
|
|
|
this.isFullscreen = !this.isFullscreen;
|
|
|
this.$forceUpdate();
|
|
|
@@ -545,6 +579,8 @@
|
|
|
this.searchObj.versions = this.currentNodeData.versions;
|
|
|
|
|
|
this.$forceUpdate();
|
|
|
+
|
|
|
+ console.log(this.currentNodeData, 'this.currentNodeData');
|
|
|
});
|
|
|
} else {
|
|
|
this.currentNodeData = {
|