2 Ревизии 35ae5e2e9e ... ff5da5551a

Автор SHA1 Съобщение Дата
  dongfeng ff5da5551a Merge remote-tracking branch 'origin/qirui-v2' into qirui-v2 преди 10 месеца
  dongfeng e6222f6661 零部件DVP-计划页面 FND下拉选数据显示错误 代码修改 преди 10 месеца
променени са 4 файла, в които са добавени 17 реда и са изтрити 7 реда
  1. 5 0
      src/App.vue
  2. 2 1
      src/store/getters.js
  3. 3 2
      src/store/modules/dvp.js
  4. 7 4
      src/views/componentsDVP/dvpPlan/index.vue

+ 5 - 0
src/App.vue

@@ -128,6 +128,11 @@ export default {
       key: "dvpId",
       value: getUrlParam("dvpId")
     });
+    // 储存cpacId
+    this.$store.dispatch("dvp/set", {
+      key: "cpacId",
+      value: getUrlParam("cpacId")
+    });
     this.initStep();
     this.initBaseInfo();
     // 查询dvp信息

+ 2 - 1
src/store/getters.js

@@ -19,7 +19,8 @@ const getters = {
 	dvpOwnerId: state => state.dvp.dvpOwnerId,
 	dvpOwnerName: state => state.dvp.dvpOwnerName,
 	ownerDepartmentId: state => state.dvp.ownerDepartmentId,
-	dvpType: state => state.dvp.dvpType
+	dvpType: state => state.dvp.dvpType,
+	cpacId: state => state.dvp.cpacId
 
 };
 

+ 3 - 2
src/store/modules/dvp.js

@@ -7,7 +7,8 @@ const state = {
         dvpOwnerId: undefined,
         dvpOwnerName: undefined,
         ownerDepartmentId: undefined,
-        dvpType: undefined
+        dvpType: undefined,
+        cpacId: undefined
     },
 };
 const mutations = {
@@ -23,7 +24,7 @@ const mutations = {
     state['dvpOwnerName'] = undefined
     state['ownerDepartmentId'] = undefined
     state['dvpType'] = undefined
-
+    state['cpacId'] = undefined
 
   },
 };

+ 7 - 4
src/views/componentsDVP/dvpPlan/index.vue

@@ -601,7 +601,8 @@ export default {
       /** 申请变更按钮 是否显示 */
       applyButtonFlag: false,
       /** dvpType system:系统DVP,components:零部件DVP */
-      dvpType: "components"
+      dvpType: "components",
+      cpacId: this.$store.getters.cpacId
    }
   },
   mounted() {
@@ -638,8 +639,9 @@ export default {
             }
           });
           _that.pagination.total = res.data.total;
+          _that.cpacId = res.data.data[0].cpacId;
           if (res.data.data) {
-            _that.getFndCodeList(null,res.data.data[0].cpacId);
+            _that.getFndCodeList();
           }
         } else {
           _that.$message.error(res.message,1);
@@ -705,12 +707,13 @@ export default {
       let _that = this;
       _that.$api.getFndInfoList({
         fndCode: fndCode ? fndCode.toString() : '',
-        cpacId: cpacId
+        fndCn: fndCode ? fndCode.toString() : '',
+        cpacId: _that.cpacId
       }).then(res => {
         if (res.flag) {
           _that.fndCodeList = res.data || [];
           _that.fndCodeList.forEach(item => {
-            item.fndValue = item.id + '-' + item.fndCode;
+            item.fndValue = item.id + '-' + item.fndCode + item.fndCn;
           });
         } else {
           _that.$notification.error({message: res.message});