|
@@ -47,6 +47,7 @@
|
|
|
<v-select
|
|
|
v-model="queryParam.promoState"
|
|
|
ref="promoState"
|
|
|
+ :notIn="['HAVE_DISCARD','IS_OVER']"
|
|
|
id="promoProducts-promoState"
|
|
|
code="SHOP_PROMO_PROMO_STATE"
|
|
|
placeholder="请选择促销状态"
|
|
@@ -116,16 +117,18 @@
|
|
|
</template>
|
|
|
<!-- 活动规则 -->
|
|
|
<template slot="promoRules" slot-scope="text, record">
|
|
|
- <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'">买{{ record.conditionValue }}赠{{ record.resultValue }}</span>
|
|
|
- <span v-else-if="record.promoType==='PROMO_PROD'">优惠了{{ (record.shopProductPrice - record.resultValue)?(record.shopProductPrice - record.resultValue).toFixed(2):'--' }}元</span>
|
|
|
- <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'">返{{ record.resultValue ? record.resultValue.toFixed(2):'--' }}元</span>
|
|
|
+ <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'&&record.conditionValue&&record.resultValue">买{{ record.conditionValue }}赠{{ record.resultValue }}</span>
|
|
|
+ <div v-else-if="record.promoType==='PROMO_PROD'&&(record.shopProductPrice||record.shopProductPrice ==0)&&(record.conditionValue||record.conditionValue==0)">
|
|
|
+ <span>优惠{{ (record.shopProductPrice - record.conditionValue).toFixed(2) }}元</span>s
|
|
|
+ </div>
|
|
|
+ <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'&&record.resultValue">返{{ record.resultValue ? record.resultValue.toFixed(2):'--' }}元</span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
<!-- 促销售价 -->
|
|
|
<template slot="promoPrice" slot-scope="text, record">
|
|
|
- <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'">{{ record.shopProductPrice ?record.shopProductPrice.toFixed(2):'--' }}</span>
|
|
|
- <span v-else-if="record.promoType==='PROMO_PROD'">{{ (record.shopProductPrice - record.resultValue)?(record.shopProductPrice - record.resultValue).toFixed(2):'--' }}</span>
|
|
|
- <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'">{{ record.shopProductPrice?record.shopProductPrice.toFixed(2):'--' }}</span>
|
|
|
+ <span v-if="record.promoType==='BUY_PROD_GIVE_PROD'&&record.shopProductPrice">{{ record.shopProductPrice ?record.shopProductPrice.toFixed(2):'--' }}</span>
|
|
|
+ <span v-else-if="record.promoType==='PROMO_PROD'&&record.conditionValue">{{ record.conditionValue?record.conditionValue.toFixed(2):'--' }}</span>
|
|
|
+ <span v-else-if="record.promoType==='BUY_PROD_GIVE_VALID'&&record.shopProductPrice">{{ record.shopProductPrice?record.shopProductPrice.toFixed(2):'--' }}</span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
<!-- 商城类目 -->
|
|
@@ -176,7 +179,9 @@ export default {
|
|
|
promoType: undefined, // 促销状态
|
|
|
promoState: undefined, // 促销状态
|
|
|
categorySn: undefined, // 商城类目
|
|
|
- shopProductStatus: undefined// 商城状态
|
|
|
+ shopProductStatus: undefined, // 商城状态
|
|
|
+ shopProductDelFlag: 0, // 促销产品标志
|
|
|
+ promoStateList: ['NOT_RELEASE', 'HAVE_RELEASE']// 促销列表只查询这两种状态
|
|
|
},
|
|
|
categoryOptions: [], // 产品类目列表
|
|
|
fieldNames: { label: 'categoryName', value: 'categorySn', children: 'shopCategoryList' },
|
|
@@ -189,13 +194,13 @@ export default {
|
|
|
{ title: '品牌', dataIndex: 'productBrandName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
|
|
|
{ title: '促销名称', dataIndex: 'promoName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '促销时间', dataIndex: 'promoStartDate', align: 'center', width: '20%', scopedSlots: { customRender: 'promoTime' } },
|
|
|
+ { title: '促销时间', dataIndex: 'promoStartDate', align: 'center', width: '13%', scopedSlots: { customRender: 'promoTime' } },
|
|
|
{ title: '促销类型', dataIndex: 'promoTypeDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '活动规则', align: 'center', width: '7%', scopedSlots: { customRender: 'promoRules' } },
|
|
|
- { title: '促销状态', dataIndex: 'promoStateDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '活动规则', align: 'center', width: '12%', scopedSlots: { customRender: 'promoRules' } },
|
|
|
+ { title: '促销状态', dataIndex: 'promoStateDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '促销售价', width: '8%', align: 'right', scopedSlots: { customRender: 'promoPrice' } },
|
|
|
{ title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '15%', align: 'center' },
|
|
|
- { title: '产品商城状态', dataIndex: 'shopProductStatusDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '产品商城状态', dataIndex: 'shopProductStatusDictValue', align: 'center', width: '11%', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -243,6 +248,8 @@ export default {
|
|
|
this.queryParam.promoState = undefined
|
|
|
this.queryParam.shopProductStatus = undefined
|
|
|
this.queryParam.categorySn = undefined
|
|
|
+ this.queryParam.shopProductDelFlag = 0
|
|
|
+ this.queryParam.promoStateList = ['NOT_RELEASE', 'HAVE_RELEASE']
|
|
|
this.productType = []
|
|
|
this.category = []
|
|
|
this.$refs.table.refresh()
|