yanjinhui
2025-12-01 2b49f7643d15b74889d190f216630559006ed93a
н¨Îļþ¼Ð/PDA/pages/stash/outFinish.vue
@@ -438,6 +438,55 @@
               }
            })
         },
//    submit() {
//          if (this.barcode == "") {
//             this.$refs.uToast.show({
//             title: "请扫描货位编号",
//             type: 'error'
//             })
//             return;
//          }
//   this.$u.post('/api/DeliveryOrder/OutFinish', {
//     MainData: {
//       "locationCode": this.barcode,
//       "taskId": this.taskId,
//     },
//   }).then(res => {
//     if (res.status) {
//       this.$refs.uToast.show({
//         title: "出库成功",
//         type: "success"
//       })
//       this.barcode = "";
//       // å…³é”®ä¿®æ”¹ï¼šä½¿ç”¨ getCurrentPages èŽ·å–å‰ä¸€ä¸ªé¡µé¢å¹¶ç›´æŽ¥è°ƒç”¨å…¶æ–¹æ³•
//       const pages = getCurrentPages();
//       const prevPage = pages[pages.length - 2]; // èŽ·å–ä¸Šä¸€ä¸ªé¡µé¢å®žä¾‹
//       if (prevPage && prevPage.refreshData) {
//         // ç›´æŽ¥è°ƒç”¨ä¸Šä¸€ä¸ªé¡µé¢çš„刷新方法
//         prevPage.refreshData();
//       }
//       setTimeout(() => {
//         uni.navigateBack({
//           delta: 1
//         });
//       }, 300);
//     } else {
//       this.$refs.uToast.show({
//         title: res.message,
//         type: "error"
//       })
//     }
//   })
// }
         submit() {
            if (this.barcode == "") {
               this.$refs.uToast.show({
@@ -446,40 +495,41 @@
               })
               return;
            }
            // if (this.materSn.length == 0) {
            //    this.$refs.uToast.show({
            //       title: "请输入出库数量",
            //       type: 'error'
            //    })
            //    return;
            // }
    // æ–°å¢žäºŒæ¬¡ç¡®è®¤é€»è¾‘
    uni.showModal({
        title: '确认出库',
        content: '您确定要提交出库信息吗?',
        success: (res) => {
            if (res.confirm) {
                // ç”¨æˆ·ç‚¹å‡»ç¡®å®šï¼Œæ‰§è¡ŒåŽŸæœ‰çš„æäº¤é€»è¾‘
            this.$u.post('/api/DeliveryOrder/OutFinish', {
               MainData: {
                  "locationCode": this.barcode,
                  "taskId":this.taskId,
                  // "warehouseCode": this.warehouseId,
                  // "orderNo": this.orderNo,
                  // "Inqty": this.materSn,
                  // "batchNo": this.batchNo,
               },
               // DelKeys: this.sns
            }).then(res => {
               this.Testcheck = false;
               if (res.status) {
                  this.$refs.uToast.show({
                     title: "出库成功",
                     type: "success"
                  })
                  // this.Inqty=res.message;
                  // this.order_Inqty="已出库数量:"+this.Inqty;
                  this.barcode="";
                  // uni.setStorageSync('outTask',true);
                        // å…³é”®ä¿®æ”¹ï¼šä½¿ç”¨ getCurrentPages èŽ·å–å‰ä¸€ä¸ªé¡µé¢å¹¶ç›´æŽ¥è°ƒç”¨å…¶æ–¹æ³•
                        const pages = getCurrentPages();
                        const prevPage = pages[pages.length - 2]; // èŽ·å–ä¸Šä¸€ä¸ªé¡µé¢å®žä¾‹
                        if (prevPage && prevPage.refreshData) {
                            // ç›´æŽ¥è°ƒç”¨ä¸Šä¸€ä¸ªé¡µé¢çš„刷新方法
                            prevPage.refreshData();
                        }
                  setTimeout(() => {
                      uni.navigateBack({
                          delta: 1
                      });
                  }, 300);
                  // this.materSn="";
               } else {
                  this.$refs.uToast.show({
                     title: res.message,
@@ -487,8 +537,16 @@
                  })
               }
            })
            } else {
                // ç”¨æˆ·ç‚¹å‡»å–消,不做任何操作
         }
      }
    });
}
      }
   }
</script>