Commit 6eaf3002 by 张立顺

fix 日报

1 parent a1949d1f
...@@ -298,18 +298,9 @@ Page({ ...@@ -298,18 +298,9 @@ Page({
max: 100, max: 100,
inputPlaceholder: '' inputPlaceholder: ''
}, },
// {
// label: '店端总未触客数',
// key: 'notDeliveryCount',
// type: 'number',
// required: true,
// min: 0,
// max: 100,
// inputPlaceholder: ''
// },
{ {
label: '实际售前触客数', label: '店端总未触客数',
key: 'equityToShopCount', key: 'notDeliveryCount',
type: 'number', type: 'number',
required: true, required: true,
min: 0, min: 0,
...@@ -317,17 +308,8 @@ Page({ ...@@ -317,17 +308,8 @@ Page({
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
label: '实际售后触客数', label: '实际售前触客数',
key: 'afterSaleEquityToShopCount', key: 'equityToShopCount',
type: 'number',
required: false,
min: 0,
max: 100,
inputPlaceholder: ''
},
{
label: '今日店端实际发券数',
key: 'issueCouponCount',
type: 'number', type: 'number',
required: true, required: true,
min: 0, min: 0,
...@@ -335,21 +317,12 @@ Page({ ...@@ -335,21 +317,12 @@ Page({
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
label: '本月待邀约', label: '实际售后触客数',
key: 'waitInviteCount', key: 'afterSaleEquityToShopCount',
type: 'number',
required: true,
min: 0,
max: 1000,
inputPlaceholder: ''
},
{
label: '本月流失',
key: 'customerLossCount',
type: 'number', type: 'number',
required: true, required: false,
min: 0, min: 0,
max: 1000, max: 100,
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
...@@ -366,12 +339,45 @@ Page({ ...@@ -366,12 +339,45 @@ Page({
disabled: true, disabled: true,
inputPlaceholder: '自动填入系统数据' inputPlaceholder: '自动填入系统数据'
}, },
// {
// name: 'person'
// },
// {
// label: '北汽无忧成交数',
// key: 'bqWorryFreeCount',
// type: 'number',
// required: false,
// min: 0,
// max: 100,
// templateValue: 3,
// disabled: true,
// inputPlaceholder: '自动填入系统数据'
// },
// {
// label: '广爱无忧成交数',
// key: 'gaWorryFreeCount',
// type: 'number',
// required: false,
// min: 0,
// max: 100,
// disabled: true,
// templateValue: 3,
// inputPlaceholder: '自动填入系统数据'
// },
// {
// label: '未触客返店人数',
// key: 'notDeliveryReturnCount',
// type: 'number',
// required: false,
// min: 0,
// max: 100,
// inputPlaceholder: ''
// }
] ]
}, },
handleTemplagePickerChange(e) { handleTemplagePickerChange(e) {
const { value } = e.detail const { value } = e.detail
let { hwObjArray, otherObjArray, hwOhterObjArray } = this.data let { hwObjArray, otherObjArray, hwOhterObjArray } = this.data
console.log(value, e, 'checkFlag') console.log(value, e, 'checkFlag')
hwObjArray.forEach(item => (item.error = false)) hwObjArray.forEach(item => (item.error = false))
otherObjArray.forEach(item => (item.error = false)) otherObjArray.forEach(item => (item.error = false))
...@@ -513,6 +519,7 @@ Page({ ...@@ -513,6 +519,7 @@ Page({
], ],
sceneType: 1 sceneType: 1
} }
// console.log(params, 'submitApproval');
wx.$util.showLoading() wx.$util.showLoading()
api api
.staffDailyReportApprove(params) .staffDailyReportApprove(params)
...@@ -566,6 +573,23 @@ Page({ ...@@ -566,6 +573,23 @@ Page({
(role != 'super' || !orderObj.isDateWithin60Days) (role != 'super' || !orderObj.isDateWithin60Days)
) )
return wx.$util.showToast('已超过提交时效') return wx.$util.showToast('已超过提交时效')
// for (let index = 0; index < carBandList.length; index++) {
// if (true) {
// }
// if (['', null].includes(carBandList[index].deliveryCount)) {
// return this.showToast(`请输入${carBandList[index].brandName}新车交付数`)
// }
// if (['', null].includes(carBandList[index].equityToShopCount)) {
// return this.showToast(
// `请输入${carBandList[index].brandName}新车到店流量`
// )
// }
// if (['', null].includes(carBandList[index].afterSaleEquityToShopCount)) {
// return this.showToast(
// `请输入${carBandList[index].brandName}售后到店流量`
// )
// }
// }
let checkFlag = false let checkFlag = false
carBandList.forEach(item => { carBandList.forEach(item => {
if (orderObj.onBreak == 'N') { if (orderObj.onBreak == 'N') {
...@@ -584,12 +608,8 @@ Page({ ...@@ -584,12 +608,8 @@ Page({
} }
return el return el
}) })
// debugger
otherObjArray = otherObjArray.map(el => { otherObjArray = otherObjArray.map(el => {
console.log(el.required, ['', null].includes(item[el.key]));
console.log(el.key, item[el.key]);
if (el.required && ['', null].includes(item[el.key])) { if (el.required && ['', null].includes(item[el.key])) {
console.log(el, 'otherObjArray');
el.error = true el.error = true
checkFlag = true checkFlag = true
} }
...@@ -603,7 +623,6 @@ Page({ ...@@ -603,7 +623,6 @@ Page({
['orderObj.staffCountEmptyError']: true ['orderObj.staffCountEmptyError']: true
}) })
} }
console.log(checkFlag, 'checkFlag') console.log(checkFlag, 'checkFlag')
if (checkFlag) { if (checkFlag) {
this.setData({ this.setData({
...@@ -626,10 +645,6 @@ Page({ ...@@ -626,10 +645,6 @@ Page({
} }
// orderObj.reportType = reportType // orderObj.reportType = reportType
// console.log(orderObj, 'orderObj') // console.log(orderObj, 'orderObj')
// 非调休 日报填报前参数校验
// let check = this.dailyReportCheck(orderObj)
// if (check) return false;
wx.$util.showLoading() wx.$util.showLoading()
api api
.staffDailyReportSave(orderObj) .staffDailyReportSave(orderObj)
...@@ -694,7 +709,6 @@ Page({ ...@@ -694,7 +709,6 @@ Page({
if (selectWeek != 0) { if (selectWeek != 0) {
timeBean.selectDay = 0 timeBean.selectDay = 0
} }
this.setData({ this.setData({
timeBean, timeBean,
selectWeek selectWeek
...@@ -732,57 +746,6 @@ Page({ ...@@ -732,57 +746,6 @@ Page({
}) })
} }
}, },
async dailyReportCheck(params) {
console.log(params, 'params');
let { carBandList } = this.data
// let result = await api.dailyReportCheck({ brandDataList: params.brandDataList })
let result = {
code: 0,
data: {
list: [
{
brandType: 0,
isCheckPass: true
},
{
brandType: 1,
isCheckPass: true
},
]
}
}
let { code, data } = result
if (code == 0) {
let showModal = false
data.list.forEach(item => {
if (item.isCheckPass) {
showModal = true
carBandList.forEach(el => {
if (el.brandType == item.brandType) {
el.equityToShopCountinputError = true
el.notDeliveryCountinputError = true
}
})
}
})
this.setData({
carBandList
})
if (showModal) {
wx.showModal({
title: '预警提示',
content: `店端总未触客数+门店售前触客数 与 当月实际交车数不符,请相关驻店销售对齐核销再次提交`,
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF',
success(res) {
}
})
return true;
}
}
},
checkValue(e) { checkValue(e) {
let that = this let that = this
let { value } = e.detail let { value } = e.detail
...@@ -798,7 +761,7 @@ Page({ ...@@ -798,7 +761,7 @@ Page({
} = this.data } = this.data
// //
if ( if (
['staffCount', 'deliveryCount', 'notDeliveryCount', 'equityToShopCount'].includes(name) && ['staffCount', 'deliveryCount', 'notDeliveryCount'].includes(name) &&
orderObj.onBreak == 'N' orderObj.onBreak == 'N'
) { ) {
let checkName = `record${name}` let checkName = `record${name}`
...@@ -833,7 +796,6 @@ Page({ ...@@ -833,7 +796,6 @@ Page({
} }
} }
}, },
inputCount(e) { inputCount(e) {
let { value } = e.detail let { value } = e.detail
console.log(e) console.log(e)
...@@ -843,7 +805,6 @@ Page({ ...@@ -843,7 +805,6 @@ Page({
const min = 0 // 默认最小值 0 const min = 0 // 默认最小值 0
const max = name == 'cancelOrderMoney' ? 9999999 : 100 // 默认最大值 const max = name == 'cancelOrderMoney' ? 9999999 : 100 // 默认最大值
// console.log(currentConfig, 'currentConfig') // console.log(currentConfig, 'currentConfig')
this.setData({ this.setData({
[`orderObj.${name}Error`]: false [`orderObj.${name}Error`]: false
}) })
...@@ -924,7 +885,6 @@ Page({ ...@@ -924,7 +885,6 @@ Page({
return return
} }
} }
// return; // return;
// 清洗输入值 // 清洗输入值
// let cleanedValue = value.replace(/\D/g, ''); // 移除非数字字符 // let cleanedValue = value.replace(/\D/g, ''); // 移除非数字字符
...@@ -976,7 +936,6 @@ Page({ ...@@ -976,7 +936,6 @@ Page({
if (selectWeek != 0) { if (selectWeek != 0) {
timeBean.selectDay = 0 timeBean.selectDay = 0
} }
this.setData({ this.setData({
timeBean, timeBean,
selectWeek selectWeek
...@@ -985,7 +944,6 @@ Page({ ...@@ -985,7 +944,6 @@ Page({
this.getStaffReport() this.getStaffReport()
this.getStaffDailyReportDetailWeeklyList() this.getStaffDailyReportDetailWeeklyList()
}, },
/** /**
* 选中了某一日,改变selectDay为选中日 * 选中了某一日,改变selectDay为选中日
*/ */
...@@ -1222,7 +1180,6 @@ Page({ ...@@ -1222,7 +1180,6 @@ Page({
} }
}) })
}, },
editReport() { editReport() {
this.setData({ this.setData({
isEditReport: true isEditReport: true
...@@ -1233,7 +1190,6 @@ Page({ ...@@ -1233,7 +1190,6 @@ Page({
isEditReport: false isEditReport: false
}) })
}, },
closeSlectItemPopup() { closeSlectItemPopup() {
let { formData } = this.data let { formData } = this.data
formData?.forEach(val => { formData?.forEach(val => {
...@@ -1279,7 +1235,6 @@ Page({ ...@@ -1279,7 +1235,6 @@ Page({
noStoreData: false noStoreData: false
}) })
} }
this.setData({ this.setData({
['orderObj.yqMerchantId']: data.yqMerchant.merchantId, ['orderObj.yqMerchantId']: data.yqMerchant.merchantId,
['orderObj.yqMerchantName']: data.yqMerchant.merchantName ['orderObj.yqMerchantName']: data.yqMerchant.merchantName
...@@ -1369,7 +1324,6 @@ Page({ ...@@ -1369,7 +1324,6 @@ Page({
: data.list[subIndex].merchantName : data.list[subIndex].merchantName
}) })
} }
if (pickerType == 'merchant') { if (pickerType == 'merchant') {
this.setData({ this.setData({
merchantRangeList: data.list merchantRangeList: data.list
...@@ -1426,7 +1380,6 @@ Page({ ...@@ -1426,7 +1380,6 @@ Page({
timeBean: util.getWeekDayList(this.data.selectWeek) timeBean: util.getWeekDayList(this.data.selectWeek)
}) })
} }
this.setReportDate() this.setReportDate()
setTimeout(() => { setTimeout(() => {
console.log(this.data.role, 'roleOther') console.log(this.data.role, 'roleOther')
...@@ -1435,7 +1388,6 @@ Page({ ...@@ -1435,7 +1388,6 @@ Page({
return return
} }
}) })
if (isStaff && approvedSource != '3') { if (isStaff && approvedSource != '3') {
// console.log(userInfo, 'userInfo'); // console.log(userInfo, 'userInfo');
const { const {
...@@ -1554,7 +1506,6 @@ Page({ ...@@ -1554,7 +1506,6 @@ Page({
options[key] = decodeURIComponent(options[key]) options[key] = decodeURIComponent(options[key])
} }
} }
// 初始化日期 // 初始化日期
if (options.hasOwnProperty('reportDate')) { if (options.hasOwnProperty('reportDate')) {
this.setData({ this.setData({
...@@ -1562,12 +1513,10 @@ Page({ ...@@ -1562,12 +1513,10 @@ Page({
}) })
this.initData(wx.$util.getUserInfo()) this.initData(wx.$util.getUserInfo())
} }
console.log(options, 'options,onLoad') console.log(options, 'options,onLoad')
this.setData({ this.setData({
flag: true flag: true
}) })
let { orderObj } = this.data let { orderObj } = this.data
// console.log(options.hasOwnProperty('approvedSource'), options, 'approvedSource'); // console.log(options.hasOwnProperty('approvedSource'), options, 'approvedSource');
if (options.hasOwnProperty('approvedSource')) { if (options.hasOwnProperty('approvedSource')) {
...@@ -1577,7 +1526,6 @@ Page({ ...@@ -1577,7 +1526,6 @@ Page({
} else { } else {
role = 'other' role = 'other'
} }
this.setData( this.setData(
{ {
role, role,
...@@ -1609,7 +1557,6 @@ Page({ ...@@ -1609,7 +1557,6 @@ Page({
// let { orderObj } = this.data // let { orderObj } = this.data
// console.log(options, 'onRouteoptions'); // console.log(options, 'onRouteoptions');
let { orderObj } = this.data let { orderObj } = this.data
// console.log(this.data, 'onRouteoptions'); // console.log(this.data, 'onRouteoptions');
// console.log(userInfo, 'userInfo') // console.log(userInfo, 'userInfo')
// 初始化日期 // 初始化日期
...@@ -1622,13 +1569,11 @@ Page({ ...@@ -1622,13 +1569,11 @@ Page({
flag: true flag: true
}) })
this.initData(wx.$util.getUserInfo()) this.initData(wx.$util.getUserInfo())
if (options.hasOwnProperty('scene')) { if (options.hasOwnProperty('scene')) {
this.setData({ this.setData({
scene: options.scene scene: options.scene
}) })
} }
if (options.hasOwnProperty('approvedSource')) { if (options.hasOwnProperty('approvedSource')) {
let role = '' let role = ''
if (options.approvedSource == '3') { if (options.approvedSource == '3') {
...@@ -1636,7 +1581,6 @@ Page({ ...@@ -1636,7 +1581,6 @@ Page({
} else { } else {
role = 'other' role = 'other'
} }
this.setData( this.setData(
{ {
role, role,
...@@ -1657,9 +1601,8 @@ Page({ ...@@ -1657,9 +1601,8 @@ Page({
) )
} }
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { } onReady: function () { }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="box" wx:if="{{item.firstBrandId != -1}}"> <view class="box">
<block wx:for="{{ filter.filterTemplateList(hwOhterObjArray,orderObj.templateType) }}" wx:key="hw_index" wx:for-index="hw_index" wx:for-item="hw_item"> <block wx:for="{{ filter.filterTemplateList(hwOhterObjArray,orderObj.templateType) }}" wx:key="hw_index" wx:for-index="hw_index" wx:for-item="hw_item">
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view> <view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item"> <view wx:else class="input-item">
...@@ -93,21 +93,6 @@ ...@@ -93,21 +93,6 @@
</view> </view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view> <view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view> </view>
<input type="{{ hw_item.type||'number' }}" value="{{ item[hw_item.key] }}" data-index="{{ arr_index }}" data-hwohter-index="{{ hw_index }}" placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" bindinput="input" bindblur="checkValue" data-name="{{ hw_item.key }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}" />
</view>
</block>
</view>
<view class="box" wx:if="{{item.firstBrandId == -1}}">
<block wx:for="{{ filter.filterTemplateList(otherObjArray,orderObj.templateType) }}" wx:key="hw_index" wx:for-index="hw_index" wx:for-item="hw_item">
<view wx:if="{{ hw_item.name }}" class="presonBox">个人相关</view>
<view wx:else class="input-item">
<view class="left">
<view class="label {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}">
{{hw_item.label}}
<text class="required_text"> {{hw_item.required && orderObj.onBreak == 'N' ? '*' :''}}</text>
</view>
<view class="tips" wx:if="{{ hw_item.placeholder }}">{{hw_item.placeholder}}</view>
</view>
<input type="{{ hw_item.type||'number' }}" value="{{ item[hw_item.key] }}" data-index="{{ arr_index }}" data-hwohter-index="{{ hw_index }}" placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" bindinput="input" bindblur="checkValue" data-name="{{ hw_item.key }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}" /> <input type="{{ hw_item.type||'number' }}" value="{{ item[hw_item.key] }}" data-index="{{ arr_index }}" data-hwohter-index="{{ hw_index }}" placeholder-style="{{ hw_item.error && orderObj.onBreak == 'N'? 'color: #F24724 ': 'color: #D0D2D6' }};" class="content-input {{ item[hw_item.key + 'inputError'] ?'inputerror':''}} {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? 'disabled' : '' }}" placeholder="{{ hw_item.error && orderObj.onBreak == 'N'? '必填不能为空': filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ? '': (hw_item.inputPlaceholder || '请输入') }}" bindinput="input" bindblur="checkValue" data-name="{{ hw_item.key }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) ||hw_item.disabled }}" />
</view> </view>
</block> </block>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!