no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-24 17:01:21 +07:00
parent 8e8ab5b8cf
commit fd2a76ecab
2 changed files with 37 additions and 33 deletions

View file

@ -47,7 +47,7 @@ const invoiceDate = ref<Date | null>(null);
const employeeClass = ref<string>("");
const employeeClassOps = ref<DataOption[]>([
{ id: "officer", name: "ข้าราชการ กทม.สามัญ" },
{ id: "perm", name: "ลูกจ้างประจำ" },
{ id: "employee", name: "ลูกจ้างประจำ" },
]);
const listPerson = ref<any>([]);
@ -120,6 +120,9 @@ const props = defineProps({
personId: {
type: String,
},
profileType: {
type: String,
},
});
watch(props, () => {
if (props.modal === true) {
@ -191,7 +194,7 @@ const findlist = async (id: string) => {
let data = [{}];
if (employeeClass.value === "officer") {
data = [{ criteriaType: "is_retire", criteriaValue: "false" }];
} else if (employeeClass.value === "perm") {
} else if (employeeClass.value === "employee") {
data = [
{ criteriaType: "is_retire", criteriaValue: "false" },
{ criteriaType: "employee_class", criteriaValue: "perm" },
@ -202,7 +205,7 @@ const findlist = async (id: string) => {
criterias: data,
})
.then((res) => {
console.log(res.data.result);
// console.log(res.data.result);
listPerson.value = res.data.result;
})
.catch((e) => {
@ -217,7 +220,6 @@ const fectDataByid = async (id: string) => {
await http
.get(config.API.noteByid(id))
.then((res) => {
console.log(res);
let data = res.data.result;
employeeClass.value = "";
cardid.value = data.citizenId;
@ -238,9 +240,11 @@ const fectDataByid = async (id: string) => {
payment.value = data.typePayment;
addressPayment.value = data.address;
status.value = data.status;
employeeClass.value = props.profileType;
})
.catch((err) => {
console.log(err);
messageError($q, err);
})
.finally(() => {
hideLoader();
@ -267,7 +271,6 @@ const clickSave = async () => {
};
await myForm.value!.validate().then((result: boolean) => {
if (result) {
console.log(123);
dialogConfirm($q, async () => {
await addNote(body);
});
@ -295,7 +298,6 @@ const searchcardid = () => {
fullName.value = data.fullname;
position.value = data.positionEmployeePosition;
} else notifyError($q, "ไม่พบข้อมูลเลขบัตรประชาชนนี้");
console.log(data);
}
};
</script>
@ -345,7 +347,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-4">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
hide-bottom-space
outlined
class="inputgreen"
@ -442,7 +444,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
:rules="[
(val) =>
!!val ||
@ -470,7 +472,7 @@ const searchcardid = () => {
label="ชั้นตราเครื่องราชอิสริยาภรณ์"
/> -->
<q-select
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
v-model="brand"
dense
outlined
@ -508,7 +510,7 @@ const searchcardid = () => {
</template>
<template #trigger>
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
dense
borderless
outlined
@ -535,7 +537,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
:rules="[(val) => !!val || 'กรุณากรอกทะเบียนฐานนันดร']"
hide-bottom-space
dense
@ -547,7 +549,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
:rules="[(val) => !!val || 'กรุณากรอกสังกัด']"
hide-bottom-space
dense
@ -573,7 +575,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
:rules="[(val) => !!val || 'กรุณากรอกสังกัด']"
hide-bottom-space
dense
@ -618,7 +620,7 @@ const searchcardid = () => {
</template>
<template #trigger>
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
dense
borderless
outlined
@ -645,7 +647,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-4">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
hide-bottom-space
outlined
dense
@ -674,7 +676,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-4">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
hide-bottom-space
outlined
dense
@ -703,7 +705,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
hide-bottom-space
outlined
dense
@ -732,7 +734,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:disable="disbleStatus"
:disable="disbleStatus || status == 'DONE'"
hide-bottom-space
outlined
dense
@ -791,7 +793,7 @@ const searchcardid = () => {
</template>
<template #trigger>
<q-input
:disable="disbleStatus && status !== 'DONE'"
:disable="disbleStatus"
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
dense
borderless
@ -818,7 +820,7 @@ const searchcardid = () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-select
:disable="disbleStatus && status !== 'DONE'"
:disable="disbleStatus"
hide-bottom-space
:options="paymentOp"
class="col-xs-12 col-sm-6"
@ -836,7 +838,7 @@ const searchcardid = () => {
</div>
<div v-if="payment === 'จัดส่งทางไปรษณี'" class="col-12">
<q-input
:disable="disbleStatus && status !== 'DONE'"
:disable="disbleStatus"
:rules="[(val) => !!val || 'กรุณากรอกที่อยู่ที่จ่าย']"
label="ที่อยู่ที่จ่าย"
class="bg-white"