lilei il y a 1 an
Parent
commit
016d2d3828

+ 0 - 1
src/views/dealerManagement/rebateBinding/categoryList.vue

@@ -29,7 +29,6 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <ve-table
         border-y
-        v-show="!showEmpty"
         :scroll-width="0"
         :max-height="tableHeight"
         :row-style-option="{clickHighlight: true}"

+ 45 - 84
src/views/dealerManagement/rebateBinding/priceDiffModal.vue

@@ -21,7 +21,7 @@
         >
           <a-form-model-item label="差价归属方" prop="cjgsf">
             <a-row :gutter="10">
-              <a-col :span="22">
+              <a-col :span="17">
                 <a-select
                   v-model="form.cjgsf"
                   placeholder="请选择差价归属方"
@@ -32,41 +32,49 @@
                   <a-select-option v-for="item in cjgsfList" :key="item.code" :value="item.code">{{ item.name }}</a-select-option>
                 </a-select>
               </a-col>
-              <a-col :span="2">
+              <a-col :span="6">
               </a-col>
             </a-row>
           </a-form-model-item>
-          <a-form-model-item label="上级经销商" prop="dealerSn" v-if="form.cjgsf.indexOf('0')>=0">
+          <a-form-model-item label="上级经销商" v-if="form.cjgsf.indexOf('0')>=0">
             <a-row :gutter="10">
-              <a-col :span="22">
+              <a-col :span="13">
                 <custList ref="custList" @change="custChange" placeholder="请输入经销商名称搜索"></custList>
               </a-col>
-              <a-col :span="2">
+              <a-col :span="5">
+                <v-select code="DEALER_GOODS_TYPE" allowClear placeholder="请选择价格类型"></v-select>
+              </a-col>
+              <a-col :span="4" v-if="showPercent||showPercent1">
+                <a-input-number :min="0" :max="100" placeholder="请输入比例"/> %
               </a-col>
             </a-row>
           </a-form-model-item>
-          <!-- <a-form-model-item label="指定经销商" v-if="form.cjgsf.indexOf('1')>=0">
-            <a-row :gutter="10" v-for="(item,index) in chooseDealerList" :key="item.id">
-              <a-col :span="22">
+          <a-form-model-item label="指定经销商" v-if="form.cjgsf.indexOf('1')>=0">
+            <a-row :gutter="10" v-for="(item,index) in zdDealearList" :key="item.id">
+              <a-col :span="13">
                 <custList ref="custList" @change="custChange" placeholder="请输入经销商名称搜索"></custList>
               </a-col>
+              <a-col :span="5">
+                <v-select code="DEALER_GOODS_TYPE" allowClear placeholder="请选择价格类型"></v-select>
+              </a-col>
+              <a-col :span="4" v-if="showPercent||showPercent1">
+                <a-input-number :min="0" :max="100" placeholder="请输入比例"/> %
+              </a-col>
               <a-col :span="2">
-                <a-button @click="addOrDel(item,index)" size="small" shape="circle" :icon="index==chooseDealerList.length-1?'plus':'minus'" style="margin-left: 10px;" />
+                <a-button @click="addOrDel(item,index)" size="small" shape="circle" :icon="index==zdDealearList.length-1?'plus':'minus'" style="margin-left: 10px;" />
               </a-col>
             </a-row>
-          </a-form-model-item> -->
-          <a-form-model-item label="指定经销商" prop="dealerScope" v-if="form.cjgsf.indexOf('1')>=0">
-            <a-row :gutter="15">
-              <a-col :md="24" :sm="24">
-                <a-button type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
-                <span style="margin-left:10px;">已{{ chooseDealerList.length }}选项</span>
+          </a-form-model-item>
+          <a-form-model-item label="箭冠总公司" v-if="form.cjgsf.indexOf('2')>=0">
+            <a-row :gutter="10">
+              <a-col :span="13">
+                <a-input value="箭冠总公司" disabled />
               </a-col>
-              <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
-                <div class="buyerBox">
-                  <a-tag closable v-for="con in chooseDealerList" :key="con.dealerSn" @close="delBuyerName(con)">
-                    {{ con.dealerName }}
-                  </a-tag>
-                </div>
+              <a-col :span="5">
+                <v-select code="DEALER_GOODS_TYPE" allowClear placeholder="请选择价格类型"></v-select>
+              </a-col>
+              <a-col :span="4" v-if="showPercent">
+                <a-input-number :min="0" :max="100" placeholder="请输入比例"/> %
               </a-col>
             </a-row>
           </a-form-model-item>
@@ -88,20 +96,6 @@
         >确定</a-button>
       </div>
     </a-spin>
