diff --git a/src/api/18_command/api.command.ts b/src/api/18_command/api.command.ts index 32b17f1ba..8c3491460 100644 --- a/src/api/18_command/api.command.ts +++ b/src/api/18_command/api.command.ts @@ -10,7 +10,12 @@ export default { commandAction: (commandId: string, type: string) => `${command}/${type}/${commandId}`, - commandSalaryList:(command:string)=>`${commandSalary}/list?commandSysId=${command}`, - commandSwap:(tab:string,direction:string,commandReciveId:string)=>`${command}/${tab}/swap/${direction}/${commandReciveId}`, - commandEditRecive:(tab:string,commandReciveId:string)=>`${command}/${tab}/recive/${commandReciveId}` + commandSalaryList: (command: string) => + `${commandSalary}/list?commandSysId=${command}`, + commandSwap: (tab: string, direction: string, commandReciveId: string) => + `${command}/${tab}/swap/${direction}/${commandReciveId}`, + commandEditRecive: (tab: string, commandReciveId: string) => + `${command}/${tab}/recive/${commandReciveId}`, + + checkIdofficer: `${env.API_URI}/org/profile/keycloak/idofficer`, }; diff --git a/src/modules/18_command/components/Step/1_Detail.vue b/src/modules/18_command/components/Step/1_Detail.vue index 96c863638..8475ad36a 100644 --- a/src/modules/18_command/components/Step/1_Detail.vue +++ b/src/modules/18_command/components/Step/1_Detail.vue @@ -42,10 +42,21 @@ let formData = reactive({ isAttachment: true, }); const modalPreview = ref(false); //แสดงตัวอย่าง +const isIdofficer = ref(false); //เช็ค สกจ. + +async function fetchCheckIdofficer() { + await http + .get(config.API.checkIdofficer) + .then((res) => { + isIdofficer.value = res.data.result; + }) + .catch((err) => { + messageError($q, err); + }); +} /** * ฟังก์ชันบันทึกข้อมูลรายละเอียดคำสั่ง - * * และกำหนด isChangeData เป็น false */ async function onSubmit() { @@ -77,6 +88,7 @@ onMounted(() => { formData.commandAffectDate = props.formCommandList.commandAffectDate; formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate; formData.isBangkok = props.formCommandList.isBangkok; + fetchCheckIdofficer(); }); /** @@ -273,43 +285,6 @@ defineExpose({ @update:model-value="onCheckChangeData()" type="textarea" /> - @@ -327,43 +302,6 @@ defineExpose({ :rules="[(val: string) => !!val || `${'กรุณากรอกเนื้อหาคำสั่งหลัก'}`]" lazy-rules /> - @@ -379,47 +317,11 @@ defineExpose({ @update:model-value="onCheckChangeData()" type="textarea" /> - -
+