detailsList.vue 8.2 KB

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