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