123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- export default function useColumns() {
- const TableColumns = [
- { item: { key: "orgName", title: "所属组织" }, attr: {} },
- { item: { key: "code", title: "单据编码" }, attr: {} },
- {
- item: { key: "applicationTime", title: "申请时间" },
- attr: { },
- },
- { item: { key: "status", title: "单据状态",width:120, },
- attr: {
-
- is: "el-dict-tag",
- dictName: "documents_status", // 字典名
- }
- },
- // { item: { key: "materialCode", title: "物料编码" }, attr: {} },
- // {
- // item: { key: "materialName", title: "物料名称" },
- // attr: {},
- // },
- { item: { key: "approverName", title: "最后审批人" }, attr: {} },
- { item: { key: "approvalTime", title: "最后审核时间" }, attr: {} },
- { item: { key: "createByName", title: "创建人" ,width:150, }, attr: {} },
- { item: { key: "createTime", title: "创建时间" }, attr: {} },
- {
- item: { key: "updateByName", title: "最后修改人" ,width:150, },
- attr: { },
- },
- { item: { key: "updateTime", title: "最后修改时间" }, attr: {} },
-
- {
- item:{ key: "approveUser", title: "当前审批人" ,},
- attr:{
- },
- },
-
- ].map(({ item, attr }) => ({
- attr,
- item: {
- ...item,
- sortabled: true,
- fixedabled: true,
- filterabled: true,
- hiddenabled: true,
- },
- }));
- const SearchColumns = [
- {
- item: { key: "materialCode", title: "物料编码" },
- attr: {
- is: "el-popover-select-v2",
- referName: "MATERIAL_PARAM",
- valueKey: "code",
- clearable:true,
- dataMapping: {
- materialName: "name",
- },
- },
- },
- {
- item:{
- key: "manufacturerIdName",
- title: "生产厂家/代理人",
- },
- attr:{
- clearable:true,
- is: "el-popover-select-v2",
- valueKey: "name",
- referName: "MANUFACTURER_PARAM",
- dataMapping: {
- manufacturerId: "id",
- },
- },
- },
- {
- item:{
- // key: "approverName",
- key: "createByName",
- title: "申请人",
- },
- attr: {
- clearable:true,
- is: "el-popover-select-v2",
- referName: "CONTACTS_PARAM",
- valueKey: "name",
- dataMapping: {
- // approver: "code",
- createBy: "code",
- },
- },
- },
- {
- item:{
- key: "applyTimeArray",
- title: "申请日期",
- // span:12,
- },
- attr: {
- clearable:true,
- is: "el-date-picker",
- type:"daterange",
- rangeSeparator:"-",
- startPlaceholder:"开始日期",
- endPlaceholder:"结束日期",
- valueFormat:"yyyy-MM-dd",
- },
- },
- {
- item: {
- key: "code",
- title: "单据编码",
- },
- attr: {
- clearable: true,
- is: "el-input",
- },
- },
- {
- item: { key: "status", title: "单据状态" },
- attr: {
- is: "el-select",
- dictName: "documents_status",
- clearable: true,
- },
- },
- {
- item: {
- key: "materialClassifyIds",
- title: "物料分类",
- },
- attr: {
- is: "el-popover-multiple-tree-select",
- // is: "el-popover-tree-select",
- referName: "MATERIALCLASSIFY_PARAM",
- valueKey: "id",
- clearable:true,
- },
- },
- {
- item:{
- key: "updateTimeArray",
- title: "修改日期",
- // span:12,
- },
- attr: {
- clearable:true,
- is: "el-date-picker",
- type:"daterange",
- rangeSeparator:"-",
- startPlaceholder:"开始日期",
- endPlaceholder:"结束日期",
- valueFormat:"yyyy-MM-dd",
- },
- },
- // {
- // item: { key: "materialName", title: "物料名称" },
- // attr: {
- // is: "el-popover-select-v2",
- // referName: "MATERIAL_PARAM",
- // valueKey: "name",
- // clearable:true,
- // dataMapping: {
- // materialCode: "code",
- // },
- // },
- // },
-
- ].map(({ item, attr }) => ({
- attr,
- item: { ...item, hidden: true, span: item.span || 6 },
- }));
- return { TableColumns, SearchColumns };
- }
|