| | |
| | | ], |
| | | }, |
| | | { |
| | | path: '/FinanceManage', |
| | | path: '/AgreementManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10050, |
| | | title: '协议管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/AgreementManageList', |
| | | name: 'AgreementManageList', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/AgreementManage/AgreementManageList.vue'), |
| | | meta: { |
| | | rank: 10051, |
| | | title: '协议管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/FinanceManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10060, |
| | | title: '财务管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | |
| | | alwaysShow: true, |
| | | component: () => import('@/views/FinanceManage/FinanceManage.vue'), |
| | | meta: { |
| | | rank: 10051, |
| | | rank: 10061, |
| | | title: '财务管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem tip-content="制版状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.status" |
| | | :value-enum="[ |
| | | { label: '已完成', value: 1 }, |
| | | { label: '待制版', value: 0 }, |
| | | ]" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.time" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="起始时间" |
| | | end-placeholder="截止时间" |
| | | clearable |
| | | @change="getList()" |
| | | tooltipContent="上传时间" |
| | | ></FieldDatePicker> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.keywords" |
| | | style="width: 250px" |
| | | placeholder="模板名称" |
| | | @on-click-search="getList" |
| | | @keyup.enter="getList()" |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button type="primary" @click="handleAdd()">新增模板</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="AgreementbManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <TemplateAddDialog v-bind="dialogProps"></TemplateAddDialog> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProTableQueryFilterBar, |
| | | ProTableV2, |
| | | SearchInput, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | QueryFilterItem, |
| | | useTable, |
| | | FieldDatePicker, |
| | | FieldRadio, |
| | | defineOperationBtns, |
| | | UploadUserFile, |
| | | useFormDialog, |
| | | bolePreview, |
| | | } from '@bole-core/components'; |
| | | import { AgreementbManageColumns } from './constants'; |
| | | import { EnumUserGender } from '@/constants'; |
| | | import { downloadFileByUrl } from '@/utils'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import TemplateAddDialog from './components/TemplateAddDialog.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'AgreementManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'checkBtn', |
| | | name: '查看', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleCheck(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '下载', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleDownload(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'deleteBtn', |
| | | name: '删除', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleDelete(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | | state.loading = false; |
| | | }); |
| | | |
| | | const { |
| | | getDataSource: getList, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetTaskInfosQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | keywords: extraParamState.keywords, |
| | | }; |
| | | |
| | | let res = await taskServices.getTaskInfos(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | | } |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | keywords: '', |
| | | status: '' as any as EnumUserGender, |
| | | time: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'], |
| | | columnsRenderProps: {}, |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleAdd, editForm } = useFormDialog({ |
| | | onConfirm: handleAddOrEdit, |
| | | defaultFormParams: { |
| | | name: '', |
| | | url: [] as UploadUserFile[], |
| | | }, |
| | | }); |
| | | |
| | | async function handleAddOrEdit() {} |
| | | |
| | | function handleDelete(row) { |
| | | console.log('row: ', row); |
| | | } |
| | | |
| | | function handleDownload(row) { |
| | | downloadFileByUrl('', '模板'); |
| | | } |
| | | |
| | | function handleCheck(row) { |
| | | bolePreview({ |
| | | fileUrl: '', |
| | | }); |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <ProDialog title="新增模板" v-model="visible" @close="onDialogClose" destroy-on-close draggable> |
| | | <ProForm :model="form" ref="dialogForm" label-width="100px"> |
| | | <ProFormItemV2 label="模板名称:" prop="name" :check-rules="[{ message: '请输入模板名称' }]"> |
| | | <ProFormText v-model.trim="form.name"> </ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | label="上传模板:" |
| | | prop="url" |
| | | :check-rules="[{ message: '请上传模板', type: 'upload' }]" |
| | | > |
| | | <ProFormUpload |
| | | v-model:file-url="form.url" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="xlsx,xls" |
| | | ></ProFormUpload> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm">提交</el-button> |
| | | <el-button type="default" @click="emit('onCancel')">取消</el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProDialog, |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ProFormUpload, |
| | | ProFormText, |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import { FormInstance } from 'element-plus'; |
| | | |
| | | defineOptions({ |
| | | name: 'TemplateAddDialog', |
| | | }); |
| | | |
| | | type Form = { |
| | | title?: string; |
| | | name: string; |
| | | url: UploadUserFile[]; |
| | | }; |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | const form = defineModel<Form>('form'); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'onConfirm'): void; |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.resetFields(); |
| | | } |
| | | |
| | | function handleConfirm() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.validate((valid) => { |
| | | if (valid) { |
| | | emit('onConfirm'); |
| | | } else { |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | </script> |
New file |
| | |
| | | import { defineColumns } from '@bole-core/components'; |
| | | |
| | | export const AgreementbManageColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'name', |
| | | name: '模板名称', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'identity', |
| | | name: '上传时间', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'gender', |
| | | name: '制版状态', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'age', |
| | | name: '模板ID', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'contactPhoneNumber', |
| | | name: '制版时间', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'hireStatus', |
| | | name: '二维码', |
| | | }, |
| | | ]); |
New file |
| | |
| | | export * from './columns'; |
| | |
| | | useTable, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | // import * as flexEnterpriseServices from '@/services/api/FlexEnterprise'; |
| | | import { DistributionDetailColumns } from '../constants'; |
| | | import { FlexEnterpriseSettingStatus } from '@/constants'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | |
| | | defineOptions({ |
| | | name: 'DistributionDetailView', |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetFlexEnterpriseInput = { |
| | | let params: API.GetOpenTaskInfosQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | flexEnterpriseSettingStatus: extraParamState.flexEnterpriseSettingStatus, |
| | | searchWord: extraParamState.searchWord, |
| | | }; |
| | | |
| | | let res = await flexEnterpriseServices.getFlexEnterpriseList(params, { |
| | | let res = await taskServices.getOpenTaskInfos(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | flexEnterpriseSettingStatus: '' as any as FlexEnterpriseSettingStatus, |
| | | }, |
| | | queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'], |
| | | queryKey: ['taskServices/getOpenTaskInfos'], |
| | | columnsRenderProps: {}, |
| | | } |
| | | ); |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { ProTableV2, LoadingLayout, AppContainer, useTable } from '@bole-core/components'; |
| | | // import * as flexEnterpriseServices from '@/services/api/FlexEnterprise'; |
| | | import { UsageDetailColumns } from '../constants'; |
| | | import { FlexEnterpriseSettingStatus } from '@/constants'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | |
| | | defineOptions({ |
| | | name: 'UsageDetailView', |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetFlexEnterpriseInput = { |
| | | let params: API.GetOpenTaskInfosQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | flexEnterpriseSettingStatus: extraParamState.flexEnterpriseSettingStatus, |
| | | searchWord: extraParamState.searchWord, |
| | | }; |
| | | |
| | | let res = await flexEnterpriseServices.getFlexEnterpriseList(params, { |
| | | let res = await taskServices.getOpenTaskInfos(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | flexEnterpriseSettingStatus: '' as any as FlexEnterpriseSettingStatus, |
| | | }, |
| | | queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'], |
| | | queryKey: ['taskServices/getOpenTaskInfos'], |
| | | columnsRenderProps: {}, |
| | | } |
| | | ); |