Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | export const delAfterSaleReason = (id) => { |
| | | return deleteRequest(`/order/afterSaleReason/delByIds/${id}`) |
| | | } |
| | | //更新订单状态 |
| | | export const sendMessage = (id) => { |
| | | return getRequest(`/order/order/sendMessage/${id}`) |
| | | } |
| | | |
| | | // 添加售后原因 |
| | | export const addAfterSaleReason = (params) => { |
| | |
| | | title: "操作", |
| | | key: "action", |
| | | align: "center", |
| | | width: 100, |
| | | width: 150, |
| | | render: (h, params) => { |
| | | return h( |
| | | "Button", |
| | | { |
| | | props: { type: "info", size: "small" }, |
| | | style: { marginRight: "5px" }, |
| | | on: { |
| | | click: () => { |
| | | this.detail(params.row); |
| | | const buttons = []; |
| | | |
| | | // 查看按钮 - 始终显示 |
| | | buttons.push( |
| | | h( |
| | | "Button", |
| | | { |
| | | props: { type: "info", size: "small" }, |
| | | style: { marginRight: "5px" }, |
| | | on: { |
| | | click: () => { |
| | | this.detail(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | "查看" |
| | | "查看" |
| | | ) |
| | | ); |
| | | |
| | | // 根据订单状态为'PAID'时显示额外操作按钮 |
| | | if (params.row.orderStatus === 'PAID') { |
| | | buttons.push( |
| | | h( |
| | | "Button", |
| | | { |
| | | props: { type: "primary", size: "small" }, |
| | | style: { marginRight: "5px" }, |
| | | on: { |
| | | click: () => { |
| | | this.handlePaidOrder(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "更新订单状态" |
| | | ) |
| | | ); |
| | | } |
| | | |
| | | return h('div', buttons); |
| | | }, |
| | | }, |
| | | |
| | |
| | | query: { sn: sn }, |
| | | }) |
| | | }, |
| | | // 处理已付款订单的操作 |
| | | handlePaidOrder(order) { |
| | | // 这里可以添加已付款订单的具体操作逻辑 |
| | | // 例如:显示确认对话框,发起发货请求等 |
| | | this.$Modal.confirm({ |
| | | title: '更新状态', |
| | | content: `确认对订单号:${order.sn} 进行更新状操作吗?`, |
| | | onOk: () => { |
| | | // 调用发货API |
| | | this.deliverOrder(order); |
| | | }, |
| | | onCancel: () => { |
| | | this.$Message.info('已取消操作'); |
| | | } |
| | | }); |
| | | }, |
| | | // 发货操作 |
| | | deliverOrder(order) { |
| | | console.log('------------->获取订单信息',order); |
| | | console.log('订单sn编号',order.sn); |
| | | // 这里可以调用相关的API进行发货操作 |
| | | API_Order.sendMessage(order.sn).then((res) => { |
| | | console.log('-------------->',res); |
| | | if (res.success) { |
| | | this.$Message.success('更新状态成功'); |
| | | this.getDataList(); // 刷新列表 |
| | | } else { |
| | | this.$Message.error('更新状态失败'); |
| | | } |
| | | }); |
| | | |
| | | // 暂时模拟操作 |
| | | this.$Message.success(`订单 ${order.sn} 更新状态成功!`); |
| | | // 刷新列表数据 |
| | | this.getDataList(); |
| | | }, |
| | | // 导出订单 |
| | | async exportOrder() { |
| | | if(this.searchForm.startDate==""||this.searchForm.endDate==""){ |
| | |
| | | this.videoTagList = res.data; |
| | | }) |
| | | this.upLoadVideoShow = true; |
| | | this.chooseTag = row.tagList.map(item => { |
| | | return item.tagName |
| | | }) |
| | | console.log('--------------------->',row.tagList) |
| | | if (row.tagList){ |
| | | this.chooseTag = row.tagList.map(item => { |
| | | return item.tagName |
| | | }) |
| | | } |
| | | console.log('选中列表---》',row.goodsList) |
| | | row.goodsList.forEach(item => { |
| | | item.goodsSkuId = item.id |
| | | }) |
| | | if (row.goodsList){ |
| | | row.goodsList.forEach(item => { |
| | | item.goodsSkuId = item.id |
| | | }) |
| | | } |
| | | |
| | | this.uploadVideoForm = { |
| | | id: '', |
| | | title: '', |
| | |
| | | } |
| | | |
| | | |
| | | // 遍历已选择的标签 |
| | | row.tagList.forEach(tag => { |
| | | // 检查标签是否已存在于videoTagList中 |
| | | const exists = this.videoTagList.some(item => item.tagName === tag.tagName); |
| | | // 如果不存在,则添加到选项列表 |
| | | if (!exists) { |
| | | this.videoTagList.push({ |
| | | id: tag.id, // 生成临时ID |
| | | tagName: tag.tagName |
| | | }); |
| | | } |
| | | }); |
| | | if (row.tagList){ |
| | | // 遍历已选择的标签 |
| | | row.tagList.forEach(tag => { |
| | | // 检查标签是否已存在于videoTagList中 |
| | | const exists = this.videoTagList.some(item => item.tagName === tag.tagName); |
| | | // 如果不存在,则添加到选项列表 |
| | | if (!exists) { |
| | | this.videoTagList.push({ |
| | | id: tag.id, // 生成临时ID |
| | | tagName: tag.tagName |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | this.uploadVideoForm = row |
| | | console.log("打印值",this.uploadVideoForm) |
| | | this.uploadVideoForm.fileInfo= {}; |