Selaa lähdekoodia

完美门店优化

zhujindu 3 päivää sitten
vanhempi
commit
f49cd48ef6

+ 1 - 1
src/views/historicalVisit/perfectStore.vue

@@ -156,7 +156,7 @@
       <div class="TSJBox specialTask" v-if="list.isSku == '是'">
         <div class="specialTaskLeft">
           <div class="SignText">
-            AI SKU个数识别: <span v-if="list.skuTotal">{{ list.skuTotal }}个</span>
+            AI SKU个数识别: <span v-if="list.skuNum">{{ list.skuNum }}个</span>
           </div>
           <div class="signContent" @click="toSkuRecognize">
             <div class="" style="display: flex">

+ 1 - 2
src/views/historicalVisit/perfectStoreSku.vue

@@ -33,9 +33,8 @@
       <div class="skuDeatil" v-if="detail.skuList">
         <div class="headline" style="margin-top: 10px">
           <span class="headlineIcon"></span>
-          <span class="headlineTitle">SKU图像识别结果:{{ detail.skuTotal }}个</span>
+          <span class="headlineTitle">SKU图像识别结果:{{ detail.skuNum }}个</span>
         </div>
-        <!-- <div class="tableTitle">SKU图像识别结果:{{ detail.skuTotal }}个</div> -->
         <el-table
           :data="detail.skuList"
           style="width: 100%; border-radius: 10px"

+ 352 - 35
src/views/historicalVisit/perfectStoreTSJ.vue

@@ -1,44 +1,255 @@
 <template>
   <div class="perfectStoreSign">
-    <van-nav-bar class="navBar" title="AI 店招识别" left-arrow @click-left="onClickLeft" />
+    <van-nav-bar class="navBar" title="AI 调色机识别" left-arrow @click-left="onClickLeft" />
     <div class="content">
-      <div class="contentBox">
-        <div class="shopSign specialTask" v-if="shopSignDetail && shopSignDetail.qualifiedState">
+      <div class="contentBox" v-for="val in tiaoSJArr">
+        <div class="deviceCode">
+          <div class="vertical"></div>
+          <div class="codeData">
+            <p>设备编号:{{ val.deviceCode || '' }}</p>
+            <p>投放编号:{{ val.putInCode || '' }}</p>
+          </div>
+        </div>
+        <div class="shopSign specialTask" v-if="val && val.qualifiedState">
           <div class="specialTaskLeft">
             <div class="SignText">识别结果:</div>
             <div class="signContent">
-              <div class="icon">
-                <van-icon
-                  name="checked"
-                  color="#07c160"
-                  v-if="shopSignDetail.qualifiedState == '1'" />
+              <!-- <div class="icon">
+                <van-icon name="checked" color="#07c160" v-if="val.qualifiedState == '1'" />
                 <van-icon name="warning" color="#ee0a24" v-else />
-              </div>
-              <div :style="{ color: shopSignDetail.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
-                {{
-                  shopSignDetail.qualifiedState == '1' ? '已通过' : shopSignDetail.unqualifiedReason
-                }}
-              </div>
+              </div> -->
+              <!-- <div :style="{ color: val.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
+                {{ val.qualifiedState == '1' ? '已通过' : val.unqualifiedReason }}
+              </div> -->
             </div>
             <div class="shopSignButton">
               <div class="" style="display: flex">
-                <van-button round type="primary" v-if="shopSignDetail.qualifiedState == '1'"
-                  >通过</van-button
-                >
+                <van-button round type="primary" v-if="val.qualifiedState == '1'">通过</van-button>
                 <van-button round type="danger" v-else>不通过</van-button>
               </div>
             </div>
           </div>
         </div>
-        <div class="shopSignImg">
+
+        <div
+          class="container containert"
+          style="width: 100%; margin: 0 auto; border-radius: 6px"
+          v-if="val.collectionItemList.length">
+          <van-form ref="tabstoreVal">
+            <div v-for="(item, index) in val.collectionItemList" :key="index">
+              <div v-if="item.answerType == 'tel_send_code'" class="formLabel z-cell z-cells">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div class="selesetText">
+                  <p class="mg0">{{ item.answerValue }}</p>
+                </div>
+              </div>
+              <div v-if="item.answerType == 'nyr'" class="formLabel z-cell z-cells">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div class="selesetText">
+                  <p class="mg0">{{ item.answerValue }}</p>
+                </div>
+              </div>
+              <div class="formLabel z-cell z-cells" v-if="item.answerType == 'sz'">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <p class="mg0">{{ item.answerValue }}</p>
+                <p
+                  style="
+                    color: #444;
+                    font-size: 12px;
+                    margin: 0;
+                    padding: 10px 0;
+                    text-align: right;
+                  ">
+                  <van-field
+                    class="mobile-input"
+                    v-model="item.collectionOptionList[0].collectionOption"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </p>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+              <div class="formLabel z-cell z-cells" v-if="item.answerType == 'zp'">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+              <div
+                class="formLabel z-cell z-cells"
+                v-if="item.answerType == 'wb' || item.answerType == 'dhwb'">
+                <van-cell>
+                  <template #title>
+                    {{ index + 1 }}.{{ item.collectionName }}
+                    <span
+                      style="color: #00afff; position: absolute; top: 8px; right: 0px"
+                      v-if="item.showHistory == 1"
+                      @click="getCollectionShowHistory(item)"
+                      >回显历史</span
+                    >
+                  </template>
+                </van-cell>
+                <div class="selesetText">
+                  <p class="mg0">{{ item.answerValue }}</p>
+                </div>
+                <p style="color: #444; font-size: 12px; margin: 0; text-align: right">
+                  <van-field
+                    class="mobile-input"
+                    v-model="item.collectionOptionList[0].collectionOption"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </p>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+              <div class="formLabel z-cell z-cells" v-if="item.answerType == 'tel'">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div class="selesetText">
+                  <p class="mg0">{{ item.answerValue }}</p>
+                </div>
+                <p style="color: #444; font-size: 12px; margin: 0; text-align: right">
+                  <van-field
+                    class="mobile-input"
+                    v-model="item.collectionOptionList[0].collectionOption"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </p>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+              <div class="formLabel z-cell z-cells" v-if="item.answerType == 'date'">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div class="selesetText">
+                  <p class="mg0">{{ item.answerValue }}</p>
+                </div>
+                <p style="color: #444; font-size: 12px; margin: 0; text-align: right">
+                  <van-field
+                    class="mobile-input"
+                    v-model="item.collectionOptionList[0].collectionOption"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </p>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+              <div class="formLabel z-cell z-cells" v-if="item.answerType == 'sm'">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div class="selesetText">
+                  <div style="font-size: 14px" v-if="item.collectionOptionList[0].answerValue">
+                    <div v-if="item.success" style="color: green">
+                      <p>系统资产编码:{{ item.equipmentCode1 }}</p>
+                      <p>&nbsp;&nbsp;&nbsp;&nbsp;条形码编码:{{ item.equipmentCode2 }}</p>
+                      <span style="float: right; margin-top: -48px"
+                        ><van-icon name="passed" size="16" />&nbsp;一致</span
+                      >
+                    </div>
+                    <div v-if="!item.success" style="color: red">
+                      <p>系统资产编码:{{ item.equipmentCode1 }}</p>
+                      <p>&nbsp;&nbsp;&nbsp;&nbsp;条形码编码:{{ item.equipmentCode2 }}</p>
+                      <span style="float: right; margin-top: -48px"
+                        ><van-icon name="close" size="16" />&nbsp;不一致</span
+                      >
+                    </div>
+                  </div>
+                </div>
+                <p
+                  style="color: #444; font-size: 12px; margin: 0; text-align: right"
+                  v-if="item.collectionOptionList[0].collectionOption">
+                  <van-field
+                    class="mobile-input"
+                    v-model="item.collectionOptionList[0].collectionOption"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </p>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+              <div class="formLabel z-cell z-cells" v-if="item.answerType == 'duox'">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div class="selesetText">
+                  <p class="mg0" v-for="(item1, index1) in item.collectionOptionList" :key="index1">
+                    <span v-if="item1.isCheck == 1">{{ item1.collectionOption }}</span>
+                  </p>
+                </div>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+              <div class="formLabel z-cell z-cells" v-if="item.answerType == 'dx'">
+                <van-cell>
+                  <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+                </van-cell>
+                <div class="selesetText">
+                  <p class="mg0" v-for="(item2, index2) in item.collectionOptionList" :key="index2">
+                    <span v-if="item2.isCheck == 1">{{ item2.collectionOption }}</span>
+                  </p>
+                </div>
+                <div v-if="item.fileInfoList" class="imgBox">
+                  <img
+                    v-for="value in item.fileInfoList"
+                    :src="value.fileUrl"
+                    @click="previewsImg(value.fileUrl)" />
+                </div>
+              </div>
+            </div>
+          </van-form>
+        </div>
+        <!-- <div class="shopSignImg">
           <div class="text">店招照片</div>
           <div class="imgBox">
             <img
-              v-if="shopSignDetail && shopSignDetail.qualifiedState"
-              :src="shopSignDetail.fileUrl"
-              @click="previewsImg(shopSignDetail.fileUrl)" />
+              v-if="val && val.qualifiedState"
+              :src="val.fileUrl"
+              @click="previewsImg(val.fileUrl)" />
           </div>
-        </div>
+        </div> -->
       </div>
     </div>
   </div>
