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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
43 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 = {
...
@@ -170,5 +170,9 @@ module.exports = {
staffDailyReportMerchantValid
(
data
)
{
staffDailyReportMerchantValid
(
data
)
{
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', 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
)
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({
...
@@ -49,23 +49,24 @@ Component({
observers
:
{
observers
:
{
'orderInfo.mode'
:
function
(
value
)
{
'orderInfo.mode'
:
function
(
value
)
{
// 先注释掉
// 先注释掉
// this.getYqStoreConfig()
// if (n.mode) {
// if (n.mode) {
console
.
log
(
value
,
data
,
data
.
firstObjSimple
,
'mode'
)
//
console.log(value, data, data.firstObjSimple, 'mode')
console
.
log
({
//
console.log({
first
:
value
?
data
.
firstObjSimple
:
data
.
firstObj
//
first: value ? data.firstObjSimple : data.firstObj
},
' first: value ? data.firstObjSimple : data.firstObj,'
);
//
}, ' first: value ? data.firstObjSimple : data.firstObj,');
// first: data.firstObj,
// first: data.firstObj,
// let thisPage =
// let thisPage =
let
thisPage
=
wx
.
$router
.
getPageInstance
()
// let thisPage = wx.$router.getPageInstance()
if
(
thisPage
.
data
.
orderInfo
.
mode
!=
value
)
{
// console.log(thisPage);
this
.
getYqStoreConfig
()
// if (thisPage.data.orderInfo.mode != value) {
this
.
setData
({
this
.
setData
({
first
:
value
?
data
.
firstObjSimple
:
data
.
firstObj
,
first
:
value
?
data
.
firstObjSimple
:
data
.
firstObj
,
formRule
:
value
?
data
.
formRuleSimple
:
data
.
formRule
formRule
:
value
?
data
.
formRuleSimple
:
data
.
formRule
})
})
}
//
}
// }
// }
...
@@ -100,6 +101,7 @@ Component({
...
@@ -100,6 +101,7 @@ Component({
lifetimes
:
{
lifetimes
:
{
attached
()
{
attached
()
{
this
.
getEmployee
()
this
.
getEmployee
()
this
.
getYqStoreConfig
()
}
}
},
},
...
...
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.js
View file @
aadc3a8
...
@@ -78,6 +78,7 @@ Component({
...
@@ -78,6 +78,7 @@ Component({
if
(
s
.
goods
&&
e
.
goods
)
{
if
(
s
.
goods
&&
e
.
goods
)
{
// console.log(e);
// console.log(e);
if
(
s
.
goods
.
goodsId
==
e
.
goods
.
goodsId
)
{
if
(
s
.
goods
.
goodsId
==
e
.
goods
.
goodsId
)
{
console
.
log
(
s
.
goods
.
goodsId
,
e
.
goods
.
goodsId
,
's.goods.goodsId'
);
e
.
active
=
true
e
.
active
=
true
}
}
}
}
...
@@ -158,18 +159,16 @@ Component({
...
@@ -158,18 +159,16 @@ Component({
return
item
return
item
})
})
}
}
// if (x.goods.goodsId == c.goods.goodsId) {
// console.log(x)
// c.goods.price = x.goods.price || 0
// }
})
})
}
else
{
}
// else {
// c.goods.price = c.goods.sellPrice || 0
// c.goods.price = c.goods.sellPrice || 0
c
.
packageGoods
.
goodsList
=
c
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
c
.
packageGoods
.
goodsList
=
c
.
packageGoods
.
goodsList
.
map
(
ele
=>
{
ele
.
price
=
ele
.
sellPrice
||
0
ele
.
price
=
ele
.
price
||
ele
.
sellPrice
||
0
return
ele
return
ele
})
})
}
//
}
c
.
price
=
c
.
packageGoods
.
goodsList
.
reduce
((
total
,
item
)
=>
{
c
.
price
=
c
.
packageGoods
.
goodsList
.
reduce
((
total
,
item
)
=>
{
total
=
total
+
item
.
price
total
=
total
+
item
.
price
return
total
return
total
...
@@ -209,11 +208,11 @@ Component({
...
@@ -209,11 +208,11 @@ Component({
}
}
if
(
item
.
packageGoods
&&
el
.
packageGoods
)
{
if
(
item
.
packageGoods
&&
el
.
packageGoods
)
{
// console.log(el[goodsType], 'el[goodsType]');
// 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
({
this
.
setData
({
[
`recordList[
${
recordIndex
}
].active`
]:
!
active
,
[
`recordList[
${
recordIndex
}
].active`
]:
!
active
,
[
target
]:
!
active
[
target
]:
!
active
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
aadc3a8
...
@@ -515,7 +515,7 @@ Page({
...
@@ -515,7 +515,7 @@ Page({
this
.
getQuotationInfo
()
this
.
getQuotationInfo
()
}
}
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
totalFee
()
{
totalFee
()
{
let
{
orderInfo
}
=
this
.
data
let
{
orderInfo
}
=
this
.
data
...
@@ -643,7 +643,7 @@ Page({
...
@@ -643,7 +643,7 @@ Page({
// console.log(serveName, 'serveName');
// console.log(serveName, 'serveName');
ele
.
goods
=
{
ele
.
goods
=
{
...
item
,
...
item
,
goodsId
:
item
.
upgrade
GoodsId
,
goodsId
:
item
.
merchant
GoodsId
,
serveName
,
serveName
,
goodsNameAlias
:
item
.
upgradeGoodsAlias
,
goodsNameAlias
:
item
.
upgradeGoodsAlias
,
appreciation
:
item
?.
appreciation
,
appreciation
:
item
?.
appreciation
,
...
@@ -667,7 +667,7 @@ Page({
...
@@ -667,7 +667,7 @@ Page({
// 判断有没有勾选商品,有的话调用一下
// 判断有没有勾选商品,有的话调用一下
orderInfo
.
vdQuotationGoodsList
.
length
&&
this
.
totalFee
()
orderInfo
.
vdQuotationGoodsList
.
length
&&
this
.
totalFee
()
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
// 后面改成全局方法
// 后面改成全局方法
// 除以100保留两位小数点
// 除以100保留两位小数点
...
@@ -725,7 +725,7 @@ Page({
...
@@ -725,7 +725,7 @@ Page({
navBarHeight
navBarHeight
})
})
},
},
init
()
{},
init
()
{
},
onRoute
(
options
)
{
onRoute
(
options
)
{
console
.
log
(
options
,
'options'
)
console
.
log
(
options
,
'options'
)
// options.id = 258
// options.id = 258
...
@@ -795,35 +795,35 @@ Page({
...
@@ -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
...
@@ -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 api from '~/packageCrowdFunding/api'
import
NP
from
'number-precision'
import
NP
from
'number-precision'
import
{
getBusinessSchoolScene
}
from
'~/store/index'
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'
import
commonApi
from
'~/api/api'
const
app
=
getApp
()
const
app
=
getApp
()
import
carLifeApi
from
'../../carEquityApi'
import
carLifeApi
from
'../../carEquityApi'
...
@@ -158,6 +158,57 @@ Component({
...
@@ -158,6 +158,57 @@ Component({
this
.
getInspectionBadgeCode
()
this
.
getInspectionBadgeCode
()
// 获取驻店员工目标
// 获取驻店员工目标
if
(
isStaff
)
this
.
getStaffTargetTask
()
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
()
{
getStaffTargetTask
()
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
userInfo
=
wx
.
$util
.
getUserInfo
()
...
@@ -192,7 +243,7 @@ Component({
...
@@ -192,7 +243,7 @@ Component({
taskInfo
:
data
[
0
]
taskInfo
:
data
[
0
]
})
})
// 将当前周期的员工目标任务弹窗标记为已弹起
// 将当前周期的员工目标任务弹窗标记为已弹起
commonApi
.
setTaskDialog
({
id
:
data
[
0
]?.
id
}).
then
(()
=>
{})
commonApi
.
setTaskDialog
({
id
:
data
[
0
]?.
id
}).
then
(()
=>
{
})
}
}
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
...
...
tabIndex/pages/index/index.js
View file @
aadc3a8
...
@@ -183,7 +183,7 @@ Page({
...
@@ -183,7 +183,7 @@ Page({
merchantRange
merchantRange
})
})
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
changePicker
(
e
,
value
)
{
changePicker
(
e
,
value
)
{
console
.
log
(
e
)
console
.
log
(
e
)
...
@@ -386,7 +386,7 @@ Page({
...
@@ -386,7 +386,7 @@ Page({
})
})
}
}
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
getMerchantCouponList
()
{
getMerchantCouponList
()
{
...
@@ -494,7 +494,7 @@ Page({
...
@@ -494,7 +494,7 @@ Page({
})
})
}
}
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
getUserStat
(
userInfo
)
{
getUserStat
(
userInfo
)
{
api
api
...
@@ -507,7 +507,7 @@ Page({
...
@@ -507,7 +507,7 @@ Page({
})
})
}
}
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
totalListSet
()
{
totalListSet
()
{
let
{
userInfo
}
=
this
.
data
let
{
userInfo
}
=
this
.
data
...
@@ -588,10 +588,9 @@ Page({
...
@@ -588,10 +588,9 @@ Page({
// num = 1
// num = 1
return
return
}
}
console
.
log
(
api
,
'checkStaffOrderStatus'
)
let
userInfo
=
wx
.
$util
.
getUserInfo
()
api
api
.
orderStaffValid
({})
.
orderStaffValid
({
sceneType
:
userInfo
.
sceneType
})
.
then
(
result
=>
{
.
then
(
result
=>
{
console
.
log
(
result
)
console
.
log
(
result
)
if
(
result
.
data
)
{
if
(
result
.
data
)
{
...
@@ -632,7 +631,7 @@ Page({
...
@@ -632,7 +631,7 @@ Page({
// }
// }
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
checkDailyRecport
()
{
checkDailyRecport
()
{
let
{
tabIndex
}
=
this
.
data
let
{
tabIndex
}
=
this
.
data
...
@@ -712,7 +711,7 @@ Page({
...
@@ -712,7 +711,7 @@ Page({
taskInfo: data[0]
taskInfo: data[0]
})
})
// 将当前周期的员工目标任务弹窗标记为已弹起
// 将当前周期的员工目标任务弹窗标记为已弹起
commonApi.setTaskDialog({ id: data[0]?.id }).then(() => {})
commonApi.setTaskDialog({ id: data[0]?.id }).then(() => {
})
}
}
} else {
} else {
wx.$util.showToast(message)
wx.$util.showToast(message)
...
@@ -1042,14 +1041,14 @@ Page({
...
@@ -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