Commit 77de6e61 authored by 我在何方's avatar 我在何方

不可出渠道异常完善

parent 29a25edf
...@@ -121,3 +121,12 @@ export function getOrderExcptionResult(query) { ...@@ -121,3 +121,12 @@ export function getOrderExcptionResult(query) {
params: query params: query
}) })
} }
// 根据订单ID,异常ID获取价格
export function getOrderExceptionChannelPriceList(data) {
return request({
url: '/order/exception-channel-price/getOrderExceptionChannelPriceList',
method: 'post',
data: data
})
}
\ No newline at end of file
...@@ -102,7 +102,7 @@ import {getUnitList} from "@/api/ecw/unit" ...@@ -102,7 +102,7 @@ import {getUnitList} from "@/api/ecw/unit"
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import {getProductAttrList} from '@/api/ecw/productAttr' import {getProductAttrList} from '@/api/ecw/productAttr'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
import {getExceptionById} from '@/api/ecw/orderException' import {getExceptionById,getOrderExceptionChannelPriceList} from '@/api/ecw/orderException'
export default { export default {
name: 'NotShipingChannel', name: 'NotShipingChannel',
...@@ -147,6 +147,7 @@ export default { ...@@ -147,6 +147,7 @@ export default {
} }
}, },
async created(){ async created(){
await getUnitList().then(res => this.unitList = res.data)
await getCurrencyList().then(res => this.currencyList = res.data) await getCurrencyList().then(res => this.currencyList = res.data)
this.productAttrList = (await getProductAttrList()).data this.productAttrList = (await getProductAttrList()).data
if(this.id){ if(this.id){
...@@ -161,6 +162,7 @@ export default { ...@@ -161,6 +162,7 @@ export default {
if(res.data.orderId){ if(res.data.orderId){
getOrder(res.data.orderId).then(res => { getOrder(res.data.orderId).then(res => {
this.order = res.data this.order = res.data
this.getExceptionPriceList(res.data.orderId)
}) })
} }
}) })
...@@ -182,6 +184,25 @@ export default { ...@@ -182,6 +184,25 @@ export default {
this.channel = res.data this.channel = res.data
}) })
}, },
getExceptionPriceList(orderId){
let that = this
getOrderExceptionChannelPriceList({orderId:orderId,exceptionId:parseInt(that.id)}).then(res=>{
if(res.code==0&&res.data.length>0){
that.order.orderItemVOList.map(v=>{
var item = res.data.find(vs=>vs.orderItemId==v.orderItemId)
if(item){
v.oneSeaFreight = item.freightFee
v.seaFreightCurrency = item.freightCurrencyId
v.seaFreightVolume = item.freightUnitId
v.oneClearanceFreight = item.clearanceFee
v.clearanceFreightCurrency = item.clearanceCurrencyId
v.clearanceFreightVolume = item.clearanceUnitId
}
})
}
})
}
} }
} }
</script> </script>
......
...@@ -530,47 +530,47 @@ ...@@ -530,47 +530,47 @@
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType"></dict-tag> <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('填单箱数')" prop="num" min-width="60" /> <el-table-column :label="$t('填单箱数')" align="center" prop="num" min-width="60" />
<!-- v2.0 入仓特性异常 --> <!-- v2.0 入仓特性异常 -->
<el-table-column :label="$t('填单特性')" prop="prodAttrIds" min-width="60"> <el-table-column :label="$t('填单特性')" align="center" prop="prodAttrIds" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{getProdAtrr(scope.row.prodAttrIds)}} {{getProdAtrr(scope.row.prodAttrIds)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('入仓箱数')" min-width="60"> <el-table-column :label="$t('入仓箱数')" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}} {{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}
</template> </template>
</el-table-column> </el-table-column>
<!-- v2.0 入仓特性异常 --> <!-- v2.0 入仓特性异常 -->
<el-table-column :label="$t('入仓特性')" prop="num" min-width="60"> <el-table-column :label="$t('入仓特性')" align="center" prop="num" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.warehouseInInfoVO&&scope.row.warehouseInInfoVO.prodAttrIds?getProdAtrr(scope.row.warehouseInInfoVO.prodAttrIds):''}} {{scope.row.warehouseInInfoVO&&scope.row.warehouseInInfoVO.prodAttrIds?getProdAtrr(scope.row.warehouseInInfoVO.prodAttrIds):''}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('方数')" prop="volume" min-width="30"> <el-table-column :label="$t('方数')" align="center" prop="volume" min-width="30">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}} {{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('重量')" prop="weight" min-width="30"> <el-table-column :label="$t('重量')" prop="weight" align="center" min-width="30">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}} {{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('数量')" prop="quantity" min-width="30"> <el-table-column :label="$t('数量')" prop="quantity" align="center" min-width="30">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.quantityAll:0}} {{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.quantityAll:0}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('货值')" prop="worth" min-width="30" /> <el-table-column :label="$t('货值')" prop="worth" align="center" min-width="30" />
<el-table-column :label="$t('运费/全包价')" prop="quantity" min-width="260" v-if="handlerParams.orderExceptionHandlerResult=='continue_channel'"> <el-table-column :label="$t('运费/全包价')" prop="quantity" align="center" min-width="260" v-if="handlerParams.orderExceptionHandlerResult=='continue_channel'">
<template slot-scope="scope" > <template slot-scope="scope" >
<div v-if="scope.row.charging ==1" class="channel"> <div v-if="scope.row.charging ==1" class="channel">
<!-- <span v-if="!scope.row.oneSeaFreight">{{$t('全包价')}}:{{$t('未报价')}}</span> --> <!-- <span v-if="!scope.row.oneSeaFreight">{{$t('全包价')}}:{{$t('未报价')}}</span> -->
<div class="channel"> <div class="channel">
<div style="width:80px">{{$t('全包价')}}:</div> <div style="width:80px">{{$t('全包价')}}:</div>
<div style="width:88%" class="channel"> <div style="width:88%" class="channel" v-if="orderExceptionData.orderExceptionStatus==0">
<inputor default2="0" v-model.number="scope.row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" class="w100" /> <inputor default2="0" v-model.number="scope.row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" class="w100" />
<selector v-model="scope.row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> <selector v-model="scope.row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="scope.row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> / <selector v-model="scope.row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
...@@ -579,49 +579,57 @@ ...@@ -579,49 +579,57 @@
</div> </div>
<div v-else> <div v-else>
<!-- <span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span> --> <!-- <span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span> -->
<div class="channel"> <div class="channel" v-if="orderExceptionData.orderExceptionStatus==0">
<div style="width:80px">{{$t('运费')}}:</div> <div style="width:80px">{{$t('运费')}}:</div>
<div style="width:88%" class="channel"> <div style="width:88%" class="channel" >
<inputor default2="0" v-model.number="scope.row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" class="w100" /> <inputor default2="0" v-model.number="scope.row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" class="w100" />
<selector v-model="scope.row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> <selector v-model="scope.row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="scope.row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> / <selector v-model="scope.row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
</div> </div>
</div> </div>
<div v-else class="channel">
<span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span>
<span v-else>{{$t('全包价')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span>
</div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('清关费')" prop="quantity" min-width="180" v-if="handlerParams.orderExceptionHandlerResult=='continue_channel'"> <el-table-column :label="$t('清关费')" prop="quantity" align="center" min-width="180" v-if="handlerParams.orderExceptionHandlerResult=='continue_channel'">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="channel"> <div class="channel">
<!-- <span v-if="!scope.row.oneClearanceFreight">{{$t('未报价')}}</span> --> <!-- <span v-if="!scope.row.oneClearanceFreight">{{$t('未报价')}}</span> -->
<div class="channel"> <div class="channel" v-if="orderExceptionData.orderExceptionStatus==0">
<inputor default2="0" v-model.number="scope.row.oneClearanceFreight" type="number" :placeholder="$t('整数或者两位小数')" class="w100" /> <inputor default2="0" v-model.number="scope.row.oneClearanceFreight" type="number" :placeholder="$t('整数或者两位小数')" class="w100" />
<selector v-model="scope.row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> <selector v-model="scope.row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="scope.row.clearanceFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> / <selector v-model="scope.row.clearanceFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
</div> </div>
<div v-else>
<span v-if="!scope.row.oneClearanceFreight">{{$t('未报价')}}</span>
<span v-else>{{scope.row.oneClearanceFreight}} {{currencyMap[scope.row.clearanceFreightCurrency]}} / {{unitMap[scope.row.clearanceFreightVolume]}}</span>
</div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('运费/全包价')" prop="quantity" min-width="220" v-if="handlerParams.orderExceptionHandlerResult=='change_channel'"> <el-table-column :label="$t('运费/全包价')" prop="quantity" align="center" min-width="220" v-if="handlerParams.orderExceptionHandlerResult=='change_channel'">
<template slot-scope="scope" > <template slot-scope="scope" >
<div v-if="scope.row.charging ==1" class="channel"> <div v-if="scope.row.charging ==1" class="channel">
<span v-if="!scope.row.oneSeaFreight">{{$t('全包价')}}:{{$t('未报价')}}</span> <span v-if="!scope.row.oneSeaFreight">{{$t('全包价')}}:{{$t('未报价')}}</span>
<span v-else>{{$t('全包价')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span> <span v-else>{{$t('全包价')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span>
<el-button type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button> <el-button v-if="orderExceptionData.orderExceptionStatus==0" type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button>
</div> </div>
<div v-else class="channel"> <div v-else class="channel">
<span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span> <span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span>
<span v-else>{{$t('运费')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span> <span v-else>{{$t('运费')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span>
<el-button type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button> <el-button v-if="orderExceptionData.orderExceptionStatus==0" type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('清关费')" prop="quantity" min-width="260" v-if="handlerParams.orderExceptionHandlerResult=='change_channel'"> <el-table-column :label="$t('清关费')" prop="quantity" align="center" min-width="260" v-if="handlerParams.orderExceptionHandlerResult=='change_channel'">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="channel"> <div class="channel">
<span v-if="!scope.row.oneClearanceFreight">{{$t('未报价')}}</span> <span v-if="!scope.row.oneClearanceFreight">{{$t('未报价')}}</span>
<span v-else>{{scope.row.oneClearanceFreight}} {{currencyMap[scope.row.clearanceFreightCurrency]}} / {{unitMap[scope.row.clearanceFreightVolume]}}</span> <span v-else>{{scope.row.oneClearanceFreight}} {{currencyMap[scope.row.clearanceFreightCurrency]}} / {{unitMap[scope.row.clearanceFreightVolume]}}</span>
<el-button type="primary" plain @click="routeToPrice(scope.row,2)">{{!scope.row.oneClearanceFreight?$t('报价'):$t('修改报价')}}</el-button> <el-button v-if="orderExceptionData.orderExceptionStatus==0" type="primary" plain @click="routeToPrice(scope.row,2)">{{!scope.row.oneClearanceFreight?$t('报价'):$t('修改报价')}}</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -688,7 +696,7 @@ ...@@ -688,7 +696,7 @@
import {getOrder} from '@/api/ecw/order' import {getOrder} from '@/api/ecw/order'
import FilePreview from '@/components/FilePreview' import FilePreview from '@/components/FilePreview'
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById,getOrderExcptionResult} from "@/api/ecw/orderException" import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById,getOrderExcptionResult,getOrderExceptionChannelPriceList} from "@/api/ecw/orderException"
import {getFirstReceivableListByOrderId} from '@/api/ecw/financial' import {getFirstReceivableListByOrderId} from '@/api/ecw/financial'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {listByIds} from '@/api/ecw/region' import {listByIds} from '@/api/ecw/region'
...@@ -927,9 +935,7 @@ ...@@ -927,9 +935,7 @@
that.getOrderFeeByIdData() that.getOrderFeeByIdData()
that.getPreExceptionData() that.getPreExceptionData()
} }
if(that.orderExceptionData.orderExceptionStatus==2){ if(that.orderExceptionData.orderExceptionStatus>0){
that.getOrderExcptionResult()
}else if(that.orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&that.orderExceptionData.orderExceptionStatus==1){
that.getOrderExcptionResult() that.getOrderExcptionResult()
} }
}); });
...@@ -976,6 +982,7 @@ ...@@ -976,6 +982,7 @@
} }
if(this.orderExceptionData.orderExceptionType=='not_shipping_channel_exception'){ if(this.orderExceptionData.orderExceptionType=='not_shipping_channel_exception'){
// this.handlerParams.channelPriceList = [] // this.handlerParams.channelPriceList = []
if(this.orderExceptionData.orderExceptionStatus==0){
this.orderData.orderItemVOList.map(v=>{ this.orderData.orderItemVOList.map(v=>{
if(!v.oneSeaFreight){ if(!v.oneSeaFreight){
v.seaFreightCurrency = this.currencyList[0]['id'] v.seaFreightCurrency = this.currencyList[0]['id']
...@@ -986,6 +993,9 @@ ...@@ -986,6 +993,9 @@
v.clearanceFreightVolume = this.unitList[1]['id'] v.clearanceFreightVolume = this.unitList[1]['id']
} }
}) })
}else{
this.getExceptionPriceList()
}
} }
}); });
}, },
...@@ -1092,22 +1102,22 @@ ...@@ -1092,22 +1102,22 @@
} }
if(this.orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&this.handlerParams.orderExceptionHandlerResult=='continue_channel'){ if(this.orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&this.handlerParams.orderExceptionHandlerResult=='continue_channel'){
this.handlerParams.orderItemVOList = this.orderData.orderItemVOList this.handlerParams.orderItemVOList = this.orderData.orderItemVOList
// this.handlerParams.channelPriceList = [] this.handlerParams.channelPriceList = []
// this.orderData.orderItemVOList.map(v=>{ this.orderData.orderItemVOList.map(v=>{
// var listItem = { var listItem = {
// orderId:v.orderId, orderId:v.orderId,
// orderItemId:v.orderItemId, orderItemId:v.orderItemId,
// charging:v.charging, charging:v.charging,
// freightFee:v.oneSeaFreight, freightFee:v.oneSeaFreight,
// isPayAdvance:v.isPayAdvance, isPayAdvance:v.isPayAdvance||0,
// freightCurrencyId:v.seaFreightCurrency, freightCurrencyId:v.seaFreightCurrency,
// freightUnitId:v.seaFreightVolume, freightUnitId:v.seaFreightVolume,
// clearanceFee:v.oneClearanceFreight, clearanceFee:v.oneClearanceFreight,
// clearanceCurrencyId:v.seaFreightCurrency, clearanceCurrencyId:v.clearanceFreightCurrency,
// clearanceUnitId:v.clearanceFreightVolume clearanceUnitId:v.clearanceFreightVolume
// } }
// this.handlerParams.channelPriceList.push(listItem) this.handlerParams.channelPriceList.push(listItem)
// }) })
} }
handlerExceptionByExceptionId(this.handlerParams).then(res=>{ handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess(this.$t('提交成功')); this.$modal.msgSuccess(this.$t('提交成功'));
...@@ -1248,6 +1258,26 @@ ...@@ -1248,6 +1258,26 @@
} }
}, },
//获取提交的不可出渠道异常商品清关费
getExceptionPriceList(){
let that = this
getOrderExceptionChannelPriceList({orderId:that.orderId,exceptionId:parseInt(that.orderExceptionId)}).then(res=>{
if(res.code==0&&res.data.length>0){
that.orderData.orderItemVOList.map(v=>{
var item = res.data.find(vs=>vs.orderItemId==v.orderItemId)
if(item){
v.oneSeaFreight = item.freightFee
v.seaFreightCurrency = item.freightCurrencyId
v.seaFreightVolume = item.freightUnitId
v.oneClearanceFreight = item.clearanceFee
v.clearanceFreightCurrency = item.clearanceCurrencyId
v.clearanceFreightVolume = item.clearanceUnitId
}
})
}
})
}
} }
}; };
</script> </script>
......
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