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 88914b9f
authored
Feb 23, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 第一轮bug修复
1 parent
b211790c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
237 additions
and
54 deletions
components/SideSelectPopup/SideSelectPopup.js
config.js
packageEquity/api.js
packageEquity/pages/TabBar/equityPage.js
packageEquity/pages/index/index.js
packageEquity/pages/index/index.wxml
pages/merchantList/merchantList.js
store/index.js
tabIndex/pages/index/index.js
tabWorkOrder/pages/staffDaily/components/storePicker/storePicker.js
tabWorkOrder/pages/staffDaily/staffDaily.js
tabWorkOrder/pages/staffDaily/staffDaily.sass
tabWorkOrder/pages/staffDaily/staffDaily.wxml
utils/timeFormat/time-utils.js
utils/util.js
components/SideSelectPopup/SideSelectPopup.js
View file @
88914b9
...
@@ -78,9 +78,9 @@ Component({
...
@@ -78,9 +78,9 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
closeMenu
(){
closeMenu
()
{
this
.
setData
({
this
.
setData
({
show
:
false
show
:
false
})
})
},
},
// 查询条件类型切换
// 查询条件类型切换
...
@@ -223,10 +223,10 @@ Component({
...
@@ -223,10 +223,10 @@ Component({
}
}
},
},
showTabBar
()
{
showTabBar
()
{
if
(
this
.
data
.
hasTabBar
)
wx
.
showTabBar
({
animation
:
true
})
if
(
this
.
data
.
hasTabBar
)
wx
.
showTabBar
({
animation
:
true
})
},
},
hideTabBar
()
{
hideTabBar
()
{
if
(
this
.
data
.
hasTabBar
)
wx
.
hideTabBar
({
animation
:
true
})
if
(
this
.
data
.
hasTabBar
)
wx
.
hideTabBar
({
animation
:
true
})
},
},
selectStore
(
e
)
{
selectStore
(
e
)
{
const
thisPage
=
wx
.
$router
.
getPageInstance
()
const
thisPage
=
wx
.
$router
.
getPageInstance
()
...
@@ -271,8 +271,9 @@ Component({
...
@@ -271,8 +271,9 @@ Component({
.
then
(
res
=>
{
.
then
(
res
=>
{
let
{
data
,
message
}
=
res
let
{
data
,
message
}
=
res
if
(
data
)
{
if
(
data
)
{
wx
.
$util
.
setUserInfo
({...
wx
.
$util
.
getUserInfo
(),
subLoginUser
:
data
.
subLoginUser
})
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
subLoginUser
:
data
.
subLoginUser
})
wx
.
$util
.
hideLoading
()
wx
.
$util
.
hideLoading
()
wx
.
$storage
.
rm
(
'dateStaffPop'
)
this
.
eventCallback
(
item
,
userInfo
?.
sceneType
)
this
.
eventCallback
(
item
,
userInfo
?.
sceneType
)
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
...
@@ -295,7 +296,7 @@ Component({
...
@@ -295,7 +296,7 @@ Component({
}
}
let
obj
=
{}
let
obj
=
{}
if
(
isSuper
)
{
if
(
isSuper
)
{
switch
(
sceneType
)
{
switch
(
sceneType
)
{
case
0
:
case
0
:
obj
=
{
obj
=
{
...
userInfo
,
...
userInfo
,
...
@@ -378,7 +379,7 @@ Component({
...
@@ -378,7 +379,7 @@ Component({
// 跳转到工单详情/预约详情
// 跳转到工单详情/预约详情
goPage
(
item
)
{
goPage
(
item
)
{
// status 1待跟进(有inviteRecordId跳转预约详情 微信支付跳转工单确认页面)3待支付(跳转工单确认页面)constructionFlag(已施工页面)
// status 1待跟进(有inviteRecordId跳转预约详情 微信支付跳转工单确认页面)3待支付(跳转工单确认页面)constructionFlag(已施工页面)
let
pageName
=
(
item
.
status
==
1
&&
item
?.
inviteRecordId
)
?
'tabDate.detail'
:
(
item
.
status
==
3
||
(
item
.
status
==
1
&&
item
.
selectPayType
==
1
))?
'tabWorkOrder.confirmOrder'
:
item
.
constructionFlag
==
'Y'
&&
item
.
status
!=
10
?
'tabWorkOrder.constructionOrderDetail'
:
'tabWorkOrder.orderDetail'
let
pageName
=
(
item
.
status
==
1
&&
item
?.
inviteRecordId
)
?
'tabDate.detail'
:
(
item
.
status
==
3
||
(
item
.
status
==
1
&&
item
.
selectPayType
==
1
))
?
'tabWorkOrder.confirmOrder'
:
item
.
constructionFlag
==
'Y'
&&
item
.
status
!=
10
?
'tabWorkOrder.constructionOrderDetail'
:
'tabWorkOrder.orderDetail'
wx
.
$router
.
go
(
`
${
pageName
}
?id=
${
item
?.
inviteRecordId
}
&
orderCode
=
$
{
item
?.
orderCode
}
`)
wx
.
$router
.
go
(
`
${
pageName
}
?id=
${
item
?.
inviteRecordId
}
&
orderCode
=
$
{
item
?.
orderCode
}
`)
}
}
}
}
...
...
config.js
View file @
88914b9
...
@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
...
@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 4预发布
* 5cdptest
* 5cdptest
*/
*/
let
index
=
0
let
index
=
2
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
...
...
packageEquity/api.js
View file @
88914b9
...
@@ -139,5 +139,9 @@ module.exports = {
...
@@ -139,5 +139,9 @@ module.exports = {
/** 获取商学院员工信息及前3月绩效信息 */
/** 获取商学院员工信息及前3月绩效信息 */
staffInfo
(
data
)
{
staffInfo
(
data
)
{
return
api
.
post
(
'dj.api.businessSchool.staff.info'
,
data
)
return
api
.
post
(
'dj.api.businessSchool.staff.info'
,
data
)
}
},
/** 查询当周员工日报是否填写列表 */
staffDailyReportDetailWeeklyList
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.staff.daily.report.weekly.list'
,
data
)
},
}
}
packageEquity/pages/TabBar/equityPage.js
View file @
88914b9
// pages/equity/index.js
// pages/equity/index.js
import
{
get4SStoreList
}
from
'~/store/index'
import
{
get4SStoreList
}
from
'~/store/index'
import
{
merchantMode
,
waitinputorder
,
quotationRecording
,
isBusinessSchoolEnableCurrentUser
}
from
'../../api'
import
{
merchantMode
,
waitinputorder
,
staffDailyReportDetailWeeklyList
,
quotationRecording
,
isBusinessSchoolEnableCurrentUser
}
from
'../../api'
import
{
getBusinessSchoolScene
}
from
'~/store/index'
import
{
getBusinessSchoolScene
}
from
'~/store/index'
const
app
=
getApp
()
const
app
=
getApp
()
let
time
=
null
let
time
=
null
var
util
=
require
(
'~/utils/timeFormat/time-utils.js'
)
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
...
@@ -75,6 +76,102 @@ Page({
...
@@ -75,6 +76,102 @@ Page({
tipsProps
:
false
tipsProps
:
false
})
})
},
},
staffDailyReport
(
userInfo
)
{
// let { isStaff } = this.data
// if (isStaff) {
// 获取当前日期
const
{
merchantId
,
merchantName
,
name
,
uuid
,
shopMerchantId
,
shopMerchantName
}
=
userInfo
let
timeBean
=
util
.
getWeekDayList
(
0
)
let
params
=
{
yqMerchantId
:
merchantId
,
yqMerchantName
:
merchantName
,
staffName
:
name
,
staffUuid
:
uuid
,
// shopMerchantId: shopMerchantId,
// shopMerchantName: shopMerchantName
merchantId
:
shopMerchantId
,
merchantName
:
shopMerchantName
,
...
timeBean
}
console
.
log
(
params
,
'params'
);
staffDailyReportDetailWeeklyList
(
params
).
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
console
.
log
(
data
,
'data'
)
// timeBean.weekDayList = timeBean.weekDayList.map((item, index) => {
// // item.weeklyList = data[index]
// item.hasDailyValue = data.includes(item.date)
// return item
// })
// timeBean
let
dateStaffPop
=
wx
.
$storage
.
get
(
'dateStaffPop'
)
// 判断 有没有填写日报
let
hasNeedReport
=
timeBean
.
weekDayList
.
find
((
item
,
index
)
=>
{
// item.hasDailyValue =
return
!
data
.
includes
(
item
.
date
)
&&
!
item
.
disabled
})
console
.
log
(
hasNeedReport
,
'hasNeedReport'
)
let
nowDate
=
new
Date
().
format
(
'yyyy-MM-dd'
)
let
num
=
0
if
(
dateStaffPop
?.
date
&&
nowDate
==
dateStaffPop
?.
date
)
{
num
=
dateStaffPop
?.
num
||
0
num
=
num
+
1
}
else
{
num
=
num
+
1
}
// num <= 2
if
(
hasNeedReport
)
{
// if (num <= 2) {
// wx.$util.showToast('驻店日报未填写,请及时填写')
if
(
wx
.
__HAS_NOREPORT_MODAL
)
return
false
wx
.
__HAS_NOREPORT_MODAL
=
true
wx
.
showModal
({
title
:
'日报提醒'
,
content
:
'您有未填写的日报,请点击前往。'
,
showCancel
:
true
,
cancelText
:
'取消'
,
// '取消
cancelColor
:
'#292D33'
,
confirmText
:
'前往填写'
,
confirmColor
:
'#347BFF'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
$router
.
go
(
'tabWorkOrder.staffDaily'
,
{
reportDate
:
hasNeedReport
.
date
})
}
},
complete
:
()
=>
{
// 这个延迟的目的是为了避免短时间内重复弹出
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
setTimeout
(()
=>
{
wx
.
__HAS_NOREPORT_MODAL
=
false
},
2000
)
}
})
// }
}
// let num = hasNeedReport ? dateStaffPop?.num + 1 : dateStaffPop?.num
console
.
log
(
num
)
wx
.
$storage
.
set
(
'dateStaffPop'
,
{
date
:
new
Date
().
format
(
'yyyy-MM-dd'
),
num
})
console
.
log
(
hasNeedReport
,
'hasNeedReport'
)
this
.
setData
({
// weeklyList: data
// timeBean
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
// this.setData({
// timeBean: util.getWeekDayList(this.data.selectWeek)
// })
// }
},
getMerchant4SMode
()
{
getMerchant4SMode
()
{
let
storeInfo
=
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
||
{}
let
storeInfo
=
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
||
{}
// console.log(wx.$util.getUserInfo()?.default4SStoreInfo ,'wx.$util.getUserInfo()?.default4SStoreInfo ');
// console.log(wx.$util.getUserInfo()?.default4SStoreInfo ,'wx.$util.getUserInfo()?.default4SStoreInfo ');
...
@@ -283,6 +380,9 @@ Page({
...
@@ -283,6 +380,9 @@ Page({
initList
()
{
initList
()
{
this
.
getMerchant4SMode
()
this
.
getMerchant4SMode
()
let
{
tabIndex
}
=
this
.
data
let
{
tabIndex
}
=
this
.
data
const
isStaff
=
app
.
globalData
.
isStaff
// 如果是员工 判读是否要填写日报
isStaff
&&
tabIndex
==
0
&&
this
.
staffDailyReport
(
wx
.
$util
.
getUserInfo
())
// console.log(this.selectComponent(`#page-${tabIndex}`)?.onLoad,'this.selectComponent(`#page-${tabIndex}`)?.onLoad');
// console.log(this.selectComponent(`#page-${tabIndex}`)?.onLoad,'this.selectComponent(`#page-${tabIndex}`)?.onLoad');
this
.
selectComponent
(
`#page-
${
tabIndex
}
`
)?.
onLoad
&&
this
.
selectComponent
(
`#page-
${
tabIndex
}
`
).
onLoad
()
this
.
selectComponent
(
`#page-
${
tabIndex
}
`
)?.
onLoad
&&
this
.
selectComponent
(
`#page-
${
tabIndex
}
`
).
onLoad
()
},
},
...
...
packageEquity/pages/index/index.js
View file @
88914b9
...
@@ -76,11 +76,19 @@ Component({
...
@@ -76,11 +76,19 @@ Component({
value
:
'totalSuccessOrderCount'
,
value
:
'totalSuccessOrderCount'
,
icon
:
'icon_7'
icon
:
'icon_7'
}],
}],
menuList
:
[{
menuList
:
[
{
menuText
:
'驻店日报'
,
path
:
'tabWorkOrder.staffDaily'
,
recordId
:
13
,
icon
:
'supplementary_order'
},
{
menuText
:
'新建工单'
,
menuText
:
'新建工单'
,
icon
:
'create_order'
,
icon
:
'create_order'
,
path
:
''
path
:
''
}],
},
],
loginRoleLabel
:
{
loginRoleLabel
:
{
1
:
'超管'
,
1
:
'超管'
,
2
:
'商户管理员'
,
2
:
'商户管理员'
,
...
@@ -245,7 +253,9 @@ Component({
...
@@ -245,7 +253,9 @@ Component({
if
(
item
.
menuText
==
'商学院'
)
{
if
(
item
.
menuText
==
'商学院'
)
{
return
wx
.
$router
.
go
(
'packageEquity.collegeScene'
,
{
reLaunchPath
:
'packageEquity.equityPage'
,
tabIndex
:
0
})
return
wx
.
$router
.
go
(
'packageEquity.collegeScene'
,
{
reLaunchPath
:
'packageEquity.equityPage'
,
tabIndex
:
0
})
}
}
if
(
item
.
path
)
{
return
wx
.
$router
.
go
(
item
.
path
,
{
scene
:
1
})
}
wx
.
$router
.
go
(
mode
?
'createOrderCarQuotationSimple'
:
'createOrderCarQuotation'
)
wx
.
$router
.
go
(
mode
?
'createOrderCarQuotationSimple'
:
'createOrderCarQuotation'
)
// console.log(e)
// console.log(e)
// const thisPage = wx.$router.getPageInstance()
// const thisPage = wx.$router.getPageInstance()
...
...
packageEquity/pages/index/index.wxml
View file @
88914b9
...
@@ -53,13 +53,39 @@
...
@@ -53,13 +53,39 @@
</view>
</view>
<view class="title">展业工具</view>
<view class="title">展业工具</view>
<view class="menu_box">
<view class="menu_box">
<view class="menu_item" wx:for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}">
<view class="menu_item" wx:
if="{{!userInfo.isSuper}}" wx:
for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}">
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2 && mode!=-1 && item.menuText != '商学院'}}">
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2 && mode!=-1 && item.menuText != '商学院'}}">
<view class="icon">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
</view>
<view class="text">{{item.menuText}}</view>
<view class="text">{{item.menuText}}</view>
</block>
</block>
<block wx:if="{{userInfo.isSuper && item.menuText == '驻店日报'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
</block>
<block wx:if="{{item.menuText == '商学院'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
</block>
</view>
<view class="menu_item" wx:if="{{userInfo.isSuper}}" wx:for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}">
<!-- <block wx:if="{{!userInfo.isSuper && userInfo.userType == 2 && mode!=-1 && item.menuText != '商学院'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
</block> -->
<block wx:if="{{ item.menuText == '驻店日报'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
</block>
<block wx:if="{{item.menuText == '商学院'}}">
<block wx:if="{{item.menuText == '商学院'}}">
<view class="icon">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
...
...
pages/merchantList/merchantList.js
View file @
88914b9
...
@@ -78,9 +78,9 @@ Page({
...
@@ -78,9 +78,9 @@ Page({
if
(
userInfo
?.
isSuper
)
return
if
(
userInfo
?.
isSuper
)
return
wx
.
$util
.
showLoading
()
wx
.
$util
.
showLoading
()
// 获取4s店关联场景数据
// 获取4s店关联场景数据
getShopSceneConfig
({
yqMerchantId
:
userInfo
?.
subLoginUser
?.
merchantId
,
merchantId
:
userInfo
?.
shopMerchantId
}).
then
(
result
=>
{
getShopSceneConfig
({
yqMerchantId
:
userInfo
?.
subLoginUser
?.
merchantId
,
merchantId
:
userInfo
?.
shopMerchantId
}).
then
(
result
=>
{
wx
.
$util
.
hideLoading
()
wx
.
$util
.
hideLoading
()
this
.
setData
({
openSceneArr
:
result
.
map
(
val
=>
{
if
(
val
.
sceneOpenFlag
==
0
)
return
val
.
scene
})
||
[]
})
this
.
setData
({
openSceneArr
:
result
.
map
(
val
=>
{
if
(
val
.
sceneOpenFlag
==
0
)
return
val
.
scene
})
||
[]
})
})
})
},
},
...
@@ -98,7 +98,7 @@ Page({
...
@@ -98,7 +98,7 @@ Page({
flag
:
true
flag
:
true
})
})
})
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{
})
},
},
jumpPage
(
item
)
{
jumpPage
(
item
)
{
let
{
shopMerchantName
,
shopMerchantId
,
openSceneArr
,
selectIndex
}
=
this
.
data
let
{
shopMerchantName
,
shopMerchantId
,
openSceneArr
,
selectIndex
}
=
this
.
data
...
@@ -120,9 +120,10 @@ Page({
...
@@ -120,9 +120,10 @@ Page({
merchantName
:
shopMerchantName
merchantName
:
shopMerchantName
}
}
})
})
wx
.
$storage
.
rm
(
'dateStaffPop'
)
if
(
selectIndex
==
0
)
{
// 搜门店
if
(
selectIndex
==
0
)
{
// 搜门店
wx
.
$router
.
go
(
'pages.sceneIndex'
)
wx
.
$router
.
go
(
'pages.sceneIndex'
)
this
.
setData
({
jumpPageFlag
:
false
})
this
.
setData
({
jumpPageFlag
:
false
})
}
else
{
// 搜客户
}
else
{
// 搜客户
if
(
!
openSceneArr
.
includes
(
0
))
return
wx
.
$util
.
showToast
(
'暂未开通精品升级场景'
)
if
(
!
openSceneArr
.
includes
(
0
))
return
wx
.
$util
.
showToast
(
'暂未开通精品升级场景'
)
// 进入精品升级场景 工单/预约详情
// 进入精品升级场景 工单/预约详情
...
@@ -131,8 +132,8 @@ Page({
...
@@ -131,8 +132,8 @@ Page({
merchantName
:
shopMerchantName
,
merchantName
:
shopMerchantName
,
sceneType
:
1
sceneType
:
1
}).
then
(
res
=>
{
}).
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
this
.
setData
({
jumpPageFlag
:
false
})
this
.
setData
({
jumpPageFlag
:
false
})
if
(
code
==
0
)
{
if
(
code
==
0
)
{
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
sceneType
:
1
})
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
sceneType
:
1
})
// listStatus 0 待跟进 1已升级 2战败 3待支付
// listStatus 0 待跟进 1已升级 2战败 3待支付
...
@@ -177,7 +178,7 @@ Page({
...
@@ -177,7 +178,7 @@ Page({
},
},
emit
(
e
)
{
emit
(
e
)
{
let
{
let
{
detail
:{
detail
:
{
value
value
}
}
}
=
e
}
=
e
...
@@ -224,7 +225,7 @@ Page({
...
@@ -224,7 +225,7 @@ Page({
sellerMerchantId
:
userInfo
?.
merchantId
||
''
sellerMerchantId
:
userInfo
?.
merchantId
||
''
}
}
if
(
!
searchValue
)
{
if
(
!
searchValue
)
{
this
.
setData
({
customStoreList
:
[]
})
this
.
setData
({
customStoreList
:
[]
})
return
return
}
}
if
(
nothing
)
return
if
(
nothing
)
return
...
@@ -277,7 +278,7 @@ Page({
...
@@ -277,7 +278,7 @@ Page({
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{},
onReady
:
function
()
{
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
...
@@ -290,25 +291,25 @@ Page({
...
@@ -290,25 +291,25 @@ Page({
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
:
function
()
{},
onHide
:
function
()
{
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
:
function
()
{},
onUnload
:
function
()
{
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{},
onPullDownRefresh
:
function
()
{
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{},
onReachBottom
:
function
()
{
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{}
onShareAppMessage
:
function
()
{
}
})
})
store/index.js
View file @
88914b9
...
@@ -215,12 +215,12 @@ export const checkScene = options => {
...
@@ -215,12 +215,12 @@ export const checkScene = options => {
}
}
options
.
query
=
query
options
.
query
=
query
}
}
//
console.log(query, 'query')
console
.
log
(
query
,
'query'
)
let
userInfo
=
wx
.
$util
.
getStorageSync
(
'dj_boutique_user_info'
)
let
userInfo
=
wx
.
$util
.
getStorageSync
(
'dj_boutique_user_info'
)
// 判断对象是否满足任意一个key
// 判断对象是否满足任意一个key
// console.log(query, ' query')
// console.log(query, ' query')
if
(
query
&&
(
query
.
scene
||
query
.
merchantId
||
query
.
type
||
query
.
page
))
{
if
(
query
&&
(
query
.
scene
||
query
.
merchantId
||
query
.
type
||
query
.
page
))
{
if
(
query
.
merchantId
)
{
if
(
query
.
merchantId
&&
!
query
.
reportDate
)
{
// &&options.patch == 'tabIndex/pages/index/index'
// &&options.patch == 'tabIndex/pages/index/index'
// 需要当前门店的 不是就重新登录
// 需要当前门店的 不是就重新登录
...
...
tabIndex/pages/index/index.js
View file @
88914b9
...
@@ -238,7 +238,7 @@ Page({
...
@@ -238,7 +238,7 @@ Page({
}
else
{
}
else
{
if
(
!
[
'tabWorkOrder.createOrder'
,
'tabWorkOrder.createArchives'
,
'tabWorkOrder.defeatOrder'
].
includes
(
item
.
url
))
{
if
(
!
[
'tabWorkOrder.createOrder'
,
'tabWorkOrder.createArchives'
,
'tabWorkOrder.defeatOrder'
].
includes
(
item
.
url
))
{
wx
.
$util
.
pointRecord
(
item
.
recordId
)
wx
.
$util
.
pointRecord
(
item
.
recordId
)
return
wx
.
$router
.
go
(
item
.
url
)
return
wx
.
$router
.
go
(
item
.
url
,
{
scene
:
1
}
)
}
else
{
}
else
{
wx
.
$util
.
showNoAccess
()
wx
.
$util
.
showNoAccess
()
}
}
...
@@ -598,9 +598,12 @@ Page({
...
@@ -598,9 +598,12 @@ Page({
}
else
{
}
else
{
num
=
num
+
1
num
=
num
+
1
}
}
if
(
num
<=
2
&&
hasNeedReport
)
{
// num <= 2
if
(
hasNeedReport
&&
isStaff
)
{
// if (num <= 2) {
// if (num <= 2) {
// wx.$util.showToast('驻店日报未填写,请及时填写')
// wx.$util.showToast('驻店日报未填写,请及时填写')
if
(
wx
.
__HAS_NOREPORT_MODAL
)
return
false
wx
.
__HAS_NOREPORT_MODAL
=
true
wx
.
showModal
({
wx
.
showModal
({
title
:
'日报提醒'
,
title
:
'日报提醒'
,
content
:
'您有未填写的日报,请点击前往。'
,
content
:
'您有未填写的日报,请点击前往。'
,
...
@@ -615,6 +618,13 @@ Page({
...
@@ -615,6 +618,13 @@ Page({
reportDate
:
hasNeedReport
.
date
reportDate
:
hasNeedReport
.
date
})
})
}
}
},
complete
:
()
=>
{
// 这个延迟的目的是为了避免短时间内重复弹出
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
setTimeout
(()
=>
{
wx
.
__HAS_NOREPORT_MODAL
=
false
},
2000
)
}
}
})
})
...
...
tabWorkOrder/pages/staffDaily/components/storePicker/storePicker.js
View file @
88914b9
...
@@ -18,7 +18,17 @@ Component({
...
@@ -18,7 +18,17 @@ Component({
},
},
pickList
:
{
pickList
:
{
type
:
Array
,
type
:
Array
,
value
:
[]
value
:
[],
observer
:
function
(
n
)
{
this
.
setData
({
selectStoreIndex
:
[
0
]
})
// selectStoreIndex: [0]
// if (n.length == 1) {
// }
}
},
},
show
:
{
show
:
{
type
:
Boolean
type
:
Boolean
...
@@ -58,6 +68,10 @@ Component({
...
@@ -58,6 +68,10 @@ Component({
this
.
triggerEvent
(
'input'
,
{
this
.
triggerEvent
(
'input'
,
{
value
value
})
})
this
.
setData
({
selectStoreIndex
:
[
0
],
// defaultSelectStoreIndex: [0]
})
},
},
inputBlur
(
e
)
{
inputBlur
(
e
)
{
this
.
emit
(
e
)
this
.
emit
(
e
)
...
@@ -78,7 +92,7 @@ Component({
...
@@ -78,7 +92,7 @@ Component({
this
.
triggerEvent
(
type
==
'confirm'
?
'search'
:
'blur'
,
{
value
})
this
.
triggerEvent
(
type
==
'confirm'
?
'search'
:
'blur'
,
{
value
})
},
},
confirm
()
{
confirm
()
{
let
{
selectStoreIndex
,
pickList
}
=
this
.
data
let
{
selectStoreIndex
,
pickList
,
subIndex
}
=
this
.
data
let
value
=
selectStoreIndex
[
0
]
let
value
=
selectStoreIndex
[
0
]
console
.
log
(
value
)
console
.
log
(
value
)
console
.
log
(
pickList
)
console
.
log
(
pickList
)
...
...
tabWorkOrder/pages/staffDaily/staffDaily.js
View file @
88914b9
This diff is collapsed.
Click to expand it.
tabWorkOrder/pages/staffDaily/staffDaily.sass
View file @
88914b9
...
@@ -430,3 +430,10 @@ page {
...
@@ -430,3 +430,10 @@ page {
color
:
#BEC1C7
;
color
:
#BEC1C7
;
text-align
:
center
;
text-align
:
center
;
}
}
.disabled
.cell-box
{
opacity
:
0
.6
;
}
.disabled
{
opacity
:
0
.6
;
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/staffDaily/staffDaily.wxml
View file @
88914b9
<!--tabWorkOrder/pages/staffDaily/staffDaily.wxml-->
<!--tabWorkOrder/pages/staffDaily/staffDaily.wxml-->
<!-- <block wx:if="{{ flag }}"> -->
<!-- <block wx:if="{{ flag }}"> -->
<view class="layout {{ flag?'opacity':'' }}">
<view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{
tru
e }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{
role!='other'? true:fals
e }}">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
<view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
<view class="arrow" wx:if="{{
merchantRange.length > 1
}}">
<view class="arrow" wx:if="{{
userInfo.isSuper
}}">
<image src="/images/arrow-bottom.png" />
<image src="/images/arrow-bottom.png" />
</view>
</view>
</view>
</view>
...
@@ -23,17 +23,17 @@
...
@@ -23,17 +23,17 @@
</view>
</view>
</view>
</view>
<view class="box">
<view class="box">
<gl-cell-staff border valueAlign="right" labelText="每日按门店填写新车交付数" label="新车交付数" requiredAfter labelWidth="375rpx" required>
<gl-cell-staff
class="{{(role != 'staff'|| !orderObj.isDateWithin7Days) && (role != 'super'|| !orderObj.isDateWithin60Days)?'disabled':''}}"
border valueAlign="right" labelText="每日按门店填写新车交付数" label="新车交付数" requiredAfter labelWidth="375rpx" required>
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" maxlength="3" type="number" value="{{ orderObj.deliveryCount }}" bindinput="input" data-name="deliveryCount" disabled="{{ (role != 'staff'|| !orderObj.isDateWithin7Days) && (role != 'super'|| !orderObj.isDateWithin60Days) }}" always-embed></input>
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" maxlength="3" type="number" value="{{ orderObj.deliveryCount }}" bindinput="input" data-name="deliveryCount" disabled="{{ (role != 'staff'|| !orderObj.isDateWithin7Days) && (role != 'super'|| !orderObj.isDateWithin60Days) }}" always-embed></input>
</gl-cell-staff>
</gl-cell-staff>
<gl-cell-staff border valueAlign="right" labelText="每日填写本人该业务的接待客户数" label="到店流量(太阳膜)" requiredAfter labelWidth="375rpx" required>
<gl-cell-staff
class="{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}"
border valueAlign="right" labelText="每日填写本人该业务的接待客户数" label="到店流量(太阳膜)" requiredAfter labelWidth="375rpx" required>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.filmToShopCount }}" bindinput="input" data-name="filmToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.filmToShopCount }}" bindinput="input" data-name="filmToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
</gl-cell-staff>
</gl-cell-staff>
<gl-cell-staff border valueAlign="right" labelText="每日填写本人该业务的接待客户数" label="到店流量(会员权益)" requiredAfter labelWidth="375rpx" required>
<gl-cell-staff
class="{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}"
border valueAlign="right" labelText="每日填写本人该业务的接待客户数" label="到店流量(会员权益)" requiredAfter labelWidth="375rpx" required>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.equityToShopCount }}" bindinput="input" data-name="equityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.equityToShopCount }}" bindinput="input" data-name="equityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
</gl-cell-staff>
</gl-cell-staff>
<view class="user-portrait">
<view class="user-portrait">
<view wx:for="{{ formData }}" wx:key="index">
<view wx:for="{{ formData }}" wx:key="index"
class="{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}"
>
<view class="label">{{item.label}}</view>
<view class="label">{{item.label}}</view>
<!-- <gl-cell-staff border valueAlign="right" label="{{ item.label }}" requiredAfter labelWidth="375rpx">
<!-- <gl-cell-staff border valueAlign="right" label="{{ item.label }}" requiredAfter labelWidth="375rpx">
<input placeholder="下方选项请点击选择" class="input" placeholder-class="placeholder-class" disabled="{{ true }}" always-embed></input>
<input placeholder="下方选项请点击选择" class="input" placeholder-class="placeholder-class" disabled="{{ true }}" always-embed></input>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
bindinput="handleInput"
bindinput="handleInput"
/>
/>
</view> -->
</view> -->
<view wx:if="{{ item.optionList }}" class="check-block">
<view wx:if="{{ item.optionList }}" class="check-block
{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}
">
<view class="check-box {{ subItem.active ? 'active' : '' }}" wx:for="{{ item.optionList }}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" bindtap="click" data-pidx="{{ index }}" data-idx="{{ idx }}">
<view class="check-box {{ subItem.active ? 'active' : '' }}" wx:for="{{ item.optionList }}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" bindtap="click" data-pidx="{{ index }}" data-idx="{{ idx }}">
{{subItem.confName}}
{{subItem.confName}}
<image wx:if="{{ item.isMult && subItem.active }}" class="mult" src="../../images/check-active.png"></image>
<image wx:if="{{ item.isMult && subItem.active }}" class="mult" src="../../images/check-active.png"></image>
...
@@ -58,9 +58,9 @@
...
@@ -58,9 +58,9 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view class="remark_box">
<view class="remark_box
">
<view class="label">备注</view>
<view class="label">备注</view>
<view class="textArea_box">
<view class="textArea_box
{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}
">
<textarea value="{{ orderObj.remark }}" maxlength="800" placeholder="请输入" class="textarea" bindinput="remarkInput" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" />
<textarea value="{{ orderObj.remark }}" maxlength="800" placeholder="请输入" class="textarea" bindinput="remarkInput" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" />
<view class="currentWordNumber">{{currentWordNumber || 0}} / 800</view>
<view class="currentWordNumber">{{currentWordNumber || 0}} / 800</view>
</view>
</view>
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
<view class="remark_box" wx:if="{{ role == 'other' }}">
<view class="remark_box" wx:if="{{ role == 'other' }}">
<view class="label">填写批复</view>
<view class="label">填写批复</view>
<view class="textArea_box">
<view class="textArea_box">
<textarea value="{{ approvedContent }}" maxlength="800" placeholder="请输入" class="textarea" bindinput="approveRemarkInput" disabled="{{ role
!= 'staff
' }}" />
<textarea value="{{ approvedContent }}" maxlength="800" placeholder="请输入" class="textarea" bindinput="approveRemarkInput" disabled="{{ role
== 'ohter
' }}" />
<view class="currentWordNumber">{{approvedContentCurrentWordNumber || 0}} / 800</view>
<view class="currentWordNumber">{{approvedContentCurrentWordNumber || 0}} / 800</view>
</view>
</view>
</view>
</view>
...
...
utils/timeFormat/time-utils.js
View file @
88914b9
...
@@ -99,20 +99,28 @@ function getMyDay(res) {
...
@@ -99,20 +99,28 @@ function getMyDay(res) {
//时间戳转周几
//时间戳转周几
function
getWeek
(
res
)
{
function
getWeek
(
res
)
{
var
time
=
new
Date
(
res
)
// var time = new Date(res)
var
y
=
time
.
getFullYear
()
// var y = time.getFullYear()
var
m
=
time
.
getMonth
()
+
1
// var m = time.getMonth() + 1
var
d
=
time
.
getDate
()
// var d = time.getDate()
return
'日一二三四五六'
.
charAt
(
new
Date
(
y
+
'-'
+
m
+
'-'
+
d
).
getDay
())
// return '日一二三四五六'.charAt(new Date(y + '-' + m + '-' + d).getDay())
var
days
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
var
time
=
new
Date
(
res
);
var
dayIndex
=
time
.
getDay
();
return
days
[
dayIndex
];
}
}
//时间戳转周几 0123456 --
//时间戳转周几 0123456 --
function
getWeekNumber
(
res
)
{
function
getWeekNumber
(
res
)
{
var
time
=
new
Date
(
res
)
var
days
=
[
0
,
1
,
2
,
3
,
4
,
5
,
6
];
var
y
=
time
.
getFullYear
()
var
time
=
new
Date
(
res
);
var
m
=
time
.
getMonth
()
+
1
var
dayIndex
=
time
.
getDay
();
var
d
=
time
.
getDate
()
return
days
[
dayIndex
];
return
'0123456'
.
charAt
(
new
Date
(
y
+
'-'
+
m
+
'-'
+
d
).
getDay
())
// var time = new Date(res)
// var y = time.getFullYear()
// var m = time.getMonth() + 1
// var d = time.getDate()
// return '0123456'.charAt(new Date(y + '-' + m + '-' + d).getDay())
}
}
//时间戳转年月份 --
//时间戳转年月份 --
...
...
utils/util.js
View file @
88914b9
...
@@ -2,6 +2,7 @@ import api from '~/api/api'
...
@@ -2,6 +2,7 @@ import api from '~/api/api'
import
wxApi
from
'~/utils/utils_wx'
import
wxApi
from
'~/utils/utils_wx'
import
format
from
'~/utils/utils_format'
import
format
from
'~/utils/utils_format'
import
$router
from
'../router/index'
import
$router
from
'../router/index'
import
$storage
from
'./cache/storage'
;
/**emoji正则 */
/**emoji正则 */
const
emojiReg
=
/
([^\u
0020-
\u
007E
\u
00A0-
\u
00BE
\u
2E80-
\u
A4CF
\u
F900-
\u
FAFF
\u
FE30-
\u
FE4F
\u
FF00-
\u
FFEF
\u
0080-
\u
009F
\u
2000-
\u
201f
\u
2026
\u
2022
\u
20ac
])
/g
const
emojiReg
=
/
([^\u
0020-
\u
007E
\u
00A0-
\u
00BE
\u
2E80-
\u
A4CF
\u
F900-
\u
FAFF
\u
FE30-
\u
FE4F
\u
FF00-
\u
FFEF
\u
0080-
\u
009F
\u
2000-
\u
201f
\u
2026
\u
2022
\u
20ac
])
/g
/**
/**
...
@@ -100,6 +101,7 @@ const setUserInfo = userInfo => {
...
@@ -100,6 +101,7 @@ const setUserInfo = userInfo => {
userInfo
.
userType
=
1
userInfo
.
userType
=
1
}
}
wx
.
setStorageSync
(
'dj_boutique_user_info'
,
JSON
.
stringify
(
userInfo
))
wx
.
setStorageSync
(
'dj_boutique_user_info'
,
JSON
.
stringify
(
userInfo
))
}
}
const
getSessionId
=
()
=>
{
const
getSessionId
=
()
=>
{
return
wx
.
getStorageSync
(
'dj_boutique_sessionId'
)
return
wx
.
getStorageSync
(
'dj_boutique_sessionId'
)
...
...
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