Commit 8e147465 authored by 我在何方's avatar 我在何方

收款单详情优化

parent 2c38ca26
......@@ -668,24 +668,6 @@ export default {
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(){
let total = 0
if(!this.form.receiptAccountList) return 0
......@@ -824,6 +806,18 @@ export default {
this.form.receiptAccountList[index] = {...row}
},
setWriteOffAmount() {
var pointArr = []
var regs=/^[0-9]+\d*(\.\d*)?$|^0?\.\d*[0-9]\d*$/;
if(this.addForm.amount&&!regs.test(this.addForm.amount)){
this.addForm.amount = ''
this.$modal.msgError(this.$t('输入金额不对'));
}else{
pointArr = this.addForm.amount.split('.')
if(pointArr.length>1&&pointArr[1]){
this.addForm.amount =Math.round(this.addForm.amount*100)/100
}
}
this.$set(this.addForm, 'writeOffAmount', NP.times(this.addForm.rate || 0, this.addForm.amount || 0))
},
getCurrencyLabel(id){
......@@ -935,6 +929,24 @@ export default {
this.reason = ''
this.dialogVisible = 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.getReceiptInfoData();
this.$message.success(this.$t("提交成功"));
this.wiffShow = false
// this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {this.wiffShow = false});
},
//显示取消审核弹窗
detailClickCancel(type){
this.detailIndex = type
......
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