pending.vue 28 KB
Newer Older
我在何方's avatar
我在何方 committed
1 2 3 4
<template>
  <div class="app-container">
    <!-- 搜索工作栏 -->
    <el-card>
我在何方's avatar
我在何方 committed
5
        <div slot="header" class="card-title">{{$t('查看')}}</div>
我在何方's avatar
我在何方 committed
6
        <el-descriptions :column="4">
7 8 9
          <el-descriptions-item :label="$t('订单号')">
              {{orderData.orderNo||''}}
          </el-descriptions-item>
我在何方's avatar
我在何方 committed
10 11
            <el-descriptions-item :label="$t('唛头')">
                {{orderData.marks?orderData.marks:$t('')}}
我在何方's avatar
我在何方 committed
12
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
13
            <el-descriptions-item :label="$t('已到箱数/总箱数')">
我在何方's avatar
我在何方 committed
14
                {{orderData.sumNum||0}}/{{orderData.costVO?orderData.costVO.totalNum:0}}
我在何方's avatar
我在何方 committed
15
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
16
            <el-descriptions-item :label="$t('订单状态')">
我在何方's avatar
我在何方 committed
17 18
              <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
19 20
            <el-descriptions-item :label="$t('送货日期')">
               {{orderData.deliveryDate||$t('')}}
我在何方's avatar
我在何方 committed
21
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
22
            <el-descriptions-item :label="$t('运输方式')">
23
                <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
我在何方's avatar
我在何方 committed
24
                 <!-- v2.0空运专线,显示出货渠道 -->
我在何方's avatar
我在何方 committed
25
                <!-- <span v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'" style="margin-left:10px">{{$t('出货渠道')}}:{{orderData.channelName}}</span> -->
26
              </el-descriptions-item>
我在何方's avatar
我在何方 committed
27
            <!-- v2.0空运专线,显示出货渠道 -->
我在何方's avatar
我在何方 committed
28 29 30
             <el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">
                  {{orderData.channelName}}
              </el-descriptions-item>
我在何方's avatar
我在何方 committed
31 32
            <el-descriptions-item :label="$t('始发地')">
                 {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:$t('')}}
33
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
34
            <el-descriptions-item :label="$t('目的地')">
我在何方's avatar
我在何方 committed
35
               {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destTitleZh:$t('')}}
36
            </el-descriptions-item>
37 38
        </el-descriptions>
        <el-descriptions :column="4">
我在何方's avatar
我在何方 committed
39 40
            <el-descriptions-item :label="$t('发货人')">
                {{orderData.consignorVO?orderData.consignorVO.name||$t(''):$t('')}}
我在何方's avatar
我在何方 committed
41
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
42 43
            <el-descriptions-item :label="$t('发货公司')">
                {{orderData.consignorVO?orderData.consignorVO.company||$t(''):$t('')}}
我在何方's avatar
我在何方 committed
44
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
45
            <el-descriptions-item :label="$t('发货电话')">
我在何方's avatar
我在何方 committed
46
                {{orderData.consignorVO?((orderData.consignorVO.countryCode?checkCode(orderData.consignorVO.countryCode):'')+orderData.consignorVO.phone)||$t(''):$t('')}}
我在何方's avatar
我在何方 committed
47
            </el-descriptions-item>
48 49
          </el-descriptions>
          <el-descriptions :column="4">
我在何方's avatar
我在何方 committed
50 51
            <el-descriptions-item :label="$t('收货人')">
                {{orderData.consigneeVO?orderData.consigneeVO.name||$t(''):$t('')}}
我在何方's avatar
我在何方 committed
52
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
53 54
            <el-descriptions-item :label="$t('收货公司')">
                {{orderData.consigneeVO?orderData.consigneeVO.company||$t(''):$t('')}}
我在何方's avatar
我在何方 committed
55
            </el-descriptions-item>
我在何方's avatar
我在何方 committed
56
            <el-descriptions-item :label="$t('收货电话')">
