功德芳名列印,bug修正
This commit is contained in:
+37
-22
@@ -287,6 +287,7 @@
|
||||
openFollowerDialog(item) {
|
||||
this.follower_dialog.current_item = item;
|
||||
this.follower_dialog.show = true;
|
||||
//this.follower_dialog.search = true;
|
||||
// 若開啟時已有關鍵字,可以自動帶入搜尋
|
||||
// this.searchFollowers();
|
||||
},
|
||||
@@ -296,7 +297,7 @@
|
||||
this.follower_dialog.loading = true;
|
||||
try {
|
||||
const response = await axios.post(HTTP_HOST + 'api/follower/GetList', {
|
||||
f_number: this.follower_dialog.search,
|
||||
//f_number: this.follower_dialog.search,
|
||||
u_name: this.follower_dialog.search
|
||||
}, {
|
||||
params: {
|
||||
@@ -387,6 +388,7 @@
|
||||
verify_note: item.verify_note
|
||||
// 備註:依您的原本邏輯,這裡並未傳送 check_date, check_amount 等欄位,若後端 API 需要這些沖帳資訊,請在這裡一併補上。
|
||||
}));
|
||||
|
||||
|
||||
try {
|
||||
const res = await axios.post('../../api/transfer_register/batch_update', updateList);
|
||||
@@ -402,28 +404,28 @@
|
||||
},
|
||||
async submitData() {
|
||||
// 檢查必填欄位 - 入帳銀行/帳戶
|
||||
const missingAccNum = this.items.filter(item => !item.acc_num);
|
||||
if (missingAccNum.length > 0) {
|
||||
alert('請選擇入帳銀行/帳戶!有 ' + missingAccNum.length + ' 筆資料未選擇。');
|
||||
return;
|
||||
}
|
||||
//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 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 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 => ({
|
||||
const updateList = this.items.filter(item => item.f_num && item.acc_num && item.check_date && item.check_amount && item.check_status).map(item => ({
|
||||
id: item.id,
|
||||
f_num: item.f_num,
|
||||
status: '2',
|
||||
@@ -436,18 +438,31 @@
|
||||
kind: item.kind,
|
||||
verify_note: item.verify_note
|
||||
}));
|
||||
//console.log(updateList)
|
||||
if (updateList.length === 0) {
|
||||
this.snackbar.text = "無資料可以送出"
|
||||
this.snackbar.show=true
|
||||
return
|
||||
}
|
||||
;
|
||||
try {
|
||||
const res = await axios.post('../../api/transfer_register/batch_update', updateList);
|
||||
if (res.data && res.data.success) {
|
||||
alert('送出成功!');
|
||||
// alert('送出成功!');
|
||||
this.snackbar.text = "送出成功"
|
||||
this.snackbar.show = true
|
||||
// 重新載入資料
|
||||
await this.loadData();
|
||||
} else {
|
||||
alert('送出失敗,請重試 :' + res.data.message);
|
||||
this.snackbar.text = '送出失敗,請重試 :' + res.data.message
|
||||
this.snackbar.show = true
|
||||
//alert('送出失敗,請重試 :' + res.data.message);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('送出失敗:', e);
|
||||
alert('送出失敗,請再試一次!');
|
||||
this.snackbar.text = '送出失敗,請再試一次!'
|
||||
this.snackbar.show = true
|
||||
//alert('送出失敗,請再試一次!');
|
||||
}
|
||||
},
|
||||
closeWindow() {
|
||||
|
||||
Reference in New Issue
Block a user