zhujindu 1 år sedan
förälder
incheckning
c622a2d7f1
2 ändrade filer med 164 tillägg och 256 borttagningar
  1. 1 1
      README.md
  2. 163 255
      src/views/storeManagement/storeDetail.vue

+ 1 - 1
README.md

@@ -1,6 +1,6 @@
 # storevisit-ui-mobile
 
-# 开发环境
+# 环境
 
 node > 16
 

+ 163 - 255
src/views/storeManagement/storeDetail.vue

@@ -2,12 +2,7 @@
   <div>
     <div class="navBarTOP">
       <!-- 顶部条 -->
-      <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: #0057ba"
@@ -29,20 +24,10 @@
       <van-dialog title="门店位置">
         <mapmarker :info="list"></mapmarker>
       </van-dialog>
-      <van-tabs
-        class="myTab"
-        v-model="tabVal"
-        color="#0057ba"
-        @change="tabChange"
-      >
+      <van-tabs class="myTab" v-model="tabVal" color="#0057ba" @change="tabChange">
         <van-tab title="基础信息" name="insidePlan" ref="dispsps">
           <van-field readonly v-model="list.storeCode" label="编号" />
-          <van-field
-            readonly
-            v-if="DIYshow"
-            v-model="list.attribute1"
-            label="DIY编号"
-          />
+          <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
@@ -52,66 +37,39 @@
             autosize
             type="textarea"
             v-model="list.addressLine"
-            :label="address"
-          />
+            :label="address" />
           <van-field
             v-if="type == 'address'"
             rows="1"
             autosize
             type="textarea"
             v-model="list.addressLine"
-            :label="address"
-          >
+            :label="address">
             <template #button>
               <van-button size="small" type="info" @click="fns"
                 ><van-icon name="location-o" />地图</van-button
               >
             </template>
           </van-field>
-          <van-field
-            v-model="list.lat"
-            readonly
-            label="经度"
-            placeholder="经度"
-          />
+          <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="省(州)"
-            @click="provinceFN"
-          >
+          <van-field readonly v-model="list.provinceName" label="省(州)" @click="provinceFN">
             <template #button>
               <van-icon name="arrow" v-if="type == 'address'" />
             </template>
           </van-field>
-          <van-field
-            readonly
-            v-model="list.cityName"
-            label="城市"
-            @click="cityFN"
-          >
+          <van-field readonly v-model="list.cityName" label="城市" @click="cityFN">
             <template #button>
               <van-icon name="arrow" v-if="type == 'address'" />
             </template>
           </van-field>
-          <van-field
-            readonly
-            v-model="list.districtName"
-            label="区(县)"
-            @click="districtFN"
-          >
+          <van-field readonly v-model="list.districtName" label="区(县)" @click="districtFN">
             <template #button>
               <van-icon name="arrow" v-if="type == 'address'" />
             </template>
           </van-field>
-          <van-field
-            readonly
-            v-model="list.townName"
-            label="街道"
-            @click="towntFN"
-          >
+          <van-field readonly v-model="list.townName" label="街道" @click="towntFN">
             <template #button>
               <van-icon name="arrow" v-if="type == 'address'" />
             </template>
@@ -121,53 +79,45 @@
             readonly
             v-if="list.ifJzStoreType != 1 && list.storeCategory != 'C917'"
             v-model="list.contactName"
-            label="联系人"
-          />
+            label="联系人" />
           <van-field
             readonly
             v-if="list.ifJzStoreType == 1 && list.storeCategory != 'C917'"
             v-model="list.contactName"
-            label="老板"
-          />
+            label="老板" />
           <van-field
             readonly
             v-model="list.telephone"
             label="联系电话"
-            v-if="list.storeCategory != 'C917'"
-          />
+            v-if="list.storeCategory != 'C917'" />
           <van-field
             readonly
             v-model="list.chainCode"
             label="经销商编号"
-            v-if="list.storeCategory != 'C917'"
-          />
+            v-if="list.storeCategory != 'C917'" />
           <van-field
             readonly
             v-model="list.chainName"
             label="经销商名称"
-            v-if="list.storeCategory != 'C917'"
-          />
+            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²)"
-            />
+              label="面积(m²)" />
             <van-field
               readonly
               v-model="list.area"
               v-if="list.ifJzStoreType == 1"
-              label="家装展厅面积(m²)"
-            />
+              label="家装展厅面积(m²)" />
           </div>
           <van-field
             readonly
             v-if="GZAttributeFormShow"
             label="潜在客户类型"
