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 dc5681b4
authored
Jan 16, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
2dd9001d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
58 deletions
packageEquity/pages/carQuotation/components/PopupInput/PopupInput.wxml
packageEquity/pages/index/index.js
tabIndex/pages/index/index.js
tabWorkOrder/index.wxs
tabWorkOrder/pages/staffDaily/staffDaily.js
tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily.js
utils/timeFormat/time-utils.js
packageEquity/pages/carQuotation/components/PopupInput/PopupInput.wxml
View file @
dc5681b
<popup
<popup title="添加其他商业险" show="{{show}}" bindconfirm="confirm" height="85%">
title="添加其他商业险"
<view class="popBox">
show="{{show}}"
<view class="title">商业险名称</view>
bindconfirm="confirm"
<van-field class="inputBox" border="{{false}}" value="{{typeName}}" data-attrType="vehiclesAndVessels" data-attrName="typeName" placeholder="请输入" bindinput="handleInput" />
height="85%">
<view class="title">险种保额</view>
<view class="popBox">
<van-field class="inputBox" border="{{false}}" value="{{compensation}}" data-attrType="vehiclesAndVessels" data-attrName="compensation" placeholder="请输入险种保额" bindinput="handleInput" />
<view class="title">商业险名称</view>
<view class="title">保费</view>
<van-field
<van-field class="inputBox" type="digit" border="{{false}}" value="{{payPrice}}" data-type='number' data-attrType="vehiclesAndVessels" data-attrName="payPrice" placeholder="请输入保费" bindinput="handleInput">
class="inputBox"
<view slot="left-icon">
border="{{false}}"
<view>¥</view>
value="{{typeName}}"
</view>
data-attrType="vehiclesAndVessels"
</van-field>
data-attrName="typeName"
</view>
placeholder="请输入"
</popup>
bindinput="handleInput" />
<view class="title">险种保额</view>
<van-field
class="inputBox"
border="{{false}}"
value="{{compensation}}"
data-attrType="vehiclesAndVessels"
data-attrName="compensation"
placeholder="请输入险种保额"
bindinput="handleInput" />
<view class="title">保费</view>
<van-field
class="inputBox"
type="digit"
border="{{false}}"
value="{{payPrice}}"
data-type='number'
data-attrType="vehiclesAndVessels"
data-attrName="payPrice"
placeholder="请输入保费"
type="digit"
bindinput="handleInput">
<view slot="left-icon">
<view>¥</view>
</view>
</van-field>
</view>
</popup>
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/index/index.js
View file @
dc5681b
...
@@ -484,7 +484,7 @@ Component({
...
@@ -484,7 +484,7 @@ Component({
sortVal
:
11
sortVal
:
11
})
})
}
}
if
(
userInfo
?.
loginRole
==
3
||
userInfo
.
loginRole
==
5
&&
menuList
.
every
((
item
)
=>
item
.
menuText
!=
'积分审批'
))
{
if
(
(
userInfo
?.
loginRole
==
3
||
userInfo
.
loginRole
==
5
)
&&
menuList
.
every
((
item
)
=>
item
.
menuText
!=
'积分审批'
))
{
menuList
.
unshift
({
menuList
.
unshift
({
menuText
:
"积分审批"
,
menuText
:
"积分审批"
,
path
:
"pages.pointsReview"
,
path
:
"pages.pointsReview"
,
...
@@ -552,7 +552,7 @@ Component({
...
@@ -552,7 +552,7 @@ Component({
(
userInfo
?.
isSuper
||
(
userInfo
?.
isSuper
||
userInfo
?.
loginRole
==
3
||
userInfo
?.
loginRole
==
3
||
userInfo
.
loginRole
==
5
)
&&
userInfo
.
loginRole
==
5
)
&&
menuList
.
every
((
item
)
=>
item
.
menuText
!=
"驻店管理"
)
menuList
.
every
((
item
)
=>
item
.
menuText
!=
"驻店管理"
)
)
{
)
{
menuList
.
push
({
menuList
.
push
({
menuText
:
"驻店管理"
,
menuText
:
"驻店管理"
,
...
...
tabIndex/pages/index/index.js
View file @
dc5681b
...
@@ -1244,7 +1244,7 @@ Page({
...
@@ -1244,7 +1244,7 @@ Page({
icon
:
'boutique-syzs'
icon
:
'boutique-syzs'
})
})
}
}
if
(
userInfo
?.
loginRole
==
3
&&
menu
.
every
((
item
)
=>
item
.
name
!=
'积分审批'
))
{
if
(
(
userInfo
?.
loginRole
==
3
||
userInfo
.
loginRole
==
5
)
&&
menu
.
every
((
item
)
=>
item
.
name
!=
'积分审批'
))
{
menu
.
push
({
menu
.
push
({
name
:
'积分审批'
,
name
:
'积分审批'
,
url
:
'pages.pointsReview'
,
url
:
'pages.pointsReview'
,
...
...
tabWorkOrder/index.wxs
View file @
dc5681b
var replaceItemText = function (item) {
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ')
// return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null
return item ? item.replace(reg, ' ') : null
...
@@ -13,7 +13,7 @@ var isIncludesItem = function (list, item) {
...
@@ -13,7 +13,7 @@ var isIncludesItem = function (list, item) {
}
}
var formatPosition = function (item, positionTypeList) {
var formatPosition = function (item, positionTypeList) {
var filterData = positionTypeList.filter(function(v) {
var filterData = positionTypeList.filter(function
(v) {
return v.positionValue == item
return v.positionValue == item
})
})
return (filterData.length && filterData[0] && filterData[0].positionName) || ''
return (filterData.length && filterData[0] && filterData[0].positionName) || ''
...
@@ -31,7 +31,7 @@ var isDateWithin7Days = function (date) {
...
@@ -31,7 +31,7 @@ var isDateWithin7Days = function (date) {
// 计算时间差对应的天数
// 计算时间差对应的天数
var diffDays = Math.floor(diffMilliseconds / oneDay)
var diffDays = Math.floor(diffMilliseconds / oneDay)
// console.log(diffDays, 'diffDays');
// console.log(diffDays, 'diffDays');
return diffDays >= -
7
return diffDays >= -
60
}
}
var isDateWithin60Days = function (date) {
var isDateWithin60Days = function (date) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
...
@@ -47,14 +47,15 @@ var isDateWithin60Days = function (date) {
...
@@ -47,14 +47,15 @@ var isDateWithin60Days = function (date) {
return diffDays >= -60
return diffDays >= -60
}
}
var filterIncludes = function(item, arr) {
var filterIncludes = function
(item, arr) {
return arr.indexOf(item) > -1
return arr.indexOf(item) > -1
}
}
var filterDisabled = function(role, weeklyList, date, disabledStatus) {
var filterDisabled = function
(role, weeklyList, date, disabledStatus) {
console.log(role, weeklyList)
console.log(role, weeklyList)
if (role == 'staff') { // 员工七天内可操作
if (role == 'staff') { // 员工七天内可操作
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin7Days(date)
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin7Days(date)
// return false;
} else if (role == 'super') { // 超管60天内可操作
} else if (role == 'super') { // 超管60天内可操作
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin60Days(date)
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin60Days(date)
} else {
} else {
...
...
tabWorkOrder/pages/staffDaily/staffDaily.js
View file @
dc5681b
...
@@ -244,15 +244,15 @@ Page({
...
@@ -244,15 +244,15 @@ Page({
return
wx
.
$util
.
showToast
(
'已超过提交时效'
)
return
wx
.
$util
.
showToast
(
'已超过提交时效'
)
for
(
let
index
=
0
;
index
<
carBandList
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
carBandList
.
length
;
index
++
)
{
if
(
!
carBandList
[
index
].
deliveryCount
)
{
if
(
[
''
,
null
].
includes
(
carBandList
[
index
].
deliveryCount
)
)
{
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
新车交付数`
)
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
新车交付数`
)
}
}
if
(
!
carBandList
[
index
].
equityToShopCount
)
{
if
(
[
''
,
null
].
includes
(
carBandList
[
index
].
equityToShopCount
)
)
{
return
this
.
showToast
(
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
新车到店流量`
`请输入
${
carBandList
[
index
].
brandName
}
新车到店流量`
)
)
}
}
if
(
!
carBandList
[
index
].
afterSaleEquityToShopCount
)
{
if
(
[
''
,
null
].
includes
(
carBandList
[
index
].
afterSaleEquityToShopCount
)
)
{
return
this
.
showToast
(
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
售后到店流量`
`请输入
${
carBandList
[
index
].
brandName
}
售后到店流量`
)
)
...
...
tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily.js
View file @
dc5681b
...
@@ -208,10 +208,10 @@ Page({
...
@@ -208,10 +208,10 @@ Page({
}
}
if
((
role
!=
'staff'
||
!
orderObj
.
isDateWithin7Days
)
&&
(
role
!=
'super'
||
!
orderObj
.
isDateWithin60Days
))
return
wx
.
$util
.
showToast
(
'已超过提交时效'
)
if
((
role
!=
'staff'
||
!
orderObj
.
isDateWithin7Days
)
&&
(
role
!=
'super'
||
!
orderObj
.
isDateWithin60Days
))
return
wx
.
$util
.
showToast
(
'已超过提交时效'
)
for
(
let
index
=
0
;
index
<
carBandList
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
carBandList
.
length
;
index
++
)
{
if
(
!
carBandList
[
index
].
deliveryCount
)
{
if
(
[
''
,
null
].
includes
(
carBandList
[
index
].
deliveryCount
)
)
{
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
新车交付数`
)
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
新车交付数`
)
}
}
if
(
!
carBandList
[
index
].
toShopFilmCount
)
{
if
(
[
''
,
null
].
includes
(
carBandList
[
index
].
toShopFilmCount
)
)
{
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
触客台次`
)
return
this
.
showToast
(
`请输入
${
carBandList
[
index
].
brandName
}
触客台次`
)
}
}
}
}
...
...
utils/timeFormat/time-utils.js
View file @
dc5681b
...
@@ -169,7 +169,7 @@ function isTimestampInCurrentWeek(timestamp, customerDisabled) {
...
@@ -169,7 +169,7 @@ function isTimestampInCurrentWeek(timestamp, customerDisabled) {
if
(
customerDisabled
)
{
if
(
customerDisabled
)
{
let
startOfTargetDate
=
new
Date
(
targetDate
.
getFullYear
(),
targetDate
.
getMonth
(),
targetDate
.
getDate
())
let
startOfTargetDate
=
new
Date
(
targetDate
.
getFullYear
(),
targetDate
.
getMonth
(),
targetDate
.
getDate
())
let
endOfTargetDate
=
new
Date
(
startOfTargetDate
.
getTime
()
+
(
24
*
60
*
60
*
1000
)
-
1
)
let
endOfTargetDate
=
new
Date
(
startOfTargetDate
.
getTime
()
+
(
24
*
60
*
60
*
1000
)
-
1
)
let
tomorrow
=
new
Date
(
new
Date
().
getTime
()
+
(
24
*
60
*
60
*
1000
))
let
tomorrow
=
new
Date
(
new
Date
().
getTime
()
+
(
24
*
60
*
60
*
1000
))
return
tomorrow
<=
endOfTargetDate
return
tomorrow
<=
endOfTargetDate
}
}
...
@@ -214,7 +214,9 @@ function isDateWithin7Days(date) {
...
@@ -214,7 +214,9 @@ function isDateWithin7Days(date) {
// 计算时间差对应的天数
// 计算时间差对应的天数
const
diffDays
=
Math
.
floor
(
diffMilliseconds
/
oneDay
)
const
diffDays
=
Math
.
floor
(
diffMilliseconds
/
oneDay
)
// console.log(diffDays, 'diffDays');
// console.log(diffDays, 'diffDays');
return
diffDays
>=
-
7
// return diffDays >= -7
// return true;
return
diffDays
>=
-
60
}
}
function
isDateWithin60Days
(
date
)
{
function
isDateWithin60Days
(
date
)
{
const
oneDay
=
24
*
60
*
60
*
1000
// 一天的毫秒数
const
oneDay
=
24
*
60
*
60
*
1000
// 一天的毫秒数
...
...
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