index.vue 8.8 KB

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