Commit 86d03097 authored by dragondean@qq.com's avatar dragondean@qq.com

完善订单详情

parent e3702506
......@@ -380,7 +380,7 @@ export default {
marks: 'marks',
isCargoControl: 'Is cargo on hold',
baseInfo: 'baseInfo',
transportInfo: 'transportInfo',
transportInfo: 'transport',
costVO: 'orderInfo',
box: 'CTNS',
is: 'yes',
......
......@@ -159,7 +159,7 @@ export default {
loginDate: '上次登录',
advice: '若您的登录信息与实际不符,建议您及时',
editPassword: '修改密码',
baseInfo: '本信息',
baseInfo: '',
update: '修改',
cancel: '取消',
save: '保存',
......@@ -394,8 +394,8 @@ export default {
consigneePhone: '收货人电话',
marks: '唛头',
isCargoControl: '是否控货',
baseInfo: '基础信息',
transportInfo: '物流信息',
baseInfo: '基础',
transportInfo: '运输',
costVO: '填单信息',
box: '',
is: '',
......
......@@ -6,18 +6,19 @@
<template v-if="order.tidanNo"> - {{ order.tidanNo }}</template>
<template v-else-if="order.containerNumber"> - {{ order.containerNumber }}</template>
</div>
<div style="display: flex;">
<div style="width: 6px;height: 26px;background: #659FD5;border-radius: 0px 6px 6px 0px;" />
<span style="font-size: 18px;font-weight: 500;color: #333;line-height: 26px;margin-left: 5px;">{{ $t('orderdetail.consignorName') }}</span>
<span style="color:#409EFF;margin-left:100px;font-size:16px" @click="consigneeChange">{{ consigneeText }}</span>
</div>
<el-row>
<el-col>
<el-descriptions class="margin-top" border :column="3" :content-style="{width:'130px'}">
<el-row :gutter="10">
<el-col :span="12">
<!--发货人-->
<div style="display: flex;">
<div style="width: 6px;height: 26px;background: #659FD5;border-radius: 0px 6px 6px 0px;" />
<span style="font-size: 18px;font-weight: 500;color: #333;line-height: 26px;margin-left: 5px;">{{ $t('orderdetail.consignorName') }}</span>
</div>
<el-descriptions class="margin-top" border :column="2" :content-style="{width:'130px'}">
<el-descriptions-item :label="$t('orderdetail.consignorName')" label-style="width:150px">{{ order.consignorVO.name }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.consignorPhone')" label-style="width:150px">+{{ order.consignorVO.countryCode }} {{ order.consignorVO.phone }}</el-descriptions-item>
</el-descriptions>
<el-descriptions :class="showMore?'showInfo':'hiddenInfo'" border :column="3" :content-style="{width:'130px'}">
<el-descriptions v-if="showMore" border :column="3" :content-style="{width:'130px'}">
<el-descriptions-item :label="$t('orderdetail.consignorNameEn')" label-style="width:150px">{{ order.consignorVO.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.consignorCompany')" label-style="width:150px">
{{ order.consignorVO.company }}
......@@ -28,21 +29,25 @@
<el-descriptions-item :label="$t('orderdetail.consignorEmail')" label-style="width:150px">{{ order.consignorVO.email }}</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
<div style="display: flex;margin-top: 20px;">
<div style="width: 6px;height: 26px;background: #659FD5;border-radius: 0px 6px 6px 0px;" />
<span style="font-size: 18px;font-weight: 500;color: #333;line-height: 26px;margin-left: 5px;">{{ $t('orderdetail.consigneeName') }}</span>
</div>
<el-row>
<el-col>
<el-descriptions class="margin-top" border :column="3" :content-style="{width:'130px'}">
<el-col :span="12">
<!--收货人-->
<div style="display: flex;">
<div class="flex-1 flex">
<div style="width: 6px;height: 26px;background: #659FD5;border-radius: 0px 6px 6px 0px;" />
<span style="font-size: 18px;font-weight: 500;color: #333;line-height: 26px;margin-left: 5px;">{{ $t('orderdetail.consigneeName') }}</span>
</div>
<span style="color:#409EFF;margin-left:100px;font-size:16px" @click="consigneeChange">{{ consigneeText }}</span>
</div>
<el-descriptions class="margin-top" border :column="2" :content-style="{width:'130px'}">
<el-descriptions-item :label="$t('orderdetail.consigneeName')" label-style="width:150px">{{ order.consigneeVO.name }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.consigneePhone')" label-style="width:150px">+{{ order.consigneeVO.countryCode }} {{ order.consigneeVO.phone }}</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" border :column="3" :content-style="{width:'130px'}">
<el-descriptions-item :label="$t('delivery.harvestMethod')" label-style="width:150px">{{order.consigneeVO?(order.consigneeVO.harvestMethod==1?$t('orderdetail.own'):$t('orderdetail.toRoom')):''}}</el-descriptions-item>
<el-descriptions-item :label="$t('delivery.deliveryaddress')" label-style="width:150px">{{ addressName }}</el-descriptions-item>
<el-descriptions-item :label="$t('delivery.addressdetail')" label-style="width:150px">{{order.consigneeVO?order.consigneeVO.address:''}}</el-descriptions-item>
</el-descriptions>
<el-descriptions :class="showMore?'showInfo':'hiddenInfo'" border :column="3" :content-style="{width:'130px'}">
<el-descriptions v-if="showMore" border :column="3" :content-style="{width:'130px'}">
<el-descriptions-item :label="$t('orderdetail.consigneeNameEn')" label-style="width:150px">{{ order.consigneeVO.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.consigneeCompany')" label-style="width:150px">
{{ order.consigneeVO.company }}
......@@ -55,6 +60,8 @@
</el-col>
</el-row>
</el-card>
<!--运输-->
<el-card class="card">
<div style="display: flex;margin-top: 20px;">
<div style="width: 6px;height: 26px;background: #659FD5;border-radius: 0px 6px 6px 0px;" />
......@@ -62,10 +69,9 @@
</div>
<el-row>
<el-col>
<el-descriptions class="margin-top" border :column="2">
<el-descriptions class="margin-top" border :column="5">
<el-descriptions-item :label="$t('orderdetail.startTitle')">{{ $l(order.initialLogisticsInfoDto, 'startTitle') }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.destTitle')">{{ $l(order.initialLogisticsInfoDto, 'destCountryTitle') }}-{{ $l(objectCity, 'title') }}-{{ $l(order.initialLogisticsInfoDto, 'destTitle') }}</el-descriptions-item>
<el-descriptions-item v-if="false" :label="$t('orderdetail.startAddress')" :span="2">{{ order.logisticsInfoDto.startAddressZh }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.transport')" :span="1">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item>
......@@ -74,6 +80,8 @@
</el-descriptions>
</el-col>
</el-row>
<!--基础-->
<div style="display: flex;margin-top: 20px;">
<div style="width: 6px;height: 26px;background: #659FD5;border-radius: 0px 6px 6px 0px;" />
<span style="font-size: 18px;font-weight: 500;color: #333;line-height: 26px;margin-left: 5px;">{{ $t('orderdetail.baseInfo') }}</span>
......@@ -96,9 +104,15 @@
<span v-else-if="order.drawee==2">{{ $t('orderdetail.consignee') }}</span>
<span v-else>{{order.customDraweeVOList?order.customDraweeVOList[0].name:''}}</span>
</el-descriptions-item>
<!--单证报关-->
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('orderdetail.customsType')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" />
</el-descriptions-item>
<el-descriptions-item v-else label="">
<!--占位-->
</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.isCargoControl')">{{ order.isCargoControl?$t('orderdetail.is'):$t('orderdetail.no') }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.objectport')">{{ order.productRecord==1? $t('orderdetail.ourUndertakes'):$t('orderdetail.customerUndertakes')}}</el-descriptions-item>
<el-descriptions-item :label="$t('特殊要求')">
......@@ -118,29 +132,38 @@
{{ offerNumber }}
</el-descriptions-item> -->
</el-descriptions>
<!--下面几个是空运特有字段-->
<!--清关证书-->
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.customsClearCert')">{{ order.isSingleTicketTransport?$t('orderdetail.is'):$t('orderdetail.no') }}</el-descriptions-item>
<!--清关证书备注-->
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.clearCertRemark')">
{{ order.clearCertRemark }}
</el-descriptions-item>
<!--是否拆包-->
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.isUnpack')">
{{ order.isUnpack?$t('orderdetail.is'):$t('orderdetail.no') }}
</el-descriptions-item>
<!--单票立刻转运-->
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.isSingleTicketTransport')">
{{ order.isSingleTicketTransport?$t('orderdetail.is'):$t('orderdetail.no') }}
</el-descriptions-item>
</el-col>
</el-row>
<div v-if="[3, 4].indexOf(+order.transportId) > -1" style="display: flex;margin-top: 20px;">
<!--<div v-if="[3, 4].indexOf(+order.transportId) > -1" style="display: flex;margin-top: 20px;">
<div style="width: 6px;height: 26px;background: #659FD5;border-radius: 0px 6px 6px 0px;" />
<span style="font-size: 18px;font-weight: 500;color: #333;line-height: 26px;margin-left: 5px;">{{ $t('orderdetail.transportInfo') }}</span>
</div>
<el-row>
</div>-->
<!--下面字段在原型上没有体现,暂时不显示-->
<el-row v-if="false">
<el-col>
<el-descriptions class="margin-top" border :column="2">
<el-descriptions-item :label="$t('orderdetail.deliveryDate')">{{ order.deliveryDate }}</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.warehouseType')">
<dict-tag :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" :value="order.warehouseType" />
</el-descriptions-item>
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.customsClearCert')">{{ order.isSingleTicketTransport?$t('orderdetail.is'):$t('orderdetail.no') }}</el-descriptions-item>
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.clearCertRemark')">
{{ order.clearCertRemark }}
</el-descriptions-item>
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.isUnpack')">
{{ order.isUnpack?$t('orderdetail.is'):$t('orderdetail.no') }}
</el-descriptions-item>
<el-descriptions-item v-if="[3, 4].indexOf(+order.transportId) > -1" :label="$t('delivery.isSingleTicketTransport')">
{{ order.isSingleTicketTransport?$t('orderdetail.is'):$t('orderdetail.no') }}
</el-descriptions-item>
<el-descriptions-item :label="$t('orderdetail.isCollection')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCollection" />
<span v-if="order.isCollection">({{ order.collectionProxy }} {{ currencyMap[order.collectionProxyCurrency] }})</span>
......@@ -176,7 +199,13 @@
<el-card class="card">
<el-tabs v-model="activeName">
<el-tab-pane :label="$t('orderdetail.activeFirst')" name="first">
<el-table :data="order.orderItemVOList" border style="width: 100%">
<el-table
:data="order.orderItemVOList"
border
style="width: 100%"
show-summary
:summary-method="getSummary"
>
<el-table-column prop="prodTitle" :label="$t('orderdetail.prodTitle')">
<template slot-scope="{row}">
<template >{{ row.prodTitleZh }}/{{row.prodTitleEn}}</template>
......@@ -222,12 +251,12 @@
</el-table-column>
<el-table-column prop="expressNo" :label="$t('orderdetail.tiandanExpressNO')" />
</el-table>
<div style="padding: 20px 0;display: flex; align-items: center;justify-content: space-evenly;">
<!--<div style="padding: 20px 0;display: flex; align-items: center;justify-content: space-evenly;">
<div>{{$t('delivery.sum')}}:</div>
<div>{{$t('orderdetail.inWarehouseInfo')}}:{{getProSum.washouseNum}}{{$t('prepayDeal.box')}}{{getProSum.washouseWeight}}KG {{getProSum.washouseVolume}}m³{{getProSum.washouseQuantity}}{{$t('price.one')}}</div>
<div>{{$t('delivery.worth')}}:{{getProSum.worth}}</div>
<div>{{$t('orderdetail.costVO')}}:{{getProSum.num}}{{$t('prepayDeal.box')}}{{getProSum.weight}}KG {{getProSum.volume}}m³{{getProSum.quantity}}{{$t('price.one')}}</div>
</div>
</div>-->
</el-tab-pane>
<el-tab-pane :label="$t('orderdetail.activeSecond')" name="second">
<el-timeline v-if="order.orderTimeVOList && order.orderTimeVOList.length" :reverse="true" style="padding-top: 10px;">
......@@ -263,6 +292,7 @@ import DictTag from '@/components/DictTag'
import { getCurrencyList, getChannelList, getListTree, getCityData } from '@/api/data'
import DeclarationDocuments from './components/DeclarationDocuments'
import { parseTime } from '@/utils/index'
import Decimal from 'decimal.js'
export default {
name: 'Detail',
components: {
......@@ -348,16 +378,16 @@ export default {
return orderAdderss
},
typeName(){
let typeName = ''
let typeName = []
if(order.type){
if(order.type.includes(1)){
typeName += this.$t('orderdetail.service')
typeName.push(this.$t('orderdetail.service'))
}
if(order.type.includes(2)){
typeName += this.$t('orderdetail.oversears')
typeName.push(this.$t('orderdetail.oversears'))
}
}
return typeName
return typeName.join("")
},
getDictData() {
return (type, value) => getDictData(type, value) || {}
......@@ -365,7 +395,7 @@ export default {
getTime() {
return (value) => parseTime(value) || ''
},
getProSum(){
/* getProSum(){
let data = {
num:0,
volume:0,
......@@ -409,7 +439,7 @@ export default {
})
}
return data
}
} */
},
created() {
getCurrencyList().then(res => {
......@@ -428,6 +458,49 @@ export default {
}
},
methods: {
getSummary() {
// 货值汇总
let worth = new Decimal(0)
// 入仓箱数
let wCartonsNum = new Decimal(0)
// 入仓重量
let wWeight = new Decimal(0)
// 入仓体积
let wVolume = new Decimal(0)
// 入仓个数
let wQuantity = new Decimal(0)
// 填单箱数
let cartonsNum = new Decimal(0)
// 填单个数
let quantity = new Decimal(0)
// 填单重量
let weight = new Decimal(0)
// 填单体积
let volume = new Decimal(0)
this.order.orderItemVOList.forEach(item => {
worth = worth.plus(item.worth || 0)
console.log({worth: item.worth})
if(item.warehouseInInfoVO){
wCartonsNum = wCartonsNum.plus(item.warehouseInInfoVO.cartonsNum || 0)
wWeight = wWeight.plus(item.warehouseInInfoVO.weight || 0)
wVolume = wVolume.plus(item.warehouseInInfoVO.volume || 0)
wQuantity = wQuantity.plus(item.warehouseInInfoVO.quantityAll || 0)
}
quantity = quantity.plus(item.quantity || 0)
weight = weight.plus(item.weight || 0)
volume = volume.plus(item.volume || 0)
cartonsNum = cartonsNum.plus(item.num || 0)
})
return [
null, null,
`${wCartonsNum}${this.$t('prepayDeal.box')} ${wWeight}Kg ${wVolume}${wQuantity}${this.$t('price.one')}`,
null, null,
worth.toNumber(),
null, null, null,
`${cartonsNum}${this.$t('prepayDeal.box')} ${weight}Kg ${volume}${quantity}${this.$t('price.one')}`
]
},
/** 查询列表 */
getOrder() {
const that = this
......@@ -435,6 +508,9 @@ export default {
// 执行查询
getOrder(that.orderId).then(response => {
that.order = response.data
if(!that.order.consigneeVO){
that.order.consigneeVO = {}
}
that.documentsDidables = (that.order.customsType == 2)
this.show = true
that.getObjectCity(that.order.initialLogisticsInfoDto.destCityId)
......
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