Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
xiaocp2009 2025-09-01 11:17:09 +08:00
commit 053e9b9299
19 changed files with 94 additions and 55 deletions

View File

@ -37,7 +37,7 @@
});
const data = ref<Record<string, any>>({
updateSupport: false,
updateSupport: true,
importMonth: dayjs().subtract(1, 'month').startOf('month').valueOf()
});
@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model:checked="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -7,6 +7,7 @@
import { getServiceBaseURL } from '@/utils/service';
import type FileUpload from '@/components/custom/file-upload.vue';
import { $t } from '@/locales';
import dayjs from "dayjs";
defineOptions({
name: 'EMBankingImportModal'
@ -36,7 +37,9 @@
});
const data = ref<Record<string, any>>({
updateSupport: false
updateSupport: false,
importMonth: dayjs().subtract(1, 'month').startOf('month').valueOf()
});
const fileList = ref<UploadFileInfo[]>([]);
@ -98,6 +101,17 @@
message.value = '';
}
} );
function disablePreviousDate(ts: number) {
// return ts < Date.now()
// const currentMonthStart = new Date(new Date().getFullYear(), new Date().getMonth(), 1).getTime()
// const prevMonthStart = new Date(new Date().getFullYear(), new Date().getMonth() - 1, 1).getTime()
//
// //
// return ts !== currentMonthStart && ts !== prevMonthStart
const prevMonthStart = dayjs().subtract(1, 'month').startOf('month')
// 1
return ts < prevMonthStart.valueOf()
}
</script>
]]]
@ -143,7 +157,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
<template #default>
@ -152,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -155,13 +155,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -171,7 +172,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -157,13 +157,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -173,7 +174,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -163,6 +163,7 @@
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>

View File

@ -156,13 +156,14 @@
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<n-divider vertical />
<!-- <NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>-->
<!-- <n-divider vertical />-->
<NDatePicker
v-model:value="data.importMonth"
type="month"
:placeholder="$t('common.selectImportMonth')"
:is-date-disabled="disablePreviousDate"
disabled
/>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">
@ -172,7 +173,7 @@
</NAlert>
<template #footer>
<NSpace justify="end" :size="16">
<NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>
<!-- <NButton @click="handleDownloadTemplate">{{ $t('common.downloadTemplate') }}</NButton>-->
<NButton type="primary" @click="handleSubmit">{{ $t('common.import') }}</NButton>
</NSpace>
</template>