equity.js
8.06 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
import http from '../request/http'
// 轻量去重:同参数短时间内复用同一个 Promise,避免页面/弹窗多次触发
const __sceneListPromiseCache = new Map()
module.exports = {
/**查询存在订单数据的场景列表 */
getSceneListWithOrder(data) {
const key = `getSceneListWithOrder:${JSON.stringify(data || {})}`
if (__sceneListPromiseCache.has(key)) return __sceneListPromiseCache.get(key)
const p = http.post({
method: 'dj.api.smartcarlife.scene.config.getUserScene',
projectName: 'boutique',
...data
}).finally(() => {
// 释放缓存,避免长期持有
__sceneListPromiseCache.delete(key)
})
__sceneListPromiseCache.set(key, p)
return p
},
/**保存用户最近选中的场景值 */
saveUserRecentScene(data) {
return http.post({
method: 'dj.api.smartcarlife.scene.recent.saveUserScene',
projectName: 'boutique',
...data
})
},
/**查询用户最近选中的场景值 */
getUserRecentScene(data) {
return http.post({
method: 'dj.api.smartcarlife.scene.recent.getUserScene',
projectName: 'boutique',
...data
})
},
/**新建车损报价单 */
quotationAdd(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add',
projectName: 'boutique',
...data
})
},
/** 报价单支付订单生成(带上签名)返回订单号(商户地址) */
quotationUpgrade(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.pay.order.generate',
projectName: 'boutique',
...data
})
},
// 校验订单是否需要上传合同协议
checkZyPayFlag(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check',
projectName: 'boutique',
...data
})
},
// 查询店铺配置
getShopMerchantPointConfig(data) {
return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique',
...data
})
},
/** 查询报价单信息 */
getQuotationInfoById(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id',
projectName: 'boutique',
...data
})
},
/**
* 订单详情
*/
getOrderDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.order.detail',
projectName: 'boutique',
...data
})
},
/**pos支付 */
getPosQr(data) {
return http.post({
method: 'dj.api.smartcarlife.payOrder.create',
projectName: 'boutique',
...data
})
},
/**
* 查询门店录单设置
},
*/
orderSettingList(data) {
return http.post({
method: 'dj.api.smartcarlife.order.field.setting.list',
projectName: 'boutique',
...data
})
},
/** 报价单分页列表 */
quotationPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique',
...data
})
},
/** 根据id查询报价单数据 */
getQuotationInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique',
...data
})
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique',
...data
})
},
/** 报价单订单分状态统计信息 */
orderStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique',
...data
})
},
// 查询订单是否支持状态变更
getOrderRefundStep(data) {
return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique',
...data
})
},
/**报价单-撤销工单 */
cancelOrderById(data) {
return http.post({
method: 'dj.api.smartcarlife.quotation.cancel',
projectName: 'boutique',
...data
})
},
// 车损报价单战败订单创建
defeatOrderCreate(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order',
projectName: 'boutique',
...data
})
},
// 更新合同协议内容
updateZyInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update',
projectName: 'boutique',
...data
})
},
/** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList(data) {
return http.post({
method: 'dj.api.smartcarlife.quotationGoods.list',
projectName: 'boutique',
...data
})
},
/**
* /** 修改车损报价单信息 */
updateQuotation(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update',
projectName: 'boutique',
...data
})
},
getCheckEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return http.post({
method: 'dj.api.smartcarlife.employee.onTheJob.getByMerchantId',
projectName: 'boutique',
...data
})
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
},
/** 更新报价单状态 */
updateOrderStatus(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update',
projectName: 'boutique',
...data
})
},
/**
* 服务信息详情
*
*/
getServiceInfoDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.detail',
projectName: 'boutique',
...data
})
},
/** 权益单分页列表 */
equityPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.page',
projectName: 'boutique',
...data
})
},
/** 权益单统计信息 */
equityStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.statics',
projectName: 'boutique',
...data
})
},
// 更新客户签名
updateCustomerNameUrlAPI(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl',
projectName: 'boutique',
...data
})
},
/** 查询合同*/
equityOrderList(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.listContracts',
projectName: 'boutique',
...data
})
},
/** 打印合同*/
printContract(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print',
projectName: 'boutique',
...data
})
},
/**
* 提交前检查车架号是否已购买
*/
checkVinBuyEquityOrder(data) {
return http.post(
{
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.vin.check',
projectName: 'boutique',
...data
},
true
)
},
/**提交权益单
*
*/
addEquityOrder(data) {
return http.post(
{
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.add',
projectName: 'boutique',
...data
},
true
)
},
/**
* 订单号查服务信息详情
*/
getEquityOrderByOrderId(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.handler',
projectName: 'boutique',
...data
})
},
// 查询订单是否支持状态变更
getOrderRefundStep(data) {
return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique',
...data
})
},
/** 标记错误订单 */
errorOrderById(data) {
return http.post({
method: 'dj.api.smartcarlife.quotation.correct',
projectName: 'boutique',
...data
})
}
}