diff --git a/src/modules/01_metadataNew/components/calendar/CalendarList.vue b/src/modules/01_metadataNew/components/calendar/CalendarList.vue
index a78838f20..f47ec5f76 100644
--- a/src/modules/01_metadataNew/components/calendar/CalendarList.vue
+++ b/src/modules/01_metadataNew/components/calendar/CalendarList.vue
@@ -18,67 +18,137 @@
class="q-py-xs col-6 row"
/>
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/modules/01_metadataNew/views/personal.vue b/src/modules/01_metadataNew/views/personal.vue
index f107f339f..0830da32b 100644
--- a/src/modules/01_metadataNew/views/personal.vue
+++ b/src/modules/01_metadataNew/views/personal.vue
@@ -50,17 +50,32 @@ onMounted(() => {
class="q-py-xs"
/>
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/modules/01_metadataNew/views/position.vue b/src/modules/01_metadataNew/views/position.vue
index bd15a4547..0c2ce6698 100644
--- a/src/modules/01_metadataNew/views/position.vue
+++ b/src/modules/01_metadataNew/views/position.vue
@@ -41,12 +41,21 @@ onMounted(() => {
class="q-py-xs"
/>
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/modules/02_organizationalNew/components/PositionDetail.vue b/src/modules/02_organizationalNew/components/PositionDetail.vue
index 87c76d73d..f47fb9624 100644
--- a/src/modules/02_organizationalNew/components/PositionDetail.vue
+++ b/src/modules/02_organizationalNew/components/PositionDetail.vue
@@ -43,81 +43,81 @@ const formData = reactive({
status: "", //*สถานะตำแหน่ง
});
-const columns = ref([
- {
- name: "no",
- align: "left",
- label: "ลำดับ",
- sortable: false,
- field: "no",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
- {
- name: "positionName",
- align: "left",
- label: "ตำแหน่งในสายงาน",
- sortable: true,
- field: "positionName",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
- {
- name: "positionField",
- align: "left",
- label: "สายงาน",
- sortable: true,
- field: "positionField",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
- {
- name: "posTypeName",
- align: "left",
- label: "ประเภทตำเเหน่ง",
- sortable: true,
- field: "posTypeName",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
- {
- name: "posLevelName",
- align: "left",
- label: "ระดับตำแหน่ง",
- sortable: true,
- field: "posLevelName",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
- {
- name: "posExecutiveName",
- align: "left",
- label: "ตำแหน่งทางการบริหาร",
- sortable: true,
- field: "posExecutiveName",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
- {
- name: "positionExecutiveField",
- align: "left",
- label: "ด้านทางการบริหาร",
- sortable: true,
- field: "positionExecutiveField",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
- {
- name: "positionArea",
- align: "left",
- label: "ด้าน/สาขา",
- sortable: true,
- field: "positionArea",
- headerStyle: "font-size: 14px",
- style: "font-size: 14px",
- },
-]);
-const row = ref([]);
+// const columns = ref([
+// {
+// name: "no",
+// align: "left",
+// label: "ลำดับ",
+// sortable: false,
+// field: "no",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// {
+// name: "positionName",
+// align: "left",
+// label: "ตำแหน่งในสายงาน",
+// sortable: true,
+// field: "positionName",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// {
+// name: "positionField",
+// align: "left",
+// label: "สายงาน",
+// sortable: true,
+// field: "positionField",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// {
+// name: "posTypeName",
+// align: "left",
+// label: "ประเภทตำเเหน่ง",
+// sortable: true,
+// field: "posTypeName",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// {
+// name: "posLevelName",
+// align: "left",
+// label: "ระดับตำแหน่ง",
+// sortable: true,
+// field: "posLevelName",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// {
+// name: "posExecutiveName",
+// align: "left",
+// label: "ตำแหน่งทางการบริหาร",
+// sortable: true,
+// field: "posExecutiveName",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// {
+// name: "positionExecutiveField",
+// align: "left",
+// label: "ด้านทางการบริหาร",
+// sortable: true,
+// field: "positionExecutiveField",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// {
+// name: "positionArea",
+// align: "left",
+// label: "ด้าน/สาขา",
+// sortable: true,
+// field: "positionArea",
+// headerStyle: "font-size: 14px",
+// style: "font-size: 14px",
+// },
+// ]);
+// const row = ref([]);
/** function ปิด popup*/
function close() {
@@ -137,18 +137,26 @@ watch(
: store.typeOrganizational === "draft"
? "แบบร่าง"
: "ยุบเลิก";
- row.value = prosp.dataDetailPos.positions.map((e: Position) => ({
- ...e,
- positionName: e.positionName ? e.positionName : "-",
- positionField: e.positionField ? e.positionField : "-",
- posTypeName: e.posTypeName ? e.posTypeName : "-",
- posLevelName: e.posLevelName ? e.posLevelName : "-",
- posExecutiveName: e.posExecutiveName ? e.posExecutiveName : "-",
- positionExecutiveField: e.positionExecutiveField
- ? e.positionExecutiveField
- : "-",
- positionArea: e.positionArea ? e.positionArea : "-",
- }));
+ formData.positionType = prosp.dataDetailPos.posTypeName
+ formData.positionPathSide = prosp.dataDetailPos.positionName
+ formData.positionLine = prosp.dataDetailPos.positionField
+ formData.positionSide = prosp.dataDetailPos.positionArea ? prosp.dataDetailPos.positionArea : "-"
+ formData.positionLevel = prosp.dataDetailPos.posLevelName
+ formData.positionExecutive = prosp.dataDetailPos.posExecutiveName ? prosp.dataDetailPos.posExecutiveName : "-"
+ formData.positionExecutiveSide = prosp.dataDetailPos.positionExecutiveField ? prosp.dataDetailPos.positionExecutiveField : "-"
+
+ // row.value = prosp.dataDetailPos.positions.map((e: Position) => ({
+ // ...e,
+ // positionName: e.positionName ? e.positionName : "-",
+ // positionField: e.positionField ? e.positionField : "-",
+ // posTypeName: e.posTypeName ? e.posTypeName : "-",
+ // posLevelName: e.posLevelName ? e.posLevelName : "-",
+ // posExecutiveName: e.posExecutiveName ? e.posExecutiveName : "-",
+ // positionExecutiveField: e.positionExecutiveField
+ // ? e.positionExecutiveField
+ // : "-",
+ // positionArea: e.positionArea ? e.positionArea : "-",
+ // }));
}
}
}
@@ -172,7 +180,6 @@ watch(
{{ formData.positionNo }}
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -261,7 +268,7 @@ watch(
-
+
diff --git a/src/modules/02_organizationalNew/components/listView.vue b/src/modules/02_organizationalNew/components/listView.vue
index 2ff6a8217..1e6ba514e 100644
--- a/src/modules/02_organizationalNew/components/listView.vue
+++ b/src/modules/02_organizationalNew/components/listView.vue
@@ -34,6 +34,8 @@ const nodeTree = ref(); // ข้อมูล Tree
const nodeId = ref(""); // id ของ Tree
const orgLevel = ref(0); // levelTree
const isLoad = ref(false); // loadTable
+const isLoadTree = ref(false); // loadTable
+
const selected = ref("");
const reqMaster = reactive({
@@ -53,6 +55,7 @@ const posMaster = ref([]);
* @param id id โครงสร้าง
*/
async function fetchDataTree(id: string) {
+ isLoadTree.value = false;
showLoader();
await http
.get(config.API.orgByid(id.toString()))
@@ -121,6 +124,32 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
});
}
+/** ดึงข้อมูลสถิติจำนวนด้านบน*/
+function getSummary() {
+ http
+ .post(config.API.orgSummary, {
+ id: reqMaster.id, //*Id node
+ type: reqMaster.type, //*ประเภทnode
+ isNode: reqMaster.isAll, //*นับทั้ง node ไหม
+ })
+ .then(async (res: any) => {
+ const data = await res.data.result;
+
+ store.getSumPosition({
+ totalPosition: data.totalPosition,
+ totalPositionCurrentUse: data.totalPositionCurrentUse,
+ totalPositionCurrentVacant: data.totalPositionCurrentVacant,
+ totalPositionNextUse: data.totalPositionNextUse,
+ totalPositionNextVacant: data.totalPositionNextVacant,
+ totalRootPosition: data.totalPosition,
+ totalRootPositionCurrentUse: data.totalPositionCurrentUse,
+ totalRootPositionCurrentVacant: data.totalPositionCurrentVacant,
+ totalRootPositionNextUse: data.totalPositionNextUse,
+ totalRootPositionNextVacant: data.totalPositionNextVacant,
+ });
+ });
+}
+
/** funcion ค้นหาข้อมูลใน Table*/
async function filterKeyword() {
reqMaster.page = 1;
@@ -168,6 +197,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], () => {
watch(
() => reqMaster.isAll,
() => {
+ getSummary();
if (reqMaster.page !== 1) {
reqMaster.page = 1;
} else {
@@ -185,7 +215,6 @@ watch(
diff --git a/src/modules/02_organizationalNew/components/mainTree.vue b/src/modules/02_organizationalNew/components/mainTree.vue
index 88d482208..6cca066cb 100644
--- a/src/modules/02_organizationalNew/components/mainTree.vue
+++ b/src/modules/02_organizationalNew/components/mainTree.vue
@@ -28,7 +28,6 @@ const { dialogRemove, showLoader, hideLoader, messageError, success } =
/** props*/
const nodeTEST = defineModel("nodeTree", { default: [] });
const nodeId = defineModel("nodeId", { required: true });
-const selected = defineModel("selected", { required: true });
const props = defineProps({
fetchDataTree: {
type: Function,
@@ -97,39 +96,39 @@ const orgId = ref("");
* @param data ข่อมูล Tree
*/
function updateSelected(data: DataTree) {
- store.treeId = data.orgTreeId;
- store.level = data.orgLevel;
- // if (data.orgTreeId === nodeId.value) {
- // nodeId.value = "";
- // } else {
- nodeId.value = data.orgTreeId ? data.orgTreeId : "111";
+ if (!store.treeId || store.treeId != data.orgTreeId) {
+ store.treeId = data.orgTreeId;
+ store.level = data.orgLevel;
- data.orgTreeId && props.fetchDataTable?.(data.orgTreeId, data.orgLevel, true);
- /** ดึงข้อมูลสถิติจำนวนด้านบน*/
- http
- .post(config.API.orgSummary, {
- id: data.orgTreeId, //*Id node
- type: data.orgLevel, //*ประเภทnode
- isNode: false, //*นับทั้ง node ไหม
- })
- .then(async (res: any) => {
- const data = await res.data.result;
- if (data) {
- store.getSumPosition({
- totalPosition: data.totalPosition,
- totalPositionCurrentUse: data.totalPositionCurrentUse,
- totalPositionCurrentVacant: data.totalPositionCurrentVacant,
- totalPositionNextUse: data.totalPositionNextUse,
- totalPositionNextVacant: data.totalPositionNextVacant,
- totalRootPosition: data.totalPosition,
- totalRootPositionCurrentUse: data.totalPositionCurrentUse,
- totalRootPositionCurrentVacant: data.totalPositionCurrentVacant,
- totalRootPositionNextUse: data.totalPositionNextUse,
- totalRootPositionNextVacant: data.totalPositionNextVacant,
- });
- }
- });
- // }
+ nodeId.value = data.orgTreeId ? data.orgTreeId : "111";
+
+ data.orgTreeId &&
+ props.fetchDataTable?.(data.orgTreeId, data.orgLevel, true);
+ /** ดึงข้อมูลสถิติจำนวนด้านบน*/
+ http
+ .post(config.API.orgSummary, {
+ id: data.orgTreeId, //*Id node
+ type: data.orgLevel, //*ประเภทnode
+ isNode: false, //*นับทั้ง node ไหม
+ })
+ .then(async (res: any) => {
+ const data = await res.data.result;
+ if (data) {
+ store.getSumPosition({
+ totalPosition: data.totalPosition,
+ totalPositionCurrentUse: data.totalPositionCurrentUse,
+ totalPositionCurrentVacant: data.totalPositionCurrentVacant,
+ totalPositionNextUse: data.totalPositionNextUse,
+ totalPositionNextVacant: data.totalPositionNextVacant,
+ totalRootPosition: data.totalPosition,
+ totalRootPositionCurrentUse: data.totalPositionCurrentUse,
+ totalRootPositionCurrentVacant: data.totalPositionCurrentVacant,
+ totalRootPositionNextUse: data.totalPositionNextUse,
+ totalRootPositionNextVacant: data.totalPositionNextVacant,
+ });
+ }
+ });
+ }
}
const breakLoop = ref(false);
@@ -366,8 +365,6 @@ watch(
nodes.value = nodeTEST.value;
}
);
-
-const modaeMenu = ref(false);
diff --git a/src/modules/02_organizationalNew/components/structureView.vue b/src/modules/02_organizationalNew/components/structureView.vue
index 3c5b3b848..a0d45cd72 100644
--- a/src/modules/02_organizationalNew/components/structureView.vue
+++ b/src/modules/02_organizationalNew/components/structureView.vue
@@ -1,6 +1,240 @@
-
+
+
- Structure View
+ แผนภูมิโครงสร้าง
+
+
+
+
+ ดาวน์โหลด PNG
+
+
+ ดาวน์โหลด PDF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/src/modules/02_organizationalNew/components/tableTree.vue b/src/modules/02_organizationalNew/components/tableTree.vue
index 2c3d80e2f..df21ce9ed 100644
--- a/src/modules/02_organizationalNew/components/tableTree.vue
+++ b/src/modules/02_organizationalNew/components/tableTree.vue
@@ -89,12 +89,6 @@ const listMenu = ref([
type: "HISTORY",
color: "deep-purple",
},
- {
- label: "ดูรายละเอียด",
- icon: "mdi-eye",
- type: "VIEWDETIAL",
- color: "blue",
- },
]);
const document = ref([
{
@@ -612,16 +606,12 @@ async function onClickDownloadReport(val: string) {
e.type === 'HISTORY')"
:key="index"
clickable
v-close-popup
@click="
- item.type === 'VIEWDETIAL'
- ? onClickViewDetail(props.row)
- : item.type === 'EDIT'
+ item.type === 'EDIT'
? onClickPosition('EDIT', props.row.id)
: item.type === 'DEL'
? onClickDelete(props.row.id)
@@ -645,6 +635,19 @@ async function onClickDownloadReport(val: string) {
+
+
+
+
+
diff --git a/src/modules/04_registry/components/Information/OldName.vue b/src/modules/04_registry/components/Information/OldName.vue
index 098456670..85be635da 100644
--- a/src/modules/04_registry/components/Information/OldName.vue
+++ b/src/modules/04_registry/components/Information/OldName.vue
@@ -44,6 +44,8 @@
>
ไฟล์เอกสารหลักฐาน
+
+
{
* บันทึกเพิ่มข้อมูล
*/
const saveData = async () => {
- if (fileUpload.value.length > 0) {
- const blob = fileUpload.value.slice(0, fileUpload.value[0].size);
- const newFile = new File(blob, nameFile.value, {
- type: fileUpload.value[0].type,
+ // if (fileUpload.value.length > 0) {
+ const blob =
+ fileUpload.value.length > 0
+ ? fileUpload.value.slice(0, fileUpload.value[0].size)
+ : null;
+ const newFile: any = blob
+ ? new File(blob, nameFile.value, {
+ type: fileUpload.value[0].type,
+ })
+ : null;
+ const formData = new FormData();
+
+ newFile && formData.append("", newFile);
+ if (prefixId.value != undefined) formData.append("prefixId", prefixId.value);
+ if (firstName.value != undefined)
+ formData.append("firstName", firstName.value);
+ if (lastName.value != undefined) formData.append("lastName", lastName.value);
+ if (status.value != undefined) formData.append("status", status.value);
+ showLoader();
+ await http
+ .post(config.API.profileChangeNameId(profileId.value), formData)
+ .then((res) => {
+ success($q, "บันทึกข้อมูลสำเร็จ");
+ modal.value = false;
+ })
+ .catch((e) => {
+ messageError($q, e);
+ })
+ .finally(async () => {
+ await fetchData();
+ await props.fetchDataInformation();
});
- const formData = new FormData();
- formData.append("", newFile);
- if (prefixId.value != undefined)
- formData.append("prefixId", prefixId.value);
- if (firstName.value != undefined)
- formData.append("firstName", firstName.value);
- if (lastName.value != undefined)
- formData.append("lastName", lastName.value);
- if (status.value != undefined) formData.append("status", status.value);
- showLoader();
- await http
- .post(config.API.profileChangeNameId(profileId.value), formData)
- .then((res) => {
- success($q, "บันทึกข้อมูลสำเร็จ");
- modal.value = false;
- })
- .catch((e) => {
- messageError($q, e);
- })
- .finally(async () => {
- await fetchData();
- await props.fetchDataInformation();
- });
- } else {
- dialogMessage(
- $q,
- "ไม่สามารถบันทึกข้อมูลได้",
- "กรุณาอัปโหลดเอกสารหลักฐาน",
- "warning",
- undefined,
- "orange",
- undefined,
- undefined,
- true
- );
- }
+ // }
+ // else {
+ // dialogMessage(
+ // $q,
+ // "ไม่สามารถบันทึกข้อมูลได้",
+ // "กรุณาอัปโหลดเอกสารหลักฐาน",
+ // "warning",
+ // undefined,
+ // "orange",
+ // undefined,
+ // undefined,
+ // true
+ // );
+ // }
};
/**
diff --git a/src/modules/04_registry/components/Leave.vue b/src/modules/04_registry/components/Leave.vue
index 90284075b..1aa4f50df 100644
--- a/src/modules/04_registry/components/Leave.vue
+++ b/src/modules/04_registry/components/Leave.vue
@@ -212,7 +212,21 @@
-->
+
+
("");
const rowsTotal = ref([]); //select data history
const filter = ref(""); //search data table
+const inputDateLaeaveYear = ref("");
+/** ตรวจเวลา */
+watch(
+ () => inputDateLaeaveYear.value,
+ (value: string) => {
+ if (value.length === 4) {
+ formData.leaveYear = parseInt(value) - 543;
+ }
+ }
+);
/**old */
// const visibleColumns = ref([]);
// profileData.leave.columns.length == 0
@@ -1051,11 +1078,11 @@ const getData = () => {
// coupleDay.value = row.coupleDay;
// therapyDay.value = row.therapyDay;
formData.id = row.id;
- formData.sumSick = row.sumSick =='-' ? '':row.sumSick;
- formData.sumRest = row.sumRest =='-' ? '':row.sumRest;
- formData.sumLate = row.sumLate =='-' ? '':row.sumLate;
- formData.sumAbsent = row.sumAbsent =='-' ? '':row.sumAbsent;
- formData.sumEducation = row.sumEducation =='-' ? '':row.sumEducation;
+ formData.sumSick = row.sumSick == "-" ? "" : row.sumSick;
+ formData.sumRest = row.sumRest == "-" ? "" : row.sumRest;
+ formData.sumLate = row.sumLate == "-" ? "" : row.sumLate;
+ formData.sumAbsent = row.sumAbsent == "-" ? "" : row.sumAbsent;
+ formData.sumEducation = row.sumEducation == "-" ? "" : row.sumEducation;
formData.leaveYear = row.leaveYear == "-" ? 0 : Number(row.leaveYear) - 543;
// id.value = row.id;
@@ -1101,6 +1128,7 @@ const clickAdd = async () => {
const clickAddLeave = async () => {
clearForm();
+ inputDateLaeaveYear.value = (moment().year() + 543).toString();
editRow.value = false;
edit.value = true;
modalAdd.value = true;
@@ -1158,11 +1186,11 @@ const clickSave = async () => {
if (result) {
if (modalEdit.value) {
// await dialogConfirm($q, () => {
- editData();
+ editData();
// });
} else {
// await dialogConfirm($q, () => {
- saveData();
+ saveData();
// });
}
}
@@ -1173,7 +1201,9 @@ const clickSave = async () => {
// * บันทึกเพิ่มข้อมูล
// */
const saveData = async () => {
+ formData.leaveYear = (await Number(inputDateLaeaveYear.value)) - 543;
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
+ console.log(formData.leaveYear);
if (profileId.value) {
showLoader();
@@ -1188,6 +1218,7 @@ const saveData = async () => {
})
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
+
modalAdd.value = false;
})
.catch((e) => {
@@ -1324,12 +1355,19 @@ const selectData = async (props: DataProps) => {
rowIndex.value = props.rowIndex;
formData.id = props.row.id;
- formData.sumSick = props.row.sumSick == '-' ? '':props.row.sumSick;
- formData.sumRest = props.row.sumRest == '-' ? '':props.row.sumRest;
- formData.sumLate = props.row.sumLate == '-' ? '':props.row.sumLate;
- formData.sumAbsent = props.row.sumAbsent == '-' ? '':props.row.sumAbsent;
- formData.sumEducation = props.row.sumEducation == '-' ? '':props.row.sumEducation;
- formData.leaveYear = props.row.leaveYear == "-" ? 0 : Number(props.row.leaveYear) - 543;
+ formData.sumSick = props.row.sumSick == "-" ? "" : props.row.sumSick;
+ formData.sumRest = props.row.sumRest == "-" ? "" : props.row.sumRest;
+ formData.sumLate = props.row.sumLate == "-" ? "" : props.row.sumLate;
+ formData.sumAbsent = props.row.sumAbsent == "-" ? "" : props.row.sumAbsent;
+ formData.sumEducation =
+ props.row.sumEducation == "-" ? "" : props.row.sumEducation;
+ formData.leaveYear =
+ props.row.leaveYear == "-" ? 0 : Number(props.row.leaveYear) - 543;
+ console.log("เเก้ไข");
+
+ inputDateLaeaveYear.value = ((formData.leaveYear as number) + 543).toString();
+
+ console.log(inputDateLaeaveYear.value);
// id.value = props.row.id;
// typeLeave.value = props.row.typeLeaveId;
@@ -1361,10 +1399,9 @@ const selectData = async (props: DataProps) => {
* กดปุ่มเพิ่มบน table
*/
const addData = async () => {
- // modalEdit.value = false;
-
+ //modalEdit.value = false;
modal.value = true;
- // edit.value = true;
+ //edit.value = true;
await clickTotal();
};
diff --git a/src/modules/04_registry/components/Other.vue b/src/modules/04_registry/components/Other.vue
index fe58707e1..a3d60be13 100644
--- a/src/modules/04_registry/components/Other.vue
+++ b/src/modules/04_registry/components/Other.vue
@@ -57,7 +57,18 @@
+
+
("");
const date = ref(new Date());
@@ -218,6 +238,26 @@ const profileId = ref(
const rows = ref([]);
const filter = ref(""); //search data table
const visibleColumns = ref([]);
+
+const inputDate = ref("");
+const dayChecked = ref(false);
+/** ตรวจเวลา */
+watch(
+ () => inputDate.value,
+ (value: string) => {
+ if (value.length === 10) {
+ const dateVal = convertDate(value);
+ if (dateVal.isValid) {
+ dayChecked.value = false;
+ date.value = new Date(dateVal.value);
+ } else {
+ dayChecked.value = true;
+ inputDate.value = "";
+ }
+ }
+ }
+);
+
profileData.other.columns.length == 0
? (visibleColumns.value = ["date", "detail"])
: (visibleColumns.value = profileData.other.columns);
@@ -387,6 +427,7 @@ const clickEdit = () => {
* กดปุ่มเพิ่มด้านบน table
*/
const clickAdd = async () => {
+ inputDate.value = "";
editRow.value = false;
await addData();
};
@@ -521,6 +562,8 @@ const selectData = async (props: DataProps) => {
date.value = props.row.date;
detail.value = props.row.detail;
id.value = props.row.id;
+
+ inputDate.value = convertDateDisplay(date.value);
await checkRowPage();
};
diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue
index dff43c81b..dc9174b16 100644
--- a/src/modules/04_registry/components/Profile.vue
+++ b/src/modules/04_registry/components/Profile.vue
@@ -989,8 +989,8 @@ function onClickUnlock() {
hideLoader();
});
},
- "ยืนยันการปลดให้แก้ไขข้อมูล",
- "ต้องการยืนยันการปลดให้แก้ไขข้อมูลนี้หรือไม่?"
+ "ยืนยันการปลดล็อคให้แก้ไขข้อมูล",
+ "ต้องการยืนยันการปลดล็อคให้แก้ไขข้อมูลนี้หรือไม่?"
);
}
onMounted(async () => {
diff --git a/src/modules/04_registry/components/Record.vue b/src/modules/04_registry/components/Record.vue
index 2275ab6cb..43261cbe2 100644
--- a/src/modules/04_registry/components/Record.vue
+++ b/src/modules/04_registry/components/Record.vue
@@ -65,7 +65,18 @@
+
+
+
+
("");
const date = ref(new Date());
@@ -325,6 +356,47 @@ const checkValidate = ref(false); //validate data ผ่านหรื
const rows = ref([]);
const filter = ref(""); //search data table
const visibleColumns = ref([]);
+const inputDate = ref("");
+const inputDateRefCommandDate = ref(
+ refCommandDate.value ? convertDateDisplay(refCommandDate.value) : ""
+);
+
+const dayChecked = ref(false);
+const dayCheckedRefCommandDate = ref(false);
+/** ตรวจเวลา */
+watch(
+ () => inputDate.value,
+ (value: string) => {
+ if (value.length === 10) {
+ const dateVal = convertDate(value);
+ if (dateVal.isValid) {
+ dayChecked.value = false;
+ date.value = new Date(dateVal.value);
+ } else {
+ dayChecked.value = true;
+ inputDate.value = "";
+ }
+ }
+ }
+);
+watch(
+ () => inputDateRefCommandDate.value,
+ (value: string) => {
+ if (value.length === 10) {
+ const dateVal = convertDate(value);
+ if (dateVal.isValid) {
+ dayChecked.value = false;
+ refCommandDate.value = new Date(dateVal.value);
+ } else {
+ dayChecked.value = true;
+ inputDateRefCommandDate.value = "";
+ }
+ } else {
+ refCommandDate.value = null;
+ }
+ }
+);
+
profileData.record.columns.length == 0
? (visibleColumns.value = [
"date",
@@ -725,6 +797,11 @@ const selectData = async (props: DataProps) => {
refCommandNo.value = props.row.refCommandNo;
refCommandDate.value = props.row.refCommandDate;
id.value = props.row.id;
+
+ inputDate.value = convertDateDisplay(date.value);
+ inputDateRefCommandDate.value = refCommandDate.value
+ ? convertDateDisplay(refCommandDate.value)
+ : "";
await checkRowPage();
};
@@ -740,6 +817,8 @@ const addData = () => {
reference.value = "";
refCommandNo.value = "";
refCommandDate.value = null;
+ inputDate.value = convertDateDisplay(date.value);
+ inputDateRefCommandDate.value = "";
};
/**
diff --git a/src/modules/04_registry/components/Table.vue b/src/modules/04_registry/components/Table.vue
index 5d8468f73..5cbb468cb 100644
--- a/src/modules/04_registry/components/Table.vue
+++ b/src/modules/04_registry/components/Table.vue
@@ -74,7 +74,8 @@
{{ col.label }}
-
+
+
diff --git a/src/modules/04_registry/components/Work.vue b/src/modules/04_registry/components/Work.vue
index 2b7bd07e4..4c316b7be 100644
--- a/src/modules/04_registry/components/Work.vue
+++ b/src/modules/04_registry/components/Work.vue
@@ -64,7 +64,20 @@
@@ -311,6 +347,7 @@
@@ -294,103 +349,104 @@ watch(posTypeId, () => {
/>
+
+
+
@@ -461,6 +517,7 @@ watch(posTypeId, () => {
maxlength="13"
hide-bottom-space
mask="#############"
+ @update:model-value="changeCardID"
/>