orderInfo.vue 37.2 KB
Newer Older
lanbaoming's avatar
lanbaoming committed
1 2 3 4 5 6 7 8 9 10 11
<template>
	<view>
		<view class="header-toper">
			<!-- <view class="start-bar"></view> -->
			<view class="header-toper-title">
				<image src="../../static/img/back.png" mode="" @click="backOrder"></image>
				<text>{{$lang.lang.orderInfo.info}}</text>
			</view>
		</view>
		<!-- <view class="start-bar"></view> -->
		<view class="order-title">
我在何方's avatar
我在何方 committed
12 13
			<view class="">{{$lang.lang.orderInfo.info}}-{{orderData.orderNo}}{{orderData.tidanNo?'-'+orderData.tidanNo:''}}<text style="margin-left: 10px;padding: 0 4px;" @click="copyText(orderData.orderNo)">{{$lang.lang.orderInfo.copy}}</text></view>
			<!-- <text>{{$lang.lang.orderInfo.orderNo}}{{orderData.orderNo}}</text> -->
lanbaoming's avatar
lanbaoming committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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
		</view>
		<view class="items items1">
			<view class="items-v">
				<image src=".../../static/img/order-user.png" mode=""></image>
				<view class="items-v-it">
					<text  @click="showMore=!showMore">{{$lang.lang.orderInfo.consignor}} <text class="showText">{{showMore?$lang.lang.orderInfo.hiddenInfo:$lang.lang.orderInfo.showInfo}}</text></text>
					<text class="items-rf">{{orderData.consignorVO?orderData.consignorVO.name:$lang.lang.orderInfo.no}}</text>
				</view>
			</view>
			<view class="items-v">
				<image src=".../../static/img/order-tel.png" mode=""></image>
				<view class="items-v-it">
					<text>{{$lang.lang.orderInfo.consignorTel}}:</text>
					<text class="items-rf">{{orderData.consignorVO?$request.checkAddIcon(orderData.consignorVO.countryCode):$lang.lang.orderInfo.none}} {{orderData.consignorVO?orderData.consignorVO.phone:''}}</text>
				</view>
			</view>
			<view :class="showMore?'showInfoClass':'hideInfoClass'">
				<view class="items-v">
					<image src=".../../static/img/order-user.png" mode=""></image>
					<view class="items-v-it">
						<text>{{$lang.lang.orderInfo.consignor}}{{$lang.lang.create.nameEn}}</text>
						<text class="items-rf">{{orderData.consignorVO?orderData.consignorVO.nameEn:$lang.lang.orderInfo.no}}</text>
					</view>
				</view>
				<view class="items-v">
					<image src=".../../static/img/order-email.png" mode=""></image>
					<view class="items-v-it">
						<text>{{$lang.lang.orderInfo.consignorEmail}}:</text>
						<text class="items-rf">{{orderData.consignorVO?(orderData.consignorVO.email||$lang.lang.orderInfo.none):$lang.lang.orderInfo.none}}</text>
					</view>
				</view>
				<view class="items-v">
					<image src=".../../static/img/order-company.png" mode=""></image>
					<view class="items-v-it">
						<text >{{$lang.lang.orderInfo.consignorCom}}:</text>
						<text class="items-rf">{{orderData.consignorVO?(orderData.consignorVO.company||$lang.lang.orderInfo.none):$lang.lang.orderInfo.none}}</text>
					</view>
				</view>
				<view class="items-v">
					<image src=".../../static/img/order-company.png" mode=""></image>
					<view class="items-v-it noborder">
						<text>{{$lang.lang.orderInfo.consignorComEn}}:</text>
						<text class="items-rf">{{orderData.consignorVO?(orderData.consignorVO.companyEn||$lang.lang.orderInfo.none):$lang.lang.orderInfo.none}}</text>
					</view>
				</view>
			</view>
		</view>

我在何方's avatar
我在何方 committed
62
		<view class="items" v-if="orderData.consigneeVO">
lanbaoming's avatar
lanbaoming committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
			<view class="items-v">
				<image src=".../../static/img/order-user.png" mode=""></image>
				<view class="items-v-it">
					<text>{{$lang.lang.orderInfo.consignee}}</text>
					<text class="items-rf">{{orderData.consigneeVO?orderData.consigneeVO.name:$lang.lang.orderInfo.none}}</text>
				</view>
			</view>
			<view class="items-v">
				<image src=".../../static/img/order-tel.png" mode=""></image>
				<view class="items-v-it">
					<text>{{$lang.lang.orderInfo.consigneeTel}}:</text>
					<text class="items-rf">{{orderData.consigneeVO?$request.checkAddIcon(orderData.consigneeVO.countryCode):$lang.lang.orderInfo.none}}{{orderData.consigneeVO?orderData.consigneeVO.phone:''}}</text>
				</view>
			</view>
			<view class="items-v">
				<image src=".../../static/img/order-addr.png" mode=""></image>
				<view class="items-v-it">
					<text>{{$lang.lang.orderInfo.consigneeType}}:</text>
					<text class="items-rf">{{orderData.consigneeVO?orderData.consigneeVO.harvestMethod==1?$lang.lang.orderInfo.own:$lang.lang.orderInfo.toRoom:''}}</text>
				</view>
			</view>
我在何方's avatar
我在何方 committed
84
			<view class="items-v" v-if="orderData.consigneeVO.harvestMethod==2">
lanbaoming's avatar
lanbaoming committed
85 86 87 88 89 90
				<image src=".../../static/img/order-area.png" mode=""></image>
				<view class="items-v-it">
					<text>{{$lang.lang.orderInfo.consigneeCity}}:</text>
					<text class="items-rf">{{addressName||$lang.lang.orderInfo.none}}</text>
				</view>
			</view>
我在何方's avatar
我在何方 committed
91
			<view class="items-v" v-if="orderData.consigneeVO.harvestMethod==2">
lanbaoming's avatar
lanbaoming committed
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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
				<image src=".../../static/img/order-location.png" mode=""></image>
				<view class="items-v-it noborder">
					<text>{{$lang.lang.orderInfo.consigneeAdd}}:</text>
					<text class="items-rf">{{orderData.consigneeVO?orderData.consigneeVO.address||$lang.lang.orderInfo.none:$lang.lang.orderInfo.none}}</text>
				</view>
			</view>
			<view :class="showMore?'showInfoClass':'hideInfoClass'">
				<view class="items-v">
					<image src=".../../static/img/order-user.png" mode=""></image>
					<view class="items-v-it">
						<text>{{$lang.lang.orderInfo.consignee}}{{$lang.lang.create.nameEn}}</text>
						<text class="items-rf">{{orderData.consigneeVO?orderData.consigneeVO.nameEn:$lang.lang.orderInfo.none}}</text>
					</view>
				</view>
				<view class="items-v">
					<image src=".../../static/img/order-email.png" mode=""></image>
					<view class="items-v-it">
						<text>{{$lang.lang.orderInfo.consigneeEmail}}:</text>
						<text class="items-rf">{{orderData.consigneeVO?orderData.consigneeVO.email:$lang.lang.orderInfo.none}}</text>
					</view>
				</view>
				<view class="items-v">
					<image src=".../../static/img/order-company.png" mode=""></image>
					<view class="items-v-it">
						<text>{{$lang.lang.orderInfo.consigneeCom}}:</text>
						<text class="items-rf">{{orderData.consigneeVO?orderData.consigneeVO.company:$lang.lang.orderInfo.none}}</text>
					</view>
				</view>
				<view class="items-v">
					<image src=".../../static/img/order-company.png" mode=""></image>
					<view class="items-v-it">
						<text>{{$lang.lang.orderInfo.consigneeComEn}}:</text>
						<text class="items-rf">{{orderData.consigneeVO?orderData.consigneeVO.companyEn:$lang.lang.orderInfo.none}}</text>
					</view>
				</view>
			</view>
		</view>

		<view class="order-info">
			<view class="order-info-v">
				<view class="order-info-title">
					<image src=".../../static/img/order-express.png" mode=""></image>
					<text>{{$lang.lang.orderInfo.logistics}}</text>
				</view>
				<view class="order-info-txt">
dragondean@qq.com's avatar
dragondean@qq.com committed
137
          <view class="mudi">{{$lang.lang.orderInfo.startCity}}{{orderData.initialLogisticsInfoDto?($lang.locale=='zh'?orderData.initialLogisticsInfoDto.startTitleZh:orderData.initialLogisticsInfoDto.startTitleZh):''}}</view>
lanbaoming's avatar
lanbaoming committed
138
					<!-- <view class="">{{$lang.lang.orderInfo.address}}{{orderData.logisticsInfoDto?($lang.locale=='zh'?orderData.logisticsInfoDto.startAddressZh:orderData.logisticsInfoDto.startAddressEn):''}} </view> -->
我在何方's avatar
我在何方 committed
139
					<view>{{$lang.lang.orderInfo.endCity}}{{orderData.initialLogisticsInfoDto?($lang.locale=='zh'?(orderData.initialLogisticsInfoDto.destCountryTitleZh+'-'+(objectCity?objectCity.titleZh:'')+'-'+orderData.initialLogisticsInfoDto.destTitleZh):(orderData.initialLogisticsInfoDto.destCountryTitleEn+'-'+(objectCity?objectCity.titleEn:'')+'-'+orderData.initialLogisticsInfoDto.destTitleEn)):''}}</view>
lanbaoming's avatar
lanbaoming committed
140
				</view>
我在何方's avatar
我在何方 committed
141 142 143 144 145
        <view class="order-info-txt">
          <view class="">{{$lang.lang.orderInfo.transport}}{{getConfigLabel('transport',orderData.transportId)}}</view>
        	<view class=""  v-if="['3','4'].indexOf(orderData.transportId+'') > -1">{{$lang.lang.orderInfo.channel}}{{getChannelName(orderData.channelId)}}</view>
          <view class=""  v-if="orderData.type">{{$lang.lang.orderInfo.typeName}}{{typeName}}</view>
        </view>
lanbaoming's avatar
lanbaoming committed
146 147 148 149 150 151 152 153 154 155 156
			</view>
		</view>

		<view class="order-info">
			<view class="order-info-v">
				<view class="order-info-title">
					<image src=".../../static/img/order-basic.png" mode=""></image>
					<text>{{$lang.lang.orderInfo.basic}}</text>
				</view>
				<view class="order-info-line">
					<view class="order-info-line-v">
我在何方's avatar
我在何方 committed
157 158 159 160 161 162 163 164 165
						<view style="height: 36px;">{{$lang.lang.orderInfo.marks}}{{orderData.marks}}</view>
            <view style="height: 36px;">
            	{{$lang.lang.orderInfo.warehouse}}{{orderData.sumNum||0}}{{$lang.lang.orderInfo.box}}
            	 {{orderData.sumWeight||0}}KG
            	 {{orderData.sumVolume||0}}
            	 {{orderData.sumQuantity||0}}{{$lang.lang.create.aunit}}
            	 </view>
            <view style="height: 36px;" v-if="orderData.drawee==1">{{$lang.lang.create.payer}}{{$lang.lang.create.consignor}}</view>
            <view style="height: 36px;" v-else-if="orderData.drawee==2">{{$lang.lang.create.payer}}{{$lang.lang.create.consignee}}</view>
