Procházet zdrojové kódy

库存并库该回滚

zh před 3 měsíci
rodič
revize
1d47bd7431
1 změnil soubory, kde provedl 24 přidání a 21 odebrání
  1. 24 21
      src/views/robot/merge/index.vue

+ 24 - 21
src/views/robot/merge/index.vue

@@ -308,7 +308,7 @@ const focusTargetLocationInput = () => {
 // 扫描监听
 const _handlerScan = (code: string) => {
   if (!code) return
-  
+
   if (scanType.value === 1) {
     // 扫描料箱号
     boxCode.value = code
@@ -349,10 +349,10 @@ const onSourceLocationClick = () => {
 // 源库位回车
 const onSourceLocationEnter = () => {
   if (!sourceLocation.value) return
-  
+
   // 清空商品信息
   resetProductInfo()
-  
+
   // 切换到扫描商品条码
   scanType.value = 3
   focusBarcodeInput()
@@ -384,20 +384,20 @@ const onBarcodeEnter = async () => {
     showToast('请先扫描源库位')
     return
   }
-  
+
   try {
     showLoadingToast({ message: '查询中...', forbidClick: true })
-    
+
     const params = {
       warehouse,
       barcode: scanBarcode.value,
       location: sourceLocation.value,
       locationRegexp: '^(?!STAGE_|SORTATION_).*$'
     }
-    
+
     const res = await getInventory(params)
     closeToast()
-    
+
     if (res.data && res.data.length > 0) {
       const inventoryData = res.data[0]
       // 保存完整的库存数据
@@ -413,7 +413,7 @@ const onBarcodeEnter = async () => {
       productInfo.productionDate = inventoryData.lotAtt01 || inventoryData.productionDate || ''
       productInfo.expiryDate = inventoryData.lotAtt02 || inventoryData.expiryDate || ''
       productInfo.moveQty = inventoryData.quantityAvailable || inventoryData.quantity || ''
-      
+
       scanSuccess()
       showToast('商品信息获取成功')
       // 切换到扫描目标库位
@@ -518,12 +518,12 @@ const loadBoxData = async (code: string) => {
 
     closeToast()
     scanSuccess()
-    
+
     // 加载完成后检查是否需要启动轮询
     if (hasWaitingBox()) {
       startPolling()
     }
-    
+
     // 加载完成后focus到源库位输入框
     scanType.value = 2
     focusSourceLocationInput()
@@ -834,19 +834,19 @@ const refreshBoxStatus = async () => {
   try {
     const res = await getBoxStatus(warehouse, boxCodeList)
     const statusMap = res.data || {}
-    
+
     // 更新站台列表中的状态
     stationList.value = stationList.value.map(station => {
       if (!station.boxCode || !statusMap.hasOwnProperty(station.boxCode)) {
         return station
       }
-      
+
       const newBoxStatus = statusMap[station.boxCode]
       const inventoryLocations = station.inventoryLocations || []
-      
+
       let status: StationItem['status'] = 'offline'
       let label: string | undefined = undefined
-      
+
       if (newBoxStatus === 0 || newBoxStatus === 10) {
         status = 'waiting'
         label = '等待调箱'
@@ -863,10 +863,10 @@ const refreshBoxStatus = async () => {
         status = 'error'
         label = '异'
       }
-      
+
       return { ...station, status, label }
     })
-    
+
     // 检查是否需要继续轮询
     if (hasWaitingBox()) {
       startPolling()
@@ -1152,7 +1152,7 @@ const submitMove = () => {
 
     &.value {
       color: #333;
-    
+
       &.input-cell {
         padding: 0;
 
@@ -1170,7 +1170,7 @@ const submitMove = () => {
           }
         }
       }
-    
+
       &.editable {
         cursor: pointer;
         min-height: 20px;
@@ -1353,14 +1353,17 @@ const submitMove = () => {
 
   .btn-right {
     display: flex;
-    gap: 12px; /* 增加按钮间距 */
+    /* 使用 margin 替代 gap,兼容安卓 WebView */
+    .van-button + .van-button {
+      margin-left: 12px;
+    }
   }
 
   .van-button {
     height: 32px;
     font-size: 13px;
-    padding: 0 12px;
-    min-width: 70px; /* 确保按钮最小宽度 */
+    padding: 0 14px;
+    min-width: 75px;
   }
 
   .btn-robot {