From 75d473492fc9d818de85eaa0e934cdb5d309f441 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 30 七月 2025 17:37:08 +0800
Subject: [PATCH] feat: 页面

---
 src/views/ServiceChargeManage/constants/columns.ts    |   86 ++++++++++
 src/views/ServiceChargeManage/ServiceChargeDetail.vue |   46 +++++
 src/views/ServiceChargeManage/ServiceChargeManage.vue |  224 ++++++++++++++++++++++++++++
 src/router/index.ts                                   |   54 ++++++
 src/views/ServiceChargeManage/constants/index.ts      |    1 
 src/views/ServiceChargeManage/ServiceChargeSettle.vue |   46 +++++
 6 files changed, 457 insertions(+), 0 deletions(-)

diff --git a/src/router/index.ts b/src/router/index.ts
index a3b5f8b..0ee970d 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -218,6 +218,60 @@
     ],
   },
   {
+    path: '/ServiceChargeManage',
+    redirect: 'noRedirect',
+    component: Layout,
+    hidden: false,
+    alwaysShow: true,
+    meta: {
+      rank: 10040,
+      title: '鏈嶅姟璐圭鐞�',
+      rootMenu: true,
+      icon: 'home',
+    },
+    children: [
+      {
+        path: '/ServiceChargeManageList',
+        name: 'ServiceChargeManageList',
+        hidden: false,
+        alwaysShow: true,
+        component: () => import('@/views/ServiceChargeManage/ServiceChargeManage.vue'),
+        meta: {
+          rank: 10041,
+          title: '鏈嶅姟璐圭鐞�',
+          // rootMenu: true,
+          icon: 'home',
+        },
+      },
+      {
+        path: '/ServiceChargeSettle',
+        name: 'ServiceChargeSettle',
+        hidden: false,
+        alwaysShow: true,
+        component: () => import('@/views/ServiceChargeManage/ServiceChargeSettle.vue'),
+        meta: {
+          rank: 10042,
+          title: '缁撶畻',
+          // rootMenu: true,
+          icon: 'home',
+        },
+      },
+      {
+        path: '/ServiceChargeDetail',
+        name: 'ServiceChargeDetail',
+        hidden: false,
+        alwaysShow: true,
+        component: () => import('@/views/ServiceChargeManage/ServiceChargeDetail.vue'),
+        meta: {
+          rank: 10042,
+          title: '璇︽儏',
+          // rootMenu: true,
+          icon: 'home',
+        },
+      },
+    ],
+  },
+  {
     path: '/Login',
     name: 'Login',
     hidden: true,
diff --git a/src/views/ServiceChargeManage/ServiceChargeDetail.vue b/src/views/ServiceChargeManage/ServiceChargeDetail.vue
new file mode 100644
index 0000000..5d19a9e
--- /dev/null
+++ b/src/views/ServiceChargeManage/ServiceChargeDetail.vue
@@ -0,0 +1,46 @@
+<template>
+  <LoadingLayout :loading="isLoading">
+    <AppScrollContainer>
+      <ChunkCell title="缁撶畻鍗曡鎯�"> </ChunkCell>
+      <ChunkCell title="缁撶畻娴佺▼"> </ChunkCell>
+      <ChunkCell title="缁撶畻鍚嶅崟"> </ChunkCell>
+    </AppScrollContainer>
+  </LoadingLayout>
+</template>
+<script setup lang="ts">
+import { LoadingLayout, AppScrollContainer, ChunkCell } from '@bole-core/components';
+import {} from '@/constants';
+import * as flexTaskServices from '@/services/api/FlexTask';
+import { useQuery } from '@tanstack/vue-query';
+
+defineOptions({
+  name: 'ServiceChargeDetail',
+});
+
+const route = useRoute();
+const id = (route.params.id as string) ?? '';
+
+const state = reactive({
+  loading: true,
+});
+
+const { isLoading } = useQuery({
+  queryKey: ['flexTaskServices/getFlexTaskDetail', id],
+  queryFn: async () => {
+    return await flexTaskServices.getFlexTaskDetail(
+      { id: id },
+      {
+        showLoading: false,
+      }
+    );
+  },
+  onSuccess(data) {},
+  enabled: !!id,
+});
+
+onMounted(() => {});
+</script>
+
+<style lang="scss" scoped>
+@use '@/style/common.scss' as *;
+</style>
diff --git a/src/views/ServiceChargeManage/ServiceChargeManage.vue b/src/views/ServiceChargeManage/ServiceChargeManage.vue
new file mode 100644
index 0000000..5041efb
--- /dev/null
+++ b/src/views/ServiceChargeManage/ServiceChargeManage.vue
@@ -0,0 +1,224 @@
+<template>
+  <LoadingLayout :loading="state.loading">
+    <AppContainer>
+      <ProTableQueryFilterBar @on-reset="reset">
+        <template #query>
+          <QueryFilterItem tip-content="缁撶畻鍗曠姸鎬�">
+            <FieldRadio
+              v-model="extraParamState.flexEnterpriseSettingStatus"
+              :value-enum="[
+                { label: '宸插畨鎺�', value: 1 },
+                { label: '寰呭畨鎺�', value: 0 },
+              ]"
+              buttonStyle
+              showAllBtn
+              @change="getList()"
+            />
+          </QueryFilterItem>
+          <QueryFilterItem tip-content="缁撶畻鐘舵��">
+            <FieldRadio
+              v-model="extraParamState.flexEnterpriseSettingStatus"
+              :value-enum="[
+                { label: '宸插畨鎺�', value: 1 },
+                { label: '寰呭畨鎺�', value: 0 },
+              ]"
+              buttonStyle
+              showAllBtn
+              @change="getList()"
+            />
+          </QueryFilterItem>
+          <QueryFilterItem>
+            <FieldDatePicker
+              v-model="extraParamState.flexEnterpriseSettingStatus"
+              type="daterange"
+              range-separator="~"
+              start-placeholder="璧峰鏃ユ湡"
+              end-placeholder="鎴鏃ユ湡"
+              clearable
+              @change="getList()"
+              tooltipContent="鍒涘缓鏃堕棿"
+            ></FieldDatePicker>
+          </QueryFilterItem>
+          <QueryFilterItem>
+            <SearchInput
+              v-model="extraParamState.searchWord"
+              style="width: 250px"
+              placeholder="浠诲姟鍚嶇О"
+              @on-click-search="getList"
+              @keyup.enter="getList()"
+            >
+            </SearchInput>
+          </QueryFilterItem>
+        </template>
+        <template #btn>
+          <el-button type="primary" link @click="handleDownloadTemplate()">缁撶畻鍗曟ā鏉�</el-button>
+          <el-button type="primary" @click="handleDownloadTemplate()">涓婁紶缁撶畻鍗�</el-button>
+          <el-button type="primary" @click="handleDownloadTemplate()">瀵煎嚭</el-button>
+        </template>
+      </ProTableQueryFilterBar>
+      <ProTableV2
+        v-bind="proTableProps"
+        :columns="ServiceChargeManageColumns"
+        :operationBtns="operationBtns"
+      >
+        <template #operationBtn-uploadBtn="{ data, row }">
+          <BlFileUpload
+            v-model:file-url="row.fileUrl"
+            :limitFileSize="2"
+            :limit="1"
+            accept="doc,docx"
+            ref="uploadRef"
+            :showTip="false"
+            :on-success="(response) => handleUpload(response, row)"
+            :show-file-list="false"
+            class="pro-table-operation-btn upload-style-btn"
+          >
+            <el-button link type="primary">涓婁紶</el-button>
+          </BlFileUpload>
+        </template>
+      </ProTableV2>
+    </AppContainer>
+  </LoadingLayout>
+</template>
+
+<script setup lang="ts">
+import {
+  ProTableQueryFilterBar,
+  ProTableV2,
+  SearchInput,
+  LoadingLayout,
+  AppContainer,
+  QueryFilterItem,
+  useTable,
+  FieldDatePicker,
+  FieldRadio,
+  defineOperationBtns,
+  BlFileUpload,
+} from '@bole-core/components';
+import * as flexEnterpriseServices from '@/services/api/FlexEnterprise';
+import { ServiceChargeManageColumns } from './constants';
+import { FlexEnterpriseSettingStatus, Gender } from '@/constants';
+import { OrderInputType } from '@bole-core/core';
+import { downloadFileByUrl } from '@/utils';
+
+defineOptions({
+  name: 'ServiceChargeManage',
+});
+
+const operationBtns = defineOperationBtns([
+  {
+    data: {
+      enCode: 'uploadBtn',
+      name: '涓婁紶',
+    },
+  },
+  {
+    data: {
+      enCode: 'settleBtn',
+      name: '缁撶畻',
+    },
+    emits: {
+      onClick: (role) => goSettle(role),
+    },
+  },
+  {
+    data: {
+      enCode: 'detailBtn',
+      name: '璇︽儏',
+    },
+    emits: {
+      onClick: (role) => goDetail(role),
+    },
+  },
+  {
+    data: {
+      enCode: 'exportBtn',
+      name: '瀵煎嚭',
+    },
+    emits: {
+      onClick: (role) => handleExport(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.GetFlexEnterpriseInput = {
+        pageModel: {
+          rows: pageSize,
+          page: pageIndex,
+          orderInput: extraParamState.orderInput,
+        },
+        flexEnterpriseSettingStatus: extraParamState.flexEnterpriseSettingStatus,
+        searchWord: extraParamState.searchWord,
+      };
+
+      let res = await flexEnterpriseServices.getFlexEnterpriseList(params, {
+        showLoading: !state.loading,
+      });
+      return res;
+    } catch (error) {
+      console.log('error: ', error);
+    }
+  },
+  {
+    defaultExtraParams: {
+      searchWord: '',
+      orderInput: [{ property: 'id', order: OrderInputType.Desc }],
+      flexEnterpriseSettingStatus: '' as any as FlexEnterpriseSettingStatus,
+    },
+    queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'],
+    columnsRenderProps: {},
+  }
+);
+
+function goSettle(row) {
+  router.push({
+    name: 'ServiceChargeSettle',
+    query: {
+      id: row.id,
+    },
+  });
+}
+
+function goDetail(row) {
+  router.push({
+    name: 'ServiceChargeDetail',
+    query: {
+      id: row.id,
+    },
+  });
+}
+
+function handleUpload(val, row) {
+  console.log('val: ', val);
+}
+
+function handleExport(val) {
+  console.log('val: ', val);
+}
+
+function handleDownloadTemplate() {
+  downloadFileByUrl('', '缁撶畻鍗曟ā鏉�');
+}
+</script>
diff --git a/src/views/ServiceChargeManage/ServiceChargeSettle.vue b/src/views/ServiceChargeManage/ServiceChargeSettle.vue
new file mode 100644
index 0000000..0a4bf99
--- /dev/null
+++ b/src/views/ServiceChargeManage/ServiceChargeSettle.vue
@@ -0,0 +1,46 @@
+<template>
+  <LoadingLayout :loading="isLoading">
+    <AppScrollContainer>
+      <ChunkCell title="浠樻鏂逛俊鎭�"> </ChunkCell>
+      <ChunkCell title="鏀舵鏂逛俊鎭�"> </ChunkCell>
+      <ChunkCell title="杞处淇℃伅"> </ChunkCell>
+    </AppScrollContainer>
+  </LoadingLayout>
+</template>
+<script setup lang="ts">
+import { LoadingLayout, AppScrollContainer, ChunkCell } from '@bole-core/components';
+import {} from '@/constants';
+import * as flexTaskServices from '@/services/api/FlexTask';
+import { useQuery } from '@tanstack/vue-query';
+
+defineOptions({
+  name: 'ServiceChargeSettle',
+});
+
+const route = useRoute();
+const id = (route.params.id as string) ?? '';
+
+const state = reactive({
+  loading: true,
+});
+
+const { isLoading } = useQuery({
+  queryKey: ['flexTaskServices/getFlexTaskDetail', id],
+  queryFn: async () => {
+    return await flexTaskServices.getFlexTaskDetail(
+      { id: id },
+      {
+        showLoading: false,
+      }
+    );
+  },
+  onSuccess(data) {},
+  enabled: !!id,
+});
+
+onMounted(() => {});
+</script>
+
+<style lang="scss" scoped>
+@use '@/style/common.scss' as *;
+</style>
diff --git a/src/views/ServiceChargeManage/constants/columns.ts b/src/views/ServiceChargeManage/constants/columns.ts
new file mode 100644
index 0000000..de27a3a
--- /dev/null
+++ b/src/views/ServiceChargeManage/constants/columns.ts
@@ -0,0 +1,86 @@
+import { defineColumns } from '@bole-core/components';
+
+export const ServiceChargeManageColumns = defineColumns([
+  {
+    id: '1',
+    enCode: 'name',
+    name: '鎵�灞炰换鍔�',
+    width: 180,
+  },
+  {
+    id: '2',
+    enCode: 'name',
+    name: '鍙戞斁鏂瑰紡',
+    width: 180,
+  },
+  {
+    id: '3',
+    enCode: 'name',
+    name: '鏀舵浜�',
+  },
+  {
+    id: '4',
+    enCode: 'name',
+    name: '鏀舵璐﹀彿',
+  },
+  {
+    id: '5',
+    enCode: 'name',
+    name: '缁撶畻鍗曠姸鎬�',
+    width: 140,
+  },
+  {
+    id: '6',
+    enCode: 'name',
+    name: '缁撶畻鍗曞悕绉�',
+    width: 140,
+  },
+  {
+    id: '7',
+    enCode: 'signNum',
+    name: '涓婁紶鏃堕棿',
+    width: 140,
+  },
+  {
+    id: '8',
+    enCode: 'name',
+    name: '缁撶畻鐘舵��',
+    width: 140,
+  },
+  {
+    id: '9',
+    enCode: 'name',
+    name: '瀹炲彂閲戦',
+    width: 160,
+  },
+  {
+    id: '10',
+    enCode: 'name',
+    name: '缁撶畻閲戦',
+    width: 160,
+  },
+  {
+    id: '11',
+    enCode: 'name',
+    name: '澶辫触閲戦',
+    width: 160,
+  },
+  {
+    id: '12',
+    enCode: 'name',
+    name: '閫�娆鹃噾棰�',
+    width: 160,
+  },
+  {
+    id: '13',
+    enCode: 'name',
+    name: '缁撶畻鏃堕棿',
+    width: 160,
+  },
+  {
+    id: '14',
+    enCode: 'name',
+    name: '澶囨敞',
+    width: 160,
+  },
+]);
diff --git a/src/views/ServiceChargeManage/constants/index.ts b/src/views/ServiceChargeManage/constants/index.ts
new file mode 100644
index 0000000..a7f066b
--- /dev/null
+++ b/src/views/ServiceChargeManage/constants/index.ts
@@ -0,0 +1 @@
+export * from './columns';

--
Gitblit v1.9.1