diff --git a/src/enums/contractEnum.ts b/src/enums/contractEnum.ts index 94b1ad3..17a0ec3 100644 --- a/src/enums/contractEnum.ts +++ b/src/enums/contractEnum.ts @@ -3,4 +3,3 @@ export enum ContractStatusEnum { Approved = 1, // 已通过 Rejected = 2, // 已拒绝 } -// 使用es6数组方法遍历枚举 diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue index fe06f88..3afeaab 100644 --- a/src/views/contract/index.vue +++ b/src/views/contract/index.vue @@ -37,7 +37,7 @@ defineOptions({ name: 'Contract', }); - const [DynamicTable, dynamicTableInstance] = useTable(); + const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } }); const [showModal] = useFormModal(); const [fnModal] = useModal(); const isUploadPopupVisiable = ref(false); diff --git a/src/views/materials-inventory/company/index.vue b/src/views/materials-inventory/company/index.vue index bcf53dd..4ee8e2e 100644 --- a/src/views/materials-inventory/company/index.vue +++ b/src/views/materials-inventory/company/index.vue @@ -32,16 +32,14 @@ import AttachmentManage from '@/components/business/attachment-manage/index.vue'; import AttachmentUpload from '@/components/business/attachment-upload/index.vue'; import { ref, onMounted, type FunctionalComponent } from 'vue'; -import { useDictStore } from '@/store/modules/dict'; + import { useDictStore } from '@/store/modules/dict'; defineOptions({ name: 'Company', }); - const [DynamicTable, dynamicTableInstance] = useTable(); + const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } }); const [showModal] = useFormModal(); const [fnModal] = useModal(); const isUploadPopupVisiable = ref(false); - const dictStore = useDictStore(); - // companyList; let columns = ref(); onMounted(() => { columns.value = [ @@ -59,7 +57,7 @@ import { useDictStore } from '@/store/modules/dict'; maxWidth: 150, width: 150, minWidth: 150, - fixed:'right', + fixed: 'right', dataIndex: 'ACTION', hideInSearch: true, actions: ({ record }) => [ diff --git a/src/views/materials-inventory/inventory-check/index.vue b/src/views/materials-inventory/inventory-check/index.vue index b194bf3..8b1c9fa 100644 --- a/src/views/materials-inventory/inventory-check/index.vue +++ b/src/views/materials-inventory/inventory-check/index.vue @@ -31,20 +31,15 @@ import { onMounted, ref, type FunctionalComponent } from 'vue'; import { DictEnum } from '@/enums/dictEnum'; import { useFormModal, useModal } from '@/hooks/useModal'; - import { contractSchemas } from './formSchemas'; - import { formatToDate } from '@/utils/dateUtil'; import { Button } from 'ant-design-vue'; - import AttachmentManage from '@/components/business/attachment-manage/index.vue'; - import AttachmentUpload from '@/components/business/attachment-upload/index.vue'; + defineOptions({ name: 'MaterialsInventory', }); const [DynamicTable, dynamicTableInstance] = useTable(); - const [showModal] = useFormModal(); const [fnModal] = useModal(); const isUploadPopupVisiable = ref(false); - // contractList; let columns = ref(); onMounted(() => { columns.value = [ @@ -156,7 +151,6 @@ // schemas: contractSchemas(contractTypes.value), // }, // }); - // // 如果是编辑的话,需要获取角色详情 // if (record.id) { // const info = await Api.contract.contractInfo({ id: record.id }); diff --git a/src/views/materials-inventory/product/index.vue b/src/views/materials-inventory/product/index.vue index 49a18f1..0674801 100644 --- a/src/views/materials-inventory/product/index.vue +++ b/src/views/materials-inventory/product/index.vue @@ -37,27 +37,11 @@ defineOptions({ name: 'Product', }); - const [DynamicTable, dynamicTableInstance] = useTable(); + const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } }); const [showModal] = useFormModal(); const [fnModal] = useModal(); const isUploadPopupVisiable = ref(false); - const dictStore = useDictStore(); let columns = ref(); - // const loadData = async (params): Promise => { - // console.log('params', params); - // return Api.product.productList(params); - // }; - // const loadTableData = async (params: any) => { - // const { company, ...res } = params; - // const data = await Api.product.productList({ - // ...res, - // company, - // }); - // return data; - // }; - const exportFormatter = (columns: TableColumn[], tableData: any[]) => { - return { header: columns.map((item) => item.title), data: [] }; - }; onMounted(() => { columns.value = [ ...baseColumns, diff --git a/src/views/materials-inventory/project/index.vue b/src/views/materials-inventory/project/index.vue index 219c50e..b11055e 100644 --- a/src/views/materials-inventory/project/index.vue +++ b/src/views/materials-inventory/project/index.vue @@ -32,15 +32,14 @@ import AttachmentManage from '@/components/business/attachment-manage/index.vue'; import AttachmentUpload from '@/components/business/attachment-upload/index.vue'; import { ref, onMounted, type FunctionalComponent } from 'vue'; -import { useDictStore } from '@/store/modules/dict'; + import { useDictStore } from '@/store/modules/dict'; defineOptions({ name: 'Project', }); - const [DynamicTable, dynamicTableInstance] = useTable(); + const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } }); const [showModal] = useFormModal(); const [fnModal] = useModal(); const isUploadPopupVisiable = ref(false); - const dictStore = useDictStore(); // projectList; let columns = ref(); onMounted(() => { @@ -59,7 +58,7 @@ import { useDictStore } from '@/store/modules/dict'; maxWidth: 150, width: 150, minWidth: 150, - fixed:'right', + fixed: 'right', dataIndex: 'ACTION', hideInSearch: true, actions: ({ record }) => [