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 d27ebb11
authored
Mar 27, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第一轮bug修复
1 parent
f03f0b18
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
85 additions
and
60 deletions
app.js
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.js
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
pages/accountItems/accountItems.js
pages/sceneIndex/sceneIndex.js
project.private.config.json
store/index.js
tabDate/pages/detail/detail.js
tabDate/pages/detail/detail.wxml
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
tabWorkOrder/pages/createOrder/createOrder.js
utils/request/request.js
app.js
View file @
d27ebb1
...
@@ -37,32 +37,56 @@ App({
...
@@ -37,32 +37,56 @@ App({
// options.query.scene = 2 //调试用
// options.query.scene = 2 //调试用
// console.log(options, 'options')
// console.log(options, 'options')
// orderCode=2208241419054111&merchantId=44209480&customerName=123&page=createOrder
// orderCode=2208241419054111&merchantId=44209480&customerName=123&page=createOrder
// cons
t mockOptions = {
le
t
mockOptions
=
{
// query:
{
query
:
{
// orderCode:
2208241419054111,
// orderCode:
2208241419054111,
// merchantId:
44209480,
// merchantId:
44209480,
// customerName:'123
',
customerName
:
'%E7%83%82%EC%A7%84%ED%9D%99%E6%B3%A5
'
,
// page:'createOrder
'
page
:
'createArchives
'
//
}
}
//
}
}
//
options = mockOptions
options
=
mockOptions
if
(
options
)
{
if
(
options
)
{
let
query
=
options
.
query
if
(
query
)
{
// 解码
for
(
const
key
in
query
)
{
query
[
key
]
=
decodeURIComponent
(
query
[
key
])
}
options
.
query
=
query
}
// console.log('options', options)
let
res
=
checkScene
(
options
)
let
res
=
checkScene
(
options
)
console
.
log
(
res
,
'res'
);
// console.log(res, 'res')
// 如果需要重新登录
// 如果需要重新登录
res
&&
this
.
login
(
true
)
res
&&
this
.
login
(
true
,
'订单与当前登录园区不一致,请重新登录。'
)
}
}
},
},
login
(
relogin
)
{
login
(
relogin
,
context
)
{
console
.
log
(
relogin
,
'relogin'
)
let
that
=
this
// 清空多账号信息
// 清空多账号信息
if
(
relogin
)
{
if
(
relogin
)
{
this
.
globalData
.
yqdInfo
=
{}
wx
.
showModal
({
this
.
globalData
.
YQorderSetting
=
''
title
:
'温馨提示'
,
content
:
context
||
'登录过期,请重新登录。'
,
showCancel
:
false
,
confirmText
:
'去登录'
,
confirmColor
:
'#3582EE'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
that
.
globalData
.
yqdInfo
=
{}
that
.
globalData
.
YQorderSetting
=
''
util
.
removeStorage
()
util
.
removeStorage
()
wx
.
$relogin
=
relogin
wx
.
$relogin
=
relogin
router
.
reLaunch
(
'pages.wxLogin'
)
}
}
}
})
}
else
{
router
.
reLaunch
(
'pages.wxLogin'
)
router
.
reLaunch
(
'pages.wxLogin'
)
}
},
},
globalData
:
{
globalData
:
{
...
...
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.js
View file @
d27ebb1
...
@@ -116,6 +116,10 @@ Component({
...
@@ -116,6 +116,10 @@ Component({
let
{
data
,
code
,
message
}
=
result
let
{
data
,
code
,
message
}
=
result
if
(
code
)
{
if
(
code
)
{
let
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
.
setData
({
[
'orderInfo.quotedPriceUpdate'
]:
data
.
quotedPriceUpdate
})
this
.
setData
({
this
.
setData
({
insuranceCheck
:
true
,
insuranceCheck
:
true
,
testQuotedPriceUpdate
:
data
.
quotedPriceUpdate
/
100
testQuotedPriceUpdate
:
data
.
quotedPriceUpdate
/
100
...
...
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
View file @
d27ebb1
...
@@ -178,7 +178,7 @@ Page({
...
@@ -178,7 +178,7 @@ Page({
insurance
.
forEach
(
item
=>
{
insurance
.
forEach
(
item
=>
{
delete
orderInfo
[
item
]
delete
orderInfo
[
item
]
})
})
delete
orderInfo
.
quotedPriceUpdate
//
delete orderInfo.quotedPriceUpdate
return
orderInfo
return
orderInfo
},
},
getOwnerInfo
()
{
getOwnerInfo
()
{
...
...
pages/accountItems/accountItems.js
View file @
d27ebb1
...
@@ -167,6 +167,7 @@ Page({
...
@@ -167,6 +167,7 @@ Page({
// console.log(data.loginUserInfoList[0])
// console.log(data.loginUserInfoList[0])
checkYqdSuper
(
app
,
data
.
loginUserInfoList
[
0
])
checkYqdSuper
(
app
,
data
.
loginUserInfoList
[
0
])
const
SCENE
=
wx
.
$SCENE
const
SCENE
=
wx
.
$SCENE
console
.
log
(
SCENE
,
'SCENE'
)
// debugger 兼容扫码优惠券进来和免登录逻辑冲突问题
// debugger 兼容扫码优惠券进来和免登录逻辑冲突问题
if
(
SCENE
&&
SCENE
.
path
!=
'pages/accountItems/accountItems'
)
{
if
(
SCENE
&&
SCENE
.
path
!=
'pages/accountItems/accountItems'
)
{
let
{
let
{
...
@@ -174,17 +175,19 @@ Page({
...
@@ -174,17 +175,19 @@ Page({
query
query
// : { scene }
// : { scene }
}
=
SCENE
}
=
SCENE
console
.
log
(
path
,
'path'
)
let
{
target
,
name
}
=
wx
.
$util
.
getSceneId
(
path
)
let
{
target
,
name
}
=
wx
.
$util
.
getSceneId
(
path
)
// console.log(query)
// console.log(query)
// console.log(target,name);
// console.log(target,name);
wx
.
$router
.
reLaunch
(
`
${
target
}
.
${
name
}
`
,
query
)
wx
.
$router
.
reLaunch
(
`
${
target
}
.
${
name
}
`
,
query
)
wx
.
$SCENE
=
null
wx
.
$SCENE
=
null
}
else
{
}
else
{
// 超管默认开通所有场景
// 超管默认开通所有场景
if
(
isSuper
)
{
if
(
isSuper
)
{
// 0 会员权益/升级 1 精品升级
// 0 会员权益/升级 1 精品升级
let
openSceneArr
=
constantData
.
sceneList
.
map
(
val
=>
{
return
val
?.
sceneType
})
let
openSceneArr
=
constantData
.
sceneList
.
map
(
val
=>
{
return
val
?.
sceneType
})
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
openSceneArr
})
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
openSceneArr
})
wx
.
$router
.
reLaunch
(
'pages.sceneIndex'
)
wx
.
$router
.
reLaunch
(
'pages.sceneIndex'
)
return
return
...
...
pages/sceneIndex/sceneIndex.js
View file @
d27ebb1
...
@@ -36,6 +36,7 @@ Page({
...
@@ -36,6 +36,7 @@ Page({
let
{
sceneList
}
=
this
.
data
let
{
sceneList
}
=
this
.
data
let
userInfo
=
wx
.
$util
.
getUserInfo
()
||
{}
let
userInfo
=
wx
.
$util
.
getUserInfo
()
||
{}
let
openSceneArr
=
userInfo
?.
openSceneArr
||
[]
let
openSceneArr
=
userInfo
?.
openSceneArr
||
[]
this
.
setData
({
this
.
setData
({
timeState
:
wx
.
$util
.
getTimeState
()
timeState
:
wx
.
$util
.
getTimeState
()
})
})
...
@@ -99,7 +100,8 @@ Page({
...
@@ -99,7 +100,8 @@ Page({
onShow
()
{
onShow
()
{
let
{
sceneList
}
=
this
.
data
let
{
sceneList
}
=
this
.
data
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
userInfo
=
wx
.
$util
.
getUserInfo
()
userInfo
?.
openSceneArr
.
includes
(
userInfo
?.
selectedSceneType
)
&&
let
openSceneArr
=
userInfo
?.
openSceneArr
||
[]
openSceneArr
.
includes
(
userInfo
?.
selectedSceneType
)
&&
sceneList
.
map
(
i
=>
{
sceneList
.
map
(
i
=>
{
i
.
actived
=
false
i
.
actived
=
false
if
(
i
.
sceneType
==
userInfo
?.
selectedSceneType
)
{
if
(
i
.
sceneType
==
userInfo
?.
selectedSceneType
)
{
...
...
project.private.config.json
View file @
d27ebb1
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
"scene"
:
null
"scene"
:
null
},
},
{
{
"name"
:
"
工单列表
"
,
"name"
:
"
预约管理
"
,
"pathName"
:
"tabWorkOrder/pages/index/index"
,
"pathName"
:
"tabWorkOrder/pages/index/index"
,
"query"
:
""
,
"query"
:
""
,
"launchMode"
:
"default"
,
"launchMode"
:
"default"
,
...
@@ -165,6 +165,13 @@
...
@@ -165,6 +165,13 @@
"query"
:
""
,
"query"
:
""
,
"launchMode"
:
"default"
,
"launchMode"
:
"default"
,
"scene"
:
null
"scene"
:
null
},
{
"name"
:
"预约管理"
,
"pathName"
:
"tabDate/pages/index/index"
,
"query"
:
""
,
"launchMode"
:
"default"
,
"scene"
:
null
}
}
]
]
}
}
...
...
store/index.js
View file @
d27ebb1
...
@@ -100,8 +100,8 @@ export const getYQorderInfo = () => {
...
@@ -100,8 +100,8 @@ export const getYQorderInfo = () => {
// console.log(data);
// console.log(data);
// debugger
// debugger
console
.
log
(
data
.
yqPhoneConfig
,
'data.yqPhoneConfig'
);
console
.
log
(
data
.
yqPhoneConfig
,
'data.yqPhoneConfig'
)
console
.
log
(
typeof
data
.
yqPhoneConfig
,
'data.yqPhoneConfig'
);
console
.
log
(
typeof
data
.
yqPhoneConfig
,
'data.yqPhoneConfig'
)
// 过滤园区店是否需要屏蔽手机号选项
// 过滤园区店是否需要屏蔽手机号选项
let
filterYqPhoneConfig
=
JSON
.
parse
(
data
.
yqPhoneConfig
)
let
filterYqPhoneConfig
=
JSON
.
parse
(
data
.
yqPhoneConfig
)
// console.log(filterYqPhoneConfig)
// console.log(filterYqPhoneConfig)
...
@@ -165,20 +165,20 @@ export const checkScene = options => {
...
@@ -165,20 +165,20 @@ export const checkScene = options => {
// &&options.patch == 'tabIndex/pages/index/index'
// &&options.patch == 'tabIndex/pages/index/index'
let
userInfo
=
wx
.
$util
.
getStorageSync
(
'dj_boutique_user_info'
)
let
userInfo
=
wx
.
$util
.
getStorageSync
(
'dj_boutique_user_info'
)
// 需要当前门店的 不是就重新登录
// 需要当前门店的 不是就重新登录
//
if (userInfo?.subLoginUser?.merchantId != query.merchantId) {
if
(
userInfo
?.
subLoginUser
?.
merchantId
!=
query
.
merchantId
)
{
//
wx.$SCENE = null
wx
.
$SCENE
=
null
//
// return this.login(true)
// return this.login(true)
//
return true // 重新登录
return
true
// 重新登录
//
}
}
if
(
query
.
page
)
{
if
(
query
.
page
)
{
//订单跟进
//订单跟进
options
.
pat
c
h
=
'tabWorkOrder/pages/createOrder/createOrder'
options
.
path
=
'tabWorkOrder/pages/createOrder/createOrder'
}
else
{
}
else
{
//订单补录
//订单补录
options
.
pat
c
h
=
'pages/index/index'
options
.
path
=
'pages/index/index'
}
}
}
}
// path
// h5跳转小程序 路径处理
// h5跳转小程序 路径处理
if
(
query
.
page
)
{
if
(
query
.
page
)
{
const
pagePath
=
{
const
pagePath
=
{
...
@@ -186,7 +186,7 @@ export const checkScene = options => {
...
@@ -186,7 +186,7 @@ export const checkScene = options => {
createOrder
:
'tabWorkOrder/pages/createOrder/createOrder'
,
createOrder
:
'tabWorkOrder/pages/createOrder/createOrder'
,
followUpOrder
:
'tabDate/pages/detail'
followUpOrder
:
'tabDate/pages/detail'
}
}
options
.
pat
c
h
=
pagePath
[
query
.
page
]
options
.
path
=
pagePath
[
query
.
page
]
}
}
console
.
log
(
options
,
'options'
)
console
.
log
(
options
,
'options'
)
wx
.
$SCENE
=
options
wx
.
$SCENE
=
options
...
...
tabDate/pages/detail/detail.js
View file @
d27ebb1
...
@@ -153,6 +153,10 @@ Page({
...
@@ -153,6 +153,10 @@ Page({
let
updatedDate
=
new
Date
(
e
.
updatedDate
)
let
updatedDate
=
new
Date
(
e
.
updatedDate
)
e
.
year
=
updatedDate
.
format
(
'yyyy-MM-dd'
)
e
.
year
=
updatedDate
.
format
(
'yyyy-MM-dd'
)
e
.
time
=
updatedDate
.
format
(
'hh:mm:ss'
)
e
.
time
=
updatedDate
.
format
(
'hh:mm:ss'
)
// 格式化跟进时间
let
time
=
e
.
inviteDate
e
.
inviteDate
=
time
?
`「
${
new
Date
(
e
.
inviteDate
).
format
(
'MM-dd hh:mm'
)}
」`
:
''
})
})
}
}
if
(
detail
.
carSeriesName
)
detail
.
carType
=
`
${
detail
.
carBrand
}
-
${
detail
.
carChildsBrandName
||
''
}
-
${
detail
.
carSeriesName
}
`
if
(
detail
.
carSeriesName
)
detail
.
carType
=
`
${
detail
.
carBrand
}
-
${
detail
.
carChildsBrandName
||
''
}
-
${
detail
.
carSeriesName
}
`
...
...
tabDate/pages/detail/detail.wxml
View file @
d27ebb1
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
style="color:{{item.color}};"
style="color:{{item.color}};"
catchtap="{{item.callBack}}"
catchtap="{{item.callBack}}"
data-data="{{detail[item.key]}}">
data-data="{{detail[item.key]}}">
<block wx:if="{{items.key=='carName'}}">
<!-- <view>{{item.key}}</view> -->
<block wx:if="{{item.key=='carName'}}">
<block wx:if="{{detail.customer.carSeriesName}}">
<block wx:if="{{detail.customer.carSeriesName}}">
<!-- <view class="between"> -->
<!-- <view class="between"> -->
{{detail.customer.carBrand}}-{{detail.customer.carChildsBrandName}}-{{detail.customer.carSeriesName}}
{{detail.customer.carBrand}}-{{detail.customer.carChildsBrandName}}-{{detail.customer.carSeriesName}}
...
@@ -103,7 +104,9 @@
...
@@ -103,7 +104,9 @@
</block>
</block>
:
:
</view>
</view>
<view class="value">{{i.enum? i.enum[item[i.key]] :item[i.key]||'无'}}</view>
<view class="value">
{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}
</view>
</view>
</view>
</block>
</block>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2}}">
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2}}">
...
...
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
View file @
d27ebb1
...
@@ -320,6 +320,7 @@ Page({
...
@@ -320,6 +320,7 @@ Page({
// console.log(arr[i])
// console.log(arr[i])
delete
orderInfo
[
deleteList
[
i
]]
delete
orderInfo
[
deleteList
[
i
]]
}
}
orderInfo
.
againOrder
=
true
wx
.
$router
.
redirectTo
(
'createOrder'
,
orderInfo
)
wx
.
$router
.
redirectTo
(
'createOrder'
,
orderInfo
)
// merchantDistributionList,expenseCategoryList,profitAllocatinList
// merchantDistributionList,expenseCategoryList,profitAllocatinList
},
},
...
...
tabWorkOrder/pages/createOrder/createOrder.js
View file @
d27ebb1
...
@@ -595,7 +595,7 @@ Page({
...
@@ -595,7 +595,7 @@ Page({
// app .
// app .
getYQorderInfo
()
getYQorderInfo
()
.
then
(
merchantSettingInfo
=>
{
.
then
(
merchantSettingInfo
=>
{
console
.
log
(
merchantSettingInfo
,
'merchantSettingInfo'
)
console
.
log
(
merchantSettingInfo
,
'merchantSettingInfo'
)
let
dictionaryObj
=
{
let
dictionaryObj
=
{
carTypeRequiredFlag
:
'carBrand'
,
carTypeRequiredFlag
:
'carBrand'
,
standNoRequiredFlag
:
'standNo'
,
standNoRequiredFlag
:
'standNo'
,
...
@@ -607,7 +607,7 @@ Page({
...
@@ -607,7 +607,7 @@ Page({
requiredList
.
push
(
dictionaryObj
[
key
])
requiredList
.
push
(
dictionaryObj
[
key
])
}
}
}
}
console
.
log
(
merchantSettingInfo
.
yqPhoneConfig
,
'merchantSettingInfo.yqPhoneConfig'
);
console
.
log
(
merchantSettingInfo
.
yqPhoneConfig
,
'merchantSettingInfo.yqPhoneConfig'
)
// console.log(deepClone(merchantSettingInfo.yqPhoneConfig), 'deepClone(merchantSettingInfo.yqPhoneConfig)')
// console.log(deepClone(merchantSettingInfo.yqPhoneConfig), 'deepClone(merchantSettingInfo.yqPhoneConfig)')
this
.
setData
({
this
.
setData
({
requiredList
:
[...
new
Set
(
requiredList
)],
requiredList
:
[...
new
Set
(
requiredList
)],
...
@@ -663,6 +663,7 @@ Page({
...
@@ -663,6 +663,7 @@ Page({
})
})
console
.
log
(
res
)
console
.
log
(
res
)
let
{
code
,
message
,
data
}
=
result
let
{
code
,
message
,
data
}
=
result
data
.
customer
.
customerName
=
res
.
customerName
code
==
0
&&
(
res
=
data
)
code
==
0
&&
(
res
=
data
)
}
}
...
@@ -671,7 +672,7 @@ Page({
...
@@ -671,7 +672,7 @@ Page({
if
(
res
.
associateOrderCode
)
{
if
(
res
.
associateOrderCode
)
{
tipsProps
.
showTips
=
true
tipsProps
.
showTips
=
true
tipsProps
.
tipsText
=
'原订单录入信息有误,请重新提交正确的订单信息。'
tipsProps
.
tipsText
=
'原订单录入信息有误,请重新提交正确的订单信息。'
}
else
if
(
res
.
orderCode
)
{
}
else
if
(
res
.
orderCode
||
res
.
againOrder
)
{
// 以建档(预约列表)/待跟进工单不可建档
// 以建档(预约列表)/待跟进工单不可建档
isAlreadyExistOrder
=
true
isAlreadyExistOrder
=
true
tipsProps
.
showTips
=
false
tipsProps
.
showTips
=
false
...
...
utils/request/request.js
View file @
d27ebb1
import
{
secretKey
,
domain
,
path
,
sign
}
from
'./http.js'
import
{
secretKey
,
domain
,
path
,
sign
}
from
'./http.js'
console
.
log
(
secretKey
,
'secretKey'
)
//
console.log(secretKey, 'secretKey')
import
util
from
'~/utils/util.js'
import
util
from
'~/utils/util.js'
/**接口 */
/**接口 */
class
Request
{
class
Request
{
...
@@ -35,33 +35,13 @@ class Request {
...
@@ -35,33 +35,13 @@ class Request {
data
data
}
=
response
}
=
response
// // console.log(thisPage, 'thisPage')
// let { route, data: pageData } = thisPage
// if (pageData.shareQuery) {
// wx.$util.setStorageSync('shareQuery', {
// route,
// shareQuery: pageData.shareQuery
// })
// }
if
(
code
==
20
||
code
==
21
)
{
if
(
code
==
20
||
code
==
21
)
{
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
// console.log(thisPage);
// console.log(thisPage);
wx
.
hideLoading
()
wx
.
hideLoading
()
if
(
thisPage
.
route
!=
'pages/wxLogin/wxLogin'
)
{
if
(
thisPage
.
route
!=
'pages/wxLogin/wxLogin'
)
{
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
'登录过期,请重新登录。'
,
showCancel
:
false
,
confirmText
:
'去登录'
,
confirmColor
:
'#3582EE'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
getApp
().
login
(
true
)
getApp
().
login
(
true
)
}
}
}
})
}
}
else
if
(
code
==
-
1
)
{
}
else
if
(
code
==
-
1
)
{
wx
.
showToast
({
wx
.
showToast
({
title
:
message
||
'网络请求失败'
,
title
:
message
||
'网络请求失败'
,
...
@@ -80,10 +60,6 @@ class Request {
...
@@ -80,10 +60,6 @@ class Request {
icon
:
'error'
icon
:
'error'
})
})
reject
(
error
)
reject
(
error
)
// if (fail && typeof fail == 'function') {
// fail(error, reject)
// } else {
// }
},
},
complete
()
{
complete
()
{
wx
.
stopPullDownRefresh
()
wx
.
stopPullDownRefresh
()
...
...
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