BoxSplitDetail.vue 5.76 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<!--拆单审核中的申请信息部分-->
<template>
    <div v-if="detail">
        <el-descriptions :column="4" v-if="order">
            <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('订单状态')">
                <el-tag size="small">
                    <!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" /> -->
                    {{order.statusMsg}}
                </el-tag>
            </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('目的仓')">
                {{order.logisticsInfoDto.destAddressZh}}
            </el-descriptions-item>
        </el-descriptions>

        <template v-for="item in detail.orderSplitBackVOList">
            <div class="title mt-20" :key="item.orderNo">
                <span class="mr-10">{{item.orderNo}}</span>
                <dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
                <span class="mr-10" v-if="item.channelName">{{item.channelName}}</span>
                <span>{{$t('发往')}}{{item.dstWarehouseName}}</span>
            </div>
            <el-table :data="item.orderSplitItemBackVOList" :key="'items-' + item.orderNo">
35 36 37 38 39 40 41 42 43 44 45 46 47 48
                <el-table-column :label="$t('序号')">
                    <template slot-scope="scope">{{scope.$index+1}}</template>
                </el-table-column>
                <el-table-column :label="$t('中文品名')">
                    <template slot-scope="{row}">{{row.prodTitleZh}}</template>
                </el-table-column>
                <el-table-column :label="$t('英文品名')">
                    <template slot-scope="{row}">{{row.prodTitleEn}}</template>
                </el-table-column>
                <el-table-column :label="$t('品牌')">
                    <template slot-scope="{row}">
                        <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
                    </template>
                </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
49
                <el-table-column :label="$t('入仓体积')">
50 51
                    <template slot-scope="{row}">{{row.volume}}</template>
                </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
52 53 54 55
                <el-table-column :label="$t('收费体积')">
                  <template slot-scope="{row}">{{row.chargeVolume}}</template>
                </el-table-column>
                <el-table-column :label="$t('入仓重量')">
56 57
                    <template slot-scope="{row}">{{row.weight}}kg</template>
                </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
58 59 60
                <el-table-column :label="$t('收费重量')">
                  <template slot-scope="{row}">{{row.chargeWeight}}kg</template>
                </el-table-column>
61
                <el-table-column :label="$t('箱数')">
dragondean@qq.com's avatar
dragondean@qq.com committed
62 63 64
                    <template slot-scope="{row}">
                      <el-button type="text" @click="showWarehouseRecord(row)">{{row.num}}</el-button>
                    </template>
65 66 67 68
                </el-table-column>
                <el-table-column :label="$t('数量')">
                    <template slot-scope="{row}">{{row.quantity}}</template>
                </el-table-column>
69 70 71
              <el-table-column :label="$t('货值')">
                <template slot-scope="{row}">{{row.worth}}{{$t('')}}</template>
              </el-table-column>
72 73
            </el-table>
        </template>
74
      <warehouse-record v-if="currentWarehouseRecord" :list="currentWarehouseRecord" append-to-body @close="currentWarehouseRecord=null"></warehouse-record>
75 76 77 78 79 80
    </div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {getBoxApproval} from '@/api/ecw/box'
import {getChannel} from '@/api/ecw/channel'
dragondean@qq.com's avatar
dragondean@qq.com committed
81
import WarehouseRecord from "@/views/ecw/order/splitApply/components/WarehouseRecord";
82
export default {
dragondean@qq.com's avatar
dragondean@qq.com committed
83 84
  components: {WarehouseRecord},
  props:{
85 86 87 88 89 90
        id: [String, Number]
    },
    data(){
        return {
            detail: null,
            order: null,
dragondean@qq.com's avatar
dragondean@qq.com committed
91 92 93
            channel: null,
            // 查看入仓记录的条目
            currentWarehouseRecord: null
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
        }
    },
    watch:{
        id(){
            this.getData()
        },
        detail(){
            this.getOrder()
        },
        order(){
            if(this.order.channelId){
                this.getChannel()
            }
        }
    },
    created(){
        if(this.id){
            this.getData()
        }
    },
    methods:{
        getData(){
            getBoxApproval({id: this.id}).then(res => {
                this.detail = JSON.parse(res.data.details)
            })
        },
        getOrder(){
            getOrder(this.detail.orderId).then(res => {
                this.order = res.data
            })
        },
        getChannel(){
            getChannel(this.order.channelId).then(res => {
                this.channel = res.data
            })
dragondean@qq.com's avatar
dragondean@qq.com committed
129 130 131 132 133 134
        },
        showWarehouseRecord(row){
          if(!row.specsRecordVOList){
            return this.$message.info(this.$t('暂无入仓记录'))
          }
          this.currentWarehouseRecord = row.specsRecordVOList
135 136 137 138 139 140 141 142 143 144 145 146
        }
    }
}
</script>
<style scoped lang="scss">
.title{
    padding: 10px 0;
    span{
        font-size: 14px;
        font-weight: bold;
    }
}
dragondean@qq.com's avatar
dragondean@qq.com committed
147
</style>