Commit 28d3bc4b by zhangxw

报告管理-接待缺失报备需求开发

1 parent f29373f9
...@@ -162,7 +162,8 @@ Page({ ...@@ -162,7 +162,8 @@ Page({
} = this.data, { } = this.data, {
uuid, uuid,
merchantId, merchantId,
shopMerchantId shopMerchantId,
sceneType
} = userInfo } = userInfo
const { const {
code, code,
...@@ -172,7 +173,7 @@ Page({ ...@@ -172,7 +173,7 @@ Page({
merchantId: shopMerchantId, merchantId: shopMerchantId,
yqMerchantId: merchantId, yqMerchantId: merchantId,
staffUuid: uuid, staffUuid: uuid,
sceneType: 0, sceneType: sceneType,
reportStartDate: timeBean.reportStartDate, reportStartDate: timeBean.reportStartDate,
reportEndDate: timeBean.reportEndDate, reportEndDate: timeBean.reportEndDate,
}) })
...@@ -216,7 +217,8 @@ Page({ ...@@ -216,7 +217,8 @@ Page({
} = this.data, { } = this.data, {
uuid, uuid,
shopMerchantName, shopMerchantName,
shopMerchantId shopMerchantId,
sceneType
} = this.data.userInfo, { } = this.data.userInfo, {
code, code,
data, data,
...@@ -225,7 +227,8 @@ Page({ ...@@ -225,7 +227,8 @@ Page({
staffUuid: uuid, staffUuid: uuid,
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName, merchantName: shopMerchantName,
reportDate: currentDate reportDate: currentDate,
sceneType: sceneType
}) })
wx.hideLoading() wx.hideLoading()
let total = 0 let total = 0
...@@ -316,7 +319,8 @@ Page({ ...@@ -316,7 +319,8 @@ Page({
shopMerchantId, shopMerchantId,
phone, phone,
uuid, uuid,
name name,
sceneType
} = userInfo } = userInfo
list.map((e, index) => { list.map((e, index) => {
if (!e.reasonCode) this.setData({ if (!e.reasonCode) this.setData({
...@@ -353,7 +357,7 @@ Page({ ...@@ -353,7 +357,7 @@ Page({
staffUuid: uuid, staffUuid: uuid,
staffName: name, staffName: name,
staffPhone: phone, staffPhone: phone,
sceneType: 0 sceneType: sceneType
}) })
if (code != 0) throw message if (code != 0) throw message
} }
......
...@@ -229,6 +229,7 @@ Page({ ...@@ -229,6 +229,7 @@ Page({
_this.closeChangeUploadType() _this.closeChangeUploadType()
wx.chooseImage({ wx.chooseImage({
count: count, count: count,
sizeType: ['original'],
success(res) { success(res) {
for (const file of res.tempFiles) { for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) { if (file.size > 10 * 1024 * 1024) {
...@@ -337,6 +338,7 @@ Page({ ...@@ -337,6 +338,7 @@ Page({
wx.chooseMedia({ wx.chooseMedia({
count: count, count: count,
mediaType: field.video ? ['image', 'video'] : ['image'], mediaType: field.video ? ['image', 'video'] : ['image'],
sizeType: field.video ? ['original', 'compressed'] : ['original'],
maxDuration: 60, maxDuration: 60,
success(res) { success(res) {
const ext = res.tempFiles?.length == 1 && res.tempFiles[0].tempFilePath && res.tempFiles[0].tempFilePath.split('.').pop().toLowerCase() const ext = res.tempFiles?.length == 1 && res.tempFiles[0].tempFilePath && res.tempFiles[0].tempFilePath.split('.').pop().toLowerCase()
......
...@@ -748,6 +748,7 @@ Page({ ...@@ -748,6 +748,7 @@ Page({
_this.closeChangeUploadType() _this.closeChangeUploadType()
wx.chooseImage({ wx.chooseImage({
count: count, count: count,
sizeType: ['original'],
success(res) { success(res) {
for (const file of res.tempFiles) { for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) { if (file.size > 10 * 1024 * 1024) {
...@@ -861,6 +862,7 @@ Page({ ...@@ -861,6 +862,7 @@ Page({
wx.chooseMedia({ wx.chooseMedia({
count: count, count: count,
mediaType: field == 'thirdPartyTransactionVoucher' ? ['image', 'video'] : ['image'], mediaType: field == 'thirdPartyTransactionVoucher' ? ['image', 'video'] : ['image'],
sizeType: field == 'thirdPartyTransactionVoucher' ? ['original', 'compressed'] : ['original'],
maxDuration: 60, maxDuration: 60,
success(res) { success(res) {
const ext = res.tempFiles?.length == 1 && res.tempFiles[0].tempFilePath && res.tempFiles[0].tempFilePath.split('.').pop().toLowerCase() const ext = res.tempFiles?.length == 1 && res.tempFiles[0].tempFilePath && res.tempFiles[0].tempFilePath.split('.').pop().toLowerCase()
......
...@@ -280,6 +280,7 @@ Page({ ...@@ -280,6 +280,7 @@ Page({
vin: vin, vin: vin,
licenseUrl: motorRegistrationCertificateUrl licenseUrl: motorRegistrationCertificateUrl
}).then(res => { }).then(res => {
this.setData({confirmFlag: false})
wx.$util.hideLoading() wx.$util.hideLoading()
if (res.data.code == 0) { if (res.data.code == 0) {
wx.navigateBack() wx.navigateBack()
...@@ -287,6 +288,7 @@ Page({ ...@@ -287,6 +288,7 @@ Page({
wx.$util.showToast(res.data.msg || '请求失败') wx.$util.showToast(res.data.msg || '请求失败')
} }
}).catch(error => { }).catch(error => {
this.setData({confirmFlag: false})
wx.$util.hideLoading() wx.$util.hideLoading()
}) })
}, },
......
...@@ -219,6 +219,13 @@ Page({ ...@@ -219,6 +219,13 @@ Page({
this.getList(); this.getList();
}, },
handleDetail(e) {
let { value } = e.currentTarget.dataset
if (value.reportUrl && value.status == 1) {
wx.$router.jumpH5(value.reportUrl)
}
},
addReport() { addReport() {
wx.navigateTo({ wx.navigateTo({
url: '/packageUsedCar/pages/indexPage/reportManage/addReport/addReport' url: '/packageUsedCar/pages/indexPage/reportManage/addReport/addReport'
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="请输入车架号" class="input" confirm-type="search" value="{{ keyWord }}" placeholder-class="input-placeholder" bindinput="searchInput" bindconfirm="searchConfirm" /> <input type="text" placeholder="请输入车架号" class="input" confirm-type="search" value="{{ keyWord }}" placeholder-class="input-placeholder" maxlength="17" bindinput="searchInput" bindconfirm="searchConfirm" />
<block wx:if="{{ keyWord }}"> <block wx:if="{{ keyWord }}">
<view bindtap="handleReset" class="clearBtn"> <view bindtap="handleReset" class="clearBtn">
<image src="/images/clear.png" class="search-clear" /> <image src="/images/clear.png" class="search-clear" />
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<view class="top-empty"></view> <view class="top-empty"></view>
<block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind"> <block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<block wx:for="{{ i }}" wx:key="index"> <block wx:for="{{ i }}" wx:key="index">
<view class="list-item"> <view class="list-item" bindtap="handleDetail" data-value="{{item}}">
<view class="top flex"> <view class="top flex">
<view class="flex"> <view class="flex">
<image class="type-icon" src="{{IMG_URL}}usedCar/{{item.reportType == 1 ? 'maintenance_icon' : 'accident_icon'}}.png" mode=""/> <image class="type-icon" src="{{IMG_URL}}usedCar/{{item.reportType == 1 ? 'maintenance_icon' : 'accident_icon'}}.png" mode=""/>
......
...@@ -86,5 +86,18 @@ module.exports = { ...@@ -86,5 +86,18 @@ module.exports = {
'dj.api.smartcarlife.construction.count.technician.items', 'dj.api.smartcarlife.construction.count.technician.items',
data data
) )
},
/**
*
* 门店号是否是直营门店校验
*/
checkMerchantDirect(data) {
return api.post('dj.api.car.boutique.resident.direct.sale.merchant', data)
},
/**
* 查询给定日期如果填了日报是否缺失接待记录
*/
checkMissingReception(data) {
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.check', data)
} }
} }
...@@ -21,6 +21,7 @@ const app = getApp() ...@@ -21,6 +21,7 @@ const app = getApp()
let time = null let time = null
let modalQueue = [] let modalQueue = []
import commonApi from '~/api/api' import commonApi from '~/api/api'
import dayjs from 'dayjs'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -51,6 +52,7 @@ Page({ ...@@ -51,6 +52,7 @@ Page({
background: ['demo-text-1', 'demo-text-2', 'demo-text-3'], background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
todoList: [], todoList: [],
stodoList: [], stodoList: [],
missingRecordTodoList: [],
todos: { todos: {
1: '日报填写提醒', 1: '日报填写提醒',
2: '今日尚未开单', 2: '今日尚未开单',
...@@ -489,7 +491,7 @@ Page({ ...@@ -489,7 +491,7 @@ Page({
id: taskId id: taskId
}) })
} }
if (['话术萃取', '话术核验'].includes(item.name)) { if (['话术萃取', '话术核验', '接待缺失报备'].includes(item.name)) {
return wx.$router.go(item.path, { return wx.$router.go(item.path, {
params: item.params params: item.params
}) })
...@@ -1653,6 +1655,69 @@ Page({ ...@@ -1653,6 +1655,69 @@ Page({
noCheckdailyReport: true noCheckdailyReport: true
}) })
} }
if (isStaff ||
userInfo.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5) {
/**门店是否直营 */
api.checkMerchantDirect({
merchantId: userInfo.shopMerchantId,
scene: 1
}).then( async res => {
if (res.data) {
if (newMenu.every(item => item.name != '接待缺失报备')) {
newMenu.push({
name: '接待缺失报备',
path: 'packageEquity.missingReception',
icon: 'missing-reception',
noCheckdailyReport: true
})
}
if (menu.every(item => item.name != '接待缺失报备')) {
menu.push({
name: '接待缺失报备',
path: 'packageEquity.missingReception',
icon: 'missing-reception',
noCheckdailyReport: true
})
}
let { uuid, merchantId, shopMerchantId } = userInfo
api.checkMissingReception({
merchantId: shopMerchantId,
yqMerchantId: merchantId,
staffUuid: uuid,
sceneType: 1,
reportStartDate: dayjs().subtract(6, 'day').format('YYYY-MM-DD'),
reportEndDate: dayjs().format('YYYY-MM-DD')
}).then(result => {
let missingRecordTodoList = []
if (result.code == 0) {
result.data.reverse().map(e => {
if (
e.missingReceptionRecord &&
!e.hasReceptionReport &&
!missingRecordTodoList.length
)
missingRecordTodoList.push(e)
})
}
this.setData({
missingRecordTodoList
})
})
} else {
let delIndex = newMenu.findIndex(
item => item.name == '接待缺失报备'
)
if (delIndex != -1) newMenu = newMenu.splice(delIndex, 1)
let delMIndex = menu.findIndex(item => item.name == '接待缺失报备')
if (delMIndex != -1) menu = menu.splice(delMIndex, 1)
this.setData({
missingRecordTodoList: []
})
}
})
}
this.setData( this.setData(
{ {
menu, menu,
...@@ -1674,6 +1739,16 @@ Page({ ...@@ -1674,6 +1739,16 @@ Page({
) )
this.getIsBusinessSchoolEnableCurrentUser() this.getIsBusinessSchoolEnableCurrentUser()
}, },
gotoMissingReception() {
const [item] = this.data.missingRecordTodoList
wx.$router._to(
'/packageEquity/pages/missingReception/missingReception',
{
reportDate: item.reportDate
},
'navigateTo'
)
},
getAwaitAuditCount(userInfo, index) { getAwaitAuditCount(userInfo, index) {
getWaitAuditCountAPI({ sceneType: userInfo?.sceneType }).then(res => { getWaitAuditCountAPI({ sceneType: userInfo?.sceneType }).then(res => {
let { code, data } = res let { code, data } = res
......
...@@ -134,10 +134,11 @@ ...@@ -134,10 +134,11 @@
</view> </view>
</view> </view>
<view wx:if="{{ userInfo.loginRole != 7 }}"> <view wx:if="{{ userInfo.loginRole != 7 }}">
<block wx:if="{{ isWait&&todoList.length>0 }}"> <block wx:if="{{ isWait&&(todoList.length>0 || missingRecordTodoList.length > 0) }}">
<view class="todo-list"> <view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view> <view class="title">今日待办·{{todoList.length + missingRecordTodoList.length}}</view>
<view class="todo-items"> <view class="todo-items">
<block wx:if="{{todoList.length}}">
<view class="todo-item" wx:for="{{ ispopUp?todoList:stodoList }}" wx:for-index="idx" wx:key="idx"> <view class="todo-item" wx:for="{{ ispopUp?todoList:stodoList }}" wx:for-index="idx" wx:key="idx">
<view class="todo-item-title"> <view class="todo-item-title">
<image src="{{ IMG_URL}}{{item.taskType=='1'?'warn':'task' }}.png" /> <image src="{{ IMG_URL}}{{item.taskType=='1'?'warn':'task' }}.png" />
...@@ -149,8 +150,19 @@ ...@@ -149,8 +150,19 @@
<view class="todo-item-btn" wx:elif="{{ item.taskId==1 }}" data-id="{{ item.taskId }}" bindtap="goto">去填写</view> <view class="todo-item-btn" wx:elif="{{ item.taskId==1 }}" data-id="{{ item.taskId }}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{ item.taskId }}">关闭提醒</view> <view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{ item.taskId }}">关闭提醒</view>
</view> </view>
</block>
<block wx:if="{{missingRecordTodoList.length}}" wx:key="idx" wx:for-index="idx">
<view class="todo-item" wx:if="{{ispopUp || (!ispopUp && stodoList.length < 2)}}">
<view class="todo-item-title">
<image src="{{IMG_URL}}warn.png" />
<text>接待缺失报备</text>
</view>
<view class="todo-item-info">请报备缺失接待客户的原因</view>
<view class="todo-item-btn" bindtap="gotoMissingReception">去报备</view>
</view>
</block>
</view> </view>
<view class="pack-up {{ !ispopUp?'pack-up-active':'' }}" wx:if="{{ todoList.length>2 }}" bindtap="packupList"> <view class="pack-up {{ !ispopUp?'pack-up-active':'' }}" wx:if="{{ (missingRecordTodoList.length + todoList.length)>2 }}" bindtap="packupList">
<image src="{{ IMG_URL }}pack-up.png" /> <image src="{{ IMG_URL }}pack-up.png" />
</view> </view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!