application.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. <!-- @format -->
  2. <!-- @format -->
  3. <template>
  4. <view class="container">
  5. <view style="margin-top: 15rpx; padding-bottom: 110rpx">
  6. <view style="font-size: 30rpx" class="content-header">
  7. <view class="content">
  8. <view style="font-size: 30rpx" class="title">检定方式</view>
  9. <view>{{ type == "1" ? "外捡" : "送检" }}</view>
  10. </view>
  11. <view class="content">
  12. <view style="font-size: 30rpx" class="title">申请单位</view>
  13. <view>{{ danwei }}</view>
  14. </view>
  15. <view class="content">
  16. <view style="font-size: 30rpx" class="title">申请人</view>
  17. <view>{{ applyPeople }}</view>
  18. </view>
  19. <view class="content">
  20. <view style="font-size: 30rpx" class="title">联系电话</view>
  21. <view>{{ userMobile }}</view>
  22. </view>
  23. </view>
  24. <view class="">
  25. <view v-for="(item, index) in assList" :key="index" class="optionItems">
  26. <u-swipe-action ref="swipeAction">
  27. <u-swipe-action-item
  28. ref="item"
  29. @click="shanchu(item)"
  30. :options="options2"
  31. >
  32. <view
  33. style="
  34. border-radius: 10rpx;
  35. background-color: #fff;
  36. padding: 10rpx;
  37. "
  38. >
  39. <view class="">
  40. <view style="margin-top: 15rpx" class="content-header1">
  41. <view style="margin-bottom: 30rpx" class="">
  42. <view
  43. style="justify-content: space-between"
  44. class="content"
  45. >
  46. <view
  47. style="
  48. color: black;
  49. font-size: 36rpx;
  50. font-weight: 700;
  51. "
  52. class="message"
  53. >
  54. {{ item.name }}
  55. </view>
  56. <!-- <view
  57. style="padding-top: 5rpx"
  58. :style="{
  59. color: recordColor[recordStatus(item.fillingStatus)],
  60. }"
  61. >{{ recordStatus(item.fillingStatus) }}</view
  62. > -->
  63. </view>
  64. <view style="display: flex" class="content">
  65. <view class="title"
  66. >唯一标识:<span class="message">
  67. {{ item.instrNo }}
  68. </span>
  69. </view>
  70. </view>
  71. <view style="display: flex" class="content">
  72. <view class="title">器具用途:</view>
  73. <view class="message">
  74. {{ item.purposeName }}
  75. </view>
  76. </view>
  77. <view class="content">
  78. <view class="title">制造单位:</view>
  79. <view class="message">
  80. {{ item.manufactoryName }}
  81. </view>
  82. </view>
  83. <view
  84. style="display: flex; justify-content: space-between"
  85. class=""
  86. >
  87. <view style="display: flex" class="content">
  88. <view class="title">器具类型:</view>
  89. <view class="message">
  90. {{ item.typeName }}
  91. </view>
  92. </view>
  93. </view>
  94. <view
  95. style="display: flex; align-items: center"
  96. class="content"
  97. >
  98. <view class="title">规格型号:</view>
  99. <view style="padding-top: 5rpx" class="message">
  100. {{ item.modelSpecific }}
  101. </view>
  102. </view>
  103. <view
  104. style="display: flex; justify-content: space-between"
  105. class=""
  106. >
  107. <view style="display: flex" class="content">
  108. <view class="title">出厂编号:</view>
  109. <view style="padding-top: 5rpx" class="message">
  110. {{ item.serialNumber }}
  111. </view>
  112. </view>
  113. <view
  114. style="display: flex; align-items: center"
  115. class="content"
  116. >
  117. <view class="title">内部编号:</view>
  118. <view class="message">
  119. {{ item.internalNumber }}
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </u-swipe-action-item>
  128. </u-swipe-action>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="submitBtn" style="display: flex">
  133. <view style="display: flex">
  134. <view
  135. @click="qingkong"
  136. style="
  137. width: 100rpx;
  138. display: flex;
  139. flex-direction: column;
  140. align-items: center;
  141. justify-content: center;
  142. "
  143. class=""
  144. >
  145. <u-icon name="trash" color="" size="20"></u-icon
  146. ><span style="font-size: 30rpx">清空</span>
  147. </view>
  148. <view style="width: 250rpx; margin: 0 30rpx">
  149. <u-button @click="addQiJu" style="" type="primary">新增</u-button>
  150. </view>
  151. <view style="width: 250rpx; margin: 0 30rpx">
  152. <u-button @click="nextPage" type="success">下一步</u-button>
  153. </view>
  154. </view>
  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. type: null,
  184. userMobile: "",
  185. dataList: [],
  186. assList: [],
  187. recordColor: {
  188. 已撤回: "#fa3534",
  189. 已接收: "#2979ff",
  190. 待提交: "#2979ff",
  191. 备案中: "#2979ff",
  192. 已拒绝: "#fa3534",
  193. 勿备案: "#fa3534",
  194. 未备案: "#909399",
  195. 免备案: "#909399",
  196. 已退回: "#fa3534",
  197. },
  198. record: [], //备案字典
  199. };
  200. },
  201. onLoad(options) {
  202. this.type = options.type;
  203. useDict("ejian_instrFillingStatus").then((res) => {
  204. this.record = res;
  205. });
  206. getInfo().then((res) => {
  207. this.danwei = res.data.mechanism.name;
  208. this.applyPeople = res.data.user.name;
  209. this.userMobile = res.data.user.phone;
  210. });
  211. let that = this;
  212. },
  213. onShow() {
  214. uni.$once("query", (query) => {
  215. if (query.a == "two") {
  216. this.assList = [...getApp().globalData.deptListBeiAn];
  217. }
  218. });
  219. },
  220. methods: {
  221. nextPage() {
  222. if (!this.assList.length) {
  223. uni.showToast({
  224. title: "请单击新增按钮,选择检定器具",
  225. icon: "none",
  226. duration: 2000,
  227. });
  228. return;
  229. }
  230. let ids = this.assList.map((item) => item.id).join(",");
  231. uni.navigateTo({
  232. url: "/pages/verification/external?ids=" + ids + "&type=" + this.type,
  233. success: (res) => {},
  234. fail: () => {},
  235. complete: () => {},
  236. });
  237. },
  238. submitBeian() {
  239. if (this.checkboxValue1.length == 0) {
  240. this.$modal.showToast("提交前,请认真阅读理解自我承诺内容后勾选");
  241. } else {
  242. let ids = this.assList.map((item) => item.id).join(",");
  243. console.log("ids", ids);
  244. addMiAuditOrder({
  245. instrumentIds: ids,
  246. }).then((res) => {
  247. console.log("res", res);
  248. uni.showToast({
  249. title: "新增成功",
  250. icon: "none",
  251. duration: 1000,
  252. });
  253. setTimeout(() => {
  254. this.assList = [];
  255. this.checkboxValue1 = [];
  256. uni.$emit("query", {
  257. a: "one",
  258. });
  259. uni.navigateBack();
  260. }, 500);
  261. });
  262. }
  263. },
  264. checkboxChange(value) {
  265. console.log("Checkbox changed:", value);
  266. },
  267. shanchu(val) {
  268. console.log("val", val);
  269. console.log(this.$refs);
  270. this.$refs.item.forEach((item) => item.closeHandler(true));
  271. this.assList.splice(val, 1);
  272. },
  273. qingkong() {
  274. this.assList = [];
  275. getApp().globalData.deptListBeiAn = [];
  276. this.checkboxValue1 = [];
  277. },
  278. addQiJu() {
  279. let ids = this.assList.map((item) => item.id).join(",");
  280. uni.navigateTo({
  281. url: "/pages/verification/externalList?ids=" + ids,
  282. success: (res) => {},
  283. fail: () => {},
  284. complete: () => {},
  285. });
  286. },
  287. },
  288. };
  289. </script>
  290. <style lang="scss">
  291. .container {
  292. height: 100rpx;
  293. }
  294. ::v-deep .u-icon--right[data-v-2ee87dc9] {
  295. /* flex-direction: row; */
  296. align-items: center;
  297. flex-direction: column;
  298. }
  299. ::v-deep .u-checkbox {
  300. display: flex;
  301. flex-direction: row;
  302. /* overflow: hidden; */
  303. flex-direction: row;
  304. align-items: flex-start;
  305. }
  306. ::v-deep uni-text[data-v-c4a74aee] span {
  307. font-size: 28rpx;
  308. color: red;
  309. line-height: 40rpx;
  310. }
  311. .submitBtn {
  312. width: 100%;
  313. background: #fff;
  314. padding: 15rpx 0;
  315. position: fixed;
  316. bottom: 0;
  317. z-index: 9999;
  318. }
  319. .optionItems {
  320. width: 95%;
  321. margin: 20rpx auto;
  322. border-radius: 8px;
  323. }
  324. .content-header1 {
  325. width: 95%;
  326. border-radius: 6px;
  327. background: #fff;
  328. margin: 10rpx auto 10rpx;
  329. padding: 20rpx 20rpx 10rpx;
  330. .content {
  331. /* border-bottom: 1px solid rgb(242, 242, 242); */
  332. padding: 8rpx 0;
  333. display: flex;
  334. /* justify-content: space-between; */
  335. }
  336. .content:last-child {
  337. border-bottom: none;
  338. }
  339. .passIcon {
  340. position: absolute;
  341. top: 20rpx;
  342. right: 40rpx;
  343. }
  344. .title {
  345. font-size: 28rpx;
  346. color: rgb(146, 146, 146);
  347. letter-spacing: 3rpx;
  348. }
  349. .message {
  350. font-size: 28rpx;
  351. color: rgb(146, 146, 146);
  352. }
  353. }
  354. .content-header {
  355. width: 95%;
  356. border-radius: 6px;
  357. background: #fff;
  358. margin: 0rpx auto 20rpx;
  359. padding: 20rpx 30rpx 20rpx;
  360. .content {
  361. border-bottom: 1px solid rgb(242, 242, 242);
  362. padding: 24rpx 0;
  363. display: flex;
  364. justify-content: space-between;
  365. }
  366. .content:last-child {
  367. border-bottom: none;
  368. }
  369. .passIcon {
  370. position: absolute;
  371. top: 20rpx;
  372. right: 40rpx;
  373. }
  374. .title {
  375. font-size: 26rpx;
  376. color: black;
  377. letter-spacing: 3rpx;
  378. }
  379. .message {
  380. font-size: 26rpx;
  381. color: rgb(146, 146, 146);
  382. }
  383. }
  384. </style>