detailsList.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view class="container">
  3. <view v-for="item in ledgerList" style="margin-top: 15rpx;" class="content-header">
  4. <view class="">
  5. <view style="justify-content: space-between; " class="content">
  6. <view style="color:black;font-size: 36rpx;font-weight: 700;" class="message">
  7. {{item.miInstrument.name}}
  8. </view>
  9. <view style="padding-top: 5rpx;" :style="{
  10. color: recordColor[recordStatus(item.miInstrument.fillingStatus)],
  11. }">{{ recordStatus(item.miInstrument.fillingStatus) }}</view>
  12. </view>
  13. <view style="display: flex;" class="content">
  14. <view class="title">唯一标识:<span class="message">{{item.miInstrument.instrNo}}
  15. </span>
  16. </view>
  17. </view>
  18. <view style="display: flex;" class="content">
  19. <view class="title">器具用途:</view>
  20. <view class="message">{{item.miInstrument.purposeName}}</view>
  21. </view>
  22. <view class="content">
  23. <view class="title">制造单位:</view>
  24. <view class="message">{{item.miInstrument.manufactoryName}}</view>
  25. </view>
  26. <view style="display: flex;justify-content: space-between;" class="">
  27. <view style="display: flex;" class="content">
  28. <view class="title">器具类型:</view>
  29. <view style="padding-top: 5rpx; " class="message">
  30. {{item.miInstrument.typeName}}
  31. </view>
  32. </view>
  33. <view style="display: flex; align-items: center;" class="content">
  34. <view class="title">规格型号:</view>
  35. <view class="message">{{item.miInstrument.modelSpecific}}</view>
  36. </view>
  37. </view>
  38. <view style="display: flex;justify-content: space-between;" class="">
  39. <view style="display: flex;" class="content">
  40. <view class="title">出厂编号:</view>
  41. <view style="padding-top: 5rpx; " class="message">
  42. {{item.miInstrument.serialNumber}}
  43. </view>
  44. </view>
  45. <view style="display: flex; align-items: center;" class="content">
  46. <view class="title">内部编号:</view>
  47. <view class="message">{{item.miInstrument.internalNumber}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view style="display: flex;" class="submitBtn">
  53. <u-button @click="downLoadPDF" type="primary" style="margin: 0 auto; width:47%">备案申请单PDF下载</u-button>
  54. <u-button v-if="showChehui" @click="chehui" type="error" style="margin: 0rpx auto; width: 47%">撤回</u-button>
  55. </view>
  56. <u-modal :show="show" :showCancelButton='true' @cancel="show=false" @confirm="handleGD" title="提示"
  57. content='确认要撤回此备案单吗?'></u-modal>
  58. </view>
  59. </template>
  60. <script>
  61. import {
  62. getMiAuditApplyOneList,
  63. getMiAuditApplyRoobtList,
  64. backAudit
  65. } from "@/api/assay";
  66. import {
  67. useDict,
  68. paraseDict
  69. } from "@/utils/index";
  70. export default {
  71. data() {
  72. return {
  73. show: false,
  74. recordColor: {
  75. 已撤回: "#fa3534",
  76. 已接收: "#2979ff",
  77. 待提交: "#2979ff",
  78. 备案中: "#2979ff",
  79. 已拒绝: "#fa3534",
  80. 勿备案: "#fa3534",
  81. 未备案: "#909399",
  82. 免备案: "#909399",
  83. 已退回: "#fa3534",
  84. },
  85. record: [], //备案字典
  86. ledgerList: [],
  87. total: 0,
  88. record: [],
  89. showChehui: true,
  90. queryParams: {
  91. pageNum: 1,
  92. pageSize: 10,
  93. auditOrderId: '',
  94. auditOrderApplyId: ''
  95. }
  96. }
  97. },
  98. onLoad(option) {
  99. useDict("ejian_instrFillingStatus").then((res) => {
  100. this.record = res;
  101. });
  102. this.queryParams.auditOrderId = option.auditOrderId,
  103. this.queryParams.auditOrderApplyId = option.auditOrderApplyId
  104. getMiAuditApplyRoobtList({
  105. ...this.queryParams
  106. }).then((res) => {
  107. this.ledgerList = res.rows;
  108. this.total = res.total;
  109. })
  110. if (this.ledgerList[0].miInstrument.fillingStatus == '7') {
  111. this.showChehui = false
  112. }
  113. },
  114. computed: {
  115. // //检定状态
  116. // verificationStatus() {
  117. // return (row) => {
  118. // return paraseDict(this.verification, row);
  119. // };
  120. // },
  121. // //申请状态
  122. // applicationStatus() {
  123. // return (row) => {
  124. // return paraseDict(this.application, row);
  125. // };
  126. // },
  127. //备案状态
  128. recordStatus() {
  129. return (row) => {
  130. return paraseDict(this.record, row);
  131. };
  132. },
  133. },
  134. methods: {
  135. chehui() {
  136. this.show = true
  137. },
  138. handleGD() {
  139. backAudit({
  140. applyId: this.queryParams.auditOrderApplyId
  141. }).then((res) => {
  142. uni.showToast({
  143. title: "撤回成功",
  144. icon: "none",
  145. duration: 1000,
  146. });
  147. setTimeout(() => {
  148. uni.navigateBack()
  149. })
  150. })
  151. },
  152. downLoadPDF() {},
  153. onReachBottom() {
  154. //触底事件
  155. if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
  156. uni.showToast({
  157. title: "没有更多数据了",
  158. icon: "none",
  159. duration: 1000,
  160. });
  161. setTimeout(() => {
  162. uni.hideLoading();
  163. }, 500);
  164. } else {
  165. if (this.queryParams.pageNum <= this.queryParams.pageNum - 1) {
  166. setTimeout(() => {
  167. uni.hideLoading();
  168. }, 500);
  169. } else {
  170. uni.showLoading({
  171. title: "加载中",
  172. });
  173. this.queryParams.pageNum++;
  174. getMiAuditApplyRoobtList({
  175. ...this.queryParams
  176. }).then(({
  177. rows,
  178. total
  179. }) => {
  180. this.ledgerList = [...this.ledgerList, ...rows];
  181. this.total = total;
  182. });
  183. }
  184. setTimeout(() => {
  185. uni.hideLoading();
  186. }, 500);
  187. }
  188. },
  189. }
  190. }
  191. </script>
  192. <style lang="scss">
  193. .submitBtn {
  194. width: 100%;
  195. background: #fff;
  196. padding: 15rpx 0;
  197. position: fixed;
  198. bottom: 0;
  199. }
  200. .content-header {
  201. width: 95%;
  202. border-radius: 6px;
  203. background: #fff;
  204. margin: 10rpx auto 10rpx;
  205. padding: 20rpx 30rpx 10rpx;
  206. .content {
  207. /* border-bottom: 1px solid rgb(242, 242, 242); */
  208. padding: 8rpx 0;
  209. display: flex;
  210. /* justify-content: space-between; */
  211. }
  212. .content:last-child {
  213. border-bottom: none;
  214. }
  215. .passIcon {
  216. position: absolute;
  217. top: 20rpx;
  218. right: 40rpx;
  219. }
  220. .title {
  221. font-size: 28rpx;
  222. color: rgb(146, 146, 146);
  223. letter-spacing: 3rpx;
  224. }
  225. .message {
  226. font-size: 28rpx;
  227. color: rgb(146, 146, 146);
  228. }
  229. }
  230. .container {
  231. height: 100vh;
  232. background: rgb(243, 244, 249);
  233. padding: 0rpx 0 110rpx;
  234. .contentItems {
  235. width: 95%;
  236. border-radius: 6px;
  237. background: #fff;
  238. margin: 0rpx auto 10rpx;
  239. padding: 10rpx 30rpx 10rpx;
  240. .content {
  241. /* border-bottom: 1px solid rgb(242, 242, 242); */
  242. padding: 14rpx 0;
  243. display: flex;
  244. /* justify-content: space-between; */
  245. }
  246. .content:last-child {
  247. border-bottom: none;
  248. }
  249. .title {
  250. font-size: 28rpx;
  251. color: black;
  252. letter-spacing: 3rpx;
  253. }
  254. .message {
  255. font-size: 28rpx;
  256. color: rgb(146, 146, 146);
  257. }
  258. }
  259. }
  260. </style>