perfectStoreTSJ.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <div class="perfectStoreTSJ">
  3. <van-nav-bar class="navBar" title="AI 调色机识别" left-arrow @click-left="onClickLeft" />
  4. <div class="content">
  5. <div class="contentBox" v-for="val in tiaoSJArr">
  6. <div class="deviceCode">
  7. <div class="vertical"></div>
  8. <div class="codeData">
  9. <p style="margin: 13px 0">设备编号:{{ val.deviceCode || '' }}</p>
  10. <p style="margin: 13px 0">投放编号:{{ val.putInCode || '' }}</p>
  11. </div>
  12. </div>
  13. <div class="shopSign specialTask">
  14. <div class="specialTaskLeft">
  15. <div class="SignText">识别结果:</div>
  16. <div class="signContent">
  17. <div class="icon" v-if="val.qualifiedState">
  18. <van-icon name="checked" color="#07c160" v-if="val.qualifiedState == '1'" />
  19. <van-icon name="warning" color="#ee0a24" v-else />
  20. </div>
  21. <div
  22. :style="{ color: val.qualifiedState == '1' ? '#07c160' : '#ee0a24' }"
  23. v-if="val.qualifiedState">
  24. {{ val.qualifiedState == '1' ? '调色机完整,投放号正确' : val.unqualifiedReason }}
  25. </div>
  26. </div>
  27. <div class="shopSignButton">
  28. <div class="" style="display: flex">
  29. <van-button round type="primary" v-if="val.qualifiedState == '1'">通过</van-button>
  30. <van-button round type="danger" v-if="val.qualifiedState == '0'">不通过</van-button>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <div
  36. class="container containert"
  37. style="width: 100%; margin: 0 auto; padding-bottom: 10px"
  38. v-if="val.collectionItemList.length">
  39. <van-form ref="tabstoreVal">
  40. <div v-for="(item, index) in val.collectionItemList" :key="index">
  41. <div v-if="item.answerType == 'tel_send_code'" class="formLabel z-cell z-cells">
  42. <van-cell>
  43. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  44. </van-cell>
  45. <div class="selesetText">
  46. <p class="mg0">{{ item.answerValue }}</p>
  47. </div>
  48. </div>
  49. <div v-if="item.answerType == 'nyr'" class="formLabel z-cell z-cells">
  50. <van-cell>
  51. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  52. </van-cell>
  53. <div class="selesetText">
  54. <p class="mg0">{{ item.answerValue }}</p>
  55. </div>
  56. </div>
  57. <div class="formLabel z-cell z-cells" v-if="item.answerType == 'sz'">
  58. <van-cell>
  59. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  60. </van-cell>
  61. <p class="mg0">{{ item.answerValue }}</p>
  62. <p
  63. style="
  64. color: #444;
  65. font-size: 12px;
  66. margin: 0;
  67. padding: 10px 0;
  68. text-align: right;
  69. ">
  70. <van-field
  71. class="mobile-input"
  72. v-model="item.collectionOptionList[0].collectionOption"
  73. autosize
  74. readonly
  75. type="textarea" />
  76. </p>
  77. <div v-if="item.fileInfoList" class="imgBox">
  78. <img
  79. v-for="value in item.fileInfoList"
  80. :src="value.fileUrl"
  81. @click="previewsImg(item.fileInfoList)" />
  82. </div>
  83. </div>
  84. <div class="formLabel z-cell z-cells" v-if="item.answerType == 'zp'">
  85. <van-cell>
  86. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  87. </van-cell>
  88. <div v-if="item.fileInfoList" class="imgBox">
  89. <img
  90. v-for="value in item.fileInfoList"
  91. :src="value.fileUrl"
  92. @click="previewsImg(item.fileInfoList)" />
  93. </div>
  94. </div>
  95. <div
  96. class="formLabel z-cell z-cells"
  97. v-if="item.answerType == 'wb' || item.answerType == 'dhwb'">
  98. <van-cell>
  99. <template #title>
  100. {{ index + 1 }}.{{ item.collectionName }}
  101. <span
  102. style="color: #00afff; position: absolute; top: 8px; right: 0px"
  103. v-if="item.showHistory == 1"
  104. @click="getCollectionShowHistory(item)"
  105. >回显历史</span
  106. >
  107. </template>
  108. </van-cell>
  109. <div class="selesetText">
  110. <p class="mg0">{{ item.answerValue }}</p>
  111. </div>
  112. <p style="color: #444; font-size: 12px; margin: 0; text-align: right">
  113. <van-field
  114. class="mobile-input"
  115. v-model="item.collectionOptionList[0].collectionOption"
  116. autosize
  117. readonly
  118. type="textarea" />
  119. </p>
  120. <div v-if="item.fileInfoList" class="imgBox">
  121. <img
  122. v-for="value in item.fileInfoList"
  123. :src="value.fileUrl"
  124. @click="previewsImg(item.fileInfoList)" />
  125. </div>
  126. </div>
  127. <div class="formLabel z-cell z-cells" v-if="item.answerType == 'tel'">
  128. <van-cell>
  129. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  130. </van-cell>
  131. <div class="selesetText">
  132. <p class="mg0">{{ item.answerValue }}</p>
  133. </div>
  134. <p style="color: #444; font-size: 12px; margin: 0; text-align: right">
  135. <van-field
  136. class="mobile-input"
  137. v-model="item.collectionOptionList[0].collectionOption"
  138. autosize
  139. readonly
  140. type="textarea" />
  141. </p>
  142. <div v-if="item.fileInfoList" class="imgBox">
  143. <img
  144. v-for="value in item.fileInfoList"
  145. :src="value.fileUrl"
  146. @click="previewsImg(item.fileInfoList)" />
  147. </div>
  148. </div>
  149. <div class="formLabel z-cell z-cells" v-if="item.answerType == 'date'">
  150. <van-cell>
  151. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  152. </van-cell>
  153. <div class="selesetText">
  154. <p class="mg0">{{ item.answerValue }}</p>
  155. </div>
  156. <p style="color: #444; font-size: 12px; margin: 0; text-align: right">
  157. <van-field
  158. class="mobile-input"
  159. v-model="item.collectionOptionList[0].collectionOption"
  160. autosize
  161. readonly
  162. type="textarea" />
  163. </p>
  164. <div v-if="item.fileInfoList" class="imgBox">
  165. <img
  166. v-for="value in item.fileInfoList"
  167. :src="value.fileUrl"
  168. @click="previewsImg(item.fileInfoList)" />
  169. </div>
  170. </div>
  171. <div class="formLabel z-cell z-cells" v-if="item.answerType == 'sm'">
  172. <van-cell>
  173. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  174. </van-cell>
  175. <div class="selesetText">
  176. <div style="font-size: 14px" v-if="item.collectionOptionList[0].answerValue">
  177. <div v-if="item.success" style="color: green">
  178. <p>系统资产编码:{{ item.equipmentCode1 }}</p>
  179. <p>&nbsp;&nbsp;&nbsp;&nbsp;条形码编码:{{ item.equipmentCode2 }}</p>
  180. <span style="float: right; margin-top: -48px"
  181. ><van-icon name="passed" size="16" />&nbsp;一致</span
  182. >
  183. </div>
  184. <div v-if="!item.success" style="color: red">
  185. <p>系统资产编码:{{ item.equipmentCode1 }}</p>
  186. <p>&nbsp;&nbsp;&nbsp;&nbsp;条形码编码:{{ item.equipmentCode2 }}</p>
  187. <span style="float: right; margin-top: -48px"
  188. ><van-icon name="close" size="16" />&nbsp;不一致</span
  189. >
  190. </div>
  191. </div>
  192. </div>
  193. <p
  194. style="color: #444; font-size: 12px; margin: 0; text-align: right"
  195. v-if="item.collectionOptionList[0].collectionOption">
  196. <van-field
  197. class="mobile-input"
  198. v-model="item.collectionOptionList[0].collectionOption"
  199. autosize
  200. readonly
  201. type="textarea" />
  202. </p>
  203. <div v-if="item.fileInfoList" class="imgBox">
  204. <img
  205. v-for="value in item.fileInfoList"
  206. :src="value.fileUrl"
  207. @click="previewsImg(item.fileInfoList)" />
  208. </div>
  209. </div>
  210. <div class="formLabel z-cell z-cells" v-if="item.answerType == 'duox'">
  211. <van-cell>
  212. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  213. </van-cell>
  214. <div class="selesetText">
  215. <p class="mg0" v-for="(item1, index1) in item.collectionOptionList" :key="index1">
  216. <span v-if="item1.isCheck == 1">{{ item1.collectionOption }}</span>
  217. </p>
  218. </div>
  219. <div v-if="item.fileInfoList" class="imgBox">
  220. <img
  221. v-for="value in item.fileInfoList"
  222. :src="value.fileUrl"
  223. @click="previewsImg(item.fileInfoList)" />
  224. </div>
  225. </div>
  226. <div class="formLabel z-cell z-cells" v-if="item.answerType == 'dx'">
  227. <van-cell>
  228. <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
  229. </van-cell>
  230. <div class="selesetText">
  231. <p class="mg0" v-for="(item2, index2) in item.collectionOptionList" :key="index2">
  232. <span v-if="item2.isCheck == 1">{{ item2.collectionOption }}</span>
  233. </p>
  234. </div>
  235. <div v-if="item.fileInfoList" class="imgBox">
  236. <img
  237. v-for="value in item.fileInfoList"
  238. :src="value.fileUrl"
  239. @click="previewsImg(item.fileInfoList)" />
  240. </div>
  241. </div>
  242. </div>
  243. </van-form>
  244. </div>
  245. <!-- <div class="shopSignImg">
  246. <div class="text">店招照片</div>
  247. <div class="imgBox">
  248. <img
  249. v-if="val && val.qualifiedState"
  250. :src="val.fileUrl"
  251. @click="previewsImg(val.fileUrl)" />
  252. </div>
  253. </div> -->
  254. </div>
  255. </div>
  256. </div>
  257. </template>
  258. <script>
  259. import deleteUploadImg from '@/components/deleteUploadImg';
  260. import { getVisitsDetailPerfectStoreByTaskId } from '@/api/index';
  261. import { ImagePreview } from 'vant';
  262. export default {
  263. name: 'perfectStoreTSJ',
  264. components: { deleteUploadImg },
  265. data() {
  266. return {
  267. visitsId: '',
  268. detail: null,
  269. tiaoSJArr: null,
  270. // collectionItemList: [],
  271. };
  272. },
  273. activated() {
  274. this.visitsId = this.$route.query.visitId || '';
  275. this.detail = null;
  276. this.getVisitsDetailFn();
  277. },
  278. methods: {
  279. getVisitsDetailFn() {
  280. this.toastLoading(0, '加载中...', true);
  281. this.tiaoSJArr = null;
  282. // this.collectionItemList = [];
  283. getVisitsDetailPerfectStoreByTaskId({
  284. visitsId: this.visitsId,
  285. taskIdList: this.$route.query.taskId,
  286. })
  287. .then((res) => {
  288. this.toastLoading().clear();
  289. if (res.code == 200 && res.data && res.data.length > 0) {
  290. this.detail = res.data;
  291. this.tiaoSJArr = this.detail;
  292. console.log(this.tiaoSJArr);
  293. for (let i = 0; i < this.tiaoSJArr.length; i++) {
  294. this.filterCollectionItemLists(this.tiaoSJArr[i].collectionItemList);
  295. }
  296. } else {
  297. this.$dialog.alert({
  298. message: res.msg,
  299. });
  300. }
  301. })
  302. .catch((err) => {
  303. this.$dialog.alert({
  304. message: err.msg,
  305. });
  306. });
  307. },
  308. filterCollectionItemLists(item) {
  309. for (let q = 0; q < item.length; q++) {
  310. if (
  311. item[q].answerType == 'sz' ||
  312. item[q].answerType == 'wb' ||
  313. item[q].answerType == 'tel' ||
  314. item[q].answerType == 'date' ||
  315. item[q].answerType == 'tel_send_code' ||
  316. item[q].answerType == 'check_code' ||
  317. item[q].answerType == 'nyr' ||
  318. item[q].answerType == 'dhwb'
  319. ) {
  320. item[q].answerValue = item[q].collectionOptionList[0].answerValue;
  321. }
  322. if (item[q].answerType == 'sm') {
  323. item[q].success = false;
  324. if (
  325. item[q].collectionOptionList[0].answerValue != null &&
  326. item[q].collectionOptionList[0].answerValue != ''
  327. ) {
  328. item[q].equipmentCode2 = item[q].collectionOptionList[0].answerValue.split(',')[1];
  329. if (item[q].collectionOptionList[0].answerValue.split(',')[0] != 'null') {
  330. item[q].equipmentCode1 = item[q].collectionOptionList[0].answerValue.split(',')[0];
  331. } else {
  332. item[q].equipmentCode1 = '编码不存在';
  333. }
  334. if (
  335. item[q].collectionOptionList[0].answerValue.split(',')[0] ==
  336. item[q].collectionOptionList[0].answerValue.split(',')[1]
  337. ) {
  338. item[q].success = true;
  339. }
  340. }
  341. }
  342. if (item[q].answerType == 'duox' || item[q].answerType == 'dx') {
  343. item[q].answerValue = [];
  344. if (item[q].collectionOptionList.length) {
  345. for (var qq = 0; qq < item[q].collectionOptionList.length; qq++) {
  346. if (item[q].collectionOptionList[qq].isCheck == 1) {
  347. item[q].answerValue.push(item[q].collectionOptionList[qq].collectionOptionId);
  348. item[q].collectionOptionList[qq].code = item[q].collectionCode;
  349. item[q].collectionOptionList[qq].answerType = item[q].answerType;
  350. }
  351. }
  352. item[q].answerValue = item[q].answerValue.join();
  353. }
  354. }
  355. }
  356. },
  357. previewsImg(fileInfoList) {
  358. var arrimg = [];
  359. for (var imgi = 0; imgi < fileInfoList.length; imgi++) {
  360. arrimg.push(fileInfoList[imgi].fileUrl);
  361. }
  362. ImagePreview(arrimg);
  363. },
  364. onClickLeft() {
  365. this.$router.go(-1);
  366. },
  367. },
  368. };
  369. </script>
  370. <style lang="scss" scoped>
  371. .perfectStoreTSJ {
  372. width: 100%;
  373. height: 100%;
  374. display: flex;
  375. flex-direction: column;
  376. overflow: hidden;
  377. .content {
  378. flex: 1;
  379. overflow-y: auto;
  380. padding: 10px 15px;
  381. .contentBox {
  382. width: 100%;
  383. margin-top: 10px;
  384. .deviceCode {
  385. font-size: 16px;
  386. background-color: white;
  387. border-radius: 5px;
  388. position: relative;
  389. overflow: hidden;
  390. display: flex;
  391. flex-direction: row;
  392. align-items: center;
  393. margin-bottom: 10px;
  394. // padding: 3px 0;
  395. }
  396. .vertical {
  397. background-color: rgb(25, 137, 250);
  398. height: 14px;
  399. width: 8px;
  400. border-radius: 40px;
  401. margin-right: 10px;
  402. }
  403. .container {
  404. background: #fff;
  405. }
  406. }
  407. // ///////
  408. .specialTask {
  409. display: flex;
  410. flex-direction: row;
  411. padding: 10px;
  412. font-size: 16px;
  413. justify-content: space-between;
  414. background: #e5faff;
  415. .specialTaskLeft {
  416. display: flex;
  417. flex-direction: row;
  418. width: 100%;
  419. }
  420. .SignText {
  421. width: 80px;
  422. font-weight: 600;
  423. }
  424. .signContent {
  425. flex: 1;
  426. display: flex;
  427. flex-direction: row;
  428. margin: 0 8px;
  429. .icon {
  430. padding-top: 2px;
  431. margin-right: 5px;
  432. }
  433. }
  434. }
  435. .shopSignButton {
  436. width: 56px;
  437. button {
  438. width: 55px;
  439. height: 28px;
  440. padding: 0;
  441. font-size: 12px;
  442. }
  443. }
  444. .shopSignImg {
  445. .text {
  446. font-size: 16px;
  447. font-weight: 600;
  448. padding: 15px 10px;
  449. }
  450. }
  451. }
  452. .imgBox {
  453. width: 100%;
  454. text-align: center;
  455. img {
  456. width: 60%;
  457. }
  458. }
  459. }
  460. </style>
  461. <style lang="scss">
  462. .perfectStoreTSJ {
  463. .van-button--danger {
  464. background-color: #ee0a24 !important;
  465. border: 1px solid #ee0a24 !important;
  466. }
  467. .formLabel {
  468. margin: 0 16px;
  469. // padding-bottom: 16px;
  470. border-bottom: 1px solid #f1f1f1;
  471. }
  472. .formLabel .van-cell {
  473. padding: 5px 0;
  474. }
  475. .formLabel .van-cell::after {
  476. border: 0;
  477. }
  478. .formLabel .van-field {
  479. border: 1px solid #f1f1f1;
  480. padding: 6px;
  481. width: 100%;
  482. border-radius: 4px;
  483. overflow: hidden;
  484. }
  485. .formLabel .van-field__control {
  486. padding: 0 10px;
  487. }
  488. .formLabel .formLabeltitle {
  489. position: absolute;
  490. top: 8px;
  491. }
  492. }
  493. </style>