Browse Source

bug修复

chenrui 4 years ago
parent
commit
71ccc16ae1

+ 30 - 12
src/views/common/chooseCustomerModal.vue

@@ -36,8 +36,8 @@
                     </a-form-item>
                   </a-col>
                   <a-col span="7" offset="1">
-                    <a-form-item prop="countySn" style="margin: 0;">
-                      <a-select v-model="queryParam.countySn" placeholder="请选择区/县">
+                    <a-form-item prop="districtSn" style="margin: 0;">
+                      <a-select v-model="queryParam.districtSn" placeholder="请选择区/县">
                         <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
                       </a-select>
                     </a-form-item>
@@ -160,41 +160,59 @@ export default {
     },
     // 获取城市列表
     getCityList (val) {
+      // const index = this.addrProvinceList.findIndex(item => item.areaSn == val)
+      // if (index >= 0) {
+      //   this.form.provinceName = this.addrProvinceList[index].name
+      // }
       this.addrCityList = []
       this.addrDistrictList = []
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
+      // this.queryParam.address = ''
       this.getArea('city', val)
     },
     // 获取区县列表
     getAreaList (val) {
+      // const index = this.addrCityList.findIndex(item => item.areaSn == val)
+      // if (index >= 0) {
+      //   this.form.cityName = this.addrCityList[index].name
+      // }
       this.addrDistrictList = []
       this.queryParam.districtSn = undefined
+      // this.queryParam.address = ''
       this.getArea('district', val)
     },
+    // 区县变更
+    areaCharged (val) {
+      // const index = this.addrDistrictList.findIndex(item => item.areaSn == val)
+      // if (index >= 0) {
+      //   this.form.districtName = this.addrDistrictList[index].name
+      // }
+      // this.queryParam.address = ''
+    },
     //  省/市/区
-    getArea (type, sn) {
+    getArea (leve, sn) {
       let params
-      if (type == 'province') {
-        params = { level: '1' }
+      if (leve == 'province') {
+        params = { type: '2' }
       } else {
-        params = { psn: sn }
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
       }
       getArea(params).then(res => {
         if (res.status == 200) {
-          if (type == 'province') {
+          if (leve == 'province') {
             this.addrProvinceList = res.data || []
-          } else if (type == 'city') {
+          } else if (leve == 'city') {
             this.addrCityList = res.data || []
-          } else if (type == 'district') {
+          } else if (leve == 'district') {
             this.addrDistrictList = res.data || []
           }
         } else {
-          if (type == 'province') {
+          if (leve == 'province') {
             this.addrProvinceList = []
-          } else if (type == 'city') {
+          } else if (leve == 'city') {
             this.addrCityList = []
-          } else if (type == 'district') {
+          } else if (leve == 'district') {
             this.addrDistrictList = []
           }
         }

+ 1 - 0
src/views/promotionRulesManagement/promotionRules/detail.vue

@@ -74,6 +74,7 @@
         :columns="nowColumns"
         :data-source="lookLoadData"
         :pagination="false"
+        :scroll="{ y: 500 }"
         bordered>
         <!-- 序号 -->
         <template slot="no" slot-scope="text, record, index">{{ index+1 }}</template>

+ 0 - 7
src/views/promotionRulesManagement/promotionRules/editRuleModal.vue

@@ -55,11 +55,9 @@
         </a-form-model-item>
         <a-form-model-item label="正价产品" prop="normalGoodsList">
           <a-button id="promotionRules-rule-normalGoodsList" type="primary" class="button-success" @click="chooseProduct('normal')">选择</a-button>
-          <span style="font-weight: bold;margin-left: 30px;">当前已选:{{ normalGoodsList.length }}个</span>
         </a-form-model-item>
         <a-form-model-item label="促销品" prop="promoGoodsList">
           <a-button id="promotionRules-rule-promoGoodsList" type="primary" class="button-success" @click="chooseProduct('promo')">选择</a-button>
-          <span style="font-weight: bold;margin-left: 30px;">当前已选:{{ promoGoodsList.length }}个</span>
         </a-form-model-item>
       </div>
       <!-- 买产品送采购额 -->
@@ -120,18 +118,15 @@
         </a-form-model-item>
         <a-form-model-item label="正价产品" prop="normalGoodsList">
           <a-button id="promotionRules-rule-normalGoodsList" type="primary" class="button-success" @click="chooseProduct('normal')">选择</a-button>
-          <span style="font-weight: bold;margin-left: 30px;">当前已选:{{ normalGoodsList.length }}个</span>
         </a-form-model-item>
         <a-form-model-item label="促销品" prop="promoGoodsList">
           <a-button id="promotionRules-rule-promoGoodsList" type="primary" class="button-success" @click="chooseProduct('promo')">选择</a-button>
-          <span style="font-weight: bold;margin-left: 30px;">当前已选:{{ promoGoodsList.length }}个</span>
         </a-form-model-item>
       </div>
       <!-- 特价产品销售 -->
       <div v-if="form.promoRuleType == 'PROMO_PROD'">
         <a-form-model-item label="特价产品" prop="promoGoodsList">
           <a-button id="promotionRules-rule-promoGoodsList" type="primary" class="button-success" @click="chooseProduct('promo')">选择</a-button>
-          <span style="font-weight: bold;margin-left: 30px;">当前已选:{{ promoGoodsList.length }}个</span>
         </a-form-model-item>
       </div>
       <!-- 加价换购 -->
@@ -150,11 +145,9 @@
         </a-form-model-item>
         <a-form-model-item label="正价产品" prop="normalGoodsList">
           <a-button id="promotionRules-rule-normalGoodsList" type="primary" class="button-success" @click="chooseProduct('normal')">选择</a-button>
-          <span style="font-weight: bold;margin-left: 30px;">当前已选:{{ normalGoodsList.length }}个</span>
         </a-form-model-item>
         <a-form-model-item label="换购产品" prop="promoGoodsList">
           <a-button id="promotionRules-rule-promoGoodsList" type="primary" class="button-success" @click="chooseProduct('promo')">选择</a-button>
-          <span style="font-weight: bold;margin-left: 30px;">当前已选:{{ promoGoodsList.length }}个</span>
         </a-form-model-item>
       </div>
     </a-form-model>