import { ContentConfig } from "/@/components/PageContent"; import { httpList } from "/@/api/InvoiceSales/sheetOrderPool"; import { h } from "vue"; import { ElImage, ElTag } from "element-plus"; import { useTypeOptions, send_status_list, xs_order_type_options, xs_order_source_options } from "/@/utils/status"; import { inv_open_status, retrun_status } from "./search.config"; const columns = [ { type: "selection", width: 40 }, // { // label: "序号", // type: "index", // width: 70, // hide: ({ checkList }) => !checkList.includes("序号列") // }, { label: "业务订单编码", prop: "sequenceNo", fixed: "left", width: 150 }, { label: "销售订单主编码", prop: "cxCode", width: 150 }, { label: "平台类型", width: 80, cellRenderer: ({ row }) => h(ElTag, null, { default: () => useTypeOptions.find(s => s.value === row.platform_type)?.label || "--" }) }, { label: "卖方公司编码", prop: "companyNo", width: 150 }, { label: "卖方公司名称", prop: "companyName", minWidth: 160 }, { label: "客户编码", prop: "customerNo", width: 150 }, { label: "客户名称", prop: "customerName", minWidth: 160 }, { label: "平台名称", prop: "platName", width: 100 }, { label: "商品类型", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => xs_order_type_options.find(s => s.value === row.qrdType)?.label || "--" }) }, { label: "发货状态", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => send_status_list.find(s => s.value === row.sendStatus)?.label || "--" }) }, { label: "订单来源", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => xs_order_source_options.find(s => s.value === row.qrdSource)?.label || "--" }) }, { label: "开票状态", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => inv_open_status.find(s => s.value === row.inv_status)?.label || "--" }) }, { label: "已开票", prop: "ainv_fee", width: 110 }, { label: "开票中", prop: "inv_fee", width: 110 }, { label: "未开票", prop: "winv_fee", width: 110 }, { label: "开票标签金额", prop: "inv_tag_fee", width: 110 }, { label: "标签图片", width: "70px", cellRenderer({ row }) { if (!row.inv_tag_img) return null; return h(ElImage, { src: row.inv_tag_img, previewSrcList: [row.inv_tag_img], previewTeleported: true, style: { height: "20px", width: "20px" } }); } }, { label: "回款状态", width: 100, cellRenderer: ({ row }) => { return h(ElTag, null, { default: () => retrun_status.find(s => s.value === row.pay_status)?.label }); } }, { label: "已回款", prop: "apay_fee", width: 110 }, { label: "回款中", prop: "pay_fee", width: 110 }, { label: "未回款", prop: "wpay_fee", width: 110 }, { label: "回款标签金额", prop: "pay_tag_fee", width: 110 }, { label: "标签图片", width: "70px", cellRenderer({ row }) { if (!row.pay_tag_img) return null; return h(ElImage, { src: row.pay_tag_img, previewSrcList: [row.pay_tag_img], previewTeleported: true, style: { height: "20px", width: "20px" } }); } }, { label: "销售员", prop: "ownerName", width: 70 }, { label: "部门", prop: "department", width: 70 }, { label: "操作", fixed: "right", width: 120, slot: "operation" } ]; const contentConfig: ContentConfig = { title: "销售订单公海池", columns, superUserNoAction: true, payProps: { prop: "sequenceNo", type: "3" }, returnProps: { prop: "sequenceNo", type: "4" }, showPayTagFn: (_, permissions) => permissions.includes("016"), showReturnTagFn: (_, permissions) => permissions.includes("015"), apis: { httpList } }; export default contentConfig;