优惠码页面部分调整新增字段

This commit is contained in:
X1627315083
2025-06-06 20:41:46 +08:00
parent 458a068412
commit 29d0f0792d
2 changed files with 76 additions and 29 deletions

View File

@@ -127,7 +127,7 @@ export default defineComponent({
const columns: any = computed(() => {
return [
{
title: 'User Id',
title: 'Id',
align: "center",
ellipsis: true,
dataIndex: "id",
@@ -136,12 +136,14 @@ export default defineComponent({
sorter: true,
fixed: "left",
},
{
title: 'Max Redemptions',
title: 'cooperator',
align: "center",
dataIndex: "maxRedemptions",
key: "maxRedemptions",
width:200,
ellipsis: true,
dataIndex: "cooperator",
key: "cooperator",
width:150,
},
{
@@ -161,7 +163,10 @@ export default defineComponent({
width:150,
customRender: (record: any) => {
if(record.text){
return new Date(record.text * 1000).toISOString().split('T')[0] // "2025-04-24"
const startTime = new Date(record.text * 1000);
const timezoneOffset = startTime.getTimezoneOffset() * 60000;
const localDate = new Date(startTime.getTime() - timezoneOffset);
return localDate.toISOString().split('T')[0] // "2025-04-24"
}
},
},
@@ -188,13 +193,22 @@ export default defineComponent({
},
},
{
title: 'cooperator',
title: 'Start Time',
align: "center",
ellipsis: true,
dataIndex: "cooperator",
key: "cooperator",
dataIndex: "startTime",
key: "startTime",
width:150,
customRender: (record: any) => {
if(record.text){
const startTime = new Date(record.text * 1000);
const timezoneOffset = startTime.getTimezoneOffset() * 60000;
const localDate = new Date(startTime.getTime() - timezoneOffset);
return localDate.toISOString().split('T')[0] // "2025-04-24"
}
},
},
{
title: 'Total Earnings',
align: "center",
@@ -235,7 +249,15 @@ export default defineComponent({
dataIndex: "remark",
key: "remark",
width:150,
}, {
},
{
title: 'Max Redemptions',
align: "center",
dataIndex: "maxRedemptions",
key: "maxRedemptions",
width:200,
},
{
title: "Operations",
key: "operation",
width:120,
@@ -315,14 +337,13 @@ export default defineComponent({
changePage(e: any, filters:any, sorter:any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
console.log(sorter)
// this.gettrialList();
// if(sorter.order){
// if(sorter.columnKey == 'id'){
// this.orderBy = 'id'
// }
// }
if(sorter.order){
if(sorter.columnKey == 'id'){
this.orderBy = 'id'
}
}
this.orderBy = sorter.order == "descend" ? "DESC" : "ASC";
this.gettrialList();
},
//查询列表
@@ -366,13 +387,12 @@ export default defineComponent({
cooperator:this.cooperator,//合作商
isExpired:this.isExpired,//是否过期
promotionCode:this.promotionCode,//优惠码
orderById:null,//排序字段
orderById:this.orderBy,//排序字段
size:this.pageSize,
page:this.currentPage,
}
Https.axiosPost(Https.httpUrls.getAllCoupons,data).then((rv: any) => {
if (rv) {
console.log(rv)
this.dataList = rv.records
this.total = rv.total
// this.workspaceItem.position = this.singleTypeList[0].label