123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- import { ContentConfig } from "/@/components/PageContent";
- import { httpList, httpDelete } from "/@/api/purchase/orderPay";
- import dayjs from "dayjs";
- import { h } from "vue";
- import { ElTag } from "element-plus";
- import { purchPayStatusOptions } from "/@/utils/status";
- import { renderIconLabelLeft } from "/@/utils/columnRenderHelper";
- const columns = [
- {
- type: "selection",
- width: 40,
- align: "center",
- hide: ({ checkList }) => !checkList.includes("勾选列")
- },
- {
- label: "序号",
- type: "index",
- minWidth: 60,
- align: "left",
- hide: ({ checkList }) => !checkList.includes("序号列")
- },
- {
- label: "对账付款编码",
- prop: "dzNo",
- width: 150,
- align: "left"
- },
- {
- label: "对账编码",
- prop: "payNo",
- width: 150
- },
- {
- label: "状态",
- prop: "dstatus",
- width: 130,
- cellRenderer: ({ row, props }) =>
- h(
- ElTag,
- {
- size: props.size
- },
- {
- default: () =>
- purchPayStatusOptions.find(s => String(row.dstatus) === s.value)
- ?.label
- }
- )
- },
- {
- label: "本次付款金额",
- prop: "dpay_fee",
- width: 110,
- align: "left"
- },
- {
- label: "总额款",
- prop: "total_fee",
- width: 110
- },
- // {
- // label: "卖方公司编码",
- // prop: "supplierNo",
- // width: 150,
- // align: "left"
- // },
- {
- label: "卖出方公司",
- prop: "supplierName",
- minWidth: 180,
- ...renderIconLabelLeft('supplierNo', 'supplierName','卖出方公司编码:')
- },
- // {
- // label: "买方公司编码",
- // prop: "companyNo",
- // width: 150
- // },
- {
- label: "买入方公司名称",
- prop: "companyName",
- minWidth: 180,
- ...renderIconLabelLeft('companyNo', 'companyName','买入方公司编码:')
- },
- {
- label: "申请人",
- prop: "apply_name",
- width: 90,
- align: "left"
- },
- {
- label: "申请时间",
- width: 140,
- prop: "addtime",
- formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
- },
- {
- label: "操作",
- fixed: "right",
- width: 100,
- slot: "operation"
- }
- ];
- const contentConfig: ContentConfig = {
- title: "采购付款",
- columns,
- deleteProp: "dzNo",
- showDelete: ({ dstatus }) => Number(dstatus) !== 3,
- companyProp: "supplierNo",
- superUserNoAction: true,
- listNoRelation: true,
- apis: {
- httpList,
- httpDelete,
- httpAdd: true
- }
- };
- export default contentConfig;
|