Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 36db8006
authored
May 18, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优惠券bug修复
1 parent
8b36c03f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
25 deletions
aus-front/admin/src/views/account/account/AccountPicker.vue
aus-front/admin/src/views/auction/order/ViewAuctionOrder.vue
aus-front/admin/src/views/discount/activity/DiscountActivityPage.vue
aus-front/admin/src/views/discount/activity/components/DiscountActivityAddForm.vue
aus-front/admin/src/views/discount/coupon/components/CouponAddForm.vue
aus-front/admin/src/views/account/account/AccountPicker.vue
View file @
36db800
...
...
@@ -65,12 +65,12 @@ export default class AccountPicker extends PaginationComponent<Account> {
created
():
void
{
this
.
init
(
this
.
axios
,
AccountController
.
PAGE_ACCOUNT
);
this
.
buildQueryForm
({
accountName
:
[
null
,
{
label
:
'
用户
名'
,
field
:
'accountName'
,
operator
:
Operator
.
like
}],
createTime
:
[
null
,
{
label
:
'
创建
时间'
,
field
:
'createTime'
,
operator
:
Operator
.
dateBetween
,
type
:
'date-range'
}],
accountName
:
[
null
,
{
label
:
'
认证姓
名'
,
field
:
'accountName'
,
operator
:
Operator
.
like
}],
createTime
:
[
null
,
{
label
:
'
注册
时间'
,
field
:
'createTime'
,
operator
:
Operator
.
dateBetween
,
type
:
'date-range'
}],
lastLoginTime
:
[
null
,
{
label
:
'最近活跃时间'
,
field
:
'lastLoginTime'
,
operator
:
Operator
.
dateBetween
,
type
:
'date-range'
}],
mobile
:
[
null
,
{
label
:
'手机号'
,
field
:
'mobile'
,
operator
:
Operator
.
like
}],
openId
:
[
null
,
{
label
:
'微信ID'
,
field
:
'openId'
,
operator
:
Operator
.
like
}],
idCard
:
[
null
,
{
label
:
'身份证'
,
field
:
'idCard'
,
operator
:
Operator
.
like
}],
//
openId: [null, {label: '微信ID', field: 'openId', operator: Operator.like}],
//
idCard: [null, {label: '身份证', field: 'idCard', operator: Operator.like}],
nickName
:
[
null
,
{
label
:
'昵称'
,
field
:
'nickName'
,
operator
:
Operator
.
like
}],
enabled
:
[
null
,
{
label
:
'账号状态'
,
field
:
'enabled'
,
type
:
'select'
,
allowClear
:
true
,
optionItems
:
[{
label
:
'启用'
,
value
:
true
},
{
label
:
'禁用'
,
value
:
false
}],
operator
:
Operator
.
eq
}],
});
...
...
aus-front/admin/src/views/auction/order/ViewAuctionOrder.vue
View file @
36db800
...
...
@@ -100,6 +100,7 @@
<template
v-if=
"record.payType==='拍卖保证金'"
>
<deposit-state-tag
:deposit-state=
"record.payState"
></deposit-state-tag>
</
template
>
<
template
v-else-if=
"record.payType === '优惠券抵扣'"
>
-
</
template
>
<
template
v-else-if=
"orderTransaction"
>
<audit-state-tag
:audit-state=
"orderTransaction.auditState"
></audit-state-tag>
</
template
>
...
...
@@ -111,6 +112,7 @@
<template
v-if=
"record.payType==='拍卖保证金'"
>
{{
record
.
payMethod
}}
</
template
>
<
template
v-else-if=
"record.payType === '优惠券抵扣'"
>
-
</
template
>
<
template
v-else-if=
"orderTransaction"
>
{{
$t
(
`enum.orderTransaction.paymentType.${orderTransaction.paymentType
}
`
)
}}
<
/template
>
...
...
@@ -130,6 +132,7 @@
<
template
v
-
if
=
"record.payType==='拍卖保证金'"
>
{{
record
.
payTime
}}
<
/template
>
<
template
v
-
else
-
if
=
"record.payType === '优惠券抵扣'"
>-<
/template
>
<
template
v
-
else
-
if
=
"orderTransaction"
>
{{
orderTransaction
.
createTime
}}
<
/template
>
...
...
aus-front/admin/src/views/discount/activity/DiscountActivityPage.vue
View file @
36db800
...
...
@@ -180,7 +180,7 @@ export default class DiscountActivityPage extends PaginationComponent<Vehicle> {
keyword
:
[
null
,
{
label
:
'活动名称/ID'
,
field
:
'keyword'
,
placeholder
:
'请输入活动名称/ID'
,
operator
:
Operator
.
like
}
],
status
:
[
null
,
{
label
:
'活动状态'
,
field
:
'status'
,
type
:
'select'
,
allowClear
:
true
,
optionItems
:
this
.
statusList
,
operator
:
Operator
.
eq
}
],
activityType
:
[
null
,
{
label
:
'发放策略'
,
type
:
'select'
,
optionItems
:
this
.
activityTypeList
,
allowClear
:
true
,
field
:
'activityType'
,
operator
:
Operator
.
eq
}
],
createTime
:
[
null
,
{
label
:
'创建时间'
,
field
:
'create
Time'
,
operator
:
Operator
.
dateBetween
,
type
:
'date-range'
}
],
validTime
:
[
null
,
{
label
:
'活动有效期'
,
field
:
'valid
Time'
,
operator
:
Operator
.
dateBetween
,
type
:
'date-range'
}
],
}
);
this
.
pagination
.
setDefaultSort
(
'createTime'
,
Order
.
desc
);
this
.
pageLoad
();
...
...
aus-front/admin/src/views/discount/activity/components/DiscountActivityAddForm.vue
View file @
36db800
...
...
@@ -407,18 +407,27 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
];
}
handlePositiveIntNativeInput
(
index
:
number
,
field
:
"priceMin"
|
"priceMax"
,
e
:
any
)
{
const
raw
=
e
?.
target
?.
value
??
""
;
const
next
=
String
(
raw
).
replace
(
/
[^\d]
/g
,
""
).
replace
(
/^0+/
,
""
);
handlePositiveIntNativeInput
(
index
:
number
,
field
:
"priceMin"
|
"priceMax"
,
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
;
if
(
this
.
postData
.
priceRanges
?.[
index
])
{
this
.
postData
.
priceRanges
[
index
][
field
]
=
next
;
}
this
.
scheduleClearPriceRangeValidate
();
}
handlePerUserQuantityInput
(
e
:
any
)
{
const
raw
=
e
?.
target
?.
value
??
""
;
this
.
postData
.
distributionQuantity
=
String
(
raw
).
replace
(
/
[^\d]
/g
,
""
).
replace
(
/^0+/
,
""
)
||
""
;
sanitizeIntText
(
raw
:
string
)
{
return
raw
.
replace
(
/
[^\d]
/g
,
""
).
slice
(
0
,
7
);
}
handlePerUserQuantityInput
(
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
.
postData
.
distributionQuantity
=
next
;
}
getCouponBrief
(
templateId
:
any
)
{
...
...
aus-front/admin/src/views/discount/coupon/components/CouponAddForm.vue
View file @
36db800
...
...
@@ -283,8 +283,6 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
const
num
=
typeof
value
===
"number"
?
value
:
Number
(
value
);
if
(
!
Number
.
isFinite
(
num
))
return
Promise
.
reject
(
new
Error
(
"请输入展示面额"
));
if
(
num
<=
0
)
return
Promise
.
reject
(
new
Error
(
"必须为大于0的正数"
));
const
delta
=
Math
.
abs
(
num
*
100
-
Math
.
round
(
num
*
100
));
if
(
delta
>
1
e
-
9
)
return
Promise
.
reject
(
new
Error
(
"最多支持小数点后两位"
));
return
Promise
.
resolve
();
},
},
...
...
@@ -350,16 +348,16 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
}
sanitizeIntText
(
raw
:
string
)
{
return
raw
.
replace
(
/
[^\d]
/g
,
""
);
return
raw
.
replace
(
/
[^\d]
/g
,
""
)
.
slice
(
0
,
7
)
;
}
sanitizeDecimalText
(
raw
:
string
,
decimalScale
=
2
)
{
const
cleaned
=
raw
.
replace
(
/
[^\d
.
]
/g
,
""
);
if
(
!
cleaned
)
return
""
;
const
firstDot
=
cleaned
.
indexOf
(
"."
);
if
(
firstDot
===
-
1
)
return
cleaned
;
if
(
firstDot
===
-
1
)
return
cleaned
?.
slice
(
0
,
7
)
;
const
intPart
=
cleaned
.
slice
(
0
,
firstDot
);
const
intPart
=
cleaned
.
slice
(
0
,
firstDot
)
.
slice
(
0
,
7
)
;
let
fracPart
=
cleaned
.
slice
(
firstDot
+
1
).
replace
(
/
\.
/g
,
""
);
fracPart
=
fracPart
.
slice
(
0
,
decimalScale
);
const
nextInt
=
intPart
===
""
?
"0"
:
intPart
;
...
...
@@ -432,8 +430,6 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
const
num
=
typeof
value
===
"number"
?
value
:
Number
(
value
);
if
(
!
Number
.
isFinite
(
num
))
return
Promise
.
reject
(
new
Error
(
"请输入券面额"
));
if
(
num
<=
0
)
return
Promise
.
reject
(
new
Error
(
"必须为大于0的正数"
));
const
delta
=
Math
.
abs
(
num
*
100
-
Math
.
round
(
num
*
100
));
if
(
delta
>
1
e
-
9
)
return
Promise
.
reject
(
new
Error
(
"最多支持小数点后两位"
));
return
Promise
.
resolve
();
},
},
...
...
@@ -453,8 +449,6 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
const
num
=
typeof
value
===
"number"
?
value
:
Number
(
value
);
if
(
!
Number
.
isFinite
(
num
))
return
Promise
.
reject
(
new
Error
(
"请输入使用门槛"
));
if
(
num
<
0
)
return
Promise
.
reject
(
new
Error
(
"必须为非负数"
));
const
delta
=
Math
.
abs
(
num
*
100
-
Math
.
round
(
num
*
100
));
if
(
delta
>
1
e
-
9
)
return
Promise
.
reject
(
new
Error
(
"最多支持小数点后两位"
));
return
Promise
.
resolve
();
},
},
...
...
@@ -469,9 +463,7 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
if
(
value
===
null
||
value
===
undefined
||
value
===
""
)
return
Promise
.
reject
(
new
Error
(
"请输入中拍价门槛"
));
const
num
=
typeof
value
===
"number"
?
value
:
Number
(
value
);
if
(
!
Number
.
isFinite
(
num
))
return
Promise
.
reject
(
new
Error
(
"请输入中拍价门槛"
));
if
(
num
<=
0
)
return
Promise
.
reject
(
new
Error
(
"必须为大于0的正数"
));
const
delta
=
Math
.
abs
(
num
*
100
-
Math
.
round
(
num
*
100
));
if
(
delta
>
1
e
-
9
)
return
Promise
.
reject
(
new
Error
(
"最多支持小数点后两位"
));
if
(
num
<=
0
)
return
Promise
.
reject
(
new
Error
(
"必须为大于0的正数"
));;
const
prev
=
this
.
postData
.
tierRules
[
index
-
1
]?.
thresholdAmount
;
const
prevNum
=
typeof
prev
===
"number"
?
prev
:
Number
(
prev
);
...
...
@@ -493,8 +485,6 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
const
num
=
typeof
value
===
"number"
?
value
:
Number
(
value
);
if
(
!
Number
.
isFinite
(
num
))
return
Promise
.
reject
(
new
Error
(
"请输入抵扣金额"
));
if
(
num
<=
0
)
return
Promise
.
reject
(
new
Error
(
"必须为大于0的正数"
));
const
delta
=
Math
.
abs
(
num
*
100
-
Math
.
round
(
num
*
100
));
if
(
delta
>
1
e
-
9
)
return
Promise
.
reject
(
new
Error
(
"最多支持小数点后两位"
));
const
threshold
=
this
.
postData
.
tierRules
[
index
]?.
thresholdAmount
;
const
thresholdNum
=
typeof
threshold
===
"number"
?
threshold
:
Number
(
threshold
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment