reportTemplate.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <div class="report-container">
  3. <div class="report-header">
  4. <!-- <div class="company-logo">
  5. <img src="@/assets/logo.png" alt="嘉实医药" />
  6. </div> -->
  7. <div class="report-title">检验报告书</div>
  8. </div>
  9. <div class="report-info">
  10. <div class="info-item">
  11. <span class="label">编号:</span>
  12. <span class="value">{{ templateInfo.code }}</span>
  13. </div>
  14. <div class="info-item">
  15. <span class="label">报告单号:</span>
  16. <span class="value">{{ templateInfo.reportNumber }}</span>
  17. </div>
  18. </div>
  19. <table class="report-table">
  20. <tbody>
  21. <tr>
  22. <td class="td-label">检品名称</td>
  23. <td class="td-value" colspan="2">{{ templateInfo.productName }}</td>
  24. <td class="td-label">批号/序列号</td>
  25. <td class="td-value" colspan="2">{{ templateInfo.batchNo }}</td>
  26. </tr>
  27. <tr>
  28. <td class="td-label">规格型号</td>
  29. <td class="td-value" colspan="2">{{ templateInfo.specification }}/{{ templateInfo.modelType }}</td>
  30. <td class="td-label">数量</td>
  31. <td class="td-value" colspan="2">{{ templateInfo.total }}{{ templateInfo.unit }}</td>
  32. </tr>
  33. <tr>
  34. <td class="td-label">请验日期</td>
  35. <td class="td-value" colspan="2">{{ templateInfo.pleaseVerifyDate }}</td>
  36. <td class="td-label">请验部门</td>
  37. <td class="td-value" colspan="2">{{ templateInfo.pleaseVerifyDepartment }}</td>
  38. </tr>
  39. <tr>
  40. <td class="td-label">报告日期</td>
  41. <td class="td-value" colspan="2">{{ templateInfo.reportDate }}</td>
  42. <td class="td-label">有效期</td>
  43. <td class="td-value" colspan="2">{{ templateInfo.expirationDate }}</td>
  44. </tr>
  45. <tr>
  46. <td class="td-label">来源</td>
  47. <td class="td-value" colspan="2">{{ templateInfo.source }}</td>
  48. <td class="td-label">储存条件</td>
  49. <td class="td-value" colspan="2">{{ templateInfo.storageCondition }}</td>
  50. </tr>
  51. <tr>
  52. <td class="td-label">检验依据</td>
  53. <td class="td-value" colspan="5">{{ templateInfo.inspectionBasis }}</td>
  54. </tr>
  55. <tr>
  56. <td class="td-label">检验项目</td>
  57. <td class="td-value" colspan="3">标准规定</td>
  58. <td class="td-value" colspan="2">检验结果</td>
  59. </tr>
  60. <tr v-for="(item, index) in templateInfo.list" :key="index">
  61. <td class="td-value">{{ item.item }}</td>
  62. <td class="td-value" colspan="3">{{ item.standardRegulations }}</td>
  63. <td class="td-value" colspan="2">{{ item.results }}</td>
  64. </tr>
  65. <tr>
  66. <td class="td-label">结论</td>
  67. <td class="td-value" colspan="5">{{ templateInfo.conclusion }}</td>
  68. </tr>
  69. <tr>
  70. <td class="td-label">备注</td>
  71. <td class="td-value" colspan="5">{{ templateInfo.remarks }}</td>
  72. </tr>
  73. </tbody>
  74. </table>
  75. <div class="report-footer">
  76. <div class="footer-item">检验员:{{ templateInfo.inspector }} /日期:{{ templateInfo.inspectionTime }}</div>
  77. <div class="footer-item">复核人:{{ templateInfo.reviewer }} /日期:{{ templateInfo.reviewTime }}</div>
  78. <div class="footer-item">审核人:{{ templateInfo.checker }} /日期:{{ templateInfo.approvedDate }}</div>
  79. </div>
  80. </div>
  81. </template>
  82. <script>
  83. export default {
  84. name: 'ReportTemplate',
  85. props: {
  86. templateInfo: {
  87. type: Object,
  88. default: () => ({})
  89. }
  90. }
  91. }
  92. </script>
  93. <style scoped>
  94. .report-container {
  95. /* width: 500px; */
  96. width: 800px;
  97. margin: 0 auto;
  98. /* padding: 20px; */
  99. /* border: 1px solid #000; */
  100. /* font-family: Arial, sans-serif; */
  101. overflow-x: auto;
  102. white-space: nowrap;
  103. }
  104. .report-container::-webkit-scrollbar {
  105. height: 8px;
  106. }
  107. .report-container::-webkit-scrollbar-track {
  108. background: #f1f1f1;
  109. border-radius: 4px;
  110. }
  111. .report-container::-webkit-scrollbar-thumb {
  112. background: #c1c1c1;
  113. border-radius: 4px;
  114. }
  115. .report-container::-webkit-scrollbar-thumb:hover {
  116. background: #a8a8a8;
  117. }
  118. .report-header {
  119. display: flex;
  120. align-items: center;
  121. justify-content: space-between;
  122. margin-bottom: 10px;
  123. }
  124. .company-logo {
  125. width: 80px;
  126. height: 80px;
  127. }
  128. .company-logo img {
  129. width: 100%;
  130. height: 100%;
  131. }
  132. .report-title {
  133. font-size: 20px;
  134. font-weight: bold;
  135. text-align: center;
  136. flex: 1;
  137. margin-left: -80px;
  138. }
  139. .report-info {
  140. display: flex;
  141. justify-content: space-between;
  142. margin-bottom: 20px;
  143. }
  144. .info-item {
  145. display: flex;
  146. margin-right: 20px;
  147. align-items: center;
  148. }
  149. .info-item .label {
  150. font-weight: bold;
  151. margin-right: 10px;
  152. }
  153. .report-table {
  154. width: 100%;
  155. border-collapse: collapse;
  156. margin-bottom: 20px;
  157. }
  158. .report-table td {
  159. border: 1px solid #000;
  160. padding: 8px;
  161. }
  162. .td-label {
  163. font-weight: bold;
  164. background-color: #f5f5f5;
  165. /* width: 90px; */
  166. word-wrap: break-word;
  167. white-space: normal;
  168. }
  169. .td-value {
  170. word-wrap: break-word;
  171. white-space: normal;
  172. max-width: 250px;
  173. }
  174. .report-footer {
  175. display: flex;
  176. justify-content: space-between;
  177. margin-top: 20px;
  178. }
  179. .footer-item {
  180. flex: 1;
  181. text-align: center;
  182. margin-right: 20px;
  183. }
  184. </style>