Selaa lähdekoodia

Merge branch 'feature_20240912_拜访增加店招任务添加操作图片和电话'

# Conflicts:
#	src/views/deviceWithin/addStoreVisit.vue
#	src/views/home/index.vue
#	src/views/storeManagement/storeDetail.vue
zhujindu 1 vuosi sitten
vanhempi
commit
fb6cdbb219

+ 158 - 2
src/views/deviceWithin/addStoreVisit.vue

@@ -160,6 +160,12 @@
             <van-cell>
               <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>
               <template #right-icon>
                 <span v-if="item.isMustPicture == '0'" style="color: red">图片必填</span>
@@ -191,6 +197,12 @@
             <van-cell>
               <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>
               <template #right-icon>
                 <span v-if="item.isMustPicture == '0'" style="color: red">图片必填</span>
@@ -222,6 +234,12 @@
             <van-cell>
               <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>
               <template #right-icon>
                 <span v-if="item.isMustPicture == '0'" style="color: red">图片必填</span>
@@ -253,6 +271,12 @@
             <van-cell>
               <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>
               <template #right-icon>
                 <span v-if="item.isMustPicture == '0'" style="color: red">图片必填</span>
@@ -270,6 +294,12 @@
             <van-cell>
               <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>
               <template #right-icon>
                 <span v-if="item.isMustPicture == '0'" style="color: red">图片必填</span>
@@ -312,6 +342,12 @@
             <van-cell>
               <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>
               <template #right-icon>
                 <span v-if="item.isMustPicture == '0'" style="color: red">图片必填</span>
@@ -339,6 +375,12 @@
               <template #title>
                 <p style="margin: 0">
                   <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>
                 </p>
                 <p @click="viewSM" style="font-size: 14px; margin: 0">
                   如何寻找调色机资产编码或投放编号&nbsp;<van-icon name="question-o" />
@@ -391,6 +433,12 @@
               <van-cell>
                 <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>
                 <template #right-icon>
                   <span v-if="item.isMustPicture == '0'" style="color: red">图片必填</span>
@@ -421,6 +469,12 @@
                         <template #title>
                           <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                           >{{ childitem.collectionName }}
+                          <!-- 操作说明图片和电话 -->
+                          <taskTips
+                            v-if="childitem.contactPhone || childitem.examplePhoto"
+                            :contactPhone="childitem.contactPhone"
+                            :examplePhoto="childitem.examplePhoto">
+                          </taskTips>
                         </template>
                         <template #right-icon>
                           <span v-if="childitem.isMustPicture == '0'" style="color: red"
@@ -466,6 +520,12 @@
                         <template #title>
                           <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                           >{{ childitem.collectionName }}
+                          <!-- 操作说明图片和电话 -->
+                          <taskTips
+                            v-if="childitem.contactPhone || childitem.examplePhoto"
+                            :contactPhone="childitem.contactPhone"
+                            :examplePhoto="childitem.examplePhoto">
+                          </taskTips>
                         </template>
                         <template #right-icon>
                           <span v-if="childitem.isMustPicture == '0'" style="color: red"
@@ -507,6 +567,12 @@
                         <template #title>
                           <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                           >{{ childitem.collectionName }}
+                          <!-- 操作说明图片和电话 -->
+                          <taskTips
+                            v-if="childitem.contactPhone || childitem.examplePhoto"
+                            :contactPhone="childitem.contactPhone"
+                            :examplePhoto="childitem.examplePhoto">
+                          </taskTips>
                         </template>
                         <template #right-icon>
                           <span v-if="childitem.isMustPicture == '0'" style="color: red"
@@ -549,6 +615,12 @@
                         <template #title>
                           <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                           >{{ childitem.collectionName }}
+                          <!-- 操作说明图片和电话 -->
+                          <taskTips
+                            v-if="childitem.contactPhone || childitem.examplePhoto"
+                            :contactPhone="childitem.contactPhone"
+                            :examplePhoto="childitem.examplePhoto">
+                          </taskTips>
                         </template>
                         <template #right-icon>
                           <span v-if="childitem.isMustPicture == '0'" style="color: red"
@@ -590,6 +662,12 @@
                         <template #title>
                           <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                           >{{ childitem.collectionName }}
+                          <!-- 操作说明图片和电话 -->
+                          <taskTips
+                            v-if="childitem.contactPhone || childitem.examplePhoto"
+                            :contactPhone="childitem.contactPhone"
+                            :examplePhoto="childitem.examplePhoto">
+                          </taskTips>
                         </template>
                         <template #right-icon>
                           <span v-if="childitem.isMustPicture == '0'" style="color: red"
