deptList.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <view class="container">
  3. <view style="margin-top: 15rpx;padding-bottom: 110rpx;">
  4. <view style="font-size: 30rpx;" class="content-header">
  5. <view class="content">
  6. <view style="font-size: 30rpx;" class="title">申请单位</view>
  7. <view>{{danwei}}</view>
  8. </view>
  9. <view class="content">
  10. <view style="font-size: 30rpx;" class="title">申请人</view>
  11. <view>{{applyPeople}}</view>
  12. </view>
  13. <view class="content">
  14. <view style="font-size: 30rpx;" class="title">联系电话</view>
  15. <view>{{userMobile}}</view>
  16. </view>
  17. </view>
  18. <view class="">
  19. <u-swipe-action ref="swipeAction" v-for="(item,index) in assList"
  20. style="margin: 20rpx; border-radius: 10rpx; overflow: hidden;">
  21. <u-swipe-action-item ref="item" @click="shanchu(item)" :options="options2">
  22. <view style="border-radius: 10rpx; background-color: #fff; padding: 10rpx;">
  23. <view class="">
  24. <view style="margin-top: 15rpx;" class="content-header1">
  25. <view style="margin-bottom: 30rpx;" class="">
  26. <view style="justify-content: space-between; " class="content">
  27. <view style="color:black;font-size: 36rpx;font-weight: 700;"
  28. class="message">
  29. {{item.name}}
  30. </view>
  31. <view style="padding-top: 5rpx;" :style="{
  32. color: recordColor[recordStatus(item.fillingStatus)],
  33. }">{{ recordStatus(item.fillingStatus) }}</view>
  34. </view>
  35. <view style="display: flex;" class="content">
  36. <view class="title">唯一标识:<span class="message">
  37. {{item.instrNo}}
  38. </span>
  39. </view>
  40. </view>
  41. <view style="display: flex;" class="content">
  42. <view class="title">器具用途:</view>
  43. <view class="message">
  44. {{item.purposeName}}
  45. </view>
  46. </view>
  47. <view class="content">
  48. <view class="title">制造单位:</view>
  49. <view class="message">
  50. {{item.manufactoryName}}
  51. </view>
  52. </view>
  53. <view style="display: flex;justify-content: space-between;" class="">
  54. <view style="display: flex;" class="content">
  55. <view class="title">器具类型:</view>
  56. <view class="message">
  57. {{item.typeName}}
  58. </view>
  59. </view>
  60. <view style="display: flex; align-items: center;" class="content">
  61. <view class="title">规格型号:</view>
  62. <view style="padding-top: 5rpx; " class="message">
  63. {{item.modelSpecific}}
  64. </view>
  65. </view>
  66. </view>
  67. <view style="display: flex;justify-content: space-between;" class="">
  68. <view style="display: flex;" class="content">
  69. <view class="title">出厂编号:</view>
  70. <view style="padding-top: 5rpx; " class="message">
  71. {{item.serialNumber}}
  72. </view>
  73. </view>
  74. <view style="display: flex; align-items: center;" class="content">
  75. <view class="title">内部编号:</view>
  76. <view class="message">
  77. {{item.internalNumber}}
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </u-swipe-action-item>
  86. </u-swipe-action>
  87. </view>
  88. <view style="height: 270rpx;" class="content-header">
  89. <u-checkbox-group style="margin-top: 20rpx;" v-model="checkboxValue1" placement="column"
  90. @change="checkboxChange">
  91. <u-checkbox style="color:red;" v-for="item in checkBoxList" :key="item" :label="item.name"
  92. :name='item.label'>
  93. </u-checkbox>
  94. </u-checkbox-group>
  95. </view>
  96. </view>
  97. <view class="submitBtn" style="
  98. display: flex;
  99. ">
  100. <u-button @click="qingkong" style="width: 47%; margin: 0 auto" type="warning">清空</u-button>
  101. <u-button @click="submitBeian" style="width: 47%; margin: 0 auto" type="success">提交</u-button>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. import {
  107. useDict,
  108. paraseDict
  109. } from "@/utils/index";
  110. import {
  111. addMiAuditOrder
  112. } from '@/api/assay.js'
  113. import {
  114. getInfo
  115. } from '@/api/login.js'
  116. export default {
  117. data() {
  118. return {
  119. options2: [{
  120. text: '删除',
  121. style: {
  122. backgroundColor: '#f56c6c'
  123. }
  124. }, ],
  125. danwei: '',
  126. checkboxValue1: [],
  127. checkBoxList: [{
  128. name: '我单位承诺,本次提交备案的计量器具的相关信息均真实准确,经过自我严格审核,均符合《市场监管总局关于调整实施强制管理的计量器具目录的公告》(国家市场监督管理总局公告2020年第42号)中《实施强制管理的计量器具目录》的规定。',
  129. label: false
  130. }],
  131. applyPeople: '',
  132. createTime: '',
  133. userMobile: '',
  134. dataList: [],
  135. assList: [],
  136. recordColor: {
  137. 已撤回: "#fa3534",
  138. 已接收: "#2979ff",
  139. 待提交: "#2979ff",
  140. 备案中: "#2979ff",
  141. 已拒绝: "#fa3534",
  142. 勿备案: "#fa3534",
  143. 未备案: "#909399",
  144. 免备案: "#909399",
  145. 已退回: "#fa3534",
  146. },
  147. record: [], //备案字典
  148. }
  149. },
  150. onLoad() {
  151. useDict("ejian_instrFillingStatus").then((res) => {
  152. this.record = res;
  153. });
  154. getInfo().then((res) => {
  155. console.log(',', res)
  156. this.danwei = res.data.mechanism.insertName
  157. this.applyPeople = res.data.mechanism.userName
  158. this.userMobile = res.data.mechanism.userMobile
  159. })
  160. let that = this
  161. },
  162. onShow() {
  163. uni.$once('query', (query) => {
  164. if (query.a == 'two') {
  165. console.log('11', getApp().globalData.deptListBeiAn)
  166. this.assList.push(...getApp().globalData.deptListBeiAn)
  167. }
  168. })
  169. },
  170. computed: {
  171. // //检定状态
  172. // verificationStatus() {
  173. // return (row) => {
  174. // return paraseDict(this.verification, row);
  175. // };
  176. // },
  177. // //申请状态
  178. // applicationStatus() {
  179. // return (row) => {
  180. // return paraseDict(this.application, row);
  181. // };
  182. // },
  183. //备案状态
  184. recordStatus() {
  185. return (row) => {
  186. return paraseDict(this.record, row);
  187. };
  188. },
  189. },
  190. methods: {
  191. submitBeian() {
  192. if (this.checkboxValue1.length == 0) {
  193. this.$modal.showToast('提交前,请认真阅读理解自我承诺内容后勾选')
  194. } else {
  195. let ids = this.assList.map(item => item.id).join(',');
  196. console.log('ids', ids);
  197. addMiAuditOrder({
  198. instrumentIds: ids
  199. }).then((res) => {
  200. console.log('res', res)
  201. uni.showToast({
  202. title: "新增成功",
  203. icon: "none",
  204. duration: 1000,
  205. });
  206. setTimeout(() => {
  207. this.assList = []
  208. this.checkboxValue1 = []
  209. uni.$emit('query', {
  210. a: 'one'
  211. })
  212. uni.navigateBack()
  213. }, 1000)
  214. })
  215. }
  216. },
  217. checkboxChange(value) {
  218. console.log('Checkbox changed:', value);
  219. },
  220. shanchu(val) {
  221. console.log('val', val)
  222. console.log(this.$refs)
  223. this.$refs.item.forEach(item => item.closeHandler(true));
  224. this.assList.splice(val, 1)
  225. },
  226. qingkong() {
  227. this.assList = []
  228. getApp().globalData.deptListBeiAn = []
  229. this.checkboxValue1 = []
  230. },
  231. onNavigationBarButtonTap(event) {
  232. console.log('event', event)
  233. let ids = this.assList.map(item => item.id).join(',')
  234. uni.navigateTo({
  235. url: '/pages/assay/assayList?ids=' + ids,
  236. success: (res) => {},
  237. fail: () => {},
  238. complete: () => {},
  239. });
  240. }
  241. }
  242. }
  243. </script>
  244. <style lang="scss">
  245. .container {
  246. height: 100rpx;
  247. }
  248. ::v-deep .u-checkbox {
  249. display: flex;
  250. flex-direction: row;
  251. /* overflow: hidden; */
  252. flex-direction: row;
  253. align-items: flex-start;
  254. }
  255. ::v-deep uni-text[data-v-c4a74aee] span {
  256. font-size: 28rpx;
  257. color: red;
  258. line-height: 40rpx;
  259. }
  260. .submitBtn {
  261. width: 100%;
  262. background: #fff;
  263. padding: 15rpx 0;
  264. position: fixed;
  265. bottom: 0;
  266. z-index: 9999;
  267. }
  268. .content-header1 {
  269. width: 95%;
  270. border-radius: 6px;
  271. background: #fff;
  272. margin: 10rpx auto 10rpx;
  273. padding: 20rpx 20rpx 10rpx;
  274. .content {
  275. /* border-bottom: 1px solid rgb(242, 242, 242); */
  276. padding: 8rpx 0;
  277. display: flex;
  278. /* justify-content: space-between; */
  279. }
  280. .content:last-child {
  281. border-bottom: none;
  282. }
  283. .passIcon {
  284. position: absolute;
  285. top: 20rpx;
  286. right: 40rpx;
  287. }
  288. .title {
  289. font-size: 28rpx;
  290. color: rgb(146, 146, 146);
  291. letter-spacing: 3rpx;
  292. }
  293. .message {
  294. font-size: 28rpx;
  295. color: rgb(146, 146, 146);
  296. }
  297. }
  298. .content-header {
  299. width: 95%;
  300. border-radius: 6px;
  301. background: #fff;
  302. margin: 0rpx auto 20rpx;
  303. padding: 20rpx 30rpx 20rpx;
  304. .content {
  305. border-bottom: 1px solid rgb(242, 242, 242);
  306. padding: 24rpx 0;
  307. display: flex;
  308. justify-content: space-between;
  309. }
  310. .content:last-child {
  311. border-bottom: none;
  312. }
  313. .passIcon {
  314. position: absolute;
  315. top: 20rpx;
  316. right: 40rpx;
  317. }
  318. .title {
  319. font-size: 26rpx;
  320. color: black;
  321. letter-spacing: 3rpx;
  322. }
  323. .message {
  324. font-size: 26rpx;
  325. color: rgb(146, 146, 146);
  326. }
  327. }
  328. </style>