diff --git a/src/views/financialManagement/arriveAndInvoicing/modules/ArriveModule.vue b/src/views/financialManagement/arriveAndInvoicing/modules/ArriveModule.vue
index 9838300..c10f66e 100644
--- a/src/views/financialManagement/arriveAndInvoicing/modules/ArriveModule.vue
+++ b/src/views/financialManagement/arriveAndInvoicing/modules/ArriveModule.vue
@@ -18,18 +18,22 @@
@blur="addZeroAmount"
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()">
+
+
+
addZeroTaxOrNo(e, 'noTaxAmount', 'amountReceived')"
+ disabled
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()">
addZeroTaxOrNo(e, 'tax', 'amountReceived')"
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()">
@@ -58,10 +62,11 @@ import JDate from '../../../../components/tools/JDate'
import { addPaymentPhase, editAmountPhase } from '../../../../api/incomePaymentsApi'
import { addZero } from '../../../../utils/util'
import { TaxOperateMixin } from './TaxOperateMixin'
+import JDictSelectTag from '@comp/dict/JDictSelectTag'
export default {
name: 'ArriveModule',
- components: { JDate },
+ components: { JDate,JDictSelectTag },
mixins: [TaxOperateMixin],
props: {
// 项目id
@@ -110,6 +115,10 @@ export default {
rules: [{ required: true, validator: this.checkMoney }],
validateTrigger: 'blur'
},
+ taxRate: {
+ rules: [{ required: true,message: '请选择税率' }],
+ validateTrigger: 'change',initialValue:'0.06'
+ },
noTaxAmount: {
rules: [{required: true, validator: this.checkNoTaxMoney}],
validateTrigger: 'blur'
@@ -130,12 +139,24 @@ export default {
add() {
this.edit({})
},
+ /**
+ * 改变税率计算 到账金额 与税额
+ * */
+ changeRate(val){
+ this.taxRate = val
+ let amount = this.form.getFieldValue('amountReceived')
+ if(!amount) return
+ let obj = this.calcOtherNumber(amount)
+ this.$nextTick(() => {
+ this.form.setFieldsValue( {tax:obj.noTaxAmount,noTaxAmount: obj.tax})
+ })
+ },
edit(record) {
this.form.resetFields()
this.model = Object.assign({}, record)
this.visible = true
this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'amountReceived', 'tax', 'noTaxAmount', 'paymentDate', 'remark'))
+ this.form.setFieldsValue(pick(this.model, 'amountReceived', 'tax', 'taxRate','noTaxAmount', 'paymentDate', 'remark'))
})
},
handleOk() {
diff --git a/src/views/financialManagement/arriveAndInvoicing/modules/ConfirmModule.vue b/src/views/financialManagement/arriveAndInvoicing/modules/ConfirmModule.vue
index 9c23e27..abe43c7 100644
--- a/src/views/financialManagement/arriveAndInvoicing/modules/ConfirmModule.vue
+++ b/src/views/financialManagement/arriveAndInvoicing/modules/ConfirmModule.vue
@@ -19,10 +19,15 @@
@blur="addZeroAmount"
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()">
+
+
+
addZeroTaxOrNo(e, 'noTaxAmount', 'amountReceived')"
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()">
@@ -30,6 +35,7 @@
addZeroTaxOrNo(e, 'tax', 'amountReceived')"
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()">
@@ -101,6 +107,10 @@ export default {
rules: [{required: true, validator: this.checkMoney}],
validateTrigger: 'blur'
},
+ taxRate: {
+ rules: [{ required: true,message: '请选择税率' }],
+ validateTrigger: 'change',initialValue:'0.06'
+ },
noTaxAmount: {
rules: [{required: true, validator: this.checkNoTaxMoney}],
validateTrigger: 'blur'
@@ -118,6 +128,18 @@ export default {
},
methods: {
addZero,
+ /**
+ * 改变税率计算 到账金额 与税额
+ * */
+ changeRate(val){
+ this.taxRate = val
+ let amount = this.form.getFieldValue('amountReceived')
+ if(!amount) return
+ let obj = this.calcOtherNumber(amount)
+ this.$nextTick(() => {
+ this.form.setFieldsValue( {tax:obj.noTaxAmount,noTaxAmount: obj.tax})
+ })
+ },
add(projectInfo, isFirst) {
let currentDate = new Date()
@@ -156,7 +178,7 @@ export default {
this.taxRate = this.projectInfo.needInvoice ? 0.06 : 0
this.visible = true
this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'amountReceived', 'tax', 'noTaxAmount','paymentDate', 'remark'))
+ this.form.setFieldsValue(pick(this.model, 'amountReceived', 'tax','taxRate', 'noTaxAmount','paymentDate', 'remark'))
})
},
getInfoById(id) {
diff --git a/src/views/financialManagement/arriveAndInvoicing/modules/InvoicingModule.vue b/src/views/financialManagement/arriveAndInvoicing/modules/InvoicingModule.vue
index 5e0c41e..7e68da8 100644
--- a/src/views/financialManagement/arriveAndInvoicing/modules/InvoicingModule.vue
+++ b/src/views/financialManagement/arriveAndInvoicing/modules/InvoicingModule.vue
@@ -18,10 +18,15 @@
@blur="addZeroAmount"
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()">
+
+
+
addZeroTaxOrNo(e, 'noTaxAmount', 'invoiceAmount')"
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()">
@@ -29,6 +34,7 @@
addZeroTaxOrNo(e, 'tax', 'invoiceAmount')"
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()">
@@ -65,10 +71,11 @@ import { addPayBill, editPayBill } from '../../../../api/incomePaymentsApi'
import { addZero } from '../../../../utils/util'
import { getContactsById } from '../../../../api/api'
import {TaxOperateMixin} from './TaxOperateMixin'
+import JDictSelectTag from '@comp/dict/JDictSelectTag'
export default {
name: 'InvoicingModule',
- components: { JDate },
+ components: { JDate,JDictSelectTag },
mixins: [TaxOperateMixin],
props: {
// 项目id
@@ -123,6 +130,10 @@ export default {
rules: [{ required: true, validator: this.checkMoney }],
validateTrigger: 'blur'
},
+ taxRate: {
+ rules: [{ required: true,message: '请选择税率' }],
+ validateTrigger: 'change',initialValue:'0.06'
+ },
noTaxAmount: {
rules: [{required: true, validator: this.checkNoTaxMoney}],
validateTrigger: 'blur'
@@ -146,6 +157,18 @@ export default {
},
methods: {
addZero,
+ /**
+ * 改变税率计算 到账金额 与税额
+ * */
+ changeRate(val){
+ this.taxRate = val
+ let amount = this.form.getFieldValue('invoiceAmount')
+ if(!amount) return
+ let obj = this.calcOtherNumber(amount)
+ this.$nextTick(() => {
+ this.form.setFieldsValue( {tax:obj.noTaxAmount,noTaxAmount: obj.tax})
+ })
+ },
add() {
this.edit({})
},
@@ -155,7 +178,7 @@ export default {
this.getMailContactPostalCode()
this.visible = true
this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'invoiceAmount', 'tax', 'noTaxAmount', 'billNo', 'billDate', 'remark'))
+ this.form.setFieldsValue(pick(this.model, 'invoiceAmount', 'tax','taxRate', 'noTaxAmount', 'billNo', 'billDate', 'remark'))
})
},
getMailContactPostalCode() {