Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 926f5dd7
authored
Jun 12, 2026
by
Jaxon
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.8.2_zls' into 'SAAS+V5.8.2'
Saas+v5.8.2 zls See merge request
!737
2 parents
3c246a4c
3cb4d42d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
9 deletions
src/components/d2-table/index.vue
src/views/systemConfig/merchant/financialRules/components/financialCalculationDialog.vue
src/views/systemConfig/merchant/financialRules/utils/validateStep3Amounts.js
src/components/d2-table/index.vue
View file @
926f5dd
...
...
@@ -143,7 +143,6 @@
</el-tag>
<span
v-else
>
-
</span>
</div>
</
template
>
<
template
v-else-if=
"sub.formatter"
>
<span
v-if=
"sub.html"
v-html=
"sub.formatter(scope.row)"
/>
...
...
@@ -259,7 +258,6 @@
</div>
</
template
>
<
template
v-else-if=
"item.formatter"
>
<span
v-if=
"item.html"
v-html=
"item.formatter(scope.row)"
/>
...
...
src/views/systemConfig/merchant/financialRules/components/financialCalculationDialog.vue
View file @
926f5dd
...
...
@@ -93,10 +93,12 @@ import {
}
from
'../utils/divisionTestStepProgress'
import
{
buildStep2DisplayMerchants
,
buildStep3VerifyMerchants
,
isTotalProfitAmountValid
buildStep3VerifyMerchants
}
from
'../utils/buildStep2DisplayMerchants'
import
{
buildStep3SubmitMerchants
}
from
'../utils/validateStep3Amounts'
import
{
buildStep3SubmitMerchants
,
isStep3AmountTotalConsistent
}
from
'../utils/validateStep3Amounts'
import
{
buildDivisionRuleTestParams
,
buildDivisionRuleTestRetestParams
,
...
...
@@ -514,10 +516,6 @@ export default {
return
}
if
(
this
.
viewStep
===
2
)
{
if
(
!
isTotalProfitAmountValid
(
this
.
step2Merchants
))
{
this
.
$message
.
warning
(
'金额不一致,请确认后重新操作'
)
return
}
this
.
maxReachedStep
=
3
this
.
setViewStep
(
3
)
}
...
...
@@ -531,6 +529,10 @@ export default {
const
rawList
=
resolveDivisionTestMerchantDivisions
(
this
.
testObj
)
const
formMerchants
=
step3
.
getSubmitMerchants
()
if
(
!
isStep3AmountTotalConsistent
(
formMerchants
,
rawList
))
{
this
.
$message
.
warning
(
'金额不一致,请确认后重新操作'
)
return
}
const
testMerchantDivisions
=
buildStep3SubmitMerchants
(
rawList
,
formMerchants
)
const
params
=
buildDivisionRuleTestMoneyValidParams
({
testObj
:
this
.
testObj
,
...
...
src/views/systemConfig/merchant/financialRules/utils/validateStep3Amounts.js
View file @
926f5dd
...
...
@@ -79,3 +79,45 @@ export function buildStep3SubmitMerchants(displayMerchants, formMerchants) {
}
})
}
function
roundMoney
(
n
)
{
return
Math
.
round
(
n
*
100
)
/
100
}
function
parseMoney
(
value
)
{
const
n
=
parseFloat
(
value
)
return
Number
.
isFinite
(
n
)
?
n
:
0
}
/** 待确认商户接口返回 divisionMoney 合计 */
export
function
sumExpectedDivisionMoney
(
rawList
)
{
return
roundMoney
(
getStep3PendingMerchants
(
rawList
).
reduce
(
(
sum
,
m
)
=>
sum
+
parseMoney
(
m
.
divisionMoney
),
0
)
)
}
/** 待确认商户用户填写 confirmDivisionMoney 合计 */
export
function
sumConfirmDivisionMoney
(
formMerchants
,
rawList
)
{
const
formMap
=
new
Map
()
;(
formMerchants
||
[]).
forEach
((
m
)
=>
{
const
key
=
step3MerchantKey
(
m
)
if
(
key
)
formMap
.
set
(
key
,
m
)
})
return
roundMoney
(
getStep3PendingMerchants
(
rawList
).
reduce
((
sum
,
m
)
=>
{
const
key
=
step3MerchantKey
(
m
)
const
form
=
formMap
.
get
(
key
)
||
m
return
sum
+
parseMoney
(
form
.
confirmDivisionMoney
)
},
0
)
)
}
/** 用户填写合计与接口 divisionMoney 合计是否一致 */
export
function
isStep3AmountTotalConsistent
(
formMerchants
,
rawList
)
{
const
expected
=
sumExpectedDivisionMoney
(
rawList
)
const
actual
=
sumConfirmDivisionMoney
(
formMerchants
,
rawList
)
return
Math
.
abs
(
actual
-
expected
)
<
0.001
}
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