assayList.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <!-- @format -->
  2. <template>
  3. <view class="container">
  4. <!-- <view style="margin: 15rpx 0">
  5. <view class="contentItems" @click="handleDetails" v-for="item of 2">
  6. <u-checkbox :customStyle="{ marginBottom: '8px' }"> 器具名称</u-checkbox>
  7. <view class="content">
  8. <view class="title">器具出厂编号
  9. <text style="margin-left: 50rpx"> 2024845782 </text>
  10. </view>
  11. </view>
  12. <view class="content">
  13. <view class="title">器具内部编号
  14. <text style="margin-left: 50rpx"> ygjpx-05 </text>
  15. </view>
  16. </view>
  17. <view class="content">
  18. <view class="title">制造单位</view>
  19. <view class="message">上海光正医疗有限公司</view>
  20. </view>
  21. <view class="content">
  22. <view class="title">规格型号</view>
  23. <view class="message">20kg*10</view>
  24. </view>
  25. </view>
  26. </view> -->
  27. <view style="margin: 15rpx 0">
  28. <view v-for="item in ledgerList" :key="item.id" class="contentItems">
  29. <u-checkbox-group placement="column" @change="changeCheckBox(item)">
  30. <view>
  31. <view
  32. class=""
  33. style="display: flex; justify-content: space-between"
  34. >
  35. <view style="display: flex" class="">
  36. <u-checkbox :name="item.id"></u-checkbox>
  37. <span style="font-weight: 700; font-size: 36rpx">{{
  38. item.name
  39. }}</span>
  40. </view>
  41. <view
  42. style="padding-top: 5rpx"
  43. :style="{
  44. color: recordColor[recordStatus(item.fillingStatus)],
  45. }"
  46. >{{ recordStatus(item.fillingStatus) }}</view
  47. >
  48. </view>
  49. <view
  50. style="margin: 10rpx 30rpx; color: #606266; line-height: 50rpx"
  51. class=""
  52. >
  53. <view
  54. >唯一标识:<span>
  55. {{ item.instrNo }}
  56. </span>
  57. </view>
  58. <span style="line-height: 50rpx">
  59. 制造单位:{{ item.manufactoryName }}
  60. </span>
  61. <br />
  62. <view style="display: flex; justify-content: space-between">
  63. <view>器具用途:{{ item.purposeName }}</view>
  64. <view> 规格型号:{{ item.modelSpecific }}</view>
  65. </view>
  66. <span
  67. style="
  68. display: flex;
  69. justify-content: space-between;
  70. align-items: center;
  71. line-height: 50rpx;
  72. "
  73. class=""
  74. >
  75. <span> 出厂编号: {{ item.serialNumber }}</span>
  76. <span> 内部编号: {{ item.internalNumber }}</span>
  77. </span>
  78. </view>
  79. </view>
  80. </u-checkbox-group>
  81. </view>
  82. </view>
  83. <view
  84. style="
  85. background: #fff;
  86. padding: 20rpx 0;
  87. position: fixed;
  88. bottom: 0;
  89. left: 0;
  90. width: 100%;
  91. display: flex;
  92. "
  93. >
  94. <u-button
  95. @click="handleApplicat"
  96. style="width: 95%; margin: 0 auto"
  97. type="primary"
  98. >确定</u-button
  99. >
  100. </view>
  101. </view>
  102. </template>
  103. <script>
  104. import { pageAudit } from "@/api/assay";
  105. import { useDict, paraseDict } from "@/utils/index";
  106. export default {
  107. data() {
  108. return {
  109. selectedItems: [],
  110. recordColor: {
  111. 已撤回: "#fa3534",
  112. 已接收: "#2979ff",
  113. 待提交: "#2979ff",
  114. 备案中: "#2979ff",
  115. 已拒绝: "#fa3534",
  116. 勿备案: "#fa3534",
  117. 未备案: "#909399",
  118. 免备案: "#909399",
  119. 已退回: "#fa3534",
  120. },
  121. record: [], //备案字典
  122. activeContent: "我的申请",
  123. tabsList: [
  124. {
  125. name: "我的申请",
  126. },
  127. ],
  128. queryParams: {
  129. pageNum: 1,
  130. pageSize: 10,
  131. orderByColumn: "createTime",
  132. isAsc: "Desc",
  133. },
  134. ledgerList: [],
  135. total: 0,
  136. loading: false,
  137. finished: false,
  138. };
  139. },
  140. onLoad(options) {
  141. useDict("ejian_instrFillingStatus").then((res) => {
  142. this.record = res;
  143. });
  144. this.queryParams.excludeIds = options.ids;
  145. this.getList();
  146. },
  147. computed: {
  148. // //检定状态
  149. // verificationStatus() {
  150. // return (row) => {
  151. // return paraseDict(this.verification, row);
  152. // };
  153. // },
  154. // //申请状态
  155. // applicationStatus() {
  156. // return (row) => {
  157. // return paraseDict(this.application, row);
  158. // };
  159. // },
  160. //备案状态
  161. recordStatus() {
  162. return (row) => {
  163. return paraseDict(this.record, row);
  164. };
  165. },
  166. },
  167. methods: {
  168. changeCheckBox(val) {
  169. console.log("val", val);
  170. console.log(this.selectedItems);
  171. if (this.selectedItems.indexOf(val) === -1) {
  172. this.selectedItems.push(val);
  173. } else {
  174. this.selectedItems.splice(this.selectedItems.indexOf(val), 1);
  175. }
  176. console.log("selectedItems", this.selectedItems);
  177. },
  178. getList() {
  179. pageAudit({
  180. ...this.queryParams,
  181. }).then(({ rows, total }) => {
  182. this.ledgerList = rows;
  183. this.total = total;
  184. });
  185. },
  186. onReachBottom() {
  187. //触底事件
  188. if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
  189. uni.showToast({
  190. title: "没有更多数据了",
  191. icon: "none",
  192. duration: 1000,
  193. });
  194. setTimeout(() => {
  195. uni.hideLoading();
  196. }, 500);
  197. } else {
  198. if (this.queryParams.pageNum <= this.queryParams.pageNum - 1) {
  199. setTimeout(() => {
  200. uni.hideLoading();
  201. }, 500);
  202. } else {
  203. uni.showLoading({
  204. title: "加载中",
  205. });
  206. this.queryParams.pageNum++;
  207. pageAudit({
  208. ...this.queryParams,
  209. }).then(({ rows, total }) => {
  210. this.ledgerList = [...this.ledgerList, ...rows];
  211. this.total = total;
  212. });
  213. }
  214. setTimeout(() => {
  215. uni.hideLoading();
  216. }, 500);
  217. }
  218. },
  219. handleDetails() {
  220. uni.navigateTo({
  221. url: "/pages/assay/assayDetails",
  222. success: (res) => {},
  223. fail: () => {},
  224. complete: () => {},
  225. });
  226. },
  227. handleApplicat() {
  228. getApp().globalData.deptListBeiAn = this.selectedItems;
  229. console.log(
  230. "getApp().globalData.deptListBeiAn ",
  231. getApp().globalData.deptListBeiAn
  232. );
  233. uni.$emit("query", {
  234. a: "two",
  235. });
  236. uni.navigateBack();
  237. },
  238. handleChange(row) {
  239. this.activeContent = row.name;
  240. },
  241. handleCurrentForm() {},
  242. },
  243. };
  244. </script>
  245. <style lang="scss" scoped>
  246. .createFixed {
  247. background: #2979ff;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. width: 90rpx;
  252. height: 90rpx;
  253. border-radius: 50%;
  254. position: fixed;
  255. right: 30rpx;
  256. bottom: 200rpx;
  257. }
  258. .createNew {
  259. font-size: 30rpx;
  260. margin: 20rpx 0 20rpx 20rpx;
  261. color: #3c9ff3;
  262. }
  263. .container {
  264. height: 100vh;
  265. background: rgb(243, 244, 249);
  266. .contentItems {
  267. width: 93%;
  268. border-radius: 6px;
  269. background: #fff;
  270. margin: 0rpx auto 20rpx;
  271. padding: 20rpx 30rpx 20rpx;
  272. .content {
  273. border-bottom: 1px solid rgb(242, 242, 242);
  274. padding: 24rpx 0;
  275. display: flex;
  276. justify-content: space-between;
  277. }
  278. .content:last-child {
  279. border-bottom: none;
  280. }
  281. .title {
  282. font-size: 26rpx;
  283. color: black;
  284. letter-spacing: 3rpx;
  285. }
  286. .message {
  287. font-size: 26rpx;
  288. color: rgb(146, 146, 146);
  289. }
  290. }
  291. }
  292. </style>