2 Commits dd2ed4b08c ... ec8211d7f4

Autor SHA1 Mensagem Data
  dongfeng ec8211d7f4 Merge remote-tracking branch 'origin/qirui-v2' into qirui-v2 há 9 meses atrás
  dongfeng 1bbc20d381 零部件DVP 材料清单 材料报告 试验报告文件上传下载 代码修改 há 9 meses atrás

+ 2 - 0
src/locales/lang/en-US/dvpPlan.js

@@ -73,6 +73,7 @@ export default {
   'plan.dvp.test-user': 'Test Leader',
   'plan.dvp.test-step': 'Test Phase',
   'plan.dvp.test-count': 'Number Of Tests',
+  'plan.dvp.material-list-file-name': 'Material List File Name',
   'plan.dvp.confirmation-status-of-material-list': 'Confirmation Status Of Material List',
   'plan.dvp.material-number': 'Bill Of Materials Number',
   'plan.dvp.template-edit': 'Template Editing',
@@ -106,6 +107,7 @@ export default {
   'verity.dvp.test.report.number': 'Test Report Number',
   'verity.dvp.test.report': 'Test Report',
   'verity.dvp.is.upload.material.report': 'Upload Material Reports Or Not',
+  'verity.dvp.material.report': 'Material Report',
   'verity.dvp.test.result.analysis': 'Test Results And Analysis',
   'verity.dvp.improvement.measures': 'Improvement Measures And Plans',
   'verity.dvp.material.list.number': 'Material Report Number',

+ 2 - 0
src/locales/lang/zh-CN/dvpPlan.js

@@ -68,6 +68,7 @@ export default {
   'verity.dvp.test.report.number': '试验报告编号',
   'verity.dvp.test.report': '试验报告',
   'verity.dvp.is.upload.material.report': '是否上传材料报告',
+  'verity.dvp.material.report': '材料报告',
   'verity.dvp.test.result.analysis': '测试结果及分析',
   'verity.dvp.improvement.measures': '改进措施及计划',
   'verity.dvp.material.list.number': '材料报告编号',
@@ -89,6 +90,7 @@ export default {
   'plan.dvp.test-user': '测试负责人',
   'plan.dvp.test-step': '测试阶段',
   'plan.dvp.test-count': '测试次数',
+  'plan.dvp.material-list-file-name': '材料清单文件名称',
   'plan.dvp.confirmation-status-of-material-list': '材料清单确认状态',
   'plan.dvp.material-number': '材料清单编号',
   'plan.dvp.template-edit': '模板编辑',

+ 10 - 11
src/views/componentsDVP/dvpPlan/editModal/editTableRow.vue

@@ -170,16 +170,16 @@
               </a-upload-dragger>
             </a-form-item>
           </a-row>
-          <a-row>
-            <!--已上传的材料清单-->
-            <a-col v-if="isUpload">
-              <a-form-item :label="$t('plan.dvp.uploaded-material-list')">
-                <a :href="$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + editParam.materialInventoryId + '&fileType=18'">
-                  {{ editParam.materialInventoryName }}
-                </a>
-              </a-form-item>
-            </a-col>
-          </a-row>
+<!--          <a-row>-->
+<!--            &lt;!&ndash;已上传的材料清单&ndash;&gt;-->
+<!--            <a-col v-if="isUpload">-->
+<!--              <a-form-item :label="$t('plan.dvp.uploaded-material-list')">-->
+<!--                <a :href="$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + editParam.materialInventoryId + '&fileType=18'">-->
+<!--                  {{ editParam.materialInventoryName }}-->
+<!--                </a>-->
+<!--              </a-form-item>-->
+<!--            </a-col>-->
+<!--          </a-row>-->
         </a-col>
       </a-row>
     </a-form>
@@ -496,7 +496,6 @@ export default {
         _that.$message.error(error.response.data.message, 1);
       });
     },
-
     /**
      * 取消按钮
      */

+ 30 - 0
src/views/componentsDVP/dvpPlan/index.vue

@@ -161,6 +161,9 @@
           <template slot='isEquivalent' slot-scope='text, record, index'>
             <span>{{ isOrNotMap[record.isEquivalent] || '-' }}</span>
           </template>
+          <template slot="materialInventoryName" slot-scope="text, record">
+            <span class="clickContent" @click="onClick(record)" :title="text">{{ text }}</span>
+          </template>
           <!-- 材料确认清单是否上传 -->
           <template slot='isUpload' slot-scope='text, record, index'>
             <span>{{ isOrNotMap[record.isUpload] || '-' }}</span>
@@ -464,6 +467,17 @@ export default {
           align: 'center',
           ellipsis: true
         },
+        // 材料清单文件名称
+        {
+          title: this.$t('plan.dvp.material-list-file-name'),
+          width: 150,
+          dataIndex: 'materialInventoryName',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'materialInventoryName'
+          },
+          ellipsis: true
+        },
         // 材料清单确认状态
         {
           title: this.$t('plan.dvp.confirmation-status-of-material-list'),
@@ -917,6 +931,17 @@ export default {
       this.applyTableData = [];
     },
 
+    /**
+     * 材料清单文件下载
+     * @param record
+     */
+    onClick(record) {
+      this.download('/DFMEA/file/downloadFile', {
+        id: record.materialInventoryId,
+        fileType: 18,
+      });
+    },
+
     /**
      * 申请变更
      * @param record
@@ -1143,4 +1168,9 @@ export default {
 .table-mr {
   margin-top: 12px;
 }
+
+/deep/ .clickContent {
+  color: #1890FF;
+  cursor: pointer;
+}
 </style>

+ 36 - 3
src/views/componentsDVP/verify/dvpVerify.vue

@@ -140,9 +140,10 @@
           </template>
           <!-- 试验报告下载 -->
           <template slot="testReport" slot-scope="text, record">
-            <a :href="$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + record.testReportId + '&fileType=17'">
-              {{ record.testReportFileName }}
-            </a>
+            <span class="clickContent" @click="onClick(record, 1)" :title="text">{{ text }}</span>
+          </template>
+          <template slot="materialsFileName" slot-scope="text, record">
+            <span class="clickContent" @click="onClick(record, 2)" :title="text">{{ text }}</span>
           </template>
         </a-table>
       </a-card>
@@ -502,6 +503,17 @@ export default {
             return val === null ? this.$t('global-btn.no') : this.$t('global-btn.yes');
           }
         },
+        {
+          // 材料报告
+          title: () => this.$t('verity.dvp.material.report'),
+          width: 250,
+          align: 'center',
+          dataIndex: 'materialsFileName',
+          ellipsis: true,
+          scopedSlots: {
+            customRender: "materialsFileName"
+          },
+        },
         {
           // 测试结果及分析
           title: () => this.$t('verity.dvp.test.result.analysis'),
@@ -594,6 +606,22 @@ export default {
     };
   },
   methods: {
+    /**
+     * 材料清单文件下载
+     * @param record
+     */
+    onClick(record, num) {
+      let fileId = undefined;
+      if (num === 1) { // 试验报告
+        fileId = record.testReportId;
+      } else if (num === 2) { // 材料报告
+        fileId = record.materialsReportId;
+      }
+      this.download('/DFMEA/file/downloadFile', {
+        id: fileId,
+        fileType: 17,
+      });
+    },
     /** 获取列表数据 */
     list() {
       let _that = this;
@@ -916,4 +944,9 @@ export default {
 .export-margin {
   margin-right: -24px;
 }
+
+/deep/ .clickContent {
+  color: #1890FF;
+  cursor: pointer;
+}
 </style>