137 lines
2.7 KiB
JavaScript
137 lines
2.7 KiB
JavaScript
import request from '@/utils/request'
|
|
import {tansParams} from "@/utils/ruoyi"
|
|
|
|
// 查询销售收票单列表
|
|
export function listInvoice(query) {
|
|
return request({
|
|
url: '/finance/invoice/list',
|
|
method: 'post',
|
|
headers: {
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
params: query
|
|
})
|
|
}
|
|
|
|
// 查询销售收票单详细
|
|
export function getInvoice(id) {
|
|
return request({
|
|
url: '/finance/invoice/' + id,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 查询销售收票单附件
|
|
export function getInvoiceAttachments(id, params) {
|
|
return request({
|
|
url: `/finance/invoice/attachment/${id}`,
|
|
method: 'get',
|
|
params
|
|
})
|
|
}
|
|
|
|
// 上传销售收票单附件
|
|
export function uploadInvoiceAttachment(data) {
|
|
return request({
|
|
url: '/finance/invoice/uploadReceipt',
|
|
method: 'post',
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data'
|
|
},
|
|
data: data,
|
|
needLoading: true
|
|
});
|
|
}
|
|
|
|
// 申请红冲
|
|
export function redRush(id) {
|
|
return request({
|
|
url: '/finance/invoice/applyRefund/' + id,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 申请红冲 (提交表单)
|
|
export function applyRefund(data) {
|
|
return request({
|
|
url: '/finance/invoice/applyRefund',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 退回销售收票单
|
|
export function returnInvoice(id) {
|
|
return request({
|
|
url: '/finance/invoice/return/' + id,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
// 新增销售收票单
|
|
export function addInvoice(data) {
|
|
return request({
|
|
url: '/finance/receivable/mergeAndInitiateInvoice',
|
|
method: 'post',
|
|
data: data,
|
|
needLoading: true
|
|
})
|
|
}
|
|
|
|
// 查询销售收票单产品明细
|
|
export function getInvoiceProducts(code) {
|
|
return request({
|
|
url: '/finance/invoice/product/' + code,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 申请开票
|
|
export function applyInvoice(data) {
|
|
return request({
|
|
url: '/finance/invoice/apply',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 撤销销售收票单
|
|
export function revokeInvoice(id) {
|
|
return request({
|
|
url: '/finance/invoice/revoke/' + id,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
// 查询开票审批列表
|
|
export function listInvoiceApprove(query) {
|
|
return request({
|
|
url: '/finance/invoice/approve/list',
|
|
method: 'post',
|
|
headers: {
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data: query
|
|
})
|
|
}
|
|
|
|
// 查询已审批开票列表
|
|
export function listInvoiceApproved(query) {
|
|
return request({
|
|
url: '/finance/invoice/approved/list',
|
|
method: 'post',
|
|
headers: {
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data: query
|
|
})
|
|
}
|
|
|
|
// 查询开票单详细
|
|
export function getInvoiceDetail(id) {
|
|
return request({
|
|
url: '/finance/invoice/' + id,
|
|
method: 'get'
|
|
})
|
|
}
|