Merge branch 'develop' of github.com:Frappet/BMA-EHR-USER into develop
This commit is contained in:
commit
190f186189
5 changed files with 38 additions and 28 deletions
|
|
@ -82,6 +82,7 @@ export default {
|
|||
* รายการคำร้องขอแก้ไขข้อมูลทะเบียนประวัติ
|
||||
*/
|
||||
requestEdit: `${profileOrg}/edit/`,
|
||||
requestsEdit: `${profileOrg}/edit`,
|
||||
developmentUser: `${profileOrg}/development/user`,
|
||||
|
||||
upDateNumber:`${profileOrg}/updatePhoneNumber/user`,
|
||||
|
|
|
|||
|
|
@ -39,28 +39,19 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "position",
|
||||
name: "posExecutiveName",
|
||||
align: "left",
|
||||
label: "ตำแหน่งในสายงาน",
|
||||
label: "ตำแหน่งทางการบริหาร",
|
||||
sortable: true,
|
||||
field: "position",
|
||||
field: "posExecutiveName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
// {
|
||||
// name: "posType",
|
||||
// align: "left",
|
||||
// label: "ประเภทตำแหน่ง",
|
||||
// sortable: true,
|
||||
// field: "posType",
|
||||
// headerStyle: "font-size: 14px",
|
||||
// style: "font-size: 14px",
|
||||
// },
|
||||
{
|
||||
name: "orgRoot",
|
||||
name: "actFullName",
|
||||
align: "left",
|
||||
label: "สังกัด",
|
||||
field: "orgRoot",
|
||||
label: "รักษาการ",
|
||||
field: "actFullName",
|
||||
sortable: true,
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
|
|
@ -220,7 +211,11 @@ watch(modal, (val) => {
|
|||
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
label="ส่งไปยังผู้บังคับบัญชา/ผู้มีอำนาจ"
|
||||
:label="
|
||||
props.type === 'operate'
|
||||
? 'ส่งไปยังผู้บังคับบัญชา'
|
||||
: 'ส่งไปยังผู้มีอำนาจ'
|
||||
"
|
||||
color="public"
|
||||
type="submit"
|
||||
:disable="
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ const permission = ref<Permission>({
|
|||
isUpdate: false, //แก้ไขเอกสารได้
|
||||
isDelete: false, //ลบเอกสารได้ (ถ้ามี)
|
||||
isCancel: false, //ลบเอกสารได้ (ถ้ามี)
|
||||
isSing: false,
|
||||
});
|
||||
|
||||
const modalSelectPerson = ref<boolean>(false); //เลือกรายชื่อ ส่งไปผู้บังคับบัญชา/ผู้มีอำนาจ
|
||||
|
|
@ -59,6 +60,7 @@ async function fetchCheckState() {
|
|||
isUpdate: data.can_update,
|
||||
isDelete: data.can_delete,
|
||||
isCancel: data.can_cancel,
|
||||
isSing: data.can_sing,
|
||||
};
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
@ -191,23 +193,22 @@ defineExpose({
|
|||
</q-list>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="permission.isOperate && state === index + 1"
|
||||
class="row q-gutter-x-sm"
|
||||
>
|
||||
<div v-if="state === index + 1" class="row q-gutter-x-sm">
|
||||
<q-btn
|
||||
v-if="permission.isOperate"
|
||||
@click.prevent="
|
||||
(modalSelectPerson = true), (typeSelectPerson = 'operate')
|
||||
"
|
||||
label="ส่งไปผู้บังคับบัญชา"
|
||||
label="ส่งไปยังผู้บังคับบัญชา"
|
||||
color="public"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
v-if="permission.isSing"
|
||||
@click.prevent="
|
||||
(modalSelectPerson = true), (typeSelectPerson = 'sign')
|
||||
"
|
||||
label="ผู้มีอำนาจ"
|
||||
label="ส่งไปยังผู้มีอำนาจ"
|
||||
color="public"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ interface Permission {
|
|||
isUpdate: boolean; //แก้ไขเอกสารได้
|
||||
isDelete: boolean; //ลบเอกสารได้ (ถ้ามี)
|
||||
isCancel: boolean; //ลบเอกสารได้ (ถ้ามี)
|
||||
isSing: boolean;
|
||||
}
|
||||
|
||||
export type { Permission };
|
||||
|
|
|
|||
|
|
@ -50,16 +50,24 @@ function closeDialog() {
|
|||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
async () => {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.requestEdit, {
|
||||
await http
|
||||
.post(config.API.requestsEdit, {
|
||||
topic: formData.topic,
|
||||
detail: formData.detail,
|
||||
profileId: profileId.value,
|
||||
})
|
||||
.then((res) => {
|
||||
createURLUpload(res.data.result, formData.document);
|
||||
.then(async (res) => {
|
||||
if (formData.document) {
|
||||
createURLUpload(res.data.result, formData.document);
|
||||
} else {
|
||||
formData.document = null;
|
||||
await props.fetchData?.();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closeDialog();
|
||||
hideLoader();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -253,7 +261,11 @@ watch(
|
|||
: '.pdf,.xlsx,.docx'
|
||||
"
|
||||
hide-bottom-space
|
||||
:rules="[(val:any) => !!val || `${'กรุณาเลือกไฟล์'}`]"
|
||||
:rules="formData.topic !== 'ขอปรับปรุงข้อมูลจากกรมการปกครอง' &&
|
||||
formData.topic !== 'ขอแก้ไขอาชีพ คู่สมรส' &&
|
||||
formData.topic !== 'ขอแก้ไขอาชีพ บิดา' &&
|
||||
formData.topic !== 'ขอแก้ไขอาชีพ มารดา' &&
|
||||
formData.topic !== 'ขอแก้ไขที่อยู่ปัจจุบัน'?[(val:any) => !!val || `${'กรุณาเลือกไฟล์'}`]:''"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue