SplitRevokeDetail.vue 3.84 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
<!--拆单审核中的申请信息部分-->
<template>
  <div v-if="orders">
    <el-table :data="orders">
      <el-table-column :label="$t('订单编号')">
        <template slot-scope="scope">{{scope.row.orderNo}}</template>
      </el-table-column>
      <el-table-column :label="$t('唛头')">
        <template slot-scope="{row}">{{row.marks}}</template>
      </el-table-column>
11
      <el-table-column label="订单状态">
12 13 14 15 16 17 18 19 20 21 22 23
          <template slot-scope="{row}">{{row.statusMsg}}</template>
      </el-table-column>
      <el-table-column :label="$t('填单统计')">
        <template slot-scope="{row}">
          {{row.costVO.totalNum}}{{$t('')}}<br/>{{row.costVO.totalVolume}}<br/>{{row.costVO.totalWeight}}kg
        </template>
      </el-table-column>
      <el-table-column :label="$t('入仓统计')">
        <template slot-scope="{row}">
          {{row.sumNum}}{{$t('')}}<br/>{{row.sumVolume}}<br/>{{row.sumWeight}}kg
        </template>
      </el-table-column>
24 25 26 27 28
      <el-table-column :label="$t('收费统计')">
        <template slot-scope="{row}">
          {{row.sumNum}}{{$t('')}}<br/>{{row.wvolume}}<br/>{{row.vweight}}kg
        </template>
      </el-table-column>
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
      <el-table-column :label="$t('入仓时间')">
        <template slot-scope="{row}">
          {{row.rucangTime|parseTime}}
        </template>
      </el-table-column>
      <el-table-column :label="$t('运输方式')">
        <template slot-scope="{row}">
          <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
        </template>
      </el-table-column>
      <el-table-column :label="$t('出货渠道')">
        <template slot-scope="{row}">
          {{getChannelName(row.channelId)}}
        </template>
      </el-table-column>
      <el-table-column :label="$t('始发仓')">
        <template slot-scope="{row}">{{jsonParse(row.departureVO.departure).titleZh}}</template>
      </el-table-column>
      <el-table-column :label="$t('目的仓')">
        <template slot-scope="{row}">
          {{jsonParse(row.objectiveVO.objective).titleZh}}
        </template>
      </el-table-column>
      <el-table-column :label="$t('发货人')">
        <template slot-scope="{row}">
          {{row.consignorVO.name}}
        </template>
      </el-table-column>
      <el-table-column :label="$t('收货人')">
        <template slot-scope="{row}">
          {{row.consigneeVO.name}}
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
66
import {getApproval, getOrder, splitRevokeApply} from '@/api/ecw/order'
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
import {getMergeListByMergeId} from '@/api/ecw/orderHandle'
import {getChannelListByIds} from '@/api/ecw/channel'
import {parseTime} from '@/utils/ruoyi'
export default {
  name: 'SplitRevokeDetail',
  filters: {parseTime},
  props:{
    id: [String, Number]
  },
  data(){
    return {
      orders: null,
      channels: []
    }
  },
  watch:{
    id(){
      this.getData()
    }
  },
  computed:{
    jsonParse(){
      return d => {
        return JSON.parse(d)
      }
    },
    getChannelName(){
      return id => {
        let channel = this.channels.find(item => item.channelId == id)
        return channel ? channel.nameZh : '/'
      }
    }
  },
  created(){
    if(this.id){
      this.getData()
    }
  },
  methods:{
    getData(){
107 108
      splitRevokeApply(this.id).then(res => {
        this.orders = res.data.childrenOrderList
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
        this.getChannels()
      })
    },
    getChannels(){
      let ids = []
      this.orders.forEach(order => {
        if(order.channelId){
          ids.push(order.channelId)
        }
      })
      if(!ids.length) return false
      getChannelListByIds({ids: ids.join(',')}).then(res => {
        this.channels = res.data
      })
    }
  }
}
</script>
<style scoped lang="scss">
.title{
  padding: 10px 0;
  span{
    font-size: 14px;
    font-weight: bold;
  }
}
</style>