Commit eb77b5936e4064d2a8963cbef0ec6b4b202aa369

Authored by pengcheng
2 parents 7eab702b 5d93c58d

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

# Conflicts:
#	src/main/resources/templates/receipt/receiving/receiving.html
src/main/java/com/huaheng/api/general/service/BasicDataApiService.java
... ... @@ -223,7 +223,8 @@ public class BasicDataApiService {
223 223 // return AjaxResult.error("没有该货主!!");
224 224 // }
225 225 String code=material.getCode();
226   - if(code.startsWith("293") || code.startsWith("290") || code.startsWith("288")|| code.startsWith("11601")|| code.startsWith("29302136C")|| code.startsWith("29302136M")|| code.startsWith("196")){
  226 +// if(code.startsWith("293") || code.startsWith("290") || code.startsWith("288")|| code.startsWith("11601")|| code.startsWith("29302136C")|| code.startsWith("29302136M")|| code.startsWith("196")){
  227 + if (code.startsWith("196")){
227 228 material.setIsBattery(1);
228 229 }else{
229 230 material.setIsBattery(2);
... ...
src/main/java/com/huaheng/api/general/service/ReceiptApiService.java
... ... @@ -151,10 +151,15 @@ public class ReceiptApiService {
151 151 receiptHeader = receiptHeaderService.getOne(new LambdaQueryWrapper<ReceiptHeader>()
152 152 .eq(ReceiptHeader::getWarehouseCode, receiptHeader.getWarehouseCode())
153 153 .eq(ReceiptHeader::getCode, receiptHeader.getCode()));
154   - Supplier supplier = supplierService.getOne(new LambdaQueryWrapper<Supplier>().eq(Supplier::getCode,receiptHeader.getSupplierCode()));
155   - if (supplier==null){
156   - return AjaxResult.error("没有这个供应商");
  154 +
  155 + Supplier supplier=null;
  156 + if (receiptHeader.getReceiptType()=="CGRKD"){
  157 + supplier = supplierService.getOne(new LambdaQueryWrapper<Supplier>().eq(Supplier::getCode,receiptHeader.getSupplierCode()));
  158 + if (supplier==null){
  159 + return AjaxResult.error("没有这个供应商");
  160 + }
157 161 }
  162 +
158 163 List<ReceiptDetail> receiptDetailList = new ArrayList<>();
159 164 for (ReceiptDetail receiptDetail : receiptDetails) {
160 165 receiptDetail.setReceiptId(receiptHeader.getId());
... ... @@ -177,7 +182,9 @@ public class ReceiptApiService {
177 182 receiptDetail.setMaterialSpec(material.getSpec());
178 183 receiptDetail.setMaterialUnit(material.getUnit());
179 184 receiptDetail.setMaterialIsBattery(material.getIsBattery());
180   - receiptDetail.setAllCreditCode(supplier.getAllCreditCode());
  185 + if (supplier!=null) {
  186 + receiptDetail.setAllCreditCode(supplier.getAllCreditCode());
  187 + }
181 188 //生成电池包二维码
182 189 LambdaQueryWrapper<ReceiptDetail> receiptDetailWrapper = Wrappers.lambdaQuery();
183 190 receiptDetailWrapper.select(ReceiptDetail::getBatteryPackTwoCode);
... ...
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... ... @@ -599,6 +599,10 @@
599 599 title : '物料名称'
600 600 },
601 601 {
  602 + field : 'materialUnit',
  603 + title : '物料单位'
  604 + },
  605 + {
602 606 field : 'materialSpec',
603 607 title : '物料规格',
604 608 },
... ...
src/main/resources/templates/receipt/receiving/receiving.html
... ... @@ -63,7 +63,7 @@
63 63 <option value="5">库区E</option>
64 64 </select>-->
65 65 <li>收货数量:<input type="text" id="receiveNum"/></li>
66   -<!-- <li>收货重量:<input type="text" id="receiveWeight"/></li>-->
  66 + <!-- <li>收货重量:<input type="text" id="receiveWeight"/></li>-->
67 67 <li hidden>容器编号:<input type="text" id="containerCode"/></li>
68 68 <li hidden>库位编码:<input type="text" id="locationCoder"/></li>
69 69 <li>&nbsp;&nbsp;主条码:<input type="text" id="barCodeHeaderCode" readonly style="width: 50%"/>
... ... @@ -99,8 +99,8 @@
99 99 <li>净重:<input type="text" id="materialNetWeight" placeholder="电池类必填"/>
100 100 <li>回收人:<input type="text" id="recycler" placeholder="电池类必填"/>
101 101  
102   - <!--完整程度:<input type="text" id="completeness" placeholder="电池类必填"/></li>-->
103   - <!--<li>电池个数:<input type="text" id="batteryQty"/></li>-->
  102 + <!--完整程度:<input type="text" id="completeness" placeholder="电池类必填"/></li>-->
  103 + <!--<li>电池个数:<input type="text" id="batteryQty"/></li>-->
104 104  
105 105 </div>
106 106 <li>
... ... @@ -108,14 +108,14 @@
108 108 </li>
109 109 </ul>
110 110 <div class="btn-group hidden-xs" id="toolbar1" role="group">
111   -<!-- <a class="btn btn-outline btn-success btn-rounded" onclick="positioning()"-->
112   -<!-- shiro:hasPermission="receipt:receiptDetail:add">-->
113   -<!-- <i class="fa fa-map-pin"></i> 定位-->
114   -<!-- </a>-->
115   -<!-- <a class="btn btn-outline btn-info btn-rounded" onclick="cancelPositioning()"-->
116   -<!-- shiro:hasPermission="receipt:receiptDetail:remove">-->
117   -<!-- <i class="fa fa-times"></i> 取消定位-->
118   -<!-- </a>-->
  111 + <!-- <a class="btn btn-outline btn-success btn-rounded" onclick="positioning()"-->
  112 + <!-- shiro:hasPermission="receipt:receiptDetail:add">-->
  113 + <!-- <i class="fa fa-map-pin"></i> 定位-->
  114 + <!-- </a>-->
  115 + <!-- <a class="btn btn-outline btn-info btn-rounded" onclick="cancelPositioning()"-->
  116 + <!-- shiro:hasPermission="receipt:receiptDetail:remove">-->
  117 + <!-- <i class="fa fa-times"></i> 取消定位-->
  118 + <!-- </a>-->
119 119 <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()"
120 120 shiro:hasPermission="receipt:receiptDetail:remove">
121 121 <i class="fa fa-trash-o"></i> 取消收货
... ... @@ -152,11 +152,11 @@
152 152 </div>
153 153 <div th:include="include :: footer"></div>
154 154 <script th:inline="javascript">
155   - var addFlag = [[${@permission.hasPermi('receipt:receiving:add')}]];
156   - var removeFlag = [[${@permission.hasPermi('receipt:receiving:remove')}]];
157   - var prefix = ctx + "receipt/receiving";
158   - var Types = [[${@dict.getType('taskType')}]];
159   - var Status=[[${@dict.getType('receiptContainerHeaderStatus')}]];
  155 + var addFlag = [[${@permission.hasPermi('receipt:receiving:add')}]];
  156 + var removeFlag = [[${@permission.hasPermi('receipt:receiving:remove')}]];
  157 + var prefix = ctx + "receipt/receiving";
  158 + var Types = [[${@dict.getType('taskType')}]];
  159 + var Status=[[${@dict.getType('receiptContainerHeaderStatus')}]];
160 160 var inventoryStatus =[[${@dict.getType('inventoryStatus')}]];
161 161  
162 162 $(function () {
... ... @@ -182,142 +182,142 @@
182 182 });
183 183  
184 184 // 收货显示的数据
185   - function list_select(code) {
186   - $.ajax({
187   - url: prefix + "/scanBill",
188   - type: 'post',
189   - datatype: 'json',
190   - data: {
191   - code: code
192   - },
193   - error:function (response) {
194   - console.log(response);
195   - },
196   - success: function (value) {
197   - var qty_show=0;
198   - var qtyCompleted_show=0;
199   - $("#bootstrap-table").bootstrapTable('removeAll');
200   - if(value.data){
201   - for (var i = 0; i < value.data.length; i++) {
202   - if (value.data[i].totalQty > value.data[i].openQty || value.data[i].totalWeight > value.data[i].openWeight) {
203   - $("#bootstrap-table").bootstrapTable('insertRow', {
204   - index: 0, row: {
205   - projectNo:value.data[i].project,
206   - id: value.data[i].id,
  185 + function list_select(code) {
  186 + $.ajax({
  187 + url: prefix + "/scanBill",
  188 + type: 'post',
  189 + datatype: 'json',
  190 + data: {
  191 + code: code
  192 + },
  193 + error:function (response) {
  194 + console.log(response);
  195 + },
  196 + success: function (value) {
  197 + var qty_show=0;
  198 + var qtyCompleted_show=0;
  199 + $("#bootstrap-table").bootstrapTable('removeAll');
  200 + if(value.data){
  201 + for (var i = 0; i < value.data.length; i++) {
  202 + if (value.data[i].totalQty > value.data[i].openQty || value.data[i].totalWeight > value.data[i].openWeight) {
  203 + $("#bootstrap-table").bootstrapTable('insertRow', {
  204 + index: 0, row: {
  205 + projectNo:value.data[i].project,
  206 + id: value.data[i].id,
207 207 materialName: value.data[i].materialName,
208   - receiptId: value.data[i].receiptId,
209   - receiptCode: value.data[i].receiptCode,
210   - materialCode: value.data[i].materialCode,
211   - totalQty: value.data[i].totalQty,
212   - openQty: value.data[i].openQty,
  208 + receiptId: value.data[i].receiptId,
  209 + receiptCode: value.data[i].receiptCode,
  210 + materialCode: value.data[i].materialCode,
  211 + totalQty: value.data[i].totalQty,
  212 + openQty: value.data[i].openQty,
213 213 totalWeight: value.data[i].totalWeight,
214 214 openWeight: value.data[i].openWeight,
215   - inventorySts: value.data[i].inventorySts,
  215 + inventorySts: value.data[i].inventorySts,
216 216 materialUnit: value.data[i].materialUnit,
217 217 electricQuantity: value.data[i].electricQuantity,
218 218 batteryPackageWeight: value.data[i].batteryPackageWeight
219 219  
220 220 }
221   - });
222   - }
  221 + });
  222 + }
223 223 qty_show=value.data[i].totalQty + qty_show;
224   - qtyCompleted_show=value.data[i].openQty + qtyCompleted_show;
225   - }
226   - $("#material_length").text(value.data.length);
227   - $("#qty_length").text(qty_show);
228   - $("#qtyCompleted_length").text(qtyCompleted_show);
229   - }
230   - else {
231   - console.log("收货单不存在!")
232   - }
233   - }
234   - })
235   - }
236   -
237   - function list_receiptInfo(code) {
238   - $.ajax({
239   - url: prefix + "/getReceiptInfoByBill",
240   - type: 'post',
241   - datatype: 'json',
242   - data: {
243   - code: code
244   - },
245   - error:function (response) {
246   - console.log(response);
247   - },
248   - success: function (value) {
249   - $("#bootstrap-table1").bootstrapTable('removeAll');
250   - if(value.data){
251   - for (var i = 0; i < value.data.length; i++) {
252   - $("#bootstrap-table1").bootstrapTable('insertRow', {
253   - index: 0, row: {
254   - projectNo :value.data[i].projectNo,
255   - id: value.data[i].id,
  224 + qtyCompleted_show=value.data[i].openQty + qtyCompleted_show;
  225 + }
  226 + $("#material_length").text(value.data.length);
  227 + $("#qty_length").text(qty_show);
  228 + $("#qtyCompleted_length").text(qtyCompleted_show);
  229 + }
  230 + else {
  231 + console.log("收货单不存在!")
  232 + }
  233 + }
  234 + })
  235 + }
  236 +
  237 + function list_receiptInfo(code) {
  238 + $.ajax({
  239 + url: prefix + "/getReceiptInfoByBill",
  240 + type: 'post',
  241 + datatype: 'json',
  242 + data: {
  243 + code: code
  244 + },
  245 + error:function (response) {
  246 + console.log(response);
  247 + },
  248 + success: function (value) {
  249 + $("#bootstrap-table1").bootstrapTable('removeAll');
  250 + if(value.data){
  251 + for (var i = 0; i < value.data.length; i++) {
  252 + $("#bootstrap-table1").bootstrapTable('insertRow', {
  253 + index: 0, row: {
  254 + projectNo :value.data[i].projectNo,
  255 + id: value.data[i].id,
256 256 receiptContainerId:value.data[i].receiptContainerId,
257 257 receiptDetailId:value.data[i].receiptDetailId,
258   - containerCode: value.data[i].containerCode,
259   - locationCode: value.data[i].locationCode,
260   - materialCode: value.data[i].materialCode,
261   - materialName: value.data[i].materialName,
262   - materialSpec: value.data[i].materialSpec,
  258 + containerCode: value.data[i].containerCode,
  259 + locationCode: value.data[i].locationCode,
  260 + materialCode: value.data[i].materialCode,
  261 + materialName: value.data[i].materialName,
  262 + materialSpec: value.data[i].materialSpec,
263 263 sn:value.data[i].sn,
264 264 taskType:value.data[i].taskType,
265   - qty: value.data[i].qty,
  265 + qty: value.data[i].qty,
266 266 weights: value.data[i].weights,
267   - status: value.data[i].status,
268   - created: value.data[i].created,
269   - createdBy: value.data[i].createdBy,
  267 + status: value.data[i].status,
  268 + created: value.data[i].created,
  269 + createdBy: value.data[i].createdBy,
270 270 electricQuantity: value.data[i].electricQuantity,
271 271 batteryPackageWeight: value.data[i].batteryPackageWeight
272   - }
273   - });
274   - }
275   - }
276   - else {
277   - console.log("没有查找到入库容器!")
278   - }
279   - }
280   - })
281   - }
282   -
283   - $("#list-btn").click(initTable);
284   -
285   - $("body").bind("keypress",function(e){
286   - // 兼容FF和IE和Opera
287   - var theEvent = e || window.event;
288   - var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
289   - if (code == 13) {
290   - e.preventDefault();
291   - //回车执行查询
292   - initTable();
293   - // list_select($("#code").val());
294   - }
295   - });
296   -
297   - function initTable(){
298   - var receiptCode=$("#code").val();
299   - list_select(receiptCode);
300   - list_receiptInfo(receiptCode);
  272 + }
  273 + });
  274 + }
  275 + }
  276 + else {
  277 + console.log("没有查找到入库容器!")
  278 + }
  279 + }
  280 + })
  281 + }
  282 +
  283 + $("#list-btn").click(initTable);
  284 +
  285 + $("body").bind("keypress",function(e){
  286 + // 兼容FF和IE和Opera
  287 + var theEvent = e || window.event;
  288 + var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  289 + if (code == 13) {
  290 + e.preventDefault();
  291 + //回车执行查询
  292 + initTable();
  293 + // list_select($("#code").val());
  294 + }
  295 + });
  296 +
  297 + function initTable(){
  298 + var receiptCode=$("#code").val();
  299 + list_select(receiptCode);
  300 + list_receiptInfo(receiptCode);
301 301 $("#bootstrap-table1").bootstrapTable('removeAll');
302 302 $("#bootstrap-table2").bootstrapTable('removeAll');
303 303 }
304 304  
305 305 //点击将值赋值到文本框
306   - $("#bootstrap-table").bootstrapTable({
307   - // url: prefix + "/list",
308   - createUrl: prefix + "/add",
309   - updateUrl: prefix + "/edit/{id}",
310   - removeUrl: prefix + "/remove",
311   - contentType: "application/x-www-form-urlencoded",
312   - clickToSelect: true,
313   - modalName: "收货",
  306 + $("#bootstrap-table").bootstrapTable({
  307 + // url: prefix + "/list",
  308 + createUrl: prefix + "/add",
  309 + updateUrl: prefix + "/edit/{id}",
  310 + removeUrl: prefix + "/remove",
  311 + contentType: "application/x-www-form-urlencoded",
  312 + clickToSelect: true,
  313 + modalName: "收货",
314 314 onRefresh: function(){
315 315  
316 316 },
317   - onClickRow:function(row,ele,field){
318   - let code=$("#code").val();
319   - $("#detailId").val(row.id);
320   - $("#receiveNum").val(row.totalQty-row.openQty);
  317 + onClickRow:function(row,ele,field){
  318 + let code=$("#code").val();
  319 + $("#detailId").val(row.id);
  320 + $("#receiveNum").val(row.totalQty-row.openQty);
321 321 $("#receiveWeight").val(row.totalWeight-row.openWeight)
322 322 $("#materialCode").val(row.materialCode);
323 323 //console.log(row)
... ... @@ -328,62 +328,62 @@
328 328 }else{
329 329 $("#batteryHidden").hide();
330 330 }
331   - $.ajax({
332   - url:prefix+'/getInventoryInfo',
333   - type:'post',
334   - data:{
335   - code:code,
336   - id:row.id
337   - },
338   - success:res=>{
339   - // $("#bootstrap-table1").bootstrapTable('load',res.data.list);
340   - $("#bootstrap-table2").bootstrapTable('load',res.data.inventoryList);
341   - // $("#bootstrap-table3").bootstrapTable('load',res.data.containerList);
342   - }
343   - })
344   - },
345   - columns: [
346   - // {
347   - // field : 'id',
348   - // title : 'id号'
349   - // },
350   - // {
351   - // field : 'receiptCode',
352   - // title : '收货单编码'
353   - // },
354   - {
355   - field : 'materialIsBattery',
356   - title : '是否电池',
  331 + $.ajax({
  332 + url:prefix+'/getInventoryInfo',
  333 + type:'post',
  334 + data:{
  335 + code:code,
  336 + id:row.id
  337 + },
  338 + success:res=>{
  339 + // $("#bootstrap-table1").bootstrapTable('load',res.data.list);
  340 + $("#bootstrap-table2").bootstrapTable('load',res.data.inventoryList);
  341 + // $("#bootstrap-table3").bootstrapTable('load',res.data.containerList);
  342 + }
  343 + })
  344 + },
  345 + columns: [
  346 + // {
  347 + // field : 'id',
  348 + // title : 'id号'
  349 + // },
  350 + // {
  351 + // field : 'receiptCode',
  352 + // title : '收货单编码'
  353 + // },
  354 + {
  355 + field : 'materialIsBattery',
  356 + title : '是否电池',
357 357 visible: false
358 358 },
359   - {
360   - field : 'id',
361   - title : '明细id'
362   - },
363   - {
364   - field : 'materialCode',
365   - title : '物料编码'
366   - },
367   - {
368   - field: "materialName",
369   - title: "名称"
370   - },
371   - {
372   - field : 'totalQty',
373   - title : '单据数量'
374   - },
375   - {
376   - field : 'openQty',
377   - title : '已入数量'
378   - },
  359 + {
  360 + field : 'id',
  361 + title : '明细id'
  362 + },
  363 + {
  364 + field : 'materialCode',
  365 + title : '物料编码'
  366 + },
  367 + {
  368 + field: "materialName",
  369 + title: "名称"
  370 + },
  371 + {
  372 + field : 'totalQty',
  373 + title : '单据数量'
  374 + },
  375 + {
  376 + field : 'openQty',
  377 + title : '已入数量'
  378 + },
379 379 // {
380 380 // field : 'totalWeight',
381 381 // title : '单据重量'
382 382 // },
383   -/* {
384   - field : 'batteryPackageWeight',
385   - title : '电池包重量'
386   - },*/
  383 + /* {
  384 + field : 'batteryPackageWeight',
  385 + title : '电池包重量'
  386 + },*/
387 387 {
388 388 field : 'electricQuantity',
389 389 title : '电池包电量'
... ... @@ -392,44 +392,44 @@
392 392 // field : 'openWeight',
393 393 // title : '已入重量'
394 394 // },
395   - {
396   - field : 'inventorySts',
397   - title : '库存状态'
398   - },
399   - {
400   - field : 'projectNo',
401   - title : '项目号'
402   - },
403   - {
404   - field : 'materialUnit',
405   - title : '单位'
406   - },
407   -
408   - ]
409   - });
410   -
411   - $("#bootstrap-table1").bootstrapTable({
412   - removeUrl: ctx + "receipt/receiptContainerDetail/remove",
413   - // search: true, //搜索
414   - showRefresh: true, //刷新
415   - showToggle:true, //视图切换
416   - clickToSelect: true,
417   - showColumns:true, //列选择
418   - // detailView:true,
  395 + {
  396 + field : 'inventorySts',
  397 + title : '库存状态'
  398 + },
  399 + {
  400 + field : 'projectNo',
  401 + title : '项目号'
  402 + },
  403 + {
  404 + field : 'materialUnit',
  405 + title : '单位'
  406 + },
  407 +
  408 + ]
  409 + });
  410 +
  411 + $("#bootstrap-table1").bootstrapTable({
  412 + removeUrl: ctx + "receipt/receiptContainerDetail/remove",
  413 + // search: true, //搜索
  414 + showRefresh: true, //刷新
  415 + showToggle:true, //视图切换
  416 + clickToSelect: true,
  417 + showColumns:true, //列选择
  418 + // detailView:true,
  419 + toolbar: "#toolbar1",
  420 + showExport: true, //导出
  421 + exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
  422 + modalName: "入库组盘",
  423 + iconSize: "outline",
419 424 toolbar: "#toolbar1",
420   - showExport: true, //导出
421   - exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
422   - modalName: "入库组盘",
423   - iconSize: "outline",
424   - toolbar: "#toolbar1",
425   - contentType: "application/x-www-form-urlencoded",
426   - onRefresh: function(){
427   - list_receiptInfo($("#code").val());
428   - },
429   - columns: [
430   - {
431   - checkbox: true,
432   - },
  425 + contentType: "application/x-www-form-urlencoded",
  426 + onRefresh: function(){
  427 + list_receiptInfo($("#code").val());
  428 + },
  429 + columns: [
  430 + {
  431 + checkbox: true,
  432 + },
433 433 {
434 434 field : 'locationCode',
435 435 title : '库位编号'
... ... @@ -438,33 +438,33 @@
438 438 field : 'containerCode',
439 439 title : '容器编号'
440 440 },
441   - {
442   - field : 'id',
443   - title : '组盘明细id',
444   - visible: false
445   - },
446   - {
447   - field : 'receiptContainerId',
448   - title : '组盘头id',
  441 + {
  442 + field : 'id',
  443 + title : '组盘明细id',
449 444 visible: false
450   - },
451   - {
452   - field : 'materialCode',
453   - title : '物料编码'
454   - },
455   - {
456   - field:"materialName",
457   - title:"物料名称"
458   - },
459   -
460   - // {
461   - // field:"materialSpec",
462   - // title:"物料规格"
463   - // },
464   - {
465   - field : 'qty',
466   - title : '数量'
467   - },
  445 + },
  446 + {
  447 + field : 'receiptContainerId',
  448 + title : '组盘头id',
  449 + visible: false
  450 + },
  451 + {
  452 + field : 'materialCode',
  453 + title : '物料编码'
  454 + },
  455 + {
  456 + field:"materialName",
  457 + title:"物料名称"
  458 + },
  459 +
  460 + // {
  461 + // field:"materialSpec",
  462 + // title:"物料规格"
  463 + // },
  464 + {
  465 + field : 'qty',
  466 + title : '数量'
  467 + },
468 468  
469 469 {
470 470 field : 'electricQuantity',
... ... @@ -482,44 +482,44 @@
482 482 // field : 'sn',
483 483 // title : '序列号'
484 484 // },
485   - // {
486   - // field : 'project',
487   - // title : '项目号',
  485 + // {
  486 + // field : 'project',
  487 + // title : '项目号',
488 488 // visible: false
489   - // },
490   - {
491   - field : 'status',
492   - title : '组盘状态',
493   - align: 'center',
494   - formatter: function(value, row, index) {
495   - return $.table.selectDictLabel(Status, value);
496   - }
497   - },
498   - {
499   - field : 'receiptDetailId',
500   - title : '入库单明细id'
501   - },
502   - {
503   - field : 'created',
504   - title : '创建时间'
505   - },
506   - {
507   - field : 'createdBy',
508   - title : '创建人'
509   - },
510   - {
511   - title: '操作',
512   - align: 'center',
  489 + // },
  490 + {
  491 + field : 'status',
  492 + title : '组盘状态',
  493 + align: 'center',
  494 + formatter: function(value, row, index) {
  495 + return $.table.selectDictLabel(Status, value);
  496 + }
  497 + },
  498 + {
  499 + field : 'receiptDetailId',
  500 + title : '入库单明细id'
  501 + },
  502 + {
  503 + field : 'created',
  504 + title : '创建时间'
  505 + },
  506 + {
  507 + field : 'createdBy',
  508 + title : '创建人'
  509 + },
  510 + {
  511 + title: '操作',
  512 + align: 'center',
513 513 events:'operateEvents',
514   - formatter: function(value, row, index) {
515   - var actions = [];
516   - if (row.status == 0) {
517   - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消</a>');
  514 + formatter: function(value, row, index) {
  515 + var actions = [];
  516 + if (row.status == 0) {
  517 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消</a>');
518 518 }
519   - return actions.join('');
520   - }
521   - }]
522   - });
  519 + return actions.join('');
  520 + }
  521 + }]
  522 + });
523 523  
524 524 $("#bootstrap-table2").bootstrapTable({
525 525 removeUrl: ctx + "receipt/receiptContainerDetail/remove",
... ... @@ -586,35 +586,35 @@
586 586 },
587 587 ]
588 588 });
589   - window.operateEvents = {
590   - 'click #qty': function (e, value, row, index) {
591   - var url = prefix + '/add?';
592   - jQuery.each(row, function(key, val) {
593   - url = url + key + "=" + encodeURI(val) + "&";
594   - });
595   - var modalName="入库组盘";
596   - $.modal.open("添加"+modalName,url);
597   - }
598   - };
599   -
600   - function receiving_refresh() {
601   - var receiving_code = localStorage.getItem("receiving_code");
602   - $("#code").val(receiving_code);
603   - if (receiving_code) {
604   - initTable();
  589 + window.operateEvents = {
  590 + 'click #qty': function (e, value, row, index) {
  591 + var url = prefix + '/add?';
  592 + jQuery.each(row, function(key, val) {
  593 + url = url + key + "=" + encodeURI(val) + "&";
  594 + });
  595 + var modalName="入库组盘";
  596 + $.modal.open("添加"+modalName,url);
605 597 }
606   - localStorage.removeItem("receiving_code");
607   - }
  598 + };
608 599  
609   - receiving_refresh();
  600 + function receiving_refresh() {
  601 + var receiving_code = localStorage.getItem("receiving_code");
  602 + $("#code").val(receiving_code);
  603 + if (receiving_code) {
  604 + initTable();
  605 + }
  606 + localStorage.removeItem("receiving_code");
  607 + }
610 608  
611   - function remove(id) {
612   - $.modal.confirm("确定删除该组盘?", function() {
613   - var url = ctx + "receipt/receiptContainerDetail/remove";
614   - var data = { "ids": id };
615   - $.operate.submitAndCallback(url, "post", "json", data, initTable);
616   - });
617   - }
  609 + receiving_refresh();
  610 +
  611 + function remove(id) {
  612 + $.modal.confirm("确定删除该组盘?", function() {
  613 + var url = ctx + "receipt/receiptContainerDetail/remove";
  614 + var data = { "ids": id };
  615 + $.operate.submitAndCallback(url, "post", "json", data, initTable);
  616 + });
  617 + }
618 618  
619 619 function positioning() {
620 620 let rows = $("#bootstrap-table1").bootstrapTable('getSelections');
... ... @@ -709,22 +709,22 @@
709 709 $.table.refresh("bootstrap-table1");
710 710 }
711 711  
712   - function receipt() {
713   - let containerCode = $("#containerCode").val();
714   - let locationCode = $("#locationCoder").val();
  712 + function receipt() {
  713 + let containerCode = $("#containerCode").val();
  714 + let locationCode = $("#locationCoder").val();
715 715 let barCodeHeaderCode = $("#barCodeHeaderCode").val();
716   - Receiving(locationCode, containerCode,barCodeHeaderCode);
717   - }
718   -
719   - /**
720   - * 组盘
721   - * @param locationCode
722   - * @param containerCode
723   - */
724   - function Receiving(locationCode,containerCode,barCodeHeaderCode) {
725   - let receiptCode=$("#code").val();
726   - let num=$("#receiveNum").val();
727   - let receiptDetailId=$("#detailId").val();
  716 + Receiving(locationCode, containerCode,barCodeHeaderCode);
  717 + }
  718 +
  719 + /**
  720 + * 组盘
  721 + * @param locationCode
  722 + * @param containerCode
  723 + */
  724 + function Receiving(locationCode,containerCode,barCodeHeaderCode) {
  725 + let receiptCode=$("#code").val();
  726 + let num=$("#receiveNum").val();
  727 + let receiptDetailId=$("#detailId").val();
728 728 let weights = $("#receiveWeight").val();
729 729 let locationCoder = $("#locationCoder").val();
730 730 let barCodeHeaderId = $("#barCodeHeaderId").val();
... ... @@ -743,16 +743,16 @@
743 743 if(num)
744 744 }*/
745 745 //console.log(materialCode)
746   - $.ajax({
747   - url:ctx + "receipt/receiving/save",
748   - type:'post',
749   - data:{
750   - receiptCode:receiptCode,
751   - qty: num,
752   - receiptDetailId:receiptDetailId,
753   - locationCode:locationCoder,
  746 + $.ajax({
  747 + url:ctx + "receipt/receiving/save",
  748 + type:'post',
  749 + data:{
  750 + receiptCode:receiptCode,
  751 + qty: num,
  752 + receiptDetailId:receiptDetailId,
  753 + locationCode:locationCoder,
754 754 // locationCoder:locationCoder,
755   - containerCode:containerCode,
  755 + containerCode:containerCode,
756 756 barCodeHeaderCode:barCodeHeaderCode,
757 757 barCodeHeaderId:barCodeHeaderId,
758 758 batteryPackType:batteryPackType,
... ... @@ -766,25 +766,25 @@
766 766 materialNetWeight:materialNetWeight,
767 767 recycler:recycler,
768 768 area:area
769   - },
770   - success:function (data) {
771   - if(data.code===200){
772   - $.modal.msgSuccess('成功');
773   - initTable();
774   - }
775   - else{
776   - $.modal.msg(data.msg);
777   - }
778   - }
779   - })
780   - }
  769 + },
  770 + success:function (data) {
  771 + if(data.code===200){
  772 + $.modal.msgSuccess('成功');
  773 + initTable();
  774 + }
  775 + else{
  776 + $.modal.msg(data.msg);
  777 + }
  778 + }
  779 + })
  780 + }
781 781  
782 782 function chooseStation(id) {
783 783 var url = ctx + "receipt/receiptContainerHeader/chooseStation" + "/" + id;
784 784 $.modal.open("选择站台", url);
785 785 }
786 786  
787   - function createTask() {
  787 + function createTask() {
788 788 let rows=$("#bootstrap-table1").bootstrapTable('getSelections');
789 789 if (rows.length == 0) {
790 790 $.modal.alertWarning("请至少选择一条记录");
... ...
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
... ... @@ -525,6 +525,10 @@
525 525 title: '物料名称'
526 526 },
527 527 {
  528 + field : 'materialUnit',
  529 + title : '物料单位'
  530 + },
  531 + {
528 532 field : 'grossWeight',
529 533 title : '毛重',
530 534 },
... ...