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
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
259 additions
and
76 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
...
...
@@ -22,7 +22,7 @@ Component({
else
if
(
!
userInfo
?.
isSuper
&&
val
.
merchantId
==
userInfo
?.
shopMerchantId
)
val
.
actived
=
true
}
else
{
// 切换4s店
if
(
userInfo
?.
isSuper
&&
((
userInfo
?.
sceneType
==
0
&&
userInfo
?.
default4SStoreInfo
?.
merchantId
==
val
.
merchantId
)
||
(
userInfo
?.
sceneType
==
3
&&
userInfo
?.
default4SStoreInfo_crowdFunding
?.
merchantId
==
val
.
merchantId
)
||
(
userInfo
?.
sceneType
==
2
&&
userInfo
?.
default4SStoreInfo_newCarConversion
?.
merchantId
==
val
.
merchantId
)))
val
.
actived
=
true
if
(
userInfo
?.
isSuper
&&
((
userInfo
?.
sceneType
==
0
&&
userInfo
?.
default4SStoreInfo
?.
merchantId
==
val
.
merchantId
)
||
(
userInfo
?.
sceneType
==
3
&&
userInfo
?.
default4SStoreInfo_crowdFunding
?.
merchantId
==
val
.
merchantId
)
||
(
userInfo
?.
sceneType
==
2
&&
userInfo
?.
default4SStoreInfo_newCarConversion
?.
merchantId
==
val
.
merchantId
)))
val
.
actived
=
true
else
if
(
!
userInfo
?.
isSuper
&&
val
.
merchantId
==
userInfo
?.
shopMerchantId
)
val
.
actived
=
true
}
})
...
...
@@ -78,9 +78,9 @@ Component({
* 组件的方法列表
*/
methods
:
{
closeMenu
(){
closeMenu
()
{
this
.
setData
({
show
:
false
show
:
false
})
},
// 查询条件类型切换
...
...
@@ -223,10 +223,10 @@ Component({
}
},
showTabBar
()
{
if
(
this
.
data
.
hasTabBar
)
wx
.
showTabBar
({
animation
:
true
})
if
(
this
.
data
.
hasTabBar
)
wx
.
showTabBar
({
animation
:
true
})
},
hideTabBar
()
{
if
(
this
.
data
.
hasTabBar
)
wx
.
hideTabBar
({
animation
:
true
})
if
(
this
.
data
.
hasTabBar
)
wx
.
hideTabBar
({
animation
:
true
})
},
selectStore
(
e
)
{
const
thisPage
=
wx
.
$router
.
getPageInstance
()
...
...
@@ -268,16 +268,17 @@ Component({
merchantName
:
item
?.
merchantName
,
sceneType
:
userInfo
?.
sceneType
})
.
then
(
res
=>
{
let
{
data
,
message
}
=
res
if
(
data
)
{
wx
.
$util
.
setUserInfo
({...
wx
.
$util
.
getUserInfo
(),
subLoginUser
:
data
.
subLoginUser
})
wx
.
$util
.
hideLoading
()
this
.
eventCallback
(
item
,
userInfo
?.
sceneType
)
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
.
then
(
res
=>
{
let
{
data
,
message
}
=
res
if
(
data
)
{
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
subLoginUser
:
data
.
subLoginUser
})
wx
.
$util
.
hideLoading
()
wx
.
$storage
.
rm
(
'dateStaffPop'
)
this
.
eventCallback
(
item
,
userInfo
?.
sceneType
)
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
}
},
eventCallback
(
item
,
sceneType
,
isSuper
)
{
...
...
@@ -295,7 +296,7 @@ Component({
}
let
obj
=
{}
if
(
isSuper
)
{
switch
(
sceneType
)
{
switch
(
sceneType
)
{
case
0
:
obj
=
{
...
userInfo
,
...
...
@@ -378,7 +379,7 @@ Component({
// 跳转到工单详情/预约详情
goPage
(
item
)
{
// 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
}
`)
}
}
...
...
config.js
View file @
88914b9
...
...
@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let
index
=
0
let
index
=
2
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
...
...
packageEquity/api.js
View file @
88914b9
...
...
@@ -139,5 +139,9 @@ module.exports = {
/** 获取商学院员工信息及前3月绩效信息 */
staffInfo
(
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
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'
const
app
=
getApp
()
let
time
=
null
var
util
=
require
(
'~/utils/timeFormat/time-utils.js'
)
Page
({
/**
* 页面的初始数据
...
...
@@ -75,6 +76,102 @@ Page({
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
()
{
let
storeInfo
=
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
||
{}
// console.log(wx.$util.getUserInfo()?.default4SStoreInfo ,'wx.$util.getUserInfo()?.default4SStoreInfo ');
...
...
@@ -283,6 +380,9 @@ Page({
initList
()
{
this
.
getMerchant4SMode
()
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');
this
.
selectComponent
(
`#page-
${
tabIndex
}
`
)?.
onLoad
&&
this
.
selectComponent
(
`#page-
${
tabIndex
}
`
).
onLoad
()
},
...
...
packageEquity/pages/index/index.js
View file @
88914b9
...
...
@@ -76,11 +76,19 @@ Component({
value
:
'totalSuccessOrderCount'
,
icon
:
'icon_7'
}],
menuList
:
[{
menuText
:
'新建工单'
,
icon
:
'create_order'
,
path
:
''
}],
menuList
:
[
{
menuText
:
'驻店日报'
,
path
:
'tabWorkOrder.staffDaily'
,
recordId
:
13
,
icon
:
'supplementary_order'
},
{
menuText
:
'新建工单'
,
icon
:
'create_order'
,
path
:
''
},
],
loginRoleLabel
:
{
1
:
'超管'
,
2
:
'商户管理员'
,
...
...
@@ -245,7 +253,9 @@ Component({
if
(
item
.
menuText
==
'商学院'
)
{
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'
)
// console.log(e)
// const thisPage = wx.$router.getPageInstance()
...
...
packageEquity/pages/index/index.wxml
View file @
88914b9
...
...
@@ -53,13 +53,39 @@
</view>
<view class="title">展业工具</view>
<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 != '商学院'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
</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 == '商学院'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
...
...
pages/merchantList/merchantList.js
View file @
88914b9
...
...
@@ -78,12 +78,12 @@ Page({
if
(
userInfo
?.
isSuper
)
return
wx
.
$util
.
showLoading
()
// 获取4s店关联场景数据
getShopSceneConfig
({
yqMerchantId
:
userInfo
?.
subLoginUser
?.
merchantId
,
merchantId
:
userInfo
?.
shopMerchantId
}).
then
(
result
=>
{
getShopSceneConfig
({
yqMerchantId
:
userInfo
?.
subLoginUser
?.
merchantId
,
merchantId
:
userInfo
?.
shopMerchantId
}).
then
(
result
=>
{
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
})
||
[]
})
})
},
getMerchantList
(
e
)
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
params
=
{
...
...
@@ -91,17 +91,17 @@ Page({
staffUUID
:
userInfo
?.
isSuper
?
''
:
userInfo
?.
uuid
}
get4SStoreList
(
params
)
.
then
(
result
=>
{
this
.
setData
({
loginUserInfoList
:
result
,
copyLoginUserInfoList
:
result
,
flag
:
true
.
then
(
result
=>
{
this
.
setData
({
loginUserInfoList
:
result
,
copyLoginUserInfoList
:
result
,
flag
:
true
})
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
jumpPage
(
item
)
{
let
{
shopMerchantName
,
shopMerchantId
,
openSceneArr
,
selectIndex
}
=
this
.
data
let
{
shopMerchantName
,
shopMerchantId
,
openSceneArr
,
selectIndex
}
=
this
.
data
if
(
!
openSceneArr
?.
length
&&
!
wx
.
$util
.
getUserInfo
()?.
isSuper
)
return
wx
.
$util
.
showToast
(
'暂无开通业务,请联系总部管理员'
)
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
...
...
@@ -120,9 +120,10 @@ Page({
merchantName
:
shopMerchantName
}
})
wx
.
$storage
.
rm
(
'dateStaffPop'
)
if
(
selectIndex
==
0
)
{
// 搜门店
wx
.
$router
.
go
(
'pages.sceneIndex'
)
this
.
setData
({
jumpPageFlag
:
false
})
this
.
setData
({
jumpPageFlag
:
false
})
}
else
{
// 搜客户
if
(
!
openSceneArr
.
includes
(
0
))
return
wx
.
$util
.
showToast
(
'暂未开通精品升级场景'
)
// 进入精品升级场景 工单/预约详情
...
...
@@ -131,8 +132,8 @@ Page({
merchantName
:
shopMerchantName
,
sceneType
:
1
}).
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
this
.
setData
({
jumpPageFlag
:
false
})
let
{
code
,
data
,
message
}
=
res
this
.
setData
({
jumpPageFlag
:
false
})
if
(
code
==
0
)
{
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
sceneType
:
1
})
// listStatus 0 待跟进 1已升级 2战败 3待支付
...
...
@@ -153,7 +154,7 @@ Page({
}
})
}
},
setValue
(
value
)
{
if
(
this
.
properties
.
filterEmoji
)
{
...
...
@@ -177,7 +178,7 @@ Page({
},
emit
(
e
)
{
let
{
detail
:{
detail
:
{
value
}
}
=
e
...
...
@@ -224,7 +225,7 @@ Page({
sellerMerchantId
:
userInfo
?.
merchantId
||
''
}
if
(
!
searchValue
)
{
this
.
setData
({
customStoreList
:
[]
})
this
.
setData
({
customStoreList
:
[]
})
return
}
if
(
nothing
)
return
...
...
@@ -277,7 +278,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{},
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
...
...
@@ -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 => {
}
options
.
query
=
query
}
//
console.log(query, 'query')
console
.
log
(
query
,
'query'
)
let
userInfo
=
wx
.
$util
.
getStorageSync
(
'dj_boutique_user_info'
)
// 判断对象是否满足任意一个key
// console.log(query, ' query')
if
(
query
&&
(
query
.
scene
||
query
.
merchantId
||
query
.
type
||
query
.
page
))
{
if
(
query
.
merchantId
)
{
if
(
query
.
merchantId
&&
!
query
.
reportDate
)
{
// &&options.patch == 'tabIndex/pages/index/index'
// 需要当前门店的 不是就重新登录
...
...
tabIndex/pages/index/index.js
View file @
88914b9
...
...
@@ -238,7 +238,7 @@ Page({
}
else
{
if
(
!
[
'tabWorkOrder.createOrder'
,
'tabWorkOrder.createArchives'
,
'tabWorkOrder.defeatOrder'
].
includes
(
item
.
url
))
{
wx
.
$util
.
pointRecord
(
item
.
recordId
)
return
wx
.
$router
.
go
(
item
.
url
)
return
wx
.
$router
.
go
(
item
.
url
,
{
scene
:
1
}
)
}
else
{
wx
.
$util
.
showNoAccess
()
}
...
...
@@ -598,9 +598,12 @@ Page({
}
else
{
num
=
num
+
1
}
if
(
num
<=
2
&&
hasNeedReport
)
{
// num <= 2
if
(
hasNeedReport
&&
isStaff
)
{
// if (num <= 2) {
// wx.$util.showToast('驻店日报未填写,请及时填写')
if
(
wx
.
__HAS_NOREPORT_MODAL
)
return
false
wx
.
__HAS_NOREPORT_MODAL
=
true
wx
.
showModal
({
title
:
'日报提醒'
,
content
:
'您有未填写的日报,请点击前往。'
,
...
...
@@ -615,6 +618,13 @@ Page({
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({
},
pickList
:
{
type
:
Array
,
value
:
[]
value
:
[],
observer
:
function
(
n
)
{
this
.
setData
({
selectStoreIndex
:
[
0
]
})
// selectStoreIndex: [0]
// if (n.length == 1) {
// }
}
},
show
:
{
type
:
Boolean
...
...
@@ -58,6 +68,10 @@ Component({
this
.
triggerEvent
(
'input'
,
{
value
})
this
.
setData
({
selectStoreIndex
:
[
0
],
// defaultSelectStoreIndex: [0]
})
},
inputBlur
(
e
)
{
this
.
emit
(
e
)
...
...
@@ -78,7 +92,7 @@ Component({
this
.
triggerEvent
(
type
==
'confirm'
?
'search'
:
'blur'
,
{
value
})
},
confirm
()
{
let
{
selectStoreIndex
,
pickList
}
=
this
.
data
let
{
selectStoreIndex
,
pickList
,
subIndex
}
=
this
.
data
let
value
=
selectStoreIndex
[
0
]
console
.
log
(
value
)
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
...
...
@@ -429,4 +429,11 @@ page {
font-size
:
24rpx
;
color
:
#BEC1C7
;
text-align
:
center
;
}
.disabled
.cell-box
{
opacity
:
0
.6
;
}
.disabled
{
opacity
:
0
.6
;
}
\ No newline at end of file
tabWorkOrder/pages/staffDaily/staffDaily.wxml
View file @
88914b9
<!--tabWorkOrder/pages/staffDaily/staffDaily.wxml-->
<!-- <block wx:if="{{ flag }}"> -->
<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-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" />
</view>
</view>
...
...
@@ -23,17 +23,17 @@
</view>
</view>
<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>
</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>
</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>
</gl-cell-staff>
<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>
<!-- <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>
...
...
@@ -50,7 +50,7 @@
bindinput="handleInput"
/>
</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 }}">
{{subItem.confName}}
<image wx:if="{{ item.isMult && subItem.active }}" class="mult" src="../../images/check-active.png"></image>
...
...
@@ -58,9 +58,9 @@
</view>
</view>
</view>
<view class="remark_box">
<view class="remark_box
">
<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 }}" />
<view class="currentWordNumber">{{currentWordNumber || 0}} / 800</view>
</view>
...
...
@@ -92,7 +92,7 @@
<view class="remark_box" wx:if="{{ role == 'other' }}">
<view class="label">填写批复</view>
<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>
</view>
...
...
utils/timeFormat/time-utils.js
View file @
88914b9
...
...
@@ -99,20 +99,28 @@ function getMyDay(res) {
//时间戳转周几
function
getWeek
(
res
)
{
var
time
=
new
Date
(
res
)
var
y
=
time
.
getFullYear
()
var
m
=
time
.
getMonth
()
+
1
var
d
=
time
.
getDate
()
return
'日一二三四五六'
.
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 '日一二三四五六'.charAt(new Date(y + '-' + m + '-' + d).getDay())
var
days
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
var
time
=
new
Date
(
res
);
var
dayIndex
=
time
.
getDay
();
return
days
[
dayIndex
];
}
//时间戳转周几 0123456 --
function
getWeekNumber
(
res
)
{
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
())
var
days
=
[
0
,
1
,
2
,
3
,
4
,
5
,
6
];
var
time
=
new
Date
(
res
);
var
dayIndex
=
time
.
getDay
();
return
days
[
dayIndex
];
// 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'
import
wxApi
from
'~/utils/utils_wx'
import
format
from
'~/utils/utils_format'
import
$router
from
'../router/index'
import
$storage
from
'./cache/storage'
;
/**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
/**
...
...
@@ -100,6 +101,7 @@ const setUserInfo = userInfo => {
userInfo
.
userType
=
1
}
wx
.
setStorageSync
(
'dj_boutique_user_info'
,
JSON
.
stringify
(
userInfo
))
}
const
getSessionId
=
()
=>
{
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