fix ออกคำสั่ง ในส่วนของรายชื่อผู้ได้รับคำสั่ง เฉพาะคำสั่งบรรจุ แต่งตั้ง แสดงตำแหน่งที่บรรจุเพิ่ม
This commit is contained in:
parent
6faef6b050
commit
81cb8eebce
21 changed files with 153 additions and 29 deletions
|
|
@ -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