ทดลองงาน แก้ path api, หน้า list และแบบมอบหมายฯ

This commit is contained in:
Warunee Tamkoo 2024-09-06 12:09:36 +07:00
parent a170d3e208
commit 4836d1ed47
3 changed files with 22 additions and 27 deletions

View file

@ -27,14 +27,12 @@ const personalId = route.params.personalId as string;
const assignId = ref<string>(route.params.form as string);
const routeName = router.currentRoute.value.name;
const myForm = ref<any>(null);
const fullname = ref<string>();
const date_start = ref<Date>();
const date_finish = ref<any>();
const other_desc = ref<object>({});
const other_desc = ref<string>("");
const other4_desc = ref<string>();
const monthOp: MonthOption[] = [];
const Other5 = ref<string>("");
const other5_no1_desc = ref<string>("");
const group = ref<any | null>(null);
const group2 = ref<any | null>(null);
@ -44,14 +42,12 @@ const main2 = ref<any>();
const main3 = ref<any>();
const main4 = ref<any>();
const main5 = ref<any>();
const Other = ref<string>("");
const commander = ref<any>("");
const chairman = ref<any>("");
const date1 = ref<any>();
const date2 = ref<any>();
const date3 = ref<any>();
const date4 = ref<any>();
const OtherLaw = ref<string>("");
const skill = ref<any>();
const skill2 = ref<any>();
const skill3 = ref<any>();
@ -508,7 +504,7 @@ async function postDateTime() {
})
.then(async (res) => {
const result = res.data;
date_finish.value = result.finish_date;
date_finish.value = result.data.finish_date;
})
.catch((e) => {})
.finally(async () => {
@ -634,7 +630,6 @@ function putDataEdit(id: string) {
});
}
const data = {
personal_id: GUID,
fullname: fullname.value,
position: position.value,
monthSelect:
@ -649,12 +644,12 @@ function putDataEdit(id: string) {
: dateToISO(new Date(date_finish.value)),
assign_knowledges: know_ledge,
assign_jobs: assign_job.filter((item) => item !== null),
other_desc: OtherLaw.value,
other_desc: other_desc.value,
assign_skill: allSkills,
assign_competency: assign_competencyMain.value,
assign_competency_group: assign_competencyGroupMain.value,
other4_desc: Other.value,
other5_no1_desc: Other5.value,
other4_desc: other4_desc.value,
other5_no1_desc: other5_no1_desc.value,
assign_outputs: Productivity_assign.filter((item) => item !== null),
assign_director: assign_director,
experimenter_dated:
@ -717,8 +712,6 @@ function putData(id: string) {
if (skill3.value) allSkills.push({ level: skill3.value.level });
if (skill4.value) allSkills.push({ level: skill4.value.level });
const allCompetency = assign_competencyMain.value;
const assign_director = [
{
personal_id: caretaker1.value.id,
@ -785,12 +778,12 @@ function putData(id: string) {
assign_knowledges: know_ledge,
assign_jobs: assign_job.filter((item) => item !== null),
other_desc: OtherLaw.value,
other_desc: other_desc.value,
assign_skill: allSkills,
assign_competency: assign_competencyMain.value,
assign_competency_group: assign_competencyGroupMain.value,
other4_desc: Other.value,
other5_no1_desc: Other5.value,
other4_desc: other4_desc.value,
other5_no1_desc: other5_no1_desc.value,
assign_outputs: Productivity_assign.filter((item) => item !== null),
assign_director: assign_director,
@ -812,7 +805,6 @@ function putData(id: string) {
* @param id personal id
*/
async function saveData(id: string) {
const data = putData(id);
dialogConfirm($q, async () => await DataSave(id));
}
@ -1743,7 +1735,7 @@ onMounted(async () => {
dense
borderless
outlined
v-model="OtherLaw"
v-model="other_desc"
type="textarea"
/>
</div>
@ -2234,7 +2226,7 @@ onMounted(async () => {
dense
borderless
outlined
v-model="Other"
v-model="other4_desc"
bg-color="white"
/>
</div>
@ -2384,7 +2376,7 @@ onMounted(async () => {
dense
borderless
outlined
v-model="Other5"
v-model="other5_no1_desc"
label="กรอกอื่นๆ"
bg-color="white"
/>

View file

@ -123,6 +123,9 @@ const columns = ref<QTableProps["columns"]>([
field: "probation_no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.probation_no ? row.probation_no : "-";
},
},
{
name: "order_number",
@ -132,6 +135,9 @@ const columns = ref<QTableProps["columns"]>([
field: "order_number",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.order_number ? row.order_number : "-";
},
},
{
name: "probation_status",