dragondean@qq.com's avatar
dragondean@qq.com committed
166
            <view style="height: 36px;" v-else @click="showCustomDrawee">{{$lang.lang.create.payer}}{{$lang.lang.create.customDrawee}}</view>
我在何方's avatar
我在何方 committed
167 168
            <view style="height: 36px;">{{$lang.lang.orderInfo.objectport}}:{{orderData.productRecord==1?$lang.lang.orderInfo.ourUndertakes:$lang.lang.orderInfo.customerUndertakes}}</view>
						<view style="height: 36px;">{{$lang.lang.create.special}}:{{packageTypeName||''}}</view>
lanbaoming's avatar
lanbaoming committed
169 170
					</view>
					<view class="order-info-line-v">
我在何方's avatar
我在何方 committed
171 172 173 174 175 176 177
            <view style="height: 36px;">{{$lang.lang.orderInfo.formInfo}}{{orderData.costVO?orderData.costVO.totalNum:0}}{{$lang.lang.orderInfo.box}}
            {{orderData.costVO?orderData.costVO.totalWeight:0}}KG
            {{orderData.costVO?orderData.costVO.totalVolume:0}}
            {{orderData.costVO?orderData.costVO.totalQuantity:0}}{{$lang.lang.create.aunit}}
            </view>
            <view style="height: 36px;">{{$lang.lang.orderInfo.datas}}{{orderData.sumNum}}{{$lang.lang.orderInfo.box}} {{orderData.vweight}}KG  {{orderData.wvolume}}{{orderData.sumQuantity}}{{$lang.lang.create.aunit}}</view>
						<view style="height: 36px;">{{$lang.lang.orderInfo.customsType}}{{getConfigLabel('customsType',orderData.customsType)}}</view>
dragondean@qq.com's avatar
dragondean@qq.com committed
178
            <view style="height: 36px;">{{$lang.lang.orderInfo.isCargoControl}}{{orderData.isCargoControl?$lang.lang.orderInfo.yes:$lang.lang.orderInfo.no}}</view>
179
						<view style="height: 36px;">{{$lang.lang.create.specialNote}}: {{orderData.packageRemarks||''}}</view>
lanbaoming's avatar
lanbaoming committed
180 181
					</view>
				</view>
我在何方's avatar
我在何方 committed
182
        <view class="addicon" @click="basicShowMore=!basicShowMore">
dragondean@qq.com's avatar
dragondean@qq.com committed
183 184
          <image src="/static/img/add.png" v-if="!basicShowMore"></image>
          <image src="/static/img/sub.png" v-else></image>
我在何方's avatar
我在何方 committed
185 186 187 188 189
        </view>
        <view :class="basicShowMore?'showInfoClass':'hideInfoClass'" >
          <view class="order-info-line" >
              <view class="order-info-line-v">
                <view style="height: 36px;">{{$lang.lang.orderInfo.time}}{{orderData.deliveryDate||$lang.lang.orderInfo.none}}</view>
dragondean@qq.com's avatar
dragondean@qq.com committed
190 191 192 193 194 195 196
                <view style="height: 36px;" v-if="['3','4'].indexOf(orderData.transportId+'') > -1">
                  {{$lang.lang.orderInfo.clearCard}}
                  <template v-if="orderData.customsClearCert !== null">
                    {{orderData.customsClearCert? $lang.lang.orderInfo.is : $lang.lang.orderInfo.no}}
                  </template>
                  <template v-else>-</template>
                </view>
我在何方's avatar
我在何方 committed
197 198
                <view style="height: 36px;" v-if="['3','4'].indexOf(orderData.transportId+'') > -1">{{$lang.lang.orderInfo.unpack}}:{{orderData.isUnpack?$lang.lang.orderInfo.is:$lang.lang.orderInfo.no}}</view>
                <view style="height: 36px;">{{$lang.lang.orderInfo.loans}}:{{orderData.collectionProxy?($lang.lang.orderInfo.yes+' ('+orderData.collectionProxy+getType(orderData.collectionProxyCurrency)+')'):$lang.lang.orderInfo.no}}</view>
199
                <view style="height: 72px;" v-if="orderData.isExternalWarehouse&& orderData.externalWarehousedtolist && orderData.externalWarehousedtolist.length">
我在何方's avatar
我在何方 committed
200 201 202 203
                  <text>{{$lang.lang.orderInfo.warehouseName}}:{{$lang.lang.orderInfo.externalWarehouse}}</text>
                  <text>{{$lang.lang.orderInfo.estLoading}}:{{orderData.externalWarehousedtolist[0].estLoadingtime}}</text>
                  <text>{{$lang.lang.orderInfo.loadingAddress}}:{{orderData.externalWarehousedtolist[0].loadingAddress}}</text>
                </view>
dragondean@qq.com's avatar
dragondean@qq.com committed
204
                <view style="height: 36px;">{{$lang.lang.orderInfo.creator}}:{{orderData.creatorName}}</view>
我在何方's avatar
我在何方 committed
205 206 207 208 209 210 211
              </view>
              <view class="order-info-line-v">
                <view style="height: 36px;">{{$lang.lang.orderInfo.levite}}:{{getConfigLabel('warehouseType',orderData.warehouseType)}}</view>
                <view style="height: 36px;" v-if="['3','4'].indexOf(orderData.transportId+'') > -1">{{$lang.lang.orderInfo.clearRemark}}:{{orderData.remarks||$lang.lang.orderInfo.none}}</view>
                <view style="height: 36px;" v-if="['3','4'].indexOf(orderData.transportId+'') > -1">{{$lang.lang.create.nowChange}}:{{orderData.isSingleTicketTransport?$lang.lang.create.is:$lang.lang.create.fou}}</view>
                <view style="height: 36px;">{{$lang.lang.orderInfo.tidanPrice}}:{{orderData.displayBillLadingPrice?$lang.lang.orderInfo.show:$lang.lang.orderInfo.noShow}}</view>
                <view style="height: 36px;">{{$lang.lang.create.quickNo}}:{{orderData.number}}</view>
dragondean@qq.com's avatar
dragondean@qq.com committed
212
                <view style="height: 36px;">{{$lang.lang.orderInfo.createTime}}:{{orderData.createTime|$parseTime}}</view>
我在何方's avatar
我在何方 committed
213 214 215 216 217
              </view>
            </view>
          </view>
        </view>
      </view>
lanbaoming's avatar
lanbaoming committed
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233

		<view class="order-nav">
			<view class="order-nav-v">
				<view :class="activeIndex==0?'act':''" @click="activeIndex=0">
					<text>{{$lang.lang.orderInfo.goodsInfo}}</text>
				</view>
				<view :class="activeIndex==1?'act':''" @click="activeIndex=1">
					<text>{{$lang.lang.orderInfo.ordering}} </text>
				</view>
				<view :class="activeIndex==2?'act':''" @click="activeIndex=2">
					<text>{{$lang.lang.orderInfo.file}}</text>
				</view>
			</view>
		</view>

		<view class="order-table" v-if="activeIndex==0&&orderData.orderItemVOList&&orderData.orderItemVOList.length>0">
我在何方's avatar
我在何方 committed
234 235
      <view style="width: 100%;" v-for="(item,index) in orderData.orderItemVOList" :key="index">
        <view class="number_shop">{{parseInt(index)+1}}</view>
dragondean@qq.com's avatar
dragondean@qq.com committed
236
        <view class="order-info-line" >
我在何方's avatar
我在何方 committed
237 238 239 240 241 242 243 244
          <view class="order-info-line-v">
             <view class="order-table-v">
              <text>{{$lang.lang.orderInfo.prodZh}}:{{item.prodTitleZh}}/{{item.prodTitleEn}}</text>
             </view>
             <view class="order-table-v">
              <text>{{$lang.lang.orderInfo.formInfo}}:{{item.num}}{{$lang.lang.orderInfo.box}}{{item.weight}}KG{{item.volume}}m³{{item.quantity}}{{$lang.lang.create.aunit}}</text>
             </view>
             <view class="order-table-v">
dragondean@qq.com's avatar
dragondean@qq.com committed
245
              <text>{{$lang.lang.orderInfo.works}}:{{item.worth}}RMB</text>
我在何方's avatar
我在何方 committed
246 247 248 249 250 251 252 253 254 255
             </view>
          </view>
          <view class="order-info-line-v">
             <view class="order-table-v">
              <text>{{$lang.lang.orderInfo.brand}}:</text>
              <text v-if="item.brandName">{{item.brandName}}</text>
              <text v-else>{{item.brandType?($lang.lang.orderInfo.have+$lang.lang.orderInfo.brand):($lang.lang.orderInfo.none+$lang.lang.orderInfo.brand)}}</text>
             </view>
             <view class="order-table-v">
              <text>{{$lang.lang.orderInfo.inWarehouseInfo}}:</text>
256 257 258 259
              <text>{{item.warehouseInInfoVO?item.warehouseInInfoVO.cartonsNum:0}}{{$lang.lang.orderInfo.box}}</text>
              <text>{{item.warehouseInInfoVO?item.warehouseInInfoVO.weight:0}}KG</text>
              <text>{{item.warehouseInInfoVO?item.warehouseInInfoVO.volume:0}}m³</text>
              <text>{{item.warehouseInInfoVO?item.warehouseInInfoVO.quantityAll:0}}{{$lang.lang.create.aunit}}</text>
我在何方's avatar
我在何方 committed
260 261 262 263 264 265 266
             </view>
             <view class="order-table-v">
              <text>{{$lang.lang.create.quickNo}}:{{item.warehouseInInfoVO?item.warehouseInInfoVO.expressNo:item.expressNo}}</text>
             </view>
          </view>
        </view>
        <view class="addicon" @click="shopShowMore=!shopShowMore">
dragondean@qq.com's avatar
dragondean@qq.com committed
267 268
          <image src="/static/img/add.png" v-if="!shopShowMore"></image>
          <image src="/static/img/sub.png" v-else></image>
我在何方's avatar
我在何方 committed
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
        </view>
        <view :class="shopShowMore?'showInfoClass':'hideInfoClass'" >
          <view class="order-info-line">
              <view class="order-info-line-v">
                <view class="order-table-v">
                 <text>{{$lang.lang.exception.type}}:</text>
                 <text >{{item.warehouseType}}</text>
                </view>
               <view class="order-table-v">
                <text>{{$lang.lang.orderInfo.material}}:</text>
                <text>{{getConfigLabel('material',item.material)}}</text>
               </view>
               <view class="order-table-v">
                <text>{{$lang.lang.create.link}}:{{item.link}}</text>
               </view>
              </view>
              <view class="order-info-line-v">
               <view class="order-table-v">
                <text>{{$lang.lang.orderInfo.unitType}}:</text>
                <text>{{getConfigLabel('unit',item.unit)}}</text>
               </view>
               <view class="order-table-v">
                <text>{{$lang.lang.orderInfo.quickNos}}:{{item.expressNo}}</text>
               </view>
               <view class="order-table-v">
               </view>
              </view>
            </view>
          </view>
        </view>
lanbaoming's avatar
lanbaoming committed
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
		</view>
		<view class="order-info" v-if="activeIndex==1">
			<steper :talk="orderData.orderTimeVOList"></steper>
		</view>
		<view class="order-info" v-if="activeIndex==2">
			<view class="see_lists">
				<view class="see_item" v-if="orderData.status>=3" @click="showRcOrder">
					<image src="../../static/img/see.png"></image>
					<text>{{$lang.lang.orderInfo.seeLevite}}</text>
				</view>
				<view v-if="orderData.status>=3&&orderData.ladingState" class="see_item"  @click="seeBillLading">
					<image src="../../static/img/see.png"></image>
					<text>{{$lang.lang.orderInfo.seeBall}}</text>
				</view>
				<view v-if="orderData.status>=3&&!orderData.ladingState" class="see_item">
					<image src="../../static/img/see.png"></image>
					<text class="noBill">{{$lang.lang.orderInfo.seeBall}}</text>
				</view>
				<view class="see_item"  v-if="orderData.status>5&&orderData.packingListUrl" @click="seepacking">
					<image src="../../static/img/see.png"></image>
					<text>{{$lang.lang.orderInfo.seePack}}</text>
				</view>
				<view class="see_item"  v-if="orderData.status>5&&!orderData.packingListUrl">
					<image src="../../static/img/see.png"></image>
					<text class="noBill">{{$lang.lang.orderInfo.seePack}}</text>
				</view>
				<view class="see_item"  @click="openFile">
					<image src="../../static/img/see.png"></image>
					<text>{{$lang.lang.order.see}}{{$lang.lang.docException.customsType}}</text>
				</view>
			</view>
		</view>
		<uni-popup ref="pdf" type="center">
			<view class="link-content" :style="{maxHeight:windowsHeight+'px'}">
				{{billLadingData}}
			</view>
		</uni-popup>
		<uni-popup ref="bg" >
			<view :style="`height:${phoneHeight}px;width:${phoneWidth}px`">
				<image @click="closeBg" class="bgimg" :src="$lang.locale=='zh'?'../../static/img/bg.jpg':'../../static/img/bgEn.jpg'"></image>
			</view>
		</uni-popup>
		<uni-popup ref="rcOrder" type="center">
			<view class="link-content" :style="{maxHeight:windowsHeight+'px'}">
				<view class="order_title">
					<text>{{orderData.orderNo}}-{{$lang.lang.orderInfo.seeLevite}}</text>
				</view>
				<view class="order_info">
					<text>{{$lang.lang.orderInfo.marks}}:{{orderData.marks}}</text>
					<text>{{$lang.lang.orderInfo.consigneeAndTel}}:{{orderData.consigneeVO?orderData.consigneeVO.name:''}}|{{orderData.consigneeVO?orderData.consigneeVO.countryCode:''}}{{orderData.consigneeVO?orderData.consigneeVO.phone:''}}</text>
					<text>{{$lang.lang.orderInfo.consignorAndTel}}:{{orderData.consignorVO?orderData.consignorVO.name:''}}|{{orderData.consignorVO?orderData.consignorVO.countryCode:''}}{{orderData.consignorVO?orderData.consignorVO.phone:''}}</text>
					<text>{{$lang.lang.orderInfo.ballAddress}}:{{orderData.logisticsInfoDto?($lang.locale=='zh'?orderData.logisticsInfoDto.destTitleZh:orderData.logisticsInfoDto.destTitleEn):''}}</text>
				</view>
				<view class="order_info" v-for="(item,index) in orderData.orderItemVOList" :key="index">
					<text>{{$lang.lang.orderInfo.goodsRemark}}:{{item.prodTitleZh}}/{{item.prodTitleEn}}</text>
					<view>
						<text>{{$lang.lang.orderInfo.brand}}:{{item.brandName?item.brandName:($lang.lang.orderInfo.none+$lang.lang.orderInfo.brand)}}</text>
						<text>{{$lang.lang.orderInfo.num}}:{{item.warehouseInInfoVO?item.warehouseInInfoVO.cartonsNum:0}}</text>
					</view>
					<text>{{$lang.lang.orderInfo.size}}:{{item.warehouseInInfoVO?item.warehouseInInfoVO.boxGauge:$lang.lang.orderInfo.no}}</text>
					<view>
						<text>{{$lang.lang.orderInfo.volume}}:{{item.warehouseInInfoVO?item.warehouseInInfoVO.volume:0}}m³</text>
						<text>{{$lang.lang.orderInfo.weight}}:{{item.warehouseInInfoVO?item.warehouseInInfoVO.weight:0}}kg</text>
					</view>
					<text>{{$lang.lang.orderInfo.leviteTime}}:{{item.warehouseInInfoVO?getDate(item.warehouseInInfoVO.firstInTime):''}}</text>
				</view>
			</view>
		</uni-popup>
		<declaration-documents ref="declaration" :orderId="orderData.orderId" :isoper="orderData.customsType==2" :orderNo="orderData.orderNo" @open="open"></declaration-documents>
dragondean@qq.com's avatar
dragondean@qq.com committed
368 369
    <drawee ref="drawee" :value="orderData.customDraweeVOList" readonly></drawee>
  </view>
lanbaoming's avatar
lanbaoming committed
370 371 372 373 374 375 376 377
</template>

<script>
	import steper from '../../components/steper/index.vue'
	import config from '../../utils/config'
	import declarationDocuments from '../../components/declarationDocuments/index.vue'
	//#ifdef H5
	import FileSaver from 'file-saver'
dragondean@qq.com's avatar
dragondean@qq.com committed
378
  import Drawee from "@/pages/create_order/components/drawee.vue";
lanbaoming's avatar
lanbaoming committed
379 380 381
	//#endif
	export default {
		components: {
dragondean@qq.com's avatar
dragondean@qq.com committed
382
      Drawee,
lanbaoming's avatar
lanbaoming committed
383 384 385 386 387 388 389 390 391 392 393 394
			steper,declarationDocuments
		},
		data() {
			return {
				orderData:[],
				config: {
					transport:[],
					warehouseType:[],
					customsType:[],
					doubleClear:[],
					suingMethod:[],
					unit:[],
我在何方's avatar
我在何方 committed
395 396
					material:[],
          packageType:[],
lanbaoming's avatar
lanbaoming committed
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413
				},
				clientaData:[],
				channelData:[],
				activeIndex:0,
				tdWidth:0,
				widowsWidth:0,
				address:[],
				addressName:'',
				windowsHeight:667,
				billLadingData:'',
				basicUrl:config.API,
				billladshow:false,
				currencyType:[],
				packData:'',
				phoneHeight:0,
				phoneWidth:0,
				showMore:false,
我在何方's avatar
我在何方 committed
414 415 416 417
				offerNumber:'',
        objectCity:'',
        typeName:'',
        packageTypeName:'',
dragondean@qq.com's avatar
dragondean@qq.com committed
418

我在何方's avatar
我在何方 committed
419 420
        basicShowMore:false,
        shopShowMore:false
lanbaoming's avatar
lanbaoming committed
421 422 423 424
			}
		},
		onLoad(options) {
			let that = this
dragondean@qq.com's avatar
dragondean@qq.com committed
425 426 427 428 429 430 431 432 433
      uni.getSystemInfo({
        success: function (res) {
          that.tdWidth=res.windowWidth*0.72;
          that.widowsWidth=res.windowWidth*0.72;
          that.windowsHeight = res.windowHeight*0.8;
          that.phoneHeight = res.windowHeight
          that.phoneWidth = res.windowWidth
        }
      });
lanbaoming's avatar
lanbaoming committed
434 435 436 437 438 439 440 441 442 443
			this.getTreeList()
			this.getcurrency()
			this.orderConfig('transport_type', 'transport')
			this.orderConfig('order_status', 'status')
			this.orderConfig('warehousing_type','warehouseType')
			this.orderConfig('customs_type','customsType')
			this.orderConfig('double_clear','doubleClear')
			this.orderConfig('suing_method','suingMethod')
			this.orderConfig('packaging_type','unit')
			this.orderConfig('product_material','material')
我在何方's avatar
我在何方 committed
444
      this.orderConfig('order_special_needs', 'packageType')
lanbaoming's avatar
lanbaoming committed
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
			this.getClientaData()
			this.getChanel()
			if(options.id){
				setTimeout(()=>{
					this.getOrderData(options.id)
				},500)
				this.getOfferNumber(options.id)
				// this.getBilladStatus(options.id)
			}
		},
		watch:{
		        orderData(){
		            /* this.pdfData = this.detail.imgUrl */
					//#ifdef H5
		            fetch(this.orderData.packingListUrl).then(async response => {
		                console.log(response)
		                this.packData = await response.arrayBuffer()
		            })
					//#endif
		        },
		    },
		methods: {
			// 关闭在浏览器打开提示
			closeBg(){
				this.$refs.bg.close()
			},
			showRcOrder(){
				this.$refs.rcOrder.open()
			},
			getTreeList(){
				this.$request.get('/app-api/ecw/region/getListTree',{treeType:1}).then(res => {
					if(res.code==0&&res.data&&res.data.length > 0){
						this.address = res.data
					}
				})
			},
			getBilladStatus(id){
				this.$request.get('/app-api/shipment/make-bill-of-lading/getStatus',{orderId:id}).then(res => {
					if(res.code==0){
						this.billladshow = res.data
					}
				})
			},
			backOrder(){
				uni.navigateTo({
					url:'../order/order'
				})
			},
			getOrderData(id){
				let that = this
				that.$request.get('/app-api/my/order/info/'+id).then(res => {
					if(res.code==0&&res.data){
						that.orderData = res.data
						if(res.data.orderItemVOList&&res.data.orderItemVOList.length>0&&res.data.orderItemVOList.length<5){
							that.tdWidth = that.widowsWidth/res.data.orderItemVOList.length
						}
我在何方's avatar
我在何方 committed
501 502 503 504 505 506 507 508 509 510 511 512 513
            if(res.data.initialLogisticsInfoDto&&res.data.initialLogisticsInfoDto.destCityId){
              that.getObjectCity(res.data.initialLogisticsInfoDto.destCityId)
            }
            if(res.data.type){
              if(res.data.type.includes(1)){
                that.typeName += this.$lang.lang.create.service
              }
              if(res.data.type.includes(2)){
                that.typeName += this.$lang.lang.create.oversears
              }
            }
            if(res.data.packageType){
              that.config.packageType.forEach(item=>{
dragondean@qq.com's avatar
dragondean@qq.com committed
514

我在何方's avatar
我在何方 committed
515 516 517 518 519
                if(res.data.packageType.includes(item.value)){
                  that.packageTypeName += that.$lang.locale=='zh'?item.label:item.labelEn
                }
              })
            }
lanbaoming's avatar
lanbaoming committed
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
						if(res.data.consigneeVO&&res.data.consigneeVO.country){
							var orderAdderss = ''
							var country = that.address.find(item=>item.id == res.data.consigneeVO.country)||''
							if(country){
								if(that.$lang.locale=='zh'){
									orderAdderss = country.titleZh
								}else{
									orderAdderss = country.titleEn
								}
								if(res.data.consigneeVO.province){
									console.log(res.data.consigneeVO.province)
									console.log(country.children)
									var province = country.children.find(item=>item.id == res.data.consigneeVO.province)||''
									if(province){
										if(that.$lang.locale=='zh'){
											orderAdderss += province.titleZh
										}else{
											orderAdderss += province.titleEn
										}
										if(res.data.consigneeVO.city){
											console.log(res.data.consigneeVO.city)
											console.log(province.children)
											var city = province.children.find(item=>item.id == res.data.consigneeVO.city)||''
											if(city){
												if(that.$lang.locale=='zh'){
													orderAdderss += city.titleZh
												}else{
													orderAdderss += city.titleEn
												}
											}
										}
									}
								}
							}
							that.addressName = orderAdderss
						}
					}
				})
			},
			//获取供应商
			getClientaData(){
				this.$request.get('/app-api/ecw/admin-clienta/page',{page:1,rows:20}).then(res => {
					if(res.code==0&&res.data&&res.data.list&&res.data.list.length > 0){
						this.clientaData = res.data.list
					}
				})
			},
			getClientaName(id){
				var label = this.clientaData.find(item=>item.id == id)
				if(label) {
					if(this.$lang.locale=='zh'){
						return label.name
					}else{
						return label.nameEn
					}
				}
			},
			getcurrency () {
578
				/*this.$request.getConfig('commission_currency_type').then(res => {
lanbaoming's avatar
lanbaoming committed
579 580 581
					if(res.code==0&&res.data&&res.data.list.length>0){
						this.currencyType = res.data.list
					}
582 583 584 585 586 587
				})*/
        this.$request.get('/app-api/ecw/currency/list').then(res => {
          if(res.code==0&&res.data&&res.data.length>0){
            this.currencyType = res.data
          }
        })
lanbaoming's avatar
lanbaoming committed
588 589
			},
			getType(value){
590 591 592
				const item = this.currencyType?.find(item => item.id === value)
        if(!item) return ''
        return item[this.$lang.locale === 'zh' ? 'titleZh' : 'titleEn']
lanbaoming's avatar
lanbaoming committed
593 594 595 596 597 598 599 600 601 602 603
			},
			getChannelName(id){
				var label = this.channelData.find(item=>item.channelId == id)
				if(label) {
					if(this.$lang.locale=='zh'){
						return label.nameZh
					}else{
						return label.nameEn
					}
				}
			},
我在何方's avatar
我在何方 committed
604 605 606 607 608 609 610 611
      //获取城市
      getObjectCity(id){
        this.$request.get('/app-api/ecw/region/get',{id:id}).then(res => {
        	if(res.code==0&&res.data){
        		this.objectCity = res.data
        	}
        })
      },
lanbaoming's avatar
lanbaoming committed
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867
			//获取出货渠道
			getChanel(){
				this.$request.get('/app-api/ecw/channel/select').then(res => {
					if(res.code==0&&res.data&&res.data.length > 0){
						this.channelData = res.data
					}
				})
			},
			getDate(time) {
				const date = new Date(time);
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();

				month = month > 9 ? month : '0' + month;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			},
			getConfigLabel(key,value){
				var label = ''
				let that = this
				that.config[key].forEach(function(item,index){
					if(item.value == value){
						if(that.$lang.locale=='zh'){
							label = item.label
						}else{
							label = item.labelEn
						}
					}
				})
				return label
			},
			orderConfig (field, key) {
				this.$request.getConfig(field).then(res => {
					if(res.data&&res.data.list&&res.data.list.length > 0){
						this.config[key] = res.data.list
					}
				})
			},
			pdfWeb(type){
				uni.request({
					  url:this.basicUrl+'/app-api/shipment/make-bill-of-lading/downloadByOrderId?orderId='+this.orderData.orderId,
					  header:this.$request.getImgHeader(),
					  responseType: 'arraybuffer', //这里记得设置响应数据格式,不然预览的pdf是空白
					  success: (response) => {
						  console.log(response)
						if(response){
							let pdfData = response.data; //pdfData是后端返回的文件流
							let blob = new Blob([ pdfData], {
							  type: 'application/pdf;charset=UTF-8'
							})
							pdfData = window.URL.createObjectURL(blob) //创建预览路径
							var agreementUrl = encodeURIComponent(pdfData)
							console.log(agreementUrl)
							uni.navigateTo({
								url: '../filePreview/filePreview?url=' + agreementUrl
							})//这里的url指向你刚创建的filePreviwe.vue页面
						}else{
							uni.showToast({
								title:this.$lang.lang.notices.openError,
								icon:'error'
							})
						}

					  },
					  fail: err => {
						console.log(err)
					  }
					})
			},
			pdfApp(type) {
				  let datas = {
					//自定义下载文件路径,保存文件路径仅支持以"_downloads/"、"_doc/"、"_documents/"开头的字符串
					// filename: '_doc/' + 'test.pdf',
					filename: "file://storage/emulated/0/Download/.pdf",
					//默认为GET请求。注意这里需大写“GET”、“POST”
					method: 'GET'
				  }
				  let dtask = plus.downloader.createDownload(
					this.basicUrl+'/app-api/shipment/make-bill-of-lading/downloadByOrderId?orderId='+this.orderData.orderId,
					datas,
					(d, status) => {
					  // 下载完成
					  if (status == 200) {
						// this.$toast('正在打开')
							console.log(d)
						//下载成功,d.filename是文件在保存在本地的相对路径,使用下面的API可转为平台绝对路径
						var fileSaveUrl =
						  plus.io.convertLocalFileSystemURL(
							d.filename
						  )
						  console.log(fileSaveUrl)
						plus.runtime.openFile(d.filename) //下载完后自动弹出可以选择的app,预览文件
					  } else {
						dtask.clear() //清除下载任务
						// this.$toast('下载失败')
					  }
					}
				  )
				  dtask.setRequestHeader("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
				  dtask.setRequestHeader("Authorization", "Bearer " +uni.getStorageSync('Authorization'));
				  dtask.start()
			},
			seeBillLading(){
				let that = this
				uni.request({
					  url:that.basicUrl+'/app-api/shipment/make-bill-of-lading/downloadByOrderId?orderId='+that.orderData.orderId,
					  header:that.$request.getImgHeader(),
					  // responseType: 'arraybuffer', //这里记得设置响应数据格式,不然预览的pdf是空白
					  success: (response) => {
						  console.log(response)
						        // window.open(
						        //   response.data.data.imgUrl
						        // )
								// const elink = document.createElement('a')
								//         elink.href = response.data.data.imgUrl
								//         elink.style.display = 'none'
								// 		elink.target = '_blank'
								//         elink.click()
						  	  // console.log('h5',response.data.data.imgUrl)
							  // let onlocal = window.open('', ' _blank');
							  // onlocal.location = response.data.data.imgUrl
							  //#ifdef H5
							  let ua = navigator.userAgent.toLowerCase();
							  var isWx = /micromessenger/.test(ua) ? true : false;
							  if(isWx){
							  	that.$refs.bg.open()
							  	return false
							  }
							  fetch(response.data.data.imgUrl).then(async res => {
							      var billBuff = await res.arrayBuffer()
								  let blob = new Blob([billBuff], {type: "application/pdf"})
								  FileSaver.saveAs(blob, response.data.data.imgUrl.split("/").pop());
							  })
							// #endif
						  // #ifdef APP-PLUS
							uni.downloadFile({
								url: response.data.data.imgUrl,
								success: function(res) {
								  console.log('downloadFile ==> ',res)
								  uni.hideLoading();
								  var filePath = res.tempFilePath;
								 //  if(!fileType.includes(typeName)) {
									// return false;
								 //  }
								  uni.showLoading({
									title: that.$lang.lang.notices.opening,
									mask: true
								  })
								  // 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。
								  uni.openDocument({
									filePath: filePath,
									// fileType: typeName,// 文件类型,指定文件类型打开文件,有效值 doc, xls, ppt, pdf, docx, xlsx, pptx
									// showMenu: true, // 允许出现分享功能
									success: res => {
									  uni.hideLoading();
									  console.log('打开文档成功',res);
									},
									fail: openError => {
									  uni.hideLoading();
									  console.log('fail:' + JSON.stringify(openError));
									}
								  });
								},
								fail: function(err) {
								  uni.hideLoading();
								  console.log('fail:' + JSON.stringify(err));
								}
							  });
						// #endif
					  },
					  fail: err => {
						console.log(err)
					  }
					})
				// var type = 1
				// if(this.orderData.transportId&&this.orderData.transportId!=1){
				// 	type = parseInt(this.orderData.transportId)-1
				// }
				// var types = uni.getSystemInfoSync().uniPlatform
				// if(types=='web'){
				// 	this.pdfWeb(type)
				// }else{
				// 	this.pdfApp(type)
				// }
			},
			seepacking(){
				      // window.open(
				      //   this.orderData.packingListUrl
				      // )
					  // const elink = document.createElement('a')
					  //         elink.href = this.orderData.packingListUrl
					  //         elink.style.display = 'none'
					  // 		elink.target = '_blank'
					  //         elink.click()
					    // let onlocal = window.open('', ' _blank');
					    // onlocal.location = this.orderData.packingListUrl;
					//#ifdef H5
					  let ua = navigator.userAgent.toLowerCase();
					  var isWx = /micromessenger/.test(ua) ? true : false;
					  if(isWx){
						that.$refs.bg.open()
						return false
					}
					let blob = new Blob([this.packData], {type: "application/pdf"})
					FileSaver.saveAs(blob, this.orderData.packingListUrl.split("/").pop());
				  // #endif
				// #ifdef APP-PLUS
				let that = this
				uni.downloadFile({
					url: that.orderData.packingListUrl,
					success: function(res) {
					  console.log('downloadFile ==> ',res)
					  uni.hideLoading();
					  var filePath = res.tempFilePath;
					 //  if(!fileType.includes(typeName)) {
						// return false;
					 //  }
					  uni.showLoading({
						title: that.$lang.lang.notices.opening,
						mask: true
					  })
					  // 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。
					  uni.openDocument({
						filePath: filePath,
						// fileType: typeName,// 文件类型,指定文件类型打开文件,有效值 doc, xls, ppt, pdf, docx, xlsx, pptx
						// showMenu: true, // 允许出现分享功能
						success: res => {
						  uni.hideLoading();
						  console.log('打开文档成功',res);
						},
						fail: openError => {
						  uni.hideLoading();
						  console.log('fail:' + JSON.stringify(openError));
						}
					  });
					},
					fail: function(err) {
					  uni.hideLoading();
					  console.log('fail:' + JSON.stringify(err));
					}
				  });
				  // #endif
			},
			openFile(){
				this.$refs.declaration.open()
				setTimeout(()=>{
					this.$refs.declaration.getFileList()
				},200)
			},
			getOfferNumber(id){
				this.$request.get('/app-api/offer/check',{orderId:id}).then(res => {
					if(res.code==0&&res.data){
						this.offerNumber = res.data.number
					}
				})
我在何方's avatar
我在何方 committed
868 869 870 871 872 873 874 875 876 877 878
			},
      copyText(text){
        uni.setClipboardData({
        	data:text,
        	success:()=>{
        		uni.showToast({
        			title:this.$lang.lang.notices.copySuccess,
        			icon:"none",
        		})
        	}
        })
dragondean@qq.com's avatar
dragondean@qq.com committed
879 880 881
      },
      showCustomDrawee(){
        this.$refs.drawee.open()
我在何方's avatar
我在何方 committed
882
      }
lanbaoming's avatar
lanbaoming committed
883 884 885 886 887 888
		}
	}
</script>

<style>
	@import url("../../static/css/orderInfo.css");
dragondean@qq.com's avatar
dragondean@qq.com committed
889 890 891
  .corder-goods-v-item view text:nth-child(2){
      line-height: unset;
  }
lanbaoming's avatar
lanbaoming committed
892
</style>