detail.vue 42.2 KB
Newer Older
1
<template>
dragondean@qq.com's avatar
dragondean@qq.com committed
2
  <div class="app-container" v-if="order">
3
    <el-card class="card">
4
      <div slot="header" class="card-title">
5
        {{$t('订单编号')}}{{order.orderNo}}
dragondean@qq.com's avatar
dragondean@qq.com committed
6 7
        <template v-if="order.tidanNo"> - {{order.tidanNo}}</template>
        <template v-else-if="order.containerNumber"> - {{order.containerNumber}}</template>
8
      </div>
9
      <el-row :gutter="24">
我在何方's avatar
我在何方 committed
10
        <el-col :span="12" v-if="order.consignorVO" >
11
          <el-descriptions class="margin-top" border :title="$t('发货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
12 13 14
            <el-descriptions-item :label="$t('中文名称')">
              <component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consignorVO.customerId}`">{{order.consignorVO.name}}</component>
            </el-descriptions-item>
15
             <!-- v1.7新增 -->
16 17 18 19 20
             <el-descriptions-item :label="$t('英文名称')">
							 <component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consignorVO.customerId}`">
                {{order.consignorVO.nameEn}}
               </component>
             </el-descriptions-item>
21
            <el-descriptions-item :label="$t('电话')">
22
              +{{order.consignorVO.countryCode}} {{order.consignorVO.phone}}
23
            </el-descriptions-item>
24 25 26
            <el-descriptions-item :label="$t('付款人')">
              <el-link v-if="order.drawee == 3" @click.native="showDarweeDialog=true" type="primary">{{ $t('自定义') }}</el-link>
              <dict-tag v-else :type="DICT_TYPE.DRAWEE" :value="order.drawee"></dict-tag>
27
            </el-descriptions-item>
28
          </el-descriptions>
29 30 31 32 33 34 35 36 37 38
          <el-descriptions border :class="showMore?'showInfo':'hiddenInfo'" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
              <el-descriptions-item :label="$t('邮箱')">{{order.consignorVO.email}}</el-descriptions-item>
              <el-descriptions-item :label="$t('公司中文名称')">
                {{order.consignorVO.company}}
              </el-descriptions-item>
               <!-- v1.7新增 -->
              <el-descriptions-item :label="$t('公司英文名称')">
                {{order.consignorVO.companyEn}}
              </el-descriptions-item>
            </el-descriptions>
39
        </el-col>
我在何方's avatar
我在何方 committed
40 41
        <el-col :span="12" v-if="order.consigneeVO" style="position: relative;">
          <span style="color:#409EFF;position: absolute;right:40px;top:0;font-size:16px;cursor: pointer;" @click="consigneeChange">{{consigneeText}}</span>
42
          <el-descriptions class="margin-top" border :title="$t('收货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
43 44 45
            <el-descriptions-item :label="$t('中文名称')">
              <component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consigneeVO.customerId}`">{{order.consigneeVO.name}}</component>
            </el-descriptions-item>
46
             <!-- v1.7新增 -->
47 48 49
            <el-descriptions-item :label="$t('英文名称')">
              <component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consigneeVO.customerId}`">{{order.consigneeVO.nameEn}}</component>
            </el-descriptions-item>
50
            <el-descriptions-item :label="$t('电话')">
51
              +{{order.consigneeVO.countryCode}} {{order.consigneeVO.phone}}
52
            </el-descriptions-item>
53
            <el-descriptions-item :label="$t('收货方式')">
dragondean@qq.com's avatar
dragondean@qq.com committed
54 55
              <dict-tag :type="DICT_TYPE.ECW_HARVEST_METHOD" :value="order.consigneeVO.harvestMethod" />
            </el-descriptions-item>
56
            <el-descriptions-item :label="$t('收货地区')">
dragondean@qq.com's avatar
dragondean@qq.com committed
57 58
              {{region}}
            </el-descriptions-item>
59
            <el-descriptions-item :label="$t('收货地址')">
dragondean@qq.com's avatar
dragondean@qq.com committed
60 61
              {{order.consigneeVO.address}}
            </el-descriptions-item>
62
          </el-descriptions>
63 64 65 66 67 68 69 70 71 72
          <el-descriptions border :class="showMore?'showInfo':'hiddenInfo'" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
             <el-descriptions-item :label="$t('邮箱')">{{order.consigneeVO.email}}</el-descriptions-item>
             <el-descriptions-item :label="$t('公司中文名称')">
               {{order.consigneeVO.company}}
             </el-descriptions-item>
              <!-- v1.7新增 -->
             <el-descriptions-item :label="$t('公司英文名称')">
               {{order.consigneeVO.companyEn}}
             </el-descriptions-item>
          </el-descriptions>
73 74 75 76
        </el-col>
      </el-row>
    </el-card>
    <el-card class="card">
我在何方's avatar
我在何方 committed
77
      <el-descriptions border :title="$t('物流信息')" :column="4" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
78 79
        <el-descriptions-item :label="$t('始发仓')">{{$l(order.logisticsInfoDto, 'startTitle')}}</el-descriptions-item>
        <el-descriptions-item :label="$t('目的仓')">{{$l(order.logisticsInfoDto, 'destTitle')}}</el-descriptions-item>
dragondean@qq.com's avatar
dragondean@qq.com committed
80
        <!-- <el-descriptions-item :label="$t('地址')" :span="2">{{order.logisticsInfoDto.startAddressZh}}</el-descriptions-item> -->
81
        <el-descriptions-item :label="$t('运输方式')" >
82 83
          <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
        </el-descriptions-item>
84
        <el-descriptions-item v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, order.transportId).cssClass == 'channel'":label="$t('出货渠道')" >{{order.channelName}}</el-descriptions-item>
85 86
      </el-descriptions>
    </el-card>
Marcus's avatar
Marcus committed
87

88
    <el-card class="card">
我在何方's avatar
我在何方 committed
89
      <el-descriptions class="mr-10" border :title="$t('基础信息')" :column="2" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
90
        <el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
dragondean@qq.com's avatar
dragondean@qq.com committed
91
        <el-descriptions-item :label="$t('送货时间')" v-if="!order.isExternalWarehouse">{{order.deliveryDate}}</el-descriptions-item>
