perfectStoreTSJ.vue 17 KB

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