chenrui hai 8 meses
pai
achega
7f19b291c7

+ 1 - 1
src/config/router.config.js

@@ -3688,7 +3688,7 @@ export const asyncRouterMap = [
           {
           {
             path: '/easyPassManagement/homepageCarouselImg',
             path: '/easyPassManagement/homepageCarouselImg',
             redirect: '/easyPassManagement/homepageCarouselImg/list',
             redirect: '/easyPassManagement/homepageCarouselImg/list',
-            name: 'homepageCarouselImg',
+            name: 'carouselImageList',
             component: BlankLayout,
             component: BlankLayout,
             meta: {
             meta: {
               title: '首页轮播图',
               title: '首页轮播图',

+ 18 - 5
src/views/easyPassManagement/homepageCarouselImg/chooseDealer.vue

@@ -39,7 +39,7 @@
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="8" :sm="24">
             <a-col :md="8" :sm="24">
-              <a-button type="primary" @click="searchForm(true)" :disabled="disabled" id="chooseDealer-refresh">查询</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseDealer-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseDealer-reset">重置</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseDealer-reset">重置</a-button>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -62,7 +62,7 @@
         :columns="columns"
         :columns="columns"
         :data="loadData"
         :data="loadData"
         :pageSize="20"
         :pageSize="20"
-        :row-selection="{ columnWidth: 40}"
+        :row-selection="{ columnWidth: 40,getCheckboxProps: record => ({ props: { disabled:record.isDisabled } }) }"
         @rowSelection="rowSelectionFun"
         @rowSelection="rowSelectionFun"
         :scroll="{ y: 230}"
         :scroll="{ y: 230}"
         :defaultLoadData="false"
         :defaultLoadData="false"
@@ -83,7 +83,7 @@ import { STable, VSelect } from '@/components'
 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'
 // 接口
 // 接口
-import { dealerQueryList, getDealerListInfo } from '@/api/dealer'
+import { dealerQueryList } from '@/api/dealer'
 export default {
 export default {
   name: 'ChooseDealer',
   name: 'ChooseDealer',
   mixins: [commonMixin],
   mixins: [commonMixin],
@@ -92,6 +92,12 @@ export default {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
       type: Boolean,
       type: Boolean,
       default: false
       default: false
+    },
+    disabledList: {
+      type: Array,
+      default: () => {
+        return []
+      }
     }
     }
   },
   },
   data () {
   data () {
@@ -139,6 +145,13 @@ export default {
               if (data.list[i].dealerTypeName1) {
               if (data.list[i].dealerTypeName1) {
                 data.list[i].dealerTypeName = data.list[i].dealerTypeName1 + '>' + data.list[i].dealerTypeName2
                 data.list[i].dealerTypeName = data.list[i].dealerTypeName1 + '>' + data.list[i].dealerTypeName2
               }
               }
+              if (this.disabledList && this.disabledList.length > 0) {
+                if (this.disabledList.includes(data.list[i].dealerSn)) {
+                  data.list[i].isDisabled = true
+                } else {
+                  data.list[i].isDisabled = false
+                }
+              }
             }
             }
             this.disabled = false
             this.disabled = false
           }
           }
@@ -183,6 +196,7 @@ export default {
       }
       }
       this.dealerType = []
       this.dealerType = []
       this.$refs.subarea.clearData()
       this.$refs.subarea.clearData()
+      this.$refs.table.refresh()
     },
     },
     // 批量添加
     // 批量添加
     handleBatchAudit () {
     handleBatchAudit () {
@@ -205,10 +219,9 @@ export default {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
         this.$refs.table.clearSelected()
         this.$refs.table.clearSelected()
-        this.resetSearchForm()
       } else {
       } else {
         this.$nextTick(() => {
         this.$nextTick(() => {
-          this.$refs.table.refresh()
+          this.resetSearchForm()
         })
         })
       }
       }
     }
     }

+ 5 - 2
src/views/easyPassManagement/homepageCarouselImg/edit.vue

@@ -98,7 +98,7 @@
                   :maxNums="1"
                   :maxNums="1"
                   @change="changeImage"
                   @change="changeImage"
                   listType="picture-card"></Upload>
                   listType="picture-card"></Upload>
-                <span class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(420px)*高(230px)</span>
+                <span class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(750px)*高(300px)</span>
               </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">
@@ -164,7 +164,7 @@
         style="padding: 0 60px;">保存</a-button>
         style="padding: 0 60px;">保存</a-button>
     </div>
     </div>
     <!-- 选择经销商 -->
     <!-- 选择经销商 -->
-    <chooseDealer :openModal="openDealerModal" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
+    <chooseDealer :openModal="openDealerModal" :disabledList="chooseSnList" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -209,6 +209,7 @@ export default {
         contentLink: '', // 内容链接
         contentLink: '', // 内容链接
         state: 'UNPUBLISH'// 发布状态
         state: 'UNPUBLISH'// 发布状态
       },
       },
+      chooseSnList: [],
       dateFormat: 'YYYY-MM-DD', // 有效期时间格式
       dateFormat: 'YYYY-MM-DD', // 有效期时间格式
       notShowSel: ['PROMO_LINK'], // 是否显示促销活动选择按钮
       notShowSel: ['PROMO_LINK'], // 是否显示促销活动选择按钮
       // 表单验证规则
       // 表单验证规则
@@ -249,10 +250,12 @@ export default {
     },
     },
     // 打开 选择经销商弹窗
     // 打开 选择经销商弹窗
     handleDealerModal () {
     handleDealerModal () {
+      this.chooseSnList = this.chooseDealerList.map(item => item.dealerSn)
       this.openDealerModal = true
       this.openDealerModal = true
     },
     },
     // 关闭 选择经销商弹窗
     // 关闭 选择经销商弹窗
     closeDealerModal () {
     closeDealerModal () {
+      this.chooseSnList = []
       this.openDealerModal = false
       this.openDealerModal = false
     },
     },
     // 参与经销商 change
     // 参与经销商 change

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

@@ -41,7 +41,7 @@
       <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" id="carouselImage-add-btn" @click="handleAddOrEdit">新增</a-button>
+          <a-button type="primary" id="carouselImage-add-btn" @click="handleAddOrEdit()">新增</a-button>
         </div>
         </div>
         <s-table
         <s-table
           class="sTable fixPagination"
           class="sTable fixPagination"
