fix
This commit is contained in:
parent
bf175c7750
commit
8a5a9f3e20
4 changed files with 168 additions and 183 deletions
|
|
@ -134,7 +134,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posTypeName",
|
||||
align: "left",
|
||||
label: "ประเภทตำเเหน่ง",
|
||||
label: "ตำแหน่งประเภท",
|
||||
sortable: true,
|
||||
field: "posTypeName",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
|
|
@ -7,28 +7,20 @@ import config from "@/app.config";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataSortPos } from "@/modules/02_organization/interface/index/organizational";
|
||||
|
||||
/**
|
||||
* importComponents
|
||||
*/
|
||||
/** importComponents*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const store = useOrganizational();
|
||||
const { dialogConfirm, showLoader, success, hideLoader, messageError } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
/** props*/
|
||||
const modal = defineModel<boolean>("sortPosition", { required: true });
|
||||
const props = defineProps({
|
||||
fetchDataTable: Function,
|
||||
|
|
@ -56,9 +48,7 @@ function onDrop(from: number, to: number) {
|
|||
rows.value.splice(to, 0, rows.value.splice(from, 1)[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* function บันทึกการจัดลำดับ
|
||||
*/
|
||||
/** function บันทึกการจัดลำดับ*/
|
||||
function save() {
|
||||
dialogConfirm($q, () => {
|
||||
const data = rows.value;
|
||||
|
|
@ -84,9 +74,7 @@ function save() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรียกรายการข้อมูลตำแหน่ง
|
||||
*/
|
||||
/** function เรียกรายการข้อมูลตำแหน่ง*/
|
||||
function getData() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -103,7 +91,7 @@ function getData() {
|
|||
const dataList = res.data.result.data;
|
||||
const dataMap = dataList.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: `${item.orgShortname}${
|
||||
name: `${item.orgShortname} ${
|
||||
item.posMasterNoPrefix ? item.posMasterNoPrefix : ""
|
||||
}${item.posMasterNo ? item.posMasterNo : ""}${
|
||||
item.posMasterNoSuffix ? item.posMasterNoSuffix : ""
|
||||
|
|
@ -123,9 +111,7 @@ function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* callback function ทำงานเมื่อ modal = true ทำการเรียกข้อมูลตำแหน่ง
|
||||
*/
|
||||
/** callback function ทำงานเมื่อ modal = true ทำการเรียกข้อมูลตำแหน่ง*/
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
|
|
@ -135,6 +121,7 @@ watch(
|
|||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue