Parcourir la source

Merge branch 'feature_20241014_同城店铺新建流程重构'

# Conflicts:
#	src/views/storeManagement/storeDetail.vue
zhujindu il y a 1 an
Parent
commit
4d822daf2c

+ 7 - 2
.env.test

@@ -3,14 +3,19 @@ VUE_APP_TITLE = 门店拜访
 
 # 本地开发环境配置
 ENV = 'test'
+# VUE_APP_Target=http://192.168.100.190:9560/
+# VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+# VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
+# VUE_APP_BASE_API = '/'
+#测试环境
 VUE_APP_Target=https://ssbsfatest.nipponpaint.com.cn
 VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
 VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
+VUE_APP_BASE_API = '/ssbsfa/'
+
 # 正式环境
 # VUE_APP_Target=https://ssbsfa.nipponpaint.com.cn
 # VUE_APP_SSB_LINK=http://suishenbang.nipponpaint.com.cn
 # VUE_APP_XD_LINK=http://b2b.nipponpaint.com.cn
-
-VUE_APP_BASE_API = '/ssbsfa/'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

Fichier diff supprimé car celui-ci est trop grand
+ 256 - 211
src/api/index.js


+ 1 - 1
src/assets/styles/index.css

@@ -45,7 +45,7 @@ div:focus {outline: none;}
     }
 }
 /*public*/
-.bgcolor {background-color: #F5F5F5;}
+.bgcolor {background-color: #F5F5F5;width: 100%;height: 100%;}
 .contentborder {background-color: #fff;border-radius: 5px;margin: 0 10px 16px;overflow: hidden}
 .colorbalck {color: #333;}
 .rateText{vertical-align: super;display: inline-block;font-size: 14px;}

+ 27 - 18
src/components/ImgView.vue

@@ -2,63 +2,72 @@
   <div>
     <div class="cameraDiv1" @click="uploadImgView">
       <div class="imgPre">
-        <van-icon class="photobrowsing" name="expand-o" size="22px" color="#969696" v-if="imgArr!=''" />
-        <img :src="imgArr" alt="" v-if="imgArr!=''">
+        <van-icon
+          class="photobrowsing"
+          name="expand-o"
+          size="22px"
+          color="#1989fa"
+          v-if="imgArr != ''" />
+        <img :src="imgArr" alt="" v-if="imgArr != ''" />
       </div>
-      <p class="coverImg"><van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{ imgText }}</van-icon></p>
+      <p class="coverImg">
+        <van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{
+          imgText
+        }}</van-icon>
+      </p>
     </div>
-    <p style="text-align: center;">{{ imgText }}</p>
+    <p style="text-align: center">{{ imgText }}</p>
   </div>
 </template>
 
 <script>
-import {ImagePreview} from "vant";
-import {uploadImage} from "@/api/index";
+import { ImagePreview } from 'vant';
+import { uploadImage } from '@/api/index';
 
 export default {
   name: 'uploadImg',
   props: {
     uploadid: {
       type: String,
-      default: ''
+      default: '',
     },
     imgText: {
       type: String,
-      default: ''
+      default: '',
     },
     visitsId: {
       type: String,
-      default: ''
+      default: '',
     },
     taskId: {
       type: String,
-      default: ''
+      default: '',
     },
     collectionId: {
       type: String,
-      default: ''
+      default: '',
     },
     type: {
       type: Number,
-      default: 1
+      default: 1,
     },
     imgArr: {
       type: String,
-      default: ''
+      default: '',
     },
   },
   data() {
     return {
       shows: false,
-      url: ""
-    }
+      url: '',
+    };
   },
   methods: {
     uploadImgView() {
-      this.$toast("请输入名称!")
+      this.$toast('请输入名称!');
     },
   },
-}
+};
 </script>
 
 <style scoped>
@@ -98,7 +107,7 @@ export default {
   z-index: 99;
   background-color: rgba(255, 255, 255, 0.8);
   border-bottom-left-radius: 3px;
-  border-top-left-radius: 3px
+  border-top-left-radius: 3px;
 }
 
 .coverImg {

+ 103 - 86
src/components/uploadImgVStore.vue

@@ -1,146 +1,162 @@
 <template>
   <div>
     <div class="cameraDiv1">
-      <div class="imgPre">
-        <van-icon class="photobrowsing" name="expand-o" size="22px" color="#969696" v-if="imgArr!=''" @click="deleteImgs(imgArr)"/>
-        <img :src="imgArr" alt="" v-if="imgArr!=''">
+      <div class="imgPre" v-if="imgArr.length">
+        <van-icon
+          class="photobrowsing"
+          name="expand-o"
+          size="22px"
+          color="#1989fa"
+          @click="deleteImgs" />
+        <img :src="imgUrlArr[0]" alt="" />
       </div>
       <p class="coverImg" @click="uploadImg">
-        <van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{ imgText }}</van-icon>
+        <van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{
+          imgText
+        }}</van-icon>
       </p>
     </div>
-    <p style="text-align: center;">{{ imgText }}</p>
+    <p style="text-align: center">{{ imgText }}</p>
   </div>
 </template>
 
 <script>
-import {ImagePreview} from "vant";
+import { ImagePreview } from 'vant';
 import axios from 'axios';
