应付账单初始化

This commit is contained in:
caojia
2026-11-04 16:04:38 +08:00
committed by liuminghui
parent 04be15deab
commit 51a89b18e1
90 changed files with 15661 additions and 6 deletions
+53
View File
@@ -0,0 +1,53 @@
import request from '@/utils/request'
/** 应付邮编配置:导入整本 Excel,列表只展示合并后的分区和附加费 */
export function listPayPostcode(query) {
return request({
url: '/data/payPostcode/list',
method: 'get',
params: query
})
}
export function getPayPostcode(groupId) {
return request({
url: '/data/payPostcode/' + groupId,
method: 'get'
})
}
export function updatePayPostcode(data) {
return request({
url: '/data/payPostcode',
method: 'put',
data
})
}
export function listPayPostcodeLine(query) {
return request({
url: '/data/payPostcode/line',
method: 'get',
params: query
})
}
export function importPayPostcode(file) {
const data = new FormData()
data.append('file', file)
return request({
url: '/data/payPostcode/import',
method: 'post',
data,
headers: { 'Content-Type': 'multipart/form-data', repeatSubmit: false },
timeout: 10 * 60 * 1000
})
}
export function delPayPostcode(groupIds) {
return request({
url: '/data/payPostcode/' + groupIds,
method: 'delete'
})
}
+149
View File
@@ -0,0 +1,149 @@
import request from '@/utils/request'
// 应付价卡配置。预览不入库,保存才写入 pay_ 表。
/** 分页查询已保存的应付产品 */
export function listPay(query) {
return request({
url: '/price/pay/list',
method: 'get',
params: query
})
}
/** 产品详情,含重量段、附加费和其他配置 */
export function getPay(productId) {
return request({
url: '/price/pay/' + productId,
method: 'get'
})
}
/** 按字典匹配工作表,返回预览,不写数据库 */
export function previewPay(file, dictValue) {
const data = new FormData()
data.append('file', file)
if (dictValue) data.append('dictValue', dictValue)
return request({
url: '/price/pay/preview',
method: 'post',
data,
// 必须声明 multipart,否则全局 application/json 会把文件流改写成空 JSON
headers: { 'Content-Type': 'multipart/form-data', repeatSubmit: false },
timeout: 10 * 60 * 1000
})
}
/** 修改已保存的公共模板 */
export function updatePay(data) {
return request({
url: '/price/pay',
method: 'put',
data
})
}
/** 已导入模板,供渠道下拉。payType 默认应付 AP */
export function payOptions(payType = 'AP') {
return request({
url: '/price/pay/options',
method: 'get',
params: { payType }
})
}
export function bindChannelPay(channelId, productId, payType = 'AP') {
return request({
url: '/price/pay/channel/' + channelId + '/bind',
method: 'put',
data: { productId, payType }
})
}
export function comparePay(leftId, rightId) {
return request({
url: '/price/pay/compare',
method: 'get',
params: { leftId, rightId }
})
}
export function getChannelPay(channelId) {
return request({
url: '/price/pay/channel/' + channelId,
method: 'get'
})
}
export function saveChannelPay(channelId, data) {
return request({
url: '/price/pay/channel/' + channelId,
method: 'post',
data
})
}
export function reimportChannelPay(channelId, file) {
const data = new FormData()
data.append('file', file)
return request({
url: '/price/pay/channel/' + channelId + '/reimport',
method: 'post',
data,
headers: { 'Content-Type': 'multipart/form-data', repeatSubmit: false },
timeout: 10 * 60 * 1000
})
}
/** 保存预览里勾选的产品 */
export function savePay(data) {
return request({
url: '/price/pay/save',
method: 'post',
data,
timeout: 120000
})
}
/** 一个产品的全部价格版本 */
export function listPayTerm(productId) {
return request({
url: '/price/pay/term/list',
method: 'get',
params: { productId }
})
}
/** 修改某一版的生效起止 */
export function updatePayTerm(data) {
return request({
url: '/price/pay/term',
method: 'put',
data
})
}
/** 生效或失效 */
export function changePayTermStatus(data) {
return request({
url: '/price/pay/term/status',
method: 'put',
data
})
}
/** 按订单渠道上的应付产品生成应付账单 */
export function generatePayBill(billId) {
return request({
url: '/price/pay/order/' + billId,
method: 'post'
})
}
/** 删除产品及其重量段、附加费、其他配置 */
export function delPay(productIds) {
return request({
url: '/price/pay/' + productIds,
method: 'delete'
})
}
+29
View File
@@ -0,0 +1,29 @@
import request from '@/utils/request'
export function listPayBill(query) {
return request({ url: '/price/payBill/list', method: 'get', params: query })
}
export function getPayBill(billId) {
return request({ url: '/price/payBill/' + billId, method: 'get' })
}
export function previewPayBill(data) {
return request({ url: '/price/payBill/preview', method: 'post', data })
}
export function generatePayBill(data) {
return request({ url: '/price/payBill', method: 'post', data, timeout: 10 * 60 * 1000 })
}
export function confirmPayBill(billId) {
return request({ url: '/price/payBill/confirm/' + billId, method: 'put' })
}
export function payPayBill(billId) {
return request({ url: '/price/payBill/paid/' + billId, method: 'put' })
}
export function voidPayBill(data) {
return request({ url: '/price/payBill/void', method: 'put', data })
}