forked from adempiere/adempiere-vue
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/update with experimental 3.1.3 (adempiere#1508)
* feat: Accouting Dimentarions (adempiere#1474) * feat: Accouting viewer as form. * add accouting dimentions. * add action footer. * add filter accouting columns. * fix table column width * implement on window. * feat: POS Support Document Type (adempiere#1487) * Support Document Type * change `dialogo` to `dialog` word. --------- Co-authored-by: Edwin Betancourt <EdwinBetanc0urt@outlook.com> * feat: Add `Accouting Viewer` on menu validate by role. (adempiere#1488) * feat: Add `Accouting Viewer` on menu. * remove unused const. * Fix: POS Error Creating Sales Order With Document Type (adempiere#1496) * Fix: POS Disable Total Payment Field (adempiere#1497) * feat: Tab web browser favicon and title. (adempiere#1502) * feat: Calendar View static. (adempiere#1503) * feat: Run process with `Smart Browser ID`. (adempiere#1505) * Feat: Todo List dashboard (adempiere#1506) * Todo LIst * Add translations * Update index.vue --------- Co-authored-by: Edwin Betancourt <EdwinBetanc0urt@outlook.com> * Fix: Sytle Height Footer (adempiere#1507) * Fix: Sytle Height Footer * minimal changes * minimal changes --------- Co-authored-by: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com>
- Loading branch information
1 parent
9b4fd94
commit 3750d5e
Showing
59 changed files
with
2,674 additions
and
1,176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 176 additions & 0 deletions
176
src/components/ADempiere/Form/AcctViewer/ActionsFooter/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<!-- | ||
ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution | ||
Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com | ||
Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com https://github.com/EdwinBetanc0urt | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https:www.gnu.org/licenses/>. | ||
--> | ||
|
||
<template> | ||
<div style="margin-top: 10px;"> | ||
<el-button | ||
:loading="isLoadingDataTable" | ||
type="success" | ||
class="button-base-icon" | ||
icon="el-icon-refresh-right" | ||
style="margin-top: 10px;float: right;" | ||
@click="refreshAccount" | ||
/> | ||
|
||
<el-button | ||
plain | ||
type="primary" | ||
class="button-base-icon" | ||
icon="el-icon-download" | ||
style="margin-top: 10px;margin-right: 10px;float: right;" | ||
@click="exportAccounting" | ||
/> | ||
|
||
<el-button | ||
type="primary" | ||
plain | ||
style="margin-right: 10px; !important" | ||
:loading="isLoadingRePost" | ||
:disabled="isLoadingRePost" | ||
@click="rePost" | ||
> | ||
{{ $t('form.accountingViewer.rePosAccounting') }} | ||
</el-button> | ||
|
||
<el-checkbox | ||
v-model="force" | ||
> | ||
{{ $t('form.accountingViewer.force') }} | ||
</el-checkbox> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent, ref } from '@vue/composition-api' | ||
import store from '@/store' | ||
import { | ||
requestStartRePost | ||
} from '@/api/ADempiere/form/accouting.js' | ||
// Utils and Helper Methods | ||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js' | ||
import { showMessage } from '@/utils/ADempiere/notification' | ||
// import { parseTime } from '@/utils' | ||
// import { exportFileFromJson } from '@/utils/ADempiere/exportUtil.js' | ||
export default defineComponent({ | ||
name: 'ActionsFooter', | ||
props: { | ||
tableName: { | ||
type: String, | ||
default: () => '' | ||
}, | ||
recordId: { | ||
type: Number, | ||
default: () => 0 | ||
}, | ||
recordUuid: { | ||
type: String, | ||
default: () => '' | ||
} | ||
}, | ||
setup(props) { | ||
const isLoadingDataTable = ref(false) | ||
const isLoadingRePost = ref(false) | ||
const force = ref(false) | ||
// const accountingShemaId = computed(() => { | ||
// return store.getters.getCurrentStoredAccoutingSchemaId | ||
// }) | ||
// const accountingShemasList = computed(() => { | ||
// return store.getters.getStoredAccoutingShemasList | ||
// }) | ||
// function formatJson(filterVal, jsonData) { | ||
// return jsonData.map(v => filterVal.map(j => { | ||
// if (j === 'timestamp') { | ||
// return parseTime(v[j]) | ||
// } else { | ||
// return v[j] | ||
// } | ||
// })) | ||
// } | ||
function exportAccounting() { | ||
// const fileName = accountingShemasList.value.find(acctSchema => { | ||
// return acctSchema.KeyColumn === accountingShemaId.value | ||
// }).DisplayColumn | ||
// exportFileFromJson({ | ||
// header: headerAccounting.value.map(a => a.label), | ||
// data: formatJson( | ||
// headerAccounting.value.map(a => a.columnName), | ||
// tableData.value | ||
// ), | ||
// fileName, | ||
// bookType: 'xlsx' | ||
// }) | ||
} | ||
function refreshAccount() { | ||
store.dispatch('getAccoutingFactsFromServer', { | ||
searchValue: '', | ||
tableName: props.tableName, | ||
recordUuid: props.recordUuid, | ||
recordId: props.recordId | ||
}) | ||
} | ||
function rePost() { | ||
isLoadingRePost.value = true | ||
requestStartRePost({ | ||
tableName: props.tableName, | ||
recordId: props.recordId, | ||
recordUuid: props.recordUuid, | ||
isForce: force.value | ||
}) | ||
.then(response => { | ||
if (!isEmptyValue(response.errorMsg)) { | ||
showMessage({ | ||
message: response.errorMsg, | ||
type: 'error' | ||
}) | ||
} | ||
}) | ||
.catch(error => { | ||
console.warn(`LookupFactory: Get Start Re-Post Facts From Server (State) - Error ${error.code}: ${error.message}.`) | ||
}) | ||
.finally(() => { | ||
isLoadingRePost.value = false | ||
store.dispatch('getAccoutingFactsFromServer', { | ||
searchValue: '' | ||
}) | ||
}) | ||
} | ||
return { | ||
isLoadingDataTable, | ||
isLoadingRePost, | ||
force, | ||
exportAccounting, | ||
refreshAccount, | ||
rePost | ||
} | ||
} | ||
}) | ||
</script> |
Oops, something went wrong.