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

更新收款单审核

parent 60ccd09b
...@@ -359,3 +359,101 @@ export function paymentVerifyCancel(id) { ...@@ -359,3 +359,101 @@ export function paymentVerifyCancel(id) {
method: 'GET' method: 'GET'
}) })
} }
// 根据流程主键获取付款单流程审核信息
export function getPaymentApprove(id) {
return request({
url: '/ecw/payment/getPaymentApprove?id='+id,
method: 'GET'
})
}
// 根据流程主键获取收款单流程审核信息
export function getReceiptApprove(id) {
return request({
url: '/ecw/receipt/getReceiptApprove?id='+id,
method: 'GET'
})
}
// 收款单核销
export function financeReceiptWriteOff(query) {
return request({
url: '/ecw/receipt/financeReceiptWriteOff',
method: 'POST',
data: query
})
}
// 收款单银行明细核销
export function financeReceiptItemWriteOff(query) {
return request({
url: '/ecw/receipt-item/financeReceiptItemWriteOff',
method: 'POST',
data: query
})
}
// 收款单银行明细核销反审核
export function financeReceiptItemWriteOffNo(query) {
return request({
url: '/ecw/receipt-item/financeReceiptItemWriteOffNo',
method: 'POST',
data: query
})
}
// 收款单反审核
export function financeApproveNo(query) {
return request({
url: '/ecw/receipt/financeApproveNo',
method: 'POST',
data: query
})
}
// 收款单反核销
export function financeReceiptWriteOffNo(query) {
return request({
url: '/ecw/receipt/financeReceiptWriteOffNo',
method: 'POST',
data: query
})
}
// 收款单取消审核
export function cancelFinanceReceiptApproval(query) {
return request({
url: '/ecw/receipt/cancelFinanceReceiptApproval',
method: 'POST',
data: query
})
}
// 取消收款单反审核
export function cancelFinanceReceiptApprovalNo(query) {
return request({
url: '/ecw/receipt/cancelFinanceReceiptApprovalNo',
method: 'POST',
data: query
})
}
// 取消收款单反核销
export function cancelFinanceReceiptWriteOffNo(query) {
return request({
url: '/ecw/receipt/cancelFinanceReceiptWriteOffNo',
method: 'POST',
data: query
})
}
// 取消收款明细核销
export function cancelFinanceReceiptItemWriteOff(query) {
return request({
url: '/ecw/receipt-item/cancelFinanceReceiptItemWriteOff',
method: 'POST',
data: query
})
}
...@@ -339,6 +339,48 @@ export default { ...@@ -339,6 +339,48 @@ export default {
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath
}, },
//付款单审核
finance_payment_approve:{
component: () => import('@/views/ecw/financial/components/PaymentApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单审核
finance_receipt_approve:{
component: () => import('@/views/ecw/financial/components/CollectionApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单核销
finance_receipt_write_off:{
component: () => import('@/views/ecw/financial/components/CollectionWriteoff'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单反核销审核
finance_receipt_write_off_no:{
component: () => import('@/views/ecw/financial/components/CollectionApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单核销反审核
finance_receipt_approve_no:{
component: () => import('@/views/ecw/financial/components/CollectionApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单银行实收明细核销
finance_receipt_item_write_off:{
component: () => import('@/views/ecw/financial/components/CollectionBankDetail'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单银行实收反核销
finance_receipt_item_write_off_no:{
component: () => import('@/views/ecw/financial/components/CollectionBankDetail'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
} }
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim()) console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()] return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</template> </template>
<script> <script>
import { getReceivableItem ,getInvoicingItem,getReceiptAccountList,getReceiptInfoByIds} from "@/api/ecw/financial"; import { getReceivableItem ,getInvoicingItem,getReceiptAccountList,getReceiptInfoByIds,financeReceiptItemWriteOff} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency";
import WorkFlow from '@/components/WorkFlow/' import WorkFlow from '@/components/WorkFlow/'
import NP from 'number-precision' import NP from 'number-precision'
...@@ -134,6 +134,17 @@ ...@@ -134,6 +134,17 @@
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
return '' return ''
}, },
submitForm(){
this.$modal
.confirm(this.$t('您确认要提交审核吗'+'?'))
.then(() => {
financeReceiptItemWriteOff({receiptId:this.id,receiptNo:this.form.receiptNo,receiptItemId:this.bankId}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {});
},
handleAddReceiptItem() { handleAddReceiptItem() {
this.surplusData = [] this.surplusData = []
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item> <el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
<el-descriptions-item :label="$t('期望收款金额')"> <el-descriptions-item :label="$t('期望收款金额')">
<template> <template>
<div v-for="itemAmount in collectionAmount" :key="itemAmount.currencyNameZh">{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}: {{ itemAmount.amount}}</div> <div v-for="itemAmount in collectionAmount" :key="itemAmount.currencyNameZh">{{ itemAmount.amount}}{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}</div>
</template> </template>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
@click="$router.push('receiptDetail?id=' + id)" @click="$router.push('/financial/receiptDetail?id=' + receiptId)"
>{{ $t('查看收款单')}}</el-button> >{{ $t('查看收款单')}}</el-button>
</div> </div>
</div> </div>
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
<script> <script>
import { getCustomer } from '@/api/ecw/customer'
import { import {
getReceiptInfoByIds, getReceiptInfoByIds,
getInvoicingItem, getInvoicingItem,
getReceiptAccountList getReceiptAccountList,
getReceiptApprove
} 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'
...@@ -45,7 +45,8 @@ export default { ...@@ -45,7 +45,8 @@ export default {
form: {}, form: {},
collectionAmount: [], collectionAmount: [],
currencyList:[], currencyList:[],
list:[] list:[],
receiptId:0
} }
}, },
watch:{ watch:{
...@@ -53,7 +54,7 @@ export default { ...@@ -53,7 +54,7 @@ export default {
this.getCurrencyData() this.getCurrencyData()
}, },
currencyList(){ currencyList(){
this.getReceiptInfo() this.getData()
}, },
form(){ form(){
this.getListData() this.getListData()
...@@ -68,25 +69,32 @@ export default { ...@@ -68,25 +69,32 @@ export default {
} }
}, },
methods: { methods: {
getData(){
console.log(this.id)
getReceiptApprove(this.id).then(res => {
if(res.data.receiptId){
this.receiptId = res.data.receiptId
this.getReceiptInfo()
}
})
},
// 获取汇率 // 获取汇率
getCurrencyData(){ getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list}) getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
}, },
getReceiptInfo(){ getReceiptInfo(){
getReceiptInfoByIds({ id: this.id }).then(res => { getReceiptInfoByIds({ id: this.receiptId }).then(res => {
this.form = res.data this.form = res.data
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
}) })
}, },
getListData(){ getListData(){
getInvoicingItem({ id: this.id }).then(res => { getInvoicingItem({ id: this.receiptId }).then(res => {
this.list = [...res.data] this.list = [...res.data]
}) })
}, },
getCollectionData(){ getCollectionData(){
getReceiptAccountList({ id: this.id }).then(res => { getReceiptAccountList({ id: this.receiptId }).then(res => {
var n var n
// 收款总计 // 收款总计
var amountList =[] var amountList =[]
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</el-descriptions> </el-descriptions>
<div class="btn"> <div class="btn">
<el-table ref="multipleTable" :data="detailed" border row-key="id"> <el-table ref="multipleTable" :data="detailed" border row-key="id">
<el-table-column :label="$t('序号')" type="index" align="center" width="50"></el-table-column> <!-- <el-table-column :label="$t('序号')" type="index" align="center" width="50"></el-table-column> -->
<el-table-column :label="$t('收款账户')" align="center" prop="accountName" /> <el-table-column :label="$t('收款账户')" align="center" prop="accountName" />
<el-table-column :label="$t('实收金额')" align="center" prop="amount" /> <el-table-column :label="$t('实收金额')" align="center" prop="amount" />
<el-table-column :label="$t('实收币种')" align="center" prop="marks"> <el-table-column :label="$t('实收币种')" align="center" prop="marks">
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
@click="$router.push('receiptDetail?id=' + id)" @click="$router.push('/financial/receiptDetail?id=' + receiptId)"
>{{ $t('查看收款单')}}</el-button> >{{ $t('查看收款单')}}</el-button>
<el-button <el-button
size="mini" size="mini"
...@@ -134,7 +134,8 @@ import { ...@@ -134,7 +134,8 @@ import {
getReceiptInfoByIds, getReceiptInfoByIds,
getReceivableItem, getReceivableItem,
getInvoicingItem, getInvoicingItem,
getReceiptAccountList getReceiptAccountList,
getReceiptApprove
} 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'
...@@ -143,7 +144,6 @@ import NP from 'number-precision' ...@@ -143,7 +144,6 @@ import NP from 'number-precision'
export default { export default {
props:{ props:{
id: [String, Number], id: [String, Number],
detailId:[String, Number]
}, },
data() { data() {
return { return {
...@@ -155,7 +155,9 @@ export default { ...@@ -155,7 +155,9 @@ export default {
surplusData:[], surplusData:[],
openAddDialog:false, openAddDialog:false,
collectionAmount: [], collectionAmount: [],
addForm:{} addForm:{},
receiptId:0,
receiptItemId:0
} }
}, },
watch:{ watch:{
...@@ -163,7 +165,7 @@ export default { ...@@ -163,7 +165,7 @@ export default {
this.getCurrencyData() this.getCurrencyData()
}, },
currencyList(){ currencyList(){
this.getReceiptInfo() this.getData()
}, },
form(){ form(){
this.getList() this.getList()
...@@ -176,26 +178,37 @@ export default { ...@@ -176,26 +178,37 @@ export default {
} }
}, },
methods: { methods: {
getData(){
getReceiptApprove(this.id).then(res => {
if(res.data.receiptId){
this.receiptId = res.data.receiptId
this.receiptItemId = res.data.receiptItemId
this.getReceiptInfo()
}
})
},
// 获取汇率 // 获取汇率
getCurrencyData(){ getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list}) getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
}, },
getList() { getList() {
getReceivableItem({ id: this.id }).then(res => { getReceivableItem({ id: this.receiptId }).then(res => {
this.detailed = res.data.map(v => ({ res.data = res.data.map(v => ({
...v, ...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'), amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
accountNo: +v.accountNo, accountNo: +v.accountNo,
rate:parseFloat(v.rate).toFixed(6), rate:parseFloat(v.rate).toFixed(6),
attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : [] attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : []
})) }))
this.addForm = this.detailed.find(v=>v.id==this.detailId) this.addForm = res.data.find(v=>v.id==this.receiptItemId)
console.log(this.addForm) this.detailed = []
this.detailed.push(this.addForm)
this.getCollectionData() this.getCollectionData()
}) })
}, },
getReceiptInfo(){ getReceiptInfo(){
getReceiptInfoByIds({ id: this.id }).then(res => { getReceiptInfoByIds({ id: this.receiptId }).then(res => {
this.form = res.data this.form = res.data
getCustomer(this.form.customerId).then(res => { getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name this.form.customerName = res?.data?.name
...@@ -208,7 +221,7 @@ export default { ...@@ -208,7 +221,7 @@ export default {
return '' return ''
}, },
getListData(){ getListData(){
getInvoicingItem({ id: this.id }).then(res => { getInvoicingItem({ id: this.receiptId }).then(res => {
this.list = [...res.data] this.list = [...res.data]
let fieldList = []; let fieldList = [];
...@@ -232,7 +245,7 @@ export default { ...@@ -232,7 +245,7 @@ export default {
}) })
}, },
getCollectionData(){ getCollectionData(){
getReceiptAccountList({ id: this.id }).then(res => { getReceiptAccountList({ id: this.receiptId }).then(res => {
var n var n
// 收款总计 // 收款总计
var amountList =[] var amountList =[]
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
@click="$router.push('receiptDetail?id=' + id)" @click="$router.push('/financial/receiptDetail?id=' + receiptId)"
>{{ $t('查看收款单')}}</el-button> >{{ $t('查看收款单')}}</el-button>
</div> </div>
</div> </div>
...@@ -65,7 +65,8 @@ import { ...@@ -65,7 +65,8 @@ import {
getReceiptInfoByIds, getReceiptInfoByIds,
getInvoicingItem, getInvoicingItem,
getReceiptAccountList, getReceiptAccountList,
getReceivableItem getReceivableItem,
getReceiptApprove
} 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'
...@@ -84,6 +85,7 @@ export default { ...@@ -84,6 +85,7 @@ export default {
writeOffAmounts:0, writeOffAmounts:0,
detailed:[], detailed:[],
showCurrencyId:0, showCurrencyId:0,
receiptId:0
} }
}, },
watch:{ watch:{
...@@ -91,7 +93,7 @@ export default { ...@@ -91,7 +93,7 @@ export default {
this.getCurrencyData() this.getCurrencyData()
}, },
currencyList(){ currencyList(){
this.getReceiptInfo() this.getData()
}, },
form(){ form(){
this.getListData() this.getListData()
...@@ -143,8 +145,17 @@ export default { ...@@ -143,8 +145,17 @@ export default {
} }
}, },
methods: { methods: {
getData(){
getReceiptApprove(this.id).then(res => {
if(res.data.receiptId){
this.receiptId = res.data.receiptId
this.getReceiptInfo()
}
})
},
getList() { getList() {
getReceivableItem({ id: this.id }).then(res => { getReceivableItem({ id: this.receiptId }).then(res => {
this.detailed = res.data.map(v => ({ this.detailed = res.data.map(v => ({
...v, ...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'), amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
...@@ -159,7 +170,7 @@ export default { ...@@ -159,7 +170,7 @@ export default {
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list}) getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
}, },
getReceiptInfo(){ getReceiptInfo(){
getReceiptInfoByIds({ id: this.id }).then(res => { getReceiptInfoByIds({ id: this.receiptId }).then(res => {
this.form = res.data this.form = res.data
getCustomer(this.form.customerId).then(res => { getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name this.form.customerName = res?.data?.name
...@@ -167,7 +178,7 @@ export default { ...@@ -167,7 +178,7 @@ export default {
}) })
}, },
getListData(){ getListData(){
getInvoicingItem({ id: this.id }).then(res => { getInvoicingItem({ id: this.receiptId }).then(res => {
this.list = [...res.data] this.list = [...res.data]
let fieldList = []; let fieldList = [];
let groupList=[]; let groupList=[];
...@@ -190,7 +201,7 @@ export default { ...@@ -190,7 +201,7 @@ export default {
}) })
}, },
getCollectionData(){ getCollectionData(){
getReceiptAccountList({ id: this.id }).then(res => { getReceiptAccountList({ id: this.receiptId }).then(res => {
var n var n
// 收款总计 // 收款总计
var amountList =[] var amountList =[]
......
<template>
<div class="app-container">
<el-descriptions :column="5" >
<el-descriptions-item :label="$t('付款单编号')">{{ form.paymentNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('供应商名称')">{{ form.supplierName }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">
<template >
<span>{{ parseTime(form.createTime, '{y}-{m}-{d}') }}</span>
</template></el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
<el-descriptions-item :label="$t('付款金额')">{{paymentMoney}}{{$t('人民币')}}</el-descriptions-item>
</el-descriptions>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('/financial/paymentDetail?id=' + paymentId)"
>{{ $t('查看付款单')}}</el-button>
</div>
</div>
</template>
<script>
import {
getPaymentApprove,
getPaymentInfoByIds,
getPaymentItem
} from "@/api/ecw/financial";
export default {
props:{
id: [String, Number]
},
data() {
return {
form: {},
list:[],
paymentId:0,
paymentMoney:0
}
},
watch:{
id(){
this.getData()
},
form(){
this.getListData()
},
},
created() {
if(this.id){
this.getData()
}
},
methods: {
getData(){
getPaymentApprove(this.id).then(res => {
if(res.data.paymentId){
this.paymentId = res.data.paymentId
this.getPayableInfo()
}
})
},
getPayableInfo(){
getPaymentInfoByIds({ id: this.paymentId }).then(res => {
this.form = res.data
})
},
getListData(){
getPaymentItem({ id: this.paymentId }).then(res => {
this.list = [...res.data]
const t = this.list.map(v => v.total).reduce((prev, curr) => {
return parseFloat(prev) + parseFloat(curr);
}, 0)
this.paymentMoney = t
})
},
}
}
</script>
<style scoped lang="scss">
.btn{
margin-top: 20px;
}
.app-container {
::v-deep .el-descriptions-item__label {
font-size:16px;
font-weight:600;
}
::v-deep .el-descriptions-item__content {
font-size:16px;
font-weight:600;
}
}
</style>
...@@ -412,13 +412,13 @@ ...@@ -412,13 +412,13 @@
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button> <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button>
</div> --> </div> -->
<div slot="header" class="bpm-title">{{ $t('审核流程') }}</div> <div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
<work-flow xmlkey="merge_order" v-model="selectedUsers"></work-flow> <work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm(0)">{{$t('提交申请')}}</el-button> <el-button type="primary" @click="submitForm(0)">{{$t('提交申请')}}</el-button>
<el-button v-if="id==0||form.state==0" type="primary" :loading="saveBtnLoading" @click="submitForm(1)">{{ $t('保存草稿') }}</el-button> <el-button v-if="id==0||form.state==0" type="primary" :loading="saveBtnLoading" @click="submitForm(1)">{{ $t('保存草稿') }}</el-button>
<el-button v-if="orderData.inWarehouseState==207" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)">{{$t('审核中')}}</el-button> <el-button v-if="orderData.inWarehouseState==207" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)">{{$t('审核中')}}</el-button>
<el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button> <!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">{{$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>
<!-- <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button> --> <!-- <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button> -->
</div> </div>
...@@ -783,7 +783,7 @@ export default { ...@@ -783,7 +783,7 @@ export default {
this.id = this.$route.query.id; this.id = this.$route.query.id;
console.log(this.id) console.log(this.id)
getReceiptInfoByIds({ id: this.id }).then(res => { getReceiptInfoByIds({ id: this.id }).then(res => {
res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss') if(res.data.rateValidateDate) res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
this.form = Object.assign({}, this.form, res.data) this.form = Object.assign({}, this.form, res.data)
}) })
await getInvoicingItem({ id: this.id }).then(res => { await getInvoicingItem({ id: this.id }).then(res => {
...@@ -1284,8 +1284,9 @@ export default { ...@@ -1284,8 +1284,9 @@ export default {
this.saveBtnLoading = true this.saveBtnLoading = true
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1) params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
if (this.id && this.id != 0) { if (this.id && this.id != 0) {
params.updateType = 0
updateReceipt(params).then(res => { updateReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功')); this.$modal.msgSuccess(this.$t('提交成功'));
this.$store.dispatch('tagsView/delCurrentView') this.$store.dispatch('tagsView/delCurrentView')
}).finally(() => { }).finally(() => {
this.saveBtnLoading = false this.saveBtnLoading = false
...@@ -1308,7 +1309,8 @@ export default { ...@@ -1308,7 +1309,8 @@ export default {
this.saveBtnLoading = true this.saveBtnLoading = true
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1) params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
if (this.id && this.id != 0) { if (this.id && this.id != 0) {
if(params.state==0) params.state = 1 // if(params.state==0) params.state = 1
params.updateType = 1
updateReceipt(params).then(res => { updateReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功')); this.$modal.msgSuccess(this.$t('修改成功'));
this.$store.dispatch('tagsView/delCurrentView') this.$store.dispatch('tagsView/delCurrentView')
......
...@@ -249,13 +249,13 @@ ...@@ -249,13 +249,13 @@
</el-form> </el-form>
</el-card> </el-card>
<div slot="header" class="bpm-title">{{ $t('审核流程') }}</div> <div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
<work-flow xmlkey="merge_order" v-model="selectedUsers"></work-flow> <work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm(0)">{{$t('提交申请')}}</el-button> <el-button v-if="id==0||form.state==0" type="primary" @click="submitForm(1)">{{$t('提交申请')}}</el-button>
<el-button v-if="id==0||form.state==0" type="primary" @click="submitForm(1)">{{ $t('保存草稿') }}</el-button> <el-button v-if="id==0||form.state==0" type="primary" @click="submitForm(0)">{{ $t('保存草稿') }}</el-button>
<el-button v-if="orderData.inWarehouseState==207" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)">{{$t('审核中')}}</el-button> <el-button v-if="form.state==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+bpmId)">{{$t('审核中')}}</el-button>
<el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button> <!-- <el-button v-if="form.state==1" plain type="primary" @click="dialogVisible = true">{{$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>
<!-- <div slot="footer" style="margin: 20px 0"> <!-- <div slot="footer" style="margin: 20px 0">
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
:title="$t('提示')" :title="$t('提示')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%"> width="30%">
<span class="cancel_notice">{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}</span> <span class="cancel_notice">{{$t('付款单申请正在审核中,你确定取消付款单申请吗?')}}</span>
<div class="cancel_content"> <div class="cancel_content">
<span>{{$t('取消原因:')}}</span> <span>{{$t('取消原因:')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input> <el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button> <el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="cancelSplit">{{$t('确定')}}</el-button> <el-button type="primary" @click="cancelApproval">{{$t('确定')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
...@@ -473,6 +473,7 @@ export default { ...@@ -473,6 +473,7 @@ export default {
channelList: [], channelList: [],
loading: "", loading: "",
bankData: [], bankData: [],
reason:'',
params: { params: {
page: 1, page: 1,
rows: 20, rows: 20,
...@@ -606,12 +607,13 @@ export default { ...@@ -606,12 +607,13 @@ export default {
handleAdd() { handleAdd() {
this.open = true; this.open = true;
}, },
submitForm() { submitForm(addType) {
this.$refs.form.validate ((valid)=>{ this.$refs.form.validate ((valid)=>{
if (valid) { if (valid) {
this.$refs.forms.validate((val) => { this.$refs.forms.validate((val) => {
if (val) { if (val) {
const params = {...this.form} const params = {...this.form}
params.addType = addType
if (this.list && this.list.length > 0) { if (this.list && this.list.length > 0) {
params.payableReqVOList = [...this.list] params.payableReqVOList = [...this.list]
}else{ }else{
...@@ -624,7 +626,7 @@ export default { ...@@ -624,7 +626,7 @@ export default {
} }
if (this.id && this.id !== '0') { if (this.id && this.id !== '0') {
updatePayment(params).then(res => { updatePayment(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功')); this.$modal.msgSuccess(this.$t('申请成功'));
this.$router.back(); this.$router.back();
}) })
} else { } else {
...@@ -715,6 +717,9 @@ export default { ...@@ -715,6 +717,9 @@ export default {
this.list = this.multipleSelection this.list = this.multipleSelection
} }
this.open = false; this.open = false;
},
cancelApproval(){
}, },
convertCurrency(money) { convertCurrency(money) {
//汉字的数字 //汉字的数字
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" @click="handleAdd(scope.row.id)" v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t('编辑') }}</el-button> <el-button v-if="scope.row.state == 0 ||scope.row.state == 1 || scope.row.state == 3" size="mini" @click="handleAdd(scope.row.id)" v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t('编辑') }}</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" v-hasPermi="['ecw:paymentVoucher:process']" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button> <el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" v-hasPermi="['ecw:paymentVoucher:process']" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:print']" @click="verifyCancelClick(scope.row)">{{ $t('反审核') }}</el-button> <el-button v-if="scope.row.state == 2" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:print']" @click="verifyCancelClick(scope.row)">{{ $t('反审核') }}</el-button>
......
...@@ -257,12 +257,12 @@ ...@@ -257,12 +257,12 @@
<el-table-column :label="$t('操作')" align="center" width="200"> <el-table-column :label="$t('操作')" align="center" width="200">
<template slot-scope="scope"> <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 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="$router.push(`bankDetail?id=`+id+`&bankId=`+scope.row.id)" v-hasPermi="['ecw:payment:detail:detail']">{{ $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="verificationClick(scope.row)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $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="dialogVisible=true" v-hasPermi="['ecw:payment:detail:cancelWriteOff']">{{ $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="editClick(scope.row)" v-hasPermi="['ecw:payment:detail:bankEdit']">{{ $t('编辑') }}</el-button>
<!-- <el-button v-if="scope.row.status == 0" type="text" @click="verificationClick(scope.row)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $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=`+bpmProcessId)" 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>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -441,18 +441,31 @@ ...@@ -441,18 +441,31 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="$t('收款单反核销')" :title="$t('收款单银行实收明细反核销-未提交')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%"> width="30%">
<div class="cancel_content"> <div class="cancel_content">
<span>{{$t('申请理由')}}</span> <span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入取消理由')"></el-input> <el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入理由')"></el-input>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="verificationCancelClick(scope.row)">{{$t('提交反核销')}}</el-button> <el-button type="primary" @click="verificationCancelClick()">{{$t('提交反核销')}}</el-button>
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button> <el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog
:title="$t('取消审核')"
:visible.sync="cancelShow"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<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 @click="cancelShow = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -474,7 +487,10 @@ import { ...@@ -474,7 +487,10 @@ import {
updateReceiptItem, updateReceiptItem,
receiptItemBatchVerification, receiptItemBatchVerification,
receiptItemAllVerification, receiptItemAllVerification,
getReceiptAccountList getReceiptAccountList,
financeReceiptWriteOff,
financeReceiptItemWriteOffNo,
cancelFinanceReceiptItemWriteOff
} 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'
...@@ -521,7 +537,10 @@ export default { ...@@ -521,7 +537,10 @@ export default {
}, },
surplusData:[], surplusData:[],
dialogVisible:false, dialogVisible:false,
reason:'' reason:'',
cancelShow:false,
cancelTitle:'',
cancelReason:'',
} }
}, },
computed: { computed: {
...@@ -810,6 +829,30 @@ export default { ...@@ -810,6 +829,30 @@ export default {
NANtoRMB() { NANtoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100) return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100)
}, },
//显示反核销弹窗
showCancel(index){
this.selectIndex = index
this.reason = ''
this.dialogVisible = true
},
//取消审核弹窗
cancelClick(index){
this.selectIndex = index
this.cancelReason = ''
this.cancelShow = true
},
//取消审核
cancelWriteOffClick(){
if(!this.cancelReason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
var receiptItemId = this.detailed[this.selectIndex].id
cancelFinanceReceiptItemWriteOff({receiptItemId:receiptItemId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
});
},
currencyIdChange(val) { currencyIdChange(val) {
val = Number(val) val = Number(val)
let rate let rate
...@@ -907,18 +950,22 @@ export default { ...@@ -907,18 +950,22 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
verificationCancelClick(row) { //银行明细反核销
const id = row.id; verificationCancelClick() {
if(!this.reason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
const id = this.detailed[this.selectIndex].id
this.$modal this.$modal
.confirm(this.$t('您确认要反核销吗')+'?') .confirm(this.$t('您确认要反核销吗')+'?')
.then(function () { .then(()=>{
return receiptItemVerificationCancel(id); financeReceiptItemWriteOffNo({receiptId:this.id,receiptNo:this.form.receiptNo,receiptItemId:id,remark:this.reason}).then(res=>{
}) this.$message.success(this.$t("提交成功"));
.then(() => { this.dialogVisible = false
this.getList(); });
this.$modal.msgSuccess(this.$t('反核销成功'));
}) })
.catch(() => {}); .catch(() => {this.dialogVisible = false});
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
...@@ -951,7 +998,7 @@ export default { ...@@ -951,7 +998,7 @@ export default {
this.$modal this.$modal
.confirm(this.$t('您确认要全部核销吗'+'?')) .confirm(this.$t('您确认要全部核销吗'+'?'))
.then(() => { .then(() => {
return receiptItemAllVerification(this.id); return financeReceiptWriteOff({receiptId:this.id,receiptNo:form.receiptNo});
}) })
.then(() => { .then(() => {
this.$modal.msgSuccess(this.$t('核销成功')); this.$modal.msgSuccess(this.$t('核销成功'));
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
:type="DICT_TYPE.ECW_RECEIPT_STATE" :type="DICT_TYPE.ECW_RECEIPT_STATE"
:value="scope.row.state" :value="scope.row.state"
/> />
<span :title="$t('说明')"><i class="el-icon-question"></i></span> <span v-if="scope.row.remark" :title="scope.row.remark"><i class="el-icon-question"></i></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('是否开票')" align="center"> <el-table-column :label="$t('是否开票')" align="center">
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="dialogVisible=true" @click="writeOffShow(2,scope.$index)"
>{{ $t('反核销') }}</el-button >{{ $t('反核销') }}</el-button
> >
<el-button <el-button
...@@ -145,15 +145,15 @@ ...@@ -145,15 +145,15 @@
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="dialogVisible=true" @click="writeOffShow(1,scope.$index)"
>{{ $t('反审核') }}</el-button >{{ $t('反审核') }}</el-button
> >
<!-- <el-button <el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6" v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)" @click="cancelClick(scope.$index,1)"
>{{ $t('取消审核') }}</el-button >{{ $t('取消审核') }}</el-button
> >
<el-button <el-button
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)" @click="cancelClick(scope.$index,3)"
>{{ $t('取消反核销审核') }}</el-button >{{ $t('取消反核销审核') }}</el-button
> >
<el-button <el-button
...@@ -169,17 +169,16 @@ ...@@ -169,17 +169,16 @@
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)" @click="cancelClick(scope.$index,2)"
>{{ $t('取消反核销') }}</el-button >{{ $t('取消反审核') }}</el-button
> >
<el-button <el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)" @click="$router.push(`/bpm/process-instance/detail?id=`+scope.row.bmpId)"
>{{ $t('审核详情') }}</el-button >{{ $t('审核详情') }}</el-button
> --> >
<el-button <el-button
v-if="scope.row.state == 5" v-if="scope.row.state == 5"
size="mini" size="mini"
...@@ -243,18 +242,32 @@ ...@@ -243,18 +242,32 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="$t('收款单反核销')" :title="writeOffType==1?$t('收款单反审核'):$t('收款单反核销')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%"> width="30%">
<div class="cancel_content"> <div class="cancel_content">
<span>{{$t('申请理由')}}</span> <span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入取消理由')"></el-input> <el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入理由')"></el-input>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footers">
<el-button type="primary" @click="verificationCancelClick(scope.row)">{{$t('提交反核销')}}</el-button> <el-button v-if="writeOffType==1" type="primary" @click="writeOffClick()">{{$t('提交反审核')}}</el-button>
<el-button v-else type="primary" @click="writeOffClick()">{{$t('提交反核销')}}</el-button>
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button> <el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog
:title="cancelTitle"
:visible.sync="cancelShow"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="cancelReason" :placeholder="$t('请输入取消理由')"></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick()">{{$t('提交')}}</el-button>
<el-button @click="cancelShow = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -267,7 +280,12 @@ import { ...@@ -267,7 +280,12 @@ import {
// receiptVerification, // receiptVerification,
// receiptVerificationCancel, // receiptVerificationCancel,
receiptExportExcel, receiptExportExcel,
deleteReceipt deleteReceipt,
financeReceiptWriteOffNo,
financeApproveNo,
cancelFinanceReceiptApproval,
cancelFinanceReceiptApprovalNo,
cancelFinanceReceiptWriteOffNo
} from "@/api/ecw/financial"; } from "@/api/ecw/financial";
export default { export default {
...@@ -313,7 +331,14 @@ export default { ...@@ -313,7 +331,14 @@ export default {
dateFilter:[], dateFilter:[],
downloading: false, // 导出状态 downloading: false, // 导出状态
dialogVisible:false, dialogVisible:false,
reason:'' reason:'',
writeOffType:1,
writeOffIndex:0,
cancelShow:false,
cancelTitle:'',
cancelReason:'',
cancelIndex:0,
selectIndex:0
}; };
}, },
activated(){ activated(){
...@@ -369,6 +394,76 @@ export default { ...@@ -369,6 +394,76 @@ export default {
// }) // })
// .catch(() => {}); // .catch(() => {});
}, },
//显示取消审核弹窗
cancelClick(index,type){
this.selectIndex = index
this.cancelIndex = type
this.cancelReason = ''
if(this.cancelIndex==1){
this.cancelTitle = this.$t('取消审核')
}else if(this.cancelIndex == 2){
this.cancelTitle = this.$t('取消反审核')
}else{
this.cancelTitle = this.$t('取消反核销审核')
}
this.cancelShow = true
},
//取消审核
cancelWriteOffClick(){
if(!this.cancelReason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
var receiptId = this.list[this.selectIndex].id
if(this.cancelIndex==1){
cancelFinanceReceiptApproval({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
});
}else if(this.cancelIndex ==2){
cancelFinanceReceiptApprovalNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
});
}else{
cancelFinanceReceiptWriteOffNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.cancelShow = false
});
}
},
writeOffClick(){
if(!this.reason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
const receiptIdData = this.list[this.writeOffIndex]
if(this.writeOffType==1){
this.$modal
.confirm(this.$t('您确认要反审核吗')+'?')
.then(()=>{
financeApproveNo({receiptId:receiptIdData.id,receiptNo:receiptIdData.receiptNo,remark:this.reason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.dialogVisible = false
// this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {this.dialogVisible = false});
}else{
this.$modal
.confirm(this.$t('您确认要反核销吗')+'?')
.then(()=>{
financeReceiptWriteOffNo({receiptId:receiptIdData.id,receiptNo:receiptIdData.receiptNo,remark:this.reason}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.dialogVisible = false
// this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {this.dialogVisible = false});
}
},
deleteClick(row) { deleteClick(row) {
const id = row.id; const id = row.id;
this.$modal.confirm(this.$t('是否确认删除该收款单')+'?').then(function() { this.$modal.confirm(this.$t('是否确认删除该收款单')+'?').then(function() {
...@@ -405,6 +500,13 @@ export default { ...@@ -405,6 +500,13 @@ export default {
this.open = true; this.open = true;
this.exportId = id; this.exportId = id;
}, },
//显示反审核反核销弹窗
writeOffShow(type,index){
this.writeOffType = type
this.writeOffIndex = index
this.reason = ''
this.dialogVisible = true
},
submitForm(type) { submitForm(type) {
this.downloading = true this.downloading = true
receiptExportExcel({ id: this.exportId, billType: type }).then((response) => { receiptExportExcel({ id: this.exportId, billType: type }).then((response) => {
...@@ -433,6 +535,11 @@ export default { ...@@ -433,6 +535,11 @@ export default {
justify-content: space-between; justify-content: space-between;
height: 160px; height: 160px;
} }
.dialog-footers{
display: flex;
align-items: center;
justify-content: space-between;
}
.card-title { .card-title {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
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