peng
5 天以前 e425812229ba4f464475cac1fc6c30cd974f2c52
解决订单查看详情问题
3个文件已修改
71 ■■■■ 已修改文件
manager/src/views/order/order/orderDetail.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/order/order/orderList.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
seller/src/views/order/order/orderDetail.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/order/order/orderDetail.vue
@@ -716,7 +716,7 @@
      console.log("to:",to.fullPath)
      console.log("form:",from.fullPath)
      // 正确打印路由对象的方法
      if(from.fullPath === "/orderList" && to.fullPath.includes("/order-detail")){
      if((from.fullPath === "/orderList"|| from.fullPath === "/fictitiousOrderList" ||from.fullPath === "/orderStatistics") && to.fullPath.includes("/order-detail")){
        this.sn = this.$route.query.sn;
        this.getDataList();
        this.getOrderPackage();
@@ -803,6 +803,7 @@
    // 获取订单详情
    getDataList () {
      this.loading = true;
      console.log("执行获取订单信息操作")
      API_Order.orderDetail(this.sn).then((res) => {
        this.loading = false;
        if (res.success) {
manager/src/views/order/order/orderList.vue
@@ -464,24 +464,24 @@
                )
              );
            }
            // 根据订单状态为'PAID'时显示额外操作按钮
            if (params.row.deliverStatus === 'UNDELIVERED') {
              buttons.push(
                h(
                  "Button",
                  {
                    props: { type: "primary", size: "small" },
                    style: { marginRight: "5px" },
                    on: {
                      click: () => {
                        this.handlerEditorQrcode(params.row);
                      },
                    },
                  },
                  "修改地址二维码"
                )
              );
            }
            // // 根据订单状态为'PAID'时显示额外操作按钮
            // if (params.row.deliverStatus === 'UNDELIVERED') {
            //   buttons.push(
            //     h(
            //       "Button",
            //       {
            //         props: { type: "primary", size: "small" },
            //         style: { marginRight: "5px" },
            //         on: {
            //           click: () => {
            //             this.handlerEditorQrcode(params.row);
            //           },
            //         },
            //       },
            //       "修改地址二维码"
            //     )
            //   );
            // }
            return h('div', buttons);
          },
@@ -526,17 +526,17 @@
    closeGeneralQrCode(){
      this.showGeneralQrCode = false;
    },
    handlerEditorQrcode(row){
      this.QRCodeUrl = '';
      this.showGeneralQrCode = true
      this.codeLoading = true;
      //获得商品对应的第一个skuid
      this.codeLoading = false;
      this.QRCodeUrl = this.QRcodeBaseUrl+ '/scanpage/editOrderAddress'+'?orderSn='+row.sn
      console.log(this.QRCodeUrl);
    },
    // handlerEditorQrcode(row){
    //   this.QRCodeUrl = '';
    //   this.showGeneralQrCode = true
    //   this.codeLoading = true;
    //
    //   //获得商品对应的第一个skuid
    //   this.codeLoading = false;
    //   this.QRCodeUrl = this.QRcodeBaseUrl+ '/scanpage/editOrderAddress'+'?orderSn='+row.sn
    //   console.log(this.QRCodeUrl);
    //
    // },
    // 选中的图片
    callbackSelected(val) {
      console.log(val)
seller/src/views/order/order/orderDetail.vue
@@ -894,7 +894,7 @@
                // 直接从data数组中获取最新的canNum值,而不依赖选择时的数据
                const currentDataItem = this.data.find(d => d.id === item.id);
                const finalDeliveryNum = currentDataItem ? currentDataItem.canNum : item.num;
                console.log('处理商品项:', {
                  id: item.id,
                  selectedCanNum: item.canNum,
@@ -902,7 +902,7 @@
                  num: item.num,
                  finalDeliveryNum: finalDeliveryNum
                });
                return {
                  orderItemId: item.id,
                  deliveryNum: finalDeliveryNum,
@@ -1017,14 +1017,14 @@
              // 只在弹窗打开状态下才保留用户修改的canNum值
              const existingItem = this.groupShipModalOpened ? this.data.find(d => d.id === item.id) : null;
              const defaultCanNum = item.num - item.deliverNumber;
              return {
                ...item,
                ___num: item.num,
                _disabled: item.deliverNumber >= item.num,
                // 如果弹窗已打开且用户已经修改过canNum且值合理,则保留;否则使用默认值
                canNum: (existingItem && existingItem.canNum !== undefined && existingItem.canNum <= defaultCanNum)
                  ? existingItem.canNum
                canNum: (existingItem && existingItem.canNum !== undefined && existingItem.canNum <= defaultCanNum)
                  ? existingItem.canNum
                  : defaultCanNum
              };
            });