@@ -610,6 +688,12 @@
                         <template #title>
                           <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                           >{{ childitem.collectionName }}
+                          <!-- 操作说明图片和电话 -->
+                          <taskTips
+                            v-if="childitem.contactPhone || childitem.examplePhoto"
+                            :contactPhone="childitem.contactPhone"
+                            :examplePhoto="childitem.examplePhoto">
+                          </taskTips>
                         </template>
                         <template #right-icon>
                           <span v-if="childitem.isMustPicture == '0'" style="color: red"
@@ -642,6 +726,12 @@
                           <p style="margin: 0">
                             <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                             >{{ childitem.collectionName }}
+                            <!-- 操作说明图片和电话 -->
+                            <taskTips
+                              v-if="childitem.contactPhone || childitem.examplePhoto"
+                              :contactPhone="childitem.contactPhone"
+                              :examplePhoto="childitem.examplePhoto">
+                            </taskTips>
                           </p>
                           <p @click="viewSM" style="font-size: 14px; margin: 0">
                             如何寻找调色机资产编码&nbsp;<van-icon name="question-o" />
@@ -688,6 +778,12 @@
                           <template #title>
                             <span v-if="childitem.isMust == 0" class="van-f-red">*</span
                             >{{ childitem.collectionName }}
+                            <!-- 操作说明图片和电话 -->
+                            <taskTips
+                              v-if="childitem.contactPhone || childitem.examplePhoto"
+                              :contactPhone="childitem.contactPhone"
+                              :examplePhoto="childitem.examplePhoto">
+                            </taskTips>
                           </template>
                           <template #right-icon>
                             <span v-if="childitem.isMustPicture == '0'" style="color: red"
@@ -726,6 +822,12 @@
                                   <template #title>
                                     <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                     >{{ childitem1.collectionName }}
+                                    <!-- 操作说明图片和电话 -->
+                                    <taskTips
+                                      v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                      :contactPhone="childitem1.contactPhone"
+                                      :examplePhoto="childitem1.examplePhoto">
+                                    </taskTips>
                                   </template>
                                   <template #right-icon>
                                     <span v-if="childitem1.isMustPicture == '0'" style="color: red"
@@ -782,6 +884,12 @@
                                   <template #title>
                                     <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                     >{{ childitem1.collectionName }}
+                                    <!-- 操作说明图片和电话 -->
+                                    <taskTips
+                                      v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                      :contactPhone="childitem1.contactPhone"
+                                      :examplePhoto="childitem1.examplePhoto">
+                                    </taskTips>
                                   </template>
                                   <template #right-icon>
                                     <span v-if="childitem1.isMustPicture == '0'" style="color: red"
@@ -850,6 +958,12 @@
                                     <p style="margin: 0">
                                       <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                       >{{ childitem1.collectionName }}
+                                      <!-- 操作说明图片和电话 -->
+                                      <taskTips
+                                        v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                        :contactPhone="childitem1.contactPhone"
+                                        :examplePhoto="childitem1.examplePhoto">
+                                      </taskTips>
                                     </p>
                                     <p @click="viewSM" style="font-size: 14px; margin: 0">
                                       如何寻找调色机资产编码&nbsp;<van-icon name="question-o" />
@@ -902,6 +1016,12 @@
                                   <template #title>
                                     <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                     >{{ childitem1.collectionName }}
+                                    <!-- 操作说明图片和电话 -->
+                                    <taskTips
+                                      v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                      :contactPhone="childitem1.contactPhone"
+                                      :examplePhoto="childitem1.examplePhoto">
+                                    </taskTips>
                                   </template>
                                   <template #right-icon>
                                     <span v-if="childitem1.isMustPicture == '0'" style="color: red"
@@ -947,6 +1067,12 @@
                                     <template #title>
                                       <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                       >{{ childitem1.collectionName }}
+                                      <!-- 操作说明图片和电话 -->
+                                      <taskTips
+                                        v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                        :contactPhone="childitem1.contactPhone"
+                                        :examplePhoto="childitem1.examplePhoto">
+                                      </taskTips>
                                     </template>
                                     <template #right-icon>
                                       <span
@@ -1006,6 +1132,15 @@
                                                   class="van-f-red"
                                                   >*</span
                                                 >{{ childitem1.collectionName }}
+                                                <!-- 操作说明图片和电话 -->
+                                                <taskTips
+                                                  v-if="
+                                                    childitem1.contactPhone ||
+                                                    childitem1.examplePhoto
+                                                  "
+                                                  :contactPhone="childitem1.contactPhone"
+                                                  :examplePhoto="childitem1.examplePhoto">
+                                                </taskTips>
                                               </template>
                                               <template #right-icon>
                                                 <span
@@ -1063,6 +1198,12 @@
                                   <template #title>
                                     <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                     >{{ childitem1.collectionName }}
+                                    <!-- 操作说明图片和电话 -->
+                                    <taskTips
+                                      v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                      :contactPhone="childitem1.contactPhone"
+                                      :examplePhoto="childitem1.examplePhoto">
+                                    </taskTips>
                                   </template>
                                   <template #right-icon>
                                     <span v-if="childitem1.isMustPicture == '0'" style="color: red"
@@ -1115,6 +1256,12 @@
                                   <template #title>
                                     <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                     >{{ childitem1.collectionName }}
+                                    <!-- 操作说明图片和电话 -->
+                                    <taskTips
+                                      v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                      :contactPhone="childitem1.contactPhone"
+                                      :examplePhoto="childitem1.examplePhoto">
+                                    </taskTips>
                                   </template>
                                   <template #right-icon>
                                     <span v-if="childitem1.isMustPicture == '0'" style="color: red"
@@ -1167,6 +1314,12 @@
                                   <template #title>
                                     <span v-if="childitem1.isMust == 0" class="van-f-red">*</span
                                     >{{ childitem1.collectionName }}
+                                    <!-- 操作说明图片和电话 -->
+                                    <taskTips
+                                      v-if="childitem1.contactPhone || childitem1.examplePhoto"
+                                      :contactPhone="childitem1.contactPhone"
+                                      :examplePhoto="childitem1.examplePhoto">
+                                    </taskTips>
                                   </template>
                                   <template #right-icon>
                                     <span v-if="childitem1.isMustPicture == '0'" style="color: red"
@@ -1314,9 +1467,10 @@ import storeCode from '@/components/storeCode';
 import deleteUploadImg from '@/components/deleteUploadImg1';
 import jianjie from '@/assets/jianjie.jpg';
 import { ImagePreview } from 'vant';