我在何方's avatar
我在何方 committed
57
                {{orderData.consigneeVO?((orderData.consigneeVO.countryCode?checkCode(orderData.consigneeVO.countryCode):'')+orderData.consigneeVO.phone)||$t(''):$t('')}}
我在何方's avatar
我在何方 committed
58 59 60 61 62
            </el-descriptions-item>
        </el-descriptions>
    </el-card>
    <el-card class="card">
      <!-- 列表 -->
我在何方's avatar
我在何方 committed
63
      <div slot="header" class="card-title">{{$t('问题详情')}}</div>
我在何方's avatar
我在何方 committed
64
      <el-table v-loading="loading" border :data="list">
我在何方's avatar
我在何方 committed
65
        <el-table-column :label="$t('序号')" align="center" prop="id" type="index">
我在何方's avatar
我在何方 committed
66 67 68 69
          <template slot-scope="scope">
              <span>{{scope.$index + 1}}</span>
          </template>
        </el-table-column>
我在何方's avatar
我在何方 committed
70
        <el-table-column :label="$t('异常类型')" align="center" >
我在何方's avatar
我在何方 committed
71
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
72
            <dict-tag :type="DICT_TYPE.ORDER_ERROR_TYPE" :value="scope.row.orderExceptionType" />
我在何方's avatar
我在何方 committed
73 74
          </template>
        </el-table-column>
我在何方's avatar
我在何方 committed
75
        <el-table-column :label="$t('异常描述')" align="center">
我在何方's avatar
我在何方 committed
76
            <template slot-scope="scope">
dragondean@qq.com's avatar
dragondean@qq.com committed
77
              <span v-if="scope.row.orderExceptionDescVO">{{$l(scope.row.orderExceptionDescVO, 'desc')}}</span>
我在何方's avatar
我在何方 committed
78 79
            </template>
        </el-table-column>
80 81 82 83 84 85 86 87
        <el-table-column :label="$t('金额')" align="center" scope="orderExceptionAmount">
          <template slot-scope="{row}">
            {{row.orderExceptionAmount}}
            {{currencyMap[row.orderExceptionAmountCurrencyId]}}
            </template>
        </el-table-column>
        </el-table-column>
        <el-table-column :label="$t('状态')" align="center">
我在何方's avatar
我在何方 committed
88 89 90
          <template slot-scope="scope">
              <dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionStatus" />
            </template>
91
        </el-table-column>
我在何方's avatar
我在何方 committed
92
        <el-table-column :label="$t('附件')" align="center">
我在何方's avatar
我在何方 committed
93
          <template slot-scope="scope">
我在何方's avatar
我在何方 committed
94
            <div class="filelist">
我在何方's avatar
我在何方 committed
95
              <span v-for="(item,index) in scope.row.orderExceptionAttr" :key="index" @click="onClickOpenPreview(item,scope.$index)">{{'附件'+(index+1)}}</span>
我在何方's avatar
我在何方 committed
96
            </div>
我在何方's avatar
我在何方 committed
97 98
          </template>
        </el-table-column>
99 100 101 102 103 104 105
        <el-table-column :label="$t('备注')" align="center">
          <template slot-scope="{row}">
            <el-tooltip class="item" effect="dark" :content="row.orderExceptionNotes" placement="top-start">
              <div class="clamp3">{{row.orderExceptionNotes}}</div>
            </el-tooltip>
          </template>
        </el-table-column>
我在何方's avatar
我在何方 committed
106
        <el-table-column :label="$t('处理人')" align="center" prop="userName" />
107
        <el-table-column :label="$t('处理备注')" align="center" prop="handlerRemark" />
108 109 110 111 112
        <el-table-column :label="$t('创建时间')" align="center">
          <template slot-scope="scope">
             <span>{{parseTime(scope.row.createTime)}}</span>
            </template>
          </el-table-column>
我在何方's avatar
我在何方 committed
113
        <el-table-column :label="$t('处理时间')" align="center">