-            v-model="list.potentialCustomerType"
-          />
+            v-model="list.potentialCustomerType" />
           <van-field readonly v-if="list.carShop" label="是否车铺开店">
             <template #input>
               <span v-if="list.carShop == 1">是</span>
@@ -175,24 +125,20 @@
             </template>
           </van-field>
           <div v-if="list.carShopImgList != null && list.carShop == 1">
-            <p style="padding: 0 16px">
-              车铺照片(店招及车铺产品拍在一张照片里)
-            </p>
+            <p style="padding: 0 16px">车铺照片(店招及车铺产品拍在一张照片里)</p>
             <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
           </div>
           <van-row
             gutter="20"
             style="padding: 16px"
-            v-if="list.img != null && list.storeCategory != 'C917'"
-          >
+            v-if="list.img != null && list.storeCategory != 'C917'">
             <van-col span="12">
               <div v-if="storeTypePOP">
                 <van-image
                   width="100%"
                   height="160"
                   :src="list.img"
-                  @click="deleteImgs(list.img)"
-                />
+                  @click="deleteImgs(list.img)" />
                 <p style="text-align: center">
                   {{ list.ifJzStoreType != 1 ? "门店照" : "家装前台照片" }}
                 </p>
@@ -202,12 +148,9 @@
                   width="100%"
                   height="160"
                   :src="list.img"
-                  @click="deleteImgs(list.img)"
-                />
+                  @click="deleteImgs(list.img)" />
                 <p style="text-align: center">
-                  {{
-                    list.storeCategory == "C912" ? "工地铭牌照片" : "公司照片"
-                  }}
+                  {{ list.storeCategory == "C912" ? "工地铭牌照片" : "公司照片" }}
                 </p>
               </div>
             </van-col>
@@ -217,8 +160,7 @@
                   width="100%"
                   height="160"
                   :src="list.imgSed"
-                  @click="deleteImgs(list.imgSed)"
-                />
+                  @click="deleteImgs(list.imgSed)" />
                 <p style="text-align: center">
                   {{ list.ifJzStoreType != 1 ? "陈列照" : "立邦展厅照片" }}
                 </p>
@@ -234,25 +176,18 @@
                 list.storeCategory == '37' ||
                 list.storeCategory == '38' ||
                 list.storeCategory == '91'
-              "
-            >
+              ">
               <upload-img
                 :uploadid="uploadid2"
                 :imgArr="img"
                 @newimgarr="newimgarr1"
                 imgText="店招照片"
-                :type="1"
-              ></upload-img>
+                :type="1"></upload-img>
             </van-col>
           </van-row>
         </van-tab>
         <van-tab title="属性信息" name="outsidePlan">
-          <van-field
-            readonly
-            label="属性"
-            v-if="dictTypeFormShow"
-            v-model="list.tcfxName"
-          />
+          <van-field readonly label="属性" v-if="dictTypeFormShow" v-model="list.tcfxName" />
         </van-tab>
       </van-tabs>
       <!--省、市、区、街道-->
@@ -262,8 +197,7 @@
           title="省(州)"
           :columns="provinceList"
           @confirm="onProvinceConfirm"
-          @cancel="provinceShow = false"
-        />
+          @cancel="provinceShow = false" />
       </van-popup>
       <van-popup v-model="cityShow" position="bottom">
         <van-picker
@@ -271,8 +205,7 @@
           title="城市"
           :columns="cityList"
           @confirm="onCityConfirm"
-          @cancel="cityShow = false"
-        />
+          @cancel="cityShow = false" />
       </van-popup>
       <van-popup v-model="districtShow" position="bottom">
         <van-picker
@@ -280,8 +213,7 @@
           title="县区"
           :columns="districtList"
           @confirm="onDistrictConfirm"
-          @cancel="districtShow = false"
-        />
+          @cancel="districtShow = false" />
       </van-popup>
       <van-popup v-model="towntShow" position="bottom">
         <van-picker
@@ -289,8 +221,7 @@
           title="街道"
           :columns="townList"
           @confirm="onTownConfirm"
-          @cancel="towntShow = false"
-        />
+          @cancel="towntShow = false" />
       </van-popup>
       <br />
       <br />
@@ -307,8 +238,7 @@
           background-color: white;
           border-top: 1px solid #eee;
         "
-        v-if="type"
-      >
+        v-if="type">
         <van-row gutter="20">
           <van-col
             span="12"
@@ -363,75 +293,41 @@
         v-model="showDialog"
         title="系统提示"
         show-cancel-button
-        :show-confirm-button="false"
-      >
+        :show-confirm-button="false">
         <p v-if="!Array.isArray(msgList)" style="padding: 10px 14px; margin: 0">
           {{ msgList }}
         </p>
