Bladeren bron

bug修复

andy 3 jaren geleden
bovenliggende
commit
5f39bfd189

+ 5 - 3
ruoyi-ui/src/views/ams/lineCall/index.vue

@@ -77,10 +77,10 @@
           </el-select>
         </el-form-item>
         <el-form-item label="数量" prop="qty" v-if="form.qtyFlag !== 'Hidden'">
-          <el-input v-model="form.qty" :placeholder="`输入范围${form.qtyMin}-${form.qtyMax}`" type="number"/>
+          <el-input v-model="form.qty" :placeholder="`输入范围${form.qtyMin == null ? '' : form.qtyMin + '-' + form.qtyMax}`" type="number"/>
         </el-form-item>
         <el-form-item label="重量" prop="weight" v-if="form.weightFlag !== 'Hidden'">
-          <el-input v-model="form.weight" :placeholder="`输入范围${form.weightMin}-${form.weightMax}`" type="number"/>
+          <el-input v-model="form.weight" :placeholder="`输入范围${form.weightMin == null ? '' : form.weightMin + '-' + form.weightMax}`" type="number"/>
         </el-form-item>
         <!--<el-form-item label="供应商" prop="supplier" v-if="form.supplierFlag !== 'Hidden'">
           <el-select style="width: 100%" v-model="form.supplier" placeholder="请选择供应商" clearable size="small">
@@ -472,6 +472,7 @@
               if (response.code === 200) {
                 this.$modal.msgSuccess("执行成功");
                 this.open = false;
+                this.subData.length = 0
               } else {
                 this.$modal.msgError(response.msg);
               }
@@ -584,7 +585,8 @@
                 }
               }
             }
-            this.subData.push(this.form)
+            let obj = JSON.parse(JSON.stringify(this.form))
+            this.subData.push(obj)
           }
         });
       },

+ 12 - 4
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -73,7 +73,6 @@ public class BusinessServiceImpl implements IBusinessService {
 
         BaseLocationInfo locationFrom = null;
         BaseLocationInfo locationTo = null;
-
         //查询所属流程
         FlowConfigHeaderVO flowConfigHeaderVO = flowConfigHeaderService.selectFlowConfigHeaderById(agvCallDTO.getId());
         AsnSoStrategy asnSoStrategy = asnSoStrategyMapper.selectAsnSoStrategy();
@@ -81,15 +80,24 @@ public class BusinessServiceImpl implements IBusinessService {
             log.info("-----------指令查询不到对应的流程:" + JSON.toJSONString(agvCallDTOList));
             return AjaxResult.error("指令查询不到对应的流程");
         }
-        List<BaseLocationInfo> locationFromList = this.convertLocation(agvCallDTO.getLocationFrom(), agvCallDTO.getWarehouseId());
-        List<BaseLocationInfo> locationToList = this.convertLocation(agvCallDTO.getLocationTo(), agvCallDTO.getWarehouseId());
+        String paramLocationFrom = agvCallDTO.getLocationFrom();
+        String paramLocationTo = agvCallDTO.getLocationTo();
+        if (StringUtils.isEmpty(paramLocationFrom)) {
+            paramLocationFrom = flowConfigHeaderVO.getLocationFrom();
+        }
+        if(StringUtils.isEmpty(paramLocationTo)) {
+            paramLocationTo = flowConfigHeaderVO.getLocationTo();
+        }
+
+        List<BaseLocationInfo> locationFromList = this.convertLocation(paramLocationFrom, agvCallDTO.getWarehouseId());
+        List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId());
 
         if (flowConfigHeaderVO.getFlowType().equals("ASN")) {
             locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "ASN", asnSoStrategy, agvCallDTO);
             locationTo = this.zoneLocationAllocation(locationToList, "locationTo", "ASN", asnSoStrategy, agvCallDTO);
             //2.初始化库存
             for (AgvCallDTO agvCall : agvCallDTOList) {
-                invLotLocIdService.initInv(agvCallDTO.getLocationFrom(), agvCall.getSku(), Constant.CUSTOMER_ID, agvCall.getQty(), agvCall.getLotattDTO());
+                invLotLocIdService.initInv(locationFrom.getId().toString(), agvCall.getSku(), Constant.CUSTOMER_ID, agvCall.getQty(), agvCall.getLotattDTO());
             }
         } else if (flowConfigHeaderVO.getFlowType().equals("SO")) {
             locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "SO", asnSoStrategy, agvCallDTO);