Commit f8cc12b1 by chenwq

优惠券-核销记录列表

1 parent 7c658190
......@@ -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 => {
params.method = `${defaultPath}verification.code.verification.list`
......@@ -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 {
}
// 适用范围
if (this.$isGroupUp) {
this.coupon.scopeApplicationTxt = {
1: '旗下所有店通用',
2: '旗下品牌店通用'
}[coupon.scopeApplication]
this.coupon.scopeApplicationTxt =
{
1: '旗下所有店通用',
2: '旗下品牌店通用'
}[coupon.scopeApplication] || '-'
}
})
},
......
......@@ -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="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span>
</span>
<span slot="verificationTime" slot-scope="scope">
<!-- <span slot="verificationTime" slot-scope="scope">
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span>
</span> -->
</GLTable>
<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">
......@@ -94,11 +94,11 @@ export default {
},
url: url,
isReload: true,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
},
// pickerOptions: {
// disabledDate(time) {
// return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
// }
// },
size: 'small',
searchForm: {
couponName: '',
......@@ -109,7 +109,10 @@ export default {
discountType: '',
discountTypes: [2, 3, 4, 7]
},
tableSearchForm: {},
tableSearchForm: {
discountType: '',
verificationMerchantId: ''
},
// 搜索
searchFormData: [
{
......@@ -138,16 +141,25 @@ export default {
searchFormDataTwo: [
{
label: '核销门店',
name: 'discountType',
name: 'verificationMerchantId',
type: 'select',
isHide: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'discountTypeList'
},
{
label: '核销人',
name: 'verificationOperator',
type: 'input',
isHide: false,
labelWidth: 56,
maxlength: 11
},
{
label: '用户',
name: '',
name: 'userReq',
type: 'input',
labelWidth: 42,
placeholder: '请输入用户手机号',
......@@ -155,12 +167,12 @@ export default {
},
{
label: '券来源',
name: 'discountType',
name: 'packageId',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'discountTypeList'
optionsName: 'packageList'
}
],
searchFormDataThree: [
......@@ -173,7 +185,7 @@ export default {
}
],
// 表格组件
getListApi: this.$apis.record.getRecordListApi,
getListApi: this.$apis.couponManage.getVerificationListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -209,14 +221,24 @@ export default {
prop: 'verificationMerchantName'
},
{
label: '核销人',
prop: 'verificationOperator'
},
{
label: '券来源',
prop: ''
prop: 'packageName',
formatter: cellValue => {
return cellValue.packageName || '-'
}
},
{
label: '核销日期',
prop: 'verificationTime',
addHtml: 'verificationTime'
},
formatter: cellValue => {
return dateFormat(cellValue.verificationTime)
}
// addHtml: 'verificationTime'
}
// {
// label: '剩余待核销次数',
// prop: 'residueAmount',
......@@ -263,12 +285,13 @@ export default {
{
confId: '4',
confName: '兑换券'
},
{
confId: '7',
confName: '会员服务'
}
// {
// confId: '7',
// confName: '会员服务'
// }
]
],
packageList: []
}
}
},
......@@ -278,6 +301,11 @@ export default {
this.merchantId = this.$globalState.session.merchantId
this.searchForm.merchantId = this.merchantId
}
if (this.$isGroupUp) {
this.getPackageList()
}
this.showOrHideAttr('searchFormDataTwo', this.$isGroupUp ? '核销人' : '核销门店', true)
this.deleteAttr(this.$isGroupUp ? '核销人' : '核销门店')
},
mounted() {
......@@ -285,9 +313,23 @@ export default {
},
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) {
console.log('row', row)
// console.log('row', row)
this.$router.push({
path: '/giftBag/giftDetail',
query: {
......@@ -344,6 +386,9 @@ export default {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
if (params.discountType) {
params.discountTypes = [params.discountType]
}
return params
},
......@@ -428,7 +473,15 @@ export default {
// this.searchForm = { merchantId: 44184606 }
// this.handleSearch()
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.isReload = true
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!