ปรับฟอร์มทุนระบบพัฒนา
This commit is contained in:
parent
6fb49dd324
commit
44fe23f289
5 changed files with 516 additions and 254 deletions
|
|
@ -1,7 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, computed,reactive } from "vue";
|
||||
import { ref, watch, computed, reactive } from "vue";
|
||||
import Header from "@/components/DialogHeader.vue";
|
||||
import type { DataOption,FormFilter,NewPagination } from "@/modules/15_development/interface/index/Main";
|
||||
import type {
|
||||
DataOption,
|
||||
FormFilter,
|
||||
NewPagination,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
|
|
@ -9,8 +13,7 @@ import { useQuasar, type QTableProps } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
||||
const rows = ref<any[]>([])
|
||||
const rows = ref<any[]>([]);
|
||||
const props = defineProps({
|
||||
upDate: { type: Function },
|
||||
});
|
||||
|
|
@ -138,27 +141,30 @@ function onSubmit() {
|
|||
if (selected.value?.length == 0) {
|
||||
dialogMessageNotify($q, `กรุณาเลือก 1 รายการ`);
|
||||
} else {
|
||||
|
||||
const data = selected.value[0];
|
||||
const body = {
|
||||
id:data.id,
|
||||
name:data.name,
|
||||
prefix:data.prefix,
|
||||
rank:data.rank,
|
||||
firstName:data.firstName,
|
||||
lastName:data.lastName,
|
||||
citizenId:data.citizenId,
|
||||
level:data.level,
|
||||
type:data.type,
|
||||
posLevelId:data.posLevelId,
|
||||
posTypeId:data.posTypeId,
|
||||
position:data.position,
|
||||
positionSide:data.positionSide,
|
||||
posNo:data.posNo,
|
||||
};
|
||||
props.upDate?.(body)
|
||||
closeDialog();
|
||||
|
||||
const data = selected.value[0];
|
||||
const body = {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
prefix: data.prefix,
|
||||
rank: data.rank,
|
||||
firstName: data.firstName,
|
||||
lastName: data.lastName,
|
||||
citizenId: data.citizenId,
|
||||
level: data.level,
|
||||
type: data.type,
|
||||
posLevelId: data.posLevelId,
|
||||
posTypeId: data.posTypeId,
|
||||
position: data.position,
|
||||
positionSide: data.positionSide,
|
||||
posNo: data.posNo,
|
||||
org: data.org,
|
||||
rootId: data.rootId,
|
||||
root: data.root,
|
||||
orgRootShortName: data.orgRootShortName,
|
||||
orgRevisionId: data.orgRevisionId,
|
||||
};
|
||||
props.upDate?.(body);
|
||||
closeDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +173,7 @@ function closeDialog() {
|
|||
modal.value = false;
|
||||
rows.value = [];
|
||||
selected.value = [];
|
||||
inputSearch.value = ''
|
||||
inputSearch.value = "";
|
||||
}
|
||||
|
||||
/** class */
|
||||
|
|
@ -186,20 +192,27 @@ function searchFilter() {
|
|||
const data = res.data.result.data;
|
||||
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
|
||||
rows.value = data.map((item: any) => ({
|
||||
id:item.id ? item.id : null,
|
||||
name: item.firstName ? `${item.prefix}${item.firstName} ${item.lastName}` : null,
|
||||
prefix:item.prefix ? item.prefix : null,
|
||||
rank:item.rank ? item.rank : null,
|
||||
firstName:item.firstName ? item.firstName : null,
|
||||
lastName:item.lastName ? item.lastName : null,
|
||||
citizenId:item.citizenId ? item.citizenId : null,
|
||||
level:item.posLevel ? item.posLevel : null,
|
||||
type:item.posType ? item.posType : null,
|
||||
posLevelId:item.posLevelId ? item.posLevelId : null,
|
||||
posTypeId:item.posTypeId ? item.posTypeId : null,
|
||||
position:item.position ? item.position : null,
|
||||
positionSide:item.posExecutive ? item.posExecutive : null,
|
||||
posNo:item.posNo ? item.posNo : null,
|
||||
id: item.id ? item.id : null,
|
||||
name: item.firstName
|
||||
? `${item.prefix}${item.firstName} ${item.lastName}`
|
||||
: null,
|
||||
prefix: item.prefix ? item.prefix : null,
|
||||
rank: item.rank ? item.rank : null,
|
||||
firstName: item.firstName ? item.firstName : null,
|
||||
lastName: item.lastName ? item.lastName : null,
|
||||
citizenId: item.citizenId ? item.citizenId : null,
|
||||
level: item.posLevel ? item.posLevel : null,
|
||||
type: item.posType ? item.posType : null,
|
||||
posLevelId: item.posLevelId ? item.posLevelId : null,
|
||||
posTypeId: item.posTypeId ? item.posTypeId : null,
|
||||
position: item.position ? item.position : null,
|
||||
positionSide: item.posExecutive ? item.posExecutive : null,
|
||||
posNo: item.posNo ? item.posNo : null,
|
||||
org: item.org ? item.org : null,
|
||||
rootId: item.rootId ? item.rootId : null,
|
||||
root: item.root ? item.root : null,
|
||||
orgRootShortName: item.orgRootShortName ? item.orgRootShortName : null,
|
||||
orgRevisionId: item.orgRevisionId ? item.orgRevisionId : null,
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -210,7 +223,7 @@ function searchFilter() {
|
|||
});
|
||||
}
|
||||
|
||||
function updatePage(val:number){
|
||||
function updatePage(val: number) {
|
||||
formFilter.page = val;
|
||||
searchFilter();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue