Commit f8cc12b1 by chenwq

优惠券-核销记录列表

1 parent 7c658190
...@@ -71,6 +71,17 @@ const deleteCouponApi = params => { ...@@ -71,6 +71,17 @@ const deleteCouponApi = params => {
}) })
} }
// 核销记录-券来源
const getPackageListApi = params => {
params.method = 'scrm.api.equity.package.gh.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
//核销记录列表 //核销记录列表
const getVerificationListApi = params => { const getVerificationListApi = params => {
params.method = `${defaultPath}verification.code.verification.list` params.method = `${defaultPath}verification.code.verification.list`
...@@ -173,4 +184,4 @@ const getAllGoodsApi = params => { ...@@ -173,4 +184,4 @@ const getAllGoodsApi = params => {
}) })
} }
export default { getCouponListApi, couponExportApi, couponGroupExportApi, couponStoreExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi } export default { getCouponListApi, couponExportApi, couponGroupExportApi, couponStoreExportApi, getPackageListApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
...@@ -307,10 +307,11 @@ export default { ...@@ -307,10 +307,11 @@ export default {
} }
// 适用范围 // 适用范围
if (this.$isGroupUp) { if (this.$isGroupUp) {
this.coupon.scopeApplicationTxt = { this.coupon.scopeApplicationTxt =
1: '旗下所有店通用', {
2: '旗下品牌店通用' 1: '旗下所有店通用',
}[coupon.scopeApplication] 2: '旗下品牌店通用'
}[coupon.scopeApplication] || '-'
} }
}) })
}, },
......
...@@ -54,9 +54,9 @@ ...@@ -54,9 +54,9 @@
<span class="cursor-pointer" @click="couponNameHandleDetail(scope.scope)" v-if="scope.scope.directionalGiftId">{{ scope.scope.directionalGiftName }}</span> <span class="cursor-pointer" @click="couponNameHandleDetail(scope.scope)" v-if="scope.scope.directionalGiftId">{{ scope.scope.directionalGiftName }}</span>
<span class="cursor-pointer" @click="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span> <span class="cursor-pointer" @click="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span>
</span> </span>
<span slot="verificationTime" slot-scope="scope"> <!-- <span slot="verificationTime" slot-scope="scope">
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span> <span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span> </span> -->
</GLTable> </GLTable>
<glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :hasScroll="false" width="580px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :hasScroll="false" width="580px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body"> <div class="content-body">
...@@ -94,11 +94,11 @@ export default { ...@@ -94,11 +94,11 @@ export default {
}, },
url: url, url: url,
isReload: true, isReload: true,
pickerOptions: { // pickerOptions: {
disabledDate(time) { // disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() // return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
} // }
}, // },
size: 'small', size: 'small',
searchForm: { searchForm: {
couponName: '', couponName: '',
...@@ -109,7 +109,10 @@ export default { ...@@ -109,7 +109,10 @@ export default {
discountType: '', discountType: '',
discountTypes: [2, 3, 4, 7] discountTypes: [2, 3, 4, 7]
}, },
tableSearchForm: {}, tableSearchForm: {
discountType: '',
verificationMerchantId: ''
},
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
...@@ -138,16 +141,25 @@ export default { ...@@ -138,16 +141,25 @@ export default {
searchFormDataTwo: [ searchFormDataTwo: [
{ {
label: '核销门店', label: '核销门店',
name: 'discountType', name: 'verificationMerchantId',
type: 'select', type: 'select',
isHide: false,
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'discountTypeList' optionsName: 'discountTypeList'
}, },
{ {
label: '核销人',
name: 'verificationOperator',
type: 'input',
isHide: false,
labelWidth: 56,
maxlength: 11
},
{
label: '用户', label: '用户',
name: '', name: 'userReq',
type: 'input', type: 'input',
labelWidth: 42, labelWidth: 42,
placeholder: '请输入用户手机号', placeholder: '请输入用户手机号',
...@@ -155,12 +167,12 @@ export default { ...@@ -155,12 +167,12 @@ export default {
}, },
{ {
label: '券来源', label: '券来源',
name: 'discountType', name: 'packageId',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'discountTypeList' optionsName: 'packageList'
} }
], ],
searchFormDataThree: [ searchFormDataThree: [
...@@ -173,7 +185,7 @@ export default { ...@@ -173,7 +185,7 @@ export default {
} }
], ],
// 表格组件 // 表格组件
getListApi: this.$apis.record.getRecordListApi, getListApi: this.$apis.couponManage.getVerificationListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -209,14 +221,24 @@ export default { ...@@ -209,14 +221,24 @@ export default {
prop: 'verificationMerchantName' prop: 'verificationMerchantName'
}, },
{ {
label: '核销人',
prop: 'verificationOperator'
},
{
label: '券来源', label: '券来源',
prop: '' prop: 'packageName',
formatter: cellValue => {
return cellValue.packageName || '-'
}
}, },
{ {
label: '核销日期', label: '核销日期',
prop: 'verificationTime', prop: 'verificationTime',
addHtml: 'verificationTime' formatter: cellValue => {
}, return dateFormat(cellValue.verificationTime)
}
// addHtml: 'verificationTime'
}
// { // {
// label: '剩余待核销次数', // label: '剩余待核销次数',
// prop: 'residueAmount', // prop: 'residueAmount',
...@@ -263,12 +285,13 @@ export default { ...@@ -263,12 +285,13 @@ export default {
{ {
confId: '4', confId: '4',
confName: '兑换券' confName: '兑换券'
},
{
confId: '7',
confName: '会员服务'
} }
// { ],
// confId: '7', packageList: []
// confName: '会员服务'
// }
]
} }
} }
}, },
...@@ -278,6 +301,11 @@ export default { ...@@ -278,6 +301,11 @@ export default {
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
this.searchForm.merchantId = this.merchantId this.searchForm.merchantId = this.merchantId
} }
if (this.$isGroupUp) {
this.getPackageList()
}
this.showOrHideAttr('searchFormDataTwo', this.$isGroupUp ? '核销人' : '核销门店', true)
this.deleteAttr(this.$isGroupUp ? '核销人' : '核销门店')
}, },
mounted() { mounted() {
...@@ -285,9 +313,23 @@ export default { ...@@ -285,9 +313,23 @@ export default {
}, },
methods: { methods: {
showOrHideAttr(formName, label, isHide) {
let idx = this[formName].findIndex(item => item.label == label)
this[formName][idx].isHide = isHide
},
deleteAttr(label) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == label)
this.tableParams.tableColumns.splice(idx, 1)
},
getPackageList() {
this.$apis.couponManage.getPackageListApi({ pageNum: 1, pageSize: 9999 }).then(res => {
this.baseData.packageList = res.list
this.getOptionsList('searchFormDataTwo', true, 'packageId')
})
},
// 跳转到礼包领取详情页 // 跳转到礼包领取详情页
couponNameHandleDetail(row) { couponNameHandleDetail(row) {
console.log('row', row) // console.log('row', row)
this.$router.push({ this.$router.push({
path: '/giftBag/giftDetail', path: '/giftBag/giftDetail',
query: { query: {
...@@ -344,6 +386,9 @@ export default { ...@@ -344,6 +386,9 @@ export default {
if (params.beginTime) delete params.beginTime && delete params.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete params.daterange delete params.daterange
if (params.discountType) {
params.discountTypes = [params.discountType]
}
return params return params
}, },
...@@ -428,7 +473,15 @@ export default { ...@@ -428,7 +473,15 @@ export default {
// this.searchForm = { merchantId: 44184606 } // this.searchForm = { merchantId: 44184606 }
// this.handleSearch() // this.handleSearch()
this.isReload = false this.isReload = false
this.searchForm = { merchantId: this.merchantId, discountTypes: [2, 3, 4, 7] } this.searchForm = {
merchantId: this.merchantId,
couponName: '',
userReq: '',
verificationOperator: '',
orderCode: '',
discountType: '',
discountTypes: [2, 3, 4, 7]
}
this.$nextTick(() => { this.$nextTick(() => {
this.isReload = true this.isReload = true
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!