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