deptList.vue 9.5 KB

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