2 커밋 35ae5e2e9e ... ff5da5551a

작성자 SHA1 메시지 날짜
  dongfeng ff5da5551a Merge remote-tracking branch 'origin/qirui-v2' into qirui-v2 8 달 전
  dongfeng e6222f6661 零部件DVP-计划页面 FND下拉选数据显示错误 代码修改 8 달 전
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});