Commit 5d46a481 by 张立顺

fix bug修复

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