Commit 105600e0 authored by 我在何方's avatar 我在何方

财务收款单审核相关页面

parent 9a45e04e
<template>
<div>
<div class="app-container">
<el-descriptions :column="5" >
<el-descriptions-item :label="$t('收款单编号')">{{ form.receiptNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</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('期望收款金额')">
<template>
<div v-for="itemAmount in collectionAmount" :key="itemAmount.currencyNameZh">{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}: {{ itemAmount.amount}}</div>
</template>
</el-descriptions-item>
</el-descriptions>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item >
<template slot="label">
{{ $t('实收已核销总金额') }}
<span :title="$t('所有银行收款明细中状态为已核销的实收金额,币种根据实收币种分类统计')"><i class="el-icon-question"></i></span>
</template>
<template v-if="!Object.keys(writeOffTotal).length">
0
</template>
<div v-else>
<div v-for="(amount, currency) in writeOffTotal" :key="currency">
{{amount}}{{getCurrencyLabel(currency)}}
</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
{{ $t('核销基准币种已核销总金额') }}{{getCurrencyLabel(showCurrencyId)}}
<span :title="$t('为了方便统计收款单核销比例,将所有银行收款明细中状态为已核销的实收金额,转换为核销基准币种的金额累加')"><i class="el-icon-question"></i></span>
</template>
{{ writeOffAmount}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
{{ $t('总核销比例') }}{{getCurrencyLabel(showCurrencyId)}}
<span :title="$t('总核销比例=核销基准币种已核销总金额/核销基准币种应收总金额')"><i class="el-icon-question"></i></span>
</template>
{{ WriteOffProportion }}%
</el-descriptions-item>
</el-descriptions>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('receiptDetail?id=' + id)"
>{{ $t('查看收款单')}}</el-button>
</div>
</div>
</template>
<script>
import { getCustomer } from '@/api/ecw/customer'
import {
getReceiptInfoByIds,
getInvoicingItem,
getReceiptAccountList,
getReceivableItem
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default {
props:{
id: [String, Number]
},
data() {
return {
form: {},
collectionAmount: [],
currencyList:[],
list:[],
writeOffAmounts:0,
detailed:[],
showCurrencyId:0,
}
},
watch:{
id(){
this.getCurrencyData()
},
currencyList(){
this.getReceiptInfo()
},
form(){
this.getListData()
},
list(){
this.getList()
this.getCollectionData()
}
},
created() {
if(this.id){
this.getCurrencyData()
}
},
computed: {
// 已核销总金额
writeOffTotal(){
let total = {}
this.detailed.forEach(item => {
if(item.status){
if(!total[item.currencyId]){
total[item.currencyId] = item.amount
}else total[item.currencyId] = NP.plus(total[item.currencyId], item.amount)
}
})
return total
},
// 已核销总金额
writeOffAmount(){
let total = 0
this.detailed.forEach(item => {
if(item.status){
total = NP.plus(total, item.writeOffAmount)
}
})
return total.toFixed(2)
},
WriteOffProportion(){
let total = 0
if(!this.writeOffAmounts) return 0
let amountTotal = this.writeOffAmounts
this.detailed.forEach(item => {
if(item.status){
total = NP.plus(total, item.writeOffAmount)
}
})
let portion = NP.divide(total,amountTotal)
return (portion*100).toFixed(2)
}
},
methods: {
getList() {
getReceivableItem({ id: this.id }).then(res => {
this.detailed = res.data.map(v => ({
...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
accountNo: +v.accountNo,
rate:parseFloat(v.rate).toFixed(6),
attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : []
}))
})
},
// 获取汇率
getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
},
getReceiptInfo(){
getReceiptInfoByIds({ id: this.id }).then(res => {
this.form = res.data
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
})
},
getListData(){
getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
let fieldList = [];
let groupList=[];
this.list.map((element)=>{
if(fieldList.indexOf(element['currencyId'])===-1){
fieldList.push(element['currencyId'])
}
})
for(let i=0;i<fieldList.length;i++){
let arr = this.list.filter((element)=>{
return element['currencyId']===fieldList[i];
})
groupList.push({
currencyId:arr[0].currencyId,
list:arr
})
}
this.showCurrencyId = 1
if (groupList.length === 1) this.showCurrencyId = groupList[0].currencyId
})
},
getCollectionData(){
getReceiptAccountList({ id: this.id }).then(res => {
var n
// 收款总计
var amountList =[]
this.currencyList.forEach((item,index)=>{
var nairaListByList = this.list.filter(v => v.currencyId === item.id)
if(nairaListByList.length>0){
var discountNaira = nairaListByList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
n = res.data.find(v => v.currencyId == item.id)
n && (n.discountTotal = discountNaira)
}
var dollarList = res.data.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar})
}
})
this.writeOffAmounts = res.data.reduce((total, currentValue) => NP.plus(total, currentValue.writeOffAmount || 0), 0),
console.log(this.writeOffAmounts)
this.$set(this,'collectionAmount',amountList)
})
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
return ''
},
}
}
</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>
<template>
<div class="app-container">
<el-descriptions :column="5" >
<el-descriptions-item :label="$t('收款单编号')">{{ form.receiptNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</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('期望收款金额')">
<template>
<div v-for="itemAmount in collectionAmount" :key="itemAmount.currencyNameZh">{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}: {{ itemAmount.amount}}</div>
</template>
</el-descriptions-item>
</el-descriptions>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('receiptDetail?id=' + id)"
>{{ $t('查看收款单')}}</el-button>
</div>
</div>
</template>
<script>
import { getCustomer } from '@/api/ecw/customer'
import {
getReceiptInfoByIds,
getInvoicingItem,
getReceiptAccountList
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default {
props:{
id: [String, Number]
},
data() {
return {
form: {},
collectionAmount: [],
currencyList:[],
list:[]
}
},
watch:{
id(){
this.getCurrencyData()
},
currencyList(){
this.getReceiptInfo()
},
form(){
this.getListData()
},
list(){
this.getCollectionData()
}
},
created() {
if(this.id){
this.getCurrencyData()
}
},
methods: {
// 获取汇率
getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
},
getReceiptInfo(){
getReceiptInfoByIds({ id: this.id }).then(res => {
this.form = res.data
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
})
},
getListData(){
getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
})
},
getCollectionData(){
getReceiptAccountList({ id: this.id }).then(res => {
var n
// 收款总计
var amountList =[]
this.currencyList.forEach((item,index)=>{
var nairaListByList = this.list.filter(v => v.currencyId === item.id)
if(nairaListByList.length>0){
var discountNaira = nairaListByList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
n = res.data.find(v => v.currencyId == item.id)
n && (n.discountTotal = discountNaira)
}
var dollarList = res.data.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar})
}
})
this.$set(this,'collectionAmount',amountList)
})
}
}
}
</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>
<template>
<div class="app-container">
<el-descriptions :column="4" >
<el-descriptions-item :label="$t('收款单编号')">{{ form.receiptNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</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>
<div class="btn">
<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('收款账户')" align="center" prop="accountName" />
<el-table-column :label="$t('实收金额')" align="center" prop="amount" />
<el-table-column :label="$t('实收币种')" align="center" prop="marks">
<template slot-scope="scope">
{{getCurrencyLabel(scope.row.currencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="rate" />
<el-table-column align="center" prop="writeOffAmount" >
<template #header>
{{ $t('兑核销基准金额') }}{{getCurrencyLabel(showCurrencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('实收日期')" align="center" prop="amountDate">
</el-table-column>
<el-table-column :label="$t('水单号')" align="center" prop="billNo" />
<el-table-column :label="$t('水单附件')" align="center" prop="attr">
<template slot-scope="scope" v-if="scope.row.attr">
<div v-for="(v, i) in scope.row.attr" :key="i"><el-link :href="v.url" type="primary" target="_blank">{{ v.name }}</el-link></div>
</template>
</el-table-column>
</el-table>
</div>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('receiptDetail?id=' + id)"
>{{ $t('查看收款单')}}</el-button>
<el-button
size="mini"
type="primary"
@click="openAddDialog=true"
>{{ $t('查看银行实收明细')}}</el-button>
</div>
<el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="this.$t('银行实收明细详情')" width="50%" append-to-body>
<div style="padding: 0 24px">
<el-form ref="addForm" :model="addForm" label-width="250px">
<el-form-item :label="$t('收款单号')+':'">{{ form.receiptNo }}</el-form-item>
<el-form-item :label="$t('剩余应收金额')+':'">
<template >
<div v-if="surplusData.length==0">0</div>
<div v-else>
<div v-for="(amount, currency) in surplusData" :key="currency">
<span v-if="amount"> {{amount}}{{getCurrencyLabel(currency)}}</span>
</div>
</div>
</template>
</el-form-item>
<el-form-item :label="$t('收款账户')+':'" prop="accountNo">
<span>{{ addForm.accountNo }}</span>
</el-form-item>
<el-form-item :label="$t('实收日期')+':'" prop="amountDate">
<span>{{ addForm.amountDate }}</span>
</el-form-item>
<div style="display: flex;">
<el-form-item :label="$t('实收')+':'" prop="amount"><span>{{ addForm.amount }}</span></el-form-item>
<el-form-item
label-width="0px"
prop="currencyId"
>
<el-select
v-model="addForm.currencyId"
:placeholder="$t('请选择')"
:disabled="true"
@change="val => currencyIdChange(val)"
>
<el-option
v-for="item in currencyList"
:key="item.id"
:label="$i18n.locale=='zh_CN'?item.titleZh:item.titleEn"
:value="item.id"
/>
</el-select>
<!-- <dict-selector v-if="!isView" :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" v-model="addForm.currencyId" @change="val => currencyIdChange(val)"/> -->
<!-- <span v-else>{{ addForm.currencyId }}</span> -->
<!-- <dict-tag v-else :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="addForm.currencyId" /> -->
</el-form-item>
</div>
<el-form-item
v-if="showCurrencyId != addForm.currencyId"
prop="rate"
>
<template slot="label">
<span :title="$t('实收币种与核销基准币种一样时,无需填写汇率,不一样需要填写汇率')">{{ $t('兑核销基准币种汇率') }}{{getCurrencyLabel(showCurrencyId)}}</span>
</template>
<span>{{ addForm.rate}}</span>
</el-form-item>
<el-form-item
v-if="showCurrencyId != addForm.currencyId"
>
<template slot="label">
{{ $t('兑核销基准币种金额') }}{{getCurrencyLabel(showCurrencyId)}}:
</template>
<span>{{ addForm.writeOffAmount?parseFloat(addForm.writeOffAmount).toFixed(6):'' }}</span>
</el-form-item>
<el-form-item
:label="$t('水单附件')+':'"
prop="attr"
>
<div v-if="addForm.attr.length>0">
<div v-for="(v, i) in addForm.attr" :key="i"><el-link :href="v.url" type="primary" target="_blank">{{ v.name }}</el-link></div>
</div>
<div v-else>{{$t('')}}</div>
</el-form-item>
<el-form-item :label="$t('水单号')+':'" prop="billNo">
<span>{{ addForm.billNo }}</span>
</el-form-item>
</el-form>
</div>
</el-dialog>
</div>
</template>
<script>
import { getCustomer } from '@/api/ecw/customer'
import {
getReceiptInfoByIds,
getReceivableItem,
getInvoicingItem,
getReceiptAccountList
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default {
props:{
id: [String, Number],
detailId:[String, Number]
},
data() {
return {
form: {},
currencyList:[],
list:[],
detailed: [],
showCurrencyId:0,
surplusData:[],
openAddDialog:false,
collectionAmount: [],
addForm:{}
}
},
watch:{
id(){
this.getCurrencyData()
},
currencyList(){
this.getReceiptInfo()
},
form(){
this.getList()
this.getListData()
},
},
created() {
if(this.id){
this.getCurrencyData()
}
},
methods: {
// 获取汇率
getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
},
getList() {
getReceivableItem({ id: this.id }).then(res => {
this.detailed = res.data.map(v => ({
...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
accountNo: +v.accountNo,
rate:parseFloat(v.rate).toFixed(6),
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)
console.log(this.addForm)
this.getCollectionData()
})
},
getReceiptInfo(){
getReceiptInfoByIds({ id: this.id }).then(res => {
this.form = res.data
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
})
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
return ''
},
getListData(){
getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
let fieldList = [];
let groupList=[];
this.list.map((element)=>{
if(fieldList.indexOf(element['currencyId'])===-1){
fieldList.push(element['currencyId'])
}
})
for(let i=0;i<fieldList.length;i++){
let arr = this.list.filter((element)=>{
return element['currencyId']===fieldList[i];
})
groupList.push({
currencyId:arr[0].currencyId,
list:arr
})
}
this.showCurrencyId = 1
if (groupList.length === 1) this.showCurrencyId = groupList[0].currencyId
})
},
getCollectionData(){
getReceiptAccountList({ id: this.id }).then(res => {
var n
// 收款总计
var amountList =[]
this.currencyList.forEach((item,index)=>{
var nairaListByList = this.list.filter(v => v.currencyId === item.id)
if(nairaListByList.length>0){
var discountNaira = nairaListByList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
n = res.data.find(v => v.currencyId == item.id)
n && (n.discountTotal = discountNaira)
}
var dollarList = res.data.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar})
}
})
this.$set(this,'collectionAmount',amountList)
this.handleAddReceiptItem()
})
},
handleAddReceiptItem() {
// 已收
let recepted = []
this.detailed.forEach(item => {
if(!recepted[item.currencyId]){
recepted[item.currencyId] = item.amount
}else recepted[item.currencyId] = NP.plus(recepted[item.currencyId], item.amount)
})
// 应收
let collom = []
// 从期望收费金额中提取应收币种和金额
this.collectionAmount.forEach(item => {
collom[item.currencyId] = item.amount
})
console.log(recepted)
recepted.forEach((amount,currency)=>{
if(amount){
if(collom[currency]){
if((collom[currency]-amount)!=0) this.surplusData[currency] = +parseFloat((collom[currency]-amount).toPrecision(12))
}else{
this.surplusData[currency] = -amount
}
}
})
console.log(collom)
collom.forEach((amount,currency)=>{
if(amount){
if(!this.surplusData[currency]){
if(recepted[currency]){
if((amount-recepted[currency])!=0) this.surplusData[currency] = +parseFloat((amount-recepted[currency]).toPrecision(12))
}else{
this.surplusData[currency] = amount
}
}
}
})
console.log(this.surplusData)
},
}
}
</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>
...@@ -128,7 +128,17 @@ ...@@ -128,7 +128,17 @@
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> --> <!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount"> <el-table-column :label="$t('税率')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('不含税金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('含税金额')" align="center" prop="totalAmount">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span> <span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
...@@ -180,6 +190,7 @@ ...@@ -180,6 +190,7 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> --> </el-descriptions> -->
</el-card> </el-card>
<el-card v-if="showInvoice" class="card"> <el-card v-if="showInvoice" class="card">
<div slot="header" class="card-title">{{ $t('开票资料') }}</div> <div slot="header" class="card-title">{{ $t('开票资料') }}</div>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
...@@ -395,11 +406,37 @@ ...@@ -395,11 +406,37 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
</el-form> </el-form>
<div slot="footer" style="margin: 20px 0"> <!-- <div slot="footer" style="margin: 20px 0">
<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-else type="primary" :loading="saveBtnLoading" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('返回') }}</el-button> <el-button v-else type="primary" :loading="saveBtnLoading" @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 slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
<work-flow xmlkey="merge_order" v-model="selectedUsers"></work-flow>
<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" :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" plain type="primary" @click="dialogVisible = true">{{$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> -->
</div>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}</span>
<div class="cancel_content">
<span>{{$t('取消原因:')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
</div> </div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="cancelSplit">{{$t('确定')}}</el-button>
</span>
</el-dialog>
<el-dialog <el-dialog
:visible.sync="open" :visible.sync="open"
:title="$t('添加未收客户款项')" :title="$t('添加未收客户款项')"
...@@ -667,11 +704,12 @@ import ret from "bluebird/js/release/util"; ...@@ -667,11 +704,12 @@ import ret from "bluebird/js/release/util";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { getUserProfile } from "@/api/system/user"; import { getUserProfile } from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse' import {getWarehouseList} from '@/api/ecw/warehouse'
import WorkFlow from '@/components/WorkFlow/'
export default { export default {
name: "CreatCollection", name: "CreatCollection",
components: { components: {
CustomerSelector, CustomerSelector,WorkFlow
}, },
data() { data() {
return { return {
...@@ -718,7 +756,9 @@ export default { ...@@ -718,7 +756,9 @@ export default {
selectListRow: {}, selectListRow: {},
selectListIndex: 0, selectListIndex: 0,
flag: false, flag: false,
warehouseList:[] warehouseList:[],
selectedUsers:[],
dialogVisible:false
}; };
}, },
async created() { async created() {
...@@ -1332,4 +1372,10 @@ export default { ...@@ -1332,4 +1372,10 @@ export default {
width: 30%; width: 30%;
} }
} }
.bpm-title{
font-size: 20px;
font-weight: bold;
color:#666;
margin:20px 0;
}
</style> </style>
...@@ -248,17 +248,35 @@ ...@@ -248,17 +248,35 @@
</el-descriptions> </el-descriptions>
</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="selectedUsers"></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 type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('关闭') }}</el-button> <el-button v-if="id==0||form.state==0" type="primary" @click="submitForm(1)">{{ $t('保存草稿') }}</el-button>
</div> --> <el-button v-if="orderData.inWarehouseState==207" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)">{{$t('审核中')}}</el-button>
<div slot="footer" style="margin: 20px 0"> <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>
</div>
<!-- <div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitDraft">{{ $t('保 存') }}</el-button> <el-button type="primary" @click="submitDraft">{{ $t('保 存') }}</el-button>
<el-button type="primary" @click="submitForm">{{id==0?$t('新增'):$t('编辑')}}</el-button> <el-button type="primary" @click="submitForm">{{id==0?$t('新增'):$t('编辑')}}</el-button>
</div> -->
<el-dialog
:title="$t('提示')"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}</span>
<div class="cancel_content">
<span>{{$t('取消原因:')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
</div> </div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="cancelSplit">{{$t('确定')}}</el-button>
</span>
</el-dialog>
<el-dialog <el-dialog
:visible.sync="open" :visible.sync="open"
:title="$t('添加未付供应商款项')" :title="$t('添加未付供应商款项')"
...@@ -470,7 +488,8 @@ export default { ...@@ -470,7 +488,8 @@ export default {
allSupplier: [], allSupplier: [],
currencyList: [], currencyList: [],
warehouseList:[], warehouseList:[],
selectedUsers:[] selectedUsers:[],
dialogVisible:false
}; };
}, },
async created() { async created() {
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionRate }}</span> <span v-if="scope.row.type !== 'total'">{{ scope.row.collectionRate }}</span>
<span v-else>{{ $t('期望收费金额') }} <span v-else>{{ $t('期望收费金额') }}
<span :title="$t('导出账单给客户时显示的收款金额与币种')"><i class="el-icon-question"></i></span> <span :title="$t('导出账单给客户时显示的收款金额与币种')"><i class="el-icon-question"></i></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -257,10 +257,12 @@ ...@@ -257,10 +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="detailClick(scope.row)" v-hasPermi="['ecw:payment:detail:detail']">{{ $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 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="verificationClick(scope.row)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t('核销') }}</el-button>
<el-button v-if="scope.row.status == 1" type="text" @click="verificationCancelClick(scope.row)" v-hasPermi="['ecw:payment:detail:cancelWriteOff']">{{ $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 == 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="$router.push(`/bpm/process-instance/detail?id=`+bpmProcessId)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t('审核详情') }}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -309,6 +311,7 @@ ...@@ -309,6 +311,7 @@
<el-button type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button> <el-button type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button> <el-button type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
</div> </div>
<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">
...@@ -437,6 +440,19 @@ ...@@ -437,6 +440,19 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
:title="$t('收款单反核销')"
:visible.sync="dialogVisible"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入取消理由')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="verificationCancelClick(scope.row)">{{$t('提交反核销')}}</el-button>
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -446,6 +462,7 @@ import { getBankAccountPage } from "@/api/ecw/bankAccount"; ...@@ -446,6 +462,7 @@ import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { listSimpleDepts } from "@/api/system/dept"; import { listSimpleDepts } from "@/api/system/dept";
import { getCustomer } from '@/api/ecw/customer' import { getCustomer } from '@/api/ecw/customer'
import { import {
getReceiptInfoByIds, getReceiptInfoByIds,
getInvoicingItem, getInvoicingItem,
...@@ -464,6 +481,7 @@ import NP from 'number-precision' ...@@ -464,6 +481,7 @@ import NP from 'number-precision'
export default { export default {
data() { data() {
return { return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/app-api/file/upload", // 上传的图片服务器地址 uploadFileUrl: process.env.VUE_APP_BASE_API + "/app-api/file/upload", // 上传的图片服务器地址
...@@ -501,7 +519,9 @@ export default { ...@@ -501,7 +519,9 @@ export default {
rmbAmount: 0, rmbAmount: 0,
nairaAmount: 0 nairaAmount: 0
}, },
surplusData:[] surplusData:[],
dialogVisible:false,
reason:''
} }
}, },
computed: { computed: {
...@@ -1064,4 +1084,15 @@ export default { ...@@ -1064,4 +1084,15 @@ export default {
width: 22%; width: 22%;
} }
} }
.cancel_content{
display: flex;
// align-items: center;
flex-direction: column;
// padding-top: 20px;
}
.cancel_content span{
font-size: 16px;
font-weight:600;
margin-bottom:10px
}
</style> </style>
...@@ -245,6 +245,7 @@ ...@@ -245,6 +245,7 @@
:limit.sync="queryParams.rows" :limit.sync="queryParams.rows"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
...@@ -260,7 +261,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse' ...@@ -260,7 +261,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
export default { export default {
name: "EcwFinancialReceivable", name: "EcwFinancialReceivable",
components: { components: {
CustomerSelector, CustomerSelector
}, },
data() { data() {
return { return {
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +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>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('是否开票')" align="center"> <el-table-column :label="$t('是否开票')" align="center">
...@@ -136,9 +137,49 @@ ...@@ -136,9 +137,49 @@
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)" @click="dialogVisible=true"
>{{ $t('反核销') }}</el-button >{{ $t('反核销') }}</el-button
> >
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="dialogVisible=true"
>{{ $t('反审核') }}</el-button
>
<!-- <el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)"
>{{ $t('取消审核') }}</el-button
>
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)"
>{{ $t('取消反核销审核') }}</el-button
>
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)"
>{{ $t('取消反核销') }}</el-button
>
<el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)"
>{{ $t('审核详情') }}</el-button
> -->
<el-button <el-button
v-if="scope.row.state == 5" v-if="scope.row.state == 5"
size="mini" size="mini"
...@@ -201,6 +242,19 @@ ...@@ -201,6 +242,19 @@
> >
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
:title="$t('收款单反核销')"
:visible.sync="dialogVisible"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入取消理由')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="verificationCancelClick(scope.row)">{{$t('提交反核销')}}</el-button>
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -258,6 +312,8 @@ export default { ...@@ -258,6 +312,8 @@ export default {
}, },
dateFilter:[], dateFilter:[],
downloading: false, // 导出状态 downloading: false, // 导出状态
dialogVisible:false,
reason:''
}; };
}, },
activated(){ activated(){
...@@ -381,4 +437,13 @@ export default { ...@@ -381,4 +437,13 @@ export default {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.cancel_content{
display: flex;
flex-direction: column;
}
.cancel_content span{
font-size: 16px;
font-weight:600;
margin-bottom:10px
}
</style> </style>
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