refactor: 移除发票和估值审核中的“已拒绝”和“已通过”状态。
This commit is contained in:
parent
7c59d3385a
commit
e990b0eb68
@ -38,7 +38,6 @@ const handleDateRangeChange = (val) => {
|
||||
const statusOptions = [
|
||||
{ label: '未开票', value: 'pending' },
|
||||
{ label: '已开票', value: 'invoiced' },
|
||||
{ label: '已拒绝', value: 'rejected' },
|
||||
{ label: '已退款', value: 'refunded' },
|
||||
]
|
||||
|
||||
@ -51,7 +50,6 @@ const renderStatus = (status) => {
|
||||
const statusMap = {
|
||||
pending: { type: 'warning', text: '未开票' },
|
||||
invoiced: { type: 'success', text: '已开票' },
|
||||
rejected: { type: 'error', text: '已拒绝' },
|
||||
refunded: { type: 'info', text: '已退款' },
|
||||
}
|
||||
const config = statusMap[status] || { type: 'default', text: '-' }
|
||||
|
||||
@ -1,15 +1,11 @@
|
||||
export const STATUS_OPTIONS = [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '待审核', value: 'pending' },
|
||||
{ label: '已通过', value: 'approved' },
|
||||
{ label: '已拒绝', value: 'rejected' },
|
||||
{ label: '已完成', value: 'success' },
|
||||
]
|
||||
|
||||
export const STATUS_MAP = {
|
||||
pending: { type: 'warning', text: '待审核' },
|
||||
approved: { type: 'success', text: '已通过' },
|
||||
rejected: { type: 'error', text: '已拒绝' },
|
||||
success: { type: 'success', text: '已完成' },
|
||||
}
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ const columns = [
|
||||
}
|
||||
)
|
||||
}
|
||||
if (['approved', 'rejected', 'success'].includes(row.status)) {
|
||||
if (row.status === 'success') {
|
||||
return h(
|
||||
NButton,
|
||||
{
|
||||
|
||||
@ -41,22 +41,31 @@ const router = useRouter()
|
||||
const loading = ref(false)
|
||||
const tableData = ref([...props.assetList])
|
||||
|
||||
function handleDownloadReport(item) {
|
||||
// window.$message?.info('下载报告功能开发中')
|
||||
if (item.certificate_download_urls && item.certificate_download_urls[0]) {
|
||||
window.open(item.certificate_download_urls[0], '_blank')
|
||||
function getDownloadLink(urls) {
|
||||
if (Array.isArray(urls) && urls.length > 0) {
|
||||
return urls[0]
|
||||
}
|
||||
if (typeof urls === 'string' && urls) {
|
||||
return urls
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function handleDownloadAction(item, urlKey, errorMessage) {
|
||||
const downloadLink = getDownloadLink(item[urlKey])
|
||||
if (downloadLink) {
|
||||
window.open(downloadLink, '_blank')
|
||||
} else {
|
||||
window.$message?.error('报告下载链接不存在')
|
||||
window.$message?.error(errorMessage)
|
||||
}
|
||||
}
|
||||
|
||||
function handleDownloadReport(item) {
|
||||
handleDownloadAction(item, 'certificate_download_urls', '报告下载链接不存在')
|
||||
}
|
||||
|
||||
function handleDownloadCertificate(item) {
|
||||
// window.$message?.info('下载证书功能开发中')
|
||||
if (item.report_download_urls && item.report_download_urls[0]) {
|
||||
window.open(item.report_download_urls[0], '_blank')
|
||||
} else {
|
||||
window.$message?.error('证书下载链接不存在')
|
||||
}
|
||||
handleDownloadAction(item, 'report_download_urls', '证书下载链接不存在')
|
||||
}
|
||||
|
||||
function formatDate(dateStr) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user