瀏覽代碼

修理厂促销

chenrui 2 年之前
父節點
當前提交
69fb6f5217

+ 54 - 0
src/api/promoTerminal.js

@@ -0,0 +1,54 @@
+import { axios } from '@/utils/request'
+// 修理厂促销列表  有分页
+export const promoTerminalList = (params) => {
+  const url = `/promoTerminal/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  保存促销
+export const promoTerminalSave = (params) => {
+  return axios({
+    url: '/promoTerminal/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  获取促销详情
+export const promoTerminalDetail = (params) => {
+  const url = `/promoTerminal/findBySn/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+
+//  促销活动 删除
+export const promoTerminalDel = (params) => {
+  const url = `/promoTerminal/delete/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+//  优惠活动 详情  包含规则
+export const promoRuleDetailD = (params) => {
+  const url = `/promoRule/findDetailBySn/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+//  促销规则  获取可导入和不可导入列表数据
+export const promoRuleGoods = (params) => {
+  return axios({
+    url: '/promoRule/parseGoods',
+    data: params,
+    method: 'post'
+  })
+}

+ 138 - 262
src/views/promotionRulesManagement/promotionManagement/addModal.vue

@@ -17,257 +17,181 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
-        <a-row :gutter="15">
-          <a-col :md="12" :sm="24" v-if="!isEdit">
-            <a-form-model-item label="促销名称" prop="targetType">
-              <a-input v-model="form.targetName" placeholder="请输入促销名称" :maxLength="100"></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="12" :sm="24">
-            <a-form-model-item label="促销时间" prop="time">
-              <a-range-picker
-                style="width:100%"
-                v-model="form.time"
-                :format="dateFormat"
-                @change="dateChange"
-                :placeholder="['开始时间', '结束时间']" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="12" :sm="24" v-if="!isEdit">
-            <a-form-model-item label="调往对象名称" :prop="isDealer||isDepartment ? 'targetSn' : 'targetName'">
+        <a-form-model-item label="促销名称" prop="name">
+          <a-input v-model="form.name" placeholder="请输入促销名称" :maxLength="160"></a-input>
+        </a-form-model-item>
+        <a-form-model-item label="促销时间" prop="time">
+          <a-range-picker
+            style="width:100%"
+            v-model="form.time"
+            :format="dateFormat"
+            @change="dateChange"
+            :placeholder="['开始时间', '结束时间']" />
+        </a-form-model-item>
+        <a-form-model-item label="参与经销商" prop="promoBuyerList">
+          <a-row :gutter="15">
+            <!-- <a-col :md="15" :sm="24">
               <a-select
-                v-if="isDealer"
-                show-search
-                id="promotion-dealerName"
-                v-model="form.targetSn"
-                placeholder="请选择经销商"
-                :filter-option="false"
-                :not-found-content="fetching ? undefined : null"
-                @search="fetchUser"
-                @change="handleChange"
+                v-model="form.buyerLimitEnable"
+                placeholder="请选择参与经销商"
               >
-                <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-                <a-select-option v-for="item in dealerData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                <a-select-option :value="0">全部经销商</a-select-option>
+                <a-select-option :value="1">部分经销商</a-select-option>
               </a-select>
-              <department v-else-if="isDepartment" style="width: 100%;" placeholder="请选择部门" @change="departementChange" v-model="form.targetSn"></department>
-              <a-input v-else v-model="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" :maxLength="30"></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="12" :sm="24" v-if="!isEdit">
-            <a-form-model-item label="调出仓库" prop="warehouseSn">
-              <warehouse
-                v-model="form.warehouseSn"
-                id="promotion-warehouseSn"
-                placeholder="请选择调出仓库"
-              />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="12" :sm="24">
-            <a-form-model-item label="费用/调拨类型" prop="costTypeSn">
-              <AllocateType id="promotion-allocateTypeSn" v-model="allocateTypeVal" placeholder="请选择费用/调拨类型" @change="allocateTypeChange"></AllocateType>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="12" :sm="24">
-            <a-form-model-item label="费用归属品牌">
-              <ProductBrand id="promotion-productBrandSn" @change="changeBrand" v-model="form.productBrandSn" placeholder="请选择费用归属品牌(单选)"></ProductBrand>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="12" :sm="24">
-            <a-form-model-item label="费用归属品类">
-              <productTypeAll placeholder="请选择费用归属品类(单选,可选二级或三级)" @change="changeProductType" v-model="productType" id="promotion-productType"></productTypeAll>
-            </a-form-model-item>
-          </a-col>
-
-          <a-col :md="24" :sm="24">
-            <a-form-model-item style="margin-bottom:10px;" label="备注" prop="remark" :wrapperCol="{ span: 20 }" :labelCol="{ span: 4 }">
-              <a-textarea id="promotion-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <a-form-model-item label="附件" help="(支持图片、word、excel、PDF等格式,最多10个附件)" :label-col="{span:4}" :wrapper-col="{span:18}">
-              <Upload
-                style="height: 100%;"
-                id="allocateBill-attachList"
-                v-model="form.attachmentList"
-                ref="attachList"
-                :fileSize="10"
-                :maxNums="10"
-                fileType="*"
-                uploadType="attach"
-                :action="attachAction"
-                @change="changeAttach"
-                upText="上传附件"></Upload>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
+            </a-col> -->
+            <a-col :md="5" :sm="24">
+              <a-button type="primary" :loading="spinning" @click="handleDealer">选择经销商</a-button>
+            </a-col>
+            <a-col :md="6" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
+              已{{ chooseDealerList.length }}选项
+            </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.buyerSn" @close="delBuyerName(con)">
+                  {{ con.buyerName }}
+                </a-tag>
+              </div>
+            </a-col>
+          </a-row>
+        </a-form-model-item>
+        <a-form-model-item style="margin-bottom:10px;" label="促销描述" prop="description" :wrapperCol="{ span: 16 }" :labelCol="{ span: 4 }">
+          <a-textarea id="promotion-remark" :maxLength="500" v-model="form.description" placeholder="请输入备注(最多500个字符)" allowClear />
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button type="primary" :loading="spinning" id="promotion-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="promotion-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        <a-button id="promotion-modal-back" @click="isShow = false" >取消</a-button>
+        <a-button type="primary" style="margin-left: 15px;" :loading="spinning" id="promotion-modal-save" @click="handleSave">确定</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>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import debounce from 'lodash/debounce'
-import { VSelect, Upload } from '@/components'
-import { allocateBillSave } from '@/api/allocateBill'
-import { dealerSubareaScopeList } from '@/api/dealer'
-import { getLookUpData } from '@/api/data'
-import ProductBrand from '@/views/common/productBrand.js'
-import productTypeAll from '@/views/common/productTypeAll.js'
-import AllocateType from '@/views/common/allocateType.js'
-import warehouse from '@/views/common/chooseWarehouse.js'
-import department from '@/views/expenseManagement/expenseReimbursement/department.js'
+import { promoTerminalSave, promoTerminalDetail } from '@/api/promoTerminal'
+import chooseDealer from './chooseDealer'
 export default {
-  name: 'TransferOutBasicInfoModal',
+  name: 'PromotionAddModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, ProductBrand, productTypeAll, AllocateType, department, warehouse },
+  components: { chooseDealer },
   props: {
     openModal: {
       //  弹框显示状态
       type: Boolean,
       default: false
     },
-    detailData: Object
+    itemId: {
+      //  弹框显示状态
+      type: String,
+      default: ''
+    }
   },
   data () {
-    this.lastFetchId = 0
-    this.fetchUser = debounce(this.fetchUser, 800)
     return {
       isShow: this.openModal, //  是否打开弹框
+      openDealerModal: false,
       spinning: false,
       formItemLayout: {
-        labelCol: { span: 8 },
+        labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
-      productType: [],
-      attachList: [],
-      attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
       form: {
-        targetType: 'DEALER',
-        targetSn: undefined,
-        targetName: '',
-        costTypeSn: '',
-        allocateTypeSn: '',
-        allocateSortSn: '',
-        warehouseSn: undefined, // 仓库
-        productBrandSn: undefined, //  产品品牌
-        productTypeSn1: '', //  产品一级分类
-        productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '', //  产品三级分类
+        promoActiveSn: undefined,
+        name: '',
         time: [],
-        promoStartDate: '',
-        promoEndDate: '',
-        remark: '',
-        attachmentList: ''
+        activeDateStart: undefined,
+        activeDateEnd: undefined,
+        activeDateEnable: '1',
+        buyerLimitEnable: '1',
+        description: '',
+        promoBuyerList: []
       },
       rules: {
-        targetType: [{ required: true, message: '请选择调往对象', trigger: 'change' }],
-        targetSn: [{ required: true, message: '请选择调往对象名称', trigger: 'change' }],
-        costTypeSn: [{ required: true, message: '请选择费用/调拨类型', trigger: 'change' }],
-        warehouseSn: [{ required: true, message: '请选择调出仓库', trigger: 'change' }],
-        targetName: [{ required: true, message: '请输入调往对象名称', trigger: 'blur' }]
+        promoBuyerList: [{ required: true, message: '请选择参与经销商', trigger: 'change' }],
+        time: [{ required: true, message: '请选择促销时间', trigger: 'change' }],
+        name: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
+        description: [{ required: true, message: '请输入促销描述', trigger: 'blur' }]
       },
-      fetching: false,
-      dealerData: [], //  经销商  下拉数据
-      targetTypeList: [], //  调往对象类型
-      allocateTypeVal: [],
       dateFormat: 'YYYY-MM-DD',
-      isEdit: false
-    }
-  },
-  computed: {
-    // 当前所选调往对象是否为经销商
-    isDealer () {
-      return this.form.targetType == 'DEALER'
-    },
-    isDepartment () {
-      return this.form.targetType == 'DEPARTMENT'
+      isEdit: false,
+      chooseDealerList: []// 选择经销商列表
     }
   },
   methods: {
+    handleDealer () {
+      const _this = this
+      _this.openDealerModal = true
+      const arr = _this.chooseDealerList.map(item => {
+        return item.buyerSn
+      })
+      _this.$nextTick(() => {
+        _this.$refs.dealerChoose.pageInit(arr)
+      })
+    },
     // 日期  change
     dateChange (date, dateStrings) {
-      console.log(date, dateStrings)
       this.form.time = dateStrings
-      this.form.promoStartDate = date.length ? dateStrings[0] : ''
-      this.form.promoEndDate = date.length ? dateStrings[1] : ''
+      this.form.activeDateStart = date.length ? dateStrings[0] : ''
+      this.form.activeDateEnd = date.length ? dateStrings[1] : ''
     },
-    //  附件上传
-    changeAttach (file) {
-      this.attachList = JSON.parse(file)
-      this.attachList.map(item => {
-        item.fileType = item.extName
+    // 添加经销商
+    handleAddDealer (list) {
+      this.chooseDealerList = list
+      const newArr = list.map(item => {
+        return {
+          buyerSn: item.buyerSn
+        }
       })
+      this.form.promoBuyerList = newArr
+      this.openDealerModal = false
     },
-    departementChange (v, row) {
-      console.log(v, row)
-      this.form.targetName = row.name
-    },
-    // 调拨类别 change
-    allocateTypeChange (val, opt) {
-      console.log(val, opt, '------------')
-      this.allocateTypeVal = val || ''
-      this.form.costTypeSn = val && val[0] ? val[0] : ''
-      this.form.allocateSortSn = val && val[1] ? val[1] : ''
-      this.form.allocateTypeSn = val && val[2] ? val[2] : ''
-      // 名称
-      this.form.costTypeName = opt && opt[0] ? opt[0].name : ''
-      this.form.allocateSortName = opt && opt[1] ? opt[1].name : ''
-      this.form.allocateTypeName = opt && opt[2] ? opt[2].name : ''
-    },
-    //  产品分类  change
-    changeProductType (val, id, opt) {
-      console.log(val, opt, '------------')
-      this.form.productTypeSn1 = val && val[0] ? val[0] : ''
-      this.form.productTypeSn2 = val && val[1] ? val[1] : ''
-      this.form.productTypeSn3 = val && val[2] ? val[2] : ''
-      // 名称
-      this.form.productTypeName1 = opt && opt[0] ? opt[0].productTypeName : ''
-      this.form.productTypeName2 = opt && opt[1] ? opt[1].productTypeName : ''
-      this.form.productTypeName3 = opt && opt[2] ? opt[2].productTypeName : ''
-    },
-    // 品牌
-    changeBrand (val, id, opt) {
-      console.log(val, opt, '------------')
-      this.form.productBrandName = opt ? opt.brandName : ''
-    },
-    fetchUser (dealerName) {
-      if (dealerName == '') return
-      this.lastFetchId += 1
-      const fetchId = this.lastFetchId
-      this.dealerData = []
-      this.fetching = true
-      dealerSubareaScopeList({ nameLike: dealerName.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
-        if (fetchId !== this.lastFetchId) {
-          return
+    // 获取编辑详情
+    getEditInfo () {
+      const _this = this
+      promoTerminalDetail({ sn: this.itemId }).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          this.chooseDealerList = data.promoBuyerList
+          this.handleDealer()
+          data.promoBuyerList = data.promoBuyerList.map(item => {
+            return {
+              buyerSn: item.buyerSn
+            }
+          })
+          data.time = [data.activeDateStart, data.activeDateEnd]
+          this.form = data
         }
-        this.dealerData = res.data && res.data.list ? res.data.list : []
-        this.fetching = false
       })
     },
-    // 调往对象名称经销商  change
-    handleChange (value) {
-      const ind = this.dealerData.findIndex(item => item.dealerSn == value)
-      console.log(this.dealerData[ind])
-      this.form.targetName = this.dealerData[ind].dealerName
-      this.form.warehouseSn = this.dealerData[ind].defaultWarehouseSn
+    // 删除所选经销商
+    delBuyerName (row) {
+      const pot = this.chooseDealerList.findIndex(con => { return con.buyerSn == row.buyerSn })
+      this.chooseDealerList.splice(pot, 1)
+      this.handleDealer()
     },
-    //  保存
+    //  保存促销
     handleSave () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
-          if (!form.productBrandName) {
-            form.productBrandSn = ''
-          }
-          form.attachmentList = this.attachList
+          delete form.time
           _this.spinning = true
-          allocateBillSave(form).then(res => {
+          promoTerminalSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.isShow = false
@@ -280,29 +204,6 @@ export default {
           return false
         }
       })
-    },
-    // 调往对象  change
-    targetTypeChange (e) {
-      this.$refs.ruleForm.resetFields()
-      this.form.targetSn = undefined
-      this.form.targetName = ''
-      this.form.warehouseSn = undefined
-      this.form.targetType = e.target.value
-    },
-    // 调往对象类型
-    getTargetTypeList () {
-      const _this = this
-      getLookUpData({
-        pageNo: 1,
-        pageSize: 1000,
-        lookupCode: 'TARGET_TYPE'
-      }).then(res => {
-        if (res.status == 200) {
-          _this.targetTypeList = res.data.list
-        } else {
-          _this.targetTypeList = []
-        }
-      })
     }
   },
   watch: {
@@ -315,51 +216,23 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
-        this.allocateTypeVal = []
-        this.productType = []
-        this.attachList = []
-        this.form.attachmentList = ''
-        this.$refs.attachList.setFileList('')
         this.form = {
-          targetType: 'DEALER',
-          targetSn: undefined,
-          targetName: '',
-          costTypeSn: '',
-          allocateTypeSn: '',
-          allocateSortSn: '',
-          warehouseSn: undefined,
-          productBrandSn: undefined, //  产品品牌
-          productTypeSn1: '', //  产品一级分类
-          productTypeSn2: '', //  产品二级分类
-          productTypeSn3: '', //  产品三级分类
+          promoActiveSn: undefined,
+          name: '',
           time: [],
-          promoStartDate: '',
-          promoEndDate: '',
-          remark: ''
+          activeDateStart: undefined,
+          activeDateEnd: undefined,
+          activeDateEnable: '1',
+          buyerLimitEnable: '1',
+          description: '',
+          promoBuyerList: []
         }
+        this.isEdit = false
+        this.chooseDealerList = []
       } else {
-        this.getTargetTypeList()
-        // 编辑
-        if (this.detailData) {
-          this.isEdit = true
-          this.form = Object.assign(this.form, this.detailData)
-          // 获取附件列表
-          this.form.attachmentList = ''
-          this.attachList = this.detailData.attachmentList
-          this.$nextTick(() => {
-            this.$refs.attachList.setFileList(this.attachList)
-          })
-
-          this.allocateTypeVal = [this.detailData.costTypeSn, this.detailData.allocateSortSn, this.detailData.allocateTypeSn]
-          if (this.detailData.productTypeSn1) {
-            this.productType = [this.detailData.productTypeSn1, this.detailData.productTypeSn2, this.detailData.productTypeSn3]
-          }
-          if (this.form.promoStartDate && this.form.promoEndDate) {
-            this.form.time = [this.form.promoStartDate, this.form.promoEndDate]
-          }
-          if (!this.form.productBrandSn) {
-            this.form.productBrandSn = undefined
-          }
+        this.isEdit = !!this.itemId
+        if (this.itemId) {
+          this.getEditInfo()
         }
       }
     }
@@ -372,6 +245,9 @@ export default {
 	.ant-modal-body {
 		padding: 40px 40px 24px;
 	}
+  .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;
 		margin: 35px 0 10px;

+ 284 - 0
src/views/promotionRulesManagement/promotionManagement/chooseDealer.vue

@@ -0,0 +1,284 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="8" :sm="24">
+            <a-form-item label="经销商名称/别名">
+              <a-input id="chooseDealer-nameLike" v-model.trim="queryParam.dealer.nameLike" allowClear placeholder="请输入经销商名称/别名"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-item label="商户类型">
+              <v-select code="DEALER_TYPE" id="chooseDealer-dealerType" v-model="queryParam.dealer.dealerType" allowClear placeholder="请选择商户类型"></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-model-item label="商户级别" prop="dealerLevel">
+              <v-select code="DEALER_LEVEL" id="ucModal-dealerLevel" v-model="queryParam.dealer.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="8" :sm="24" v-if="pageType!='viewDealers'">
+            <a-form-item label="所在区域/分区">
+              <subarea id="chooseDealer-subarea" ref="subarea" @change="subareaChange"></subarea>
+            </a-form-item>
+          </a-col>
+          <div v-else>
+            <a-col :md="8" :sm="24">
+              <a-form-item label="审核状态">
+                <v-select code="AUDIT_STATE" id="viewDealers-auditState" v-model="queryParam.auditState" allowClear placeholder="请选择审核状态"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="8" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="viewDealers-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+          </div>
+          <a-col :md="pageType!='viewDealers'?8:6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="searchForm(true)" :disabled="disabled" id="chooseDealer-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseDealer-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+      <!-- 列表 -->
+      <div style="margin-bottom: 10px">
+        <a-button type="primary" ghost :loading="loading" @click="handleBatchAudit">批量添加</a-button>
+        <span style="margin-left: 5px">
+          <template v-if="selectCount"> {{ `已选 ${selectCount} 项` }} </template>
+        </span>
+      </div>
+    </div>
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.dealerSn"
+      rowKeyName="dealerSn"
+      :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: pageType=='viewDealers'?!!record.subareaAreaSn: !!record.chooseId} }) }"
+      @rowSelection="rowSelectionFun"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      :style="{ height: 320+'px' }"
+      :scroll="{ y: 230 }"
+      bordered>
+      <template slot="areas" slot-scope="text, record">
+        <span v-if="record.subareaArea">{{ record.subareaArea.subareaName }}>{{ record.subareaArea.subareaAreaName }}</span>
+        <span v-else>--</span>
+      </template>
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          class="button-error"
+          @click="handleAdd(record)"
+          v-if="record.subareaAreaSn != parentData.subareaAreaSn"
+          id="marketingDivisionSetNew-del-btn">添加</a-button>
+        <span style="color:#666" v-else>已添加</span>
+      </template>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import AreaList from '@/views/common/areaList.js'
+import { bizuserScopeQueryDealer } from '@/api/bizuser'
+import subarea from '@/views/common/subarea.js'
+export default {
+  name: 'ChooseDealer',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList },
+  props: {
+    pageType: {
+      type: String,
+      default: ''
+    },
+    parentData: {
+      type: Object,
+      default: function () {
+        return null
+      }
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      queryParam: { //  查询条件
+        dealer: {
+          nameLike: '',
+          dealerType: null,
+          dealerLevel: null
+        },
+        auditState: undefined,
+        provinceSn: undefined,
+        citySn: undefined,
+        districtSn: undefined,
+        subareaSn: undefined,
+        subareaAreaSn: undefined
+      },
+      pageFlag: false,
+      chooseInfo: [],
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false, // 批量添加loading
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        return bizuserScopeQueryDealer(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          const _this = this
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            const chooseData = []
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].dealerSn = data.list[i].dealer.dealerSn
+              if (!_this.pageType && _this.chooseInfo && _this.chooseInfo.length > 0) {
+                // 回显选中数据
+                const flag = _this.chooseInfo.includes(data.list[i].dealer.dealerSn)
+                if (flag) {
+                  chooseData.push(data.list[i])
+                }
+              }
+            }
+            if (!this.pageFlag) {
+              this.pageFlag = true
+              _this.$refs.table.setTableSelected(_this.chooseInfo, chooseData) // 设置表格选中项
+            }
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      rowSelectionInfo: null
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户别名', dataIndex: 'dealer.dealerAlias', align: 'left', width: '30%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户类型', dataIndex: 'dealer.dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealer.dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (_this.pageType == 'viewDealers') {
+        arr.splice(4, 0, { title: '审核状态', dataIndex: 'auditStateDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
+        arr.splice(5, 0, { title: '当前所属区域', scopedSlots: { customRender: 'areas' }, width: '30%', align: 'center' })
+        arr.splice(6, 0, { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' })
+      } else {
+        arr.splice(4, 0, { title: '所在区域', dataIndex: 'subareaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
+        arr.splice(5, 0, { title: '所在分区', dataIndex: 'subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    },
+    selectCount () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : ''
+      this.queryParam.citySn = val[1] ? val[1] : ''
+      this.queryParam.districtSn = val[2] ? val[2] : ''
+    },
+    searchForm (flag) {
+      this.$refs.table.refresh(flag)
+      this.spinning = false
+    },
+    subareaChange (val) {
+      this.queryParam.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam = {
+        dealer: {
+          nameLike: '',
+          dealerType: null,
+          dealerLevel: null
+        },
+        auditState: undefined,
+        provinceSn: undefined,
+        citySn: undefined,
+        districtSn: undefined,
+        subareaSn: undefined,
+        subareaAreaSn: undefined
+      }
+      if (this.pageType != 'viewDealers') {
+        this.$refs.subarea.clearData()
+      } else {
+        this.$refs.areaList.clearData()
+      }
+      this.$refs.table.clearSelected()
+      this.$refs.table.refresh(true)
+      this.pageFlag = false
+    },
+    clearTable () {
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
+    },
+    // 批量添加
+    handleBatchAudit () {
+      const _this = this
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
+      const dealerSnList = _this.rowSelectionInfo.selectedRows
+      const newDealerSnList = dealerSnList.map(con => {
+        const obj = {
+          buyerName: con.dealer.dealerName,
+          buyerSn: con.dealerSn
+        }
+        return obj
+      })
+      this.spinning = false
+      this.$emit('plAdd', newDealerSnList)
+    },
+    handleAdd (row) {
+      if (row.subareaArea) {
+        const _this = this
+        this.$confirm({
+          title: '提示',
+          content: '当前经销商已被其他区域分区绑定,确定要更新绑定关系吗?',
+          centered: true,
+          onOk () {
+            _this.spinning = true
+            _this.$emit('add', row)
+          }
+        })
+      } else {
+        this.spinning = true
+        this.$emit('add', row)
+      }
+    },
+    pageInit (data) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.chooseInfo = data || []
+      this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 285
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  }
+}
+</script>

+ 100 - 181
src/views/promotionRulesManagement/promotionManagement/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesReturn-wrap">
+  <a-card size="small" :bordered="false" class="promotion-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
@@ -12,26 +12,26 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="促销名称">
-                <a-input id="salesReturn-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入总部销退单号"/>
+                <a-input id="promotion-promotionName" v-model.trim="queryParam.name" allowClear placeholder="请输入总部销退单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="4" :sm="24">
               <a-form-item label="显示状态">
-                <v-select
-                  v-model="queryParam.salesReturnBillSource"
-                  ref="salesReturnBillSource"
-                  id="salesReturn-salesReturnBillSource"
-                  code="SALES_SOURCE"
+                <a-select
+                  v-model="queryParam.showFlag"
                   placeholder="请选择显示状态"
-                  allowClear></v-select>
+                >
+                  <a-select-option :value="1">已显示</a-select-option>
+                  <a-select-option :value="0">未显示</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
             <a-col :md="4" :sm="24">
               <a-form-item label="促销状态">
                 <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="salesReturn-billStatus"
+                  v-model="queryParam.state"
+                  ref="saleStatus"
+                  id="promotion-saleStatus"
                   code="SALES_RETURN_BILL_STATUS"
                   placeholder="请选择促销状态"
                   allowClear></v-select>
@@ -47,7 +47,7 @@
         </a-form>
         <!-- 操作按钮 -->
         <div class="table-operator">
-          <a-button type="primary" class="button-error" @click="openModal = true">新增</a-button>
+          <a-button type="primary" class="button-error" @click="openAddModal = true">新增</a-button>
         </div>
       </div>
       <!-- 列表 -->
@@ -71,13 +71,33 @@
             显示状态<a-icon type="question-circle" :style="{ marginLeft: '10px' }" />
           </a-tooltip>
         </template>
+        <!-- 显示状态 -->
+        <template slot="arrowFalg" slot-scope="text, record">
+          <a-switch
+            checkedChildren="显示"
+            unCheckedChildren="不显示"
+            id="promotion-isEnable"
+            v-model="record.isEnable"
+            @change="changeFlagHandle(text, record)" />
+        </template>
+        <!-- 促销时间 -->
+        <template slot="promotionTime" slot-scope="text, record">
+          <span>{{ record.activeDateStart }}至{{ record.activeDateEnd }}</span>
+        </template>
         <!-- 参与客户 -->
         <template slot="joinCustomers" slot-scope="text, record">
-          <span @click="openCustomerModal=true">共有17个客户</span>
+          <span @click="openCustomerModal=true">共有{{ record.promoBuyerSnSet?record.promoBuyerSnSet.length:0 }}个客户</span>
         </template>
-        <!-- 提货单 -->
-        <template slot="pickUpSalesReturnNum" slot-scope="text, record">
-          <span class="link-bule" @click="handleBillOfLadingDetail(record)">{{ record.pickUpSalesReturnNum }}</span>
+        <!-- 促销描述 -->
+        <template slot="salesDesc" slot-scope="text, record">
+          <span @click="openDescModal=true">{{ record.description }}</span>
+        </template>
+        <!-- 促销展示 -->
+        <template slot="salesShow" slot-scope="text, record">
+          <div v-if="record.src" @click="openShowModal=true">
+            <img :src="record.src" alt="图片走丢啦" width="100">
+          </div>
+          <span v-else>--</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -87,25 +107,30 @@
               type="link"
               class="button-warning"
               @click="handleEexamine(record)"
-              id="salesReturn-eexamine-btn">发布修改</a-button>
+              v-if="record.state=='PUBLISH'"
+              id="promotion-modify-btn">发布修改</a-button>
             <a-button
               size="small"
               type="link"
               class="button-warning"
-              @click="beforeSubmit(record)"
-              id="salesReturn-eexamine-btn">促销编辑</a-button>
+              @click="promotionEdit(record)"
+              v-if="record.state=='UNPUBLISH' ||record.state=='CLOSE'"
+              id="promotion-edit-btn">促销编辑</a-button>
             <a-button
               size="small"
               type="link"
               class="button-info"
               @click="handleEdit(record)"
-              id="salesReturn-edit-btn">促销发布</a-button>
+              v-if="record.state=='UNPUBLISH' || record.state=='CLOSE'"
+              id="promotion-release-btn">促销发布</a-button>
             <a-button
               size="small"
               type="link"
               class="button-error"
+              v-if="record.state=='UNPUBLISH'"
               @click="handleDel(record)"
-              id="salesReturn-del-btn">删除</a-button>
+              id="promotion-del-btn">删除</a-button>
+            <span v-if="record.state=='End'">--</span>
           </div>
         </template>
       </s-table>
@@ -116,176 +141,126 @@
     <promotion-desc-modal :openModal="openDescModal" @close="openDescModal = false"></promotion-desc-modal>
     <!-- 促销展示 -->
     <promotion-show-modal :openModal="openShowModal" @close="openShowModal = false"></promotion-show-modal>
-    <!-- 选择客户弹框 -->
-    <choose-custom-modal :show="openModal" @ok="handleEdit" @cancel="openModal=false"></choose-custom-modal>
-
-    <!-- 审核进度 -->
-    <verifyModal v-drag :openModal="visibleAudit" :itemSn="auditInfo&&auditInfo.salesReturnBillSn" @close="visibleAudit=false"></verifyModal>
-    <!-- 选择审核人员 -->
-    <chooseDepartUserModal v-drag :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
+    <!-- 新增 -->
+    <addModal :openModal="openAddModal" :itemId="itemId" @close="openAddModal = false"></addModal>
   </a-card>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import subarea from '@/views/common/subarea.js'
-import Area from '@/views/common/area.js'
-// import chooseCustomModal from './chooseCustomModal.vue'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
-// import verifyModal from './verifyModal.vue'
-// import chooseDepartUserModal from './chooseDepartUserModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
-import warehouse from '@/views/common/chooseWarehouse.js'
-import { salesReturnList, salesReturnQueryCount, salesReturnDel, salesReturnSubmit } from '@/api/salesReturn'
-import moment from 'moment'
-import getDate from '@/libs/getDate.js'
+import { promoTerminalList, promoTerminalDel } from '@/api/promoTerminal'
 import lookUpCustomersModal from './lookUpCustomersModal'
 import promotionDescModal from './promotionDescModal'
 import promotionShowModal from './promotionShowModal'
+import addModal from './addModal'
 export default {
-  name: 'SalesReturnList',
+  name: 'PromotionList',
   mixins: [commonMixin],
   components: {
     STable,
     VSelect,
-    dealerSubareaScopeList,
     rangeDate,
     lookUpCustomersModal,
-    Area,
-    subarea,
-    warehouse,
     promotionShowModal,
-    promotionDescModal
+    promotionDescModal,
+    addModal
   },
   data () {
     return {
       spinning: false,
-      // 高级搜索 展开/关闭
-      advanced: true,
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
-      openDescModal: false,
-      openShowModal: true,
-      createDate: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ], //  创建时间
-      openModal: false, // 选择客户弹框是否显示
-      openDepartUserModal: false,
       openCustomerModal: false,
+      openDescModal: false,
+      openShowModal: false,
+      openAddModal: false,
+      createDate: [], //  创建时间
+      itemId: '',
       // 查询参数
       queryParam: {
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        beginAuditDate: '',
-        endAuditDate: '',
-        buyerSn: undefined, //  客户名称
-        salesReturnBillNo: undefined, //  总部销退单号
-        purchaseReturnApplyNo: '',
-        syncFlag: undefined, // 是否同步给客户
-        billStatus: undefined, // 业务状态
-        warehouseSn: undefined, // 仓库
-        subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
-        },
-        shippingAddrProvinceSn: undefined,
-        salesReturnBillSource: undefined
+        beginDate: undefined,
+        endDate: undefined,
+        name: '',
+        showFlag: undefined,
+        state: undefined
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        return salesReturnList(params).then(res => {
+        return promoTerminalList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              data.list[i].isEnable = data.list[i].showFlag + '' === '1'
             }
             this.disabled = false
           }
           this.spinning = false
-          // 统计
-          this.getCount(params)
           return data
         })
       },
-      visibleAudit: false,
-      auditInfo: null,
-      spinningAudit: false,
-      countData: null,
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '促销名称', dataIndex: 'buyerName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '促销时间', dataIndex: 'joinCustomers', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '参与客户', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '12%', align: 'center' },
+        { title: '促销名称', dataIndex: 'name', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '8%', align: 'center' },
+        { title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '12%', align: 'center' },
         { title: '促销描述', scopedSlots: { customRender: 'salesDesc' }, width: '12%', align: 'center' },
         { title: '促销展示', scopedSlots: { customRender: 'salesShow' }, width: '6%', align: 'center' },
         { slots: { title: 'arrowFalgTitle' }, scopedSlots: { customRender: 'arrowFalg' }, width: '6%', align: 'center' },
-        { title: '促销状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '促销状态', dataIndex: 'state', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
     }
   },
   methods: {
-    getCount (params) {
-      salesReturnQueryCount(params).then(res => {
-        this.countData = res.data
-      })
-    },
     //  创建时间  change
     dateCreateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
-    //  审核时间  change
-    dateExamineChange (date) {
-      this.queryParam.beginAuditDate = date[0]
-      this.queryParam.endAuditDate = date[1]
-    },
-    custChange (val) {
-      this.queryParam.buyerSn = val.key
-    },
-    // 客服确认
-    handleConfirm (row) {
-      this.$router.push({ name: 'custConfirm', params: { sn: row.salesReturnBillSn, buyerSn: row.buyerSn } })
-    },
-    // 申请提货
-    handlePickUp (row) {
-      this.$store.state.app.tempBillOfData = row
-      this.$router.push({ name: 'billOfLadingAdd', query: { path: 'salerReturn' } })
-    },
-    // 编辑
-    handleEdit (row) {
-      this.$router.push({ name: 'salesReturnEdit', params: { sn: row.salesReturnBillSn, buyerSn: row.buyerSn } })
-    },
-    // 详情
-    handleDetail (row) {
-      this.$router.push({ name: 'salesReturnDetail', params: { sn: row.salesReturnBillSn } })
-    },
-    // 提货单查看
-    handleBillOfLadingDetail (row) {
-      if (row.pickUpSalesReturnNum == '0单') {
-        this.$message.info('此销售退货单没有提货单')
-      } else {
-        this.$router.push({ name: 'billOfLadingList', query: { billNo: row.salesReturnBillNo } })
+    // 修改显示状态
+    changeFlagHandle (text, record) {
+      const _data = {
+        id: record.id,
+        flag: record.isEnable ? '1' : '0'
       }
+      this.spinning = true
+      updateEnableStatus(_data).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.$refs.table.refresh()
+          this.spinning = false
+        }
+      })
+    },
+    // 促销编辑
+    promotionEdit (item) {
+      this.itemId = item.promoActiveSn
+      this.$nextTick(() => {
+        this.openAddModal = true
+      })
     },
-    // 删除
+    // 删除促销活动
     handleDel (row) {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: row.salesReturnBillSource == 'SALES' ? '确认要删除吗?' : '确认要取消吗?',
+        content: '点击确定,该内容将会被删除,不可再恢复!',
         centered: true,
         onOk () {
           _this.spinning = true
-          salesReturnDel({ salesReturnBillSn: row.salesReturnBillSn }).then(res => {
+          promoTerminalDel({ sn: row.promoActiveSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -297,53 +272,13 @@ export default {
         }
       })
     },
-    //  审核进度
-    handleEexamine (row) {
-      this.auditInfo = row
-      this.visibleAudit = true
-    },
-    beforeSubmit (row) {
-      this.auditInfo = row
-      this.openDepartUserModal = true
-    },
-    // 提交
-    handleSubmit (data) {
-      this.spinning = true
-      salesReturnSubmit({ salesReturnBillSn: this.auditInfo.salesReturnBillSn, ...data }).then(res => {
-        if (res.status == 200) {
-          this.$refs.table.refresh()
-          this.$message.success(res.message)
-        }
-        this.spinning = false
-      })
-    },
-    subareaChange (val) {
-      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
-    },
     resetSearchForm () {
       this.$refs.rangeCreateDate.resetDate(this.createDate)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-
-      this.$refs.rangeExamineDate.resetDate()
-      this.queryParam.beginAuditDate = ''
-      this.queryParam.endAuditDate = ''
-
-      this.queryParam.buyerSn = undefined
-      this.$refs.dealerSubareaScopeList.resetForm()
-      this.queryParam.salesReturnBillNo = ''
-      this.queryParam.purchaseReturnApplyNo = ''
-      this.queryParam.billStatus = undefined
-      this.queryParam.subareaArea.subareaSn = undefined
-      this.queryParam.subareaArea.subareaAreaSn = undefined
-      this.queryParam.syncFlag = undefined
-      this.queryParam.salesReturnBillSource = undefined
-      this.queryParam.shippingAddrProvinceSn = undefined
-      this.queryParam.warehouseSn = undefined
-      if (this.advanced) {
-        this.$refs.subarea.clearData()
-      }
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.name = ''
+      this.queryParam.showFlag = undefined
+      this.queryParam.state = undefined
       this.$refs.table.refresh(true)
     },
     pageInit () {
@@ -358,12 +293,6 @@ export default {
     }
   },
   watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
     }
@@ -392,14 +321,4 @@ export default {
 }
 </script>
 <style lang="less">
-  .salesReturn-wrap{
-    .sTable{
-      .badge-con-t{
-        .ant-badge-count{
-          transform: scale(0.8);
-          font-size: 13px;
-        }
-      }
-    }
-  }
 </style>