瀏覽代碼

促销活动

chenrui 9 月之前
父節點
當前提交
7dde8841f1

+ 124 - 220
src/views/easyPassManagement/homepageCarouselImg/chooseDealer.vue

@@ -1,88 +1,85 @@
 <template>
 <template>
-  <a-spin :spinning="spinning" tip="Loading...">
-    <!-- 搜索条件 -->
-    <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
-      <a-form id="chooseDealer-form" layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="8" :sm="24" v-if="pageType=='dealerPromotion'">
-            <a-form-model-item label="地区">
-              <AreaList id="chooseDealer-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="8" :sm="24">
-            <a-form-item label="经销商名称/别名">
-              <a-input id="chooseDealer-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入经销商名称/别名"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="8" :sm="24">
-            <a-form-item label="商户类型">
-              <dealerType id="chooseDealer-dealerType" changeOnSelect v-model="dealerType" @change="getDealerType" allowClear></dealertype>
-            </a-form-item>
-          </a-col>
-          <a-col :md="8" :sm="24">
-            <a-form-model-item label="商户级别" prop="dealerLevel">
-              <v-select
-                id="chooseDealer-dealerLevel"
-                code="DEALER_LEVEL"
-                v-model="queryParam.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-modal
+    title="选择经销商"
+    v-model="isShow"
+    :footer="null"
+    centered
+    class="lookUpCustomers-modal"
+    @cancel="isShow=false"
+    width="60%"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
+        <a-form id="chooseDealer-form" layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="8" :sm="24">
             <a-col :md="8" :sm="24">
-              <a-form-item label="审核状态">
-                <v-select code="AUDIT_STATE" id="chooseDealer-auditState" v-model="queryParam.auditState" allowClear placeholder="请选择审核状态"></v-select>
+              <a-form-item label="经销商名称/别名">
+                <a-input id="chooseDealer-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入经销商名称/别名"/>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="8" :sm="24">
             <a-col :md="8" :sm="24">
-              <a-form-model-item label="地区">
-                <AreaList id="chooseDealer-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              <a-form-item label="商户类型">
+                <dealerType id="chooseDealer-dealerType" changeOnSelect v-model="dealerType" @change="getDealerType" allowClear></dealertype>
+              </a-form-item>
+            </a-col>
+            <a-col :md="8" :sm="24">
+              <a-form-model-item label="商户级别" prop="dealerLevel">
+                <v-select
+                  id="chooseDealer-dealerLevel"
+                  code="DEALER_LEVEL"
+                  v-model="queryParam.dealerLevel"
+                  allowClear
+                  placeholder="请选择商户级别"></v-select>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </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 id="chooseDealer-add-btn" :loading="loading" @click="handleBatchAudit">批量添加</a-button>
-        <span style="margin-left: 5px">
-          <template v-if="selectCount"> {{ `已选 ${selectCount} 项` }} </template>
-        </span>
+            <a-col :md="8" :sm="24">
+              <a-form-item label="所在区域/分区">
+                <subarea id="chooseDealer-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <a-col :md="8" :sm="24">
+              <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 id="chooseDealer-add-btn" :loading="loading" @click="handleBatchAudit">批量添加</a-button>
+          <span style="margin-left: 5px">
+            <template v-if="selectCount"> {{ `已选 ${selectCount} 项` }} </template>
+          </span>
+        </div>
       </div>
       </div>
-    </div>
-    <a-table
-      style="height: 320px;"
-      :scroll="{ y: 230 }"
-      :bordered="true"
-      :pagination="pagination"
-      :row-key="record => record.dealerSn"
-      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
-      :columns="columns"
-      :data-source="dealerList"
-      @change="handlePage"
-    >
-      <template slot="addressInfo" slot-scope="text, record">
-        {{ record.provinceName }}{{ '-'+ record.cityName }}{{ '-'+ record.districtName }}
-      </template>
-    </a-table>
-  </a-spin>
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        style="height: 320px;"
+        size="small"
+        :rowKey="(record) => record.dealerSn"
+        rowKeyName="dealerSn"
+        :columns="columns"
+        :data="loadData"
+        :pageSize="20"
+        :row-selection="{ columnWidth: 40}"
+        @rowSelection="rowSelectionFun"
+        :scroll="{ y: 230}"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 地区 -->
+        <template slot="addressInfo" slot-scope="text, record">
+          {{ record.provinceName }}{{ '-'+ record.cityName }}{{ '-'+ record.districtName }}
+        </template>
+      </s-table>
+    </a-spin>
+  </a-modal>
 </template>
 </template>
 
 
 <script>
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 // 组件
 // 组件
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import AreaList from '@/views/common/areaList.js'
 import subarea from '@/views/common/subarea.js'
 import subarea from '@/views/common/subarea.js'
 import dealerType from '@/views/common/dealerType.js'
 import dealerType from '@/views/common/dealerType.js'
 // 接口
 // 接口
@@ -90,26 +87,20 @@ import { dealerQueryList, getDealerListInfo } from '@/api/dealer'
 export default {
 export default {
   name: 'ChooseDealer',
   name: 'ChooseDealer',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, AreaList, dealerType },
+  components: { STable, VSelect, subarea, dealerType },
   props: {
   props: {
-    pageType: {// 页面类型
-      type: String,
-      default: ''
-    },
-    parentData: {// 父级数据
-      type: Object,
-      default: function () {
-        return null
-      }
-    },
-    itemSn: {// 当前活动sn
-      type: String,
-      default: ''
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
     }
     }
   },
   },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false, // 批量添加loading
       dealerType: [], // 商户类型
       dealerType: [], // 商户类型
       //  查询条件
       //  查询条件
       queryParam: {
       queryParam: {
@@ -120,105 +111,54 @@ export default {
         subareaArea: {
         subareaArea: {
           subareaSn: undefined, //  区域
           subareaSn: undefined, //  区域
           subareaAreaSn: undefined // 分区
           subareaAreaSn: undefined // 分区
-        },
-        auditState: undefined, // 审核状态
-        provinceSn: undefined, // 省份sn
-        citySn: undefined, // 市sn
-        districtSn: undefined// 区sn
-      },
-      // 分页
-      pagination: {
-        pageSize: 20,
-        showSizeChanger: true,
-        pageSizeOptions: ['20', '50', '100', '200', '500']
+        }
       },
       },
-      pageFlag: false,
       chooseInfo: [], // 已选经销商列表
       chooseInfo: [], // 已选经销商列表
       selectedRowKeys: [], // 已选活动数据
       selectedRowKeys: [], // 已选活动数据
       dealerList: [], // 经销商列表数据
       dealerList: [], // 经销商列表数据
-      tableHeight: 0, // 表格高度
-      disabled: false, //  查询、重置按钮是否可操作
-      loading: false // 批量添加loading
-    }
-  },
-  computed: {
-    // 计算选择活动条数
-    selectCount () {
-      return this.selectedRowKeys && this.selectedRowKeys.length
-    },
-    // 表头
-    columns () {
-      const arr = [
+      rowSelectionInfo: null,
+      columns: [
         { title: '经销商名称', dataIndex: 'dealerName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '经销商名称', dataIndex: 'dealerName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户别名', dataIndex: 'dealerAlias', align: 'left', width: '25%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户别名', dataIndex: 'dealerAlias', align: 'left', width: '25%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户类型', dataIndex: 'dealerTypeName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户类型', dataIndex: 'dealerTypeName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
         { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
-      ]
-      if (this.pageType === 'dealerPromotion') {
-        arr.unshift({ title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '30%', align: 'center', ellipsis: true })
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return dealerQueryList(Object.assign(parameter, this.queryParam)).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
+              if (data.list[i].dealerTypeName1) {
+                data.list[i].dealerTypeName = data.list[i].dealerTypeName1 + '>' + data.list[i].dealerTypeName2
+              }
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
       }
       }
-      return arr
+    }
+  },
+  computed: {
+    // 计算选择活动条数
+    selectCount () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys && this.rowSelectionInfo.selectedRowKeys.length
     }
     }
   },
   },
   methods: {
   methods: {
-    // 已选活动数据
-    onSelectChange (selectedRowKeys) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    // 分页
-    handlePage (pagination, filters, sorter) {
-      const pager = { ...this.pagination }
-      pager.pageNo = pagination.pageSize != pager.pageSize ? 1 : pagination.current
-      pager.pageSize = pagination.pageSize
-      pager.current = pager.pageNo
-      this.pagination = pager
-      this.loadData()
-    },
-    // 获取列表数据
-    loadData () {
-      this.spinning = true
-      const params = { pageSize: 20, pageNo: 1, ...this.pagination }
-      this.queryParam.notDealerSn = this.itemSn ? this.itemSn : undefined
-      dealerQueryList(Object.assign(params, this.queryParam)).then(res => {
-        let data
-        if (res.status == 200) {
-          data = res.data
-          const pagination = { ...this.pagination }
-          pagination.total = data.count
-          const no = 0
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-            if (data.list[i].dealerTypeName1) {
-              data.list[i].dealerTypeName = data.list[i].dealerTypeName1 + '>' + data.list[i].dealerTypeName2
-            }
-          }
-          this.dealerList = data.list
-          this.pagination = pagination
-          if (this.chooseInfo.length > 0 && !this.pageFlag) {
-            this.pageFlag = true
-            this.selectedRowKeys = this.chooseInfo
-          }
-        }
-        this.spinning = false
-      })
-    },
     // 表格选中项
     // 表格选中项
     rowSelectionFun (obj) {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
       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 () {
-      this.loadData()
-      this.spinning = false
-    },
     // 区域分区
     // 区域分区
     subareaChange (val) {
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
@@ -231,7 +171,6 @@ export default {
     },
     },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
-      this.dealerType = []
       this.queryParam = {
       this.queryParam = {
         nameLike: '',
         nameLike: '',
         dealerType1: undefined, //  商户类型
         dealerType1: undefined, //  商户类型
@@ -240,74 +179,39 @@ export default {
         subareaArea: {
         subareaArea: {
           subareaSn: undefined, //  区域
           subareaSn: undefined, //  区域
           subareaAreaSn: undefined // 分区
           subareaAreaSn: undefined // 分区
-        },
-        auditState: undefined,
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined
-      }
-      if (this.pageType != 'viewDealers') {
-        this.$refs.subarea.clearData()
-        if (this.pageType == 'dealerPromotion') {
-          this.$refs.areaList.clearData()
         }
         }
-      } else {
-        this.$refs.areaList.clearData()
       }
       }
-
-      this.pagination.pageNo = 1
-      this.pagination.current = 1
-      this.loadData()
-      this.pageFlag = false
+      this.dealerType = []
+      this.$refs.subarea.clearData()
     },
     },
     // 批量添加
     // 批量添加
     async handleBatchAudit () {
     async handleBatchAudit () {
       const _this = this
       const _this = this
-      if (_this.selectedRowKeys && _this.selectedRowKeys.length < 1) {
+      if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys && this.rowSelectionInfo.selectedRowKeys.length < 1) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
         return
       }
       }
       const dealerInfoList = await getDealerListInfo({ dealerSnList: _this.selectedRowKeys })
       const dealerInfoList = await getDealerListInfo({ dealerSnList: _this.selectedRowKeys })
       this.spinning = false
       this.spinning = false
       this.$emit('plAdd', dealerInfoList.data)
       this.$emit('plAdd', dealerInfoList.data)
-    },
-    // 确定
-    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.selectedRowKeys = []
-      this.chooseInfo = data || []
-      this.resetSearchForm()
-    },
-    // 计算表格高度
-    setTableH () {
-      const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 285
     }
     }
   },
   },
   watch: {
   watch: {
-    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-      this.setTableH()
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.table.clearSelected()
+        this.resetSearchForm()
+      } else {
+        this.$nextTick(() => {
+          this.$refs.table.refresh()
+        })
+      }
     }
     }
   }
   }
 }
 }

