修改订单跳转方法
This commit is contained in:
parent
c698a76016
commit
75ed561afa
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="component-order-item" @click="toDetail">
|
<view class="component-order-item">
|
||||||
<view class="order-header">
|
<view class="order-header">
|
||||||
<view class="state-text" :style="{ color: models.order.getOrderStateTextColor(order.state) }">
|
<view class="state-text" :style="{ color: models.order.getOrderStateTextColor(order.state) }">
|
||||||
<text>{{ models.order.getOrderStateText(order.state) }}</text>
|
<text>{{ models.order.getOrderStateText(order.state) }}</text>
|
||||||
|
@ -108,13 +108,6 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toDetail() {
|
|
||||||
let type = "detail";
|
|
||||||
if (this.order.state == this.$models.order.state.NO_SELECT_WORKER) {
|
|
||||||
type = "worker";
|
|
||||||
}
|
|
||||||
this.$utils.toPage("/pages/order/detail?type=" + type + "&id=" + this.order.id);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -23,7 +23,12 @@
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="tab-item" :class="['tab' + tabIdx]">
|
<view class="tab-item" :class="['tab' + tabIdx]">
|
||||||
<view class="order-list">
|
<view class="order-list">
|
||||||
<view class="order-item" v-for="(item, index) in tabItem.list" :key="index">
|
<view
|
||||||
|
class="order-item"
|
||||||
|
v-for="(item, index) in tabItem.list"
|
||||||
|
:key="index"
|
||||||
|
@click="toDetail(item.id, item.state)"
|
||||||
|
>
|
||||||
<order-item :order="item" :index="index">
|
<order-item :order="item" :index="index">
|
||||||
<view class="action-group">
|
<view class="action-group">
|
||||||
<order-action :order="item" />
|
<order-action :order="item" />
|
||||||
|
@ -202,6 +207,13 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadData() {},
|
loadData() {},
|
||||||
|
toDetail(id, state) {
|
||||||
|
let type = "detail";
|
||||||
|
if (state == this.$models.order.state.NO_SELECT_WORKER) {
|
||||||
|
type = "worker";
|
||||||
|
}
|
||||||
|
this.$utils.toPage("/pages/order/detail?type=" + type + "&id=" + id);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue