deptList.vue 11 KB

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