更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- 基本信息 -->
|
||||
<view class="form-card">
|
||||
<view class="field">
|
||||
<text class="field-label">申请日期 <text class="required">*</text></text>
|
||||
@@ -24,7 +23,6 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 费用明细 -->
|
||||
<view class="items-card">
|
||||
<view class="items-head">
|
||||
<text class="items-title">费用明细</text>
|
||||
@@ -73,7 +71,6 @@
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 明细编辑弹层 -->
|
||||
<view v-if="itemEditorVisible" class="mask" @tap="closeItemEditor">
|
||||
<view class="sheet" @tap.stop>
|
||||
<view class="sheet-head">
|
||||
@@ -187,7 +184,6 @@ const form = reactive({
|
||||
description: ''
|
||||
})
|
||||
|
||||
/** 本地明细列表:编辑已有明细时带 id,保存时全量重建 */
|
||||
const items = ref([])
|
||||
|
||||
const typeOptions = ref([])
|
||||
@@ -366,7 +362,6 @@ function onRemoveReceipt(index) {
|
||||
itemForm.receipts.splice(index, 1)
|
||||
}
|
||||
|
||||
/** 上传发票:选择图片(拍照/相册)或从聊天文件选 PDF */
|
||||
function onUploadReceipt() {
|
||||
if (uploading.value) return
|
||||
uni.showActionSheet({
|
||||
@@ -390,7 +385,6 @@ function chooseImageReceipt() {
|
||||
})
|
||||
}
|
||||
|
||||
/** 小程序沙箱内选择本地 PDF 只能走微信会话文件(chooseMessageFile) */
|
||||
function chooseFileReceipt() {
|
||||
if (typeof uni.chooseMessageFile !== 'function') {
|
||||
uni.showToast({ title: '当前环境不支持选择文件', icon: 'none' })
|
||||
@@ -406,7 +400,6 @@ function chooseFileReceipt() {
|
||||
await uploadReceipts(paths)
|
||||
},
|
||||
fail: () => {
|
||||
// 用户取消选择,静默处理
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -421,7 +414,6 @@ async function uploadReceipts(paths) {
|
||||
}
|
||||
uni.showToast({ title: '上传成功', icon: 'success' })
|
||||
} catch (e) {
|
||||
// 上传封装已提示错误
|
||||
} finally {
|
||||
uploading.value = false
|
||||
}
|
||||
@@ -439,7 +431,6 @@ async function onSave() {
|
||||
const payload = { applyDate: form.applyDate, description: form.description }
|
||||
if (id) {
|
||||
await updateExpense(id, payload)
|
||||
// 明细全量重建:先删旧再逐条新增(草稿单,明细量少)
|
||||
const oldItems = await getExpense(id)
|
||||
for (const item of oldItems?.items || []) {
|
||||
await deleteExpenseItem(id, item.id)
|
||||
@@ -453,7 +444,6 @@ async function onSave() {
|
||||
uni.showToast({ title: '保存成功', icon: 'success' })
|
||||
setTimeout(() => uni.navigateBack(), 400)
|
||||
} catch (e) {
|
||||
// request 封装已弹出服务端错误提示
|
||||
} finally {
|
||||
saving.value = false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user