【修改】资料网员 成员应收金额修改

This commit is contained in:
fengachen
2022-11-08 11:58:01 +08:00
parent a5d660daa9
commit c56a1c4b6f
2 changed files with 62 additions and 6 deletions
+6 -1
View File
@@ -4,6 +4,11 @@
* */
export const CalcAmountMixin = {
data() {
return {
ysjeKey:'receivableAmount',// 应收金额的表单key值
}
},
methods:{
/**
* 改变应收金额 计算税额 未税金额
@@ -27,7 +32,7 @@ export const CalcAmountMixin = {
* */
calcAmount(){
// 获取应收金额
let ysje = Number(this.form.getFieldValue('receivableAmount'))
let ysje = Number(this.form.getFieldValue(this.ysjeKey))
// 没有输入应收金额 不进行计算
if(!ysje) return
// 获取税率
@@ -79,20 +79,59 @@
<a-input
placeholder="请输入应收金额"
:maxLength="50"
@change="changeReceivableAmount"
v-decorator="[
'amountReceivable',
validatorRules.amountReceivable,
]"
@blur="addZero"
@change="
(e) => {
e.target.value = e.target.value.replace(/[^0-9.]/g, '');
}
"
></a-input>
<span class="yuan">元</span>
</a-form-item>
</a-col>
<a-col :xl="12" :sm="24">
<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-col>
</a-row>
<a-row>
<a-col :xl="12" :sm="24">
<a-form-item label="税额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row :gutter="10">
<a-col :span="20">
<a-input placeholder="请输入税额"
v-decorator="['tax',validatorRules.tax]"
:maxLength='50'
@blur="addZero"
read-only
disabled
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
</a-col>
<a-col :span="1">元</a-col>
</a-row>
</a-form-item>
</a-col>
<a-col :xl="12" :sm="24">
<a-form-item label="未税金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row :gutter="10">
<a-col :span="20">
<a-input placeholder="请输入未税金额"
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
:maxLength='50'
disabled
@blur="addZero"
read-only
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
</a-col>
<a-col :span="1">元</a-col>
</a-row>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :xl="12" :sm="24">
<a-form-item
label="需要发票"
@@ -232,11 +271,15 @@ import { addZero } from '@/utils/util'
import { money } from '@/utils/validate'
import { checkAssociatedProject } from '@/utils/projectCheck'
import SelectRevenueContract from '../../../../components/tools/SelectRevenueContract'
import JDictSelectTag from '@comp/dict/JDictSelectTag'
import {CalcAmountMixin} from '@/mixins/CalcAmountMixin'
export default {
name: 'SafeguardMemberModal',
mixins:[CalcAmountMixin],
components: {
JUpload,
JDictSelectTag,
CompanySelect,
// ContactManagementModule,
SelectContacts,
@@ -245,6 +288,7 @@ export default {
data() {
return {
title: '操作',
ysjeKey:'amountReceivable',
width: 800,
visible: false,
confirmLoading: false,
@@ -294,6 +338,10 @@ export default {
],
validateTrigger: ['blur']
},
taxRate: {
rules: [{ required: true,message: '请选择税率' }],
validateTrigger: 'change',initialValue:'0.06'
},
chargeNoticeNo: {
rules: [{ required: true, message: '请输入收费通知号' }],
@@ -396,6 +444,9 @@ export default {
'companyContactId',
'postContactId',
'amountReceivable',
'taxRate',
'tax',
'noTaxAmount',
'needInvoice',
'paymentMethod',
'contractNo',