【修改】到账开票 来款 开票 确认收入增加税率选择
This commit is contained in:
@@ -18,18 +18,22 @@
|
|||||||
@blur="addZeroAmount"
|
@blur="addZeroAmount"
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="税率" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag @change="changeRate" placeholder="请选择税率" dict-code="rate" :trigger-change="true"
|
||||||
|
v-decorator="['taxRate',validatorRules.taxRate]"></j-dict-select-tag>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item label="税额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="税额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入税额"
|
<a-input placeholder="请输入税额"
|
||||||
v-decorator="['tax',validatorRules.tax]"
|
v-decorator="['tax',validatorRules.tax]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
@blur="(e) => addZeroTaxOrNo(e, 'noTaxAmount', 'amountReceived')"
|
disabled
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="到账金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="到账金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入未税金额"
|
<a-input placeholder="请输入未税金额"
|
||||||
|
disabled
|
||||||
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
@blur="(e) => addZeroTaxOrNo(e, 'tax', 'amountReceived')"
|
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="来款日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="来款日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
@@ -58,10 +62,11 @@ import JDate from '../../../../components/tools/JDate'
|
|||||||
import { addPaymentPhase, editAmountPhase } from '../../../../api/incomePaymentsApi'
|
import { addPaymentPhase, editAmountPhase } from '../../../../api/incomePaymentsApi'
|
||||||
import { addZero } from '../../../../utils/util'
|
import { addZero } from '../../../../utils/util'
|
||||||
import { TaxOperateMixin } from './TaxOperateMixin'
|
import { TaxOperateMixin } from './TaxOperateMixin'
|
||||||
|
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ArriveModule',
|
name: 'ArriveModule',
|
||||||
components: { JDate },
|
components: { JDate,JDictSelectTag },
|
||||||
mixins: [TaxOperateMixin],
|
mixins: [TaxOperateMixin],
|
||||||
props: {
|
props: {
|
||||||
// 项目id
|
// 项目id
|
||||||
@@ -110,6 +115,10 @@ export default {
|
|||||||
rules: [{ required: true, validator: this.checkMoney }],
|
rules: [{ required: true, validator: this.checkMoney }],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
|
taxRate: {
|
||||||
|
rules: [{ required: true,message: '请选择税率' }],
|
||||||
|
validateTrigger: 'change',initialValue:'0.06'
|
||||||
|
},
|
||||||
noTaxAmount: {
|
noTaxAmount: {
|
||||||
rules: [{required: true, validator: this.checkNoTaxMoney}],
|
rules: [{required: true, validator: this.checkNoTaxMoney}],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
@@ -130,12 +139,24 @@ export default {
|
|||||||
add() {
|
add() {
|
||||||
this.edit({})
|
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) {
|
edit(record) {
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
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() {
|
handleOk() {
|
||||||
|
|||||||
@@ -19,10 +19,15 @@
|
|||||||
@blur="addZeroAmount"
|
@blur="addZeroAmount"
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="税率" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag @change="changeRate" placeholder="请选择税率" dict-code="rate" :trigger-change="true"
|
||||||
|
v-decorator="['taxRate',validatorRules.taxRate]"></j-dict-select-tag>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item label="税额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="税额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入税额"
|
<a-input placeholder="请输入税额"
|
||||||
v-decorator="['tax',validatorRules.tax]"
|
v-decorator="['tax',validatorRules.tax]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
disabled
|
||||||
@blur="(e) => addZeroTaxOrNo(e, 'noTaxAmount', 'amountReceived')"
|
@blur="(e) => addZeroTaxOrNo(e, 'noTaxAmount', 'amountReceived')"
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -30,6 +35,7 @@
|
|||||||
<a-input placeholder="请输入未税金额"
|
<a-input placeholder="请输入未税金额"
|
||||||
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
disabled
|
||||||
@blur="(e) => addZeroTaxOrNo(e, 'tax', 'amountReceived')"
|
@blur="(e) => addZeroTaxOrNo(e, 'tax', 'amountReceived')"
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -101,6 +107,10 @@ export default {
|
|||||||
rules: [{required: true, validator: this.checkMoney}],
|
rules: [{required: true, validator: this.checkMoney}],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
|
taxRate: {
|
||||||
|
rules: [{ required: true,message: '请选择税率' }],
|
||||||
|
validateTrigger: 'change',initialValue:'0.06'
|
||||||
|
},
|
||||||
noTaxAmount: {
|
noTaxAmount: {
|
||||||
rules: [{required: true, validator: this.checkNoTaxMoney}],
|
rules: [{required: true, validator: this.checkNoTaxMoney}],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
@@ -118,6 +128,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addZero,
|
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) {
|
add(projectInfo, isFirst) {
|
||||||
|
|
||||||
let currentDate = new Date()
|
let currentDate = new Date()
|
||||||
@@ -156,7 +178,7 @@ export default {
|
|||||||
this.taxRate = this.projectInfo.needInvoice ? 0.06 : 0
|
this.taxRate = this.projectInfo.needInvoice ? 0.06 : 0
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
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) {
|
getInfoById(id) {
|
||||||
|
|||||||
@@ -18,10 +18,15 @@
|
|||||||
@blur="addZeroAmount"
|
@blur="addZeroAmount"
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="税率" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag @change="changeRate" placeholder="请选择税率" dict-code="rate" :trigger-change="true"
|
||||||
|
v-decorator="['taxRate',validatorRules.taxRate]"></j-dict-select-tag>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item label="税额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="税额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入税额"
|
<a-input placeholder="请输入税额"
|
||||||
v-decorator="['tax',validatorRules.tax]"
|
v-decorator="['tax',validatorRules.tax]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
disabled
|
||||||
@blur="(e) => addZeroTaxOrNo(e, 'noTaxAmount', 'invoiceAmount')"
|
@blur="(e) => addZeroTaxOrNo(e, 'noTaxAmount', 'invoiceAmount')"
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -29,6 +34,7 @@
|
|||||||
<a-input placeholder="请输入未税金额"
|
<a-input placeholder="请输入未税金额"
|
||||||
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
disabled
|
||||||
@blur="(e) => addZeroTaxOrNo(e, 'tax', 'invoiceAmount')"
|
@blur="(e) => addZeroTaxOrNo(e, 'tax', 'invoiceAmount')"
|
||||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()"></a-input>
|
@change="e => e.target.value = (e.target.value.replace(/[^0-9.-]/g, '')).trim()"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -65,10 +71,11 @@ import { addPayBill, editPayBill } from '../../../../api/incomePaymentsApi'
|
|||||||
import { addZero } from '../../../../utils/util'
|
import { addZero } from '../../../../utils/util'
|
||||||
import { getContactsById } from '../../../../api/api'
|
import { getContactsById } from '../../../../api/api'
|
||||||
import {TaxOperateMixin} from './TaxOperateMixin'
|
import {TaxOperateMixin} from './TaxOperateMixin'
|
||||||
|
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'InvoicingModule',
|
name: 'InvoicingModule',
|
||||||
components: { JDate },
|
components: { JDate,JDictSelectTag },
|
||||||
mixins: [TaxOperateMixin],
|
mixins: [TaxOperateMixin],
|
||||||
props: {
|
props: {
|
||||||
// 项目id
|
// 项目id
|
||||||
@@ -123,6 +130,10 @@ export default {
|
|||||||
rules: [{ required: true, validator: this.checkMoney }],
|
rules: [{ required: true, validator: this.checkMoney }],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
|
taxRate: {
|
||||||
|
rules: [{ required: true,message: '请选择税率' }],
|
||||||
|
validateTrigger: 'change',initialValue:'0.06'
|
||||||
|
},
|
||||||
noTaxAmount: {
|
noTaxAmount: {
|
||||||
rules: [{required: true, validator: this.checkNoTaxMoney}],
|
rules: [{required: true, validator: this.checkNoTaxMoney}],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
@@ -146,6 +157,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addZero,
|
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() {
|
add() {
|
||||||
this.edit({})
|
this.edit({})
|
||||||
},
|
},
|
||||||
@@ -155,7 +178,7 @@ export default {
|
|||||||
this.getMailContactPostalCode()
|
this.getMailContactPostalCode()
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
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() {
|
getMailContactPostalCode() {
|
||||||
|
|||||||
Reference in New Issue
Block a user