zxl
5 天以前 9797e46619f64bddb78d4b4eaa03d53069ac2ba4
Merge remote-tracking branch 'origin/dev' into dev
3个文件已修改
133 ■■■■ 已修改文件
manager/src/api/order.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/order/order/orderList.vue 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/video/VideoList.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/api/order.js
@@ -22,6 +22,10 @@
export const delAfterSaleReason = (id) => {
  return deleteRequest(`/order/afterSaleReason/delByIds/${id}`)
}
//更新订单状态
export const sendMessage = (id) => {
  return getRequest(`/order/order/sendMessage/${id}`)
}
//  添加售后原因
export const addAfterSaleReason = (params) => {
manager/src/views/order/order/orderList.vue
@@ -320,21 +320,47 @@
          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);
          },
        },
@@ -410,6 +436,42 @@
        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==""){
manager/src/views/video/VideoList.vue
@@ -954,13 +954,19 @@
        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: '',
@@ -977,18 +983,21 @@
      }
      // 遍历已选择的标签
      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= {};