wupengfei
2 天以前 1f8b6081c575c6159ee1cde2ace4165773d3a1c3
feat: 微信
1个文件已添加
5个文件已修改
77 ■■■■ 已修改文件
src/views/EnterpriseManage/EnterpriseManageList.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/ConfigureDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/WeChatPayWalletBankBranchsSelect.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/WechatConfigureView.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/WechatWalletOpen.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/EnterpriseManageList.vue
@@ -35,6 +35,7 @@
      </ProTableV2>
    </AppContainer>
    <ConfigureDialog v-bind="dialogProps" />
    <WechatWalletOpen v-bind="dialogWechatProps"></WechatWalletOpen>
  </LoadingLayout>
</template>
@@ -56,6 +57,7 @@
import ConfigureDialog from './components/ConfigureDialog.vue';
import { Message } from '@bole-core/core';
import * as enterpriseServices from '@/services/api/enterprise';
import WechatWalletOpen from './components/WechatWalletOpen.vue';
defineOptions({
  name: 'EnterpriseManageList',
@@ -132,7 +134,7 @@
  });
}
const { dialogProps, handleEdit, dialogState } = useFormDialog({
const { dialogProps, handleEdit, dialogState, editForm } = useFormDialog({
  onConfirm: handleAddOrEdit,
  defaultFormParams: {
    id: '',
@@ -140,9 +142,24 @@
  },
});
async function handleAddOrEdit() {
const { dialogProps: dialogWechatProps, handleAdd } = useFormDialog({
  defaultFormParams: {
    url: '',
  },
});
async function handleAddOrEdit(data?: any) {
  try {
    Message.successMessage('操作成功');
    if (editForm.enterpriseConfigureType === EnterpriseConfigureType.Wechat) {
      handleAdd({
        url: data?.sign_url,
      });
    }
    Message.successMessage(
      editForm.enterpriseConfigureType === EnterpriseConfigureType.Wechat
        ? '提交成功,请超级管理员扫码进行签约操作'
        : '操作成功'
    );
    getList(paginationState.pageIndex);
    dialogState.dialogVisible = false;
  } catch (error) {}
src/views/EnterpriseManage/components/ConfigureDialog.vue
@@ -54,7 +54,7 @@
const visible = defineModel({ type: Boolean });
const emit = defineEmits<{
  (e: 'onConfirm'): void;
  (e: 'onConfirm', value: any): void;
  (e: 'onCancel'): void;
}>();
@@ -91,7 +91,7 @@
    res = await wechatConfigureViewRef.value?.onConfirm?.();
  }
  if (res) {
    emit('onConfirm');
    emit('onConfirm', res);
  }
}
</script>
src/views/EnterpriseManage/components/WeChatPayWalletBankBranchsSelect.vue
@@ -29,7 +29,7 @@
watch(
  [toRef(props, 'bank_alias_code'), toRef(props, 'city_code'), toRef(props, 'need_bank_branch')],
  ([bank_alias_code, city_code, need_bank_branch]) => {
    bank_branch_id.value = '';
    // bank_branch_id.value = '';
    if (need_bank_branch) {
      getList();
    }
src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue
@@ -28,6 +28,7 @@
const account_bank_code = defineModel<number>('account_bank_code');
const bank_alias_code = defineModel<string>('bank_alias_code');
const need_bank_branch = defineModel<boolean>('need_bank_branch');
const bank_branch_id = defineModel<string>('bank_branch_id');
onMounted(() => {
  if (props.bank_account_type !== ('' as any)) {
@@ -38,11 +39,11 @@
watch(
  () => props.bank_account_type,
  (newVal) => {
    bank_alias.value = '';
    account_bank.value = '';
    account_bank_code.value = '' as any as number;
    bank_alias_code.value = '';
    need_bank_branch.value = false;
    // bank_alias.value = '';
    // account_bank.value = '';
    // account_bank_code.value = '' as any as number;
    // bank_alias_code.value = '';
    // need_bank_branch.value = false;
    if (newVal !== ('' as any)) {
      getList();
    }
@@ -90,6 +91,7 @@
    account_bank_code.value = bank.account_bank_code;
    bank_alias_code.value = bank.bank_alias_code;
    need_bank_branch.value = bank.need_bank_branch;
    bank_branch_id.value = '';
  }
}
</script>
src/views/EnterpriseManage/components/WechatConfigureView.vue
@@ -1030,6 +1030,7 @@
          v-model="form.bank_account_type"
          :valueEnum="bank_account_typeList"
          placeholder="请选择结算银行账户类型"
          @change="handleBankAccountTypeChange"
        >
        </ProFormSelect>
      </ProFormItemV2>
@@ -1051,6 +1052,7 @@
          v-model:account_bank_code="form.account_bank_code"
          v-model:bank_alias_code="form.bank_alias_code"
          v-model:need_bank_branch="form.need_bank_branch"
          v-model:bank_branch_id="form.bank_branch_id"
          :bank_account_type="form.bank_account_type"
          placeholder="请输入开户银行"
          clearable
@@ -1103,6 +1105,7 @@
  ProFormRadio,
  ProFormDatePicker,
  ProFormImageUpload,
  useFormDialog,
} from '@bole-core/components';
import * as enterpriseWalletServices from '@/services/api/enterpriseWallet';
import { useQuery } from '@tanstack/vue-query';
@@ -1753,6 +1756,15 @@
  form.id_holder_type = '' as any as EnumWeChatPayApplymentIdHolderType;
  form.id_doc_type = '' as any as EnumWeChatPayApplymentIdDocType;
  form.bank_account_type = EnumWeChatPayApplymentBankAccountType.BANK_ACCOUNT_TYPE_CORPORATE;
  handleBankAccountTypeChange();
}
function handleBankAccountTypeChange() {
  form.bank_alias = '';
  form.account_bank = '';
  form.account_bank_code = '' as any as number;
  form.bank_alias_code = '';
  form.need_bank_branch = false;
}
defineExpose({
src/views/EnterpriseManage/components/WechatWalletOpen.vue
New file
@@ -0,0 +1,24 @@
<template>
  <ProDialog title="超级管理员签约" v-model="visible" width="530" destroy-on-close draggable>
    <iframe v-if="form.url" width="430px" height="430px" :src="form.url"></iframe>
  </ProDialog>
</template>
<script setup lang="ts">
import { ProDialog } from '@bole-core/components';
defineOptions({
  name: 'WechatWalletOpen',
});
type Form = {
  url: string;
};
const form = defineModel<Form>('form');
const visible = defineModel({ type: Boolean });
</script>
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
</style>