nursing_unit_vue/src/views/invoicing/fkd/NuInvoicingFkdMain.data.ts

54 lines
1.5 KiB
TypeScript

import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '付款单单号',
align: 'center',
dataIndex: 'fkdNo',
width: 200,
},
{
title: '供应商名称',
align: 'center',
dataIndex: 'gysName',
width: 400,
},
{
title: '总金额(元)',
align: 'center',
dataIndex: 'totalPrice',
customRender: ({ text }) => {
const num = parseFloat(text);
// 处理无效值
if (isNaN(num)) {
return '0.00';
}
// 格式化为两位小数
return num.toFixed(2);
},
},
{
title: '付款状态',
align: 'center',
dataIndex: 'status_dictText',
},
{
title: '付款时间',
align: 'center',
dataIndex: 'fksj',
},
];
// 高级查询数据
export const superQuerySchema = {
fkdNo: { title: '付款单单号', order: 0, view: 'text', type: 'string' },
gysName: { title: '供应商名称', order: 2, view: 'text', type: 'string' },
totalPrice: { title: '总金额', order: 5, view: 'number', type: 'number' },
status: { title: '付款状态 0待付款 1作废 2已付款', order: 6, view: 'list', type: 'string', dictCode: 'invoicing_payment_status' },
fksj: { title: '付款时间', order: 7, view: 'datetime', type: 'string' },
};