diff --git a/src/components/common/correlationApproList.vue b/src/components/common/correlationApproList.vue index 0a85c9c..692bf5f 100644 --- a/src/components/common/correlationApproList.vue +++ b/src/components/common/correlationApproList.vue @@ -108,7 +108,7 @@ router.push({ path: '/approve/Appro/viewForm', query: { - id: record.id || record.approId, + id: record.approId || record.id , disabled: true } }) diff --git a/src/components/common/correlationContractFactList.vue b/src/components/common/correlationContractFactList.vue index 407b93f..a50930a 100644 --- a/src/components/common/correlationContractFactList.vue +++ b/src/components/common/correlationContractFactList.vue @@ -110,7 +110,7 @@ router.push({ path: '/contract/ContractFact/viewForm', query: { - id: record.id || record.approId, + id: record.kFactId || record.id , disabled: true } }) diff --git a/src/layouts/default/tabs/components/TabContent.vue b/src/layouts/default/tabs/components/TabContent.vue index 172d51e..4704601 100644 --- a/src/layouts/default/tabs/components/TabContent.vue +++ b/src/layouts/default/tabs/components/TabContent.vue @@ -40,7 +40,7 @@ const tabItem = props.tabItem as any; const meta = tabItem.meta || {}; const metaTitle = typeof meta?.title == 'function' ? meta.title(tabItem) : meta?.title; - return tabItem.tabTitle || (meta && t(metaTitle as string)); + return (meta && t(metaTitle as string)) || tabItem.tabTitle; }); const getIsTabs = computed(() => !props.isExtra); diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts index f3044fd..efcc604 100644 --- a/src/router/routes/basic.ts +++ b/src/router/routes/basic.ts @@ -138,7 +138,7 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{ name: 'CreateFlow', component: () => import('/@/views/secondDev/createFlow.vue'), meta: { - title: (route) => '新建'+(route.query.formName||'流程') + title: (route) => (route.query.formName||'流程') } }, { @@ -146,7 +146,7 @@ export const FLOW_ROUTE: AppRouteRecordRaw[] = [{ name: 'ApproveFlow', component: () => import('/@/views/secondDev/approveFlowPage.vue'), meta: { - title: (route) => '审批'+(route.query.formName||'流程') + title: (route) => (route.query.formName||'流程') } } ] diff --git a/src/views/approve/Appro/components/config.ts b/src/views/approve/Appro/components/config.ts index c39875e..c818a9f 100644 --- a/src/views/approve/Appro/components/config.ts +++ b/src/views/approve/Appro/components/config.ts @@ -1,6 +1,7 @@ import { FormProps, FormSchema } from '/@/components/Form'; import { BasicColumn } from '/@/components/Table'; - +import dayjs from 'dayjs'; +const defaultDate = [dayjs().subtract(6, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]; export const formConfig = { useCustomConfig: false, }; @@ -10,6 +11,7 @@ export const searchFormSchema: FormSchema[] = [ field: 'dateAppro', label: '拟稿日期', component: 'RangePicker', + defaultValue: defaultDate, componentProps: { format: 'YYYY-MM-DD', style: { width: '100%' }, diff --git a/src/views/approve/Appro/index.vue b/src/views/approve/Appro/index.vue index 8b97435..9e1dda5 100644 --- a/src/views/approve/Appro/index.vue +++ b/src/views/approve/Appro/index.vue @@ -58,6 +58,7 @@ import useEventBus from '/@/hooks/event/useEventBus'; import { cloneDeep } from 'lodash-es'; import { useUserStore } from '/@/store/modules/user'; + import dayjs from 'dayjs'; const userStore = useUserStore(); const userInfo = userStore.getUserInfo; @@ -113,7 +114,8 @@ const visibleFlowRecordModal = ref(false); const [registerModal, { openModal }] = useModal(); const formName='签报'; - const [registerTable, { reload, }] = useTable({ + const defaultDate = ref([dayjs().subtract(6, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]); + const [registerTable, { reload, getForm }] = useTable({ title: '' || (formName + '列表'), api: getLngApproPage, rowKey: 'id', @@ -122,10 +124,55 @@ rowProps: { gutter: 16, }, - schemas: customSearchFormSchema, - fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss ', true],], + schemas: [ + { + field: 'dateAppro', + label: '拟稿日期', + component: 'RangePicker', + defaultValue: defaultDate.value, + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, + { + field: 'title', + label: '标题/编号', + component: 'Input', + }, + { + field: 'typeCode', + label: '签报类型', + component: 'XjrSelect', + componentProps: { + datasourceType: 'dic', + params: { itemId: '2001500486723887105' }, + labelField: 'name', + valueField: 'value', + + getPopupContainer: () => document.body, + }, + }, + { + field: 'approCode', + label: '审批状态', + component: 'XjrSelect', + componentProps: { + datasourceType: 'dic', + params: { itemId: '1990669393069129729' }, + labelField: 'name', + valueField: 'value', + + getPopupContainer: () => document.body, + }, + } + ], + fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD ', true],], showResetButton: true, }, + immediate: false, + beforeFetch: (params) => { return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit}; }, @@ -160,7 +207,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1, @@ -172,7 +219,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -183,7 +230,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'approve/Appro', - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -214,7 +261,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'approve/Appro', + formName: '新建'+formName, + } }); } else { router.push({ @@ -234,7 +285,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'approve/Appro', - formName: formName, + formName: '编辑'+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -259,7 +310,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'approve/Appro', - formName: formName, + formName: '变更'+formName, formId:currentRoute.value.meta.formId, type:'update', id: record.id, @@ -275,7 +326,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: '审批'+formName, formId:currentRoute.value.meta.formId, id: record.id } @@ -318,6 +369,7 @@ } onMounted(() => { + reload({ searchInfo: { startDate: defaultDate.value[0], endDate: defaultDate.value[1] }}); if (schemaIdComputedRef.value) { bus.on(FLOW_PROCESSED, handleRefresh); @@ -499,6 +551,13 @@ :deep(.ant-col-8:nth-child(1) .ant-form-item-label) { width: 80px !important; } + :deep( .ant-col-8:nth-child(4)) { + width: 320px !important; + max-width: 320px !important;; + } + :deep(.ant-col-8:nth-child(4) .ant-form-item-label) { + width: 80px !important; + } .show{ display: flex; } diff --git a/src/views/contract/ContractFact/index.vue b/src/views/contract/ContractFact/index.vue index 2743de6..e659c20 100644 --- a/src/views/contract/ContractFact/index.vue +++ b/src/views/contract/ContractFact/index.vue @@ -160,7 +160,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1, @@ -172,7 +172,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -183,7 +183,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractFact', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -214,7 +214,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'contract/ContractFact', + formName: "新建"+formName, + } }); } else { router.push({ @@ -234,7 +238,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractFact', - formName: formName, + formName: "编辑"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -258,7 +262,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractFact', - formName: formName, + formName: "变更"+formName, formId:currentRoute.value.meta.formId, type:'update', id: record.id, @@ -274,7 +278,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "审批"+formName, formId:currentRoute.value.meta.formId, id: record.id } diff --git a/src/views/contract/ContractPurPng/components/createForm.vue b/src/views/contract/ContractPurPng/components/createForm.vue index 8c862fd..53cc32a 100644 --- a/src/views/contract/ContractPurPng/components/createForm.vue +++ b/src/views/contract/ContractPurPng/components/createForm.vue @@ -355,7 +355,7 @@ v.dateTo = v.dateTo ? dayjs(v.dateTo) : null }); dataListAppro.value.forEach(v => { - v.approId = v.id + // v.approId = v.id }) } catch (error) { diff --git a/src/views/contract/ContractPurPng/index.vue b/src/views/contract/ContractPurPng/index.vue index 13e96b9..52bdeba 100644 --- a/src/views/contract/ContractPurPng/index.vue +++ b/src/views/contract/ContractPurPng/index.vue @@ -161,7 +161,7 @@ query: { readonly: 1, taskId: taskIds[0], - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1, @@ -173,7 +173,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -184,7 +184,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractPurPng', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -215,7 +215,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'contract/ContractPurPng', + formName: "新建"+formName, + } }); } else { router.push({ @@ -235,7 +239,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractPurPng', - formName: formName, + formName: "编辑"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -259,7 +263,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractPurPng', - formName: formName, + formName: "变更"+formName, formId:currentRoute.value.meta.formId, type:'update', id: record.id, @@ -275,7 +279,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "审批"+formName, formId:currentRoute.value.meta.formId, id: record.id } diff --git a/src/views/contract/ContractSales/index.vue b/src/views/contract/ContractSales/index.vue index 11876a1..eccdf60 100644 --- a/src/views/contract/ContractSales/index.vue +++ b/src/views/contract/ContractSales/index.vue @@ -160,7 +160,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1, @@ -172,7 +172,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -183,7 +183,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractSales', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -214,7 +214,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'contract/ContractSales', + formName: "新建"+formName, + } }); } else { router.push({ @@ -234,7 +238,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractSales', - formName: formName, + formName: "编辑"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -258,7 +262,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'contract/ContractSales', - formName: formName, + formName: "变更"+formName, formId:currentRoute.value.meta.formId, type:'update', id: record.id, @@ -274,7 +278,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "审批"+formName, formId:currentRoute.value.meta.formId, id: record.id } diff --git a/src/views/sales/Customer/index.vue b/src/views/sales/Customer/index.vue index f800cbc..228c150 100644 --- a/src/views/sales/Customer/index.vue +++ b/src/views/sales/Customer/index.vue @@ -167,7 +167,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1, @@ -179,7 +179,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -190,7 +190,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'sales/Customer', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -221,7 +221,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'sales/Customer', + formName: "新建"+formName, + } }); } else { router.push({ @@ -242,7 +246,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'sales/Customer', - formName: formName, + formName: "编辑"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -270,7 +274,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "变更"+formName, formId:currentRoute.value.meta.formId, id: record.id, status @@ -285,7 +289,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "审批"+formName, formId:currentRoute.value.meta.formId, id: record.id } diff --git a/src/views/sales/ScoreCustomer/index.vue b/src/views/sales/ScoreCustomer/index.vue index 2672abe..9a18268 100644 --- a/src/views/sales/ScoreCustomer/index.vue +++ b/src/views/sales/ScoreCustomer/index.vue @@ -164,7 +164,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1 @@ -176,7 +176,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -187,7 +187,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'sales/ScoreCustomer', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -218,7 +218,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'sales/ScoreCustomer', + formName: "新建"+formName, + } }); } else { router.push({ @@ -238,7 +242,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'sales/ScoreCustomer', - formName: formName, + formName: "编辑"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -262,7 +266,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'sales/ScoreCustomer', - formName: formName, + formName: "变更"+formName, formId:currentRoute.value.meta.formId, type:'update', id: record.id, @@ -278,7 +282,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "审批"+formName, formId:currentRoute.value.meta.formId, id: record.id } diff --git a/src/views/supplier/ScoreSupplier/index.vue b/src/views/supplier/ScoreSupplier/index.vue index 5fd4e73..33c2c48 100644 --- a/src/views/supplier/ScoreSupplier/index.vue +++ b/src/views/supplier/ScoreSupplier/index.vue @@ -161,7 +161,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1, @@ -173,7 +173,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -184,7 +184,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'supplier/ScoreSupplier', - formName: formName, + formName: "查看"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -215,7 +215,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'supplier/ScoreSupplier', + formName: "新建"+formName, + } }); } else { router.push({ @@ -235,7 +239,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'supplier/ScoreSupplier', - formName: formName, + formName: "编辑"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -259,7 +263,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'supplier/ScoreSupplier', - formName: formName, + formName: "变更"+formName, formId:currentRoute.value.meta.formId, type:'update', id: record.id, @@ -275,7 +279,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "审批"+formName, formId:currentRoute.value.meta.formId, id: record.id } diff --git a/src/views/supplier/Supplier/index.vue b/src/views/supplier/Supplier/index.vue index b7dc84a..5c4bf09 100644 --- a/src/views/supplier/Supplier/index.vue +++ b/src/views/supplier/Supplier/index.vue @@ -165,7 +165,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, id: record.id, readonly: 1, @@ -177,7 +177,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, id: record.id, } @@ -188,7 +188,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'supplier/Supplier', - formName: formName, + formName: '查看'+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id, @@ -219,7 +219,11 @@ function handleAdd() { if (schemaIdComputedRef.value) { router.push({ - path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow' + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'supplier/Supplier', + formName: "新建"+formName, + } }); } else { router.push({ @@ -239,7 +243,7 @@ path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', query: { formPath: 'supplier/Supplier', - formName: formName, + formName: "编辑"+formName, formId:currentRoute.value.meta.formId, type:'edit', id: record.id @@ -264,7 +268,7 @@ query: { readonly: 1, taskId: '', - formName: formName, + formName: "变更"+formName, formId:currentRoute.value.meta.formId, id: record.id, status @@ -279,7 +283,7 @@ path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', query: { taskId: taskIds[0], - formName: formName, + formName: "审批"+formName, formId:currentRoute.value.meta.formId, id: record.id }