แก้วินัย
This commit is contained in:
parent
015d2d9857
commit
3c2a010ab4
24 changed files with 286 additions and 93 deletions
|
|
@ -18,7 +18,46 @@ async function onSubmit(data: any) {
|
||||||
/** post */
|
/** post */
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.complaintAdd(), data)
|
.post(config.API.complaintAdd(), {
|
||||||
|
id: data.id,
|
||||||
|
respondentType: data.respondentType,
|
||||||
|
organizationId: data.organizationId,
|
||||||
|
consideredAgency: data.consideredAgency,
|
||||||
|
title: data.title,
|
||||||
|
description: data.description,
|
||||||
|
dateReceived: data.dateReceived,
|
||||||
|
dateConsideration: data.dateConsideration,
|
||||||
|
offenseDetails: data.offenseDetails,
|
||||||
|
levelConsideration: data.levelConsideration,
|
||||||
|
dateNotification: data.dateNotification,
|
||||||
|
complaintFrom: data.complaintFrom,
|
||||||
|
appellant: data.appellant,
|
||||||
|
documentFile: data.documentFile,
|
||||||
|
status: data.status,
|
||||||
|
result: data.result,
|
||||||
|
persons: data.persons.map((item: any) => ({
|
||||||
|
personId: item.personId,
|
||||||
|
idcard: item.idcard,
|
||||||
|
prefix: item.prefix,
|
||||||
|
firstName: item.firstName,
|
||||||
|
lastName: item.lastName,
|
||||||
|
name: item.name,
|
||||||
|
posNo: item.posNo === "-" ? null : item.posNo,
|
||||||
|
position: item.position,
|
||||||
|
positionLevel: item.positionLevel,
|
||||||
|
salary: item.salary === "-" ? null : item.salary,
|
||||||
|
organization: item.organization,
|
||||||
|
phone: item.phone === "-" ? null : item.phone,
|
||||||
|
email: item.email,
|
||||||
|
})),
|
||||||
|
disciplineComplaintDocs: data.disciplineComplaintDocs.map(
|
||||||
|
(file: any) => ({
|
||||||
|
id: file.id,
|
||||||
|
fileName: file.fileName,
|
||||||
|
pathName: file.pathName,
|
||||||
|
})
|
||||||
|
),
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
router.push(`/discipline/complaints/${res.data.result}`);
|
router.push(`/discipline/complaints/${res.data.result}`);
|
||||||
|
|
|
||||||
|
|
@ -100,11 +100,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: "ตำแหน่งเลขที่",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -151,7 +151,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"idcard",
|
"idcard",
|
||||||
"name",
|
"name",
|
||||||
"positionNo",
|
"posNo",
|
||||||
"position",
|
"position",
|
||||||
"positionLevel",
|
"positionLevel",
|
||||||
"salary",
|
"salary",
|
||||||
|
|
@ -193,12 +193,51 @@ async function getData() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* บันทึกข้อมูลเมื่อแก้ไข
|
* บันทึกข้อมูลเมื่อแก้ไข
|
||||||
* @param data ข้อมูลจากฟอร์ม
|
* @param data ข้อมูลจากฟอร์ม
|
||||||
*/
|
*/
|
||||||
async function onSubmit(data: any) {
|
async function onSubmit(data: any) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.complaintbyId(id.value), data)
|
.put(config.API.complaintbyId(id.value), {
|
||||||
|
id: data.id,
|
||||||
|
respondentType: data.respondentType,
|
||||||
|
organizationId: data.organizationId,
|
||||||
|
consideredAgency: data.consideredAgency,
|
||||||
|
title: data.title,
|
||||||
|
description: data.description,
|
||||||
|
dateReceived: data.dateReceived,
|
||||||
|
dateConsideration: data.dateConsideration,
|
||||||
|
offenseDetails: data.offenseDetails,
|
||||||
|
levelConsideration: data.levelConsideration,
|
||||||
|
dateNotification: data.dateNotification,
|
||||||
|
complaintFrom: data.complaintFrom,
|
||||||
|
appellant: data.appellant,
|
||||||
|
documentFile: data.documentFile,
|
||||||
|
status: data.status,
|
||||||
|
result: data.result,
|
||||||
|
persons: data.persons.map((item: any) => ({
|
||||||
|
personId: item.personId,
|
||||||
|
idcard: item.idcard,
|
||||||
|
prefix: item.prefix,
|
||||||
|
firstName: item.firstName,
|
||||||
|
lastName: item.lastName,
|
||||||
|
name: item.name,
|
||||||
|
posNo: item.posNo === "-" ? null : item.posNo,
|
||||||
|
position: item.position,
|
||||||
|
positionLevel: item.positionLevel,
|
||||||
|
salary: item.salary === "-" ? null : item.salary,
|
||||||
|
organization: item.organization,
|
||||||
|
phone: item.phone === "-" ? null : item.phone,
|
||||||
|
email: item.email,
|
||||||
|
})),
|
||||||
|
disciplineComplaintDocs: data.disciplineComplaintDocs.map(
|
||||||
|
(file: any) => ({
|
||||||
|
id: file.id,
|
||||||
|
fileName: file.fileName,
|
||||||
|
pathName: file.pathName,
|
||||||
|
})
|
||||||
|
),
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
getData();
|
getData();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,6 @@ function validateForm() {
|
||||||
countNum.value = 1;
|
countNum.value = 1;
|
||||||
onSubmit();
|
onSubmit();
|
||||||
} else {
|
} else {
|
||||||
console.log("ไม่ผ่าน ");
|
|
||||||
console.log(formData)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -896,7 +894,7 @@ onMounted(() => {
|
||||||
color="secondary"
|
color="secondary"
|
||||||
label="บันทึก"
|
label="บันทึก"
|
||||||
type="submit"
|
type="submit"
|
||||||
><q-tooltip>บับทึกข้อมูล</q-tooltip></q-btn
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ const data = reactive<FormData>({
|
||||||
organizationId: "",
|
organizationId: "",
|
||||||
persons: [],
|
persons: [],
|
||||||
investigationExtendHistory: [],
|
investigationExtendHistory: [],
|
||||||
isDisciplinary:false
|
isDisciplinary: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
||||||
|
|
@ -180,10 +180,54 @@ function getData() {
|
||||||
* @param id ระบุ บุคคล
|
* @param id ระบุ บุคคล
|
||||||
*/
|
*/
|
||||||
async function onSubmit(data: any) {
|
async function onSubmit(data: any) {
|
||||||
|
console.log(data);
|
||||||
// put
|
// put
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.investigateById(id.value), data)
|
.put(config.API.investigateById(id.value), {
|
||||||
|
id: data.id,
|
||||||
|
idComplaint: data.idComplaint,
|
||||||
|
complaint: data.complaint,
|
||||||
|
complaintdetail: data.complaintdetail,
|
||||||
|
investigationDescription: data.investigationDescription,
|
||||||
|
fault: data.fault,
|
||||||
|
investigationDetailOther: data.investigationDetailOther,
|
||||||
|
evidenceFiles: data.evidenceFiles,
|
||||||
|
fileComplaint: data.fileComplaint,
|
||||||
|
investigationExtendStatus: data.investigationExtendStatus,
|
||||||
|
investigationDateStart: data.investigationDateStart,
|
||||||
|
investigationDateEnd: data.investigationDateEnd,
|
||||||
|
investigationDetail: data.investigationDetail,
|
||||||
|
investigationDaysExtend: data.investigationDaysExtend,
|
||||||
|
investigationStatusResult: data.investigationStatusResult,
|
||||||
|
investigationCauseText: data.investigationCauseText,
|
||||||
|
complaintStatus: data.complaintStatus,
|
||||||
|
result: data.result,
|
||||||
|
directors: data.directors,
|
||||||
|
disciplineInvestigateDocs: data.disciplineInvestigateDocs,
|
||||||
|
disciplineInvestigateRelevantDocs: data.disciplineInvestigateRelevantDocs,
|
||||||
|
status: data.status,
|
||||||
|
documentFile: data.documentFile,
|
||||||
|
respondentType: data.respondentType,
|
||||||
|
organizationId: data.organizationId,
|
||||||
|
persons: data.persons.map((item: any) => ({
|
||||||
|
personId: item.personId,
|
||||||
|
idcard: item.idcard,
|
||||||
|
prefix: item.prefix,
|
||||||
|
firstName: item.firstName,
|
||||||
|
lastName: item.lastName,
|
||||||
|
name: item.name,
|
||||||
|
posNo: item.posNo === "-" ? null : item.posNo,
|
||||||
|
position: item.position,
|
||||||
|
positionLevel: item.positionLevel,
|
||||||
|
salary: item.salary === "-" ? null : item.salary,
|
||||||
|
organization: item.organization,
|
||||||
|
phone: item.phone === "-" ? null : item.phone,
|
||||||
|
email: item.email,
|
||||||
|
})),
|
||||||
|
investigationExtendHistory: data.investigationExtendHistory,
|
||||||
|
isDisciplinary: data.isDisciplinary,
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
getData();
|
getData();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
@ -359,7 +403,7 @@ watch(
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-card flat class="col-12">
|
<q-card flat class="col-12">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
v-model="store.tabMenu"
|
v-model="store.tabMenu"
|
||||||
|
|
|
||||||
|
|
@ -168,33 +168,28 @@ function validateForm() {
|
||||||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||||
*/
|
*/
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm($q, async () => {
|
||||||
$q,
|
if (
|
||||||
async () => {
|
formData.investigationDateStart !== null &&
|
||||||
if (
|
formData.investigationDateEnd !== null
|
||||||
formData.investigationDateStart !== null &&
|
) {
|
||||||
formData.investigationDateEnd !== null
|
const investigationDateStart = new Date(formData.investigationDateStart);
|
||||||
) {
|
const investigationDateEnd = new Date(formData.investigationDateEnd);
|
||||||
const investigationDateStart = new Date(
|
|
||||||
formData.investigationDateStart
|
|
||||||
);
|
|
||||||
const investigationDateEnd = new Date(formData.investigationDateEnd);
|
|
||||||
|
|
||||||
formData.investigationDateStart = moment(investigationDateStart).format(
|
formData.investigationDateStart = moment(investigationDateStart).format(
|
||||||
"YYYY-MM-DD"
|
"YYYY-MM-DD"
|
||||||
);
|
);
|
||||||
formData.investigationDateEnd =
|
formData.investigationDateEnd =
|
||||||
moment(investigationDateEnd).format("YYYY-MM-DD");
|
moment(investigationDateEnd).format("YYYY-MM-DD");
|
||||||
}
|
|
||||||
|
|
||||||
if (mainStore.rowsAdd) {
|
|
||||||
formData.persons = mainStore.rowsAdd;
|
|
||||||
}
|
|
||||||
props.onSubmit(formData);
|
|
||||||
isSave.value = false;
|
|
||||||
investigationExtendStatus.value = false;
|
|
||||||
}
|
}
|
||||||
);
|
|
||||||
|
if (mainStore.rowsAdd) {
|
||||||
|
formData.persons = mainStore.rowsAdd;
|
||||||
|
}
|
||||||
|
props.onSubmit(formData);
|
||||||
|
isSave.value = false;
|
||||||
|
investigationExtendStatus.value = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -260,7 +255,22 @@ watch(props.data, async () => {
|
||||||
formData.investigationExtendHistory =
|
formData.investigationExtendHistory =
|
||||||
props.data.investigationExtendHistory;
|
props.data.investigationExtendHistory;
|
||||||
|
|
||||||
mainStore.rowsAdd = props.data.persons;
|
mainStore.rowsAdd = props.data.persons.map((person: any) => ({
|
||||||
|
id: person.id,
|
||||||
|
idcard: person.idcard,
|
||||||
|
name: person.name,
|
||||||
|
prefix: person.prefix,
|
||||||
|
firstName: person.firstName,
|
||||||
|
lastName: person.lastName,
|
||||||
|
position: person.position,
|
||||||
|
positionLevel: person.positionLevel,
|
||||||
|
salary: person.salary === null ? "-" : person.salary,
|
||||||
|
personId: person.personId,
|
||||||
|
posNo: person.posNo === null ? "-" : person.posNo,
|
||||||
|
organization: person.organization,
|
||||||
|
isSend: person.isSend,
|
||||||
|
isDisciplinary: person.isDisciplinary,
|
||||||
|
}));
|
||||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||||
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
||||||
);
|
);
|
||||||
|
|
@ -404,7 +414,6 @@ function confirmDelete(id: string) {
|
||||||
}
|
}
|
||||||
async function addPerson(data: any) {
|
async function addPerson(data: any) {
|
||||||
await mainStore.fetchData(data);
|
await mainStore.fetchData(data);
|
||||||
toggleModal();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1568,7 +1577,6 @@ onMounted(async () => {
|
||||||
:modal="modalPerson"
|
:modal="modalPerson"
|
||||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||||
:close="toggleModal"
|
:close="toggleModal"
|
||||||
:save="addPerson"
|
|
||||||
:selected-data="mainStore.rowsAdd"
|
:selected-data="mainStore.rowsAdd"
|
||||||
@returnData="handleSave"
|
@returnData="handleSave"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ const router = useRouter();
|
||||||
|
|
||||||
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
console.log("add");
|
|
||||||
router.push(`/discipline/disciplinary`);
|
router.push(`/discipline/disciplinary`);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -220,9 +220,50 @@ async function fetchDetailComplaints() {
|
||||||
* @param data ข้อมูล ใน form
|
* @param data ข้อมูล ใน form
|
||||||
*/
|
*/
|
||||||
async function onSubmitDisciplinary(data: any) {
|
async function onSubmitDisciplinary(data: any) {
|
||||||
|
console.log(data);
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.disciplineDisciplinaryById(id.value), data)
|
.put(config.API.disciplineDisciplinaryById(id.value), {
|
||||||
|
respondentType:data.respondentType ,
|
||||||
|
organizationId:data.organizationId ,
|
||||||
|
disciplinaryDateAllegation:data.disciplinaryDateAllegation ,
|
||||||
|
disciplinaryDateEvident:data.disciplinaryDateEvident ,
|
||||||
|
disciplinaryCaseFault:data.disciplinaryCaseFault ,
|
||||||
|
disciplinaryInvestigateAt:data.disciplinaryInvestigateAt ,
|
||||||
|
disciplinaryFaultLevel:data.disciplinaryFaultLevel ,
|
||||||
|
disciplinaryRefLaw:data.disciplinaryRefLaw ,
|
||||||
|
disciplinarySummaryEvidence:data.disciplinarySummaryEvidence ,
|
||||||
|
disciplinaryRecordAccuser:data.disciplinaryRecordAccuser ,
|
||||||
|
disciplinaryWitnesses:data.disciplinaryWitnesses ,
|
||||||
|
result:data.result ,
|
||||||
|
directors: data.directors,
|
||||||
|
persons: data.persons.map((item: any) => (
|
||||||
|
{
|
||||||
|
id:item.id ,
|
||||||
|
idcard:item.idcard ,
|
||||||
|
name:item.name ,
|
||||||
|
prefix:item.prefix ,
|
||||||
|
firstName:item.firstName ,
|
||||||
|
lastName:item.lastName ,
|
||||||
|
position:item.position === "-" ? null:item.position,
|
||||||
|
positionLevel:item.positionLevel === "-" ? null:item.positionLevel,
|
||||||
|
salary:item.salary === "-" ? null:item.salary,
|
||||||
|
personId:item.personId ,
|
||||||
|
posNo:item.posNo === "-" ? null:item.posNo,
|
||||||
|
organization:item.organization ,
|
||||||
|
})),
|
||||||
|
extendStatus:data.extendStatus ,
|
||||||
|
disciplinaryDateStart:data.disciplinaryDateStart ,
|
||||||
|
disciplinaryDateEnd:data.disciplinaryDateEnd ,
|
||||||
|
daysExtend:data.daysExtend ,
|
||||||
|
disciplinaryDateInvestigation:data.disciplinaryDateInvestigation ,
|
||||||
|
disciplinaryDateResult:data.disciplinaryDateResult ,
|
||||||
|
disciplinaryStatusResult:data.disciplinaryStatusResult ,
|
||||||
|
disciplinaryCauseText:data.disciplinaryCauseText ,
|
||||||
|
disciplinaryResult:data.disciplinaryResult ,
|
||||||
|
disciplinaryExtendHistory:data.disciplinaryExtendHistory ,
|
||||||
|
disciplinaryFaultLevelOther:data.disciplinaryFaultLevelOther ,
|
||||||
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fetchDetailDisciplinary();
|
await fetchDetailDisciplinary();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
|
||||||
|
|
@ -240,32 +240,29 @@ async function calEndDate(val: string) {
|
||||||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||||
*/
|
*/
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm($q, async () => {
|
||||||
$q,
|
if (
|
||||||
async () => {
|
formData.disciplinaryDateStart !== null &&
|
||||||
if (
|
formData.disciplinaryDateEnd !== null
|
||||||
formData.disciplinaryDateStart !== null &&
|
) {
|
||||||
formData.disciplinaryDateEnd !== null
|
const disciplinaryDateStart = new Date(formData.disciplinaryDateStart);
|
||||||
) {
|
const disciplinaryDateEnd = new Date(formData.disciplinaryDateEnd);
|
||||||
const disciplinaryDateStart = new Date(formData.disciplinaryDateStart);
|
|
||||||
const disciplinaryDateEnd = new Date(formData.disciplinaryDateEnd);
|
|
||||||
|
|
||||||
formData.disciplinaryDateStart = moment(disciplinaryDateStart).format(
|
formData.disciplinaryDateStart = moment(disciplinaryDateStart).format(
|
||||||
"YYYY-MM-DD"
|
"YYYY-MM-DD"
|
||||||
);
|
);
|
||||||
formData.disciplinaryDateEnd =
|
formData.disciplinaryDateEnd =
|
||||||
moment(disciplinaryDateEnd).format("YYYY-MM-DD");
|
moment(disciplinaryDateEnd).format("YYYY-MM-DD");
|
||||||
}
|
|
||||||
|
|
||||||
if (mainStore.rowsAdd) {
|
|
||||||
formData.persons = mainStore.rowsAdd;
|
|
||||||
}
|
|
||||||
|
|
||||||
emit("submit:disciplinary", formData);
|
|
||||||
isSave.value = false;
|
|
||||||
extendStatus.value = false;
|
|
||||||
}
|
}
|
||||||
);
|
|
||||||
|
if (mainStore.rowsAdd) {
|
||||||
|
formData.persons = mainStore.rowsAdd;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit("submit:disciplinary", formData);
|
||||||
|
isSave.value = false;
|
||||||
|
extendStatus.value = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่นลบข้อมูลกรรมการ */
|
/** ฟังชั่นลบข้อมูลกรรมการ */
|
||||||
|
|
@ -321,14 +318,48 @@ async function fetchDatadetail() {
|
||||||
disciplineDisciplinary_DocRelevants.value =
|
disciplineDisciplinary_DocRelevants.value =
|
||||||
props.data.disciplineDisciplinary_DocRelevants;
|
props.data.disciplineDisciplinary_DocRelevants;
|
||||||
|
|
||||||
investigateDis.rowSent = formData.persons;
|
investigateDis.rowSent = formData.persons.map((person: any) => ({
|
||||||
|
id: person.id,
|
||||||
|
idcard: person.idcard,
|
||||||
|
name: person.name,
|
||||||
|
prefix: person.prefix,
|
||||||
|
firstName: person.firstName,
|
||||||
|
lastName: person.lastName,
|
||||||
|
position: person.position === null ? '-':person.position,
|
||||||
|
positionLevel: person.positionLevel === null ? '-':person.positionLevel,
|
||||||
|
salary: person.salary === null ? '-':person.salary,
|
||||||
|
personId: person.personId,
|
||||||
|
posNo: person.posNo === null ? '-':person.posNo,
|
||||||
|
organization: person.organization,
|
||||||
|
isSend: person.isSend,
|
||||||
|
isSuspend: person.isSuspend,
|
||||||
|
status: person.status,
|
||||||
|
statusDiscard: person.statusDiscard,
|
||||||
|
}));
|
||||||
|
|
||||||
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult;
|
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult;
|
||||||
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
||||||
formData.disciplinaryResult = props.data.disciplinaryResult;
|
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||||
formData.disciplinaryExtendHistory = props.data.disciplinaryExtendHistory;
|
formData.disciplinaryExtendHistory = props.data.disciplinaryExtendHistory;
|
||||||
|
|
||||||
mainStore.rowsAdd = props.data.persons;
|
mainStore.rowsAdd = props.data.persons.map((person: any) => ({
|
||||||
|
id: person.id,
|
||||||
|
idcard: person.idcard,
|
||||||
|
name: person.name,
|
||||||
|
prefix: person.prefix,
|
||||||
|
firstName: person.firstName,
|
||||||
|
lastName: person.lastName,
|
||||||
|
position: person.position === null ? '-':person.position,
|
||||||
|
positionLevel: person.positionLevel === null ? '-':person.positionLevel,
|
||||||
|
salary: person.salary === null ? '-':person.salary,
|
||||||
|
personId: person.personId,
|
||||||
|
posNo: person.posNo === null ? '-':person.posNo,
|
||||||
|
organization: person.organization,
|
||||||
|
isSend: person.isSend,
|
||||||
|
isSuspend: person.isSuspend,
|
||||||
|
status: person.status,
|
||||||
|
statusDiscard: person.statusDiscard,
|
||||||
|
}));
|
||||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||||
(item: any) => item.isSuspend === "NEW" && item.isSend === "NEW"
|
(item: any) => item.isSuspend === "NEW" && item.isSend === "NEW"
|
||||||
);
|
);
|
||||||
|
|
@ -372,12 +403,10 @@ async function fetchDatadetail() {
|
||||||
|
|
||||||
function returnCount(num: number) {
|
function returnCount(num: number) {
|
||||||
countNum.value = num;
|
countNum.value = num;
|
||||||
console.log(countNum.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addPerson(data: any) {
|
async function addPerson(data: any) {
|
||||||
await mainStore.fetchData(data);
|
await mainStore.fetchData(data);
|
||||||
toggleModal();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -566,7 +595,6 @@ function emitPerson(data: PersonsArray[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function openEditDirector(data: any) {
|
function openEditDirector(data: any) {
|
||||||
console.log(data);
|
|
||||||
editDirectorId.value = data.idRaw;
|
editDirectorId.value = data.idRaw;
|
||||||
modalEditDirector.value = true;
|
modalEditDirector.value = true;
|
||||||
dutyVal.value = data.duty;
|
dutyVal.value = data.duty;
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ function getHistory(id:string){
|
||||||
http
|
http
|
||||||
.get(config.API.historyOrderById(id))
|
.get(config.API.historyOrderById(id))
|
||||||
.then((res)=>{
|
.then((res)=>{
|
||||||
console.log(res)
|
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data.map((item:any)=>({
|
rows.value = data.map((item:any)=>({
|
||||||
commandSubject:item.commandSubject ? item.commandSubject : '-',
|
commandSubject:item.commandSubject ? item.commandSubject : '-',
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,8 @@ async function fetchListResult() {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
maxPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
maxPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||||
await fetchList(data);
|
await fetchList(data);
|
||||||
console.log(res);
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|
@ -62,7 +60,6 @@ async function updateQueryString(p: number, pS: number, key: string) {
|
||||||
* @param id ไอดีเฉพาะ รายบุคคล
|
* @param id ไอดีเฉพาะ รายบุคคล
|
||||||
*/
|
*/
|
||||||
function openEdit(id: string) {
|
function openEdit(id: string) {
|
||||||
console.log(id);
|
|
||||||
router.push(`/discipline-result/${id}`);
|
router.push(`/discipline-result/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ function onSubmit(channelReturn:string){
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveData(channelReturn:string){
|
function saveData(channelReturn:string){
|
||||||
console.log(channelReturn)
|
|
||||||
showLoader()
|
showLoader()
|
||||||
http
|
http
|
||||||
.post(config.API.complaintChannel(),{
|
.post(config.API.complaintChannel(),{
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ const props = defineProps({
|
||||||
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
|
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
|
||||||
function save() {
|
function save() {
|
||||||
channelRef.value.validate().then(async (result: boolean) => {
|
channelRef.value.validate().then(async (result: boolean) => {
|
||||||
console.log("1");
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (channel.value) {
|
if (channel.value) {
|
||||||
props.onSubmit(channel.value);
|
props.onSubmit(channel.value);
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,6 @@ function addEmployee() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
dialogMessageNotify($q, "กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก");
|
dialogMessageNotify($q, "กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก");
|
||||||
} else {
|
} else {
|
||||||
console.log("nodata");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -242,7 +241,6 @@ async function searchInput() {
|
||||||
rows.value = list;
|
rows.value = list;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ async function getData(){
|
||||||
await http
|
await http
|
||||||
.get(config.API.suspendById(dataId))
|
.get(config.API.suspendById(dataId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data.result);
|
|
||||||
const dataGet = res.data.result;
|
const dataGet = res.data.result;
|
||||||
data.id = dataGet.id;
|
data.id = dataGet.id;
|
||||||
data.personId = dataGet.personId;
|
data.personId = dataGet.personId;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ const router = useRouter();
|
||||||
* @param data ชุดข้อมูล
|
* @param data ชุดข้อมูล
|
||||||
*/
|
*/
|
||||||
async function onSubmit(data: any) {
|
async function onSubmit(data: any) {
|
||||||
console.log("add", data);
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("profileId", data.profileId);
|
formData.append("profileId", data.profileId);
|
||||||
formData.append("citizenId", data.citizenId);
|
formData.append("citizenId", data.citizenId);
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,6 @@ function getData() {
|
||||||
http
|
http
|
||||||
.get(config.API.appealByID(id.value))
|
.get(config.API.appealByID(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
|
||||||
const dataList = res.data.result;
|
const dataList = res.data.result;
|
||||||
data.id = dataList.id;
|
data.id = dataList.id;
|
||||||
data.title = dataList.title;
|
data.title = dataList.title;
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,6 @@ function validateForm() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("ไม่ผ่าน ");
|
|
||||||
// console.log(hasError);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -219,7 +217,6 @@ function uploadFile() {
|
||||||
http
|
http
|
||||||
.put(config.API.appealUpLoadFile(formData.id), Data)
|
.put(config.API.appealUpLoadFile(formData.id), Data)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
props.getData();
|
props.getData();
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ const props = defineProps({
|
||||||
* อัปโหลดหลักฐานสนับสนุนข้อกล่าวหา
|
* อัปโหลดหลักฐานสนับสนุนข้อกล่าวหา
|
||||||
*/
|
*/
|
||||||
async function uploadFile() {
|
async function uploadFile() {
|
||||||
console.log("test");
|
|
||||||
if (props.type === "relevant") {
|
if (props.type === "relevant") {
|
||||||
props.returnCount(2);
|
props.returnCount(2);
|
||||||
} else if (props.type === "summaryEvidence") {
|
} else if (props.type === "summaryEvidence") {
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,10 @@ interface ArrayPersonAdd {
|
||||||
prefix: string; //คำนำหน้า
|
prefix: string; //คำนำหน้า
|
||||||
firstName: string; //ชื่อ
|
firstName: string; //ชื่อ
|
||||||
lastName: string; //นามสกุล
|
lastName: string; //นามสกุล
|
||||||
posNo: string; //เลขที่ตำแหน่ง
|
posNo: string|null; //เลขที่ตำแหน่ง
|
||||||
position: string; //ตำแหน่ง
|
position: string; //ตำแหน่ง
|
||||||
positionLevel: string; //ระดับ
|
positionLevel: string; //ระดับ
|
||||||
salary: number; //เงินเดือน
|
salary: number|null; //เงินเดือน
|
||||||
organization: string; //สังกัด
|
organization: string; //สังกัด
|
||||||
name: string;
|
name: string;
|
||||||
report?: boolean;
|
report?: boolean;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ export const useAppealComplainStore = defineStore(
|
||||||
status: statusTothai(e.status)
|
status: statusTothai(e.status)
|
||||||
}));
|
}));
|
||||||
rows.value = dataList;
|
rows.value = dataList;
|
||||||
console.log(rows.value)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,6 @@ export const useInvestigateDisStore = defineStore(
|
||||||
}));
|
}));
|
||||||
rows2.value = datalistDirector;
|
rows2.value = datalistDirector;
|
||||||
selected.value = rows2.value;
|
selected.value = rows2.value;
|
||||||
// console.log(rows2.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,6 @@ export const useInvestigateFactStore = defineStore(
|
||||||
* @param type type ที่กำหนด ของ input นั้นๆ
|
* @param type type ที่กำหนด ของ input นั้นๆ
|
||||||
*/
|
*/
|
||||||
function filterSelector(val: string, update: Function, type: string) {
|
function filterSelector(val: string, update: Function, type: string) {
|
||||||
console.log(val);
|
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase();
|
const needle = val.toLowerCase();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ export const useDisciplineSuspendStore = defineStore(
|
||||||
* @param data ข้อมูลจาก API
|
* @param data ข้อมูลจาก API
|
||||||
*/
|
*/
|
||||||
function getData(data: listData[]) {
|
function getData(data: listData[]) {
|
||||||
console.log(data)
|
|
||||||
const dataList: dataType[] = data.map((item: listData) => ({
|
const dataList: dataType[] = data.map((item: listData) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
citizenId: item.citizenId,
|
citizenId: item.citizenId,
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,23 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
* @param data ข้อมูลรายการบุคคล
|
* @param data ข้อมูลรายการบุคคล
|
||||||
*/
|
*/
|
||||||
function fetchData(data: ArrayPersonAdd[]) {
|
function fetchData(data: ArrayPersonAdd[]) {
|
||||||
rowsAdd.value = data;
|
const dataList:any = data.map((item: any) => (
|
||||||
|
{
|
||||||
|
id: item.id,
|
||||||
|
idcard: item.idcard,
|
||||||
|
name: item.name,
|
||||||
|
prefix: item.prefix,
|
||||||
|
firstName: item.firstName,
|
||||||
|
lastName: item.lastName,
|
||||||
|
position: item.position,
|
||||||
|
positionLevel: item.positionLevel,
|
||||||
|
salary: item.salary === null ? '-':item.salary,
|
||||||
|
personId: item.personId,
|
||||||
|
posNo: item.posNo === null ? '-':item.posNo,
|
||||||
|
organization: item.organization
|
||||||
|
}
|
||||||
|
))
|
||||||
|
rowsAdd.value = dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue