ปรับ UI

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-22 18:04:12 +07:00
parent 30d342728b
commit 0612820928
45 changed files with 93 additions and 76 deletions

View file

@ -16,7 +16,7 @@ const dataLabel = {
registrationAddress: "ที่อยู่ตามทะเบียนบ้าน",
registrationProvince: "จังหวัด",
registrationDistrict: "เขต/อำเภอ",
registrationSubDistrict: "แขวง / ตำบล",
registrationSubDistrict: "แขวง/ตำบล",
registrationZipCode: "รหัสไปรษณีย์",
};
@ -51,8 +51,8 @@ async function selectDistrict(e: string | null, name: string) {
}
/**
* งกนเลอก แขวง / ตำบล
* @param e แขวง / ตำบล เลอก
* งกนเลอก แขวง/ตำบล
* @param e แขวง/ตำบล เลอก
* @param name 1 อยตามทะเบยนบาน 2 อยจจ
*/
function selectSubDistrict(e: string | null, name: string) {
@ -162,7 +162,7 @@ watch(
v-model="formDataAddress.registrationSubDistrictId"
:options="storeLinkCenter.OpsAddress.subdistrictOps"
:label="dataLabel.registrationSubDistrict"
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง / ตำบล'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง/ตำบล'}`]"
@update:model-value="(value:string) => selectSubDistrict(value, '1')"
@filter="(inputValue:string,
doneFn:Function) => storeLinkCenter.filterSelector(inputValue, doneFn,'subdistrictOps'

View file

@ -63,6 +63,7 @@ const formInformations = reactive<RequestObject>({
firstName: "",
prefix: "",
rank: null,
prefixMain: "",
});
const formDataAddress = reactive<RequestregistrationAddressObject>({
@ -257,7 +258,7 @@ async function amiRequest() {
formInformations.nationality = data.value.nationalityDesc;
// dateOfBirth format 1989-01-01
formInformations.birthDate = conventDateOfBirth(`${data.value.dateOfBirth}`);
formInformations.birthDate = data.value.dateOfBirth ? conventDateOfBirth(`${data.value.dateOfBirth}`) : null;
age.value = storeLinkCenter.calculateAge(data.value.age);
formInformations.gender = data.value.genderDesc;
@ -327,15 +328,15 @@ async function convertDistrict(val: string) {
const id = storeLinkCenter.OpsAddress.districtOps.find(
(e: DataOption) => e.name === val
)?.id;
// /
// /
await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false);
return id ? id : null;
}
/**
* งกนแปลงชอแขวง / ตำบล เป ID
* @param val อแขวง / ตำบล
* งกนแปลงชอแขวง/ตำบล เป ID
* @param val อแขวง/ตำบล
*/
async function convertSubdistrict(val: string) {
const result = storeLinkCenter.OpsAddress.subdistrictOps.find(

View file

@ -66,7 +66,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",

View file

@ -47,7 +47,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "fullName",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullName",
headerStyle: "font-size: 14px; min-width: 200px",

View file

@ -215,6 +215,8 @@ async function getData() {
.get(config.API.profileNewGovernmentById(profileId.value, empType.value))
.then(async (res) => {
const data = await res.data.result;
console.log(data);
formMain.ocId = data.org ?? "-"; //
formMain.positionId = data.position ?? "-"; //
formMain.positionLine = data.positionField ?? "-"; //

View file

@ -39,7 +39,7 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const isLeave = defineModel<boolean>("isLeave", {
const isLeave = defineModel<boolean>("isLeave", {
required: true,
});
@ -230,7 +230,7 @@ function openDialogAdd() {
/**
* function fetch อมลรายการว
*/
function fetchData(id: string) {
async function fetchData(id: string) {
showLoader();
http
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
@ -398,7 +398,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
<q-btn-toggle

View file

@ -252,7 +252,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
/**
* งกนดงขอมลทอย
*
* งขอมลทอย อมลจงหว อม เขต / อำเภอ และขอม แขวง / ตำบล
* งขอมลทอย อมลจงหว อม เขต / อำเภอ และขอม แขวง/ตำบล
*/
async function getData() {
showLoader();
@ -337,8 +337,8 @@ async function selectDistrict(e: string | null, name: string) {
}
/**
* งกนเลอก แขวง / ตำบล
* @param e แขวง / ตำบล เลอก
* งกนเลอก แขวง/ตำบล
* @param e แขวง/ตำบล เลอก
* @param name 1 อยตามทะเบยนบาน 2 อยจจ
*/
function selectSubDistrict(e: string | null, name: string) {
@ -743,7 +743,7 @@ onMounted(async () => {
v-model="formData.registrationSubDistrictId"
:options="store.Ops.subdistrictOps"
:label="dataLabel.registrationSubDistrict"
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง / ตำบล'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง/ตำบล'}`]"
@update:model-value="(value:string) => selectSubDistrict(value, '1')"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'subdistrictOps'
@ -864,7 +864,7 @@ onMounted(async () => {
v-model="formData.currentSubDistrictId"
:options="store.Ops.subdistrictCOps"
:label="dataLabel.currentSubDistrict"
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง / ตำบล'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง/ตำบล'}`]"
@update:model-value="(value:string) => selectSubDistrict(value, '2')"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'subdistrictCOps'