import { ContentConfig } from "/@/components/PageContent"; import { httpList } from "/@/api/InvoiceSales/sheetOrderPool"; import { h } from "vue"; import { ElTag } from "element-plus"; import { TAG_TYPE } from "/@/utils/global"; import { accAdd } from "/@/utils/calculation"; import { cat_status, good_source, good_type } from "./search.config"; const USE_STATUS = [ { value: "0", label: "未对账" }, { value: "1", label: "参与对账" }, { value: "2", label: "参与核销对账" } ]; const columns = [ { type: "selection", width: 55, hide: ({ checkList }) => !checkList.includes("勾选列") }, { label: "序号", type: "index", width: 70, hide: ({ checkList }) => !checkList.includes("序号列") }, { label: "确认单编号", prop: "sequenceNo", width: 150 }, { label: "确认单名称", prop: "name", width: 150 }, { label: "销售员编号", prop: "ownerid", width: 100 }, { label: "销售员", prop: "ownerName" }, { label: "客户编号", prop: "customerNo", width: 100 }, { label: "客户名称", prop: "customerName", width: 100 }, { label: "状态", prop: "ststus", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => USE_STATUS.find(s => s.value === row.status)?.label || "--" }) }, { label: "部门", prop: "department", width: 100 }, { label: "平台名称", prop: "platName", width: 100 }, { label: "标签金额", prop: "tag_fee", width: 100 }, { label: "标签类型", prop: "tag_id", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => TAG_TYPE.find(s => s.value === row.tag_id)?.label || "无标签" }) }, { label: "未开票", prop: "winv_fee", width: 100, cellRenderer: ({ row }) => row.tag_id === "4" ? Number(row.winv_fee) - Number(row.tag_fee) : row.winv_fee }, { label: "开票中", prop: "inv_fee" }, { label: "已开票", prop: "ainv_fee", cellRenderer: ({ row }) => row.tag_id === "4" ? accAdd(row.ainv_fee, row.tag_fee) : row.ainv_fee }, { label: "未付款", prop: "wpay_fee", cellRenderer: ({ row }) => row.tag_id === "3" ? Number(row.wpay_fee) - Number(row.tag_fee) : row.wpay_fee }, { label: "付款中", prop: "pay_fee" }, { label: "已付款", prop: "apay_fee", width: 100, cellRenderer: ({ row }) => row.tag_id === "3" ? accAdd(row.apay_fee, row.tag_fee) : row.apay_fee }, { label: "商品类型", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => good_type.find(s => s.value === row.qrdType)?.label || "--" }) }, { label: "订单来源", width: 100, cellRenderer: ({ row }) => h(ElTag, null, { default: () => good_source.find(s => s.value === row.qrdSource)?.label || "--" }) }, { label: "标签id", prop: "tag_id", width: 100 }, { label: "标签添加人", prop: "tag_uname", width: 100 }, { label: "类目设置", cellRenderer: ({ row }) => h(ElTag, null, { default: () => cat_status.find(s => s.value === row.cat_status)?.label || "--" }) }, { label: "操作", fixed: "right", width: 120, slot: "operation" } ]; const contentConfig: ContentConfig = { title: "确认单公海池", powers: ["001", "002", "003", "004", "005", "006", "007", "008"], columns, payProps: { prop: "sequenceNo", type: "3" }, returnProps: { prop: "sequenceNo", type: "4" }, apis: { httpList } }; export default contentConfig;