|
@@ -2,240 +2,266 @@ import CONFIG from "@/config";
|
|
|
|
|
|
export default function useColumns() {
|
|
export default function useColumns() {
|
|
const TableColumns = [
|
|
const TableColumns = [
|
|
- { item: { width:100,key: "puOrgName", title: "采购组织" }, attr: {} },
|
|
|
|
- { item: { width:100,key: "code", title: "合同编码" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "puOrgName", title: "采购组织" }, attr: {} },
|
|
|
|
+ { item: { width: 100, key: "code", title: "合同编码" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "status", title: "状态" },
|
|
|
|
|
|
+ item: { width: 100, key: "status", title: "状态" },
|
|
attr: { is: "el-dict-tag", dictName: "documents_status" },
|
|
attr: { is: "el-dict-tag", dictName: "documents_status" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "lastPuMoney", title: "上年度采购额" },
|
|
|
|
|
|
+ item: { width: 100, key: "lastPuMoney", title: "上年度采购额" },
|
|
attr: {
|
|
attr: {
|
|
- is: "el-computed-input-v2",
|
|
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- return (prop * 1).toFixed(CONFIG.precision);
|
|
|
|
|
|
+ const { lastPuMoney = 0 } = prop;
|
|
|
|
+ return (lastPuMoney * 1);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- { item: { width:100,key: "buyerName", title: "采购员" }, attr: {} },
|
|
|
|
- { item: { width:100,key: "supplierName", title: "供应商" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "buyerName", title: "采购员" }, attr: {} },
|
|
|
|
+ { item: { width: 100, key: "supplierName", title: "供应商" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "contractType", title: "合同类型" },
|
|
|
|
|
|
+ item: { width: 100, key: "contractType", title: "合同类型" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_contract_type",
|
|
dictName: "puarchase_contract_contract_type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "puMoneyYear", title: "本年度采购额" },
|
|
|
|
|
|
+ item: { width: 100, key: "puMoneyYear", title: "本年度采购额" },
|
|
attr: {
|
|
attr: {
|
|
- is: "el-computed-input-v2",
|
|
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- return (prop * 1).toFixed(CONFIG.precision);
|
|
|
|
|
|
+ const { puMoneyYear = 0 } = prop;
|
|
|
|
+ return (puMoneyYear * 1);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- { item: { width:100,key: "puDeptName", title: "采购部门" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "puDeptName", title: "采购部门" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "supplierTier", title: "供应商层级" },
|
|
|
|
|
|
+ item: { width: 100, key: "supplierTier", title: "供应商层级" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_supplier_tier",
|
|
dictName: "puarchase_contract_supplier_tier",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "contractName", title: "合同名称" },
|
|
|
|
|
|
+ item: { width: 100, key: "contractName", title: "合同名称" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "grossRateAverage", title: "平均毛利率 (%)" },
|
|
|
|
|
|
+ item: { width: 100, key: "grossRateAverage", title: "平均毛利率 (%)" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-computed-input-v2",
|
|
is: "el-computed-input-v2",
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- return (prop * 1).toFixed(CONFIG.precision);
|
|
|
|
|
|
+ const { grossRateAverage = 0 } = prop;
|
|
|
|
+ return (grossRateAverage * 1).toFixed(2);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "approveFlow", title: "审批流程" },
|
|
|
|
|
|
+ item: { width: 100, key: "approveFlow", title: "审批流程" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_approve_flow",
|
|
dictName: "puarchase_contract_approve_flow",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "consumableClass", title: "耗材类别" },
|
|
|
|
|
|
+ item: { width: 100, key: "consumableClass", title: "耗材类别" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_consumable_class",
|
|
dictName: "puarchase_contract_consumable_class",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "effectiveDate", title: "合同生效日期" },
|
|
|
|
|
|
+ item: { width: 100, key: "effectiveDate", title: "合同生效日期" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "brandGrossRate", title: "同类品牌及毛利率 (%)" },
|
|
|
|
|
|
+ item: {
|
|
|
|
+ width: 100,
|
|
|
|
+ key: "brandGrossRate",
|
|
|
|
+ title: "同类品牌及毛利率 (%)",
|
|
|
|
+ },
|
|
attr: {
|
|
attr: {
|
|
- is: "el-computed-input-v2",
|
|
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- return (prop * 1).toFixed(CONFIG.precision);
|
|
|
|
|
|
+ const { brandGrossRate = 2 } = prop;
|
|
|
|
+ return (brandGrossRate * 1).toFixed(2);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "contractFormat", title: "合同格式" },
|
|
|
|
|
|
+ item: { width: 100, key: "contractFormat", title: "合同格式" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_contract_format",
|
|
dictName: "puarchase_contract_contract_format",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "productName", title: "产品类别&名称" },
|
|
|
|
|
|
+ item: { width: 100, key: "productName", title: "产品类别&名称" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
- { item: { width:100,key: "endDate", title: "合同终止日期" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "endDate", title: "合同终止日期" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "invoiceTax", title: "发票税率 (%)" },
|
|
|
|
|
|
+ item: { width: 100, key: "invoiceTax", title: "发票税率 (%)" },
|
|
attr: {
|
|
attr: {
|
|
- is: "el-computed-input-v2",
|
|
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- return (prop * 1).toFixed(CONFIG.precision);
|
|
|
|
|
|
+ const { invoiceTax } = prop;
|
|
|
|
+ return (invoiceTax * 1).toFixed(2);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "emergencyDegree", title: "紧急程度" },
|
|
|
|
|
|
+ item: { width: 100, key: "emergencyDegree", title: "紧急程度" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_emergency_degree",
|
|
dictName: "puarchase_contract_emergency_degree",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- { item: { width:100,key: "project", title: "项目医院" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "project", title: "项目医院" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "deliveryType", title: "交货方式" },
|
|
|
|
|
|
+ item: { width: 100, key: "deliveryType", title: "交货方式" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_delivery_type",
|
|
dictName: "puarchase_contract_delivery_type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- { item: { width:100,key: "source", title: "合同来源" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "source", title: "合同来源" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "contractPartycName", title: "合同丙方" },
|
|
|
|
|
|
+ item: { width: 100, key: "contractPartycName", title: "合同丙方" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "guaranteePeriodEnd", title: "质保期限" },
|
|
|
|
|
|
+ item: { width: 100, key: "guaranteePeriodEnd", title: "质保期限" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "freightMethods", title: "运费承担方式" },
|
|
|
|
|
|
+ item: { width: 100, key: "freightMethods", title: "运费承担方式" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-dict-tag",
|
|
is: "el-dict-tag",
|
|
dictName: "puarchase_contract_freight_methods",
|
|
dictName: "puarchase_contract_freight_methods",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "signDate", title: "合同创建时间" },
|
|
|
|
|
|
+ item: { width: 100, key: "signDate", title: "合同创建时间" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "isTarget", title: "是否有指标" },
|
|
|
|
|
|
+ item: { width: 100, key: "isTarget", title: "是否有指标" },
|
|
attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
|
|
attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "contractTarget", title: "合同指标" },
|
|
|
|
|
|
+ item: { width: 100, key: "contractTarget", title: "合同指标" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "exemptionPostageCondtion", title: "包邮条件" },
|
|
|
|
|
|
+ item: { width: 100, key: "exemptionPostageCondtion", title: "包邮条件" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "isRebate", title: "是否有返利" },
|
|
|
|
|
|
+ item: { width: 100, key: "isRebate", title: "是否有返利" },
|
|
attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
|
|
attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "rebatePolicy", title: "返利政策" },
|
|
|
|
|
|
+ item: { width: 100, key: "rebatePolicy", title: "返利政策" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "externalContract", title: "外部合同号" },
|
|
|
|
|
|
+ item: { width: 100, key: "externalContract", title: "外部合同号" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "rollbackPolicy", title: "退换货政策" },
|
|
|
|
|
|
+ item: { width: 100, key: "rollbackPolicy", title: "退换货政策" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
- { item: { width:100,key: "enquiryCode", title: "询价单号" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "enquiryCode", title: "询价单号" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "contractContent", title: "合同主要内容" },
|
|
|
|
|
|
+ item: { width: 100, key: "contractContent", title: "合同主要内容" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "refusalReasons", title: "拒绝理由" },
|
|
|
|
|
|
+ item: { width: 100, key: "refusalReasons", title: "拒绝理由" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "pigeonhole", title: "是否归档" },
|
|
|
|
|
|
+ item: { width: 100, key: "pigeonhole", title: "是否归档" },
|
|
attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
|
|
attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "pigeonholeFile", title: "归档附件" },
|
|
|
|
|
|
+ item: {
|
|
|
|
+ width: 100,
|
|
|
|
+ key: "pigeonholeFile",
|
|
|
|
+ title: "归档附件",
|
|
|
|
+ filterabled: false,
|
|
|
|
+ },
|
|
attr: { is: "el-file-preview" },
|
|
attr: { is: "el-file-preview" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "externalFile", title: "对外附件" },
|
|
|
|
|
|
+ item: {
|
|
|
|
+ width: 100,
|
|
|
|
+ key: "externalFile",
|
|
|
|
+ title: "对外附件",
|
|
|
|
+ filterabled: false,
|
|
|
|
+ },
|
|
attr: { is: "el-file-preview" },
|
|
attr: { is: "el-file-preview" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "puFile", title: "采购商盖章合同附件" },
|
|
|
|
|
|
+ item: {
|
|
|
|
+ width: 100,
|
|
|
|
+ key: "puFile",
|
|
|
|
+ title: "采购商盖章合同附件",
|
|
|
|
+ filterabled: false,
|
|
|
|
+ },
|
|
attr: { is: "el-file-preview" },
|
|
attr: { is: "el-file-preview" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "supplierFile", title: "供应商盖章合同附件" },
|
|
|
|
|
|
+ item: {
|
|
|
|
+ width: 100,
|
|
|
|
+ key: "supplierFile",
|
|
|
|
+ title: "供应商盖章合同附件",
|
|
|
|
+ filterabled: false,
|
|
|
|
+ },
|
|
attr: { is: "el-file-preview" },
|
|
attr: { is: "el-file-preview" },
|
|
},
|
|
},
|
|
- { item: { width:100,key: "projectCode", title: "项目编号" }, attr: {} },
|
|
|
|
- { item: { width:100,key: "projectName", title: "项目名称" }, attr: {} },
|
|
|
|
- { item: { width:100,key: "area", title: "区域" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "projectCode", title: "项目编号" }, attr: {} },
|
|
|
|
+ { item: { width: 100, key: "projectName", title: "项目名称" }, attr: {} },
|
|
|
|
+ { item: { width: 100, key: "area", title: "区域" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "consigneePhone", title: "收货人联系方式" },
|
|
|
|
|
|
+ item: { width: 100, key: "consigneePhone", title: "收货人联系方式" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "paymentAgreement", title: "付款协议" },
|
|
|
|
|
|
+ item: { width: 100, key: "paymentAgreement", title: "付款协议" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "taxPrice", title: "价税合计" },
|
|
|
|
|
|
+ item: { width: 100, key: "taxPrice", title: "价税合计" },
|
|
attr: {
|
|
attr: {
|
|
- is: "el-computed-input-v2",
|
|
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- return prop ? (prop * 1).toFixed(CONFIG.precision) : "0.000000";
|
|
|
|
|
|
+ const { taxPrice = 0 } = prop;
|
|
|
|
+ return (taxPrice * 1);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- { item: { width:100,key: "currencyName", title: "币种" }, attr: {} },
|
|
|
|
|
|
+ { item: { width: 100, key: "currencyName", title: "币种" }, attr: {} },
|
|
{
|
|
{
|
|
- item: { width:100,key: "guaranteePeriod", title: "质保期" },
|
|
|
|
|
|
+ item: { width: 100, key: "guaranteePeriod", title: "质保期" },
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
].map(({ item, attr }) => ({
|
|
].map(({ item, attr }) => ({
|
|
attr,
|
|
attr,
|
|
item: {
|
|
item: {
|
|
- ...item,
|
|
|
|
sortabled: true,
|
|
sortabled: true,
|
|
fixedabled: true,
|
|
fixedabled: true,
|
|
filterabled: true,
|
|
filterabled: true,
|
|
hiddenabled: true,
|
|
hiddenabled: true,
|
|
|
|
+ ...item,
|
|
},
|
|
},
|
|
}));
|
|
}));
|
|
|
|
|
|
const SearchColumns = [
|
|
const SearchColumns = [
|
|
{
|
|
{
|
|
item: {
|
|
item: {
|
|
- width:100,key: "contractName",
|
|
|
|
|
|
+ width: 100,
|
|
|
|
+ key: "contractName",
|
|
title: "合同名称",
|
|
title: "合同名称",
|
|
},
|
|
},
|
|
attr: {
|
|
attr: {
|
|
@@ -243,7 +269,7 @@ export default function useColumns() {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { width:100,key: "status", title: "状态" },
|
|
|
|
|
|
+ item: { width: 100, key: "status", title: "状态" },
|
|
attr: {
|
|
attr: {
|
|
is: "el-select",
|
|
is: "el-select",
|
|
dictName: "documents_status",
|
|
dictName: "documents_status",
|
|
@@ -251,7 +277,8 @@ export default function useColumns() {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
item: {
|
|
item: {
|
|
- width:100,key: "pigeonhole",
|
|
|
|
|
|
+ width: 100,
|
|
|
|
+ key: "pigeonhole",
|
|
title: "是否归档",
|
|
title: "是否归档",
|
|
},
|
|
},
|
|
attr: {
|
|
attr: {
|