| New file |
| | |
| | | { |
| | | "recommendations": ["Vue.volar"] |
| | | } |
| New file |
| | |
| | | { |
| | | "[json]": { |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | "[typescript]": { |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | "[jsonc]": { |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | "[javascript]": { |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | "[vue]": { |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | "[scss]": { |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | |
| | | "[html]": { |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | |
| | | "editor.codeActionsOnSave": { |
| | | "source.fixAll": "explicit", |
| | | "source.fixAll.eslint": "explicit", |
| | | "source.fixAll.stylelint": "explicit" |
| | | }, |
| | | |
| | | "editor.formatOnSave": true, |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode", |
| | | |
| | | "eslint.enable": true, |
| | | "eslint.validate": ["vue", "ts", "tsx"], |
| | | |
| | | "stylelint.enable": true, |
| | | "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"] |
| | | } |
| | |
| | | 'taskManage:edit': any; |
| | | sureTaskSettlementOrder: any; |
| | | checkReceiveTask: any; |
| | | 'customerManage:add': any; |
| | | 'customerManage:edit': any; |
| | | }; |
| | | |
| | | export type GlobalEventListener<T extends keyof GlobalEvent> = (payload: GlobalEvent[T]) => any; |
| | |
| | | }, |
| | | }, |
| | | { |
| | | path: '/CustomerManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | meta: { |
| | | rank: 10010, |
| | | title: '客户管理', |
| | | rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/CustomerManage', |
| | | name: 'CustomerManage', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/CustomerManage/CustomerManage.vue'), |
| | | meta: { |
| | | rank: 10011, |
| | | title: '客户管理', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/AddOrEditCustomer/:id?', |
| | | name: 'AddOrEditCustomer', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/CustomerManage/AddOrEditCustomer.vue'), |
| | | meta: { |
| | | rank: 10011, |
| | | title: '新增客户', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/CustomerDetail/:id', |
| | | name: 'CustomerDetail', |
| | | hidden: false, |
| | | alwaysShow: true, |
| | | component: () => import('@/views/CustomerManage/CustomerDetail.vue'), |
| | | meta: { |
| | | rank: 10011, |
| | | title: '客户详情', |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/FlexJobManage', |
| | | redirect: 'noRedirect', |
| | | component: Layout, |
| | |
| | | component: () => import('@/views/FinanceManage/FinanceManage.vue'), |
| | | meta: { |
| | | rank: 10071, |
| | | title: '财务管理', |
| | | title: '发放明细', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| New file |
| | |
| | | <template> |
| | | <AddOrEditCustomerView :isDetail="false"/> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { setPageTitle } from '@/utils'; |
| | | |
| | | export default defineComponent({ |
| | | name: 'AddOrEditCustomer', |
| | | beforeRouteEnter(to) { |
| | | to.meta.title = to.params.id ? '编辑客户' : '新增客户'; |
| | | setPageTitle(to.meta.title as string); |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | <script setup lang="ts"> |
| | | import AddOrEditCustomerView from './components/AddOrEditCustomerView.vue'; |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <AddOrEditCustomerView isDetail /> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import AddOrEditCustomerView from './components/AddOrEditCustomerView.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'CustomerDetail', |
| | | }); |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.keywords" |
| | | style="width: 300px" |
| | | placeholder="企业名称/信用代码/姓名/电话" |
| | | @on-click-search="getList" |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button |
| | | @click="goAddOrEdit()" |
| | | icon="Plus" |
| | | type="primary" |
| | | >新增客户</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 v-bind="proTableProps" :columns="CustomerManageColumns" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProTableQueryFilterBar, |
| | | OperationBtnType, |
| | | ProTableV2, |
| | | SearchInput, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | QueryFilterItem, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns |
| | | } from '@bole-core/components'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import {CustomerManageColumns} from './constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'CustomerManage', |
| | | }); |
| | | |
| | | const operationBtns=defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '查看', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goDetail(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goAddOrEdit(role), |
| | | }, |
| | | }, |
| | | ]) |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | | eventContext.addEvent('customerManage:add', () => { |
| | | getList(); |
| | | }); |
| | | |
| | | eventContext.addEvent('customerManage:edit', () => { |
| | | getList(paginationState.pageIndex); |
| | | }); |
| | | |
| | | 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) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | keywords: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const router=useRouter(); |
| | | |
| | | function goAddOrEdit(row?: API.GetTaskInfosQueryResultItem) { |
| | | router.push({ |
| | | name: 'AddOrEditCustomer', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | function goDetail(row: API.GetTaskInfosQueryResultItem) { |
| | | router.push({ |
| | | name: 'CustomerDetail', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | }); |
| | | } |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <div></div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { Message, BoleRegExp } from '@bole-core/core'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { |
| | | LoadingLayout, |
| | | AppScrollContainer, |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ChunkCell, |
| | | ProFormText, |
| | | ProFormSelect, |
| | | ProFormTextArea, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | } from '@bole-core/components'; |
| | | import { FormRules, FormInstance } from 'element-plus'; |
| | | |
| | | defineOptions({ |
| | | name: 'AddOrEditCustomerView', |
| | | }) |
| | | |
| | | type Props = { |
| | | isDetail: boolean; |
| | | } |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | |
| | | }) |
| | | |
| | | const route = useRoute(); |
| | | const id = route.params.id as string; |
| | | const isEdit = !!id; |
| | | |
| | | const { closeViewPush } = useRouteView(); |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @use '@/style/common.scss' as *; |
| | | |
| | | </style> |
| | | |
| New file |
| | |
| | | import {defineColumns} from '@bole-core/components' |
| | | |
| | | export const CustomerManageColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'name', |
| | | name: '企业名称', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'phoneNumber', |
| | | name: '统一信用代码', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'status', |
| | | name: '客户ID', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'createdTime', |
| | | name: '法人姓名', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'createdTime', |
| | | name: '联系人名称', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'createdTime', |
| | | name: '联系电话', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'createdTime', |
| | | name: '省份', |
| | | }, |
| | | { |
| | | id: '8', |
| | | enCode: 'createdTime', |
| | | name: '城市', |
| | | }, |
| | | { |
| | | id: '9', |
| | | enCode: 'createdTime', |
| | | name: '合作状态', |
| | | }, |
| | | { |
| | | id: '10', |
| | | enCode: 'createdTime', |
| | | name: '签约状态', |
| | | }, |
| | | ]) |
| New file |
| | |
| | | export * from './customerManage' |