Files
BMS/bms-front/src/api/price/surcharge.js
T

90 lines
2.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import request from '@/utils/request'
// ========== 附加费配置 ==========
/** 查询附加费配置列表 */
export function listSurcharge(query) {
return request({
url: '/price/surcharge/list',
method: 'get',
params: query
})
}
/** 查询附加费配置详细 */
export function getSurcharge(scId) {
return request({
url: '/price/surcharge/' + scId,
method: 'get'
})
}
/** 查询指定产品的附加费关联(非分页,含附加费与明细展示字段) */
export function listSurchargeByProduct(productCode, priceType) {
return request({
url: '/price/surcharge/byProduct/' + productCode,
method: 'get',
params: priceType ? { priceType } : undefined
})
}
/** 附加费配置全量(非分页,套餐明细勾选用;不要求 price:surcharge:list 权限) */
export function listSurchargeOptions(query) {
return request({
url: '/price/surcharge/options',
method: 'get',
params: query
})
}
/** 绑定附加费到产品/明细(scId + productCode + detailId) */
export function addSurchargeRel(data) {
return request({
url: '/price/surcharge/rel',
method: 'post',
data: data
})
}
/** 解绑附加费关联 */
export function delSurchargeRel(relIds) {
return request({
url: '/price/surcharge/rel/' + relIds,
method: 'delete'
})
}
/** 新增附加费配置 */
export function addSurcharge(data) {
return request({
url: '/price/surcharge',
method: 'post',
data: data
})
}
/** 修改附加费配置 */
export function updateSurcharge(data) {
return request({
url: '/price/surcharge',
method: 'put',
data: data
})
}
/** 停用附加费配置(原地修改 ss_code=of,不新增数据、不物理删除) */
export function disableSurcharge(scIds) {
return request({
url: '/price/surcharge/disable/' + scIds,
method: 'put'
})
}
/** 启用附加费配置(原地修改 ss_code=on,不新增数据) */
export function enableSurcharge(scIds) {
return request({
url: '/price/surcharge/enable/' + scIds,
method: 'put'
})
}