-import {uploadImagev} from "@/api/index";
+import { uploadImagev } from '@/api/index';
 
 export default {
   name: 'uploadImg',
   props: {
     uploadid: {
       type: String,
-      default: ''
+      default: '',
     },
     imgText: {
       type: String,
-      default: ''
+      default: '',
     },
     visitsId: {
       type: String,
-      default: ''
+      default: '',
     },
     taskId: {
       type: String,
-      default: ''
+      default: '',
     },
     collectionId: {
       type: String,
-      default: ''
+      default: '',
     },
     type: {
       type: Number,
-      default: 1
+      default: 1,
     },
     imgArr: {
-      type: String,
-      default: ''
+      type: [String, Array],
+    },
+    count: {
+      type: Number,
+      default: 1,
     },
   },
   data() {
     return {
       shows: false,
-      url: ""
-    }
+      url: '',
+      localIds: [],
+      num: 0,
+      serverIdArr: [],
+      imgUrlArr: [],
+    };
+  },
+  watch: {
+    imgArr: {
+      handler(val) {
+        this.imgUrlArr = val.split(',');
+      },
+      immediate: true,
+    },
   },
   methods: {
-    deleteImgs(val) {
-      ImagePreview([val]);
+    deleteImgs() {
+      ImagePreview(this.imgUrlArr);
     },
-    uploadImg(){
+    uploadImg() {
       if (localStorage.getItem('chainName') == null) {
-        this.$toast("请输入名称!")
-        return
+        this.$toast('请输入名称!');
+        return;
       }
-      let url = window.location.href;
-      let that = this;
-      let wx = this.wx
-      let qiyeData
-      const instance = axios.create();
-      instance.defaults.headers.common['userId'] = localStorage.getItem("loginName");
-      instance.get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket',
-          {
-            params: {
-              url: url
-            }
-          }).then(response => {
-        if (response.status == 200) {
-          qiyeData = response.data.data;
-          wx.config({
-            beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-            appId: qiyeData.appId, // 必填,企业微信的corpID
-            timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-            nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-            signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-            jsApiList: ["ready", "chooseImage","uploadImage"] // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-          });
-          wx.ready(function () {
-            wx.chooseImage({
-              count: 1,
-              sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
-              sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
-              defaultCameraMode: "normal", //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
-              isSaveToAlbum:0,
-              success: function (res) {
-                var localIds=""
-                if(res.localIds!=undefined){
-                  localIds= res.localIds[0]
-                }else{
-                  localIds=res.localId
-                }
-                wx.uploadImage({
-                  localId: localIds,
-                  isShowProgressTips: 1,
-                  success: function (res) {
-                    that.uploadImagev(res.serverId)
-                  }
-                });
-              }
-            });
-          })
-        }
+      this.wx.ready(() => {
+        this.wx.chooseImage({
+          count: this.count,
+          sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
+          sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
+          defaultCameraMode: 'normal', //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
+          isSaveToAlbum: 0,
+          success: (chooseRes) => {
+            this.localIds = chooseRes.localIds;
+            console.log('count=' + this.count);
+            console.log('chooseRes=' + chooseRes);
+            console.log('localIds=' + this.localIds);
+            // if (chooseRes.localIds != undefined) {
+            //   localIds = chooseRes.localIds[0];
+            // } else {
+            //   localIds = chooseRes.localId;
+            // }
+            this.num = 0;
+            this.serverIdArr = [];
+            this.forUploadImage();
+          },
+        });
       });
     },
-    uploadImagev(meidaId){
+    forUploadImage() {
+      this.wx.uploadImage({
+        localId: this.localIds[this.num],
+        isShowProgressTips: 1,
+        success: (uploadRes) => {
+          this.serverIdArr.push(uploadRes.serverId);
+          console.log('serverId=' + uploadRes.serverId);
+          this.num++;
+          if (this.num == this.localIds.length) {
+            this.uploadImagev(this.serverIdArr.join(','));
+          } else {
+            this.forUploadImage();
+          }
+        },
+      });
+    },
+    uploadImagev(meidaId) {
       var that = this;
-      var form={
-        mediaId:meidaId,
-        storeName:localStorage.getItem('chainName'),
-        locationRemark:localStorage.getItem('locationRemark'),
-        deptName:localStorage.getItem('deptName'),
-      }
+      var form = {
+        mediaId: meidaId,
+        storeName: localStorage.getItem('chainName'),
+        locationRemark: localStorage.getItem('locationRemark'),
+        deptName: localStorage.getItem('deptName'),
+      };
       var loind1 = that.$toast.loading({
         duration: 0,
         message: '上传中...',
         forbidClick: true,
       });
-      uploadImagev(form).then(res=>{
+      uploadImagev(form).then((res) => {
         if (res.code == 200) {
-          that.imgArr = res.data.url
+          // that.imgArr = res.data.url;
+          let imgArr = [];
+          res.data.forEach((item) => {
+            imgArr.push(item.url);
+          });
           loind1.clear();
-          that.$toast("上传成功!")
-          that.$emit('newimgarr', {fileUrl: res.data.url, type: that.type});
+          that.$toast('上传成功!');
+          that.$emit('newimgarr', { fileUrl: imgArr.join(','), type: that.type });
         } else {
-          that.$toast("上传失败!")
+          that.$toast('上传失败!');
         }
-      })
-    }
+      });
+    },
   },
-}
+};
 </script>
 
 <style scoped>
@@ -148,6 +164,7 @@ export default {
   position: relative;
   height: 164px;
   width: 100%;
+  background-color: white;
 }
 
 .cameraDiv1 img {
@@ -180,7 +197,7 @@ export default {
   z-index: 99;
   background-color: rgba(255, 255, 255, 0.8);
   border-bottom-left-radius: 3px;
-  border-top-left-radius: 3px
+  border-top-left-radius: 3px;
 }
 
 .coverImg {

+ 92 - 84
src/components/uploadImgVStorec.vue

@@ -1,143 +1,150 @@
 <template>
-    <div class="cameraDiv1">
-<!--      <div class="imgPre">-->
-<!--        <van-icon class="photobrowsing" name="expand-o" size="22px" color="#969696" v-if="imgArr!=''" @click="deleteImgs(imgArr)"/>-->
-<!--        <img :src="imgArr" alt="" v-if="imgArr!=''">-->
-<!--      </div>-->
-      <p class="coverImg" @click="uploadImg">
-        <van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{ imgText }}</van-icon>
-      </p>
-    </div>
+  <div class="cameraDiv1">
+    <!--      <div class="imgPre">-->
+    <!--        <van-icon class="photobrowsing" name="expand-o" size="22px" color="#969696" v-if="imgArr!=''" @click="deleteImgs(imgArr)"/>-->
+    <!--        <img :src="imgArr" alt="" v-if="imgArr!=''">-->
+    <!--      </div>-->
+    <p class="coverImg" @click="uploadImg">
+      <van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{
+        imgText
+      }}</van-icon>
+    </p>
+  </div>
 </template>
 
 <script>
-import {ImagePreview} from "vant";
+import { ImagePreview } from 'vant';
 import axios from 'axios';
-import {uploadImagev} from "@/api/index";
+import { uploadImagev } from '@/api/index';
 
 export default {
   name: 'uploadImg',
   props: {
     uploadid: {
       type: String,
-      default: ''
+      default: '',
     },
     imgText: {
       type: String,
-      default: ''
+      default: '',
     },
     visitsId: {
       type: String,
-      default: ''
+      default: '',
     },
     taskId: {
       type: String,
-      default: ''
+      default: '',
     },
     collectionId: {
       type: String,
-      default: ''
+      default: '',
     },
     type: {
       type: Number,
-      default: 1
+      default: 1,
     },
     imgArr: {
       type: String,
-      default: ''
+      default: '',
     },
   },
   data() {
     return {
       shows: false,
-      url: ""
-    }
+      url: '',
+    };
   },
   methods: {
     deleteImgs(val) {
       ImagePreview([val]);
     },
-    uploadImg(){
+    uploadImg() {
       if (localStorage.getItem('chainName') == null) {
-        this.$toast("请输入名称!")
-        return
+        this.$toast('请输入名称!');
+        return;
       }
       let url = window.location.href;
       let that = this;
-      let wx = this.wx
-      let qiyeData
+      let wx = this.wx;
+      let qiyeData;
       const instance = axios.create();
-      instance.defaults.headers.common['userId'] = localStorage.getItem("loginName");
-      instance.get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket',
-          {
-            params: {
-              url: url
-            }
-          }).then(response => {
-        if (response.status == 200) {
-          qiyeData = response.data.data;
-          wx.config({
-            beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-            appId: qiyeData.appId, // 必填,企业微信的corpID
-            timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-            nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-            signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-            jsApiList: ["ready", "chooseImage","uploadImage"] // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-          });
-          wx.ready(function () {
-            wx.chooseImage({
-              count: 1,
-              sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
-              sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
-              defaultCameraMode: "normal", //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
-              isSaveToAlbum:0,
-              success: function (res) {
-                var localIds=""
-                if(res.localIds!=undefined){
-                  localIds= res.localIds[0]
-                }else{
-                  localIds=res.localId
-                }
-                // andriod中localId可以作为img标签的src属性显示图片;
-                // iOS应当使用 getLocalImgData 获取图片base64数据,从而用于img标签的显示(在img标签内使用 wx.chooseImage 的 localid 显示可能会不成功)
-                wx.uploadImage({
-                  localId: localIds, // 需要上传的图片的本地ID,由chooseImage接口获得
-                  isShowProgressTips: 1, // 默认为1,显示进度提示
-                  success: function (res) {
-                    that.uploadImagev(res.serverId)
+      instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
+      instance
+        .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
+          params: {
+            url: url,
+          },
+        })
+        .then((response) => {
+          if (response.status == 200) {
+            qiyeData = response.data.data;
+            wx.config({
+              beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
+              debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+              appId: qiyeData.appId, // 必填,企业微信的corpID
+              timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
+              nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
+              signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
+              jsApiList: ['ready', 'chooseImage', 'uploadImage'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
+            });
+            wx.ready(function () {
+              wx.chooseImage({
+                count: 1,
+                sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
+                sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
+                defaultCameraMode: 'normal', //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
+                isSaveToAlbum: 0,
+                success: function (res) {
+                  var localIds = '';
+                  if (res.localIds != undefined) {
+                    localIds = res.localIds[0];
+                  } else {
+                    localIds = res.localId;
                   }
-                });
-              }
+                  // andriod中localId可以作为img标签的src属性显示图片;
+                  // iOS应当使用 getLocalImgData 获取图片base64数据,从而用于img标签的显示(在img标签内使用 wx.chooseImage 的 localid 显示可能会不成功)
+                  wx.uploadImage({
+                    localId: localIds, // 需要上传的图片的本地ID,由chooseImage接口获得
+                    isShowProgressTips: 1, // 默认为1,显示进度提示
+                    success: function (res) {
+                      that.uploadImagev(res.serverId);
+                    },
+                  });
+                },
+              });
             });
-          })
-        }
-      });
+          }
+        });
     },
-    uploadImagev(meidaId){
+    uploadImagev(meidaId) {
       var that = this;
-      var form={
-        mediaId:meidaId,
-        storeName:localStorage.getItem('chainName')
-      }
+      var form = {
+        mediaId: meidaId,
+        storeName: localStorage.getItem('chainName'),
+      };
       var loind1 = that.$toast.loading({
         duration: 0,
         message: '上传中...',
         forbidClick: true,
       });
-      uploadImagev(form).then(res=>{
+      uploadImagev(form).then((res) => {
         if (res.code == 200) {
-          that.imgArr = res.data.url
+          // that.imgArr = res.data.url
+          let imgArr = [];
+          res.data.forEach((item) => {
+            imgArr.push(item.url);
+          });
           loind1.clear();
-          that.$toast("上传成功!")
-          that.$emit('newimgarr', {fileUrl: res.data.url, type: that.type});
+          that.$toast('上传成功!');
+          that.$emit('newimgarr', { fileUrl: imgArr.join(','), type: that.type });
         } else {
-          that.$toast("上传失败!")
+          that.$toast('上传失败!');
         }
-      })
-    }
+      });
+    },
   },
-}
+};
 </script>
 
 <style scoped>
@@ -177,7 +184,7 @@ export default {
   z-index: 99;
   background-color: rgba(255, 255, 255, 0.8);
   border-bottom-left-radius: 3px;
-  border-top-left-radius: 3px
+  border-top-left-radius: 3px;
 }
 
 .coverImg {
@@ -186,7 +193,8 @@ export default {
   top: 0;
   right: 0;
   height: 20px;
-  width: 100%;margin: 0;
+  width: 100%;
+  margin: 0;
 }
 
 .coverImg .ico {

+ 101 - 93
src/components/viewaddreddUploadImg.vue

@@ -2,162 +2,170 @@
   <div>
     <div class="cameraDiv1">
       <div class="imgPre">
-        <van-icon class="photobrowsing" name="expand-o" size="22px" color="#969696" v-if="imgArr!=''" @click="deleteImgs(imgArr)"/>
-        <img :src="imgArr" alt="" v-if="imgArr!=''">
+        <van-icon
+          class="photobrowsing"
+          name="expand-o"
+          size="22px"
+          color="#1989fa"
+          v-if="imgArr != ''"
+          @click="deleteImgs(imgArr)" />
+        <img :src="imgArr" alt="" v-if="imgArr != ''" />
       </div>
       <p class="coverImg" @click="uploadImg">
-        <van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{ imgText }}</van-icon>
+        <van-icon class="photo ico" name="photograph" size="16px" color="#969696">{{
+          imgText
+        }}</van-icon>
       </p>
     </div>
-    <p style="text-align: center;">{{ imgText }}</p>
+    <p style="text-align: center">{{ imgText }}</p>
   </div>
 </template>
 
 <script>
-import {ImagePreview} from "vant";
+import { ImagePreview } from 'vant';
 import axios from 'axios';
-import {uploadImageaddress} from "@/api/index";
+import { uploadImageaddress } from '@/api/index';
 
 export default {
   name: 'uploadImg',
   props: {
     uploadid: {
       type: String,
-      default: ''
+      default: '',
     },
     imgText: {
       type: String,
-      default: ''
+      default: '',
     },
     visitsId: {
       type: String,
-      default: ''
+      default: '',
     },
     taskId: {
       type: String,
-      default: ''
+      default: '',
     },
     collectionId: {
       type: String,
-      default: ''
+      default: '',
     },
     type: {
       type: Number,
-      default: 1
+      default: 1,
     },
     imgArr: {
       type: String,
-      default: ''
+      default: '',
     },
   },
   data() {
     return {
       shows: false,
-      url: ""
-    }
+      url: '',
+    };
   },
   methods: {
     deleteImgs(val) {
       ImagePreview([val]);
     },
-    uploadImg(){
+    uploadImg() {
       if (localStorage.getItem('chainName') == null) {
-        this.$toast("请输入名称!")
-        return
+        this.$toast('请输入名称!');
+        return;
       }
       let url = window.location.href;
       let that = this;
-      let wx = this.wx
-      let qiyeData
+      let wx = this.wx;
+      let qiyeData;
       const instance = axios.create();
 
-      instance.defaults.headers.common['userId'] = localStorage.getItem("loginName");
-      instance.get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket',
-          {
-            params: {
-              url: url
-            }
-          }).then(response => {
-        if (response.status == 200) {
-          qiyeData = response.data.data;
-          wx.config({
-            beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-            appId: qiyeData.appId, // 必填,企业微信的corpID
-            timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-            nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-            signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-            jsApiList: ["ready", "chooseImage","uploadImage","getLocation"] // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-          });
-          wx.ready(function () {
-            var locations=""
-            wx.getLocation({
-              type: 'gcj02',
-              success: function (response) {
-                locations=response
+      instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
+      instance
+        .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
+          params: {
+            url: url,
+          },
+        })
+        .then((response) => {
+          if (response.status == 200) {
+            qiyeData = response.data.data;
+            wx.config({
+              beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
+              debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+              appId: qiyeData.appId, // 必填,企业微信的corpID
+              timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
+              nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
+              signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
+              jsApiList: ['ready', 'chooseImage', 'uploadImage', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
+            });
+            wx.ready(function () {
+              var locations = '';
+              wx.getLocation({
+                type: 'gcj02',
+                success: function (response) {
+                  locations = response;
 
-                wx.chooseImage({
-                  count: 1,
-                  sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
-                  sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
-                  defaultCameraMode: "normal", //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
-                  isSaveToAlbum:0,
-                  success: function (res) {
-                    var localIds=""
-                    if(res.localIds!=undefined){
-                      localIds= res.localIds[0]
-                    }else{
-                      localIds=res.localId
-                    }
-                    wx.uploadImage({
-                      localId: localIds,
-                      isShowProgressTips: 1,
-                      success: function (res) {
-                        that.uploadImagev(res.serverId,locations.latitude, locations.longitude)
+                  wx.chooseImage({
+                    count: 1,
+                    sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
+                    sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
+                    defaultCameraMode: 'normal', //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
+                    isSaveToAlbum: 0,
+                    success: function (res) {
+                      var localIds = '';
+                      if (res.localIds != undefined) {
+                        localIds = res.localIds[0];
+                      } else {
+                        localIds = res.localId;
                       }
-                    });
-                  }
-                });
-              },
-              fail: function () {
-                that.$dialog.alert({
-                  message: 'GPS未开启',
-                })
-              }
+                      wx.uploadImage({
+                        localId: localIds,
+                        isShowProgressTips: 1,
+                        success: function (res) {
+                          that.uploadImagev(res.serverId, locations.latitude, locations.longitude);
+                        },
+                      });
+                    },
+                  });
+                },
+                fail: function () {
+                  that.$dialog.alert({
+                    message: 'GPS未开启',
+                  });
+                },
+              });
             });
-
-          })
-        }
-      });
+          }
+        });
     },
-    uploadImagev(meidaId,lat,lng){
+    uploadImagev(meidaId, lat, lng) {
       var that = this;
-      var form={
-        mediaId:meidaId,
-        storeName:localStorage.getItem('chainName'),
-        locationRemark:localStorage.getItem('locationRemark'),
-        deptName:localStorage.getItem('deptName'),
-        lat:lat,
-        lng:lng
-      }
+      var form = {
+        mediaId: meidaId,
+        storeName: localStorage.getItem('chainName'),
+        locationRemark: localStorage.getItem('locationRemark'),
+        deptName: localStorage.getItem('deptName'),
+        lat: lat,
+        lng: lng,
+      };
       var loind1 = that.$toast.loading({
         duration: 0,
         message: '上传中...',
         forbidClick: true,
       });
-      uploadImageaddress(form).then(res=>{
+      uploadImageaddress(form).then((res) => {
         if (res.code == 200) {
-          that.imgArr = res.data.url
+          that.imgArr = res.data.url;
           loind1.clear();
-          that.$toast("上传成功!")
-          that.$emit('newimgarr', {fileUrl: res.data.url, type: that.type});
+          that.$toast('上传成功!');
+          that.$emit('newimgarr', { fileUrl: res.data.url, type: that.type });
         } else {
-          that.$toast("上传失败!")
+          that.$toast('上传失败!');
         }
-      })
-    }
+      });
+    },
   },
-}
+};
 </script>
 
 <style scoped>
@@ -197,7 +205,7 @@ export default {
   z-index: 99;
   background-color: rgba(255, 255, 255, 0.8);
   border-bottom-left-radius: 3px;
-  border-top-left-radius: 3px
+  border-top-left-radius: 3px;
 }
 
 .coverImg {

+ 2 - 1
src/main.js

@@ -18,7 +18,7 @@ import { toastLoading } from '@/utils/commonVant';
 import '@vant/touch-emulator';
 Vue.config.productionTip = false;
 import Vant from 'vant';
-import { Toast } from 'vant';
+import { Toast, Notify } from 'vant';
 import 'vant/lib/index.css';
 import ClipboardJS from 'clipboard';
 Vue.use(Vant);
@@ -49,6 +49,7 @@ Vue.prototype.wx = wx;
 Vue.prototype.parseTimeParagraph = parseTimeParagraph;
 Vue.prototype.Micrometer = Micrometer;
 Vue.prototype.Toast = Toast;
+Vue.prototype.notify = Notify;
 var clipboard = new ClipboardJS('.btn');
 clipboard.on('success', function (e) {
   Toast('编码复制成功!');

+ 388 - 376
src/router/index.js

@@ -1,390 +1,402 @@
-import Vue from "vue";
-import VueRouter from "vue-router";
-import layout from "@/layout/index.vue";
+import Vue from 'vue';
+import VueRouter from 'vue-router';
+import layout from '@/layout/index.vue';
 
 const originalPush = VueRouter.prototype.push;
 VueRouter.prototype.push = function push(location) {
-    return originalPush.call(this, location).catch(err => err);
+  return originalPush.call(this, location).catch((err) => err);
 };
 Vue.use(VueRouter);
 const router = new VueRouter({
-    // mode:"history",
-    // mode:process.env.NODE_ENV !==
-    // "production" ? "hash" : "history",
-    mode:"history",
-    scrollBehavior(to, from, savedPosition) {
-      if (savedPosition) {
-        return savedPosition;
-      } else {
-        return { x: 0, y: 0 };
-      }
+  // mode:"history",
+  // mode:process.env.NODE_ENV !==
+  // "production" ? "hash" : "history",
+  mode: 'history',
+  scrollBehavior(to, from, savedPosition) {
+    if (savedPosition) {
+      return savedPosition;
+    } else {
+      return { x: 0, y: 0 };
+    }
+  },
+  base: '/mobile/',
+  routes: [
+    {
+      path: '/',
+      component: layout,
+      redirect: '/home',
+      children: [
+        {
+          path: '/home',
+          name: 'home',
+          component: () => import('@/views/home/index.vue'),
+        },
+        {
+          path: '/reportingRate',
+          name: 'reportingRate',
+          component: () => import('@/views/home/reportingRate.vue'),
+        },
+        {
+          path: '/err',
+          name: 'err',
+          component: () => import('@/views/home/err.vue'),
+        },
+        {
+          path: '/login',
+          name: 'login',
+          component: () => import('@/views/home/login.vue'),
+        },
+        {
+          path: '/clew',
+          name: 'clew',
+          component: () => import('@/views/clew/index.vue'),
+        },
+        {
+          path: '/clewent',
+          name: 'clew',
+          component: () => import('@/views/clew/clewent.vue'),
+        },
+        // {
+        //     path: "/logincs",
+        //     name: "logincs",
+        //     component: () => import("@/views/home/logincs.vue")
+        // }
+      ],
     },
-    base: '/mobile/',
-    routes: [
-        {
-            path: "/",
-            component: layout,
-            redirect: "/home",
-            children: [
-                {
-                    path: "/home",
-                    name: "home",
-                    component: () => import("@/views/home/index.vue")
-                },
-                {
-                    path: "/reportingRate",
-                    name: "reportingRate",
-                    component: () => import("@/views/home/reportingRate.vue")
-                },
-                {
-                    path: "/err",
-                    name: "err",
-                    component: () => import("@/views/home/err.vue")
-                },
-                {
-                    path: "/login",
-                    name: "login",
-                    component: () => import("@/views/home/login.vue")
-                },
-                {
-                    path: "/clew",
-                    name: "clew",
-                    component: () => import("@/views/clew/index.vue")
-                },
-                {
-                    path: "/clewent",
-                    name: "clew",
-                    component: () => import("@/views/clew/clewent.vue")
-                },
-                // {
-                //     path: "/logincs",
-                //     name: "logincs",
-                //     component: () => import("@/views/home/logincs.vue")
-                // }
-            ]
-        },
-        {
-            path: "/storemanagementlist",
-            component: layout,
-            redirect: "/storemanagement/index",
-            children: [
-                {
-                    path: "/storemanagement/index",
-                    name: "storeManagement",
-                    component: () => import("@/views/storeManagement/index.vue")
-                },
-                {
-                    path: "/storeDetail",
-                    name: "storeDetail",
-                    component: () => import("@/views/storeManagement/storeDetail.vue")
-                },
-                {
-                    path: "/storeAdd",
-                    name: "storeAdd",
-                    component: () => import("@/views/storeManagement/storeAdd.vue")
-                },
-                {
-                    path: "/storeAddress",
-                    name: "storeAddress",
-                    component: () => import("@/views/storeManagement/storeAddress.vue")
-                },
-                {
-                    path: "/odersuccess",
-                    name: "storeAdd",
-                    component: () => import("@/views/deviceOutside/oderSuccess.vue")
-                },
-                {
-                    path: "/storeEdit",
-                    name: "storeEdit",
-                    component: () => import("@/views/storeManagement/storeEdit.vue")
-                },
-                {
-                    path: "/success",
-                    name: "success",
-                    component: () => import("@/views/storeManagement/success.vue")
-                }
-            ]
-        },
-        {
-            path: "/outsidelist",
-            component: layout,
-            redirect: "/outsidelist/index",
-            children: [
-                {
-                    path: "/outsidelist/index",
-                    name: "outsidelist",
-                    component: () => import("@/views/deviceOutside/index.vue")
-                },
-                {
-                    path: "/ai",
-                    name: "ai",
-                    component: () => import("@/views/intelligence/index.vue")
-                },
-                {
-                    path: "/topStore",
-                    name: "topStore",
-                    component: () => import("@/views/deviceOutside/topStore.vue")
-                },
-                {
-                    path: "/pItem",
-                    name: "pItem",
-                    component: () => import("@/views/deviceOutside/productItem.vue")
-                },
-                {
-                    path: "/suishenbangOutstoreVisit",
-                    name: "suishenbangOutstoreVisit",
-                    component: () => import("@/views/deviceOutside/suishenbangOutstoreVisit.vue")
-                },
-                {
-                    path: "/projectOut",
-                    name: "projectOut",
-                    component: () => import("@/views/deviceOutside/projectOut.vue")
-                },
-                {
-                    path: "/rangeStore",
-                    name: "rangeStore",
-                    component: () => import("@/views/deviceOutside/rangeStore.vue")
-                },
-                {
-                    path: "/outstoreVisit",
-                    name: "outstoreVisit",
-                    component: () => import("@/views/deviceOutside/outstoreVisit.vue")
-                },
-                {
-                    path: "/taskList",
-                    name: "taskList",
-                    component: () => import("@/views/deviceOutside/taskList.vue")
-                },
-                {
-                    path: "/storeGroup",
-                    name: "storeGroup",
-                    component: () => import("@/views/deviceOutside/storeGroup.vue")
-                },
-                {
-                    path: "/outabnormalVisit",
-                    name: "outabnormalVisit",
-                    component: () => import("@/views/deviceOutside/outabnormalVisit.vue")
-                }
-            ]
-        },
-        {
-            path: "/historicalVisit",
-            component: layout,
-            redirect: "/historicalVisit/index",
-            children: [
-                {
-                    path: "/historicalVisit/index",
-                    name: "historicalVisit",
-                    component: () => import("@/views/historicalVisit/index.vue")
-                },
-                {
-                    path: "/historAllVisit",
-                    name: "historAllVisit",
-                    component: () => import("@/views/historicalVisit/historAllVisit.vue")
-                },
-
-                {
-                    path: "/historicalDetails",
-                    name: "historicalDetails",
-                    component: () => import("@/views/historicalVisit/historicalDetails.vue")
-                },
-                {
-                    path: "/historiStoreVisit",
-                    name: "historiStoreVisit",
-                    component: () => import("@/views/historicalVisit/hisvistdeils.vue")
-                }
-            ]
-        },
-        {
-            path: "/deviceWithin",
-            component: layout,
-            redirect: "/deviceWithin/index",
-            children: [
-                {
-                    path: "/deviceWithin/index",
-                    name: "deviceWithin",
-                    component: () => import("@/views/deviceWithin/index.vue")
-                },
-                {
-                    path: "/storeVisitpage",
-                    name: "storeVisitpage",
-                    component: () => import("@/views/deviceWithin/storeVisit.vue")
-                },
-                {
-                    path: "/addStoreVisit",
-                    name: "addStoreVisit",
-                    component: () => import("@/views/deviceWithin/addStoreVisit.vue")
-                },
+    {
+      path: '/storemanagementlist',
+      component: layout,
+      redirect: '/storemanagement/index',
+      children: [
+        {
+          path: '/storemanagement/index',
+          name: 'storeManagement',
+          component: () => import('@/views/storeManagement/index.vue'),
+        },
+        {
+          path: '/storeDetail',
+          name: 'storeDetail',
+          component: () => import('@/views/storeManagement/storeDetail.vue'),
+        },
+        {
+          path: '/storeAdd',
+          name: 'storeAdd',
+          component: () => import('@/views/storeManagement/storeAdd.vue'),
+        },
+        {
+          path: '/storeAddress',
+          name: 'storeAddress',
+          component: () => import('@/views/storeManagement/storeAddress.vue'),
+        },
+        {
+          path: '/odersuccess',
+          name: 'storeAdd',
+          component: () => import('@/views/deviceOutside/oderSuccess.vue'),
+        },
+        {
+          path: '/storeEdit',
+          name: 'storeEdit',
+          component: () => import('@/views/storeManagement/storeEdit.vue'),
+        },
+        {
+          path: '/success',
+          name: 'success',
+          component: () => import('@/views/storeManagement/success.vue'),
+        },
+      ],
+    },
+    {
+      path: '/outsidelist',
+      component: layout,
+      redirect: '/outsidelist/index',
+      children: [
+        {
+          path: '/outsidelist/index',
+          name: 'outsidelist',
+          component: () => import('@/views/deviceOutside/index.vue'),
+        },
+        {
+          path: '/ai',
+          name: 'ai',
+          component: () => import('@/views/intelligence/index.vue'),
+        },
+        {
+          path: '/topStore',
+          name: 'topStore',
+          component: () => import('@/views/deviceOutside/topStore.vue'),
+        },
+        {
+          path: '/pItem',
+          name: 'pItem',
+          component: () => import('@/views/deviceOutside/productItem.vue'),
+        },
+        {
+          path: '/suishenbangOutstoreVisit',
+          name: 'suishenbangOutstoreVisit',
+          component: () => import('@/views/deviceOutside/suishenbangOutstoreVisit.vue'),
+        },
+        {
+          path: '/projectOut',
+          name: 'projectOut',
+          component: () => import('@/views/deviceOutside/projectOut.vue'),
+        },
+        {
+          path: '/rangeStore',
+          name: 'rangeStore',
+          component: () => import('@/views/deviceOutside/rangeStore.vue'),
+        },
+        {
+          path: '/outstoreVisit',
+          name: 'outstoreVisit',
+          component: () => import('@/views/deviceOutside/outstoreVisit.vue'),
+        },
+        {
+          path: '/taskList',
+          name: 'taskList',
+          component: () => import('@/views/deviceOutside/taskList.vue'),
+        },
+        {
+          path: '/storeGroup',
+          name: 'storeGroup',
+          component: () => import('@/views/deviceOutside/storeGroup.vue'),
+        },
+        {
+          path: '/outabnormalVisit',
+          name: 'outabnormalVisit',
+          component: () => import('@/views/deviceOutside/outabnormalVisit.vue'),
+        },
+      ],
+    },
+    {
+      path: '/historicalVisit',
+      component: layout,
+      redirect: '/historicalVisit/index',
+      children: [
+        {
+          path: '/historicalVisit/index',
+          name: 'historicalVisit',
+          component: () => import('@/views/historicalVisit/index.vue'),
+        },
+        {
+          path: '/historAllVisit',
+          name: 'historAllVisit',
+          component: () => import('@/views/historicalVisit/historAllVisit.vue'),
+        },
 
-                {
-                    path: "/addStoreVisitd",
-                    name: "addStoreVisitd",
-                    component: () => import("@/views/deviceWithin/addStoreVisitd.vue")
-                },
-                {
-                    path: "/addStoreVisitP",
-                    name: "addStoreVisitP",
-                    component: () => import("@/views/deviceWithin/addStoreVisitP.vue")
-                },
-                {
-                    path: "/abnormalVisit",
-                    name: "abnormalVisit",
-                    component: () => import("@/views/deviceWithin/abnormalVisit.vue")
-                }
-                ,
-                {
-                    path: "/sign",
-                    name: "sign",
-                    component: () => import("@/views/sign/index.vue")
-                } ,
-                {
-                    path: "/signApprovalList",
-                    name: "signApproval",
-                    component: () => import("@/views/signApproval/index.vue")
-                },
-                {
-                    path: "/signApproval",
-                    name: "signApproval",
-                    component: () => import("@/views/signApproval/signApproval.vue")
-                }
-            ]
+        {
+          path: '/historicalDetails',
+          name: 'historicalDetails',
+          component: () => import('@/views/historicalVisit/historicalDetails.vue'),
+        },
+        {
+          path: '/historiStoreVisit',
+          name: 'historiStoreVisit',
+          component: () => import('@/views/historicalVisit/hisvistdeils.vue'),
+        },
+      ],
+    },
+    {
+      path: '/deviceWithin',
+      component: layout,
+      redirect: '/deviceWithin/index',
+      children: [
+        {
+          path: '/deviceWithin/index',
+          name: 'deviceWithin',
+          component: () => import('@/views/deviceWithin/index.vue'),
+        },
+        {
+          path: '/storeVisitpage',
+          name: 'storeVisitpage',
+          component: () => import('@/views/deviceWithin/storeVisit.vue'),
+        },
+        {
+          path: '/addStoreVisit',
+          name: 'addStoreVisit',
+          component: () => import('@/views/deviceWithin/addStoreVisit.vue'),
         },
 
         {
-            path: "/My",
-            component: layout,
-            redirect: "/My/index",
-            children: [
-                {
-                    path: "/My/index",
-                    name: "MyList",
-                    component: () => import("@/views/week/index.vue")
-                },
-                {
-                    path: "/myInventory",
-                    name: "myInventory",
-                    component: () => import("@/views/my/myInventory.vue")
-                },
-                {
-                    path: "/material",
-                    name: "material",
-                    component: () => import("@/views/my/material.vue")
-                },
-                {
-                    path: "/subordinateHistoricalDaily",
-                    name: "subordinateHistoricalDaily",
-                    component: () => import("@/views/week/dailyHistorical.vue")
-                }, {
-                    path: "/subordinateHistoricalWeekly",
-                    name: "subordinateHistoricalWeekly",
-                    component: () => import("@/views/week/weeklyHistorical.vue")
-                }, {
-                    path: "/myHistoricalDaily",
-                    name: "myHistoricalDaily",
-                    component: () => import("@/views/week/myHistoricalDaily.vue")
-                },
-                {
-                    path: "/weeklyApproval",
-                    name: "weeklyApproval",
-                    component: () => import("@/views/week/weeklyApproval.vue")
-                },
-                {
-                    path: "/weeklyApprovalDetils",
-                    name: "weeklyApprovalDetils",
-                    component: () => import("@/views/week/weeklyApprovalDetils.vue")
-                },
-                {
-                    path: "/myComment",
-                    name: "myComment",
-                    component: () => import("@/views/week/myComment.vue")
-                },
-                {
-                    path: "/doubleWeeklyDetils",
-                    name: "doubleWeeklyDetils",
-                    component: () => import("@/views/week/doubleWeeklyDetils.vue")
-                },
-                {
-                    path: "/daily",
-                    name: "daily",
-                    component: () => import("@/views/week/daily.vue")
-                }, {
-                    path: "/dailyApprovalList",
-                    name: "dailyApprovalList",
-                    component: () => import("@/views/week/dailyApprovalList.vue")
-                },
-                {
-                    path: "/dailyApproval",
-                    name: "dailyApproval",
-                    component: () => import("@/views/week/dailyApproval.vue")
-                },
-                {
-                    path: "/dailyDetails",
-                    name: "dailyDetails",
-                    component: () => import("@/views/week/dailyDetails.vue")
-                },
-                {
-                    path: "/weeklyApproval",
-                    name: "weeklyApproval",
-                    component: () => import("@/views/week/weeklyApproval.vue")
-                },
-                {
-                    path: "/weekly",
-                    name: "weekly",
-                    component: () => import("@/views/week/weekly.vue")
-                },
-                {
-                    path: "/doubleWeekly",
-                    name: "doubleWeekly",
-                    component: () => import("@/views/week/doubleWeekly.vue")
-                },
-                {
-                    path: "/doubleWeeklyApproval",
-                    name: "doubleWeeklyApproval",
-                    component: () => import("@/views/week/doubleWeeklyApproval.vue")
-                },
-                {
-                    path: "/doubleWeeklyHistorical",
-                    name: "doubleWeeklyHistorical",
-                    component: () => import("@/views/week/doubleWeeklyHistorical.vue")
-                },
-                {
-                    path: "/dailyHistoricalDetails",
-                    name: "dailyHistoricalDetails",
-                    component: () => import("@/views/week/dailyHistoricalDetails.vue")
-                },
-                {
-                    path: "/doubleHistoricalWeeklyDetils",
-                    name: "doubleHistoricalWeeklyDetils",
-                    component: () => import("@/views/week/doubleHistoricalWeeklyDetils.vue")
-                },
-                {
-                    path: "/weeklyHistoricalDetils",
-                    name: "weeklyHistoricalDetils",
-                    component: () => import("@/views/week/weeklyHistoricalDetils.vue")
-                },
-                {
-                    path: "/VisitSummary",
-                    name: "VisitSummary",
-                    component: () => import("@/views/week/VisitSummary.vue")
-                },
-                {
-                    path: "/VisitSummaryMy",
-                    name: "VisitSummaryMy",
-                    component: () => import("@/views/week/VisitSummaryMy.vue")
-                },
-                {
-                    path: "/VisitSummaryAdd",
-                    name: "VisitSummaryAdd",
-                    component: () => import("@/views/week/VisitSummaryAdd.vue")
-                },
-                {
-                    path: "/VisitSummaryDetail",
-                    name: "VisitSummaryDetail",
-                    component: () => import("@/views/week/VisitSummaryDetail.vue")
-                },
-            ]
+          path: '/addStoreVisitd',
+          name: 'addStoreVisitd',
+          component: () => import('@/views/deviceWithin/addStoreVisitd.vue'),
+        },
+        {
+          path: '/addStoreVisitP',
+          name: 'addStoreVisitP',
+          component: () => import('@/views/deviceWithin/addStoreVisitP.vue'),
+        },
+        {
+          path: '/abnormalVisit',
+          name: 'abnormalVisit',
+          component: () => import('@/views/deviceWithin/abnormalVisit.vue'),
+        },
+        {
+          path: '/sign',
+          name: 'sign',
+          component: () => import('@/views/sign/index.vue'),
+        },
+        {
+          path: '/signApprovalList',
+          name: 'signApproval',
+          component: () => import('@/views/signApproval/index.vue'),
+        },
+        {
+          path: '/signApproval',
+          name: 'signApproval',
+          component: () => import('@/views/signApproval/signApproval.vue'),
+        },
+        // 同城店铺建店审批
+        {
+          path: '/newStoreApprovalList',
+          name: 'newStoreApprovalList',
+          component: () => import('@/views/signApproval/newStoreApprovalList.vue'),
+        },
+        {
+          path: '/newStoreApprovalDetail',
+          name: 'newStoreApprovalDetail',
+          component: () => import('@/views/signApproval/newStoreApprovalDetail.vue'),
+        },
+      ],
+    },
 
-        }
-    ]
+    {
+      path: '/My',
+      component: layout,
+      redirect: '/My/index',
+      children: [
+        {
+          path: '/My/index',
+          name: 'MyList',
+          component: () => import('@/views/week/index.vue'),
+        },
+        {
+          path: '/myInventory',
+          name: 'myInventory',
+          component: () => import('@/views/my/myInventory.vue'),
+        },
+        {
+          path: '/material',
+          name: 'material',
+          component: () => import('@/views/my/material.vue'),
+        },
+        {
+          path: '/subordinateHistoricalDaily',
+          name: 'subordinateHistoricalDaily',
+          component: () => import('@/views/week/dailyHistorical.vue'),
+        },
+        {
+          path: '/subordinateHistoricalWeekly',
+          name: 'subordinateHistoricalWeekly',
+          component: () => import('@/views/week/weeklyHistorical.vue'),
+        },
+        {
+          path: '/myHistoricalDaily',
+          name: 'myHistoricalDaily',
+          component: () => import('@/views/week/myHistoricalDaily.vue'),
+        },
+        {
+          path: '/weeklyApproval',
+          name: 'weeklyApproval',
+          component: () => import('@/views/week/weeklyApproval.vue'),
+        },
+        {
+          path: '/weeklyApprovalDetils',
+          name: 'weeklyApprovalDetils',
+          component: () => import('@/views/week/weeklyApprovalDetils.vue'),
+        },
+        {
+          path: '/myComment',
+          name: 'myComment',
+          component: () => import('@/views/week/myComment.vue'),
+        },
+        {
+          path: '/doubleWeeklyDetils',
+          name: 'doubleWeeklyDetils',
+          component: () => import('@/views/week/doubleWeeklyDetils.vue'),
+        },
+        {
+          path: '/daily',
+          name: 'daily',
+          component: () => import('@/views/week/daily.vue'),
+        },
+        {
+          path: '/dailyApprovalList',
+          name: 'dailyApprovalList',
+          component: () => import('@/views/week/dailyApprovalList.vue'),
+        },
+        {
+          path: '/dailyApproval',
+          name: 'dailyApproval',
+          component: () => import('@/views/week/dailyApproval.vue'),
+        },
+        {
+          path: '/dailyDetails',
+          name: 'dailyDetails',
+          component: () => import('@/views/week/dailyDetails.vue'),
+        },
+        {
+          path: '/weeklyApproval',
+          name: 'weeklyApproval',
+          component: () => import('@/views/week/weeklyApproval.vue'),
+        },
+        {
+          path: '/weekly',
+          name: 'weekly',
+          component: () => import('@/views/week/weekly.vue'),
+        },
+        {
+          path: '/doubleWeekly',
+          name: 'doubleWeekly',
+          component: () => import('@/views/week/doubleWeekly.vue'),
+        },
+        {
+          path: '/doubleWeeklyApproval',
+          name: 'doubleWeeklyApproval',
+          component: () => import('@/views/week/doubleWeeklyApproval.vue'),
+        },
+        {
+          path: '/doubleWeeklyHistorical',
+          name: 'doubleWeeklyHistorical',
+          component: () => import('@/views/week/doubleWeeklyHistorical.vue'),
+        },
+        {
+          path: '/dailyHistoricalDetails',
+          name: 'dailyHistoricalDetails',
+          component: () => import('@/views/week/dailyHistoricalDetails.vue'),
+        },
+        {
+          path: '/doubleHistoricalWeeklyDetils',
+          name: 'doubleHistoricalWeeklyDetils',
+          component: () => import('@/views/week/doubleHistoricalWeeklyDetils.vue'),
+        },
+        {
+          path: '/weeklyHistoricalDetils',
+          name: 'weeklyHistoricalDetils',
+          component: () => import('@/views/week/weeklyHistoricalDetils.vue'),
+        },
+        {
+          path: '/VisitSummary',
+          name: 'VisitSummary',
+          component: () => import('@/views/week/VisitSummary.vue'),
+        },
+        {
+          path: '/VisitSummaryMy',
+          name: 'VisitSummaryMy',
+          component: () => import('@/views/week/VisitSummaryMy.vue'),
+        },
+        {
+          path: '/VisitSummaryAdd',
+          name: 'VisitSummaryAdd',
+          component: () => import('@/views/week/VisitSummaryAdd.vue'),
+        },
+        {
+          path: '/VisitSummaryDetail',
+          name: 'VisitSummaryDetail',
+          component: () => import('@/views/week/VisitSummaryDetail.vue'),
+        },
+      ],
+    },
+  ],
 });
 export default router;

+ 1 - 0
src/utils/TXApiFun.js

@@ -12,6 +12,7 @@ const isDevice = localStorage.getItem('isDevice');
 
 /**
  * 获取当前定位 调用之前确保当前页面已经授权(getTicketFun)
+ * @param isPermit // PC 模式下不能获取定位,是否允许跳过定位
  * */
 export function getPosition(isPermit = false) {
   return new Promise((resolve, reject) => {

+ 40 - 7
src/views/deviceOutside/index.vue

@@ -35,13 +35,27 @@
         <div class="cellcontent" v-for="(item, index) in list" :key="index">
           <van-cell>
             <div class="card">
-              <div class="title titlero btn" :data-clipboard-text="item.storeCode">
-                {{ item.storeName }}(<span style="color: #0057ba">{{ item.storeCode }}</span
-                >)<van-icon
-                  :name="paste"
-                  color="#ee0a24"
-                  size="20"
-                  style="top: 6px; margin-left: 4px" />
+              <div class="title titlero">
+                <span class="btn" :data-clipboard-text="item.storeCode">
+                  <span>{{ item.storeName }}</span>
+                  (<span style="color: #0057ba">{{ item.storeCode }}</span
+                  >)
+                  <van-icon
+                    :name="paste"
+                    color="#ee0a24"
+                    size="20"
+                    style="top: 6px; margin-left: 4px" />
+                </span>
+                <!-- "approvalStatus": 1:已结案;0:未结案, -->
+                <!-- "processApprovalStatus": 审批状态(0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝) -->
+                <template v-if="item.approvalStatus == 0">
+                  <span class="statusIcon submit" v-if="item.processApprovalStatus == 1"
+                    >已提交</span
+                  >
+                  <span class="statusIcon noSubmit" v-if="item.processApprovalStatus == 0"
+                    >未提交</span
+                  >
+                </template>
               </div>
               <div class="info" style="position: relative">
                 联系人:{{ item.contactName }}
@@ -1443,6 +1457,7 @@ export default {
                 PointSum: 0,
                 marklat: lat,
                 marklon: lon,
+                from: 'outPlan',
               },
             });
             localStorage.setItem('startTime', new Date());
@@ -1482,6 +1497,7 @@ export default {
                     PointSum: '0',
                     marklat: val.lat,
                     marklon: val.lon,
+                    from: 'outPlan',
                   },
                 });
               } else {
@@ -1665,6 +1681,7 @@ export default {
           PointSum: PointSumval,
           marklat: res.latitude,
           marklon: res.longitude,
+          from: 'outPlan',
         },
       });
     },
@@ -2427,6 +2444,22 @@ export default {
   color: #333;
   line-height: 22px;
   padding-right: 52px;
+  .statusIcon {
+    padding: 3px;
+    font-size: 12px;
+    margin: 0 3px;
+    color: #fff;
+    display: inline-block;
+    height: 20px;
+    line-height: 16px;
+    vertical-align: -1px;
+  }
+  .submit {
+    background: #ffba13;
+  }
+  .noSubmit {
+    background: #f11818;
+  }
 }
 .card .info {
   font-size: 14px;

Fichier diff supprimé car celui-ci est trop grand
+ 544 - 434
src/views/deviceOutside/projectOut.vue


+ 3 - 0
src/views/deviceOutside/rangeStore.vue

@@ -1595,6 +1595,7 @@ export default {
                 marklat: lat,
                 marklon: lon,
                 linkType: that.$route.query.tabVal,
+                from: 'outPlan',
               },
             });
             localStorage.setItem('startTime', new Date());
@@ -1635,6 +1636,7 @@ export default {
                     marklat: val.lat,
                     marklon: val.lon,
                     linkType: that.$route.query.tabVal,
+                    from: 'outPlan',
                   },
                 });
               } else {
@@ -1874,6 +1876,7 @@ export default {
           marklat: res.latitude,
           marklon: res.longitude,
           linkType: this.$route.query.tabVal,
+          from: 'outPlan',
         },
       });
     },

Fichier diff supprimé car celui-ci est trop grand
+ 16 - 57
src/views/deviceOutside/suishenbangOutstoreVisit.vue


+ 40 - 7
src/views/deviceOutside/topStore.vue

@@ -76,13 +76,27 @@
           <div class="cellcontent" v-for="(item, index) in list" :key="index">
             <van-cell>
               <div class="card">
-                <div class="title titlero btn" :data-clipboard-text="item.storeCode">
-                  {{ item.storeName }}(<span style="color: #0057ba">{{ item.storeCode }}</span
-                  >)<van-icon
-                    :name="paste"
-                    color="#ee0a24"
-                    size="20"
-                    style="top: 6px; margin-left: 4px" />
+                <div class="title titlero">
+                  <span class="btn" :data-clipboard-text="item.storeCode">
+                    <span>{{ item.storeName }}</span>
+                    (<span style="color: #0057ba">{{ item.storeCode }}</span
+                    >)
+                    <van-icon
+                      :name="paste"
+                      color="#ee0a24"
+                      size="20"
+                      style="top: 6px; margin-left: 4px" />
+                  </span>
+                  <!-- "approvalStatus": 1:已结案;0:未结案, -->
+                  <!-- "processApprovalStatus": 审批状态(0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝) -->
+                  <template v-if="item.approvalStatus == 0">
+                    <span class="statusIcon submit" v-if="item.processApprovalStatus == 1"
+                      >已提交</span
+                    >
+                    <span class="statusIcon noSubmit" v-if="item.processApprovalStatus == 0"
+                      >未提交</span
+                    >
+                  </template>
                 </div>
                 <div class="info" style="position: relative">
                   联系人:{{ item.contactName }}
@@ -1419,6 +1433,7 @@ export default {
                 marklat: lat,
                 marklon: lon,
                 linkType: 6,
+                from: 'topStore',
               },
             });
             localStorage.setItem('startTime', new Date());
