Browse Source

商户入驻

caiyuqin 4 tháng trước cách đây
mục cha
commit
30524a9b39

+ 1 - 1
pages/login/settled.vue

@@ -233,7 +233,7 @@
 						</view>
 					</view>
 					<view class="business-img flex align-center">
-						<Upload  width="360" height="218" :maxCount="1" :fileList.sync="item.specialArr" :previewFullImage="false" delIcon='trash' :showProgress='false'
+						<Upload  width="360" height="218" :maxCount="1" :fileList.sync="item.specialArr"  delIcon='trash' :showProgress='false'
 							:isImage='true' @complete="onUpload($event, item)" @loadIng='loadIng'>
 							 <image class='img' :src="item.special ? item.special : '/static/login/shiping.png'" mode=""></image>
 						</Upload>

+ 3 - 0
pages/store/components/tipModal.vue

@@ -48,6 +48,9 @@ export default {
     },
     sure() {
       this.$emit('sure', this.value)
+    },
+    setValue(val) {
+      this.value = val
     }
   }
 };

+ 76 - 25
pages/store/newSettings.vue

@@ -1,7 +1,7 @@
 <template>
   <view>
     <view class="top"></view>
-    <u-navbar title="店铺设置" :autoBack="true" :placeholder="true"></u-navbar>
+    <u-navbar title="店铺设置" :autoBack="false" :placeholder="true" @click='goPage'></u-navbar>
     <view class='pub-box'>
       <view class='title-box'>
         <view class='title'>开票信息</view>
@@ -13,7 +13,7 @@
           <view class="type" v-if='item.status'>{{item.status}}</view>
         </view>
         <view class="u-flex u-flex-1 u-row-right">
-          <view class='item-p one-line-text' :class='{active:item.isHas}'>{{item.content}}</view>
+          <view class='item-p one-line-text' :class='item.class'>{{item.content}}</view>
           <u-icon v-if='item.isMore' class="icon" name="arrow-right"></u-icon>
           <view v-else class="pls"></view>
         </view>
@@ -29,7 +29,7 @@
           <view>设施服务</view>
         </view>
         <view class="u-flex">
-          <view class='item-p'>{{indexOption.content?'已配置':'去配置'}}</view>
+          <view :class="indexOption.content?'active':'item-p'">{{indexOption.content?'已配置':'去配置'}}</view>
           <u-icon class="icon" name="arrow-right"></u-icon>
         </view>
       </view>
@@ -45,7 +45,7 @@
 
         </view>
         <view class="u-flex">
-          <view class='item-p'>已配置</view>
+          <view class="active">已配置</view>
           <u-icon class="icon" name="arrow-right"></u-icon>
         </view>
       </view>
@@ -55,14 +55,14 @@
           <view class="type">{{filterType(shopStatus.status)}}</view>
         </view>
         <view class="u-flex">
-          <view class='item-p'>已配置</view>
+          <view class="active">已配置</view>
           <u-icon class="icon" name="arrow-right"></u-icon>
         </view>
       </view>
     </view>
 
     <!-- 店铺名称 -->
-    <TipModal :isShow="modalShow" title='店铺名称' @close='modalShow=false' @sure='sure'></TipModal>
+    <TipModal :isShow="modalShow" title='店铺名称' @close='modalShow=false' @sure='storeSure' ref='storeRef'></TipModal>
     <!-- 开业时间 -->
     <u-picker v-model="timeShow" mode="time" @confirm="selectTime" title='开业时间'></u-picker>
     <!-- 门店电话 -->
@@ -130,10 +130,10 @@ export default {
       selectedTags: [], // 用于存储被选中的标签索引
       selectedBus: [], // 用于存储被选中的标签索引
       shopStatus: {
-        status:null
+        status: null
       }, //经营资质审核状态
       nameStatus: {
-        status:null
+        status: null
       }, //门店名称审核状态
       renovationStatus: "", //装修审核状态
       typeArr: [{
@@ -166,60 +166,59 @@ export default {
       return [
         {
           title: '店铺logo',
-          content: '去配置',
+          content: data.logo || '去配置',
+          class: `${data.logo ? 'active' : 'item-p'}`,
           status: false, //是否有状态
           isMore: true, //是否显示更多 
-          isHas: true,  //是否配置了
           type: 1
         },
         {
           title: '门店名称',
           content: data.storeName || '去配置',
           status: this.filterType(this.nameStatus.status),
+          class: `${data.storeName ? 'active' : 'item-p'}`,
           isMore: true,
-          isHas: false,
           type: 2
         },
         {
           title: '营业状态',
           content: this.filterStatus(data.merchantStatus) || '去配置',
+          class: `${data.merchantStatus ? 'active' : 'item-p'}`,
           isMore: true,
-          isHas: true,
           type: 3
         },
         {
           title: '营业时间',
           content: ` ${!data.contentStatus ? "去配置" : '已配置'} `,
+          class: `${data.contentStatus ? 'active' : 'item-p'}`,
           isMore: true,
-          isHas: true,
           type: 4
         },
         // {
         //   title: '开业时间',
         //   content: data.openingTime || '去配置',
         //   isMore: true,
-        //   isHas: true,
         //   type: 5
         // },
         {
           title: '门店分类',
           content: data.qualificationList && data.qualificationList[0].categoryName,
+          class: `${data.qualificationList && data.qualificationList[0].categoryName ? 'active' : 'item-p'}`,
           isMore: false,
-          isHas: true,
           type: 6
         },
         {
           title: '门店电话',
           content: data.storePhone || '去配置',
+          class: `${data.storePhone ? 'active' : 'item-p'}`,
           isMore: true,
-          isHas: true,
           type: 7
         },
         {
           title: '门店地址',
           content: data.address || '去配置',
+          class: `${data.address ? 'active' : 'item-p'}`,
           isMore: true,
-          isHas: true,
           type: 8
         }
       ]
@@ -247,10 +246,16 @@ export default {
         })
       }
       else if (item.type == 2) {
-        // this.modalShow = true
-        uni.navigateTo({
-          url: `/pages/store/storeInfo?params=${queryString}`
-        })
+        if (this.nameStatus.status == 2 || this.nameStatus.status == 0) {
+          uni.navigateTo({
+            url: `/pages/store/storeInfo?params=${queryString}`
+          })
+        } else {
+          this.modalShow = true
+          this.$nextTick(() => {
+            this.$refs.storeRef.setValue(this.indexOption.storeName)
+          })
+        }
       } else if (item.type == 3) {
         if (this.renovationStatus == 1 && this.indexOption.localMerchantInfoExamine.status == 1) {
           this.selectedBus = this.businessShowList.filter((e => e.value == this.indexOption.merchantStatus))
@@ -285,8 +290,49 @@ export default {
         });
       }
     },
-    sure() {
-      this.modalShow = false
+    //店铺名称修改
+    storeSure(newName) {
+      this.checkInit(newName)
+    },
+    //去重检查
+    async checkInit(newName) {
+      let params = {
+        country: this.indexOption.country,
+        storeName: this.indexOption.storeName,
+        id: this.indexOption.merchantId
+      }
+      let res = await this.$http.get('/merchant/register/checkDuplicate', {
+        params: params
+      })
+      if (res.data.success) {
+        this.settleInit(newName)
+      } else {
+        uni.showToast({ icon: 'none', title: res.data.message })
+      }
+    },
+    settleInit(newName) {
+      const params = {
+        afterValue: this.indexOption.storeName,
+        beforeValue: newName,
+        merchantId: this.indexOption.merchantId,
+        status: 0,
+        type: 0 //0门店名称 1经营资质
+      }
+
+      this.$http.post('/localMerchantInfoChangeExamine/localMerchantInfoChangeExamine/add', params).then(res => {
+        if (res.data.success) {
+          uni.showToast({
+            icon: 'none',
+            title: '提交成功'
+          })
+          this.modalShow = false
+        } else {
+          uni.showToast({
+            icon: 'none',
+            title: res.data.message
+          })
+        }
+      })
     },
     //门店电话修改
     async phoneSure(val) {
@@ -324,7 +370,7 @@ export default {
     },
     //0:待审核,1:通过,2:驳回
     filterType(type) {
-      if (this.typeArr && type != undefined && type!=null) {
+      if (this.typeArr && type != undefined && type != null) {
         return this.typeArr.find(item => item.type == type).name;
       }
 
@@ -340,7 +386,7 @@ export default {
       if (type == 1) {
         this.shopStatus = res.data.result || { status: null }  //0:待审核,1:通过,2:驳回
       } else {
-        this.nameStatus = res.data.result || { status: null } 
+        this.nameStatus = res.data.result || { status: null }
       }
     },
     //装修
@@ -376,6 +422,11 @@ export default {
         }
       })
     },
+    goPage() {
+      uni.switchTab({
+        url: '/pages/index/index'
+      })
+    }
   }
 }
 </script>

+ 18 - 8
pages/store/shopQualifications.vue

@@ -5,13 +5,10 @@
     <view class="pub-box">
       <view class="flex justify-between">
         <!-- (0:待审核,1:通过,2:驳回) -->
-        <view class="status" v-show='infoObj.localMerchantInfoExamine.status==2'>
-          <image src="/static/login/status3.png" mode="aspectFit"></image>
-          <text class='red'>审核驳回</text>
-        </view>
-        <view class="status" v-show='infoObj.localMerchantInfoExamine.status==0'>
-          <image src="/static/login/status1.png" mode="aspectFit"></image>
-          <text class='blue'>待审核</text>
+        <view class="status">
+          <image :src="statusMap[infoObj.localMerchantInfoExamine.status].icon" mode="aspectFit"></image>
+          <text
+            :class="statusMap[infoObj.localMerchantInfoExamine.status].class">{{ statusMap[infoObj.localMerchantInfoExamine.status].text }}</text>
         </view>
       </view>
       <view class="des" v-show='infoObj.localMerchantInfoExamine.status==2'>
@@ -20,7 +17,9 @@
       <view class="des" v-show='infoObj.localMerchantInfoExamine.status==0'>
         提交的经营资质信息待审核中
       </view>
-
+      <view class="des" v-show='infoObj.localMerchantInfoExamine.status==1'>
+        {{infoObj.localMerchantInfoExamine.updateTime}} 提交的信息审核通过
+      </view>
     </view>
 
     <view class="pub-box pub-info-box" v-show="!index">
@@ -160,6 +159,13 @@ export default {
         },
       ]
     },
+    statusMap() {
+      return {
+        0: { icon: '/static/login/status1.png', class: 'blue', text: '待审核' },
+        1: { icon: '/static/login/status2.png', class: 'green', text: '审核通过' },
+        2: { icon: '/static/login/status3.png', class: 'red', text: '审核驳回' }
+      };
+    }
   },
   methods: {
     onUpload() { },
@@ -286,6 +292,10 @@ export default {
     color: #596abb;
     font-weight: 500;
   }
+  .green {
+    color: green;
+    font-weight: 500;
+  }
   .title-box {
     position: relative;
     display: inline-block;

+ 46 - 11
pages/store/storeInfo.vue

@@ -5,13 +5,10 @@
     <view class="pub-box">
       <view class="flex justify-between">
         <!-- //0:待审核,1:通过,2:驳回 -->
-        <view class="status" v-if='infoObj.nameStatus.status==2'>
-          <image src="/static/login/status3.png" mode="aspectFit"></image>
-          <text class='red'>审核驳回</text>
-        </view>
-        <view class="status" v-if='infoObj.nameStatus.status==0'>
-          <image src="/static/login/status1.png" mode="aspectFit"></image>
-          <text class='blue'>待审核</text>
+        <view class="status">
+          <image :src="statusMap[infoObj.nameStatus.status].icon" mode="aspectFit"></image>
+          <text
+            :class="statusMap[infoObj.nameStatus.status].class">{{ statusMap[infoObj.nameStatus.status].text }}</text>
         </view>
       </view>
       <view class="des" v-if='infoObj.nameStatus.status==2'>
@@ -20,17 +17,22 @@
       <view class="des" v-if='infoObj.nameStatus.status==0'>
         提交的信息待审核中
       </view>
+      <view class="des" v-if='infoObj.nameStatus.status==1'>
+        {{infoObj.nameStatus.updateTime}} 提交的信息审核通过
+      </view>
 
     </view>
 
     <view class="pub-box u-flex u-row-between">
       <view class="title">门店名称</view>
-      <u-input v-model="value" type="text" :border="false" :clearable="false" inputAlign='right' placeholder='请输入' />
+      <u-input v-model="value" type="text" :border="false" :clearable="false" inputAlign='right' placeholder='请输入'
+        :disabled="infoObj.nameStatus.status==0 || infoObj.nameStatus.status==1" />
     </view>
 
     <view class="u-flex btn-box sub-bottom">
       <button class="cu-btn round line-gray  shadow " @click.native='goPage'>返回</button>
-      <button class="cu-btn bg-blue-gra round u-flex-1 " @click='submit' v-if='infoObj.nameStatus.status || infoObj.nameStatus.status==null'>提交审核</button>
+      <button class="cu-btn bg-blue-gra round u-flex-1 " @click='submit'
+        v-if='infoObj.nameStatus.status || infoObj.nameStatus.status==null'>提交审核</button>
     </view>
   </view>
 
@@ -49,7 +51,17 @@ export default {
   onLoad(Option) {
     let data = JSON.parse(decodeURIComponent(Option.params));
     this.infoObj = data
-    console.log( this.infoObj)
+    this.value = data.storeName
+    console.log(this.infoObj)
+  },
+  computed: {
+    statusMap() {
+      return {
+        0: { icon: '/static/login/status1.png', class: 'blue', text: '待审核' },
+        1: { icon: '/static/login/status2.png', class: 'green', text: '审核通过' },
+        2: { icon: '/static/login/status3.png', class: 'red', text: '审核驳回' }
+      };
+    }
   },
   methods: {
     goPage() {
@@ -58,6 +70,26 @@ export default {
       });
     },
     submit() {
+      this.checkInit()
+
+    },
+    //去重检查
+    async checkInit(newName) {
+      let params = {
+        country: this.infoObj.country,
+        storeName: this.infoObj.storeName,
+        id: this.infoObj.merchantId
+      }
+      let res = await this.$http.get('/merchant/register/checkDuplicate', {
+        params: params
+      })
+      if (res.data.success) {
+        this.settleInit(newName)
+      } else {
+        uni.showToast({ icon: 'none', title: res.data.message })
+      }
+    },
+    settleInit() {
       const params = {
         afterValue: this.infoObj.storeName,
         beforeValue: this.value,
@@ -134,6 +166,10 @@ export default {
     color: #596abb;
     font-weight: 500;
   }
+  .green {
+    color: green;
+    font-weight: 500;
+  }
 }
 .sub-bottom {
   position: fixed;
@@ -160,7 +196,6 @@ export default {
     margin-right: 24rpx;
     border: 1rpx solid #ccc;
   }
- 
 }
 ::v-deep.cu-btn[class*="line"]::after {
   border: none;

+ 25 - 10
pages/store/storeQualification.vue

@@ -5,13 +5,10 @@
     <view class="pub-box">
       <view class="flex justify-between">
         <!-- //0:待审核,1:通过,2:驳回 -->
-        <view class="status" v-if='infoObj.shopStatus.status==2'>
-          <image src="/static/login/status3.png" mode="aspectFit"></image>
-          <text class='red'>审核驳回</text>
-        </view>
-        <view class="status" v-if='infoObj.shopStatus.status==0'>
-          <image src="/static/login/status1.png" mode="aspectFit"></image>
-          <text class='blue'>待审核</text>
+        <view class="status">
+          <image :src="statusMap[infoObj.shopStatus.status].icon" mode="aspectFit"></image>
+          <text
+            :class="statusMap[infoObj.shopStatus.status].class">{{ statusMap[infoObj.shopStatus.status].text }}</text>
         </view>
       </view>
       <view class="des" v-if='infoObj.shopStatus.status==2'>
@@ -20,7 +17,9 @@
       <view class="des" v-if='infoObj.shopStatus.status==0'>
         提交的经营资质信息待审核中
       </view>
-
+      <view class="des" v-if='infoObj.shopStatus.status==1'>
+        {{infoObj.shopStatus.updateTime}} 提交的店铺信息审核通过
+      </view>
     </view>
 
     <view class="pub-box" v-for='(item,index) in dynamicList' :key='index'>
@@ -29,8 +28,11 @@
         <i class="text-bg-w "></i>
       </view>
       <view class="business-img flex align-center">
-        <Upload width="332" height="190" :maxCount="1" :fileList.sync="item.specialArr" :previewFullImage="false"
-          delIcon='trash' :isImage='true' @complete="onUpload($event, item)" @loadIng='loadIng'>
+        <image class='img' v-if='infoObj.shopStatus.status==2 || infoObj.shopStatus.status==0'
+          :src="item.special ? item.special : '/static/login/shiping.png'" mode="">
+        </image>
+        <Upload v-else width="332" height="190" :maxCount="1" :fileList.sync="item.specialArr" delIcon='trash'
+          :isImage='true' @complete="onUpload($event, item)" @loadIng='loadIng'>
           <image class='img' :src="item.special ? item.special : '/static/login/shiping.png'" mode="">
           </image>
         </Upload>
@@ -63,6 +65,15 @@ export default {
   },
   onReady() {
   },
+  computed: {
+    statusMap() {
+      return {
+        0: { icon: '/static/login/status1.png', class: 'blue', text: '待审核' },
+        1: { icon: '/static/login/status2.png', class: 'green', text: '审核通过' },
+        2: { icon: '/static/login/status3.png', class: 'red', text: '审核驳回' }
+      };
+    }
+  },
   onLoad(Option) {
     let data = JSON.parse(decodeURIComponent(Option.params));
     this.infoObj = data
@@ -201,6 +212,10 @@ export default {
     color: #596abb;
     font-weight: 500;
   }
+  .green {
+    color: green;
+    font-weight: 500;
+  }
   .title-box {
     position: relative;
     display: inline-block;

+ 1 - 1
pages/store/tdtuMap.vue

@@ -189,7 +189,7 @@
 						document.body.removeChild(measureDiv);
 
 						// 计算偏移量:水平居中,垂直向上偏移(文字框高度的一半 + 标记高度的一半 + 间距)
-						const offsetX = -textWidth / 2;  // 水平居中:文字框中心对准标记中心
+						const offsetX = -textWidth / 2 -6;  // 水平居中:文字框中心对准标记中心
 						const offsetY = -textHeight - 7; // 向上偏移:文字框高度 + 7px 间距