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

收款单bug修复

parent 4b661a2f
......@@ -509,6 +509,14 @@ export function cancelFinanceReceiptApprovalNo(query) {
data: query
})
}
// 取消收款单全部核销审核
export function cancelFinanceReceiptWriteOff(query) {
return request({
url: '/ecw/receipt/cancelFinanceReceiptWriteOff',
method: 'POST',
data: query
})
}
// 取消收款单反核销
export function cancelFinanceReceiptWriteOffNo(query) {
return request({
......
......@@ -963,7 +963,7 @@ export default {
//明细改变税率
changeTaxRate(row,index){
var pointArr = []
var regs=/^[1-9]+\d*(\.\d*)?$|^0?\.\d*[1-9]\d*$/;
var regs=/^[0-9]+\d*(\.\d*)?$|^0?\.\d*[0-9]\d*$/;
if(row.taxPoint&&!regs.test(row.taxPoint)){
row.taxPoint = ''
this.$modal.msgError(this.$t('输入税率格式不对'));
......
......@@ -10,7 +10,7 @@
<td style="font-weight: bold;width:12.5%">{{$t('客户名称')}}</td>
<td colspan="2" style="width: 25%;">{{form?form.customerName:$t('')}}</td>
<td style="font-weight: bold;width:12.5%">{{$t('收款日期')}}</td>
<td colspan="2" style="width: 25%;">{{parseTime(date)||$t('')}}</td>
<td colspan="2" style="width: 25%;">{{form&&form.payedAt?parseTime(form.payedAt):$t('')}}</td>
</tr>
<tr>
<td style="font-weight: bold;width:12.5%">{{$t('收款单号')}}</td>
......
......@@ -312,11 +312,52 @@
</el-descriptions>
</el-card>
<div slot="footer" style="margin: 20px 0">
<el-button v-if="form.state!=7" type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button v-if="form.state==7||form.state==0" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
<el-button v-else type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
</div>
<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" type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
<el-button
type="primary"
v-if="form.state == 11"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="$router.push(`/bpm/process-instance/detail?id=`+form.bmpId)"
>{{ $t('反核销审核详情') }}</el-button
>
<el-button
type="primary"
v-if="form.state == 10"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="$router.push(`/bpm/process-instance/detail?id=`+form.bmpId)"
>{{ $t('全部核销审核详情') }}</el-button
>
<el-button
v-if="form.state == 11"
type="primary"
v-hasPermi="['ecw:vocher:cancelWriteOfflNo']"
@click="detailClickCancel(1)"
>{{ $t('取消反核销审核') }}</el-button
>
<el-button
v-if="form.state == 10"
type="primary"
v-hasPermi="['ecw:vocher:cancelWriteOffAll']"
@click="detailClickCancel(2)"
>{{ $t('取消全部核销审核') }}</el-button
>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
<el-dialog
:title="detailTitle"
:visible.sync="detailShow"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="detailReason" :placeholder="$t('请输入取消理由')"></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="detailWriteOffClick()">{{$t('提交')}}</el-button>
<el-button @click="detailShow = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
<el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="dialogTitle" width="50%" append-to-body>
<div style="padding: 0 24px">
<el-form ref="addForm" :model="addForm" label-width="250px">
......@@ -496,7 +537,9 @@ import {
financeReceiptWriteOff,
financeReceiptItemWriteOffNo,
cancelFinanceReceiptItemWriteOff,
cancelFinanceReceiptItemWriteOffNo
cancelFinanceReceiptItemWriteOffNo,
cancelFinanceReceiptWriteOffNo,
cancelFinanceReceiptWriteOff
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
......@@ -547,7 +590,11 @@ export default {
cancelShow:false,
cancelTitle:'',
cancelReason:'',
cancelType:1
cancelType:1,
detailReason:'',
detailTitle:'',
detailShow:false,
detailIndex:1
}
},
computed: {
......@@ -842,6 +889,17 @@ export default {
this.reason = ''
this.dialogVisible = true
},
//显示取消审核弹窗
detailClickCancel(type){
this.detailIndex = type
this.detailReason = ''
if(this.detailIndex==1){
this.detailTitle = this.$t('取消反核销审核')
}else{
this.detailTitle = this.$t('取消全部核销审核')
}
this.detailShow = true
},
//取消审核弹窗
cancelClick(index,type){
this.selectIndex = index
......@@ -850,6 +908,29 @@ export default {
this.cancelShow = true
},
//取消审核
detailWriteOffClick(){
if(!this.detailReason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
if(this.detailIndex ==1){
cancelFinanceReceiptWriteOffNo({receiptId:this.id,remark:this.detailReason}).then(res=>{
this.detailShow = false
this.getList();
this.$message.success(this.$t("提交成功"));
});
}else{
cancelFinanceReceiptWriteOff({receiptId:this.id,remark:this.detailReason}).then(res=>{
this.detailShow = false
this.getList();
this.$message.success(this.$t("提交成功"));
});
}
},
//取消审核
cancelWriteOffClick(){
if(!this.cancelReason){
this.$modal.msgError(this.$t('请输入申请理由'));
......
......@@ -87,7 +87,7 @@
</el-table-column>
<el-table-column :label="$t('实收日期')" align="center" prop="payedAt">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.writeOffAt, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.payedAt, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('业务员')" align="center" prop="salesmanName" />
......@@ -144,7 +144,7 @@
v-if="scope.row.state == 1"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
v-hasPermi="['ecw:voucher:deApproval']"
@click="writeOffShow(1,scope.$index)"
>{{ $t('反审核') }}</el-button
>
......@@ -164,6 +164,14 @@
@click="cancelClick(scope.$index,3)"
>{{ $t('取消反核销审核') }}</el-button
>
<el-button
v-if="scope.row.state == 10"
size="mini"
type="text"
v-hasPermi="['ecw:vocher:cancelWriteOffAll']"
@click="cancelClick(scope.$index,4)"
>{{ $t('取消全部核销审核') }}</el-button
>
<el-button
v-if="scope.row.state == 9"
size="mini"
......@@ -286,7 +294,8 @@ import {
financeApproveNo,
cancelFinanceReceiptApproval,
cancelFinanceReceiptApprovalNo,
cancelFinanceReceiptWriteOffNo
cancelFinanceReceiptWriteOffNo,
cancelFinanceReceiptWriteOff
} from "@/api/ecw/financial";
export default {
......@@ -402,8 +411,10 @@ export default {
this.cancelTitle = this.$t('取消审核')
}else if(this.cancelIndex == 2){
this.cancelTitle = this.$t('取消反审核')
}else{
}else if(this.cancelIndex == 3){
this.cancelTitle = this.$t('取消反核销审核')
}else{
this.cancelTitle = this.$t('取消全部核销审核')
}
this.cancelShow = true
},
......@@ -428,12 +439,19 @@ export default {
this.$message.success(this.$t("提交成功"));
});
}else{
}else if(this.cancelIndex ==3){
cancelFinanceReceiptWriteOffNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.cancelShow = false
this.getList();
this.$message.success(this.$t("提交成功"));
});
}else{
cancelFinanceReceiptWriteOff({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.cancelShow = false
this.getList();
this.$message.success(this.$t("提交成功"));
});
}
......
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