Commit 0e62a54d062957fabc7e4cb06efe7e42434b5d68
1 parent
74d3e2c9
界面修改,搜索提示
Showing
9 changed files
with
156 additions
and
12 deletions
src/main/java/com/huaheng/HuaHengApplication.java
... | ... | @@ -13,7 +13,7 @@ import org.springframework.context.annotation.Bean; |
13 | 13 | * |
14 | 14 | * @author huaheng |
15 | 15 | */ |
16 | -@MapperScan({"com.huaheng.pc.**.**.mapper","com.huaheng.api.**.**.mapper"}) | |
16 | +@MapperScan({"com.huaheng.pc.**.**.mapper"}) | |
17 | 17 | //添加SecurityAutoConfiguration.class,防止报java.lang.ArrayStoreException错 |
18 | 18 | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) |
19 | 19 | public class HuaHengApplication |
... | ... |
src/main/java/com/huaheng/pc/config/customer/controller/CustomerController.java
... | ... | @@ -27,6 +27,8 @@ import org.springframework.ui.ModelMap; |
27 | 27 | import org.springframework.web.bind.annotation.*; |
28 | 28 | |
29 | 29 | import javax.annotation.Resource; |
30 | +import java.util.ArrayList; | |
31 | +import java.util.HashMap; | |
30 | 32 | import java.util.List; |
31 | 33 | import java.util.Map; |
32 | 34 | |
... | ... | @@ -160,4 +162,29 @@ public class CustomerController extends BaseController { |
160 | 162 | } |
161 | 163 | return AjaxResult.success("删除成功!"); |
162 | 164 | } |
165 | + | |
166 | + | |
167 | + @PostMapping("/getData") | |
168 | + @ResponseBody | |
169 | + public Map<String, Object> getData(String customerName, String customerCode) { | |
170 | + LambdaQueryWrapper<Customer> queryWrapper = Wrappers.lambdaQuery(); | |
171 | + queryWrapper.like(StringUtils.isNotEmpty(customerName), Customer::getCode, customerName) | |
172 | + .or() | |
173 | + .like(StringUtils.isNotEmpty(customerName), Customer::getName, customerName); | |
174 | + List<Customer> customerList = customerService.list(queryWrapper); | |
175 | + | |
176 | + List<Map<String, Object>> list = new ArrayList<>(); | |
177 | + for (Customer customer : customerList) { | |
178 | + Map<String, Object> resultMap = new HashMap<>(); | |
179 | + if (StringUtils.isNotEmpty(customerCode) && customer.getCode().equals(customerCode)) { | |
180 | + resultMap.put("selected", true); | |
181 | + } | |
182 | + resultMap.put("id", customer.getCode()); | |
183 | + resultMap.put("text", customer.getName()); | |
184 | + list.add(resultMap); | |
185 | + } | |
186 | + Map<String, Object> map = new HashMap<>(); | |
187 | + map.put("results", list); | |
188 | + return map; | |
189 | + } | |
163 | 190 | } |
... | ... |
src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
... | ... | @@ -311,7 +311,7 @@ public class LocationController extends BaseController { |
311 | 311 | } |
312 | 312 | |
313 | 313 | |
314 | - @RequiresPermissions("iconfig:location:print") | |
314 | + @RequiresPermissions("config:location:print") | |
315 | 315 | @Log(title = "配置-库存资料-库位条码", operating = "库位条码打印", action = BusinessType.OTHER) |
316 | 316 | @GetMapping("/print/{ids}") |
317 | 317 | public String print(@PathVariable("ids") Integer[] ids, ModelMap mmap) |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/controller/ShipmentHeaderHistoryController.java
... | ... | @@ -112,9 +112,6 @@ public class ShipmentHeaderHistoryController extends BaseController |
112 | 112 | .eq(ShipmentDetailHistory::getWarehouseCode,ShiroUtils.getWarehouseCode()); |
113 | 113 | Boolean flag=true; |
114 | 114 | flag=shipmentDetailHistoryService.remove(lambdaQueryWrapper); |
115 | - if(flag==false){ | |
116 | - return AjaxResult.error("删除失败"); | |
117 | - } | |
118 | 115 | if(result==false){ |
119 | 116 | return AjaxResult.error("删除失败"); |
120 | 117 | } |
... | ... |
src/main/resources/static/huaheng/js/huahengUI.js
... | ... | @@ -1056,7 +1056,7 @@ var table = { |
1056 | 1056 | // 添加信息 全屏 |
1057 | 1057 | addFull: function(id) { |
1058 | 1058 | table.set(); |
1059 | - let url = $.common.isEmpty(id) ? table.options.createUrl : $.table.options.createUrl.replace("{id}", id); | |
1059 | + var url = $.common.isEmpty(id) ? table.options.createUrl : $.table.options.createUrl.replace("{id}", id); | |
1060 | 1060 | $.modal.openFull("添加" + table.options.modalName, url); |
1061 | 1061 | }, |
1062 | 1062 | // 修改信息 全屏 |
... | ... |
src/main/resources/templates/config/location/location.html
... | ... | @@ -236,7 +236,7 @@ |
236 | 236 | align: 'center', |
237 | 237 | formatter: function(value, row, index) { |
238 | 238 | var actions = []; |
239 | - //actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
239 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
240 | 240 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); |
241 | 241 | return actions.join(''); |
242 | 242 | } |
... | ... |
src/main/resources/templates/config/zone/zone.html
... | ... | @@ -141,7 +141,7 @@ |
141 | 141 | title : '自定义字段5', |
142 | 142 | visible:false |
143 | 143 | }, |
144 | - /*{ | |
144 | + { | |
145 | 145 | title: '操作', |
146 | 146 | align: 'center', |
147 | 147 | formatter: function(value, row, index) { |
... | ... | @@ -150,7 +150,7 @@ |
150 | 150 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); |
151 | 151 | return actions.join(''); |
152 | 152 | } |
153 | - }*/ | |
153 | + } | |
154 | 154 | ] |
155 | 155 | }; |
156 | 156 | $.table.init(options); |
... | ... |
src/main/resources/templates/shipment/shipmentHeader/add.html
1 | 1 | <!DOCTYPE HTML> |
2 | 2 | <html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
3 | 3 | <meta charset="utf-8"> |
4 | -<head th:include="include :: header"></head> | |
4 | +<head> | |
5 | + <th:block th:include="include :: header" /> | |
6 | + <th:block th:include="include :: select2-css" /> | |
7 | +</head> | |
5 | 8 | <body class="white-bg"> |
6 | 9 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | 10 | <form class="form-horizontal m" id="form-shipmentHeader-add"> |
... | ... | @@ -36,7 +39,7 @@ |
36 | 39 | <div class="form-group"> |
37 | 40 | <label class="col-sm-3 control-label">客户编码:</label> |
38 | 41 | <div class="col-sm-8"> |
39 | - <input id="customerCode" name="customerCode" class="form-control" type="text"> | |
42 | + <select id="customerCode" name="customerCode" class="form-control"></select> | |
40 | 43 | <!--<select id="shipTo" class="form-control m-b" th:with="shipmentType=${@dict.getType('shipmentType')}">--> |
41 | 44 | <!--<option th:each="dict : ${shipmentType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>--> |
42 | 45 | <!--</select>--> |
... | ... | @@ -92,7 +95,8 @@ |
92 | 95 | </div> |
93 | 96 | </form> |
94 | 97 | </div> |
95 | - <div th:include="include::footer"></div> | |
98 | + <th:block th:include="include :: footer" /> | |
99 | + <th:block th:include="include :: select2-js" /> | |
96 | 100 | <script type="text/javascript"> |
97 | 101 | var prefix = ctx + "shipment/shipmentHeader" |
98 | 102 | $("#form-shipmentHeader-add").validate({ |
... | ... | @@ -140,6 +144,19 @@ |
140 | 144 | var laydate = layui.laydate; |
141 | 145 | laydate.render({ elem: '#requestedDeliveryDate', theme: 'molv', format: 'yyyy-MM-dd HH:mm:ss' }); |
142 | 146 | }); |
147 | + $('#customerCode').select2({ | |
148 | + ajax: { | |
149 | + url: ctx+'config/customer/getData', | |
150 | + dataType: 'json', | |
151 | + type: 'post', | |
152 | + data: function (params) { | |
153 | + let query = { | |
154 | + customerName: params.term, | |
155 | + } | |
156 | + return query; | |
157 | + } | |
158 | + } | |
159 | + }); | |
143 | 160 | }) |
144 | 161 | </script> |
145 | 162 | </body> |
... | ... |
src/main/resources/templates/shipment/shipmentHeaderHistory/report.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body class="white-bg" style="padding:5px 0;" id="ddd"> | |
6 | +<div class="container" style="color: #333;"> | |
7 | + <div class="row"> | |
8 | + <h3 align="center">发货单</h3> | |
9 | + <span>发货单号:</span><span th:text="${shipmentHeader['code']}"></span> | |
10 | + <table id="reportTable" width="100%" border="1" cellspacing="0" cellpadding="0" class="dy-report"> | |
11 | + <thead style="display:table-header-group;"> | |
12 | + <tr> | |
13 | + <td colspan="7"> | |
14 | + <span style="padding-top:40px;width: 40%; float:left;" th:text="${#dates.format(shipmentHeader.created,'yyyy-MM-dd HH:mm:ss')}"></span> | |
15 | + <h2 style="width:20%;text-align:center;float:left;padding-top:10px;">出库单</h2> | |
16 | + <span style="padding-top:20px;width:38%;float:right; text-align: right"><img id="shipmentCode" th:src="@{'/image/'+${shipmentHeader.code}}"></span> | |
17 | + </td> | |
18 | + </tr> | |
19 | + <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060"> | |
20 | + <td colspan="7"> | |
21 | + <div style="width:40%; float:left;">客户名称:<span th:text="${shipmentHeader['customerName']}"></span></div> | |
22 | + <div style="width:50%; float:right; text-align:right"> | |
23 | + <span>明细条数:<span th:text="${shipmentHeader['totalLines']}"></span></span> | |
24 | + <span style="padding-left:20px;">明细总数:<span th:text="${shipmentHeader['totalQty']}"></span></span> | |
25 | + <span class="noprint" style="padding-left:20px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span> | |
26 | + </div> | |
27 | + </td> | |
28 | + </tr> | |
29 | + <tr> | |
30 | + <th width="18%">物料编码</th> | |
31 | + <th width="22%">物料名称</th> | |
32 | + <!-- <th width="10%">物料规格</th>--> | |
33 | + <th width="9%">批次</th> | |
34 | + <th width="11%">批号</th> | |
35 | + <th width="9%">项目号</th> | |
36 | + <th width="8%">数量</th> | |
37 | + <th width="21%">条码</th> | |
38 | + </tr> | |
39 | + </thead> | |
40 | + <tbody> | |
41 | + <tr th:each="row,rowStat : ${details}"> | |
42 | + <td th:text="${row.materialCode}"></td> | |
43 | + <td th:text="${row.materialName}"></td> | |
44 | + <!-- <td th:text="${row.materialSpec}"></td>--> | |
45 | + <td th:text="${row.batch}"></td> | |
46 | + <td th:text="${row.lot}"></td> | |
47 | + <td th:text="${row.projectNo}"></td> | |
48 | + <td th:text="${row.shipQty}"></td> | |
49 | + <td><img th:src="@{'/image/'+${row.materialCode}}"></td> | |
50 | + </tr> | |
51 | + </tbody> | |
52 | + </table> | |
53 | + </div> | |
54 | +</div> | |
55 | +<div th:include="include :: footer"></div> | |
56 | +<script type="text/javascript" src="../../../js/barcode/JsBarcode.all.js"></script> | |
57 | +<script th:inline="javascript"> | |
58 | + | |
59 | + // var barcodeStyle = { | |
60 | + // format: "CODE128",//选择要使用的条形码类型 | |
61 | + // width:1,//设置条之间的宽度 | |
62 | + // height:40,//高度 | |
63 | + // displayValue:true,//是否在条形码下方显示文字 | |
64 | + // // text:"456",//覆盖显示的文本 | |
65 | + // // fontOptions:"bold italic",//使文字加粗体或变斜体 | |
66 | + // font:"monospace",//设置文本的字体fantasy | |
67 | + // textAlign:"center",//设置文本的水平对齐方式 | |
68 | + // textPosition:"bottom",//设置文本的垂直位置 | |
69 | + // textMargin:1,//设置条形码和文本之间的间距 | |
70 | + // fontSize:12,//设置文本的大小 | |
71 | + // background:"#ffffff",//设置条形码的背景 | |
72 | + // lineColor:"#000000",//设置条和文本的颜色。 | |
73 | + // margin:1//设置条形码周围的空白边距 | |
74 | + // }; | |
75 | + | |
76 | + // $("#shipmentCode").JsBarcode($("#shipmentCode").attr("data"), barcodeStyle); | |
77 | + | |
78 | + // for (var i=0; i<$('#reportTable tbody tr').length; i++){ | |
79 | + // var barcodeText = $("#reportTable tbody tr:eq("+ i +") td:eq(0)").innerText; | |
80 | + // $("#reportTable tbody tr:eq("+ i +") td:eq(6) canvas").JsBarcode("6666", barcodeStyle); | |
81 | + // } | |
82 | + | |
83 | + // $('#reportTable tbody tr').each(function(i) { | |
84 | + // var barcodeText = $(this).children()[0].innerText; | |
85 | + // JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle); | |
86 | + // }); | |
87 | + | |
88 | + | |
89 | +</script> | |
90 | +<style type="text/css"> | |
91 | + @media print { | |
92 | + .noprint{display:none;} | |
93 | + } | |
94 | +</style> | |
95 | +<script type="text/javascript" src="../../../js/jquery-1.4.4.min.js"></script> | |
96 | +<script type="text/javascript" src="../../../js/jquery.jqprint-0.3.js"></script> | |
97 | +<script type="text/javascript"> | |
98 | + function a(){ | |
99 | + $("#ddd").jqprint(); | |
100 | + } | |
101 | +</script> | |
102 | +</body> | |
103 | +</html> | |
0 | 104 | \ No newline at end of file |
... | ... |