dailyTemplateApi.js
2.77 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import http from '../request/http'
import { env } from '../../env'
const ENV = env == 'ip' ? 'develop' : env,
configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?env=${ENV}`
/**
*
* @param {*} templateType 1: 驻店 2:门店 3:洽谈
*
* @returns
*/
const getDailyTemplate = async (templateType) => {
try {
const configModule = {
1: 'staff-daily-template',
2: 'store-daily-template',
3: 'negotiation-details-template',
}[templateType]
const data = await http.uni_request({ url: `${configUrl}&moduleUrl=${configModule}` })
return Promise.resolve(data)
} catch (error) {
return Promise.reject(error)
}
}
/**
* 查询日报是否填写列表
* @param {*} data
* @returns
*/
const getReportList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.weekly.list',
projectName: 'boutique',
...data
})
}
/**
查询日报详情
*/
const getReportDetail = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.detail.get',
projectName: 'boutique',
...data
})
}
/**
是否需要新版本日报填报
*/
const isNewVersionNeed = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.new.version.isNeed',
projectName: 'boutique',
...data
})
}
/**
查询门店日报本月待邀约数
*/
const getMonthlyPendingCount = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.monthly.pending.get',
projectName: 'boutique',
...data
})
}
/**
查询洽谈明细驻店人员名单
*/
const getDiscussionStaffList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.discussion.staff.list',
projectName: 'boutique',
...data
})
}
/**
日报草稿数据保存
*/
const saveDraft = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.dynamic.draft.save',
projectName: 'boutique',
...data
})
}
/**
日报数据提交
*/
const submitReport = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.dynamic.save',
projectName: 'boutique',
...data
})
}
/**
* 当前门店驻店人员在选中成交日期交付的延保及权益订单
*/
const getGoodsOrderList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.goodsOrder.product.outputValue.list',
projectName: 'boutique',
...data
})
}
module.exports = {
getDailyTemplate,
getReportList,
getReportDetail,
isNewVersionNeed,
getMonthlyPendingCount,
saveDraft,
getDiscussionStaffList,
submitReport,
getGoodsOrderList
}