Commit 083f2b23 authored by 我在何方's avatar 我在何方

财务收款单更新

parent e279e0d0
......@@ -457,3 +457,12 @@ export function cancelFinanceReceiptItemWriteOff(query) {
})
}
// 取消收款明细反核销
export function cancelFinanceReceiptItemWriteOffNo(query) {
return request({
url: '/ecw/receipt-item/cancelFinanceReceiptItemWriteOffNo',
method: 'POST',
data: query
})
}
......@@ -193,6 +193,7 @@ export const DICT_TYPE = {
ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求
ORDER_ABNORMAL_STATE:'order_abnormal_state',
TARGET_TYPE:'target_type',//部门业绩目标类型
RECEIPT_ITEM_STATE:'receipt_item_state',//收款单明细状态
// ========== 出货模块 ==========
BOX_SHIPPING_TRAILER_STATUS: 'shipping_trailer_status', // 拖车状态
BOX_SHIPPING_CUSTOMS_TYPE: 'shipping_customs_type', // 报关方式
......
......@@ -251,18 +251,22 @@
</el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="status">
<template slot-scope="scope">
<span>{{ scope.row.status == 0 ? $t('待核销') : $t('已核销') }}</span>
<dict-tag
:type="DICT_TYPE.RECEIPT_ITEM_STATE"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" width="200">
<template slot-scope="scope">
<el-button v-if="scope.row.status == 0" v-hasPermi="['ecw:payment:detail:delete']" type="text" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button type="text" @click="detailClick(scope.row)" v-hasPermi="['ecw:payment:detail:detail']">{{ $t('详情') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="detailClick(scope.row)" v-hasPermi="['ecw:payment:detail:detail']">{{ $t('详情') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="$router.push(`bankDetail?id=`+id+`&bankId=`+scope.row.id)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t('核销') }}</el-button>
<el-button v-if="scope.row.status == 1" type="text" @click="showCancel(scope.$index)" v-hasPermi="['ecw:payment:detail:cancelWriteOff']">{{ $t('反核销') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="editClick(scope.row)" v-hasPermi="['ecw:payment:detail:bankEdit']">{{ $t('编辑') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="cancelClick(scope.$index)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t('取消审核') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="$router.push(`/bpm/process-instance/detail?id=`+scope.row.bmpId)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t('审核详情') }}</el-button>
<el-button v-if="scope.row.status == 2" type="text" @click="cancelClick(scope.$index,1)" v-hasPermi="['ecw:payment:detail:cancelDetailApproval']">{{ $t('取消审核') }}</el-button>
<el-button v-if="scope.row.status == 3" type="text" @click="cancelClick(scope.$index,2)" v-hasPermi="['ecw:payment:detail:cancelWriteOff']">{{ $t('取消反核销审核') }}</el-button>
<el-button v-if="scope.row.status == 3 || scope.row.status == 2" type="text" @click="$router.push(`/bpm/process-instance/detail?id=`+scope.row.bmpId)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t('审核详情') }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -462,7 +466,7 @@
<el-input type="textarea" :rows ="6" v-model="cancelReason" :placeholder="$t('请输入取消审核理由')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancelClick()">{{$t('提交')}}</el-button>
<el-button type="primary" @click="cancelWriteOffClick()">{{$t('提交')}}</el-button>
<el-button @click="cancelShow = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
......@@ -490,7 +494,8 @@ import {
getReceiptAccountList,
financeReceiptWriteOff,
financeReceiptItemWriteOffNo,
cancelFinanceReceiptItemWriteOff
cancelFinanceReceiptItemWriteOff,
cancelFinanceReceiptItemWriteOffNo
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
......@@ -541,6 +546,7 @@ export default {
cancelShow:false,
cancelTitle:'',
cancelReason:'',
cancelType:1
}
},
computed: {
......@@ -836,8 +842,9 @@ export default {
this.dialogVisible = true
},
//取消审核弹窗
cancelClick(index){
cancelClick(index,type){
this.selectIndex = index
this.cancelType = type
this.cancelReason = ''
this.cancelShow = true
},
......@@ -848,10 +855,20 @@ export default {
return
}
var receiptItemId = this.detailed[this.selectIndex].id
if(this.cancelType==1){
cancelFinanceReceiptItemWriteOff({receiptItemId:receiptItemId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
this.getList()
});
}else{
cancelFinanceReceiptItemWriteOffNo({receiptItemId:receiptItemId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
this.getList()
});
}
},
currencyIdChange(val) {
val = Number(val)
......
......@@ -97,7 +97,7 @@
:type="DICT_TYPE.ECW_RECEIPT_STATE"
:value="scope.row.state"
/>
<span v-if="scope.row.remark" :title="scope.row.remark"><i class="el-icon-question"></i></span>
<span v-if="scope.row.state==1 || scope.row.state ==3 || scope.row.state==8" :title="scope.row.remark"><i class="el-icon-question"></i></span>
</template>
</el-table-column>
<el-table-column :label="$t('是否开票')" align="center">
......@@ -118,7 +118,7 @@
@click="verificationCancelClick(scope.row)"
>{{ $t('查看')}}</el-button>
<el-button
v-if="scope.row.state === 0 || scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3"
v-if="scope.row.state === 0 || scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3|| scope.row.state == 8"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:edit']"
......@@ -141,7 +141,7 @@
>{{ $t('反核销') }}</el-button
>
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
v-if="scope.row.state == 1"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
......@@ -149,32 +149,33 @@
>{{ $t('反审核') }}</el-button
>
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
v-if="scope.row.state == 7"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
v-hasPermi="['ecw:vocher:cancelAppoval']"
@click="cancelClick(scope.$index,1)"
>{{ $t('取消审核') }}</el-button
>
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
v-if="scope.row.state == 11"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
v-hasPermi="['ecw:vocher:cancelWriteOfflNo']"
@click="cancelClick(scope.$index,3)"
>{{ $t('取消反核销审核') }}</el-button
>
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
v-if="scope.row.state == 9"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
v-hasPermi="['ecw:vocher:cancelAppovalNo']"
@click="cancelClick(scope.$index,2)"
>{{ $t('取消反审核') }}</el-button
>
<el-button
size="mini"
type="text"
v-if="scope.row.state == 9 || scope.row.state == 7 || scope.row.state == 11"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="$router.push(`/bpm/process-instance/detail?id=`+scope.row.bmpId)"
>{{ $t('审核详情') }}</el-button
......@@ -188,9 +189,9 @@
>{{ $t('开票') }}</el-button
>
<el-button v-if="scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3" v-hasPermi="['ecw:voucher:payment']" size="mini" type="text" @click="verificationCancelClick(scope.row)">{{ $t('收款') }}</el-button>
<el-button v-if="[0,1,2].indexOf(scope.row.state) > -1" size="mini" type="text" v-hasPermi="['ecw:voucher:delete']" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button v-if="[0,1,8].indexOf(scope.row.state) > -1" size="mini" type="text" v-hasPermi="['ecw:voucher:delete']" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button
v-if="scope.row.state != 0"
v-if="scope.row.state != 0 && scope.row.state != 7 && scope.row.state != 11 && scope.row.state != 8 && scope.row.state != 9"
size="mini"
type="text"
@click="toprint(scope.row.id)"
......@@ -198,7 +199,7 @@
>{{ $t('打印') }}</el-button
>
<el-button
v-if="scope.row.state != 0"
v-if="scope.row.state != 0 && scope.row.state != 7 && scope.row.state != 11 && scope.row.state != 8 && scope.row.state != 9"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:derive']"
......@@ -419,16 +420,19 @@ export default {
cancelFinanceReceiptApproval({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
this.getList();
});
}else if(this.cancelIndex ==2){
cancelFinanceReceiptApprovalNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
this.getList();
});
}else{
cancelFinanceReceiptWriteOffNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
this.getList();
});
}
......
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