Procházet zdrojové kódy

Merge branch 'feature_20250624_设计师招募' into release

zhujindu před 5 měsíci
rodič
revize
4d6ad0033b

+ 34 - 38
src/views/storeManagement/addDesignerEdit.vue

@@ -42,30 +42,28 @@
           </template>
         </van-field>
         <van-row style="border-bottom: 1px solid #ebedf0">
-          <van-col span="20">
-            <van-field
-              rows="1"
-              autosize
-              type="textarea"
-              readonly
-              clickable
-              name="picker"
-              :value="fromData.chainName"
-              label="经销商名称"
-              placeholder="点击选择经销商名称"
-              @click="showPickerChainsList = true"
-              :rules="[
-                {
-                  required: true,
-                  message: '请选择经销商',
-                },
-              ]">
-              <template #left-icon>
-                <span class="van-f-red">*</span>
-              </template>
-            </van-field>
-          </van-col>
-          <van-col span="4">
+          <van-field
+            rows="1"
+            autosize
+            type="textarea"
+            readonly
+            clickable
+            name="picker"
+            :value="fromData.chainName"
+            label="经销商名称"
+            placeholder="点击选择经销商名称"
+            @click="moreTypeShowfn"
+            :rules="[
+              {
+                required: true,
+                message: '请选择经销商',
+              },
+            ]">
+            <template #left-icon>
+              <span class="van-f-red">*</span>
+            </template>
+          </van-field>
+          <!-- <van-col span="4">
             <van-button
               size="small"
               type="info"
@@ -74,7 +72,7 @@
               @click="moreTypeShowfn">
               <van-icon name="list-switching" />更多
             </van-button>
-          </van-col>
+          </van-col> -->
         </van-row>
         <van-field
           readonly
@@ -218,7 +216,7 @@
         <van-col
           span="4"
           style="text-align: center; line-height: 48px"
-          @click="getDesignerChainsInfo('search')">
+          @click="getDesignerChainsInfo">
           <div style="background-color: #0057ba; color: #fff">搜索</div></van-col
         >
       </van-row>
@@ -395,7 +393,7 @@ export default {
     // 获取会员属性
     this.getStoreCategoryList();
     // 获取经销商
-    this.getDesignerChainsInfo();
+    // this.getDesignerChainsInfo();
   },
   methods: {
     getDetail() {
@@ -468,8 +466,9 @@ export default {
         });
     },
     moreTypeShowfn() {
-      this.chainsData = [];
-      this.moreTypeShow = true;
+      this.searchChainName = '';
+      // 获取经销商
+      this.getDesignerChainsInfo();
     },
     // // 搜索经销商列表
     // getChainsByDeptCodesearch(chainName) {
@@ -513,17 +512,14 @@ export default {
         }
       });
     },
-    getDesignerChainsInfo(type) {
-      this.ChainsList = [];
+    getDesignerChainsInfo() {
+      this.toastLoading(0, '加载中...', true);
       this.chainsData = [];
-      let chainName = type == 'search' ? this.searchChainName : '';
-      designerChainsInfo({ chainName: chainName }).then((res) => {
+      designerChainsInfo({ chainName: this.searchChainName }).then((res) => {
+        this.toastLoading().clear();
         if (res.code == 200) {
-          if (type == 'search') {
-            this.chainsData = res.data;
-          } else {
-            this.ChainsList = res.data;
-          }
+          this.moreTypeShow = true;
+          this.chainsData = res.data;
         }
       });
     },

+ 34 - 38
src/views/storeManagement/addDesignerPage.vue

@@ -42,30 +42,28 @@
           </template>
         </van-field>
         <van-row style="border-bottom: 1px solid #ebedf0">
-          <van-col span="20">
-            <van-field
-              rows="1"
-              autosize
-              type="textarea"
-              readonly
-              clickable
-              name="picker"
-              :value="fromData.chainName"
-              label="经销商名称"
-              placeholder="点击选择经销商名称"
-              @click="showPickerChainsList = true"
-              :rules="[
-                {
-                  required: true,
-                  message: '请选择经销商',
-                },
-              ]">
-              <template #left-icon>
-                <span class="van-f-red">*</span>
-              </template>
-            </van-field>
-          </van-col>
-          <van-col span="4">
+          <van-field
+            rows="1"
+            autosize
+            type="textarea"
+            readonly
+            clickable
+            name="picker"
+            :value="fromData.chainName"
+            label="经销商名称"
+            placeholder="点击选择经销商名称"
+            @click="moreTypeShowfn"
+            :rules="[
+              {
+                required: true,
+                message: '请选择经销商',
+              },
+            ]">
+            <template #left-icon>
+              <span class="van-f-red">*</span>
+            </template>
+          </van-field>
+          <!-- <van-col span="4">
             <van-button
               size="small"
               type="info"
@@ -74,7 +72,7 @@
               @click="moreTypeShowfn">
               <van-icon name="list-switching" />更多
             </van-button>
-          </van-col>
+          </van-col> -->
         </van-row>
         <van-field
           readonly
@@ -221,7 +219,7 @@
         <van-col
           span="4"
           style="text-align: center; line-height: 48px"
-          @click="getDesignerChainsInfo('search')">
+          @click="getDesignerChainsInfo">
           <div style="background-color: #0057ba; color: #fff">搜索</div></van-col
         >
       </van-row>
@@ -411,7 +409,7 @@ export default {
     // 获取会员属性
     this.getStoreCategoryList();
     // 获取经销商
-    this.getDesignerChainsInfo();
+    // this.getDesignerChainsInfo();
   },
   methods: {
     getLocation() {
@@ -470,8 +468,9 @@ export default {
         });
     },
     moreTypeShowfn() {
-      this.chainsData = [];
-      this.moreTypeShow = true;
+      this.searchChainName = '';
+      // 获取经销商
+      this.getDesignerChainsInfo();
     },
     // // 搜索经销商列表
     // getChainsByDeptCodesearch(chainName) {
@@ -515,17 +514,14 @@ export default {
         }
       });
     },
-    getDesignerChainsInfo(type) {
-      this.ChainsList = [];
+    getDesignerChainsInfo() {
+      this.toastLoading(0, '加载中...', true);
       this.chainsData = [];
-      let chainName = type == 'search' ? this.searchChainName : '';
-      designerChainsInfo({ chainName: chainName }).then((res) => {
+      designerChainsInfo({ chainName: this.searchChainName }).then((res) => {
+        this.toastLoading().clear();
         if (res.code == 200) {
-          if (type == 'search') {
-            this.chainsData = res.data;
-          } else {
-            this.ChainsList = res.data;
-          }
+          this.moreTypeShow = true;
+          this.chainsData = res.data;
         }
       });
     },