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