details.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <!-- @format -->
  2. <template>
  3. <view class="container">
  4. <view class="contentItems">
  5. <view class="content">
  6. <view class="title">器具类型</view>
  7. <view class="message">{{ ledgerDetails.typeName }} </view>
  8. </view>
  9. <view class="content">
  10. <view class="title">器具用途</view>
  11. <view class="message">{{ ledgerDetails.purposeName }} </view>
  12. </view>
  13. <view class="content">
  14. <view class="title">器具名称</view>
  15. <view class="message">{{ ledgerDetails.name }}</view>
  16. </view>
  17. <view class="content">
  18. <view class="title">器具种别 </view>
  19. <view class="message">{{ ledgerDetails.className }}</view>
  20. </view>
  21. <view class="content">
  22. <view class="title">创建时间</view>
  23. <view class="message">{{ ledgerDetails.createTime }}</view>
  24. </view>
  25. <!-- <view class="content">
  26. <view class="title">制作单位</view>
  27. <view class="message">{{ ledgerDetails.manufactoryName }}</view>
  28. </view> -->
  29. <view class="content">
  30. <view class="title">规格型号</view>
  31. <view class="message">{{ ledgerDetails.modelSpecific }}</view>
  32. </view>
  33. <view class="content">
  34. <view class="title">出厂编号</view>
  35. <view class="message">{{ ledgerDetails.serialNumber }}</view>
  36. </view>
  37. <view class="content">
  38. <view class="title">生产日期</view>
  39. <view class="message">{{ ledgerDetails.productionDate }}</view>
  40. </view>
  41. <view class="content">
  42. <view class="title">内部编号</view>
  43. <view class="message">{{ ledgerDetails.internalNumber }}</view>
  44. </view>
  45. <view class="content">
  46. <view class="title">申请状态</view>
  47. <view
  48. class="message"
  49. :style="{
  50. color:
  51. applicationColor[applicationStatus(ledgerDetails.checkStatus)],
  52. }"
  53. >{{ applicationStatus(ledgerDetails.checkStatus) }}</view
  54. >
  55. </view>
  56. <view class="content">
  57. <view class="title">器具检定状态</view>
  58. <view
  59. class="message"
  60. :style="{
  61. color:
  62. verificationColor[verificationStatus(ledgerDetails.checkStatus)],
  63. }"
  64. >{{ verificationStatus(ledgerDetails.checkStatus) }}</view
  65. >
  66. </view>
  67. <view class="content">
  68. <view class="title">备案状态</view>
  69. <view
  70. class="message"
  71. :style="{
  72. color: recordColor[recordStatus(ledgerDetails.checkStatus)],
  73. }"
  74. >{{ recordStatus(ledgerDetails.checkStatus) }}</view
  75. >
  76. </view>
  77. <view class="content">
  78. <view class="title">使用单位</view>
  79. <view class="message">{{ ledgerDetails.useUnitName }}</view>
  80. </view>
  81. <view class="content">
  82. <view class="title">单位区域</view>
  83. <view class="message">{{ ledgerDetails.useAddrName }}</view>
  84. </view>
  85. <view class="content">
  86. <view class="title">使用地点</view>
  87. <view class="message">{{ ledgerDetails.setupPlace }}</view>
  88. </view>
  89. <!-- <view class="content">
  90. <view class="title">购置日期</view>
  91. <view class="message">{{ }}</view>
  92. </view> -->
  93. </view>
  94. <view class="history">
  95. <u-button type="primary" size="small">检定记录</u-button>
  96. <u-button type="primary" size="small">备案记录</u-button>
  97. </view>
  98. <view style="height: 20rpx"></view>
  99. </view>
  100. </template>
  101. <script>
  102. import { getLedgerDetails } from "@/api/Ledger";
  103. import { useDict, paraseDict } from "@/utils/index";
  104. export default {
  105. data() {
  106. return {
  107. ledgerDetails: {},
  108. verificationColor: {
  109. 未检定: "#909399",
  110. 已校准: "#19be6b",
  111. 已检定: "#19be6b",
  112. 不合格: "#fa3534",
  113. 已超期: "#fa3534",
  114. },
  115. applicationColor: {
  116. 已中止: "#fa3534",
  117. 已完成: "#19be6b",
  118. 未申请: "#909399",
  119. 不受理: "#fa3534",
  120. 办理中: "#2979ff",
  121. },
  122. recordColor: {
  123. 已撤回: "#fa3534",
  124. 已接收: "#19be6b",
  125. 待提交: "#2979ff",
  126. 备案中: "#2979ff",
  127. 已拒绝: "#fa3534",
  128. 勿备案: "#fa3534",
  129. 未备案: "#909399",
  130. 免备案: "#909399",
  131. 已退回: "#fa3534",
  132. },
  133. verification: [], //检定字典
  134. verification: [], //检定字典
  135. application: [], //申请字典
  136. record: [], //备案字典
  137. };
  138. },
  139. computed: {
  140. //检定状态
  141. verificationStatus() {
  142. return (row) => {
  143. return paraseDict(this.verification, row);
  144. };
  145. },
  146. //申请状态
  147. applicationStatus() {
  148. return (row) => {
  149. return paraseDict(this.application, row);
  150. };
  151. },
  152. //备案状态
  153. recordStatus() {
  154. return (row) => {
  155. return paraseDict(this.record, row);
  156. };
  157. },
  158. },
  159. onLoad(options) {
  160. useDict("ejian_instrCheckStatus").then((res) => {
  161. this.verification = res;
  162. });
  163. useDict("ejian_instrCheckRecordStatusV2").then((res) => {
  164. this.application = res;
  165. });
  166. useDict("ejian_instrFillingStatus").then((res) => {
  167. this.record = res;
  168. });
  169. getLedgerDetails({ id: options.id }).then((res) => {
  170. this.ledgerDetails = res.data;
  171. });
  172. },
  173. };
  174. </script>
  175. <style lang="scss" scoped>
  176. .history {
  177. background: #fff;
  178. width: 100%;
  179. position: fixed;
  180. bottom: 0;
  181. left: 0;
  182. }
  183. .container {
  184. height: 100vh;
  185. background: rgb(243, 244, 249);
  186. padding: 30rpx 0 110rpx;
  187. .contentItems {
  188. width: 95%;
  189. border-radius: 6px;
  190. background: #fff;
  191. margin: 0rpx auto 30rpx;
  192. padding: 20rpx 30rpx 20rpx;
  193. .content {
  194. border-bottom: 1px solid rgb(242, 242, 242);
  195. padding: 24rpx 0;
  196. display: flex;
  197. justify-content: space-between;
  198. }
  199. .content:last-child {
  200. border-bottom: none;
  201. }
  202. .title {
  203. font-size: 26rpx;
  204. color: black;
  205. letter-spacing: 3rpx;
  206. }
  207. .message {
  208. font-size: 26rpx;
  209. color: rgb(146, 146, 146);
  210. }
  211. }
  212. }
  213. </style>