Commit dc5681b4 by 张立顺

fix bug

1 parent 2dd9001d
<popup
title="添加其他商业险"
show="{{show}}"
bindconfirm="confirm"
height="85%">
<view class="popBox">
<view class="title">商业险名称</view>
<van-field
class="inputBox"
border="{{false}}"
value="{{typeName}}"
data-attrType="vehiclesAndVessels"
data-attrName="typeName"
placeholder="请输入"
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>
<popup title="添加其他商业险" show="{{show}}" bindconfirm="confirm" height="85%">
<view class="popBox">
<view class="title">商业险名称</view>
<van-field class="inputBox" border="{{false}}" value="{{typeName}}" data-attrType="vehiclesAndVessels" data-attrName="typeName" placeholder="请输入" 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="请输入保费" bindinput="handleInput">
<view slot="left-icon">
<view>¥</view>
</view>
</van-field>
</view>
</popup>
\ No newline at end of file
......@@ -484,7 +484,7 @@ Component({
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({
menuText: "积分审批",
path: "pages.pointsReview",
......@@ -552,7 +552,7 @@ Component({
(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5) &&
menuList.every((item) => item.menuText != "驻店管理")
menuList.every((item) => item.menuText != "驻店管理")
) {
menuList.push({
menuText: "驻店管理",
......
......@@ -1244,7 +1244,7 @@ Page({
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({
name: '积分审批',
url: 'pages.pointsReview',
......
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null
......@@ -13,7 +13,7 @@ var isIncludesItem = function (list, item) {
}
var formatPosition = function (item, positionTypeList) {
var filterData = positionTypeList.filter(function(v) {
var filterData = positionTypeList.filter(function (v) {
return v.positionValue == item
})
return (filterData.length && filterData[0] && filterData[0].positionName) || ''
......@@ -31,7 +31,7 @@ var isDateWithin7Days = function (date) {
// 计算时间差对应的天数
var diffDays = Math.floor(diffMilliseconds / oneDay)
// console.log(diffDays, 'diffDays');
return diffDays >= -7
return diffDays >= -60
}
var isDateWithin60Days = function (date) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
......@@ -47,14 +47,15 @@ var isDateWithin60Days = function (date) {
return diffDays >= -60
}
var filterIncludes = function(item, arr) {
var filterIncludes = function (item, arr) {
return arr.indexOf(item) > -1
}
var filterDisabled = function(role, weeklyList, date, disabledStatus) {
var filterDisabled = function (role, weeklyList, date, disabledStatus) {
console.log(role, weeklyList)
if (role == 'staff') { // 员工七天内可操作
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin7Days(date)
// return false;
} else if (role == 'super') { // 超管60天内可操作
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin60Days(date)
} else {
......
......@@ -244,15 +244,15 @@ Page({
return wx.$util.showToast('已超过提交时效')
for (let index = 0; index < carBandList.length; index++) {
if (!carBandList[index].deliveryCount) {
if (['', null].includes(carBandList[index].deliveryCount)) {
return this.showToast(`请输入${carBandList[index].brandName}新车交付数`)
}
if (!carBandList[index].equityToShopCount) {
if (['', null].includes(carBandList[index].equityToShopCount)) {
return this.showToast(
`请输入${carBandList[index].brandName}新车到店流量`
)
}
if (!carBandList[index].afterSaleEquityToShopCount) {
if (['', null].includes(carBandList[index].afterSaleEquityToShopCount)) {
return this.showToast(
`请输入${carBandList[index].brandName}售后到店流量`
)
......
......@@ -208,10 +208,10 @@ Page({
}
if ((role != 'staff' || !orderObj.isDateWithin7Days) && (role != 'super' || !orderObj.isDateWithin60Days)) return wx.$util.showToast('已超过提交时效')
for (let index = 0; index < carBandList.length; index++) {
if (!carBandList[index].deliveryCount) {
if (['', null].includes(carBandList[index].deliveryCount)) {
return this.showToast(`请输入${carBandList[index].brandName}新车交付数`)
}
if (!carBandList[index].toShopFilmCount) {
if (['', null].includes(carBandList[index].toShopFilmCount)) {
return this.showToast(`请输入${carBandList[index].brandName}触客台次`)
}
}
......
......@@ -169,7 +169,7 @@ function isTimestampInCurrentWeek(timestamp, customerDisabled) {
if (customerDisabled) {
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))
return tomorrow <= endOfTargetDate
}
......@@ -214,7 +214,9 @@ function isDateWithin7Days(date) {
// 计算时间差对应的天数
const diffDays = Math.floor(diffMilliseconds / oneDay)
// console.log(diffDays, 'diffDays');
return diffDays >= -7
// return diffDays >= -7
// return true;
return diffDays >= -60
}
function isDateWithin60Days(date) {
const oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!