|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
import { invoiceCodeList, invoiceStatusList } from '../columns'
|
|
|
|
|
import { BasicColumn } from '/@/components/Table'
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
import { h } from 'vue'
|
|
|
|
|
import { numberThousandFormat } from '/@/utils/commonUtil'
|
|
|
|
|
|
|
|
|
|
type DisplayCardList = Array<
|
|
|
|
|
Array<{
|
|
|
|
@ -9,6 +11,8 @@ type DisplayCardList = Array<
|
|
|
|
|
isSearch?: boolean
|
|
|
|
|
isDate?: boolean
|
|
|
|
|
isCustomRender?: boolean
|
|
|
|
|
isBold?: boolean
|
|
|
|
|
needNumberFormat?: boolean
|
|
|
|
|
list?: LabelValueOptions
|
|
|
|
|
}>
|
|
|
|
|
>
|
|
|
|
@ -17,45 +21,34 @@ export const displayCardList: DisplayCardList = [
|
|
|
|
|
[
|
|
|
|
|
{ label: '发票号码:', key: 'invoiceNumber' },
|
|
|
|
|
{ label: '发票代码:', key: 'invoiceCode' },
|
|
|
|
|
{ label: '发票类型代码:', key: 'invoiceTypeCode', isSearch: true, list: invoiceCodeList },
|
|
|
|
|
{ label: '发票类型:', key: 'invoiceTypeCode', isSearch: true, list: invoiceCodeList },
|
|
|
|
|
{ label: '发票状态:', key: 'invoiceStatus', isSearch: true, list: invoiceStatusList },
|
|
|
|
|
{ label: '发票请求流水号:', key: 'invoiceRequestNumber' },
|
|
|
|
|
{ label: '商品或服务名称:', key: 'itemOrServiceName' },
|
|
|
|
|
{ label: '开票日期:', key: 'invoicingDate', isDate: true },
|
|
|
|
|
{ label: '当前时间:', key: 'currentTime' },
|
|
|
|
|
{ label: '税控码:', key: 'taxControlCode' },
|
|
|
|
|
{ label: '开票单位代码:', key: 'invoiceUnitCode' },
|
|
|
|
|
{ label: '是否为纸质发票:', key: 'isPaperInvoice', isCustomRender: true },
|
|
|
|
|
{ label: '纸质发票号码:', key: 'paperInvoiceNumber' },
|
|
|
|
|
{ label: '特定要素:', key: 'specialElements' },
|
|
|
|
|
{ label: '特定要素类型代码:', key: 'specialElementTypeCode' },
|
|
|
|
|
{ label: '报销状态:', key: 'reimbursementStatus' },
|
|
|
|
|
{ label: '最终校验码:', key: 'finalCheckCode' },
|
|
|
|
|
{ label: '清单标志:', key: 'itemFlag' },
|
|
|
|
|
{ label: '机器编号:', key: 'machineCode' },
|
|
|
|
|
{ label: '机动车发票类型代码:', key: 'vehicleInvoiceTypeCode' },
|
|
|
|
|
{ label: '原发票号码:', key: 'originalInvoiceNumber' },
|
|
|
|
|
{ label: '是否已获取详情:', key: 'isDetailObtained', isCustomRender: true },
|
|
|
|
|
{ label: '备注:', key: 'remarks' },
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
{ label: '购方名称:', key: 'buyerName' },
|
|
|
|
|
{ label: '购方开票名称:', key: 'buyerInvoiceName' },
|
|
|
|
|
{ label: '购方税号:', key: 'buyerTaxNumber' },
|
|
|
|
|
{ label: '购方开票税号:', key: 'buyerInvoiceTaxNumber' },
|
|
|
|
|
{ label: '购方识别号:', key: 'buyerIdentificationNumber' },
|
|
|
|
|
{ label: '购方银行账户:', key: 'buyerBankAccount' },
|
|
|
|
|
{ label: '购方银行账号:', key: 'buyerBankAccountNumber' },
|
|
|
|
|
{ label: '购方地址电话:', key: 'buyerAddressPhone' },
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
{ label: '销方名称:', key: 'sellerName' },
|
|
|
|
|
{ label: '销方开票名称:', key: 'sellerInvoiceName' },
|
|
|
|
|
{ label: '销方税号:', key: 'sellerTaxNumber' },
|
|
|
|
|
{ label: '销方开票税号:', key: 'sellerInvoiceTaxNumber' },
|
|
|
|
|
{ label: '销方识别号:', key: 'sellerIdentificationNumber' },
|
|
|
|
|
{ label: '销方银行账户:', key: 'sellerBankAccount' },
|
|
|
|
|
{ label: '销方银行账号:', key: 'sellerBankAccountNumber' },
|
|
|
|
|
{ label: '销方地址电话:', key: 'sellerAddressPhone' },
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
@ -65,10 +58,20 @@ export const displayCardList: DisplayCardList = [
|
|
|
|
|
{ label: '操作员代码:', key: 'operatorCode' },
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
{ label: '合计金额:', key: 'totalAmount' },
|
|
|
|
|
{ label: '合计税额:', key: 'totalTax' },
|
|
|
|
|
{ label: '扣除额:', key: 'deductionAmount' },
|
|
|
|
|
{ label: '价税合计:', key: 'totalWithTax' },
|
|
|
|
|
{ label: '报销状态:', key: 'reimbursementType' },
|
|
|
|
|
{ label: '报销单编号:', key: 'reimbursementId' },
|
|
|
|
|
{ label: '报销人:', key: 'reimburser' },
|
|
|
|
|
{ label: '科目名称:', key: 'ledgerAccount' },
|
|
|
|
|
{ label: '报销事由:', key: 'reason' },
|
|
|
|
|
{ label: '报销申请时间:', key: 'reimbTime' },
|
|
|
|
|
{ label: '使用情况:', key: 'reimbursementDesc' },
|
|
|
|
|
{ label: '审核通过/驳回时间:', key: 'approvalTime' },
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
{ label: '合计金额:', key: 'totalAmount', isBold: true, needNumberFormat: true },
|
|
|
|
|
{ label: '合计税额:', key: 'totalTax', needNumberFormat: true },
|
|
|
|
|
{ label: '扣除额:', key: 'deductionAmount', needNumberFormat: true },
|
|
|
|
|
{ label: '价税合计:', key: 'totalWithTax', isBold: true, needNumberFormat: true },
|
|
|
|
|
],
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -94,11 +97,11 @@ export const columns: BasicColumn[] = [
|
|
|
|
|
width: 200,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '发票类型代码',
|
|
|
|
|
title: '发票类型',
|
|
|
|
|
dataIndex: 'invoiceTypeCode',
|
|
|
|
|
width: 200,
|
|
|
|
|
customRender({ text }) {
|
|
|
|
|
return invoiceCodeList.find((el) => el.value === text)?.label || ''
|
|
|
|
|
return invoiceCodeList.find((el) => el.value === text)?.label || '未知'
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -120,17 +123,31 @@ export const columns: BasicColumn[] = [
|
|
|
|
|
{
|
|
|
|
|
title: '金额',
|
|
|
|
|
dataIndex: 'amount',
|
|
|
|
|
width: 100,
|
|
|
|
|
width: 130,
|
|
|
|
|
customRender({ text }) {
|
|
|
|
|
return h(
|
|
|
|
|
'b',
|
|
|
|
|
{
|
|
|
|
|
style: {
|
|
|
|
|
fontWeight: 900,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
numberThousandFormat(text),
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '税率',
|
|
|
|
|
dataIndex: 'taxRate',
|
|
|
|
|
width: 100,
|
|
|
|
|
width: 130,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '税额',
|
|
|
|
|
dataIndex: 'taxAmount',
|
|
|
|
|
width: 100,
|
|
|
|
|
width: 130,
|
|
|
|
|
customRender({ text }) {
|
|
|
|
|
return numberThousandFormat(text)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '商品名称',
|
|
|
|
@ -159,6 +176,9 @@ export const columns: BasicColumn[] = [
|
|
|
|
|
title: '商品单价',
|
|
|
|
|
dataIndex: 'unitPrice',
|
|
|
|
|
width: 100,
|
|
|
|
|
customRender({ text }) {
|
|
|
|
|
return numberThousandFormat(text)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '商品编码',
|
|
|
|
@ -191,14 +211,26 @@ export const columns: BasicColumn[] = [
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export const getDisplayValLabel = (displayItem, detailInfo): string => {
|
|
|
|
|
if (displayItem['isSearch']) {
|
|
|
|
|
return (
|
|
|
|
|
displayItem?.['list'].find((el) => el.value === detailInfo?.[displayItem?.['key']])?.label ||
|
|
|
|
|
'未知'
|
|
|
|
|
)
|
|
|
|
|
} else if (displayItem['isDate']) {
|
|
|
|
|
return moment(detailInfo?.[displayItem?.['key']]).format('YYYY-MM-DD HH:mm:ss')
|
|
|
|
|
if (displayItem['key'] === 'reimbursementDesc') {
|
|
|
|
|
return detailInfo.reimbursementId
|
|
|
|
|
? `报销单号${detailInfo.reimbursementId}使用,报销人:${
|
|
|
|
|
detailInfo.reimburser
|
|
|
|
|
},报销时间:${moment(detailInfo.createTime).format('YYYY-MM-DD')} ,事由:${
|
|
|
|
|
detailInfo.reason ?? '-'
|
|
|
|
|
}`
|
|
|
|
|
: '-'
|
|
|
|
|
} else {
|
|
|
|
|
return detailInfo?.[displayItem?.['key']] || ''
|
|
|
|
|
if (displayItem['isSearch']) {
|
|
|
|
|
return (
|
|
|
|
|
displayItem?.['list'].find((el) => el.value === detailInfo?.[displayItem?.['key']])
|
|
|
|
|
?.label || '未知'
|
|
|
|
|
)
|
|
|
|
|
} else if (displayItem['isDate']) {
|
|
|
|
|
return moment(detailInfo?.[displayItem?.['key']]).format('YYYY-MM-DD HH:mm:ss')
|
|
|
|
|
} else if (displayItem['needNumberFormat']) {
|
|
|
|
|
return numberThousandFormat(detailInfo?.[displayItem?.['key']])
|
|
|
|
|
} else {
|
|
|
|
|
return detailInfo?.[displayItem?.['key']] || ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|