index.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <!-- @format -->
  2. <template>
  3. <view class="container">
  4. <view @click="handleApplicat" class="createFixed">
  5. <u-icon name="plus" color="#fff" size="23"></u-icon>
  6. </view>
  7. <view style="margin: 15rpx 0" v-if="activeContent == '我的申请'">
  8. <view style="background: #fff; padding: 10rpx 0; margin-bottom: 15rpx">
  9. <u-search @search='sousuo' shape="square" placeholder="请输入备案单编号"
  10. style="width: 95%; margin: 0rpx auto"></u-search>
  11. </view>
  12. <view class="contentItems" @click="handleDetails(item)" v-for="item in ledgerList">
  13. <view class="content">
  14. <!-- <view class="title">器具名称</view> -->
  15. <view style="color:black;font-size: 36rpx;font-weight:700;" class="message">{{item.instrName}}
  16. </view>
  17. </view>
  18. <view class="content">
  19. <view class="title">备案单编号:
  20. <text class="message" style="margin-left: 10rpx;color: red;font-weight: 700;font-size: 30rpx;">
  21. {{item.filingNo}}
  22. </text>
  23. </view>
  24. </view>
  25. <!-- <view class="content">
  26. <view class="title">备案状态</view>
  27. <view :style="{
  28. color: recordColor[recordStatus(item)],
  29. }">{{ recordStatus(item) }}</view>
  30. </view> -->
  31. <!-- <view class="content">
  32. <view class="title">行政部门</view>
  33. <view style="font-weight: 700;color: black;" class="message">{{item.useOrgName}}</view>
  34. </view> -->
  35. <view style="display: flex;justify-content: space-between;" class="">
  36. <view class="content">
  37. <view class="title">发起人:
  38. </view>
  39. <view style="width: 120rpx;" class="message">{{item.userName}}</view>
  40. </view>
  41. <view class="content">
  42. <view class="title">发起时间:</view>
  43. <view style="padding-top:5rpx;" class="message">{{item.createTime}}</view>
  44. </view>
  45. </view>
  46. <view style="display: flex;justify-content: space-between;" class="">
  47. <view style="display: flex;" class="content">
  48. <view class="title">联系电话:</view>
  49. <view style="padding-top:5rpx;" class="message">{{item.userMobile}}</view>
  50. </view>
  51. <view style="display: flex; align-items: center; " class="content">
  52. <view class="title">器具数量:</view>
  53. <view style="padding-top: 5rpx; " class="message">{{item.instrCount}}</view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <!-- <view v-else>
  59. <view>
  60. <view class="createNew">选择器具进行申请</view>
  61. <view class="contentItems" @click="handleCurrentForm">
  62. <view class="content">
  63. <view class="title">出厂编号</view>
  64. <view class="message">123478654</view>
  65. </view>
  66. <view class="content">
  67. <view class="title">器具名称</view>
  68. <view class="message">血压计和血压表</view>
  69. </view>
  70. <view class="content">
  71. <view class="title">规格型号</view>
  72. <view class="message">153430587834</view>
  73. </view>
  74. </view>
  75. <view class="contentItems">
  76. <view class="content">
  77. <view class="title">出厂编号</view>
  78. <view class="message">123478654</view>
  79. </view>
  80. <view class="content">
  81. <view class="title">器具名称</view>
  82. <view class="message">燃油加油机</view>
  83. </view>
  84. <view class="content">
  85. <view class="title">规格型号</view>
  86. <view class="message">20kg*10</view>
  87. </view>
  88. </view>
  89. <view class="contentItems">
  90. <view></view>
  91. <view class="content">
  92. <view class="title">出厂编号</view>
  93. <view class="message">123478654</view>
  94. </view>
  95. <view class="content">
  96. <view class="title">器具名称</view>
  97. <view class="message">汽车发动机检测仪</view>
  98. </view>
  99. <view class="content">
  100. <view class="title">规格型号</view>
  101. <view class="message">BJL</view>
  102. </view>
  103. </view>
  104. </view>
  105. </view> -->
  106. </view>
  107. </template>
  108. <script>
  109. import {
  110. getMiAuditApplyList
  111. } from "@/api/assay";
  112. import {
  113. useDict,
  114. paraseDict
  115. } from "@/utils/index";
  116. export default {
  117. data() {
  118. return {
  119. recordColor: {
  120. 已撤回: "#fa3534",
  121. 已接收: "#2979ff",
  122. 待提交: "#2979ff",
  123. 备案中: "#2979ff",
  124. 已拒绝: "#fa3534",
  125. 勿备案: "#fa3534",
  126. 未备案: "#909399",
  127. 免备案: "#909399",
  128. 已退回: "#fa3534",
  129. },
  130. record: [], //备案字典
  131. activeContent: "我的申请",
  132. tabsList: [{
  133. name: "我的申请",
  134. }, ],
  135. ledgerList: [],
  136. queryParams: {
  137. pageNum: 1,
  138. pageSize: 10,
  139. filingNo: '',
  140. orderByColumn: 'createTime',
  141. isAsc: 'Desc'
  142. },
  143. total: 0,
  144. };
  145. },
  146. async onLoad() {
  147. // useDict("ejian_instrCheckStatus").then((res) => {
  148. // this.verification = res;
  149. // });
  150. // useDict("ejian_instrCheckRecordStatusV2").then((res) => {
  151. // this.application = res;
  152. // });
  153. useDict("ejian_instrFillingStatus").then((res) => {
  154. this.record = res;
  155. });
  156. this.getList();
  157. uni.startPullDownRefresh();
  158. },
  159. onPullDownRefresh() {
  160. console.log('refresh');
  161. setTimeout(function() {
  162. uni.stopPullDownRefresh();
  163. }, 1000);
  164. },
  165. onShow() {
  166. uni.$once('query', (query) => {
  167. if (query.a == 'one') {
  168. this.queryParams.pageNum = 1
  169. this.queryParams.pageSize = 10
  170. this.getList()
  171. uni.startPullDownRefresh();
  172. }
  173. })
  174. },
  175. computed: {
  176. // //检定状态
  177. // verificationStatus() {
  178. // return (row) => {
  179. // return paraseDict(this.verification, row);
  180. // };
  181. // },
  182. // //申请状态
  183. // applicationStatus() {
  184. // return (row) => {
  185. // return paraseDict(this.application, row);
  186. // };
  187. // },
  188. //备案状态
  189. recordStatus() {
  190. return (row) => {
  191. return paraseDict(this.record, row);
  192. };
  193. },
  194. },
  195. methods: {
  196. sousuo(val) {
  197. console.log(val)
  198. this.queryParams.filingNo = val
  199. this.getList()
  200. },
  201. getList() {
  202. getMiAuditApplyList({
  203. ...this.queryParams
  204. }).then((res) => {
  205. this.ledgerList = res.rows;
  206. this.total = res.total;
  207. })
  208. },
  209. onReachBottom() {
  210. //触底事件
  211. if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
  212. uni.showToast({
  213. title: "没有更多数据了",
  214. icon: "none",
  215. duration: 1000,
  216. });
  217. setTimeout(() => {
  218. uni.hideLoading();
  219. }, 500);
  220. } else {
  221. if (this.queryParams.pageNum <= this.queryParams.pageNum - 1) {
  222. setTimeout(() => {
  223. uni.hideLoading();
  224. }, 500);
  225. } else {
  226. uni.showLoading({
  227. title: "加载中",
  228. });
  229. this.queryParams.pageNum++;
  230. getMiAuditApplyList({
  231. ...this.queryParams
  232. }).then(({
  233. rows,
  234. total
  235. }) => {
  236. this.ledgerList = [...this.ledgerList, ...rows];
  237. this.total = total;
  238. });
  239. }
  240. setTimeout(() => {
  241. uni.hideLoading();
  242. }, 500);
  243. }
  244. },
  245. //备案申请
  246. handleApplicat() {
  247. uni.navigateTo({
  248. // url: "/pages/assay/assayList",
  249. url: '/pages/assay/deptList',
  250. success: (res) => {},
  251. fail: () => {},
  252. complete: () => {},
  253. });
  254. },
  255. handleChange(row) {
  256. this.activeContent = row.name;
  257. },
  258. handleCurrentForm() {},
  259. handleDetails(item) {
  260. uni.navigateTo({
  261. url: "/pages/assay/details?id=" + item.id + '&danwei=' + item.useOrgName + '&applypeople=' +
  262. item.userName + '&userMobile=' + item.userMobile + '&createTime=' + item.createTime,
  263. success: (res) => {},
  264. fail: () => {},
  265. complete: () => {},
  266. });
  267. },
  268. },
  269. };
  270. </script>
  271. <style lang="scss" scoped>
  272. .createFixed {
  273. background: #2979ff;
  274. display: flex;
  275. justify-content: center;
  276. align-items: center;
  277. width: 90rpx;
  278. height: 90rpx;
  279. border-radius: 50%;
  280. position: fixed;
  281. right: 30rpx;
  282. bottom: 200rpx;
  283. }
  284. .createNew {
  285. font-size: 30rpx;
  286. margin: 10rpx 0 10rpx 10rpx;
  287. color: #3c9ff3;
  288. }
  289. .container {
  290. height: 100vh;
  291. background: rgb(243, 244, 249);
  292. .contentItems {
  293. width: 93%;
  294. border-radius: 6px;
  295. background: #fff;
  296. margin: 20rpx auto 10rpx;
  297. padding: 10rpx 30rpx 10rpx;
  298. .content {
  299. // border-bottom: 1px solid rgb(242, 242, 242);
  300. padding: 10rpx 0;
  301. display: flex;
  302. // justify-content: space-between;
  303. }
  304. .content:last-child {
  305. border-bottom: none;
  306. }
  307. .title {
  308. font-size: 28rpx;
  309. color: rgb(146, 146, 146);
  310. letter-spacing: 3rpx;
  311. }
  312. .message {
  313. font-size: 28rpx;
  314. color: rgb(146, 146, 146);
  315. }
  316. }
  317. }
  318. </style>