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" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue