details.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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.auditStatus)],
  73. }"
  74. >{{ recordStatus(ledgerDetails.auditStatus) }}</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
  96. @click="handleVerificationHistory"
  97. :customStyle="{ width: '300rpx' }"
  98. type="success"
  99. shape="circle"
  100. :plain="true"
  101. size="small"
  102. >检定记录</u-button
  103. >
  104. <u-button
  105. @click="handleRecordHistory"
  106. :customStyle="{ width: '300rpx' }"
  107. type="primary"
  108. shape="circle"
  109. :plain="true"
  110. size="small"
  111. >备案记录</u-button
  112. >
  113. </view>
  114. <view style="height: 100rpx"></view>
  115. </view>
  116. </template>
  117. <script>
  118. import { getLedgerDetails } from "@/api/Ledger";
  119. import { useDict, paraseDict } from "@/utils/index";
  120. export default {
  121. data() {
  122. return {
  123. ledgerDetails: {},
  124. verificationColor: {
  125. 未检定: "#909399",
  126. 已校准: "#19be6b",
  127. 已检定: "#19be6b",
  128. 不合格: "#fa3534",
  129. 已超期: "#fa3534",
  130. },
  131. applicationColor: {
  132. 已中止: "#fa3534",
  133. 已完成: "#19be6b",
  134. 未申请: "#909399",
  135. 不受理: "#fa3534",
  136. 办理中: "#2979ff",
  137. },
  138. recordColor: {
  139. 已撤回: "#fa3534",
  140. 已接收: "#19be6b",
  141. 待提交: "#2979ff",
  142. 备案中: "#2979ff",
  143. 已拒绝: "#fa3534",
  144. 勿备案: "#fa3534",
  145. 未备案: "#909399",
  146. 免备案: "#909399",
  147. 已退回: "#fa3534",
  148. },
  149. verification: [], //检定字典
  150. verification: [], //检定字典
  151. application: [], //申请字典
  152. record: [], //备案字典
  153. };
  154. },
  155. computed: {
  156. //检定状态
  157. verificationStatus() {
  158. return (row) => {
  159. return paraseDict(this.verification, row);
  160. };
  161. },
  162. //申请状态
  163. applicationStatus() {
  164. return (row) => {
  165. return paraseDict(this.application, row);
  166. };
  167. },
  168. //备案状态
  169. recordStatus() {
  170. return (row) => {
  171. return paraseDict(this.record, row);
  172. };
  173. },
  174. },
  175. onLoad(options) {
  176. getLedgerDetails({ id: options.id }).then((res) => {
  177. this.ledgerDetails = res.data;
  178. });
  179. useDict("ejian_instrCheckStatus").then((res) => {
  180. this.verification = res;
  181. });
  182. useDict("ejian_instrCheckRecordStatusV2").then((res) => {
  183. this.application = res;
  184. });
  185. useDict("ejian_instrFillingStatus").then((res) => {
  186. this.record = res;
  187. });
  188. },
  189. methods: {
  190. //检定记录
  191. handleVerificationHistory() {
  192. console.log(this.ledgerDetails);
  193. uni.navigateTo({
  194. url: `/pages/Ledger/verificationHistory?id=${this.ledgerDetails.id}`,
  195. success: (res) => {},
  196. fail: () => {},
  197. complete: () => {},
  198. });
  199. },
  200. //备案记录
  201. handleRecordHistory() {
  202. uni.navigateTo({
  203. url: `/pages/Ledger/recordHistory?id=${this.ledgerDetails.id}`,
  204. success: (res) => {},
  205. fail: () => {},
  206. complete: () => {},
  207. });
  208. },
  209. },
  210. };
  211. </script>
  212. <style lang="scss" scoped>
  213. .history {
  214. display: flex;
  215. padding: 20rpx 10rpx;
  216. background: #fff;
  217. width: 100%;
  218. position: fixed;
  219. bottom: 0;
  220. left: 0;
  221. }
  222. .container {
  223. height: 100vh;
  224. background: rgb(243, 244, 249);
  225. padding: 30rpx 0 110rpx;
  226. .contentItems {
  227. width: 95%;
  228. border-radius: 6px;
  229. background: #fff;
  230. margin: 0rpx auto 30rpx;
  231. padding: 20rpx 30rpx 20rpx;
  232. .content {
  233. border-bottom: 1px solid rgb(242, 242, 242);
  234. padding: 24rpx 0;
  235. display: flex;
  236. justify-content: space-between;
  237. }
  238. .content:last-child {
  239. border-bottom: none;
  240. }
  241. .title {
  242. font-size: 26rpx;
  243. color: black;
  244. letter-spacing: 3rpx;
  245. }
  246. .message {
  247. font-size: 26rpx;
  248. color: rgb(146, 146, 146);
  249. }
  250. }
  251. }
  252. </style>