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 48e771a2
authored
Apr 10, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.37.3-0409' into 'develop'
上线合并 See merge request
!259
2 parents
7817123f
a69506eb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
198 additions
and
165 deletions
packageEquity/pages/TabBar/equityPage.js
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.js
packageEquity/pages/carQuotation/components/constant/stepData.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
pages/accountItems/accountItems.js
pages/wxLogin/wxLogin.js
tabIndex/pages/index/index.js
tabWorkOrder/pages/staffDaily/staffDaily.wxml
packageEquity/pages/TabBar/equityPage.js
View file @
48e771a
// pages/equity/index.js
import
{
get4SStoreList
}
from
'~/store/index'
import
api
from
'~/api/api.js'
import
{
merchantMode
,
waitinputorder
,
staffDailyReportDetailWeeklyList
,
staffDailyReportMerchantValid
,
quotationRecording
,
isBusinessSchoolEnableCurrentUser
}
from
'../../api'
import
{
getBusinessSchoolScene
}
from
'~/store/index'
const
app
=
getApp
()
...
...
@@ -141,98 +142,56 @@ Page({
}
})
}
// // 获取当前日期
// const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = userInfo
// let timeBean = util.getWeekDayList(0)
// let params = {
// yqMerchantId: merchantId,
// yqMerchantName: merchantName,
// staffName: name,
// staffUuid: uuid,
// merchantId: shopMerchantId,
// merchantName: shopMerchantName,
// ...timeBean
// }
// console.log(params, 'params')
// staffDailyReportDetailWeeklyList(params).then(res => {
// let { code, data, message } = res
// if (code == 0) {
// console.log(data, 'data')
// // timeBean.weekDayList = timeBean.weekDayList.map((item, index) => {
// // // item.weeklyList = data[index]
// // item.hasDailyValue = data.includes(item.date)
// // return item
// // })
// // timeBean
// let dateStaffPop = wx.$storage.get('dateStaffPop')
// // 判断 有没有填写日报
// let hasNeedReport = timeBean.weekDayList.find((item, index) => {
// // item.hasDailyValue =
// return !data.includes(item.date) && !item.disabled
// })
// console.log(hasNeedReport, 'hasNeedReport')
// let nowDate = new Date().format('yyyy-MM-dd')
// let num = 0
// if (dateStaffPop?.date && nowDate == dateStaffPop?.date) {
// num = dateStaffPop?.num || 0
// num = num + 1
// } else {
// num = num + 1
// }
// // num <= 2
// if (hasNeedReport) {
// // if (num <= 2) {
// // wx.$util.showToast('驻店日报未填写,请及时填写')
// 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)
// }
// })
// }
// let num = hasNeedReport ? dateStaffPop?.num + 1 : dateStaffPop?.num
// console.log(num)
// wx.$storage.set('dateStaffPop', {
// date: new Date().format('yyyy-MM-dd'),
// num
// })
// console.log(hasNeedReport, 'hasNeedReport')
// this.setData({
// weeklyList: data,
// timeBean
// })
// } else {
// wx.$util.showToast(message)
// }
// })
},
checkDailyRecport
()
{
// 检测一下是否能微信端小程序登录
checkAgreeClient
(
loginUserObj
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
sysInfo
=
wx
.
getSystemInfoSync
()
// let { environment } = sysInfo
// 1企业微信 0微信
let
envName
=
sysInfo
.
environment
?
1
:
0
let
{
merchantId
:
yqMerchantId
}
=
loginUserObj
api
.
getYqStoreConfig
({
yqMerchantId
}).
then
(
res
=>
{
let
{
code
,
data
:
{
loginControlList
=
[]
}
}
=
res
if
(
code
==
'0'
)
{
// const loginControlList = []
// const loginControlList = [0, 1]
if
(
loginControlList
.
includes
(
envName
))
{
resolve
(
true
)
}
else
{
wx
.
hideLoading
()
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
`请在
${
envName
==
0
?
'企业微信'
:
'微信'
}
中打开`
,
showCancel
:
false
,
confirmText
:
'知道了'
,
confirmColor
:
'#347BFF'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
$router
.
go
(
'pages.accountItems'
)
}
}
})
resolve
(
false
)
}
}
})
})
},
async
checkDailyRecport
()
{
let
{
tabIndex
}
=
this
.
data
const
isStaff
=
app
.
globalData
.
isStaff
// 如果是员工 判读是否要填写日报
isStaff
&&
tabIndex
==
0
&&
this
.
staffDailyReport
(
wx
.
$util
.
getUserInfo
())
if
(
tabIndex
==
0
)
{
// let checkAgreeClient = await
this
.
checkAgreeClient
(
wx
.
$util
.
getUserInfo
())
// if (!checkAgreeClient) return
}
},
getMerchant4SMode
()
{
let
storeInfo
=
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
||
{}
...
...
@@ -425,7 +384,7 @@ Page({
.
catch
(
err
=>
{
})
}
},
onRoute
(
options
)
{
console
.
log
(
options
,
'options'
)
if
(
options
&&
options
.
tabIndex
)
{
...
...
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.js
View file @
48e771a
...
...
@@ -11,7 +11,7 @@ Component({
if
(
n
)
{
// this.getOrderBaseGoodsList(n)
let
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
.
getQuotationInfo
()
thisPage
.
getQuotationInfo
(
true
)
}
}
},
...
...
packageEquity/pages/carQuotation/components/constant/stepData.js
View file @
48e771a
...
...
@@ -152,7 +152,7 @@ const firstObj = {
name
:
'city'
,
labelName
:
'city'
,
type
:
'region'
,
columnsNum
:
'2'
,
columnsNum
:
'2'
,
placeholder
:
'点击选择(非必填)'
,
configItem
:
true
},
...
...
@@ -170,7 +170,7 @@ const firstObj = {
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
,
noCellHeight
:
tru
e
,
// noCellHeight: fals
e,
},
{
label
:
'陪伴人员'
,
...
...
@@ -179,7 +179,7 @@ const firstObj = {
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
,
noCellHeight
:
tru
e
,
// noCellHeight: fals
e,
},
],
carFormList
:
[
...
...
@@ -197,35 +197,35 @@ const firstObj = {
configItem
:
true
},
{
label
:
'车架号'
,
name
:
'carVin'
,
type
:
'input'
,
maxlength
:
'17'
,
required
:
true
,
requiredAfter
:
true
},
{
label
:
'座位数'
,
name
:
'seat'
,
labelName
:
'seat'
,
type
:
'select'
,
optionList
:
constantList
.
seatesList
,
optionId
:
'optionId'
,
optionLabel
:
'optionLabel'
},
{
label
:
'车辆发票价'
,
name
:
'price'
,
type
:
'input'
,
fieldType
:
'digit'
,
maxlength
:
'8'
,
required
:
true
,
requiredAfter
:
true
,
labelWidth
:
80
,
inputLimit
:
{
maxVal
:
2000000
label
:
'车架号'
,
name
:
'carVin'
,
type
:
'input'
,
maxlength
:
'17'
,
required
:
true
,
requiredAfter
:
true
},
{
label
:
'座位数'
,
name
:
'seat'
,
labelName
:
'seat'
,
type
:
'select'
,
optionList
:
constantList
.
seatesList
,
optionId
:
'optionId'
,
optionLabel
:
'optionLabel'
},
{
label
:
'车辆发票价'
,
name
:
'price'
,
type
:
'input'
,
fieldType
:
'digit'
,
maxlength
:
'8'
,
required
:
true
,
requiredAfter
:
true
,
labelWidth
:
80
,
inputLimit
:
{
maxVal
:
2000000
}
}
}
]
}
const
firstObjSimple
=
{
...
...
@@ -270,7 +270,7 @@ const firstObjSimple = {
name
:
'city'
,
labelName
:
'city'
,
type
:
'region'
,
columnsNum
:
'2'
,
columnsNum
:
'2'
,
placeholder
:
'点击选择(非必填)'
,
configItem
:
true
},
...
...
@@ -288,7 +288,7 @@ const firstObjSimple = {
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
,
noCellHeight
:
true
,
//
noCellHeight: true,
},
{
label
:
'陪伴人员'
,
...
...
@@ -297,7 +297,7 @@ const firstObjSimple = {
maxlength
:
'200'
,
fieldType
:
'textarea'
,
configItem
:
true
,
noCellHeight
:
true
,
//
noCellHeight: true,
},
],
carFormList
:
[
...
...
@@ -315,36 +315,36 @@ const firstObjSimple = {
configItem
:
true
},
{
label
:
'车架号'
,
name
:
'carVin'
,
type
:
'input'
,
maxlength
:
'17'
,
// required:true,
// requiredAfter:true
},
{
label
:
'座位数'
,
name
:
'seat'
,
labelName
:
'seat'
,
type
:
'select'
,
optionList
:
constantList
.
seatesList
,
optionId
:
'optionId'
,
optionLabel
:
'optionLabel'
},
{
label
:
'车辆发票价'
,
name
:
'price'
,
type
:
'input'
,
fieldType
:
'digit'
,
maxlength
:
'8'
,
required
:
true
,
requiredAfter
:
true
,
labelWidth
:
80
,
inputLimit
:
{
maxVal
:
2000000
label
:
'车架号'
,
name
:
'carVin'
,
type
:
'input'
,
maxlength
:
'17'
,
// required:true,
// requiredAfter:true
},
{
label
:
'座位数'
,
name
:
'seat'
,
labelName
:
'seat'
,
type
:
'select'
,
optionList
:
constantList
.
seatesList
,
optionId
:
'optionId'
,
optionLabel
:
'optionLabel'
},
{
label
:
'车辆发票价'
,
name
:
'price'
,
type
:
'input'
,
fieldType
:
'digit'
,
maxlength
:
'8'
,
required
:
true
,
requiredAfter
:
true
,
labelWidth
:
80
,
inputLimit
:
{
maxVal
:
2000000
}
// fieldType: 'digit'
}
// fieldType: 'digit'
}
]
}
const
optionsSelect
=
{
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
48e771a
...
...
@@ -8,7 +8,8 @@ import {
quotationGoodsList
,
quotationRecording
,
errorOrderById
,
staffDailyReportMerchantValid
staffDailyReportMerchantValid
,
updateOrderStatus
}
from
'../../../api'
import
{
quotedImgUrl
}
from
'~/config'
import
NP
from
'number-precision'
...
...
@@ -521,6 +522,8 @@ Page({
// ...insuranceTypeObj
})
// this.getQuotationInfo()
// 判断有没有勾选商品,有的话调用一下
orderInfo
.
vdQuotationGoodsList
.
length
&&
this
.
totalFee
()
}
})
.
catch
(
err
=>
{
})
...
...
@@ -570,6 +573,29 @@ Page({
}
return
obj
},
updateOrderStatus
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
{
orderInfo
}
=
this
.
data
updateOrderStatus
({
id
:
orderInfo
.
id
,
orderStatus
:
0
,
}).
then
(
res
=>
{
let
{
code
,
message
}
=
res
if
(
code
==
0
)
{
resolve
(
true
)
// wx.$util.showToast('提交成功')
// this.onLoad()
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
})
},
// 不需要检验 存草稿
async
handleEditSave
()
{
let
{
owner
,
orderInfo
,
saveStatus
}
=
this
.
data
...
...
@@ -589,6 +615,11 @@ Page({
this
.
setData
({
orderInfo
})
// if (orderInfo.orderStatus == -1) {
// await this.updateOrderStatus()
// }
let
res
=
await
this
.
handleSecondConfirmCheck
(
false
)
this
.
setData
({
saveStatus
:
false
...
...
@@ -605,11 +636,12 @@ Page({
},
resetGoods
()
{
this
.
setData
({
[
'orderInfo.vdQuotationGoodsList'
]:
[]
[
'orderInfo.vdQuotationGoodsList'
]:
[],
[
'orderInfo.quotationGoodsInfoList'
]:
[]
})
this
.
getQuotationInfo
(
)
this
.
getQuotationInfo
(
true
)
// 不重新调用详情接口 避免修改车辆价格导致重新获取详情 把数据重置了
},
getQuotationInfo
()
{
getQuotationInfo
(
getOrderInfo
)
{
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
()
// console.log(default4SStoreInfo, 'default4SStoreInfo')
// debugger
...
...
@@ -679,13 +711,13 @@ Page({
// 判断有没有勾选商品,有的话调用一下
orderInfo
.
vdQuotationGoodsList
.
length
&&
this
.
totalFee
()
// 获取订单详情
if
(
id
)
{
if
(
id
&&
!
getOrderInfo
)
{
this
.
getOrderInfo
()
}
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
// 获取订单详情
if
(
id
)
{
if
(
id
&&
!
getOrderInfo
)
{
this
.
getOrderInfo
()
}
})
...
...
pages/accountItems/accountItems.js
View file @
48e771a
...
...
@@ -33,8 +33,8 @@ Page({
id
?
this
.
qrCodeScene
(
id
)
:
this
.
getListSelectAccount
()
},
async
getSceneArr
(
yqMerchantId
,
loginUserObj
)
{
//
let checkAgree = await this.checkAgree()
//
if (!checkAgree) return false
let
checkAgree
=
await
this
.
checkAgree
()
if
(
!
checkAgree
)
return
false
// 超管开通全部场景
if
(
loginUserObj
?.
isSuper
)
return
// 获取4s店关联场景数据
...
...
pages/wxLogin/wxLogin.js
View file @
48e771a
...
...
@@ -417,8 +417,8 @@ Page({
})
},
async
getYqMerchantSceneConfig
(
loginUserObj
,
num
)
{
//
let checkAgreeClient = await this.checkAgreeClient(loginUserObj)
//
if (!checkAgreeClient) return wx.$router.go('pages.accountItems')
let
checkAgreeClient
=
await
this
.
checkAgreeClient
(
loginUserObj
)
if
(
!
checkAgreeClient
)
return
wx
.
$router
.
go
(
'pages.accountItems'
)
// num 0已选园区店、4s店和场景 1已选园区店、4s店 2仅选择园区店
let
pageUrl
=
[
'pages.loading'
,
'pages.sceneIndex'
,
'pages.merchantList'
]
let
{
shopMerchantId
,
shopMerchantName
}
=
loginUserObj
...
...
tabIndex/pages/index/index.js
View file @
48e771a
// tabIndex/pages/index/index.js
import
mixins
from
'./index_mixins'
import
api
from
'../../api.js'
import
apiCom
from
'~/api/api.js'
import
NP
from
'number-precision'
import
{
getYQInfo
,
get4SStoreList
,
getBusinessSchoolScene
}
from
'~/store/index'
import
{
env
}
from
'~/config'
...
...
@@ -676,11 +677,52 @@ Page({
})
}
},
checkDailyRecport
()
{
// 检测一下是否能微信端小程序登录
checkAgreeClient
(
loginUserObj
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
sysInfo
=
wx
.
getSystemInfoSync
()
// let { environment } = sysInfo
// 1企业微信 0微信
let
envName
=
sysInfo
.
environment
?
1
:
0
let
{
merchantId
:
yqMerchantId
}
=
loginUserObj
apiCom
.
getYqStoreConfig
({
yqMerchantId
}).
then
(
res
=>
{
let
{
code
,
data
:
{
loginControlList
=
[]
}
}
=
res
if
(
code
==
'0'
)
{
// const loginControlList = []
// const loginControlList = [0, 1]
if
(
loginControlList
.
includes
(
envName
))
{
resolve
(
true
)
}
else
{
wx
.
hideLoading
()
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
`请在
${
envName
==
0
?
'企业微信'
:
'微信'
}
中打开`
,
showCancel
:
false
,
confirmText
:
'知道了'
,
confirmColor
:
'#347BFF'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
$router
.
go
(
'pages.accountItems'
)
}
}
})
resolve
(
false
)
}
}
})
})
},
async
checkDailyRecport
()
{
// let { tabIndex } = this.data
const
isStaff
=
app
.
globalData
.
isStaff
// 如果是员工 判读是否要填写日报
isStaff
&&
this
.
staffDailyReport
(
wx
.
$util
.
getUserInfo
())
// let checkAgreeClient = await
this
.
checkAgreeClient
(
wx
.
$util
.
getUserInfo
())
// if (!checkAgreeClient) return wx.$router.go('pages.accountItems')
},
onRoute
(
options
)
{
options
&&
this
.
checkShowOrderPop
(
options
)
...
...
tabWorkOrder/pages/staffDaily/staffDaily.wxml
View file @
48e771a
...
...
@@ -9,7 +9,7 @@
</view>
</view>
</navigation-bar>
<view style="margin-top:{{ statusBarHeight }}px">
<view style="margin-top:{{ statusBarHeight
}}px">
<weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar>
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
...
...
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