+import taskTips from './taskTips';
 export default {
   name: 'abnormalVisit',
-  components: { zRadio, zCheckbox, uploadImg, storeCode, deleteUploadImg },
+  components: { zRadio, zCheckbox, uploadImg, storeCode, deleteUploadImg, taskTips },
   data() {
     return {
       value: '',
@@ -1388,6 +1542,7 @@ export default {
       equipmentCode: '',
       deviceCode: '',
       putInCode: '',
+      examplePhotoImg: '', //示例-操作说明图标地址
     };
   },
   beforeRouteLeave(to, from, next) {
@@ -2762,7 +2917,7 @@ export default {
   },
 };
 </script>
-<style scoped>
+<style scoped lang="scss">
 .container {
   background-color: white;
 }
@@ -2794,6 +2949,7 @@ export default {
 .formLabel {
   margin: 0 16px;
   border-bottom: 1px solid #f1f1f1;
+  position: relative;
 }
 
 .formLabel .van-cell {

+ 65 - 0
src/views/deviceWithin/taskTips.vue

@@ -0,0 +1,65 @@
+<template>
+  <div class="tips">
+    <span class="examples" v-if="examplePhoto" @click="openExamplesImg(examplePhoto)">示例</span>
+    <span class="phone">
+      <van-icon name="phone" size="18px" /><a :href="'tel:' + contactPhone" class="call">{{
+        contactPhone
+      }}</a>
+    </span>
+  </div>
+</template>
+
+<script>
+import { ImagePreview } from 'vant';
+export default {
+  props: {
+    contactPhone: {
+      type: [String, Number],
+      default: '',
+    },
+    examplePhoto: {
+      type: [String, Number],
+      default: '',
+    },
+  },
+  data() {
+    return {};
+  },
+  methods: {
+    // 点击查看示例图片
+    openExamplesImg(examplePhoto) {
+      if (!examplePhoto) return;
+      ImagePreview([examplePhoto]);
+      // this.examplePhotoImg = examplePhoto;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.tips {
+  //   position: absolute;
+  //   right: 0;
+  //   top: 11px;
+  display: inline;
+  //   height: 25px;
+  //   line-height: 25px;
+  .examples {
+    margin: 0 10px;
+    background: rgb(255, 151, 106);
+    color: #fff;
+    padding: 2px 4px;
+    border-radius: 2px 2px 8px 2px;
+    font-size: 14px;
+  }
+  .phone {
+    display: inline-block;
+    i {
+      vertical-align: -2px;
+    }
+    a {
+      color: #0057ba;
+      text-decoration: underline;
+    }
+  }
+}
+</style>

+ 11 - 7
src/views/home/index.vue

@@ -1005,17 +1005,18 @@
                 style="width: 100%">
                 <el-table-column label="业务员" prop="userName">
                   <template slot-scope="scope">
-                    <span class="tipTitle" @click="tipTitle(scope.row.userName)">{{
-                      scope.row.userName
-                    }}</span>
+                    <span class="tipTitle">{{ scope.row.userName }}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="拜访次数" prop="visitAct" />
-                <el-table-column label="拜访率" prop="inVisitRate">
+                <el-table-column :label="'金牌店\n拜访率'" prop="jpVisitRate">
                   <template slot-scope="scope">
-                    <span class="tipTitle" @click="tipTitle(scope.row.inVisitRate)"
-                      >{{ scope.row.inVisitRate }}%</span
-                    >
+                    <span class="tipTitle">{{ scope.row.jpVisitRate }}%</span>
+                  </template>
+                </el-table-column>
+                <el-table-column :label="'同城店\n拜访率'" prop="tcVisitRate">
+                  <template slot-scope="scope">
+                    <span class="tipTitle">{{ scope.row.tcVisitRate }}%</span>
                   </template>
                 </el-table-column>
               </el-table>
@@ -1719,6 +1720,9 @@ export default {
 .table-headermdhome {
   font-size: 14px;
 }
+.table-headermdhome th.el-table__cell > .cell {
+  white-space: pre;
+}
 .table-headermd .el-table__header,
 .table-headermd .el-table__body {
   width: 100% !important;

+ 45 - 33
src/views/storeManagement/storeDetail.vue

@@ -128,45 +128,57 @@
             <p style="padding: 0 16px">车铺照片(店招及车铺产品拍在一张照片里)</p>
             <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
           </div>
-          <van-row
-            gutter="20"
-            style="padding: 16px"
-            v-if="list.img != null && list.storeCategory != 'C917'">
-            <van-col span="12">
+          <template v-if="list.img != null && list.storeCategory != 'C917'">
+            <van-row gutter="20" style="padding: 16px">
+              <van-col span="12">
+                <div v-if="storeTypePOP">
+                  <van-image
+                    width="100%"
+                    height="160"
+                    :src="list.img"
+                    @click="deleteImgs(list.img)" />
+                  <p style="text-align: center">
+                    {{ list.ifJzStoreType != 1 ? '门店照' : '家装前台照片' }}
+                  </p>
+                </div>
+                <div v-else>
+                  <van-image
+                    width="100%"
+                    height="160"
+                    :src="list.img"
+                    @click="deleteImgs(list.img)" />
+                  <p style="text-align: center">
+                    {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
+                  </p>
+                </div>
+              </van-col>
+              <van-col span="12" v-if="list.ifJzStoreType != 1">
+                <div v-if="storeTypePOP">
+                  <van-image
+                    width="100%"
+                    height="160"
+                    :src="list.imgSed"
+                    @click="deleteImgs(list.imgSed)" />
+                  <p style="text-align: center">
+                    {{ list.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片' }}
+                  </p>
+                </div>
+              </van-col>
+            </van-row>
+          </template>
+          <!-- 20240924 店招照注释下次发布 -->
+          <!-- <van-row gutter="20" style="padding: 16px">
+            <van-col span="12" v-if="list.newStoreSignPhoto">
               <div v-if="storeTypePOP">
                 <van-image
                   width="100%"
                   height="160"
-                  :src="list.img"
-                  @click="deleteImgs(list.img)" />
-                <p style="text-align: center">
-                  {{ list.ifJzStoreType != 1 ? '门店照' : '家装前台照片' }}
-                </p>
-              </div>
-              <div v-else>
-                <van-image
-                  width="100%"
-                  height="160"
-                  :src="list.img"
-                  @click="deleteImgs(list.img)" />
-                <p style="text-align: center">
-                  {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
-                </p>
-              </div>
-            </van-col>
-            <van-col span="12" v-if="list.ifJzStoreType != 1">
-              <div v-if="storeTypePOP">
-                <van-image
-                  width="100%"
-                  height="160"
-                  :src="list.imgSed"
-                  @click="deleteImgs(list.imgSed)" />
-                <p style="text-align: center">
-                  {{ list.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片' }}
-                </p>
+                  :src="list.newStoreSignPhoto"
+                  @click="deleteImgs(list.newStoreSignPhoto)" />
+                <p style="text-align: center">店招照</p>
               </div>
             </van-col>
-          </van-row>
+          </van-row> -->
           <van-row gutter="20" style="padding: 16px" v-if="type == 'address'">
             <van-col
               span="12"