Commit 956b1e2ca605ea3969b1fa14dc55c5e9ec132d1d

Authored by 游杰
1 parent d7240042

Fix 历史入库单不能使用

src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/controller/ReceiptHeaderHistoryController.java
... ... @@ -9,12 +9,15 @@ import com.huaheng.common.utils.security.ShiroUtils;
9 9 import com.huaheng.framework.aspectj.lang.annotation.Log;
10 10 import com.huaheng.framework.aspectj.lang.constant.BusinessType;
11 11 import com.huaheng.framework.web.controller.BaseController;
  12 +import com.huaheng.framework.web.domain.AjaxResult;
12 13 import com.huaheng.framework.web.page.PageDomain;
13 14 import com.huaheng.framework.web.page.TableDataInfo;
14 15 import com.huaheng.framework.web.page.TableSupport;
  16 +import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
15 17 import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory;
16 18 import com.huaheng.pc.receipt.receiptHeaderHistory.service.ReceiptHeaderHistoryService;
17 19 import io.swagger.annotations.Api;
  20 +import io.swagger.annotations.ApiOperation;
18 21 import io.swagger.annotations.ApiParam;
19 22 import org.apache.shiro.authz.annotation.RequiresPermissions;
20 23 import org.springframework.stereotype.Controller;
... ... @@ -82,4 +85,20 @@ public class ReceiptHeaderHistoryController extends BaseController {
82 85 return getDataTable(list);
83 86 }
84 87 }
  88 +
  89 + /**
  90 + * 查询入库单
  91 + */
  92 + @ApiOperation(value="查询入库单 ", notes="查询入库单 ", httpMethod = "POST")
  93 + @RequiresPermissions("receipt:receiptDetail:add")
  94 + @Log(title = "入库-入库单 ",operating = "查询入库单 ", action = BusinessType.OTHER)
  95 + @PostMapping("/getReceiptHeader")
  96 + @ResponseBody
  97 + public AjaxResult<ReceiptHeaderHistory> getReceiptHeader(String id) {
  98 + if (StringUtils.isEmpty(id)){
  99 + return AjaxResult.success("");
  100 + }
  101 + return AjaxResult.success(receiptHeaderHistoryService.getById(id));
  102 + }
  103 +
85 104 }
... ...
src/main/resources/application.yml
... ... @@ -9,7 +9,7 @@ huaheng:
9 9 #版本
10 10 version: 4.0.0
11 11 #版权年份
12   - copyrightYear: 2018
  12 + copyrightYear: 2020
13 13 # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
14 14 profile: D:/Huaheng/uploadPath/
15 15 # 获取ip地址开关
... ...
src/main/resources/templates/receipt/receiptDetailHistory/receiptDetailHistory.html
... ... @@ -61,7 +61,7 @@
61 61 updateUrl: prefix + "/edit/{id}",
62 62 removeUrl: prefix + "/remove",
63 63 queryParams: queryParams,
64   - modalName: "入库明细历史",
  64 + modalName: "入库历史明细",
