|
|
@@ -13,10 +13,18 @@
|
|
|
<el-tab-pane label="工艺路线">
|
|
|
<ele-pro-table :columns="pathColumn" :datasource="pathData">
|
|
|
<template v-slot:bomCategoryType="{ row }">
|
|
|
- {{ row.bomCategoryType == 2 ? 'MBOM' : row.bomCategoryType == 1 ? 'PBOM' : row.bomCategoryType == 3 ? 'ABom' : '' }}
|
|
|
+ {{
|
|
|
+ row.bomCategoryType == 2
|
|
|
+ ? 'MBOM'
|
|
|
+ : row.bomCategoryType == 1
|
|
|
+ ? 'PBOM'
|
|
|
+ : row.bomCategoryType == 3
|
|
|
+ ? 'ABom'
|
|
|
+ : ''
|
|
|
+ }}
|
|
|
</template>
|
|
|
- </ele-pro-table
|
|
|
- ></el-tab-pane>
|
|
|
+ </ele-pro-table></el-tab-pane
|
|
|
+ >
|
|
|
<!-- <el-tab-pane label="质量标准"></el-tab-pane> -->
|
|
|
<!-- <el-tab-pane label="文件">
|
|
|
<ele-pro-table :columns="fileColumn" :datasource="[]"> </ele-pro-table
|
|
|
@@ -79,20 +87,29 @@
|
|
|
添加生产厂家
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- <!-- 操作列 -->
|
|
|
- <!-- <template v-slot:action="{ row }">
|
|
|
- <el-popconfirm
|
|
|
- class="ele-action"
|
|
|
- title="确定要删除此供应商吗?"
|
|
|
- @confirm="deleteSupplie(row)"
|
|
|
+
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="客户">
|
|
|
+ <ele-pro-table
|
|
|
+ :columns="supplierColumn"
|
|
|
+ :datasource="contactData"
|
|
|
+ :need-page="false"
|
|
|
+ ref="supplierRef"
|
|
|
+ >
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="handParent()"
|
|
|
+ v-if="id"
|
|
|
>
|
|
|
- <template v-slot:reference>
|
|
|
- <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
- 删除
|
|
|
- </el-link>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
- </template> -->
|
|
|
+ 添加客户
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -107,7 +124,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { getBomRoutingList, getBomAssociationList } from '@/api/material/list.js';
|
|
|
+ import {
|
|
|
+ getBomRoutingList,
|
|
|
+ getBomAssociationList
|
|
|
+ } from '@/api/material/list.js';
|
|
|
import { saveSupplier, deleteSupplie } from '@/api/material/BOM.js';
|
|
|
import { getRelatesInformationList } from '@/api/material/product.js';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
@@ -368,6 +388,7 @@
|
|
|
pathData: [],
|
|
|
supplierData: [], //供应商
|
|
|
manufacturerData: [], //生产厂家
|
|
|
+ contactData: [], //客户
|
|
|
ids: '',
|
|
|
title: ''
|
|
|
};
|
|
|
@@ -378,6 +399,7 @@
|
|
|
if (val) {
|
|
|
this.getBomData();
|
|
|
this.getRoutingData();
|
|
|
+ this.contactQueryByCategoryIdsAPI(1);
|
|
|
this.contactQueryByCategoryIdsAPI(2);
|
|
|
this.contactQueryByCategoryIdsAPI(3);
|
|
|
}
|
|
|
@@ -401,16 +423,16 @@
|
|
|
//BOM列表
|
|
|
async getBomData() {
|
|
|
const data = await getBomAssociationList({
|
|
|
- categoryId: this.id,
|
|
|
- versions: '',
|
|
|
- bomType: 1,
|
|
|
- isTemp: 0
|
|
|
+ categoryId: this.id,
|
|
|
+ versions: '',
|
|
|
+ bomType: 1,
|
|
|
+ isTemp: 0
|
|
|
});
|
|
|
this.bomData = data || [];
|
|
|
},
|
|
|
//工艺路线
|
|
|
- async getRoutingData(){
|
|
|
- const data =await getBomRoutingList(this.id);
|
|
|
+ async getRoutingData() {
|
|
|
+ const data = await getBomRoutingList(this.id);
|
|
|
this.pathData = data || [];
|
|
|
},
|
|
|
// 关联设备
|
|
|
@@ -439,6 +461,9 @@
|
|
|
categoryIds: [this.id],
|
|
|
type
|
|
|
});
|
|
|
+ if (type == 1) {
|
|
|
+ this.contactData = data[this.id] || [];
|
|
|
+ }
|
|
|
if (type == 2) {
|
|
|
this.supplierData = data[this.id] || [];
|
|
|
}
|
|
|
@@ -447,7 +472,6 @@
|
|
|
}
|
|
|
},
|
|
|
handParent() {
|
|
|
- console.log(this.activeTab,'his.activeTab')
|
|
|
if (this.activeTab == '4') {
|
|
|
this.ids = '19';
|
|
|
this.title = '选择供应商';
|
|
|
@@ -455,12 +479,17 @@
|
|
|
if (this.activeTab == '5') {
|
|
|
this.ids = '20250317001';
|
|
|
this.title = '选择生产厂家';
|
|
|
-
|
|
|
+ }
|
|
|
+ if (this.activeTab == '6') {
|
|
|
+ this.ids = '17';
|
|
|
+ this.title = '选择客户';
|
|
|
}
|
|
|
this.$refs.vendorDialogRef.open(
|
|
|
this.activeTab == '4'
|
|
|
? this.supplierData.map((item) => item.id)
|
|
|
- : this.manufacturerData.map((item) => item.id)
|
|
|
+ : this.activeTab == '5'
|
|
|
+ ? this.manufacturerData.map((item) => item.id)
|
|
|
+ : this.contactData.map((item) => item.id)
|
|
|
);
|
|
|
},
|
|
|
|
|
|
@@ -471,8 +500,10 @@
|
|
|
}).then((res) => {
|
|
|
if (this.activeTab == '4') {
|
|
|
this.contactQueryByCategoryIdsAPI(2);
|
|
|
- } else {
|
|
|
+ } else if (this.activeTab == '5') {
|
|
|
this.contactQueryByCategoryIdsAPI(3);
|
|
|
+ } else {
|
|
|
+ this.contactQueryByCategoryIdsAPI(1);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -481,7 +512,7 @@
|
|
|
productId: this.id,
|
|
|
supplierId: row.id
|
|
|
}).then((res) => {
|
|
|
- this.contactQueryByCategoryIdsAPI();
|
|
|
+ this.contactQueryByCategoryIdsAPI(2);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -493,4 +524,4 @@
|
|
|
|
|
|
padding: 1px 17px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|