| | |
| | | <QueryFilterItem tip-content="配置状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.isConfigured" |
| | | :value-enum="[ |
| | | { |
| | | value: true, |
| | | label: '已配置', |
| | | }, |
| | | { |
| | | value: false, |
| | | label: '未配置', |
| | | }, |
| | | ]" |
| | | :value-enum="IsConfiguredText" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.keywords" |
| | | style="width: 200px" |
| | | style="width: 300px" |
| | | placeholder="企业名称/法人/联系人" |
| | | @on-click-search="getList" |
| | | @keyup.enter="getList()" |
| | |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <!-- <ConfigureDialog v-bind="dialogProps" /> --> |
| | | <ConfigureDialog v-bind="dialogProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | FieldRadio, |
| | | } from '@bole-core/components'; |
| | | import { useAccess, useGlobalEventContext } from '@/hooks'; |
| | | import { EnterpriseConfigureType } from '@/constants'; |
| | | import { EnterpriseConfigureType, IsConfiguredText } from '@/constants'; |
| | | import ConfigureDialog from './components/ConfigureDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | import * as enterpriseServices from '@/services/api/enterprise'; |
| | |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | isConfigured: '' as any as boolean, |
| | | }, |
| | | queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'], |
| | | columnsRenderProps: {}, |
| | | queryKey: ['enterpriseServices/getEnterprises'], |
| | | columnsRenderProps: { |
| | | isReal: { type: 'enum', valueEnum: IsRealText }, |
| | | isConfigured: { type: 'enum', valueEnum: IsConfiguredText }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | function openDialog(row?: API.GetEnterprisesQueryResultItem) { |
| | | async function getEnterpriseElectronSignSetting(id: string) { |
| | | try { |
| | | return await enterpriseServices.getEnterpriseElectronSignSetting({ id: id }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function getEnterpriseSmsSetting(id: string) { |
| | | try { |
| | | return await enterpriseServices.getEnterpriseSmsSetting({ id: id }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function openDialog(row?: API.GetEnterprisesQueryResultItem) { |
| | | if (row) { |
| | | let electronSignSetting = await getEnterpriseElectronSignSetting(row.id); |
| | | let smsSetting = await getEnterpriseSmsSetting(row.id); |
| | | handleEdit({ |
| | | id: row.id, |
| | | enterpriseConfigureType: EnterpriseConfigureType.Electronic, |
| | | realAccess: electronSignSetting.realAccess, |
| | | realVerifyCost: electronSignSetting.realVerifyCost, |
| | | signCost: electronSignSetting.signCost, |
| | | mergeSignCost: electronSignSetting.mergeSignCost, |
| | | |
| | | smsAccess: smsSetting.smsAccess, |
| | | chargeType: ChargeTypeEnum.Group, |
| | | smsCost: smsSetting.smsCost, |
| | | }); |
| | | } else { |
| | | handleAdd(); |
| | | handleAdd({ |
| | | enterpriseConfigureType: EnterpriseConfigureType.Electronic, |
| | | chargeType: ChargeTypeEnum.Group, |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | onConfirm: handleAddOrEdit, |
| | | defaultFormParams: { |
| | | id: '', |
| | | enterpriseConfigureType: EnterpriseConfigureType.Electronic, |
| | | realAccess: '' as any as EnumRealAccess, |
| | | realVerifyCost: 0, |
| | | signCost: 0, |
| | | mergeSignCost: 0, |
| | | chargeType: ChargeTypeEnum.Group, |
| | | smsAccess: '' as any as EnumSmsAccess, |
| | | smsCost: 0, |
| | | }, |
| | | }); |
| | | |
| | | async function handleAddOrEdit(type: EnterpriseConfigureType) { |
| | | async function handleAddOrEdit() { |
| | | try { |
| | | let res; |
| | | // if (type === EnterpriseConfigureType.Bank) { |
| | | // res = await createOrEditFlexEnterpriseBankSetting(); |
| | | // } |
| | | if (type === EnterpriseConfigureType.Electronic) { |
| | | if (editForm.enterpriseConfigureType === EnterpriseConfigureType.Electronic) { |
| | | res = await createOrEditFlexEnterpriseSignSetting(); |
| | | } |
| | | if (type === EnterpriseConfigureType.ShortMessage) { |
| | | if (editForm.enterpriseConfigureType === EnterpriseConfigureType.ShortMessage) { |
| | | res = await createOrEditFlexEnterpriseMessageSetting(); |
| | | } |
| | | if (res) { |
| | |
| | | try { |
| | | let params: API.SetEnterpriseElectronSignSettingCommand = { |
| | | id: editForm.id, |
| | | realAccess: editForm.realAccess, |
| | | realVerifyCost: editForm.realVerifyCost, |
| | | signCost: editForm.signCost, |
| | | mergeSignCost: editForm.mergeSignCost, |
| | | }; |
| | | return await enterpriseServices.setEnterpriseElectronSignSetting(params); |
| | | } catch (error) {} |
| | |
| | | try { |
| | | let params: API.SetEnterpriseSmsSettingCommand = { |
| | | id: editForm.id, |
| | | smsAccess: editForm.smsAccess, |
| | | smsCost: editForm.smsCost, |
| | | }; |
| | | return await enterpriseServices.setEnterpriseSmsSetting(params); |
| | | } catch (error) {} |