Commit 2b53f22a by 张立顺

feat 功能开发

1 parent 69dab665
...@@ -327,5 +327,9 @@ module.exports = { ...@@ -327,5 +327,9 @@ module.exports = {
// 退款审批列表查询 // 退款审批列表查询
getRefundReviewListAPI(data) { getRefundReviewListAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.waitForAudit.list', data) return api.post('dj.api.smartcarlife.refundApplyRecord.waitForAudit.list', data)
},
// 日报填报前参数校验
dailyReportCheck(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.data.check', data)
} }
} }
...@@ -298,9 +298,18 @@ Page({ ...@@ -298,9 +298,18 @@ Page({
max: 100, max: 100,
inputPlaceholder: '' inputPlaceholder: ''
}, },
// {
// label: '店端总未触客数',
// key: 'notDeliveryCount',
// type: 'number',
// required: true,
// min: 0,
// max: 100,
// inputPlaceholder: ''
// },
{ {
label: '店端总未触客数', label: '实际售前触客数',
key: 'notDeliveryCount', key: 'equityToShopCount',
type: 'number', type: 'number',
required: true, required: true,
min: 0, min: 0,
...@@ -308,24 +317,42 @@ Page({ ...@@ -308,24 +317,42 @@ Page({
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
label: '实际售前触客数', label: '实际售后触客数',
key: 'equityToShopCount', key: 'afterSaleEquityToShopCount',
type: 'number', type: 'number',
required: true, required: false,
min: 0, min: 0,
max: 100, max: 100,
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
label: '实际售后触客数', label: '今日店端实际发券数',
key: 'afterSaleEquityToShopCount', key: 'issueCouponCount',
type: 'number', type: 'number',
required: false, required: true,
min: 0, min: 0,
max: 100, max: 100,
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
label: '本月待邀约',
key: 'waitInviteCount',
type: 'number',
required: true,
min: 0,
max: 1000,
inputPlaceholder: ''
},
{
label: '本月流失',
key: 'customerLossCount',
type: 'number',
required: true,
min: 0,
max: 1000,
inputPlaceholder: ''
},
{
name: 'person' name: 'person'
}, },
{ {
...@@ -339,40 +366,6 @@ Page({ ...@@ -339,40 +366,6 @@ 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) {
...@@ -520,7 +513,6 @@ Page({ ...@@ -520,7 +513,6 @@ Page({
], ],
sceneType: 1 sceneType: 1
} }
// console.log(params, 'submitApproval');
wx.$util.showLoading() wx.$util.showLoading()
api api
.staffDailyReportApprove(params) .staffDailyReportApprove(params)
...@@ -574,25 +566,6 @@ Page({ ...@@ -574,25 +566,6 @@ 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') {
...@@ -611,8 +584,12 @@ Page({ ...@@ -611,8 +584,12 @@ 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
} }
...@@ -649,6 +626,10 @@ Page({ ...@@ -649,6 +626,10 @@ 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)
...@@ -751,6 +732,57 @@ Page({ ...@@ -751,6 +732,57 @@ 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
...@@ -766,7 +798,7 @@ Page({ ...@@ -766,7 +798,7 @@ Page({
} = this.data } = this.data
// //
if ( if (
['staffCount', 'deliveryCount', 'notDeliveryCount'].includes(name) && ['staffCount', 'deliveryCount', 'notDeliveryCount', 'equityToShopCount'].includes(name) &&
orderObj.onBreak == 'N' orderObj.onBreak == 'N'
) { ) {
let checkName = `record${name}` let checkName = `record${name}`
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="box"> <view class="box" wx:if="{{item.firstBrandId != -1}}">
<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">
...@@ -97,6 +97,21 @@ ...@@ -97,6 +97,21 @@
</view> </view>
</block> </block>
</view> </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 }}" />
</view>
</block>
</view>
</block> </block>
</view> </view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ (role == 'staff' && orderObj.isDateWithin7Days) || (role == 'super' && orderObj.isDateWithin60Days) || role == 'other' }}"> <view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ (role == 'staff' && orderObj.isDateWithin7Days) || (role == 'super' && orderObj.isDateWithin60Days) || role == 'other' }}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!