ปรับ ui เครื่องราชฯ เหรียญจักรพรรดิมาลา (รอบการเสนอขอ)

This commit is contained in:
setthawutttty 2023-08-16 13:59:25 +07:00
parent 6f951f6b29
commit 94e6134e56
9 changed files with 254 additions and 202 deletions

View file

@ -166,7 +166,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "organization",
align: "left",
label: "หน่วยงานที่ขอโอนไป",
label: "หน่วยงานที่ขอย้ายไป",
sortable: true,
field: "organization",
headerStyle: "font-size: 14px",
@ -240,7 +240,7 @@ const columns2 = ref<QTableProps["columns"]>([
{
name: "organization",
align: "left",
label: "หน่วยงานที่ขอโอนไป",
label: "หน่วยงานที่ขอย้ายไป",
sortable: true,
field: "organization",
headerStyle: "font-size: 14px",

View file

@ -50,8 +50,8 @@ const organization = ref<string>("");
const reason = ref<string>("");
const status = ref<string>("");
const date = ref<Date | null>(null);
const salary = ref<string>("");
const salaryNew = ref<string>("");
const amount = ref<number>();
const amountOld = ref<number>();
const positionTypeOld = ref<string>("");
const positionLevelOld = ref<string>("");
const dateOfBirth = ref<Date>()
@ -131,7 +131,8 @@ const getData = async () => {
reason.value = data.reason;
status.value = data.status;
date.value = data.date;
salary.value = data.salary;
amount.value = data.amount;
amountOld.value = data.amountOld;
positionTypeOld.value = data.positionTypeOld;
positionLevelOld.value = data.positionLevelOld;
positionNumberOld.value = data.positionNumberOld;
@ -178,6 +179,10 @@ const conditionSave = async () => {
});
}
};
const cancelBtn = () => {
edit.value=!edit
getData()
}
const saveData = async () => {
const body = {
educationOld: educationOld.value,
@ -190,7 +195,8 @@ const saveData = async () => {
positionTypeOld: positionTypeOld.value,
positionLevelOld: positionLevelOld.value,
positionNumberOld: positionNumberOld.value,
amountOld: salary.value,
amount: amount.value,
amountOld: amountOld.value,
dateOfBirth:dateOfBirth.value ,
genderId:genderId.value ,
nationality:nationality.value ,
@ -348,7 +354,7 @@ onMounted(async () => {
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
@click="cancelBtn"
/>
</div>
</div>
@ -454,7 +460,7 @@ onMounted(async () => {
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="salary"
v-model="amountOld"
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
hide-bottom-space
:label="`${'เงินเดือน'}`"
@ -492,7 +498,7 @@ onMounted(async () => {
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="salaryNew"
v-model="amount"
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
hide-bottom-space
:label="`${'เงินเดือน'}`"