| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <template id="cityDelivery">
- <div style="float: right;margin-left: 20px">
- <span style="color: red;font-weight: bold;font-size: 13px"
- v-if="item&&item.has_many_city_delivery_another&&(item.has_many_city_delivery_another.length!=0)">
- [[plugin_name]]:
- <template v-if="item&&item.has_one_city_delivery&&item.has_one_city_delivery.has_one_another_order">
- <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==1">等待骑手接单
- </template>
- <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==10">骑手已接单
- </template>
- <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==12">骑手已到店
- </template>
- <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==15">骑手配送中
- </template>
- <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==17">骑手已送达
- </template>
- <template v-if="item.has_one_city_delivery.has_one_another_order.sf_status==2">订单已取消
- </template>
- </template>
- <el-link @click="showDeliveryModal" type="primary">查看物流</el-link>
- </span>
- <el-dialog :visible.sync="delivery_detail_modal.show" overflow="auto" width="900px" title="物流信息">
- <div style="height:500px;margin-left: 50px;overflow:auto">
- <template v-for="(v,k) in delivery_detail_modal.data">
- <p>第三方订单号:[[v.another_order_sn]]</p>
- <p>第三方物流号:[[v.another_delivery_sn]]</p>
- <p>骑手名:[[v.rider_name]]</p>
- <p>骑手电话:[[v.rider_phone]]</p>
- <div>
- <el-timeline :reverse="reverse">
- <el-timeline-item
- v-for="(vv, kk) in v.data"
- :key="index"
- type='primary'
- :timestamp="vv.time">
- [[vv.desc]]
- </el-timeline-item>
- </el-timeline>
- <el-divider></el-divider>
- </div>
- </template>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- Vue.component('cityDelivery', {
- props: {
- item: {
- type: Object,
- default: () => {
- }
- }
- },
- delimiters: ['[[', ']]'],
- name:"cityDelivery",
- data() {
- return {
- plugin_name: '同城配送',
- delivery_detail_modal: {
- show: false,
- data: [],
- }
- }
- },
- watch: {},
- mounted: function () {
- if (this.item&&this.item.has_many_city_delivery_another&&(this.item.has_many_city_delivery_another.length !== 0)) {
- this.pluginName();
- }
- },
- methods: {
- showDeliveryDetail() {
- // alert(this.item.id);
- },
- pluginName() {
- this.$http.post('{!! yzWebFullUrl('plugin.city-delivery.admin.setting.pluginName') !!}', {}).then(response => {
- if (response.data.result) {
- this.plugin_name = response.data.data;
- } else {
- this.$message({message: response.data.msg, type: 'error'});
- }
- }, response => {
- this.$message({message: response.data.msg, type: 'error'});
- })
- },
- showDeliveryModal() {
- this.$http.post('{!! yzWebFullUrl('plugin.city-delivery.admin.order.deliveryDetail') !!}', {order_id: this.item.id}).then(response => {
- if (response.data.result) {
- console.log(response.data);
- this.delivery_detail_modal.data = response.data.data;
- this.delivery_detail_modal.show = true;
- } else {
- this.$message({message: response.data.msg, type: 'error'});
- }
- }, response => {
- this.$message({message: response.data.msg, type: 'error'});
- })
- }
- },
- template: `#cityDelivery`,
- });
- </script>
|