Browse Source

重复门店经销商维护

zhujindu 9 months ago
parent
commit
bd6b144389

+ 1 - 1
src/views/storeManagement/chainMaintain.vue

@@ -439,7 +439,7 @@ export default {
       }).then((res) => {
         if (res.code == 200) {
           this.$toast('保存成功');
-          this.$router.replace({ path: '/My' });
+          this.$router.go(-1);
         } else {
           this.$dialog.alert({
             title: '系统提示',

+ 2 - 2
src/views/storeManagement/storeAdd.vue

@@ -1863,8 +1863,8 @@ export default {
               .then(() => {
                 // 重复门店增加经销商
                 this.$router.push({
-                  path: '/chainMaintain',
-                  query: { id: res.data.store.storeId },
+                  path: '/storeDetail',
+                  query: { id: res.data.store.storeId, type: 'chainMaintain' },
                 });
               });
           } else if (res.data.type == 2 || res.data.type == 1) {

+ 37 - 25
src/views/storeManagement/storeDetail.vue

@@ -4,37 +4,42 @@
       <!-- 顶部条 -->
       <van-nav-bar class="navBar" title="客户详情" left-arrow @click-left="onClickLeft">
         <template #right>
-          <!-- updatable 当前操作人是否可以编辑 -->
-          <template v-if="list.updatable">
-            <!-- 未结案状态下 -->
-            <template v-if="list.approvalStatus == 0">
-              <!-- validFlag 正常门店 -->
-              <template v-if="list.validFlag == 0">
-                <!-- 未提交 -->
-                <template v-if="list.processApprovalStatus == 0">
-                  <span style="color: #0057ba" v-if="type != 'address'" @click="editorFn"
-                    >编辑
-                  </span>
-                </template>
-                <!--下首单专用接口,只有在未结案、没有订单调用 -->
-                <!-- <span
+          <template v-if="type == 'chainMaintain'">
+            <span style="color: #0057ba" @click="chainMaintain">维护经销商</span>
+          </template>
+          <template v-else>
+            <!-- updatable 当前操作人是否可以编辑 -->
+            <template v-if="list.updatable">
+              <!-- 未结案状态下 -->
+              <template v-if="list.approvalStatus == 0">
+                <!-- validFlag 正常门店 -->
+                <template v-if="list.validFlag == 0">
+                  <!-- 未提交 -->
+                  <template v-if="list.processApprovalStatus == 0">
+                    <span style="color: #0057ba" v-if="type != 'address'" @click="editorFn"
+                      >编辑
+                    </span>
+                  </template>
+                  <!--下首单专用接口,只有在未结案、没有订单调用 -->
+                  <!-- <span
                   v-if="!orderList.length"
                   style="color: #0057ba; margin-left: 10px"
                   @click="placeOrderFn"
                   >去下单
                 </span> -->
+                </template>
+              </template>
+              <template v-else>
+                <span style="color: #0057ba" v-if="list.validFlag == 2" @click="placeOrderFn"
+                  >去下单
+                </span>
+                <span
+                  style="color: #0057ba"
+                  v-if="list.validFlag != 2 && type != 'address'"
+                  @click="editorFn"
+                  >编辑
+                </span>
               </template>
-            </template>
-            <template v-else>
-              <span style="color: #0057ba" v-if="list.validFlag == 2" @click="placeOrderFn"
-                >去下单
-              </span>
-              <span
-                style="color: #0057ba"
-                v-if="list.validFlag != 2 && type != 'address'"
-                @click="editorFn"
-                >编辑
-              </span>
             </template>
           </template>
         </template>
@@ -1623,6 +1628,13 @@ export default {
         startPosition: index,
       });
     },
+    // 维护经销商
+    chainMaintain() {
+      this.$router.push({
+        path: '/chainMaintain',
+        query: { id: this.$route.query.id },
+      });
+    },
   },
 };
 </script>