92 93 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
        <el-descriptions-item :label="$t('是否控货')">
          <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCargoControl" />
        </el-descriptions-item>
        <el-descriptions-item :label="$t('填单信息')">
          {{order.costVO.totalNum}}{{$t('箱')}}
          {{order.costVO.totalWeight}}Kg
          {{order.costVO.totalVolume}}m³
          {{order.costVO.totalQuantity}}{{$t('个')}}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('仓库实测')">
          {{order.sumNum}}{{$t('箱')}}
          {{order.sumWeight}}Kg
          {{order.sumVolume}}m³
          {{order.sumQuantity}}{{$t('个')}}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('收款数据')">
          {{order.sumNum}}{{$t('箱')}}
          {{order.vweight}}Kg
          {{order.wvolume}}m³
          {{order.sumQuantity}}{{$t('个')}}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('入仓类型')">
          <dict-tag :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" :value="order.warehouseType" />
        </el-descriptions-item>
        <el-descriptions-item :label="$t('单证报关')">
          <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" />
        </el-descriptions-item>
我在何方's avatar
我在何方 committed
119 120 121 122 123 124
        <el-descriptions-item :label="$t('关联报价单')">
          <router-link v-if="offerData" :to="{path: '/offer/detail',query: {offerId: offerData.offerId}}" class="link-type">
            <span>{{ offerData.number }}</span>
          </router-link>
          <span v-else>/</span>
        </el-descriptions-item>
125
      </el-descriptions>
我在何方's avatar
我在何方 committed
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
      <el-descriptions class="mr-10" border :column="2" :class="showMore?'showInfo':'hiddenInfo'" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
        <el-descriptions-item :label="$t('出单方式')">
            <dict-tag :type="DICT_TYPE.ECW_SUING_METHOD" :value="order.issuingMethod" />
          </el-descriptions-item>
          <el-descriptions-item :label="$t('代收货款')">
            <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCollection" />
            <template v-if="order.isCollection == 1">({{order.collectionProxy}}{{currencyMap[order.collectionProxyCurrency]}})</template>
          </el-descriptions-item>
          <el-descriptions-item :label="$t('集运仓库')">
            {{order.isExternalWarehouse ? $t('外部仓') : $t('自有仓') }}
            <template v-if="order.isExternalWarehouse" v-for="(item, index) in order.externalWarehouseDtoList" >
              <div v-if="item.estLoadingTime || item.loadingAddress" :key="index">
                {{$t('装柜时间')}}{{item.estLoadingTime}}
                {{$t('装柜地址')}}{{item.loadingAddress}}
              </div>
            </template>
142

我在何方's avatar
我在何方 committed
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
          </el-descriptions-item>
          <el-descriptions-item :label="$t('订单类型')">
            <el-tag v-if="order.type.indexOf('1') > -1">
              {{ $t('集运服务') }}
            </el-tag>
            <el-tag v-if="order.type.indexOf('2') > -1">
              {{ $t('海外仓') }}
            </el-tag>
          </el-descriptions-item>
          <el-descriptions-item :label="$t('快递单号')">
            {{order.number}}
          </el-descriptions-item>
          <el-descriptions-item :label="$t('创建人')">
            {{order.creatorName}} ({{order.userType == 1 ? $t('会员') : $t('后台用户')}})
          </el-descriptions-item>
          <el-descriptions-item :label="$t('创建时间')">
            {{order.createTime|parseTime}}
          </el-descriptions-item>
161 162 163
          <el-descriptions-item :label="$t('客户经理')">
            {{order.salesmanName}}
          </el-descriptions-item>
164 165 166
          <el-descriptions-item :label="$t('提单是否显示价格')">
            {{order.displayBillLadingPrice ? $t('是') : $t('否')}}
          </el-descriptions-item>
我在何方's avatar
我在何方 committed
167
        </el-descriptions>
168

169
    </el-card>
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
    <el-card class="card" v-if="[3,4].indexOf(+order.transportId) > -1">
      <el-descriptions class="mr-10" border :title="$t('空运专线')" :column="2" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
        <el-descriptions-item :label="$t('是否双清')">
          <dict-tag :type="DICT_TYPE.ECW_DOUBLE_CLEAR" :value="order.doubleClear" />
        </el-descriptions-item>
        <el-descriptions-item :label="$t('航空公司')">
          {{ order.companyName||'' }}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('清关证书')">
          {{order.isSingleTicketTransport? this.$t('是'):this.$t('否')}}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('清关证书备注')">
          {{ order.customsClearCertRemarks }}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('是否拆包')">
          {{order.isUnpack? this.$t('是'):this.$t('否')}}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('单票立刻转运')">
          {{order.isSingleTicketTransport? this.$t('是'):this.$t('否')}}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('特殊要求')">
          <template v-if="order.packageType">
            <dict-tag v-for="packageType in order.packageType.split(',').filter(item => !!item)" class="mr-10" :key="packageType" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" :value="packageType" />
          </template>
        </el-descriptions-item>
        <el-descriptions-item :label="$t('特殊要求备注')">
          {{order.packageRemarks}}
        </el-descriptions-item>
198 199 200 201 202 203
        <el-descriptions-item :label="$t('目的港清关')">
          {{['',  $t('我司承接'), $t('客户自清')][order.portDestCustomsClear] || ''}}
        </el-descriptions-item>
        <el-descriptions-item :label="$t('发货方式')">
          {{['',  $t('多票'), $t('单票')][order.deliveryWay] || ''}}
        </el-descriptions-item>
204 205
      </el-descriptions>
    </el-card>
206
    <el-card class="card">
ylpmty's avatar
ylpmty committed
207
      <el-tabs v-model="activeName">
208
        <el-tab-pane :label="$t('货物详情')" name="first">
209
          <el-table :data="order.orderItemVOList" border style="width: 100%">
210
            <el-table-column :label="$t('序号')" width="90px">
dragondean@qq.com's avatar
dragondean@qq.com committed
211 212
              <template slot-scope="scope">{{scope.$index + 1}}</template>
            </el-table-column>
213 214 215
            <el-table-column prop="prodTitleZh" :label="$t('中文品名')" />
            <el-table-column prop="prodTitleEn" :label="$t('英文品名')" />
            <el-table-column prop="brand" :label="$t('品牌')"  width="90px">
216
              <template slot-scope="{row}">
217
                <template v-if="row.brandName">{{row.brandName}}</template>
dragondean@qq.com's avatar
dragondean@qq.com committed
218
                <dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
219 220
              </template>
            </el-table-column>
221 222 223 224 225
            <el-table-column prop="brand" :label="$t('特性')"  width="90px">
              <template slot-scope="{row}">
                {{showAttrText(row.warehouseInInfoVO ? row.warehouseInProdAttrIds : row.prodAttrIds)}}
              </template>
            </el-table-column>
226
            <el-table-column prop="num" :label="$t('填单件数')"  width="90px"/>
227 228
            <el-table-column prop="sumNum" :label="$t('入仓件数')"  width="90px">
              <template slot-scope="{row}">
229
                <el-link type="primary" @click.native="showWarehouseLogs(row)">{{row.warehouseInInfoVO ? row.warehouseInInfoVO.cartonsNum : 0}}</el-link>
dragondean@qq.com's avatar
dragondean@qq.com committed
230
                <div v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.isMultiSpecification">({{$t('多规格')}})</div>
231 232
              </template>
            </el-table-column>
233
            <el-table-column prop="unit" :label="$t('单位')" width="90px">
234
              <template slot-scope="{row}">
235
                <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
236 237 238
              </template>
            </el-table-column>

239 240
            <el-table-column prop="worth" :label="$t('货值')"  width="120px"/>
            <el-table-column prop="" :label="$t('材质')">
241 242 243 244
              <template slot-scope="{row}">
                <dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="row.material" />
              </template>
            </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
245 246
            <el-table-column prop="volume" :label="$t('体积') + '(m³)'"  width="90px">
              <template slot-scope="{row}">
247
                {{row.warehouseInInfoVO ? row.warehouseInInfoVO.volume : row.volume}}
dragondean@qq.com's avatar
dragondean@qq.com committed
248 249 250 251
              </template>
            </el-table-column>
            <el-table-column prop="weight" :label="$t('重量') + '(kg)'"  width="90px">
              <template slot-scope="{row}">
252
                {{row.warehouseInInfoVO ? row.warehouseInInfoVO.weight : row.weight}}
dragondean@qq.com's avatar
dragondean@qq.com committed
253 254
              </template>
            </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
255 256
            <el-table-column prop="warehouseInInfoVO.quantityAll" :label="$t('数量') + '(个)'"  width="90px">
              <template slot-scope="{row}">
257
                {{row.warehouseInInfoVO ? row.warehouseInInfoVO.quantityAll : row.quantity}}
dragondean@qq.com's avatar
dragondean@qq.com committed
258 259
              </template>
            </el-table-column>
260 261 262 263 264 265 266 267 268 269 270
            <el-table-column prop="weight" :label="$t('收费重量') + '(kg)'"  width="100px">
              <template slot-scope="{row}">
                {{row.chargeWeight}}
              </template>
            </el-table-column>
            <el-table-column prop="volume" :label="$t('收费方数') + '(m³)'"  width="100px">
              <template slot-scope="{row}">
                {{row.chargeVolume}}
              </template>
            </el-table-column>

271
            <el-table-column prop="" :label="$t('费用类型')">
dragondean@qq.com's avatar
dragondean@qq.com committed
272
              <template slot-scope="{row}">
273
                <dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.isPayAdvance" />
dragondean@qq.com's avatar
dragondean@qq.com committed
274 275
              </template>
            </el-table-column>
我在何方's avatar
我在何方 committed
276 277 278 279 280 281 282 283 284 285 286
            <el-table-column prop="" :label="$t('用途')">
              <template slot-scope="{row}">
                <div v-if="row.usageIds">
                  <div v-for="(item,index) in row.usageIds.split(',')">
                    <dict-tag :type="DICT_TYPE.OREER_ITEM_USAGE" :value="item" />
                    <span v-if="(index+1)!=row.usageIds.split(',').length">,</span>
                  </div>
                </div>
                <div v-else></div>
              </template>
            </el-table-column>
287
            <el-table-column prop="" :label="$t('成交单价')"  width="220px">
dragondean@qq.com's avatar
dragondean@qq.com committed
288
              <template slot-scope="{row}">
289

dragondean@qq.com's avatar
dragondean@qq.com committed
290
                <template v-if="row.charging ==1">
291
                  <template v-if="!row.originalSeaFreight">{{ $t('未报价') }}</template>
dragondean@qq.com's avatar
dragondean@qq.com committed
292
                  <el-link type="primary" @click="showFeeDetail(row, 'clearance')" v-else>{{$t('全包价')}} {{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</el-link>
dragondean@qq.com's avatar
dragondean@qq.com committed
293
                </template>
294
                <template v-else-if="!row.originalSeaFreight && !row.originalClearanceFreight">{{ $t('未报价') }}</template>
dragondean@qq.com's avatar
dragondean@qq.com committed
295
                <template v-else>
296
                  <el-link type="primary" @click="showFeeDetail(row, 'freight')">
dragondean@qq.com's avatar
dragondean@qq.com committed
297
                      {{$t('运费')}}{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
298 299
                  </el-link>
                  <el-link type="primary" @click="showFeeDetail(row, 'clearance')">
dragondean@qq.com's avatar
dragondean@qq.com committed
300
                      {{$t('清关费')}}{{row.oneClearanceFreight}} {{currencyMap[row.clearanceFreightCurrency]}} / {{unitMap[row.clearanceFreightVolume]}}
301
                  </el-link >
dragondean@qq.com's avatar
dragondean@qq.com committed
302 303 304
                </template>
              </template>
            </el-table-column>
305
            <el-table-column prop="" :label="$t('储位')">
dragondean@qq.com's avatar
dragondean@qq.com committed
306
              <template slot-scope="{row}">
307 308 309 310 311
                  <template v-if="row.warehouseInInfoVO">
                    {{getLocationName(row.warehouseInInfoVO.orderLocationMergeVOSet)}}
                  </template>
              </template>
            </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
312
            <el-table-column prop="" :label="$t('填单快递单号')">
dragondean@qq.com's avatar
dragondean@qq.com committed
313
              <template slot-scope="{row}">
314 315
                <!-- 这里不知道什么原因被改成了入仓单号,现根据bug单改成填单快递单号,如需更改请注明缘由
                https://zentao.test.jdshangmen.com/bug-view-2645.html -->
dragondean@qq.com's avatar
dragondean@qq.com committed
316 317 318
                {{ row.expressNo }}
              </template>
            </el-table-column>
319 320
          </el-table>
        </el-tab-pane>
321
        <el-tab-pane :label="$t('订单动态')" name="second">
322
          <el-timeline v-if="order.orderTimeVOList && order.orderTimeVOList.length" :reverse="true">
323
            <el-timeline-item v-for="(activity, index) in order.orderTimeVOList" :key="index" :timestamp="parseTime(activity.businessTime)">
324
              {{ $l(activity, 'title') }}
dragondean@qq.com's avatar
dragondean@qq.com committed
325
              <div :class="{red: !!activity.mark}">{{$l(activity, 'remarks')}}</div>
326 327
            </el-timeline-item>
          </el-timeline>
328
          <el-result v-else icon="info " :title="$t('暂无数据')" :subTitle="$t('暂无订单动态数据')" />
329
        </el-tab-pane>
330
        <el-tab-pane :label="$t('运单资料/提货单')" name="three">
dragondean@qq.com's avatar
dragondean@qq.com committed
331
          <!--inWarehouseState 1待入库,2多了,3少了,4到齐-->
332
          <el-button v-hasPermi="['ecw:order:show_receipt']" type="text" @click="showWarehouseReceipt=true" :disabled="order.inWarehouseState == 0 && order.shipmentState == 0">{{$t('查看入仓单')}}</el-button>
邓春圆's avatar
邓春圆 committed
333
          <image-display :type="1" :biz-id="order.orderId">
邓春圆's avatar
邓春圆 committed
334 335
            <el-button style="margin: 0 15px" type="text">{{$t('入仓影像')}}</el-button>
          </image-display>
336 337
          <el-button v-hasPermi="['ecw:order:show_landing']" type="text" @click.native="showLadingBill=true" :disabled="!order.ladingState">{{$t('查看提货单')}}</el-button>
          <el-button v-hasPermi="['ecw:order:show_packing']" :disabled="!order.packingListUrl" type="text" @click="downloadPackingList">{{$t('装箱单')}}</el-button>
我在何方's avatar
我在何方 committed
338
          <el-button v-hasPermi="['ecw:order:show_customs']"  type="text" @click="showDeclaration=true">{{$t('查看报关资料')}}</el-button>
339
        </el-tab-pane>
340
        <el-tab-pane :label="$t('费用明细')" name="four">
341
          <el-button v-has-permi="['order:detail:fee-detail']" type="primary" @click="showFeeSummary=true">{{$t('费用汇总')}}</el-button>
342
          <el-table :data="feeList">
343 344 345 346 347
            <el-table-column :label="$t('订单号')" prop="orderNo">
              <template slot-scope="{row}">
                {{row.orderNo}}
              </template>
            </el-table-column>
348
            <el-table-column :label="$t('运输方式')">
349 350
              <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
            </el-table-column>
351
            <el-table-column :label="$t('出货渠道')">
352
              {{channelName}}
353
            </el-table-column>
354
            <el-table-column :label="$t('始发地')" prop="orderNo">
355
              {{$l(departure, 'title') || '-'}}
356
            </el-table-column>
357
            <el-table-column :label="$t('目的地')">
358
              {{$l(objective, 'title') || '-'}}
359
            </el-table-column>
360 361 362 363 364
            <el-table-column :label="$t('品名')" prop="titleZh">
              <template slot-scope="{row}">
                {{$l(row, 'title')}}
              </template>
            </el-table-column>
365 366 367 368 369
            <el-table-column :label="$t('费用来源')" prop="feeSource">
              <template slot-scope="{row}">
                <dict-tag :type="DICT_TYPE.ECW_FEE_SOURCE" :value="row.feeSource" />
              </template>
            </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
370 371 372 373 374
            <el-table-column :label="$t('箱数')" prop="num">
              <template slot-scope="{row}">
                {{row.num || '-'}}
              </template>
            </el-table-column>
375
            <el-table-column :label="$t('体积/重量')">
376
              <template slot-scope="{row}">
dragondean@qq.com's avatar
dragondean@qq.com committed
377
               {{row.volume || '-'}} / {{row.weight || '-'}}
378 379
              </template>
            </el-table-column>
380
            <el-table-column :label="$t('收款类型')">
381 382 383 384
              <template slot-scope="{row}">
                <dict-tag :type="DICT_TYPE.PAYMENT_TYPE" :value="row.collectionType" />
              </template>
            </el-table-column>
385
            <el-table-column :label="$t('收入类型')">
386 387 388 389
              <template slot-scope="{row}">
                <dict-tag :type="DICT_TYPE.FEE_TYPE" :value="row.feeType" />
              </template>
            </el-table-column>
dragondean@qq.com's avatar
dragondean@qq.com committed
390 391 392 393 394 395 396 397 398 399
            <el-table-column :label="$t('单价金额')" prop="unitPrice">
              <template slot-scope="{row}">
                {{row.unitPrice}}{{currencyMap[row.currencyId]}}
              </template>
            </el-table-column>
            <el-table-column :label="$t('总金额')" prop="totalAmount">
              <template slot-scope="{row}">
                {{row.totalAmount}}{{currencyMap[row.currencyId]}}
              </template>
            </el-table-column>
400 401 402 403 404
            <el-table-column :label="$t('核销比例')" prop="totalAmount">
              <template slot-scope="{row}">
                {{row.writeOffProportion || 0}}
              </template>
            </el-table-column>
405
          </el-table>
dragondean@qq.com's avatar
dragondean@qq.com committed
406
        </el-tab-pane>
407 408
        <!-- 这个地方v-hasPermi不生效,所以换checkPermi函数检查 -->
        <el-tab-pane :label="$t('操作日志')" name="five" v-if="checkPermi(['ecw:order:logs'])">
409
          <el-table :data="logs" v-loading="logsLoading">
410 411 412 413 414 415 416 417 418 419 420 421 422
            <el-table-column :label="$t('时间')" width="150">
              <template slot-scope="{row}">{{ parseTime(row.createTime) }}</template>
            </el-table-column>
            <el-table-column :label="$t('操作人')" prop="creatorName" width="150"> </el-table-column>
            <el-table-column :label="$t('操作人类型')" width="100">
              <template slot-scope="{row}">{{ row.userType == 1 ? $t('会员') : $t('管理员') }}</template>
            </el-table-column>
            <el-table-column :label="$t('操作类型')" prop="type" width="150"></el-table-column>
            <el-table-column :label="$t('操作描述')" prop="msg" width="300"></el-table-column>
            <el-table-column :label="$t('备注')" prop="note">
              <template slot-scope="{row}">
                <div v-if="row.note">
                  <div v-for="item in parseLogNote(row.note)">
423 424 425 426 427 428
                    <template v-if="item.orgValue">
                      {{$t('【{name}】从【{orgValue}】修改为【{newValue}',  item)}}
                    </template>
                    <template v-else>
                      {{$t('【{name}】设置为【{newValue}',  item)}}
                    </template>
429 430 431 432
                  </div>
                </div>
              </template>
            </el-table-column>
433 434 435 436 437
            <el-table-column :label="$t('操作')" prop="note">
              <template slot-scope="{row}">
                <el-link type="primary" @click="showLogDetailId=row.id">{{$t('详情')}}</el-link>
              </template>
            </el-table-column>
438 439
          </el-table>
        </el-tab-pane>
440 441 442
      </el-tabs>
    </el-card>

443
    <print-warehouse-receipt v-if="showWarehouseReceipt" :order-id="order.orderId" @close="showWarehouseReceipt=false" />
444
    <print-lading-bill v-if="showLadingBill" :order-id="order.orderId" :transport-type="order.transportId" @close="showLadingBill=false" />
我在何方's avatar
我在何方 committed
445
    <warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" @openPackHistory="openPackHistory" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" />
446
    <el-dialog :title="$t('付款人')" :visible.sync="showDarweeDialog" v-if="order && order.customDraweeVOList">
dragondean@qq.com's avatar
dragondean@qq.com committed
447
      <el-table :data="order.customDraweeVOList" v-if="order.drawee==3" >
448
        <el-table-column :label="$t('费用类型')" prop="label" width="200px">
dragondean@qq.com's avatar
dragondean@qq.com committed
449 450 451 452
          <template slot-scope="{row}">
          <dict-tag :type="DICT_TYPE.ECW_CUSTOM_DRAWEE" :value="row.name"/>
          </template>
        </el-table-column>
453
        <el-table-column :label="$t('付款人')" width="300px">
dragondean@qq.com's avatar
dragondean@qq.com committed
454 455 456 457 458 459
            <template slot-scope="{row}">
                <dict-tag :type="DICT_TYPE.DRAWEE" :value="row.value" />
            </template>
        </el-table-column>
      </el-table>
    </el-dialog>
460 461 462 463

    <el-dialog :title="$t('费用详情')" :visible="!!showFeeDetailDialog" :before-close="closeFeeDetail">
      <el-row v-if="feeDetail">
        <el-col :span="12">
dragondean@qq.com's avatar
dragondean@qq.com committed
464
          <div>{{feeDetail.charging ? $t('全包价') : $t('运费')}}</div>
465
          <div v-for="item in feeDetail.freight">
houjn@hikoon.cn's avatar
houjn@hikoon.cn committed
466
            {{item.label}}: {{item.value}}
467 468 469 470 471
            <template v-if="item.currency">
              {{currencyMap[item.currency]}} / {{unitMap[item.volume]}} <span v-if="item.remark">{{item.remark}}</span>
            </template>
          </div>
        </el-col>
dragondean@qq.com's avatar
dragondean@qq.com committed
472
        <el-col :span="12" v-if="feeDetail.charging != 1">
473 474 475 476 477 478
          <div>
            {{$t('清关费')}}
            <template v-if="order.transportId == 3 || order.transportId == 4">
              {{$t('来自{source}', {source: feeDetail.airClearanceSource + feeDetail.sourceName})}}
            </template>
          </div>
479 480 481 482 483 484 485 486
          <div v-for="item in feeDetail.clearance">
            {{item.label}}: {{item.value}}
            <template v-if="item.currency">
              {{currencyMap[item.currency]}} / {{unitMap[item.volume]}} <span v-if="item.remark">{{item.remark}}</span>
            </template>
          </div>
        </el-col>
      </el-row>
487

488
      <div v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" class="page-title">{{ $t('优惠详情') }}</div>
489
      <el-table v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" :data="feeDetail.coupons">
490 491
        <el-table-column label="优惠ID" prop="couponId"></el-table-column>
        <el-table-column label="优惠名称">
492 493 494 495
          <template slot-scope="{row}">
            {{ $l(row, 'title') }}
          </template>
        </el-table-column>
496
        <el-table-column label="类型">
497 498 499 500
          <template slot-scope="{row}">
            <dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" ></dict-tag>
          </template>
        </el-table-column>
501
        <el-table-column label="运费优惠">
502 503 504 505 506
          <template slot-scope="{row}">
            {{ row.freightReduceAmount}}
            {{currencyMap[row.freightReduceCurrencyId]}}
          </template>
        </el-table-column>
507
        <el-table-column label="清关费优惠">
508 509 510 511 512 513
          <template slot-scope="{row}">
            {{ row.clearanceReduceAmount}}
            {{ currencyMap[row.clearanceReduceCurrencyId] }}
          </template>
        </el-table-column>
      </el-table>
514
    </el-dialog>
515 516 517

    <!--日志详情-->
    <operate-log-detail v-if="showLogDetailId" :log-id="showLogDetailId" @close="showLogDetailId=null"></operate-log-detail>
我在何方's avatar
我在何方 committed
518 519 520 521 522
    <!--打包历史-->
    <pack-history v-if="shopPackId" :order ="order" :orderItemId="shopPackId" @showPackDetail="showPackDetail" @close="shopPackId=null"></pack-history>
    <!--打包历史详情-->
    <pack-history-detail v-if="packAfterData" :order="order" :packAfterData="packAfterData" :orderItemId="showWarehouseInItemId"   @close="packAfterData=null"></pack-history-detail>

我在何方's avatar
我在何方 committed
523 524
    <!-- 报关资料 -->
    <declaration-documents v-if="showDeclaration" :order-id="order.orderId" :order-no="order.orderNo" @close="showDeclaration=false" />
525
    <!--费用汇总-->
526
    <fee-detail
527
      v-if="showFeeSummary"
528 529
      :order-id="order.orderId"
      :currency-map="currencyMap"
530
      @close="showFeeSummary=false" />
531
  </div>
532

533 534 535
</template>

<script>
536
import {getOrder, operateLogPage} from '@/api/ecw/order'
537
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
538 539
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
dragondean@qq.com's avatar
dragondean@qq.com committed
540 541
import {getUnitList} from '@/api/ecw/unit'
import {getCurrencyList} from '@/api/ecw/currency'
542 543
import {getReceivableListByOrderId} from '@/api/ecw/receipt'
import { getChannel } from '@/api/ecw/channel';
dragondean@qq.com's avatar
dragondean@qq.com committed
544
import {listByIds} from '@/api/ecw/region'
545
import WarehouseDetail from './components/WarehouseDetail';
546
import { parseTime } from '@/utils/ruoyi';
547 548
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {checkPermi} from '@/utils/permission'
549
import OperateLogDetail from "@/views/ecw/order/components/OprateLogDetail";
我在何方's avatar
我在何方 committed
550
import DeclarationDocuments from './components/DeclarationDocuments';
邓春圆's avatar
邓春圆 committed
551
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
552
import FeeDetail from "@/views/ecw/order/components/FeeDetail.vue";
我在何方's avatar
我在何方 committed
553 554
import PackHistory from './components/PackHistory';
import PackHistoryDetail from './components/PackHistoryDetail';
我在何方's avatar
我在何方 committed
555
import {getOfferCheck} from '@/api/ecw/offer'
556
import {getSupplier} from "@/api/ecw/supplier";
557
import {getProductAttrList} from "@/api/ecw/productAttr";
我在何方's avatar
我在何方 committed
558

559 560 561
export default {
  name: "detail",
  components: {
邓春圆's avatar
邓春圆 committed
562
    ImageDisplay,
563
    OperateLogDetail,
564
    PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect,DeclarationDocuments,
我在何方's avatar
我在何方 committed
565
    FeeDetail,PackHistory,PackHistoryDetail
ylpmty's avatar
ylpmty committed
566 567 568 569 570 571 572
  },
  filters: {
    customsTypeFilter(e, customsTypeList) {
      if (e) return customsTypeList.find(item => item.value == e).label
    },
    transportFilter(e, transportList) {
      if (e) return transportList.find(item => item.value == e).label
573 574
    },
    parseTime
575 576 577
  },
  data() {
    return {
dragondean@qq.com's avatar
dragondean@qq.com committed
578
      showDarweeDialog: false,
579 580
      // 遮罩层
      loading: false,
dragondean@qq.com's avatar
dragondean@qq.com committed
581
      order: null,
582 583 584 585 586 587 588
      activeName: 'first',
      orderId: 17,
      tableData: [],
      queryParams: {
        pageNo: 1,
        pageSize: 10,
      },
dragondean@qq.com's avatar
dragondean@qq.com committed
589
      activities: [],
ylpmty's avatar
ylpmty committed
590 591
      customsTypeList: getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE), //报关类型
      transportList: getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE), //运输方式
592 593
      showWarehouseReceipt: false, // 是否显示打印入仓单
      showLadingBill: false, // 是否显示打印提单
dragondean@qq.com's avatar
dragondean@qq.com committed
594
      currencyList: [],
595 596
      unitList:[],
      feeList: [],
597
      channelName: '/',
598 599 600
      region: '',
      orderWarehouseIn: null, // 入仓详情
      showWarehouseInItemId: null, // 当前显示的入仓
601 602
      showFeeDetailDialog: null, // 是否显示费用详情弹层
      feeDetail: null, // 费用详情
603
      logsLoading: false, // 日志加载中
604
      logs: [], // 操作日志
605
      activeNames: [],//显示隐藏订单基本信息
606 607
      showText:this.$t('显示更多'),
      showMore:false,
我在何方's avatar
我在何方 committed
608
      consigneeText:this.$t('更多'),
609
      showLogDetailId: null, // 显示日志详情的ID,
610
      showDeclaration:false, //显示报关资料
611
      showFeeSummary: false, // 是否显示费用汇总
我在何方's avatar
我在何方 committed
612 613
      shopPackId:null,//显示打包历史的ID
      packAfterData:null,//显示打包历史详情
614
      attrList: []
dragondean@qq.com's avatar
dragondean@qq.com committed
615 616 617
    }
  },
  computed:{
dragondean@qq.com's avatar
dragondean@qq.com committed
618
    currencyMap(){
dragondean@qq.com's avatar
dragondean@qq.com committed
619 620
        let map = {}
        this.currencyList.forEach(item => {
621
            map[item.id] = this.$l(item, 'title')
dragondean@qq.com's avatar
dragondean@qq.com committed
622 623 624 625 626 627
        })
        return map
    },
    unitMap(){
        let map = {}
        this.unitList.forEach(item => {
628
            map[item.id] = this.$l(item, 'title')
dragondean@qq.com's avatar
dragondean@qq.com committed
629 630 631
        })
        return map
    },
632 633 634
    getDictData(){
        return (type, value) => getDictData(type, value) || {}
    },
635 636 637 638 639 640 641 642 643 644 645
    objective(){
      if(this.order && this.order.objectiveVO){
        return JSON.parse(this.order.objectiveVO.objective)
      }
      return {}
    },
    departure(){
      if(this.order && this.order.departureVO){
        return JSON.parse(this.order.departureVO.departure)
      }
      return {}
646 647 648 649
    },
    // 判断用户是否有查看客户详情的权限
    hasCustomerDetailPermi(){
      return checkPermi(['ecw:customer:index-query'])
650 651 652 653 654 655 656 657 658 659 660 661
    },
    // 显示特性
    showAttrText(){
      return ids => {
        if(!ids) return ''
        ids = !Array.isArray(ids) ? ids.split(',') : ids
        const attrMap = {}
        this.attrList.forEach(item => {
          attrMap[item.id] = this.$l(item, 'attrName')
        })
        return ids.map(id => attrMap[id]).join(',')
      }
662
    }
dragondean@qq.com's avatar
dragondean@qq.com committed
663 664
  },
  watch:{
665 666
    activeName(val){
      if(!this.feeList.length && val == 'four'){
dragondean@qq.com's avatar
dragondean@qq.com committed
667 668
        this.loadFeeList()
      }
669 670 671
      if(!this.logs.length && val == 'five'){
        this.loadLogs()
      }
672
    },
dragondean@qq.com's avatar
dragondean@qq.com committed
673 674 675 676 677 678
    'order.consigneeVO'(val){
      if(!val) return '-'
      listByIds({ids: [val.country, val.province, val.city].join(',')}).then(res => {
        console.log('listById', res)
        let region = ''
        res.data.forEach(item => {
679
          region += " " + this.$l(item, 'title')
dragondean@qq.com's avatar
dragondean@qq.com committed
680 681 682
        })
        this.region = region
      })
ylpmty's avatar
ylpmty committed
683
    }
684 685 686 687
  },
  created() {
    if (this.$route.query.orderId) {
      this.orderId = this.$route.query.orderId
688
      this.getOrder();
我在何方's avatar
我在何方 committed
689
      this.getOfferNumber()
690
    }
dragondean@qq.com's avatar
dragondean@qq.com committed
691 692 693

    getCurrencyList().then(res => this.currencyList = res.data)
    getUnitList().then(res => this.unitList = res.data)
694 695 696 697

    getProductAttrList().then(response => {
      this.attrList = response.data;
    })
698 699
  },
  methods: {
700 701 702 703 704 705 706 707 708 709
    checkPermi, // 检查权限
    // 获取储位名称
    getLocationName(locationArr){
      if(!locationArr || !locationArr.length) return ''
      let arr = []
      locationArr.forEach(item => {
        arr.push(`${item.areaName}${item.locationName || ''}`)
      })
      return Array.from(new Set(arr)).join(",")
    },
710 711 712 713
    //订单信息显示更多
    handleChange(val){
      this.showText = val.length>0? this.$t('隐藏') : this.$t('显示更多')
    },
714 715 716 717 718
    getAirCompany(){
      getSupplier(this.order.airlineCompany).then(res => {
        this.$set(this.order,'companyName',this.$l(res.data,'company'))
      })
    },
719 720 721
    //订单信息显示更多
    consigneeChange(){
      this.showMore = !this.showMore;
我在何方's avatar
我在何方 committed
722
      this.consigneeText = this.showMore? this.$t('隐藏') : this.$t('更多')
723
    },
724 725 726 727 728
    // 显示费用详情
    showFeeDetail(row, type){
      this.showFeeDetailDialog = true
      const freight = [], clearance = []

729 730
      let freightFields = []
      let clearanceFields = []
731 732

      const brandType = row.warehouseInInfoVO ? row.feeType : row.brandType
733
      // 不是特价则显示其他字段
734
      freightFields = [
Marcus's avatar
Marcus committed
735
        // {field: 'oneSeaFreight', label: this.$t('成交单价')},
736 737 738 739 740
        {field: 'originalSeaFreight', label: this.$t('默认单价(无牌无液无电)')},
        // {field: 'brandFreightPrice', label: this.$t('品牌加价')},
        {field: 'liquidFreightPrice', label: this.$t('液体加价')},
        {field: 'electrifiedFreightPrice', label: this.$t('带电加价')},
        {field: 'discountFreightPrice', label: this.$t('优惠活动减免')},
houjn@hikoon.cn's avatar
houjn@hikoon.cn committed
741 742
        {field: 'plainCommission', label: this.$t('明佣')},
        {field: 'hiddenCommission', label: this.$t('暗佣')}
743
      ]
dragondean@qq.com's avatar
dragondean@qq.com committed
744

745 746 747 748 749
      // 批量加价
      if(row.markupSeaFreight){
        freightFields.push({field: 'markupSeaFreight', label: this.$t('批量加价')})
      }

750 751 752 753
      // 品牌加价
      if(row['brandFreightPrice'] && row['brandFreightPrice'] > 0){
        freightFields.push({field: 'brandFreightPrice', label: brandType == 1 ? this.$t('有品牌加价') : this.$t('中性品牌加价')})
      }
754

755 756 757 758 759 760 761 762 763 764 765 766 767
      // 有减免金额才显示优惠后单价
      if(row['discountFreightPrice'] && row['discountFreightPrice'] > 0){
        freightFields.push({field: 'afterDiscountSeaFreight', label: this.$t('优惠后单价')})
      }
      freightFields.push({field: 'oneSeaFreight', label: this.$t('成交单价')})
      console.log({freightFields})
      freightFields.forEach(item => {
        if(row[item.field]){
          freight.push({
            label: item.label,
            value: row[item.field],
            currency: row.seaFreightCurrency,
            volume: row.seaFreightVolume,
768
            // 特价通过四个字段标识,任一为true则为特价
769
            remark: item.field == 'oneSeaFreight' && (row.specialPriceType || row.splitCustomPriceType || row.channelManualPricing) ? this.$t('特价') : null
770
          })
771

dragondean@qq.com's avatar
dragondean@qq.com committed
772
        }
773
      })
774

775 776 777 778 779 780 781
      clearanceFields = [
        {field: 'originalClearanceFreight', label: this.$t('默认单价(无牌无液无电)')},
        // {field: 'brandClearanceFeePrice', label: this.$t('品牌加价')},
        {field: 'liquidClearanceFeePrice', label: this.$t('液体加价')},
        {field: 'electrifiedClearanceFeePrice', label: this.$t('带电加价')},
        {field: 'discountClearanceFeePrice', label: this.$t('优惠活动减免')}
      ]
782 783 784 785
      // 批量加价
      if(row.markupClearanceFreight){
        clearanceFields.push({field: 'markupClearanceFreight', label: this.$t('批量加价')})
      }
786 787
      // 品牌加价
      if(row['brandClearanceFeePrice'] && row['brandClearanceFeePrice'] > 0){
788
        clearanceFields.push({field: 'brandClearanceFeePrice', label: brandType == 1 ? this.$t('有品牌加价') : this.$t('中性品牌加价')})
789 790 791
      }
      if(row['discountClearanceFeePrice'] && row['discountClearanceFeePrice'] > 0){
        clearanceFields.push({field: 'afterDiscountClearanceFreight', label: this.$t('优惠后单价')})
792
      }
793 794 795 796 797 798 799 800 801 802 803 804
      clearanceFields.push({field: 'oneClearanceFreight', label: this.$t('成交单价')})
      clearanceFields.forEach(item => {
        if(row[item.field]){
          clearance.push({
            label: item.label,
            value: row[item.field],
            currency: row.clearanceFreightCurrency,
            volume: row.clearanceFreightVolume,
            remark: row.specialPriceType && item.field == 'oneClearanceFreight' ? this.$t('特价') : null
          })
        }
      })
houjn@hikoon.cn's avatar
houjn@hikoon.cn committed
805

806 807

      freight.push({
Marcus's avatar
Marcus committed
808
        label: this.$t('价格更新时间'),
809 810 811
        value: parseTime(row.updateTime)
      })
      clearance.push({
Marcus's avatar
Marcus committed
812
        label: this.$t('价格更新时间'),
813 814
        value: parseTime(row.updateTime)
      })
815 816 817 818 819 820 821 822 823 824
      this.feeDetail = {
        freight,
        clearance,
        charging:
        row.charging,
        coupons: row.couponInfoVOList,
        airClearanceSource: row.airClearanceSource == 1 ? this.$t('商品') : this.$t('渠道'), // 空运清关费来源:1 商品 2 渠道
        airClearanceInfo: JSON.parse(row.airClearanceInfo), //空运清关费来源数据详情,
        sourceName: row.airClearanceSource == 1 ? this.$l(row, 'prodTitle') : this.order?.channelName
      }
825 826 827 828
    },
    closeFeeDetail(){
      this.showFeeDetailDialog = null
    },
829
    /** 查询列表 */
830
    getOrder() {
831 832 833 834
      let that = this
      that.loading = true;
      // 执行查询
      getOrder(that.orderId).then(response => {
835
        that.order = response.data;
836
        if(that.order.airlineCompany) that.getAirCompany()
837 838
      });
    },
839 840 841 842 843 844 845 846 847 848 849 850 851 852
    /* loadBrands(){
      let brandIds = []
      this.form.orderItemVOList.forEach(item => {
        if(item.brand){
          brandIds.push(item.brand)
        }
      })
      if(!brandIds.length) return
      Array.form(new Set(brandIds)).forEach(brandId => {
        getProductBrank(brandId).then(res => {
          this.brands.push(res.dat)
        })
      })
    }, */
853
    /*getChannel(){
dragondean@qq.com's avatar
dragondean@qq.com committed
854
      if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
855
      getChannel(this.order.channelId).then(res => {
856
        this.channelName = res.data.nameZh
857
      })
858
    },*/
dragondean@qq.com's avatar
dragondean@qq.com committed
859
    loadFeeList(){
860 861 862 863
      getReceivableListByOrderId({id: this.orderId}).then(res => {
        this.feeList = res.data
      })
    },
864 865
    // 加载操作日志
    loadLogs(){
866
      this.logsLoading = true
867 868
      operateLogPage({orderId: this.orderId, page: 1, rows: 10000}).then(res => {
        this.logs = res.data.list
869 870
      }).finally(() => {
        this.logsLoading = false
871 872
      })
    },
873 874
    downloadPackingList(){
      window.open(this.order.packingListUrl)
875 876 877 878 879 880 881 882 883
    },
    // 显示入仓记录
    showWarehouseLogs(row){
      this.showWarehouseInItemId = row.orderItemId
    },
    getWarehouseIn(){
      getOrderWarehouseIn(this.order.id).then(res => {
        this.orderWarehouseIn = res.data
      })
884 885 886 887 888
    },
    // 解析日志node字段
    parseLogNote(note){
      if(!note) return []
      return JSON.parse(note)
我在何方's avatar
我在何方 committed
889 890
    },
      //查看打包历史
我在何方's avatar
我在何方 committed
891 892
      openPackHistory(id){
        this.shopPackId = id
我在何方's avatar
我在何方 committed
893 894 895 896 897
      },
      //查看打包历史详情
      showPackDetail(packAfterData){
        this.packAfterData = packAfterData
      },
我在何方's avatar
我在何方 committed
898 899 900 901 902 903 904
      getOfferNumber() {
        const that = this
        getOfferCheck({ orderId: that.orderId }).then(response => {
          that.offerData = response.data
        })
      }

905 906 907 908 909
  }
};
</script>

<style scoped>
dragondean@qq.com's avatar
dragondean@qq.com committed
910 911 912
.red{
  color: red;
}
913 914 915
.card {
  margin-bottom: 20px;
}
916 917 918 919
.card-title{
  font-size: 18px;
  font-weight: bold;
}
920 921 922 923 924 925 926 927 928

.el-dropdown-link {
  cursor: pointer;
  color: #409EFF;
}

.el-icon-arrow-down {
  font-size: 12px;
}
929 930 931 932 933 934
.hiddenInfo{
  display:none;
}
.showInfo{
  display:block;
}
935 936 937
/deep/ .el-collapse-item__header{
  color:#409EFF !important;
}
938 939 940 941
/deep/ .el-collapse-item__wrap{
  margin-left:-12px;
  border:none !important;
}
942
</style>