我在何方's avatar
我在何方 committed
114 115 116 117
          <template slot-scope="scope">
             <span>{{parseTime(scope.row.handlerTime)}}</span>
            </template>
          </el-table-column>
我在何方's avatar
我在何方 committed
118
        <el-table-column :label="$t('操作')" align="center">
我在何方's avatar
我在何方 committed
119
          <template slot-scope="scope">
我在何方's avatar
我在何方 committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
            <!-- <el-button v-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType!='order_no_quote_exception'" v-hasPermi="['ecw:exception:seeExceptionInfo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button> -->
            <el-button v-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_miss_exception'" v-hasPermi="['ecw:exception:miss']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_superfluous_goods_exception'" v-hasPermi="['ecw:exception:superfluousGoods']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_in_water_exception'" v-hasPermi="['ecw:exception:inWater']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_damage_exception'" v-hasPermi="['ecw:exception:damaged']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_heavy_cargo_exception'" v-hasPermi="['ecw:exception:heavyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_doc_exception'" v-hasPermi="['ecw:exception:doc']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_consignor_exception'" v-hasPermi="['ecw:exception:consignor']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_other_exception'" v-hasPermi="['ecw:exception:other']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_cod_exception'" v-hasPermi="['ecw:exception:cod']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
我在何方's avatar
我在何方 committed
137
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='fee_exception'" v-hasPermi="['ecw:exception:feeException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
我在何方's avatar
我在何方 committed
138

我在何方's avatar
我在何方 committed
139 140 141 142 143 144 145 146
            <!-- v2.0 -->
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='line_loop_exception'" v-hasPermi="['ecw:exception:lineLoopException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='customs_fee_not_quote_exception'" v-hasPermi="['ecw:exception:notQuoteException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='overweight_exception'" v-hasPermi="['ecw:exception:overweightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='not_shipping_channel_exception'" v-hasPermi="['ecw:exception:notChannelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='goods_weight_exception'" v-hasPermi="['ecw:exception:goodsWeightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='in_warehousing_diff_exception'" v-hasPermi="['ecw:exception:inWarehousingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='stock_up_exception'" v-hasPermi="['ecw:exception:stockUpException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
我在何方's avatar
我在何方 committed
147
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='channel_exception'" v-hasPermi="['ecw:exception:channelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
148
            <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='channel_packaging_overweight_exception'" v-hasPermi="['ecw:exception:channelPackagingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
149

150
            <el-tag style="margin-left:10px" v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
            <el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_miss_exception'" v-hasPermi="['ecw:exception:miss']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_goods_exception'" v-hasPermi="['ecw:exception:superfluousGoods']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_in_water_exception'" v-hasPermi="['ecw:exception:inWater']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_damage_exception'" v-hasPermi="['ecw:exception:damaged']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_heavy_cargo_exception'" v-hasPermi="['ecw:exception:heavyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_doc_exception'" v-hasPermi="['ecw:exception:doc']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_consignor_exception'" v-hasPermi="['ecw:exception:consignor']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_other_exception'" v-hasPermi="['ecw:exception:other']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_cod_exception'" v-hasPermi="['ecw:exception:cod']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_no_quote_exception'" v-hasPermi="['ecw:exception:noQuote']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
166
            <el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
167
            <el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
168
            <el-button v-else-if="scope.row.orderExceptionType=='fee_exception'" v-hasPermi="['ecw:exception:feeException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
169 170 171 172 173 174 175 176
            <!-- v2.0 -->
            <el-button v-else-if="scope.row.orderExceptionType=='line_loop_exception'" v-hasPermi="['ecw:exception:lineLoopException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='customs_fee_not_quote_exception'" v-hasPermi="['ecw:exception:notQuoteException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='overweight_exception'" v-hasPermi="['ecw:exception:overweightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='not_shipping_channel_exception'" v-hasPermi="['ecw:exception:notChannelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='goods_weight_exception'" v-hasPermi="['ecw:exception:goodsWeightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='in_warehousing_diff_exception'" v-hasPermi="['ecw:exception:inWarehousingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
            <el-button v-else-if="scope.row.orderExceptionType=='stock_up_exception'" v-hasPermi="['ecw:exception:stockUpException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
177
            <el-button v-else-if="scope.row.orderExceptionType=='channel_exception'" v-hasPermi="['ecw:exception:channelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
178
            <el-button v-else-if="scope.row.orderExceptionType=='channel_packaging_overweight_exception'" v-hasPermi="['ecw:exception:channelPackagingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
179 180 181 182
          </template>
        </el-table-column>
      </el-table>
    </el-card>
我在何方's avatar
我在何方 committed
183 184 185
    <div class="preview" v-if="IsPreview">
      <file-preview :key="timers" :TragetPic="TragetPic" :FilePreAll="FilePreAll" @Close="onClickClosePreview"></file-preview>
    </div>
我在何方's avatar
我在何方 committed
186 187 188 189
  </div>
</template>

<script>
我在何方's avatar
我在何方 committed
190
import {getExceptionListByOrderId} from "@/api/ecw/orderException"
191
import { getCurrencyList } from '@/api/ecw/currency'
我在何方's avatar
我在何方 committed
192
import {getOrder} from '@/api/ecw/order'
我在何方's avatar
我在何方 committed
193
import FilePreview from '@/components/FilePreview'
我在何方's avatar
我在何方 committed
194
import {getProduct} from '@/api/ecw/product'
我在何方's avatar
我在何方 committed
195
import {getProductPriceGetPrice} from '@/api/ecw/productPrice'
我在何方's avatar
我在何方 committed
196 197
import { getChannel } from '@/api/ecw/channel';
import {getDictData, getDictDatas} from  '@/utils/dict'
我在何方's avatar
我在何方 committed
198 199 200 201

export default {
  name: "Pending",
  components: {
我在何方's avatar
我在何方 committed
202
    FilePreview
我在何方's avatar
我在何方 committed
203 204 205 206
  },
  data() {
    return {
      // 遮罩层
我在何方's avatar
我在何方 committed
207
      loading: true,
我在何方's avatar
我在何方 committed
208 209 210
      orderData:{},
      // 订单异常列表
      list: [],
我在何方's avatar
我在何方 committed
211 212 213 214 215
      orderId:0,
      IsPreview:false, // 控制预览弹窗字段
      timers:"", //时间戳
      FilePreAll:[], // 预览数组
      TragetPic:{},
我在何方's avatar
我在何方 committed
216 217
      currencyList:[],
      channelName:'/'
我在何方's avatar
我在何方 committed
218 219
    };
  },
220 221 222 223 224 225 226 227
  computed:{
    currencyMap(){
        let map = {}
        this.currencyList.forEach(item => {
          map[item.id] = this.$l(item, 'title')
        })
        return map
      },
我在何方's avatar
我在何方 committed
228 229 230
      getDictData(){
          return (type, value) => getDictData(type, value) || {}
      },
231
  },
我在何方's avatar
我在何方 committed
232
  created() {
233
    getCurrencyList().then(res => this.currencyList = res.data)
我在何方's avatar
我在何方 committed
234 235 236 237 238
    if(this.$route.query.id){
      this.orderId = this.$route.query.id
      this.getList()
      this.getOrders()
    }
我在何方's avatar
我在何方 committed
239
  },
我在何方's avatar
我在何方 committed
240 241 242 243 244
  watch:{
      'orderData.channelId'(){
        this.getChannel()
      },
  },
我在何方's avatar
我在何方 committed
245 246 247 248 249
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true;
      // 执行查询
我在何方's avatar
我在何方 committed
250 251
      getExceptionListByOrderId(this.orderId).then(response => {
        this.list = response.data;
我在何方's avatar
我在何方 committed
252 253 254 255 256 257 258
        this.list.forEach((item)=>{
          if(item.orderExceptionAttr){
            item.orderExceptionAttr = item.orderExceptionAttr.split(',')
          }else{
            item.orderExceptionAttr = []
          }
        })
我在何方's avatar
我在何方 committed
259 260 261
        this.loading = false;
      });
    },
我在何方's avatar
我在何方 committed
262 263 264 265 266 267
    getChannel(){
      if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
      getChannel(this.order.channelId).then(res => {
        this.channelName = res.data.nameZh
      })
    },
我在何方's avatar
我在何方 committed
268 269 270 271 272 273
    checkCode(data){
      if(data.indexOf('+')==-1){
      	return '+'+data
      }
      return data
    },
我在何方's avatar
我在何方 committed
274 275 276 277 278
    getOrders(){
      getOrder(this.orderId).then(response => {
        this.orderData = response.data
      });
    },
我在何方's avatar
我在何方 committed
279

280
    handEdit(row){
dragondean@qq.com's avatar
dragondean@qq.com committed
281
      // 未报价异常
我在何方's avatar
我在何方 committed
282
      if(row.orderExceptionType=='order_no_quote_exception'||row.orderExceptionType=='customs_fee_not_quote_exception'){
我在何方's avatar
我在何方 committed
283

我在何方's avatar
我在何方 committed
284 285 286
        if(row.orderItemId){
          var productData = this.orderData.orderItemVOList.find(item=>item.orderItemId==row.orderItemId)
          if(productData){
287 288 289 290 291 292 293 294 295
            if(row.orderExceptionType=='customs_fee_not_quote_exception'&&productData.prodId){
              this.$router.push('/product/product-list?prodId=' + productData.prodId)
              return
            }else{
              getProduct(productData.prodId).then(res=>{
                  let params = {
                    product_id: productData.prodId,
                    product_type: res.data.typeId,
                    transportId: this.orderData.transportId,
296 297 298 299
                    importCity: this.orderData.objectiveVO.objectiveId,
                    exportCity: this.orderData.departureVO.departureId,
                    startWarehouseId: this.orderData.departureVO.id,
                    destWarehouseId: this.orderData.objectiveVO.id,
300 301 302 303 304 305 306
                    lineId: this.orderData.logisticsInfoDto.lineId,
                    channelId: this.orderData.logisticsInfoDto.channelId
                  }
                  let queryParams = {
                    productId: productData.prodId,
                    lineId: this.orderData.logisticsInfoDto.lineId,
                    channelId: this.orderData.logisticsInfoDto.channelId
我在何方's avatar
我在何方 committed
307
                  }
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
                  let url = ''
                  if([3,4].indexOf(this.orderData.transportId) > -1){
                    url = '../../lineProject/product-price/edit-air?' + (new URLSearchParams(params)).toString()
                  }else{
                    url = '../../lineProject/product-price/edit-sea?' + (new URLSearchParams(params)).toString()
                  }

                  getProductPriceGetPrice(queryParams).then(res=>{
                    console.log(res)
                    if(res.data){
                       if([3,4].indexOf(+this.orderData.transportId) > -1){
                          url =  '../../lineProject/product-price/edit-air?action=update&id='+res.data.id
                       }else{
                          url =  '../../lineProject/product-price/edit-sea?action=update&id='+res.data.id
                       }
我在何方's avatar
我在何方 committed
323

324 325 326
                    }
                    return this.$router.push(url)
                  })
327 328 329 330
                /* +productData.prodId
                +'&product_type='+res.data.typeId
                +'&transportId='+this.orderData.transportId
                +'&exportCity='+this.orderData.logisticsInfoDto.startCityId+'&importCity='+this.orderData.logisticsInfoDto.destCityId */
我在何方's avatar
我在何方 committed
331

我在何方's avatar
我在何方 committed
332 333
            })
          }
334
          }
我在何方's avatar
我在何方 committed
335
        }else{
dragondean@qq.com's avatar
dragondean@qq.com committed
336
          return this.$confirm(this.$t('数据缺少orderItemId参数,确定要跳转设置路线价格么?')).then(res => {
我在何方's avatar
我在何方 committed
337 338 339 340 341 342
              let url = ''
              if([3,4].indexOf(this.orderData.transportId) > -1){
                  url = '../../lineProject/product-price/edit-air?'
              }else{
                  url = '../../lineProject/product-price/edit-sea?'
              }
dragondean@qq.com's avatar
dragondean@qq.com committed
343 344
            this.$router.push(url)
          })
我在何方's avatar
我在何方 committed
345

我在何方's avatar
我在何方 committed
346
        }
我在何方's avatar
我在何方 committed
347

dragondean@qq.com's avatar
dragondean@qq.com committed
348 349 350
      }
      // 重泡货异常
      else if(row.orderExceptionType == 'order_heavy_cargo_exception'||row.orderExceptionType=='order_bulky_cargo_exception'){
我在何方's avatar
我在何方 committed
351
        this.$router.push({
352
          path:"/order/weightDeal?id="+row.id+'&type='+row.orderExceptionType,
我在何方's avatar
我在何方 committed
353
        })
dragondean@qq.com's avatar
dragondean@qq.com committed
354 355 356
       }
       // 其他异常
       else{
我在何方's avatar
我在何方 committed
357
        this.$router.push({
358
          path:"/order/prepayDeal?id="+row.id,
我在何方's avatar
我在何方 committed
359
        })
我在何方's avatar
我在何方 committed
360
       }
我在何方's avatar
我在何方 committed
361

我在何方's avatar
我在何方 committed
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
    },
    getFileName(fileName){
      var fileArr = fileName.split('/')
      return fileArr[fileArr.length-1]
    },
    getFileFormat(fileName){
      var fileArr = this.getFileName(fileName).split('.')
      return fileArr[fileArr.length-1]
    },
    	// 打开预览
    onClickOpenPreview(val,index){
      this.TragetPic  = { // 当前点击的文件
        FileName: this.getFileName(val), // 文件名称
        name: this.getFileName(val), // 文件名称(可以不传)
        format:this.getFileFormat(val), // 文件格式
        url: val,  // 预览地址
        downUrl:"", // 下载地址
      } // 目标对象
我在何方's avatar
我在何方 committed
380
        var fileArr = this.list[index].orderExceptionAttr
我在何方's avatar
我在何方 committed
381 382 383 384 385 386 387 388 389 390
        fileArr.forEach(item =>{ // 需要预览的文件数组(可以传空数组就是单张预览)
          let obj = {
            FileName: this.getFileName(item),
            name: this.getFileName(item),
            format:this.getFileFormat(item),
            url: item,
            downUrl:"",
          }
          this.FilePreAll.push(obj)
        })
391
        console.log(this.fileArr)
我在何方's avatar
我在何方 committed
392 393 394 395 396 397 398
      this.IsPreview = true // 打开预览弹窗
      this.timers = new Date().getTime() // 刷新预览地址
    },
  // 关闭预览
    onClickClosePreview(val){
      this.IsPreview = val  // 由组件内部传入的关闭数据赋值关闭
    },
我在何方's avatar
我在何方 committed
399 400 401
  }
}
</script>
我在何方's avatar
我在何方 committed
402 403 404 405 406
<style scoped>
  .filelist{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
我在何方's avatar
我在何方 committed
407
    flex-direction: column
我在何方's avatar
我在何方 committed
408 409 410 411
  }
  .filelist span{
    color: #1E98D7;
  }
我在何方's avatar
我在何方 committed
412 413 414
  .card-title{
      font-size: 18px;
      font-weight: bold;
我在何方's avatar
我在何方 committed
415
      margin-top: 10px;
我在何方's avatar
我在何方 committed
416 417 418 419
  }
  .card{
    margin-top: 20px;
  }
420
  .clamp3{
我在何方's avatar
我在何方 committed
421 422
    overflow: hidden;
    display: -webkit-box;
423
    -webkit-box-orient: vertical;
我在何方's avatar
我在何方 committed
424
    -webkit-line-clamp: 3;
425
  }
我在何方's avatar
我在何方 committed
426
</style>