Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d8a8c63d
authored
Jan 30, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 自测bug
1 parent
870baa39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
2 deletions
tabWorkOrder/pages/createOrder/createOrder.js
tabWorkOrder/pages/createOrder/createOrder.js
View file @
d8a8c63
...
@@ -1501,6 +1501,9 @@ Page({
...
@@ -1501,6 +1501,9 @@ Page({
let
{
subOrderList
,
packageGoodsList
}
=
orderObj
let
{
subOrderList
,
packageGoodsList
}
=
orderObj
let
chooseList
=
[]
let
chooseList
=
[]
if
(
packageGoodsList
&&
packageGoodsList
.
length
>
0
)
{
subOrderList
=
subOrderList
?.
filter
(
item
=>
!
item
.
packageName
)
}
subOrderList
=
subOrderList
?.
concat
(
packageGoodsList
)
subOrderList
=
subOrderList
?.
concat
(
packageGoodsList
)
if
(
subOrderList
&&
subOrderList
.
length
)
{
if
(
subOrderList
&&
subOrderList
.
length
)
{
...
@@ -1569,6 +1572,28 @@ Page({
...
@@ -1569,6 +1572,28 @@ Page({
)
{
)
{
g
.
minSellPrice
=
g
.
sellPrice
g
.
minSellPrice
=
g
.
sellPrice
}
}
// 回显折扣信息
let
basePrice
=
g
.
sellPrice
||
g
.
price
let
finalPrice
=
basePrice
let
discountType
=
g
.
discountType
let
discountValue
=
g
.
discountValue
if
(
discountType
==
1
&&
discountValue
)
{
if
(
discountValue
>
0
&&
discountValue
<=
10
)
{
finalPrice
=
NP
.
times
(
basePrice
,
NP
.
divide
(
discountValue
,
10
))
finalPrice
=
Math
.
round
(
finalPrice
*
100
)
/
100
}
}
else
if
(
discountType
==
2
&&
discountValue
)
{
finalPrice
=
NP
.
minus
(
basePrice
,
discountValue
)
if
(
finalPrice
<
0
)
finalPrice
=
0
}
else
if
(
discountType
==
4
)
{
finalPrice
=
0
}
g
.
basePrice
=
basePrice
g
.
finalPrice
=
finalPrice
g
.
discountAmount
=
NP
.
minus
(
basePrice
,
finalPrice
)
})
})
e
.
goodsList
=
e
.
packageGoodsOrderList
e
.
goodsList
=
e
.
packageGoodsOrderList
e
.
upgradePrice
=
e
.
goodsList
.
reduce
((
prev
,
cur
)
=>
{
e
.
upgradePrice
=
e
.
goodsList
.
reduce
((
prev
,
cur
)
=>
{
...
@@ -1679,10 +1704,35 @@ Page({
...
@@ -1679,10 +1704,35 @@ Page({
...
temp
,
...
temp
,
resetOrder
:
item
.
resetOrder
,
resetOrder
:
item
.
resetOrder
,
price
:
item
.
price
,
price
:
item
.
price
,
sellPrice
:
item
.
price
,
sellPrice
:
item
.
sellPrice
||
item
.
price
,
goodsId
:
item
.
goodsId
,
goodsId
:
item
.
goodsId
,
specificationStr
:
item
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
specificationStr
:
item
.
specificationData
.
replace
(
/;~;/g
,
'/'
),
discountType
:
item
.
discountType
,
discountValue
:
item
.
discountValue
}
}
// 回显折扣信息
let
basePrice
=
goodsInfo
.
sellPrice
let
finalPrice
=
basePrice
let
discountType
=
goodsInfo
.
discountType
let
discountValue
=
goodsInfo
.
discountValue
if
(
discountType
==
1
&&
discountValue
)
{
if
(
discountValue
>
0
&&
discountValue
<=
10
)
{
finalPrice
=
NP
.
times
(
basePrice
,
NP
.
divide
(
discountValue
,
10
))
finalPrice
=
Math
.
round
(
finalPrice
*
100
)
/
100
}
}
else
if
(
discountType
==
2
&&
discountValue
)
{
finalPrice
=
NP
.
minus
(
basePrice
,
discountValue
)
if
(
finalPrice
<
0
)
finalPrice
=
0
}
else
if
(
discountType
==
4
)
{
finalPrice
=
0
}
goodsInfo
.
basePrice
=
basePrice
goodsInfo
.
finalPrice
=
finalPrice
goodsInfo
.
discountAmount
=
NP
.
minus
(
basePrice
,
finalPrice
)
if
(
if
(
goodsInfo
.
minSellPrice
&&
goodsInfo
.
minSellPrice
&&
goodsInfo
.
sellPrice
&&
goodsInfo
.
sellPrice
&&
...
...
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