Преглед на файлове

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

yusheng преди 11 месеца
родител
ревизия
9be4d2c799

+ 2 - 1
src/enum/dict.js

@@ -70,7 +70,8 @@ export default {
   贮藏: 'layBy',
   贮藏: 'layBy',
   执行标准: 'enforceStandards',
   执行标准: 'enforceStandards',
   产地: 'purchase_origin',
   产地: 'purchase_origin',
-  文档类型: 'doc_type'
+  文档类型: 'doc_type',
+  存货类型: 'inventory_type'
 };
 };
 
 
 export const numberList = [
 export const numberList = [

+ 1 - 1
src/views/material/BOMmanage/components/baseInfo.vue

@@ -87,7 +87,7 @@
       :isEdit="true"
       :isEdit="true"
     ></baseInfoSave>
     ></baseInfoSave>
 
 
-    <BomDetailsPop ref="bomDrawer"></BomDetailsPop>;
+    <BomDetailsPop ref="bomDrawer"></BomDetailsPop>
   </div>
   </div>
 </template>
 </template>
 
 

+ 1 - 1
src/views/material/BOMmanage/components/standardOutput.vue

@@ -288,7 +288,7 @@
           this.attributeList = res.data;
           this.attributeList = res.data;
         }
         }
       });
       });
-      this.requestDict('生产类型');
+      // this.requestDict('生产类型');
     },
     },
     methods: {
     methods: {
       /* 表格数据源 */
       /* 表格数据源 */

+ 1 - 1
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -443,7 +443,7 @@
                       ></DictSelection> -->
                       ></DictSelection> -->
                       <!-- <el-form-item label="单位:" prop="unit"> -->
                       <!-- <el-form-item label="单位:" prop="unit"> -->
                       <el-select
                       <el-select
-                        :disabled="isView || form.baseCountUnit"
+                        disabled
                         v-model="form.baseCountUnit"
                         v-model="form.baseCountUnit"
                         filterable
                         filterable
                         class="ele-block"
                         class="ele-block"

+ 1 - 1
src/views/material/product/components/index-data.vue

@@ -627,7 +627,7 @@
           this.attributeList = res.data;
           this.attributeList = res.data;
         }
         }
       });
       });
-      this.requestDict('生产类型');
+      // this.requestDict('生产类型');
       this.getFieldModel();
       this.getFieldModel();
     },
     },
 
 

+ 39 - 28
src/views/material/product/detail.vue

@@ -45,6 +45,12 @@
 
 
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="存货类型:" prop="attributeType">
             <el-form-item label="存货类型:" prop="attributeType">
+              <!-- <DictSelection
+                dictName="存货类型"
+                clearable
+                v-model="form.attributeType"
+              >
+              </DictSelection> -->
               <el-select
               <el-select
                 v-model="form.attributeType"
                 v-model="form.attributeType"
                 filterable
                 filterable
@@ -399,7 +405,7 @@
   import { deepClone } from '@/utils/index';
   import { deepClone } from '@/utils/index';
   import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
   import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
   import { produceTypeList } from '@/enum/dict.js';
   import { produceTypeList } from '@/enum/dict.js';
-import { copyObj } from '@/utils/util';
+  import { copyObj } from '@/utils/util';
 
 
   const defCategoryQms = [
   const defCategoryQms = [
     {
     {
@@ -542,27 +548,10 @@ import { copyObj } from '@/utils/util';
             value: 4
             value: 4
           }
           }
         ],
         ],
-        attributeList: [
-          {
-            label: '成品',
-            value: 1
-          },
-          {
-            label: '半成品',
-            value: 2
-          },
-          {
-            label: '零件',
-            value: 3
-          },
-          {
-            label: '原材料',
-            value: 4
-          }
-        ],
+        attributeList: [],
         remarkform: {
         remarkform: {
           remarkAttach: [],
           remarkAttach: [],
-          remark:''
+          remark: ''
         },
         },
         categorySales: {},
         categorySales: {},
         categoryPurchase: { purchaseMultiplier: 1, measuringUnit: '' },
         categoryPurchase: { purchaseMultiplier: 1, measuringUnit: '' },
