Commit 89a662b6e414a5b45ed76d7c7f89a4e8747683f9

Authored by pengcheng
2 parents 81e4d4c8 e9015353

Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop

src/main/java/com/huaheng/pc/inventory/adjustHeader/service/AdjustHeaderServiceImpl.java
@@ -32,11 +32,11 @@ public class AdjustHeaderServiceImpl extends ServiceImpl<AdjustHeaderMapper, Adj @@ -32,11 +32,11 @@ public class AdjustHeaderServiceImpl extends ServiceImpl<AdjustHeaderMapper, Adj
32 if (maxCode != null && maxCode.substring(maxCode.length() - 13, maxCode.length() - 5).equals(df.format(now))) 32 if (maxCode != null && maxCode.substring(maxCode.length() - 13, maxCode.length() - 5).equals(df.format(now)))
33 { 33 {
34 Integer Count = Integer.valueOf(maxCode.substring(maxCode.length() - 5, maxCode.length())); 34 Integer Count = Integer.valueOf(maxCode.substring(maxCode.length() - 5, maxCode.length()));
35 - code = "CY" + df.format(now) + String.format("%05d", Count + 1); 35 + code = "AD" + df.format(now) + String.format("%05d", Count + 1);
36 } 36 }
37 else 37 else
38 { 38 {
39 - code = "CY" + df.format(now) + "00001"; 39 + code = "AD" + df.format(now) + "00001";
40 } 40 }
41 return code; 41 return code;
42 } 42 }
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
@@ -349,7 +349,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap @@ -349,7 +349,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap
349 if(cyclecountDetail.getEnableStatus() == 100){ 349 if(cyclecountDetail.getEnableStatus() == 100){
350 return AjaxResult.error("盘点任务完成后不能再登记数量!"); 350 return AjaxResult.error("盘点任务完成后不能再登记数量!");
351 } 351 }
352 - if(cycleCountHeader==null){ 352 + if(cycleCountHeader == null){
353 return AjaxResult.error("主单据不存在"); 353 return AjaxResult.error("主单据不存在");
354 } 354 }
355 /*if(cyclecountDetail.getEnableStatus() == 10){ 355 /*if(cyclecountDetail.getEnableStatus() == 10){
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderServiceImpl.java
@@ -178,7 +178,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap @@ -178,7 +178,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap
178 AdjustHeader adjustHeader = new AdjustHeader(); 178 AdjustHeader adjustHeader = new AdjustHeader();
179 adjustHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());//仓库 179 adjustHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());//仓库
180 adjustHeader.setCode(adjustHeaderService.createCode());//生成差异单号 180 adjustHeader.setCode(adjustHeaderService.createCode());//生成差异单号
181 - adjustHeader.setProblemType("盘点调整"); 181 + adjustHeader.setProblemType("cyclecountAdjust");
182 adjustHeader.setCycleCountCode(cyclecountHeader.getCode()); 182 adjustHeader.setCycleCountCode(cyclecountHeader.getCode());
183 adjustHeader.setCompanyCode(cyclecountHeader.getCompanyCode()); 183 adjustHeader.setCompanyCode(cyclecountHeader.getCompanyCode());
184 adjustHeader.setCreated(new Date()); 184 adjustHeader.setCreated(new Date());
@@ -199,6 +199,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap @@ -199,6 +199,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap
199 AdjustDetail adjustDetail = new AdjustDetail(); 199 AdjustDetail adjustDetail = new AdjustDetail();
200 for(CycleCountDetail item:cycleCountDetailList){ 200 for(CycleCountDetail item:cycleCountDetailList){
201 //BigDecimal的比较 .compareTo(BigDecimal.ZERO) != 0 201 //BigDecimal的比较 .compareTo(BigDecimal.ZERO) != 0
  202 +
202 if(item.getGapQty().compareTo(BigDecimal.ZERO) != 0){ 203 if(item.getGapQty().compareTo(BigDecimal.ZERO) != 0){
203 //比较差异数量不为0的就生成差异单 204 //比较差异数量不为0的就生成差异单
204 adjustDetail.setAdjustCode(adjustHeader.getCode()); 205 adjustDetail.setAdjustCode(adjustHeader.getCode());
@@ -212,7 +213,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap @@ -212,7 +213,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap
212 adjustDetail.setMaterialSpec(item.getMaterialSpec()); 213 adjustDetail.setMaterialSpec(item.getMaterialSpec());
213 adjustDetail.setMaterialUnit(item.getMaterialUnit()); 214 adjustDetail.setMaterialUnit(item.getMaterialUnit());
214 adjustDetail.setCycleDetailId(item.getId()); 215 adjustDetail.setCycleDetailId(item.getId());
215 - adjustDetail.setProblemType("盘点调整"); 216 + adjustDetail.setProblemType("cyclecountAdjust");
216 adjustDetail.setToInventorySts(item.getInventorySts());//盘点不涉及属性 217 adjustDetail.setToInventorySts(item.getInventorySts());//盘点不涉及属性
217 adjustDetail.setFromInventorySts(item.getInventorySts()); 218 adjustDetail.setFromInventorySts(item.getInventorySts());
218 adjustDetail.setFromQty(item.getSystemQty());//调整前数量 219 adjustDetail.setFromQty(item.getSystemQty());//调整前数量
src/main/resources/templates/inventory/adjustHeader/addAdjust.html renamed to src/main/resources/templates/inventory/adjustDetail/add.html
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
@@ -55,8 +55,8 @@ @@ -55,8 +55,8 @@
55 物料规格:<input id="materialSpec" type="text" name="materialSpec"/> 55 物料规格:<input id="materialSpec" type="text" name="materialSpec"/>
56 </li> 56 </li>
57 <li> 57 <li>
58 - 调整单类型:<select name="problemType"  
59 - th:with="problemType=${@dict.getType('cyclecountStatus')}"> 58 + 调整类型:<select name="problemType"
  59 + th:with="problemType=${@dict.getType('adjustType')}">
60 <option value="">所有</option> 60 <option value="">所有</option>
61 <option th:each="e : ${problemType}" th:text="${e['dictLabel']}" 61 <option th:each="e : ${problemType}" th:text="${e['dictLabel']}"
62 th:value="${e['dictValue']}"></option> 62 th:value="${e['dictValue']}"></option>
@@ -91,11 +91,13 @@ @@ -91,11 +91,13 @@
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 -  
95 - <a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/>  
96 - <!--shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"-->  
97 - <i class="fa fa-vcard"></i>差异调整 94 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()">
  95 + <i class="fa fa-plus"></i> 新增
98 </a> 96 </a>
  97 + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/>
  98 + &lt;!&ndash;shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"&ndash;&gt;
  99 + <i class="fa fa-vcard"></i>调整
  100 + </a>-->
99 <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()" 101 <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()"
100 shiro:hasPermission="inventoryHeader:cycleCountDetail:cyclecountRepeat"> 102 shiro:hasPermission="inventoryHeader:cycleCountDetail:cyclecountRepeat">
101 <i class="fa fa-vcard"></i> 差异复盘 103 <i class="fa fa-vcard"></i> 差异复盘
@@ -104,9 +106,9 @@ @@ -104,9 +106,9 @@
104 shiro:hasPermission="inventoryHeader:cycleCountDetail:adjust"> 106 shiro:hasPermission="inventoryHeader:cycleCountDetail:adjust">
105 <i class="fa fa-vcard"></i> 差异库存调整 107 <i class="fa fa-vcard"></i> 差异库存调整
106 </a>--> 108 </a>-->
107 - <a class="btn btn-outline btn-success btn-rounded" onclick="update()">  
108 - <i class="fa fa-refresh"></i>&nbsp;&nbsp;刷&nbsp;&nbsp;&nbsp;&nbsp;新  
109 - </a> 109 + <!--<a class="btn btn-outline btn-success btn-rounded" onclick="$.table.refresh()">
  110 + <i class="fa fa-refresh"></i> 刷新
  111 + </a>-->
110 </div> 112 </div>
111 <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> 113 <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
112 </div> 114 </div>
@@ -115,14 +117,14 @@ @@ -115,14 +117,14 @@
115 <script th:inline="javascript"> 117 <script th:inline="javascript">
116 var prefix = ctx + "inventory/adjustDetail"; 118 var prefix = ctx + "inventory/adjustDetail";
117 var prefix_head = ctx + "inventory/adjustHeader"; 119 var prefix_head = ctx + "inventory/adjustHeader";
118 - var datas = [[${@dict.getType('adjustType')}]]; 120 + var type2 = [[${@dict.getType('adjustType')}]];
  121 + var adjustStatus = [[${@dict.getType('adjustStatus')}]];
119 var inventoryStatus = [[${@dict.getType('inventoryStatus')}]]; 122 var inventoryStatus = [[${@dict.getType('inventoryStatus')}]];
120 var created; 123 var created;
121 124
122 $(function () { 125 $(function () {
123 update(); 126 update();
124 }); 127 });
125 -  
126 function update() { 128 function update() {
127 let adjustCode=null; 129 let adjustCode=null;
128 let options = { 130 let options = {
@@ -130,13 +132,22 @@ @@ -130,13 +132,22 @@
130 modalName: "调整单明细", 132 modalName: "调整单明细",
131 sortName: "id", 133 sortName: "id",
132 sortOrder: "desc", 134 sortOrder: "desc",
133 - showRefresh: false,  
134 search: false, 135 search: false,
  136 + showRefresh: true,
135 columns: [ 137 columns: [
136 { 138 {
137 radio: true 139 radio: true
138 }, 140 },
139 { 141 {
  142 + title: '调整操作',
  143 + align: 'center',
  144 + formatter: function (value, row, index) {
  145 + var actions = [];
  146 + actions.push('<a class="btn btn-warning btn-xs " href="#" onclick="$.operate.addAdjust()"><i class="fa fa-trash-o"></i>调整</a> ');
  147 + return actions.join('');
  148 + }
  149 + },
  150 + {
140 field: 'id', 151 field: 'id',
141 title: '明细id', 152 title: '明细id',
142 sortable: true 153 sortable: true
@@ -201,7 +212,7 @@ @@ -201,7 +212,7 @@
201 { 212 {
202 field: 'checkDetailId', 213 field: 'checkDetailId',
203 title: '质检单明细行号', 214 title: '质检单明细行号',
204 - visible: false 215 + visible: true
205 }, 216 },
206 { 217 {
207 field: 'referCode', 218 field: 'referCode',
@@ -211,14 +222,18 @@ @@ -211,14 +222,18 @@
211 { 222 {
212 field: 'referDetailId', 223 field: 'referDetailId',
213 title: '调整单关联明细ID', 224 title: '调整单关联明细ID',
214 - visible: false 225 + visible: true
215 }, 226 },
216 227
217 { 228 {
218 field: 'problemType', 229 field: 'problemType',
219 title: '调整类型', 230 title: '调整类型',
220 - sortable: true,  
221 - visible: true 231 + align: 'center',
  232 + formatter: function (value, row, index) {
  233 + return $.table.selectDictLabel(type2, value);
  234 + },
  235 + visible: true,
  236 + //sortable: true
222 }, 237 },
223 { 238 {
224 field: 'fromQty', 239 field: 'fromQty',
@@ -278,9 +293,9 @@ @@ -278,9 +293,9 @@
278 }, 293 },
279 { 294 {
280 field: 'status', 295 field: 'status',
281 - title: '明细状态', 296 + title: '调整状态',
282 formatter: function (value, row, index) { 297 formatter: function (value, row, index) {
283 - return $.table.selectDictLabel(datas, value); 298 + return $.table.selectDictLabel(adjustStatus, value);
284 }, 299 },
285 sortable: true 300 sortable: true
286 }, 301 },
@@ -299,7 +314,15 @@ @@ -299,7 +314,15 @@
299 title: '处理标记', 314 title: '处理标记',
300 visible: false 315 visible: false
301 }, 316 },
302 - 317 + {
  318 + title: '操作',
  319 + align: 'center',
  320 + formatter: function (value, row, index) {
  321 + var actions = [];
  322 + actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');
  323 + return actions.join('');
  324 + }
  325 + }
303 326
304 ] 327 ]
305 }; 328 };
src/main/resources/templates/inventory/adjustDetail/adjustEdit.html 0 → 100644
  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/add.html 0 → 100644
  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 +
  8 + <form class="form-horizontal m" id="form-cyclecountAdjustDetail-addAdjust" >
  9 + <input type="hidden" id="cyclecountAdjustId" name="cyclecountAdjustId" th:value="${cyclecountAdjustId}">
  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>
  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>
  23 + </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="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="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="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 + <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}">
  52 + <option th:each="dict : ${inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>
  53 + </select>
  54 + </div>
  55 + </div>
  56 + <div class="form-group">
  57 + <label class="col-sm-3 control-label">系统数量:</label>
  58 + <div class="col-sm-8">
  59 + <input id="systemQty" name="systemQty" value="0" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" readonly="readonly">
  60 + </div>
  61 + </div>
  62 + <div class="form-group">
  63 + <label class="col-sm-3 control-label">实际数量:</label>
  64 + <div class="col-sm-8">
  65 + <input id="countedQty" name="countedQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" >
  66 + </div>
  67 + </div>
  68 + <div class="form-group">
  69 + <label class="col-sm-3 control-label">差异数量:</label>
  70 + <div class="col-sm-8">
  71 + <input id="gapQty" name="gapQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" >
  72 + </div>
  73 + </div>
  74 + <div class="form-group">
  75 + <label class="col-sm-3 control-label">调整数量:</label>
  76 + <div class="col-sm-8">
  77 + <input id="adjustQty" name="adjustQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')">
  78 + </div>
  79 + </div>
  80 +
  81 + <div class="form-group">
  82 + <label class="col-sm-3 control-label">批次:</label>
  83 + <div class="col-sm-8">
  84 + <input id="batch" name="batch" class="form-control" type="text" >
  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="lot" name="lot" class="form-control" type="text" >
  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="project" name="project" 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="manufactureDate" name="manufactureDate" 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 + <input id="expirationDate" name="expirationDate" class="form-control" type="text">
  109 + </div>
  110 + </div>
  111 +
  112 +
  113 + <div class="form-group">
  114 + <div class="form-control-static col-sm-offset-9">
  115 + <button type="submit" class="btn btn-primary">提交</button><!--盘有 adjustInsert-->
  116 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  117 + </div>
  118 + </div>
  119 + </form>
  120 + </div>
  121 + <div th:include="include::footer"></div>
  122 + <script type="text/javascript">
  123 + var prefix = ctx + "inventory/cyclecountAdjustDetail"
  124 +
  125 + $("#form-cyclecountAdjustDetail-addAdjust").validate({
  126 + rules:{
  127 + materialCode:{
  128 + required:true,
  129 + },
  130 + containerCode:{
  131 + required:true,
  132 + },
  133 + locationCode:{
  134 + required:true,
  135 + },
  136 + systemQty:{
  137 + required:true,
  138 + },
  139 + countedQty:{
  140 + required:true,
  141 + },
  142 + gapQty:{
  143 + required:true,
  144 + },
  145 + adjustQty:{
  146 + required:true,
  147 + },
  148 +
  149 + //必须填值判定
  150 + },
  151 + submitHandler: function(form) {
  152 + $.operate.save(prefix + "/addAdjust", $('#form-cyclecountAdjustDetail-addAdjust').serialize());
  153 + }
  154 + });
  155 +
  156 + /*时间弹框*/
  157 + $(function () {
  158 + layui.use('laydate', function() {
  159 + var laydate = layui.laydate;
  160 + laydate.render({ elem: '#manufactureDate',max: 0, theme: 'molv' ,type: 'datetime'});
  161 + laydate.render({ elem: '#expirationDate',min: 0, theme: 'molv' ,type: 'datetime'});
  162 + });
  163 + })
  164 +
  165 + </script>
  166 +</body>
  167 +</html>
src/main/resources/templates/inventory/adjustHeader/adjustHeader.html
@@ -67,6 +67,16 @@ @@ -67,6 +67,16 @@
67 </div> 67 </div>
68 </form> 68 </form>
69 </div> 69 </div>
  70 + <div class="btn-group hidden-xs" id="toolbar" role="group">
  71 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
  72 + shiro:hasPermission="inventory:cycleCount:add">
  73 + <i class="fa fa-plus"></i> 新增
  74 + </a>
  75 + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"
  76 + shiro:hasPermission="inventory:cycleCount:remove">
  77 + <i class="fa fa-trash-o"></i> 删除
  78 + </a>-->
  79 + </div>
70 <table id="bootstrap-table" data-mobile-responsive="true" 80 <table id="bootstrap-table" data-mobile-responsive="true"
71 class="table table-bordered table-hover"></table> 81 class="table table-bordered table-hover"></table>
72 </div> 82 </div>
@@ -82,7 +92,7 @@ @@ -82,7 +92,7 @@
82 var upload = [[${@permission.hasPermi('inventoryHeader:adjustHeader:upload')}]]; 92 var upload = [[${@permission.hasPermi('inventoryHeader:adjustHeader:upload')}]];
83 var report = [[${@permission.hasPermi('inventoryHeader:adjustHeader:report')}]]; 93 var report = [[${@permission.hasPermi('inventoryHeader:adjustHeader:report')}]];
84 var datas = [[${@dict.getType('sys_normal_disable')}]]; 94 var datas = [[${@dict.getType('sys_normal_disable')}]];
85 - var status2 = [[${@dict.getType('adjustType')}]]; 95 + var type2 = [[${@dict.getType('adjustType')}]];
86 96
87 $(function () { 97 $(function () {
88 var options = { 98 var options = {
@@ -121,10 +131,10 @@ @@ -121,10 +131,10 @@
121 field: 'cycleCountCode', 131 field: 'cycleCountCode',
122 title: '盘点单编码' 132 title: '盘点单编码'
123 }, 133 },
124 - { 134 + /*{
125 field: 'problemType', 135 field: 'problemType',
126 title: '调整类型' 136 title: '调整类型'
127 - }, 137 + },*/
128 { 138 {
129 field: 'referCode', 139 field: 'referCode',
130 title: '关联上游单编码' 140 title: '关联上游单编码'
@@ -138,9 +148,10 @@ @@ -138,9 +148,10 @@
138 title: '调整类型', 148 title: '调整类型',
139 align: 'center', 149 align: 'center',
140 formatter: function (value, row, index) { 150 formatter: function (value, row, index) {
141 - return $.table.selectDictLabel(status2, value); 151 + return $.table.selectDictLabel(type2, value);
142 }, 152 },
143 - sortable: true 153 + visible: true,
  154 + //sortable: true
144 }, 155 },
145 156
146 { 157 {
@@ -170,7 +181,7 @@ @@ -170,7 +181,7 @@
170 var actions = []; 181 var actions = [];
171 actions.push('<a class="btn btn-success btn-xs ' + report + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> '); 182 actions.push('<a class="btn btn-success btn-xs ' + report + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
172 actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> '); 183 actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> ');
173 - /* actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');*/ 184 + actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');
174 actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs " href="#" onclick="detail(\'' + row.id + '\',\'' + row.code + '\')"><i class="fa fa-list-ul"></i>明细</a>'); 185 actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs " href="#" onclick="detail(\'' + row.id + '\',\'' + row.code + '\')"><i class="fa fa-list-ul"></i>明细</a>');
175 return actions.join(''); 186 return actions.join('');
176 } 187 }