{{ prop.node.orgTreeName }}
+ {{ prop.node.isOfficer ? "(สกจ.)" : "" }}
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
diff --git a/src/modules/02_organization/components/TreeTable.vue b/src/modules/02_organization/components/TreeTable.vue
index fc9fca910..142c4f773 100644
--- a/src/modules/02_organization/components/TreeTable.vue
+++ b/src/modules/02_organization/components/TreeTable.vue
@@ -28,7 +28,6 @@ import DialogMovePos from "@/modules/02_organization/components/DialogMovePos.vu
import DialogHistoryPos from "@/modules/02_organization/components/DialogHistoryPos.vue"; // ประวัติตำแหน่ง
import DialogSelectPerson from "@/modules/02_organization/components/DialogSelectPerson.vue"; // เลือกคนครอง
import DialogSuccession from "@/modules/02_organization/components/DialogSuccession.vue"; // สืบทอดตำแหน่ง
-import DialogCreateCommandORG from "@/modules/18_command/components/DialogCreateCommandORG.vue";
const $q = useQuasar();
const store = useOrganizational();
@@ -252,7 +251,6 @@ const columnsExpand = ref
([
]);
const dialogPosition = ref(false); //ตำแหน่ง
-const modalCommand = ref(false); //สร้างคำสั่ง
/**
* function openPopup เพิ่มอัตรากำลัง
@@ -542,18 +540,6 @@ watch(
ดาวน์โหลด
-
- ส่งไปออกคำสั่ง
-
-
@@ -905,12 +891,6 @@ watch(
-
-
-
diff --git a/src/modules/05_placement/components/Transfer/TransferDetail.vue b/src/modules/05_placement/components/Transfer/TransferDetail.vue
index c9e4fdb21..60887d856 100644
--- a/src/modules/05_placement/components/Transfer/TransferDetail.vue
+++ b/src/modules/05_placement/components/Transfer/TransferDetail.vue
@@ -38,6 +38,7 @@ const transferId = ref
(route.params.id as string); //Id รายกา
const roleAdmin = ref(false); //admin
const edit = ref(false); //การแก่ไข
const dataProfile = ref(); //ข้อมูลส่วนตัว
+const workflowRef = ref(null);
const organizationPositionOld = ref(""); //ตำแหน่ง/สังกัด
const positionTypeOld = ref(""); //ประเภทตำแหน่ง
@@ -335,7 +336,7 @@ onMounted(async () => {
ข้อมูลการขอโอน
-
{
class="q-px-sm"
label="ส่งคำร้องไปยัง สกจ."
@click="confirmMessage"
- />
+ /> -->
@@ -489,7 +490,8 @@ onMounted(async () => {
v-if="
!(
responseData.status == 'REPORT' ||
- responseData.status == 'DONE'
+ responseData.status == 'DONE' ||
+ !workflowRef?.permission.isUpdate
) && checkPermission($route)?.attrIsUpdate
"
/>
@@ -686,7 +688,11 @@ onMounted(async () => {
-
+
diff --git a/src/modules/18_command/components/DialogCreateCommandORG.vue b/src/modules/18_command/components/DialogCreateCommandORG.vue
index 701ad93a2..65023c0f0 100644
--- a/src/modules/18_command/components/DialogCreateCommandORG.vue
+++ b/src/modules/18_command/components/DialogCreateCommandORG.vue
@@ -8,7 +8,12 @@ import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useCommandMainStore } from "@/modules/18_command/store/Main";
-import type { ListCommand } from "@/modules/18_command/interface/index/Main";
+/** importType*/
+import type { QTableProps } from "quasar";
+import type {
+ ListCommand,
+ DataOption,
+} from "@/modules/18_command/interface/index/Main";
import DialogHeader from "@/components/DialogHeader.vue";
@@ -28,6 +33,7 @@ const {
const modal = defineModel("modal", { required: true });
const props = defineProps({
commandTypeCode: String, // ไอดีประเภทคำสั่ง
+ orgPublishDate: { type: Date, defult: undefined },
});
const commandOp = ref([]); // ประเภทคำสั่ง
@@ -36,33 +42,123 @@ const commandNo = ref(""); //คำสั่งเลขที่
const commandYear = ref(new Date().getFullYear());
const commandAffectDate = ref(null); //วันที่ลงนาม
const commandExcecuteDate = ref(null); //วันที่คำสั่งมีผล
+const group = ref(
+ "กลุ่มที่ 1.1 : ปฏิบัติงาน ชำนาญงาน ปฏิบัติการ ชำนาญการ"
+); //กลุ่ม
+const isCheckOrgPublishDate = ref(false); //เช็คค่าของวันที่คำสั่งมีผล
+const groupOp = ref([]);
+const groupDataOp = ref([
+ {
+ id: "1.1",
+ name: "กลุ่มที่ 1.1 : ปฏิบัติงาน ชำนาญงาน ปฏิบัติการ ชำนาญการ",
+ },
+ {
+ id: "1.2",
+ name: "กลุ่มที่ 1.2 : อาวุโส ชำนาญการพิเศษ อำนวยการต้น",
+ },
+ {
+ id: "2",
+ name: "กลุ่มที่ 2 : ทักษะพิเศษ เชี่ยวชาญ ทรงคุณวุฒิ อำนวยการสูง บริหารต้น บริหารสูง",
+ },
+]);
+
+//Table
+const rows = ref([
+ {
+ id: "1",
+ posMasterNo: "สกก.3",
+ positionName: "นักจัดการงานทั่วไป",
+ posTypeName: "ทั่วไป",
+ posLevelName: "ปฏิบัติงาน",
+ positionIsSelected: "นายศรัณย์ ศิลาดี",
+ group: "1.1",
+ selected: true,
+ },
+ {
+ id: "4",
+ posMasterNo: "สกก.4",
+ positionName: "นักจัดการงานทั่วไป",
+ posTypeName: "วิชาการ",
+ posLevelName: "ปฏิบัติการ",
+ positionIsSelected: "นางเกษมณี ใจดี",
+ group: "1.1",
+ selected: true,
+ },
+]);
+const selected = ref([]);
+const columns = ref([
+ {
+ name: "posMasterNo",
+ align: "left",
+ label: "ตำแหน่งเลขที่",
+ sortable: false,
+ field: "posMasterNo",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+ {
+ name: "positionName",
+ align: "left",
+ label: "ตำแหน่งในสายงาน",
+ field: "positionName",
+ sortable: false,
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+ {
+ name: "posTypeName",
+ align: "left",
+ label: "ประเภทตำแหน่ง",
+ sortable: false,
+ field: "posTypeName",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+ {
+ name: "posLevelName",
+ align: "left",
+ label: "ระดับตำแหน่ง",
+ sortable: false,
+ field: "posLevelName",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+ {
+ name: "positionIsSelected",
+ align: "left",
+ label: "คนครอง",
+ sortable: false,
+ field: "positionIsSelected",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
+]);
/** ฟังก์ชันบันทึกและไปยังหน้าคำสั่ง*/
function onSubmit() {
dialogConfirm($q, async () => {
- showLoader();
- const body = {
- commandYear: commandYear.value,
- commandNo: commandNo.value,
- commandTypeId: commandType.value,
- commandAffectDate: commandAffectDate.value,
- commandExcecuteDate: commandExcecuteDate.value,
- persons: [],
- };
-
- await http
- .post(config.API.command + `/person`, body)
- .then(async (res) => {
- const id = await res.data.result;
- router.push(`/command/edit/${id}`);
- modal.value = false;
- })
- .catch((e) => {
- messageError($q, e);
- })
- .finally(() => {
- hideLoader();
- });
+ // showLoader();
+ // const body = {
+ // commandYear: commandYear.value,
+ // commandNo: commandNo.value,
+ // commandTypeId: commandType.value,
+ // commandAffectDate: commandAffectDate.value,
+ // commandExcecuteDate: commandExcecuteDate.value,
+ // persons: [],
+ // };
+ // await http
+ // .post(config.API.command + `/person`, body)
+ // .then(async (res) => {
+ // const id = await res.data.result;
+ // router.push(`/command/edit/${id}`);
+ // modal.value = false;
+ // })
+ // .catch((e) => {
+ // messageError($q, e);
+ // })
+ // .finally(() => {
+ // hideLoader();
+ // });
});
}
@@ -76,6 +172,10 @@ function closeModal() {
commandYear.value = new Date().getFullYear();
commandAffectDate.value = null;
commandExcecuteDate.value = null;
+ group.value = "กลุ่มที่ 1.1 : ปฏิบัติงาน ชำนาญงาน ปฏิบัติการ ชำนาญการ";
+ isCheckOrgPublishDate.value = false;
+ // rows.value = [];
+ // selected.value = [];
}
/** ฟังก์ชันดึงข้อมูลคำสั่ง */
@@ -88,9 +188,69 @@ async function fetchCommandType() {
commandType.value = commandOp.value[0].id;
}
+/**
+ * ฟังก์ชันต้นหาข้อมูลของ Option ขอสถานะ
+ * @param val ค่าที่ต้องการฟิลเตอร์
+ * @param update อัพเดทค่า
+ * @param refData ดาต้าที่ต้องการฟิลเตอร์
+ */
+function filterOption(val: string, update: Function) {
+ update(() => {
+ group.value = val ? "" : group.value;
+ groupOp.value = groupDataOp.value.filter(
+ (v: DataOption) => v.name.indexOf(val) > -1
+ );
+ });
+}
+
+/**
+ * ฟังก์ชันเลือกกลุ่ม
+ * @param val กลุ่มที่ต้องการค้นหา
+ */
+function updateGroup(val: string) {
+ const data = [
+ {
+ id: "1",
+ posMasterNo: "สกก.3",
+ positionName: "นักจัดการงานทั่วไป",
+ posTypeName: "ทั่วไป",
+ posLevelName: "ปฏิบัติงาน",
+ positionIsSelected: "นายศรัณย์ ศิลาดี",
+ group: "1.1",
+ selected: true,
+ },
+ {
+ id: "2",
+ posMasterNo: "สกก.2",
+ positionName: "นักทรัพยากรบุคคล",
+ posTypeName: "วิชาการ",
+ posLevelName: "ชำนาญการพิเศษ",
+ positionIsSelected: "นางสาวพรทิพย์ กาญจนา",
+ group: "1.2",
+ selected: true,
+ },
+ {
+ id: "3",
+ posMasterNo: "สกก.1",
+ positionName: "นักบริหาร",
+ posTypeName: "บริหาร",
+ posLevelName: "สูง",
+ positionIsSelected: "นางสาวพรทิพย์ กาญจนา",
+ group: "2",
+ selected: true,
+ },
+ ];
+
+ rows.value = data.filter((e: any) => e.group === val);
+}
+
watch(modal, () => {
if (modal.value) {
fetchCommandType();
+ if (props.orgPublishDate) {
+ commandExcecuteDate.value = props.orgPublishDate;
+ isCheckOrgPublishDate.value = true;
+ }
}
});
@@ -128,19 +288,23 @@ watch(modal, () => {
+
+
-
+
{
+
{
+
{
:locale="'th'"
autoApply
:enableTimePicker="false"
- class="inputgreen"
+ :class="!isCheckOrgPublishDate ? 'inputgreen' : ''"
+ :readonly="isCheckOrgPublishDate"
>
{{ year + 543 }}
@@ -240,11 +407,12 @@ watch(modal, () => {
+ filterOption(inputValue, doneFn) "
+ >
+
+
+
+ ไม่มีข้อมูล
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ props.row.isSit
+ ? col.value + " " + "(นั่งทับตำแหน่ง)"
+ : col.value
+ }}
+
+
+ {{
+ props.row.posLevelName
+ ? props.row.isSpecial == true
+ ? `${props.row.posLevelName} (ฉ)`
+ : props.row.posLevelName
+ : "-"
+ }}
+
+
+ {{ col.value ? col.value : "-" }}
+
+
+
+
+
+
+
@@ -272,8 +545,13 @@ watch(modal, () => {