bug修改个人所得税以及医生收益金处理

This commit is contained in:
zoujiandong 2023-11-03 10:14:39 +08:00
parent 0ee35c266e
commit 05556c3601
4 changed files with 26 additions and 11 deletions

View File

@ -98,7 +98,7 @@
<div v-else-if="record.inquiry_status==7">已取消</div>
</template>
<template #doctor_amount="{ record }">
{{(record.doctor_amount) }}
{{Math.floor(record.amount_total*0.75*100)/100}}
</template>
<template #patient_name_mask="{ record }">

View File

@ -84,16 +84,16 @@
</a-col>
<a-col :span="12">
<a-form-item field="" label="平台收益:">
<span v-if="modalForm.payment_amount_total*0.25==0">0元</span>
<span v-else>{{ (modalForm.payment_amount_total*0.25).toFixed(2) }}</span>
<span v-if="modalForm.amount_total*0.25==0">0元</span>
<span v-else>{{ Math.floor(modalForm.amount_total*0.25*100)/100}}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="" label="医生收益:">
<span v-if="modalForm.payment_amount_total*0.75==0">0元</span>
<span v-else>{{ (modalForm.payment_amount_total*0.75).toFixed(2) }}</span>
<span v-if="modalForm.amount_total*0.75==0">0元</span>
<span v-else>{{Math.floor(modalForm.amount_total*0.75*100)/100}}</span>
</a-form-item>
</a-col>
</a-row>

View File

@ -29,6 +29,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
max:{
type: Number,
default: 0,
},
id:{
type: String,
default:'',
@ -38,7 +42,7 @@ const props = defineProps({
},
});
const emits = defineEmits(['closeChange']);
const {okVisible,id,api} = toRefs(props);
const {okVisible,id,api,max} = toRefs(props);
// Akiraka 20230210
const handleClose = () => {
@ -48,18 +52,28 @@ const handleClose = () => {
}
// Akiraka 20230210
const rules = {
income_tax: [{ required: true, message: '请输入个人所得税' }]
income_tax: [
{ required: true, message: '请输入个人所得税' },
{
validator: (value, cb) => {
if (value==0) {
cb('金额需要大于0');
}
if (value>props.max) {
cb('修改金额不可超出提现金额');
}
}
}
]
};
// Akiraka 20230210 =>
const handleConfirm = () => {
proxy.$refs.modalFormRef.validate(async(valid) => {
if (!valid) {
const {code}= await api.value(id.value,form);
const {code,message}= await api.value(id.value,form);
if(code==200){
Message.success("修改成功");
proxy.$refs.modalFormRef.resetFields();
}else{
proxy.$notification.error(response.message);
}
emits('closeChange',true);
}

View File

@ -103,7 +103,7 @@
<a-col :span="12">
<a-form-item field="idCard" label="个人所得税:" >
<div>{{modalForm.income_tax}}</div>
<a-button type="primary" @click="()=>okVisible=true" style="margin-left:20px;" v-has="'admin:sysFinancialRecord:tax'">纠正个人所得税</a-button>
<a-button type="primary" @click="()=>okVisible=true" style="margin-left:20px;" v-has="'admin:sysFinancialRecord:tax'" :disabled="modalForm.examine_status==1 && modalForm.payment_status==0">纠正个人所得税</a-button>
</a-form-item>
</a-col>
</a-row>
@ -200,6 +200,7 @@
:okVisible="okVisible"
:api="editIncome"
:id="withdrawal_order_id"
:max="modalForm.actual_withdrawal_amount"
@closeChange="closeChange"
></numberModal>