fixing เมนูรับโอน

This commit is contained in:
Warunee Tamkoo 2024-05-15 14:30:41 +07:00
parent bc7fa07f1f
commit e8a7e17d50
8 changed files with 13 additions and 34 deletions

View file

@ -59,13 +59,6 @@ function fetchProfile(id: string) {
) )
.then(async (res) => { .then(async (res) => {
profile.avatar = res.data.downloadUrl; profile.avatar = res.data.downloadUrl;
})
.catch((e) => {
if (e.response.data.message === "ไม่พบไฟล์ในระบบ") {
profile.avatar = "";
} else {
messageError($q, e);
}
}); });
} }
} }

View file

@ -1,4 +1,3 @@
divdivdiv
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, computed } from "vue"; import { ref, watch, computed } from "vue";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";

View file

@ -1,4 +1,3 @@
divdivdiv
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref, reactive } from "vue"; import { onMounted, ref, reactive } from "vue";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";

View file

@ -37,7 +37,7 @@ const {
} = mixin; } = mixin;
const profileStore = useProfileDataStore(); const profileStore = useProfileDataStore();
const { changeRetireText, changeBirth } = profileStore; const { changeRetireText } = profileStore;
const prefixOps = ref<DataOption[]>([]); const prefixOps = ref<DataOption[]>([]);
const age = ref<string | null>(""); const age = ref<string | null>("");
@ -331,7 +331,7 @@ const onSubmit = async () => {
.post(config.API.receiveData(), formData) .post(config.API.receiveData(), formData)
.then(async (res) => { .then(async (res) => {
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
await changeBirth(informaData.value.birthDate ?? new Date()); // await changeBirth(informaData.value.birthDate ?? new Date());
await clickBack(); await clickBack();
}) })
.catch((e) => { .catch((e) => {

View file

@ -14,7 +14,14 @@ const { statusText } = transferStore;
const $q = useQuasar(); const $q = useQuasar();
const selected = ref<ResponseRow[]>([]); const selected = ref<ResponseRow[]>([]);
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { showLoader, success, messageError, dialogConfirm, hideLoader,date2Thai } = mixin; const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
date2Thai,
} = mixin;
// //
const visibleColumns2 = ref<string[]>([ const visibleColumns2 = ref<string[]>([
@ -134,7 +141,7 @@ const saveOrder = () => {
}; };
// //
const Ordersave = async () => { const Ordersave = async () => {
const id = selected.value.map((r: ResponseRow) => r.personalId); const id = selected.value.map((r: ResponseRow) => r.id);
const body = { const body = {
id, id,
}; };
@ -302,7 +309,6 @@ watchEffect(() => {
{{ col.value ? col.value : "-" }} {{ col.value ? col.value : "-" }}
</div> </div>
</q-td> </q-td>
</q-tr> </q-tr>
</template> </template>
</d-table> </d-table>

View file

@ -1,10 +1,9 @@
divdivdiv<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import { useProfileDataStore } from "@/modules/08_registryEmployee/store"; import { useProfileDataStore } from "@/modules/08_registryEmployee/store";
import CurrencyInput from "@/components/CurruncyInput.vue";
import type { QTableProps, QForm } from "quasar"; import type { QTableProps, QForm } from "quasar";
import type { import type {
ResponseTitle, ResponseTitle,
@ -407,21 +406,6 @@ const calRetire = async (birth: Date) => {
// } // }
}; };
const conditionSave = async () => {
if (myForm.value !== null) {
myForm.value.validate().then((success) => {
if (success) {
dialogConfirm(
$q,
async () => await saveData(),
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
);
}
});
}
};
function saveData() { function saveData() {
dialogConfirm( dialogConfirm(
$q, $q,

View file

@ -6,7 +6,7 @@ interface ResponseTitle {
} }
interface ResponseRow { interface ResponseRow {
personalId: string; id: string;
citizenId: string; citizenId: string;
fullname: string; fullname: string;
organizationName: string; organizationName: string;

View file

@ -32,8 +32,6 @@ const documentFile = ref<any>(null);
const fileList = ref<ArrayFileList[]>([]); const fileList = ref<ArrayFileList[]>([]);
async function getData() { async function getData() {
console.log(config.API.kpiFile);
showLoader(); showLoader();
await http await http
.get(config.API.kpiFile + `/KPI/ไฟล์เอกสาร/${id.value}`) .get(config.API.kpiFile + `/KPI/ไฟล์เอกสาร/${id.value}`)