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 ae2ac1ce
authored
Jul 03, 2023
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_v4.23.0' into 'dev_v4.24.0'
线上bug修复 See merge request
!111
2 parents
d6a34207
6acc3736
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
31 deletions
components/Goods/Goods.js
pages/wxLogin/wxLogin.wxml
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.js
components/Goods/Goods.js
View file @
ae2ac1c
...
@@ -170,7 +170,7 @@ Component({
...
@@ -170,7 +170,7 @@ Component({
if
(
!
chooseList
.
length
)
return
wx
.
$util
.
showToast
(
'请勾选商品'
)
if
(
!
chooseList
.
length
)
return
wx
.
$util
.
showToast
(
'请勾选商品'
)
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
//
thisPage.setGoodsTotal(chooseList)
thisPage
.
setGoodsTotal
&&
thisPage
.
setGoodsTotal
(
chooseList
)
// console.log(chooseList)
// console.log(chooseList)
thisPage
.
setData
({
thisPage
.
setData
({
goodsList
:
chooseList
goodsList
:
chooseList
...
...
pages/wxLogin/wxLogin.wxml
View file @
ae2ac1c
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
</view>
</view>
<view class="login-btn {{ loginType == 3?'mini':'' }}">
<view class="login-btn {{ loginType == 3?'mini':'' }}">
<button size="default" hidden="{{ loginType != 3 || !agree }}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" />
<button size="default" hidden="{{ loginType != 3 || !agree }}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" />
<view hidden="{{ loginType !=3 }}" bindtap="checkAgree">微信登录</view>
<view hidden="{{ loginType !=3 }}" bindtap="checkAgree">授权登录</view>
<!-- <view hidden="{{ loginType !=3 }}" bindtap="checkAgree">微信登录</view> -->
</view>
</view>
<view class="mobile_btn" bindtap="changeLoginType" data-type="1" wx:if="{{ loginType != 1 }}">手机号登录</view>
<view class="mobile_btn" bindtap="changeLoginType" data-type="1" wx:if="{{ loginType != 1 }}">手机号登录</view>
<auth-noLogin bind:choose="noLoginAgreeChoose" agree="{{ noLoginAgree }}"></auth-noLogin>
<auth-noLogin bind:choose="noLoginAgreeChoose" agree="{{ noLoginAgree }}"></auth-noLogin>
...
@@ -59,7 +60,8 @@
...
@@ -59,7 +60,8 @@
<view class="login_btn" bindtap="smsLogin">登录</view>
<view class="login_btn" bindtap="smsLogin">登录</view>
<view class="wx_login">
<view class="wx_login">
或
或
<text bindtap="changeLoginType" data-type="3">微信登录</text>
<!-- <text bindtap="changeLoginType" data-type="3">微信登录</text> -->
<text bindtap="changeLoginType" data-type="3">授权登录</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.js
View file @
ae2ac1c
...
@@ -229,34 +229,36 @@ Page({
...
@@ -229,34 +229,36 @@ Page({
// this.setGoodsTotal(goodsList)
// this.setGoodsTotal(goodsList)
},
},
setGoodsTotal
(
goodsList
)
{
// 屏蔽不用
let
{
totalFee
}
=
this
.
data
// setGoodsTotal(goodsList) {
let
total
=
0
// goodsList.map(i => (total += i.count * i.price))
// let { totalFee } = this.data
goodsList
.
map
(
i
=>
{
// let total = 0
const
totalPrice
=
NP
.
times
(
i
.
count
,
i
.
price
)
// // goodsList.map(i => (total += i.count * i.price))
total
=
NP
.
plus
(
total
,
totalPrice
)
// goodsList.map(i => {
})
// const totalPrice = NP.times(i.count, i.price)
// 用来解决小数相减导致精度问题
// total = NP.plus(total, totalPrice)
// total = this.accMul(total, 100)
// })
total
=
NP
.
times
(
total
,
100
)
// // 用来解决小数相减导致精度问题
// // total = this.accMul(total, 100)
// total = parseFloat(total.toFixed(2))
// total = NP.times(total, 100)
// console.log(total * 100)
// console.log(totalFee)
// // total = parseFloat(total.toFixed(2))
// console.log(totalFee * 100)
// // console.log(total * 100)
// 计算差价格 没有就归0 100是用来解决小数相减导致精度问题
// // console.log(totalFee)
// console.log(this.accMul(total, 100))
// // console.log(totalFee * 100)
// 解决数据精度丢失问题
// // 计算差价格 没有就归0 100是用来解决小数相减导致精度问题
// let priceSpread = goodsList.length ? parseFloat((total - totalFee).toFixed(2)) : 0
// // console.log(this.accMul(total, 100))
let
priceSpread
=
goodsList
.
length
?
NP
.
minus
(
total
,
totalFee
)
:
0
// // 解决数据精度丢失问题
// console.log(priceSpread)
// // let priceSpread = goodsList.length ? parseFloat((total - totalFee).toFixed(2)) : 0
this
.
setData
({
// let priceSpread = goodsList.length ? NP.minus(total, totalFee) : 0
priceSpread
:
priceSpread
,
// // console.log(priceSpread)
// total: wx.$util.decimal(total, 2)
// this.setData({
total
// priceSpread: priceSpread,
})
// // total: wx.$util.decimal(total, 2)
},
// total
// })
// },
// accSub(arg1, arg2) {
// accSub(arg1, arg2) {
// let r1, r2, m, n
// let r1, r2, m, n
...
...
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