@@ -1459,6 +1474,7 @@ export default {
                     marklat: val.lat,
                     marklon: val.lon,
                     linkType: 6,
+                    from: 'topStore',
                   },
                 });
               } else {
@@ -1810,6 +1826,7 @@ export default {
           PointSum: PointSumval,
           marklat: res.latitude,
           marklon: res.longitude,
+          from: 'topStore',
         },
       });
     },
@@ -2623,6 +2640,22 @@ export default {
   color: #333;
   line-height: 22px;
   padding-right: 52px;
+  .statusIcon {
+    padding: 3px;
+    font-size: 12px;
+    margin: 0 3px;
+    color: #fff;
+    display: inline-block;
+    height: 20px;
+    line-height: 16px;
+    vertical-align: -1px;
+  }
+  .submit {
+    background: #ffba13;
+  }
+  .noSubmit {
+    background: #f11818;
+  }
 }
 .card .info {
   font-size: 14px;

+ 38 - 9
src/views/deviceWithin/index.vue

@@ -53,15 +53,25 @@
       <div class="cellcontent" v-for="(item, index) in list" :key="index">
         <van-cell>
           <div class="card">
-            <div class="title btn" :data-clipboard-text="item.storeCode">
-              <span>{{ item.storeName }}</span> (<span style="color: #0057ba">{{
-                item.storeCode
-              }}</span
-              >)<van-icon
-                :name="paste"
-                color="#ee0a24"
-                size="20"
-                style="top: 6px; margin-left: 4px" />
+            <div class="title">
+              <span class="btn" :data-clipboard-text="item.storeCode">
+                <span>{{ item.storeName }}</span>
+                (<span style="color: #0057ba">{{ item.storeCode }}</span
+                >)
+                <van-icon
+                  :name="paste"
+                  color="#ee0a24"
+                  size="20"
+                  style="top: 6px; margin-left: 4px" />
+              </span>
+              <!-- "approvalStatus": 1:已结案;0:未结案, -->
+              <!-- "processApprovalStatus": 审批状态(0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝) -->
+              <template v-if="item.approvalStatus == 0">
+                <span class="statusIcon submit" v-if="item.processApprovalStatus == 1">已提交</span>
+                <span class="statusIcon noSubmit" v-if="item.processApprovalStatus == 0"
+                  >未提交</span
+                >
+              </template>
             </div>
             <div class="info">
               类型:{{ item.storeCategory }} &nbsp;
@@ -726,6 +736,7 @@ export default {
                 PointSum: 0,
                 marklat: lat,
                 marklon: lon,
+                from: 'inPlan',
               },
             });
             localStorage.setItem('startTime', new Date());
