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 2e94c9b5
authored
May 09, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调优化修改
1 parent
0d0fec04
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
19 deletions
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/DiscountCouponPage.vue
aus-front/admin/src/views/discount/coupon/components/CouponAddForm.vue
aus-front/admin/src/views/discount/coupon/components/ManualIssuanceModal.vue
aus-front/admin/src/views/discount/activity/DiscountActivityPage.vue
View file @
2e94c9b
...
@@ -19,7 +19,9 @@
...
@@ -19,7 +19,9 @@
<template
#
bodyCell=
"
{ column, record }">
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'activityName'"
>
<template
v-if=
"column.key === 'activityName'"
>
<div
@
click=
"handleAdd(
{...record, pageState: 'VIEW'})">
<div
@
click=
"handleAdd(
{...record, pageState: 'VIEW'})">
<a
style=
"text-decoration: underline;"
class=
"text_hide"
:title=
"record.activityName"
>
{{
record
.
activityName
}}
</a>
<a-tooltip
:title=
"record.activityName"
>
<a
style=
"text-decoration: underline;display: inline-block;width:145px;"
class=
"text_hide"
>
{{
record
.
activityName
}}
</a>
</a-tooltip>
<div
class=
"text_hide second_text"
:title=
"record.activityId"
>
ID:
{{
record
.
activityId
}}
</div>
<div
class=
"text_hide second_text"
:title=
"record.activityId"
>
ID:
{{
record
.
activityId
}}
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -49,7 +51,7 @@
...
@@ -49,7 +51,7 @@
<
template
v-if=
"column.key === 'couponIds'"
>
<
template
v-if=
"column.key === 'couponIds'"
>
<div
v-if=
"record.couponTemplates?.length === 1"
>
<div
v-if=
"record.couponTemplates?.length === 1"
>
<a-tooltip
:title=
"`$
{record.couponTemplates[0].templateName} 券面额:${record.couponTemplates[0].faceAmount}`">
<a-tooltip
:title=
"`$
{record.couponTemplates[0].templateName} 券面额:${record.couponTemplates[0].faceAmount}`">
{{
record
.
couponTemplates
[
0
].
templateName
}}
<div
class=
"text_hide"
>
{{
record
.
couponTemplates
[
0
].
templateName
}}
</div>
</a-tooltip>
</a-tooltip>
</div>
</div>
<div
style=
"text-decoration: underline;"
v-else-if=
"record.couponTemplates?.length > 1"
>
<div
style=
"text-decoration: underline;"
v-else-if=
"record.couponTemplates?.length > 1"
>
...
...
aus-front/admin/src/views/discount/activity/components/DiscountActivityAddForm.vue
View file @
2e94c9b
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
<div
class=
"footer_btn"
>
<div
class=
"footer_btn"
>
<a-space
v-if=
"!isViewMode"
>
<a-space
v-if=
"!isViewMode"
>
<a-button
@
click=
"onClose"
>
取消
</a-button>
<a-button
@
click=
"onClose"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"handleOk()"
>
创建
</a-button>
<a-button
type=
"primary"
@
click=
"handleOk()"
>
{{pageState === 'EDIT' ? '保存' : '创建'}}
</a-button>
</a-space>
</a-space>
<a-space
v-else
>
<a-space
v-else
>
<a-button
type=
"primary"
@
click=
"onClose"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"onClose"
>
返回
</a-button>
...
@@ -225,6 +225,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
...
@@ -225,6 +225,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
couponTemplateOptions
:
OptionItem
[]
=
[];
couponTemplateOptions
:
OptionItem
[]
=
[];
relationAgreementOptions
:
AgreementOption
[]
=
[];
relationAgreementOptions
:
AgreementOption
[]
=
[];
activeAutoActivities
:
any
[]
=
[];
activeAutoActivities
:
any
[]
=
[];
priceRangeValidateTimer
:
any
=
null
;
dialogVisible
=
false
;
dialogVisible
=
false
;
titleVisible
=
"创建发放活动"
;
titleVisible
=
"创建发放活动"
;
...
@@ -302,6 +303,36 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
...
@@ -302,6 +303,36 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
return
false
;
return
false
;
}
}
isPriceRangeValid
(
index
:
number
)
{
const
rule
=
this
.
postData
.
priceRanges
?.[
index
];
const
min
=
this
.
parsePositiveInt
(
rule
?.
priceMin
);
const
max
=
this
.
parsePositiveInt
(
rule
?.
priceMax
);
if
(
min
===
null
||
max
===
null
)
return
false
;
if
(
!
(
max
>
min
))
return
false
;
if
(
this
.
isTriggerRangeOverlapped
(
index
,
min
,
max
))
return
false
;
return
true
;
}
scheduleClearPriceRangeValidate
()
{
if
(
this
.
priceRangeValidateTimer
)
{
clearTimeout
(
this
.
priceRangeValidateTimer
);
this
.
priceRangeValidateTimer
=
null
;
}
this
.
priceRangeValidateTimer
=
setTimeout
(()
=>
{
this
.
priceRangeValidateTimer
=
null
;
const
formRef
:
any
=
(
this
.
$refs
as
any
)?.
formRef
;
if
(
!
formRef
?.
clearValidate
)
return
;
const
ranges
=
Array
.
isArray
(
this
.
postData
.
priceRanges
)
?
this
.
postData
.
priceRanges
:
[];
const
clearNames
:
any
[]
=
[];
for
(
let
i
=
0
;
i
<
ranges
.
length
;
i
+=
1
)
{
if
(
!
this
.
isPriceRangeValid
(
i
))
continue
;
clearNames
.
push
([
"priceRanges"
,
i
,
"priceMin"
]);
clearNames
.
push
([
"priceRanges"
,
i
,
"priceMax"
]);
}
if
(
clearNames
.
length
)
formRef
.
clearValidate
(
clearNames
);
},
50
);
}
priceMinRules
(
index
:
number
)
{
priceMinRules
(
index
:
number
)
{
return
[
return
[
{
required
:
true
,
message
:
"请输入下限"
},
{
required
:
true
,
message
:
"请输入下限"
},
...
@@ -382,6 +413,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
...
@@ -382,6 +413,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
if
(
this
.
postData
.
priceRanges
?.[
index
])
{
if
(
this
.
postData
.
priceRanges
?.[
index
])
{
this
.
postData
.
priceRanges
[
index
][
field
]
=
next
;
this
.
postData
.
priceRanges
[
index
][
field
]
=
next
;
}
}
this
.
scheduleClearPriceRangeValidate
();
}
}
handlePerUserQuantityInput
(
e
:
any
)
{
handlePerUserQuantityInput
(
e
:
any
)
{
...
@@ -771,7 +803,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
...
@@ -771,7 +803,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
color
:
rgba
(
0
,
0
,
0
,
0.65
);
color
:
rgba
(
0
,
0
,
0
,
0.65
);
}
}
.list-content
{
.list-content
{
height
:
280px
;
/* 固定内容区域高度 */
max-height
:
280px
;
overflow-y
:
auto
;
/* 内容滚动 */
overflow-y
:
auto
;
/* 内容滚动 */
}
}
.footer_btn
{
.footer_btn
{
...
...
aus-front/admin/src/views/discount/coupon/DiscountCouponPage.vue
View file @
2e94c9b
...
@@ -207,7 +207,7 @@ export default class DiscountCouponPage extends PaginationComponent<Vehicle> {
...
@@ -207,7 +207,7 @@ export default class DiscountCouponPage extends PaginationComponent<Vehicle> {
createVNode
(
createVNode
(
"p"
,
"p"
,
{
style
:
{
marginBottom
:
"8px"
}
}
,
{
style
:
{
marginBottom
:
"8px"
}
}
,
"停用后,当前优惠券将无法被新的发放活动关联,且已关联的【自动发放】活动同步停售。"
"停用后,当前优惠券将无法被新的发放活动关联,且已关联的【自动发放】活动
将
同步停售。"
),
),
createVNode
(
createVNode
(
"p"
,
"p"
,
...
...
aus-front/admin/src/views/discount/coupon/components/CouponAddForm.vue
View file @
2e94c9b
...
@@ -48,11 +48,11 @@
...
@@ -48,11 +48,11 @@
</a-form-item>
</a-form-item>
<template
v-if=
"postData.couponType === 2"
>
<template
v-if=
"postData.couponType === 2"
>
<a-form-item
name=
"faceAmount"
label=
"
券
面额"
:rules=
"ladderDisplayAmountRules"
validate-trigger=
"blur"
>
<a-form-item
name=
"faceAmount"
label=
"
展示
面额"
:rules=
"ladderDisplayAmountRules"
validate-trigger=
"blur"
>
<div
class=
"input-affix wid_376 affix-suffix-only"
>
<div
class=
"input-affix wid_376 affix-suffix-only"
>
<span
class=
"affix suffix"
>
元
</span>
<span
class=
"affix suffix"
>
元
</span>
<a-input
v-model:value=
"postData.faceAmount"
<a-input
v-model:value=
"postData.faceAmount"
placeholder=
"
请输入券面
额"
:disabled=
"isLadderDisplayAmountDisabled"
@
input=
"handleDecimalNativeInput('faceAmount', $event)"
@
blur=
"handleLadderDisplayAmountBlur"
/>
placeholder=
"
建议填写最高抵扣金
额"
:disabled=
"isLadderDisplayAmountDisabled"
@
input=
"handleDecimalNativeInput('faceAmount', $event)"
@
blur=
"handleLadderDisplayAmountBlur"
/>
</div>
</div>
<div
v-if=
"isLadderDisplayAmountDisabled"
class=
"form-tip"
>
已自动提取阶梯规则中的最高抵扣金额作为券面额
</div>
<div
v-if=
"isLadderDisplayAmountDisabled"
class=
"form-tip"
>
已自动提取阶梯规则中的最高抵扣金额作为券面额
</div>
</a-form-item>
</a-form-item>
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
<div
class=
"footer_btn"
>
<div
class=
"footer_btn"
>
<a-space
v-if=
"!isViewMode"
>
<a-space
v-if=
"!isViewMode"
>
<a-button
@
click=
"onClose"
>
取消
</a-button>
<a-button
@
click=
"onClose"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"handleOk()"
>
创建
</a-button>
<a-button
type=
"primary"
@
click=
"handleOk()"
>
{{pageState === 'EDIT' ? '保存' : '创建'}}
</a-button>
</a-space>
</a-space>
<a-space
v-else
>
<a-space
v-else
>
<a-button
type=
"primary"
@
click=
"onClose"
>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"onClose"
>
返回
</a-button>
...
@@ -159,15 +159,14 @@
...
@@ -159,15 +159,14 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
nextTick
}
from
"vue"
;
import
{
nextTick
,
createVNode
}
from
"vue"
;
import
{
Component
,
Watch
}
from
"vue-facing-decorator"
;
import
{
Component
,
Watch
}
from
"vue-facing-decorator"
;
import
{
EnhanceFormComponent
}
from
"@/core/form/EnhanceFormComponent"
;
import
{
EnhanceFormComponent
}
from
"@/core/form/EnhanceFormComponent"
;
import
{
message
}
from
"ant-design-vue"
;
import
{
message
,
Modal
}
from
"ant-design-vue"
;
import
TitleDivider
from
"@/components/TitleDivider.vue"
;
import
TitleDivider
from
"@/components/TitleDivider.vue"
;
import
{
formatDate
,
parseDate
}
from
"lib/src/utils/DateTimeUtils"
;
import
{
formatDate
,
parseDate
}
from
"lib/src/utils/DateTimeUtils"
;
import
{
CloseOutlined
}
from
"@ant-design/icons-vue"
;
import
{
CloseOutlined
,
InfoCircleFilled
}
from
"@ant-design/icons-vue"
;
import
{
DiscountController
}
from
"@/api/DiscountController"
;
import
{
DiscountController
}
from
"@/api/DiscountController"
;
@
Component
({
@
Component
({
components
:
{
TitleDivider
,
CloseOutlined
}
components
:
{
TitleDivider
,
CloseOutlined
}
})
})
...
@@ -275,14 +274,14 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
...
@@ -275,14 +274,14 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
return
[
return
[
{
{
required
:
true
,
required
:
true
,
message
:
"请输入
券
面额"
,
message
:
"请输入
展示
面额"
,
},
},
{
{
validator
:
async
(
_rule
:
any
,
value
:
unknown
)
=>
{
validator
:
async
(
_rule
:
any
,
value
:
unknown
)
=>
{
if
(
this
.
postData
.
couponType
!==
2
)
return
Promise
.
resolve
();
if
(
this
.
postData
.
couponType
!==
2
)
return
Promise
.
resolve
();
if
(
value
===
null
||
value
===
undefined
||
value
===
""
)
return
Promise
.
resolve
();
if
(
value
===
null
||
value
===
undefined
||
value
===
""
)
return
Promise
.
resolve
();
const
num
=
typeof
value
===
"number"
?
value
:
Number
(
value
);
const
num
=
typeof
value
===
"number"
?
value
:
Number
(
value
);
if
(
!
Number
.
isFinite
(
num
))
return
Promise
.
reject
(
new
Error
(
"请输入
券
面额"
));
if
(
!
Number
.
isFinite
(
num
))
return
Promise
.
reject
(
new
Error
(
"请输入
展示
面额"
));
if
(
num
<=
0
)
return
Promise
.
reject
(
new
Error
(
"必须为大于0的正数"
));
if
(
num
<=
0
)
return
Promise
.
reject
(
new
Error
(
"必须为大于0的正数"
));
const
delta
=
Math
.
abs
(
num
*
100
-
Math
.
round
(
num
*
100
));
const
delta
=
Math
.
abs
(
num
*
100
-
Math
.
round
(
num
*
100
));
if
(
delta
>
1
e
-
9
)
return
Promise
.
reject
(
new
Error
(
"最多支持小数点后两位"
));
if
(
delta
>
1
e
-
9
)
return
Promise
.
reject
(
new
Error
(
"最多支持小数点后两位"
));
...
@@ -527,6 +526,30 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
...
@@ -527,6 +526,30 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
}
}
handleOk
()
{
handleOk
()
{
this
.
$refs
.
formRef
.
validate
().
then
(()
=>
{
this
.
$refs
.
formRef
.
validate
().
then
(()
=>
{
if
(
this
.
postData
.
relatedActivities
?.
length
>
0
)
{
Modal
.
confirm
({
title
:
"风险提示:"
,
icon
:
createVNode
(
InfoCircleFilled
,
{
style
:
{
color
:
"#EB2F2F"
}
}),
content
:
createVNode
(
"div"
,
{
style
:
{
lineHeight
:
"22px"
}
},
[
createVNode
(
"p"
,
{
style
:
{
marginBottom
:
"8px"
}
},
`当前优惠券已关联发放活动,修改规则将立即对后续新发放的优惠券生效(已发放的不受影响),确认继续修改吗?`
)
]),
okText
:
"确认"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
this
.
submitEvent
()
},
});
}
else
{
this
.
submitEvent
()
}
}).
finally
(()
=>
this
.
submitted
=
false
);
}
submitEvent
()
{
this
.
submitted
=
true
;
this
.
submitted
=
true
;
const
payload
=
this
.
buildSubmitPayload
();
const
payload
=
this
.
buildSubmitPayload
();
DiscountController
[
this
.
pageState
===
'EDIT'
?
'editCouponTemplate'
:
'createCouponTemplate'
](
this
.
axios
,
payload
).
then
(
res
=>
{
DiscountController
[
this
.
pageState
===
'EDIT'
?
'editCouponTemplate'
:
'createCouponTemplate'
](
this
.
axios
,
payload
).
then
(
res
=>
{
...
@@ -539,7 +562,6 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
...
@@ -539,7 +562,6 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
this
.
$emit
(
"emitOk"
,
payload
);
this
.
$emit
(
"emitOk"
,
payload
);
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
})
})
}).
finally
(()
=>
this
.
submitted
=
false
);
}
}
buildSubmitPayload
()
{
buildSubmitPayload
()
{
...
...
aus-front/admin/src/views/discount/coupon/components/ManualIssuanceModal.vue
View file @
2e94c9b
<
template
>
<
template
>
<a-drawer
width=
"936"
title=
"手动发放优惠券"
:maskClosable=
"false"
:keyboard=
"false"
placement=
"right"
:open=
"dialogVisible"
@
close=
"onClose"
>
<a-drawer
width=
"936"
title=
"手动发放优惠券"
:maskClosable=
"false"
:keyboard=
"false"
placement=
"right"
:open=
"dialogVisible"
@
close=
"onClose"
>
<a-form
layout=
"vertical"
:model=
"form"
ref=
"formRef"
>
<a-form
layout=
"vertical"
:model=
"form"
ref=
"formRef"
style=
"padding-bottom: 10px;"
>
<a-form-item
name=
"templateId"
label=
"选择优惠券"
:rules=
"[
{ required: true, message: '请选择优惠券' }]">
<a-form-item
name=
"templateId"
label=
"选择优惠券"
:rules=
"[
{ required: true, message: '请选择优惠券' }]">
<a-select
v-model:value=
"form.templateId"
placeholder=
"请选择优惠券"
style=
"width: 376px;"
:disabled=
"templateIdDisabled"
@
change=
"onTemplateChange"
>
<a-select
v-model:value=
"form.templateId"
placeholder=
"请选择优惠券"
style=
"width: 376px;"
:disabled=
"templateIdDisabled"
@
change=
"onTemplateChange"
>
<a-select-option
v-for=
"option in couponTemplateOptions"
:value=
"option.value"
:key=
"option.value"
>
<a-select-option
v-for=
"option in couponTemplateOptions"
:value=
"option.value"
:key=
"option.value"
>
...
@@ -80,13 +80,13 @@
...
@@ -80,13 +80,13 @@
<
/a-select
>
<
/a-select
>
<
/a-form-item
>
<
/a-form-item
>
<
a
-
form
-
item
name
=
"remark"
label
=
"发放备注"
:
rules
=
"
[{
required
:
true
,
message
:
'请输入发放备注'
}
]
">
<
a
-
form
-
item
name
=
"remark"
label
=
"发放备注"
:
rules
=
"
[{
required
:
true
,
message
:
'请输入发放备注'
}
]
">
<a-textarea v-model:value="
form
.
remark
" show-count :maxlength="
2
00
"
<a-textarea v-model:value="
form
.
remark
" show-count :maxlength="
1
00
"
placeholder="
请说明本次发放的原因,如:
XX
活动用户补偿
" :rows="
4
" />
placeholder="
请说明本次发放的原因,如:
XX
活动用户补偿
" :rows="
4
" />
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div class="
footer_btn
">
<div class="
footer_btn
">
<a-button @click="
onClose
">取消</a-button>
<a-button @click="
onClose
">取消</a-button>
<a-button type="
primary
" @click="
handleOk
()
">
创建
</a-button>
<a-button type="
primary
" @click="
handleOk
()
">
确认发放
</a-button>
</div>
</div>
</a-drawer>
</a-drawer>
</template>
</template>
...
@@ -125,6 +125,15 @@ export default class ManualIssuanceModal extends Vue {
...
@@ -125,6 +125,15 @@ export default class ManualIssuanceModal extends Vue {
couponTemplateOptions
:
OptionItem
[]
=
[];
couponTemplateOptions
:
OptionItem
[]
=
[];
openByRecord
(
record
:
any
)
{
openByRecord
(
record
:
any
)
{
// 初始化数据
this
.
form
=
{
templateId
:
undefined
as
string
|
undefined
,
templateName
:
""
,
applicableType
:
"ACCOUNT"
,
accounts
:
[],
accountTags
:
[],
remark
:
""
}
// 获取人员标签数据
// 获取人员标签数据
AccountController
.
getAccountTags
(
this
.
axios
).
then
(
res
=>
{
AccountController
.
getAccountTags
(
this
.
axios
).
then
(
res
=>
{
this
.
tags
=
res
.
data
;
this
.
tags
=
res
.
data
;
...
@@ -164,7 +173,6 @@ export default class ManualIssuanceModal extends Vue {
...
@@ -164,7 +173,6 @@ export default class ManualIssuanceModal extends Vue {
delayDays
:
obj
?.
delayDays
,
delayDays
:
obj
?.
delayDays
,
validDays
:
obj
?.
validDays
,
validDays
:
obj
?.
validDays
,
}
}
console
.
log
(
obj
)
}
}
onClose
()
{
onClose
()
{
...
...
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