Merge branch 'develop' into devTee
This commit is contained in:
commit
ddc5a22244
8 changed files with 47 additions and 40 deletions
|
|
@ -53,7 +53,7 @@ async function getStat() {
|
|||
disclaim: statCard.disclaim,
|
||||
report: statCard.report,
|
||||
};
|
||||
DataStore.checkLoad(1);
|
||||
// DataStore.checkLoad(1);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -378,8 +378,10 @@ async function getTable() {
|
|||
|
||||
// รายชื่อทั้งหมด
|
||||
await filterpositionCandidate(rowData);
|
||||
rows.value = rowData;
|
||||
// rows.value = rowData;
|
||||
rowsAwait.value = rowData;
|
||||
await onUpdateNewRows(typeEmployee.value,positionCandidate.value)
|
||||
|
||||
|
||||
// รายชื่อไปยังหน่วยงาน
|
||||
rowsFilter.value = await rows.value.filter(
|
||||
|
|
@ -394,7 +396,7 @@ async function getTable() {
|
|||
e.nodeName !== null &&
|
||||
e.reportingDate !== null
|
||||
);
|
||||
await DataStore.checkLoad(1);
|
||||
// await DataStore.checkLoad(1);
|
||||
// insertAvatar(rows.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -419,8 +421,6 @@ async function filterpositionCandidate(data: any) {
|
|||
arr.findIndex((e: any) => e.id === item.id) === index
|
||||
);
|
||||
positionCandidateData.value.push(...uniqueData);
|
||||
|
||||
console.log(positionCandidateData.value);
|
||||
}
|
||||
|
||||
/** ยืนยันการผ่อนผัน*/
|
||||
|
|
@ -756,7 +756,12 @@ function openModalOrder(val: boolean) {
|
|||
modalOrder.value = val;
|
||||
}
|
||||
|
||||
function onUpdateNewRows(type: string, pos: string) {
|
||||
const typeEmployee = ref<string>("");
|
||||
const positionCandidate = ref<string>("");
|
||||
|
||||
async function onUpdateNewRows(type: string, pos: string) {
|
||||
typeEmployee.value = type;
|
||||
positionCandidate.value = pos;
|
||||
const data = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsAwait.value,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ const bmaOfficerOption = ref<optionData[]>([
|
|||
]);
|
||||
|
||||
const positionCandidate = ref<string>("");
|
||||
const positionCandidateOptions = ref<optionData[]>([]);
|
||||
|
||||
const props = defineProps({
|
||||
inputfilter: String,
|
||||
|
|
@ -120,6 +119,10 @@ const props = defineProps({
|
|||
roleAdmin: Boolean,
|
||||
});
|
||||
|
||||
const positionCandidateOptions = ref<optionData[]>(
|
||||
props?.positionCandidateData || []
|
||||
);
|
||||
|
||||
const pagination = ref({
|
||||
sortBy: "examNumber",
|
||||
descending: false,
|
||||
|
|
|
|||
|
|
@ -17,14 +17,18 @@ const mixin = useCounterMixin();
|
|||
const { dialogConfirm, onSearchDataTable } = mixin;
|
||||
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: null,
|
||||
prefix: null,
|
||||
firstName: null,
|
||||
lastName: null,
|
||||
citizenId: null,
|
||||
}));
|
||||
const firstSelected = selected.value[0];
|
||||
return firstSelected
|
||||
? firstSelected.directors.map((i: any) => ({
|
||||
id: firstSelected.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
rootId: i.rootId,
|
||||
}))
|
||||
: [];
|
||||
});
|
||||
|
||||
const filterKeyword = defineModel<string>("filterKeyword", { required: true });
|
||||
|
|
@ -89,6 +93,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "status",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return convertText(row.status);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
@ -224,11 +231,6 @@ watchEffect(() => {
|
|||
1
|
||||
}}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'status'">
|
||||
{{
|
||||
props.row.status ? convertText(props.row.status) : "-"
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
|
|||
|
|
@ -280,8 +280,10 @@ function onAddPerson() {
|
|||
actFullName: item.actFullName,
|
||||
posNo: item.posNo,
|
||||
role: member.value,
|
||||
rootId: item.orgRootId,
|
||||
}));
|
||||
rows.value = [...rows.value, ...data];
|
||||
|
||||
rows.value.push(...data);
|
||||
const roleOrder: Record<"chairman" | "committee" | "caregiver", number> = {
|
||||
chairman: 0,
|
||||
committee: 1,
|
||||
|
|
@ -294,6 +296,7 @@ function onAddPerson() {
|
|||
roleOrder[b.role as keyof typeof roleOrder]
|
||||
);
|
||||
});
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
|
|
@ -365,25 +368,24 @@ function changeFormData() {
|
|||
function onSubmit() {
|
||||
const body = {
|
||||
topic: topic.value,
|
||||
persons: rows.value.map(
|
||||
({ prefix, firstName, lastName, citizenId, ...newData }) => newData
|
||||
),
|
||||
persons: rows.value.map(({ ...newData }) => newData),
|
||||
};
|
||||
dialogConfirm($q, () => {
|
||||
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.put(config.API.appointMain + `/${id.value}`, body)
|
||||
.then(async (res) => {
|
||||
.then(async () => {
|
||||
await getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
isSave.value = false;
|
||||
hideLoader();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -446,17 +448,11 @@ async function onAct() {
|
|||
selected.value = [];
|
||||
}
|
||||
|
||||
function resetFilter() {
|
||||
pagination.value.page = 1;
|
||||
filterKeyword.value = "";
|
||||
getPerson();
|
||||
}
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
if (modal.value) {
|
||||
filterKeyword.value = "";
|
||||
|
||||
optionsTypeMain.value = optionsType.value;
|
||||
const optionData = optionsType.value;
|
||||
const caregiverCount = rows.value.filter(
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "status",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return convertText(row.status);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
@ -285,9 +288,6 @@ onMounted(async () => {
|
|||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'status'">
|
||||
{{ props.row.status ? convertText(props.row.status) : "-" }}
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ interface AppointMainRows {
|
|||
topic: string;
|
||||
commandNo: string;
|
||||
status: string;
|
||||
directors: any[];
|
||||
}
|
||||
|
||||
interface FormAppointData {
|
||||
|
|
@ -130,6 +131,7 @@ interface MemBerType {
|
|||
posNo: string;
|
||||
actFullName: string;
|
||||
isDirector?: boolean;
|
||||
orgRootId?: string;
|
||||
}
|
||||
|
||||
interface FormDataAppoint {
|
||||
|
|
|
|||
|
|
@ -275,7 +275,6 @@ async function fetchCommandType() {
|
|||
(v: ListCommand) => v.code == props.commandTypeCode
|
||||
);
|
||||
commandType.value = commandOp.value[0].id;
|
||||
console.log("🚀 ~ fetchCommandType ~ commandType.value:", commandType.value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue