Browse Source

陈列SKU图片识别

zhujindu 5 tháng trước cách đây
mục cha
commit
8219327559

+ 10 - 2
src/components/deleteUploadImg1.vue

@@ -3,7 +3,11 @@
     <van-row gutter="10">
       <van-col span="6" v-for="(urls, index) in imgs" :key="index">
         <div class="imgview">
-          <van-icon name="close" size="16" v-on:click="deleteImg(index, urls.id)" />
+          <van-icon
+            v-if="photoIdentifyType != 6 && types != 'edit'"
+            name="close"
+            size="16"
+            v-on:click="deleteImg(index, urls.id)" />
           <img
             v-if="urls.type == '2'"
             :src="urls.fileUrl"
@@ -43,10 +47,14 @@ export default {
       },
     },
     photoIdentifyType: {
-      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
+      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招,6:sku陈列照)
       type: String,
       default: '',
     },
+    types: {
+      // edit 编辑
+      type: String,
+    },
   },
   data() {
     return {

+ 27 - 13
src/views/deviceWithin/addStoreVisit.vue

@@ -6,7 +6,7 @@
         <!--     right-text="保存"   @click-right="onSubmit"-->
         <template #right>
           <span
-            v-if="processKey"
+            v-if="processKey && isEditSDHCL"
             @click="onSubmit"
             style="
               color: white;
@@ -285,27 +285,34 @@
           </div>
           <div v-if="item.answerType == 'zp'" class="formLabel z-cell">
             <van-cell>
-              <template #title
-                ><span v-if="item.isMust == 0" class="van-f-red">*</span>{{ item.collectionName }}
+              <template #title>
+                <span v-if="item.isMust == 0" class="van-f-red">*</span>{{ item.collectionName }}
                 <!-- 操作说明图片和电话 -->
                 <taskTips
                   v-if="item.contactPhone || item.examplePhoto"
                   :contactPhone="item.contactPhone"
                   :examplePhoto="item.examplePhoto">
-                </taskTips
-              ></template>
+                </taskTips>
+              </template>
               <template #right-icon>
-                <span v-if="item.isMustPicture == '0'" class="van-f-red">*</span>
-                <van-icon
-                  v-if="item.isPicture == 0"
-                  color="#666"
-                  name="photograph"
-                  size="24"
-                  @click="imgClick(item, 'A', index)" />
+                <template v-if="isEditSDHCL">
+                  <span v-if="item.isMustPicture == '0'" class="van-f-red">*</span>
+                  <van-icon
+                    v-if="item.isPicture == 0"
+                    color="#666"
+                    name="photograph"
+                    size="24"
+                    @click="imgClick(item, 'A', index)" />
+                </template>
               </template>
             </van-cell>
+            <!-- 生动化陈列备注 只能有一层采集项 -->
+            <div class="sdhclTips" v-if="photoIdentifyType == '6'" style="color: red">
+              请拍摄该店内所有立邦陈列产品,将用于计算该店经营SKU数量
+            </div>
             <delete-upload-img
               :photoIdentifyType="photoIdentifyType"
+              :types="$route.query.types"
               :imgs="item.fileInfoList"></delete-upload-img>
           </div>
           <div v-if="item.answerType == 'wb'" class="formLabel z-cell">
@@ -2724,7 +2731,7 @@
         font-size: 14px;
         left: 14px;
       "
-      v-if="processKey"
+      v-if="processKey && isEditSDHCL"
       @click="removeFn">
       <van-icon name="cross" />&nbsp;&nbsp;清空内容
     </div>
@@ -2842,6 +2849,7 @@ export default {
       productTitles: null,
       inspectionType: '',
       competitortableData: [],
+      isEditSDHCL: true, //是否可以编辑生动化陈列
     };
   },
   beforeRouteLeave(to, from, next) {
@@ -3380,6 +3388,12 @@ export default {
           this.equipmentCode = this.equipmentCode || '';
           this.showCode = false;
         }
+        // 生动化陈列是否可以编辑
+        if (this.$route.query.types == 'edit' && this.photoIdentifyType == '6') {
+          this.isEditSDHCL = false;
+        } else {
+          this.isEditSDHCL = true;
+        }
         if (
           (res.data.processStatus == 3 && this.$route.query.types == 'edit') ||
           res.data.processStatus == undefined

+ 4 - 3
src/views/week/dailyApproval.vue

@@ -385,21 +385,22 @@
               </van-col>
             </van-row>
             <div
+              v-if="item.photos.length > 4"
               class="arrowIcon"
               style="text-align: center; padding: 3px 0"
               @click="setVisitIMG1Flag(item)">
               <van-icon size="28" :name="item.visitIMG1Flag ? 'arrow-up' : 'arrow-down'" />
             </div>
             <!-- 生动化陈列 sku -->
-            <template v-if="item.photoSkuImgSummaryeList">
+            <template v-if="photoSkuImgSummaryeList && item.photoSkuImgSummaryeList.length">
               <!-- <div class="skuNum">SKU识别:{{ item.num }}个</div> -->
               <el-table
                 :data="item.productDetail"
                 border
                 class="table-headermd table-headermdhome"
                 style="width: 100%">
-                <el-table-column label="SKU名称" prop="DESCR" align="center" />
-                <el-table-column label="数量" prop="QTY" width="80px" align="center" />
+                <el-table-column label="SKU名称" prop="name" align="center" />
+                <el-table-column label="数量" prop="cont" width="80px" align="center" />
               </el-table>
             </template>
           </div>

+ 3 - 2
src/views/week/dailyDetails.vue

@@ -378,6 +378,7 @@
               </van-col>
             </van-row>
             <div
+              v-if="item.photos.length > 4"
               class="arrowIcon"
               style="text-align: center; padding: 3px 0"
               @click="setVisitIMG1Flag(item)">
@@ -391,8 +392,8 @@
                 border
                 class="table-headermd table-headermdhome"
                 style="width: 100%">
-                <el-table-column label="SKU名称" prop="DESCR" align="center" />
-                <el-table-column label="数量" prop="QTY" width="80px" align="center" />
+                <el-table-column label="SKU名称" prop="name" align="center" />
+                <el-table-column label="数量" prop="cont" width="80px" align="center" />
               </el-table>
             </template>
           </div>

+ 3 - 2
src/views/week/dailyHistoricalDetails.vue

@@ -384,6 +384,7 @@
               </van-col>
             </van-row>
             <div
+              v-if="item.photos.length > 4"
               class="arrowIcon"
               style="text-align: center; padding: 3px 0"
               @click="setVisitIMG1Flag(item)">
@@ -397,8 +398,8 @@
                 border
                 class="table-headermd table-headermdhome"
                 style="width: 100%">
-                <el-table-column label="SKU名称" prop="DESCR" align="center" />
-                <el-table-column label="数量" prop="QTY" width="80px" align="center" />
+                <el-table-column label="SKU名称" prop="name" align="center" />
+                <el-table-column label="数量" prop="cont" width="80px" align="center" />
               </el-table>
             </template>
           </div>