Commit fbcb4d3d authored by Smile's avatar Smile Committed by wux

bug214 (app/h5)首页/我的订单各个tab查询订单接口status字段返回32时,前端无状态值显示

parent d4cf105d
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<view class="item-body"> <view class="item-body">
<view class="item-body-v">{{ item.departureName }}</view> <view class="item-body-v">{{ item.departureName }}</view>
<view class="item-body-v-2"> <view class="item-body-v-2">
<view class="">{{ getStatusName(item.status) }}</view> <view class="">{{ getStatusName(item) }}</view>
<image src="../../static/img/jiant1.png" mode="widthFix"></image> <image src="../../static/img/jiant1.png" mode="widthFix"></image>
</view> </view>
<view class="item-body-v">{{ item.objectiveName }}</view> <view class="item-body-v">{{ item.objectiveName }}</view>
...@@ -548,7 +548,8 @@ export default { ...@@ -548,7 +548,8 @@ export default {
} }
}) })
}, },
getStatusName(status) { getStatusName(item) {
let status = this.getRealStatus(item);
var statusName = '' var statusName = ''
let that = this let that = this
if (that.statusData.length > 0) { if (that.statusData.length > 0) {
...@@ -610,7 +611,7 @@ export default { ...@@ -610,7 +611,7 @@ export default {
}, },
getOrderData() { getOrderData() {
this.$request this.$request
.get('/app-api/my/order/dynamic/page', { page: this.page, rows: 6 , searchKey: this.searchKey.replace(/\s+/g, ''),statusList:this.config.status.value[this.config.status.index] }) .get('/app-api/my/order/dynamic/page', { page: this.page, rows: 6 , searchKey: this.searchKey.replace(/\s+/g, ''),dynamicStatusList:this.config.status.value[this.config.status.index] })
.then((res) => { .then((res) => {
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
if (this.page == 1){ if (this.page == 1){
...@@ -753,6 +754,33 @@ export default { ...@@ -753,6 +754,33 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: '../order/order?key=' + this.searchKey url: '../order/order?key=' + this.searchKey
}) })
},
getRealStatus(item){
let status = 0;
if (item.status === 12 && item.shipmentState === 325){
status = 12325
}else if (item.status === 5 && item.airShipment === 1 && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10501
}else if (item.status === 5 && (item.airShipment === 2 || item.airShipment === 3) && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10502
}else if (item.status === 5 && item.airShipment === 4 && item.transportId === 3) {
status = 10503;
} else if (item.status === 5 && item.abnormalState === 0 && item.auditType === 0 &&
((item.transportId === 3 && (item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)) ||
(item.transportId === 1 && (item.airShipment === 0 || item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)))) {
status = 10504;
} else if (item.status === 32 && item.shipmentState === 411 && item.transportId === 3) {
status = 132411;
} else if (item.status === 32 && item.shipmentState === 412 && item.transportId === 3) {
status = 132412;
} else if (item.status === 32 && item.shipmentState === 409 && item.transportId === 3) {
status = 132409;
} else if (item.status === 32 && item.shipmentState === 428 && item.transportId === 3) {
status = 118428;
}else {
status = item.status;
}
return status
} }
} }
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<view class="fa-v"> <view class="fa-v">
<view class="order-no"> <view class="order-no">
<text>{{item.orderNo}}</text> <text>{{item.orderNo}}</text>
<text>{{formatMsg(item.status)}}</text> <text>{{formatMsg(item)}}</text>
</view> </view>
<view v-if="item.tidanNo"> <view v-if="item.tidanNo">
<text>{{ item.tidanNo }}</text> <text>{{ item.tidanNo }}</text>
...@@ -603,7 +603,8 @@ ...@@ -603,7 +603,8 @@
} }
}, },
methods: { methods: {
formatMsg(val){ formatMsg(item){
let val=this.getRealStatus(item)
const index=this.config.status.value.findIndex(item=>{ const index=this.config.status.value.findIndex(item=>{
return item.split(',').map(Number).includes(val); return item.split(',').map(Number).includes(val);
}) })
...@@ -1119,7 +1120,7 @@ ...@@ -1119,7 +1120,7 @@
}) })
}, },
getIssued(){ getIssued(){
this.$request.get('/app-api/my/order/issued/page',{page:this.page,rows:6,searchKey:this.searchKey.replace(/\s+/g, ''),statusList:this.config.status.value[this.config.status.index]}).then(res=>{ this.$request.get('/app-api/my/order/issued/page',{page:this.page,rows:6,searchKey:this.searchKey.replace(/\s+/g, ''),dynamicStatusList:this.config.status.value[this.config.status.index]}).then(res=>{
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){ if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){
if(this.page == 1){ if(this.page == 1){
if(this.selectIndex==1){ if(this.selectIndex==1){
...@@ -1136,7 +1137,7 @@ ...@@ -1136,7 +1137,7 @@
}) })
}, },
getReceiver(){ getReceiver(){
this.$request.get('/app-api/my/order/received/page',{page:this.page,rows:6,searchKey:this.searchKey.replace(/\s+/g, ''),statusList:this.config.status.value[this.config.status.index]}).then(res=>{ this.$request.get('/app-api/my/order/received/page',{page:this.page,rows:6,searchKey:this.searchKey.replace(/\s+/g, ''),dynamicStatusList:this.config.status.value[this.config.status.index]}).then(res=>{
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){ if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){
if(this.page == 1){ if(this.page == 1){
if(this.selectIndex==2){ if(this.selectIndex==2){
...@@ -1182,7 +1183,7 @@ ...@@ -1182,7 +1183,7 @@
} }
}, },
getData(){ getData(){
this.$request.get('/app-api/my/order/all/order',{page:this.page,rows:6,searchKey:this.searchKey.replace(/\s+/g, ''),statusList:this.config.status.value[this.config.status.index]}).then(res=>{ this.$request.get('/app-api/my/order/all/order',{page:this.page,rows:6,searchKey:this.searchKey.replace(/\s+/g, ''),dynamicStatusList:this.config.status.value[this.config.status.index]}).then(res=>{
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){ if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){
if(this.page == 1){ if(this.page == 1){
if(this.selectIndex==0){ if(this.selectIndex==0){
...@@ -1417,6 +1418,33 @@ ...@@ -1417,6 +1418,33 @@
// this.$request.post("/app-api/my/order/copy/" + orderId).then(res => { // this.$request.post("/app-api/my/order/copy/" + orderId).then(res => {
// this.toEditOrder(res.data) // this.toEditOrder(res.data)
// }) // })
},
getRealStatus(item){
let status = 0;
if (item.status === 12 && item.shipmentState === 325){
status = 12325
}else if (item.status === 5 && item.airShipment === 1 && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10501
}else if (item.status === 5 && (item.airShipment === 2 || item.airShipment === 3) && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10502
}else if (item.status === 5 && item.airShipment === 4 && item.transportId === 3) {
status = 10503;
} else if (item.status === 5 && item.abnormalState === 0 && item.auditType === 0 &&
((item.transportId === 3 && (item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)) ||
(item.transportId === 1 && (item.airShipment === 0 || item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)))) {
status = 10504;
} else if (item.status === 32 && item.shipmentState === 411 && item.transportId === 3) {
status = 132411;
} else if (item.status === 32 && item.shipmentState === 412 && item.transportId === 3) {
status = 132412;
} else if (item.status === 32 && item.shipmentState === 409 && item.transportId === 3) {
status = 132409;
} else if (item.status === 32 && item.shipmentState === 428 && item.transportId === 3) {
status = 118428;
}else {
status = item.status;
}
return status
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment