创建数据库表格
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="label">当前状态:</text>
|
||||
<text class="value">{{ waybillInfo.status }}</text>
|
||||
<text class="value">{{ getStatusText(waybillInfo.status) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -44,8 +44,8 @@
|
||||
<view class="event-main-col">
|
||||
<text class="event-text">{{ event.event_text }}</text>
|
||||
<view class="event-meta">
|
||||
<text class="meta-tag blue">CODE: {{ event.event_code }}</text>
|
||||
<text class="meta-tag orange">MAP: {{ event.status_code }}</text>
|
||||
<text class="meta-tag blue">代码: {{ event.event_code }}</text>
|
||||
<text class="meta-tag orange">映射状态: {{ getStatusMapping(event.status_code) }}</text>
|
||||
</view>
|
||||
<view class="raw-box" v-if="showRaw[index]">
|
||||
<text class="raw-text">{{ JSON.stringify(event.raw_payload, null, 2) }}</text>
|
||||
@@ -116,6 +116,28 @@
|
||||
const current = this.showRaw[index]
|
||||
this.showRaw[index] = !current
|
||||
},
|
||||
getStatusText(status: string) : string {
|
||||
const maps = {
|
||||
'PENDING': '待发货',
|
||||
'SHIPPED': '已发货',
|
||||
'IN_TRANSIT': '运输中',
|
||||
'DELIVERED': '已签收',
|
||||
'OUT_FOR_DELIVERY': '派送中',
|
||||
'EXCEPTION': '异常'
|
||||
}
|
||||
return (maps[status] != null) ? maps[status] : status
|
||||
},
|
||||
getStatusMapping(code: string) : string {
|
||||
const maps = {
|
||||
'SHIPPED': '已揽收',
|
||||
'IN_TRANSIT': '运输中',
|
||||
'ARRIVED_HUB': '到达分拨中心',
|
||||
'OUT_FOR_DELIVERY': '正在派送',
|
||||
'DELIVERED': '已签收',
|
||||
'EXCEPTION': '包裹异常'
|
||||
}
|
||||
return (maps[code] != null) ? maps[code] : code
|
||||
},
|
||||
runScenario(type: string) {
|
||||
if (this.waybillInfo == null) return
|
||||
uni.showModal({
|
||||
|
||||
Reference in New Issue
Block a user