import { ContentConfig } from "/@/components/PageContent"; import { httpList, httpAdd } from "/@/api/InvoiceSales/refund"; import dayjs from "dayjs"; import { ElTag, ElImage } from "element-plus"; import { h } from "vue"; import { RETRUN_STATUS } from "/@/utils/details/refund"; import { refund_type } from "./search.config"; const columns = [ { type: "selection", width: 55, hide: ({ checkList }) => !checkList.includes("勾选列") }, { label: "序号", type: "index", width: 70, hide: ({ checkList }) => !checkList.includes("序号列") }, { label: "退款编号", prop: "returnCode" }, { label: "资金编号", prop: "tradNo" }, { label: "资金认领编号", prop: "logNo" }, { label: "退款回执", prop: "return_img", cellRenderer: ({ row }) => { return h(ElImage, { src: row.return_img, style: { height: "20px" }, previewSrcList: [row.return_img], previewTeleported: true }); } }, { label: "退款原因", prop: "return_reason" }, { label: "申请人id", prop: "apply_id" }, { label: "申请人", prop: "apply_name" }, { label: "退款类型", prop: "status", cellRenderer: ({ row }) => { return h(ElTag, null, { default: () => refund_type.find(s => s.value === row.type)?.label || "--" }); } }, { label: "状态", prop: "status", cellRenderer: ({ row }) => { return h(ElTag, null, { default: () => RETRUN_STATUS.find(s => s.value === row.status)?.label || "--" }); } }, { label: "退款时间", prop: "addtime", formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss") }, { label: "操作", fixed: "right", width: 80, slot: "operation" } ]; const contentConfig: ContentConfig = { title: "退款申请管理", powers: ["001", "002", "003", "004", "005", "006", "007", "008"], columns, apis: { httpList, httpAdd } }; export default contentConfig;