Merge commit 'dc3e62dc68' into develop
This commit is contained in:
commit
027e668fa6
8 changed files with 194 additions and 75 deletions
|
|
@ -47,8 +47,10 @@ const files = ref<any>(); //ไฟล์รับ
|
|||
const filesReturn = ref<any>(); //ไฟล์คืน
|
||||
const OrganazationId = ref<string>(""); //id หน่วยงานที่รับ
|
||||
const OrganazationId2 = ref<string>(""); //id หน่วยงานที่คือ
|
||||
const OrgListMain = ref<DataOption[]>([]); ////รายการหน่วยงาน
|
||||
const OrgList = ref<DataOption[]>([]); //รายการหน่วยงาน
|
||||
const OrgList2 = ref<DataOption[]>([]); ////รายการหน่วยงาน
|
||||
const OrgList2 = ref<DataOption[]>([]); //รายการหน่วยงาน
|
||||
|
||||
const Datereceive = ref<Date | null>(); //วันที่รับ
|
||||
const Datereturn = ref<Date | null>(); //วันที่คืน
|
||||
const nullii = ref<any>(null);
|
||||
|
|
@ -119,6 +121,16 @@ function onSubmit(type: string, id: string) {
|
|||
* function เรียกหน่วยงาน
|
||||
*/
|
||||
async function fetchOrgList() {
|
||||
const newData = [
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
name: "สำนักนายกรัฐมนตรี",
|
||||
},
|
||||
];
|
||||
// OrgListMain.value = newData;
|
||||
// OrgList.value = newData;
|
||||
// OrgList2.value = newData;
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.activeOrganization)
|
||||
|
|
@ -133,8 +145,11 @@ async function fetchOrgList() {
|
|||
name: item.orgName,
|
||||
})
|
||||
);
|
||||
OrgList.value = dataSystem;
|
||||
OrgList2.value = dataSystem;
|
||||
|
||||
newData.push(...dataSystem);
|
||||
OrgListMain.value = newData;
|
||||
OrgList.value = newData;
|
||||
OrgList2.value = newData;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -148,14 +163,49 @@ async function fetchOrgList() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function ค้นหาข้อมูลใน select
|
||||
* @param val คำค้นหา
|
||||
* @param update Function
|
||||
*/
|
||||
function filterOption(val: string, update: Function, type: string) {
|
||||
switch (type) {
|
||||
case "receive":
|
||||
update(() => {
|
||||
OrgList.value = OrgListMain.value.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
case "return":
|
||||
update(() => {
|
||||
OrgList2.value = OrgListMain.value.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* class inpui
|
||||
* @param val ค่าสถานะ
|
||||
*/
|
||||
function classInput(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* callback function จะทำงานเมื่อ modal มีการเปลี่ยนแปลง
|
||||
*/
|
||||
watch(
|
||||
() => props.modal,
|
||||
() => {
|
||||
async () => {
|
||||
if (props.modal == true) {
|
||||
fetchOrgList();
|
||||
await fetchOrgList();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -167,15 +217,16 @@ watch(props, () => {
|
|||
if (props.dataModal) {
|
||||
Datereceive.value = props.dataModal.dateReceiveInsignia;
|
||||
Datereturn.value = props.dataModal.dateReturnInsignia;
|
||||
OrganazationId.value = props.dataModal.orgReceiveInsignia;
|
||||
OrganazationId.value = props.dataModal.orgReceiveInsigniaId;
|
||||
filesCheck.value = props.dataModal.docReceiveInsignia;
|
||||
filesReturnCheck.value = props.dataModal.docReturnInsignia;
|
||||
OrganazationId2.value =
|
||||
Datereturn.value != null
|
||||
? props.dataModal.orgReturnInsignia == null ||
|
||||
props.dataModal.orgReturnInsignia == "-"
|
||||
? props.dataModal.orgReturnInsigniaId === null ||
|
||||
props.dataModal.orgReturnInsigniaId === "-" ||
|
||||
props.dataModal.orgReturnInsigniaId === ""
|
||||
? "00000000-0000-0000-0000-000000000000"
|
||||
: props.dataModal.orgReturnInsignia
|
||||
: props.dataModal.orgReturnInsigniaId
|
||||
: "";
|
||||
}
|
||||
});
|
||||
|
|
@ -183,7 +234,7 @@ watch(props, () => {
|
|||
|
||||
<template>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="min-width: 900px">
|
||||
<q-card style="width: 1200px; max-width: 200vw">
|
||||
<q-form
|
||||
greedy
|
||||
@submit.prevent
|
||||
|
|
@ -226,12 +277,12 @@ watch(props, () => {
|
|||
outlined
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่ได้รับ']"
|
||||
hide-bottom-space
|
||||
class="inputgreen"
|
||||
:model-value="
|
||||
Datereceive != null ? date2Thai(Datereceive) : null
|
||||
"
|
||||
:label="`${'วันที่ได้รับ'}`"
|
||||
:disable="dateCheckReceive !== null"
|
||||
:class="classInput(dateCheckReceive !== null)"
|
||||
:readonly="dateCheckReceive !== null"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -271,6 +322,7 @@ watch(props, () => {
|
|||
:rules="[(val:string) => val || 'กรุณาเลือกไฟล์หลักฐานการรับ']"
|
||||
hide-bottom-space
|
||||
:disable="dateCheckReceive !== null"
|
||||
class="inputgreen"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" color="primary" />
|
||||
|
|
@ -288,12 +340,16 @@ watch(props, () => {
|
|||
emit-value
|
||||
map-options
|
||||
outlined
|
||||
use-input
|
||||
v-model="OrganazationId"
|
||||
lazy-rules
|
||||
:label="`หน่วยงานที่รับ`"
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกหน่วยงานที่รับ']"
|
||||
:disable="dateCheckReceive !== null"
|
||||
class="inputgreen"
|
||||
:class="classInput(dateCheckReceive !== null)"
|
||||
:readonly="dateCheckReceive !== null"
|
||||
@filter="(inputValue:string,
|
||||
doneFn:Function) => filterOption(inputValue, doneFn,'receive'
|
||||
) "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -328,7 +384,6 @@ watch(props, () => {
|
|||
dense
|
||||
borderless
|
||||
outlined
|
||||
class="inputgreen"
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่คืน']"
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
|
|
@ -337,7 +392,8 @@ watch(props, () => {
|
|||
:label="`${'วันที่คืน'}`"
|
||||
clearable
|
||||
@clear="clearReturnDate"
|
||||
:disable="dateCheckReturn !== null"
|
||||
:class="classInput(dateCheckReturn !== null)"
|
||||
:readonly="dateCheckReturn !== null"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -377,6 +433,7 @@ watch(props, () => {
|
|||
:rules="[(val:string) => val || 'กรุณาเลือกไฟล์หลักฐานการคืน']"
|
||||
hide-bottom-space
|
||||
:disable="dateCheckReturn !== null"
|
||||
class="inputgreen"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" color="primary" />
|
||||
|
|
@ -396,10 +453,15 @@ watch(props, () => {
|
|||
outlined
|
||||
v-model="OrganazationId2"
|
||||
lazy-rules
|
||||
use-input
|
||||
:label="`หน่วยงานที่คืน`"
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกหน่วยงานที่คืน']"
|
||||
:disable="dateCheckReturn !== null"
|
||||
class="inputgreen"
|
||||
:class="classInput(dateCheckReturn !== null)"
|
||||
:readonly="dateCheckReturn !== null"
|
||||
@filter="(inputValue:string,
|
||||
doneFn:Function) => filterOption(inputValue, doneFn,'return'
|
||||
|
||||
) "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -152,8 +152,6 @@ function findlist(id: string = "", idCard: string) {
|
|||
} else {
|
||||
notifyError($q, "ไม่พบข้อมูลเลขประจำตัวประชาชนนี้");
|
||||
}
|
||||
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -236,6 +234,8 @@ function onSubmit() {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -269,6 +269,17 @@ function filterSelector(val: string, update: Function, name: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* class inpui
|
||||
* @param val ค่าสถานะ
|
||||
*/
|
||||
function classInput(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* callback function จำทำงานเมื่อ props.modal = true เปิด popup เพิ่มรายชื่อบันทึกผล
|
||||
*/
|
||||
|
|
@ -334,9 +345,9 @@ watch(props, () => {
|
|||
v-model="employeeClass"
|
||||
:label="`ขรก.สามัญ/ลูกจ้างประจำ`"
|
||||
@update:model-value="selectType"
|
||||
:disable="status !== ''"
|
||||
:class="classInput(status !== '')"
|
||||
:readonly="status !== ''"
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 text-weight-bold text-grey">
|
||||
|
|
@ -344,12 +355,17 @@ watch(props, () => {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
:disable="
|
||||
:readonly="
|
||||
disbleStatus || status == 'DONE' || status == 'PENDING'
|
||||
"
|
||||
:class="
|
||||
classInput(
|
||||
disbleStatus || status == 'DONE' || status == 'PENDING'
|
||||
)
|
||||
"
|
||||
:disable="employeeClass == ''"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="cardid"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -368,12 +384,12 @@ watch(props, () => {
|
|||
|
||||
<div class="col-xs-6 col-sm-4">
|
||||
<q-input
|
||||
disable
|
||||
:disable="employeeClass == ''"
|
||||
readonly
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
borderless
|
||||
v-model="fullName"
|
||||
:label="`${'ชื่อ-นามสกุล'}`"
|
||||
|
|
@ -382,12 +398,12 @@ watch(props, () => {
|
|||
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
disable
|
||||
:disable="employeeClass == ''"
|
||||
readonly
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
borderless
|
||||
v-model="position"
|
||||
:label="`ตำเเหน่ง`"
|
||||
|
|
@ -402,8 +418,10 @@ watch(props, () => {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:rules="[
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
:rules="disbleStatus || status == 'DONE' ? [] : [
|
||||
(val:string) =>
|
||||
!!val ||
|
||||
'กรุณากรอกหมายเลขประกาศนีย์บัตรกำกับเครื่องราชอิสริยาภรณ์',
|
||||
|
|
@ -415,12 +433,13 @@ watch(props, () => {
|
|||
v-model="Advertise"
|
||||
lazy-rules
|
||||
label="หมายเลขประกาศนีย์บัตรกำกับเครื่องราชอิสริยาภรณ์"
|
||||
class="inputgreen"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-select
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
v-model="brand"
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -432,12 +451,10 @@ watch(props, () => {
|
|||
option-label="name"
|
||||
:options="filterinsigniaOp2"
|
||||
option-value="id"
|
||||
:readonly="false"
|
||||
use-input
|
||||
:borderless="false"
|
||||
class="inputgreen"
|
||||
style="min-width: 150px"
|
||||
:rules="[
|
||||
:rules="disbleStatus || status == 'DONE' ? [] :[
|
||||
(val:string) => !!val || 'กรุณากรอกชื่อชั้นตราเครื่องราชอิสริยาภรณ์',
|
||||
]"
|
||||
@filter="(inputValue:string,doneFn:Function) =>
|
||||
|
|
@ -463,12 +480,13 @@ watch(props, () => {
|
|||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
|
||||
class="inputgreen"
|
||||
:rules="disbleStatus || status == 'DONE' ? [] :[(val:string) => !!val || 'กรุณาเลือกวันที่']"
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
receivedate != null ? date2Thai(receivedate) : undefined
|
||||
|
|
@ -477,6 +495,7 @@ watch(props, () => {
|
|||
>
|
||||
<template v-if="receivedate" v-slot:append>
|
||||
<q-icon
|
||||
v-if="!disbleStatus && status !== 'DONE'"
|
||||
name="cancel"
|
||||
@click.stop.prevent="receivedate = null"
|
||||
class="cursor-pointer"
|
||||
|
|
@ -496,9 +515,10 @@ watch(props, () => {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกทะเบียนฐานันดร']"
|
||||
class="inputgreen"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
:rules="disbleStatus || status == 'DONE' ? [] : [(val:string) => !!val || 'กรุณากรอกทะเบียนฐานันดร']"
|
||||
hide-bottom-space
|
||||
dense
|
||||
borderless
|
||||
|
|
@ -510,10 +530,16 @@ watch(props, () => {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
:disable="
|
||||
:readonly="
|
||||
disbleStatus || status == 'DONE' || status == 'PENDING'
|
||||
"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกสังกัด']"
|
||||
:class="
|
||||
classInput(
|
||||
disbleStatus || status == 'DONE' || status == 'PENDING'
|
||||
)
|
||||
"
|
||||
:disable="employeeClass == ''"
|
||||
:rules="disbleStatus || status == 'DONE' || status == 'PENDING' ? [] :[(val:string) => !!val || 'กรุณากรอกสังกัด']"
|
||||
class="inputgreen"
|
||||
hide-bottom-space
|
||||
dense
|
||||
|
|
@ -526,11 +552,16 @@ watch(props, () => {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
:disable="
|
||||
:readonly="
|
||||
disbleStatus || status == 'DONE' || status == 'PENDING'
|
||||
"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกสังกัด']"
|
||||
class="inputgreen"
|
||||
:class="
|
||||
classInput(
|
||||
disbleStatus || status == 'DONE' || status == 'PENDING'
|
||||
)
|
||||
"
|
||||
:disable="employeeClass == ''"
|
||||
:rules="disbleStatus || status == 'DONE' || status == 'PENDING' ? [] :[(val:string) => !!val || 'กรุณากรอกสังกัด']"
|
||||
hide-bottom-space
|
||||
dense
|
||||
borderless
|
||||
|
|
@ -554,6 +585,8 @@ watch(props, () => {
|
|||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -563,12 +596,13 @@ watch(props, () => {
|
|||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
|
||||
class="inputgreen"
|
||||
:rules="disbleStatus || status == 'DONE' ? []:[(val:string) => !!val || 'กรุณาเลือกวันที่']"
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
announceDate != null ? date2Thai(announceDate) : undefined
|
||||
|
|
@ -577,6 +611,7 @@ watch(props, () => {
|
|||
>
|
||||
<template v-if="announceDate" v-slot:append>
|
||||
<q-icon
|
||||
v-if="!disbleStatus && status !== 'DONE'"
|
||||
name="cancel"
|
||||
@click.stop.prevent="announceDate = null"
|
||||
class="cursor-pointer"
|
||||
|
|
@ -596,58 +631,62 @@ watch(props, () => {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
borderless
|
||||
v-model="volume"
|
||||
:label="`เล่มที่`"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกเล่มที่']"
|
||||
:rules="disbleStatus || status == 'DONE' ? []:[(val:string) => !!val || 'กรุณากรอกเล่มที่']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
borderless
|
||||
v-model="episode"
|
||||
:label="`ตอนที่`"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกตอนที่']"
|
||||
:rules="disbleStatus || status == 'DONE' ? []:[(val:string) => !!val || 'กรุณากรอกตอนที่']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
borderless
|
||||
v-model="duty"
|
||||
:label="`หน้าที่`"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกหน้าที่']"
|
||||
:rules="disbleStatus || status == 'DONE' ? []:[(val:string) => !!val || 'กรุณากรอกหน้าที่']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
:disable="disbleStatus || status == 'DONE'"
|
||||
:readonly="disbleStatus || status == 'DONE'"
|
||||
:class="classInput(disbleStatus || status == 'DONE')"
|
||||
:disable="employeeClass == ''"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
borderless
|
||||
v-model="announced"
|
||||
:label="`ลำดับที่`"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกลำดับที่']"
|
||||
:rules="disbleStatus || status == 'DONE' ? []:[(val:string) => !!val || 'กรุณากรอกลำดับที่']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-my-xs"><q-separator size="2px" /></div>
|
||||
|
|
@ -674,11 +713,12 @@ watch(props, () => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
:disable="disbleStatus"
|
||||
:readonly="disbleStatus"
|
||||
:class="classInput(disbleStatus)"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
hide-bottom-space
|
||||
class="inputgreen"
|
||||
:model-value="
|
||||
invoiceDate != null ? date2Thai(invoiceDate) : undefined
|
||||
"
|
||||
|
|
@ -701,9 +741,10 @@ watch(props, () => {
|
|||
<div class="col-xs-12 col-sm-6">
|
||||
<q-select
|
||||
:disable="disbleStatus"
|
||||
:readonly="disbleStatus"
|
||||
:class="classInput(disbleStatus)"
|
||||
hide-bottom-space
|
||||
:options="paymentOp"
|
||||
class="inputgreen"
|
||||
dense
|
||||
borderless
|
||||
option-label="label"
|
||||
|
|
@ -719,6 +760,8 @@ watch(props, () => {
|
|||
<div v-if="payment === 'จัดส่งทางไปรษณีย์'" class="col-12">
|
||||
<q-input
|
||||
:disable="disbleStatus"
|
||||
:readonly="disbleStatus"
|
||||
:class="classInput(disbleStatus)"
|
||||
label="ที่อยู่ที่จ่าย"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -726,7 +769,6 @@ watch(props, () => {
|
|||
outlined
|
||||
v-model="addressPayment"
|
||||
type="textarea"
|
||||
class="inputgreen"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -62,6 +62,17 @@ function onSubmit() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* class inpui
|
||||
* @param val ค่าสถานะ
|
||||
*/
|
||||
function classInput(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
};
|
||||
}
|
||||
|
||||
watch(props, () => {
|
||||
if (props.modal === true) {
|
||||
amount.value = props.insigniadata.total;
|
||||
|
|
@ -91,13 +102,13 @@ watch(props, () => {
|
|||
<q-input
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="title"
|
||||
dense
|
||||
lazy-rules
|
||||
type="text"
|
||||
label="เครื่องราชฯ"
|
||||
disable
|
||||
:class="classInput(true)"
|
||||
readonly
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
|
|
|
|||
|
|
@ -343,7 +343,6 @@ onMounted(() => {
|
|||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
borderless
|
||||
v-model="fullName"
|
||||
:label="`${'ชื่อ-นามสกุล'}`"
|
||||
|
|
@ -362,7 +361,7 @@ onMounted(() => {
|
|||
<q-input
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกเครื่องราชฯ']"
|
||||
v-model="brand"
|
||||
disable
|
||||
readonly
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
|
|
|
|||
|
|
@ -89,6 +89,8 @@ interface ResponseRecordLists {
|
|||
status: string;
|
||||
typePayment: string;
|
||||
volumeNo: string;
|
||||
orgReceiveInsigniaId: string;
|
||||
orgReturnInsigniaId: string;
|
||||
}
|
||||
|
||||
interface ResponseProfile {
|
||||
|
|
|
|||
|
|
@ -112,11 +112,13 @@ export const useResultDataStore = defineStore("insigniaResult", () => {
|
|||
typepay: e.typePayment,
|
||||
address: e.address,
|
||||
dateReceiveInsignia: e.dateReceiveInsignia,
|
||||
dateReturnInsignia: e.dateReturnInsignia,
|
||||
docReceiveInsignia: e.docReceiveInsignia,
|
||||
docReturnInsignia: e.docReturnInsignia,
|
||||
orgReceiveInsignia: e.orgReceiveInsignia,
|
||||
orgReceiveInsigniaId: e.orgReceiveInsigniaId,
|
||||
dateReturnInsignia: e.dateReturnInsignia,
|
||||
docReturnInsignia: e.docReturnInsignia,
|
||||
orgReturnInsignia: e.orgReturnInsignia,
|
||||
orgReturnInsigniaId: e.orgReturnInsigniaId,
|
||||
}));
|
||||
|
||||
rows.value = alllist;
|
||||
|
|
|
|||
|
|
@ -557,7 +557,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
|
|
@ -686,6 +685,7 @@ onMounted(async () => {
|
|||
label="คืนเครื่องราชฯ"
|
||||
@click="editData(props.row.id)"
|
||||
color="blue"
|
||||
size="sm"
|
||||
/>
|
||||
</q-td>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -267,7 +267,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</q-toolbar>
|
||||
|
|
@ -320,9 +319,11 @@ onMounted(() => {
|
|||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'fullName'">
|
||||
{{ props.row.prefix ? props.row.prefix : ""
|
||||
}}{{ props.row.firstName ? props.row.firstName : "" }}
|
||||
{{ props.row.lastName ? props.row.lastName : "" }}
|
||||
{{
|
||||
props.row.firstName
|
||||
? `${props.row.prefix}${props.row.firstName}${props.row.lastName}`
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'org'" class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue