order-express-info.vue 1.1 KB
<template>
  <Modal v-model="showModal" :title="title" width="700">
    <div class="content">
      <Table border :columns="tableCols" :data="expressList"></Table>
    </div>
    <div slot="footer">
      <Button type="text" size="large" @click="hide">关闭</Button>
    </div>
  </Modal>
</template>
<script>
import timeFormat from 'filters/time-format';
export default {
  name: 'OrderExpressInfo',
  props: [],
  data() {
    return {
      title: '订单物流轨迹',
      showModal: false,
      expressList: [],
      tableCols: [
        {
          title: '轨迹',
          key: 'acceptRemark',
          align: 'center',
          width: 500,
        },
        {
          title: '创建时间',
          align: 'center',
          render: (h, params) => {
            return (
              <div>
                <span>{timeFormat(params.row.createTime)}</span>
              </div>
            );
          },
        },
      ],
    };
  },
  methods: {
    show(info) {
      this.showModal = true;
      this.expressList = info;
    },
    hide() {
      this.showModal = false;
    },
  },
};
</script>