-    <!-- 选择参与客户 -->
-    <a-modal
-      title="选择经销商"
-      :visible="openDealerModal"
-      :footer="null"
-      centered
-      class="lookUpCustomers-modal"
-      @cancel="openDealerModal = false"
-      width="60%"
-    >
-      <div class="dealerModalCon">
-        <chooseDealer ref="dealerChoose" @plAdd="handleAddDealer"></chooseDealer>
-      </div>
-    </a-modal>
   </a-modal>
 </template>
 
@@ -109,11 +103,10 @@
 import custList from '@/views/common/custList.vue'
 import { VSelect } from '@/components'
 import categoryList from './categoryList.vue'
-import chooseDealer from '@/views/promotionRulesManagement/dealerPromotions/chooseDealer'
 
 export default {
   name: 'PriceDiffModal',
-  components: { VSelect, custList, categoryList, chooseDealer },
+  components: { VSelect, custList, categoryList },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -131,21 +124,17 @@ export default {
       },
       form: {
         dealerSn: undefined,
-        cjgsf: [],
-        promotionDealerList: [] // 参与客户
+        cjgsf: []
       },
       rules: {
-        cjgsf: [{ required: true, message: '请选择差价归属方', trigger: 'change' }],
-        dealerSn: [{ required: true, message: '请选择上级经销商', trigger: 'change' }],
-        dealerScope: [{ required: true, message: '请选择参与客户', trigger: 'change' }]
+        cjgsf: [{ required: true, message: '请选择差价归属方', trigger: 'change' }]
       },
       cjgsfList: [
         { code: '0', name: '上级经销商' },
         { code: '1', name: '指定经销商' },
         { code: '2', name: '箭冠总公司' }
       ],
-      chooseDealerList: [],
-      openDealerModal: false
+      zdDealearList: []
     }
   },
   computed: {
@@ -153,7 +142,7 @@ export default {
       return this.form.cjgsf.length > 1
     },
     showPercent1 () {
-      return this.chooseDealerList.length > 1
+      return this.zdDealearList.length > 1
     }
   },
   methods: {
@@ -164,49 +153,22 @@ export default {
     // 差价归属变更
     cjgsgChange (val) {
       if (val.indexOf('1') >= 0) {
-        if (this.chooseDealerList.length == 0) {
-          // this.chooseDealerList.push({ id: new Date().getTime(), dealerSn: '', percent: '' })
+        if (this.zdDealearList.length == 0) {
+          this.zdDealearList.push({ id: new Date().getTime(), dealerSn: '', percent: '' })
         }
       } else {
-        this.chooseDealerList = []
+        this.zdDealearList = []
       }
     },
-    // 选择参与客户
-    handleDealerModal () {
-      this.openDealerModal = true
-      const _this = this
-      if (_this.chooseDealerList.length == 0) {
-        _this.form.promotionDealerList = []
-      }
-      const arr = _this.chooseDealerList.map(item => {
-        return item.dealerSn
-      })
-      // 选择参与客户回显
-      _this.$nextTick(() => {
-        _this.$refs.dealerChoose.pageInit(arr)
-      })
-    },
-    // 删除所选参与客户
-    delBuyerName (row) {
-      const pot = this.chooseDealerList.findIndex(con => { return con.dealerSn == row.dealerSn })
-      this.chooseDealerList.splice(pot, 1)
-    },
-    // 添加经销商
-    handleAddDealer (list) {
-      this.chooseDealerList = list
-      this.openDealerModal = false
-      // 移除表单必填项
-      this.$refs.ruleForm.clearValidate('promotionDealerList')
-    },
     // 增加或删除指定经销商
     addOrDel (row, index) {
       // 加
-      if ((this.chooseDealerList.length - 1) == index) {
-        this.chooseDealerList.push({ id: new Date().getTime(), dealerSn: '', percent: '' })
+      if ((this.zdDealearList.length - 1) == index) {
+        this.zdDealearList.push({ id: new Date().getTime(), dealerSn: '', percent: '' })
       } else {
-        const i = this.chooseDealerList.findIndex(item => item.id == row.id)
+        const i = this.zdDealearList.findIndex(item => item.id == row.id)
         if (i >= 0) {
-          this.chooseDealerList.splice(i, 1)
+          this.zdDealearList.splice(i, 1)
         }
       }
     },
@@ -214,8 +176,10 @@ export default {
     resetForm () {
       this.form.dealerSn = undefined
       this.form.cjgsf = []
-      this.chooseDealerList = []
-      this.$refs.custList.resetForm()
+      this.zdDealearList = []
+      if (this.$refs.custList) {
+        this.$refs.custList.resetForm()
+      }
     },
     // 保存
     handleSave () {
@@ -258,9 +222,6 @@ export default {
   .priceDifference-modal{
     .ant-modal-body {
       padding: 24px!important;
-      .buyerBox{
-        border:1px solid #d9d9d9;margin-top:10px;border-radius:4px;padding:4px 10px;background:#f2f2f2;max-height:130px;overflow-y:scroll;
-      }
     }
     .btn-cont {
       text-align: center;