yusheng 1 rok temu
rodzic
commit
fef54af137

+ 7 - 6
src/BIZComponents/inventoryTable.vue

@@ -536,7 +536,7 @@
   import ProductionVersion from '@/components/ProductionVersion2/index.vue';
   import { getByCode } from '@/api/system/dictionary-data';
   import fileMain from '@/components/addDoc/index.vue';
-  import { pricingWayList } from '@/enum/dict.js';
+  import { pricingWayList,lbjtList } from '@/enum/dict.js';
   import { changeCount } from '@/BIZComponents/setProduct.js';
   import { getInventoryTotalAPI } from '@/api/bpm/components/wms/index.js';
   const dayjs = require('dayjs');
@@ -709,11 +709,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictV('productionType', item + ''))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           // {

+ 22 - 20
src/BIZComponents/inventoryTableDetails.vue

@@ -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();
         }
       }

+ 8 - 0
src/enum/dict.js

@@ -161,3 +161,11 @@ export const outsourceSceneList = [
   { value: 3, label: '多工序' },
   { value: 4, label: '首工序及多工序' }
 ];
+
+//属性类型
+export const lbjtList = {
+  1: '自制件',
+  2: '采购件',
+  3: '外协件',
+  4: '受托件'
+};

+ 7 - 6
src/views/bpm/handleTask/components/businessOpportunity/saleGeneralityInventoryTable.vue

@@ -457,7 +457,7 @@
 
   import { getByCode } from '@/api/system/dictionary-data';
   import fileMain from '@/components/addDoc/index.vue';
-  import { pricingWayList } from '@/enum/dict.js';
+  import { pricingWayList,lbjtList } from '@/enum/dict.js';
   import { changeCount } from '@/BIZComponents/setProduct.js';
 
   const dayjs = require('dayjs');
@@ -597,11 +597,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictV('productionType', item + ''))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           // {

+ 8 - 5
src/views/bpm/handleTask/components/inquiryManage/inventoryTable.vue

@@ -262,6 +262,8 @@
   import { getInventoryTotalAPI } from '@/api/bpm/components/wms';
   import fileMain from '@/components/addDoc/index.vue';
   // import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
+  import {lbjtList } from '@/enum/dict.js';
+
   export default {
     mixins: [dictMixins],
     components: {
@@ -476,11 +478,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictV('productionType', item))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           // {

+ 7 - 5
src/views/bpm/handleTask/components/purchaseNeedManage/detailDialog.vue

@@ -120,6 +120,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import timeDialog from '@/components/timeDialog/index.vue';
   import fileMain from "@/components/addDoc/index.vue";
+  import {lbjtList } from '@/enum/dict.js';
 
   export default {
     props: {
@@ -264,11 +265,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                .map((item) => this.getDictValue('生产类型', item))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           {

+ 7 - 6
src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue

@@ -265,9 +265,9 @@
 
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
-  import { copyObj } from '@/utils/util';
   import fileMain from '@/components/addDoc/index.vue';
   import { orderSourceType, outsourceSceneList } from '@/enum/dict';
+  import {lbjtList } from '@/enum/dict.js';
 
   export default {
     mixins: [dictMixins],
@@ -413,11 +413,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictValue('生产类型', item + ''))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
 

+ 7 - 5
src/views/bpm/handleTask/components/purchaseOrder/invoice/receiptInfo.vue

@@ -97,6 +97,7 @@
 <script>
   import { reviewStatusEnum } from '@/enum/dict';
   import dictMixins from '@/mixins/dictMixins';
+  import {lbjtList } from '@/enum/dict.js';
 
   import fileMain from '@/components/addDoc/index.vue';
   export default {
@@ -161,11 +162,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictValue('生产类型', item + ''))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           {

+ 7 - 5
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/detailDialog.vue

@@ -127,6 +127,7 @@
   import fileMain from '@/components/addDoc/index.vue';
   import { mapActions } from 'vuex';
   import dictMixins from '@/mixins/dictMixins';
+  import {lbjtList } from '@/enum/dict.js';
 
   export default {
     components: { fileMain },
@@ -205,11 +206,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictValue('生产类型', item))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           {

+ 7 - 5
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/inventoryTable.vue

@@ -161,6 +161,7 @@
   import { copyObj } from '@/utils/util';
   import { getFile } from '@/api/system/file';
   import fileMain from '@/components/addDoc/index.vue';
+  import {lbjtList } from '@/enum/dict.js';
 
   export default {
     mixins: [dictMixins],
@@ -264,11 +265,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictValue('生产类型', item))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           {

+ 8 - 5
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -247,6 +247,8 @@
   import { copyObj } from '@/utils/util';
   import add from '@/views/bpm/outgoingManagement/outbound.vue';
   import fileMain from '@/components/addDoc/index.vue';
+  import {lbjtList } from '@/enum/dict.js';
+
   export default {
     mixins: [dictMixins],
     components: {
@@ -365,11 +367,12 @@
             align: 'center',
             label: '属性类型',
             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()
+              }
+          
             },
             showOverflowTooltip: true
           },

+ 8 - 5
src/views/bpm/handleTask/components/saleOrder/invoice/inventoryTable.vue

@@ -218,6 +218,8 @@
   import { copyObj } from '@/utils/util';
   import StockLedgerDialog from "@/views/bpm/handleTask/components/saleOrder/invoice/stockLedger/stockLedgerDialog.vue";
   import fileMain from "@/components/addDoc/index.vue";
+  import {lbjtList } from '@/enum/dict.js';
+
   export default {
     mixins: [dictMixins],
     props: {
@@ -375,11 +377,12 @@
             align: 'center',
             label: '属性类型',
             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()
+              }
+          
             },
             showOverflowTooltip: true
           },

+ 7 - 5
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTableReturn.vue

@@ -477,6 +477,7 @@
   import { getByCode } from '@/api/system/dictionary-data';
   // import {contactQueryByCategoryIdsAPI} from "@/api/saleManage/contact";
   import fileMain from '@/components/addDoc/index.vue';
+  import {lbjtList } from '@/enum/dict.js';
 
   const dayjs = require('dayjs');
 
@@ -740,11 +741,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictV('productionType', item + ''))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           // {

+ 7 - 5
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTableReturnDetail.vue

@@ -55,6 +55,7 @@
 <script>
   import fileMain from '@/components/addDoc/index.vue';
 
+  import {lbjtList } from '@/enum/dict.js';
 
   export default {
     components: {
@@ -244,11 +245,12 @@
             label: '属性类型',
             showOverflowTooltip: true,
             formatter: (row, column) => {
-              return row.produceType && row.produceType.length
-                ? row.produceType
-                    .map((item) => this.getDictV('productionType', item + ''))
-                    .join(',')
-                : '';
+              if(row.produceType){
+                return row.produceType.map(item=>{
+                  return lbjtList[item]
+                }).toString()
+              }
+          
             }
           },
           // {