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 aadc3a88
authored
Mar 20, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug修复
1 parent
66adc7a0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
63 deletions
packageEquity/api.js
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.js
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/index/index.js
tabIndex/pages/index/index.js
packageEquity/api.js
View file @
aadc3a8
...
...
@@ -170,5 +170,9 @@ module.exports = {
staffDailyReportMerchantValid
(
data
)
{
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return
api
.
post
(
'dj.api.smartcarlife.staff.daily.report.popup.need'
,
data
)
},
/** 员工是否需要推送开单预警 */
orderStaffValid
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.staff.valid'
,
data
)
}
}
packageEquity/pages/carQuotation/components/FirstStep/FirstStep.js
View file @
aadc3a8
...
...
@@ -49,23 +49,24 @@ Component({
observers
:
{
'orderInfo.mode'
:
function
(
value
)
{
// 先注释掉
// this.getYqStoreConfig()
// if (n.mode) {
console
.
log
(
value
,
data
,
data
.
firstObjSimple
,
'mode'
)
console
.
log
({
first
:
value
?
data
.
firstObjSimple
:
data
.
firstObj
},
' first: value ? data.firstObjSimple : data.firstObj,'
);
//
console.log(value, data, data.firstObjSimple, 'mode')
//
console.log({
//
first: value ? data.firstObjSimple : data.firstObj
//
}, ' first: value ? data.firstObjSimple : data.firstObj,');
// first: data.firstObj,
// let thisPage =
let
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
thisPage
.
data
.
orderInfo
.
mode
!=
value
)
{
this
.
getYqStoreConfig
()
this
.
setData
({
first
:
value
?
data
.
firstObjSimple
:
data
.
firstObj
,
formRule
:
value
?
data
.
formRuleSimple
:
data
.
formRule
})
}
// let thisPage = wx.$router.getPageInstance()
// console.log(thisPage);
// if (thisPage.data.orderInfo.mode != value) {
this
.
setData
({
first
:
value
?
data
.
firstObjSimple
:
data
.
firstObj
,
formRule
:
value
?
data
.
formRuleSimple
:
data
.
formRule
})
// }
// }
...
...
@@ -100,6 +101,7 @@ Component({
lifetimes
:
{
attached
()
{
this
.
getEmployee
()
this
.
getYqStoreConfig
()
}
},
...
...
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.js
View file @
aadc3a8
...
...
@@ -78,6 +78,7 @@ Component({
if
(
s
.
goods
&&
e
.
goods
)
{
// console.log(e);
if
(
s
.
goods
.
goodsId
==
e
.
goods
.
goodsId
)
{
console
.
log
(
s
.
goods
.
goodsId
,
e
.
goods
.
goodsId
,
's.goods.goodsId'
);
e
.
active
=
true
}
}
...
...
@@ -158,18 +159,16 @@ Component({
return
item
})
}
// if (x.goods.goodsId == c.goods.goodsId) {
// console.log(x)
// c.goods.price = x.goods.price || 0
// }
})
}
else
{
// c.goods.price = c.goods.sellPrice || 0
c
.
packageGoods
.
goodsList
=
c
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
ele
.
price
=
ele
.
sellPrice
||
0
return
ele
})
}
// else {
// c.goods.price = c.goods.sellPrice || 0
c
.
packageGoods
.
goodsList
=
c
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
ele
.
price
=
ele
.
price
||
ele
.
sellPrice
||
0
return
ele
})
// }
c
.
price
=
c
.
packageGoods
.
goodsList
.
reduce
((
total
,
item
)
=>
{
total
=
total
+
item
.
price
return
total
...
...
@@ -209,11 +208,11 @@ Component({
}
if
(
item
.
packageGoods
&&
el
.
packageGoods
)
{
// console.log(el[goodsType], 'el[goodsType]');
return
el
[
goodsType
].
package
Goods
==
item
[
goodsType
].
packageGoods
return
el
[
goodsType
].
package
Code
==
item
[
goodsType
].
packageCode
}
})
//
console.log(recordIndex, 'recordIndex');
console
.
log
(
recordIndex
,
'recordIndex'
);
this
.
setData
({
[
`recordList[
${
recordIndex
}
].active`
]:
!
active
,
[
target
]:
!
active
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
aadc3a8
...
...
@@ -333,9 +333,9 @@ Page({
// return
status
.
code
==
0
?
this
.
navigatorNext
({
id
,
orderId
:
status
.
data
.
orderId
})
id
,
orderId
:
status
.
data
.
orderId
})
:
wx
.
$util
.
showToast
(
status
.
message
||
'报价失败'
)
}
else
{
console
.
log
(
message
)
...
...
@@ -515,7 +515,7 @@ Page({
this
.
getQuotationInfo
()
}
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
totalFee
()
{
let
{
orderInfo
}
=
this
.
data
...
...
@@ -643,7 +643,7 @@ Page({
// console.log(serveName, 'serveName');
ele
.
goods
=
{
...
item
,
goodsId
:
item
.
upgrade
GoodsId
,
goodsId
:
item
.
merchant
GoodsId
,
serveName
,
goodsNameAlias
:
item
.
upgradeGoodsAlias
,
appreciation
:
item
?.
appreciation
,
...
...
@@ -667,7 +667,7 @@ Page({
// 判断有没有勾选商品,有的话调用一下
orderInfo
.
vdQuotationGoodsList
.
length
&&
this
.
totalFee
()
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
// 后面改成全局方法
// 除以100保留两位小数点
...
...
@@ -725,7 +725,7 @@ Page({
navBarHeight
})
},
init
()
{},
init
()
{
},
onRoute
(
options
)
{
console
.
log
(
options
,
'options'
)
// options.id = 258
...
...
@@ -795,35 +795,35 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{},
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{},
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{},
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{},
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{},
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{},
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{}
onShareAppMessage
()
{
}
})
packageEquity/pages/index/index.js
View file @
aadc3a8
...
...
@@ -3,7 +3,7 @@ const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-w
// import api from '~/packageCrowdFunding/api'
import
NP
from
'number-precision'
import
{
getBusinessSchoolScene
}
from
'~/store/index'
import
{
getQuotationStatistics
,
outputValueStatistics
,
quotationPage
,
updateOrderStatus
,
merchantMode
}
from
'../../api'
import
{
getQuotationStatistics
,
outputValueStatistics
,
quotationPage
,
updateOrderStatus
,
merchantMode
,
orderStaffValid
}
from
'../../api'
import
commonApi
from
'~/api/api'
const
app
=
getApp
()
import
carLifeApi
from
'../../carEquityApi'
...
...
@@ -158,6 +158,57 @@ Component({
this
.
getInspectionBadgeCode
()
// 获取驻店员工目标
if
(
isStaff
)
this
.
getStaffTargetTask
()
this
.
checkStaffOrderStatus
()
},
checkStaffOrderStatus
()
{
let
dateStaffPop
=
wx
.
$storage
.
get
(
'dateStaffPop'
)
let
nowDate
=
new
Date
().
format
(
'yyyy-MM-dd'
)
// let num = 0
// 当天已查询过
if
(
dateStaffPop
?.
date
&&
nowDate
==
dateStaffPop
?.
date
)
{
// num = dateStaffPop?.num || 0
// num = num + 1
// num = 1
return
}
let
userInfo
=
wx
.
$util
.
getUserInfo
()
orderStaffValid
({
sceneType
:
userInfo
.
sceneType
})
.
then
(
result
=>
{
console
.
log
(
result
)
if
(
result
.
data
)
{
if
(
wx
.
__HAS_NOREPORT_MODAL
||
wx
.
__HAS_NOTLOGIN_MODAL
)
return
false
wx
.
__HAS_NOREPORT_MODAL
=
true
wx
.
showModal
({
title
:
'开单预警'
,
content
:
'您已超过三天未开单'
,
showCancel
:
false
,
// cancelText: '取消', // '取消
cancelColor
:
'#292D33'
,
confirmText
:
'确定'
,
confirmColor
:
'#347BFF'
,
success
(
res
)
{
// if (res.confirm) {
// wx.$router.go('tabWorkOrder.staffDaily', {
// reportDate: hasNeedReport.date
// })
// }
},
complete
:
()
=>
{
// 这个延迟的目的是为了避免短时间内重复弹出
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
setTimeout
(()
=>
{
wx
.
__HAS_NOREPORT_MODAL
=
false
},
2000
)
}
})
}
wx
.
$storage
.
set
(
'dateStaffPop'
,
{
date
:
new
Date
().
format
(
'yyyy-MM-dd'
)
// num
})
})
.
catch
(
err
=>
{
})
},
getStaffTargetTask
()
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
...
...
@@ -192,7 +243,7 @@ Component({
taskInfo
:
data
[
0
]
})
// 将当前周期的员工目标任务弹窗标记为已弹起
commonApi
.
setTaskDialog
({
id
:
data
[
0
]?.
id
}).
then
(()
=>
{})
commonApi
.
setTaskDialog
({
id
:
data
[
0
]?.
id
}).
then
(()
=>
{
})
}
}
else
{
wx
.
$util
.
showToast
(
message
)
...
...
@@ -208,16 +259,16 @@ Component({
let
{
code
,
message
}
=
res
let
data
=
res
.
data
?
{
...
res
.
data
,
todayTurnover
:
res
.
data
.
todayTurnover
?
((
res
.
data
.
todayTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
0
]
:
'0'
,
todayTurDecimal
:
res
.
data
.
todayTurnover
?
((
res
.
data
.
todayTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
1
]
:
'00'
,
// totalTurnover: res.data.totalTurnover ? (Math.round()(res.data.totalTurnover / 100).toFixed(2) + '').split('.')[0] : '0',
totalTurnover
:
res
.
data
.
totalTurnover
?
Math
.
round
(
res
.
data
.
totalTurnover
/
100
)
:
'0'
,
totalTurDecimal
:
res
.
data
.
totalTurnover
?
((
res
.
data
.
totalTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
1
]
:
'00'
,
monthTurnover
:
res
.
data
.
monthTurnover
?
((
res
.
data
.
monthTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
0
]
:
'0'
// monthTurnover: 12233,
// monthTurDecimal: res.data.monthTurnover ? ((res.data.monthTurnover / 100).toFixed(2) + '').split('.')[1] : '00'
}
...
res
.
data
,
todayTurnover
:
res
.
data
.
todayTurnover
?
((
res
.
data
.
todayTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
0
]
:
'0'
,
todayTurDecimal
:
res
.
data
.
todayTurnover
?
((
res
.
data
.
todayTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
1
]
:
'00'
,
// totalTurnover: res.data.totalTurnover ? (Math.round()(res.data.totalTurnover / 100).toFixed(2) + '').split('.')[0] : '0',
totalTurnover
:
res
.
data
.
totalTurnover
?
Math
.
round
(
res
.
data
.
totalTurnover
/
100
)
:
'0'
,
totalTurDecimal
:
res
.
data
.
totalTurnover
?
((
res
.
data
.
totalTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
1
]
:
'00'
,
monthTurnover
:
res
.
data
.
monthTurnover
?
((
res
.
data
.
monthTurnover
/
100
).
toFixed
(
2
)
+
''
).
split
(
'.'
)[
0
]
:
'0'
// monthTurnover: 12233,
// monthTurDecimal: res.data.monthTurnover ? ((res.data.monthTurnover / 100).toFixed(2) + '').split('.')[1] : '00'
}
:
{}
if
(
code
==
'0'
)
{
this
.
setData
({
...
...
tabIndex/pages/index/index.js
View file @
aadc3a8
...
...
@@ -183,7 +183,7 @@ Page({
merchantRange
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
changePicker
(
e
,
value
)
{
console
.
log
(
e
)
...
...
@@ -386,7 +386,7 @@ Page({
})
}
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
getMerchantCouponList
()
{
...
...
@@ -494,7 +494,7 @@ Page({
})
}
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
getUserStat
(
userInfo
)
{
api
...
...
@@ -507,7 +507,7 @@ Page({
})
}
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
totalListSet
()
{
let
{
userInfo
}
=
this
.
data
...
...
@@ -588,10 +588,9 @@ Page({
// num = 1
return
}
console
.
log
(
api
,
'checkStaffOrderStatus'
)
let
userInfo
=
wx
.
$util
.
getUserInfo
()
api
.
orderStaffValid
({})
.
orderStaffValid
({
sceneType
:
userInfo
.
sceneType
})
.
then
(
result
=>
{
console
.
log
(
result
)
if
(
result
.
data
)
{
...
...
@@ -632,7 +631,7 @@ Page({
// }
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
checkDailyRecport
()
{
let
{
tabIndex
}
=
this
.
data
...
...
@@ -712,7 +711,7 @@ Page({
taskInfo: data[0]
})
// 将当前周期的员工目标任务弹窗标记为已弹起
commonApi.setTaskDialog({ id: data[0]?.id }).then(() => {})
commonApi.setTaskDialog({ id: data[0]?.id }).then(() => {
})
}
} else {
wx.$util.showToast(message)
...
...
@@ -1042,14 +1041,14 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {}
onShareAppMessage: function () {
}
})
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