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 d53f01dc
authored
Jan 30, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
d8a8c63d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
37 deletions
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/productStrategy.js
tabWorkOrder/pages/createOrder/createOrder.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
View file @
d53f01d
...
...
@@ -363,20 +363,28 @@ Component({
if
(
currentType
==
1
)
{
// 折扣比例
// 2:是折扣比例的话,最多只能输入1位整数和1个小数
const
dotIndex
=
value
.
indexOf
(
'.'
)
if
(
dotIndex
!==
-
1
)
{
let
integerPart
=
value
.
substring
(
0
,
dotIndex
)
let
decimalPart
=
value
.
substring
(
dotIndex
+
1
)
if
(
integerPart
.
length
>
1
)
{
integerPart
=
integerPart
.
slice
(
0
,
1
)
}
if
(
decimalPart
.
length
>
1
)
{
decimalPart
=
decimalPart
.
slice
(
0
,
1
)
}
value
=
integerPart
+
'.'
+
decimalPart
// 允许输入 10 (无折扣)
if
(
value
===
'10'
)
{
// Allow '10'
}
else
if
(
value
.
startsWith
(
'10'
)
&&
value
!==
'10'
)
{
// If starts with 10 but has more chars (e.g. 10.1), restrict to 10
value
=
'10'
}
else
{
if
(
value
.
length
>
1
)
{
value
=
value
.
slice
(
0
,
1
)
const
dotIndex
=
value
.
indexOf
(
'.'
)
if
(
dotIndex
!==
-
1
)
{
let
integerPart
=
value
.
substring
(
0
,
dotIndex
)
let
decimalPart
=
value
.
substring
(
dotIndex
+
1
)
if
(
integerPart
.
length
>
1
)
{
integerPart
=
integerPart
.
slice
(
0
,
1
)
}
if
(
decimalPart
.
length
>
1
)
{
decimalPart
=
decimalPart
.
slice
(
0
,
1
)
}
value
=
integerPart
+
'.'
+
decimalPart
}
else
{
if
(
value
.
length
>
1
)
{
value
=
value
.
slice
(
0
,
1
)
}
}
}
}
else
if
(
currentType
==
2
)
{
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
d53f01d
...
...
@@ -937,7 +937,12 @@ Page({
tableInfo
.
vdQuotationGoodsList
=
tableInfo
.
vdQuotationGoodsList
.
map
(
item
=>
{
item
.
price
=
this
.
multipliedByHundred
(
item
.
goodsPrice
)
// 套餐商品单位是元,需要转分;其他商品(普通/多规格)单位是分,直接使用
if
(
item
.
packageName
)
{
item
.
price
=
this
.
multipliedByHundred
(
item
.
goodsPrice
)
}
else
{
item
.
price
=
item
.
goodsPrice
}
return
item
}
)
...
...
@@ -952,8 +957,8 @@ Page({
basePrice
:
undefined
,
upgradeGoodsId
:
item
.
goodsId
,
merchantGoodsId
:
item
.
goodsId
,
price
:
item
.
goodsP
rice
,
goodsPrice
:
item
.
goodsP
rice
,
price
:
item
.
p
rice
,
goodsPrice
:
item
.
p
rice
,
finalPrice
:
item
.
finalPrice
,
minSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
?.
goods
?.
merchantGoodsId
==
item
.
goodsId
...
...
@@ -975,8 +980,8 @@ Page({
basePrice
:
undefined
,
upgradeGoodsId
:
item
.
goodsId
,
upgradeGoodsId
:
item
.
goodsId
,
price
:
item
.
goodsP
rice
,
goodsPrice
:
item
.
goodsP
rice
,
price
:
item
.
p
rice
,
goodsPrice
:
item
.
p
rice
,
finalPrice
:
item
.
finalPrice
,
minSellPrice
:
quotationGoodsList
?.
find
(
...
...
@@ -1010,10 +1015,10 @@ Page({
pre
.
push
({
goods
:
null
,
goodsFlag
:
3
,
price
:
item
.
goodsP
rice
,
price
:
item
.
p
rice
,
packageGoods
:
{
...
item
,
goodsPrice
:
item
.
goodsP
rice
,
goodsPrice
:
item
.
p
rice
,
finalPrice
:
item
.
finalPrice
,
packageCode
:
item
.
packageId
,
goodsList
:
[
...
...
@@ -1085,8 +1090,8 @@ Page({
goods
:
temp
,
baseGoodsName
:
item
.
goodsName
}
temp
.
price
=
item
.
goodsP
rice
temp
.
goodsPrice
=
item
.
goodsP
rice
temp
.
price
=
item
.
p
rice
temp
.
goodsPrice
=
item
.
p
rice
temp
.
finalPrice
=
item
.
finalPrice
temp
.
basePrice
=
undefined
temp
.
goodsId
=
item
.
goodsId
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/productStrategy.js
View file @
d53f01d
...
...
@@ -143,7 +143,7 @@ ProductStrategy.prototype.applyDiscount = function () {
finalPrice
=
Math
.
round
(
finalPrice
)
}
}
else
if
(
type
==
DISCOUNT_TYPE
.
AMOUNT
&&
value
)
{
finalPrice
=
NP
.
minus
(
basePrice
,
value
)
finalPrice
=
NP
.
minus
(
basePrice
,
NP
.
times
(
value
,
100
)
)
finalPrice
=
Math
.
round
(
finalPrice
)
if
(
finalPrice
<
0
)
finalPrice
=
0
}
else
if
(
type
==
DISCOUNT_TYPE
.
GIFT
)
{
...
...
@@ -376,7 +376,7 @@ PackageProductStrategy.prototype.applySubItemDiscount = function (subItem) {
finalPrice
=
Math
.
round
(
finalPrice
)
}
}
else
if
(
type
==
DISCOUNT_TYPE
.
AMOUNT
&&
value
)
{
finalPrice
=
NP
.
minus
(
basePrice
,
value
)
finalPrice
=
NP
.
minus
(
basePrice
,
NP
.
times
(
value
,
100
)
)
finalPrice
=
Math
.
round
(
finalPrice
)
if
(
finalPrice
<
0
)
finalPrice
=
0
}
else
if
(
type
==
DISCOUNT_TYPE
.
GIFT
)
{
...
...
tabWorkOrder/pages/createOrder/createOrder.js
View file @
d53f01d
...
...
@@ -267,20 +267,28 @@ Page({
if
(
currentType
==
1
)
{
// 折扣比例
// 2:是折扣比例的话,最多只能输入1位整数和1个小数
const
dotIndex
=
value
.
indexOf
(
'.'
)
if
(
dotIndex
!==
-
1
)
{
let
integerPart
=
value
.
substring
(
0
,
dotIndex
)
let
decimalPart
=
value
.
substring
(
dotIndex
+
1
)
if
(
integerPart
.
length
>
1
)
{
integerPart
=
integerPart
.
slice
(
0
,
1
)
}
if
(
decimalPart
.
length
>
1
)
{
decimalPart
=
decimalPart
.
slice
(
0
,
1
)
}
value
=
integerPart
+
'.'
+
decimalPart
// 允许输入 10 (无折扣)
if
(
value
===
'10'
)
{
// Allow '10'
}
else
if
(
value
.
startsWith
(
'10'
)
&&
value
!==
'10'
)
{
// If starts with 10 but has more chars (e.g. 10.1), restrict to 10
value
=
'10'
}
else
{
if
(
value
.
length
>
1
)
{
value
=
value
.
slice
(
0
,
1
)
const
dotIndex
=
value
.
indexOf
(
'.'
)
if
(
dotIndex
!==
-
1
)
{
let
integerPart
=
value
.
substring
(
0
,
dotIndex
)
let
decimalPart
=
value
.
substring
(
dotIndex
+
1
)
if
(
integerPart
.
length
>
1
)
{
integerPart
=
integerPart
.
slice
(
0
,
1
)
}
if
(
decimalPart
.
length
>
1
)
{
decimalPart
=
decimalPart
.
slice
(
0
,
1
)
}
value
=
integerPart
+
'.'
+
decimalPart
}
else
{
if
(
value
.
length
>
1
)
{
value
=
value
.
slice
(
0
,
1
)
}
}
}
}
else
if
(
currentType
==
2
)
{
...
...
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