PrepayExceptionDetail.vue 6.4 KB
Newer Older
1 2
<!--拆单审核中的申请信息部分-->
<template>
3
    <div v-if="order">
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
        <el-descriptions :column="4" v-if="order" :colon="false">
            <el-descriptions-item :label="$t('订单号')">{{order.orderNo}}</el-descriptions-item>
            <el-descriptions-item :label="$t('运输方式')">
                <dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
            </el-descriptions-item>
            <el-descriptions-item :label="$t('出货方式')">
                {{channel ? channel.nameZh : '/'}}
            </el-descriptions-item>
            <el-descriptions-item :label="$t('订单状态')">
                {{order.statusMsg}}
            </el-descriptions-item>
            <el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
            <el-descriptions-item :label="$t('始发仓')">
                {{order.logisticsInfoDto.startTitleZh}}
            </el-descriptions-item>
            <el-descriptions-item :label="$t('目的仓')" :span="2">
                {{order.logisticsInfoDto.destAddressZh}}
            </el-descriptions-item>
        </el-descriptions>
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
        <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">
44
                    <el-form-item :label="$t('已核销预付金额占总金额比例')+':'" label-width="320px">
45 46 47 48 49 50 51 52 53 54 55
                        {{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">
houjn@hikoon.cn's avatar
houjn@hikoon.cn committed
56
                    <el-form-item :label="$t('预付商品货值占总货值比例')+':'" label-width="320px">
57 58 59 60
                        {{orderFee.paymentGoodsWorthScale}}%
                    </el-form-item>
                </el-col>
            </el-row>
61 62 63 64 65 66 67 68 69 70 71 72 73
             <el-row>
                <el-col :span="6">
                   <el-form-item :label="$t('预付商品方数')+':'">
                       {{orderFee.paymentGoodsVolume}} {{$t('立方米')}}
                   </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item :label="$t('预付商品货值占订单总运费+清关费比例')+':'" label-width="320px">
                        {{orderFee.needWorthScale}}%
                    </el-form-item>
                  </el-col>
                </el-row>
              <el-row>
74 75 76 77 78 79
                <el-col :span="6">
                    <el-form-item :label="$t('订单总方数')+':'">
                        {{orderFee.totalVolume}} {{$t('立方米')}}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
80
                    <el-form-item :label="$t('预付商品方数占总方数比例')+':'" label-width="320px">
81 82 83 84
                        {{orderFee.paymentGoodsVolumeScale}}%
                    </el-form-item>
                </el-col>
            </el-row>
85 86 87 88 89
            <el-row>
                <el-form-item :label="$t('备注')+':'">
                    {{orderFee.notes}}
                </el-form-item>
            </el-row>
90
        </el-form>
91 92 93 94 95 96 97 98 99 100 101
    </div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {getChannel} from '@/api/ecw/channel'
import {getUnitList} from "@/api/ecw/unit"
import { getCurrencyList } from '@/api/ecw/currency'
import Decimal from 'decimal.js'
import {getBmpDetailByBusinessId} from '@/api/ecw/orderException'

export default {
102
    name: 'PrepayExceptionDetail',
103 104 105 106 107 108
    props:{
        id: [String, Number],
        path: String
    },
    data(){
        return {
109
            orderFee: null,
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
            order: null,
            channel: null,
            unitList:[],
            currencyList:[],
        }
    },
    watch:{
        id(){
            this.getData()
        },
        order(){
            if(this.order.channelId){
                this.getChannel()
            }
        },
125
        orderFee(){
houjn@hikoon.cn's avatar
houjn@hikoon.cn committed
126

127
        }
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
    },
    computed:{
        currencyMap(){
            let map = {}
            this.currencyList.forEach(item => {
                map[item.id] = this.$l(item, 'title')
            })
            return map
        },
        unitMap(){
            let map = {}
            this.unitList.forEach(item => {
                map[item.id] = this.$l(item, 'title')
            })
            return map
        }
    },
    created(){
146
        getCurrencyList().then(res => this.currencyList = res.data)
147 148 149 150 151 152 153 154
        if(this.id){
            this.getData()
        }
    },
    methods:{
        Decimal,
        getData(){
            getBmpDetailByBusinessId(this.id).then(res => {
155 156 157 158 159 160
                this.orderFee = res.data
                if(res.data.orderId){
                    getOrder(res.data.orderId).then(res => {
                        this.order = res.data
                    })
                }
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
            })
        },
        getChannel(){
            getChannel(this.order.channelId).then(res => {
                this.channel = res.data
            })
        },
    }
}
</script>
<style scoped lang="scss">
.title{
    padding: 10px 0;
    span{
        font-size: 14px;
        font-weight: bold;
    }
}
.bold{
    font-weight: bold;
}
182 183 184
::v-deep .prepay_exception_detail .el-form-item{
    margin-bottom: 0;
}
houjn@hikoon.cn's avatar
houjn@hikoon.cn committed
185
</style>