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

等效试验相关BUG修复

cuiyingze преди 7 месеца
родител
ревизия
57129c091f

+ 1 - 0
src/locales/lang/en-US/baseInfo.js

@@ -28,6 +28,7 @@ export default {
     'base.info.CPAC-code': 'CPAC Code',
     'base.info.system-name': 'System Name',
     'base.info.required-resources (vehicle rack)':'Required Resources (Vehicle Test Bench)',
+    'base.info.please-required-resources (vehicle rack)':'Please Enter Required Resources (Vehicle Test Bench)',
     'base.info.please-enter-system-name':'Please Enter System Name',
     'base.info.change-content': 'Change Content',
     'base.info.please-enter-change-content': 'Please Enter Change Content',

+ 3 - 1
src/locales/lang/en-US/dvpPlan.js

@@ -18,6 +18,7 @@ export default {
   'plan.dvp.sample-vehicle-plan-delivery-time': 'Sample Vehicle Plan Delivery Time',
   'plan.dvp.scheduled-start-time': 'Scheduled Start Time',
   'plan.dvp.scheduled-end-time': 'Scheduled End Time',
+  'plan.dvp.required-resources (vehicle rack)':'Required Resources (Vehicle Test Bench)',
   'plan.dvp.vehicle-performance-module': 'Vehicle Performance Module',
   'plan.dvp.serial-number': 'Serial Number',
   'plan.dvp.expand': 'Expand',
@@ -64,6 +65,7 @@ export default {
   'plan.dvp.please-enter-test-source': 'Please Enter Test Source',
   'plan.dvp.test-source-dvp-template': 'DVP Template',
   'plan.dvp.test-source-DFMEA': 'DFMEA',
+  'plan.dvp.test-source-manual-modification': 'Manual modification',
 
   /** 零部件DVP计划  */
   'plan.dvp.test-plan': 'Test Plan',
@@ -88,7 +90,7 @@ export default {
   'plan.dvp.material-number': 'Bill Of Materials Number',
   'plan.dvp.template-add': 'Template Adding',
   'plan.dvp.project-fmea-add': 'Project FMEA Adding',
-  'plan.dvp.history-dvp-add': 'Historical DVP adding',
+  'plan.dvp.history-dvp-add': 'Historical Project Adding',
   'plan.dvp.non-equivalent-experiment': 'Non Equivalent Experiment',
   'plan.dvp.equivalent-experiment': 'Equivalent Experiment',
   'plan.dvp.push-to-component-DVP-template': 'Push To Component DVP Template',

+ 1 - 0
src/locales/lang/zh-CN/baseInfo.js

@@ -24,6 +24,7 @@ export default {
     'base.info.required.resources':'需求资源',
     'base.info.please-enter-required.resources':'请输入需求资源',
     'base.info.required-resources (vehicle rack)':'需求资源(整车 台架)',
+    'base.info.please-required-resources (vehicle rack)':'请输入需求资源(整车 台架)',
     'base.info.please-choose-owner': '请选择需求负责人',
     'base.info.development.scope': '开发范围',
     'base.info.serial-number': '序号',

+ 3 - 1
src/locales/lang/zh-CN/dvpPlan.js

@@ -18,6 +18,7 @@ export default {
   'plan.dvp.sample-vehicle-plan-delivery-time': '样车计划提供时间',
   'plan.dvp.scheduled-start-time': '计划开始时间',
   'plan.dvp.scheduled-end-time': '计划结束时间',
+  'plan.dvp.required-resources (vehicle rack)':'需求资源(整车 台架)',
   'plan.dvp.vehicle-performance-module': '整车性能模块',
   'plan.dvp.serial-number': '序号',
   'plan.dvp.expand': '展开',
@@ -58,6 +59,7 @@ export default {
   'plan.dvp.please-enter-test-source': '请输入试验来源',
   'plan.dvp.test-source-dvp-template': 'DVP模板',
   'plan.dvp.test-source-DFMEA': 'DFMEA',
+  'plan.dvp.test-source-manual-modification': '手动修改',
   'plan.dvp.test-type-mule-car': 'Mule car',
   'plan.dvp.test-type-know-the-real-situation': '摸底',
   'plan.dvp.test-type-alignment': '调校',
@@ -105,7 +107,7 @@ export default {
   'plan.dvp.material-number': '材料清单编号',
   'plan.dvp.template-add': '模板添加',
   'plan.dvp.project-fmea-add': '项目FMEA添加',
-  'plan.dvp.history-dvp-add': '历史DVP添加',
+  'plan.dvp.history-dvp-add': '历史项目添加',
   'plan.dvp.non-equivalent-experiment': '非等效实验',
   'plan.dvp.equivalent-experiment': '等效实验',
   'plan.dvp.push-to-component-DVP-template': '推送至零部件DVP模板',

+ 41 - 12
src/views/componentsDVP/verify/dvpVerify.vue

@@ -151,7 +151,8 @@
           </template>
           <!--操作-->
           <template slot='operation' slot-scope='name, row'>
-            <a href='javascript: void(0);' @click='editInit(row)' :disabled="isLook">
+           <!-- 等效试验的试验在验证阶段,不用编辑   -->
+            <a href='javascript: void(0);' @click='editInit(row)' :disabled="isLook || row.equivalentId">
               <!-- 编辑 -->
               <a-tooltip :title="$t('global-btn.edit')">
                 <i class='iconfont iconicon-bianji'></i>
@@ -165,6 +166,9 @@
           <template slot="materialsFileName" slot-scope="text, record">
             <span class="clickContent" @click="viewReport(record, 2)" :title="text">{{ text }}</span>
           </template>
+          <template slot="equivalentCode" slot-scope="text, record">
+            <span :title="text" class="clickContent" @click="viewReport(record, 3)"> {{ record.equivalentCode || '-'}} </span>
+          </template>
         </a-table>
       </a-card>
     </a-row>
@@ -498,6 +502,16 @@ export default {
             return val === '1' ? this.$t('plan.dvp.non-equivalent-experiment') : this.$t('plan.dvp.equivalent-experiment');
           }
         },
+        {
+          // 等效实验报告编号
+          title: () => this.$t('plan.dvp.equivalent-experiment-report-number'),
+          width: 150,
+          align: 'center',
+          dataIndex: 'e',
+          scopedSlots: {
+            customRender: "equivalentCode"
+          }
+        },
         {
           // 测试开始日期
           title: () => this.$t('verity.dvp.test.start.date'),
@@ -772,16 +786,30 @@ export default {
      * @param record
      */
     viewReport(record, num) {
-      let fileId = undefined;
-      let fileName = undefined;
-      if (num === 1) { // 试验报告
-        fileId = record.testReportId;
-        fileName = record.testReportFileName;
-      } else if (num === 2) { // 材料报告
-        fileId = record.materialsReportId;
-        fileName = record.materialsFileName;
-      }
-      let url = this.$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + parseInt(fileId) + '&fileType=17';
+
+      let fileIdMapping = {
+        1: 'testReportId',
+        2: 'materialsReportId',
+        3: 'equivalentId'
+      };
+
+      let fileNameMapping = {
+        1: 'testReportFileName',
+        2: 'materialsFileName',
+        3: 'equivalentName'
+      };
+
+      let fileTypeMapping = {
+        1: '17',
+        2: '17',
+        3: '8'
+      };
+
+      let fileId = record[fileIdMapping[num]] || null;
+      let fileName = record[fileNameMapping[num]] || null;
+      let fileType = fileTypeMapping[num];
+
+      let url = this.$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + parseInt(fileId) + '&fileType=' + fileType;
       fetch(url, {
         method: 'get'
       }).then(res => {
@@ -796,7 +824,7 @@ export default {
       });
       this.download('/DFMEA/file/downloadFile', {
         id: fileId,
-        fileType: 17
+        fileType: fileType
       });
     },
     /** 获取列表数据 */
@@ -842,6 +870,7 @@ export default {
         testStartTime: this.queryParam.testStartTime || '',
         testEndTime: this.queryParam.testEndTime || '',
         testReportCode: this.queryParam.testReportCode || '',
+        isEquivalent: this.queryParam.isEquivalent || '',
         testResult: this.testResult || '',
       });
     },