Merge branch 'nice_dev' into develop
This commit is contained in:
commit
99d834050f
4 changed files with 14 additions and 13 deletions
|
|
@ -285,8 +285,6 @@ function onClickDetail(id: string, level: number) {
|
||||||
* @param node ข้อมูล โครงสร้าง
|
* @param node ข้อมูล โครงสร้าง
|
||||||
*/
|
*/
|
||||||
async function onClickEdit(node: OrgTree) {
|
async function onClickEdit(node: OrgTree) {
|
||||||
console.log(node);
|
|
||||||
|
|
||||||
dialogAgency.value = !dialogAgency.value;
|
dialogAgency.value = !dialogAgency.value;
|
||||||
actionType.value = "EDIT";
|
actionType.value = "EDIT";
|
||||||
orgLevel.value = node.orgLevel;
|
orgLevel.value = node.orgLevel;
|
||||||
|
|
|
||||||
|
|
@ -433,6 +433,11 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pagination = ref({
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -537,14 +542,14 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="posMaster"
|
:rows="posMaster"
|
||||||
|
:paging="true"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
:paging="true"
|
|
||||||
dense
|
dense
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
@update:pagination="updatePagination"
|
@update:pagination="updatePagination"
|
||||||
class="tableTb"
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -773,6 +778,7 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
color="dark"
|
color="dark"
|
||||||
:max="totalPage"
|
:max="totalPage"
|
||||||
|
:max-pages="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
boundary-links
|
boundary-links
|
||||||
direction-links
|
direction-links
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,6 @@ async function fetchDataTree(id: string) {
|
||||||
*/
|
*/
|
||||||
async function fetchDataTable(id: string, level: number, action: boolean) {
|
async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
searchAndReplaceOrgName(nodeTree.value, id);
|
searchAndReplaceOrgName(nodeTree.value, id);
|
||||||
|
|
||||||
orgLevel.value = level;
|
orgLevel.value = level;
|
||||||
reqMaster.id = id;
|
reqMaster.id = id;
|
||||||
reqMaster.type = level;
|
reqMaster.type = level;
|
||||||
|
|
@ -103,14 +102,12 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
: store.typeOrganizational == "current"
|
: store.typeOrganizational == "current"
|
||||||
? store.activeId
|
? store.activeId
|
||||||
: store.historyId;
|
: store.historyId;
|
||||||
}
|
|
||||||
|
|
||||||
if (action === true) {
|
|
||||||
isLoad.value = true;
|
isLoad.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgPosMasterList, reqMaster)
|
.post(config.API.orgPosMasterList, reqMaster)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
posMaster.value = [];
|
posMaster.value = [];
|
||||||
const dataMain: PosMaster[] = [];
|
const dataMain: PosMaster[] = [];
|
||||||
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
||||||
|
|
@ -123,7 +120,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
dataMain.push(test);
|
dataMain.push(test);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
posMaster.value = store.fetchPosMaster(dataMain);
|
posMaster.value = await store.fetchPosMaster(dataMain);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -132,7 +129,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
isLoad.value = false;
|
isLoad.value = false;
|
||||||
}, 500);
|
}, 1000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
}
|
}
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgPosMasterListEmp, reqMaster)
|
.post(config.API.orgPosMasterListEmp, reqMaster)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
posMaster.value = [];
|
posMaster.value = [];
|
||||||
const dataMain: PosMaster[] = [];
|
const dataMain: PosMaster[] = [];
|
||||||
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
||||||
|
|
@ -114,7 +114,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
dataMain.push(test);
|
dataMain.push(test);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
posMaster.value = store.fetchPosMaster(dataMain);
|
posMaster.value = await store.fetchPosMaster(dataMain);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue