verificationList.vue 8.4 KB

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