Commit b4626892 by zhangxw

优惠券发放列表修改

1 parent 8ebe951f
......@@ -88,7 +88,11 @@
<!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm"
@onSearch="handlePageReload" @onReset="handleReset" :simpleFieldNum="4"></m-pagination-query-render>
@onSearch="handlePageReload" @onReset="handleReset" :simpleFieldNum="4">
<template #couponTemplateId="{ record }">
<a-input v-model:value="pagination.queryForm.couponTemplateId" @input="handleIntNativeInput($event)" placeholder="输入优惠券ID"></a-input>
</template>
</m-pagination-query-render>
<div class="table-operations" style="margin-bottom: 16px;width: 100%;float: left;">
<div class="flex justify-end" style="float: left;">
......@@ -252,7 +256,7 @@ export default class DiscountActivityPage extends PaginationComponent<Vehicle> {
orderCode: [null, { label: '关联订单号', field: 'orderCode', placeholder: '输入订单号', operator: Operator.like }],
distributionTime: [null, { label: '发放时间', field: 'distributionTime', operator: Operator.dateBetween, type: 'date-range' }],
templateName: [null, { label: '优惠券名称', field: 'templateName', placeholder: '输入优惠券名称', operator: Operator.like }],
couponTemplateId: [null, { label: '优惠券ID', field: 'couponTemplateId', type: 'number', placeholder: '输入优惠券ID', operator: Operator.like }]
couponTemplateId: [null, { name: 'couponTemplateId', label: '优惠券模板ID', type: 'slot', field: 'couponTemplateId', placeholder: '输入优惠券模板ID', operator: Operator.eq }]
});
const pageQuery = this.$route.query
// 从优惠券管理列表跳转 直接打开活动详情
......@@ -272,7 +276,19 @@ export default class DiscountActivityPage extends PaginationComponent<Vehicle> {
this.selectIds = []
this.selectedItems = [];
this.pageReload();
}
}
handleIntNativeInput(event: any) {
const inputEl = event?.target as undefined | HTMLInputElement;
const raw = inputEl ? String(inputEl.value ?? "") : String(event ?? "");
const next = this.sanitizeIntText(raw);
if (inputEl && inputEl.value !== next) inputEl.value = next;
this.pagination.queryForm.couponTemplateId = next;
}
sanitizeIntText(text: string): string {
return text.slice(0, 30)
}
//重置查询条件
handleReset() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!