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 5d127de7
authored
Aug 10, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat
1 parent
79f427cb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
531 additions
and
319 deletions
app.js
components/Coupon/Coupon.js
components/modal/modal.wxml
config.js
packageEquity/pages/TabBar/equityPage.js
packageEquity/pages/carEquity/components/EquityList/EquityList.js
packageEquity/pages/carQuotation/index/index.js
packageEquity/pages/carQuotation/index/index.wxml
packageEquity/pages/clueList/components/EquityItem/EquityItem.js
packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js
packageEquity/pages/index/index.js
pages/tabWorkOrder/pages/index/index.js
store/ModalToQueueControl.js
store/index.js
tabDate/pages/detail/detail.js
tabIndex/pages/index/index.js
tabWorkOrder/api.js
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxss → tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.sass
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxml
app.js
View file @
5d127de
//app.js
//app.js
// 初始化sentry
// 初始化sentry
import
sentryInit
from
'~/utils/sentryConfig/sentryInit'
import
sentryInit
from
"~/utils/sentryConfig/sentryInit"
;
const
sentry
=
sentryInit
()
const
sentry
=
sentryInit
()
;
wx
.
$sendSentry
=
function
(
e
)
{
wx
.
$sendSentry
=
function
(
e
)
{
sentry
.
captureException
(
e
);
sentry
.
captureException
(
e
);
};
};
// 解决showLoading 和 showToast显示异常的问题
// 解决showLoading 和 showToast显示异常的问题
import
fixWxShowToast
from
'./utils/lib/fixWxShowToast'
import
fixWxShowToast
from
"./utils/lib/fixWxShowToast"
;
fixWxShowToast
()
fixWxShowToast
()
;
import
router
from
'./router/index.js'
import
router
from
"./router/index.js"
;
// 判断小程序是否需要更新
// 判断小程序是否需要更新
import
getUpdateManager
from
'./utils/lib/wxUpdateManager'
import
getUpdateManager
from
"./utils/lib/wxUpdateManager"
;
import
util
from
'./utils/util.js'
import
util
from
"./utils/util.js"
;
import
wxApi
from
'./utils/utils_wx'
import
wxApi
from
"./utils/utils_wx"
;
// 实例化对象存储
// 实例化对象存储
import
{
Storage
}
from
'~/utils/cache/storage'
import
{
Storage
}
from
"~/utils/cache/storage"
;
const
$Storage
=
new
Storage
()
const
$Storage
=
new
Storage
();
import
{
setSystem_info
,
getNoSignInUuid
,
removeSystemStorage
}
from
'~/utils/cache/storageApi'
import
{
setSystem_info
()
// 存储设备信息
setSystem_info
,
import
{
checkYqdSuper
,
checkScene
}
from
'~/store/index'
getNoSignInUuid
,
import
eventbus
from
'./utils/eventbus'
removeSystemStorage
,
import
api
from
'./api/api'
}
from
"~/utils/cache/storageApi"
;
import
{
Version
}
from
'glsx-common-sdk'
setSystem_info
();
// 存储设备信息
import
{
areaList
}
from
'@vant/area-data'
//预加载省市区
import
{
checkYqdSuper
,
checkScene
}
from
"~/store/index"
;
import
eventbus
from
"./utils/eventbus"
;
import
api
from
"./api/api"
;
import
{
Version
}
from
"glsx-common-sdk"
;
import
{
areaList
}
from
"@vant/area-data"
;
//预加载省市区
// 将 api.reNoSignIn() 函数包装为节流函数
// 将 api.reNoSignIn() 函数包装为节流函数
const
debouncedReNoSignIn
=
debounce
(
function
(
noSignInUuid
,
that
)
{
const
debouncedReNoSignIn
=
debounce
(
function
(
noSignInUuid
,
that
)
{
console
.
log
(
'debouncedReNoSignIn2222'
);
console
.
log
(
"debouncedReNoSignIn2222"
);
api
.
reNoSignIn
({
api
noSignInUuid
:
noSignInUuid
.
reNoSignIn
({
})
noSignInUuid
:
noSignInUuid
,
.
then
(
res
=>
{
})
let
{
code
,
data
}
=
res
.
then
((
res
)
=>
{
if
(
code
==
'0'
&&
data
)
{
let
{
code
,
data
}
=
res
;
util
.
setSessionId
(
data
?.
sessionId
)
if
(
code
==
"0"
&&
data
)
{
wx
.
reLaunch
({
url
:
'/pages/loading/loading'
})
util
.
setSessionId
(
data
?.
sessionId
);
wx
.
reLaunch
({
url
:
"/pages/loading/loading"
});
}
else
{
}
else
{
util
.
removeStorage
()
util
.
removeStorage
()
;
removeSystemStorage
()
removeSystemStorage
()
;
that
.
login
(
false
)
that
.
login
(
false
)
;
}
}
})
})
;
},
0
);
// 设置防抖时间为 0 秒
},
0
);
// 设置防抖时间为 0 秒
// }, 0); // 设置防抖时间为 5 秒
// }, 0); // 设置防抖时间为 5 秒
// 定义一个防抖函数
// 定义一个防抖函数
...
@@ -55,49 +60,50 @@ function debounce(func, timeout) {
...
@@ -55,49 +60,50 @@ function debounce(func, timeout) {
App
({
App
({
onLaunch
()
{
onLaunch
()
{
/**挂载到wx对象 */
/**挂载到wx对象 */
wx
.
$storage
=
$Storage
/** 挂载全局缓存方法 */
wx
.
$storage
=
$Storage
;
/** 挂载全局缓存方法 */
wx
.
$router
=
router
wx
.
$router
=
router
;
wx
.
$modal
=
this
.
showModal
wx
.
$modal
=
this
.
showModal
;
wx
.
$util
=
util
wx
.
$util
=
util
;
wx
.
$api
=
wxApi
wx
.
$api
=
wxApi
;
wx
.
$eventbus
=
eventbus
wx
.
$eventbus
=
eventbus
;
wx
.
$areaList
=
areaList
wx
.
$areaList
=
areaList
;
let
userInfo
=
util
.
getStorageSync
(
'dj_boutique_user_info'
)
let
userInfo
=
util
.
getStorageSync
(
"dj_boutique_user_info"
);
// ,this.globalData, userInfo
// ,this.globalData, userInfo
userInfo
&&
this
.
gobalCheckYqdSuper
(
userInfo
)
userInfo
&&
this
.
gobalCheckYqdSuper
(
userInfo
)
;
wx
.
$versionConfig
=
new
Version
({
wx
.
$versionConfig
=
new
Version
({
request
:
{
request
:
{
baseUrl
:
'https://config-center-backend.glsx.com.cn/glsxAdmin/config'
,
baseUrl
:
"https://config-center-backend.glsx.com.cn/glsxAdmin/config"
,
isSign
:
false
isSign
:
false
,
}
}
,
})
})
;
},
},
async
getVersionInfo
(
request
)
{
async
getVersionInfo
(
request
)
{
if
(
request
)
this
.
globalData
.
versionData
=
null
if
(
request
)
this
.
globalData
.
versionData
=
null
;
const
{
versionData
}
=
this
.
globalData
const
{
versionData
}
=
this
.
globalData
;
if
(
versionData
)
return
versionData
if
(
versionData
)
return
versionData
;
else
{
else
{
const
res
=
await
wx
.
$versionConfig
.
get
({
const
res
=
await
wx
.
$versionConfig
.
get
({
moduleUrl
:
'dj-car-boutique-work-wechat'
,
moduleUrl
:
"dj-car-boutique-work-wechat"
,
// moduleUrl: 'business-assistant',
// moduleUrl: 'business-assistant',
env
:
'update'
env
:
"update"
,
})
})
;
this
.
globalData
.
versionData
=
res
this
.
globalData
.
versionData
=
res
;
return
res
return
res
;
}
}
},
},
showModal
(
that
,
options
)
{
showModal
(
that
,
options
,
id
=
"#modal"
)
{
that
.
selectComponent
(
'#modal'
).
showModal
(
options
)
// id = id || "#modal";
that
.
selectComponent
(
id
).
showModal
(
options
);
},
},
gobalCheckYqdSuper
(
userInfo
)
{
gobalCheckYqdSuper
(
userInfo
)
{
checkYqdSuper
(
userInfo
,
this
.
globalData
)
checkYqdSuper
(
userInfo
,
this
.
globalData
)
;
},
},
onShow
(
options
)
{
onShow
(
options
)
{
wx
.
onMemoryWarning
(
function
()
{
wx
.
onMemoryWarning
(
function
()
{
console
.
log
(
'onMemoryWarningReceive'
)
console
.
log
(
"onMemoryWarningReceive"
);
})
})
;
// console.log('lifeshow')
// console.log('lifeshow')
getUpdateManager
()
getUpdateManager
()
;
// options = {
// options = {
// query: {
// query: {
// page: 'playVideo',
// page: 'playVideo',
...
@@ -110,19 +116,19 @@ App({
...
@@ -110,19 +116,19 @@ App({
if
(
options
)
{
if
(
options
)
{
// console.log('options', options)
// 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
)
res
&&
this
.
login
(
true
,
res
)
;
}
}
},
},
login
(
relogin
,
context
)
{
login
(
relogin
,
context
)
{
let
that
=
this
let
that
=
this
;
// 清空多账号信息
// 清空多账号信息
if
(
relogin
)
{
if
(
relogin
)
{
// 判断有没有 30 天免登陆 有直接跳选园区
// 判断有没有 30 天免登陆 有直接跳选园区
let
noSignInUuid
=
getNoSignInUuid
()
let
noSignInUuid
=
getNoSignInUuid
()
;
console
.
log
(
'noSignInUuid'
,
noSignInUuid
)
console
.
log
(
"noSignInUuid"
,
noSignInUuid
);
if
(
noSignInUuid
)
{
if
(
noSignInUuid
)
{
// 调用防抖函数
// 调用防抖函数
debouncedReNoSignIn
(
noSignInUuid
,
that
);
debouncedReNoSignIn
(
noSignInUuid
,
that
);
...
@@ -146,57 +152,56 @@ App({
...
@@ -146,57 +152,56 @@ App({
// }
// }
// })
// })
// }, 500, true)
// }, 500, true)
}
else
{
}
else
{
// 标志位 解决安卓查复弹框问题
// 标志位 解决安卓查复弹框问题
if
(
wx
.
__HAS_NOTLOGIN_MODAL
)
return
false
if
(
wx
.
__HAS_NOTLOGIN_MODAL
)
return
false
;
wx
.
__HAS_NOTLOGIN_MODAL
=
true
wx
.
__HAS_NOTLOGIN_MODAL
=
true
;
wx
.
showModal
({
wx
.
showModal
({
title
:
'温馨提示'
,
title
:
"温馨提示"
,
content
:
context
||
'登录过期,请重新登录。'
,
content
:
context
||
"登录过期,请重新登录。"
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
'去登录'
,
confirmText
:
"去登录"
,
confirmColor
:
'#347BFF'
,
confirmColor
:
"#347BFF"
,
success
(
res
)
{
success
(
res
)
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
that
.
globalData
.
yqdInfo
=
{}
that
.
globalData
.
yqdInfo
=
{}
;
that
.
globalData
.
YQorderSetting
=
''
that
.
globalData
.
YQorderSetting
=
""
;
that
.
globalData
.
YQList
=
''
that
.
globalData
.
YQList
=
""
;
that
.
globalData
.
businessSchoolScene
=
''
that
.
globalData
.
businessSchoolScene
=
""
;
util
.
removeStorage
()
util
.
removeStorage
()
;
wx
.
$relogin
=
relogin
wx
.
$relogin
=
relogin
;
router
.
reLaunch
(
'pages.wxLogin'
)
router
.
reLaunch
(
"pages.wxLogin"
);
}
}
},
},
complete
:
()
=>
{
complete
:
()
=>
{
// 这个延迟的目的是为了避免短时间内重复弹出
// 这个延迟的目的是为了避免短时间内重复弹出
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
setTimeout
(()
=>
{
setTimeout
(()
=>
{
wx
.
__HAS_NOTLOGIN_MODAL
=
false
wx
.
__HAS_NOTLOGIN_MODAL
=
false
;
},
2000
)
},
2000
)
;
}
}
,
})
})
;
}
}
}
else
{
}
else
{
this
.
globalData
.
yqdInfo
=
{}
this
.
globalData
.
yqdInfo
=
{}
;
this
.
globalData
.
YQorderSetting
=
''
this
.
globalData
.
YQorderSetting
=
""
;
this
.
globalData
.
YQList
=
''
this
.
globalData
.
YQList
=
""
;
this
.
globalData
.
businessSchoolScene
=
''
this
.
globalData
.
businessSchoolScene
=
""
;
util
.
removeStorage
()
util
.
removeStorage
()
;
removeSystemStorage
()
removeSystemStorage
()
;
wx
.
$relogin
=
relogin
wx
.
$relogin
=
relogin
;
router
.
reLaunch
(
'pages.wxLogin'
)
router
.
reLaunch
(
"pages.wxLogin"
);
}
}
},
},
globalData
:
{
globalData
:
{
statusBarHeight
:
wx
.
getSystemInfoSync
()[
'statusBarHeight'
],
// 头部导航栏的高度
statusBarHeight
:
wx
.
getSystemInfoSync
()[
"statusBarHeight"
],
// 头部导航栏的高度
yqdInfo
:
{},
yqdInfo
:
{},
isYqdSuper
:
true
,
isYqdSuper
:
true
,
isStaff
:
false
,
isStaff
:
false
,
YQorderSetting
:
''
,
YQorderSetting
:
""
,
count
:
''
,
count
:
""
,
versionData
:
null
,
versionData
:
null
,
businessSchoolScene
:
''
businessSchoolScene
:
""
,
}
}
,
})
})
;
components/Coupon/Coupon.js
View file @
5d127de
...
@@ -300,6 +300,7 @@ Component({
...
@@ -300,6 +300,7 @@ Component({
chooseItem
,
chooseItem
,
});
});
// 追加一个逻辑 订单补录并且不是回显的话 或则订单是战败
// 追加一个逻辑 订单补录并且不是回显的话 或则订单是战败
let
{
orderCreateType
}
=
this
.
data
;
if
(
if
(
(
orderCreateType
==
"additionRecordOrder"
||
(
orderCreateType
==
"additionRecordOrder"
||
this
.
data
.
selectPayType
==
0
)
&&
this
.
data
.
selectPayType
==
0
)
&&
...
...
components/modal/modal.wxml
View file @
5d127de
<!-- components/show-modal/index.wxml -->
<!-- components/show-modal/index.wxml -->
<view wx:if="{{
_show}}" class='popV'
catchtouchmove="move">
<view wx:if="{{
_show }}" class="popV"
catchtouchmove="move">
<view class=
'popV-mask' bindtap="selectMask" animation='{{maskAnimate}}'
/>
<view class=
"popV-mask" bindtap="selectMask" animation="{{ maskAnimate }}"
/>
<!-- 动态修改top -->
<!-- 动态修改top -->
<view class=
'popV-content' animation='{{frameAnimate}}'
>
<view class=
"popV-content" animation="{{ frameAnimate }}"
>
<view class="tap_title" wx:if="{{
tabTitleShow
}}">{{tapTitle}}</view>
<view class="tap_title" wx:if="{{
tabTitleShow
}}">{{tapTitle}}</view>
<view class="popV-title" wx:if="{{
title
}}">{{title}}</view>
<view class="popV-title" wx:if="{{
title
}}">{{title}}</view>
<slot wx:if="{{
custom
}}" />
<slot wx:if="{{
custom
}}" />
<view
class="popV-content-btm {{btnBorder?'border':''
}}">
<view
wx:if="{{ btns&&btns.length }}" class="popV-content-btm {{ btnBorder?'border':''
}}">
<!-- style="color:{{btnTextColor[index]?btnTextColor[index]:''}};" -->
<!-- style="color:{{btnTextColor[index]?btnTextColor[index]:''}};" -->
<!-- <block > -->
<view
<view
wx:for="{{btns
}}"
wx:for="{{ btns
}}"
wx:key="index"
wx:key="index"
data-index="{{index
}}"
data-index="{{ index
}}"
class='popV-item'
class="popV-item"
hover-class='popV-hover'
hover-class="popV-hover"
bindtap='selectBtn'>
bindtap="selectBtn"
{{item}}
>{{item}}</view>
<
/view
>
<
!-- </block> --
>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
config.js
View file @
5d127de
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 4预发布
* 5cdptest
* 5cdptest
*/
*/
let
index
=
2
;
let
index
=
1
;
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
...
...
packageEquity/pages/TabBar/equityPage.js
View file @
5d127de
// pages/equity/index.js
// pages/equity/index.js
import
{
get4SStoreList
}
from
"~/store/index"
;
import
{
get4SStoreList
}
from
"~/store/index"
;
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
import
api
from
"~/api/api.js"
;
import
api
from
"~/api/api.js"
;
import
{
import
{
merchantMode
,
merchantMode
,
...
@@ -71,7 +72,10 @@ Page({
...
@@ -71,7 +72,10 @@ Page({
showPage
:
false
,
showPage
:
false
,
// hasMode:true
// hasMode:true
},
},
navigator
(
e
)
{
async
navigator
(
e
)
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
console
.
log
(
e
);
console
.
log
(
e
);
let
{
outTradeNo
}
=
e
.
detail
;
let
{
outTradeNo
}
=
e
.
detail
;
let
{
mode
}
=
this
.
data
;
let
{
mode
}
=
this
.
data
;
...
@@ -83,10 +87,6 @@ Page({
...
@@ -83,10 +87,6 @@ Page({
...
e
.
detail
,
...
e
.
detail
,
}
}
);
);
// outTradeNo &&
// wx.$router.go('tabWorkOrder.additionRecordOrder', {
// ...e.detail
// })
},
},
tipsEvent
()
{
tipsEvent
()
{
this
.
setData
({
this
.
setData
({
...
@@ -98,51 +98,51 @@ Page({
...
@@ -98,51 +98,51 @@ Page({
tipsProps
:
false
,
tipsProps
:
false
,
});
});
},
},
staffDailyReport
(
userInfo
)
{
//
staffDailyReport(userInfo) {
return
new
Promise
((
resolve
,
reject
)
=>
{
//
return new Promise((resolve, reject) => {
staffDailyReportMerchantValid
({
//
staffDailyReportMerchantValid({
merchantId
:
userInfo
?.
shopMerchantId
,
//
merchantId: userInfo?.shopMerchantId,
yqMerchantId
:
userInfo
?.
merchantId
,
//
yqMerchantId: userInfo?.merchantId,
staffUuid
:
userInfo
?.
uuid
,
//
staffUuid: userInfo?.uuid,
sceneType
:
0
,
//
sceneType: 0,
})
//
})
.
then
((
res
)
=>
{
//
.then((res) => {
if
(
res
.
data
)
{
//
if (res.data) {
// 获取当前日期
//
// 获取当前日期
let
currentDate
=
new
Date
();
//
let currentDate = new Date();
// 获取上一天的日期
//
// 获取上一天的日期
let
previousDate
=
new
Date
(
currentDate
);
//
let previousDate = new Date(currentDate);
previousDate
.
setDate
(
currentDate
.
getDate
()
-
1
);
//
previousDate.setDate(currentDate.getDate() - 1);
console
.
log
(
previousDate
,
"previousDate"
);
//
console.log(previousDate, "previousDate");
// toISOString 方法会丢失时区 导致与北京时间差八小时
//
// toISOString 方法会丢失时区 导致与北京时间差八小时
let
hour
=
previousDate
.
getHours
()
+
8
;
//
let hour = previousDate.getHours() + 8;
previousDate
.
setHours
(
hour
);
//
previousDate.setHours(hour);
// 格式化日期为"yyyy-mm-dd"
//
// 格式化日期为"yyyy-mm-dd"
let
formattedDate
=
previousDate
.
toISOString
().
split
(
"T"
)[
0
];
//
let formattedDate = previousDate.toISOString().split("T")[0];
console
.
log
(
"formattedDate"
,
formattedDate
);
//
console.log("formattedDate", formattedDate);
if
(
wx
.
__HAS_NOTLOGIN_MODAL
||
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
)
return
false
;
//
if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false;
this
.
addModalToQueue
(
//
this.addModalToQueue(
"日报提醒"
,
//
"日报提醒",
"您有未填写的日报,请点击前往。"
,
//
"您有未填写的日报,请点击前往。",
"前往填写"
,
//
"前往填写",
false
,
//
false,
4
,
//
4,
(
res
)
=>
{
//
(res) => {
if
(
res
.
confirm
)
{
//
if (res.confirm) {
wx
.
$router
.
go
(
"tabWorkOrder.staffDaily"
,
{
//
wx.$router.go("tabWorkOrder.staffDaily", {
reportDate
:
formattedDate
,
//
reportDate: formattedDate,
});
//
});
}
//
}
}
//
}
);
//
);
}
//
}
resolve
();
//
resolve();
})
//
})
.
catch
((
err
)
=>
{
//
.catch((err) => {
resolve
();
//
resolve();
});
//
});
});
//
});
},
//
},
// 检测一下是否能微信端小程序登录
// 检测一下是否能微信端小程序登录
checkAgreeClient
(
loginUserObj
)
{
checkAgreeClient
(
loginUserObj
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -195,9 +195,9 @@ Page({
...
@@ -195,9 +195,9 @@ Page({
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
userInfo
=
wx
.
$util
.
getUserInfo
()
const
isStaff
=
app
.
globalData
.
isStaff
;
const
isStaff
=
app
.
globalData
.
isStaff
;
let
eventRequest
=
[];
let
eventRequest
=
[];
isStaff
&&
//
isStaff &&
tabIndex
==
0
&&
//
tabIndex == 0 &&
eventRequest
.
push
(
this
.
staffDailyReport
(
wx
.
$util
.
getUserInfo
()));
//
eventRequest.push(this.staffDailyReport(wx.$util.getUserInfo()));
if
(
tabIndex
==
0
&&
!
userInfo
?.
isSuper
&&
userInfo
?.
loginRole
!=
3
)
if
(
tabIndex
==
0
&&
!
userInfo
?.
isSuper
&&
userInfo
?.
loginRole
!=
3
)
eventRequest
.
push
(
this
.
checkAgreeClient
(
wx
.
$util
.
getUserInfo
()));
eventRequest
.
push
(
this
.
checkAgreeClient
(
wx
.
$util
.
getUserInfo
()));
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
...
@@ -386,7 +386,6 @@ Page({
...
@@ -386,7 +386,6 @@ Page({
const
showPageNum
=
[
1
,
2
];
const
showPageNum
=
[
1
,
2
];
showPageNum
.
includes
(
tabIndex
)
&&
wx
.
$eventbus
.
emit
(
"page_show"
);
// 初始化tab底部条没有的问题
showPageNum
.
includes
(
tabIndex
)
&&
wx
.
$eventbus
.
emit
(
"page_show"
);
// 初始化tab底部条没有的问题
this
.
initList
();
this
.
initList
();
// this.checkDailyRecport()
},
},
checkTask
()
{
checkTask
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
...
@@ -525,7 +524,7 @@ Page({
...
@@ -525,7 +524,7 @@ Page({
},
},
async
initList
()
{
async
initList
()
{
Promise
.
all
([
Promise
.
all
([
this
.
checkDailyRecport
(),
//
this.checkDailyRecport(),
this
.
checkDeliveryTarget
(),
this
.
checkDeliveryTarget
(),
this
.
getMerchant4SMode
(),
this
.
getMerchant4SMode
(),
this
.
checkStaffOrderStatus
(),
this
.
checkStaffOrderStatus
(),
...
@@ -602,7 +601,6 @@ Page({
...
@@ -602,7 +601,6 @@ Page({
if
(
options
&&
options
.
tabIndex
&&
options
.
tabIndex
!=
0
)
{
if
(
options
&&
options
.
tabIndex
&&
options
.
tabIndex
!=
0
)
{
return
;
return
;
}
}
// this.checkDailyRecport()
}
}
},
},
/**
/**
...
...
packageEquity/pages/carEquity/components/EquityList/EquityList.js
View file @
5d127de
// packageEquity/pages/carEquity/components/EquityList/EquityList.js
// packageEquity/pages/carEquity/components/EquityList/EquityList.js
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
import
carLifeApi
from
'../../../../carEquityApi'
import
carLifeApi
from
'../../../../carEquityApi'
import
constantData
from
'../constant/data'
import
constantData
from
'../constant/data'
const
TABLIST
=
[
'全部'
,
'待补单'
,
'提单失败'
,
'已完成'
]
const
TABLIST
=
[
'全部'
,
'待补单'
,
'提单失败'
,
'已完成'
]
...
@@ -38,26 +39,26 @@ Component({
...
@@ -38,26 +39,26 @@ Component({
data
:
{
data
:
{
storeInfo
:
{},
storeInfo
:
{},
orderObj
:
[{
orderObj
:
[{
label
:
'车架号'
,
label
:
'车架号'
,
key
:
'vin'
key
:
'vin'
},
},
{
{
label
:
'业务来源'
,
label
:
'业务来源'
,
key
:
'ywly'
key
:
'ywly'
},
},
{
{
label
:
'商品名称'
,
label
:
'商品名称'
,
key
:
'goodName'
key
:
'goodName'
},
},
{
{
label
:
'服务期限'
,
label
:
'服务期限'
,
key
:
'serviceExpire'
,
key
:
'serviceExpire'
,
suffix
:
'年'
suffix
:
'年'
},
},
{
{
label
:
'商品内容'
,
label
:
'商品内容'
,
key
:
'goodServiceName'
key
:
'goodServiceName'
}
}
],
],
statisticsObj
:
{},
statisticsObj
:
{},
btnTxt
:
{
btnTxt
:
{
...
@@ -140,10 +141,10 @@ Component({
...
@@ -140,10 +141,10 @@ Component({
statisticsObj
:
data
||
{}
statisticsObj
:
data
||
{}
})
})
this
.
setData
({
this
.
setData
({
[
'tabList[0]'
]:
{
text
:
TABLIST
[
0
],
count
:
data
.
totalOder
||
0
},
[
'tabList[0]'
]:
{
text
:
TABLIST
[
0
],
count
:
data
.
totalOder
||
0
},
[
'tabList[1]'
]:
{
text
:
TABLIST
[
1
],
count
:
data
.
ladingOder
||
0
},
[
'tabList[1]'
]:
{
text
:
TABLIST
[
1
],
count
:
data
.
ladingOder
||
0
},
[
'tabList[2]'
]:
{
text
:
TABLIST
[
2
],
count
:
data
.
failed
||
0
},
[
'tabList[2]'
]:
{
text
:
TABLIST
[
2
],
count
:
data
.
failed
||
0
},
[
'tabList[3]'
]:
{
text
:
TABLIST
[
3
],
count
:
data
.
success
||
0
}
[
'tabList[3]'
]:
{
text
:
TABLIST
[
3
],
count
:
data
.
success
||
0
}
})
})
}
else
{
}
else
{
wx
.
$util
.
showToast
(
res
.
message
||
'接口异常'
)
wx
.
$util
.
showToast
(
res
.
message
||
'接口异常'
)
...
@@ -236,6 +237,9 @@ Component({
...
@@ -236,6 +237,9 @@ Component({
},
},
// 录单/重新录单
// 录单/重新录单
handleRecordOrder
(
e
)
{
handleRecordOrder
(
e
)
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
let
{
let
{
target
target
}
=
e
.
currentTarget
.
dataset
}
=
e
.
currentTarget
.
dataset
...
...
packageEquity/pages/carQuotation/index/index.js
View file @
5d127de
...
@@ -7,6 +7,7 @@ import {
...
@@ -7,6 +7,7 @@ import {
orderStatistics
,
orderStatistics
,
cancelOrderById
,
cancelOrderById
,
}
from
"../../../api"
;
}
from
"../../../api"
;
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
import
data
from
"../constant/data"
;
import
data
from
"../constant/data"
;
import
constantData
from
"../constant/data"
;
import
constantData
from
"../constant/data"
;
import
{
ImgUrl
as
IMG_URL
}
from
"~/config"
;
import
{
ImgUrl
as
IMG_URL
}
from
"~/config"
;
...
@@ -215,7 +216,10 @@ Component({
...
@@ -215,7 +216,10 @@ Component({
this
.
getOrderStatistics
();
this
.
getOrderStatistics
();
if
(
!
userInfo
?.
isSuper
&&
userInfo
?.
loginRole
!=
3
)
this
.
getMerchantCarBrandList
();
if
(
!
userInfo
?.
isSuper
&&
userInfo
?.
loginRole
!=
3
)
this
.
getMerchantCarBrandList
();
},
},
handleClickOrderBtn
(
e
)
{
async
handleClickOrderBtn
(
e
)
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
// console.log(e)
// console.log(e)
// let { target } = e.target.dataset
// let { target } = e.target.dataset
let
{
mode
,
merchantBrand
}
=
this
.
data
;
let
{
mode
,
merchantBrand
}
=
this
.
data
;
...
@@ -435,7 +439,7 @@ Component({
...
@@ -435,7 +439,7 @@ Component({
this
.
getOrderStatistics
();
this
.
getOrderStatistics
();
},
},
// 按钮
// 按钮
handleClickBtn
(
e
)
{
async
handleClickBtn
(
e
)
{
let
{
target
,
type
}
=
e
.
currentTarget
.
dataset
;
let
{
target
,
type
}
=
e
.
currentTarget
.
dataset
;
console
.
log
(
target
);
console
.
log
(
target
);
// wx.$router.go('createOrderCarQuotation', {
// wx.$router.go('createOrderCarQuotation', {
...
@@ -446,6 +450,8 @@ Component({
...
@@ -446,6 +450,8 @@ Component({
switch
(
target
.
orderStatus
+
""
)
{
switch
(
target
.
orderStatus
+
""
)
{
// schemeConfirmation
// schemeConfirmation
case
"0"
:
case
"0"
:
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
wx
.
$router
.
go
(
wx
.
$router
.
go
(
target
.
mode
!=
0
target
.
mode
!=
0
?
"createOrderCarQuotationSimple"
?
"createOrderCarQuotationSimple"
...
@@ -461,6 +467,8 @@ Component({
...
@@ -461,6 +467,8 @@ Component({
});
});
break
;
break
;
case
"2"
:
case
"2"
:
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
if
(
type
==
"pay"
)
{
if
(
type
==
"pay"
)
{
// 去支付
// 去支付
wx
.
$router
.
go
(
"CarQuotationPay"
,
{
wx
.
$router
.
go
(
"CarQuotationPay"
,
{
...
@@ -480,6 +488,8 @@ Component({
...
@@ -480,6 +488,8 @@ Component({
// orderId: target.orderId,
// orderId: target.orderId,
// apiName: 'handler'
// apiName: 'handler'
// })
// })
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
if
(
type
==
"handle"
)
{
if
(
type
==
"handle"
)
{
// 去处理
// 去处理
wx
.
$router
.
go
(
"serviceInfo"
,
{
wx
.
$router
.
go
(
"serviceInfo"
,
{
...
@@ -498,6 +508,8 @@ Component({
...
@@ -498,6 +508,8 @@ Component({
// wx.$router.go('createOrderCarQuotation', {
// wx.$router.go('createOrderCarQuotation', {
// id: target.id
// id: target.id
// })
// })
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
wx
.
$router
.
go
(
wx
.
$router
.
go
(
target
.
mode
!=
0
target
.
mode
!=
0
?
"createOrderCarQuotationSimple"
?
"createOrderCarQuotationSimple"
...
@@ -508,6 +520,8 @@ Component({
...
@@ -508,6 +520,8 @@ Component({
);
);
break
;
break
;
case
"5"
:
case
"5"
:
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
wx
.
$router
.
go
(
"serviceInfo"
,
{
wx
.
$router
.
go
(
"serviceInfo"
,
{
orderId
:
target
.
orderId
,
orderId
:
target
.
orderId
,
apiName
:
"handler"
,
apiName
:
"handler"
,
...
...
packageEquity/pages/carQuotation/index/index.wxml
View file @
5d127de
This diff is collapsed.
Click to expand it.
packageEquity/pages/clueList/components/EquityItem/EquityItem.js
View file @
5d127de
// packageEquity/pages/clueList/components/EquityItem/EquityItem.js
// packageEquity/pages/clueList/components/EquityItem/EquityItem.js
import
itemMixin
from
'../itemMixins'
import
itemMixin
from
'../itemMixins'
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
Component
({
Component
({
behaviors
:
[
itemMixin
],
behaviors
:
[
itemMixin
],
...
@@ -56,6 +57,9 @@ Component({
...
@@ -56,6 +57,9 @@ Component({
})
})
},
},
jump
()
{
jump
()
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
const
{
const
{
data
data
}
=
this
.
data
}
=
this
.
data
...
...
packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js
View file @
5d127de
// packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js
// packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js
import
itemMixin
from
'../itemMixins'
import
itemMixin
from
'../itemMixins'
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
Component
({
Component
({
behaviors
:
[
itemMixin
],
behaviors
:
[
itemMixin
],
/**
/**
...
@@ -14,23 +15,23 @@ Component({
...
@@ -14,23 +15,23 @@ Component({
*/
*/
data
:
{
data
:
{
sceneTypeStatusMap
:
[{
sceneTypeStatusMap
:
[{
label
:
'权益服务'
,
label
:
'权益服务'
,
key
:
'0'
key
:
'0'
},
},
{
{
label
:
'精品加装'
,
label
:
'精品加装'
,
key
:
'1'
key
:
'1'
},
},
],
],
orderObj
:
[{
orderObj
:
[{
label
:
'升级价格'
,
label
:
'升级价格'
,
key
:
'totalPrice'
,
key
:
'totalPrice'
,
unit
:
'¥'
unit
:
'¥'
},
},
{
{
label
:
'支付时间'
,
label
:
'支付时间'
,
key
:
'successDate'
key
:
'successDate'
}
}
],
],
status
:
{
status
:
{
1
:
'待跟进'
,
1
:
'待跟进'
,
...
@@ -49,7 +50,10 @@ Component({
...
@@ -49,7 +50,10 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
jump
()
{
async
jump
()
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
const
{
const
{
data
data
}
=
this
.
data
}
=
this
.
data
...
...
packageEquity/pages/index/index.js
View file @
5d127de
// packageCrowdFunding/pages/homePage/index/index.js
// packageCrowdFunding/pages/homePage/index/index.js
import
{
setConfigInfo
}
from
"~/store/index"
;
import
{
setConfigInfo
}
from
"~/store/index"
;
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
import
{
getReceptionRecordList
,
getRecordDetailList
}
from
"../../receptionRecordsApi"
import
{
getReceptionRecordList
,
getRecordDetailList
}
from
"../../receptionRecordsApi"
function
throttle
(
func
,
delay
)
{
function
throttle
(
func
,
delay
)
{
let
timeoutId
;
let
timeoutId
;
...
@@ -914,7 +915,10 @@ Component({
...
@@ -914,7 +915,10 @@ Component({
}
}
// console.log(merchantBrand.findIndex((i) => ["鸿蒙智行"].includes(i.name)) == -1);
// console.log(merchantBrand.findIndex((i) => ["鸿蒙智行"].includes(i.name)) == -1);
// debugger
// debugger
if
(
item
.
menuText
==
'战败下单'
&&
merchantBrand
.
findIndex
((
i
)
=>
[
"鸿蒙智行"
].
includes
(
i
.
name
))
==
-
1
)
{
if
(
item
.
menuText
==
'战败下单'
&&
merchantBrand
.
findIndex
((
i
)
=>
[
"鸿蒙智行"
].
includes
(
i
.
name
))
==
-
1
)
{
// 校验是否填写昨日日报
this
.
checkDaily
()
item
.
path
=
'packageEquity.createDeafeatOrder'
item
.
path
=
'packageEquity.createDeafeatOrder'
}
}
return
wx
.
$router
.
go
(
item
.
path
,
{
return
wx
.
$router
.
go
(
item
.
path
,
{
...
@@ -930,6 +934,7 @@ Component({
...
@@ -930,6 +934,7 @@ Component({
tabIndex
:
0
,
tabIndex
:
0
,
});
});
}
}
this
.
checkDaily
()
// 校验是否填写昨日日报
if
(
if
(
merchantBrand
.
findIndex
((
i
)
=>
[
"鸿蒙智行"
].
includes
(
i
.
name
))
!=
-
1
merchantBrand
.
findIndex
((
i
)
=>
[
"鸿蒙智行"
].
includes
(
i
.
name
))
!=
-
1
)
{
)
{
...
@@ -942,7 +947,13 @@ Component({
...
@@ -942,7 +947,13 @@ Component({
);
);
}
}
}
}
},
2000
),
// Set the desired delay (in milliseconds)
},
2000
),
async
checkDaily
()
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
true
;
},
// Set the desired delay (in milliseconds)
// navGo(e) {
// navGo(e) {
// // this.throttle()
// // this.throttle()
// let {
// let {
...
...
pages/tabWorkOrder/pages/index/index.js
View file @
5d127de
...
@@ -4,9 +4,10 @@ import order_mixins from "../order_mixins.js";
...
@@ -4,9 +4,10 @@ import order_mixins from "../order_mixins.js";
const
IMG_URL
=
const
IMG_URL
=
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
let
timeoutId
;
let
timeoutId
;
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
IMG_URL
,
IMG_URL
,
...
@@ -120,11 +121,12 @@ Page({
...
@@ -120,11 +121,12 @@ Page({
});
});
wx
.
hideTabBar
();
wx
.
hideTabBar
();
},
},
jump
(
e
)
{
async
jump
(
e
)
{
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 ,9 已撤销 , 10 已关闭 , 11 已失效
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 ,9 已撤销 , 10 已关闭 , 11 已失效
// constructionFlag 施工标识(Y:已施工;N||null:未施工)
// constructionFlag 施工标识(Y:已施工;N||null:未施工)
// failureFlag 订单失效状态(Y:已失效,N:未失效)
// failureFlag 订单失效状态(Y:已失效,N:未失效)
// console.log(e.currentTarget.dataset)
// console.log(e.currentTarget.dataset)
// return
// return
let
{
item
,
name
}
=
e
.
currentTarget
.
dataset
;
let
{
item
,
name
}
=
e
.
currentTarget
.
dataset
;
// console.log(item, name)
// console.log(item, name)
...
@@ -139,6 +141,9 @@ Page({
...
@@ -139,6 +141,9 @@ Page({
// if (name == 'createOrder' || name == 'premiumUpgrade') {
// if (name == 'createOrder' || name == 'premiumUpgrade') {
if
(
name
==
"createOrder"
||
name
==
"premiumUpgrade"
)
{
if
(
name
==
"createOrder"
||
name
==
"premiumUpgrade"
)
{
if
(
userInfo
.
merchantType
&&
!
userInfo
.
isSuper
&&
isMake
)
{
if
(
userInfo
.
merchantType
&&
!
userInfo
.
isSuper
&&
isMake
)
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
// 是微信支付直接跳转确认页面
// 是微信支付直接跳转确认页面
if
(
userType
==
2
&&
item
?.
selectPayType
==
1
)
{
if
(
userType
==
2
&&
item
?.
selectPayType
==
1
)
{
wx
.
$router
.
go
(
"tabWorkOrder.confirmOrder"
,
item
);
wx
.
$router
.
go
(
"tabWorkOrder.confirmOrder"
,
item
);
...
@@ -157,7 +162,10 @@ Page({
...
@@ -157,7 +162,10 @@ Page({
wx
.
$router
.
go
(
"tabWorkOrder."
+
name
,
item
);
wx
.
$router
.
go
(
"tabWorkOrder."
+
name
,
item
);
}
}
},
},
scan
()
{
async
scan
()
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
wx
.
scanCode
({
wx
.
scanCode
({
success
(
res
)
{
success
(
res
)
{
let
{
result
}
=
res
;
let
{
result
}
=
res
;
...
...
store/ModalToQueueControl.js
View file @
5d127de
let
modalQueue
=
[];
let
modalQueue
=
[];
import
api
from
"~/api/api.js"
;
import
api
from
"~/api/api.js"
;
let
eventRequest
=
[];
let
eventRequest
=
[];
const
checkDailyReport
=
async
()
=>
{
const
checkDailyReport
=
async
(
sceneType
)
=>
{
let
userInfo
=
wx
.
$util
.
getUserInfo
();
let
userInfo
=
wx
.
$util
.
getUserInfo
();
// 判读是否要填写日报
// 判读是否要填写日报
if
(
!
(
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
))
if
(
!
(
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
))
{
eventRequest
.
push
(
staffDailyReport
(
userInfo
));
eventRequest
.
push
(
sceneType
?
equityStaffDailyReport
(
userInfo
)
:
staffDailyReport
(
userInfo
)
);
}
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
Promise
.
all
(
eventRequest
).
then
((
results
)
=>
{
Promise
.
all
(
eventRequest
).
then
((
results
)
=>
{
...
@@ -86,7 +89,57 @@ const staffDailyReport = (userInfo) => {
...
@@ -86,7 +89,57 @@ const staffDailyReport = (userInfo) => {
});
});
});
});
};
};
const
equityStaffDailyReport
=
(
userInfo
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
api
.
staffDailyReportMerchantValid
({
merchantId
:
userInfo
?.
shopMerchantId
,
yqMerchantId
:
userInfo
?.
merchantId
,
staffUuid
:
userInfo
?.
uuid
,
sceneType
:
0
,
})
.
then
((
res
)
=>
{
if
(
res
.
data
)
{
// 获取当前日期
let
currentDate
=
new
Date
();
// 获取上一天的日期
let
previousDate
=
new
Date
(
currentDate
);
previousDate
.
setDate
(
currentDate
.
getDate
()
-
1
);
console
.
log
(
previousDate
,
"previousDate"
);
// toISOString 方法会丢失时区 导致与北京时间差八小时
let
hour
=
previousDate
.
getHours
()
+
8
;
previousDate
.
setHours
(
hour
);
// 格式化日期为"yyyy-mm-dd"
let
formattedDate
=
previousDate
.
toISOString
().
split
(
"T"
)[
0
];
console
.
log
(
"formattedDate"
,
formattedDate
);
if
(
wx
.
__HAS_NOTLOGIN_MODAL
||
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
)
return
false
;
addModalToQueue
(
"日报提醒"
,
"您有未填写的日报,请点击前往。"
,
"前往填写"
,
false
,
4
,
(
res
)
=>
{
if
(
res
.
confirm
)
{
wx
.
$router
.
go
(
"tabWorkOrder.staffDaily"
,
{
reportDate
:
formattedDate
,
});
}
}
);
}
resolve
();
})
.
catch
((
err
)
=>
{
resolve
();
});
});
};
const
addModalToQueue
=
(
const
addModalToQueue
=
(
title
,
title
,
content
,
content
,
...
...
store/index.js
View file @
5d127de
...
@@ -315,15 +315,19 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
...
@@ -315,15 +315,19 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
delete
options
.
scene
delete
options
.
scene
let
all
=
{
merchantName
:
'全部'
}
let
all
=
{
merchantName
:
'全部'
}
let
event
=
noScene
||
!
isSupervision
?
'getSceneMerchantRefStoreList'
:
'getCurShopList'
let
event
=
noScene
||
!
isSupervision
?
'getSceneMerchantRefStoreList'
:
'getCurShopList'
console
.
log
(
event
,
isSupervision
,
'get4SStoreList'
);
//
console.log(event, isSupervision, 'get4SStoreList');
// let event = 'getSceneMerchantRefStoreList'
// let event = 'getSceneMerchantRefStoreList'
api
[
event
](
options
)
api
[
event
](
options
)
.
then
(
res
=>
{
.
then
(
res
=>
{
wx
.
$util
.
hideLoading
()
wx
.
$util
.
hideLoading
()
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
let
resolveData
=
data
||
[]
// debugger
if
(
isSupervision
)
resolveData
=
[
all
,
...
data
]
console
.
log
(
data
);
// getCurShopList 接口数据结构不一致,要修改
let
resolveData
=
(
event
==
'getCurShopList'
?
data
?.
list
:
data
)
||
[]
if
(
isSupervision
)
resolveData
=
[
all
,
...
resolveData
]
console
.
log
(
resolveData
,
'resolveData'
);
resolve
(
resolveData
)
resolve
(
resolveData
)
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
...
...
tabDate/pages/detail/detail.js
View file @
5d127de
import
api
from
'../../api'
import
api
from
'../../api'
// tabDate/pages/detail/detail.js
// tabDate/pages/detail/detail.js
import
CONSTANTDATA
from
'../userPortrait/constant/data'
import
CONSTANTDATA
from
'../userPortrait/constant/data'
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
const
app
=
getApp
()
const
app
=
getApp
()
Page
({
Page
({
/**
/**
...
@@ -352,7 +353,10 @@ Page({
...
@@ -352,7 +353,10 @@ Page({
}
}
},
},
// 去下单
// 去下单
orderSubmit
()
{
async
orderSubmit
()
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
let
{
let
{
detail
detail
}
=
this
.
data
}
=
this
.
data
...
...
tabIndex/pages/index/index.js
View file @
5d127de
...
@@ -8,6 +8,7 @@ import {
...
@@ -8,6 +8,7 @@ import {
getBusinessSchoolScene
,
getBusinessSchoolScene
,
}
from
"~/store/index"
;
}
from
"~/store/index"
;
import
{
env
}
from
"~/config"
;
import
{
env
}
from
"~/config"
;
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
const
IMG_URL
=
const
IMG_URL
=
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
const
app
=
getApp
();
const
app
=
getApp
();
...
@@ -143,7 +144,7 @@ Page({
...
@@ -143,7 +144,7 @@ Page({
"确定"
,
"确定"
,
false
,
false
,
1
,
1
,
()
=>
{}
()
=>
{
}
);
);
}
}
wx
.
$storage
.
set
(
"dateStaffPop"
,
{
wx
.
$storage
.
set
(
"dateStaffPop"
,
{
...
@@ -220,7 +221,10 @@ Page({
...
@@ -220,7 +221,10 @@ Page({
showOrderpop
:
false
,
showOrderpop
:
false
,
});
});
},
},
navigator
(
e
)
{
async
navigator
(
e
)
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
let
{
outTradeNo
}
=
e
.
detail
;
let
{
outTradeNo
}
=
e
.
detail
;
this
.
closeSwitchPopup
();
this
.
closeSwitchPopup
();
wx
.
$storage
.
set
(
"outTradeNo"
,
outTradeNo
);
wx
.
$storage
.
set
(
"outTradeNo"
,
outTradeNo
);
...
@@ -360,7 +364,7 @@ Page({
...
@@ -360,7 +364,7 @@ Page({
merchantRange
,
merchantRange
,
});
});
})
})
.
catch
((
err
)
=>
{});
.
catch
((
err
)
=>
{
});
},
},
changePicker
(
e
,
value
)
{
changePicker
(
e
,
value
)
{
let
{
merchantId
}
=
e
;
let
{
merchantId
}
=
e
;
...
@@ -396,7 +400,7 @@ Page({
...
@@ -396,7 +400,7 @@ Page({
item
.
url
&&
wx
.
$router
.
go
(
item
.
url
);
item
.
url
&&
wx
.
$router
.
go
(
item
.
url
);
}
}
},
},
jump
(
e
)
{
async
jump
(
e
)
{
let
{
item
,
type
}
=
e
.
currentTarget
.
dataset
;
let
{
item
,
type
}
=
e
.
currentTarget
.
dataset
;
let
{
userInfo
,
taskId
}
=
this
.
data
;
let
{
userInfo
,
taskId
}
=
this
.
data
;
// 工资绩效
// 工资绩效
...
@@ -446,6 +450,9 @@ Page({
...
@@ -446,6 +450,9 @@ Page({
if
(
userInfo
?.
merchantType
&&
!
userInfo
.
isSuper
&&
type
==
2
)
{
if
(
userInfo
?.
merchantType
&&
!
userInfo
.
isSuper
&&
type
==
2
)
{
wx
.
$util
.
pointRecord
(
item
.
recordId
);
wx
.
$util
.
pointRecord
(
item
.
recordId
);
if
(
item
.
type
==
"scanCode"
)
{
if
(
item
.
type
==
"scanCode"
)
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
wx
.
scanCode
({
wx
.
scanCode
({
success
(
res
)
{
success
(
res
)
{
let
{
result
}
=
res
;
let
{
result
}
=
res
;
...
@@ -465,6 +472,9 @@ Page({
...
@@ -465,6 +472,9 @@ Page({
});
});
}
else
{
}
else
{
console
.
log
(
item
);
console
.
log
(
item
);
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
wx
.
$router
.
go
(
item
.
url
);
wx
.
$router
.
go
(
item
.
url
);
}
}
}
else
{
}
else
{
...
@@ -611,7 +621,7 @@ Page({
...
@@ -611,7 +621,7 @@ Page({
});
});
}
}
})
})
.
catch
((
err
)
=>
{});
.
catch
((
err
)
=>
{
});
},
},
getMerchantCouponList
()
{
getMerchantCouponList
()
{
...
@@ -736,7 +746,7 @@ Page({
...
@@ -736,7 +746,7 @@ Page({
});
});
}
}
})
})
.
catch
((
err
)
=>
{});
.
catch
((
err
)
=>
{
});
},
},
getUserStat
(
userInfo
)
{
getUserStat
(
userInfo
)
{
api
api
...
@@ -766,7 +776,7 @@ Page({
...
@@ -766,7 +776,7 @@ Page({
});
});
}
}
})
})
.
catch
((
err
)
=>
{});
.
catch
((
err
)
=>
{
});
},
},
totalListSet
()
{
totalListSet
()
{
let
{
userInfo
}
=
this
.
data
;
let
{
userInfo
}
=
this
.
data
;
...
@@ -1035,7 +1045,7 @@ Page({
...
@@ -1035,7 +1045,7 @@ Page({
.
setTaskDialog
({
.
setTaskDialog
({
id
:
data
[
0
]?.
id
,
id
:
data
[
0
]?.
id
,
})
})
.
then
(()
=>
{});
.
then
(()
=>
{
});
}
}
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
);
wx
.
$util
.
showToast
(
message
);
...
@@ -1172,10 +1182,10 @@ Page({
...
@@ -1172,10 +1182,10 @@ Page({
?
"tabDate.detail"
?
"tabDate.detail"
:
options
.
status
==
3
||
:
options
.
status
==
3
||
(
options
.
status
==
1
&&
options
.
selectPayType
==
1
)
(
options
.
status
==
1
&&
options
.
selectPayType
==
1
)
?
"tabWorkOrder.confirmOrder"
?
"tabWorkOrder.confirmOrder"
:
options
.
constructionFlag
==
"Y"
&&
options
.
status
!=
10
:
options
.
constructionFlag
==
"Y"
&&
options
.
status
!=
10
?
"tabWorkOrder.constructionOrderDetail"
?
"tabWorkOrder.constructionOrderDetail"
:
"tabWorkOrder.orderDetail"
;
:
"tabWorkOrder.orderDetail"
;
wx
.
$router
.
go
(
wx
.
$router
.
go
(
`
${
pageName
}
?id=
${
options
?.
pageParams
?.
id
}
&
orderCode
=
$
{
options
?.
pageParams
?.
orderCode
}
`,
`
${
pageName
}
?id=
${
options
?.
pageParams
?.
id
}
&
orderCode
=
$
{
options
?.
pageParams
?.
orderCode
}
`,
{
{
...
@@ -1285,14 +1295,14 @@ Page({
...
@@ -1285,14 +1295,14 @@ Page({
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh: function () {},
onPullDownRefresh: function () {
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom: function () {},
onReachBottom: function () {
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage: function () {},
onShareAppMessage: function () {
},
});
});
tabWorkOrder/api.js
View file @
5d127de
// const api = wx.$request
// const api = wx.$request
import
api
from
'~/utils/request/request.js'
import
api
from
"~/utils/request/request.js"
;
// const api = wx.$request
// const api = wx.$request
module
.
exports
=
{
module
.
exports
=
{
/**根据商户号获取可选套餐商品列表 */
/**根据商户号获取可选套餐商品列表 */
getGoodsList
(
data
)
{
getGoodsList
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.MerchantPackageGoods.list'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.MerchantPackageGoods.list"
,
data
);
},
},
/** 工单列表 */
/** 工单列表 */
getWorkList
(
data
)
{
getWorkList
(
data
)
{
let
params
=
data
||
{}
let
params
=
data
||
{}
;
params
.
sceneType
=
1
params
.
sceneType
=
1
;
return
api
.
post
(
'dj.api.smartcarlife.order.search'
,
{
return
api
.
post
(
"dj.api.smartcarlife.order.search"
,
{
pageSize
:
10
,
pageSize
:
10
,
...
params
...
params
,
})
})
;
},
},
/** 提交施工订单 */
/** 提交施工订单 */
confirmConstruction
(
data
)
{
confirmConstruction
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.confirmConstruction'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.confirmConstruction"
,
data
);
},
},
/**撤销工单 */
/**撤销工单 */
revokeOrder
(
data
)
{
revokeOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.revoke'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.revoke"
,
data
);
},
},
/** 根据订单号获取订单详情 */
/** 根据订单号获取订单详情 */
getOrderDetail
(
data
)
{
getOrderDetail
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.detail'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.detail"
,
data
);
},
},
/**二维码 */
/**二维码 */
createWeappQrcode
(
data
)
{
createWeappQrcode
(
data
)
{
// dj.api.smartcarlife.serviceMerchant.getByMerchantId
// dj.api.smartcarlife.serviceMerchant.getByMerchantId
return
api
.
post
(
'dj.api.smartcarlife.common.createWeappQrcode'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.common.createWeappQrcode"
,
data
);
},
},
/**商品列表 */
/**商品列表 */
getOrderBaseGoodsList
(
data
)
{
getOrderBaseGoodsList
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.orderUpgradeGoods.listByMerchantId'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.orderUpgradeGoods.listByMerchantId"
,
data
);
},
},
/** 选择支付方式下单 */
/** 选择支付方式下单 */
createWithPay
(
data
)
{
createWithPay
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.createWithPay'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.createWithPay"
,
data
);
},
},
/**根据手机号查询客户信息 */
/**根据手机号查询客户信息 */
checkCustomerPhone
(
data
)
{
checkCustomerPhone
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.customer.queryByPhone'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.customer.queryByPhone"
,
data
);
},
},
/**改变支付订单状态 */
/**改变支付订单状态 */
createPayOrder
(
data
)
{
createPayOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.payOrder.create'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.payOrder.create"
,
data
);
},
},
/** */
/** */
installOnly
(
data
)
{
installOnly
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.installOnly'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.installOnly"
,
data
);
},
},
/**获取精品礼券 */
/**获取精品礼券 */
getCouponDeatil
(
data
)
{
getCouponDeatil
(
data
)
{
return
api
.
post
(
'dj.api.smartCarLife.customer.coupon.detail'
,
data
)
return
api
.
post
(
"dj.api.smartCarLife.customer.coupon.detail"
,
data
);
},
},
/** 根据订单号获取种草信息*/
/** 根据订单号获取种草信息*/
getGrassDetail
(
data
)
{
getGrassDetail
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.orderShareRecord.detail'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.orderShareRecord.detail"
,
data
);
},
},
// 获取园区店配置
// 获取园区店配置
getYqStoreConfig
(
data
)
{
getYqStoreConfig
(
data
)
{
return
api
.
get
(
'dj.api.smarcarlife.yqMerchantConfig.detail'
,
data
)
return
api
.
get
(
"dj.api.smarcarlife.yqMerchantConfig.detail"
,
data
);
},
},
/** 修改工单时间 */
/** 修改工单时间 */
updateOrderTime
(
data
)
{
updateOrderTime
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.updateOrderTime'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.updateOrderTime"
,
data
);
},
},
/** 修改客户信息 */
/** 修改客户信息 */
updateOrderInfo
(
data
)
{
updateOrderInfo
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.updateOrderInfo'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.updateOrderInfo"
,
data
);
},
},
/** 根据订单状态统计订单数*/
/** 根据订单状态统计订单数*/
statByStatus
(
data
)
{
statByStatus
(
data
)
{
data
=
data
||
{}
data
=
data
||
{}
;
data
.
sceneType
=
1
data
.
sceneType
=
1
;
return
api
.
post
(
'dj.api.smartcarlife.order.statByStatus'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.statByStatus"
,
data
);
},
},
/** 获取企微活码 */
/** 获取企微活码 */
getWorkWechatLiveQRCode
(
data
)
{
getWorkWechatLiveQRCode
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.getWorkWechatLiveQRCode'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.getWorkWechatLiveQRCode"
,
data
);
},
},
/** 订单补录 */
/** 订单补录 */
supplementOrder
(
data
)
{
supplementOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.supplementOrder'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.supplementOrder"
,
data
);
},
},
/** 订单修正 */
/** 订单修正 */
correctionOrder
(
data
)
{
correctionOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.correctionOrder'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.correctionOrder"
,
data
);
},
},
/** 战败订单批量补录 */
/** 战败订单批量补录 */
notUpgradeOrder
(
data
)
{
notUpgradeOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.notUpgrade.batchInsert'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.notUpgrade.batchInsert"
,
data
);
},
},
/** 批量新建预录工单 */
/** 批量新建预录工单 */
createPrerecordedOrderBatch
(
data
)
{
createPrerecordedOrderBatch
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.preliminaryOrder.batch'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.preliminaryOrder.batch"
,
data
);
},
},
/** 新建预录工单 */
/** 新建预录工单 */
createPrerecordedOrder
(
data
)
{
createPrerecordedOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.preliminaryOrder'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.preliminaryOrder"
,
data
);
},
},
/** 升级商品生成条形码 */
/** 升级商品生成条形码 */
createBarCode
(
data
)
{
createBarCode
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.common.createBarCode'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.common.createBarCode"
,
data
);
},
},
/** 获取商户基本信息 */
/** 获取商户基本信息 */
getServiceBaseInfo
(
data
)
{
getServiceBaseInfo
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo"
,
data
);
},
},
/** 根据id查询待补录订单 */
/** 根据id查询待补录订单 */
waitinputorderSelectById
(
data
)
{
waitinputorderSelectById
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.weapp.waitinputorder.selectById'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.weapp.waitinputorder.selectById"
,
data
);
},
},
/** 客户确认签名 */
/** 客户确认签名 */
customerConfirmationSignature
(
data
)
{
customerConfirmationSignature
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.customerConfirmationSignature'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.customerConfirmationSignature"
,
data
);
},
},
/** 查询园区店是否开启签名配置 */
/** 查询园区店是否开启签名配置 */
getSignatureSwitch
(
data
)
{
getSignatureSwitch
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.serviceMerchant.getSignatureSwitch'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.serviceMerchant.getSignatureSwitch"
,
data
);
},
},
/** 根据客户优惠券id查询订单 */
/** 根据客户优惠券id查询订单 */
getOrderByCustomerCouponId
(
data
)
{
getOrderByCustomerCouponId
(
data
)
{
// return api.post('dj.api.smartcarlife.order.getOrderByCustomerCouponId ', data)
// return api.post('dj.api.smartcarlife.order.getOrderByCustomerCouponId ', data)
return
api
.
get
(
'dj.api.smartcarlife.order.getOrderByCustomerCouponId'
,
data
)
return
api
.
get
(
"dj.api.smartcarlife.order.getOrderByCustomerCouponId"
,
data
);
},
},
/** 获取园区店配置技师数据 */
/** 获取园区店配置技师数据 */
getQYTechnicianList
(
data
)
{
getQYTechnicianList
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.technician.list'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.technician.list"
,
data
);
},
},
/** 根据手机号查询客户建档待跟进订单信息 */
/** 根据手机号查询客户建档待跟进订单信息 */
getQueryCouponInfoByPhone
(
data
)
{
getQueryCouponInfoByPhone
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.customer.queryCouponInfoByPhone'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.customer.queryCouponInfoByPhone"
,
data
);
},
},
/** 根据订单更新技师信息 */
/** 根据订单更新技师信息 */
updateTechnicianInfo
(
data
)
{
updateTechnicianInfo
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.updateTechnicianInfo'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.updateTechnicianInfo"
,
data
);
},
},
/** 根据订单商品获取膜卷号 */
/** 根据订单商品获取膜卷号 */
getfilmRollNoByGoods
(
data
)
{
getfilmRollNoByGoods
(
data
)
{
return
api
.
post
(
'dj.api.smarcarlife.stock.filmroll.list'
,
data
)
return
api
.
post
(
"dj.api.smarcarlife.stock.filmroll.list"
,
data
);
},
},
/** 子订单设置膜卷号 */
/** 子订单设置膜卷号 */
setfilmRollNo
(
data
)
{
setfilmRollNo
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.updateFilmRoll'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.order.updateFilmRoll"
,
data
);
},
},
/** 保存员工日报(员工、管理员操作)*/
/** 保存员工日报(员工、管理员操作)*/
staffDailyReportSave
(
data
)
{
staffDailyReportSave
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.staff.daily.report.save'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.staff.daily.report.save"
,
data
);
},
},
/** 员工日报详情 */
/** 员工日报详情 */
staffDailyReportDetail
(
data
)
{
staffDailyReportDetail
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.staff.daily.report.detail'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.staff.daily.report.detail"
,
data
);
},
},
/** 查询当周员工日报是否填写列表 */
/** 查询当周员工日报是否填写列表 */
staffDailyReportDetailWeeklyList
(
data
)
{
staffDailyReportDetailWeeklyList
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.staff.daily.report.weekly.list'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.staff.daily.report.weekly.list"
,
data
);
},
},
/** 批复员工日报 */
/** 批复员工日报 */
staffDailyReportApprove
(
data
)
{
staffDailyReportApprove
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.staff.daily.report.approve'
,
data
)
return
api
.
post
(
"dj.api.smartcarlife.staff.daily.report.approve"
,
data
);
},
},
/** 4s店查询对应的园区店 */
/** 4s店查询对应的园区店 */
querySceneRefByShop
(
data
)
{
querySceneRefByShop
(
data
)
{
return
api
.
post
(
'dj.api.scenemerchantref.querySceneRefByShop'
,
data
)
return
api
.
post
(
"dj.api.scenemerchantref.querySceneRefByShop"
,
data
);
},
},
/** 查询该店员工日报是否开启 */
/** 查询该店员工日报是否开启 */
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
);
},
},
}
\ No newline at end of file
\ No newline at end of file
/** 无需补录订单 */
noNeedSupplementOrder
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.order.noNeedSupplementOrder"
,
data
);
},
};
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
View file @
5d127de
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
api
from
"../../api.js"
;
import
api
from
"../../api.js"
;
import
order_mixins
,
{
data
}
from
"../order_mixins.js"
;
import
order_mixins
,
{
data
}
from
"../order_mixins.js"
;
import
{
getPositionList
}
from
"~/store/index"
;
import
{
getPositionList
}
from
"~/store/index"
;
import
{
checkDailyReport
}
from
"~/store/ModalToQueueControl"
;
const
IMG_URL
=
const
IMG_URL
=
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
const
app
=
getApp
();
const
app
=
getApp
();
...
@@ -12,6 +13,7 @@ Page({
...
@@ -12,6 +13,7 @@ Page({
data
:
{
data
:
{
IMG_URL
,
IMG_URL
,
...
order_mixins
.
data
,
...
order_mixins
.
data
,
selectType
:
1
,
qrFlag
:
true
,
qrFlag
:
true
,
qrHeight
:
107
,
qrHeight
:
107
,
isYqdSuper
:
app
.
globalData
.
isYqdSuper
,
isYqdSuper
:
app
.
globalData
.
isYqdSuper
,
...
@@ -35,6 +37,7 @@ Page({
...
@@ -35,6 +37,7 @@ Page({
jumpUserPortrait
()
{
jumpUserPortrait
()
{
wx
.
$router
.
go
(
"tabDate.userPortrait"
,
this
.
data
.
orderInfo
);
wx
.
$router
.
go
(
"tabDate.userPortrait"
,
this
.
data
.
orderInfo
);
},
},
// 跳转正确订单
// 跳转正确订单
redirectOrder
()
{
redirectOrder
()
{
let
{
orderInfo
}
=
this
.
data
;
let
{
orderInfo
}
=
this
.
data
;
...
@@ -53,8 +56,8 @@ Page({
...
@@ -53,8 +56,8 @@ Page({
item
.
status
==
3
item
.
status
==
3
?
"confirmOrder"
?
"confirmOrder"
:
item
.
status
==
1
:
item
.
status
==
1
?
"createOrder"
?
"createOrder"
:
"orderDetail"
;
:
"orderDetail"
;
if
(
item
.
constructionFlag
==
"Y"
&&
item
.
status
!=
10
)
{
if
(
item
.
constructionFlag
==
"Y"
&&
item
.
status
!=
10
)
{
wx
.
$router
.
go
(
"constructionOrderDetail"
,
item
);
wx
.
$router
.
go
(
"constructionOrderDetail"
,
item
);
}
else
{
}
else
{
...
@@ -76,35 +79,67 @@ Page({
...
@@ -76,35 +79,67 @@ Page({
showTip
:
!
showTip
,
showTip
:
!
showTip
,
});
});
},
},
// 确定是否要显示
selectType
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
;
console
.
log
(
e
,
e
.
currentTarget
.
dataset
,
type
);
this
.
setData
({
selectType
:
type
,
});
},
// 确定是否要显示
targetError
()
{
targetError
()
{
wx
.
$modal
(
this
,
{
wx
.
$modal
(
this
,
{
show
:
true
,
show
:
true
,
title
:
"工单标记"
,
title
:
"工单标记"
,
tabTitleShow
:
false
,
tabTitleShow
:
false
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
// 跳转新增订单页面 并带特定参数
this
.
showErrorType
();
let
{
orderInfo
}
=
this
.
data
;
// orderInfo.orderSource = type
orderInfo
.
associateOrderCode
=
orderInfo
.
orderCode
;
delete
orderInfo
.
orderCode
;
if
(
orderInfo
.
technicianList
)
{
delete
orderInfo
.
technicianList
;
}
orderInfo
.
selectPayType
=
2
;
// filmOrder 1精品升级
// let urlName = orderInfo?.filmOrder == 1 ? 'premiumUpgrade' : 'createOrder'
let
urlName
=
"createOrder"
;
wx
.
$router
.
redirectTo
(
urlName
,
orderInfo
);
},
error
:
()
=>
{
// wx.showToast({
// icon: 'error',
// title: '取消'
// })
},
},
error
:
()
=>
{
},
});
});
},
},
// 确定是否要显示
showErrorType
()
{
wx
.
$modal
(
this
,
{
show
:
true
,
title
:
"请选择录单入口"
,
tabTitleShow
:
false
,
success
:
(
res
)
=>
{
// 跳转新增订单页面 并带特定参数
let
{
orderInfo
,
selectType
}
=
this
.
data
;
if
(
selectType
==
1
)
{
orderInfo
.
associateOrderCode
=
orderInfo
.
orderCode
;
delete
orderInfo
.
orderCode
;
if
(
orderInfo
.
technicianList
)
{
delete
orderInfo
.
technicianList
;
}
orderInfo
.
selectPayType
=
2
;
let
urlName
=
"createOrder"
;
wx
.
$router
.
redirectTo
(
urlName
,
orderInfo
);
}
else
{
// 无需补录
api
.
noNeedSupplementOrder
({
oldOrderCode
:
orderInfo
.
orderCode
})
.
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
0
)
{
wx
.
$util
.
refreshPageData
();
wx
.
$router
.
go
(
"pages.index"
);
}
else
{
wx
.
$util
.
showToast
(
res
.
message
);
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
}
},
error
:
()
=>
{
},
},
"#modal2"
);
},
// 选择技师确认
// 选择技师确认
changeArtificer
(
e
)
{
changeArtificer
(
e
)
{
...
@@ -154,7 +189,10 @@ Page({
...
@@ -154,7 +189,10 @@ Page({
wx
.
$router
.
go
(
"updateOrderInfo"
,
orderInfo
);
wx
.
$router
.
go
(
"updateOrderInfo"
,
orderInfo
);
},
},
againOrder
()
{
async
againOrder
()
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
();
if
(
staffCheck
)
return
true
;
// 新增订单
// 新增订单
this
.
keepGoing
(
4
);
this
.
keepGoing
(
4
);
},
},
...
@@ -175,6 +213,7 @@ Page({
...
@@ -175,6 +213,7 @@ Page({
});
});
},
},
onRoute
(
options
)
{
onRoute
(
options
)
{
// wx.$router.go("pages.index");
console
.
log
(
options
);
console
.
log
(
options
);
if
(
options
.
orderCode
)
{
if
(
options
.
orderCode
)
{
this
.
setData
({
this
.
setData
({
...
@@ -273,9 +312,8 @@ Page({
...
@@ -273,9 +312,8 @@ Page({
if
(
data
.
orderTime
)
if
(
data
.
orderTime
)
data
.
time
=
new
Date
(
data
.
orderTime
).
format
(
"yyyy-MM-dd hh:mm:ss"
);
data
.
time
=
new
Date
(
data
.
orderTime
).
format
(
"yyyy-MM-dd hh:mm:ss"
);
if
(
data
.
customer
&&
data
.
customer
.
carSeriesName
)
{
if
(
data
.
customer
&&
data
.
customer
.
carSeriesName
)
{
data
.
carType
=
`
${
data
.
customer
.
carBrand
||
""
}
-
${
data
.
carType
=
`
${
data
.
customer
.
carBrand
||
""
}
-
${
data
.
customer
.
carChildsBrandName
||
""
data
.
customer
.
carChildsBrandName
||
""
}
-
$
{
data
.
customer
.
carSeriesName
||
""
}
`
;
}
-
$
{
data
.
customer
.
carSeriesName
||
""
}
`
;
}
}
// 处理订单是否显示 操作按钮 支付方式为pos和微信 并且订单状态是 4和6
// 处理订单是否显示 操作按钮 支付方式为pos和微信 并且订单状态是 4和6
// data.failureFlag != 'Y'
// data.failureFlag != 'Y'
...
@@ -395,7 +433,7 @@ Page({
...
@@ -395,7 +433,7 @@ Page({
warrantyCardList
,
warrantyCardList
,
});
});
})
})
.
catch
((
err
)
=>
{});
.
catch
((
err
)
=>
{
});
},
500
*
index
);
},
500
*
index
);
});
});
},
},
...
@@ -563,7 +601,7 @@ Page({
...
@@ -563,7 +601,7 @@ Page({
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{},
onReady
:
function
()
{
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
...
@@ -576,20 +614,20 @@ Page({
...
@@ -576,20 +614,20 @@ Page({
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
:
function
()
{},
onHide
:
function
()
{
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
:
function
()
{},
onUnload
:
function
()
{
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{},
onPullDownRefresh
:
function
()
{
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{},
onReachBottom
:
function
()
{
},
});
});
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.
wx
ss
→
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.
sa
ss
View file @
5d127de
...
@@ -632,7 +632,7 @@ page {
...
@@ -632,7 +632,7 @@ page {
align-items
:
center
;
align-items
:
center
;
}
}
.customer .updateInfo.isHide{
.customer
.updateInfo.isHide
{
display
:
none
;
display
:
none
;
}
}
...
@@ -756,4 +756,37 @@ page {
...
@@ -756,4 +756,37 @@ page {
.modal
.color
{
.modal
.color
{
color
:
#F24724
;
color
:
#F24724
;
}
.modal
{
.icon
{
width
:
96rpx
;
height
:
96rpx
;
margin-right
:
30rpx
;
}
.modalbox
{
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
width
:
522rpx
;
height
:
136rpx
;
background
:
#F7F8FA
;
border-radius
:
8rpx
;
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#292D33
;
padding-left
:
24rpx
;
&
+
.modalbox
{
margin-top
:
16rpx
;
}
}
.act
{
background
:
#347bff
1a
;
border
:
2rpx
solid
#347BFF
;
color
:
#3582EE
;
}
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxml
View file @
5d127de
This diff is collapsed.
Click to expand it.
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