Browse Source

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into deploy

lilei 4 years ago
parent
commit
50d107c84c

+ 25 - 13
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>
@@ -62,6 +62,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
+        :defaultLoadData="false"
         bordered>
       </s-table>
       <!-- 按钮 -->
@@ -139,11 +140,17 @@ export default {
   methods: {
     //  重置
     resetSearchForm () {
+      this.resetData()
+      this.$refs.table.refresh(true)
+    },
+    resetData () {
+      console.log('重置艾迪康')
       this.queryParam.dealerName = ''
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
-      this.$refs.table.refresh(true)
+      this.addrCityList = []
+      this.addrDistrictList = []
     },
     //  确定
     handleSubmit () {
@@ -173,28 +180,28 @@ export default {
       this.getArea('district', val)
     },
     //  省/市/区
-    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 = []
           }
         }
@@ -210,11 +217,16 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.resetData()
       } else {
         this.selectedRowKeys = this.chooseCust
         if (this.addrProvinceList.length == 0) {
           this.getArea('province')
         }
+        const _this = this
+        setTimeout(() => {
+          _this.$refs.table.refresh(true)
+        }, 200)
       }
     }
   }

+ 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>