Merge branch 'develop' into warunee-dev
This commit is contained in:
commit
4e35ba1c2b
2 changed files with 39 additions and 15 deletions
|
|
@ -71,7 +71,6 @@
|
|||
v-model="monthSelect"
|
||||
:label="`ระยะเวลากี่เดือน`"
|
||||
/>
|
||||
<div v-if="monthSelect !== null">{{ monthSelect }} เดือน</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<datepicker
|
||||
|
|
@ -96,7 +95,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 +128,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 +1252,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 +1261,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 +1273,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 +1301,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 +1329,7 @@ const addKnowledge = () => {
|
|||
knowledgeCount.value++;
|
||||
}
|
||||
};
|
||||
|
||||
const knowledgeArray = computed(() => {
|
||||
return Array(knowledgeCount.value).fill("");
|
||||
});
|
||||
|
|
@ -1539,6 +1538,21 @@ interface CheckboxItem {
|
|||
// const caregiverRef2 = ref()
|
||||
|
||||
// const workInfopRef = ref()
|
||||
const putData = () =>{
|
||||
const data = {
|
||||
fullname:fullname.value,
|
||||
position:position.value,
|
||||
monthSelect:monthSelect.value,
|
||||
date_start:date_start.value,
|
||||
date_finish:date_finish.value,
|
||||
caretaker1:caretaker1.value,
|
||||
caretaker2:caretaker2.value,
|
||||
activity_desc:activity_desc.value,
|
||||
goal_desc:goal_desc.value,
|
||||
knowledge:knowledge.value,
|
||||
}
|
||||
console.log("test",data)
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
// myForm.value.resetValidation();
|
||||
|
|
@ -1551,7 +1565,6 @@ const saveData = async () => {
|
|||
// workInfopRef.value.validate();
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
// showLoader();
|
||||
|
||||
// แสดงข้อมูลใน Console
|
||||
|
||||
|
|
@ -1576,6 +1589,17 @@ const saveData = async () => {
|
|||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
} else {
|
||||
putData()
|
||||
// ลองดู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 +1624,7 @@ const OPmain = [""];
|
|||
const group = ref<string>("");
|
||||
const group2 = ref<string>("");
|
||||
const group3 = ref<string>("");
|
||||
const OPgroup = [""];
|
||||
const OPgroup = ["test"];
|
||||
|
||||
const Other = ref<string>("");
|
||||
|
||||
|
|
|
|||
|
|
@ -1354,8 +1354,8 @@ const clickAdd = () => {
|
|||
};
|
||||
|
||||
// ดูรายการแก้ไขรายชื่อ
|
||||
const redirectToPage = (profileId?: string) => {
|
||||
router.push(`/registryEmployee/edit/${profileId}`);
|
||||
const redirectToPage = (id?: string) => {
|
||||
router.push(`/registry/${id}`);
|
||||
};
|
||||
const editDetail = async (row: any) => {
|
||||
await getPosition(row.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue