Browse Source

同城店铺新建流程重构

zhujindu 1 năm trước cách đây
mục cha
commit
da4fff89d8

+ 7 - 2
src/views/storeManagement/index.vue

@@ -87,7 +87,7 @@
                   >临</span
                 >
                 <!-- "approvalStatus": 1:已结案;0:未结案, -->
-                <!-- "processApprovalStatus": "1"  审批状态(0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝) -->
+                <!-- "processApprovalStatus": 审批状态(0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝) -->
                 <template v-if="item.approvalStatus == 0 && item.validFlag == 0">
                   <span class="statusIcon submit" v-if="item.processApprovalStatus == 1"
                     >已提交</span
@@ -400,7 +400,7 @@ export default {
       this.storeDetailFn(id);
     } else {
       this.initSelect();
-      this.tabVal = '1';
+      this.tabVal = localStorage.getItem('tabVal') || '1';
       if (localStorage.getItem('postType') == 'JZ' || localStorage.getItem('postType') == 'GZ') {
         this.mapShows = false;
       } else {
@@ -433,6 +433,7 @@ export default {
       this.dropdownOpen();
     },
     linkList(val) {
+      localStorage.setItem('tabVal', this.tabVal);
       this.$router.push({
         path: '/pItem',
         query: { id: val.storeCode, detilId: 'a' },
@@ -559,6 +560,7 @@ export default {
                     buryingPointPosition: '进入地图',
                   });
                   if (that.tabVal == 1) {
+                    localStorage.setItem('tabVal', this.tabVal);
                     that.$router.push({
                       path: '/rangeStore',
                       query: {
@@ -568,6 +570,7 @@ export default {
                       },
                     });
                   } else {
+                    localStorage.setItem('tabVal', this.tabVal);
                     that.$router.push({
                       path: '/rangeStore',
                       query: {
@@ -828,6 +831,7 @@ export default {
       });
     },
     storeDetailFn(id) {
+      localStorage.setItem('tabVal', this.tabVal);
       this.$router.push({
         path: '/storeDetail',
         query: { id: id },
@@ -837,6 +841,7 @@ export default {
       this.$router.push('/storeAdd');
     },
     onClickLeft() {
+      localStorage.setItem('tabVal', '1');
       this.$router.push('/My/index');
     },
     onSearch() {

+ 29 - 9
src/views/storeManagement/storeDetail.vue

@@ -42,7 +42,9 @@
       <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] && list.approvalStatus == 0">
+          <div
+            class="rejectMsg"
+            v-if="rejectMsg[0] && list.approvalStatus == 0 && this.cityABStore">
             <span class="label">退回原因</span>
             <span class="value">{{ rejectMsg[0].approvalDesc }}</span>
             <span class="examineDetail" @click="examineDetail">查看详情</span>
@@ -217,7 +219,10 @@
                 :type="1"></upload-img>
             </van-col>
           </van-row>
-          <van-collapse v-model="activeNames" class="orderList">
+          <van-collapse
+            v-model="activeNames"
+            class="orderList"
+            v-if="list.approvalStatus == 0 && this.cityABStore">
             <van-collapse-item title="门店下单记录" name="1">
               <div class="orderItem" v-for="(item, index) in orderList" :key="index">
                 <div class="orderTitle">
@@ -317,7 +322,7 @@
             ">
             <!-- 未结案并且未提交的同城店铺,拜访时显示 撤销建店 -->
             <!-- 未结案并且已提交的同城店铺,拜访时不显示 撤销建店和无效关店 -->
-            <template v-if="list.processApprovalStatus == 0">
+            <template v-if="list.processApprovalStatus == 0 && this.cityABStore">
               <van-col span="12" v-if="list.processApprovalStatus == 0">
                 <van-button round type="default" style="width: 100%" @click="valid"
                   >撤销建店</van-button
@@ -335,7 +340,10 @@
         <van-row
           gutter="20"
           v-else-if="
-            this.list.approvalStatus == 0 && list.processApprovalStatus == 0 && list.updatable
+            this.list.approvalStatus == 0 &&
+            list.processApprovalStatus == 0 &&
+            list.updatable &&
+            this.cityABStore
           ">
           <van-col span="12">
             <van-button round type="default" style="width: 100%" @click="valid"
@@ -353,10 +361,6 @@
           </van-col>
         </van-row>
       </div>
-      <!-- <div class="bottomBtn" v-else>
-        <van-button color="red" round @click="valid"></van-button>
-        <van-button type="primary" round @click="submitApprovalFun">提交审核</van-button>
-      </div> -->
       <van-dialog
         v-model="showDialog"
         title="系统提示"
@@ -562,6 +566,7 @@ export default {
       rejectMsg: [],
       activeNames: [],
       orderList: [],
+      cityABStore: false, //同城分销A/B店
     };
   },
   activated() {
@@ -1216,6 +1221,11 @@ export default {
             this.lon = res.data.lon;
           }
           this.list = res.data;
+          if (this.list.storeCategory == '129081' || this.list.storeCategory == '10131') {
+            this.cityABStore = true;
+          } else {
+            this.cityABStore = false;
+          }
           if (
             res.data.province != null &&
             res.data.province != undefined &&
@@ -1318,7 +1328,7 @@ export default {
               console.log(err);
             });
           // 同城店铺 未结案时获取
-          if (this.list.approvalStatus == 0) {
+          if (this.list.approvalStatus == 0 && this.cityABStore) {
             // 获取门店订单
             this.getStoreOrderList(this.list.storeCode);
             // 获取审批历史
@@ -1520,6 +1530,16 @@ export default {
     },
     // 新建同城店铺提交审核
     submitApprovalFun() {
+      if (this.list.storeCategory !== '129081' && this.list.storeCategory !== '10131') {
+        this.$dialog
+          .confirm({
+            title: '系统提示',
+            message: '门店类型,请选择同城分销A/B店',
+            showCancelButton: false,
+          })
+          .then(() => {});
+        return;
+      }
       if (!this.orderList.length) {
         this.$notify({ type: 'warning', message: '门店没有订单,无法提交审批' });
         return;