mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
Support for zelle payment types in the return of funds (#1097)
Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
parent
1a3eb8af17
commit
4d8aef3511
@ -200,6 +200,9 @@ export default {
|
|||||||
case 'A':
|
case 'A':
|
||||||
typePay = () => import('./paymentTypeChange/ACH/index.vue')
|
typePay = () => import('./paymentTypeChange/ACH/index.vue')
|
||||||
break
|
break
|
||||||
|
case 'Z':
|
||||||
|
typePay = () => import('./paymentTypeChange/zelle/index.vue')
|
||||||
|
break
|
||||||
}
|
}
|
||||||
return typePay
|
return typePay
|
||||||
},
|
},
|
||||||
|
@ -0,0 +1,64 @@
|
|||||||
|
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||||
|
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||||
|
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||||
|
// 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/>.
|
||||||
|
|
||||||
|
const tableName = 'C_Payment'
|
||||||
|
|
||||||
|
export default [
|
||||||
|
// Name
|
||||||
|
{
|
||||||
|
elementColumnName: 'Name',
|
||||||
|
columnName: 'Name',
|
||||||
|
tableName: 'C_BPartner',
|
||||||
|
tabindex: '1',
|
||||||
|
isFromDictionary: true,
|
||||||
|
overwriteDefinition: {
|
||||||
|
sequence: 0,
|
||||||
|
isCustomField: true,
|
||||||
|
size: 24,
|
||||||
|
isMandatory: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elementColumnName: 'EMail',
|
||||||
|
columnName: 'EMail',
|
||||||
|
tableName: 'AD_user',
|
||||||
|
isFromDictionary: true,
|
||||||
|
overwriteDefinition: {
|
||||||
|
sequence: 9,
|
||||||
|
handleActionKeyPerformed: true,
|
||||||
|
handleContentSelection: true,
|
||||||
|
handleActionPerformed: true,
|
||||||
|
size: 24,
|
||||||
|
isActiveLogics: true,
|
||||||
|
isMandatory: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tableName,
|
||||||
|
elementColumnName: 'PayAmt',
|
||||||
|
columnName: 'PayAmt',
|
||||||
|
isFromDictionary: true,
|
||||||
|
overwriteDefinition: {
|
||||||
|
sequence: 0,
|
||||||
|
handleContentSelection: true,
|
||||||
|
handleActionPerformed: true,
|
||||||
|
size: 24,
|
||||||
|
isNumericField: true,
|
||||||
|
isActiveLogics: true,
|
||||||
|
isMandatory: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,232 @@
|
|||||||
|
<!--
|
||||||
|
ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||||
|
Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||||
|
Contributor(s): Elsio Sanchez elsiosanches@gmail.com www.erpya.com
|
||||||
|
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>
|
||||||
|
<el-form
|
||||||
|
label-position="top"
|
||||||
|
label-width="10px"
|
||||||
|
>
|
||||||
|
<el-row :gutter="12">
|
||||||
|
<el-col
|
||||||
|
v-for="field in fieldsList"
|
||||||
|
:key="field.sequence"
|
||||||
|
:span="6"
|
||||||
|
>
|
||||||
|
<field-definition
|
||||||
|
:key="field.columnName"
|
||||||
|
:metadata-field="field"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
||||||
|
import formMixin from '@/components/ADempiere/Form/formMixin'
|
||||||
|
import posMixin from '@/components/ADempiere/Form/VPOS/posMixin.js'
|
||||||
|
import fieldsList from './fieldsList.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Zelle',
|
||||||
|
mixins: [
|
||||||
|
formMixin,
|
||||||
|
posMixin
|
||||||
|
],
|
||||||
|
props: {
|
||||||
|
change: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
pay: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
pending: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
totalOrder: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
currency: {
|
||||||
|
type: Object,
|
||||||
|
default: undefined
|
||||||
|
},
|
||||||
|
metadata: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
uuid: 'zelle',
|
||||||
|
containerUuid: 'zelle'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
option: 1,
|
||||||
|
typePay: 0,
|
||||||
|
fieldsList,
|
||||||
|
currentFieldCurrency: '',
|
||||||
|
currentPaymentType: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
showDialogo() {
|
||||||
|
return this.$store.state['pointOfSales/payments/index'].dialogoInvoce.show
|
||||||
|
},
|
||||||
|
caseOrder() {
|
||||||
|
return this.$store.state['pointOfSales/payments/index'].dialogoInvoce.type
|
||||||
|
},
|
||||||
|
isoCode() {
|
||||||
|
return this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code
|
||||||
|
},
|
||||||
|
maximumDailyRefundAllowed() {
|
||||||
|
console.log(this.$store.getters.posAttributes.currentPointOfSales.displayCurrency.iso_code)
|
||||||
|
return this.$store.getters.posAttributes.currentPointOfSales.maximumDailyRefundAllowed
|
||||||
|
},
|
||||||
|
maximumRefundAllowed() {
|
||||||
|
return this.$store.getters.posAttributes.currentPointOfSales.maximumRefundAllowed
|
||||||
|
},
|
||||||
|
displayeCurrency() {
|
||||||
|
const tenderType = this.$store.getters.getValueOfField({
|
||||||
|
containerUuid: 'OverdrawnInvoice',
|
||||||
|
columnName: 'TenderType'
|
||||||
|
})
|
||||||
|
if (tenderType === 'D') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
primaryFieldsList() {
|
||||||
|
return this.fieldsList.filter(field => field.sequence <= 2)
|
||||||
|
},
|
||||||
|
hiddenFieldsList() {
|
||||||
|
return this.fieldsList.filter(field => field.sequence >= 3)
|
||||||
|
},
|
||||||
|
listCurrency() {
|
||||||
|
return this.$store.getters.getCurrenciesList
|
||||||
|
},
|
||||||
|
emptyFieldGiftCard() {
|
||||||
|
const empty = this.fieldsList.filter(field => {
|
||||||
|
if (field.sequence < 3 && this.isEmptyValue(
|
||||||
|
this.$store.getters.getValueOfField({
|
||||||
|
containerUuid: 'OverdrawnInvoice',
|
||||||
|
columnName: field.columnName
|
||||||
|
})
|
||||||
|
)) {
|
||||||
|
return field
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return empty.map(empty => empty.name)
|
||||||
|
},
|
||||||
|
emptyMandatoryFields() {
|
||||||
|
return this.$store.getters.getFieldsListEmptyMandatory({ containerUuid: 'OverdrawnInvoice', formatReturn: 'name' })
|
||||||
|
},
|
||||||
|
paymentTypeList() {
|
||||||
|
return this.$store.getters.getPaymentTypeList
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$store.commit('updateValueOfField', {
|
||||||
|
containerUuid: 'zelle',
|
||||||
|
columnName: 'PayAmt',
|
||||||
|
value: this.change
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
formatPrice,
|
||||||
|
close() {
|
||||||
|
this.$store.commit('dialogoInvoce', { show: false })
|
||||||
|
},
|
||||||
|
changeCurrency(value) {
|
||||||
|
this.currentFieldCurrency = value
|
||||||
|
},
|
||||||
|
changePaymentType(value) {
|
||||||
|
this.$store.commit('currentTenderChange', value)
|
||||||
|
this.currentPaymentType = value
|
||||||
|
this.$store.commit('updateValueOfField', {
|
||||||
|
containerUuid: 'OverdrawnInvoice',
|
||||||
|
columnName: 'TenderType',
|
||||||
|
value: value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-image {
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.el-card__header {
|
||||||
|
padding: 18px 20px;
|
||||||
|
border-bottom: 1px solid #e6ebf5;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: rgb(245, 247, 250);
|
||||||
|
}
|
||||||
|
.el-card__body {
|
||||||
|
padding-top: 0px !important;
|
||||||
|
padding-right: 0px!important;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
padding-left: 10px!important;
|
||||||
|
height: 100%!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
margin-top: 0px!important;
|
||||||
|
line-height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 0;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
height: 9vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix:before,
|
||||||
|
.clearfix:after {
|
||||||
|
display: table;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix:after {
|
||||||
|
clear: both
|
||||||
|
}
|
||||||
|
.el-header {
|
||||||
|
background: 'white';
|
||||||
|
color: #333;
|
||||||
|
line-height: 10px;
|
||||||
|
}
|
||||||
|
.el-aside {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.el-row {
|
||||||
|
margin: 0px!important;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user