继续优化单据的逻辑

This commit is contained in:
季圣华
2020-10-13 23:31:18 +08:00
parent df4fa41b23
commit 8d3d0314a6
2 changed files with 116 additions and 113 deletions

View File

@@ -1360,6 +1360,10 @@
if(tipInfo){ if(tipInfo){
if(tipInfo.code!=200){ if(tipInfo.code!=200){
$.messager.alert('提示', tipInfo.msg, 'warning'); $.messager.alert('提示', tipInfo.msg, 'warning');
for(var i=0; i<rows.length; i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
self.autoReckon();
}
return; return;
} }
$.messager.alert('提示','保存成功','info'); $.messager.alert('提示','保存成功','info');
@@ -1401,6 +1405,10 @@
if(tipInfo){ if(tipInfo){
if(tipInfo.code!=200){ if(tipInfo.code!=200){
$.messager.alert('提示', tipInfo.msg, 'warning'); $.messager.alert('提示', tipInfo.msg, 'warning');
for(var i=0; i<rows.length; i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
self.autoReckon();
}
return; return;
} }
$.messager.alert('提示','保存成功','info'); $.messager.alert('提示','保存成功','info');

View File

@@ -298,9 +298,7 @@ public class DepotItemService {
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
public void saveDetials(String rows, Long headerId, Long tenantId, HttpServletRequest request) throws Exception{ public void saveDetials(String rows, Long headerId, Long tenantId, HttpServletRequest request) throws Exception{
//查询单据主表信息 //查询单据主表信息
DepotHead depotHead=null; DepotHead depotHead =depotHeadMapper.selectByPrimaryKey(headerId);
try{
depotHead =depotHeadMapper.selectByPrimaryKey(headerId);
//获得当前操作人 //获得当前操作人
User userInfo=userService.getCurrentUser(); User userInfo=userService.getCurrentUser();
//首先回收序列号,如果是调拨,不用处理序列号 //首先回收序列号,如果是调拨,不用处理序列号
@@ -416,9 +414,6 @@ public class DepotItemService {
updateCurrentStock(depotItem,tenantId); updateCurrentStock(depotItem,tenantId);
} }
} }
}catch(Exception e){
JshException.writeFail(logger, e);
}
} }
/** /**
* 查询计量单位信息 * 查询计量单位信息