zxl
4 天以前 ea813913d98599b47ccc106a2063dfc7e1b55268
订单列表问题,以及跳转问题
4个文件已修改
47 ■■■■ 已修改文件
manager/src/views/Main.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/member/list/memberDetail.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/order/order/orderDetail.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/order/order/orderList.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/Main.vue
@@ -75,7 +75,9 @@
    <div class="single-page-con"  :style="{ 'top': setting.isUseTabsRouter ? '100px' : '60px', height: setting.isUseTabsRouter ? 'calc(100% - 110px)' : 'calc(100% - 70px)' }">
      <div class="single-page">
        <!-- <keep-alive :include="cachePage"> -->
        <keep-alive include="orderList">
        <router-view></router-view>
        </keep-alive>
        <!-- </keep-alive> -->
      </div>
    </div>
manager/src/views/member/list/memberDetail.vue
@@ -1130,6 +1130,16 @@
      },
    },
    watch: {
      $route (to, from) {
        // 正确打印路由对象的方法
        if(from.fullPath === "/member" && to.fullPath.includes("/orderList")){
          this.id = this.$route.query.id;
          this.init();
        }
      },
    },
    mounted() {
      this.id = this.$route.query.id;
      this.init();
manager/src/views/order/order/orderDetail.vue
@@ -713,7 +713,14 @@
  },
  watch: {
    $route (to, from) {
      this.$router.go(0);
      console.log("to:",to.fullPath)
      console.log("form:",from.fullPath)
      // 正确打印路由对象的方法
      if(from.fullPath === "/orderList" && to.fullPath.includes("/order-detail")){
        this.sn = this.$route.query.sn;
        this.getDataList();
        this.getOrderPackage();
      }
    },
  },
  methods: {
@@ -910,6 +917,7 @@
    },
  },
  mounted () {
    console.log("加载数据")
    this.sn = this.$route.query.sn;
    this.getDataList();
    this.getOrderPackage();
manager/src/views/order/order/orderList.vue
@@ -95,7 +95,20 @@
        :data="data"
        ref="table"
        sortable="custom"
      ></Table>
      >
        <template slot="sn" slot-scope="{ row }">
          <div style="width: 100%" @click="detail(row)">
          <span>{{row.sn}}</span>
          </div>
        </template>
        <template  slot="nickName" slot-scope="{ row }">
          <div style="width: 100%" @click="handleNickNameClick(row)">
            <span >{{row.nickName}}</span>
          </div>
        </template>
      </Table>
      <Row type="flex" justify="end" class="mt_10">
        <Page
@@ -180,6 +193,7 @@
          key: "sn",
          minWidth: 240,
          tooltip: true,
          slot: 'sn'
        },
        {
@@ -230,9 +244,10 @@
        },
        {
          title: "买家名称",
          key: "memberName",
          key: "nickName",
          minWidth: 130,
          tooltip: true,
          slot:'nickName'
        },
        {
@@ -343,6 +358,9 @@
    };
  },
  methods: {
    handleNickNameClick(row){
      this.$options.filters.customRouterPush({ name: "member-detail", query: { id: row.memberId } })
    },
    // 初始化数据
    init() {
      this.getDataList();
@@ -387,11 +405,10 @@
    // 跳转详情页面
    detail(v) {
      let sn = v.sn;
      this.$options.filters.customRouterPush({
      this.$router.push({
        name: "order-detail",
        query: { sn: sn },
      })
    },
    // 导出订单
    async exportOrder() {