From 4b896d2c15f73248a5571a9952f3bbdefe6e230f Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期五, 05 九月 2025 16:02:53 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobAdmin --- src/views/EnterpriseManage/components/ConfigureDialog.vue | 77 ++++++++++++++++++++++++++++++++++---- 1 files changed, 69 insertions(+), 8 deletions(-) diff --git a/src/views/EnterpriseManage/components/ConfigureDialog.vue b/src/views/EnterpriseManage/components/ConfigureDialog.vue index 6b8a8aa..e094b3c 100644 --- a/src/views/EnterpriseManage/components/ConfigureDialog.vue +++ b/src/views/EnterpriseManage/components/ConfigureDialog.vue @@ -35,24 +35,57 @@ </ProFormItemV2> <ProFormItemV2 label="閾惰璐︽埛:" prop="verifyStatus"> {{ VerifyStatusText[form.verifyStatus] }} - <el-button style="margin-left: 40px" type="primary" link @click="handleCheckBankAccount" + <el-button style="margin-left: 10px" type="primary" link @click="handleCheckBankAccount" >鏍¢獙</el-button > </ProFormItemV2> </template> --> - {{ form.electronSignAccesses }} + <template v-if="form.enterpriseConfigureType === EnterpriseConfigureType.AliPay"> + <ProFormItemV2 + label="鏀粯瀹濊处鍙�:" + prop="alipayAccount" + :checkRules="[{ message: '璇疯緭鍏ユ敮浠樺疂璐﹀彿' }]" + > + <div style="display: flex; width: 100%"> + <ProFormText v-model.trim="form.alipayAccount" placeholder="璇疯緭鍏ユ敮浠樺疂璐﹀彿"> + </ProFormText> + <el-button style="margin-left: 10px" type="primary" link @click="openEnterpriseWallet" + >鑾峰彇绛剧害閾炬帴</el-button + > + </div> + </ProFormItemV2> + <ProFormItemV2 + label="鍟嗘埛ID:" + prop="alipayMerchantId" + :checkRules="[{ message: '璇疯緭鍏ュ晢鎴稩D' }]" + > + <ProFormText v-model.trim="form.alipayMerchantId" placeholder="璇疯緭鍏ュ晢鎴稩D" /> + </ProFormItemV2> + <ProFormItemV2 label="绛剧害鐘舵��:" prop="alipayAccount" required> + <span>宸茬绾�</span> + <el-button style="margin-left: 10px" type="primary" link @click="handleCheckBankAccount" + >鏍¢獙</el-button + > + </ProFormItemV2> + <ProFormItemV2 label="杩涗欢鐘舵��:" prop="alipayAccount" required> + <span>宸茶繘浠�</span> + <el-button style="margin-left: 10px" type="primary" link @click="handleCheckBankAccount" + >鏍¢獙</el-button + > + </ProFormItemV2> + </template> <template v-if="form.enterpriseConfigureType === EnterpriseConfigureType.Electronic"> <div class="configure-dialog-form-title">閫氶亾閰嶇疆</div> <ProFormItemV2 - v-for="(label, value, index) in EnumElectronSignAccessText" - :label="label" - :key="value" + v-for="(item, index) in enabledElectronSignSettings" + :label="item.accessName" + :key="item.access" prop="electronSignAccesses" required > <ProFormSwitch v-model="form.electronSignAccesses[index]" - :active-value="Number(value)" + :active-value="Number(item.access)" :inactive-value="null" ></ProFormSwitch> </ProFormItemV2> @@ -85,6 +118,7 @@ </span> </template> </ProDialog> + <AlipayWalletOpen v-bind="dialogQrcodeProps"></AlipayWalletOpen> </template> <script setup lang="ts"> @@ -98,6 +132,7 @@ ProFormInputNumber, ProFormSelect, ProFormSwitch, + useFormDialog, } from '@bole-core/components'; import { BoleRegExp } from '@bole-core/core'; import { @@ -108,6 +143,8 @@ EnumSmsAccessText, EnumElectronSignAccess, } from '@/constants'; +import * as enterpriseWalletServices from '@/services/api/enterpriseWallet'; +import AlipayWalletOpen from './AlipayWalletOpen.vue'; defineOptions({ name: 'ConfigureDialog', @@ -122,12 +159,13 @@ electronSignAccesses: EnumElectronSignAccess[]; smsAccess: EnumSmsAccess; smsCost: number; + alipayAccount: string; + alipayMerchantId: string; + id: string; }; const form = defineModel<Form>('form'); const visible = defineModel({ type: Boolean }); - -const EnumElectronSignAccessList = computed(() => Object.values(EnumElectronSignAccess)); const emit = defineEmits<{ (e: 'onConfirm'): void; @@ -135,6 +173,8 @@ }>(); const dialogForm = ref<FormInstance>(); + +const { enabledElectronSignSettings } = useEnabledElectronSignSettings(); function handleCheckBankAccount() {} @@ -153,6 +193,27 @@ } }); } + +const { dialogProps: dialogQrcodeProps, handleAdd } = useFormDialog({ + defaultFormParams: { + alipayUrl: '', + }, +}); + +async function openEnterpriseWallet() { + try { + let params: API.OpenEnterpriseWalletCommand = { + access: EnumEnterpriseWalletAccess.Alipay, + enterpriseId: form.value.id, + }; + let res = await enterpriseWalletServices.openEnterpriseWallet(params); + if (res) { + handleAdd({ + alipayUrl: res.signUrl, + }); + } + } catch (error) {} +} </script> <style lang="scss" scoped> @use '@/style/common.scss' as *; -- Gitblit v1.9.1