@@ -681,7 +670,7 @@ import { copyObj } from '@/utils/util';
             this.purchaseInfo = {};
             this.purchaseInfo = {};
             this.remarkform = {
             this.remarkform = {
               remarkAttach: [],
               remarkAttach: [],
-              remark:''
+              remark: ''
             };
             };
             this.categoryAps = {};
             this.categoryAps = {};
             this.categoryMes = {
             this.categoryMes = {
@@ -697,7 +686,7 @@ import { copyObj } from '@/utils/util';
             this.categoryMold = {};
             this.categoryMold = {};
             this.categoryPallet = {};
             this.categoryPallet = {};
             this.categoryQms = [...copyObj(defCategoryQms)];
             this.categoryQms = [...copyObj(defCategoryQms)];
-     
+
             this.categoryVehicle = {};
             this.categoryVehicle = {};
             this.categoryWms = {
             this.categoryWms = {
               isUnpack: 1,
               isUnpack: 1,
@@ -779,6 +768,7 @@ import { copyObj } from '@/utils/util';
       }
       }
 
 
       this.getFieldModel();
       this.getFieldModel();
+      this.getAttributeList('inventory_type');
 
 
       this.getDictList('zeroPartPros');
       this.getDictList('zeroPartPros');
     },
     },
@@ -906,7 +896,7 @@ import { copyObj } from '@/utils/util';
         this.form = {
         this.form = {
           ...info.category
           ...info.category
         };
         };
-        this.remarkform.remark=info.category.remark;
+        this.remarkform.remark = info.category.remark;
         // if (this.form.measuringUnit && this.form.packingUnit) {
         // if (this.form.measuringUnit && this.form.packingUnit) {
         //   this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
         //   this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
         // }
         // }
@@ -958,12 +948,13 @@ import { copyObj } from '@/utils/util';
         } else {
         } else {
           this.categoryPurchase = info.categoryPurchase;
           this.categoryPurchase = info.categoryPurchase;
         }
         }
-        if (!info.categoryQms||!info.categoryQms?.length) {
+        if (!info.categoryQms || !info.categoryQms?.length) {
           this.categoryQms = [...copyObj(defCategoryQms)];
           this.categoryQms = [...copyObj(defCategoryQms)];
-        } else if(info.categoryQms.length==1) { //历史数据处理
-          this.categoryQms = [info.categoryQms[0],copyObj(defCategoryQms[1])];
-        }else{
-          this.categoryQms=info.categoryQms
+        } else if (info.categoryQms.length == 1) {
+          //历史数据处理
+          this.categoryQms = [info.categoryQms[0], copyObj(defCategoryQms[1])];
+        } else {
+          this.categoryQms = info.categoryQms;
         }
         }
         if (typeof info.categoryVehicle == 'string') {
         if (typeof info.categoryVehicle == 'string') {
           this.categoryVehicle = {};
           this.categoryVehicle = {};
@@ -1052,6 +1043,26 @@ import { copyObj } from '@/utils/util';
         // });
         // });
       },
       },
 
 
+      async getAttributeList(code) {
+        let res = await getByCode(code);
+
+        // this.attributeList = res.data.map((item) => {
+        //   let values = Object.keys(item);
+        //   return {
+        //     value: values[0],
+        //     label: item[values[0]]
+        //   };
+        // });
+
+        let list = res.data.map((item) => {
+          let key = Object.keys(item)[0];
+          return { value: Number(key), label: item[key] };
+        });
+        this.attributeList = list;
+
+        console.log(this.attributeList, 'this.attributeList');
+      },
+
       openCategory() {
       openCategory() {
         this.$refs.categoryRefs.open();
         this.$refs.categoryRefs.open();
       },
       },

+ 2 - 2
vue.config.js

@@ -36,8 +36,8 @@ module.exports = {
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.176:18086',
         // target: 'http://192.168.1.176:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.116:18086',
+        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
         pathRewrite: {
           '^/api': ''
           '^/api': ''