| | |
| | | :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 |
| | |
| | | key: "sn", |
| | | minWidth: 240, |
| | | tooltip: true, |
| | | slot: 'sn' |
| | | }, |
| | | |
| | | { |
| | |
| | | }, |
| | | { |
| | | title: "买家名称", |
| | | key: "memberName", |
| | | key: "nickName", |
| | | minWidth: 130, |
| | | tooltip: true, |
| | | slot:'nickName' |
| | | }, |
| | | |
| | | { |
| | |
| | | key: "action", |
| | | align: "center", |
| | | width: 150, |
| | | fixed:"right", |
| | | render: (h, params) => { |
| | | const buttons = []; |
| | | |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleNickNameClick(row){ |
| | | this.$options.filters.customRouterPush({ name: "member-detail", query: { id: row.memberId } }) |
| | | }, |
| | | // 初始化数据 |
| | | init() { |
| | | this.getDataList(); |
| | |
| | | // 跳转详情页面 |
| | | detail(v) { |
| | | let sn = v.sn; |
| | | this.$options.filters.customRouterPush({ |
| | | this.$router.push({ |
| | | name: "order-detail", |
| | | query: { sn: sn }, |
| | | }) |
| | | |
| | | }, |
| | | // 处理已付款订单的操作 |
| | | handlePaidOrder(order) { |
| | |
| | | deliverOrder(order) { |
| | | console.log('------------->获取订单信息',order); |
| | | console.log('订单sn编号',order.sn); |
| | | // 这里可以调用相关的API进行发货操作 |
| | | // 调用发货API |
| | | API_Order.sendMessage(order.sn).then((res) => { |
| | | console.log('-------------->',res); |
| | | if (res.success) { |
| | | this.$Message.success('更新状态成功'); |
| | | this.getDataList(); // 刷新列表 |
| | | // 延迟5秒刷新列表mq消息是异步的无法实时同步需要执行延迟刷新 |
| | | setTimeout(() => { |
| | | this.getDataList(); |
| | | }, 5000); |
| | | } else { |
| | | this.$Message.error('更新状态失败'); |
| | | } |
| | | }).catch((error) => { |
| | | console.error('更新状态失败:', error); |
| | | this.$Message.error('更新状态失败,请重试'); |
| | | }); |
| | | |
| | | // 暂时模拟操作 |
| | | this.$Message.success(`订单 ${order.sn} 更新状态成功!`); |
| | | // 刷新列表数据 |
| | | this.getDataList(); |
| | | }, |
| | | // 导出订单 |
| | | async exportOrder() { |