Commit d87cf6db3039ebd534f8fed76518064e13590dfc

Authored by mahuandong
2 parents fb988330 ec2251c1

Merge remote-tracking branch 'origin/develop' into develop

src/main/java/com/huaheng/pc/config/shipmentPreference/service/ShipmentPreferenceServiceImpl.java
@@ -7,6 +7,8 @@ import com.huaheng.common.exception.service.ServiceException; @@ -7,6 +7,8 @@ import com.huaheng.common.exception.service.ServiceException;
7 import com.huaheng.common.support.Convert; 7 import com.huaheng.common.support.Convert;
8 import com.huaheng.common.utils.StringUtils; 8 import com.huaheng.common.utils.StringUtils;
9 import com.huaheng.common.utils.security.ShiroUtils; 9 import com.huaheng.common.utils.security.ShiroUtils;
  10 +import com.huaheng.pc.config.configValue.domain.ConfigValue;
  11 +import com.huaheng.pc.config.configValue.service.ConfigValueService;
10 import com.huaheng.pc.config.shipmentPreference.domain.ShipmentPreference; 12 import com.huaheng.pc.config.shipmentPreference.domain.ShipmentPreference;
11 import com.huaheng.pc.config.shipmentPreference.mapper.ShipmentPreferenceMapper; 13 import com.huaheng.pc.config.shipmentPreference.mapper.ShipmentPreferenceMapper;
12 import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail; 14 import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail;
@@ -32,6 +34,8 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl<ShipmentPreferenc @@ -32,6 +34,8 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl<ShipmentPreferenc
32 private StatusFlowDetailService statusFlowDetailService; 34 private StatusFlowDetailService statusFlowDetailService;
33 @Autowired 35 @Autowired
34 private ShipmentHeaderService shipmentHeaderService; 36 private ShipmentHeaderService shipmentHeaderService;
  37 + @Autowired
  38 + private ConfigValueService configValueService;
