fix ออกคำสั่ง ในส่วนของรายชื่อผู้ได้รับคำสั่ง เฉพาะคำสั่งบรรจุ แต่งตั้ง แสดงตำแหน่งที่บรรจุเพิ่ม
This commit is contained in:
parent
6faef6b050
commit
81cb8eebce
21 changed files with 153 additions and 29 deletions
|
|
@ -48,6 +48,9 @@ const dataMapToSend = computed(() => {
|
|||
citizenId: i.citizenId,
|
||||
rootId: i.rootId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.position,
|
||||
posType: i.posTypeName,
|
||||
posLevel: i.posLevelName,
|
||||
}));
|
||||
});
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ const dataMapToSend = computed(() => {
|
|||
citizenId: i.citizenId,
|
||||
rootId: i.rootId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.position,
|
||||
posType: i.posTypeName,
|
||||
posLevel: i.posLevelName,
|
||||
}));
|
||||
});
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
|
|||
|
|
@ -16,8 +16,13 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
|||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const { statusText } = useTransferDataStore();
|
||||
const { dialogConfirm, findOrgNameOld, findPosMasterNoOld, date2Thai,onSearchDataTable } =
|
||||
useCounterMixin();
|
||||
const {
|
||||
dialogConfirm,
|
||||
findOrgNameOld,
|
||||
findPosMasterNoOld,
|
||||
date2Thai,
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
/** props*/
|
||||
const props = defineProps({
|
||||
|
|
@ -26,9 +31,11 @@ const props = defineProps({
|
|||
getData: Function,
|
||||
});
|
||||
|
||||
const rows2 = defineModel<any[]>('rows2',{required:true})
|
||||
const rows2Data = defineModel<any[]>('rows2Data',{required:true})
|
||||
const filterKeyword2 = defineModel<string>('filterKeyword2',{required:true})
|
||||
const rows2 = defineModel<any[]>("rows2", { required: true });
|
||||
const rows2Data = defineModel<any[]>("rows2Data", { required: true });
|
||||
const filterKeyword2 = defineModel<string>("filterKeyword2", {
|
||||
required: true,
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
||||
|
||||
|
|
@ -180,6 +187,9 @@ const dataMapToSend = computed(() => {
|
|||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.positionOld,
|
||||
posType: i.posTypeNameOld,
|
||||
posLevel: i.posLevelNameOld,
|
||||
}));
|
||||
});
|
||||
const modalCommand = ref<boolean>(false);
|
||||
|
|
@ -219,10 +229,10 @@ watch(
|
|||
);
|
||||
|
||||
function onSearch() {
|
||||
rows2.value= onSearchDataTable(
|
||||
rows2.value = onSearchDataTable(
|
||||
filterKeyword2.value,
|
||||
rows2Data.value,
|
||||
columns2.value? columns2.value: []
|
||||
columns2.value ? columns2.value : []
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ const dataMapToSend = computed(() => {
|
|||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import avatar from "@/assets/avatar_user.jpg";
|
||||
|
|
@ -21,7 +21,7 @@ const mixin = useCounterMixin();
|
|||
const route = useRoute();
|
||||
const DataStore = usePlacementDataStore();
|
||||
const storeCommand = useCommandMainStore();
|
||||
const { dialogConfirm, dateText,onSearchDataTable } = mixin;
|
||||
const { dialogConfirm, dateText, onSearchDataTable } = mixin;
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
/** props */
|
||||
|
|
@ -144,6 +144,22 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
rootId: i.rootId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.positionCandidate,
|
||||
posType: i.posTypeCandidateName,
|
||||
posLevel: i.posLevelCandidateName,
|
||||
}));
|
||||
});
|
||||
|
||||
/**
|
||||
* ฟิลเตอร์ คำสั่ง
|
||||
* @param val ค่าจาก Input
|
||||
|
|
@ -185,7 +201,6 @@ function closeModal() {
|
|||
commandType.value = "";
|
||||
}
|
||||
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
|
|
@ -460,6 +475,6 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="commandType"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ const dataMapToSend = computed(() => {
|
|||
citizenId: i.citizenId,
|
||||
rootId: i.rootId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.position,
|
||||
posType: i.posTypeName,
|
||||
posLevel: i.posLevelName,
|
||||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ const dataMapToSend = computed(() => {
|
|||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.positionOld,
|
||||
posType: i.posTypeNameOld,
|
||||
posLevel: i.posLevelNameOld,
|
||||
}));
|
||||
});
|
||||
const columns2 = ref<QTableProps["columns"]>([
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { statusText } = useTransferDataStore();
|
||||
const { dialogConfirm, date2Thai,onSearchDataTable } = mixin;
|
||||
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
/** props */
|
||||
|
|
@ -23,8 +23,8 @@ const props = defineProps({
|
|||
fetchData: Function,
|
||||
});
|
||||
|
||||
const rows = defineModel<any[]>('rows',{required:true})
|
||||
const rowsData = defineModel<any[]>('rowsData',{required:true})
|
||||
const rows = defineModel<any[]>("rows", { required: true });
|
||||
const rowsData = defineModel<any[]>("rowsData", { required: true });
|
||||
const modalCommand = ref<boolean>(false); //เปิด-ปิด modal สร้างคำสั่ง
|
||||
//Table
|
||||
const selected = ref<ResponseData[]>([]); //รายชื่อที่เลือก
|
||||
|
|
@ -37,6 +37,9 @@ const dataMapToSend = computed(() => {
|
|||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ const dataMapToSend = computed(() => {
|
|||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.idcard,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ const dataMapToSend = computed(() => {
|
|||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
rootId: i.rootId,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}))
|
||||
: [];
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const useProbationDataStore = defineStore("probationStore", () => {
|
|||
evaluate.value = await data.evaluate;
|
||||
tabs.value = await data.evaluate;
|
||||
};
|
||||
const fecthAssignoutput = (data: any) => {
|
||||
const fecthAssignoutput = async (data: any) => {
|
||||
assignOutput.value = data.assign_output;
|
||||
director.value = data.director;
|
||||
person.value = data.person;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ const dataMapToSend = computed(() => {
|
|||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reasonResign,
|
||||
remarkHorizontal: i.remarkHorizontal,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -159,7 +162,7 @@ const modalCommand = ref<boolean>(false);
|
|||
/** popup ยืนยันส่งัว */
|
||||
function saveOrder() {
|
||||
console.log(selected.value);
|
||||
|
||||
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ const dataMapToSend = computed(() => {
|
|||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reasonResign,
|
||||
remarkHorizontal: i.remarkHorizontal,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ const dataMapToSend = computed(() => {
|
|||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -174,6 +174,22 @@ const visibleColumns = ref<String[]>([
|
|||
|
||||
const modalCommand = ref<boolean>(false); //สร้างคำสั่ง
|
||||
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
id: i.id,
|
||||
profileId: i.profileId,
|
||||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
rootId: i.rootId,
|
||||
remarkVertical: i.reason,
|
||||
position: i.position,
|
||||
posType: i.posType,
|
||||
posLevel: i.posLevel ? i.posLevel.toString() : "",
|
||||
}));
|
||||
});
|
||||
|
||||
/** ฟังก์ชันยืนยันการส่งออกคำสั่ง*/
|
||||
function onClickSendOrder() {
|
||||
if (selected.value.length == 0) {
|
||||
|
|
@ -337,7 +353,7 @@ watch(
|
|||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-21'"
|
||||
:persons="selected"
|
||||
:persons="dataMapToSend"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ const dataMapToSend = computed(() => {
|
|||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.idcard,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ const dataMapToSend = computed(() => {
|
|||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
@ -290,12 +293,12 @@ watch(
|
|||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? convertType(props.row.profileType.toUpperCase())
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
{{
|
||||
props.row.profileType
|
||||
? convertType(props.row.profileType.toUpperCase())
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ const dataMapToSend = computed(() => {
|
|||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.idcard,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ async function getListCommandDraf() {
|
|||
function createCommand(isRedirect: boolean) {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const data = await props?.persons?.map((e: any) => ({
|
||||
const data = props?.persons?.map((e: any) => ({
|
||||
refId: e.id,
|
||||
prefix: e.prefix,
|
||||
firstName: e.firstName,
|
||||
|
|
@ -167,6 +167,9 @@ function createCommand(isRedirect: boolean) {
|
|||
citizenId: e.citizenId,
|
||||
profileId: e.profileId,
|
||||
rootId: e.rootId,
|
||||
position: e.position,
|
||||
posType: e.posType,
|
||||
posLevel: e.posLevel,
|
||||
...(e.remarkVertical ? { remarkVertical: e.remarkVertical } : {}),
|
||||
...(e.remarkHorizontal ? { remarkHorizontal: e.remarkHorizontal } : {}),
|
||||
|
||||
|
|
@ -224,6 +227,9 @@ function addPersonalToCommand(isRedirect: boolean) {
|
|||
citizenId: e.citizenId,
|
||||
profileId: e.profileId,
|
||||
rootId: e.rootId,
|
||||
position: e.position,
|
||||
posType: e.posType,
|
||||
posLevel: e.posLevel,
|
||||
...(e.remarkVertical ? { remarkVertical: e.remarkVertical } : {}),
|
||||
...(e.remarkHorizontal ? { remarkHorizontal: e.remarkHorizontal } : {}),
|
||||
}));
|
||||
|
|
@ -284,7 +290,7 @@ function clearValue() {
|
|||
async function fetchCommandType() {
|
||||
const data = await storeCommand.getCommandTypes(); // ยิงไป get ที่ store
|
||||
// filter เฉพาะ code ของคำสั่งที่เลือก
|
||||
commandOp.value = await data.filter(
|
||||
commandOp.value = data.filter(
|
||||
(v: ListCommand) => v.code == props.commandTypeCode
|
||||
);
|
||||
commandType.value = commandOp.value[0].id;
|
||||
|
|
@ -308,9 +314,10 @@ const tabOptions = ref<TabOptions[]>([
|
|||
/** ฟังก์ชั่นเช็คการแสดงผล ตรวจสอบว่าเป็นประเภทคำสั่งที่เป็นแบบเลือกได้รายการเดียวไหม ถ้าเป็นแบบรายการเดียวจะซ่อนเลือกคำสั่งที่เป็นแบบร่าง*/
|
||||
async function displayTab() {
|
||||
isHold.value =
|
||||
(await (props.commandTypeCode !== "C-PM-10" &&
|
||||
(props.commandTypeCode !== "C-PM-10" &&
|
||||
props.commandTypeCode !== "C-PM-11" &&
|
||||
props.commandTypeCode !== "C-PM-12")) ?? false;
|
||||
props.commandTypeCode !== "C-PM-12") ??
|
||||
false;
|
||||
tabOptions.value = isHold.value
|
||||
? [
|
||||
{ label: "สร้างคำสั่งใหม่", value: "NEW" },
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ const dataMapToSend = computed(() => {
|
|||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
citizenId: i.citizenId,
|
||||
position: i.positionOld,
|
||||
posType: i.positionTypeOld,
|
||||
posLevel: i.positionLevelOld,
|
||||
...(props.systemName?.includes("SALARY") && {
|
||||
amount: i.positionSalaryAmount,
|
||||
amountSpecial: i.amountSpecial,
|
||||
|
|
|
|||
|
|
@ -95,6 +95,29 @@ const columns = ref<QTableProps["columns"]>([
|
|||
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "position",
|
||||
align: "left",
|
||||
label: "ตำแหน่ง",
|
||||
field: "position",
|
||||
sortable: true,
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "positionType",
|
||||
align: "left",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
field: "positionType",
|
||||
sortable: true,
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return row.posType
|
||||
? `${row.posType} ${row.posLevel ? `(${row.posLevel})` : ""}`
|
||||
: "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
|
|
@ -107,8 +130,16 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
]);
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
"citizenId",
|
||||
"fullName",
|
||||
"amount",
|
||||
"position",
|
||||
"positionType",
|
||||
]);
|
||||
const visibleColumns = ref<String[]>(["no", "citizenId", "fullName", "amount"]);
|
||||
|
||||
const modalSalary = ref<boolean>(false);
|
||||
const titleName = ref<string>("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue