//调用接口获取Info
loadOrderDetail() {
NET.request(API.GetOrderDetail2, {
orderId: this.order_id
}, 'GET').then(res => {
this.info = res.data;
console.log(this.info);
this.setSupplierInfo()
this.setImporterInfo()
this.setOrderInfo()
}).catch(res => {
console.log('WxAppLogin failed: ', res)
})
},
//Info赋值
setImporterInfo(){
var info = this.info;
console.log('info',info)
this.importerInfo = [{
title: '订单编号',
text: info.orderId
}, {
title: '创建时间',
text: info.createTime
}, {
title: '目的港',
text: info.portOfDestination
}, {
title: '分配装运',
text: info.partialShipment == 1 ? '允许' : '不允许'
}, {
title: '转运',
text: info.transport == 1 ? '允许' : '不允许'
}, {
title: '拼箱',
text: info.groupageFreight == 1 ? '允许' : '不允许'
}, {
title: '联系人',
text: info.buyerName
}, {
title: '联系电话',
text: info.buyerPhone
}, {
title: '联系邮箱',
text: info.buyerEmail
}, {
title: '交易方式',
text: info.transactionMode
}, {
title: '付汇方式',
text: {1:"tt",2:"TT1",3:"jiqi"}[info.remittanceWay]
}, {
title: '运输方式',
text: info.modeTransport
}, {
title: '海运险',
text: info.marineInsurance
}, {
title: '备注',
text: info.remark
}];
},
//页面循环
<view style="color: gray;line-height: 30px;" v-for="(item,i) in importerInfo">
<view class="infoTitle">
{{item.title}} :
</view>
<view class="infoText">
{{item.text}}
</view>
</view>