secondHandApi.js
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* @file 二手车业务接口。仅依赖主包请求层,避免二手车分包同步加载其他独立分包。
*/
import newApi from '~/packageUsedCar/newRequest'
import api from '~/utils/request/request'
/**
* 二手车查询员工昨天是否新入职或调店
*/
const checkUsedCarStaffIsNew = (data) => {
return api.post('dj.api.smartcarlife.secondHandCar.staffDailyReport.popup.need', data)
}
/**
* 查询员工是否需要填写二手车日报
*/
const checkUsedCarStaffDailyReportValid = (data) => {
return newApi.post('/carDailyReport/yesterday/check', {
...data
})
}
/**
* 查询二手车场景的门店日报周历提交标记;模板固定为门店日报,防止调用方误传其他模板。
* @param {Object} [data={}] 周历查询参数
* @param {string|number} data.merchantId 4S 店商户号
* @param {string} [data.staffUuid] 员工 UUID
* @param {string} data.reportStartDate 日报开始日期
* @param {string} data.reportEndDate 日报结束日期
* @returns {Promise<{code: string|number, message?: string, data?: Array<string>}>} 周历接口响应
*/
const fetchUsedCarStoreDailyReportWeeklyList = (data = {}) => {
return api.post('dj.api.smartcarlife.dailyReport.weekly.list', {
...data,
sceneType: 7,
templateType: 2
})
}
export {
newApi,
checkUsedCarStaffIsNew,
checkUsedCarStaffDailyReportValid,
fetchUsedCarStoreDailyReportWeeklyList
}