Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
593d714296
4 files changed
+45
-22
No files matched your search
@@ -140,6 +140,7 @@ const handleFileSuccess = (response: any) => {
|
||||
* 提交表单,触发上传
|
||||
*/
|
||||
const submitFileForm = () => {
|
||||
state.upload.isUploading = true
|
||||
uploadRef.value.submit()
|
||||
}
|
||||
|
||||
|
||||
@@ -3,19 +3,36 @@
|
||||
<el-dialog :title="prop.title" v-model="state.upload.open" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" label-width="90px">
|
||||
<el-form-item label="充值类型" prop="bizType" class="mb20">
|
||||
<dict-select v-model="form.bizType" dict-code="wallet_biz_recharge" :hide-ids="[
|
||||
roleCodes.includes('RETURN_CANTEEN') || auths(['wallet_walletRechargeApply_refund']) ? '' : '3',
|
||||
auths(['wallet_walletRechargeApply_select_jz']) ? '' : '2',
|
||||
]" placeholder="请选择充值类型" />
|
||||
<dict-select
|
||||
v-model="form.bizType"
|
||||
dict-code="wallet_biz_recharge"
|
||||
:hide-ids="[
|
||||
roleCodes.includes('RETURN_CANTEEN') || auths(['wallet_walletRechargeApply_refund']) ? '' : '3',
|
||||
auths(['wallet_walletRechargeApply_select_jz']) ? '' : '2',
|
||||
]"
|
||||
placeholder="请选择充值类型"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.bizType == '1'" label="发票" prop="invoiceId" class="mb20">
|
||||
<select-wallet-invoice v-model="form.invoiceId" />
|
||||
</el-form-item>
|
||||
<el-upload v-else v-loading="state.upload.isUploading" ref="uploadRef" :limit="1" accept=".xlsx, .xls"
|
||||
:data="{ bizType: form.bizType }" :headers="headers" :action="baseURL + other.adaptationUrl(url)"
|
||||
:disabled="state.upload.isUploading" :on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess" :on-error="handleFileError" :auto-upload="false" drag>
|
||||
<el-upload
|
||||
v-else
|
||||
v-loading="state.upload.isUploading"
|
||||
ref="uploadRef"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:data="{ bizType: form.bizType }"
|
||||
:headers="headers"
|
||||
:action="baseURL + other.adaptationUrl(url)"
|
||||
:disabled="state.upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:on-error="handleFileError"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
{{ $t("excel.operationNotice") }}
|
||||
@@ -24,8 +41,13 @@
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<span>{{ $t("excel.fileFormat") }}</span>
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
||||
@click="downExcelTemp" v-if="tempUrl">{{ $t("excel.downloadTemplate") }}
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="downExcelTemp"
|
||||
v-if="tempUrl"
|
||||
>{{ $t("excel.downloadTemplate") }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
@@ -41,8 +63,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!--校验失败错误数据-->
|
||||
<el-dialog :title="$t('excel.validationFailureData')" v-model="state.errorVisible" :close-on-click-modal="false"
|
||||
draggable>
|
||||
<el-dialog :title="$t('excel.validationFailureData')" v-model="state.errorVisible" :close-on-click-modal="false" draggable>
|
||||
<el-table :data="state.errorData">
|
||||
<el-table-column property="lineNum" align="center" :label="$t('excel.lineNumbers')" width="100" />
|
||||
<el-table-column property="errors" align="center" :label="$t('excel.misDescription')" show-overflow-tooltip>
|
||||
@@ -161,10 +182,11 @@ const handleFileSuccess = (response: any) => {
|
||||
*/
|
||||
const submitFileForm = async () => {
|
||||
if (form.bizType != "1") {
|
||||
state.upload.isUploading = true
|
||||
uploadRef.value.submit()
|
||||
return
|
||||
}
|
||||
const valid = await dataFormRef.value.validate().catch(() => { })
|
||||
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||
if (!valid) return
|
||||
try {
|
||||
state.upload.isUploading = true
|
||||
@@ -173,7 +195,7 @@ const submitFileForm = async () => {
|
||||
useMessage().success("导入成功充值")
|
||||
emit?.("refreshDataList")
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
console.error(error)
|
||||
useMessage().error(error.msg || "新增充值数据错误")
|
||||
} finally {
|
||||
state.upload.isUploading = false
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
icon="printer"
|
||||
text
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="loading"
|
||||
@click="previewInvoice(row)"
|
||||
>
|
||||
查看发票
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="flex items-center absolute bottom-0 top-0 right-0">
|
||||
<!-- <div class="flex items-center absolute bottom-0 top-0 right-0">
|
||||
<span class="text-gray-500 text-sm whitespace-nowrap" style="writing-mode: vertical-rl; letter-spacing: 0.2em">
|
||||
{{ "第一联 存根联".replace(/ /g, " ") }}
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -165,7 +165,7 @@ const loading = ref(false)
|
||||
const loadingBack = ref(false)
|
||||
const receiptRef = ref<HTMLElement | null>(null)
|
||||
const deptOrUserInput = ref<HTMLInputElement | null>(null)
|
||||
let timer = null
|
||||
let timer
|
||||
const isStamping = ref(false) // 盖章动画开关
|
||||
const receiptData = ref<ReceiptData>({
|
||||
id: "",
|
||||
@@ -210,7 +210,7 @@ const handleClose = () => {
|
||||
timer = null
|
||||
}
|
||||
|
||||
// 发票退回
|
||||
// 发票作废
|
||||
const backInvoice = async () => {
|
||||
if (!receiptData.value.picUrl) {
|
||||
useMessage().error("请先盖章")
|
||||
@@ -357,17 +357,17 @@ defineExpose({
|
||||
|
||||
@keyframes stamp-in {
|
||||
0% {
|
||||
transform: translateY(-100px) scale(2) rotate(0);
|
||||
transform: translateY(-100px) scale(2);
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translateY(-10px) scale(1.5) rotate(0);
|
||||
transform: translateY(-10px) scale(1.5);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0) scale(1) rotate(0);
|
||||
transform: translateY(0) scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user