chinese
date
This commit is contained in:
@@ -528,6 +528,13 @@
|
||||
// //this.calculateLunarBirthday();
|
||||
// }
|
||||
//}
|
||||
|
||||
// 提示訊息
|
||||
snackbar: {
|
||||
show: false,
|
||||
message: '',
|
||||
color: 'error'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
search_show(curr) {
|
||||
@@ -1046,6 +1053,15 @@
|
||||
},
|
||||
fam_save(item) {
|
||||
console.log("fam_save 1:", this.family.edItem);
|
||||
|
||||
// 驗證必填欄位 - 只有姓名必填
|
||||
if (!this.family.edItem.fam_name || this.family.edItem.fam_name.trim() === '') {
|
||||
this.snackbar.message = '請填寫姓名';
|
||||
this.snackbar.color = 'error';
|
||||
this.snackbar.show = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.family.is_tw) {
|
||||
this.family.edItem.city = '';
|
||||
this.family.edItem.area = '';
|
||||
@@ -1956,7 +1972,7 @@
|
||||
<v-form ref="familyForm">
|
||||
<v-text-field
|
||||
v-model="family.edItem.fam_name"
|
||||
label="姓名"
|
||||
label="姓名 * "
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
@@ -2124,9 +2140,10 @@
|
||||
</v-dialog>
|
||||
<v-snackbar
|
||||
v-model="snackbar.show"
|
||||
timeout="2000"
|
||||
:color="snackbar.color"
|
||||
timeout="3000"
|
||||
>
|
||||
{{ snackbar.text }}
|
||||
{{ snackbar.message }}
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn
|
||||
text
|
||||
|
||||
Reference in New Issue
Block a user