123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- import { ContentConfig } from "/@/components/PageContent";
- import { httpList } from "/@/api/purchase/ticketReturn";
- import dayjs from "dayjs";
- import { invType_options, status_options } from "./configs";
- import { h } from "vue";
- import { ElTag } from "element-plus";
- const columns = [
- {
- type: "selection",
- width: 55,
- hide: ({ checkList }) => !checkList.includes("勾选列")
- },
- {
- label: "序号",
- type: "index",
- width: 70,
- hide: ({ checkList }) => !checkList.includes("序号列")
- },
- {
- label: "id",
- prop: "id"
- },
- {
- label: "发票类型",
- prop: "invoiceType_cn"
- },
- {
- label: "发票状态",
- prop: "invStatus_cn"
- },
- {
- label: "发票号码",
- prop: "invoiceNumber"
- },
- {
- label: "录入方式",
- prop: "invType",
- formatter: ({ invType }) =>
- invType_options.find(item => item.value === invType)?.label
- },
- {
- label: "录入人",
- prop: "apply_name"
- },
- {
- label: "状态",
- prop: "status",
- width: 160,
- cellRenderer: ({ row, props }) =>
- h(
- ElTag,
- {
- size: props.size
- },
- {
- default: () => status_options.find(s => row.status === s.value)?.label
- }
- )
- },
- {
- label: "开票日期",
- prop: "open_time",
- formatter: ({ open_time }) =>
- open_time ? dayjs(open_time).format("YYYY-MM-DD HH:mm:ss") : ""
- },
- {
- label: "创建时间",
- prop: "addtime",
- formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
- },
- {
- label: "操作",
- fixed: "right",
- width: 60,
- slot: "operation"
- }
- ];
- const contentConfig: ContentConfig = {
- title: "企业客户",
- columns,
- apis: {
- httpList
- },
- powers: ["001", "002", "003", "004", "005", "006", "007", "008"]
- };
- export default contentConfig;
|