| | |
| | | <AppContainer> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem tip-content="合作状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.cooperationStatus" |
| | | :value-enum="EnumEnterpriseCooperationStatusText" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="签约状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.signStatus" |
| | | :value-enum="EnumEnterpriseCooperationSignStatusText" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.keywords" |
| | |
| | | </template> |
| | | <template #btn> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="goAddOrEdit()" |
| | | icon="Plus" |
| | | type="primary" |
| | |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 v-bind="proTableProps" :columns="CustomerManageColumns" :operationBtns="operationBtns"> |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | |
| | | <script setup lang="ts"> |
| | | import { |
| | | ProTableQueryFilterBar, |
| | | OperationBtnType, |
| | | FieldRadio, |
| | | ProTableV2, |
| | | SearchInput, |
| | | LoadingLayout, |
| | |
| | | QueryFilterItem, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import {CustomerManageColumns} from './constants'; |
| | | import * as enterpriseServices from '@/services/api/enterprise'; |
| | | import { CustomerManageColumns } from './constants'; |
| | | import { |
| | | EnumEnterpriseCooperationStatusText, |
| | | EnumEnterpriseCooperationSignStatusText, |
| | | } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'CustomerManage', |
| | | }); |
| | | |
| | | const operationBtns=defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '查看', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => goDetail(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | editBtn: { |
| | | emits: { |
| | | onClick: (role) => goAddOrEdit(role), |
| | | }, |
| | | }, |
| | | ]) |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetTaskInfosQuery = { |
| | | let params: API.GetPartyAEnterprisesQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | keywords: extraParamState.keywords, |
| | | cooperationStatus: extraParamState.cooperationStatus, |
| | | signStatus: extraParamState.signStatus, |
| | | }; |
| | | |
| | | let res = await taskServices.getTaskInfos(params, { |
| | | let res = await enterpriseServices.getPartyAEnterprises(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | { |
| | | defaultExtraParams: { |
| | | keywords: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | cooperationStatus: '' as any as EnumEnterpriseCooperationStatus, |
| | | signStatus: '' as any as EnumEnterpriseCooperationSignStatus, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | queryKey: ['enterpriseServices/getPartyAEnterprises'], |
| | | columnsRenderProps: { |
| | | cooperationStatus: { type: 'enum', valueEnum: EnumEnterpriseCooperationStatusText }, |
| | | signStatus: { type: 'enum', valueEnum: EnumEnterpriseCooperationSignStatusText }, |
| | | serviceFeeCollectType: { |
| | | type: 'enum', |
| | | valueEnum: EnumEnterpriseCooperationServiceFeeCollectTypeText, |
| | | }, |
| | | invoiceTaxPointRate: { |
| | | formatter: (row: API.GetPartyAEnterprisesQueryResultItem) => { |
| | | if (row.invoiceTaxPointRate) { |
| | | return `${row.invoiceTaxPointRate}%`; |
| | | } |
| | | return ''; |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const router=useRouter(); |
| | | const router = useRouter(); |
| | | |
| | | function goAddOrEdit(row?: API.GetTaskInfosQueryResultItem) { |
| | | function goAddOrEdit(row?: API.GetPartyAEnterprisesQueryResultItem) { |
| | | router.push({ |
| | | name: 'AddOrEditCustomer', |
| | | params: { |
| | |
| | | }); |
| | | } |
| | | |
| | | function goDetail(row: API.GetTaskInfosQueryResultItem) { |
| | | function goDetail(row: API.GetPartyAEnterprisesQueryResultItem) { |
| | | router.push({ |
| | | name: 'CustomerDetail', |
| | | params: { |