@@ -55,7 +266,8 @@ export default {
     return {
       visitsId: '',
       detail: null,
-      shopSignDetail: null,
+      tiaoSJArr: null,
+      //   collectionItemList: [],
     };
   },
   activated() {
@@ -65,14 +277,19 @@ export default {
   },
   methods: {
     getVisitsDetailFn() {
-      this.shopSignDetail = null;
+      this.toastLoading(0, '加载中...', true);
+      this.tiaoSJArr = null;
+      //   this.collectionItemList = [];
       getVisitsDetailPerfectStore({ visitsId: this.visitsId })
         .then((res) => {
           this.toastLoading().clear();
           if (res.code == 200) {
             this.detail = res.data;
-            let shopSignArr = this.detail.sfaTaskList.filter((val) => val.photoIdentifyType == '1');
-            if (shopSignArr.length) this.shopSignDetail = shopSignArr[0];
+            this.tiaoSJArr = this.detail.sfaTaskList.filter((val) => val.photoIdentifyType == '3');
+            console.log(this.tiaoSJArr);
+            for (let i = 0; i < this.tiaoSJArr.length; i++) {
+              this.filterCollectionItemLists(this.tiaoSJArr[i].collectionItemList);
+            }
           } else {
             this.$dialog.alert({
               message: res.msg,
@@ -85,6 +302,55 @@ export default {
           });
         });
     },
+    filterCollectionItemLists(item) {
+      for (let q = 0; q < item.length; q++) {
+        if (
+          item[q].answerType == 'sz' ||
+          item[q].answerType == 'wb' ||
+          item[q].answerType == 'tel' ||
+          item[q].answerType == 'date' ||
+          item[q].answerType == 'tel_send_code' ||
+          item[q].answerType == 'check_code' ||
+          item[q].answerType == 'nyr' ||
+          item[q].answerType == 'dhwb'
+        ) {
+          item[q].answerValue = item[q].collectionOptionList[0].answerValue;
+        }
+        if (item[q].answerType == 'sm') {
+          item[q].success = false;
+          if (
+            item[q].collectionOptionList[0].answerValue != null &&
+            item[q].collectionOptionList[0].answerValue != ''
+          ) {
+            item[q].equipmentCode2 = item[q].collectionOptionList[0].answerValue.split(',')[1];
+            if (item[q].collectionOptionList[0].answerValue.split(',')[0] != 'null') {
+              item[q].equipmentCode1 = item[q].collectionOptionList[0].answerValue.split(',')[0];
+            } else {
+              item[q].equipmentCode1 = '编码不存在';
+            }
+            if (
+              item[q].collectionOptionList[0].answerValue.split(',')[0] ==
+              item[q].collectionOptionList[0].answerValue.split(',')[1]
+            ) {
+              item[q].success = true;
+            }
+          }
+        }
+        if (item[q].answerType == 'duox' || item[q].answerType == 'dx') {
+          item[q].answerValue = [];
+          if (item[q].collectionOptionList.length) {
+            for (var qq = 0; qq < item[q].collectionOptionList.length; qq++) {
+              if (item[q].collectionOptionList[qq].isCheck == 1) {
+                item[q].answerValue.push(item[q].collectionOptionList[qq].collectionOptionId);
+                item[q].collectionOptionList[qq].code = item[q].collectionCode;
+                item[q].collectionOptionList[qq].answerType = item[q].answerType;
+              }
+            }
+            item[q].answerValue = item[q].answerValue.join();
+          }
+        }
+      }
+    },
     previewsImg(url) {
       ImagePreview([url]);
     },
@@ -107,10 +373,31 @@ export default {
     padding: 10px 15px;
     .contentBox {
       width: 100%;
-      height: 100%;
       background: #fff;
-      padding-top: 15px;
+      margin-top: 10px;
+      .deviceCode {
+        font-size: 16px;
+        background-color: white;
+        border-radius: 5px;
+        position: relative;
+        overflow: hidden;
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+      }
+      .vertical {
+        background-color: rgb(25, 137, 250);
+        height: 14px;
+        width: 8px;
+        border-radius: 40px;
+        margin-right: 10px;
+        /* position: absolute;
+  left: -3px;
+  top: 50px; */
+      }
     }
+
+    // ///////
     .specialTask {
       display: flex;
       flex-direction: row;
@@ -153,13 +440,13 @@ export default {
         font-weight: 600;
         padding: 15px 10px;
       }
-      .imgBox {
-        width: 100%;
-        text-align: center;
-        img {
-          width: 60%;
-        }
-      }
+    }
+  }
+  .imgBox {
+    width: 100%;
+    text-align: center;
+    img {
+      width: 60%;
     }
   }
 }
@@ -170,5 +457,35 @@ export default {
     background-color: #ee0a24 !important;
     border: 1px solid #ee0a24 !important;
   }
+  .formLabel {
+    margin: 0 16px;
+    padding-bottom: 16px;
+    border-bottom: 1px solid #f1f1f1;
+  }
+
+  .formLabel .van-cell {
+    padding: 10px 0;
+  }
+
+  .formLabel .van-cell::after {
+    border: 0;
+  }
+
+  .formLabel .van-field {
+    border: 1px solid #f1f1f1;
+    padding: 6px;
+    width: 100%;
+    border-radius: 4px;
+    overflow: hidden;
+  }
+
+  .formLabel .van-field__control {
+    padding: 0 10px;
+  }
+
+  .formLabel .formLabeltitle {
+    position: absolute;
+    top: 8px;
+  }
 }
 </style>