dailyTemplateApi.js
3.84 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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.save',
projectName: 'boutique',
...data
})
}
/**
日报数据推送
*/
const submitReport = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.dailyReport.dynamic.data.push',
projectName: 'boutique',
...data
})
}
/**
* 当前门店驻店人员在选中成交日期交付的延保及权益订单
*/
const getGoodsOrderList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.goodsOrder.product.outputValue.list',
projectName: 'boutique',
...data
})
}
/**
* 查询员工账号上架门店的小场景值
*/
const getStaffBaseSceneCodeList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.scene.config.getUserScene',
projectName: 'boutique',
...data
})
}
/**
* 查询门店上架的小场景值
*/
const getStoreBaseSceneCodeList = async (data = {}) => {
return http.post({
method: 'dj.api.scenemerchantref.findByMerchantIdAndSceneType',
projectName: 'boutique',
...data
})
}
/**
* 统计客户今日计划到店数
*/
const getTodayPlanStoreCount = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.customer.todayPlanStore.count',
projectName: 'boutique',
...data
})
}
/**
* 查询客户今日计划到店列表
*/
const getTodayPlanStoreList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.customer.todayPlanStore.list',
projectName: 'boutique',
...data
})
}
module.exports = {
getDailyTemplate,
getReportList,
getReportDetail,
isNewVersionNeed,
getMonthlyPendingCount,
saveDraft,
getDiscussionStaffList,
submitReport,
getGoodsOrderList,
getStaffBaseSceneCodeList,
getStoreBaseSceneCodeList,
getTodayPlanStoreCount,
getTodayPlanStoreList
}