按季导入商户信息 up

This commit is contained in:
zhuangdashia 2025-10-14 20:29:33 +08:00
parent 60611b224b
commit ad1adb9c76
4 changed files with 542 additions and 358 deletions

View File

@ -1,11 +1,11 @@
/**
* Namespace Api
*
* All backend api type
*/
declare namespace Api {
/**
* namespace Original
*
@ -32,6 +32,8 @@ declare namespace Api {
parentMerchantName: string;
/** 一级商户号 */
parentMerchantId: CommonType.IdType;
/** 创建时间 */
createDate: string;
/** 来源 */
source: string;
/** 注销时间 */
@ -152,6 +154,7 @@ declare namespace Api {
| 'merchantShortName'
| 'parentMerchantName'
| 'parentMerchantId'
| 'createDate'
| 'source'
| 'cancelTime'
| 'expandEmployeeId'

View File

@ -188,6 +188,14 @@ const {
ellipsis: true,
resizable: true
},
{
key: 'createDate',
title: '创建时间',
align: 'center',
minWidth: 120,
ellipsis: true,
resizable: true
},
{
key: 'source',
title: '来源',

View File

@ -1,6 +1,9 @@
<script setup lang="ts">
import { computed, reactive, watch } from 'vue';
import { fetchCreateImportNormalMerchant, fetchUpdateImportNormalMerchant } from '@/service/api/original/import-normal-merchant';
import {
fetchCreateImportNormalMerchant,
fetchUpdateImportNormalMerchant
} from '@/service/api/original/import-normal-merchant';
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
import { $t } from '@/locales';
@ -27,7 +30,6 @@ const visible = defineModel<boolean>('visible', {
default: false
});
const { formRef, validate, restoreValidation } = useNaiveForm();
const { createRequiredRule } = useFormRules();
@ -53,8 +55,9 @@ function createDefaultModel(): Model {
merchantShortName: '',
parentMerchantName: '',
parentMerchantId: '',
createDate: '',
source: '',
cancelTime: undefined,
cancelTime: '',
expandEmployeeId: '',
expandEmployeeName: '',
manageEmployeeId: '',
@ -70,8 +73,8 @@ function createDefaultModel(): Model {
legalRepresentativeIdNumber: '',
merchantIdType: '',
merchantIdNumber: '',
businessLicenseStartDate: undefined,
businessLicenseEndDate: undefined,
businessLicenseStartDate: '',
businessLicenseEndDate: '',
accountOpeningIdType: '',
accountOpeningIdNumber: '',
registeredWebsite: '',
@ -104,19 +107,11 @@ function createDefaultModel(): Model {
quarterlyTransactionCount: undefined,
quarterlyTransactionAmount: undefined,
dailyAverageQuarterly: undefined,
importTime: '',
importTime: ''
};
}
type RuleKey = Extract<
keyof Model,
| 'tenantId'
| 'createDept'
| 'createBy'
| 'createTime'
| 'updateBy'
| 'updateTime'
>;
type RuleKey = Extract<keyof Model, 'tenantId' | 'createDept' | 'createBy' | 'createTime' | 'updateBy' | 'updateTime'>;
const rules: Record<RuleKey, App.Global.FormRule> = {
tenantId: createRequiredRule('租户编号不能为空'),
@ -145,16 +140,201 @@ function closeDrawer() {
async function handleSubmit() {
await validate();
const { id, institutionName, branchName, institutionCode, merchantId, merchantFullName, merchantShortName, parentMerchantName, parentMerchantId, source, cancelTime, expandEmployeeId, expandEmployeeName, manageEmployeeId, manageEmployeeName, merchantType, riskLevel, businessScope, businessScopeSecondary, disableType, detailedAddress, legalRepresentativeName, legalRepresentativeIdType, legalRepresentativeIdNumber, merchantIdType, merchantIdNumber, businessLicenseStartDate, businessLicenseEndDate, accountOpeningIdType, accountOpeningIdNumber, registeredWebsite, registeredIp, icpLicense, settlementLevel, settlementCycle, merchantFeeMode, alipayDebitRate, alipayCreditRate, wechatDebitRate, wechatCreditRate, unionpayDebitRate, unionpayCreditRate, zhiefuRate, freeFeeMonths, monthlyFreeFeeAmount, smallAmountFreeFee, monthlyCreditFreeFee, cashierPaymentType, staticCodePaymentType, settlementAccount, accountName, openingBankCode, openingBankName, alipayAccount, contactEmail, contactName, contactPhone, quarterlyTransactionCount, quarterlyTransactionAmount, dailyAverageQuarterly, importTime } = model;
const {
id,
institutionName,
branchName,
institutionCode,
merchantId,
merchantFullName,
merchantShortName,
parentMerchantName,
parentMerchantId,
source,
cancelTime,
expandEmployeeId,
expandEmployeeName,
manageEmployeeId,
manageEmployeeName,
merchantType,
riskLevel,
businessScope,
businessScopeSecondary,
disableType,
detailedAddress,
legalRepresentativeName,
legalRepresentativeIdType,
legalRepresentativeIdNumber,
merchantIdType,
merchantIdNumber,
businessLicenseStartDate,
businessLicenseEndDate,
accountOpeningIdType,
accountOpeningIdNumber,
registeredWebsite,
registeredIp,
icpLicense,
settlementLevel,
settlementCycle,
merchantFeeMode,
alipayDebitRate,
alipayCreditRate,
wechatDebitRate,
wechatCreditRate,
unionpayDebitRate,
unionpayCreditRate,
zhiefuRate,
freeFeeMonths,
monthlyFreeFeeAmount,
smallAmountFreeFee,
monthlyCreditFreeFee,
cashierPaymentType,
staticCodePaymentType,
settlementAccount,
accountName,
openingBankCode,
openingBankName,
alipayAccount,
contactEmail,
contactName,
contactPhone,
quarterlyTransactionCount,
quarterlyTransactionAmount,
dailyAverageQuarterly,
importTime
} = model;
// request
if (props.operateType === 'add') {
const { error } = await fetchCreateImportNormalMerchant({ institutionName, branchName, institutionCode, merchantId, merchantFullName, merchantShortName, parentMerchantName, parentMerchantId, source, cancelTime, expandEmployeeId, expandEmployeeName, manageEmployeeId, manageEmployeeName, merchantType, riskLevel, businessScope, businessScopeSecondary, disableType, detailedAddress, legalRepresentativeName, legalRepresentativeIdType, legalRepresentativeIdNumber, merchantIdType, merchantIdNumber, businessLicenseStartDate, businessLicenseEndDate, accountOpeningIdType, accountOpeningIdNumber, registeredWebsite, registeredIp, icpLicense, settlementLevel, settlementCycle, merchantFeeMode, alipayDebitRate, alipayCreditRate, wechatDebitRate, wechatCreditRate, unionpayDebitRate, unionpayCreditRate, zhiefuRate, freeFeeMonths, monthlyFreeFeeAmount, smallAmountFreeFee, monthlyCreditFreeFee, cashierPaymentType, staticCodePaymentType, settlementAccount, accountName, openingBankCode, openingBankName, alipayAccount, contactEmail, contactName, contactPhone, quarterlyTransactionCount, quarterlyTransactionAmount, dailyAverageQuarterly, importTime });
const { error } = await fetchCreateImportNormalMerchant({
institutionName,
branchName,
institutionCode,
merchantId,
merchantFullName,
merchantShortName,
parentMerchantName,
parentMerchantId,
source,
cancelTime,
expandEmployeeId,
expandEmployeeName,
manageEmployeeId,
manageEmployeeName,
merchantType,
riskLevel,
businessScope,
businessScopeSecondary,
disableType,
detailedAddress,
legalRepresentativeName,
legalRepresentativeIdType,
legalRepresentativeIdNumber,
merchantIdType,
merchantIdNumber,
businessLicenseStartDate,
businessLicenseEndDate,
accountOpeningIdType,
accountOpeningIdNumber,
registeredWebsite,
registeredIp,
icpLicense,
settlementLevel,
settlementCycle,
merchantFeeMode,
alipayDebitRate,
alipayCreditRate,
wechatDebitRate,
wechatCreditRate,
unionpayDebitRate,
unionpayCreditRate,
zhiefuRate,
freeFeeMonths,
monthlyFreeFeeAmount,
smallAmountFreeFee,
monthlyCreditFreeFee,
cashierPaymentType,
staticCodePaymentType,
settlementAccount,
accountName,
openingBankCode,
openingBankName,
alipayAccount,
contactEmail,
contactName,
contactPhone,
quarterlyTransactionCount,
quarterlyTransactionAmount,
dailyAverageQuarterly,
importTime
});
if (error) return;
}
if (props.operateType === 'edit') {
const { error } = await fetchUpdateImportNormalMerchant({ id, institutionName, branchName, institutionCode, merchantId, merchantFullName, merchantShortName, parentMerchantName, parentMerchantId, source, cancelTime, expandEmployeeId, expandEmployeeName, manageEmployeeId, manageEmployeeName, merchantType, riskLevel, businessScope, businessScopeSecondary, disableType, detailedAddress, legalRepresentativeName, legalRepresentativeIdType, legalRepresentativeIdNumber, merchantIdType, merchantIdNumber, businessLicenseStartDate, businessLicenseEndDate, accountOpeningIdType, accountOpeningIdNumber, registeredWebsite, registeredIp, icpLicense, settlementLevel, settlementCycle, merchantFeeMode, alipayDebitRate, alipayCreditRate, wechatDebitRate, wechatCreditRate, unionpayDebitRate, unionpayCreditRate, zhiefuRate, freeFeeMonths, monthlyFreeFeeAmount, smallAmountFreeFee, monthlyCreditFreeFee, cashierPaymentType, staticCodePaymentType, settlementAccount, accountName, openingBankCode, openingBankName, alipayAccount, contactEmail, contactName, contactPhone, quarterlyTransactionCount, quarterlyTransactionAmount, dailyAverageQuarterly, importTime });
const { error } = await fetchUpdateImportNormalMerchant({
id,
institutionName,
branchName,
institutionCode,
merchantId,
merchantFullName,
merchantShortName,
parentMerchantName,
parentMerchantId,
source,
cancelTime,
expandEmployeeId,
expandEmployeeName,
manageEmployeeId,
manageEmployeeName,
merchantType,
riskLevel,
businessScope,
businessScopeSecondary,
disableType,
detailedAddress,
legalRepresentativeName,
legalRepresentativeIdType,
legalRepresentativeIdNumber,
merchantIdType,
merchantIdNumber,
businessLicenseStartDate,
businessLicenseEndDate,
accountOpeningIdType,
accountOpeningIdNumber,
registeredWebsite,
registeredIp,
icpLicense,
settlementLevel,
settlementCycle,
merchantFeeMode,
alipayDebitRate,
alipayCreditRate,
wechatDebitRate,
wechatCreditRate,
unionpayDebitRate,
unionpayCreditRate,
zhiefuRate,
freeFeeMonths,
monthlyFreeFeeAmount,
smallAmountFreeFee,
monthlyCreditFreeFee,
cashierPaymentType,
staticCodePaymentType,
settlementAccount,
accountName,
openingBankCode,
openingBankName,
alipayAccount,
contactEmail,
contactName,
contactPhone,
quarterlyTransactionCount,
quarterlyTransactionAmount,
dailyAverageQuarterly,
importTime
});
if (error) return;
}
@ -199,16 +379,14 @@ watch(visible, () => {
<NFormItem label="一级商户号" path="parentMerchantId">
<NInput v-model:value="model.parentMerchantId" placeholder="请输入一级商户号" />
</NFormItem>
<NFormItem label="创建时间" path="createDate">
<NInput v-model:value="model.createDate" placeholder="请输入创建时间" />
</NFormItem>
<NFormItem label="来源" path="source">
<NInput v-model:value="model.source" placeholder="请输入来源" />
</NFormItem>
<NFormItem label="注销时间" path="cancelTime">
<NDatePicker
v-model:formatted-value="model.cancelTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
clearable
/>
<NInput v-model:value="model.cancelTime" placeholder="请输入创建时间" />
</NFormItem>
<NFormItem label="拓展员工号" path="expandEmployeeId">
<NInput v-model:value="model.expandEmployeeId" placeholder="请输入拓展员工号" />
@ -238,12 +416,7 @@ watch(visible, () => {
<NInput v-model:value="model.disableType" placeholder="请输入禁用类型" />
</NFormItem>
<NFormItem label="详细地址" path="detailedAddress">
<NInput
v-model:value="model.detailedAddress"
:rows="3"
type="textarea"
placeholder="请输入详细地址"
/>
<NInput v-model:value="model.detailedAddress" :rows="3" type="textarea" placeholder="请输入详细地址" />
</NFormItem>
<NFormItem label="法定代表人姓名" path="legalRepresentativeName">
<NInput v-model:value="model.legalRepresentativeName" placeholder="请输入法定代表人姓名" />

View File

@ -305,7 +305,7 @@ const {
},
{
key: 'heatingNo',
title: '取暖费户号',
title: '户号',
align: 'center',
minWidth: 120,
ellipsis: true,