detailsList.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <view class="container">
  3. <view v-for="item in ledgerList" :key="item.id" 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 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. if (this.ledgerList[0].miInstrument.fillingStatus == "7") {
  110. this.showChehui = false;
  111. }
  112. });
  113. console.log(
  114. "this.ledgerList[0].miInstrument.fillingStatus",
  115. this.ledgerList
  116. );
  117. // for(let i=0;i<this.ledgerList)
  118. },
  119. computed: {
  120. // //检定状态
  121. // verificationStatus() {
  122. // return (row) => {
  123. // return paraseDict(this.verification, row);
  124. // };
  125. // },
  126. // //申请状态
  127. // applicationStatus() {
  128. // return (row) => {
  129. // return paraseDict(this.application, row);
  130. // };
  131. // },
  132. //备案状态
  133. recordStatus() {
  134. return (row) => {
  135. return paraseDict(this.record, row);
  136. };
  137. },
  138. },
  139. methods: {
  140. chehui() {
  141. this.show = true;
  142. },
  143. handleGD() {
  144. backAudit({
  145. applyId: this.queryParams.auditOrderApplyId,
  146. }).then((res) => {
  147. uni.showToast({
  148. title: "撤回成功",
  149. icon: "none",
  150. duration: 1000,
  151. });
  152. getMiAuditApplyRoobtList({
  153. ...this.queryParams,
  154. }).then((res) => {
  155. this.ledgerList = res.rows;
  156. this.total = res.total;
  157. if (this.ledgerList[0].miInstrument.fillingStatus == "7") {
  158. this.showChehui = false;
  159. }
  160. this.show = false;
  161. });
  162. // setTimeout(() => {
  163. // uni.navigateBack()
  164. // })
  165. });
  166. },
  167. // downLoadPDF() {
  168. // console.log('’', path)
  169. // uni.downloadFile({
  170. // url: path,
  171. // success: (res) => {
  172. // var filePath = res.tempFilePath;
  173. // uni.openDocument({
  174. // filePath: filePath,
  175. // showMenu: true,
  176. // success: function(res) {
  177. // console.log('打开文档成功');
  178. // }
  179. // });
  180. // }
  181. // })
  182. // },
  183. onReachBottom() {
  184. //触底事件
  185. if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
  186. uni.showToast({
  187. title: "没有更多数据了",
  188. icon: "none",
  189. duration: 1000,
  190. });
  191. setTimeout(() => {
  192. uni.hideLoading();
  193. }, 500);
  194. } else {
  195. if (this.queryParams.pageNum <= this.queryParams.pageNum - 1) {
  196. setTimeout(() => {
  197. uni.hideLoading();
  198. }, 500);
  199. } else {
  200. uni.showLoading({
  201. title: "加载中",
  202. });
  203. this.queryParams.pageNum++;
  204. getMiAuditApplyRoobtList({
  205. ...this.queryParams,
  206. }).then(({
  207. rows,
  208. total
  209. }) => {
  210. this.ledgerList = [...this.ledgerList, ...rows];
  211. this.total = total;
  212. });
  213. }
  214. setTimeout(() => {
  215. uni.hideLoading();
  216. }, 500);
  217. }
  218. },
  219. },
  220. };
  221. </script>
  222. <style lang="scss">
  223. .submitBtn {
  224. width: 100%;
  225. background: #fff;
  226. padding: 15rpx 0;
  227. position: fixed;
  228. bottom: 0;
  229. }
  230. .content-header {
  231. width: 95%;
  232. border-radius: 6px;
  233. background: #fff;
  234. margin: 10rpx auto 10rpx;
  235. padding: 20rpx 30rpx 10rpx;
  236. .content {
  237. /* border-bottom: 1px solid rgb(242, 242, 242); */
  238. padding: 8rpx 0;
  239. display: flex;
  240. /* justify-content: space-between; */
  241. }
  242. .content:last-child {
  243. border-bottom: none;
  244. }
  245. .passIcon {
  246. position: absolute;
  247. top: 20rpx;
  248. right: 40rpx;
  249. }
  250. .title {
  251. font-size: 28rpx;
  252. color: rgb(146, 146, 146);
  253. letter-spacing: 3rpx;
  254. }
  255. .message {
  256. font-size: 28rpx;
  257. color: rgb(146, 146, 146);
  258. }
  259. }
  260. .container {
  261. height: 100vh;
  262. background: rgb(243, 244, 249);
  263. padding: 0rpx 0 110rpx;
  264. .contentItems {
  265. width: 95%;
  266. border-radius: 6px;
  267. background: #fff;
  268. margin: 0rpx auto 10rpx;
  269. padding: 10rpx 30rpx 10rpx;
  270. .content {
  271. /* border-bottom: 1px solid rgb(242, 242, 242); */
  272. padding: 14rpx 0;
  273. display: flex;
  274. /* justify-content: space-between; */
  275. }
  276. .content:last-child {
  277. border-bottom: none;
  278. }
  279. .title {
  280. font-size: 28rpx;
  281. color: black;
  282. letter-spacing: 3rpx;
  283. }
  284. .message {
  285. font-size: 28rpx;
  286. color: rgb(146, 146, 146);
  287. }
  288. }
  289. }
  290. </style>