Commit a8e55e0a authored by dragondean@qq.com's avatar dragondean@qq.com

处理预付异常和财务等bug

parent 9d3b78b1
...@@ -242,30 +242,15 @@ ...@@ -242,30 +242,15 @@
</el-card> </el-card>
<el-card class="card hexiaoCard"> <el-card class="card hexiaoCard">
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<!-- <template v-for="(item, index) in form.receivableDetailList">
<el-descriptions-item :label="index === 0 ? '应收总金额' : ''" :key="index+3">
{{ item.amount }}
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="index + 1" />
</el-descriptions-item>
<el-descriptions-item :key="index">
<template v-if="showCurrencyId !== item.currencyId" slot="label">
汇率(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
</template>
<span v-if="showCurrencyId !== item.currencyId">{{ item.rate }}</span>
</el-descriptions-item>
</template> -->
<!-- <el-descriptions-item>
<template slot="label">
应收总金额(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
</template>
{{ form.receivableTotalAmount }}
</el-descriptions-item> -->
<el-descriptions-item :label="$t('已核销总金额')"> <el-descriptions-item :label="$t('已核销总金额')">
<el-tag>{{ verificationData.usCount.toFixed(6) }}{{$t('美元')}}</el-tag> <!-- <el-tag>{{ verificationData.usCount.toFixed(6) }}{{$t('美元')}}</el-tag>
<el-tag>{{ verificationData.rmbCount.toFixed(6) }}{{$t('人民币')}}</el-tag> <el-tag>{{ verificationData.rmbCount.toFixed(6) }}{{$t('人民币')}}</el-tag>
<el-tag>{{ verificationData.nairaCount.toFixed(6) }}{{$t('奈拉')}}</el-tag> <el-tag>{{ verificationData.nairaCount.toFixed(6) }}{{$t('奈拉')}}</el-tag> -->
<div>
<div v-for="(amount, currency) in writeOffTotal" :key="currency">
{{amount}}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="currency" />
</div>
</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
...@@ -474,6 +459,16 @@ export default { ...@@ -474,6 +459,16 @@ export default {
} }
if (groupList.length === 1) return groupList[0].currencyId if (groupList.length === 1) return groupList[0].currencyId
else return 1 else return 1
},
// 已核销总金额
writeOffTotal(){
let total = {}
this.detailed.forEach(item => {
if(!total[item.currencyId]){
total[item.currencyId] = item.amount
}else total[item.currencyId] = NP.plus(total[item.currencyId], item.amount)
})
return total
} }
}, },
watch: { watch: {
......
...@@ -193,13 +193,13 @@ ...@@ -193,13 +193,13 @@
> >
<el-button v-if="scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3" size="mini" type="text" @click="verificationCancelClick(scope.row)">{{ $t('收款') }}</el-button> <el-button v-if="scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3" size="mini" type="text" @click="verificationCancelClick(scope.row)">{{ $t('收款') }}</el-button>
<el-button v-if="scope.row.state == 0 || scope.row.state == 1" size="mini" type="text" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button> <el-button v-if="scope.row.state == 0 || scope.row.state == 1" size="mini" type="text" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button <!-- <el-button
v-if="scope.row.state != 0" v-if="scope.row.state != 0"
size="mini" size="mini"
type="text" type="text"
@click="toprint(scope.row.id)" @click="toprint(scope.row.id)"
>{{ $t('打印') }}</el-button >{{ $t('打印') }}</el-button
> > -->
<el-button <el-button
v-if="scope.row.state != 0" v-if="scope.row.state != 0"
size="mini" size="mini"
...@@ -231,11 +231,11 @@ ...@@ -231,11 +231,11 @@
<i class="el-icon-close" @click="cancel"></i> <i class="el-icon-close" @click="cancel"></i>
</div> --> </div> -->
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" style="width: 130px" @click="submitForm(1)" <el-button type="primary" style="width: 130px" @click="submitForm(1)" v-loading="downloading">{{ $t('国内账单') }}</el-button
>{{ $t('国内账单') }}</el-button
> >
<el-button <el-button
plain plain
v-loading="downloading"
type="primary" type="primary"
style="width: 130px; margin: 0" style="width: 130px; margin: 0"
@click="submitForm(2)" @click="submitForm(2)"
...@@ -298,6 +298,7 @@ export default { ...@@ -298,6 +298,7 @@ export default {
productRecord: null, productRecord: null,
followUpSalesmanId: null, followUpSalesmanId: null,
}, },
downloading: false, // 导出状态
}; };
}, },
created() { created() {
...@@ -376,11 +377,12 @@ export default { ...@@ -376,11 +377,12 @@ export default {
this.exportId = id; this.exportId = id;
}, },
submitForm(type) { submitForm(type) {
this.downloading = true
receiptExportExcel({ id: this.exportId, billType: type }).then((response) => { receiptExportExcel({ id: this.exportId, billType: type }).then((response) => {
this.$download.excel(response, `${type === 1 ? this.$t('国内账单') : "Debite_note"}.xls`); this.$download.excel(response, `${type === 1 ? this.$t('国内账单') : "Debite_note"}.xls`);
this.open = false; this.open = false;
} }
); ).finally(() => this.downloading = false)
}, },
/** 取消按钮 */ /** 取消按钮 */
// cancel() { // cancel() {
......
...@@ -117,9 +117,6 @@ export default { ...@@ -117,9 +117,6 @@ export default {
id: [String, Number], id: [String, Number],
path: String path: String
}, },
components:{
PrintLandingBill: () => import('./PrintLadingBill.vue')
},
data(){ data(){
return { return {
type: null, type: null,
...@@ -190,15 +187,12 @@ export default { ...@@ -190,15 +187,12 @@ export default {
getChannel(this.order.channelId).then(res => { getChannel(this.order.channelId).then(res => {
this.channel = res.data this.channel = res.data
}) })
}, },/*
getBillService(){
},
getBillOfLandingInProcessing(){ getBillOfLandingInProcessing(){
getBillOfLandingInProcessing({orderId: this.detail.orderId}).then(res => { getBillOfLandingInProcessing({orderId: this.detail.orderId}).then(res => {
console.log(res) console.log(res)
}) })
} } */
} }
} }
</script> </script>
......
<!--拆单审核中的申请信息部分--> <!--拆单审核中的申请信息部分-->
<template> <template>
<div v-if="detail && order"> <div v-if="order">
<el-descriptions :column="4" v-if="order" :colon="false"> <el-descriptions :column="4" v-if="order" :colon="false">
<el-descriptions-item :label="$t('订单号')">{{order.orderNo}}</el-descriptions-item> <el-descriptions-item :label="$t('订单号')">{{order.orderNo}}</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
...@@ -19,10 +19,63 @@ ...@@ -19,10 +19,63 @@
<el-descriptions-item :label="$t('目的仓')" :span="2"> <el-descriptions-item :label="$t('目的仓')" :span="2">
{{order.logisticsInfoDto.destAddressZh}} {{order.logisticsInfoDto.destAddressZh}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-form v-if="orderFee" class="prepay_exception_detail">
<el-row>
<el-form-item :label="$t('订单总金额')+':'">
<span style="margin-left: 8px;" v-for="(item, key) of orderFee.totalAmountList" :key="key">
{{item}}
{{currencyMap[key]}}
</span>
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('应付预付金额')+':'">
<span style="margin-left: 8px;" v-for="(item, key) of orderFee.totalPaymentAmount" :key="key">{{item}}{{currencyMap[key]}}</span>
</el-form-item>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item :label="$t('已核销预付金额')+':'">
<span style="margin-left: 8px;" v-for="(item, key) of orderFee.writeOffAmount" :key="key">{{item}}{{currencyMap[key]}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('已核销预付金额占总金额比例')+':'" label-width="200px">
{{orderFee.writeOffAmountScale}}%
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item :label="$t('预付商品货值')+':'">
{{orderFee.paymentGoodsWorth}} {{$t('人民币')}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('预付商品货值占佣金额比例')+':'" label-width="200px">
{{orderFee.paymentGoodsWorthScale}}%
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item :label="$t('预付商品方数')+':'">
{{orderFee.paymentGoodsVolume}} {{$t('立方米')}}
</el-form-item>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item :label="$t('订单总方数')+':'">
{{orderFee.totalVolume}} {{$t('立方米')}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('预付商品方数占总方数比例')+':'" label-width="200px">
{{orderFee.paymentGoodsVolumeScale}}%
</el-form-item>
</el-col>
</el-row>
</el-form>
</div> </div>
</template> </template>
<script> <script>
...@@ -34,22 +87,16 @@ import Decimal from 'decimal.js' ...@@ -34,22 +87,16 @@ import Decimal from 'decimal.js'
import {getBmpDetailByBusinessId} from '@/api/ecw/orderException' import {getBmpDetailByBusinessId} from '@/api/ecw/orderException'
export default { export default {
name: 'OrderApprovalDetail', name: 'PrepayExceptionDetail',
props:{ props:{
id: [String, Number], id: [String, Number],
path: String path: String
}, },
components:{
PrintLandingBill: () => import('./PrintLadingBill.vue')
},
data(){ data(){
return { return {
type: null, orderFee: null,
detail: null,
order: null, order: null,
channel: null, channel: null,
ShowLandingBill: false,
unitList:[], unitList:[],
currencyList:[], currencyList:[],
} }
...@@ -58,14 +105,14 @@ export default { ...@@ -58,14 +105,14 @@ export default {
id(){ id(){
this.getData() this.getData()
}, },
detail(){
this.getOrder()
},
order(){ order(){
if(this.order.channelId){ if(this.order.channelId){
this.getChannel() this.getChannel()
} }
}, },
orderFee(){
}
}, },
computed:{ computed:{
currencyMap(){ currencyMap(){
...@@ -84,6 +131,7 @@ export default { ...@@ -84,6 +131,7 @@ export default {
} }
}, },
created(){ created(){
getCurrencyList().then(res => this.currencyList = res.data)
if(this.id){ if(this.id){
this.getData() this.getData()
} }
...@@ -92,28 +140,19 @@ export default { ...@@ -92,28 +140,19 @@ export default {
Decimal, Decimal,
getData(){ getData(){
getBmpDetailByBusinessId(this.id).then(res => { getBmpDetailByBusinessId(this.id).then(res => {
this.type = res.data.type this.orderFee = res.data
this.detail = JSON.parse(res.data.details) if(res.data.orderId){
}) getOrder(res.data.orderId).then(res => {
},
getOrder(){
getOrder(this.detail.orderId).then(res => {
this.order = res.data this.order = res.data
}) })
}
})
}, },
getChannel(){ getChannel(){
getChannel(this.order.channelId).then(res => { getChannel(this.order.channelId).then(res => {
this.channel = res.data this.channel = res.data
}) })
}, },
getBillService(){
},
getBillOfLandingInProcessing(){
getBillOfLandingInProcessing({orderId: this.detail.orderId}).then(res => {
console.log(res)
})
}
} }
} }
</script> </script>
...@@ -128,4 +167,7 @@ export default { ...@@ -128,4 +167,7 @@ export default {
.bold{ .bold{
font-weight: bold; font-weight: bold;
} }
::v-deep .prepay_exception_detail .el-form-item{
margin-bottom: 0;
}
</style> </style>
\ No newline at end of file
...@@ -268,21 +268,24 @@ ...@@ -268,21 +268,24 @@
</div> </div>
</el-form> </el-form>
</el-card> </el-card>
<!-- 只有不需要预付才需要审核 -->
<template v-if="showWorkFlow">
<div class="page-title">审批流程</div>
<work-flow xmlkey="commission_config" v-model="handlerParams.ccIds" />
</template>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<template v-if="orderExceptionData.bpmStatus == 1"> <!-- bpmStatus
异常流程状态,1处理中2通过3不通过4已取消
待审核可能没有bpmStatus字段
-->
<template v-if="orderExceptionData.bpmStatus == 1 || (orderExceptionData.bpmId && !orderExceptionData.bpmStatus)">
<el-button type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderExceptionData.bpmId)">{{$t('审核中')}}</el-button> <el-button type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderExceptionData.bpmId)">{{$t('审核中')}}</el-button>
<el-button plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button> <el-button plain type="primary" @click="cancelAudit">{{$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>
</template> </template>
<template v-else> <template v-else>
<div v-if="orderExceptionData.orderExceptionType!='order_pay_exception'">
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
</div>
<div v-if="orderExceptionData.orderExceptionType=='order_pay_exception'&&!orderExceptionData.bpmId">
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button> <el-button type="primary" @click="submitForm">{{$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>
</template> </template>
</div> </div>
</div> </div>
...@@ -295,11 +298,12 @@ ...@@ -295,11 +298,12 @@
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById} from "@/api/ecw/orderException" import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById} from "@/api/ecw/orderException"
import {getFirstReceivableListByOrderId} from '@/api/ecw/financial' import {getFirstReceivableListByOrderId} from '@/api/ecw/financial'
import WorkFlow from '@/components/WorkFlow'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
export default { export default {
name: "PrepayDeal", name: "PrepayDeal",
components: { components: {
FileUpload FileUpload, WorkFlow
}, },
data() { data() {
return { return {
...@@ -325,6 +329,7 @@ ...@@ -325,6 +329,7 @@
preException:[], preException:[],
orderFee:[], orderFee:[],
currencyList:[], currencyList:[],
showWorkFlow: false, // 是否显示工作流
}; };
}, },
created() { created() {
...@@ -336,6 +341,13 @@ ...@@ -336,6 +341,13 @@
} }
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
}, },
watch:{
'handlerParams.orderExceptionHandlerResult'(val){
if(val == 'no_pay'){
this.showWorkFlow = true
}
}
},
computed: { computed: {
currencyMap(){ currencyMap(){
let map = {} let map = {}
...@@ -399,11 +411,11 @@ ...@@ -399,11 +411,11 @@
// }) // })
}); });
}, },
getShopData(id){ /* getShopData(id){
getOrderItemById(id).then(res=>{ getOrderItemById(id).then(res=>{
this.shopData = res.data this.shopData = res.data
}) })
}, }, */
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
...@@ -421,7 +433,7 @@ ...@@ -421,7 +433,7 @@
} }
handlerExceptionByExceptionId(this.handlerParams).then(res=>{ handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess(this.$t('提交成功')); this.$modal.msgSuccess(this.$t('提交成功'));
this.$store.dispatch('tagsView/delCurrentView') this.$redirect('/order/pending?id=' + this.orderData.orderId)
}) })
}, },
/** 跟进按钮操作 */ /** 跟进按钮操作 */
...@@ -433,7 +445,18 @@ ...@@ -433,7 +445,18 @@
} }
}); });
}, },
// 取消审核
cancelAudit(){
this.$prompt("请输入取消原因", {
inputPattern: /[\S]+/,
inputErrorMessage: '不能为空'
}).then(({value}) => {
return cancelProcessInstance(this.orderExceptionData.bpmId, value)
})
.then(res => {
this.getList()
})
}
} }
}; };
</script> </script>
...@@ -458,6 +481,6 @@ ...@@ -458,6 +481,6 @@
width: 60%; width: 60%;
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: space-between; /* justify-content: space-between; */
} }
</style> </style>
\ No newline at end of file
...@@ -262,7 +262,7 @@ export default { ...@@ -262,7 +262,7 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
id: undefined, /* id: undefined,
parentId: 0, parentId: 0,
name: undefined, name: undefined,
enName: undefined, enName: undefined,
...@@ -272,9 +272,9 @@ export default { ...@@ -272,9 +272,9 @@ export default {
sort: undefined, sort: undefined,
keepalive: false, keepalive: false,
redirect: undefined, redirect: undefined,
status: CommonStatusEnum.ENABLE status: CommonStatusEnum.ENABLE */
}; };
this.resetForm("form"); /* this.resetForm("form"); */
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
......
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