@@ -759,6 +770,7 @@ export default {
                     PointSum: '0',
                     marklat: val.lat,
                     marklon: val.lon,
+                    from: 'inPlan',
                   },
                 });
 
@@ -1109,6 +1121,7 @@ export default {
             PointSum: PointSumval,
             marklat: res.latitude,
             marklon: res.longitude,
+            from: 'inPlan',
           },
         });
       });
@@ -1773,6 +1786,22 @@ export default {
     line-height: 22px;
     padding-right: 52px;
     /*word-break: break-all;*/
+    .statusIcon {
+      padding: 3px;
+      font-size: 12px;
+      margin: 0 3px;
+      color: #fff;
+      display: inline-block;
+      height: 20px;
+      line-height: 16px;
+      vertical-align: -1px;
+    }
+    .submit {
+      background: #ffba13;
+    }
+    .noSubmit {
+      background: #f11818;
+    }
   }
   .info {
     font-size: 14px;

Fichier diff supprimé car celui-ci est trop grand
+ 18 - 58
src/views/deviceWithin/storeVisit.vue


+ 241 - 201
src/views/historicalVisit/historicalDetails.vue

@@ -1,20 +1,30 @@
 <template>
   <div>
     <!--        顶部条-->
-    <van-nav-bar class="navBar" title="拜访任务" left-arrow @click-left="onClickLeft" >
+    <van-nav-bar class="navBar" title="拜访任务" left-arrow @click-left="onClickLeft">
       <template #right>
-        <span style="    color: white;
-    background: #74a4d9;
-    display: block;
-    padding: 6px 10px;
-    border-radius: 6px;"  @click="editorFn" v-if="!remarkShow&&sameDay">编辑</span>
+        <span
+          style="
+            color: white;
+            background: #74a4d9;
+            display: block;
+            padding: 6px 10px;
+            border-radius: 6px;
+          "
+          @click="editorFn"
+          v-if="!remarkShow && sameDay"
+          >编辑</span
+        >
       </template>
     </van-nav-bar>
     <!--        主体内容-->
     <div class="container">
       <div class="lineGrey"></div>
       <div class="card mt10">
-        <div class="title">{{ list.storeName }}(<span style="color:#1989fa;">{{ list.storeCode }}</span>)</div>
+        <div class="title">
+          {{ list.storeName }}(<span style="color: #1989fa">{{ list.storeCode }}</span
+          >)
+        </div>
         <div class="subtitle">地址:{{ list.addressLine }}</div>
         <div class="subtitle">拜访人:{{ list.nickName }}</div>
         <div class="subtitle">拜访日期:{{ list.startTime }}~{{ list.stopTime }}</div>
@@ -22,59 +32,81 @@
         <div class="subtitle">经销商:{{ list.chainName }}</div>
         <div class="subtitle" v-if="updateTimeShow">更新时间:{{ list.updateTime }}</div>
       </div>
-      <p style="padding: 0 10px;font-size: 14px;color:#222;font-weight: bold;" v-if="list.visitSource!=2&&ListHistoryList.length>0">审批历史</p>
-      <div v-for="(item1,index1) in ListHistoryList" :key="index1" style="background-color: white;padding-top: 14px">
-        <p style="padding: 0 16px;font-size: 14px;color:#222;margin: 0">流程名称:{{item1.modelName}}</p>
+      <p
+        style="padding: 0 10px; font-size: 14px; color: #222; font-weight: bold"
+        v-if="list.visitSource != 2 && ListHistoryList.length > 0">
+        审批历史
+      </p>
+      <div
+        v-for="(item1, index1) in ListHistoryList"
+        :key="index1"
+        style="background-color: white; padding-top: 14px">
+        <p style="padding: 0 16px; font-size: 14px; color: #222; margin: 0">
+          流程名称:{{ item1.modelName }}
+        </p>
         <van-steps direction="vertical" :active="item1.processList.length">
-          <van-step v-for="(item,index) in item1.processList" :key="index">
-            <h3 style="font-size: 14px;">{{item.activityName}} &nbsp;{{item.assigneeName}}</h3>
-            <p>{{item.comment}}</p>
+          <van-step v-for="(item, index) in item1.processList" :key="index">
+            <h3 style="font-size: 14px">{{ item.activityName }} &nbsp;{{ item.assigneeName }}</h3>
+            <p>{{ item.comment }}</p>
           </van-step>
         </van-steps>
-        <div style="border-bottom: 2px solid #f5f5f5;margin: 0 16px 16px"></div>
+        <div style="border-bottom: 2px solid #f5f5f5; margin: 0 16px 16px"></div>
       </div>
-      <van-collapse v-model="active" class="fontWeit" v-if="managerRemarkContents!=null&&managerRemarkContents.length>0">
+      <van-collapse
+        v-model="active"
+        class="fontWeit"
+        v-if="managerRemarkContents != null && managerRemarkContents.length > 0">
         <van-collapse-item name="1" title="点评">
-          <p>{{managerRemarkContents[0].deptName}} - {{managerRemarkContents[0].postName}} - {{managerRemarkContents[0].nickName}}的点评</p>
+          <p>
+            {{ managerRemarkContents[0].deptName }} - {{ managerRemarkContents[0].postName }} -
+            {{ managerRemarkContents[0].nickName }}的点评
+          </p>
           <p class="contern">
             <van-field
-                v-model="managerRemarkContents[0].remarkContent"
-                rows="4"
-                autosize
-                readonly
-                type="textarea"
-            /></p>
-          <p style="text-align: right;">点评时间:{{managerRemarkContents[0].createTime}}</p>
+              v-model="managerRemarkContents[0].remarkContent"
+              rows="4"
+              autosize
+              readonly
+              type="textarea" />
+          </p>
+          <p style="text-align: right">点评时间:{{ managerRemarkContents[0].createTime }}</p>
         </van-collapse-item>
       </van-collapse>
-      <div style="padding: 10px 16px;font-size: 16px;font-weight: bold;">
-        任务
-      </div>
-      <div class="card" v-if="list.visitSource!=2">
-        <div class="info" style="line-height: 44px;font-size: 14px;" v-for="(item,index) in list.sfaTaskList"
-             :key="index"
-             @click="historiStoreVisit(item,index)">
-          <p style="  width: 94%; margin: 0; line-height: 24px;padding: 10px 0;display: inline-block;"
-          >{{ item.taskName }}</p>
+      <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">任务</div>
+      <div class="card" v-if="list.visitSource != 2">
+        <div
+          class="info"
+          style="line-height: 44px; font-size: 14px"
+          v-for="(item, index) in list.sfaTaskList"
+          :key="index"
+          @click="historiStoreVisit(item, index)">
+          <p
+            style="
+              width: 94%;
+              margin: 0;
+              line-height: 24px;
+              padding: 10px 0;
+              display: inline-block;
+            ">
+            {{ item.taskName }}
+          </p>
           <p class="arrowdetils1">
-            <van-icon name="arrow"/>
+            <van-icon name="arrow" />
           </p>
         </div>
       </div>
-      <div v-if="list.visitSource==2" style="background-color: #fff;">
-        <van-cell title="异常事由" :value="selectDictLabel(typeList,list.abnormalReason)"/>
-        <van-cell title="异常信息照"/>
-        <div style="padding: 10px 16px 0;">
+      <div v-if="list.visitSource == 2" style="background-color: #fff">
+        <van-cell title="异常事由" :value="selectDictLabel(typeList, list.abnormalReason)" />
+        <van-cell title="异常信息照" />
+        <div style="padding: 10px 16px 0">
           <delete-upload-img :imgs="imgs"></delete-upload-img>
         </div>
-        <van-cell title="异常信息" :value="list.remark"/>
+        <van-cell title="异常信息" :value="list.remark" />
       </div>
 
-      <div style="padding: 10px 16px;font-size: 16px;font-weight: bold;">
-        更多记录
-      </div>
+      <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">更多记录</div>
       <van-cell-group>
-        <van-cell v-for="(item1,index1) in list.visitsMore" :key="index1">
+        <van-cell v-for="(item1, index1) in list.visitsMore" :key="index1">
           <template #title>
             <van-row>
               <van-col span="6">拜访人:</van-col>
@@ -86,71 +118,72 @@
           </template>
         </van-cell>
       </van-cell-group>
-      <div style="padding: 10px 16px;font-size: 16px;font-weight: bold;" v-if="managerRemarkContents==null&&remarkShow">
+      <div
+        style="padding: 10px 16px; font-size: 16px; font-weight: bold"
+        v-if="managerRemarkContents == null && remarkShow">
         点评
       </div>
-      <div class="comment" v-if="managerRemarkContents==null&&remarkShow">
+      <div class="comment" v-if="managerRemarkContents == null && remarkShow">
         <van-field
-            v-model="dataform.remarkContent"
-            rows="4"
-            autosize
-            maxlength="800"
-            show-word-limit
-            type="textarea"
-            :formatter="formatter"
-        />
-        <br>
-        <br>
-        <div class="contentborder" >
-          <van-button type="info" size="small" plain class="Btn1" @click="submint">提交点评</van-button>
+          v-model="dataform.remarkContent"
+          rows="4"
+          autosize
+          maxlength="800"
+          show-word-limit
+          type="textarea"
+          :formatter="formatter" />
+        <br />
+        <br />
+        <div class="contentborder">
+          <van-button type="info" size="small" plain class="Btn1" @click="submint"
+            >提交点评</van-button
+          >
         </div>
       </div>
-
     </div>
-
   </div>
 </template>
 
 <script>
-import deleteUploadImg from "@/components/deleteUploadImg";
+import deleteUploadImg from '@/components/deleteUploadImg';
 import {
   getVisitsDetail,
   getPhotoTypeList1,
   insertVisitRemark,
   getListHistoryList,
-  getCollectionShowHistory
-} from "@/api/index";
+  getCollectionShowHistory,
+} from '@/api/index';
 
 export default {
-  components: {deleteUploadImg},
+  components: { deleteUploadImg },
   data() {
     return {
-      userShow:false,
-      visitsId: "",
-      imgs: "",
+      userShow: false,
+      visitsId: '',
+      imgs: '',
       typeList: [],
-      active:["1"],
-      sameDay:false,
-      ListHistoryTOTLE:"",
-      managerRemarkContents:null,
-      managerRemarkContent:"",
-      CWShow:false,
-      dataform:{
-        "remarkContent":"",
-        "visitsId":0
+      active: ['1'],
+      sameDay: false,
+      ListHistoryTOTLE: '',
+      managerRemarkContents: null,
+      managerRemarkContent: '',
+      CWShow: false,
+      dataform: {
+        remarkContent: '',
+        visitsId: 0,
       },
-      updateTimeShow:false,
-      insert:true,
-      remarkShow:false,
-      ListHistoryList:[],
-      list:""
-    }
+      updateTimeShow: false,
+      insert: true,
+      remarkShow: false,
+      ListHistoryList: [],
+      list: '',
+    };
   },
   created() {
     this.visitsId = this.$route.query.visitId;
     this.dataform.visitsId = this.$route.query.visitId;
-    this.getVisitsDetailFn()
-    this.getPhotoTypeList()
+    this.getVisitsDetailFn();
+    this.getPhotoTypeList();
   },
   // watch: {
   //   $route(to, from) {
@@ -161,155 +194,155 @@ export default {
   //   }
   // },
   activated() {
-    this.getVisitsDetailFn()
+    this.getVisitsDetailFn();
   },
   methods: {
-
-    getListHistoryList(instanceId){
-      var form={visitsId:this.$route.query.visitId,pageNum: 1, pageSize: 999}
-      getListHistoryList(form).then(res=>{
-        this.ListHistoryList=res.data
-      })
+    getListHistoryList(instanceId) {
+      var form = { visitsId: this.$route.query.visitId, pageNum: 1, pageSize: 999 };
+      getListHistoryList(form).then((res) => {
+        this.ListHistoryList = res.data;
+      });
     },
     formatter(value) {
-      return value.replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi, '');
+      return value.replace(
+        /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
+        ''
+      );
     },
     editorFn() {
-      if(this.list.hideStr!=""&&this.list.hideStr!=null){
-        this.$toast(this.list.hideStr)
-      }else{
-      localStorage.setItem('ORGName', this.list.deptName)
-      localStorage.setItem('chainNameR', this.list.storeName)
-      if(this.list.visitSource=="2"){
-        this.$router.push({
-          path: "/abnormalVisit",
-          query: {type:"edit",
-            storeCode:this.$route.query.storeCode,
-            rdId:this.$route.query.visitId,
-            visitId: this.$route.query.visitId,
-            storeId:this.list.storeId,
-            visitSource:this.list.visitSource,
-            visitModel:this.list.visitModel,
-            marklat:this.list.lat,
-            marklon:this.list.lon
+      if (this.list.hideStr != '' && this.list.hideStr != null) {
+        this.$toast(this.list.hideStr);
+      } else {
+        localStorage.setItem('ORGName', this.list.deptName);
+        localStorage.setItem('chainNameR', this.list.storeName);
+        if (this.list.visitSource == '2') {
+          this.$router.push({
+            path: '/abnormalVisit',
+            query: {
+              type: 'edit',
+              storeCode: this.$route.query.storeCode,
+              rdId: this.$route.query.visitId,
+              visitId: this.$route.query.visitId,
+              storeId: this.list.storeId,
+              visitSource: this.list.visitSource,
+              visitModel: this.list.visitModel,
+              marklat: this.list.lat,
+              marklon: this.list.lon,
+            },
+          });
+        } else {
+          var LCshow = false;
+          if (this.$route.query.taskId != null) {
+            LCshow = true;
+          } else {
+            LCshow = false;
           }
-        })
-      }else{
-        var LCshow=false
-        if(this.$route.query.taskId!=null){
-          LCshow=true
-        }else{
-          LCshow=false
+          this.$router.push({
+            path: '/storeVisitpage',
+            query: {
+              type: 'edit',
+              storeGroupId: this.list.storeGroupId,
+              storeCode: this.$route.query.storeCode,
+              storeName: this.list.storeName,
+              addressLine: this.list.addressLine,
+              rdId: this.$route.query.visitId,
+              visitId: this.$route.query.visitId,
+              storeId: this.list.storeId,
+              visitSource: this.list.visitSource,
+              visitModel: this.list.visitModel,
+              LCshow: LCshow,
+              instanceId: this.list.instanceId,
+              taskId: this.$route.query.taskId,
+              marklat: this.list.lat,
+              marklon: this.list.lon,
+              from: 'outPlan',
+            },
+          });
         }
-        this.$router.push({
-          path: "/storeVisitpage",
-          query: {
-            type:"edit",
-            storeGroupId:this.list.storeGroupId,
-            storeCode:this.$route.query.storeCode,
-            storeName:this.list.storeName,
-            addressLine:this.list.addressLine,
-            rdId:this.$route.query.visitId,
-            visitId: this.$route.query.visitId,
-            storeId:this.list.storeId,
-            visitSource:this.list.visitSource,
-            visitModel:this.list.visitModel,
-            LCshow:LCshow,
-            instanceId:this.list.instanceId,
-            taskId:this.$route.query.taskId,
-            marklat:this.list.lat,
-            marklon:this.list.lon
-          }
-        })
-      }
       }
     },
-    submint(){
-      if(this.dataform.remarkContent.trim()==""){
-        this.$toast("请填写点评内容!")
-      }else{
-        insertVisitRemark(this.dataform).then(
-            res => {
-              if(res.code==200){
-                this.getVisitsDetailFn()
-              }
-            }
-        )
+    submint() {
+      if (this.dataform.remarkContent.trim() == '') {
+        this.$toast('请填写点评内容!');
+      } else {
+        insertVisitRemark(this.dataform).then((res) => {
+          if (res.code == 200) {
+            this.getVisitsDetailFn();
+          }
+        });
       }
     },
     getPhotoTypeList() {
-      getPhotoTypeList1({}).then(res => {
-        this.typeList = res.data
-      })
+      getPhotoTypeList1({}).then((res) => {
+        this.typeList = res.data;
+      });
     },
     getVisitsDetailFn() {
-
-      getVisitsDetail({visitsId: this.visitsId}).then(res => {
+      getVisitsDetail({ visitsId: this.visitsId }).then((res) => {
         if (res.code == 200) {
-          this.list = res.data
-          if(res.data.visitSource!=2){
-            this.getListHistoryList(res.data.instanceId)
+          this.list = res.data;
+          if (res.data.visitSource != 2) {
+            this.getListHistoryList(res.data.instanceId);
+          }
+          if (res.data.stopTime != res.data.updateTime) {
+            this.updateTimeShow = true;
+          } else {
+            this.updateTimeShow = false;
           }
-          if(res.data.stopTime!=res.data.updateTime){
-            this.updateTimeShow=true
-          }else{
-            this.updateTimeShow=false
+          if (localStorage.getItem('userId') == this.$route.query.userId) {
+            this.userShow = true;
+          } else {
+            this.userShow = false;
           }
-          if(localStorage.getItem("userId")==this.$route.query.userId){
-            this.userShow=true
-          }else{
-            this.userShow=false
+          if (this.$route.query.taskId != null) {
+            this.CWShow = true;
+          } else {
+            this.CWShow = false;
           }
-          if(this.$route.query.taskId!=null){
-            this.CWShow=true
-          }else{
-            this.CWShow=false
+          this.sameDay = res.data.sameDay;
+          if (localStorage.getItem('userId') == res.data.userId) {
+            this.remarkShow = false;
+          } else {
+            this.remarkShow = true;
           }
-          this.sameDay=res.data.sameDay
-          if(localStorage.getItem("userId")==res.data.userId){
-            this.remarkShow=false
-          }else{
-            this.remarkShow=true
+          if (res.data.visitRemarks != null) {
+            if (res.data.visitRemarks.length > 0) {
+              this.managerRemarkContents = res.data.visitRemarks;
+            } else {
+              this.managerRemarkContents = null;
+            }
           }
-           if(res.data.visitRemarks!=null){
-             if(res.data.visitRemarks.length>0){
-               this.managerRemarkContents=res.data.visitRemarks
-             }else{
-               this.managerRemarkContents=null
-             }
-           }
 
           if (res.data.visitSource == 2) {
-            this.imgs = res.data.sysFileInfos
+            this.imgs = res.data.sysFileInfos;
           }
         } else {
-          this.$toast.fail(res.msg)
+          this.$toast.fail(res.msg);
         }
-      })
+      });
     },
     historiStoreVisit(val, index) {
       this.$router.push({
-        path: "/historiStoreVisit",
-        query: {visitId: this.visitsId, ids: index, taskType: val.taskType}
-      })
+        path: '/historiStoreVisit',
+        query: { visitId: this.visitsId, ids: index, taskType: val.taskType },
+      });
       sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
-
     },
     onClickLeft() {
       this.$router.go(-1);
-    }
-  }
-}
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
 .container {
   padding-bottom: 50px;
 }
-.container .custom-titles{
+.container .custom-titles {
   white-space: break-spaces;
 }
 .card {
-  background: #FFF;
+  background: #fff;
   padding: 10px 15px;
   box-sizing: border-box;
   .title {
@@ -321,7 +354,7 @@ export default {
   .subtitle {
     line-height: 24px;
     font-size: 14px;
-    color: #7B7B7B;
+    color: #7b7b7b;
   }
   .info {
     font-size: 16px;
@@ -329,8 +362,8 @@ export default {
     line-height: 40px;
     border-bottom: 1px solid #dedede;
     position: relative;
-    &:last-child{
-      border-bottom:0;
+    &:last-child {
+      border-bottom: 0;
     }
     .arrow {
       float: right;
@@ -341,7 +374,7 @@ export default {
       text-align: center;
       border-radius: 50%;
       background: #1989fa;
-      color: #FFF;
+      color: #fff;
       font-weight: bold;
       font-size: 14px;
       margin-top: 9px;
@@ -358,13 +391,20 @@ export default {
 }
 </style>
 <style>
-.fontWeit .van-cell__title{font-weight: bold;font-size: 16px;}
-.fontWeit .van-cell__title p{margin: 0;}
-.comment .van-field__control{    background-color: #EBF4FF;
-  border-radius: 6px;}
-.contern .van-cell{
-background-color: #EBF4FF;
+.fontWeit .van-cell__title {
+  font-weight: bold;
+  font-size: 16px;
+}
+.fontWeit .van-cell__title p {
+  margin: 0;
+}
+.comment .van-field__control {
+  background-color: #ebf4ff;
+  border-radius: 6px;
+}
+.contern .van-cell {
+  background-color: #ebf4ff;
   border-radius: 6px;
   overflow: hidden;
 }
-</style>
+</style>

+ 16 - 0
src/views/home/index.vue

@@ -1202,6 +1202,21 @@
       </van-cell>
       <div class="lineGrey"></div>
     </div>
+    <!-- 同城店建店审批 -->
+    <div
+      class="contentborder"
+      v-if="reportInfoData.storeApprovalNum != null && reportInfoData.storeApprovalNum > 0">
+      <van-cell class="homeTitle" title="同城店建店审批" to="/newStoreApprovalList">
+        <template #title>
+          <span class="custom-title">同城店建店审批&nbsp;&nbsp;</span>
+          <van-tag type="danger">{{ reportInfoData.storeApprovalNum }}</van-tag>
+        </template>
+        <template #right-icon>
+          <van-icon class="homeCellIcon" name="arrow" size="16" />
+        </template>
+      </van-cell>
+      <div class="lineGrey"></div>
+    </div>
     <div class="contentborder">
       <van-button
         v-if="powerGrade == 3 && showButton"
@@ -1645,6 +1660,7 @@ export default {
 
 .homeTitle .van-tag--danger {
   border-radius: 20px;
+  vertical-align: 2px;
 }
 
 .van-dialog__confirm,

+ 904 - 0
src/views/signApproval/newStoreApprovalDetail.vue

@@ -0,0 +1,904 @@
+<template>
+  <div>
+    <div class="navBarTOP">
+      <!-- 顶部条 -->
+      <van-nav-bar class="navBar" title="门店详情" left-arrow @click-left="onClickLeft" />
+    </div>
+    <!--主体内容-->
+    <div style="margin-top: 44px; padding-bottom: 50px" v-if="list.storeId">
+      <!-- <van-dialog title="门店位置">
+        <mapmarker :info="list"></mapmarker>
+      </van-dialog> -->
+      <van-tabs class="myTab" v-model="tabVal" color="#0057ba" @change="tabChange">
+        <van-tab title="基础信息" name="insidePlan" ref="dispsps">
+          <!-- 提交审批后被驳回 -->
+          <div class="rejectMsg" v-if="rejectMsg[0]">
+            <span class="label">退回原因</span>
+            <span class="value">{{ rejectMsg[0].approvalDesc }}</span>
+            <span class="examineDetail" @click="examineDetail">查看详情</span>
+          </div>
+          <van-field readonly v-model="list.storeCode" label="编号" />
+          <van-field readonly v-if="DIYshow" v-model="list.attribute1" label="DIY编号" />
+          <van-field readonly v-model="list.storeName" :label="storeName" />
+          <van-field readonly v-model="list.storeCategoryName" label="类型" />
+          <van-field
+            readonly
+            rows="1"
+            autosize
+            type="textarea"
+            v-model="list.addressLine"
+            :label="address" />
+          <van-field v-model="list.lat" readonly label="经度" placeholder="经度" />
+          <van-field readonly v-model="list.lon" label="维度" />
+          <van-field readonly v-model="list.orgName" label="销售部" />
+          <van-field readonly v-model="list.provinceName" label="省(州)"> </van-field>
+          <van-field readonly v-model="list.cityName" label="城市"> </van-field>
+          <van-field readonly v-model="list.districtName" label="区(县)"> </van-field>
+          <van-field readonly v-model="list.townName" label="街道"> </van-field>
+          <van-field readonly v-model="list.cityLevel" label="城市等级" />
+          <van-field
+            readonly
+            v-if="list.ifJzStoreType != 1 && list.storeCategory != 'C917'"
+            v-model="list.contactName"
+            label="联系人" />
+          <van-field
+            readonly
+            v-if="list.ifJzStoreType == 1 && list.storeCategory != 'C917'"
+            v-model="list.contactName"
+            label="老板" />
+          <van-field
+            readonly
+            v-model="list.telephone"
+            label="联系电话"
+            v-if="list.storeCategory != 'C917'" />
+          <van-field
+            readonly
+            v-model="list.chainCode"
+            label="经销商编号"
+            v-if="list.storeCategory != 'C917'" />
+          <van-field
+            readonly
+            v-model="list.chainName"
+            label="经销商名称"
+            v-if="list.storeCategory != 'C917'" />
+          <van-field readonly v-model="list.salesmanName" label="销售员" />
+          <div v-if="list.storeCategory != 'C917'">
+            <van-field
+              readonly
+              v-model="list.area"
+              v-if="list.ifJzStoreType != 1"
+              label="面积(m²)" />
+            <van-field
+              readonly
+              v-model="list.area"
+              v-if="list.ifJzStoreType == 1"
+              label="家装展厅面积(m²)" />
+          </div>
+          <van-field
+            readonly
+            v-if="GZAttributeFormShow"
+            label="潜在客户类型"
+            v-model="list.potentialCustomerType" />
+          <van-field readonly v-if="list.carShop" label="是否车铺开店">
+            <template #input>
+              <span v-if="list.carShop == 1">是</span>
+              <span v-if="list.carShop == 0">否</span>
+            </template>
+          </van-field>
+          <div v-if="list.carShopImgList != null && list.carShop == 1">
+            <p style="padding: 0 16px">车铺照片(店招及车铺产品拍在一张照片里)</p>
+            <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
+          </div>
+          <template v-if="list.img != null && list.storeCategory != 'C917'">
+            <div class="displayImg" style="padding: 16px">
+              <div class="displayImgBox">
+                <div v-if="storeTypePOP">
+                  <van-image
+                    width="100%"
+                    height="160"
+                    :src="setImgSrc(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="setImgSrc(list.img)"
+                    @click="deleteImgs(list.img)" />
+                  <p style="text-align: center">
+                    {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
+                  </p>
+                </div>
+              </div>
+              <template v-if="list.ifJzStoreType != 1"></template>
+              <template v-else>
+                <div class="displayImgBox">
+                  <div v-if="storeTypePOP">
+                    <van-image
+                      width="100%"
+                      height="160"
+                      :src="setImgSrc(list.imgSed)"
+                      @click="deleteImgs(list.imgSed)" />
+                    <p style="text-align: center">
+                      {{ '立邦展厅照片' }}
+                    </p>
+                  </div>
+                </div>
+              </template>
+              <template v-if="list.ifJzStoreType != 1 && storeTypePOP && displayImg.length">
+                <div class="displayImgBox" v-for="(urls, index) in displayImg" :key="index">
+                  <div>
+                    <van-image width="100%" height="160" :src="urls" @click="previewsImg(index)" />
+                    <p style="text-align: center">建店时陈列照</p>
+                  </div>
+                </div>
+              </template>
+            </div>
+          </template>
+          <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="setImgSrc(list.newStoreSignPhoto)"
+                  @click="deleteImgs(list.newStoreSignPhoto)" />
+                <p style="text-align: center">最近一次拜访店招</p>
+              </div>
+            </van-col>
+          </van-row>
+          <van-collapse v-model="activeNames" class="orderList">
+            <van-collapse-item title="门店下单记录" name="1">
+              <div class="orderItem" v-for="(item, index) in orderList" :key="index">
+                <div class="orderTitle">
+                  {{ item.ORDERID }} | {{ item.ORDERDATE }} | {{ item.STATUS_DESCR }}
+                </div>
+                <el-table
+                  :data="item.productDetail"
+                  border
+                  class="table-headermd table-headermdhome"
+                  show-summary
+                  :summary-method="getSummaries"
+                  style="width: 100%">
+                  <el-table-column label="产品名称" prop="DESCR" />
+                  <el-table-column label="数量" prop="QTY" width="80px" />
+                  <el-table-column label="金额" prop="productTotalPrice" width="80px">
+                    <!-- <template slot-scope="scope">
+                      {{ scope.row.UNITPRICE * scope.row.QTY }}
+                    </template> -->
+                  </el-table-column>
+                </el-table>
+              </div>
+            </van-collapse-item>
+          </van-collapse>
+        </van-tab>
+        <van-tab title="属性信息" name="outsidePlan">
+          <van-field readonly label="属性" v-if="dictTypeFormShow" v-model="list.tcfxName" />
+        </van-tab>
+      </van-tabs>
+      <br />
+      <br />
+      <br />
+      <br />
+      <br />
+      <br />
+      <!-- 未结案 未提交状态下可关闭门店、提交审核 -->
+      <div class="bottomBtn" v-if="list.approvalStatus == 0 && list.processApprovalStatus == 1">
+        <van-button color="red" round @click="rejectReasonShow = true">退回</van-button>
+        <van-button type="primary" round @click="approvalStoreFun('success')">通过</van-button>
+      </div>
+    </div>
+    <!-- 退回原因填写 -->
+    <van-popup v-model="rejectReasonShow" class="rejectMsgBox" closeable round position="bottom">
+      <div class="title">退回原因</div>
+      <div class="content">
+        <van-field
+          v-model="rejectMessage"
+          rows="2"
+          autosize
+          type="textarea"
+          maxlength="300"
+          placeholder="请输入退回原因" />
+      </div>
+      <div class="btnBox">
+        <van-button type="primary" round @click="rejectReasonSubmit">提交</van-button>
+      </div>
+    </van-popup>
+    <!-- 提交审核后退回原因 只有同城分销店显示 -->
+    <van-popup v-model="rejectMsgShow" class="rejectMsgBox" closeable round position="bottom">
+      <div class="title">退回详情</div>
+      <div class="content">
+        <div class="rejectMsgItem" v-for="(item, index) in rejectMsg" :key="index">
+          <div class="item approver">
+            <span class="label">审批人:</span>
+            <span class="value">{{ item.approvalUserName }}</span>
+          </div>
+          <div class="item approvalTime">
+            <span class="label">审批时间:</span>
+            <span class="value">{{ item.approvalTime }}</span>
+          </div>
+          <div class="item rejectCause">
+            <span class="label">退回原因:</span>
+            <span class="value">{{ item.approvalDesc }}</span>
+          </div>
+        </div>
+      </div>
+    </van-popup>
+  </div>
+</template>
+
+<script>
+import { ImagePreview } from 'vant';
+import {
+  getById,
+  getStoreTypeList,
+  getStoreyslTypeList,
+  getTCFXList,
+  getSJSList,
+  getQGJZist,
+  getCustomerInfoList,
+  getCustomerNatureList,
+  getMainProjectList,
+  getMainRelationList,
+  getManagementModelList,
+  getpotentialCustomerTypeList,
+  getOrderByStoreCode,
+  approvalStore,
+  storeApprovaHistory,
+} from '@/api/index';
+import mapmarker from '@/components/mapMarker';
+import viewUploadImg from '@/components/viewUploadImg';
+import txmapimg1 from '@/assets/txmap1.svg';
+import txmapimg2 from '@/assets/txmap2.svg';
+import txmapimg3 from '@/assets/marker_blue.png';
+import uploadImg from '@/components/viewaddreddUploadImg.vue';
+export default {
+  components: { uploadImg, mapmarker, viewUploadImg },
+  data() {
+    return {
+      tabVal: 'insidePlan',
+      list: {},
+      txmapimg1: txmapimg1,
+      txmapimg2: txmapimg2,
+      txmapimg3: txmapimg3,
+      storeId: '',
+      vaue: '',
+      show: false,
+      storeTypeList: [],
+      ManagementModelList: [],
+      MainRelationList: [],
+      MainProjectList: [],
+      CustomerNatureList: [],
+      CustomerInfoList: [],
+      potentialCustomerTypeList: [],
+      dictTypeFormShow: false,
+      DIYshow: false,
+      visitListList: [],
+      TCFXList: [],
+      QGJZist: [],
+      SJSList: [],
+      storeName: '名称',
+      address: '地址',
+      storeTypePOP: false,
+      GZAttributeFormShow: false,
+      pageShow: false,
+      rejectMsgShow: false,
+      //退回原因详情列表
+      rejectMsg: [],
+      activeNames: [],
+      orderList: [],
+      rejectReasonShow: false, //退回提交原因
+      rejectMessage: '',
+      displayImg: [],
+    };
+  },
+  activated() {
+    this.getCustomerInfoList();
+    this.getManagementModelList();
+    this.getMainRelationList();
+    this.getMainProjectList();
+    this.getCustomerNatureList();
+    this.getTCFXList();
+    this.getSJSList();
+    this.getQGJZist();
+    this.getStoreType();
+    this.getpotentialCustomerTypeList();
+    this.visitListList = [];
+    window.scrollTo(0, 0);
+    this.storeApprovaHistoryFun();
+  },
+  methods: {
+    storeApprovaHistoryFun() {
+      storeApprovaHistory({ storeId: this.$route.query.id }).then((res) => {
+        this.rejectMsg = res.data || [];
+      });
+    },
+    getCustomerInfoList() {
+      getCustomerInfoList().then((res) => {
+        var CustomerInfoList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          CustomerInfoList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.CustomerInfoList = CustomerInfoList;
+      });
+    },
+    getCustomerNatureList() {
+      getCustomerNatureList().then((res) => {
+        var CustomerNatureList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          CustomerNatureList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.CustomerNatureList = CustomerNatureList;
+      });
+    },
+    getpotentialCustomerTypeList() {
+      getpotentialCustomerTypeList().then((res) => {
+        var potentialCustomerTypeList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          potentialCustomerTypeList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.potentialCustomerTypeList = potentialCustomerTypeList;
+      });
+    },
+    getMainProjectList() {
+      getMainProjectList().then((res) => {
+        var MainProjectList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          MainProjectList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.MainProjectList = MainProjectList;
+      });
+    },
+    getMainRelationList() {
+      getMainRelationList().then((res) => {
+        var MainRelationList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          MainRelationList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.MainRelationList = MainRelationList;
+      });
+    },
+    getManagementModelList() {
+      getManagementModelList().then((res) => {
+        var ManagementModelList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          ManagementModelList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.ManagementModelList = ManagementModelList;
+      });
+    },
+    getSJSList() {
+      getSJSList({}).then((res) => {
+        var SJSList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          SJSList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.SJSList = SJSList;
+      });
+    },
+    getQGJZist() {
+      getQGJZist({}).then((res) => {
+        var QGJZist = [];
+        for (var t = 0; t < res.data.length; t++) {
+          QGJZist.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictValue,
+          });
+        }
+        this.QGJZist = QGJZist;
+      });
+    },
+    getTCFXList() {
+      getTCFXList({}).then((res) => {
+        var TCFXList = [];
+        for (var t = 0; t < res.data.length; t++) {
+          TCFXList.push({
+            text: res.data[t].dictLabel,
+            dictCode: res.data[t].dictCode,
+          });
+        }
+        this.TCFXList = TCFXList;
+      });
+    },
+    visitsFn(row) {
+      this.$router.push({
+        path: '/historicalDetails',
+        query: {
+          visitId: row.id,
+          storeCode: row.storeCode,
+          storeId: row.storeId,
+        },
+      });
+    },
+    setImgSrc(imgUrl) {
+      let imgArr = imgUrl.split(',');
+      return imgArr[0];
+    },
+    deleteImgs(val) {
+      ImagePreview(val.split(','));
+    },
+    getStoreType() {
+      if (localStorage.getItem('storeType') == '2') {
+        this.DIYshow = true;
+        getStoreyslTypeList({}).then((res) => {
+          this.storeTypeList = res.data;
+          this.getDetail();
+        });
+      } else {
+        this.DIYshow = false;
+        getStoreTypeList({}).then((res) => {
+          this.storeTypeList = res.data;
+          this.getDetail();
+        });
+      }
+    },
+    getDetail() {
+      this.pageShow = false;
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '加载中...',
+        forbidClick: true,
+      });
+      getById({ storeId: this.$route.query.id }).then((res) => {
+        loading1.clear();
+        this.pageShow = true;
+        localStorage.setItem('locationRemark', res.data.addressLine);
+        localStorage.setItem('orgName', res.data.orgName);
+        localStorage.setItem('chainName', res.data.storeName);
+        if (res.code == 200) {
+          this.list = res.data;
+          if (this.list.imgSed && this.list.imgSed != '') {
+            this.displayImg = this.list.imgSed.split(',');
+          } else {
+            this.displayImg = [];
+          }
+          if (this.list.carShopImgList != null) {
+          } else {
+            this.list.carShopImgList = [];
+          }
+          if (this.list.storeCategory == 'C917') {
+            this.GZAttributeFormShow = true;
+            this.dictTypeSJSFormShow = false;
+            this.dictTypeQGJZFormShow = false;
+            this.dictTypeFormShow = false;
+            this.dictTypeAFormShow = false;
+            for (let k = 0; k < this.potentialCustomerTypeList.length; k++) {
+              if (this.potentialCustomerTypeList[k].dictCode == this.list.potentialCustomerType) {
+                this.list.potentialCustomerType = this.potentialCustomerTypeList[k].text;
+              }
+            }
+          } else {
+            this.GZAttributeFormShow = false;
+          }
+          if (this.list.storeCategory == '129081') {
+            this.dictTypeFormShow = true;
+            if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
+              this.list.tcfxName = this.list.attribute3;
+            } else {
+              this.list.tcfxName = this.list.attribute5;
+            }
+          }
+          if (this.list.storeCategory == '10131') {
+            this.dictTypeFormShow = true;
+            for (var k = 0; k < this.TCFXList.length; k++) {
+              if (this.TCFXList[k].dictCode == this.list.tcfxName) {
+                this.list.tcfxName = this.TCFXList[k].text;
+              }
+            }
+          }
+
+          if (this.list.storeCategory == 'sjs61') {
+            this.dictTypeFormShow = true;
+            for (var k = 0; k < this.SJSList.length; k++) {
+              if (this.SJSList[k].dictCode == this.list.tcfxName) {
+                this.list.tcfxName = this.SJSList[k].text;
+              }
+            }
+          }
+          if (this.list.storeCategory == 'zyjz63') {
+            this.dictTypeFormShow = true;
+            for (var k = 0; k < this.QGJZist.length; k++) {
+              if (this.QGJZist[k].dictCode == this.list.tcfxName) {
+                this.list.tcfxName = this.QGJZist[k].text;
+              }
+            }
+          }
+          if (this.list.storeCategory == 'C912') {
+            this.storeTypePOP = false;
+            this.storeName = '铭牌上项目名称';
+            this.address = '地址';
+          } else if (this.list.storeCategory == 'C917') {
+            this.storeTypePOP = false;
+            this.storeName = '名称';
+            this.address = '地址';
+          } else {
+            this.storeTypePOP = true;
+            this.storeName = '名称';
+            this.address = '地址';
+          }
+          // 获取门店订单
+          this.getStoreOrderList(this.list.storeCode);
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    // 获取门店订单
+    getStoreOrderList(storeCode) {
+      getOrderByStoreCode({ storeCode: storeCode }).then((res) => {
+        if (res.code == 200 && res.data) {
+          let orderList = res.data.ORDERS || [];
+          if (orderList.length) {
+            let orderMap = new Map();
+            for (let i = 0; i < orderList.length; i++) {
+              if (orderMap.has(orderList[i].ORDERID)) {
+                orderMap.get(orderList[i].ORDERID).productDetail.push(orderList[i]);
+              } else {
+                let orderObj = {
+                  ORDERID: orderList[i].ORDERID, // 订单id
+                  ORDERDATE: orderList[i].ORDERDATE, //下单时间
+                  STATUS_DESCR: orderList[i].STATUS_DESCR, // 订单状态
+                  productDetail: [orderList[i]], // 订单详情
+                };
+                orderMap.set(orderList[i].ORDERID, orderObj);
+              }
+            }
+            // totalPrice:
+            let orderListArr = [];
+            for (let value of orderMap.values()) {
+              let productTotalPrice = 0; //当前订单总金额
+              for (let i = 0; i < value.productDetail.length; i++) {
+                value.productDetail[i].productTotalPrice =
+                  value.productDetail[i].UNITPRICE * value.productDetail[i].QTY; // 单个商品总金额
+                productTotalPrice = productTotalPrice + value.productDetail[i].productTotalPrice;
+              }
+              value.totalPrice = productTotalPrice;
+              orderListArr.push(value);
+            }
+            this.orderList = orderListArr;
+          } else {
+            this.orderList = [];
+          }
+          this.activeNames = ['1'];
+        }
+      });
+    },
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '总金额';
+          return;
+        }
+        if (index === 2) {
+          const values = data.map((item) => Number(item[column.property]));
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          // sums[index] += ' 元';
+        }
+        // const values = data.map((item) => Number(item[column.property]));
+        // if (!values.every((value) => isNaN(value))) {
+        //   sums[index] = values.reduce((prev, curr) => {
+        //     const value = Number(curr);
+        //     if (!isNaN(value)) {
+        //       return prev + curr;
+        //     } else {
+        //       return prev;
+        //     }
+        //   }, 0);
+        //   sums[index] += ' 元';
+        // } else {
+        //   sums[index] = 'N/A';
+        // }
+      });
+      return sums;
+    },
+    formLink() {
+      this.$router.push('/storeVisit/questions');
+    },
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+    tabChange(name, title) {
+      console.log(name, title);
+    },
+    // 退回原因查看详情
+    examineDetail() {
+      this.rejectMsgShow = true;
+    },
+    // 退回提交
+    rejectReasonSubmit() {
+      if (this.rejectMessage != '') {
+        this.approvalStoreFun('reject');
+      } else {
+        this.$notify({ type: 'warning', message: '请输入退回原因' });
+      }
+    },
+    approvalStoreFun(type) {
+      this.toastLoading(0, '正在提交...', true);
+      // processApprovalStatus(2=通过,3=拒绝)
+      let processApprovalStatus = type == 'reject' ? 3 : 2;
+      let approvalDesc = type == 'reject' ? this.rejectMessage : '';
+      let params = {
+        approvalId: this.$route.query.approvalId, // 店铺id
+        processApprovalStatus: processApprovalStatus, // 审批类型
+      };
+      if (type == 'reject') {
+        params.approvalDesc = approvalDesc;
+      }
+      approvalStore(params).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          this.$toast.success('提交成功');
+          this.rejectReasonShow = false;
+          // 从审批列表过来的原路返回
+          if (this.$route.query.source && this.$route.query.source == 'newStoreApprovalList') {
+            this.onClickLeft();
+          } else {
+            // 从提醒系统过来的直接关闭当前窗口
+            this.getDetail();
+            this.$dialog
+              .confirm({
+                title: '系统提示',
+                message: '提交成功',
+                showCancelButton: false,
+              })
+              .then(() => {
+                this.wx.closeWindow();
+              });
+          }
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    // 预览
+    previewsImg(index) {
+      var arrimg = [];
+      for (var imgi = 0; imgi < this.displayImg.length; imgi++) {
+        arrimg.push(this.displayImg[imgi]);
+      }
+      ImagePreview({
+        images: arrimg,
+        startPosition: index,
+      });
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.container {
+  padding-bottom: 50px;
+}
+.myTab .van-tabs__nav--card {
+  margin: 0 !important;
+  border-left: 0;
+  border-right: 0;
+}
+.myTab .van-tabs__wrap,
+.van-tabs__nav--card {
+  height: 40px;
+}
+.myTab .van-tab {
+  line-height: 40px;
+}
+.helpPageMask {
+  width: 100%;
+  height: 100%;
+  background: rgba(116, 116, 116, 0.8);
+  position: fixed;
+  z-index: 100000;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.bottomBtn {
+  position: fixed;
+  bottom: 0;
+  z-index: 10;
+  height: 50px;
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  .van-button {
+    /* flex: 1; */
+    width: 40%;
+  }
+}
+.rejectMsg {
+  position: sticky;
+  top: 46px;
+  z-index: 10;
+  display: flex;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 10px 16px;
+  overflow: hidden;
+  color: #323233;
+  font-size: 14px;
+  line-height: 24px;
+  background-color: #f5daac;
+  font-weight: 600;
+  .label {
+    width: 6.2em;
+    margin-right: 12px;
+  }
+  .value {
+    flex: 1;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    padding-right: 20px;
+  }
+  .examineDetail {
+    width: 70px;
+    color: #0057ba;
+  }
+}
+.rejectMsgBox {
+  min-height: 30%;
+  max-height: 50%;
+  padding: 10px 20px;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+  .title {
+    padding: 10px 0;
+    text-align: center;
+    font-size: 16px;
+    font-weight: 600px;
+  }
+  .content {
+    flex: 1;
+    overflow-y: auto;
+    .rejectMsgItem {
+      margin-bottom: 20px;
+      .item {
+        padding: 5px 0;
+        span {
+          display: inline-block;
+        }
+      }
+      .label {
+        width: 80px;
+        font-size: 14px;
+        font-weight: 600;
+      }
+      .value {
+        font-size: 14px;
+      }
+    }
+  }
+  .btnBox {
+    height: 44px;
+    button {
+      width: 100%;
+    }
+  }
+}
+.orderList {
+  .orderItem {
+    .orderTitle {
+      padding: 5px 0;
+      font-size: 16px;
+      font-weight: 600;
+      color: #000;
+      display: flex;
+      align-items: center;
+      &::before {
+        content: '';
+        width: 8px;
+        height: 8px;
+        background: red;
+        border-radius: 50%;
+        display: inline-block;
+        margin-right: 5px;
+      }
+    }
+  }
+}
+.displayImg {
+  .displayImgBox {
+    position: relative;
+    width: 48%;
+    padding: 20px 0;
+    height: 210px;
+    float: left;
+    margin-right: 4%;
+    .title {
+      text-align: center;
+      padding: 5px 0;
+    }
+  }
+  .displayImgBox:nth-child(even) {
+    margin-right: 0;
+  }
+  i {
+    position: absolute;
+    right: 4px;
+    color: white;
+    background: red;
+    overflow: hidden;
+    border-radius: 50%;
+  }
+}
+</style>
+<style lang="scss">
+.searchDiv {
+  .van-search {
+    /* // background: #fff; */
+  }
+  .van-search__action {
+    font-size: 14px;
+    color: #0057ba;
+    font-weight: bold;
+    background: #f1f1f1;
+    border-bottom-right-radius: 60px;
+    border-top-right-radius: 60px;
+    border: 1px solid #ccc;
+    padding: 0 20px;
+  }
+  .van-search--show-action {
+    padding-right: 12px;
+  }
+  .van-search__content {
+    border: 1px solid #ccc;
+    border-bottom-left-radius: 60px;
+    border-top-left-radius: 60px;
+    background: #f1f1f1;
+    border-right: 0;
+  }
+}
+.helpAlert {
+  .van-dialog__cancel {
+    .van-button__text {
+      &::before {
+        content: '?';
+        background: #f79200;
+        width: 20px;
+        display: inline-block;
+        border-radius: 50%;
+        color: #fff;
+      }
+    }
+  }
+}
+</style>

+ 105 - 0
src/views/signApproval/newStoreApprovalList.vue

@@ -0,0 +1,105 @@
+<template>
+  <div class="newStoreApprovalList">
+    <div class="navBarTOP">
+      <van-nav-bar class="navBar" title="建店审批" left-arrow @click-left="onClickLeft" />
+    </div>
+    <div class="content">
+      <div class="approvalList">
+        <div
+          class="approvalItem"
+          v-for="(item, index) in approvalList"
+          :key="index"
+          @click="enterApprovalDetail(item)">
+          <div class="item itemtitle">
+            {{ item.storeName }} (<span style="color: #0057ba">{{ item.storeCode }}</span
+            >)
+          </div>
+          <div class="item storeType">
+            <div class="label">门店类型:</div>
+            <div class="value">{{ item.storeCategoryName }}</div>
+          </div>
+          <div class="item applicationUserName">
+            <div class="label">提交人员:</div>
+            <div class="value">{{ item.applicationUserName }}</div>
+          </div>
+          <div class="item applicationTime">
+            <div class="label">提交时间:</div>
+            <div class="value">{{ item.applicationTime }}</div>
+          </div>
+          <div class="itemBtn">审批</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getStoreApprovalList } from '@/api/index';
+export default {
+  data() {
+    return {
+      approvalList: [],
+    };
+  },
+  activated() {
+    this.getApprovalList();
+  },
+  methods: {
+    getApprovalList() {
+      getStoreApprovalList().then((res) => {
+        if (res.code == 200) {
+          this.approvalList = res.data;
+        }
+      });
+    },
+    // 进入审批详情
+    enterApprovalDetail(item) {
+      this.$router.push({
+        path: '/newStoreApprovalDetail',
+        query: { id: item.storeId, approvalId: item.approvalId, source: 'newStoreApprovalList' },
+      });
+    },
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.newStoreApprovalList {
+  .content {
+    padding: 56px 10px 10px 10px;
+    .approvalList {
+      .approvalItem {
+        background: #fff;
+        padding: 10px 15px;
+        margin-bottom: 15px;
+        border-radius: 8px;
+        position: relative;
+        .item {
+          display: flex;
+          align-items: center;
+          padding: 5px 0;
+          font-size: 14px;
+          color: #999;
+        }
+        .itemtitle {
+          font-size: 14px;
+          font-weight: bold;
+          color: #333;
+        }
+        .itemBtn {
+          position: absolute;
+          top: 20px;
+          right: 20px;
+          font-size: 14px;
+          font-weight: bold;
+          color: #333;
+          color: #0057ba;
+        }
+      }
+    }
+  }
+}
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 773 - 434
src/views/storeManagement/index.vue


Fichier diff supprimé car celui-ci est trop grand
+ 1440 - 949
src/views/storeManagement/storeAdd.vue


+ 143 - 97
src/views/storeManagement/storeAddress.vue

@@ -1,8 +1,7 @@
-
 <template>
   <div class="bgcolor">
-    <div class="navBarTOP" style="background-color: #fff;">
-      <van-nav-bar class="navBar" title="待规范门店地址"   left-arrow @click-left="onClickLeft" />
+    <div class="navBarTOP" style="background-color: #fff">
+      <van-nav-bar class="navBar" title="待规范门店地址" left-arrow @click-left="onClickLeft" />
     </div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
@@ -10,113 +9,125 @@
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
     <div class="lineGrey" style="height: 4px"></div>
-    <div class="container" >
-      <van-list class="myList" v-model="loading" :finished="finished" finished-text="--已经到底了--" @load="onLoad">
-        <div class="cellcontent srore" v-for="(item,index) in list" :key="index">
-          <van-cell  >
+    <div class="container">
+      <van-list
+        class="myList"
+        v-model="loading"
+        :finished="finished"
+        finished-text="--已经到底了--"
+        @load="onLoad">
+        <div class="cellcontent srore" v-for="(item, index) in list" :key="index">
+          <van-cell>
             <div class="card" @click="storeDetailFn(item)">
-              <div class="title btn" style="padding-right: 74px;" :data-clipboard-text="item.storeCode">
-                <span>{{ item.storeName }}</span>(<span style="color:#0057ba">{{item.storeCode}}</span>)
+              <div
+                class="title btn"
+                style="padding-right: 74px"
+                :data-clipboard-text="item.storeCode">
+                <span>{{ item.storeName }}</span
+                >(<span style="color: #0057ba">{{ item.storeCode }}</span
+                >)
               </div>
-              <van-button type="info"  size="small" plain  class="centerBtn ctns1" >更改地址<van-icon name="arrow" /></van-button>
+              <van-button type="info" size="small" plain class="centerBtn ctns1"
+                >更改地址<van-icon name="arrow"
+              /></van-button>
               <div class="info">地址:{{ item.addressLine }}</div>
               <div class="info">创建时间:{{ item.createTime }}</div>
-              <div class="info" style="color:#ff976a">不规范原因:{{ item.exceptionCause }}</div>
+              <div class="info" style="color: #ff976a">不规范原因:{{ item.exceptionCause }}</div>
             </div>
           </van-cell>
           <div class="lineGrey"></div>
         </div>
-        <van-empty  v-if="list.length==0"/>
+        <van-empty v-if="list.length == 0" />
       </van-list>
-      <br>
-      <br>
-      <br>
-      <br>
+      <br />
+      <br />
+      <br />
+      <br />
     </div>
   </div>
 </template>
 
 <script>
-import {
-  getStoreTypeList,
-  getStoreyslTypeList,
-} from "@/api/index";
-import ord from "@/assets/ord.png";
-import paste from "@/assets/paste.png";
-import mpimg from "@/assets/mpimg.png";
-import order from "@/assets/order.png";
+import { getStoreTypeList, getStoreyslTypeList } from '@/api/index';
+import ord from '@/assets/ord.png';
+import paste from '@/assets/paste.png';
+import mpimg from '@/assets/mpimg.png';
+import order from '@/assets/order.png';
 import axios from 'axios';
-import order60 from "@/assets/order60.png";
-import targetOne from "@/assets/targetOne.png";
-import visitTimes from "@/assets/visitTimes.png";
-import ordernum from "@/assets/ordernum.png";
-import {getStoreAddress} from "@/api/visitstore";
+import order60 from '@/assets/order60.png';
+import targetOne from '@/assets/targetOne.png';
+import visitTimes from '@/assets/visitTimes.png';
+import ordernum from '@/assets/ordernum.png';
+import { getStoreAddress } from '@/api/visitstore';
 export default {
-  name: "storeAddress",
+  name: 'storeAddress',
   data() {
     return {
-      disabled:false,
+      disabled: false,
       list: [],
-      ord:ord,
-      addShow:false,
-      ordernum:ordernum,
-      mapShows:false,
-      visitTimess:visitTimes,
-      paste:paste,
+      ord: ord,
+      addShow: false,
+      ordernum: ordernum,
+      mapShows: false,
+      visitTimess: visitTimes,
+      paste: paste,
       storeTypeList: [],
       loading: false,
       finished: false,
-      mpimg:mpimg,
-      order:order,
-      order60:order60,
-      targetOne:targetOne,
+      mpimg: mpimg,
+      order: order,
+      order60: order60,
+      targetOne: targetOne,
       pageSize: 12,
       pageNum: 1,
-      cont:0,
-      tabVal:'1',
+      cont: 0,
+      tabVal: '1',
       showProvincePicker: false,
       showCityPicker: false,
       showDistrictPicker: false,
       provinceList: [],
       cityList: [],
       districtList: [],
-      validFlag:"",
-      addShow1:false,
-      addBTN:"新建工地",
-      title:"我的",
+      validFlag: '',
+      addShow1: false,
+      addBTN: '新建工地',
+      title: '我的',
       fromValue: {
         storeName: '',
-        provinceName: "全部省",
-        districtName: "全部县区",
-        cityName: "全部市",
-        province:"",
-        city:"",
+        provinceName: '全部省',
+        districtName: '全部县区',
+        cityName: '全部市',
+        province: '',
+        city: '',
         pageSize: 12,
         pageNum: 1,
-        district:"",
-        timeData:""
-      }
-    }
+        district: '',
+        timeData: '',
+      },
+    };
+  },
+  activated() {
+    this.$router.replace({ path: '/home' });
   },
   created() {
-    this.onLoad()
+    // this.onLoad()
   },
   watch: {
-    $route(to, from) {
-      if (from.path == "/home" || from.path == "/storeDetail"){
-        this.onLoad()
-      }
-    }
+    // $route(to, from) {
+    //   if (from.path == "/home" || from.path == "/storeDetail"){
+    //     this.onLoad()
+    //   }
+    // }
   },
   methods: {
-    linkList(val){
+    linkList(val) {
       this.$router.push({
-        path: "/pItem",
-        query: {id: val.storeCode,detilId:"a"}
-      })
+        path: '/pItem',
+        query: { id: val.storeCode, detilId: 'a' },
+      });
     },
     onLoad() {
-      this.getStoreAddress()
+      this.getStoreAddress();
     },
     getStoreAddress() {
       if (this.refreshing) {
@@ -128,29 +139,29 @@ export default {
         message: '加载中...',
         forbidClick: true,
       });
-      getStoreAddress({}).then(res => {
-        loading1.clear()
+      getStoreAddress({}).then((res) => {
+        loading1.clear();
         if (res.code == 200) {
           this.loading = false;
-          this.list =res.data
+          this.list = res.data;
           this.finished = true;
         } else {
-          this.$toast.fail(res.msg)
+          this.$toast.fail(res.msg);
         }
-      })
+      });
     },
     storeDetailFn(id) {
       this.$router.push({
-        path: "/storeDetail",
-        query: {id: id.storeId,type:"address",storeAddressId:id.storeAddressId}
-      })
+        path: '/storeDetail',
+        query: { id: id.storeId, type: 'address', storeAddressId: id.storeAddressId },
+      });
     },
     onClickLeft() {
       // this.$router.go(-1)
-      this.$router.push("/")
-    }
-  }
-}
+      this.$router.push('/');
+    },
+  },
+};
 </script>
 <style lang="scss">
 .searchDiv {
@@ -170,7 +181,7 @@ export default {
   }
 
   .van-search--show-action {
-    padding-right: 12px
+    padding-right: 12px;
   }
 
   .van-search__content {
@@ -190,20 +201,23 @@ export default {
     }
   }
 }
-.myTab{
-  .van-tabs__nav--card{
+.myTab {
+  .van-tabs__nav--card {
     margin: 0 !important;
     border-left: 0;
     border-right: 0;
   }
-  .van-tabs__wrap,.van-tabs__nav--card{
+  .van-tabs__wrap,
+  .van-tabs__nav--card {
     height: 39px;
   }
-  .van-tab{
+  .van-tab {
     line-height: 40px;
   }
 }
-.van-tabs__nav--card .van-tab.van-tab--active{background-color:#0057ba !important;}
+.van-tabs__nav--card .van-tab.van-tab--active {
+  background-color: #0057ba !important;
+}
 </style>
 <style lang="scss" scoped>
 .container {
@@ -230,31 +244,63 @@ export default {
 .cellcontent .van-cell__right-icon {
   height: 144px;
   line-height: 144px;
-  margin-right: 10px
+  margin-right: 10px;
 }
 
 .srore .van-cell {
-  padding: 0
+  padding: 0;
 }
 
 .contentpd16 .van-cell {
-  background-color: #EBF4FF;
+  background-color: #ebf4ff;
   margin: 8px 0;
   border-radius: 5px;
   padding: 4px 16px;
 }
-.visitStoreIco{float: left;    float: left;
+.visitStoreIco {
+  float: left;
+  float: left;
   width: 26px;
   text-align: center;
-  background-color: #FFBA13;
+  background-color: #ffba13;
   color: #fff;
   border-radius: 100%;
   margin-left: 14px;
   line-height: 26px;
-  height: 26px;}
-.centerBtn{margin:0  auto 10px;  display: block;  width: 92%;color:#0057ba;border-radius: 5px;padding: 0 6px;height: 28px}
-.ctns1{position: absolute;top: 12px;right: 12px;width: 76px;}
-.positionContent{position: fixed;color:#666;display: inline-block;    box-shadow: 0px 2px 7px -5px #000;border-radius: 100px;overflow: hidden;right: 14px; cursor: pointer;bottom:60px;background-color: white}
-.positionContent .img{border-radius: 100px;float: left}
-.positionContent .img .van-icon__image{border-radius: 100px;}
-</style>
+  height: 26px;
+}
+.centerBtn {
+  margin: 0 auto 10px;
+  display: block;
+  width: 92%;
+  color: #0057ba;
+  border-radius: 5px;
+  padding: 0 6px;
+  height: 28px;
+}
+.ctns1 {
+  position: absolute;
+  top: 12px;
+  right: 12px;
+  width: 76px;
+}
+.positionContent {
+  position: fixed;
+  color: #666;
+  display: inline-block;
+  box-shadow: 0px 2px 7px -5px #000;
+  border-radius: 100px;
+  overflow: hidden;
+  right: 14px;
+  cursor: pointer;
+  bottom: 60px;
+  background-color: white;
+}
+.positionContent .img {
+  border-radius: 100px;
+  float: left;
+}
+.positionContent .img .van-icon__image {
+  border-radius: 100px;
+}
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 487 - 377
src/views/storeManagement/storeDetail.vue


+ 133 - 217
src/views/storeManagement/storeEdit.vue

@@ -291,8 +291,8 @@
             </div>
             <div v-if="fromValue.storeCategory != 'C917'">
               <div style="padding: 20px; height: 228px; background-color: #f1f1f1">
-                <van-row gutter="20">
-                  <van-col span="12">
+                <div class="displayImg">
+                  <div class="displayImgBox">
                     <div v-if="storeTypePOP">
                       <upload-img
                         :uploadid="uploadid2"
@@ -309,18 +309,28 @@
                         :imgText="fromValue.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片'"
                         :type="1"></upload-img>
                     </div>
-                  </van-col>
-                  <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
+                  </div>
+                  <template
+                    v-if="fromValue.ifJzStoreType != 1 && storeTypePOP && displayImg.length">
+                    <div class="displayImgBox" v-for="(urls, index) in displayImg" :key="index">
+                      <van-icon name="close" size="16" @click="deleteImg(index)" />
+                      <img :src="urls" width="99%" height="99%" @click="previewsImg(index)" />
+                      <div class="title">陈列照</div>
+                    </div>
+                  </template>
+                  <div class="displayImgBox" v-if="fromValue.ifJzStoreType != 1">
                     <div v-if="storeTypePOP">
                       <upload-img
+                        v-if="fromValue.ifJzStoreType != 1"
                         :uploadid="uploadid2"
-                        :imgArr="fromValue.imgSed"
+                        imgArr=""
                         @newimgarr="newimgarr1"
-                        :imgText="fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'"
-                        :type="2"></upload-img>
+                        imgText="陈列照(至少一张)"
+                        :type="2"
+                        count="1"></upload-img>
                     </div>
-                  </van-col>
-                </van-row>
+                  </div>
+                </div>
               </div>
             </div>
             <!-- 无效店铺,关闭店铺 -->
@@ -574,13 +584,14 @@ import {
 import uploadImg from '@/components/uploadImgVStore';
 import uploadImgc from '@/components/uploadImgVStorec';
 import viewUploadImg from '@/components/viewUploadImg';
-import axios from 'axios';
 import mapmarker from '@/components/mapMarker';
 import { jsonp } from 'vue-jsonp';
 import txmapimg1 from '@/assets/txmap1.svg';
 import txmapimg2 from '@/assets/txmap2.svg';
 import txmapimg3 from '@/assets/marker_blue.png';
 import { valid } from '@/api/visitstore';
+import { ImagePreview } from 'vant';
+import { getPosition, getTicketFun, getMapPoi, getkeywordPoi } from '@/utils/TXApiFun';
 
 export default {
   name: 'storeAdd',
@@ -707,29 +718,26 @@ export default {
       map: '',
       pLat: '',
       pLot: '',
+      displayImg: [],
     };
   },
-  created() {
-    this.getTCFXList();
-    this.getSJSList();
-    this.getQGJZist();
-    this.getDetail();
-    this.getbrands();
-    this.getStreetQuery();
-    this.getCustomerInfoList();
-    this.getManagementModelList();
-    this.getMainRelationList();
-    this.getMainProjectList();
-    this.getCustomerNatureList();
-    this.getpotentialCustomerTypeList();
-  },
-  watch: {
-    $route(to, from) {
-      if (to.path == '/storeEdit' && from.path == '/storeDetail') {
-        this.getDetail();
-        this.showmap = false;
-      }
-    },
+  activated() {
+    // 授权
+    getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
+      this.getTCFXList();
+      this.getSJSList();
+      this.getQGJZist();
+      this.getDetail();
+      this.getbrands();
+      this.getStreetQuery();
+      this.getCustomerInfoList();
+      this.getManagementModelList();
+      this.getMainRelationList();
+      this.getMainProjectList();
+      this.getCustomerNatureList();
+      this.getpotentialCustomerTypeList();
+      this.showmap = false;
+    });
   },
   methods: {
     addressFns(val) {
@@ -745,13 +753,9 @@ export default {
           },
         ]);
         that.maplist = [];
-        jsonp(
-          'https://apis.map.qq.com/ws/place/v1/search?boundary=nearby(' +
-            val.location.lat +
-            ',' +
-            val.location.lng +
-            ',1000,0)&page_size=20&page_index=1&orderby=_distance&output=jsonp&key=WLCBZ-HRM6L-YOMPV-ME62B-AQOG6-JUBW6'
-        ).then((res) => {
+        // 地点搜索 获取500米范围poi点
+        getMapPoi({ latitude: val.location.lat, longitude: val.location.lng }).then((res) => {
+          console.log(res);
           that.maplist = res.data;
           that.marker.setGeometries([]);
           setTimeout(() => {
@@ -770,18 +774,15 @@ export default {
     },
     searchFn(val) {
       this.searchSHow = false;
-      var that = this;
-      jsonp(
-        'https://apis.map.qq.com/ws/place/v1/suggestion?keyword=' +
-          val +
-          '&location=' +
-          this.pLat +
-          ',' +
-          this.pLot +
-          '&output=jsonp&key=WLCBZ-HRM6L-YOMPV-ME62B-AQOG6-JUBW6&page_size=20&region_fix=1'
-      ).then((res) => {
-        this.searchSHow = true;
-        that.mapsearchlist = res.data;
+      getkeywordPoi({ latitude: this.pLat, longitude: this.pLot }, val).then((res) => {
+        // 不显示下拉选择
+        if (!res.data.length && !val) {
+          this.searchSHow = false;
+        } else {
+          this.searchSHow = true;
+        }
+        // 联想下拉选
+        this.mapsearchlist = res.data;
       });
     },
     mapselect(val) {
@@ -818,96 +819,29 @@ export default {
     },
     fns() {
       this.search = '';
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '定位中...',
-        forbidClick: true,
-      });
-      let url = window.location.href;
-      let that = this;
-      let qiyeData;
-      const instance = axios.create();
-      instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-      instance
-        .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-          params: {
-            url: url,
-          },
-        })
-        .then((response) => {
-          if (response.status == 200) {
-            this.cont = 6;
-            var flat = true;
-            var times = setInterval(() => {
-              this.cont--;
-              if (this.cont == '0') {
-                if (flat) {
-                  loading1.clear();
-                  clearInterval(times);
-                  that.$dialog
-                    .alert({
-                      message: '定位失败,请开启企微定位权限',
-                    })
-                    .then(() => {
-                      this.$router.go(-1);
-                    });
-                } else {
-                  clearInterval(times);
-                }
-              }
-            }, 1000);
-            qiyeData = response.data.data;
-            that.wx.config({
-              beta: true,
-              debug: false,
-              appId: qiyeData.appId,
-              timestamp: qiyeData.timestamp,
-              nonceStr: qiyeData.nonceStr,
-              signature: qiyeData.signature,
-              jsApiList: ['ready', 'getLocation'],
-            });
-            that.wx.ready(function () {
-              that.wx.getLocation({
-                type: 'gcj02',
-                success: function (res) {
-                  flat = false;
-                  loading1.clear();
-                  that.pLat = res.latitude;
-                  that.pLot = res.longitude;
-                  var location = that.CJ02BD(res.latitude, res.longitude);
-                  if (that.fromValue.lon == '') {
-                    that.fromValue.lon = location.lon;
-                    that.fromValue.lat = location.lat;
-                  }
-                  that.showmap = true;
-                  jsonp(
-                    'https://apis.map.qq.com/ws/place/v1/search?boundary=nearby(' +
-                      res.latitude +
-                      ',' +
-                      res.longitude +
-                      ',1000,0)&page_size=10&page_index=1&orderby=_distance&output=jsonp&key=WLCBZ-HRM6L-YOMPV-ME62B-AQOG6-JUBW6'
-                  ).then((res) => {
-                    that.maplist = res.data;
-                    setTimeout(() => {
-                      that.addVisits1('1');
-                    });
-                  });
-                },
-                fail: function () {
-                  loading1.clear();
-                  that.$dialog.alert({
-                    title: '系统提示',
-                    message: 'GPS未开启',
-                  });
-                },
-              });
-            });
-            that.wx.error(function (res) {
-              this.$toast.fail('定位失败');
-            });
-          } else {
-            this.$toast.fail('接口异常');
+      getPosition()
+        .then((res) => {
+          let { TXisBD, resData } = res;
+          this.pLat = resData.latitude;
+          this.pLot = resData.longitude;
+          if (this.fromValue.lon == '') {
+            this.fromValue.lon = TXisBD.lon;
+            this.fromValue.lat = TXisBD.lat;
           }
+          this.showmap = true;
+          // 地点搜索 获取500米范围poi点
+          getMapPoi({ latitude: this.pLat, longitude: this.pLot }).then((res) => {
+            console.log(res);
+            this.maplist = res.data;
+            setTimeout(() => {
+              this.addVisits1('1');
+            });
+          });
+        })
+        .catch((error) => {
+          this.$dialog.alert({
+            message: error,
+          });
         });
       this.addresssb = -1;
     },
@@ -1241,6 +1175,11 @@ export default {
 
         if (res.code == 200) {
           this.fromValue = res.data;
+          if (this.fromValue.imgSed && this.fromValue.imgSed != '') {
+            this.displayImg = this.fromValue.imgSed.split(',');
+          } else {
+            this.displayImg = [];
+          }
           if (this.fromValue.lat != null) {
           } else {
             this.fromValue.lat = '';
@@ -1328,7 +1267,8 @@ export default {
       if (val.type == '1') {
         this.fromValue.img = val.fileUrl;
       } else if (val.type == '2') {
-        this.fromValue.imgSed = val.fileUrl;
+        // this.fromValue.imgSed = val.fileUrl;
+        this.displayImg.push(val.fileUrl);
       } else {
         this.fromValue.carShopImgList.push(val.fileUrl);
       }
@@ -1406,83 +1346,17 @@ export default {
       });
     },
     getLocation() {
-      let url = window.location.href;
-      this.list = [];
-      let that = this;
-      let qiyeData;
-      const instance = axios.create();
-      instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-      instance
-        .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-          params: {
-            url: url,
-          },
+      getPosition()
+        .then((res) => {
+          let { TXisBD } = res;
+          this.location = TXisBD;
+          this.fromValue.lat = TXisBD.lat;
+          this.fromValue.lon = TXisBD.lon;
         })
-        .then((response) => {
-          if (response.status == 200) {
-            this.cont = 3;
-            var flat = true;
-            var times = setInterval(() => {
-              this.cont--;
-              if (this.cont == '0') {
-                if (flat) {
-                  loading1.clear();
-                  clearInterval(times);
-                  that.$dialog
-                    .alert({
-                      message: '定位失败,请开启企微定位权限',
-                    })
-                    .then(() => {
-                      this.$router.go(-1);
-                    });
-                } else {
-                  clearInterval(times);
-                }
-              }
-            }, 1000);
-            qiyeData = response.data.data;
-            that.wx.config({
-              beta: true,
-              debug: false,
-              appId: qiyeData.appId,
-              timestamp: qiyeData.timestamp,
-              nonceStr: qiyeData.nonceStr,
-              signature: qiyeData.signature,
-              jsApiList: ['ready', 'getLocation'],
-            });
-            that.wx.ready(function () {
-              that.wx.getLocation({
-                type: 'gcj02',
-                success: function (res) {
-                  flat = false;
-                  var location = that.CJ02BD(res.latitude, res.longitude);
-                  that.location = location;
-                  that.fromValue.lat = that.location.lat;
-                  that.fromValue.lon = that.location.lon;
-                },
-                fail: function () {
-                  that.$dialog
-                    .confirm({
-                      confirmButtonText: '取消',
-                      cancelButtonText: '重新定位',
-                      title: '系统提示',
-                      message: 'GPS未开启',
-                    })
-                    .then(() => {
-                      console.log('取消');
-                    })
-                    .catch(() => {
-                      that.getLocation();
-                    });
-                },
-              });
-            });
-            that.wx.error(function (res) {
-              this.$toast.fail('定位失败');
-            });
-          } else {
-            this.$toast.fail('接口异常');
-          }
+        .catch((error) => {
+          this.$dialog.alert({
+            message: error,
+          });
         });
     },
     showPickerChainsListFn() {
@@ -1678,6 +1552,7 @@ export default {
       }
     },
     onSubmit() {
+      this.fromValue.imgSed = this.displayImg.join(',');
       for (var n1 = 0; n1 < this.fromValue.orderProductStoreList.length; n1++) {
         for (var n2 = 0; n2 < this.sfaOrderProducts.length; n2++) {
           if (
@@ -1828,7 +1703,7 @@ export default {
               message: res.msg,
             })
             .then(() => {
-              this.$router.go(-2);
+              this.$router.go(-1);
             });
         } else {
           this.$dialog.alert({
@@ -1860,6 +1735,21 @@ export default {
         }
       }
     },
+    // 陈列照 图片删除
+    deleteImg(index) {
+      this.displayImg.splice(index, 1);
+    },
+    // 预览
+    previewsImg(index) {
+      var arrimg = [];
+      for (var imgi = 0; imgi < this.displayImg.length; imgi++) {
+        arrimg.push(this.displayImg[imgi]);
+      }
+      ImagePreview({
+        images: arrimg,
+        startPosition: index,
+      });
+    },
   },
 };
 </script>
@@ -1894,6 +1784,32 @@ export default {
     }
   }
 }
+.displayImg {
+  overflow: hidden;
+  .displayImgBox {
+    position: relative;
+    width: 48%;
+    padding: 20px 0;
+    height: 210px;
+    float: left;
+    margin-right: 4%;
+    .title {
+      text-align: center;
+      padding: 5px 0;
+    }
+  }
+  .displayImgBox:nth-child(even) {
+    margin-right: 0;
+  }
+  i {
+    position: absolute;
+    right: 4px;
+    color: white;
+    background: red;
+    overflow: hidden;
+    border-radius: 50%;
+  }
+}
 </style>
 <style>
 #allmap {

Fichier diff supprimé car celui-ci est trop grand
+ 353 - 180
src/views/storeManagement/success.vue