Commit a1277cab authored by 我在何方's avatar 我在何方

收款单详情按钮修复

parent 27d4739b
...@@ -312,8 +312,8 @@ ...@@ -312,8 +312,8 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11" type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button> <el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6" type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11" type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button> <el-button v-if="form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6" type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
<el-button <el-button
type="primary" type="primary"
v-if="form.state == 11" v-if="form.state == 11"
...@@ -342,6 +342,13 @@ ...@@ -342,6 +342,13 @@
@click="detailClickCancel(2)" @click="detailClickCancel(2)"
>{{ $t('取消全部核销审核') }}</el-button >{{ $t('取消全部核销审核') }}</el-button
> >
<el-button
v-if="form.state == 4 || form.state == 5 || form.state == 6"
type="primary"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="writeOffShow()"
>{{ $t('提交收款单反核销') }}</el-button
>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button> <el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div> </div>
...@@ -358,6 +365,19 @@ ...@@ -358,6 +365,19 @@
<el-button @click="detailShow = false">{{$t('取消')}}</el-button> <el-button @click="detailShow = false">{{$t('取消')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog
:title="$t('收款单反核销')"
:visible.sync="wiffShow"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="wiffRemark" :placeholder="$t('请输入理由')"></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="writeOffClick()">{{$t('提交反核销')}}</el-button>
<el-button @click="wiffShow = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
<el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="dialogTitle" width="50%" append-to-body> <el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="dialogTitle" width="50%" append-to-body>
<div style="padding: 0 24px"> <div style="padding: 0 24px">
<el-form ref="addForm" :model="addForm" label-width="250px"> <el-form ref="addForm" :model="addForm" label-width="250px">
...@@ -539,7 +559,8 @@ import { ...@@ -539,7 +559,8 @@ import {
cancelFinanceReceiptItemWriteOff, cancelFinanceReceiptItemWriteOff,
cancelFinanceReceiptItemWriteOffNo, cancelFinanceReceiptItemWriteOffNo,
cancelFinanceReceiptWriteOffNo, cancelFinanceReceiptWriteOffNo,
cancelFinanceReceiptWriteOff cancelFinanceReceiptWriteOff,
financeReceiptWriteOffNo
} from "@/api/ecw/financial"; } from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision' import NP from 'number-precision'
...@@ -594,7 +615,9 @@ export default { ...@@ -594,7 +615,9 @@ export default {
detailReason:'', detailReason:'',
detailTitle:'', detailTitle:'',
detailShow:false, detailShow:false,
detailIndex:1 detailIndex:1,
wiffShow:false,
wiffRemark:''
} }
}, },
computed: { computed: {
...@@ -640,6 +663,29 @@ export default { ...@@ -640,6 +663,29 @@ export default {
}) })
return total.toFixed(2) return total.toFixed(2)
}, },
//显示反审核反核销弹窗
writeOffShow(){
this.wiffRemark = ''
this.wiffShow = true
},
writeOffClick(){
if(!this.wiffRemark){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
this.$modal
.confirm(this.$t('您确认要反核销吗')+'?')
.then(()=>{
financeReceiptWriteOffNo({receiptId:this.id,receiptNo:this.form.receiptNo,remark:this.wiffRemark}).then(res=>{
this.getList();
this.$message.success(this.$t("提交成功"));
this.wiffShow = false
// this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {this.wiffShow = false});
},
WriteOffProportion(){ WriteOffProportion(){
let total = 0 let total = 0
if(!this.form.receiptAccountList) return 0 if(!this.form.receiptAccountList) return 0
...@@ -916,20 +962,33 @@ export default { ...@@ -916,20 +962,33 @@ export default {
if(this.detailIndex ==1){ if(this.detailIndex ==1){
cancelFinanceReceiptWriteOffNo({receiptId:this.id,remark:this.detailReason}).then(res=>{ cancelFinanceReceiptWriteOffNo({receiptId:this.id,remark:this.detailReason}).then(res=>{
this.detailShow = false this.detailShow = false
this.getList(); this.getReceiptInfoData();
this.$message.success(this.$t("提交成功")); this.$message.success(this.$t("提交成功"));
}); });
}else{ }else{
cancelFinanceReceiptWriteOff({receiptId:this.id,remark:this.detailReason}).then(res=>{ cancelFinanceReceiptWriteOff({receiptId:this.id,remark:this.detailReason}).then(res=>{
this.detailShow = false this.detailShow = false
this.getList(); this.getReceiptInfoData();
this.$message.success(this.$t("提交成功")); this.$message.success(this.$t("提交成功"));
}); });
} }
}, },
getReceiptInfoData(){
getReceiptInfoByIds({ id: this.id }).then(res => {
this.form = res.data
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
var dept = this.deptData.filter((itt) => itt.id == res.data.departmentId);
// console.log(dept)
if(dept.length>0){
this.form.departmentName = dept[0].name
}
})
},
//取消审核 //取消审核
cancelWriteOffClick(){ cancelWriteOffClick(){
if(!this.cancelReason){ if(!this.cancelReason){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment