แก้วินัย
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 */
|
||||
showLoader();
|
||||
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) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
router.push(`/discipline/complaints/${res.data.result}`);
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "positionNo",
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "positionNo",
|
||||
field: "posNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -151,7 +151,7 @@ const visibleColumns = ref<string[]>([
|
|||
"no",
|
||||
"idcard",
|
||||
"name",
|
||||
"positionNo",
|
||||
"posNo",
|
||||
"position",
|
||||
"positionLevel",
|
||||
"salary",
|
||||
|
|
@ -193,12 +193,51 @@ async function getData() {
|
|||
|
||||
/**
|
||||
* บันทึกข้อมูลเมื่อแก้ไข
|
||||
* @param data ข้อมูลจากฟอร์ม
|
||||
* @param data ข้อมูลจากฟอร์ม
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
showLoader();
|
||||
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) => {
|
||||
getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -160,8 +160,6 @@ function validateForm() {
|
|||
countNum.value = 1;
|
||||
onSubmit();
|
||||
} else {
|
||||
console.log("ไม่ผ่าน ");
|
||||
console.log(formData)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -896,7 +894,7 @@ onMounted(() => {
|
|||
color="secondary"
|
||||
label="บันทึก"
|
||||
type="submit"
|
||||
><q-tooltip>บับทึกข้อมูล</q-tooltip></q-btn
|
||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const data = reactive<FormData>({
|
|||
organizationId: "",
|
||||
persons: [],
|
||||
investigationExtendHistory: [],
|
||||
isDisciplinary:false
|
||||
isDisciplinary: false,
|
||||
});
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
||||
|
|
@ -180,10 +180,54 @@ function getData() {
|
|||
* @param id ระบุ บุคคล
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
console.log(data);
|
||||
// put
|
||||
showLoader();
|
||||
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) => {
|
||||
getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -359,7 +403,7 @@ watch(
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<q-card flat class="col-12">
|
||||
<q-tabs
|
||||
v-model="store.tabMenu"
|
||||
|
|
|
|||
|
|
@ -168,33 +168,28 @@ function validateForm() {
|
|||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||
*/
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
if (
|
||||
formData.investigationDateStart !== null &&
|
||||
formData.investigationDateEnd !== null
|
||||
) {
|
||||
const investigationDateStart = new Date(
|
||||
formData.investigationDateStart
|
||||
);
|
||||
const investigationDateEnd = new Date(formData.investigationDateEnd);
|
||||
dialogConfirm($q, async () => {
|
||||
if (
|
||||
formData.investigationDateStart !== null &&
|
||||
formData.investigationDateEnd !== null
|
||||
) {
|
||||
const investigationDateStart = new Date(formData.investigationDateStart);
|
||||
const investigationDateEnd = new Date(formData.investigationDateEnd);
|
||||
|
||||
formData.investigationDateStart = moment(investigationDateStart).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
formData.investigationDateEnd =
|
||||
moment(investigationDateEnd).format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = mainStore.rowsAdd;
|
||||
}
|
||||
props.onSubmit(formData);
|
||||
isSave.value = false;
|
||||
investigationExtendStatus.value = false;
|
||||
formData.investigationDateStart = moment(investigationDateStart).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
formData.investigationDateEnd =
|
||||
moment(investigationDateEnd).format("YYYY-MM-DD");
|
||||
}
|
||||
);
|
||||
|
||||
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 =
|
||||
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(
|
||||
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
||||
);
|
||||
|
|
@ -404,7 +414,6 @@ function confirmDelete(id: string) {
|
|||
}
|
||||
async function addPerson(data: any) {
|
||||
await mainStore.fetchData(data);
|
||||
toggleModal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1568,7 +1577,6 @@ onMounted(async () => {
|
|||
:modal="modalPerson"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
@returnData="handleSave"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ const router = useRouter();
|
|||
|
||||
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
||||
const onSubmit = async () => {
|
||||
console.log("add");
|
||||
router.push(`/discipline/disciplinary`);
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -220,9 +220,50 @@ async function fetchDetailComplaints() {
|
|||
* @param data ข้อมูล ใน form
|
||||
*/
|
||||
async function onSubmitDisciplinary(data: any) {
|
||||
console.log(data);
|
||||
showLoader();
|
||||
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 () => {
|
||||
await fetchDetailDisciplinary();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -240,32 +240,29 @@ async function calEndDate(val: string) {
|
|||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||
*/
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
if (
|
||||
formData.disciplinaryDateStart !== null &&
|
||||
formData.disciplinaryDateEnd !== null
|
||||
) {
|
||||
const disciplinaryDateStart = new Date(formData.disciplinaryDateStart);
|
||||
const disciplinaryDateEnd = new Date(formData.disciplinaryDateEnd);
|
||||
dialogConfirm($q, async () => {
|
||||
if (
|
||||
formData.disciplinaryDateStart !== null &&
|
||||
formData.disciplinaryDateEnd !== null
|
||||
) {
|
||||
const disciplinaryDateStart = new Date(formData.disciplinaryDateStart);
|
||||
const disciplinaryDateEnd = new Date(formData.disciplinaryDateEnd);
|
||||
|
||||
formData.disciplinaryDateStart = moment(disciplinaryDateStart).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
formData.disciplinaryDateEnd =
|
||||
moment(disciplinaryDateEnd).format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = mainStore.rowsAdd;
|
||||
}
|
||||
|
||||
emit("submit:disciplinary", formData);
|
||||
isSave.value = false;
|
||||
extendStatus.value = false;
|
||||
formData.disciplinaryDateStart = moment(disciplinaryDateStart).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
formData.disciplinaryDateEnd =
|
||||
moment(disciplinaryDateEnd).format("YYYY-MM-DD");
|
||||
}
|
||||
);
|
||||
|
||||
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 =
|
||||
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.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
||||
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||
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(
|
||||
(item: any) => item.isSuspend === "NEW" && item.isSend === "NEW"
|
||||
);
|
||||
|
|
@ -372,12 +403,10 @@ async function fetchDatadetail() {
|
|||
|
||||
function returnCount(num: number) {
|
||||
countNum.value = num;
|
||||
console.log(countNum.value);
|
||||
}
|
||||
|
||||
async function addPerson(data: any) {
|
||||
await mainStore.fetchData(data);
|
||||
toggleModal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -566,7 +595,6 @@ function emitPerson(data: PersonsArray[]) {
|
|||
}
|
||||
|
||||
function openEditDirector(data: any) {
|
||||
console.log(data);
|
||||
editDirectorId.value = data.idRaw;
|
||||
modalEditDirector.value = true;
|
||||
dutyVal.value = data.duty;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ function getHistory(id:string){
|
|||
http
|
||||
.get(config.API.historyOrderById(id))
|
||||
.then((res)=>{
|
||||
console.log(res)
|
||||
const data = res.data.result;
|
||||
rows.value = data.map((item:any)=>({
|
||||
commandSubject:item.commandSubject ? item.commandSubject : '-',
|
||||
|
|
|
|||
|
|
@ -39,10 +39,8 @@ async function fetchListResult() {
|
|||
const data = res.data.result.data;
|
||||
maxPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||
await fetchList(data);
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -62,7 +60,6 @@ async function updateQueryString(p: number, pS: number, key: string) {
|
|||
* @param id ไอดีเฉพาะ รายบุคคล
|
||||
*/
|
||||
function openEdit(id: string) {
|
||||
console.log(id);
|
||||
router.push(`/discipline-result/${id}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ function onSubmit(channelReturn:string){
|
|||
}
|
||||
|
||||
function saveData(channelReturn:string){
|
||||
console.log(channelReturn)
|
||||
showLoader()
|
||||
http
|
||||
.post(config.API.complaintChannel(),{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ const props = defineProps({
|
|||
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
|
||||
function save() {
|
||||
channelRef.value.validate().then(async (result: boolean) => {
|
||||
console.log("1");
|
||||
if (result) {
|
||||
if (channel.value) {
|
||||
props.onSubmit(channel.value);
|
||||
|
|
|
|||
|
|
@ -178,7 +178,6 @@ function addEmployee() {
|
|||
hideLoader();
|
||||
dialogMessageNotify($q, "กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก");
|
||||
} else {
|
||||
console.log("nodata");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +241,6 @@ async function searchInput() {
|
|||
rows.value = list;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ async function getData(){
|
|||
await http
|
||||
.get(config.API.suspendById(dataId))
|
||||
.then((res) => {
|
||||
console.log(res.data.result);
|
||||
const dataGet = res.data.result;
|
||||
data.id = dataGet.id;
|
||||
data.personId = dataGet.personId;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ const router = useRouter();
|
|||
* @param data ชุดข้อมูล
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
console.log("add", data);
|
||||
const formData = new FormData();
|
||||
formData.append("profileId", data.profileId);
|
||||
formData.append("citizenId", data.citizenId);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ function getData() {
|
|||
http
|
||||
.get(config.API.appealByID(id.value))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
const dataList = res.data.result;
|
||||
data.id = dataList.id;
|
||||
data.title = dataList.title;
|
||||
|
|
|
|||
|
|
@ -171,8 +171,6 @@ function validateForm() {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
console.log("ไม่ผ่าน ");
|
||||
// console.log(hasError);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -219,7 +217,6 @@ function uploadFile() {
|
|||
http
|
||||
.put(config.API.appealUpLoadFile(formData.id), Data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
props.getData();
|
||||
})
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ const props = defineProps({
|
|||
* อัปโหลดหลักฐานสนับสนุนข้อกล่าวหา
|
||||
*/
|
||||
async function uploadFile() {
|
||||
console.log("test");
|
||||
if (props.type === "relevant") {
|
||||
props.returnCount(2);
|
||||
} else if (props.type === "summaryEvidence") {
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ interface ArrayPersonAdd {
|
|||
prefix: string; //คำนำหน้า
|
||||
firstName: string; //ชื่อ
|
||||
lastName: string; //นามสกุล
|
||||
posNo: string; //เลขที่ตำแหน่ง
|
||||
posNo: string|null; //เลขที่ตำแหน่ง
|
||||
position: string; //ตำแหน่ง
|
||||
positionLevel: string; //ระดับ
|
||||
salary: number; //เงินเดือน
|
||||
salary: number|null; //เงินเดือน
|
||||
organization: string; //สังกัด
|
||||
name: string;
|
||||
report?: boolean;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ export const useAppealComplainStore = defineStore(
|
|||
status: statusTothai(e.status)
|
||||
}));
|
||||
rows.value = dataList;
|
||||
console.log(rows.value)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -300,7 +300,6 @@ export const useInvestigateDisStore = defineStore(
|
|||
}));
|
||||
rows2.value = datalistDirector;
|
||||
selected.value = rows2.value;
|
||||
// console.log(rows2.value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -218,7 +218,6 @@ export const useInvestigateFactStore = defineStore(
|
|||
* @param type type ที่กำหนด ของ input นั้นๆ
|
||||
*/
|
||||
function filterSelector(val: string, update: Function, type: string) {
|
||||
console.log(val);
|
||||
update(() => {
|
||||
const needle = val.toLowerCase();
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ export const useDisciplineSuspendStore = defineStore(
|
|||
* @param data ข้อมูลจาก API
|
||||
*/
|
||||
function getData(data: listData[]) {
|
||||
console.log(data)
|
||||
const dataList: dataType[] = data.map((item: listData) => ({
|
||||
id: item.id,
|
||||
citizenId: item.citizenId,
|
||||
|
|
|
|||
|
|
@ -293,7 +293,23 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
* @param data ข้อมูลรายการบุคคล
|
||||
*/
|
||||
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