ปรับ Code เคื่องราช
This commit is contained in:
parent
51d072ccc0
commit
240862be2c
13 changed files with 548 additions and 885 deletions
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from "vue";
|
||||
// import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -13,7 +12,6 @@ import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
|||
import type { QTableProps, QInput } from "quasar";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
// const router = useRouter();
|
||||
const DataStore = useResultDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -59,24 +57,22 @@ const fecthInsignia = async () => {
|
|||
await http
|
||||
.get(config.API.insignia)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
let data = res.data.result;
|
||||
DataStore.fetchDatainsignia(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
const fecthInsigniaType = async () => {
|
||||
await http(config.API.insigniaType)
|
||||
.then((res) => {
|
||||
// console.log(res);
|
||||
let data = res.data.result;
|
||||
DataStore.fetchDatainsigniaType(data);
|
||||
tab.value = DataStore.insigniaType[0].name;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
const visibleColumns = ref<String[]>([
|
||||
|
|
@ -271,7 +267,6 @@ const uploadFile = async (event: any, action: string) => {
|
|||
success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
|
|
@ -288,43 +283,6 @@ const uploadFile = async (event: any, action: string) => {
|
|||
"ยืนยันการบันทึกรายการข้อมูล",
|
||||
"ต้องการยืนยันรายการข้อมูลนี้หรื้อไม่ ?";
|
||||
}
|
||||
// console.log(selectRound.value);
|
||||
|
||||
// let id = selectRound.value.toString();
|
||||
// if (action === "result") {
|
||||
// const formdata = new FormData();
|
||||
// formdata.append("file", event);
|
||||
// await http
|
||||
// .put(config.API.uploadfilereceice(id), formdata)
|
||||
// .then(() => {
|
||||
// success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// messageError($q, err);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// await fecthlistInsignia();
|
||||
// fileResult.value = null;
|
||||
// });
|
||||
// } else if (action === "invoice") {
|
||||
// const formdata = new FormData();
|
||||
// formdata.append("file", event);
|
||||
// await http
|
||||
// .put(config.API.uploadfileinvoice(id), formdata)
|
||||
// .then(() => {
|
||||
// success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// messageError($q, err);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// await fecthlistInsignia();
|
||||
// fileinvoice.value = null;
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
||||
const filterRef = ref<QInput>();
|
||||
|
|
@ -482,7 +440,6 @@ const resetFilter = () => {
|
|||
icon="mdi-upload"
|
||||
@click="perviewfile(fileResult, 'receice')"
|
||||
>
|
||||
<!-- @click="uploadFile(fileResult, 'result')" -->
|
||||
<q-tooltip
|
||||
>อัพโหลดไฟล์บันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์</q-tooltip
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue