12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- export default function useColumns() {
- const TableColumns = [
- { item: { key: "orgId", title: "所属组织" }, attr: {} },
- { item: { key: "code", title: "单据编码" }, attr: {} },
- {
- item: { key: "createTime", title: "申请时间" },
- attr: { },
- },
- { item: { key: "status", title: "单据状态" },
- attr: {
- is: "el-select",
- dictName: "documents_status", // 字典名
- }
- },
- { item: { key: "materialCode", title: "物料编码" }, attr: {} },
- {
- item: { key: "materialName", title: "物料名称" },
- attr: {},
- },
- { item: { key: "approver", title: "最后审批人" }, attr: {} },
- { item: { key: "approvalTime", title: "最后审核时间" }, attr: {} },
- { item: { key: "createByName", title: "创建人" }, attr: {} },
- { item: { key: "createTime", title: "创建时间" }, attr: {} },
- {
- item: { key: "updateByName", title: "最后修改人" },
- attr: { is: "el-file-preview" },
- },
- { item: { key: "updateTime", title: "最后修改时间" }, attr: {} },
-
- ].map(({ item, attr }) => ({
- attr,
- item: { ...item, hidden: true, fixed: false },
- }));
- const SearchColumns = [
- {
- item: { key: "materialCode", title: "物料编码" },
- attr: {
- is: "el-input",
- // referName: "SUPPLIER_PARAM",
- // valueKey: "name",
- // dataMapping: { supplier: "id", supplierName: "name" },
- },
- },
- {
- item: { key: "materialName", title: "物料名称" },
- attr: {
- is: "el-input",
- },
- },
- {
- item: { key: "status", title: "单据状态" },
- attr: {
- is: "el-select",
- dictName: "documents_status",
- clearable: true,
- },
- },
-
- ].map(({ item, attr }) => ({
- attr,
- item: { ...item, hidden: true, span: item.span || 6 },
- }));
- return { TableColumns, SearchColumns };
- }
|