123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- export default function useColumns() {
- const SearchColumns = [
- {
- item: { key: "projectName", title: "项目名称" },
- attr: {
- is: "el-input",
- clearable: true,
- }
- },
- {
- item: { key: "supplierName", title: "供应商" },
- attr: {
- is: "el-popover-select-v2",
- referName: "SUPPLIER_PARAM",
- valueKey: "name",
- dataMapping: {
- supplier: "code",
- supplierName: "name",
- },
- clearable: true,
- }
- },
- {
- item: { key: "spdProjectName", title: "SPD项目" },
- attr: {
- is: "el-popover-select-v2",
- referName: "CUSTOMER_PARAM",
- valueKey: "name",
- dataMapping: {
- spdProject: "code",
- spdProjectName: "name",
- },
- clearable: true,
- }
- },
- {
- item: { key: "saleOrgName", title: "销售组织" },
- attr: {
- is: "el-popover-select-v2",
- referName: "ORG_PARAM",
- valueKey: "name",
- dataMapping: {
- saleOrg: "id",
- saleOrgName: "name",
- },
- clearable: true,
- }
- },
- {
- item: { key: "materialCode", title: "物料编码" },
- attr: {
- clearable: true,
- is: "el-popover-select-v2",
- valueKey: "code",
- referName: "MATERIAL_PARAM",
- }
- },
- {
- item: { key: "isTicket", title: "是否开票" },
- attr: {
- is: "el-select",
- dictName: "sys_yes_no",
- clearable: true,
- }
- },
- {
- item: { key: "saleOrderNo", title: "销售订单号" },
- attr: {
- is: "el-input",
- clearable: true,
- }
- },
- {
- item: { key: "status", title: "单据状态" },
- attr: {
- is: "el-select",
- dictName: "sys_status",
- clearable: true,
- }
- },
- {
- item: { key: "code", title: "单据号" },
- attr: {
- is: "el-input",
- clearable: true,
- }
- },
- ];
- const TableColumns = [
- {
- item: { key: "status", title: "单据状态", width: 100, },
- attr: {
- is: "el-dict-tag",
- dictName: "sys_status",
- clearable: true,
- }
- },
- {
- item: { key: "code", title: "单据号", width: 150, },
- attr: {}
- },
- {
- item: { key: "projectName", title: "项目名称" },
- attr: {}
- },
- {
- item: { key: "supplierName", title: "供应商" },
- attr: {}
- },
- {
- item: { key: "calculateSupplierName", title: "结算供应商" },
- attr: {}
- },
- {
- item: { key: "startDate", title: "结算开始日期", width: 120, },
- attr: {}
- },
- {
- item: { key: "endDate", title: "结算截止日期", width: 120, },
- attr: {}
- },
- {
- item: { key: "spdProjectName", title: "SPD项目" },
- attr: {}
- },
- {
- item: { key: "profileCenterName", title: "利润中心" },
- attr: {}
- },
- {
- item: { key: "saleOrgName", title: "销售组织" },
- attr: {}
- },
- {
- item: { key: "saleMonth", title: "销售月份", width: 100, },
- attr: {}
- },
- {
- item: { key: "priceSum", title: "价税合计", width: 120, },
- attr: {}
- },
- {
- item: { key: "serviceFee", title: "服务费", width: 120, },
- attr: {}
- },
- {
- item: { key: "materialCode", title: "物料编码" },
- attr: {}
- },
- {
- item: { key: "num", title: "数量", width: 100, },
- attr: {}
- },
- {
- item: { key: "isSaleOrder", title: "是否转销售订单", width: 100, },
- attr: {
- is: "el-dict-tag",
- dictName: "sys_yes_no",
- }
- },
- {
- item: { key: "saleOrderNo", title: "销售订单号" },
- attr: {}
- },
- {
- item: { key: "isReturnMoney", title: "是否回款", width: 80, },
- attr: {
- is: "el-dict-tag",
- dictName: "sys_return_money",
- }
- },
- {
- item: { key: "isTicket", title: "是否开票", width: 80, },
- attr: {
- is: "el-dict-tag",
- dictName: "sys_yes_no",
- }
- },
- {
- item: { key: "isOpen", title: "单据打开状态", width: 100, },
- attr: {
- is: "el-dict-tag",
- dictName: "sys_open_status",
- clearable: true,
- }
- },
- {
- item: { key: "isWhether", title: "是否带量", width: 100, },
- attr: {
- is: "el-dict-tag",
- dictName: "carry_or_not",
- clearable: true,
- }
- },
- ].map(({ item, attr }) => ({
- attr,
- item: {
- ...item,
- sortabled: true,
- fixedabled: true,
- filterabled: true,
- hiddenabled: true,
- },
- }));
- return { SearchColumns, TableColumns }
- }
|