+ 13 - 13
src/views/easyPassManagement/homepageCarouselImg/edit.vue

@@ -192,14 +192,8 @@
         v-if="form.contentType !='LINK'|| isShowNextStep ||(form.contentType ==='LINK'&&form.linkType ==='2')"
         v-if="form.contentType !='LINK'|| isShowNextStep ||(form.contentType ==='LINK'&&form.linkType ==='2')"
         style="padding: 0 60px;">保存</a-button>
         style="padding: 0 60px;">保存</a-button>
     </div>
     </div>
-    <!-- 添加产品 -->
-    <!-- <chooseProduct
-      ref="chooseProduct"
-      :chooseType="chooseTypeList"
-      :itemSn="$route.params.sn"
-      :openModal="showProModal"
-      @ok="addProductSuccess"
-      @close="closeProductModal"></chooseProduct> -->
+    <!-- 选择经销商 -->
+    <chooseDealer :openModal="openDealerModal" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -209,16 +203,14 @@ import moment from 'moment'
 // 组件
 // 组件
 import { VSelect, Upload } from '@/components'
 import { VSelect, Upload } from '@/components'
 import Editor from '@/components/WEeditor'
 import Editor from '@/components/WEeditor'
-// import promotionShowModal from './promotionShowModal'
-// import productTable from './productTable'
-// import chooseProduct from './chooseProductsModal.vue'
+import chooseDealer from './chooseDealer'
 // 接口
 // 接口
 import { productTypeQuery } from '@/api/productType'
 import { productTypeQuery } from '@/api/productType'
 import { promoActivePublish, promoActiveDetail, saveBatchEntity, promoCreateBatch, deleteByProductType } from '@/api/promoActive'
 import { promoActivePublish, promoActiveDetail, saveBatchEntity, promoCreateBatch, deleteByProductType } from '@/api/promoActive'
 export default {
 export default {
   name: 'ProductBrandEditModal',
   name: 'ProductBrandEditModal',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { VSelect, Upload, Editor },
+  components: { VSelect, Upload, Editor, chooseDealer },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
@@ -229,6 +221,7 @@ export default {
       },
       },
       productRangeList: [], // 产品范围列表
       productRangeList: [], // 产品范围列表
       chooseDealerList: [],
       chooseDealerList: [],
+      openDealerModal: false,
       // 链接配置内容
       // 链接配置内容
       form: {
       form: {
         promoActiveSn: undefined, // 促销活动sn
         promoActiveSn: undefined, // 促销活动sn
@@ -287,6 +280,8 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+
+    addDealerOk () {},
     // 禁用日期时间
     // 禁用日期时间
     disabledDate (current) {
     disabledDate (current) {
       return current && current < moment().startOf('day')
       return current && current < moment().startOf('day')
@@ -299,7 +294,12 @@ export default {
         this.form.promoRule.validEndDate = dateString[1] + ' 23:59:59'
         this.form.promoRule.validEndDate = dateString[1] + ' 23:59:59'
       }
       }
     },
     },
-    handleDealerModal () {},
+    closeDealerModal () {
+      this.openDealerModal = false
+    },
+    handleDealerModal () {
+      this.openDealerModal = true
+    },
     changeDealerScope () {},
     changeDealerScope () {},
     // 打开产品弹窗
     // 打开产品弹窗
     insterProduct (obj) {
     insterProduct (obj) {

+ 1 - 1
src/views/easyPassManagement/homepageCarouselImg/list.vue

@@ -133,7 +133,7 @@
       <!-- 封面展示 -->
       <!-- 封面展示 -->
       <imgShowModal v-drag ref="checkedImg" :openModal="openCheckedImgModal" @close="openCheckedImgModal=false"></imgShowModal>
       <imgShowModal v-drag ref="checkedImg" :openModal="openCheckedImgModal" @close="openCheckedImgModal=false"></imgShowModal>
       <!-- 查看 -->
       <!-- 查看 -->
-      <detail-Modal :openModal="openDetailModal" :itemSn="itemId" @close="closeDetailModal" @ok="$refs.table.refresh()" />
+      <detail-Modal :openModal="openDetailModal" :itemSn="itemId" @close="closeDetailModal" @ok="$refs.table.refresh()"/>
     </a-card>
     </a-card>
   </div>
   </div>
 </template>
 </template>

+ 267 - 0
src/views/easyPassManagement/promotionalActivities/chooseProductsModal.vue

@@ -0,0 +1,267 @@
+<template>
+  <a-modal
+    centered
+    class="chooseProducts-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="选择产品"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="70%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="products-con">
+        <!-- 搜索条件 -->
+        <div class="table-page-search-wrapper">
+          <a-form-model
+            ref="ruleForm"
+            class="form-model-con"
+            layout="inline"
+            :model="queryParam"
+            :label-col="formItemLayout.labelCol"
+            :wrapper-col="formItemLayout.wrapperCol">
+            <a-row :gutter="15">
+              <a-col :md="8" :sm="24">
+                <a-form-model-item label="产品编码">
+                  <a-input id="chooseProducts-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <a-form-model-item label="产品名称">
+                  <a-input id="chooseProducts-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <a-form-model-item label="产品分类">
+                  <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType" id="chooseProducts-productType"></productTypeAll>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="chooseProducts-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh()" :disabled="disabled" id="chooseProducts-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetData" :disabled="disabled" id="chooseProducts-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form-model>
+        </div>
+        <!-- 操作按钮 -->
+        <div style="margin-bottom: 10px">
+          <a-button type="primary" ghost id="chooseProducts-add" :loading="loading" @click="handleSave">批量添加</a-button>
+          <span style="margin-left: 5px">
+            <template v-if="selectCount"> {{ `已选 ${selectCount} 项` }} </template>
+          </span>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.productSn"
+          rowKeyName="productSn"
+          :row-selection="{ columnWidth: 40, getCheckboxProps:record =>({props: { disabled: this.chooseDataList && this.chooseDataList.indexOf(record.productSn) > -1 } })}"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :pagination="{pageSizeOptions: ['20','50','100','200','500']}"
+          :data="loadData"
+          :defaultLoadData="false"
+          style="max-height:460px;"
+          :scroll="{ y: 400 }"
+          bordered>
+          <!-- 产品分类 -->
+          <template slot="productType" slot-scope="text, record">
+            <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 包装数 -->
+          <template slot="productQty" slot-scope="text, record">
+            <span v-if="record.packQty">
+              {{ record.packQty }}{{ record.unit }}/{{ record.packQtyUnit?record.packQtyUnit:'--' }}
+            </span>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable } from '@/components'
+import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productTypeAll.js'
+// 接口
+import { productList } from '@/api/product'
+export default {
+  name: 'ChooseProductsModal',
+  components: { STable, ProductBrand, productTypeAll },
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    chooseData: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false, //  表格加载中
+      isShow: this.openModal, //  是否打开弹框
+      // form表单label 布局
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 20 }
+      },
+      //  查询条件
+      queryParam: {
+        name: '', // 产品名称
+        code: '', //  产品编码
+        productBrandSn: undefined, //  产品品牌
+        productType: [], // 产品分类
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      chooseDataList: [], // 已选择被禁用的数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '产品编码', dataIndex: 'code', align: 'center' },
+        { title: '产品名称', dataIndex: 'name', align: 'center', width: '18%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '品牌', dataIndex: 'productBrandName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
+        { title: '包装数', scopedSlots: { customRender: 'productQty' }, align: 'center' },
+        { title: '单位', dataIndex: 'unit', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据 有分页
+        return productList(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
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      rowSelectionInfo: null// 表格选中项
+    }
+  },
+  computed: {
+    // 计算表格选中条数
+    selectCount () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    // 重置数据
+    resetData () {
+      this.queryParam.code = ''
+      this.queryParam.name = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.queryParam.productType = []
+      this.$nextTick(() => {
+        this.$refs.table.refresh(true)
+      })
+    },
+    //  清空选项
+    resetSearchForm () {
+      this.$refs.table.clearSelected()
+    },
+    // 保存
+    handleSave () {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        this.$message.warning('请在列表勾选后再进行操作!')
+        return
+      }
+      const resultList = JSON.parse(JSON.stringify(this.rowSelectionInfo && this.rowSelectionInfo.selectedRows))
+      this.$emit('ok', resultList)
+      this.isShow = false
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    // 禁用
+    handleDisabled (list) {
+      this.chooseDataList = list
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.resetSearchForm()
+        this.rowSelectionInfo = null
+        this.$emit('close')
+      } else {
+        const _this = this
+        _this.resetData()
+        if (_this.chooseData && _this.chooseData.length > 0) {
+          let selectedRows = []
+          const selectedRowKeys = []
+          _this.chooseData.forEach(item => {
+            selectedRowKeys.push(item.goodsSn)
+          })
+          selectedRows = _this.chooseData
+          this.$nextTick(() => { // 页面渲染完成后的回调
+            _this.$refs.table.setTableSelected(selectedRowKeys, selectedRows) // 设置表格选中项
+          })
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseProducts-modal{
+    .products-con{
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 18 - 12
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -86,13 +86,7 @@
                 </a-row>
                 </a-row>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
-            <a-col
-              :xs="24"
-              :sm="24"
-              :md="24"
-              :lg="24"
-              :xl="24"
-              class="promotionEdit-image">
+            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
               <a-form-model-item label="封面图片" prop="imageSet" class="promotionEdit-img">
               <a-form-model-item label="封面图片" prop="imageSet" class="promotionEdit-img">
                 <Upload
                 <Upload
                   class="upload"
                   class="upload"
@@ -118,13 +112,13 @@
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item label="加盟商编辑" prop="promoRule.dealerEditFlag">
+              <a-form-model-item label="加盟商开关权限" prop="promoRule.dealerEditFlag">
                 <v-select
                 <v-select
                   v-model="form.contentType"
                   v-model="form.contentType"
                   id="promotion-contentType"
                   id="promotion-contentType"
                   code="FLAG"
                   code="FLAG"
                   showType="radio"
                   showType="radio"
-                  :disabled="isDisabled"
+                  :disabled="true"
                   @change="changeContentType"
                   @change="changeContentType"
                   allowClear></v-select>
                   allowClear></v-select>
               </a-form-model-item>
               </a-form-model-item>
@@ -346,6 +340,8 @@
       :openModal="showProModal"
       :openModal="showProModal"
       @ok="addProductSuccess"
       @ok="addProductSuccess"
       @close="closeProductModal"></chooseProduct>
       @close="closeProductModal"></chooseProduct>
+    <!-- 选择经销商 -->
+    <chooseDealer :openModal="openDealerModal" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -355,16 +351,16 @@ import moment from 'moment'
 // 组件
 // 组件
 import { VSelect, Upload } from '@/components'
 import { VSelect, Upload } from '@/components'
 import Editor from '@/components/WEeditor'
 import Editor from '@/components/WEeditor'
-// import promotionShowModal from './promotionShowModal'
+import chooseDealer from '@/views/easyPassManagement/homepageCarouselImg/chooseDealer'
 import productTable from './productTable'
 import productTable from './productTable'
-// import chooseProduct from './chooseProductsModal.vue'
+import chooseProduct from './chooseProductsModal.vue'
 // 接口
 // 接口
 import { productTypeQuery } from '@/api/productType'
 import { productTypeQuery } from '@/api/productType'
 import { promoActivePublish, promoActiveDetail, saveBatchEntity, promoCreateBatch, deleteByProductType } from '@/api/promoActive'
 import { promoActivePublish, promoActiveDetail, saveBatchEntity, promoCreateBatch, deleteByProductType } from '@/api/promoActive'
 export default {
 export default {
   name: 'ProductBrandEditModal',
   name: 'ProductBrandEditModal',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { VSelect, Upload, Editor, productTable },
+  components: { VSelect, Upload, Editor, productTable, chooseDealer, chooseProduct },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
@@ -375,6 +371,7 @@ export default {
       },
       },
       productRangeList: [], // 产品范围列表
       productRangeList: [], // 产品范围列表
       dateFormat: 'YYYY-MM-DD', // 促销时间显示格式
       dateFormat: 'YYYY-MM-DD', // 促销时间显示格式
+      openDealerModal: false,
       // 链接配置内容
       // 链接配置内容
       form: {
       form: {
         promoActiveSn: undefined, // 促销活动sn
         promoActiveSn: undefined, // 促销活动sn
@@ -434,6 +431,15 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    addDealerOk () {},
+    // 选择经销商
+    handleDealerModal () {
+      this.openDealerModal = true
+    },
+    // 关闭经销商弹窗
+    closeDealerModal () {
+      this.openDealerModal = false
+    },
     // 禁用日期时间
     // 禁用日期时间
     disabledDate (current) {
     disabledDate (current) {
       return current && current < moment().startOf('day')
       return current && current < moment().startOf('day')

+ 23 - 64
src/views/easyPassManagement/promotionalActivities/list.vue

@@ -18,9 +18,9 @@
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
               <a-form-item label="促销类型">
               <a-form-item label="促销类型">
                 <v-select
                 <v-select
-                  v-model="queryParam.publishState"
-                  ref="publishState"
-                  id="promotion-publishState"
+                  v-model="queryParam.promotionType"
+                  ref="promotionType"
+                  id="promotion-promotionType"
                   code="PROMO_STATE"
                   code="PROMO_STATE"
                   placeholder="请选择促销类型"
                   placeholder="请选择促销类型"
                   allowClear></v-select>
                   allowClear></v-select>
@@ -52,9 +52,9 @@
       <a-spin :spinning="spinning" tip="Loading...">
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 操作按钮 -->
         <!-- 操作按钮 -->
         <div class="table-operator" v-if="$hasPermissions('B_promotionManagementAdd')">
         <div class="table-operator" v-if="$hasPermissions('B_promotionManagementAdd')">
-          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="openAddModal = true">买产品送产品</a-button>
-          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="openAddModal = true">特价产品</a-button>
-          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="openAddModal = true">买产品返代金券</a-button>
+          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="handleEdit('product')">买产品送产品</a-button>
+          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="handleEdit('special')">特价产品</a-button>
+          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="handleEdit('coupon')">买产品返代金券</a-button>
         </div>
         </div>
         <s-table
         <s-table
           class="sTable fixPagination"
           class="sTable fixPagination"
@@ -81,12 +81,12 @@
           <template slot="promotionTime" slot-scope="text, record">
           <template slot="promotionTime" slot-scope="text, record">
             <span>{{ record.activeDateStart }}至{{ record.activeDateEnd }}</span>
             <span>{{ record.activeDateStart }}至{{ record.activeDateEnd }}</span>
           </template>
           </template>
-          <!-- 参与客户 -->
+          <!-- 参与经销商 -->
           <template slot="joinCustomers" slot-scope="text, record">
           <template slot="joinCustomers" slot-scope="text, record">
             <span @click="handleCustomers(record)" :id="'promotion-seeDealerInfo-'+record.id" v-if="record.dealerSnList&&record.dealerSnList.length>0">共有<span class="link-bule">{{ record.dealerSnList.length }}</span>个客户</span>
             <span @click="handleCustomers(record)" :id="'promotion-seeDealerInfo-'+record.id" v-if="record.dealerSnList&&record.dealerSnList.length>0">共有<span class="link-bule">{{ record.dealerSnList.length }}</span>个客户</span>
             <span v-else>共有0个客户</span>
             <span v-else>共有0个客户</span>
           </template>
           </template>
-          <!-- 促销描述 -->
+          <!-- 促销类型 -->
           <template slot="salesDesc" slot-scope="text, record">
           <template slot="salesDesc" slot-scope="text, record">
             <a-tooltip placement="rightBottom" v-if="record.description&&record.description.length>14">
             <a-tooltip placement="rightBottom" v-if="record.description&&record.description.length>14">
               <template slot="title">
               <template slot="title">
@@ -97,16 +97,6 @@
             <div v-else-if="!record.description" class="desc">--</div>
             <div v-else-if="!record.description" class="desc">--</div>
             <div v-else @click="promotionDesc(record)" :id="'promotion-description-'+record.id" class="link-bule">{{ record.description }}</div>
             <div v-else @click="promotionDesc(record)" :id="'promotion-description-'+record.id" class="link-bule">{{ record.description }}</div>
           </template>
           </template>
-          <!-- 促销展示 -->
-          <template slot="salesShow" slot-scope="text, record">
-            <div @click="handleSaleShow(record)" :id="'promotion-seeImgInfo-'+record.id" v-if="record.contentType!='LINK'&&record.imageSet && record.imageSet.length>0">
-              <img :src="record.imageSet[0]" alt="图片走丢啦" width="60" />
-            </div>
-            <div v-else-if="record.contentType=='LINK'&&record.imageSet && record.imageSet.length>0">
-              <img :src="record.imageSet[0]" alt="图片走丢啦" width="60" />
-            </div>
-            <span v-else>--</span>
-          </template>
           <!-- 操作 -->
           <!-- 操作 -->
           <!-- state状态 END已结束    CLOSE已关闭    PUBLISH  已发布    UNPUBLISH  未发布 -->
           <!-- state状态 END已结束    CLOSE已关闭    PUBLISH  已发布    UNPUBLISH  未发布 -->
           <template slot="action" slot-scope="text, record">
           <template slot="action" slot-scope="text, record">
@@ -116,7 +106,7 @@
                 type="link"
                 type="link"
                 class="button-warning"
                 class="button-warning"
                 :id="'promotion-edit-btn-'+record.id"
                 :id="'promotion-edit-btn-'+record.id"
-                @click="handleEdit(record)"
+                @click="handleEdit(record,'edit')"
                 v-if="(record.publishState=='UNPUBLISH' || record.publishState=='CLOSE') && $hasPermissions('B_promotionManagementEdit')">编辑</a-button>
                 v-if="(record.publishState=='UNPUBLISH' || record.publishState=='CLOSE') && $hasPermissions('B_promotionManagementEdit')">编辑</a-button>
               <a-button
               <a-button
                 size="small"
                 size="small"
@@ -148,15 +138,9 @@
           </template>
           </template>
         </s-table>
         </s-table>
       </a-spin>
       </a-spin>
-      <!-- 参与客户 -->
+      <!-- 参与经销商 -->
       <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
       <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
-      <!-- 促销描述 -->
-      <promotion-desc-modal :openModal="openDescModal" :con="descCon" @close="openDescModal = false;descCon=''"></promotion-desc-modal>
-      <!-- 促销展示 -->
-      <promotion-show-modal ref="showModal" :openModal="openShowModal" @close="openShowModal = false"></promotion-show-modal>
-      <!-- 新增 -->
-      <addModal :openModal="openAddModal" :itemId="itemId" @close="closeAddModal" @ok="$refs.table.refresh()"></addModal>
-      <!-- 查看 -->
+      <!-- 详情 -->
       <detail-Modal :openModal="openDetailModal" :itemSn="itemId" @close="closeDetailModal" @ok="$refs.table.refresh()" />
       <detail-Modal :openModal="openDetailModal" :itemSn="itemId" @close="closeDetailModal" @ok="$refs.table.refresh()" />
     </a-card>
     </a-card>
   </div>
   </div>
@@ -180,14 +164,10 @@ export default {
       spinning: false,
       spinning: false,
       tableHeight: 0, // 表格高度
       tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      openCustomerModal: false, // 打开参与客户弹窗
-      openDescModal: false, // 打开促销描述弹窗
-      openShowModal: false, // 打开促销展示弹窗
-      openAddModal: false, // 打开新增弹窗
+      openCustomerModal: false, // 打开参与经销商弹窗
       openDetailModal: false, // 打开详情弹窗
       openDetailModal: false, // 打开详情弹窗
       createDate: [], //  创建时间
       createDate: [], //  创建时间
       itemId: '', // 当前活动sn
       itemId: '', // 当前活动sn
-      descCon: '', // 描述内容
       pageType: '', // 发布类型  add  促销发布  edit 发布修改
       pageType: '', // 发布类型  add  促销发布  edit 发布修改
       dealerSn: [], // 经销商sn
       dealerSn: [], // 经销商sn
       // 查询参数
       // 查询参数
@@ -195,6 +175,7 @@ export default {
         beginDate: undefined, // 促销开始时间
         beginDate: undefined, // 促销开始时间
         endDate: undefined, // 促销结束时间
         endDate: undefined, // 促销结束时间
         name: '', // 促销名称
         name: '', // 促销名称
+        promotionType: '', // 促销类型
         publishState: undefined// 是否发布
         publishState: undefined// 是否发布
       },
       },
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
@@ -231,9 +212,10 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
-    // 关闭添加促销活动弹窗
-    closeAddModal () {
-      this.openAddModal = false; this.itemId = ''
+    //  创建时间  change
+    dateCreateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
     },
     },
     // 参与经销商
     // 参与经销商
     handleCustomers (row) {
     handleCustomers (row) {
@@ -242,36 +224,13 @@ export default {
         this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.dealerSnList ? row.dealerSnList : undefined, promoActiveSn: row.promoActiveSn })
         this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.dealerSnList ? row.dealerSnList : undefined, promoActiveSn: row.promoActiveSn })
       })
       })
     },
     },
-    //  创建时间  change
-    dateCreateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
-    },
     // 编辑
     // 编辑
-    handleEdit (row, type) {
-      const newType = row.imageSet && row.imageSet.length > 0 ? 'edit' : type
-      this.$router.push({ name: 'promotionalAddActivity', params: { sn: row.promoActiveSn, pageType: newType } })
-    },
-    // 促销展示
-    handleSaleShow (record) {
-      this.openShowModal = true
-      this.$nextTick(() => {
-        this.$refs.showModal.pageInit({ type: record.contentType, con: record.content })
-      })
-    },
-    // 促销编辑
-    promotionEdit (item) {
-      this.itemId = item.promoActiveSn
-      this.$nextTick(() => {
-        this.openAddModal = true
-      })
-    },
-    // 促销描述
-    promotionDesc (row) {
-      this.descCon = row.description
-      this.$nextTick(() => {
-        this.openDescModal = true
-      })
+    handleEdit (type, row) {
+      const params = { pageType: type }
+      if (type === 'edit') {
+        params.sn = row.promoActiveSn
+      }
+      this.$router.push({ name: 'promotionalAddActivity', params })
     },
     },
     // 删除促销活动
     // 删除促销活动
     handleDel (row) {
     handleDel (row) {