receive.data.tsx 3.51 KB
import { FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
import { icon } from 'ant-design-vue';
import { FilePptOutlined } from '@ant-design/icons-vue';
import { size } from 'lodash-es';
import { ref } from 'vue';

export const searchFormSchema: FormSchema[] = [
  {
    field: 'invoiceNo',
    label: 'Invoice编号',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'status',
    label: '总经理审核',
    component: 'Select',
    colProps: { span: 6 },
    componentProps: {
      options: [
        { label: '未提交审核', value: -1 },
        { label: '待审核', value: 0 },
        { label: '审核通过', value: 10 },
        { label: '审核驳回', value: 20 },
      ],
    },
  },
  {
    field: 'customerCode',
    label: '客户编码',
    component: 'Input',
    colProps: {
      span: 6,
    },
    // labelWidth: 140,
  },
];

export const columns: BasicColumn[] = [
  {
    title: 'Invoice编号',
    dataIndex: 'invoiceNo',
    width: 180,
  },
  {
    title: '报关单',
    dataIndex: 'bgUrl',
    width: 80,
    customRender: (column) => {
      const bgUrl = column.record.bgUrl;
      return <FilePptOutlined style="font-size:25px" onClick={() => window.open(bgUrl)} />;
    },
  },
  {
    title: '必须回款日期',
    dataIndex: 'backRefundDate',
    width: 120,
  },
  {
    title: '发生扣款金额$',
    dataIndex: 'deductAmount',
    width: 120,
  },
  {
    title: '上传扣款单',
    dataIndex: 'deductUrl',
    width: 80,
    customRender: (column) => {
      const deductUrl = column.record.deductUrl;
      if (deductUrl == undefined) {
        return;
      }
      // return <FilePptOutlined style="font-size:25px" onClick={() => window.open(deductUrl[0])} />;
      return <FilePptOutlined style="font-size:25px" />;
    },
  },
  {
    title: '实际应收金额$',
    dataIndex: 'actualReceivableAmount',
    width: 120,
  },
  {
    title: '实际收款金额1$',
    dataIndex: 'actualPayedAmount1',
    width: 120,
  },
  {
    title: '实际收款金额2$',
    dataIndex: 'actualPayedAmount2',
    width: 120,
  },
  {
    title: '实际收款金额3$',
    dataIndex: 'actualPayedAmount3',
    width: 120,
  },
  {
    title: '其他费用$',
    dataIndex: 'otherAmount',
    width: 120,
  },
  {
    title: '总经理审核',
    dataIndex: 'status',
    width: 120,
    customRender: (column) => {
      if (column.record.status == -1) {
        return '未提交审核';
      } else if (column.record.status == 0) {
        return '待审核';
      } else if (column.record.status == 10) {
        return '审核通过';
      } else if (column.record.status == 20) {
        return '审核驳回';
      }
    },
  },
];

export const columnsAnalysis: BasicColumn[] = [
  {
    title: '实际应付金额总计$',
    dataIndex: 'actualPayedAmount',
    width: 50,
    // customRender: (column) => {
    //   console.log(column, 5656666);
    //   return 1;
    // },
  },
  {
    title: '实际应收金额总计$',
    dataIndex: 'actualReceivableAmount',
    width: 50,
  },
  {
    title: '客户总价$',
    dataIndex: 'customerTotalPrice',
    width: 50,
  },
  {
    title: '发生扣款金额总计$',
    dataIndex: 'deductAmount',
    width: 50,
  },
  {
    title: '实际应收金额总计$',
    dataIndex: 'actualReceivableAmount',
    width: 50,
  },
  {
    title: '实际应收$',
    dataIndex: 'otherAmount',
    width: 50,
  },
  {
    title: '其他费用金额汇总$',
    dataIndex: 'otherTotalAmount',
    width: 50,
  },
];