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 618069b1
authored
Dec 01, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 功能开发
1 parent
133d1e18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
786 additions
and
201 deletions
api/api.js
components/navigationBar/navigationBar.js
config.js
packageEquity/pages/carQuotation/components/OrderScreen/OrderScreen.wxml
pages/accountItems/accountItems.js
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.js
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.json
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.wxml
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.wxss
pages/tabMine/components/switchPopup/switchPopup.js
pages/tabMine/components/switchPopup/switchPopup.json
pages/tabMine/components/switchPopup/switchPopup.wxml
pages/tabMine/components/switchPopup/switchPopup.wxss
pages/tabMine/pages/index/index.js
router/router.js
store/index.js
tabWorkOrder/api.js
tabWorkOrder/pages/createOrder/createOrder.js
utils/request/environment.js
api/api.js
View file @
618069b
...
...
@@ -158,7 +158,9 @@ module.exports = {
/** 获取商户订单设置 */
getMerchantRecordingSettings
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings'
,
// 'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings',
'dj.api.smartcarlife.order.field.lightChange.setting.list'
,
// 查询门店轻改录单设置
data
)
},
...
...
@@ -166,7 +168,8 @@ module.exports = {
/** 设置商户订单设置 */
setMerchantRecordingSettings
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.recordingSettings.insertOrUpdateSettings'
,
// 'dj.api.smartcarlife.recordingSettings.insertOrUpdateSettings',
'dj.api.smartcarlife.order.field.setting.update'
,
data
)
},
...
...
@@ -399,15 +402,15 @@ module.exports = {
data
)
},
/** 待处理招聘统计 */
waitstaffstateAPI
(
data
)
{
return
api
.
post
(
'dj.api.staff.miniprogram.recruitment.demand.stat'
,
data
,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 待处理招聘统计 */
waitstaffstateAPI
(
data
)
{
return
api
.
post
(
'dj.api.staff.miniprogram.recruitment.demand.stat'
,
data
,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 获取园区店配置技师数据 */
getQYTechnicianList
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.roleTechnician.list'
,
data
)
...
...
@@ -422,11 +425,6 @@ module.exports = {
},
// 车架号校验
checkVinValidate
(
data
)
{
return
api
.
post
(
'dj.pad.api.vin.validate'
,
data
,
[],
'/rop-dj-pad/router'
)
return
api
.
post
(
'dj.pad.api.vin.validate'
,
data
,
[],
'/rop-dj-pad/router'
)
}
}
components/navigationBar/navigationBar.js
View file @
618069b
...
...
@@ -59,7 +59,7 @@ Component({
safeArea
,
platform
}
=
res
console
.
log
(
safeArea
,
'safeArea'
)
//
console.log(safeArea, 'safeArea')
const
{
height
,
right
,
width
,
top
}
=
wx
.
getMenuButtonBoundingClientRect
()
// 判断是否是华为平板设备
...
...
@@ -69,18 +69,16 @@ Component({
if
(
isLandscape
)
statusBarHeight
=
0
// console.log(isPad, screenWidth, 'screenWidth');
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
let
navigationBarHeight
=
`var(--fontSize
${
(
height
+
(
top
-
statusBarHeight
)
*
2
)
*
(
isPad
?
1
:
2
)
})
`
let
navigationBarHeight
=
`var(--fontSize
${(
height
+
(
top
-
statusBarHeight
)
*
2
)
*
(
isPad
?
1
:
2
)
})
`
let navigationBarPadding = screenWidth - right
let navigationBarWidth =
screenWidth - (navigationBarPadding * 2 + width) - width
// if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({
statusBarHeight: `
var
(
--
fontSize$
{
statusBarHeight
*
(
isPad
?
1
:
2
)
})
`,
statusBarHeight: `
var
(
--
fontSize$
{
statusBarHeight
*
(
isPad
?
1
:
2
)
})
`,
navigationBarHeight,
// navigationBarStyle: `
font
-
size
:
$
{
fontSizeSetting
}
px;`
,
navigationBarStyle
:
'font-size: var(--fontSize34)'
,
...
...
config.js
View file @
618069b
...
...
@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let
index
=
2
let
index
=
1
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
const
envName
=
accountInfo
.
miniProgram
.
envVersion
...
...
packageEquity/pages/carQuotation/components/OrderScreen/OrderScreen.wxml
View file @
618069b
This diff is collapsed.
Click to expand it.
pages/accountItems/accountItems.js
View file @
618069b
...
...
@@ -30,9 +30,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
options
,
'options'
)
;
console
.
log
(
options
,
'options'
)
let
id
=
decodeURIComponent
(
options
.
scene
).
split
(
'='
)[
1
]
console
.
log
(
id
,
'id'
)
;
console
.
log
(
id
,
'id'
)
id
?
this
.
qrCodeScene
(
id
)
:
this
.
getListSelectAccount
()
},
async
getSceneArr
(
yqMerchantId
,
loginUserObj
)
{
...
...
@@ -44,10 +44,17 @@ Page({
// let checkAgree = await this.checkAgree()
// if (!checkAgree) return false
// 超管开通全部场景
if
(
loginUserObj
?.
isSuper
||
loginUserObj
?.
loginRole
==
3
||
loginUserObj
.
loginRole
==
5
||
loginUserObj
?.
loginRole
==
6
)
return
if
(
loginUserObj
?.
isSuper
||
loginUserObj
?.
loginRole
==
3
||
loginUserObj
.
loginRole
==
5
||
loginUserObj
?.
loginRole
==
6
)
return
// 获取4s店关联场景数据
getShopSceneConfig
({
yqMerchantId
}).
then
(
result
=>
{
if
(
!
result
?.
length
)
return
wx
.
$util
.
showToast
(
'暂无开通业务,请联系总部管理员'
)
if
(
!
result
?.
length
)
return
wx
.
$util
.
showToast
(
'暂无开通业务,请联系总部管理员'
)
this
.
get4SStoreList
(
loginUserObj
)
})
},
...
...
@@ -66,9 +73,7 @@ Page({
})
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
let
{
value
}
=
e
.
detail
this
.
setValue
(
value
)
},
inputBlur
(
e
)
{
...
...
@@ -79,9 +84,7 @@ Page({
},
emit
(
e
)
{
let
{
detail
:
{
value
}
detail
:
{
value
}
}
=
e
this
.
setData
({
edit
:
false
,
...
...
@@ -98,7 +101,12 @@ Page({
if
(
val
.
uuid
==
selectedUuid
)
val
.
active
=
true
return
val
})
let
filterArr
=
copyLoginUserInfoList
.
filter
(
val
=>
val
.
merchantName
.
includes
(
searchValue
)
||
val
.
merchantId
==
searchValue
)
||
[]
let
filterArr
=
copyLoginUserInfoList
.
filter
(
val
=>
val
.
merchantName
.
includes
(
searchValue
)
||
val
.
merchantId
==
searchValue
)
||
[]
this
.
setData
({
loginUserInfoList
:
filterArr
})
...
...
@@ -143,7 +151,7 @@ Page({
}
// }
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{})
},
noLoginFn
()
{
let
that
=
this
...
...
@@ -249,15 +257,16 @@ Page({
let
envName
=
sysInfo
.
environment
?
1
:
0
let
{
merchantId
:
yqMerchantId
}
=
wx
.
$util
.
getUserInfo
()
api
.
getYqStoreConfig
({
yqMerchantId
}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
let
loginControlList
=
data
?.
loginControlList
||
[]
if
(
code
==
'0'
)
{
// const loginControlList = []
// const loginControlList = [0, 1]
if
(
loginControlList
==
null
||
loginControlList
.
includes
(
envName
)
||
loginControlList
.
length
==
0
)
{
if
(
loginControlList
==
null
||
loginControlList
.
includes
(
envName
)
||
loginControlList
.
length
==
0
)
{
resolve
(
true
)
}
else
{
wx
.
hideLoading
()
...
...
@@ -283,14 +292,26 @@ Page({
wx
.
$router
.
go
(
'pages.sceneIndex'
)
return
}
get4SStoreList
({
merchantId
:
isSuper
||
loginRole
==
3
||
loginRole
==
5
||
loginRole
==
6
?
undefined
:
merchantId
,
staffUUID
:
uuid
},
isSuper
||
loginRole
==
3
||
loginRole
==
5
||
loginRole
==
6
,
true
).
then
(
result
=>
{
get4SStoreList
(
{
merchantId
:
isSuper
||
loginRole
==
3
||
loginRole
==
5
||
loginRole
==
6
?
undefined
:
merchantId
,
staffUUID
:
uuid
},
isSuper
||
loginRole
==
3
||
loginRole
==
5
||
loginRole
==
6
,
true
).
then
(
result
=>
{
let
obj
=
(
result
&&
result
[
0
])
||
{}
// 仅一家4s店
if
(
result
?.
length
==
1
)
{
this
.
setShopMerchantObj
(
obj
)
wx
.
$router
.
go
(
'pages.sceneIndex'
)
}
else
if
(
!
result
?.
length
)
{
return
wx
.
$util
.
showToast
(
'园区店关联的4s店商户账号无效,请联系总部管理员'
)
return
wx
.
$util
.
showToast
(
'园区店关联的4s店商户账号无效,请联系总部管理员'
)
}
else
{
wx
.
$router
.
go
(
'pages.merchantList'
)
}
...
...
@@ -327,7 +348,8 @@ Page({
if
(
e
.
active
)
{
yqMerchantId
=
e
.
merchantId
id
=
e
.
uuid
isSuper
=
e
.
isSuper
||
e
.
loginRole
==
3
||
e
.
loginRole
==
5
||
e
.
loginRole
==
6
isSuper
=
e
.
isSuper
||
e
.
loginRole
==
3
||
e
.
loginRole
==
5
||
e
.
loginRole
==
6
}
})
...
...
@@ -362,50 +384,65 @@ Page({
wx
.
$util
.
hideLoading
()
wx
.
$util
.
setUserInfo
(
data
.
loginUserInfoList
[
0
])
app
.
gobalCheckYqdSuper
(
data
.
loginUserInfoList
[
0
])
console
.
log
(
data
.
loginUserInfoList
,
'loginUserInfoList'
)
;
// 获取园区店下单字段配置信息
getYQorderInfo
()
console
.
log
(
data
.
loginUserInfoList
,
'loginUserInfoList'
)
//
//
获取园区店下单字段配置信息
//
getYQorderInfo()
// 超管跳过选择4s店
// console.log(wx.$SCENE != 'tabWorkOrder/staffDaily');
if
(
data
.
loginUserInfoList
[
0
]
&&
data
.
loginUserInfoList
[
0
].
isSuper
&&
(
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/staffDaily'
||
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/upgradeStaffDaily'
))
{
if
(
data
.
loginUserInfoList
[
0
]
&&
data
.
loginUserInfoList
[
0
].
isSuper
&&
(
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/staffDaily'
||
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/upgradeStaffDaily'
)
)
{
this
.
get4SStoreList
(
data
.
loginUserInfoList
[
0
])
return
}
if
(
data
.
loginUserInfoList
[
0
]
&&
(
data
.
loginUserInfoList
[
0
]?.
loginRole
==
3
||
data
.
loginUserInfoList
[
0
]?.
loginRole
==
5
||
data
.
loginUserInfoList
[
0
]?.
loginRole
==
6
)
&&
(
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/staffDaily'
||
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/upgradeStaffDaily'
))
{
if
(
data
.
loginUserInfoList
[
0
]
&&
(
data
.
loginUserInfoList
[
0
]?.
loginRole
==
3
||
data
.
loginUserInfoList
[
0
]?.
loginRole
==
5
||
data
.
loginUserInfoList
[
0
]?.
loginRole
==
6
)
&&
(
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/staffDaily'
||
wx
.
$SCENE
?.
path
!=
'tabWorkOrder/upgradeStaffDaily'
)
)
{
this
.
get4SStoreList
(
data
.
loginUserInfoList
[
0
])
return
}
const
SCENE
=
wx
.
$SCENE
console
.
log
(
wx
.
$SCENE
,
' wx.$SCENE'
)
;
console
.
log
(
wx
.
$SCENE
,
' wx.$SCENE'
)
// 展会用逻辑
if
(
SCENE
&&
SCENE
.
path
==
'packageEquity/clueList'
)
{
// query
wx
.
$SCENE
.
query
=
{
activeIndex
:
1
}
api
.
selectAccountLogin
({
id
:
'd45b7f0a3ed94ca6a16340937ccc1c1d'
}).
then
((
result
)
=>
{
// setUserInfo
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
sceneType
:
1
,
shopMerchantName
:
'杰西集团的门店'
,
shopMerchantId
:
44205761
,
api
.
selectAccountLogin
({
id
:
'd45b7f0a3ed94ca6a16340937ccc1c1d'
})
.
then
(
result
=>
{
// setUserInfo
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
sceneType
:
1
,
shopMerchantName
:
'杰西集团的门店'
,
shopMerchantId
:
44205761
})
api
.
selectMerchantScene
({
sceneType
:
1
,
shopMerchantName
:
'杰西集团的门店'
,
shopMerchantId
:
44205761
})
.
then
(
result
=>
{
this
.
sceneHandle
()
})
})
api
.
selectMerchantScene
({
sceneType
:
1
,
shopMerchantName
:
'杰西集团的门店'
,
shopMerchantId
:
44205761
,
}).
then
((
result
)
=>
{
this
.
sceneHandle
()
})
}).
catch
((
err
)
=>
{
});
.
catch
(
err
=>
{})
}
else
{
// 有场景信息就跳转对应页面 没有就登录场景
SCENE
&&
SCENE
.
path
!=
'pages/accountItems/accountItems'
?
this
.
sceneHandle
()
:
this
.
getSceneArr
(
yqMerchantId
,
data
.
loginUserInfoList
[
0
])
SCENE
&&
SCENE
.
path
!=
'pages/accountItems/accountItems'
?
this
.
sceneHandle
()
:
this
.
getSceneArr
(
yqMerchantId
,
data
.
loginUserInfoList
[
0
])
}
// debugger
...
...
@@ -418,7 +455,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
onReady
:
function
()
{},
/**
* 生命周期函数--监听页面显示
...
...
@@ -433,25 +470,25 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
onHide
:
function
()
{},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
onUnload
:
function
()
{},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
onPullDownRefresh
:
function
()
{},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
onReachBottom
:
function
()
{},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
onShareAppMessage
:
function
()
{}
})
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.js
0 → 100644
View file @
618069b
// components/StoreSelectPopup/StoreSelectPopup.js
import
api
from
'~/api/api'
import
{
get4SStoreList
}
from
'~/store/index'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
if
(
n
)
{
this
.
setData
({
scrollTop
:
0
,
pageNum
:
1
,
nothing
:
false
,
searchValue
:
''
})
this
.
getList
(
true
)
}
}
},
type
:
Number
,
selectedData
:
Array
},
/**
* 组件的初始数据
*/
data
:
{
pageNum
:
1
,
scrollTop
:
0
,
nothing
:
false
},
/**
* 组件的方法列表
*/
methods
:
{
// getList(isReset = false) {
// let { type, pageNum, searchValue, nothing, selectedData } = this.data
// // type 1园区店数据 2 4s店数据
// let requestEvent = type == 1 ? 'getYqMerchantListPage' : 'getMerchantListPage'
// let params = {
// pageSize: 20,
// pageNum: isReset ? 1 : pageNum,
// scene: 1,
// merchantName: searchValue
// }
// if (nothing) return
// api[requestEvent](params).then(res => {
// let { code, data, message } = res
// if (code == 0) {
// if (isReset) data?.list.unshift({ merchantId: '', merchantName: '全部', active: true })
// let tempList = isReset ? data?.list : this.data.storeRangeList.concat(data?.list)
// if (selectedData?.length) {
// tempList[0].active = false
// tempList.forEach(val => {
// val.active = selectedData.some(v => v.merchantId == val.merchantId)
// })
// }
// this.setData({
// storeRangeList: tempList,
// pageNum: pageNum + 1,
// total: data?.total,
// nothing: data?.total == (tempList.length - 1),
// })
// } else {
// wx.$util.showToast(message)
// }
// })
// },
getList
()
{
let
{
selectedData
}
=
this
.
data
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
params
=
{
merchantId
:
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
||
userInfo
.
loginRole
==
5
||
userInfo
?.
loginRole
==
6
?
''
:
userInfo
?.
merchantId
,
staffUUID
:
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
||
userInfo
.
loginRole
==
5
||
userInfo
?.
loginRole
==
6
?
''
:
userInfo
?.
uuid
,
scene
:
1
}
get4SStoreList
(
params
,
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
||
userInfo
.
loginRole
==
5
||
userInfo
.
loginRole
==
6
).
then
(
result
=>
{
console
.
log
(
result
,
'get4SStoreList'
)
let
tempList
=
result
if
(
selectedData
?.
length
)
{
tempList
[
0
].
active
=
false
tempList
.
forEach
(
val
=>
{
val
.
active
=
selectedData
.
some
(
v
=>
v
.
merchantId
==
val
.
merchantId
)
})
}
// let userInfo = wx.$util.getUserInfo();
// if (!result?.length) {
// userInfo.shopMerchantId = null;
// userInfo.default4SStoreInfo = {};
// userInfo.shopMerchantName = null;
// userInfo.sceneType = null;
// wx.$util.setUserInfo(userInfo);
// return wx.$router.reLaunch("pages.accountItems");
// }
// if (result?.length && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6)) {
// if (result[0]?.merchantName !== '全部' && result[0]?.merchantId) {
// result.unshift({ merchantName: '全部' })
// }
// let obj = {
// ...userInfo,
// // default4SStoreInfo: {
// // merchantId: result[0]?.merchantId,
// // merchantName: result[0]?.merchantName,
// // },
// };
// if (
// !userInfo?.default4SStoreInfo ||
// !Object.keys(userInfo?.default4SStoreInfo).length
// ) {
// wx.$util.setUserInfo(obj);
// this.setData({
// userInfo: obj,
// });
// }
// }
this
.
setData
({
storeRangeList
:
tempList
||
[],
showPage
:
true
})
})
},
scrollonReachBottom
()
{
this
.
getList
()
},
open
()
{
if
(
this
.
data
.
disabled
)
return
this
.
setData
({
edit
:
true
,
inputFocus
:
true
})
},
setValue
(
value
)
{
if
(
this
.
properties
.
filterEmoji
)
{
if
(
wx
.
$util
.
haveEmoji
(
value
))
value
=
wx
.
$util
.
replaceEmoji
(
value
)
}
this
.
setData
({
searchValue
:
value
})
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
this
.
setValue
(
value
)
this
.
triggerEvent
(
'input'
,
{
value
})
},
inputConfifm
(
e
)
{
this
.
emit
(
e
)
},
emit
(
e
)
{
let
{
detail
:
{
value
},
type
}
=
e
this
.
setData
({
edit
:
false
,
nothing
:
false
,
pageNum
:
1
})
this
.
setValue
(
value
)
this
.
getList
(
true
)
},
choose
(
e
)
{
let
{
item
,
index
}
=
e
.
currentTarget
.
dataset
let
{
active
}
=
item
let
{
storeRangeList
}
=
this
.
data
if
(
index
>
0
)
{
let
target
=
`storeRangeList[
${
index
}
].active`
this
.
setData
(
{
[
target
]:
!
active
,
'storeRangeList[0].active'
:
false
},
()
=>
{
this
.
setSelectedData
()
}
)
}
else
{
if
(
!
active
)
{
storeRangeList
.
map
(
val
=>
{
return
(
val
.
active
=
false
)
})
storeRangeList
[
0
].
active
=
true
}
this
.
setData
({
storeRangeList
},
()
=>
{
this
.
setSelectedData
()
})
}
},
setSelectedData
()
{
let
{
storeRangeList
,
selectedData
}
=
this
.
data
let
arr
=
[]
// 已选的未分页加载出的数据置为选中状态
let
selectedArr
=
wx
.
$util
.
arrayUnique
(
selectedData
.
concat
(
storeRangeList
),
'merchantId'
)
selectedArr
.
forEach
(
val
=>
{
if
(
val
.
active
&&
val
.
merchantId
)
arr
.
push
(
val
)
})
// if (!arr?.length) storeRangeList[0].active = true
this
.
setData
({
selectedData
:
arr
,
// 选择全部清除已选的门店数据
storeRangeList
})
console
.
log
(
selectedData
,
'selectedData'
)
},
hidePopup
()
{
this
.
triggerEvent
(
'cancel'
)
},
confirm
()
{
let
{
selectedData
}
=
this
.
data
this
.
triggerEvent
(
'confirm'
,
selectedData
)
}
}
})
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.json
0 → 100644
View file @
618069b
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.wxml
0 → 100644
View file @
618069b
<!--components/StoreSelectPopup/StoreSelectPopup.wxml-->
<popup title="选择门店" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup">
<view class="search-box">
<view class="search-input">
<block wx:if="{{ !edit }}">
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:if="{{ searchValue }}">{{searchValue}}</block>
<block wx:else>
<image src="/images/search.png" class="icon"></image>
查找
</block>
</view>
</block>
<block wx:else>
<input
type="text"
class="input"
value="{{ searchValue }}"
focus="{{ inputFocus }}"
confirm-type="search"
bindinput="input"
bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block>
</view>
</view>
<view class="title">门店名称</view>
<scroll-view
class="store-select-box"
scroll-y
enhanced="{{ true }}"
show-scrollbar="{{ false }}"
scroll-top="{{ scrollTop }}"
bindscrolltolower="scrollonReachBottom"
>
<view class="box">
<view class="merchant-box">
<block wx:for="{{ storeRangeList }}" wx:key="index">
<view class="item {{ item.active?'active':'' }}" bindtap="choose" data-item="{{ item }}" data-index="{{ index }}">
<view class="icon" catchtap="choose" data-index="{{ index }}" data-item="{{ item }}">
<block wx:if="{{ item.active }}">
<image src="/components/images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="merchant_item">
<view class="text-hide">{{item.merchantName}}</view>
<view>{{item.merchantId}}</view>
</view>
</view>
</block>
</view>
</view>
</scroll-view>
</popup>
\ No newline at end of file
pages/tabMine/components/StoreSelectPopup/StoreSelectPopup.wxss
0 → 100644
View file @
618069b
/* components/StoreSelectPopup/StoreSelectPopup.wxss */
.search-box {
height: var(--fontSize104);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize28);
}
.search-box .search-input {
width: var(--fontSize686);
height: var(--fontSize72);
background: #F7F8FA;
border-radius: var(--fontSize38);
color: #333;
}
.search-input .input{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
text-align: center;
}
.search-input .icon{
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize10);
}
.search-input .placeholder{
color: #C8C9CC;
}
.title{
margin-bottom: var(--fontSize20);
color: #292D33;
font-weight: 400;
font-size: var(--fontSize32);
}
.store-select-box{
height: calc(100% - var(--fontSize168));
}
.merchant-box .item{
display: flex;
height: var(--fontSize88);
align-items: center;
color: #292D33;
}
.merchant-box .item.active{
color: #347BFF;
}
.item .merchant_item{
height: var(--fontSize88);
font-size: var(--fontSize28);
display: flex;
align-items: center;
width: calc(100% - var(--fontSize52));
border-top: var(--fontSize1) solid #EFF0F2;
}
.item .merchant_item .text-hide{
max-width: calc(100% - var(--fontSize192));
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item .icon {
width: var(--fontSize32);
height: var(--fontSize32);
display: block;
margin-right: var(--fontSize20);
flex-shrink: 0;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
\ No newline at end of file
pages/tabMine/components/switchPopup/switchPopup.js
View file @
618069b
...
...
@@ -23,14 +23,6 @@ Component({
value
:
'85%'
},
isYqdSuper
:
Boolean
// merchantSettingInfo: {
// type: Object,
// observer: function (n) {
// if (n) {
// this.setOrderSettingList(n)
// }
// }
// }
},
/**
...
...
@@ -39,31 +31,47 @@ Component({
data
:
{
merchantSettingInfo
:
''
,
// switchStatus: 1,
showStoreSelectPopup
:
false
,
orderSettingList
:
[
{
label
:
'选择车型'
,
valueName
:
'carTypeRequiredFlag'
,
value
:
false
valueName
:
'carBrand'
,
value
:
false
,
scene
:
1
,
fieldKey
:
'carBrand'
,
fieldName
:
'选择车型'
},
{
label
:
'车架号(VIN码)'
,
valueName
:
'standNoRequiredFlag'
,
value
:
false
valueName
:
'carNo'
,
value
:
false
,
scene
:
1
,
fieldKey
:
'carNo'
,
fieldName
:
'车架号(VIN码)'
},
{
label
:
'车牌号'
,
valueName
:
'plateNumRequiredFlag'
,
value
:
false
valueName
:
'plateNo'
,
value
:
false
,
scene
:
1
,
fieldKey
:
'plateNo'
,
fieldName
:
'车牌号'
},
{
label
:
'战败下单是否体验'
,
valueName
:
'foEfRequiredFlag'
,
value
:
true
valueName
:
'notUpgradeExperience'
,
value
:
true
,
scene
:
1
,
fieldKey
:
'notUpgradeExperience'
,
fieldName
:
'战败下单是否体验'
},
{
label
:
'战败下单拒升理由提交'
,
valueName
:
'foRrRequiredFlag'
,
value
:
true
valueName
:
'notUpgradeRejectionReason'
,
value
:
true
,
scene
:
1
,
fieldKey
:
'notUpgradeRejectionReason'
,
fieldName
:
'战败下单拒升理由提交'
}
]
},
...
...
@@ -73,68 +81,149 @@ Component({
// console.log(app.globalData.isYqdSuper)
console
.
log
(
this
.
data
.
isYqdSuper
)
// app .
getYQorderInfo
()
.
then
(
merchantSettingInfo
=>
{
console
.
log
(
merchantSettingInfo
)
this
.
setData
({
merchantSettingInfo
})
this
.
setOrderSettingList
(
merchantSettingInfo
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
}
},
/**
* 组件的方法列表
*/
methods
:
{
getSetting
()
{
let
{
selectedMerchantList
}
=
this
.
data
api
.
getMerchantRecordingSettings
({
scene
:
1
,
merchantId
:
selectedMerchantList
[
0
].
merchantId
,
merchantName
:
selectedMerchantList
[
0
].
merchantName
})
.
then
(
merchantSettingInfo
=>
{
let
{
code
,
data
}
=
merchantSettingInfo
console
.
log
(
merchantSettingInfo
,
'merchantSettingInfo'
)
let
YQorderSetting
=
{}
data
.
orderFieldSettingList
.
map
(
e
=>
{
YQorderSetting
[
e
.
fieldKey
]
=
{
flag
:
e
.
isRequired
?
'Y'
:
'N'
,
id
:
e
.
id
}
})
console
.
log
(
YQorderSetting
,
'YQorderSetting'
)
this
.
setData
({
merchantSettingInfo
:
YQorderSetting
})
this
.
setOrderSettingList
(
YQorderSetting
)
})
},
showPopup
()
{
console
.
log
(
'showPopup'
)
// showStoreSelectPopup
this
.
setData
({
showStoreSelectPopup
:
true
})
},
showStoreSelectPopup
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
storeType
:
type
,
showStoreSelectPopup
:
true
})
},
hideStorePopup
()
{
this
.
setData
({
showStoreSelectPopup
:
false
})
},
storeConfirm
(
e
)
{
// let { storeType } = this.data
// if (storeType == 1)
// this.setData({
// 'form.selectedYqMerchantList': e?.detail
// })
// if (storeType == 2)
// this.setData({
// 'form.selectedMerchantList': e?.detail
// })
console
.
log
(
e
?.
detail
,
' e?.detail'
)
this
.
setData
({
selectedMerchantList
:
e
?.
detail
,
showStoreSelectPopup
:
false
,
isReset
:
false
})
this
.
getSetting
()
},
async
confirm
()
{
// 判断是不是园区店管理员 不是都不处理
let
{
isYqdSuper
,
merchantSettingInfo
,
orderSettingList
}
=
this
.
data
let
{
isYqdSuper
,
merchantSettingInfo
,
orderSettingList
,
selectedMerchantList
}
=
this
.
data
// let { selectedMerchantList } = this.data
// 是管理员请求数据 并存全局读取
if
(
isYqdSuper
)
{
let
{
merchantId
,
merchantName
}
=
merchantSettingInfo
let
{
merchantId
,
merchantName
}
=
selectedMerchantList
[
0
]
wx
.
$util
.
showLoading
(
'设置中...'
)
let
params
=
orderSettingList
.
reduce
((
obj
,
item
)
=>
{
obj
[
item
.
valueName
]
=
item
.
value
==
true
?
'Y'
:
'N'
// item
return
obj
},
{})
// let params = orderSettingList.reduce((obj, item) => {
// obj[item.valueName] = item.value == true ? 'Y' : 'N'
// // item
// return obj
// }, {})
// let setting = orderSettingList.map
// 实现orderSettingList映射
// let params = orderSettingList.reduce((obj, item) => {
// obj[item.fieldKey] = item.value == true ? 'Y' : 'N'
// // item
// return obj
// }, {})
orderSettingList
=
orderSettingList
.
map
(
item
=>
{
item
.
isRequired
=
item
.
isRequired
==
'Y'
?
true
:
false
return
item
})
let
result
=
await
api
.
setMerchantRecordingSettings
({
merchantId
,
merchantName
,
...
params
scene
:
1
,
settings
:
orderSettingList
})
let
{
code
,
data
}
=
result
if
(
code
==
0
)
{
app
.
globalData
.
YQorderSetting
=
Object
.
assign
(
app
.
globalData
.
YQorderSetting
,
params
)
}
wx
.
$util
.
hideLoading
()
wx
.
$util
.
showToast
(
'设置成功'
)
// let { code, data } = result
// if (code == 0) {
// app.globalData.YQorderSetting = Object.assign(
// app.globalData.YQorderSetting,
// params
// )
// }
}
this
.
setData
({
show
:
false
})
},
onSwitchChange
(
e
)
{
// console.log(e)
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
orderSettingList
}
=
this
.
data
let
{
index
}
=
e
.
currentTarget
.
dataset
// console.log(index)
orderSettingList
[
index
][
'value'
]
=
!
orderSettingList
[
index
][
'value'
]
orderSettingList
[
index
][
'isRequired'
]
=
orderSettingList
[
index
][
'value'
]
?
'Y'
:
'N'
// console.log(orderSettingList[index]['value'])
this
.
setData
({
orderSettingList
})
},
setOrderSettingList
(
n
)
{
// 做转换
let
{
orderSettingList
}
=
this
.
data
let
{
orderSettingList
,
selectedMerchantList
}
=
this
.
data
orderSettingList
.
forEach
(
element
=>
{
// if (element.valueName == n) {
let
value
=
n
[
element
.
valueName
]
element
.
value
=
value
==
'Y'
?
true
:
false
// }
// 做转换
let
setting
=
n
[
element
.
valueName
]
console
.
log
(
n
,
setting
,
'orderSettingList'
)
element
.
value
=
setting
&&
setting
.
flag
==
'Y'
element
.
id
=
setting
.
id
element
.
fieldKey
=
element
.
valueName
element
.
isRequired
=
setting
?
setting
.
flag
:
element
.
value
?
'Y'
:
'N'
element
.
merchantId
=
selectedMerchantList
[
0
].
merchantId
element
.
merchantName
=
selectedMerchantList
[
0
].
merchantName
})
console
.
log
(
orderSettingList
)
this
.
setData
({
...
...
pages/tabMine/components/switchPopup/switchPopup.json
View file @
618069b
{
"component"
:
true
,
"usingComponents"
:
{
"switch-block"
:
"/components/switchBlock/switchBlock"
,
"tab-popup"
:
"/components/tabPopup/tabPopup"
}
"usingComponents"
:
{
"switch-block"
:
"/components/switchBlock/switchBlock"
,
"tab-popup"
:
"/components/tabPopup/tabPopup"
,
"store-select-popup"
:
"../StoreSelectPopup/StoreSelectPopup"
}
}
pages/tabMine/components/switchPopup/switchPopup.wxml
View file @
618069b
<tab-popup
show="{{show}}"
title="{{title}}"
height="{{height}}"
tips="{{tips}}"
bindconfirm="confirm">
<block
wx:for="{{orderSettingList}}"
wx:key="index"
wx:for-item="item"
wx:for-index="index">
<gl-cell
border
label="{{item.label}}"
valueAlign="right"
labelWidth="var(--fontSize240)">
<tab-popup show="{{ show }}" title="{{ title }}" height="{{ height }}" tips="{{ tips }}" bindconfirm="confirm">
<gl-cell
border
valueAlign="right"
label="{{ '门店切换' }}"
requiredAfter
labelWidth="var(--fontSize140)"
required
haveArrow
bindclick="showPopup"
data-show-name="selesBox"
placeholder="请选择"
disabled="{{ false }}"
>
<!-- <block wx:if="{{ orderObj.merchantName && orderObj.employeeName }}"> -->
<view class="between">
<view class="start text-hide">{{selectedMerchantList[0].merchantName || '请选择'}}</view>
<!-- <view class="end text-hide">
<text>|</text>
{{orderObj.employeeName}}
</view> -->
</view>
<!-- </block> -->
</gl-cell>
<block wx:for="{{ orderSettingList }}" wx:key="index" wx:for-item="item" wx:for-index="index">
<gl-cell border label="{{ item.label }}" valueAlign="right" labelWidth="var(--fontSize240)">
<!-- <switchBlock/> -->
<switch-block
switchStatus="{{item.value}}"
disable="{{isYqdSuper}}"
bindswitchEvent="onSwitchChange"
data-index="{{index}}" />
<!-- <view class="gender-box">
<view class="block text-center {{orderObj.customer.customerSex==1?'':'right'}}" />
<view class="male text-center {{orderObj.customer.customerSex == 1?'active':''}}" bindtap="changeGender" data-gender="1">
男
</view>
<view class="woman text-center {{orderObj.customer.customerSex == 2?'active':''}}" bindtap="changeGender" data-gender="2">
女
</view>
</view> -->
<switch-block switchStatus="{{ item.value }}" disable="{{ isYqdSuper }}" bindswitchEvent="onSwitchChange" data-index="{{ index }}" />
</gl-cell>
</block>
</tab-popup>
<store-select-popup
show="{{ showStoreSelectPopup }}"
type="{{ 2 }}"
bindconfirm="storeConfirm"
bindcancel="hideStorePopup"
selectedData="{{ selectedMerchantList || [] }}"
></store-select-popup>
<!-- <store-select-popup></store-select-popup> -->
\ No newline at end of file
pages/tabMine/components/switchPopup/switchPopup.wxss
View file @
618069b
/* components/switchPopup/switchPopup.wxss */
\ No newline at end of file
/* components/switchPopup/switchPopup.wxss */
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.start {
text-align-last: right;
}
\ No newline at end of file
pages/tabMine/pages/index/index.js
View file @
618069b
...
...
@@ -44,6 +44,7 @@ Page({
],
grassNum
:
''
,
showMerchantPop
:
false
,
// showMerchantPop: true,
merchantPopConfig
:
{
height
:
'70%'
,
title
:
'录单设置'
,
...
...
router/router.js
View file @
618069b
...
...
@@ -55,7 +55,7 @@ class Router {
thisPage
.
showLoading
=
util
.
showLoading
thisPage
.
hideLoading
=
util
.
hideLoading
// 用来处理兼容iphoneX的底部的横条
console
.
log
(
util
.
isFullSucreen
(),
'util.isFullSucreen()'
);
//
console.log(util.isFullSucreen(), 'util.isFullSucreen()');
thisPage
.
setData
({
isFullSucreen
:
util
.
isFullSucreen
()
})
...
...
store/index.js
View file @
618069b
...
...
@@ -12,8 +12,10 @@ export const checkYqdSuper = (userInfo, globalData) => {
})
// 解决传入app 在初始化获取不到的bug
// console.log(userInfo, 'userInfo')
globalData
.
isYqdSuper
=
userInfo
.
userType
!=
2
&&
!
userInfo
.
isSuper
&&
merchantAccountType
globalData
.
isStaff
=
userInfo
.
userType
==
2
&&
!
userInfo
.
isSuper
&&
merchantAccountType
globalData
.
isYqdSuper
=
userInfo
.
userType
!=
2
&&
!
userInfo
.
isSuper
&&
merchantAccountType
globalData
.
isStaff
=
userInfo
.
userType
==
2
&&
!
userInfo
.
isSuper
&&
merchantAccountType
const
loginRole
=
userInfo
.
loginRole
if
(
loginRole
)
{
globalData
.
isYqdSuper
=
[
2
,
3
].
includes
(
loginRole
)
...
...
@@ -66,7 +68,8 @@ export const getYQInfo = userInfo => {
if
(
data
.
length
>
1
)
{
if
(
userInfo
.
merchantId
!=
userInfo
.
subLoginUser
.
merchantId
)
{
data
.
map
((
e
,
index
)
=>
{
if
(
e
.
merchantId
==
userInfo
.
subLoginUser
.
merchantId
)
subIndex
=
index
+
1
if
(
e
.
merchantId
==
userInfo
.
subLoginUser
.
merchantId
)
subIndex
=
index
+
1
})
}
arr
=
[
all
,
...
data
]
...
...
@@ -98,33 +101,55 @@ export const getYQInfo = userInfo => {
export
const
getYQorderInfo
=
()
=>
{
const
app
=
getApp
()
return
new
Promise
((
resolve
,
reject
)
=>
{
// 判断当前4s店配置是否已获取
let
userInfo
=
wx
.
$util
.
getUserInfo
()
console
.
log
(
app
.
globalData
.
YQorderSetting
&&
app
.
globalData
.
YQorderSetting
?.
shopMerchantId
==
userInfo
.
shopMerchantId
,
'2222'
)
// 如果有 直接返回
if
(
app
.
globalData
.
YQorderSetting
)
{
if
(
app
.
globalData
.
YQorderSetting
&&
app
.
globalData
.
YQorderSetting
?.
shopMerchantId
==
userInfo
.
shopMerchantId
)
{
return
resolve
(
app
.
globalData
.
YQorderSetting
)
}
else
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
if
(
!
userInfo
)
this
.
login
(
true
)
let
{
merchantId
,
merchantName
}
=
userInfo
.
subLoginUser
wx
.
$util
.
showLoading
()
api
.
getMerchantRecordingSettings
({
merchantId
,
merchantName
scene
:
1
,
merchantId
:
userInfo
.
shopMerchantId
,
merchantName
:
userInfo
.
shopMerchantName
})
.
then
(
res
=>
{
// console.log(res)
wx
.
$util
.
hideLoading
()
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
// debugger
// console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig')
let
YQorderSetting
=
{}
const
keyMap
=
{
carBrand
:
'carTypeRequiredFlag'
,
carNo
:
'standNoRequiredFlag'
,
plateNo
:
'plateNumRequiredFlag'
,
notUpgradeExperience
:
'foEfRequiredFlag'
,
notUpgradeRejectionReason
:
'foRrRequiredFlag'
}
;(
data
.
orderFieldSettingList
||
[]).
forEach
(
e
=>
{
const
key
=
keyMap
[
e
.
fieldKey
]
||
e
.
fieldKey
YQorderSetting
[
key
]
=
e
.
isRequired
?
'Y'
:
'N'
})
YQorderSetting
.
shopMerchantId
=
userInfo
.
shopMerchantId
// 过滤园区店是否需要屏蔽手机号选项
let
filterYqPhoneConfig
=
JSON
.
parse
(
data
.
yqPhoneConfig
)
// console.log(filterYqPhoneConfig)
data
.
yqPhoneConfig
=
filterYqPhoneConfig
?.
find
(
item
=>
item
.
yqMerchantId
==
merchantId
)?.
shopMerchantPhoneList
||
false
// console.log(data
)
app
.
globalData
.
YQorderSetting
=
data
// this.checkSeverType(userInfo)
YQorderSetting
.
yqPhoneConfig
=
filterYqPhoneConfig
?.
find
(
item
=>
item
.
yqMerchantId
==
merchantId
)
app
.
globalData
.
YQorderSetting
=
YQorderSetting
resolve
(
app
.
globalData
.
YQorderSetting
)
}
})
...
...
@@ -174,7 +199,10 @@ export const getBusinessSchoolScene = () => {
const
app
=
getApp
()
return
new
Promise
((
resolve
,
reject
)
=>
{
// 如果有 直接返回
if
(
app
.
globalData
.
businessSchoolScene
!=
''
&&
app
.
globalData
.
businessSchoolScene
!=
null
)
{
if
(
app
.
globalData
.
businessSchoolScene
!=
''
&&
app
.
globalData
.
businessSchoolScene
!=
null
)
{
// debugger
return
resolve
(
app
.
globalData
.
businessSchoolScene
)
}
else
{
...
...
@@ -207,7 +235,6 @@ export const getBusinessSchoolScene = () => {
// 扫码进来的处理
export
const
checkScene
=
options
=>
{
// let query = options.query
let
{
query
}
=
options
if
(
query
)
{
...
...
@@ -243,30 +270,36 @@ export const checkScene = options => {
createOrder
:
'tabWorkOrder/pages/createOrder/createOrder'
,
followUpOrder
:
'tabDate/pages/detail'
,
staffDaily
:
'tabWorkOrder/pages/staffDaily/staffDaily'
,
playVideo
:
'packageEquity/pages/trainingMaterials/pages/playVideo/index'
,
upgradeStaffDaily
:
'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily'
,
playVideo
:
'packageEquity/pages/trainingMaterials/pages/playVideo/index'
,
upgradeStaffDaily
:
'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily'
,
deliveryTarget
:
'packageEquity/pages/deliveryTarget/deliveryTarget'
,
'aiDetail'
:
'packageEquity/pages/aiExcercise/ai/ai'
,
'tabDateIndex'
:
'pages/tabDateIndex/pages/tabDateIndex'
,
'tabDateIndex'
:
'pages/tabDateIndex/pages/tabDateIndex'
,
'h5AuthPhone'
:
'pages/h5AuthPhone/h5AuthPhone'
,
'mentorShipManage'
:
'tabWorkOrder/pages/mentorshipManage/mentorshipManage'
,
'refundApply'
:
'tabWorkOrder/pages/refundApply/refundApply'
aiDetail
:
'packageEquity/pages/aiExcercise/ai/ai'
,
tabDateIndex
:
'pages/tabDateIndex/pages/tabDateIndex'
,
tabDateIndex
:
'pages/tabDateIndex/pages/tabDateIndex'
,
h5AuthPhone
:
'pages/h5AuthPhone/h5AuthPhone'
,
mentorShipManage
:
'tabWorkOrder/pages/mentorshipManage/mentorshipManage'
,
refundApply
:
'tabWorkOrder/pages/refundApply/refundApply'
}
options
.
path
=
pagePath
[
query
.
page
]
}
console
.
log
(
options
,
query
,
'options'
)
console
.
log
(
userInfo
,
'userInfo'
)
;
console
.
log
(
userInfo
,
'userInfo'
)
wx
.
$SCENE
=
options
// 跳转登录页就去掉这个跳转逻辑
if
(
options
.
path
==
"pages/wxLogin/wxLogin"
)
{
if
(
options
.
path
==
'pages/wxLogin/wxLogin'
)
{
wx
.
$SCENE
=
null
}
if
(
query
.
merchantId
&&
!
query
.
reportDate
&&
!
query
.
title
)
{
// &&options.patch == 'tabIndex/pages/index/index'
// 需要已登录并且是当前门店的 不是就重新登录
if
(
userInfo
?.
subLoginUser
?.
merchantId
&&
(
userInfo
?.
subLoginUser
?.
merchantId
!=
query
.
merchantId
))
{
if
(
userInfo
?.
subLoginUser
?.
merchantId
&&
userInfo
?.
subLoginUser
?.
merchantId
!=
query
.
merchantId
)
{
wx
.
$SCENE
=
null
// return this.login(true)
// return true // 重新登录
...
...
@@ -276,7 +309,18 @@ export const checkScene = options => {
console
.
log
(
options
.
path
,
'options.path'
)
// wx.$SCENE = options
if
(
!
userInfo
&&
!
[
'pages/accountItems/accountItems'
,
'pages/wxLogin/wxLogin'
,
'tabWorkOrder/pages/staffDaily/staffDaily'
,
'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily'
,
'packageEquity/pages/trainingMaterials/pages/playVideo/index'
,
'packageEquity/pages/deliveryTarget/deliveryTarget'
,
'pages/h5AuthPhone/h5AuthPhone'
].
includes
(
options
.
path
))
{
if
(
!
userInfo
&&
!
[
'pages/accountItems/accountItems'
,
'pages/wxLogin/wxLogin'
,
'tabWorkOrder/pages/staffDaily/staffDaily'
,
'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily'
,
'packageEquity/pages/trainingMaterials/pages/playVideo/index'
,
'packageEquity/pages/deliveryTarget/deliveryTarget'
,
'pages/h5AuthPhone/h5AuthPhone'
].
includes
(
options
.
path
)
)
{
// if (!userInfo) {
// console.log(userInfo);
console
.
log
(
'未登录,请登录。'
)
...
...
@@ -298,7 +342,9 @@ export const setWebSocket = () => {
let
thisPage
=
wx
.
$router
.
getPageInstance
()
console
.
log
(
'socket'
,
data
)
let
_data_
=
JSON
.
parse
(
data
.
data
)
if
(
thisPage
.
route
==
'tabWorkOrder/pages/confirmOrder/confirmOrder'
)
{
if
(
thisPage
.
route
==
'tabWorkOrder/pages/confirmOrder/confirmOrder'
)
{
console
.
log
(
thisPage
.
data
.
orderInfo
.
orderCode
,
_data_
.
content
)
if
(
thisPage
.
data
.
orderInfo
.
orderCode
==
_data_
.
content
)
{
console
.
log
(
_data_
.
type
)
...
...
@@ -318,11 +364,15 @@ export const setWebSocket = () => {
}
/** 获取园区店下的4S店 */
export
const
get4SStoreList
=
(
options
,
isSupervision
,
noScene
)
=>
{
// isSupervision是否是区域运营/超管/飞行督导 noScene登录未选场景时
export
const
get4SStoreList
=
(
options
,
isSupervision
,
noScene
)
=>
{
// isSupervision是否是区域运营/超管/飞行督导 noScene登录未选场景时
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
$util
.
showLoading
()
let
all
=
{
merchantName
:
'全部'
}
let
event
=
noScene
||
!
isSupervision
?
'getSceneMerchantRefStoreList'
:
'getCurShopList'
let
event
=
noScene
||
!
isSupervision
?
'getSceneMerchantRefStoreList'
:
'getCurShopList'
if
(
event
==
'getCurShopList'
)
{
options
.
sceneType
=
options
.
scene
}
...
...
@@ -336,7 +386,8 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
// debugger
// console.log(data);
// getCurShopList 接口数据结构不一致,要修改
let
resolveData
=
(
event
==
'getCurShopList'
?
data
?.
list
:
data
)
||
[]
let
resolveData
=
(
event
==
'getCurShopList'
?
data
?.
list
:
data
)
||
[]
if
(
isSupervision
)
resolveData
=
[
all
,
...
resolveData
]
// console.log(resolveData, 'resolveData');
resolve
(
resolveData
)
...
...
@@ -473,12 +524,10 @@ export const loginLogAdd = options => {
options
.
loginDeviceType
=
isPad
?
1
:
2
// 登录设备类型(1.pad,2手机)
options
.
loginSource
=
1
// 登录来源(1.生意助手员工版小程序,默认)
// "登录方式(1账号密码登录,2.手机号授权,3验证码)"
api
.
loginLogAdd
(
options
).
then
((
result
)
=>
{
}).
catch
((
err
)
=>
{
});
api
.
loginLogAdd
(
options
)
.
then
(
result
=>
{})
.
catch
(
err
=>
{})
}
})
}
tabWorkOrder/api.js
View file @
618069b
...
...
@@ -372,5 +372,13 @@ module.exports = {
return
api
.
post
(
'dj.api.smartcarlife.construction.summary.status'
,
{
...
params
})
},
// 查询门店轻改录单设置
lightChangeSettingList
(
data
){
let
params
=
data
||
{}
return
api
.
post
(
'dj.api.smartcarlife.order.field.lightChange.setting.list'
,
{
...
params
})
}
}
tabWorkOrder/pages/createOrder/createOrder.js
View file @
618069b
...
...
@@ -1658,6 +1658,7 @@ Page({
// app .
getYQorderInfo
()
.
then
((
merchantSettingInfo
)
=>
{
console
.
log
(
merchantSettingInfo
,
'merchantSettingInfo'
);
let
dictionaryObj
=
{
carTypeRequiredFlag
:
"carBrand"
,
standNoRequiredFlag
:
"standNo"
,
...
...
@@ -1866,7 +1867,7 @@ Page({
}
// 是订单补录跳转进来的
if
(
res
?.
orderCreateType
==
"additionRecordOrder"
)
{
let
{
supplementId
,
selectOutTradeNoArr
}
=
res
let
{
supplementId
,
selectOutTradeNoArr
}
=
res
if
(
supplementId
)
{
return
this
.
checkShowOrderInfo
()
}
...
...
utils/request/environment.js
View file @
618069b
...
...
@@ -61,9 +61,9 @@ const domain_items = {
// dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.104:8292', //叶立庆
// dj: "http://192.168.1.169:8292", //蔡远明
dj
:
'http://192.168.1.104:8292'
,
//范富荣
//
dj: 'http://192.168.1.104:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭
//
dj: 'http://192.168.1.76:8292', //璐琦
dj
:
'http://192.168.1.76:8292'
,
//璐琦
// dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺
...
...
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