65 65 search: false,
66 66 sortName: "id",
67 67 sortOrder: "desc",
... ...
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... ... @@ -679,7 +679,6 @@
679 679 // $("#tabBase").addClass("in active");
680 680 loadDetail();
681 681 }
682   -
683 682 /* 入库单列表-详细 */
684 683 function loadDetail() {
685 684 $.ajax({
... ...
src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html
... ... @@ -111,21 +111,12 @@
111 111 title : '入库单号'
112 112 },
113 113 {
114   - field : 'referCode',
115   - title : '关联单号'
116   - },
117   - {
118   - field : 'referId',
119   - title : '关联单号(内部号)'
120   - },
121   - {
122   - field : 'referType',
123   - title : '关联订单类型'
124   - },
125   - {
126 114 field : 'companyCode',
127 115 title : '货主编码',
128   - visible:false
  116 + },
  117 + {
  118 + field : 'referCode',
  119 + title : '上游单号'
129 120 },
130 121 {
131 122 field : 'warehouseCode',
... ... @@ -148,26 +139,6 @@
148 139 }
149 140 },
150 141 {
151   - field : 'scheduledArriveDate',
152   - title : '预计到达日期'
153   - },
154   - {
155   - field : 'actualArriveDate',
156   - title : '实际到达日期'
157   - },
158   - {
159   - field : 'startCheckinDatetime',
160   - title : '开始收货日期'
161   - },
162   - {
163   - field : 'endCheckinDatetime',
164   - title : '结束收货日期'
165   - },
166   - {
167   - field : 'recvDock',
168   - title : '月台货位'
169   - },
170   - {
171 142 field : 'closedAt',
172 143 title : '关闭时间',
173 144 visible : false
... ... @@ -230,12 +201,10 @@
230 201 field : 'created',
231 202 title : '创建时间',
232 203 sortable:true,
233   - visible:false
234 204 },
235 205 {
236 206 field : 'createdBy',
237 207 title : '创建用户',
238   - visible:false
239 208 },
240 209 {
241 210 field : 'lastUpdated',
... ... @@ -267,9 +236,244 @@
267 236 $.table.init(options);
268 237 });
269 238  
  239 + $("#bootstrap-table1").bootstrapTable({
  240 + // url: detailPrefix + "/list",
  241 + createUrl: prefix1 + "/add",
  242 + updateUrl: prefix1 + "/edit/{id}",
  243 + removeUrl: prefix1 + "/remove",
  244 + // search: true, //搜索
  245 + sortable: true, //排序
  246 + showRefresh: true, //刷新
  247 + showToggle:true, //视图切换
  248 + clickToSelect: true,
  249 + showColumns:true, //列选择
  250 + // detailView:true,
  251 + showExport: true, //导出
  252 + exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
  253 + modalName: "入库明细",
  254 + sortName: "lastUpdated",
  255 + sortOrder: "desc",
  256 + iconSize: "outline",
  257 + toolbar: "#toolbar1",
  258 + contentType: "application/x-www-form-urlencoded",
  259 + pagination: true, // 是否显示分页(*)
  260 + pageNumber: 1, // 初始化加载第一页,默认第一页
  261 + pageSize: 50, // 每页的记录行数(*)
  262 + pageList: [10, 25, 50, 100], // 可供选择的每页的行数(*)
  263 + onRefresh: function(){
  264 + loadDetail();
  265 + },
  266 + columns: [{
  267 + checkbox: true
  268 + },
  269 + {
  270 + field : 'id',
  271 + title : 'id'
  272 + },
  273 + {
  274 + field : 'receiptCode',
  275 + title : '入库单编码'
  276 + },
  277 + {
  278 + field : 'materialCode',
  279 + title : '物料编码'
  280 + },
  281 + {
  282 + field : 'materialName',
  283 + title : '物料名称'
  284 + },
  285 + {
  286 + field : 'materialSpec',
  287 + title : '物料规格'
  288 + },
  289 + {
  290 + field : 'materialUnit',
  291 + title : '物料单位'
  292 + },
  293 + {
  294 + field : 'supplierCode',
  295 + title : '供应商编码',
  296 + visible:false
  297 + },
  298 + {
  299 + field : 'batch',
  300 + title : '批次'
  301 + },
  302 + {
  303 + field : 'lot',
  304 + title : '批号' ,
  305 + },
  306 + {
  307 + field : 'projectNo',
  308 + title : '项目号' ,
  309 + },
  310 + {
  311 + field : 'qcCheck',
  312 + title : '是否质检',
  313 + align : "center",
  314 + formatter: function(value, row, index) {
  315 + var actions = [];
  316 + if (value == 0) {
  317 + actions.push("<span class='badge badge-info'>是</span>");
  318 + } else {
  319 + actions.push("<span class='badge badge-info'>否</span>");
  320 + }
  321 + return actions.join('');
  322 + },
  323 + visible:false
  324 + },
  325 + {
  326 + field : 'projectNo',
  327 + title : '项目号',
  328 + visible:false
  329 + },
  330 + {
  331 + field : 'manufactureDate',
  332 + title : '生产日期',
  333 + visible:false
  334 + },
  335 + {
  336 + field : 'expirationDate',
  337 + title : '失效日期' ,
  338 + visible:false
  339 + },
  340 + {
  341 + field : 'agingDate',
  342 + title : '入库日期' ,
  343 + visible:false
  344 + },
  345 + {
  346 + field : 'totalQty',
  347 + title : '总数量'
  348 + },
  349 + {
  350 + field : 'openQty',
  351 + title : '已收数量'
  352 + },
  353 + {
  354 + field : 'referCode',
  355 + title : 'ERP单号',
  356 + visible : false
  357 + },
  358 + {
  359 + field : 'referId',
  360 + title : 'ERP内部号',
  361 + visible : false
  362 + },
  363 + {
  364 + field : 'referLineNum',
  365 + title : 'ERP行号',
  366 + visible : false
  367 + },
  368 + {
  369 + field : 'locatingRule',
  370 + title : '定位规则',
  371 + visible:false
  372 + },
  373 + {
  374 + field : 'inventorySts',
  375 + title : '库存状态',
  376 + visible : false
  377 + },
  378 + {
  379 + field : 'itemListPrice',
  380 + title : '标价',
  381 + visible:false
  382 + },
  383 + {
  384 + field : 'itemNetPrice',
  385 + title : '净价',
  386 + visible:false
  387 + },
  388 + {
  389 + field : 'price',
  390 + title : '单价' ,
  391 + visible:false
  392 + },
  393 + {
  394 + field : 'statusFlowCode',
  395 + title : '流程编码',
  396 + visible:false
  397 + },
  398 + {
  399 + field : 'isVirtualBom',
  400 + title : '是否虚拟套件',
  401 + align : "center",
  402 + formatter: function(value, row, index) {
  403 + return $.table.selectDictLabel(isVirtualBoms, value);
  404 + },
  405 + visible:false
  406 + },
  407 + {
  408 + field : 'created',
  409 + title : '创建时间'
  410 + },
  411 + {
  412 + field : 'createdBy',
  413 + title : '创建用户',
  414 + visible:false
  415 + },
  416 + {
  417 + field : 'lastUpdated',
  418 + title : '最后修改时间',
  419 + visible:false
  420 + },
  421 + {
  422 + field : 'lastUpdatedBy',
  423 + title : '更新用户' ,
  424 + visible:false
  425 + },
  426 + {
  427 + field : 'userDef1',
  428 + title : '自定义字段1' ,
  429 + visible:false
  430 + },
  431 + {
  432 + field : 'userDef2',
  433 + title : '自定义字段2' ,
  434 + visible:false
  435 + },
  436 + {
  437 + field : 'userDef3',
  438 + title : '自定义字段3' ,
  439 + visible:false
  440 + },
  441 + {
  442 + title: '操作',
  443 + align: 'center',
  444 + events:'operateEvents',
  445 + formatter: function(value, row, index) {
  446 + var actions = [];
  447 + actions.push('<a id="table_edit" class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  448 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
  449 + return actions.join('');
  450 + }
  451 + }]
  452 + });
  453 +
  454 + /* 入库单列表-详细 */
270 455 function detail(id, code) {
271   - var url = prefix1+"/list/" + id;
272   - createtable(url);
  456 + receiptId = id;
  457 + receiptCode=code;
  458 + $("#myTab li").removeClass("active");
  459 + $("#tabHeader").removeClass("in active");
  460 + $("#myTab li:eq(1)").addClass("active");
  461 + $("#tabDetail").addClass("in active");
  462 + // $("#tabBase").addClass("in active");
  463 + loadDetail();
  464 + }
  465 +
  466 + function loadDetail() {
  467 + $.ajax({
  468 + url:ctx + 'receipt/receiptDetailHistory/list',
  469 + type:"post",
  470 + data:{
  471 + receiptId:receiptId,
  472 + },
  473 + success:function (value) {
  474 + $("#bootstrap-table1").bootstrapTable('load',value.data);
  475 + }
  476 + });
273 477 }
274 478  
275 479 function createtable(url) {
... ...