Commit 5d46a481 by 张立顺

fix bug修复

1 parent b479a780
...@@ -708,26 +708,32 @@ Page({ ...@@ -708,26 +708,32 @@ Page({
checkValue(e) { checkValue(e) {
let that = this let that = this
let { value } = e.detail let { value } = e.detail
let { name, } = e.currentTarget.dataset let { name, hwIndex, otherIndex, index } = e.currentTarget.dataset
let { staffCountValue, orderObj, userInfo } = this.data let { orderObj, userInfo, carBandList, hwObjArray, otherObjArray } = this.data
// //
if ([''].in) { if (['staffCount', 'deliveryCount', 'notDeliveryCount'].includes(name)) {
let checkName = `record${name}`
} let checkVlaue = carBandList[index][checkName]
if (name == 'staffCount' && staffCountValue && value != staffCountValue && orderObj.lastStaffUuid && userInfo.uuid != orderObj.lastStaffUuid) { let context = hwObjArray[hwIndex]?.label || otherObjArray[otherIndex]?.label
// console.log(carBandList[index], carBandList[index][checkName], 'carBandList[name[checkName]]');
carBandList[index].name != carBandList[index[checkName]]
// console.log(checkVlaue != carBandList[index][name], orderObj.lastStaffUuid && userInfo.uuid != orderObj.lastStaffUuid);
if (checkVlaue != carBandList[index][name] && orderObj.lastStaffUuid && userInfo.uuid != orderObj.lastStaffUuid) {
wx.showModal({ wx.showModal({
title: '预警提示', title: '预警提示',
content: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`, content: `${context}与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,${context}将被清空。`,
showCancel: false, showCancel: false,
confirmText: '知道了', confirmText: '知道了',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) { success(res) {
that.setData({ that.setData({
['hwObjArray[0].inputError']: true [`carBandList[${index}].${name}inputError`]: true
}) })
} }
}) })
} }
}
}, },
input(e) { input(e) {
// userInfo // userInfo
...@@ -752,7 +758,7 @@ Page({ ...@@ -752,7 +758,7 @@ Page({
} else { } else {
// 非必填项允许为空 // 非必填项允许为空
this.setData({ this.setData({
[`carBandList[${index}].${name}`]: '' [`carBandList[${index}].${name}inputError`]: ''
}); });
return; return;
} }
...@@ -959,11 +965,11 @@ Page({ ...@@ -959,11 +965,11 @@ Page({
console.log(carBand, 'carBand'); console.log(carBand, 'carBand');
if (carBand != null) { if (carBand != null) {
item = { item = {
...item, // ...item,
...carBand, ...carBand,
recordStaffCount: carBand.staffCount, recordstaffCount: carBand.staffCount,
recordDeliveryCount: carBand.deliveryCount, recorddeliveryCount: carBand.deliveryCount,
recordNotDeliveryCount: carBand.notDeliveryCount recordnotDeliveryCount: carBand.notDeliveryCount
} }
} else { } else {
if (item.brandType == 0) { if (item.brandType == 0) {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
data-index="{{ arr_index }}" data-index="{{ arr_index }}"
data-hw-index="{{ hw_index }}" data-hw-index="{{ hw_index }}"
placeholder-style="{{ hw_item.error? 'color: #F24724 ': 'color: #D0D2D6' }};" placeholder-style="{{ hw_item.error? 'color: #F24724 ': 'color: #D0D2D6' }};"
class="content-input {{hw_item.inputError?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" class="content-input {{ hw_item.inputError?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}"
placeholder="{{ hw_item.error? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" placeholder="{{ hw_item.error? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}"
bindinput="input" bindinput="input"
bindblur="checkValue" bindblur="checkValue"
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
> >
<textarea <textarea
value="{{ orderObj.remark }}" value="{{ orderObj.remark }}"
maxlength="800" maxlength="500"
placeholder="请输入" placeholder="请输入"
class="textarea" class="textarea"
bindinput="remarkInput" bindinput="remarkInput"
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
</gl-cell> </gl-cell>
</block> --> </block> -->
<!-- 批复 --> <!-- 批复 -->
<view class="approvalFromSuperiorsCon"> <!-- <view class="approvalFromSuperiorsCon">
<view class="title"> <view class="title">
{{role=='other'? approvedSource == 0 ? orderObj.approvedBy : '区域运营' : '上级批复'}} {{role=='other'? approvedSource == 0 ? orderObj.approvedBy : '区域运营' : '上级批复'}}
<text class="data">({{timeBean.starDayLabel+ '-' + timeBean.endDayLabel}})</text> <text class="data">({{timeBean.starDayLabel+ '-' + timeBean.endDayLabel}})</text>
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
<view <view
class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!