Merge branch 'nice_dev' into develop
This commit is contained in:
commit
7a0376e080
9 changed files with 131 additions and 47 deletions
|
|
@ -638,12 +638,31 @@ const fetchData = async () => {
|
|||
const data: ResponseObject = res.data.result;
|
||||
addressData.value.address = data.registrationAddress;
|
||||
addressData.value.addressC = data.currentAddress;
|
||||
addressData.value.districtId = data.registrationDistrictId;
|
||||
addressData.value.districtIdC = data.currentDistrictId;
|
||||
addressData.value.provinceId = data.registrationProvinceId;
|
||||
addressData.value.provinceIdC = data.currentProvinceId;
|
||||
addressData.value.subdistrictId = data.registrationSubDistrictId;
|
||||
addressData.value.subdistrictIdC = data.currentSubDistrictId;
|
||||
addressData.value.districtId =
|
||||
data.registrationDistrictId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.registrationDistrictId
|
||||
: "";
|
||||
addressData.value.districtIdC =
|
||||
data.currentDistrictId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.currentDistrictId
|
||||
: "";
|
||||
addressData.value.provinceId =
|
||||
data.registrationProvinceId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.registrationProvinceId
|
||||
: "";
|
||||
addressData.value.provinceIdC =
|
||||
data.currentProvinceId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.currentProvinceId
|
||||
: "";
|
||||
addressData.value.subdistrictId =
|
||||
data.registrationSubDistrictId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? data.registrationSubDistrictId
|
||||
: "";
|
||||
addressData.value.subdistrictIdC =
|
||||
data.currentSubDistrictId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.currentSubDistrictId
|
||||
: "";
|
||||
addressData.value.same = data.registrationSame ? "1" : "0";
|
||||
addressData.value.codec = data.currentZipCode;
|
||||
addressData.value.codep = data.registrationZipCode;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@
|
|||
icon="mdi-history"
|
||||
@click="clickHistory(props.row)"
|
||||
>
|
||||
<q-tooltip>ประวัติแก้ไขใบอนุญาตประกอบอาชีพ</q-tooltip>
|
||||
</q-btn>
|
||||
<q-tooltip>ประวัติแก้ไขใบอนุญาตประกอบอาชีพ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
|
@ -294,7 +294,8 @@ const store = useProfileDataStore();
|
|||
const { profileData, changeProfileColumns } = store;
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } = mixin;
|
||||
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const certificateNo = ref<string>();
|
||||
|
|
|
|||
|
|
@ -1345,7 +1345,10 @@ const fetchData = async () => {
|
|||
.then((res) => {
|
||||
const data: ResponseObject = res.data.result;
|
||||
familyData.value.prefixC = "";
|
||||
familyData.value.prefixIdC = data.couplePrefixId;
|
||||
familyData.value.prefixIdC =
|
||||
data.couplePrefixId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.couplePrefixId
|
||||
: "";
|
||||
familyData.value.firstnameC = data.coupleFirstName;
|
||||
familyData.value.lastnameC = data.coupleLastName;
|
||||
familyData.value.lastnameCOld = data.coupleLastNameOld;
|
||||
|
|
@ -1359,10 +1362,15 @@ const fetchData = async () => {
|
|||
familyData.value.lastnameM = data.fatherLastName;
|
||||
familyData.value.occupationM = data.fatherCareer;
|
||||
familyData.value.liveM = data.fatherLive ? "1" : "0";
|
||||
familyData.value.citizenIdM = data.fatherCitizenId;
|
||||
|
||||
familyData.value.citizenIdM =
|
||||
data.fatherCitizenId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.fatherCitizenId
|
||||
: "";
|
||||
familyData.value.prefixF = "";
|
||||
familyData.value.prefixIdF = data.motherPrefixId;
|
||||
familyData.value.prefixIdF =
|
||||
data.motherPrefixId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.motherPrefixId
|
||||
: "";
|
||||
familyData.value.firstnameF = data.motherFirstName;
|
||||
familyData.value.lastnameF = data.motherLastName;
|
||||
familyData.value.occupationF = data.motherCareer;
|
||||
|
|
|
|||
|
|
@ -1017,16 +1017,31 @@ const fetchData = async () => {
|
|||
defaultCitizenData.value = data.citizenId;
|
||||
informaData.value.cardid = data.citizenId;
|
||||
informaData.value.prefix = "";
|
||||
informaData.value.prefixId = data.prefixId;
|
||||
informaData.value.prefixId =
|
||||
data.prefixId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.prefixId
|
||||
: "";
|
||||
informaData.value.firstname = data.firstName;
|
||||
informaData.value.lastname = data.lastName;
|
||||
informaData.value.birthDate = new Date(data.birthDate);
|
||||
informaData.value.genderId = data.genderId;
|
||||
informaData.value.bloodId = data.bloodGroupId;
|
||||
informaData.value.genderId =
|
||||
data.genderId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.genderId
|
||||
: "";
|
||||
informaData.value.bloodId =
|
||||
data.bloodGroupId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.bloodGroupId
|
||||
: "";
|
||||
informaData.value.nationality = data.nationality;
|
||||
informaData.value.ethnicity = data.race;
|
||||
informaData.value.statusId = data.relationshipId;
|
||||
informaData.value.religionId = data.religionId;
|
||||
informaData.value.statusId =
|
||||
data.relationshipId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.relationshipId
|
||||
: "";
|
||||
informaData.value.religionId =
|
||||
data.religionId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.religionId
|
||||
: "";
|
||||
informaData.value.tel = data.telephoneNumber;
|
||||
informaData.value.age = data.age;
|
||||
informaData.value.employeeType = data.employeeType;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@ const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
|
|||
const edit = ref<boolean>(false);
|
||||
const addressData = ref<AddressType>(props.data);
|
||||
const myform = ref<any>();
|
||||
const codep = ref<string>("");
|
||||
const codec = ref<string>("");
|
||||
const Ops = ref<AddressOps>({
|
||||
provinceOps: [],
|
||||
districtOps: [],
|
||||
|
|
@ -132,7 +130,7 @@ const editData = async () => {
|
|||
registrationSubDistrictId: addressData.value.registSubDistrictId,
|
||||
registrationDistrictId: addressData.value.registDistrictId,
|
||||
registrationProvinceId: addressData.value.registProvinceId,
|
||||
registrationZipCode: codep.value,
|
||||
registrationZipCode: addressData.value.registZipCode,
|
||||
currentAddress:
|
||||
addressData.value.registSame == "1"
|
||||
? addressData.value.registAddress
|
||||
|
|
@ -143,14 +141,16 @@ const editData = async () => {
|
|||
: addressData.value.currentSubDistrictId,
|
||||
currentDistrictId:
|
||||
addressData.value.registSame == "1"
|
||||
? addressData.value.registDistrict
|
||||
? addressData.value.registDistrictId
|
||||
: addressData.value.currentDistrictId,
|
||||
currentProvinceId:
|
||||
addressData.value.registSame == "1"
|
||||
? addressData.value.registProvinceId
|
||||
: addressData.value.currentProvinceId,
|
||||
currentZipCode:
|
||||
addressData.value.registSame == "1" ? codep.value : codec.value,
|
||||
addressData.value.registSame == "1"
|
||||
? addressData.value.registZipCode
|
||||
: addressData.value.currentZipCode,
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -184,11 +184,11 @@ const selectProvince = async (e: string | null, name: string) => {
|
|||
if (name == "1") {
|
||||
addressData.value.registDistrictId = "";
|
||||
addressData.value.registSubDistrictId = "";
|
||||
codep.value = "";
|
||||
addressData.value.registZipCode = "";
|
||||
} else {
|
||||
addressData.value.currentDistrictId = "";
|
||||
addressData.value.currentSubDistrictId = "";
|
||||
codec.value = "";
|
||||
addressData.value.currentZipCode = "";
|
||||
}
|
||||
myform.value.resetValidation();
|
||||
await fetchDistrict(e, name);
|
||||
|
|
@ -199,10 +199,10 @@ const selectDistrict = async (e: string | null, name: string) => {
|
|||
if (e != null) {
|
||||
if (name == "1") {
|
||||
addressData.value.registSubDistrictId = "";
|
||||
codep.value = "";
|
||||
addressData.value.registZipCode = "";
|
||||
} else {
|
||||
addressData.value.currentSubDistrictId = "";
|
||||
codec.value = "";
|
||||
addressData.value.currentZipCode = "";
|
||||
}
|
||||
myform.value.resetValidation();
|
||||
await fetchSubDistrict(e, name);
|
||||
|
|
@ -214,11 +214,11 @@ const selectSubDistrict = (e: string | null, name: string) => {
|
|||
if (name == "1") {
|
||||
const findcode = Ops.value.subdistrictOps.filter((r) => r.id == e);
|
||||
const namecode = findcode.length > 0 ? findcode[0].zipCode : "";
|
||||
codep.value = namecode;
|
||||
addressData.value.registZipCode = namecode;
|
||||
} else {
|
||||
const findcode = Ops.value.subdistrictCOps.filter((r) => r.id == e);
|
||||
const namecode = findcode.length > 0 ? findcode[0].zipCode : "";
|
||||
codec.value = namecode;
|
||||
addressData.value.currentZipCode = namecode;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -440,7 +440,7 @@ const getClass = (val: boolean) => {
|
|||
lazy-rules
|
||||
readonly
|
||||
borderless
|
||||
v-model="codep"
|
||||
v-model="addressData.registZipCode"
|
||||
:style="!edit ? '' : 'padding:0 12px;'"
|
||||
:label="`${'รหัสไปรษณีย์'}`"
|
||||
/>
|
||||
|
|
@ -584,7 +584,7 @@ const getClass = (val: boolean) => {
|
|||
lazy-rules
|
||||
readonly
|
||||
borderless
|
||||
v-model="codec"
|
||||
v-model="addressData.currentZipCode"
|
||||
:style="!edit ? '' : 'padding:0 12px;'"
|
||||
:label="`${'รหัสไปรษณีย์'}`"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -643,24 +643,44 @@ const fetchData = async () => {
|
|||
.get(config.API.profileAdrsId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
const data: ResponseObject = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
addressData.value.address = data.registrationAddress;
|
||||
addressData.value.addressC = data.currentAddress;
|
||||
addressData.value.districtId = data.registrationDistrictId;
|
||||
addressData.value.districtIdC = data.currentDistrictId;
|
||||
addressData.value.provinceId = data.registrationProvinceId;
|
||||
addressData.value.provinceIdC = data.currentProvinceId;
|
||||
addressData.value.subdistrictId = data.registrationSubDistrictId;
|
||||
addressData.value.subdistrictIdC = data.currentSubDistrictId;
|
||||
addressData.value.districtId =
|
||||
data.registrationDistrictId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.registrationDistrictId
|
||||
: "";
|
||||
addressData.value.districtIdC =
|
||||
data.currentDistrictId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.currentDistrictId
|
||||
: "";
|
||||
addressData.value.provinceId =
|
||||
data.registrationProvinceId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.registrationProvinceId
|
||||
: "";
|
||||
addressData.value.provinceIdC =
|
||||
data.currentProvinceId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.currentProvinceId
|
||||
: "";
|
||||
addressData.value.subdistrictId =
|
||||
data.registrationSubDistrictId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? data.registrationSubDistrictId
|
||||
: "";
|
||||
addressData.value.subdistrictIdC =
|
||||
data.currentSubDistrictId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.currentSubDistrictId
|
||||
: "";
|
||||
addressData.value.same = data.registrationSame ? "1" : "0";
|
||||
addressData.value.codec = data.currentZipCode;
|
||||
addressData.value.codep = data.registrationZipCode;
|
||||
console.log(res);
|
||||
})
|
||||
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1022,12 +1022,21 @@ const fetchData = async () => {
|
|||
informaData.value.firstname = data.firstName;
|
||||
informaData.value.lastname = data.lastName;
|
||||
informaData.value.birthDate = new Date(data.birthDate);
|
||||
informaData.value.genderId = data.genderId;
|
||||
informaData.value.genderId =
|
||||
data.genderId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.genderId
|
||||
: "";
|
||||
informaData.value.bloodId = data.bloodGroupId;
|
||||
informaData.value.nationality = data.nationality;
|
||||
informaData.value.ethnicity = data.race;
|
||||
informaData.value.statusId = data.relationshipId;
|
||||
informaData.value.religionId = data.religionId;
|
||||
informaData.value.statusId =
|
||||
data.relationshipId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.relationshipId
|
||||
: "";
|
||||
informaData.value.religionId =
|
||||
data.religionId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.religionId
|
||||
: "";
|
||||
informaData.value.tel = data.telephoneNumber;
|
||||
informaData.value.age = data.age;
|
||||
informaData.value.employeeType = data.employeeType;
|
||||
|
|
|
|||
|
|
@ -486,6 +486,8 @@ const fetchData = async () => {
|
|||
// console.log(res);
|
||||
// });
|
||||
const data: any = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
informaTempData.value.employeeMoneyIncrease =
|
||||
data.employeeMoneyIncrease;
|
||||
informaTempData.value.employeeMoneyAllowance =
|
||||
|
|
@ -495,11 +497,19 @@ const fetchData = async () => {
|
|||
informaTempData.value.employeeMoneyEmployer =
|
||||
data.employeeMoneyEmployer;
|
||||
informaTempData.value.positionEmployeeGroupId =
|
||||
data.positionEmployeeGroupId;
|
||||
data.positionEmployeeGroupId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? data.positionEmployeeGroupId
|
||||
: "";
|
||||
informaTempData.value.positionEmployeePositionId =
|
||||
data.positionEmployeePositionId;
|
||||
data.positionEmployeePositionId !==
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
? data.positionEmployeePositionId
|
||||
: "";
|
||||
informaTempData.value.positionEmployeeLineId =
|
||||
data.positionEmployeeLineId;
|
||||
data.positionEmployeeLineId !== "00000000-0000-0000-0000-000000000000"
|
||||
? data.positionEmployeeLineId
|
||||
: "";
|
||||
informaTempData.value.employeeTypeIndividual =
|
||||
data.employeeTypeIndividual;
|
||||
informaTempData.value.employeeOc = data.employeeOc;
|
||||
|
|
|
|||
|
|
@ -1498,7 +1498,6 @@ const fetchData = async () => {
|
|||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObjectEmployee) => {
|
||||
rows.value.push({
|
||||
|
|
@ -1510,7 +1509,10 @@ const fetchData = async () => {
|
|||
oc: e.oc,
|
||||
ocId: e.ocId,
|
||||
posNo: e.posNo,
|
||||
posNoId: e.posNoId,
|
||||
posNoId:
|
||||
e.posNoId !== "00000000-0000-0000-0000-000000000000"
|
||||
? e.posNoId
|
||||
: "",
|
||||
posNoEmployee: e.posNoEmployee,
|
||||
positionEmployeeGroup: e.positionEmployeeGroup,
|
||||
positionEmployeeGroupId: e.positionEmployeeGroupId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue