更正問題:

入帳必填檢查
修正牌位排版HTML
This commit is contained in:
2025-09-05 08:14:03 +08:00
parent 3a40a33204
commit e6c6b1f43f
3 changed files with 55 additions and 31 deletions

View File

@@ -156,9 +156,9 @@ new Vue({
headers: [
{ text: '匯款人資訊', value: 'info' },
{ text: '匯款備註/相片', value: 'note' },
{ text: '入帳銀行/帳戶 | 支付資訊/帳號後5碼', value: 'acc_num' },
{ text: '入帳日期', value: 'check_date' },
{ text: '入帳金額', value: 'check_amount' },
{ text: '*入帳銀行/帳戶 | 支付資訊/帳號後5碼', value: 'acc_num' },
{ text: '*入帳日期', value: 'check_date' },
{ text: '*入帳金額', value: 'check_amount' },
{ text: '備註/狀態 | 核對記錄', value: 'check_memo' }
],
items: [],
@@ -215,6 +215,27 @@ new Vue({
this.loading = false;
},
async submitData() {
// 檢查必填欄位 - 入帳銀行/帳戶
const missingAccNum = this.items.filter(item => !item.acc_num);
if (missingAccNum.length > 0) {
alert('請選擇入帳銀行/帳戶!有 ' + missingAccNum.length + ' 筆資料未選擇。');
return;
}
// 檢查必填欄位 - 入帳日期
const missingCheckDate = this.items.filter(item => !item.check_date);
if (missingCheckDate.length > 0) {
alert('請填寫入帳日期!有 ' + missingCheckDate.length + ' 筆資料未填寫。');
return;
}
// 檢查必填欄位 - 入帳金額
const missingCheckAmount = this.items.filter(item => !item.check_amount || item.check_amount <= 0);
if (missingCheckAmount.length > 0) {
alert('請填寫入帳金額!有 ' + missingCheckAmount.length + ' 筆資料未填寫或金額無效。');
return;
}
// 組出要更新的資料
const updateList = this.items.map(item => ({
id: item.id,