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 5c4ba509
authored
Mar 26, 2024
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS-V4.37.0' of 192.168.3.233:saas_plus/dj-car-boutique-work-wechat into SAAS-V4.37.0
2 parents
5f9728b4
1fb4b526
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
30 deletions
packageEquity/pages/aiInspection/components/dataBox/dataBox.wxml
packageEquity/pages/aiInspectionReception/aiInspectionReception.wxml
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.sass
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/aiInspection/components/dataBox/dataBox.wxml
View file @
5c4ba50
...
...
@@ -10,7 +10,7 @@
</block>
</view>
<view class="data-value">
{{data[item.key]
||
'-'}}
{{data[item.key]
!= null ? data[item.key] :
'-'}}
<block wx:if="{{item.unit}}">
<view class="unit">{{item.unit}}</view>
</block>
...
...
packageEquity/pages/aiInspectionReception/aiInspectionReception.wxml
View file @
5c4ba50
...
...
@@ -27,11 +27,11 @@
</view>
<view class="sub-item flex">
<view class="label">命中文本</view>
<
view class="value">{{item.hitText || '-'}}</view
>
<
text class="value">{{item.hitText || '-'}}</text
>
</view>
<view class="example">
<view class="label">话术建议</view>
<
view class="value">{{item.suggestions||'-'}}</view
>
<
text class="value">{{item.suggestions||'-'}}</text
>
</view>
</view>
</view>
...
...
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.js
View file @
5c4ba50
import
NP
from
'number-precision'
Component
({
/**
* 组件的属性列表
...
...
@@ -152,7 +153,9 @@ Component({
c
.
packageGoods
.
goodsList
=
c
.
packageGoods
.
goodsList
.
map
(
item
=>
{
x
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
if
(
item
.
upgradeGoodsId
==
ele
.
upgradeGoodsId
)
{
console
.
log
(
item
.
price
,
ele
.
price
);
item
.
price
=
ele
.
price
||
0
console
.
log
(
item
.
price
,
ele
.
price
);
}
})
return
item
...
...
@@ -164,15 +167,24 @@ Component({
// else {
// c.goods.price = c.goods.sellPrice || 0
c
.
packageGoods
.
goodsList
=
c
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
ele
.
price
=
ele
.
price
||
ele
.
sellPrice
||
0
if
(
ele
?.
price
!==
''
&&
ele
?.
price
!==
null
&&
ele
?.
price
!==
undefined
)
{
ele
.
price
=
ele
.
price
}
else
{
ele
.
price
=
ele
.
sellPrice
||
0
}
// ele.price = ele.price || ele.sellPrice || 0
// console.log(ele, 'ele');
return
ele
})
// }
c
.
price
=
c
.
packageGoods
.
goodsList
.
reduce
((
total
,
item
)
=>
{
total
=
total
+
item
.
price
// total = total + item.price
// console.log(item.price, total, 'item.price');
// console.log(NP.plus(0.1, 0.2));
total
=
NP
.
plus
(
item
.
price
,
total
)
return
total
},
0
)
console
.
log
(
c
.
price
,
'c.price '
);
chooseList
.
push
(
c
)
}
}
...
...
@@ -226,7 +238,8 @@ Component({
}
=
e
.
currentTarget
.
dataset
let
target
=
`goodsList[
${
index
}
].upgradeGoodsList[
${
ind
}
].count`
if
(
!
item
.
count
)
item
.
count
=
1
item
.
count
+=
count
// item.count += count
item
.
count
=
NP
.
plus
(
item
.
count
,
count
)
if
(
item
.
count
<
1
)
item
.
count
=
1
if
(
item
.
count
>
999
)
item
.
count
=
999
this
.
setData
({
...
...
@@ -276,14 +289,14 @@ Component({
arr
.
push
(
c
)
}
})
console
.
log
(
arr
)
//
console.log(arr)
this
.
setData
({
goodsList
:
arr
})
},
confirm
()
{
let
chooseList
=
this
.
getChooseList
()
console
.
log
(
chooseList
,
'chooseList'
);
//
console.log(chooseList, 'chooseList');
let
{
goodsList
}
=
this
.
data
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
View file @
5c4ba50
...
...
@@ -4,6 +4,7 @@ import data from '../constant/stepData'
import
{
priceCounter
}
from
'~/packageEquity/api'
import
NP
from
'number-precision'
const
defaultLabelWidth
=
'var(--fontSize140)'
Component
({
options
:
{
...
...
@@ -199,7 +200,9 @@ Component({
// }
vdQuotationGoodsList
[
index
].
packageGoods
.
goodsList
[
childind
].
price
=
number
let
packagePrice
=
vdQuotationGoodsList
[
index
].
packageGoods
.
goodsList
.
reduce
((
num
,
item
)
=>
{
num
=
num
+
parseFloat
(
item
.
price
||
0
)
// num = num + parseFloat(item.price || 0)
num
=
NP
.
plus
(
num
,
parseFloat
(
item
.
price
||
0
))
// num = num + parseFloat(item.price || 0)
return
num
},
0
)
// console.log(packagePrice);
...
...
@@ -247,13 +250,15 @@ Component({
let
total
=
0
orderInfo
.
vdQuotationGoodsList
.
map
(
i
=>
{
if
(
i
.
goods
)
{
total
+=
parseFloat
(
i
.
goods
.
count
||
1
)
*
parseFloat
(
i
.
goods
.
price
)
// total += parseFloat(i.goods.count || 1) * parseFloat(i.goods.price)
total
=
NP
.
plus
(
total
,
NP
.
times
(
parseFloat
(
i
.
goods
.
count
||
1
),
parseFloat
(
i
.
goods
.
price
)))
}
if
(
i
.
packageGoods
)
{
console
.
log
(
i
.
packageGoods
,
'i.packageGoods'
);
i
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
total
+=
parseFloat
(
ele
.
count
||
1
)
*
parseFloat
(
ele
.
price
)
// total += parseFloat(ele.count || 1) * parseFloat(ele.price)
total
=
NP
.
plus
(
total
,
NP
.
times
(
parseFloat
(
ele
.
count
||
1
),
parseFloat
(
ele
.
price
)))
})
}
})
...
...
@@ -535,7 +540,7 @@ Component({
})
}
})
this
.
setData
({
orderInfo
})
this
.
setData
({
orderInfo
})
if
(
goodsError
?.
length
)
return
wx
.
$util
.
showToast
(
'价格不可低于商品最低价'
)
if
(
name
==
'confirm'
)
{
// 不是修改报价时,需要勾选保险
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.sass
View file @
5c4ba50
...
...
@@ -322,7 +322,6 @@
box-sizing
:
border-box
;
width
:
100%
;
height
:
var
(
--
fontSize64
)
;
text-align
:
end
;
min-height
:
100%
;
font-size
:
var
(
--
fontSize28
)
;
padding
:
0
var
(
--
fontSize16
)
0
var
(
--
fontSize50
)
;
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
5c4ba50
...
...
@@ -445,7 +445,7 @@ Page({
wx
.
$router
.
redirectTo
(
'CarQuotationPay'
,
obj
)
},
getOrderInfo
()
{
let
{
id
,
orderInfo
}
=
this
.
data
let
{
id
,
orderInfo
,
quotationGoodsList
}
=
this
.
data
// 先写死调试
getQuotationInfoById
({
id
...
...
@@ -468,8 +468,10 @@ Page({
let
obj
=
{
...
item
,
upgradeGoodsId
:
item
.
goodsId
,
merchantGoodsId
:
item
.
id
,
price
:
this
.
divideByHundred
(
item
.
goodsPrice
)
merchantGoodsId
:
item
.
goodsId
,
price
:
this
.
divideByHundred
(
item
.
goodsPrice
),
minSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
?.
goods
?.
merchantGoodsId
==
item
.
goodsId
)?.
goods
?.
minSellPrice
,
// 按商品数据对比补充详情商品最低价
validMinSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
?.
goods
?.
merchantGoodsId
==
item
.
goodsId
)?.
goods
?.
validMinSellPrice
// 按商品数据对比补充详情商品校验最低价字段
}
pre
.
push
({
goods
:
obj
,
packageGoods
:
null
})
}
...
...
@@ -478,18 +480,19 @@ Page({
...
item
,
merchantGoodsId
:
item
.
goodsId
,
upgradeGoodsId
:
item
.
goodsId
,
price
:
this
.
divideByHundred
(
item
.
goodsPrice
)
price
:
this
.
divideByHundred
(
item
.
goodsPrice
),
minSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
.
packageGoods
?.
goodsList
?.
length
&&
val
.
packageGoods
?.
packageCode
==
item
?.
packageId
)?.
packageGoods
?.
goodsList
?.
find
(
subV
=>
subV
.
merchantGoodsId
==
item
.
goodsId
)?.
minSellPrice
,
// 按商品数据对比补充详情商品最低价
validMinSellPrice
:
quotationGoodsList
?.
find
(
val
=>
val
.
packageGoods
?.
goodsList
?.
length
&&
val
.
packageGoods
?.
packageCode
==
item
?.
packageId
)?.
packageGoods
?.
goodsList
?.
find
(
subV
=>
subV
.
merchantGoodsId
==
item
.
goodsId
)?.
validMinSellPrice
// 按商品数据对比补充详情商品校验最低价字段
}
let
index
=
pre
.
findIndex
(
ele
=>
{
if
(
ele
.
packageGoods
)
{
return
ele
.
packageGoods
.
packageId
==
item
.
packageId
}
})
console
.
log
(
index
,
'index'
);
//
console.log(index, 'index');
if
(
index
!=
-
1
)
{
pre
[
index
].
packageGoods
.
goodsList
.
push
(
obj
)
pre
[
index
].
price
+=
obj
.
price
pre
[
index
].
price
=
NP
.
plus
(
pre
[
index
].
price
,
obj
.
price
)
}
else
{
pre
.
push
({
goods
:
null
,
...
...
@@ -517,7 +520,7 @@ Page({
owner
:
tableInfo
.
owner
// ...insuranceTypeObj
})
this
.
getQuotationInfo
()
//
this.getQuotationInfo()
}
})
.
catch
(
err
=>
{
})
...
...
@@ -530,13 +533,15 @@ Page({
// orderInfo.vdQuotationGoodsList.map(i => (total += parseFloat(i?.count || 1) * parseFloat(i.price)))
orderInfo
.
vdQuotationGoodsList
.
map
(
i
=>
{
if
(
i
.
goods
)
{
total
+=
parseFloat
(
i
.
goods
.
count
||
1
)
*
parseFloat
(
i
.
goods
.
price
)
// total += parseFloat(i.goods.count || 1) * parseFloat(i.goods.price)
total
=
NP
.
plus
(
total
,
NP
.
times
(
parseFloat
(
i
.
goods
.
count
||
1
),
parseFloat
(
i
.
goods
.
price
)))
}
if
(
i
.
packageGoods
)
{
console
.
log
(
i
.
packageGoods
,
'i.packageGoods'
)
i
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
total
+=
parseFloat
(
ele
.
count
||
1
)
*
parseFloat
(
ele
.
price
)
total
=
NP
.
plus
(
total
,
NP
.
times
(
parseFloat
(
ele
.
count
||
1
),
parseFloat
(
ele
.
price
)))
// total += parseFloat(ele.count || 1) * parseFloat(ele.price)
})
}
})
...
...
@@ -610,7 +615,8 @@ Page({
// debugger
let
{
owner
:
{
price
},
orderInfo
orderInfo
,
id
}
=
this
.
data
quotationGoodsList
({
merchantId
:
default4SStoreInfo
.
merchantId
,
...
...
@@ -660,7 +666,8 @@ Page({
if
(
ele
.
packageGoods
)
{
let
item
=
ele
.
packageGoods
ele
.
packageGoods
.
sellPrice
=
item
.
goodsList
.
reduce
((
pre
,
item
)
=>
{
pre
=
pre
+
item
.
sellPrice
// pre = pre + item.sellPrice
pre
=
NP
.
plus
(
pre
,
item
.
sellPrice
)
return
pre
},
0
)
}
...
...
@@ -671,8 +678,17 @@ Page({
})
// 判断有没有勾选商品,有的话调用一下
orderInfo
.
vdQuotationGoodsList
.
length
&&
this
.
totalFee
()
// 获取订单详情
if
(
id
)
{
this
.
getOrderInfo
()
}
})
.
catch
(
err
=>
{
// 获取订单详情
if
(
id
)
{
this
.
getOrderInfo
()
}
})
.
catch
(
err
=>
{
})
},
// 后面改成全局方法
// 除以100保留两位小数点
...
...
@@ -750,10 +766,9 @@ Page({
this
.
setData
({
id
})
this
.
getOrderInfo
()
}
else
{
this
.
getQuotationInfo
()
// this.getOrderInfo()
}
this
.
getQuotationInfo
()
//客户线索回显客户信息
if
(
customerInfo
)
this
.
setCustomerInfo
(
customerInfo
)
this
.
setData
({
...
...
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