From 9f0386489b0282f2291c11dca7530ef0f0259e25 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期六, 26 八月 2023 17:53:48 +0800 Subject: [PATCH] modified: src/api/experiment/checkTheReport.js modified: src/components/experiment/checkTheReport/index.vue modified: src/views/experiment/checkTheReport/index.vue modified: src/views/inspectionManagement/reportForInspection/index.vue --- src/components/experiment/checkTheReport/index.vue | 60 +++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 35 insertions(+), 25 deletions(-) diff --git a/src/components/experiment/checkTheReport/index.vue b/src/components/experiment/checkTheReport/index.vue index 72f4c28..fe7d0f5 100644 --- a/src/components/experiment/checkTheReport/index.vue +++ b/src/components/experiment/checkTheReport/index.vue @@ -8,25 +8,27 @@ <table> <tr> <td>鏉愭枡鍚嶇О</td> - <td colspan="5"></td> + <td colspan="5">{{reportData.name}}</td> </tr> <tr> <td>瑙勬牸鍨嬪彿</td> - <td colspan="2"></td> + <td colspan="2"> + {{reportData.specifications.split("-")[1]}} + </td> <td>鏉愭枡鍘傚</td> - <td colspan="2"></td> + <td colspan="2">{{reportData.supplier}}</td> </tr> <tr> - <td>鏉愭枡鎵瑰彿</td> - <td colspan="2"></td> + <td>鏉愭枡缂栧彿</td> + <td colspan="2">{{reportData.imCode}}</td> <td>妫�娴嬬紪鍙�</td> - <td colspan="2"></td> + <td colspan="2">{{reportData.insCode}}</td> </tr> <tr> <td>妫�娴嬩緷鎹�</td> - <td colspan="2"></td> + <td colspan="2">{{reportData.specifications.split("-")[0]}}</td> <td>妫�娴嬬被鍒�</td> - <td colspan="2"></td> + <td colspan="2">鍘熸潗鏂�</td> </tr> <tr> <td>搴忓彿</td> @@ -36,32 +38,30 @@ <td>妫�娴嬬粨鏋�</td> <td>鍗曢」鍒ゆ柇</td> </tr> - <tr v-for="item in 15" :key="item"> - <td>{{item}}</td> - <td></td> - <td></td> - <td></td> - <td></td> - <td></td> + <tr v-for="(item,index) in reportData.products" :key="item"> + <td>{{index+1}}</td> + <td>{{item.ipName}}</td> + <td>{{item.unit}}</td> + <td>{{item.required}}</td> + <td>{{item.testValue}}</td> + <td>{{item.testState == 1 ? "鈭�" : "X"}}</td> </tr> <tr> - <td colspan="6">妫�楠岀粨璁猴細</td> + <td colspan="6">妫�楠岀粨璁猴細{{reportData.type == 1 ? "鍚堟牸" : "涓嶅悎鏍�"}}</td> </tr> <tr> <td colspan="6"> - 娉細鈥溾垰鈥濊〃绀鸿椤圭洰鍚堟牸锛屸�溍椻�濊〃绀鸿椤圭洰涓嶅悎鏍尖�溾�斺�濊〃绀鸿椤圭洰涓嶈姹傛娴嬨�� + 娉細鈥溾垰鈥濊〃绀鸿椤圭洰鍚堟牸锛屸�溍椻�濊〃绀鸿椤圭洰涓嶅悎鏍硷紝鈥溾�斺�濊〃绀鸿椤圭洰涓嶈姹傛娴嬨�� </td> </tr> </table> <el-row class="date-group" :gutter="20"> - <el-col :span="8">妫�娴嬨�佹棩鏈燂細<span>2023-08-25</span></el-col> - <el-col :span="8">瀹℃牳銆佹棩鏈燂細<span>2023-08-25</span></el-col> - <el-col :span="8">鎵瑰噯銆佹棩鏈燂細<span>2023-08-25</span></el-col> + <el-col :span="12">妫�娴嬨�佹棩鏈燂細<span>{{reportData.createTime}}</span></el-col> + <el-col :span="12">瀹℃牳銆佹棩鏈燂細<span>{{reportData.checkTime}}</span></el-col> </el-row> <p class="footer"> - <span>缂栧彿:</span><span>ZTT/ICSRCP18-003</span> - <span> 鍙戣鏃ユ湡:</span><span>2023-08-25</span> - <span> 鍙戣閮ㄩ棬:</span><span>璐ㄩ噺閮�</span> + <span>缂栧彿:</span><span>{{reportData.reportCode}}</span> + <span> 鍙戣鏃ユ湡:</span><span>{{new Date() | formatDate}}</span> <span> 淇濆瓨鏈熼檺:</span><span>闀挎湡</span> </p> </div> @@ -73,7 +73,17 @@ return { logoSrc : require("@/assets/404_images/logo.png"), } - } + }, + methods:{ + formatDate(val){ + var dt = new Date(val); + let year = dt.getFullYear(); + let month = (dt.getMonth() + 1).toString().padStart(2,'0'); + let date = dt.getDate().toString().padStart(2,'0'); + return `${year}-${month}-${date}`; + } + }, + props:["reportData"] }) </script> <style scoped lang="scss"> @@ -105,7 +115,7 @@ border: 2px solid black; } tr,td,th{ - padding: 15px 20px; + padding: 5px 5px; } .date-group .el-col{ text-align: center; -- Gitblit v1.9.3