ลบ log
This commit is contained in:
parent
4d0e40ea91
commit
e4188b7ed3
38 changed files with 108 additions and 167 deletions
|
|
@ -214,7 +214,6 @@ const openModalOrder = () => {
|
|||
};
|
||||
const openModalTree = (id: string) => {
|
||||
personalId.value = id;
|
||||
console.log(personalId.value);
|
||||
personal.value = rows.value.filter((e: any) => e.id === id);
|
||||
modalTree.value = true;
|
||||
};
|
||||
|
|
@ -224,7 +223,6 @@ const getData = async () => {
|
|||
.get(config.API.relocationMain())
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
console.log("data==>", data);
|
||||
rows.value = data.map((item: relocationType) => ({
|
||||
fullname: `${item.prefix}${item.firstname} ${item.lastname}`,
|
||||
id: item.id,
|
||||
|
|
@ -262,7 +260,6 @@ const getData = async () => {
|
|||
organizationPositionOld: item.organizationPositionOld,
|
||||
createdAt:date2Thai(item.createdAt),
|
||||
}));
|
||||
console.log(rows.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e);
|
||||
|
|
@ -280,9 +277,7 @@ const saveOrder = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.relocationMainReport(), body)
|
||||
.then((res: any) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(data);
|
||||
.then(() => {
|
||||
success($q, "ส่งไปออกคำสั่งย้าย");
|
||||
closeModal();
|
||||
})
|
||||
|
|
@ -297,9 +292,8 @@ const saveOrder = async () => {
|
|||
const deleteData = async (id: string) => {
|
||||
await http
|
||||
.delete(config.API.relocationMainDelete(id))
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@ const loadTreeData = async () => {
|
|||
};
|
||||
|
||||
function filterByPersonIdNull(obj: any) {
|
||||
// console.log(obj);
|
||||
if (obj.name === null && obj.isCondition != true) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -162,8 +161,6 @@ const validateData = async () => {
|
|||
};
|
||||
const id = ref<string>("");
|
||||
const saveAppoint = async () => {
|
||||
console.log("save", dataForm);
|
||||
|
||||
myFormPosition.value.validate().then(async (result: boolean) => {
|
||||
if (props.personalId !== undefined) {
|
||||
id.value = props.personalId.toString();
|
||||
|
|
@ -182,12 +179,11 @@ const saveAppoint = async () => {
|
|||
// mouthSalaryAmount: dataForm.mouthSalaryAmount,
|
||||
// positionSalaryAmount: dataForm.positionSalaryAmount,
|
||||
};
|
||||
console.log("save appoint===>", dataAppoint);
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.relocationMainPut(id.value), dataAppoint)
|
||||
.then((res) => {
|
||||
console.log("respone=>", res);
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -286,9 +282,8 @@ const positionLevelOptions = ref<Object[]>([
|
|||
]);
|
||||
|
||||
const selectedPosition = async (data: any) => {
|
||||
console.log("selecteds", data);
|
||||
if (data.name == null && selected.value != data.keyId) {
|
||||
// console.log("selecteds", data);
|
||||
|
||||
|
||||
editDataStatus.value = true;
|
||||
selected.value = data.keyId;
|
||||
|
|
@ -370,7 +365,6 @@ const selectedPosition = async (data: any) => {
|
|||
dataForm.positionPathSideId = "";
|
||||
dataForm.positionTypeId = "";
|
||||
}
|
||||
console.log("dataForm", dataForm);
|
||||
};
|
||||
|
||||
const checkPosition = (val: string) => {
|
||||
|
|
@ -383,25 +377,21 @@ const expanded = ref<string[]>([]);
|
|||
watch(props, () => {
|
||||
expanded.value = [];
|
||||
const dataPersonal = props.personal;
|
||||
console.log(props.personal);
|
||||
|
||||
if (dataPersonal) {
|
||||
dataPersonal.map((data: any) => {
|
||||
personal.value = data;
|
||||
});
|
||||
console.log("personal", personal.value);
|
||||
}
|
||||
// console.log("draft===>", personal.value.draft);
|
||||
|
||||
|
||||
if (personal.value) {
|
||||
// const findData = dataRespone.value.find(findByPerson);
|
||||
let findData: any = null;
|
||||
dataRespone.value.map((x: any) => {
|
||||
findData = findByPerson(x);
|
||||
// console.log(findData);
|
||||
|
||||
if (findData != null) {
|
||||
// console.log("findData===>", findData);
|
||||
selectedPosition(findData);
|
||||
for (let i = 3; i <= findData.keyId.length; i += 2) {
|
||||
expanded.value.push(findData.keyId.slice(0, i));
|
||||
|
|
@ -414,7 +404,6 @@ watch(props, () => {
|
|||
});
|
||||
|
||||
function findByPerson(element: any): any {
|
||||
// console.log("searchTree element===>", element)
|
||||
if (
|
||||
element.positionNumId &&
|
||||
element.positionLineId === personal.value.positionLineId &&
|
||||
|
|
|
|||
|
|
@ -207,9 +207,7 @@ const saveData = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.put(config.API.relocationMainEdit(dataId), body)
|
||||
.then((res: any) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(data);
|
||||
.then(() => {
|
||||
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
|
||||
edit.value = false;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue