Commit fab8674a5534a5c7705203f6d98a4841c943e6e6

Authored by xqs
1 parent 7caefe20

调整单页面

src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java
... ... @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  7 +import com.huaheng.common.exception.service.ServiceException;
7 8 import com.huaheng.common.support.Convert;
8 9 import com.huaheng.common.utils.StringUtils;
9 10 import com.huaheng.common.utils.security.ShiroUtils;
... ... @@ -106,12 +107,12 @@ public class adjustDetailController extends BaseController {
106 107 * 新增调整明细
107 108 */
108 109 @GetMapping("/add")
109   - public String add(String adjustHeaderCode, ModelMap m)
  110 + public String add(String adjustCode, ModelMap m)
110 111 {
111   - if( adjustHeaderCode == null){
112   - throw new SecurityException("调整单头编码不能为空!");
  112 + if( adjustCode == null){
  113 + throw new ServiceException("调整单头编码不能为空!");
113 114 }
114   - m.put("adjustHeaderCode",adjustHeaderCode);
  115 + m.put("adjustCode",adjustCode);
115 116 return prefix + "/add";
116 117 }
117 118  
... ...
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
... ... @@ -10,7 +10,7 @@
10 10 <form id="cycleHeader-form">
11 11 <ul>
12 12 <li>
13   - 调整主单编码:<input type="text" id="adjustHCode" name="adjustCode"/>
  13 + 调整主单编码:<input type="text" id="adjustCode" name="adjustCode"/>
14 14 </li>
15 15 <li>
16 16 调整单明细ID:<input id="id" type="text" name="id"/>
... ... @@ -151,7 +151,7 @@
151 151 sortable: true
152 152 },
153 153 {
154   - field: 'adjustHeaderCode',
  154 + field: 'adjustCode',
155 155 title: '调整主单编码',
156 156 visible: true
157 157 },
... ... @@ -171,11 +171,11 @@
171 171 title: '货主'
172 172 },
173 173 {
174   - field: 'cycleCountCode',
  174 + field: 'cycleCountHeaderCode',
175 175 title: '盘点单编码',
176 176 },
177 177 {
178   - field: 'cycleDetailId',
  178 + field: 'cycleCountDetailId',
179 179 title: '盘点单明细ID',
180 180 sortable: true,
181 181 visible: true
... ... @@ -367,12 +367,12 @@
367 367 if (url.indexOf("?") != -1) { //判断是否有参数
368 368 let str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串
369 369 let strs = url.substr(1).split("=");
370   - $("#adjustHeaderCode").val(strs[1]);
  370 + $("#adjustCode").val(strs[1]);
371 371 options.queryParams=function(params) {
372 372  
373 373 return {
374 374 // 传递参数查询参数
375   - adjustHeaderCode: strs[1],
  375 + adjustCode: strs[1],
376 376 pageSize: params.limit,
377 377 pageNum: params.offset / params.limit + 1,
378 378 searchValue: params.search,
... ... @@ -380,7 +380,7 @@
380 380 isAsc: params.order
381 381 };
382 382 };
383   - adjustHeaderCode=str.split("=")[1];
  383 + adjustCode=str.split("=")[1];
384 384 $.table.init(options);
385 385 }
386 386 else{
... ... @@ -389,12 +389,11 @@
389 389  
390 390 });
391 391  
392   -
393 392 /*新增调整明细*/
394 393 function add() {
395   - var adjustCode = $('#adjustHeaderCode').val();
396   - if(adjustCode !=null && adjustCode!="" && adjustCode!=undefined){
397   - open("新增调整明细", prefix+"/add?adjustHeaderCode=" + adjustCode);
  394 + var adjustCode = $('#adjustCode').val();
  395 + if(adjustCode != null && adjustCode != "" && adjustCode != undefined){
  396 + open("新增调整明细", prefix+"/add?adjustCode=" + adjustCode);
398 397 }
399 398 }
400 399  
... ...
src/main/resources/templates/inventory/adjustHeader/adjustHeader.html
... ... @@ -21,7 +21,7 @@
21 21 <div id="myTabContent" class="tab-content">
22 22 <div class="tab-pane fade in active" id="tabHeader">
23 23 <div class="col-sm-12 select-info">
24   - <form id="cycleHeader-form">
  24 + <form id="adjustHeader-form">
25 25 <div class="select-list">
26 26 <ul>
27 27 <li>
... ... @@ -61,7 +61,7 @@
61 61 <li>
62 62 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
63 63 class="fa fa-search"></i>&nbsp;搜索</a>
64   - <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cycleHeader-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  64 + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('adjustHeader-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
65 65 </li>
66 66 </ul>
67 67 </div>
... ... @@ -128,7 +128,7 @@
128 128 title: '货主编码'
129 129 },
130 130 {
131   - field: 'cycleCountCode',
  131 + field: 'cycleCountHeaderCode',
132 132 title: '盘点单编码'
133 133 },
134 134 {
... ...