-        <div
-          style="max-height: 400px; overflow-y: auto"
-          v-if="Array.isArray(msgList)"
-        >
+        <div style="max-height: 400px; overflow-y: auto" v-if="Array.isArray(msgList)">
           <p
-            style="
-              border-bottom: 1px solid #f5f5f5;
-              padding: 10px 14px;
-              margin: 0;
-            "
+            style="border-bottom: 1px solid #f5f5f5; padding: 10px 14px; margin: 0"
             v-for="(item, index) in msgList"
-            :key="index"
-          >
+            :key="index">
             {{ item }}
           </p>
         </div>
       </van-dialog>
-      <div
-        style="
-          position: fixed;
-          top: 0;
-          height: 100%;
-          z-index: 3000;
-          width: 100%;
-        "
-        v-if="showmap"
-      >
+      <div style="position: fixed; top: 0; height: 100%; z-index: 3000; width: 100%" v-if="showmap">
         <div id="allmap1" style="height: 100%; width: 100%"></div>
         <div
-          style="
-            position: fixed;
-            z-index: 99999;
-            top: 0;
-            width: 100%;
-            background-color: white;
-          "
-          v-if="showmap"
-        >
+          style="position: fixed; z-index: 99999; top: 0; width: 100%; background-color: white"
+          v-if="showmap">
           <form action="/">
             <van-search
               v-model="searchValue"
               left-icon="search"
               @input="searchFn"
-              placeholder="请输入搜索关键词"
-            >
+              placeholder="请输入搜索关键词">
               <!-- <template #action>
                 <div @click="searchFn">搜索</div>
               </template> -->
             </van-search>
           </form>
           <div style="height: 200px; overflow: hidden" v-if="searchSHow">
-            <div
-              style="
-                height: 100px;
-                min-height: 200px;
-                overflow-y: scroll;
-                padding: 12px;
-              "
-            >
+            <div style="height: 100px; min-height: 200px; overflow-y: scroll; padding: 12px">
               <div
                 v-for="(itme, index) in mapsearchlist"
                 style="border-bottom: 1px solid #eee"
-                @click="addressFn(itme)"
-              >
+                @click="addressFn(itme)">
                 <p>{{ itme.title }}</p>
                 <p>{{ itme.address }}</p>
               </div>
@@ -447,15 +343,8 @@
             <span style="float: right" @click="confirmMap">确定</span>
           </div>
           <div class="listBox">
-            <van-radio-group
-              v-model="addresssb"
-              @change="mapselect"
-              v-if="shows"
-            >
-              <van-radio
-                :name="index"
-                v-for="(item, index) in maplist"
-                :key="index"
+            <van-radio-group v-model="addresssb" @change="mapselect" v-if="shows">
+              <van-radio :name="index" v-for="(item, index) in maplist" :key="index"
                 ><p style="margin: 4px 0; font-weight: bold">
                   {{ item.title }}
                 </p>
@@ -470,6 +359,9 @@
         </div>
       </div>
     </div>
+    <div class="helpPageMask" v-if="helpPageFlag">
+      <helpPage @btnClick="btnClick"></helpPage>
+    </div>
   </div>
 </template>
 
@@ -502,8 +394,9 @@ import axios from "axios";
 import { jsonp } from "vue-jsonp";
 import { updateStoreAddress, valid } from "@/api/visitstore";
 import uploadImg from "@/components/viewaddreddUploadImg.vue";