35 39
36 40
37 /** 41 /**
@@ -46,6 +50,15 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl<ShipmentPreferenc @@ -46,6 +50,15 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl<ShipmentPreferenc
46 */ 50 */
47 @Override 51 @Override
48 public List<ShipmentHeader> checkShipmentProcess(String ids, Integer code) { 52 public List<ShipmentHeader> checkShipmentProcess(String ids, Integer code) {
  53 +
  54 + LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper=Wrappers.lambdaQuery();
  55 + configValueLambdaQueryWrapper.eq(ConfigValue::getModuleType,"shipment")
  56 + .eq(ConfigValue::getWarehouseCode,ShiroUtils.getWarehouseCode());
  57 + ConfigValue configValue=configValueService.getOne(configValueLambdaQueryWrapper);
  58 + if(configValue==null){
  59 + throw new ServiceException("仓库的出库配置不存在");
  60 + }
  61 +
49 //查找出库首选项 62 //查找出库首选项
50 ShipmentPreference shipmentPreference = shipmentPreferenceService.list().get(0); 63 ShipmentPreference shipmentPreference = shipmentPreferenceService.list().get(0);
51 if(shipmentPreference == null){ 64 if(shipmentPreference == null){
src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java
@@ -17,7 +17,9 @@ import com.huaheng.framework.web.page.TableSupport; @@ -17,7 +17,9 @@ import com.huaheng.framework.web.page.TableSupport;
17 import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; 17 import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail;
18 import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailService; 18 import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailService;
19 import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader; 19 import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader;
  20 +import com.huaheng.pc.inventory.adjustHeader.mapper.AdjustHeaderMapper;
20 import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService; 21 import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService;
  22 +import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader;
21 import org.apache.shiro.authz.annotation.RequiresPermissions; 23 import org.apache.shiro.authz.annotation.RequiresPermissions;
22 import org.springframework.stereotype.Controller; 24 import org.springframework.stereotype.Controller;
23 import org.springframework.ui.ModelMap; 25 import org.springframework.ui.ModelMap;
@@ -38,6 +40,8 @@ public class adjustDetailController extends BaseController { @@ -38,6 +40,8 @@ public class adjustDetailController extends BaseController {
38 @Resource 40 @Resource
39 private AdjustHeaderService adjustHeaderService; 41 private AdjustHeaderService adjustHeaderService;
40 @Resource 42 @Resource
  43 + private AdjustHeaderMapper adjustHeaderMapper;
  44 + @Resource
41 private AdjustDetailService adjustDetailService; 45 private AdjustDetailService adjustDetailService;
42 46
43 47
@@ -102,6 +106,41 @@ public class adjustDetailController extends BaseController { @@ -102,6 +106,41 @@ public class adjustDetailController extends BaseController {
102 } 106 }
103 107
104 /** 108 /**
  109 + * 新增调整明细
  110 + */
  111 + @GetMapping("/add")
  112 + public String add(String adjustCode, ModelMap m)
  113 + {
  114 + if( adjustCode== null){
  115 + throw new SecurityException("调整单头编码不能为空!");
  116 + }
  117 + m.put("adjustCode",adjustCode);
  118 + return prefix + "/add";
  119 + }
  120 +
  121 + /**
  122 + * 保存新增调整明细
  123 + */
  124 + //@RequiresPermissions("inventory:cyclecountDetail:add")
  125 + @Log(title = "库存-盘点", operating = "新增盘点补货明细", action = BusinessType.INSERT)
  126 + @PostMapping("/addAdjust")
  127 + @ResponseBody
  128 + public AjaxResult addSave(AdjustDetail adjustDetail)
  129 + {
  130 + //查询货主
  131 + AdjustHeader adjustHeader = new AdjustHeader();
  132 + adjustHeader.setCode(adjustDetail.getAdjustCode());
  133 + LambdaQueryWrapper<AdjustHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(adjustHeader);
  134 + AdjustHeader ah = adjustHeaderMapper.selectOne(lambdaQueryWrapper);
  135 + if(ah == null){
  136 + throw new SecurityException("没有对应的主单据!");
  137 + }
  138 + adjustDetail.setWarehouseCode(ah.getWarehouseCode());
  139 + adjustDetail.setCompanyCode(ah.getCompanyCode());
  140 + return adjustDetailService.addDetails(adjustDetail);
  141 + }
  142 +
  143 + /**
105 * 调整, 144 * 调整,
106 * 调整数量,调整库存状态 145 * 调整数量,调整库存状态
107 * 调整插入库存 146 * 调整插入库存
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailService.java
@@ -8,6 +8,8 @@ import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; @@ -8,6 +8,8 @@ import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail;
8 8
9 public interface AdjustDetailService extends IService<AdjustDetail> { 9 public interface AdjustDetailService extends IService<AdjustDetail> {
10 10
  11 + AjaxResult addDetails(AdjustDetail adjustDetail);
  12 +
11 AjaxResult updateAdjustDetail(AdjustDetail adjustDetail); 13 AjaxResult updateAdjustDetail(AdjustDetail adjustDetail);
12 14
13 AjaxResult adjustAgree(AdjustDetail adjustDetail); 15 AjaxResult adjustAgree(AdjustDetail adjustDetail);
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java
@@ -54,8 +54,23 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj @@ -54,8 +54,23 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
54 54
55 55
56 56
  57 + /**
  58 + *新增调整明细
  59 + * @param adjustDetail
  60 + * @return
  61 + */
  62 + @Transactional
  63 + @Override
  64 + public AjaxResult addDetails(AdjustDetail adjustDetail) {
57 65
58 66
  67 +
  68 +
  69 +
  70 +
  71 + return AjaxResult.success("新增调整明细成功!");
  72 + }
  73 +
59 /** 74 /**
60 * 调整审批 75 * 调整审批
61 * @param adjustDetail 76 * @param adjustDetail
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/controller/CycleCountDetailController.java
@@ -126,7 +126,7 @@ public class CycleCountDetailController extends BaseController { @@ -126,7 +126,7 @@ public class CycleCountDetailController extends BaseController {
126 public String add(String cycleCountHeadCode,String companyCode, ModelMap m) 126 public String add(String cycleCountHeadCode,String companyCode, ModelMap m)
127 { 127 {
128 if(cycleCountHeadCode == null){ 128 if(cycleCountHeadCode == null){
129 - throw new SecurityException("盘点头ID不能为空!"); 129 + throw new SecurityException("盘点头编码不能为空!");
130 } 130 }
131 //相同货主才能盘点,取出盘点头的货主 131 //相同货主才能盘点,取出盘点头的货主
132 CycleCountHeader cycleCountHeader = new CycleCountHeader(); 132 CycleCountHeader cycleCountHeader = new CycleCountHeader();
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailService.java
@@ -2,6 +2,7 @@ package com.huaheng.pc.inventory.inventoryDetail.service; @@ -2,6 +2,7 @@ package com.huaheng.pc.inventory.inventoryDetail.service;
2 2
3 import com.baomidou.mybatisplus.extension.service.IService; 3 import com.baomidou.mybatisplus.extension.service.IService;
4 import com.huaheng.framework.web.domain.AjaxResult; 4 import com.huaheng.framework.web.domain.AjaxResult;
  5 +import com.huaheng.pc.config.shipmentPreference.domain.ShipmentPreference;
5 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; 6 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
6 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; 7 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
7 8
@@ -14,7 +15,7 @@ public interface InventoryDetailService extends IService&lt;InventoryDetail&gt; { @@ -14,7 +15,7 @@ public interface InventoryDetailService extends IService&lt;InventoryDetail&gt; {
14 15
15 void detailcreateCheckOutTask (Integer id); 16 void detailcreateCheckOutTask (Integer id);
16 17
17 - List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail,String sqll); 18 + List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail, String sqll, ShipmentPreference shipmentPreference);
18 19
19 20
20 AjaxResult detailCheckTask (Integer[] ids) throws InvocationTargetException, IllegalAccessException; 21 AjaxResult detailCheckTask (Integer[] ids) throws InvocationTargetException, IllegalAccessException;
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailServiceImpl.java
@@ -12,6 +12,7 @@ import com.huaheng.pc.check.checkHeader.domain.CheckHeader; @@ -12,6 +12,7 @@ import com.huaheng.pc.check.checkHeader.domain.CheckHeader;
12 import com.huaheng.pc.check.checkHeader.service.CheckHeaderService; 12 import com.huaheng.pc.check.checkHeader.service.CheckHeaderService;
13 import com.huaheng.pc.config.location.domain.Location; 13 import com.huaheng.pc.config.location.domain.Location;
14 import com.huaheng.pc.config.location.service.LocationService; 14 import com.huaheng.pc.config.location.service.LocationService;
  15 +import com.huaheng.pc.config.shipmentPreference.domain.ShipmentPreference;
15 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; 16 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
16 import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; 17 import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService;
17 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; 18 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
@@ -128,18 +129,19 @@ public class InventoryDetailServiceImpl extends ServiceImpl&lt;InventoryDetailMappe @@ -128,18 +129,19 @@ public class InventoryDetailServiceImpl extends ServiceImpl&lt;InventoryDetailMappe
128 } 129 }
129 130
130 @Override 131 @Override
131 - public List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail,String sqll) {  
132 - if(StringUtils.isEmpty(sqll)) {  
133 - sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" +  
134 - "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" +  
135 - "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" +  
136 - "and inventorySts='" + shipmentDetail.getInventorySts() + "'";  
137 - }else {  
138 - sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" +  
139 - "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" +  
140 - "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" +  
141 - "and inventorySts='" + shipmentDetail.getInventorySts() + "'"+ " \n" +sqll;  
142 - } 132 + public List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail, String sqll, ShipmentPreference shipmentPreference) {
  133 + if(shipmentPreference.getAllowQcCheckResult() == false) {
  134 + sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" +
  135 + "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" +
  136 + "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" +
  137 + "and inventorySts='" + shipmentDetail.getInventorySts() + "'\n"+ sqll;
  138 + }else {
  139 + sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" +
  140 + "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" +
  141 + "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" +
  142 + "and inventorySts='" + shipmentDetail.getInventorySts() + "'\n"+
  143 + "and qcCheck=1\n"+ sqll;
  144 + }
143 return inventoryDetailMapper.selectBysql(sql); 145 return inventoryDetailMapper.selectBysql(sql);
144 } 146 }
145 147
src/main/java/com/huaheng/pc/shipment/shippingCombination/service/ShippingCombinationService.java
@@ -46,6 +46,23 @@ public class ShippingCombinationService { @@ -46,6 +46,23 @@ public class ShippingCombinationService {
46 46
47 //根据分配规则查找库存 47 //根据分配规则查找库存
48 public List<InventoryDetail> getInventorys(ShipmentDetail shipmentDetail) { 48 public List<InventoryDetail> getInventorys(ShipmentDetail shipmentDetail) {
  49 + LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper=Wrappers.lambdaQuery();
  50 + configValueLambdaQueryWrapper.eq(ConfigValue::getModuleType,"shipment")
  51 + .eq(ConfigValue::getWarehouseCode,shipmentDetail.getWarehouseCode());
  52 + ConfigValue configValue=configValueService.getOne(configValueLambdaQueryWrapper);
  53 + if(configValue==null){
  54 + throw new ServiceException("仓库的出库配置不存在");
  55 + }
  56 +
  57 + //查找出库首选项
  58 + LambdaQueryWrapper<ShipmentPreference> slam=Wrappers.lambdaQuery();
  59 + slam.eq(ShipmentPreference::getCode,configValue.getIdentifier())
  60 + .eq(ShipmentPreference::getWarehouseCode,configValue.getWarehouseCode());
  61 + ShipmentPreference shipmentPreference=shipmentPreferenceService.getOne(slam);
  62 + if(shipmentPreference==null){
  63 + throw new ServiceException("仓库的出库配置中出库首选项不存在");
  64 + }
  65 +
49 List<InventoryDetail> list=new ArrayList<>(); 66 List<InventoryDetail> list=new ArrayList<>();
50 FilterConfigDetail filterConfigDetail=new FilterConfigDetail(); 67 FilterConfigDetail filterConfigDetail=new FilterConfigDetail();
51 LambdaQueryWrapper<FilterConfigDetail> filterConfigDetailLambdaQueryWrapper= Wrappers.lambdaQuery(); 68 LambdaQueryWrapper<FilterConfigDetail> filterConfigDetailLambdaQueryWrapper= Wrappers.lambdaQuery();
@@ -61,7 +78,7 @@ public class ShippingCombinationService { @@ -61,7 +78,7 @@ public class ShippingCombinationService {
61 78
62 //根据sql查库存 79 //根据sql查库存
63 try { 80 try {
64 - list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); 81 + list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference);
65 }catch (Exception e){ 82 }catch (Exception e){
66 throw new ServiceException("sql错误"); 83 throw new ServiceException("sql错误");
67 } 84 }
@@ -81,27 +98,12 @@ public class ShippingCombinationService { @@ -81,27 +98,12 @@ public class ShippingCombinationService {
81 } 98 }
82 99
83 //根据sql查库存 100 //根据sql查库存
84 - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); 101 + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference);
85 return list; 102 return list;
86 } 103 }
87 104
88 //都没有时,默认仓库的分配规则 105 //都没有时,默认仓库的分配规则
89 - LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper=Wrappers.lambdaQuery();  
90 - configValueLambdaQueryWrapper.eq(ConfigValue::getModuleType,"shipment")  
91 - .eq(ConfigValue::getWarehouseCode,shipmentDetail.getWarehouseCode());  
92 - ConfigValue configValue=configValueService.getOne(configValueLambdaQueryWrapper);  
93 - if(configValue==null){  
94 - throw new ServiceException("仓库的出库配置不存在");  
95 - }  
96 106
97 - //查找出库首选项  
98 - LambdaQueryWrapper<ShipmentPreference> slam=Wrappers.lambdaQuery();  
99 - slam.eq(ShipmentPreference::getCode,configValue.getIdentifier())  
100 - .eq(ShipmentPreference::getWarehouseCode,configValue.getWarehouseCode());  
101 - ShipmentPreference shipmentPreference=shipmentPreferenceService.getOne(slam);  
102 - if(shipmentPreference==null){  
103 - throw new ServiceException("仓库的出库配置中出库首选项不存在");  
104 - }  
105 //查找分配规则 107 //查找分配规则
106 filterConfigDetailLambdaQueryWrapper.eq(FilterConfigDetail::getCode,shipmentPreference.getAllocationRule()); 108 filterConfigDetailLambdaQueryWrapper.eq(FilterConfigDetail::getCode,shipmentPreference.getAllocationRule());
107 filterConfigDetail=filterConfigDetailService.getOne(filterConfigDetailLambdaQueryWrapper); 109 filterConfigDetail=filterConfigDetailService.getOne(filterConfigDetailLambdaQueryWrapper);
@@ -110,7 +112,7 @@ public class ShippingCombinationService { @@ -110,7 +112,7 @@ public class ShippingCombinationService {
110 } 112 }
111 113
112 //根据sql查库存 114 //根据sql查库存
113 - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); 115 + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference);
114 return list; 116 return list;
115 } 117 }
116 118
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
@@ -425,11 +425,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -425,11 +425,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
425 @Transactional 425 @Transactional
426 public void completeTask(TaskHeader task) { 426 public void completeTask(TaskHeader task) {
427 //区分任务类型 427 //区分任务类型
428 - if (task.getTaskType() == 100) { 428 + if (task.getInternalTaskType() == 100) {
429 //入库任务 429 //入库任务
430 completeReceiptTask(task); 430 completeReceiptTask(task);
431 } 431 }
432 - if (task.getTaskType() == 200) { 432 + if (task.getInternalTaskType() == 200) {
433 // 出库任务 433 // 出库任务
434 completeShipmentTask(task); 434 completeShipmentTask(task);
435 } 435 }
src/main/resources/templates/inventory/adjustDetail/add.html
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 -<html lang="zh" xmlns:th="http://www.thymeleaf.org"> 2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
3 <meta charset="utf-8"> 3 <meta charset="utf-8">
4 <head th:include="include :: header"></head> 4 <head th:include="include :: header"></head>
5 <body class="white-bg"> 5 <body class="white-bg">
6 - <div class="wrapper wrapper-content animated fadeInRight ibox-content"> 6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 7
8 - <form class="form-horizontal m" id="form-cyclecountAdjustDetail-addAdjust" >  
9 - <input type="hidden" id="cyclecountAdjustId" name="cyclecountAdjustId" th:value="${cyclecountAdjustId}"> 8 + <form class="form-horizontal m" id="form-adjustDetail-add">
  9 + <!--<input type="hidden" id="adjustCode" name="adjustCode" th:value="${adjustCode}">-->
10 10
11 - <div class="form-group">  
12 - <label class="col-sm-3 control-label">调整单编号:</label>  
13 - <div class="col-sm-8">  
14 - <input id="code" name="code" th:value="${code}" class="form-control" type="text" readonly="readonly">  
15 - </div> 11 + <div class="form-group">
  12 + <label class="col-sm-3 control-label">调整单编号:</label>
  13 + <div class="col-sm-8">
  14 + <input id="adjustCode" name="adjustCode" th:value="${adjustCode}" class="form-control" type="text"
  15 + readonly="readonly">
16 </div> 16 </div>
17 - <div class="form-group">  
18 - <label class="col-sm-3 control-label">货主编码:</label>  
19 - <div class="col-sm-8">  
20 - <input id="companyId" name="companyId" type="hidden" th:value="*{companyId}">  
21 - <input id="companyCode" name="companyCode" th:value="${companyCode}" class="form-control" type="text" readonly="readonly">  
22 - </div> 17 + </div>
  18 + <!-- <div class="form-group">
  19 + <label class="col-sm-3 control-label">货主编码:</label>
  20 + <div class="col-sm-8">
  21 + <input id="companyCode" name="companyCode" class="form-control" type="text" readonly="readonly">
  22 + </div>
  23 + </div>-->
  24 + <div class="form-group">
  25 + <label class="col-sm-3 control-label">库存明细ID:</label>
  26 + <div class="col-sm-8">
  27 + <input id="inventoryDetailId" name="inventoryDetailId" class="form-control" type="text">
23 </div> 28 </div>
24 - <div class="form-group">  
25 - <label class="col-sm-3 control-label">盘点单编号:</label>  
26 - <div class="col-sm-8">  
27 - <input id="cyclecountHeadCode" name="cyclecountHeadCode" th:value="${cyclecountHeadCode}" class="form-control" type="text" readonly="readonly">  
28 - </div> 29 + </div>
  30 + <div class="form-group">
  31 + <label class="col-sm-3 control-label">盘点单号:</label>
  32 + <div class="col-sm-8">
  33 + <input id="cycleCountCode" name="cycleCountCode" class="form-control" type="text">
29 </div> 34 </div>
30 - <div class="form-group">  
31 - <label class="col-sm-3 control-label">物料编码:</label>  
32 - <div class="col-sm-8">  
33 - <input id="materialCode" name="materialCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">  
34 - </div> 35 + </div>
  36 + <div class="form-group">
  37 + <label class="col-sm-3 control-label">盘点明细单号:</label>
  38 + <div class="col-sm-8">
  39 + <input id="cycleDetailId" name="cycleDetailId" class="form-control" type="text">
35 </div> 40 </div>
36 - <div class="form-group">  
37 - <label class="col-sm-3 control-label">库位编码:</label>  
38 - <div class="col-sm-8">  
39 - <input id="locationCode" name="locationCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">  
40 - </div> 41 + </div>
  42 + <div class="form-group">
  43 + <label class="col-sm-3 control-label">质检单号:</label>
  44 + <div class="col-sm-8">
  45 + <input id="checkCode" name="checkCode" class="form-control" type="text">
41 </div> 46 </div>
42 - <div class="form-group">  
43 - <label class="col-sm-3 control-label">容器编号:</label>  
44 - <div class="col-sm-8">  
45 - <input id="containerCode" name="containerCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">  
46 - </div> 47 + </div>
  48 + <div class="form-group">
  49 + <label class="col-sm-3 control-label">质检单明细行号:</label>
  50 + <div class="col-sm-8">
  51 + <input id="checkDetailId" name="checkDetailId" class="form-control" type="text">
47 </div> 52 </div>
48 - <!-- <div class="form-group">  
49 - <label class="col-sm-3 control-label">重量kg:</label>  
50 - <div class="col-sm-8">  
51 - <input id="weight" name="weight" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">  
52 - </div>  
53 - </div>-->  
54 - <div class="form-group">  
55 - <label class="col-sm-3 control-label">库存状态:</label>  
56 - <div class="col-sm-8">  
57 - <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}">  
58 - <option th:each="dict : ${inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>  
59 - </select>  
60 - </div> 53 + </div>
  54 + <div class="form-group">
  55 + <label class="col-sm-3 control-label">调整单关联单号:</label>
  56 + <div class="col-sm-8">
  57 + <input id="referCode" name="referCode" class="form-control" type="text">
61 </div> 58 </div>
62 - <div class="form-group">  
63 - <label class="col-sm-3 control-label">系统数量:</label>  
64 - <div class="col-sm-8">  
65 - <input id="systemQty" name="systemQty" value="0" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" readonly="readonly">  
66 - </div> 59 + </div>
  60 + <div class="form-group">
  61 + <label class="col-sm-3 control-label">调整单关联明细行号:</label>
  62 + <div class="col-sm-8">
  63 + <input id="referDetailId" name="referDetailId" class="form-control" type="text">
  64 + </div>
  65 + </div>
  66 + <div class="form-group">
  67 + <label class="col-sm-3 control-label">库位编码:</label>
  68 + <div class="col-sm-8">
  69 + <input id="locationCode" name="locationCode" class="form-control" type="text"
  70 + onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
  71 + </div>
  72 + </div>
  73 + <div class="form-group">
  74 + <label class="col-sm-3 control-label">容器编号:</label>
  75 + <div class="col-sm-8">
  76 + <input id="containerCode" name="containerCode" class="form-control" type="text"
  77 + onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
  78 + </div>
  79 + </div>
  80 + <div class="form-group">
  81 + <label class="col-sm-3 control-label">商品编码:</label>
  82 + <div class="col-sm-8">
  83 + <input id="materialCode" name="materialCode" class="form-control" type="text"
  84 + onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
  85 + </div>
  86 + </div>
  87 + <div class="form-group">
  88 + <label class="col-sm-3 control-label">商品名称:</label>
  89 + <div class="col-sm-8">
  90 + <input id="materialName" name="materialName" class="form-control" type="text">
67 </div> 91 </div>
  92 + </div>
  93 + <div class="form-group">
  94 + <label class="col-sm-3 control-label">商品规格:</label>
  95 + <div class="col-sm-8">
  96 + <input id="materialSpec" name="materialSpec" class="form-control" type="text">
  97 + </div>
  98 + </div>
  99 + <div class="form-group">
  100 + <label class="col-sm-3 control-label">商品单位:</label>
  101 + <div class="col-sm-8">
  102 + <input id="materialUnit" name="materialUnit" class="form-control" type="text">
  103 + </div>
  104 + </div>
  105 + <div class="form-group">
  106 + <label class="col-sm-3 control-label">调整类型:</label>
  107 + <div class="col-sm-8">
  108 + <select id="problemType" name="problemType" class="form-control"
  109 + th:with="problemType=${@dict.getType('adjustType')}">
  110 + <option th:each="dict : ${problemType}" th:text="${dict['dictLabel']}"
  111 + th:value="${dict['dictValue']}"></option>
  112 + </select>
  113 + <!--<input id="problemType" name="problemType" class="form-control" type="text" >-->
  114 + </div>
  115 + </div>
  116 + <div class="form-group">
  117 + <label class="col-sm-3 control-label">属性号:</label>
  118 + <div class="col-sm-8">
  119 + <input id="attributeId" name="attributeId" class="form-control" type="text">
  120 + </div>
  121 + </div>
  122 + <div class="form-group">
  123 + <label class="col-sm-3 control-label">调整前数量:</label>
  124 + <div class="col-sm-8">
  125 + <input id="fromQty" name="fromQty" class="form-control" type="text"
  126 + onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')">
  127 + </div>
  128 + </div>
  129 + <div class="form-group">
  130 + <label class="col-sm-3 control-label">调整后数量:</label>
  131 + <div class="col-sm-8">
  132 + <input id="toQty" name="toQty" class="form-control" type="text"
  133 + onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')">
  134 + </div>
  135 + </div>
  136 + <div class="form-group">
  137 + <label class="col-sm-3 control-label">调整变动数量:</label>
  138 + <div class="col-sm-8">
  139 + <input id="gapQty" name="gapQty" class="form-control" type="text"
  140 + onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')">
  141 + </div>
  142 + </div>
  143 + <div class="form-group">
  144 + <label class="col-sm-3 control-label">调整前库存状态:</label>
  145 + <div class="col-sm-8">
  146 + <select id="fromInventorySts" name="fromInventorySts" class="form-control"
  147 + th:with="fromInventorySts=${@dict.getType('inventoryStatus')}">
  148 + <option th:each="dict : ${fromInventorySts}" th:text="${dict['dictLabel']}"
  149 + th:value="${dict['dictValue']}"></option>
  150 + </select>
  151 + </div>
  152 + </div>
68 <div class="form-group"> 153 <div class="form-group">
69 - <label class="col-sm-3 control-label">实际数量:</label> 154 + <label class="col-sm-3 control-label">调整后库存状态:</label>
70 <div class="col-sm-8"> 155 <div class="col-sm-8">
71 - <input id="countedQty" name="countedQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" > 156 + <select id="toInventorySts" name="toInventorySts" class="form-control"
  157 + th:with="toInventorySts=${@dict.getType('inventoryStatus')}">
  158 + <option th:each="dict : ${toInventorySts}" th:text="${dict['dictLabel']}"
  159 + th:value="${dict['dictValue']}"></option>
  160 + </select>
72 </div> 161 </div>
73 </div> 162 </div>
74 - <div class="form-group">  
75 - <label class="col-sm-3 control-label">差异数量:</label> 163 + <!--<div class="form-group">
  164 + <label class="col-sm-3 control-label">调整状态:</label>
76 <div class="col-sm-8"> 165 <div class="col-sm-8">
77 - <input id="gapQty" name="gapQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" > 166 + <select id="status" name="status" class="form-control"
  167 + th:with="status=${@dict.getType('inventoryStatus')}">
  168 + <option th:each="dict : ${status}" th:text="${dict['dictLabel']}"
  169 + th:value="${dict['dictValue']}"></option>
  170 + </select>
78 </div> 171 </div>
79 - </div> 172 + </div>-->
80 <div class="form-group"> 173 <div class="form-group">
81 - <label class="col-sm-3 control-label">调整数量:</label> 174 + <label class="col-sm-3 control-label">量:</label>
82 <div class="col-sm-8"> 175 <div class="col-sm-8">
83 - <input id="adjustQty" name="adjustQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')"> 176 + <input id="weight" name="weight" class="form-control" type="text">
84 </div> 177 </div>
85 </div> 178 </div>
86 -  
87 <div class="form-group"> 179 <div class="form-group">
88 <label class="col-sm-3 control-label">批次:</label> 180 <label class="col-sm-3 control-label">批次:</label>
89 <div class="col-sm-8"> 181 <div class="col-sm-8">
90 - <input id="batch" name="batch" class="form-control" type="text" > 182 + <input id="batch" name="batch" class="form-control" type="text">
91 </div> 183 </div>
92 </div> 184 </div>
93 <div class="form-group"> 185 <div class="form-group">
94 <label class="col-sm-3 control-label">批号:</label> 186 <label class="col-sm-3 control-label">批号:</label>
95 <div class="col-sm-8"> 187 <div class="col-sm-8">
96 - <input id="lot" name="lot" class="form-control" type="text" > 188 + <input id="lot" name="lot" class="form-control" type="text">
97 </div> 189 </div>
98 </div> 190 </div>
99 <div class="form-group"> 191 <div class="form-group">
100 <label class="col-sm-3 control-label">项目号:</label> 192 <label class="col-sm-3 control-label">项目号:</label>
101 <div class="col-sm-8"> 193 <div class="col-sm-8">
102 - <input id="project" name="project" class="form-control" type="text" > 194 + <input id="projectNO" name="projectNo" class="form-control" type="text">
  195 + </div>
  196 + </div>
  197 + <div class="form-group">
  198 + <label class="col-sm-3 control-label">供应商编码:</label>
  199 + <div class="col-sm-8">
  200 + <input id="supplierCode" name="supplierCode" class="form-control" type="text">
103 </div> 201 </div>
104 </div> 202 </div>
105 <div class="form-group"> 203 <div class="form-group">
106 <label class="col-sm-3 control-label">生产日期:</label> 204 <label class="col-sm-3 control-label">生产日期:</label>
107 <div class="col-sm-8"> 205 <div class="col-sm-8">
108 - <input id="manufactureDate" name="manufactureDate" class="form-control" type="text" > 206 + <input id="manufactureDate" name="manufactureDate" class="form-control" type="text">
109 </div> 207 </div>
110 </div> 208 </div>
111 <div class="form-group"> 209 <div class="form-group">
@@ -114,60 +212,58 @@ @@ -114,60 +212,58 @@
114 <input id="expirationDate" name="expirationDate" class="form-control" type="text"> 212 <input id="expirationDate" name="expirationDate" class="form-control" type="text">
115 </div> 213 </div>
116 </div> 214 </div>
  215 + <div class="form-group">
  216 + <div class="form-control-static col-sm-offset-9">
  217 + <button type="submit" class="btn btn-primary">提交</button><!--盘有 adjustInsert-->
  218 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  219 + </div>
  220 + </div>
  221 + </form>
  222 +</div>
  223 +<div th:include="include::footer"></div>
  224 +<script type="text/javascript">
  225 + var prefix = ctx + "inventory/adjustDetail"
117 226
  227 + $("#form-adjustDetail-add").validate({
  228 + rules: {
  229 + adjustCode: {
  230 + required: true,
  231 + },
  232 + problemType: {
  233 + required: true,
  234 + },
  235 + inventoryDetailId: {
  236 + required: true,
  237 + },
  238 + status: {
  239 + required: true,
  240 + },
  241 + materialCode: {
  242 + required: true,
  243 + },
  244 + containerCode: {
  245 + required: true,
  246 + },
  247 + locationCode: {
  248 + required: true,
  249 + },
118 250
119 - <div class="form-group">  
120 - <div class="form-control-static col-sm-offset-9">  
121 - <button type="submit" class="btn btn-primary">提交</button><!--盘有 adjustInsert-->  
122 - <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>  
123 - </div>  
124 - </div>  
125 - </form>  
126 - </div>  
127 - <div th:include="include::footer"></div>  
128 - <script type="text/javascript">  
129 - var prefix = ctx + "inventory/cyclecountAdjustDetail"  
130 -  
131 - $("#form-cyclecountAdjustDetail-addAdjust").validate({  
132 - rules:{  
133 - materialCode:{  
134 - required:true,  
135 - },  
136 - containerCode:{  
137 - required:true,  
138 - },  
139 - locationCode:{  
140 - required:true,  
141 - },  
142 - systemQty:{  
143 - required:true,  
144 - },  
145 - countedQty:{  
146 - required:true,  
147 - },  
148 - gapQty:{  
149 - required:true,  
150 - },  
151 - adjustQty:{  
152 - required:true,  
153 - }, 251 + //必须填值判定
  252 + },
  253 + submitHandler: function (form) {
  254 + $.operate.save(prefix + "/addAdjust", $('#form-adjustDetail-add').serialize());
  255 + }
  256 + });
154 257
155 - //必须填值判定  
156 - },  
157 - submitHandler: function(form) {  
158 - $.operate.save(prefix + "/addAdjust", $('#form-cyclecountAdjustDetail-addAdjust').serialize());  
159 - } 258 + /*时间弹框*/
  259 + $(function () {
  260 + layui.use('laydate', function () {
  261 + var laydate = layui.laydate;
  262 + laydate.render({elem: '#manufactureDate', max: 0, theme: 'molv', type: 'datetime'});
  263 + laydate.render({elem: '#expirationDate', min: 0, theme: 'molv', type: 'datetime'});
160 }); 264 });
  265 + })
161 266
162 - /*时间弹框*/  
163 - $(function () {  
164 - layui.use('laydate', function() {  
165 - var laydate = layui.laydate;  
166 - laydate.render({ elem: '#manufactureDate',max: 0, theme: 'molv' ,type: 'datetime'});  
167 - laydate.render({ elem: '#expirationDate',min: 0, theme: 'molv' ,type: 'datetime'});  
168 - });  
169 - })  
170 -  
171 - </script> 267 +</script>
172 </body> 268 </body>
173 </html> 269 </html>
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
@@ -91,7 +91,7 @@ @@ -91,7 +91,7 @@
91 </div> 91 </div>
92 </div> 92 </div>
93 <div class="btn-group hidden-xs" id="toolbar" role="group"> 93 <div class="btn-group hidden-xs" id="toolbar" role="group">
94 - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"> 94 + <a class="btn btn-outline btn-success btn-rounded" onclick="add()">
95 <i class="fa fa-plus"></i> 新增 95 <i class="fa fa-plus"></i> 新增
96 </a> 96 </a>
97 <a class="btn btn-outline btn-primary btn-rounded" onclick="agree()"> 97 <a class="btn btn-outline btn-primary btn-rounded" onclick="agree()">
@@ -251,11 +251,17 @@ @@ -251,11 +251,17 @@
251 { 251 {
252 field: 'fromInventorySts', 252 field: 'fromInventorySts',
253 title: '调整前状态', 253 title: '调整前状态',
  254 + formatter: function (value, row, index) {
  255 + return $.table.selectDictLabel(inventoryStatus, value);
  256 + },
254 visible: true 257 visible: true
255 }, 258 },
256 { 259 {
257 field: 'toInventorySts', 260 field: 'toInventorySts',
258 title: '调整后状态', 261 title: '调整后状态',
  262 + formatter: function (value, row, index) {
  263 + return $.table.selectDictLabel(inventoryStatus, value);
  264 + },
259 visible: true 265 visible: true
260 }, 266 },
261 { 267 {
@@ -266,22 +272,9 @@ @@ -266,22 +272,9 @@
266 272
267 }, 273 },
268 { 274 {
269 - field: 'inventorySts',  
270 - title: '库存状态',  
271 - formatter: function (value, row, index) {  
272 - return $.table.selectDictLabel(inventoryStatus, value);  
273 - },  
274 - sortable: true  
275 - },  
276 -  
277 - {  
278 - field: 'created',  
279 - title: '创建时间',  
280 - sortable: true  
281 - },  
282 - {  
283 - field: 'createdBy',  
284 - title: '创建用户' 275 + field: 'supplierCode',
  276 + title: '供应商编码',
  277 + visible: true
285 }, 278 },
286 { 279 {
287 field: 'agreeTime', 280 field: 'agreeTime',
@@ -301,6 +294,46 @@ @@ -301,6 +294,46 @@
301 sortable: true 294 sortable: true
302 }, 295 },
303 { 296 {
  297 + field: 'batch',
  298 + title: '批次',
  299 + visible: true
  300 + },
  301 + {
  302 + field: 'lot',
  303 + title: '批号',
  304 + visible: true
  305 + },
  306 + {
  307 + field: 'projectNo',
  308 + title: '项目号',
  309 + visible: true
  310 + },
  311 + {
  312 + field: 'weight',
  313 + title: '重量',
  314 + visible: true
  315 + },
  316 + {
  317 + field: 'manufactureDate',
  318 + title: '生产日期',
  319 + visible: true
  320 + },
  321 + {
  322 + field: 'expirationDate',
  323 + title: '失效日期',
  324 + visible: true
  325 + },
  326 + {
  327 + field: 'created',
  328 + title: '创建时间',
  329 + sortable: true
  330 + },
  331 + {
  332 + field: 'createdBy',
  333 + title: '创建用户'
  334 + },
  335 +
  336 + {
304 field: 'Remark', 337 field: 'Remark',
305 title: '备注', 338 title: '备注',
306 visible: true 339 visible: true
@@ -353,6 +386,15 @@ @@ -353,6 +386,15 @@
353 386
354 }); 387 });
355 388
  389 +
  390 + /*新增调整明细*/
  391 + function add() {
  392 + var adjustCode = $('#adjustCode').val();
  393 + if(adjustCode !=null && adjustCode!="" && adjustCode!=undefined){
  394 + open("新增调整明细", prefix+"/add?adjustCode=" + adjustCode);
  395 + }
  396 + }
  397 +
356 /*审批*/ 398 /*审批*/
357 function agree() { 399 function agree() {
358 var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id); 400 var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id);
src/main/resources/templates/inventory/adjustDetail/adjustEdit.html deleted
1 -<!DOCTYPE HTML>  
2 -<html lang="zh" xmlns:th="http://www.thymeleaf.org">  
3 -<meta charset="utf-8">  
4 -<head th:include="include :: header"></head>  
5 -<body class="white-bg">  
6 -<div class="wrapper wrapper-content animated fadeInRight ibox-content">  
7 - <form class="form-horizontal m" id="form-cyclecountAdjustDetail-AdjustEdit" th:object="${cyclecountAdjustDetailEdit}" >  
8 - <input type="hidden" id="cyclecountAdjustId" name="cyclecountAdjustId" th:value="*{cyclecountAdjustId}">  
9 -  
10 - <div class="form-group">  
11 - <label class="col-sm-3 control-label">明细id:</label>  
12 - <div class="col-sm-8">  
13 - <input id="id" name="id" th:value="*{id}" class="form-control" type="text"readonly="readonly">  
14 - </div>  
15 - </div>  
16 - <div class="form-group">  
17 - <label class="col-sm-3 control-label">调整单编号:</label>  
18 - <div class="col-sm-8">  
19 - <input id="cyclecountAdjustCode" name="cyclecountAdjustCode" th:value="*{cyclecountAdjustCode}" class="form-control" type="text" readonly="readonly">  
20 - </div>  
21 - </div>  
22 - <div class="form-group">  
23 - <label class="col-sm-3 control-label">货主编码:</label>  
24 - <div class="col-sm-8">  
25 - <input id="companyCode" name="companyCode" th:value="*{companyCode}" class="form-control" type="text" readonly="readonly">  
26 - </div>  
27 - </div>  
28 - <div class="form-group">  
29 - <label class="col-sm-3 control-label">盘点单编号:</label>  
30 - <div class="col-sm-8">  
31 - <input id="cyclecountHeadCode" name="cyclecountHeadCode" th:value="*{cyclecountHeadCode}" class="form-control" type="text" readonly="readonly">  
32 - </div>  
33 - </div>  
34 - <div class="form-group">  
35 - <label class="col-sm-3 control-label">物料编码:</label>  
36 - <div class="col-sm-8">  
37 - <input id="materialCode" name="materialCode" th:value="*{materialCode}" class="form-control" type="text"readonly="readonly">  
38 - </div>  
39 - </div>  
40 -  
41 - <div class="form-group">  
42 - <label class="col-sm-3 control-label">库位编码:</label>  
43 - <div class="col-sm-8">  
44 - <input id="locationCode" name="locationCode" th:value="*{locationCode}" class="form-control" type="text" readonly="readonly">  
45 - </div>  
46 - </div>  
47 - <div class="form-group">  
48 - <label class="col-sm-3 control-label">容器编号:</label>  
49 - <div class="col-sm-8">  
50 - <input id="containerCode" name="containerCode" th:value="*{containerCode}" class="form-control" type="text" readonly="readonly">  
51 - </div>  
52 - </div>  
53 - <div class="form-group">  
54 - <label class="col-sm-3 control-label">入库单编码:</label>  
55 - <div class="col-sm-8">  
56 - <input id="receiptCode" name="receiptCode" th:value="*{receiptCode}" class="form-control" type="text"readonly="readonly">  
57 - </div>  
58 - </div>  
59 - <!--<div class="form-group">  
60 - <label class="col-sm-3 control-label">重量kg:</label>  
61 - <div class="col-sm-8">  
62 - <input id="weight" name="weight" th:value="*{weight}" class="form-control" type="text" readonly="readonly">  
63 - </div>  
64 - </div>-->  
65 - <div class="form-group">  
66 - <label class="col-sm-3 control-label">库存id:</label>  
67 - <div class="col-sm-8">  
68 - <input id="inventoryId" name="inventoryId" th:value="*{inventoryId}" class="form-control" type="text"readonly="readonly">  
69 - </div>  
70 - </div>  
71 - <div class="form-group">  
72 - <label class="col-sm-3 control-label">库存状态:</label>  
73 - <div class="col-sm-8">  
74 - <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}" disabled="disabled">  
75 - <option th:each="dict : ${inventoryStatus}" th:field="*{inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>  
76 - </select>  
77 - </div>  
78 - </div>  
79 - <div class="form-group">  
80 - <label class="col-sm-3 control-label">系统数量:</label>  
81 - <div class="col-sm-8">  
82 - <input id="systemQty" name="systemQty" th:value="*{systemQty}" class="form-control" type="text"readonly="readonly">  
83 - </div>  
84 - </div>  
85 - <div class="form-group">  
86 - <label class="col-sm-3 control-label">实际数量:</label>  
87 - <div class="col-sm-8">  
88 - <input id="countedQty" name="countedQty" th:value="*{countedQty}" class="form-control" type="text" readonly="readonly">  
89 - </div>  
90 - </div>  
91 - <div class="form-group">  
92 - <label class="col-sm-3 control-label">差异数量:</label>  
93 - <div class="col-sm-8">  
94 - <input id="gapQty" name="gapQty" th:value="*{gapQty}" class="form-control" type="text" readonly="readonly">  
95 - </div>  
96 - </div>  
97 - <div class="form-group">  
98 - <label class="col-sm-3 control-label">调整数量:</label>  
99 - <div class="col-sm-8">  
100 - <input id="adjustQty" name="adjustQty" class="form-control" type="text" placeholder="填写物料的差异数值" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')">  
101 - </div>  
102 - </div>  
103 -  
104 - <div class="form-group">  
105 - <label class="col-sm-3 control-label">批次:</label>  
106 - <div class="col-sm-8">  
107 - <input id="batch" name="batch" th:value="*{batch}" class="form-control" type="text" readonly="readonly">  
108 - </div>  
109 - </div>  
110 - <div class="form-group">  
111 - <label class="col-sm-3 control-label">批号:</label>  
112 - <div class="col-sm-8">  
113 - <input id="lot" name="lot" th:value="*{lot}" class="form-control" type="text"readonly="readonly">  
114 - </div>  
115 - </div>  
116 - <div class="form-group">  
117 - <label class="col-sm-3 control-label">项目号:</label>  
118 - <div class="col-sm-8">  
119 - <input id="project" name="project" th:value="*{project}" class="form-control"readonly="readonly">  
120 - </div>  
121 - </div>  
122 - <!--<div class="form-group">  
123 - <label class="col-sm-3 control-label">生产日期:</label>  
124 - <div class="col-sm-8">  
125 - <input id="manufactureDate" name="manufactureDate" th:value="*{manufactureDate}" class="form-control" type="text" readonly="readonly">  
126 - </div>  
127 - </div>-->  
128 - <div class="form-group">  
129 - <label class="col-sm-3 control-label">失效日期:</label>  
130 - <div class="col-sm-8">  
131 - <input id="expirationDate" name="expirationDate" th:value="*{expirationDate}" class="form-control" type="text"readonly="readonly">  
132 - </div>  
133 - </div>  
134 -  
135 - <div class="form-group">  
136 - <div class="form-control-static col-sm-offset-9">  
137 - <button type="submit" class="btn btn-success">确认</button><!--只调整数量 adjustUpdate-->  
138 - <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>  
139 - </div>  
140 - </div>  
141 - </form>  
142 -</div>  
143 -<div th:include="include::footer"></div>  
144 -<script type="text/javascript">  
145 - var prefix = ctx + "inventory/cyclecountAdjustDetail"  
146 - $("#form-cyclecountAdjustDetail-AdjustEdit").validate({  
147 - rules:{  
148 - adjustQty:{  
149 - required:true,  
150 - },  
151 - //必填判定  
152 - },  
153 - submitHandler: function(form) {  
154 - $.operate.save(prefix + "/editAdjustSave", $('#form-cyclecountAdjustDetail-AdjustEdit').serialize());  
155 - }  
156 - });  
157 - /*时间弹框*/  
158 - $(function () {  
159 - layui.use('laydate', function() {  
160 - var laydate = layui.laydate;  
161 - laydate.render({ elem: '#manufactureDate',max: 0, theme: 'molv' ,type: 'datetime'});  
162 - laydate.render({ elem: '#expirationDate',min: 0, theme: 'molv' ,type: 'datetime'});  
163 - });  
164 - })  
165 -  
166 -</script>  
167 -</body>  
168 -</html>  
src/main/resources/templates/inventory/adjustHeader/adjustEdit.html deleted
1 -<!DOCTYPE HTML>  
2 -<html lang="zh" xmlns:th="http://www.thymeleaf.org">  
3 -<meta charset="utf-8">  
4 -<head th:include="include :: header"></head>  
5 -<body class="white-bg">  
6 -<div class="wrapper wrapper-content animated fadeInRight ibox-content">  
7 - <form class="form-horizontal m" id="form-cyclecountAdjustDetail-AdjustEdit" th:object="${cyclecountAdjustDetailEdit}" >  
8 - <input type="hidden" id="cyclecountAdjustId" name="cyclecountAdjustId" th:value="*{cyclecountAdjustId}">  
9 -  
10 - <div class="form-group">  
11 - <label class="col-sm-3 control-label">明细id:</label>  
12 - <div class="col-sm-8">  
13 - <input id="id" name="id" th:value="*{id}" class="form-control" type="text"readonly="readonly">  
14 - </div>  
15 - </div>  
16 - <div class="form-group">  
17 - <label class="col-sm-3 control-label">调整单编号:</label>  
18 - <div class="col-sm-8">  
19 - <input id="cyclecountAdjustCode" name="cyclecountAdjustCode" th:value="*{cyclecountAdjustCode}" class="form-control" type="text" readonly="readonly">  
20 - </div>  
21 - </div>  
22 - <div class="form-group">  
23 - <label class="col-sm-3 control-label">货主编码:</label>  
24 - <div class="col-sm-8">  
25 - <input id="companyCode" name="companyCode" th:value="*{companyCode}" class="form-control" type="text" readonly="readonly">  
26 - </div>  
27 - </div>  
28 - <div class="form-group">  
29 - <label class="col-sm-3 control-label">盘点单编号:</label>  
30 - <div class="col-sm-8">  
31 - <input id="cyclecountHeadCode" name="cyclecountHeadCode" th:value="*{cyclecountHeadCode}" class="form-control" type="text" readonly="readonly">  
32 - </div>  
33 - </div>  
34 - <div class="form-group">  
35 - <label class="col-sm-3 control-label">物料编码:</label>  
36 - <div class="col-sm-8">  
37 - <input id="materialCode" name="materialCode" th:value="*{materialCode}" class="form-control" type="text"readonly="readonly">  
38 - </div>  
39 - </div>  
40 -  
41 - <div class="form-group">  
42 - <label class="col-sm-3 control-label">库位编码:</label>  
43 - <div class="col-sm-8">  
44 - <input id="locationCode" name="locationCode" th:value="*{locationCode}" class="form-control" type="text" readonly="readonly">  
45 - </div>  
46 - </div>  
47 - <div class="form-group">  
48 - <label class="col-sm-3 control-label">容器编号:</label>  
49 - <div class="col-sm-8">  
50 - <input id="containerCode" name="containerCode" th:value="*{containerCode}" class="form-control" type="text" readonly="readonly">  
51 - </div>  
52 - </div>  
53 - <div class="form-group">  
54 - <label class="col-sm-3 control-label">入库单编码:</label>  
55 - <div class="col-sm-8">  
56 - <input id="receiptCode" name="receiptCode" th:value="*{receiptCode}" class="form-control" type="text"readonly="readonly">  
57 - </div>  
58 - </div>  
59 - <!--<div class="form-group">  
60 - <label class="col-sm-3 control-label">重量kg:</label>  
61 - <div class="col-sm-8">  
62 - <input id="weight" name="weight" th:value="*{weight}" class="form-control" type="text" readonly="readonly">  
63 - </div>  
64 - </div>-->  
65 - <div class="form-group">  
66 - <label class="col-sm-3 control-label">库存id:</label>  
67 - <div class="col-sm-8">  
68 - <input id="inventoryId" name="inventoryId" th:value="*{inventoryId}" class="form-control" type="text"readonly="readonly">  
69 - </div>  
70 - </div>  
71 - <div class="form-group">  
72 - <label class="col-sm-3 control-label">库存状态:</label>  
73 - <div class="col-sm-8">  
74 - <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}" disabled="disabled">  
75 - <option th:each="dict : ${inventoryStatus}" th:field="*{inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>  
76 - </select>  
77 - </div>  
78 - </div>  
79 - <div class="form-group">  
80 - <label class="col-sm-3 control-label">系统数量:</label>  
81 - <div class="col-sm-8">  
82 - <input id="systemQty" name="systemQty" th:value="*{systemQty}" class="form-control" type="text"readonly="readonly">  
83 - </div>  
84 - </div>  
85 - <div class="form-group">  
86 - <label class="col-sm-3 control-label">实际数量:</label>  
87 - <div class="col-sm-8">  
88 - <input id="countedQty" name="countedQty" th:value="*{countedQty}" class="form-control" type="text" readonly="readonly">  
89 - </div>  
90 - </div>  
91 - <div class="form-group">  
92 - <label class="col-sm-3 control-label">差异数量:</label>  
93 - <div class="col-sm-8">  
94 - <input id="gapQty" name="gapQty" th:value="*{gapQty}" class="form-control" type="text" readonly="readonly">  
95 - </div>  
96 - </div>  
97 - <div class="form-group">  
98 - <label class="col-sm-3 control-label">调整数量:</label>  
99 - <div class="col-sm-8">  
100 - <input id="adjustQty" name="adjustQty" class="form-control" type="text" placeholder="填写物料的差异数值" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')">  
101 - </div>  
102 - </div>  
103 -  
104 - <div class="form-group">  
105 - <label class="col-sm-3 control-label">批次:</label>  
106 - <div class="col-sm-8">  
107 - <input id="batch" name="batch" th:value="*{batch}" class="form-control" type="text" readonly="readonly">  
108 - </div>  
109 - </div>  
110 - <div class="form-group">  
111 - <label class="col-sm-3 control-label">批号:</label>  
112 - <div class="col-sm-8">  
113 - <input id="lot" name="lot" th:value="*{lot}" class="form-control" type="text"readonly="readonly">  
114 - </div>  
115 - </div>  
116 - <div class="form-group">  
117 - <label class="col-sm-3 control-label">项目号:</label>  
118 - <div class="col-sm-8">  
119 - <input id="project" name="project" th:value="*{project}" class="form-control"readonly="readonly">  
120 - </div>  
121 - </div>  
122 - <!--<div class="form-group">  
123 - <label class="col-sm-3 control-label">生产日期:</label>  
124 - <div class="col-sm-8">  
125 - <input id="manufactureDate" name="manufactureDate" th:value="*{manufactureDate}" class="form-control" type="text" readonly="readonly">  
126 - </div>  
127 - </div>-->  
128 - <div class="form-group">  
129 - <label class="col-sm-3 control-label">失效日期:</label>  
130 - <div class="col-sm-8">  
131 - <input id="expirationDate" name="expirationDate" th:value="*{expirationDate}" class="form-control" type="text"readonly="readonly">  
132 - </div>  
133 - </div>  
134 -  
135 - <div class="form-group">  
136 - <div class="form-control-static col-sm-offset-9">  
137 - <button type="submit" class="btn btn-success">确认</button><!--只调整数量 adjustUpdate-->  
138 - <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>  
139 - </div>  
140 - </div>  
141 - </form>  
142 -</div>  
143 -<div th:include="include::footer"></div>  
144 -<script type="text/javascript">  
145 - var prefix = ctx + "inventory/cyclecountAdjustDetail"  
146 - $("#form-cyclecountAdjustDetail-AdjustEdit").validate({  
147 - rules:{  
148 - adjustQty:{  
149 - required:true,  
150 - },  
151 - //必填判定  
152 - },  
153 - submitHandler: function(form) {  
154 - $.operate.save(prefix + "/editAdjustSave", $('#form-cyclecountAdjustDetail-AdjustEdit').serialize());  
155 - }  
156 - });  
157 - /*时间弹框*/  
158 - $(function () {  
159 - layui.use('laydate', function() {  
160 - var laydate = layui.laydate;  
161 - laydate.render({ elem: '#manufactureDate',max: 0, theme: 'molv' ,type: 'datetime'});  
162 - laydate.render({ elem: '#expirationDate',min: 0, theme: 'molv' ,type: 'datetime'});  
163 - });  
164 - })  
165 -  
166 -</script>  
167 -</body>  
168 -</html>