Commit dc5681b4 by 张立顺

fix bug

1 parent 2dd9001d
<popup <popup title="添加其他商业险" show="{{show}}" bindconfirm="confirm" height="85%">
title="添加其他商业险"
show="{{show}}"
bindconfirm="confirm"
height="85%">
<view class="popBox"> <view class="popBox">
<view class="title">商业险名称</view> <view class="title">商业险名称</view>
<van-field <van-field class="inputBox" border="{{false}}" value="{{typeName}}" data-attrType="vehiclesAndVessels" data-attrName="typeName" placeholder="请输入" bindinput="handleInput" />
class="inputBox"
border="{{false}}"
value="{{typeName}}"
data-attrType="vehiclesAndVessels"
data-attrName="typeName"
placeholder="请输入"
bindinput="handleInput" />
<view class="title">险种保额</view> <view class="title">险种保额</view>
<van-field <van-field class="inputBox" border="{{false}}" value="{{compensation}}" data-attrType="vehiclesAndVessels" data-attrName="compensation" placeholder="请输入险种保额" bindinput="handleInput" />
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"
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 slot="left-icon">
<view>¥</view> <view>¥</view>
</view> </view>
</van-field> </van-field>
</view> </view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -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",
......
...@@ -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',
......
...@@ -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 {
......
...@@ -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}售后到店流量`
) )
......
...@@ -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}触客台次`)
} }
} }
......
...@@ -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 // 一天的毫秒数
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!