@@ -234,7 +234,7 @@ export default {
       } else {
       } else {
         tipDetail = '点击确定,该内容将会被删除,不可再恢复!'
         tipDetail = '点击确定,该内容将会被删除,不可再恢复!'
         ajaxData.state = undefined
         ajaxData.state = undefined
-        ajaxData.delFlag = val
+        ajaxData.isDel = val
       }
       }
       this.$confirm({
       this.$confirm({
         title: '提示',
         title: '提示',

+ 3 - 3
src/views/easyPassManagement/promotionalActivities/detailModal.vue

@@ -109,14 +109,14 @@
                     bordered>
                     bordered>
                     <!-- 特价产品 标题 -->
                     <!-- 特价产品 标题 -->
                     <template slot="titleType">
                     <template slot="titleType">
-                      {{ form.promoType==='PROMO_PROD'?form.promoType==='STRAIGHT_DOWN'?'直降金额':'折扣(%)':form.promoType==='BUY_PROD_GIVE_VALID'?'返券金额':'--' }}
+                      {{ form.promoType==='PROMO_PROD'?form.discountType==='STRAIGHT_DOWN'?'直降金额':'折扣(%)':form.promoType==='BUY_PROD_GIVE_VALID'?'返券金额':'--' }}
                     </template>
                     </template>
                     <!-- 特价价格-->
                     <!-- 特价价格-->
                     <template slot="specialOffer" slot-scope="text,record">
                     <template slot="specialOffer" slot-scope="text,record">
                       <!-- 直降 -->
                       <!-- 直降 -->
-                      <span v-if="form.discountType==='STRAIGHT_DOWN'">{{ (record.shopProductPrice-record.resultValue).toFixed(2) }}</span>
+                      <span v-if="form.discountType==='STRAIGHT_DOWN'">{{ (record.resultValue&&record.shopProductPrice)?(record.shopProductPrice-record.resultValue).toFixed(2):'--' }}</span>
                       <!-- 折扣 -->
                       <!-- 折扣 -->
-                      <span v-else>{{ (record.shopProductPrice*record.resultValue/100).toFixed(2) }}</span>
+                      <span v-else>{{ (record.resultValue&&record.shopProductPrice)? (record.shopProductPrice*record.resultValue/100).toFixed(2):'--' }}</span>
                     </template>
                     </template>
                   </s-table>
                   </s-table>
                 </div>
                 </div>

+ 39 - 72
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -46,7 +46,6 @@
                 <a-input-number
                 <a-input-number
                   style="width:100%"
                   style="width:100%"
                   id="promotionEdit-sort"
                   id="promotionEdit-sort"
-                  :disabled="isDisabled"
                   allowClear
                   allowClear
                   placeholder="请输入排序数字(数字越大越靠后)"
                   placeholder="请输入排序数字(数字越大越靠后)"
                   v-model="form.sort"
                   v-model="form.sort"
@@ -104,7 +103,6 @@
               <a-form-model-item label="促销描述" prop="description">
               <a-form-model-item label="促销描述" prop="description">
                 <a-input
                 <a-input
                   v-model="form.description"
                   v-model="form.description"
-                  :disabled="isDisabled"
                   type="textarea"
                   type="textarea"
                   id="promotionEdit-description"
                   id="promotionEdit-description"
                   placeholder="请输入促销描述(最多500个字符)"
                   placeholder="请输入促销描述(最多500个字符)"
@@ -277,12 +275,11 @@
                       <a-button
                       <a-button
                         type="primary"
                         type="primary"
                         id="promotionEdit-addSet-btn"
                         id="promotionEdit-addSet-btn"
-                        :disabled="isDisabled"
                         class="button-primary"
                         class="button-primary"
                         size="small"
                         size="small"
                         @click="handleBatchAdd">批量设置</a-button>
                         @click="handleBatchAdd">批量设置</a-button>
                     </div>
                     </div>
-                    <a-button type="primary" id="promotionEdit-add-btn" :disabled="isDisabled" @click="handleAddProduct" size="small">选择产品</a-button>
+                    <a-button type="primary" id="promotionEdit-add-btn" @click="showProModal = true" size="small">选择产品</a-button>
                   </div>
                   </div>
                 </a-form-model-item>
                 </a-form-model-item>
               </a-col>
               </a-col>
@@ -317,8 +314,6 @@
     <!-- 添加产品 -->
     <!-- 添加产品 -->
     <chooseProduct
     <chooseProduct
       ref="chooseProduct"
       ref="chooseProduct"
-      :chooseType="chooseTypeList"
-      :itemSn="$route.params.sn"
       :openModal="showProModal"
       :openModal="showProModal"
       @ok="addProductSuccess"
       @ok="addProductSuccess"
       @close="closeProductModal"></chooseProduct>
       @close="closeProductModal"></chooseProduct>
@@ -352,8 +347,7 @@ export default {
       },
       },
       productRangeList: [], // 产品范围列表
       productRangeList: [], // 产品范围列表
       dateFormat: 'YYYY-MM-DD', // 促销时间显示格式
       dateFormat: 'YYYY-MM-DD', // 促销时间显示格式
-      openDealerModal: false,
-
+      openDealerModal: false, // 打开选择经销商弹窗
       pageType: undefined, // 促销类型
       pageType: undefined, // 促销类型
       // 链接配置内容
       // 链接配置内容
       form: {
       form: {
@@ -388,10 +382,6 @@ export default {
       promotionName: '', // 促销名称
       promotionName: '', // 促销名称
       showProModal: false, // 打开产品弹窗
       showProModal: false, // 打开产品弹窗
       isShowNextStep: false, // 是否显示下一步 并提交一半配置产品
       isShowNextStep: false, // 是否显示下一步 并提交一半配置产品
-      isDisabled: false, // 控制页面是否能编辑
-      chooseTypeList: [], // 已选中产品范围
-      imageSet: [], // 回显显示图片数据
-      productTypeList: [], // 产品范围    列表数据
       // 表单验证规则
       // 表单验证规则
       rules: {
       rules: {
         promoName: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
         promoName: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
@@ -411,12 +401,14 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    // 参与经销商  change
     changeDealerScope () {},
     changeDealerScope () {},
-    addDealerOk () {},
-    // 选择经销商
+    // 部分 打开选择经销商弹窗
     handleDealerModal () {
     handleDealerModal () {
       this.openDealerModal = true
       this.openDealerModal = true
     },
     },
+    // 添加参与经销商成功
+    addDealerOk () {},
     // 关闭经销商弹窗
     // 关闭经销商弹窗
     closeDealerModal () {
     closeDealerModal () {
       this.openDealerModal = false
       this.openDealerModal = false
@@ -445,13 +437,7 @@ export default {
         this.timeLimit = []
         this.timeLimit = []
       }
       }
     },
     },
-    // 打开产品弹窗
-    insterProduct (obj) {
-      if (obj && Object.keys(obj).length > 0) {
-        this.chooseTypeList = obj.typeArr
-      }
-      this.showProModal = true
-    },
+    // 选择优惠方式 change
     async handleDiscountType (val) {
     async handleDiscountType (val) {
       this.form.discountType = val
       this.form.discountType = val
       this.resultValue = undefined
       this.resultValue = undefined
@@ -460,6 +446,24 @@ export default {
         this.$refs.chooseProductList.pageInit()
         this.$refs.chooseProductList.pageInit()
       }
       }
     },
     },
+    // 添加产品成功
+    addProductSuccess (list) {
+      const productArr = list.map(item => {
+        return {
+          promoSn: this.form.promoSn,
+          shopProductSn: item.shopProductSn,
+          productSn: item.productSn,
+          productCode: item.productCode
+        }
+      })
+      saveChooseProduct(productArr).then(res => {
+        if (res.status == 200) {
+          this.showProModal = false
+          // 获取产品列表 有分页
+          this.$refs.chooseProductList.pageInit()
+        }
+      })
+    },
     // 关闭产品弹窗
     // 关闭产品弹窗
     closeProductModal () {
     closeProductModal () {
       this.showProModal = false
       this.showProModal = false
@@ -522,25 +526,25 @@ export default {
       const _this = this
       const _this = this
       _this.form.promoType = _this.pageType
       _this.form.promoType = _this.pageType
       var formData = JSON.parse(JSON.stringify(_this.form))
       var formData = JSON.parse(JSON.stringify(_this.form))
+      if (formData.promoType === 'BUY_PROD_GIVE_VALID') {
+        if (formData.validType === 'FIXED') {
+          if (!formData.validStartDate || !formData.validEndDate) {
+            _this.$message.warning('请输入券有效期!')
+            return false
+          }
+        } else {
+          if (!formData.validDays) {
+            _this.$message.warning('请输入券有效期!')
+            return false
+          }
+        }
+      }
       if (type === 'all') {
       if (type === 'all') {
         formData.productNum = _this.$refs.chooseProductList.getChooseProductNum()
         formData.productNum = _this.$refs.chooseProductList.getChooseProductNum()
         if (formData.productNum && formData.productNum == 0) {
         if (formData.productNum && formData.productNum == 0) {
           _this.$message.warning('请先选择产品!')
           _this.$message.warning('请先选择产品!')
           return
           return
         }
         }
-        if (formData.promoType === 'BUY_PROD_GIVE_VALID') {
-          if (formData.validType === 'FIXED') {
-            if (!formData.validStartDate || !formData.validEndDate) {
-              _this.$message.warning('请输入券有效期!')
-              return false
-            }
-          } else {
-            if (!formData.validDays) {
-              _this.$message.warning('请输入券有效期!')
-              return false
-            }
-          }
-        }
         delete formData.productNum
         delete formData.productNum
       }
       }
       delete formData.time
       delete formData.time
@@ -587,17 +591,6 @@ export default {
     },
     },
     // 重置
     // 重置
     resetSearchForm () {
     resetSearchForm () {
-      if (this.pageType == 'add' || (this.pageType == 'edit' && !this.isDisabled)) {
-        if (this.$refs.imageSet) {
-          this.$refs.imageSet.setFileList('')
-        }
-        if (this.$refs.videoSet) {
-          this.$refs.videoSet.setFileList('')
-        }
-      }
-      if (this.$refs.editor) {
-        this.$refs.editor.setHtml('')
-      }
       this.form = {
       this.form = {
         promoType: undefined, // 促销类型
         promoType: undefined, // 促销类型
         promoName: '', // '促销名称'
         promoName: '', // '促销名称'
@@ -623,20 +616,12 @@ export default {
         validInfo: '', // 使用说明
         validInfo: '', // 使用说明
         productNum: 0
         productNum: 0
       }
       }
+      this.$refs.imageSet.setFileList('')
       this.isShowNextStep = false
       this.isShowNextStep = false
-      this.isDisabled = false
-      if (this.$refs.ruleForm) {
-        this.$refs.ruleForm.resetFields()
-      }
       if (this.$refs.ruleForm) {
       if (this.$refs.ruleForm) {
         this.$refs.ruleForm.resetFields()
         this.$refs.ruleForm.resetFields()
       }
       }
     },
     },
-    // 添加产品
-    handleAddProduct () {
-      this.chooseTypeList = this.productRangeList
-      this.showProModal = true
-    },
     // 批量设置
     // 批量设置
     handleBatchAdd () {
     handleBatchAdd () {
       if (!this.conditionValue && !this.resultValue) {
       if (!this.conditionValue && !this.resultValue) {
@@ -645,24 +630,6 @@ export default {
       }
       }
       this.$refs.chooseProductList.editMorePrice({ conditionValue: this.conditionValue, resultValue: this.resultValue })
       this.$refs.chooseProductList.editMorePrice({ conditionValue: this.conditionValue, resultValue: this.resultValue })
     },
     },
-    // 添加产品成功
-    addProductSuccess (list) {
-      const productArr = list.map(item => {
-        return {
-          promoSn: this.form.promoSn,
-          shopProductSn: item.shopProductSn,
-          productSn: item.productSn,
-          productCode: item.productCode
-        }
-      })
-      saveChooseProduct(productArr).then(res => {
-        if (res.status == 200) {
-          this.showProModal = false
-          // 获取产品列表 有分页
-          this.$refs.chooseProductList.pageInit()
-        }
-      })
-    },
     // 初始化
     // 初始化
     pageInit () {
     pageInit () {
       if (this.$route.params.pageType === 'edit') {
       if (this.$route.params.pageType === 'edit') {

+ 13 - 12
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.promotionType"
+                  v-model="queryParam.promoType"
                   ref="promotionType"
                   ref="promotionType"
-                  id="promotion-promotionType"
+                  id="promotion-promoType"
                   code="SHOP_PROMO_PROMO_TYPE"
                   code="SHOP_PROMO_PROMO_TYPE"
                   placeholder="请选择促销类型"
                   placeholder="请选择促销类型"
                   allowClear></v-select>
                   allowClear></v-select>
@@ -32,7 +32,7 @@
                   v-model="queryParam.promoState"
                   v-model="queryParam.promoState"
                   ref="promoState"
                   ref="promoState"
                   id="promotion-promoState"
                   id="promotion-promoState"
-                  code="PROMOTION_STATE"
+                  code="SHOP_PROMO_PROMO_STATE"
                   placeholder="请选择促销状态"
                   placeholder="请选择促销状态"
                   allowClear></v-select>
                   allowClear></v-select>
               </a-form-item>
               </a-form-item>
@@ -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="handleEdit('BUY_PROD_GIVE_PROD')">买产品送产品</a-button>
-          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="handleEdit('PROMO_PROD')">特价产品</a-button>
-          <a-button type="primary" class="button-info" id="promotion-add-btn" @click="handleEdit('BUY_PROD_GIVE_VALID')">买产品返代金券</a-button>
+          <a-button type="primary" class="button-info" id="promotion-add1-btn" @click="handleEdit('BUY_PROD_GIVE_PROD')">买产品送产品</a-button>
+          <a-button type="primary" class="button-info" id="promotion-add2-btn" @click="handleEdit('PROMO_PROD')">特价产品</a-button>
+          <a-button type="primary" class="button-info" id="promotion-add3-btn" @click="handleEdit('BUY_PROD_GIVE_VALID')">买产品返代金券</a-button>
         </div>
         </div>
         <s-table
         <s-table
           class="sTable fixPagination"
           class="sTable fixPagination"
@@ -91,7 +91,7 @@
               <div @click="promotionDesc(record)" :id="'promotion-description-'+record.id" class="link-bule">{{ record.description }}</div>
               <div @click="promotionDesc(record)" :id="'promotion-description-'+record.id" class="link-bule">{{ record.description }}</div>
             </a-tooltip>
             </a-tooltip>
             <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-description1-'+record.id" class="link-bule">{{ record.description }}</div>
           </template>
           </template>
           <!-- 操作 -->
           <!-- 操作 -->
           <!-- promoState状态 END已结束    HAVE_DISCARD已废弃    HAVE_RELEASE  已发布    NOT_RELEASE  未发布 -->
           <!-- promoState状态 END已结束    HAVE_DISCARD已废弃    HAVE_RELEASE  已发布    NOT_RELEASE  未发布 -->
@@ -108,14 +108,14 @@
                 size="small"
                 size="small"
                 type="link"
                 type="link"
                 class="button-warning"
                 class="button-warning"
-                :id="'promotion-modify-btn-'+record.id"
+                :id="'promotion-abandon-btn-'+record.id"
                 v-if="(record.promoState=='HAVE_RELEASE') && $hasPermissions('B_promotionManagementEdit')"
                 v-if="(record.promoState=='HAVE_RELEASE') && $hasPermissions('B_promotionManagementEdit')"
                 @click="handleAbandon(record)">废弃</a-button>
                 @click="handleAbandon(record)">废弃</a-button>
               <a-button
               <a-button
                 size="small"
                 size="small"
                 type="link"
                 type="link"
                 class="button-warning"
                 class="button-warning"
-                :id="'promotion-modify-btn-'+record.id"
+                :id="'promotion-img-btn-'+record.id"
                 v-if="(record.promoState=='HAVE_RELEASE') && $hasPermissions('B_promotionManagementEdit')"
                 v-if="(record.promoState=='HAVE_RELEASE') && $hasPermissions('B_promotionManagementEdit')"
                 @click="handleSet(record)">轮播图</a-button>
                 @click="handleSet(record)">轮播图</a-button>
               <a-button
               <a-button
@@ -201,7 +201,7 @@ export default {
         beginDate: undefined, // 促销开始时间
         beginDate: undefined, // 促销开始时间
         endDate: undefined, // 促销结束时间
         endDate: undefined, // 促销结束时间
         promoName: '', // 促销名称
         promoName: '', // 促销名称
-        promotionType: '', // 促销类型
+        promoType: '', // 促销类型
         promoState: undefined// 是否发布
         promoState: undefined// 是否发布
       },
       },
       itemId: '', // 当前活动sn
       itemId: '', // 当前活动sn
@@ -305,11 +305,12 @@ export default {
     },
     },
     // 重置
     // 重置
     resetSearchForm () {
     resetSearchForm () {
-      this.$refs.rangeCreateDate.resetDate(this.createDate)
+      this.createDate = []
+      this.$refs.rangeCreateDate.resetDate([])
       this.queryParam.beginDate = undefined
       this.queryParam.beginDate = undefined
       this.queryParam.endDate = undefined
       this.queryParam.endDate = undefined
       this.queryParam.promoName = ''
       this.queryParam.promoName = ''
-      this.queryParam.promotionType = ''
+      this.queryParam.promoType = ''
       this.queryParam.promoState = undefined
       this.queryParam.promoState = undefined
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },

+ 9 - 3
src/views/easyPassManagement/promotionalActivities/productTable.vue

@@ -60,9 +60,9 @@
         <!-- 特价价格-->
         <!-- 特价价格-->
         <template slot="specialOffer" slot-scope="text,record">
         <template slot="specialOffer" slot-scope="text,record">
           <!-- 直降 -->
           <!-- 直降 -->
-          <span v-if="discountType==='STRAIGHT_DOWN'">{{ record.resultValue?(record.shopProductPrice-record.resultValue).toFixed(2):'--' }}</span>
+          <span v-if="discountType==='STRAIGHT_DOWN'">{{ (record.resultValue&&record.shopProductPrice)?(record.shopProductPrice-record.resultValue).toFixed(2):'--' }}</span>
           <!-- 折扣 -->
           <!-- 折扣 -->
-          <span v-else>{{ record.resultValue?(record.shopProductPrice*record.resultValue/100).toFixed(2):'--' }}</span>
+          <span v-else>{{ (record.resultValue&&record.shopProductPrice)?(record.shopProductPrice*record.resultValue/100).toFixed(2):'--' }}</span>
         </template>
         </template>
         <!-- 操作 -->
         <!-- 操作 -->
         <template slot="action" slot-scope="text,record">
         <template slot="action" slot-scope="text,record">
@@ -190,7 +190,13 @@ export default {
         this.$message.warning('请选择要修改的产品!')
         this.$message.warning('请选择要修改的产品!')
         return
         return
       }
       }
-      const ajaxArr = this.rowSelectionInfo.selectedRows.map(item => { return { id: item.id, promoSn: this.promoActiveSn, conditionValue: objInfo.conditionValue, resultValue: objInfo.resultValue } })
+      let ajaxArr = []
+      if (this.activeType === 'PROMO_PROD' && this.discountType === 'STRAIGHT_DOWN') {
+        ajaxArr = this.rowSelectionInfo.selectedRows.map(item => { return { id: item.id, promoSn: this.promoActiveSn, productPrice: item.shopProductPrice, conditionValue: (item.shopProductPrice - objInfo.resultValue), resultValue: objInfo.resultValue } })
+      } else {
+        ajaxArr = this.rowSelectionInfo.selectedRows.map(item => { return { id: item.id, promoSn: this.promoActiveSn, conditionValue: objInfo.conditionValue, resultValue: objInfo.resultValue } })
+      }
+
       this.editProductVal(ajaxArr, 'all')
       this.editProductVal(ajaxArr, 'all')
     },
     },
     // 删除
     // 删除