import CONFIG from "@/config";

export default function useColumns() {
  // const TableColumns = [
  //   {
  //     item: { width: 100, key: "puOrgName", title: "采购组织", require: true },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "name",
  //       referName: "ORG_PARAM",
  //       dataMapping: {
  //         puOrg: "code",
  //         puOrgName: "name",
  //       },
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "code", title: "合同编码" },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: { width: 100, key: "status", title: "状态" },
  //     attr: {
  //       is: "el-dict-tag",
  //       dictName: "documents_status",
  //       disabled: true,
  //       value: "0",
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "lastPuMoney", title: "年度采购额" },
  //     attr: {
  //       is: "el-input-number",
  //       precision: CONFIG.precision,
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "buyerName", title: "采购员", require: true },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "name",
  //       referName: "CONTACTS_PARAM",
  //       dataMapping: {
  //         buyer: "code",
  //         buyerName: "name",
  //         puDept: "deptId",
  //         puDeptName: "deptName",
  //       },
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "supplierName", title: "供应商", require: true },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "name",
  //       referName: "SUPPLIER_PARAM",
  //       dataMapping: {
  //         supplier: "code",
  //         supplierName: "name",
  //       },
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "contractType",
  //       title: "合同类型",
  //       require: true,
  //     },
  //     attr: { is: "el-dict-tag", dictName: "puarchase_contract_contract_type" },
  //   },
  //   {
  //     item: { width: 100, key: "puMoneyYear", title: "合同总金额" },
  //     attr: {
  //       is: "el-input-number",
  //       precision: CONFIG.precision,
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "puDeptName", title: "采购部门", require: true },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "name",
  //       referName: "DEPT_PARAM",
  //       dataMapping: {
  //         puDept: "code",
  //         puDeptName: "name",
  //       },
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "supplierTier",
  //       title: "供应商层级",
  //       require: true,
  //     },
  //     attr: { is: "el-dict-tag", dictName: "puarchase_contract_supplier_tier" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "contractName",
  //       title: "合同名称",
  //       require: true,
  //     },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "grossRateAverage",
  //       title: "平均毛利率 (%)",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-input-number",
  //       precision: 2,
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "approveFlow",
  //       title: "审批流程",
  //       require: true,
  //     },
  //     attr: { is: "el-dict-tag", dictName: "puarchase_contract_approve_flow" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "consumableClass",
  //       title: "耗材类别",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-dict-tag",
  //       dictName: "puarchase_contract_consumable_class",
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "effectiveDate",
  //       title: "合同生效日期",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-date-picker",
  //       valueFormat: "yyyy-MM-dd",
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "brandGrossRate",
  //       title: "同类品牌及毛利率 (%)",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-input-number",
  //       precision: 2,
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "contractFormat",
  //       title: "合同格式",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-dict-tag",
  //       dictName: "puarchase_contract_contract_format",
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "productName",
  //       title: "产品类别&名称",
  //       require: true,
  //     },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "endDate",
  //       title: "合同终止日期",
  //       require: true,
  //     },
  //     attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "invoiceTax",
  //       title: "发票税率 (%)",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "ntaxrate",
  //       referName: "TAX_RATE_PARAM",
  //       dataMapping: {
  //         invoiceTax: "ntaxrate",
  //       },
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "emergencyDegree",
  //       title: "紧急程度",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-dict-tag",
  //       dictName: "puarchase_contract_emergency_degree",
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "project", title: "项目医院", require: true },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "deliveryType",
  //       title: "交货方式",
  //       require: true,
  //     },
  //     attr: { is: "el-dict-tag", dictName: "puarchase_contract_delivery_type" },
  //   },
  //   {
  //     item: { width: 100, key: "source", title: "合同来源" },
  //     attr: { is: "el-input", value: "自制", disabled: true },
  //   },
  //   {
  //     item: { width: 100, key: "contractPartycName", title: "合同丙方" },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "name",
  //       referName: "SUPPLIER_PARAM",
  //       dataMapping: {
  //         contractPartyc: "code",
  //         contractPartycName: "name",
  //       },
  //     },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "guaranteePeriodEnd",
  //       title: "质保期限",
  //       require: true,
  //     },
  //     attr: { is: "el-input-number", precision: 2 },
  //   },
  //   {
  //     item: { width: 100, key: "freightMethods", title: "运费承担方式" },
  //     attr: {
  //       is: "el-dict-tag",
  //       dictName: "puarchase_contract_freight_methods",
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "signDate", title: "合同签订日期" },
  //     attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
  //   },
  //   {
  //     item: { width: 100, key: "isTarget", title: "是否有指标", require: true },
  //     attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "contractTarget",
  //       title: "合同指标",
  //       require: true,
  //     },
  //     attr: { is: "el-input", placeholder: '当【是否有指标】="有"时，必填' },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "exemptionPostageCondtion",
  //       title: "包邮条件",
  //       span: 12,
  //     },
  //     attr: {
  //       is: "el-input",
  //       placeholder:
  //         "当运费承担方式为供应商有条件承担时，该字段必填，填写要求，写明什么条件下供应商承担全部，什么条件下我方承担，什么条件下分别承担",
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "isRebate", title: "是否有返利", require: true },
  //     attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
  //   },
  //   {
  //     item: { width: 100, key: "rebatePolicy", title: "返利政策", span: 18 },
  //     attr: {
  //       is: "el-input",
  //       placeholder: '当【是否有返利】="有"时，必填',
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "externalContract", title: "外部合同号" },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "rollbackPolicy",
  //       title: "退换货政策",
  //       require: true,
  //     },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: { width: 100, key: "enquiryCode", title: "询价单号" },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "contractContent",
  //       title: "合同主要内容",
  //       require: true,
  //       span: 24,
  //     },
  //     attr: { is: "el-input", type: "textarea" },
  //   },
  //   {
  //     item: { width: 100, key: "refusalReasons", title: "拒绝理由", span: 24 },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: { width: 100, key: "pigeonhole", title: "是否归档" },
  //     attr: { is: "el-dict-tag", dictName: "sys_yes_no", disabled: true },
  //   },
  //   {
  //     item: { width: 100, key: "pigeonholeFile", title: "归档附件", span: 24 },
  //     attr: { is: "el-file-preview", fileType: ["pdf"], disabled: true },
  //   },
  //   {
  //     item: { width: 100, key: "externalFile", title: "对外附件", span: 24 },
  //     attr: { is: "el-file-preview", fileType: ["pdf"] },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "puFile",
  //       title: "盖章合同附件",
  //       span: 24,
  //     },
  //     attr: { is: "el-file-preview", fileType: ["pdf"] },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "supplierFile",
  //       title: "供应商盖章合同附件",
  //       span: 24,
  //     },
  //     attr: { is: "el-file-preview", fileType: ["pdf"] },
  //   },
  //   {
  //     item: { width: 100, key: "projectCode", title: "项目编号" },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: { width: 100, key: "projectName", title: "项目名称" },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: { width: 100, key: "area", title: "区域" },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: { width: 100, key: "consigneePhone", title: "收货人联系方式" },
  //     attr: { is: "el-input" },
  //   },
  //   {
  //     item: {
  //       width: 100,
  //       key: "paymentAgreement",
  //       title: "付款协议",
  //       require: true,
  //     },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "name",
  //       referName: "PAYAGREEMENT_PARAM",
  //       dataMapping: {
  //         paymentAgreement: "code",
  //         paymentAgreementName: "name",
  //       },
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "taxPrice", title: "价税合计" },
  //     attr: {
  //       is: "el-input-number",
  //       precision: CONFIG.precision,
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "currencyName", title: "币种", require: true },
  //     attr: {
  //       is: "el-popover-select-v2",
  //       valuewidth: 100,
  //       key: "name",
  //       referName: "CURRENCY_PARAM",
  //       dataMapping: {
  //         currency: "code",
  //         currencyName: "name",
  //       },
  //     },
  //   },
  //   {
  //     item: { width: 100, key: "guaranteePeriod", title: "质保期" },
  //     attr: {
  //       is: "el-input-number",
  //       precision: CONFIG.precision,
  //     },
  //   },
  // ].map(({ item, attr }) => ({
  //   attr,
  //   item: { ...item, span: item.span || 6 },
  // }));

  const TableColumns = [
    {
      item: { key: "puOrgName", title: "采购组织", required: true, width: 150 },
      attr: {
        disabled:true,
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "ORG_PARAM",
        dataMapping: {
          puOrg: "code",
          puOrgName: "name",
        },
      },
    },
    {
      item: { key: "code", title: "合同编码", width: 150 },
      attr: { is: "el-input",disabled:true, },
    },
    {
      item: { key: "lastPuMoney", title: "年度采购额", width: 100 },
      attr: {
        is: "el-input-number",disabled:true,
      },
    },
    {
      item: { key: "buyerName", title: "采购员", required: true, width: 100 },
      attr: {
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "CONTACTS_PARAM",
        disabled:true,
        dataMapping: {
          buyer: "code",
          buyerName: "name",
          puDept: "deptId",
          puDeptName: "deptName",
        },
      },
    },
    {
      item: {
        key: "isPartya",
        title: "采购是否甲方",
        required: true,
        width: 100,

      },
      attr: {
        is: "el-select",
        dictName: "sys_yes_no",
        disabled:true,
      },
    },
    {
      item: {
        key: "contractType",
        title: "合同类型",
        required: true,
        width: 100,
      },
      attr: { is: "el-select", dictName: "puarchase_contract_contract_type",disabled:true, },
    },
    {
      item: { key: "puMoneyYear", title: "合同总金额", width: 100 },
      attr: {
        is: "el-input-number",
        disabled:true,
      },
    },
    {
      item: {
        key: "puDeptName",
        title: "采购部门",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "DEPT_PARAM",
        disabled:true,
        dataMapping: {
          puDept: "code",
          puDeptName: "name",
        },
      },
    },
    {
      item: {
        key: "supplierName",
        title: "供应商",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "SUPPLIER_PARAM",
        disabled:true,
        dataMapping: {
          supplier: "code",
          supplierName: "name",
        },
      },
    },
    {
      item: {
        key: "contractName",
        title: "合同名称",
        required: true,
        width: 100,
      },
      attr: { is: "el-input",disabled:true, },
    },
    {
      item: {
        key: "grossRateAverage",
        title: "平均毛利率 (%)",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-input-number",
        precision: 2,
        disabled:true,
      },
    },
    {
      item: {
        key: "approveFlow",
        title: "审批流程",
        required: true,
        width: 100,
      },
      attr: { is: "el-select", dictName: "puarchase_contract_approve_flow" ,disabled:true,},
    },
    {
      item: {
        key: "supplierTier",
        title: "供应商层级",
        required: true,
        width: 100,
      },
      attr: { is: "el-select", dictName: "puarchase_contract_supplier_tier",disabled:true, },
    },
    {
      item: {
        key: "effectiveDate",
        title: "合同生效日期",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-date-picker",
        valueFormat: "yyyy-MM-dd",
        disabled:true,
      },
    },
    {
      item: {
        key: "brandGrossRate",
        title: "同类品牌及毛利率 (%)",
        required: true,
      },
      attr: {
        is: "el-input",
        disabled:true,
        // is: "el-input-number",
        // precision: 2,
      },
    },
    {
      item: {
        key: "contractFormat",
        title: "合同格式",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-select",
        dictName: "puarchase_contract_contract_format",
        disabled:true,
      },
    },
    {
      item: {
        key: "consumableClass",
        title: "耗材类别",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-select",
        dictName: "puarchase_contract_consumable_class",
        disabled:true,
      },
    },
    {
      item: {
        key: "endDate",
        title: "合同终止日期",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-date-picker",
        valueFormat: "yyyy-MM-dd",
        disabled:true,
        // disabled: (prop) => !prop.effectiveDate,
        // pickerOptions: (prop) => {
        //   return {
        //     disabledDate(time) {
        //       return time.getTime() < Date.now(prop.effectiveDate);
        //     },
        //   };
        // },
      },
    },
    {
      item: {
        key: "invoiceTax",
        title: "发票税率 (%)",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-popover-select-v2",
        valueKey: "ntaxrate",
        referName: "TAX_RATE_PARAM",
        disabled:true,
        dataMapping: {
          invoiceTax: "ntaxrate",
        },
      },
    },
    {
      item: {
        key: "emergencyDegree",
        title: "紧急程度",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-select",
        dictName: "puarchase_contract_emergency_degree",
        disabled:true,
      },
    },
    {
      item: {
        key: "productName",
        title: "产品类别&名称",
        required: true,
        width: 100,
      },
      attr: { is: "el-input" ,disabled:true,},
    },
    {
      item: { key: "signDate", title: "合同签订日期", width: 100 },
      attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd",disabled:true, },
    },
   
    {
      item: {
        key: "deliveryType",
        title: "交货方式",
        required: true,
        width: 100,
      },
      attr: { is: "el-select", dictName: "puarchase_contract_delivery_type" ,disabled:true,},
    },
    {
      item: { key: "source", title: "合同来源", width: 100 },
      attr: { is: "el-input", value: "自制", disabled: true },
    },
    {
      item: { key: "principalManufacturers", title: "主要厂家", width: 100 },
      attr: { is: "el-input", disabled:true,},
    },
    {
      item: {
        key: "guaranteePeriodEnd",
        title: "质保期限",
        required: true,
        width: 100,
      },
      attr: { is: "el-input", disabled:true,},
    },
    {
      item: { key: "freightMethods", title: "运费承担方式", width: 100 },
      attr: {
        is: "el-select",
        dictName: "puarchase_contract_freight_methods",
        disabled:true,
      },
    },
    {
      item: { key: "createTime", title: "合同创建时间", width: 100 },
      attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" ,disabled:true,},
    },
    {
      item: { key: "project", title: "项目医院", required: true, width: 100 },
      attr: { is: "el-input" ,disabled:true,},
    },
    {
      item: { key: "contractPartycName", title: "合同丙方", width: 100 },
      attr: {
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "SUPPLIER_PARAM",
        disabled:true,
        dataMapping: {
          contractPartyc: "code",
          contractPartycName: "name",
        },
      },
    },
    {
      item: {
        key: "exemptionPostageCondtion",
        title: "包邮条件",
        span: 12,
        width: 100,
      },
      attr: {
        is: "el-input",
        disabled:true,
        placeholder:
          "当运费承担方式为供应商有条件承担时，该字段必填，填写要求，写明什么条件下供应商承担全部，什么条件下我方承担，什么条件下分别承担",
      },
    },
    {
      item: {
        key: "isTarget",
        title: "是否有指标",
        required: true,
        width: 100,
      },
      attr: { is: "el-select", dictName: "sys_yes_no",disabled:true, },
    },
    {
      item: {
        key: "contractTarget",
        title: "合同指标",
        width: 100,
        required: (prop) => prop.isTarget === "Y",
      },
      attr: { is: "el-input", placeholder: '当【是否有指标】="有"时，必填' ,disabled:true,},
    },
    {
      item: {
        key: "rollbackPolicy",
        title: "退换货政策",
        required: true,
        width: 100,
        span:12,
      },
      attr: { is: "el-input" ,disabled:true,},
    },
    {
      item: {
        key: "isRebate",
        title: "是否有返利",
        required: true,
        width: 100,
      },
      attr: { is: "el-select", dictName: "sys_yes_no" ,disabled:true,},
    },
    {
      item: {
        key: "rebatePolicy",
        title: "返利政策",
        span: 18,
        width: 100,
        required: (prop) => prop.isRebate === "Y",
      },
      attr: {
        is: "el-input",
        disabled:true,
        placeholder: '当【是否有返利】="有"时，必填',
      },
    },
    {
      item: {
        key: "contractContent",
        title: "合同主要内容",
        required: true,
        span: 24,
        width: 100,
      },
      attr: { is: "el-input", type: "textarea",disabled:true,rows:3, },
    },
    {
      item: { key: "enquiryCode", title: "询价单号", width: 100 },
      attr: { is: "el-input" ,disabled:true,},
    },
    {
      item: { key: "electronicContract", title: "电子合同", span: 6, width: 100 },
      attr: { is: "el-input" ,disabled:true,},
    },
    {
      item: { key: "refusalReasons", title: "拒绝理由", span: 6, width: 100 },
      attr: { is: "el-input" ,disabled:true,},
    },
    {
      item: { key: "status", title: "状态" },
      attr: {
        is: "el-select",
        dictName: "documents_status",
        disabled: true,
        value: "0",
      },
    },
    {
      item: { key: "externalFile", title: "附件", span: 12, width: 100 },
      attr: { is: "el-file-upload", fileType: ["pdf","doc","docx","png","jpg","xls","xlsx"] ,disabled:true,},
    },
    {
      item: {
        key: "puFile",
        title: "盖章合同附件",
        span: 12,
        width: 100,
      },
      attr: { is: "el-file-upload", fileType: ["pdf"] ,disabled:true,},
    },
    // {
    //   item: {
    //     key: "supplierFile",
    //     title: "供应商盖章合同附件",
    //     span: 24,
    //     width: 100,
    //   },
    //   attr: { is: "el-file-upload", fileType: ["pdf"] },
    // },
    {
      item: {
        key: "paymentAgreement",
        title: "付款协议",
        required: true,
        width: 100,
      },
      attr: {
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "PAYAGREEMENT_PARAM",
        disabled:true,
        dataMapping: {
          paymentAgreement: "code",
          paymentAgreementName: "name",
        },
      },
    },
    {
      item: { key: "taxPrice", title: "价税合计", width: 100 },
      attr: {
        is: "el-input-number",
        disabled:true,
      },
    },
    {
      item: { key: "currencyName", title: "币种", required: true, width: 100 },
      attr: {
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "CURRENCY_PARAM",
        disabled:true,
        dataMapping: {
          currency: "code",
          currencyName: "name",
        },
      },
    },
    {
      item: { key: "guaranteePeriod", title: "质保期", width: 100,disabled:true,},
      attr: {
        is: "el-input-number",
        disabled:true,
      },
    },
    
    
    // {
    //   item: { key: "externalContract", title: "外部合同号", width: 100 },
    //   attr: { is: "el-input" },
    // },
    
    
    // {
    //   item: { key: "projectCode", title: "项目编号", width: 100 },
    //   attr: { is: "el-input" },
    // },
    // {
    //   item: { key: "projectName", title: "项目名称", width: 100 },
    //   attr: { is: "el-input" },
    // },
    // { item: { key: "area", title: "区域" }, attr: { is: "el-input" } },
    // {
    //   item: { key: "consigneePhone", title: "收货人联系方式", width: 100 },
    //   attr: { is: "el-input" },
    // },
   
  ].map(({ item, attr }) => ({
    attr,
    item: { ...item, hidden: true, span: item.span || 6 },
  }));
  const TabColumns = [
    {
      item: { title: "物料基本信息", width: 100, key: "contractItemList" },
      attr: { value: [] },
      TableColumns: [
        {
          item: {
            title: "物料名称",
            width: 100,
            key: "materialName",
          },
          attr: {},
        },
        {
          item: {
            title: "物料编码",
            width: 100,
            key: "material",
          },
          attr: {},
        },
        {
          item: {
            title: "规格",
            width: 100,
            key: "specification",
          },
          attr: {},
        },
        {
          item: {
            title: "生产厂家",
            width: 100,
            key: "manufacturer",
          },
          attr: {},
        },
        {
          item: { title: "采购单位", width: 100, key: "puUnit" },
          attr: {},
        },
        {
          item: { title: "税率%", width: 100, key: "tax" },
          attr: {},
        },
        {
          item: { title: "采购数量", width: 100, key: "qty" },
          attr: {},
        },
        {
          item: { title: "含税单价", width: 100, key: "taxPrice" },
          attr: {},
        },
        {
          item: { title: "含税金额合计", width: 100, key: "taxMoney" },
          attr: {},
        },
        {
          item: { title: "无税单价", width: 100, key: "taxFreePrice" },
          attr: {},
        },
        {
          item: { title: "无税金额合计", width: 100, key: "taxFreeMoney" },
          attr: {},
        },
        {
          item: {
            title: "注册证号及备案凭证号",
            width: 100,
            key: "registration",
          },
          attr: {},
        },
        {
          item: { title: "收货客户", width: 100, key: "customerName" },
          attr: {},
        },
      ],
    },
    {
      item: { title: "合同条款", width: 100, key: "contractClauseList" },
      attr: {
        value: [],
      },
      TableColumns: [
        {
          item: { title: "条款编码", width: 100, key: "code", width: "auto" },
          attr: {},
        },
        {
          item: { title: "条款名称", width: 100, key: "name", width: "auto" },
          attr: {},
        },
        {
          item: {
            title: "条款内容",
            width: 100,
            key: "content",
            width: "auto",
          },
          attr: {},
        },
        {
          item: {
            title: "变量序号",
            width: 100,
            key: "variableRowno",
            width: "auto",
          },
          attr: {},
        },
        {
          item: {
            title: "变量内容",
            width: 100,
            key: "variableContent",
            width: "auto",
          },
          attr: {},
        },
      ],
    },
    {
      item: { title: "合同费用", width: 100, key: "contractExpenseList" },
      attr: {
        value: [],
      },
      TableColumns: [
        {
          item: { title: "费用编码", width: 100, key: "code", width: "auto" },
          attr: {},
        },
        {
          item: { title: "费用名称", width: 100, key: "name", width: "auto" },
          attr: {},
        },
        {
          item: { title: "费用金额", width: 100, key: "money", width: "auto" },
          attr: {},
        },
      ],
    },
    {
      item: { title: "付款协议信息", width: 100, key: "contractAgreementList" },
      attr: {
        value: [],
      },
      TableColumns: [
        {
          item: { title: "付款阶段", width: 100, key: "satge" },
          attr: { is: "el-input-number" },
        },
        {
          item: {
            title: "付款起点",
            width: 100,
            key: "origin",
          },
          attr: {
            is: "el-dict-tag",
            dictName: "puarchase_contract_origin",
          },
        },
        {
          item: { title: "账期天数", width: 100, key: "paymetDays" },
          attr: {},
        },
        {
          item: { title: "付款比例%", width: 100, key: "ratio" },
          attr: {},
        },
        {
          item: { title: "付款金额", width: 100, key: "money" },
          attr: {},
        },
        {
          item: {
            title: "是否预付款",
            width: 100,
            key: "isAdvance",
          },
          attr: {
            is: "el-dict-tag",
            dictName: "sys_yes_no",
          },
        },
        {
          item: {
            title: "是否质保金",
            width: 100,
            key: "isQuality",
          },
          attr: {
            is: "el-dict-tag",
            dictName: "sys_yes_no",
          },
        },
        {
          item: {
            title: "结算方式",
            width: 100,
            key: "paymentMeans",
          },
          attr: {},
        },
        {
          item: {
            title: "需进度确认",
            width: 100,
            key: "schedule",
          },
          attr: {
            is: "el-dict-tag",
            dictName: "sys_yes_no",
          },
        },
      ],
    },
    {
      item: {
        title: "合同执行组织范围",
        width: 100,
        key: "contractApplyOrgList",
      },
      attr: { value: [] },
      TableColumns: [
        {
          item: {
            title: "组织名称",
            key: "orgName",
            width: "auto",
          },
          attr: {},
        },
        {
          item: { title: "组织编码", key: "org", width: "auto" },
          attr: {},
        },
      ],
    },
  ];
  return { TableColumns, TabColumns };
}
