assayList.vue 6.6 KB

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