Commit e488f0f3 by cen

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents 50adf434 7d34c712
......@@ -497,14 +497,36 @@ export default {
handleBlur (e, i) {
let { value } = e.detail
if (value) {
let { orderObj, userInfo } = this
let key = i.value,
numbers = value.match(/\d+/g)
numbers = numbers ? numbers.join('') : ''
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey = Date.now()
if (
this.isNotEmpty(orderObj.recordStaffCount) &&
this.isNotEmpty(value) &&
orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid
) uni.showModal({
title: '预警提示',
content: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF'
})
}
},
isNotEmpty (value) {
return (
value !== null &&
value !== undefined &&
value !== '' &&
!(Array.isArray(value) && value.length === 0)
)
},
handleCarInputBlur (e, i, item) {
let { value } = e.detail
if (value) {
......@@ -522,29 +544,31 @@ export default {
mask: true
})
try {
let { orderObj, carBandList } = this
let { orderObj, carBandList, hwOhterObjArray } = this
orderObj.isAdmin = false
orderObj.oprBy = orderObj.staffUuid
orderObj.sceneType = 1
orderObj.brandDataList = carBandList
if (orderObj.onBreak == 'Y') {
orderObj.brandDataList.forEach(item => {
item.notDeliveryCount = item.notDeliveryCount || 0
item.equityToShopCount = item.equityToShopCount || 0
})
}
if (orderObj.pickerValue == 0) {
if (orderObj.staffCount == null) throw {
message: '今日驻店人数(按店)',
refId: 'staffCount'
}
orderObj.brandDataList.map((e, index) => {
if (e.deliveryCount == null) throw { message: '店端实际交车数', refId: `deliveryCount_${index}` }
if (!e.notDeliveryCount == null) throw { message: '店端总未触客数', refId: `notDeliveryCount_${index}` }
if (!e.equityToShopCount == null) throw { message: '实际售前触客数', refId: `equityToShopCount_${index}` }
carBandList.map((item, index) => {
hwOhterObjArray.map(el => {
if (el.required && ['', null].includes(item[el.key])) throw {
message: el.label,
refId: `${el.refId}_${index}`
}
})
})
}
if (orderObj.onBreak == 'Y') {
orderObj.brandDataList.forEach(item => {
item.notDeliveryCount = item.notDeliveryCount || 0
item.equityToShopCount = item.equityToShopCount || 0
})
}
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading()
if (data) {
......@@ -553,7 +577,6 @@ export default {
}
} catch (errorObj) {
uni.hideLoading()
console.log(errorObj)
if (errorObj.message) {
uni.showToast({
title: `${errorObj.message}不能为空`,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!