no message
This commit is contained in:
parent
05d41035cd
commit
9db3265704
1 changed files with 21 additions and 12 deletions
|
|
@ -96,7 +96,7 @@
|
|||
hide-bottom-space
|
||||
class="full-width datepicker q-mb-md"
|
||||
:model-value="
|
||||
dateExam != null ? date2Thai(dateExam) : null
|
||||
date_start != null ? date2Thai(date_start) : null
|
||||
"
|
||||
:label="`${'ตั้งเเต่วันที่'}`"
|
||||
clearable
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
readonly
|
||||
class="full-width datepicker q-mb-md"
|
||||
:model-value="
|
||||
dateExam2 != null ? date2Thai(dateExam2) : null
|
||||
date_finish != null ? date2Thai(date_finish) : null
|
||||
"
|
||||
:label="`${'ถึงวันที่'}`"
|
||||
clearable
|
||||
|
|
@ -1253,8 +1253,7 @@ const val1 = ref([
|
|||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, notifyError } = mixin;
|
||||
const dateExam = ref<Date | null>(null);
|
||||
const dateExam2 = ref<Date | null>(null);
|
||||
|
||||
const checkValidate = ref<boolean>(false);
|
||||
const myForm = ref<any>(null);
|
||||
|
||||
|
|
@ -1263,8 +1262,8 @@ const personal_id = ref<string>();
|
|||
const fullname = ref<string>();
|
||||
const knowledge_skill_map_no = ref<string[]>([]);
|
||||
const round_no = ref<number>();
|
||||
const date_start = ref<Date>();
|
||||
const date_finish = ref<Date>();
|
||||
const date_start = ref<Date | null>(null);
|
||||
const date_finish = ref<Date | null>(null);
|
||||
const behavior_desc = ref<string>();
|
||||
const other_desc = ref<object>({});
|
||||
const other4_desc = ref<string>();
|
||||
|
|
@ -1275,13 +1274,13 @@ const createdAt = ref<Date>();
|
|||
const updatedAt = ref<Date>();
|
||||
|
||||
const clearDateExam = () => {
|
||||
dateExam.value = null;
|
||||
date_start.value = null;
|
||||
};
|
||||
const clearDateExam2 = () => {
|
||||
dateExam2.value = null;
|
||||
date_finish.value = null;
|
||||
};
|
||||
const isDatePicker2Readonly = computed(() => {
|
||||
return dateExam.value === null;
|
||||
return date_start.value === null;
|
||||
});
|
||||
const routeName = router.currentRoute.value.name;
|
||||
const name = ref<string>("");
|
||||
|
|
@ -1303,7 +1302,7 @@ const monthOp = [{ value: "6", label: "6 เดือน" }];
|
|||
const activityCount = ref<number>(2);
|
||||
const activity_desc = ref<string[]>(Array(activityCount.value).fill(""));
|
||||
const goal_desc = ref<string[]>(Array(activityCount.value).fill(""));
|
||||
|
||||
const activityDataArray = ref<any[]>([]);
|
||||
const addActivity = () => {
|
||||
activityCount.value++;
|
||||
};
|
||||
|
|
@ -1331,6 +1330,7 @@ const addKnowledge = () => {
|
|||
knowledgeCount.value++;
|
||||
}
|
||||
};
|
||||
|
||||
const knowledgeArray = computed(() => {
|
||||
return Array(knowledgeCount.value).fill("");
|
||||
});
|
||||
|
|
@ -1551,7 +1551,6 @@ const saveData = async () => {
|
|||
// workInfopRef.value.validate();
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
// showLoader();
|
||||
|
||||
// แสดงข้อมูลใน Console
|
||||
|
||||
|
|
@ -1576,6 +1575,16 @@ const saveData = async () => {
|
|||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
} else {
|
||||
// ลองดูlog
|
||||
activityDataArray.value = activity_desc.value.map((activity, index) => ({
|
||||
id: index + 1,
|
||||
activity_desc: activity,
|
||||
goal_desc: goal_desc.value[index],
|
||||
}));
|
||||
// showLoader();
|
||||
console.log("activity_desc:", activity_desc.value);
|
||||
console.log("goal_desc:", goal_desc.value);
|
||||
console.log(activityDataArray.value);
|
||||
// Validation ไม่ผ่าน
|
||||
notifyError($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||
}
|
||||
|
|
@ -1600,7 +1609,7 @@ const OPmain = [""];
|
|||
const group = ref<string>("");
|
||||
const group2 = ref<string>("");
|
||||
const group3 = ref<string>("");
|
||||
const OPgroup = [""];
|
||||
const OPgroup = ["test"];
|
||||
|
||||
const Other = ref<string>("");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue