|
|
@@ -65,6 +65,7 @@
|
|
|
import fileMain from '@/components/addDoc/index.vue';
|
|
|
import { contactQueryByCategoryIdsAPI } from '@/api/bpm/components/supplierManage/contact';
|
|
|
const dayjs = require('dayjs');
|
|
|
+ import {lbjtList } from '@/enum/dict.js';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
@@ -350,11 +351,12 @@
|
|
|
label: '属性类型',
|
|
|
showOverflowTooltip: true,
|
|
|
formatter: (row, column) => {
|
|
|
- return row?.produceType
|
|
|
- ?.map((item) => {
|
|
|
- return this.getDictValue('生产类型', item);
|
|
|
- })
|
|
|
- ?.toString();
|
|
|
+ if(row.produceType){
|
|
|
+ return row.produceType.map(item=>{
|
|
|
+ return lbjtList[item]
|
|
|
+ }).toString()
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -467,17 +469,17 @@
|
|
|
this.requestDict('保质期单位');
|
|
|
},
|
|
|
methods: {
|
|
|
- // async getSupplierObj(productList, queryName) {
|
|
|
- // try {
|
|
|
- // let categoryIds = productList.map((item) => item[queryName]);
|
|
|
- // return await contactQueryByCategoryIdsAPI({
|
|
|
- // categoryIds,
|
|
|
- // isQueryEE: 1
|
|
|
- // });
|
|
|
- // } catch (e) {
|
|
|
- // return Promise.resolve({});
|
|
|
- // }
|
|
|
- // },
|
|
|
+ async getSupplierObj(productList, queryName) {
|
|
|
+ try {
|
|
|
+ let categoryIds = productList.map((item) => item[queryName]);
|
|
|
+ return await contactQueryByCategoryIdsAPI({
|
|
|
+ categoryIds,
|
|
|
+ isQueryEE: 1
|
|
|
+ });
|
|
|
+ } catch (e) {
|
|
|
+ return Promise.resolve({});
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
// 返回列表数据
|
|
|
getTableValue() {
|
|
|
@@ -548,10 +550,10 @@
|
|
|
}
|
|
|
this.setDeliveryDays();
|
|
|
|
|
|
- // this.supplierObj = await this.getSupplierObj(
|
|
|
- // productList,
|
|
|
- // 'productId'
|
|
|
- // );
|
|
|
+ this.supplierObj = await this.getSupplierObj(
|
|
|
+ productList,
|
|
|
+ 'productId'
|
|
|
+ );
|
|
|
this.$refs.table.reload();
|
|
|
}
|
|
|
}
|