+import helpPage from "./helpPage.vue";
 export default {
-  components: { uploadImg, mapmarker, viewUploadImg },
+  components: { uploadImg, mapmarker, viewUploadImg, helpPage },
   data() {
     return {
       addresssb: "",
@@ -568,6 +461,8 @@ export default {
       myLon: "",
       pLat: "",
       pLot: "",
+      poiName: "",
+      helpPageFlag: false, //提交修改 不通过 点击帮助弹出框
     };
   },
   created() {
@@ -607,6 +502,7 @@ export default {
     this.poiLon = "";
     this.poiId = "";
     this.myLon = "";
+    this.poiName = "";
   },
   methods: {
     newimgarr1(val) {
@@ -640,10 +536,7 @@ export default {
               that.marker.updateGeometries([
                 {
                   id: res.data[p].id,
-                  position: new TMap.LatLng(
-                    res.data[p].location.lat,
-                    res.data[p].location.lng
-                  ),
+                  position: new TMap.LatLng(res.data[p].location.lat, res.data[p].location.lng),
                 },
               ]);
             }
@@ -656,9 +549,7 @@ export default {
       this.searchSHow = false;
       console.log(this.searchValue);
       // 关键词
-      let keyword = this.searchValue
-        ? "&keyword=" + encodeURI(this.searchValue)
-        : "";
+      let keyword = this.searchValue ? "&keyword=" + encodeURI(this.searchValue) : "";
       // 地点搜索
       let searchApi =
         "https://apis.map.qq.com/ws/place/v1/search?boundary=nearby(" +
@@ -717,6 +608,7 @@ export default {
         this.poiLat = this.maplist[this.addresssb].location.lat;
         this.poiLon = this.maplist[this.addresssb].location.lng;
         this.poiId = this.maplist[this.addresssb].id;
+        this.poiName = this.maplist[this.addresssb].title;
       }
       this.showmap = false;
     },
@@ -732,8 +624,7 @@ export default {
       let that = this;
       let qiyeData;
       const instance = axios.create();
-      instance.defaults.headers.common["userId"] =
-        localStorage.getItem("loginName");
+      instance.defaults.headers.common["userId"] = localStorage.getItem("loginName");
       instance
         .get(process.env.VUE_APP_BASE_API + "mobile/wx/ticket", {
           params: {
@@ -869,10 +760,7 @@ export default {
         marker.updateGeometries([
           {
             id: this.maplist[p].id,
-            position: new TMap.LatLng(
-              this.maplist[p].location.lat,
-              this.maplist[p].location.lng
-            ),
+            position: new TMap.LatLng(this.maplist[p].location.lat, this.maplist[p].location.lng),
           },
         ]);
       }
@@ -964,6 +852,7 @@ export default {
         district: this.list.district,
         townName: this.list.townName,
         shopSignUrl: this.img,
+        poiName: this.poiName, //地图选择POI名称
       };
       console.log(JSON.stringify(params));
       console.log(params);
@@ -979,10 +868,21 @@ export default {
               this.$router.go(-1);
             });
         } else {
-          this.$dialog.alert({
-            message: res.msg,
-            messageAlign: "left",
-          });
+          this.$dialog
+            .alert({
+              className: "helpAlert",
+              confirmButtonColor: "#0057ba",
+              message: res.msg,
+              messageAlign: "left",
+              showCancelButton: true,
+              cancelButtonText: "帮助",
+              cancelButtonColor: "#f79200",
+            })
+            .then(() => {})
+            .catch(() => {
+              // 帮助 弹出框
+              this.helpPageFlag = true;
+            });
         }
       });
     },
@@ -1241,9 +1141,7 @@ export default {
           valid({ storeId: that.list.storeId }).then((res) => {
             loading1.clear();
             if (res.code == 200) {
-              window.location.replace(
-                window.location.origin + "/mobile/storeAddress"
-              );
+              window.location.replace(window.location.origin + "/mobile/storeAddress");
             }
           });
         });
@@ -1294,11 +1192,7 @@ export default {
           ) {
             this.getStreetQuery("1");
           }
-          if (
-            res.data.city != null &&
-            res.data.city != undefined &&
-            res.data.city != ""
-          ) {
+          if (res.data.city != null && res.data.city != undefined && res.data.city != "") {
             this.getStreetQuery("2");
           }
           if (
@@ -1312,10 +1206,7 @@ export default {
           } else {
             this.list.carShopImgList = [];
           }
-          if (
-            this.list.storeCategory == "10131" ||
-            this.list.storeCategory == "129081"
-          ) {
+          if (this.list.storeCategory == "10131" || this.list.storeCategory == "129081") {
             this.typeABshow = true;
           } else {
             this.typeABshow = false;
@@ -1328,12 +1219,8 @@ export default {
             this.dictTypeAFormShow = false;
             this.typeABshow = 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;
+              if (this.potentialCustomerTypeList[k].dictCode == this.list.potentialCustomerType) {
+                this.list.potentialCustomerType = this.potentialCustomerTypeList[k].text;
               }
             }
           } else {
@@ -1396,8 +1283,7 @@ export default {
           let that = this;
           let qiyeData;
           const instance = axios.create();
-          instance.defaults.headers.common["userId"] =
-            localStorage.getItem("loginName");
+          instance.defaults.headers.common["userId"] = localStorage.getItem("loginName");
           instance
             .get(process.env.VUE_APP_BASE_API + "mobile/wx/ticket", {
               params: {
@@ -1481,8 +1367,7 @@ export default {
       let that = this;
       let qiyeData;
       const instance = axios.create();
-      instance.defaults.headers.common["userId"] =
-        localStorage.getItem("loginName");
+      instance.defaults.headers.common["userId"] = localStorage.getItem("loginName");
       instance
         .get(process.env.VUE_APP_BASE_API + "mobile/wx/ticket", {
           params: {
@@ -1584,66 +1469,58 @@ export default {
             ) {
               window.location.replace(res.data.orderUrl);
             } else {
-              checkVisit({ storeId: res.data.sfaStore.storeId }).then(
-                (response) => {
-                  localStorage.setItem("startTime", new Date());
-                  localStorage.setItem("ORGName", this.list.deptName);
-                  localStorage.setItem("chainNameR", this.list.storeName);
-                  if (response.code == 200) {
-                    that.$dialog
-                      .confirm({
-                        title: "系统提示",
-                        message: "建店成功,是否立即拜访?",
-                        confirmButtonText: "立即拜访",
-                        cancelButtonText: "返回上一页",
-                      })
-                      .then(() => {
-                        localStorage.setItem("startTime", new Date());
-                        localStorage.setItem(
-                          "ORGName",
-                          res.data.sfaStore.deptName
-                        );
-                        localStorage.setItem(
-                          "chainNameR",
-                          res.data.sfaStore.storeName
-                        );
-                        window.location.replace(
-                          window.location.origin +
-                            "/mobile/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=" +
-                            res.data.sfaStore.storeId +
-                            "&lat=" +
-                            that.list.lat +
-                            "&lon=" +
-                            that.list.lon +
-                            "&addressLine=" +
-                            that.list.addressLine +
-                            "&storeCategory=" +
-                            res.data.sfaStore.storeCategory +
-                            "&storeName=" +
-                            that.list.storeName +
-                            "&contactName=" +
-                            that.list.contactName +
-                            "&storeCode=" +
-                            res.data.sfaStore.storeCode +
-                            "&latNew=" +
-                            that.list.lat +
-                            "&lonNew=" +
-                            that.list.lon
-                        );
-                      })
-                      .catch(() => {
-                        that.$router.go(-2);
-                      });
-                  } else {
-                    that.$dialog
-                      .alert({
-                        title: "系统提示",
-                        message: response.msg,
-                      })
-                      .then((res) => {});
-                  }
+              checkVisit({ storeId: res.data.sfaStore.storeId }).then((response) => {
+                localStorage.setItem("startTime", new Date());
+                localStorage.setItem("ORGName", this.list.deptName);
+                localStorage.setItem("chainNameR", this.list.storeName);
+                if (response.code == 200) {
+                  that.$dialog
+                    .confirm({
+                      title: "系统提示",
+                      message: "建店成功,是否立即拜访?",
+                      confirmButtonText: "立即拜访",
+                      cancelButtonText: "返回上一页",
+                    })
+                    .then(() => {
+                      localStorage.setItem("startTime", new Date());
+                      localStorage.setItem("ORGName", res.data.sfaStore.deptName);
+                      localStorage.setItem("chainNameR", res.data.sfaStore.storeName);
+                      window.location.replace(
+                        window.location.origin +
+                          "/mobile/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=" +
+                          res.data.sfaStore.storeId +
+                          "&lat=" +
+                          that.list.lat +
+                          "&lon=" +
+                          that.list.lon +
+                          "&addressLine=" +
+                          that.list.addressLine +
+                          "&storeCategory=" +
+                          res.data.sfaStore.storeCategory +
+                          "&storeName=" +
+                          that.list.storeName +
+                          "&contactName=" +
+                          that.list.contactName +
+                          "&storeCode=" +
+                          res.data.sfaStore.storeCode +
+                          "&latNew=" +
+                          that.list.lat +
+                          "&lonNew=" +
+                          that.list.lon
+                      );
+                    })
+                    .catch(() => {
+                      that.$router.go(-2);
+                    });
+                } else {
+                  that.$dialog
+                    .alert({
+                      title: "系统提示",
+                      message: response.msg,
+                    })
+                    .then((res) => {});
                 }
-              );
+              });
             }
           } else {
             this.list.storeCode = res.data.sfaStore.storeCode;
@@ -1659,10 +1536,13 @@ export default {
         }
       });
     },
+    btnClick() {
+      this.helpPageFlag = false;
+    },
   },
 };
 </script>
-<style scoped>
+<style scoped lang="scss">
 .container {
   padding-bottom: 50px;
 }
@@ -1678,6 +1558,20 @@ export default {
 .myTab .van-tab {
   line-height: 40px;
 }
+.helpPageMask {
+  width: 100%;
+  height: 100%;
+  background: rgba($color: #747474, $alpha: 0.8);
+  position: fixed;
+  z-index: 100000;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 </style>
 <style lang="scss">
 .searchDiv {
@@ -1705,4 +1599,18 @@ export default {
     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>