作者 赵超

前段页面合并 与修改

@@ -13,14 +13,38 @@ @@ -13,14 +13,38 @@
13 color: #FF0000; 13 color: #FF0000;
14 margin-right: 5px; 14 margin-right: 5px;
15 } 15 }
  16 + .content{
  17 + position:relative;
  18 + left:0;
  19 + top:0;
  20 + z-index:0;
  21 + }
  22 + #con_ten{
  23 + opacity:0.2;
  24 + background:#000000;
  25 + z-index:0;
  26 + position:absolute;
  27 + }
  28 + #searchForm{
  29 + left:0;
  30 + }
  31 + #dg_01{
  32 + position:absolute;
  33 + opacity:0.2;
  34 + left:0;
  35 + background:#000000;
  36 + }
16 </style> 37 </style>
17 </head> 38 </head>
18 <body> 39 <body>
19 <div class="container"> 40 <div class="container">
20 - <div id="tt" class="easyui-tabs" style="width: 100%;">  
21 - <div title="入库表头" style="overflow: auto; padding: 20px;">  
22 - <div class="content" ms-controller="container"> 41 +
  42 + <!-- <div id="tt" class="easyui-tabs" style="width: 100%;">
  43 + <div title="入库表头" style="overflow: auto; padding: 20px;"> -->
  44 + <div id="con_ten"></div>
  45 + <div class="content" ms-controller="container" id="contentfer">
23 <form class="from-control" id="editForm"> 46 <form class="from-control" id="editForm">
  47 + <P class="easyui-panel" title="入库表头" >
24 <input type="hidden" name="id" ms-duplex="@data.id"> 48 <input type="hidden" name="id" ms-duplex="@data.id">
25 <input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/> 49 <input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/>
26 <table class="kv-table"> 50 <table class="kv-table">
@@ -284,21 +308,107 @@ @@ -284,21 +308,107 @@
284 </tbody> 308 </tbody>
285 </table> 309 </table>
286 </form> 310 </form>
  311 +
287 </div> 312 </div>
288 - </div> 313 + <!-- </div>
289 <div title="入库表体" style="padding: 20px; "></div> 314 <div title="入库表体" style="padding: 20px; "></div>
290 - </div> 315 + </div> -->
  316 + <div id='dg_01'></div>
  317 + <form id="searchForm">
  318 + <table id="dg" style="width:100%;height:554px"
  319 + title="入库表体列表" data-options="
  320 + rownumbers:true,
  321 + singleSelect:false,
  322 + autoRowHeight:false,
  323 + pagination:true,
  324 + fitColumns:true,
  325 + striped:true,
  326 + collapsible:true,
  327 + toolbar:'#tb',
  328 + pageSize:10">
  329 + <thead>
  330 + <tr>
  331 + <th field="id" checkbox="true"></th>
  332 + <th field="." formatter="editFormat" width="16">编辑</th>
  333 + <th field="storeBillNo" sortable="true" width="70">进库单号</th>
  334 + <th field="copGNo" width="100">货号</th>
  335 + <th field="gNo" width="50">项号</th>
  336 + <th field="codeTS" width="50">商品编码</th>
  337 + <th field="gName" width="50">货物名称</th>
  338 + <th field="gModel" width="50">货物规格</th>
  339 + <th field="eciGoodsFlagName" width="50">成品料件标志</th>
  340 + <th field="currName" width="50">货币</th>
  341 + </tr>
  342 + </thead>
  343 + </table>
  344 + <div id="tb" style="padding:0 30px;" ms-controller="container1">
  345 + <input type="hidden" name="headId" value="<%=request.getParameter("id")%>">
  346 + <div>
  347 + <label>进库单号:</label>
  348 + <input class="easyui-textbox" type="text" name="storeBillNo" id="storeBillNo"
  349 + style="width:200px;height:35px;line-height:35px;"/>
  350 + <label>货号:</label>
  351 + <input class="easyui-textbox" type="text" name="copGNo" id="copGNo"
  352 + style="width:200px;height:35px;line-height:35px;"/>
  353 + <label>商品编码:</label>
  354 + <input class="easyui-textbox" type="text" name="codeTS" id="codeTS"
  355 + style="width:200px;height:35px;line-height:35px;"/>
  356 + <label>成品料件标志:</label>
  357 + <select id="eciGoodsFlag" name="eciGoodsFlag" style="width:140px;height:35px;line-height:35px;">
  358 + <option></option>
  359 + <option ms-for="(k,v) in @eciGoodsFlag"
  360 + ms-attr="{id:'sFlag_'+@eciGoodsFlag[k].id,value:@eciGoodsFlag[k].parCode}">
  361 + {{v.parName}}
  362 + </option>
  363 + </select>
  364 + </div>
  365 + <div>
  366 + <label>货物名称:</label>
  367 + <input class="easyui-textbox" type="text" name="gName" id="gName"
  368 + style="width:150px;height:35px;line-height:35px;"/>
  369 + <label>货物规格:</label>
  370 + <input class="easyui-textbox" type="text" name="gModel" id="gModel"
  371 + style="width:150px;height:35px;line-height:35px;"/>
  372 + &nbsp;&nbsp;
  373 + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
  374 + data-options="selected:true">查询</a>
  375 + <a id="add"
  376 + class="easyui-linkbutton add" iconCls="icon-add">新增</a>
  377 + <a href="javascript:doDelete()" class="easyui-linkbutton delete" iconCls="icon-remove">删除</a>
  378 + <a id="import" href="javascript:void(0);" class="easyui-linkbutton add"
  379 + iconCls="icon-add">导入</a>
  380 + <a id="edithead" class="easyui-linkbutton" >编辑表头</a>
  381 + <a id="add" href="<%=request.getContextPath() %>/resource/excel/inStoragePreList.xlsx" class="easyui-linkbutton"
  382 + iconCls="icon-save">模板下载</a>
  383 + <a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"
  384 + data-options="selected:true" >物权所有人</a>
  385 + <!-- <a id="" href="javascript:return void(0)" class="easyui-linkbutton" iconCls="icon-redo">发送海关</a> -->
  386 + </div>
  387 + </div>
  388 + </form>
291 </div> 389 </div>
292 <script> 390 <script>
293 //定义 avalon 391 //定义 avalon
294 var datavm = avalon.define({ 392 var datavm = avalon.define({
295 $id: "container", 393 $id: "container",
296 - data: ${entity}, 394 + data:${entity},
297 goodsType: [], 395 goodsType: [],
298 storeType: [] 396 storeType: []
299 }); 397 });
300 -  
301 - //入库时间 398 + function pagerFilter(data) {
  399 + if (data.data) {
  400 + data = data.data;
  401 + }
  402 + return data;
  403 + }
  404 +
  405 + //定义 avalon
  406 + var datavm1 = avalon.define({
  407 + $id: "container1",
  408 + eciGoodsFlag: [],
  409 +
  410 + });
  411 + //入库时间
302 var endTime_start = { 412 var endTime_start = {
303 elem: '#inStartDate', 413 elem: '#inStartDate',
304 format: 'YYYY-MM-DD', 414 format: 'YYYY-MM-DD',
@@ -425,7 +535,13 @@ @@ -425,7 +535,13 @@
425 //初始化选项值 535 //初始化选项值
426 if (datavm.data.storeType != "") { 536 if (datavm.data.storeType != "") {
427 //修改 537 //修改
428 - $('#sstoreType_' + datavm.storeType[datavm.data.storeType - 1].id).attr("selected", true) 538 + /* $('#sstoreType_' + datavm.data.storeType).attr("selected", true) */
  539 + //修改
  540 + if (datavm.data.storeType == 'SJ01') {
  541 + $('#sstoreType_' + datavm.storeType[1].id).attr("selected", true);
  542 + }else {
  543 + $('#sstoreType_' + datavm.storeType[0].id).attr("selected", true);
  544 + }
429 } else { 545 } else {
430 //新增 546 //新增
431 } 547 }
@@ -460,6 +576,19 @@ @@ -460,6 +576,19 @@
460 } 576 }
461 }); 577 });
462 } 578 }
  579 + function doName(){
  580 + var id = ${bookId};
  581 + var par = {};
  582 + par.id=id;
  583 + $.post("<%=request.getContextPath()%>/rest/eptBook/findByPK", par, function(result) {
  584 + if(result.status==200){
  585 + datavm.data = result.data;
  586 + $("#wq").text('物权所有人:'+result.data.contCustom);
  587 + }else{
  588 + $.messager.alert("提示", result.msg);
  589 + }
  590 + });
  591 + }
463 //保存 592 //保存
464 function doSave() { 593 function doSave() {
465 var data = $("#editForm").serializeJson(); 594 var data = $("#editForm").serializeJson();
@@ -473,7 +602,22 @@ @@ -473,7 +602,22 @@
473 } 602 }
474 $.post(url, data, function (result) { 603 $.post(url, data, function (result) {
475 if (result.status == 200) { 604 if (result.status == 200) {
476 - window.location.href = "<%=request.getContextPath()%>/inStoragePre/list"; 605 + <%-- window.location.href = "<%=request.getContextPath()%>/inStoragePre/list"; --%>
  606 + /* $('#editForm').find('input,textarea,select').prop('readonly',true); */
  607 + var height = $('#contentfer').height();
  608 + var width = $('#contentfer').width();
  609 + console.log(height);
  610 + console.log(width);
  611 + $("#con_ten").css('height',height);
  612 + $("#con_ten").css('width',width);
  613 + $("#con_ten").css('z-index','5');
  614 + $("#dg_01").css('z-index','0');
  615 + $("#con_ten").css('opacity','0.2');
  616 + headId = <%=request.getParameter("id")%>;
  617 + if(headId==null){
  618 + window.location.href = "<%=request.getContextPath()%>/inStoragePre/list?son=1";
  619 + }
  620 + //$("#con_ten").css('display','block');
477 } else { 621 } else {
478 var html = result.msg + "<br/>"; 622 var html = result.msg + "<br/>";
479 if (result.data) { 623 if (result.data) {
@@ -495,21 +639,88 @@ @@ -495,21 +639,88 @@
495 } 639 }
496 }); 640 });
497 } 641 }
498 - 642 + function initeciGoodsFlag() {
  643 + var par = {};
  644 + par.parType = 6;
  645 + console.log('我进来了');
  646 + $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
  647 + if (result.status == 200) {
  648 + datavm1.eciGoodsFlag = result.data;
  649 + console.log(datavm1.eciGoodsFlag);
  650 + } else {
  651 + $.messager.alert("提示", result.msg);
  652 + }
  653 + });
  654 + }
  655 + $(function () {
  656 + headId=<%=request.getParameter("id")%>;
  657 + if(headId!=null){
  658 + initeciGoodsFlag();
  659 + doName();
  660 + $('#dg').datagrid({
  661 + url: '<%=request.getContextPath()%>/rest/eptStoreBillInList/pageByHeadId',
  662 + queryParams: {headId:<%=request.getParameter("id")%>},
  663 + pagination: true,
  664 + rownumbers: true,
  665 + loadFilter: pagerFilter
  666 + });
  667 + }
  668 + });
  669 + $('#import').on('click', function(){
  670 + layer.open({
  671 + type: 2,
  672 + title:'入库申请单导入',
  673 + area: ['520px', '300px'],
  674 + shadeClose: true, //点击遮罩关闭
  675 + content: '<%=request.getContextPath()%>/inStoragePre/body/popImport?headId=<%=request.getParameter("id")%>'
  676 + });
  677 + });
  678 + $('#add').on('click', function(){
  679 + var seqNo = $("#seqNo").val();
  680 + var htmlherf="";
  681 + htmlherf+='<%=request.getContextPath()%>/inStoragePre/body/edit?headId=<%=request.getParameter("id")%>&seqNo='
  682 + htmlherf+=seqNo
  683 + location.href=htmlherf;
  684 + console.log(htmlherf)
  685 + });
  686 + $('#edithead').on('click', function(){
  687 + $("#con_ten").css('z-index','0');
  688 + $("#con_ten").css('opacity','0');
  689 + var height1 = $('#contentfer').height();
  690 + var height = $('#searchForm').height();
  691 + var width = $('#searchForm').width();
  692 + $("#dg_01").css('height',height);
  693 + $("#dg_01").css('width',width);
  694 + $("#dg_01").css('top',height1)
  695 + $("#dg_01").css('z-index','5');
  696 +
  697 + });
  698 +
499 $(document).ready(function () { 699 $(document).ready(function () {
500 //laydate(endTime_start); 700 //laydate(endTime_start);
501 //laydate(endTime_end); 701 //laydate(endTime_end);
502 laydate(preendTime_start); 702 laydate(preendTime_start);
503 laydate(preendTime_end); 703 laydate(preendTime_end);
504 var headId = null; 704 var headId = null;
505 - <%if(request.getParameter("id")==null){%> 705 + //赋值表体的宽 高
  706 + <%if(request.getParameter("id")==null){%>
506 initFormData(); 707 initFormData();
507 inittradesCode(); 708 inittradesCode();
508 <%}else{%> 709 <%}else{%>
509 headId = <%=request.getParameter("id")%> 710 headId = <%=request.getParameter("id")%>
510 loadData(<%=request.getParameter("id")%>); 711 loadData(<%=request.getParameter("id")%>);
511 - <%}%>  
512 - var tabs = $('#tt').tabs().tabs('tabs'); 712 + <%}%>
  713 + var height = $('#contentfer').height();
  714 + var width = $('#contentfer').width();
  715 + $("#con_ten").css('height',height);
  716 + $("#con_ten").css('width',width);
  717 + $("#con_ten").css('z-index','2');
  718 + if(headId==null){
  719 + $("#searchForm").css('opacity','0');
  720 + $("#con_ten").css('z-index','0');
  721 + $("#con_ten").css('opacity','0');
  722 + }
  723 +<%-- var tabs = $('#tt').tabs().tabs('tabs');
513 for (var i = 0; i < tabs.length; i++) { 724 for (var i = 0; i < tabs.length; i++) {
514 tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) { 725 tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) {
515 if (e.data.index == 1 && headId != null) { 726 if (e.data.index == 1 && headId != null) {
@@ -520,8 +731,55 @@ @@ -520,8 +731,55 @@
520 return false; 731 return false;
521 } 732 }
522 }); 733 });
523 - } 734 + } --%>
524 }); 735 });
  736 +
  737 +
  738 + function editFormat(val, row, index) {
  739 + var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
  740 + return html;
  741 + }
  742 +
  743 + function editRow(id) {
  744 + window.location.href = '<%=request.getContextPath() %>/inStoragePre/body/edit?id=' + id + '&headId=' + <%=request.getParameter("id")%>;
  745 + }
  746 +
  747 + function doSearch() {
  748 + console.log(clearJson($("#searchForm").serializeJson()));
  749 + $('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
  750 + $('#dg').datagrid("reload");
  751 + }
  752 +
  753 +
  754 +
  755 + function doDelete() {
  756 + var rows = $('#dg').datagrid('getChecked');
  757 + if (rows.length == 0) {
  758 + $.messager.alert("提示", "请先选中要删除的行!");
  759 + return false;
  760 + }
  761 + $.messager.confirm("提示", "确定要删除么?", function (r) {
  762 + if (r) {
  763 + var ids = '';
  764 + for (var i = 0; i < rows.length; i++) {
  765 + if (ids == '') {
  766 + ids = rows[i].id;
  767 + } else {
  768 + ids += ',' + rows[i].id;
  769 + }
  770 + }
  771 + var par = {};
  772 + par.ids = ids;
  773 + $.post("<%=request.getContextPath()%>/rest/eptStoreBillInList/delete", par, function (data) {
  774 + if (data.status == 200) {
  775 + doSearch();
  776 + } else {
  777 + $.messager.alert("提示", data.msg);
  778 + }
  779 + });
  780 + }
  781 + });
  782 + }
525 </script> 783 </script>
526 </body> 784 </body>
527 </html> 785 </html>
1 -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>  
2 -<!DOCTYPE html>  
3 -<html lang="en">  
4 -<head>  
5 - <meta charset="utf-8">  
6 - <meta name="viewport" content="width=device-width, initial-scale=1">  
7 - <title>入库列表</title>  
8 - <jsp:include page="../../template/head.jsp"></jsp:include>  
9 -</head>  
10 -<body>  
11 -<div class="container">  
12 - <form id="searchForm">  
13 - <table id="dg" style="width:100%;height:554px"  
14 - title="入库列表" data-options="  
15 - rownumbers:true,  
16 - singleSelect:false,  
17 - autoRowHeight:false,  
18 - pagination:true,  
19 - fitColumns:true,  
20 - striped:true,  
21 - collapsible:true,  
22 - toolbar:'#tb',  
23 - pageSize:10">  
24 - <thead>  
25 - <tr>  
26 - <th field="id" checkbox="true"></th>  
27 - <th field="." formatter="editFormat" width="16">编辑</th>  
28 - <!-- <th field="platNo2" sortable="true" width="70">外部企业编码</th> -->  
29 - <th field="tradesCode" width="80">预录入编号</th>  
30 - <!-- <th field="entryId" width="100">报关单号</th> -->  
31 - <th field="ordersNo" width="50">提运单号</th>  
32 - <th field="storeTypeName" width="50">入库方式</th>  
33 - <th field="goodsTypeName" width="50">货物流向</th>  
34 - <th field="remark" width="50">发送状态</th>  
35 - <th field="inReportName"formatter="findReport" width="50">入库申请状态</th>  
36 - <th field="inApprName" formatter="findAPPR" width="50">入库审批状态</th>  
37 - </tr>  
38 - </thead>  
39 - </table>  
40 - <div id="tb" style="padding:0 30px;" ms-controller="container">  
41 - <!-- <label>外部企业编码:</label>  
42 - <input class="easyui-textbox" type="text" name="platNo2" id="platNo2"  
43 - style="width:160px;height:35px;line-height:35px;"/> -->  
44 - <label>提运单号: </label>  
45 - <input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"  
46 - style="width:160px;height:35px;line-height:35px;"/>  
47 - <label>预录入编号: </label>  
48 - <input class="easyui-textbox" type="text" name="tradesCode" id="tradesCode"  
49 - style="width:160px;height:35px;line-height:35px;"/>  
50 - <!-- <label>报关单号: </label>  
51 - <input class="easyui-textbox" type="text" name="entryId" id="entryId"  
52 - style="width:160px;height:35px;line-height:35px;"/> -->  
53 - <label>入库方式: </label>  
54 - <select id="storeType" name="storeType" style="width:150px;height:35px;line-height:35px;">  
55 - <option></option>  
56 - <option ms-for="(k,v) in @storeType"  
57 - ms-attr="{id:'storeType_'+@storeType[k].id,value:@storeType[k].id}">  
58 - {{v.parName}}  
59 - </option>  
60 - </select>&nbsp;&nbsp;  
61 - <label>货物流向: </label>  
62 - <select id="goodsType" name="goodsType" style="width:150px;height:35px;line-height:35px;">  
63 - <option></option>  
64 - <option ms-for="(k,v) in @goodsType"  
65 - ms-attr="{id:'sType_'+@goodsType[k].id,value:@goodsType[k].id}">  
66 - {{v.parName}}  
67 - </option>  
68 - </select>  
69 - &nbsp;&nbsp;  
70 - <label>入库申请状态:</label>  
71 - <select id="status" name="status" style="width:80px;height:35px;line-height:35px;">  
72 - <option></option>  
73 - <option value="0">申请成功</option>  
74 - <option value="1">申请失败 </option>  
75 - <option value="2">待申请</option>  
76 -  
77 - </select>  
78 - &nbsp;&nbsp;  
79 - <label>入库审批状态:</label>  
80 - <select id="statusMsg" name="statusMsg" style="width:80px;height:35px;line-height:35px;">  
81 - <option></option>  
82 - <option value="0">审批成功</option>  
83 - <option value="1">审批失败 </option>  
84 - <option value="2">待审批 </option>  
85 -  
86 - </select><br>  
87 - <!-- <label>提单号/转关单号: </label>  
88 - <input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"  
89 - style="width:160px;height:35px;line-height:35px;"/> -->  
90 - <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"  
91 - data-options="selected:true" >查询</a>  
92 - <a id="add" href="<%=request.getContextPath()%>/inStoragePre/edit" class="easyui-linkbutton add"  
93 - iconCls="icon-add">新增</a>  
94 - <a href="javascript:doDelete()" class="easyui-linkbutton delete" iconCls="icon-remove">删除</a>  
95 - <a id="" href="javascript:doSend()" class="easyui-linkbutton" iconCls="icon-redo">发送海关</a>  
96 - <a id="imp" href="javascript:void(0);" class="easyui-linkbutton add"  
97 - iconCls="icon-add">导入</a>  
98 - <a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"  
99 - data-options="selected:true" >物权所有人</a>  
100 - </div>  
101 - </form>  
102 -</div>  
103 -  
104 -<script>  
105 - //定义 avalon  
106 - var datavm = avalon.define({  
107 - $id: "container",  
108 - goodsType: [],  
109 - storeType: []  
110 - });  
111 -  
112 - function pagerFilter(data) {  
113 - if (data.data) {  
114 - data = data.data;  
115 - }  
116 - return data;  
117 - }  
118 -  
119 - function initgoodsType() {  
120 - var par = {};  
121 - par.parType = 5;  
122 - par.parCode='进库';  
123 - $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {  
124 - if (result.status == 200) {  
125 - datavm.goodsType = result.data  
126 - } else {  
127 - $.messager.alert("提示", result.msg);  
128 - }  
129 - });  
130 - }  
131 -  
132 - function initstoreType() {  
133 - var par = {};  
134 - par.parType = 4;  
135 - $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {  
136 - if (result.status == 200) {  
137 - datavm.storeType = result.data;  
138 - } else {  
139 - $.messager.alert("提示", result.msg);  
140 - }  
141 - });  
142 - }  
143 -  
144 - function doName(){  
145 - var id = ${bookId};  
146 - var par = {};  
147 - par.id=id;  
148 - $.post("<%=request.getContextPath()%>/rest/eptBook/findByPK", par, function(result) {  
149 - if(result.status==200){  
150 - datavm.data = result.data;  
151 - $("#wq").text('物权所有人:'+result.data.contCustom);  
152 - }else{  
153 - $.messager.alert("提示", result.msg);  
154 - }  
155 - });  
156 - }  
157 -  
158 - function doDelete() {  
159 - var rows = $('#dg').datagrid('getChecked');  
160 - if (rows.length == 0) {  
161 - $.messager.alert("提示", "请先选中要删除的行!");  
162 - return false;  
163 - }  
164 - $.messager.confirm("提示", "确定要删除么?", function (r) {  
165 - if (r) {  
166 - var ids = '';  
167 - for (var i = 0; i < rows.length; i++) {  
168 - if (ids == '') {  
169 - ids = rows[i].id;  
170 - } else {  
171 - ids += ',' + rows[i].id;  
172 - }  
173 - }  
174 - var par = {};  
175 - par.ids = ids;  
176 - $.post("<%=request.getContextPath()%>/rest/eptStoreBillInHead/delete", par, function (data) {  
177 - if (data.status == 200) {  
178 - doSearch();  
179 - } else {  
180 - $.messager.alert("提示", data.msg);  
181 - }  
182 - });  
183 - }  
184 - });  
185 - }  
186 - //入库集报  
187 -  
188 - function doSend(){  
189 - var rows = $('#dg').datagrid('getChecked');  
190 - if (rows.length == 0) {  
191 - $.messager.alert("提示", "请先选中要发送的行!");  
192 - return false;  
193 - }  
194 - $.messager.confirm("提示", "确定要【发送海关】吗?", function (r) {  
195 - if(r){  
196 - var ids = '';  
197 - for (var i = 0; i < rows.length; i++) {  
198 - if (ids == '') {  
199 - ids = rows[i].id;  
200 - } else {  
201 - ids += ',' + rows[i].id;  
202 - }  
203 - }  
204 - var par = {};  
205 - par.ids = ids;  
206 - $.post("<%=request.getContextPath()%>/inStoragePre/inReport", par, function(result) {  
207 - if(result.status==200){  
208 - $.messager.confirm("提示", "提交成功,是否查看报文内容", function (r) {  
209 - if(r){  
210 - parent.layer.open({  
211 - type: 1,  
212 - title:'报文内容',  
213 - area: ['600px', '400px'],  
214 - shadeClose: true, //点击遮罩关闭  
215 - content: "<pre>"+result.data+"</pre>"  
216 - });  
217 - }  
218 - });  
219 - }else{  
220 - $.messager.alert("提示", result.msg);  
221 - }  
222 - });  
223 - }  
224 - });  
225 - }  
226 -  
227 - function editFormat(val, row, index) {  
228 - var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';  
229 - return html;  
230 - }  
231 -  
232 - function editRow(id) {  
233 - window.location.href = '<%=request.getContextPath() %>/inStoragePre/edit?id=' + id;  
234 - }  
235 -  
236 - function findReport(val, row, index) {  
237 - var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findByPK(' + row.id + ')">'+row.inReportName+'</a>';  
238 - return html;  
239 - }  
240 -  
241 - function findAPPR(val, row, index) {  
242 - var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findAPPRByPK(' + row.id + ')">'+row.inApprName+'</a>';  
243 - return html;  
244 - }  
245 -  
246 - function findByPK(id){  
247 - $.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {  
248 - if (result.status == 200) {  
249 - var seqNo = result.data.seqNo;  
250 - findBySeqNo(seqNo);  
251 - }else{  
252 - $.messager.alert("提示", result.msg);  
253 - }  
254 - });  
255 -  
256 - }  
257 -  
258 - function findAPPRByPK(id){  
259 - $.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {  
260 - if (result.status == 200) {  
261 - var seqNo = result.data.seqNo;  
262 - findAPPRBySeqNo(seqNo);  
263 - }else{  
264 - $.messager.alert("提示", result.msg);  
265 - }  
266 - });  
267 -  
268 - }  
269 -  
270 - function findBySeqNo(seqNo){  
271 - /* if(storeInNo == null || storeInNo== ""){  
272 - alert("请输入进库单号")  
273 - }else{ */  
274 - layer.open({  
275 - type: 2,  
276 - title: seqNo + '回执内容',  
277 - shadeClose: false,  
278 - shade: false,  
279 - maxmin: true, //开启最大化最小化按钮  
280 - area: ['920px', '420px'],  
281 - content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BRET'  
282 - });  
283 - }  
284 -  
285 - function findAPPRBySeqNo(seqNo){  
286 - /* if(storeInNo == null || storeInNo== ""){  
287 - alert("请输入进库单号")  
288 - }else{ */  
289 - layer.open({  
290 - type: 2,  
291 - title: seqNo + '回执内容',  
292 - shadeClose: false,  
293 - shade: false,  
294 - maxmin: true, //开启最大化最小化按钮  
295 - area: ['920px', '420px'],  
296 - content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BAPPR'  
297 - });  
298 - }  
299 -  
300 - function doSearch() {  
301 - $('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());  
302 - $('#dg').datagrid("reload");  
303 - }  
304 -  
305 - $(function () {  
306 - initgoodsType();  
307 - initstoreType();  
308 - doName();  
309 - $('#dg').datagrid({  
310 - url: '<%=request.getContextPath()%>/rest/eptStoreBillInHead/page',  
311 - queryParams: {},  
312 - pagination: true,  
313 - rownumbers: true,  
314 - loadFilter: pagerFilter  
315 - });  
316 - $('#imp').on('click', function(){  
317 - layer.open({  
318 - type: 2,  
319 - title:'进库单导入',  
320 - area: ['520px', '300px'],  
321 - shadeClose: true, //点击遮罩关闭  
322 - content: '<%=request.getContextPath()%>/inStoragePre/popImport'  
323 - });  
324 - });  
325 -  
326 - });  
327 -</script>  
328 -</body>  
329 -</html> 1 +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
  2 +<!DOCTYPE html>
  3 +<html lang="en">
  4 +<head>
  5 + <meta charset="utf-8">
  6 + <meta name="viewport" content="width=device-width, initial-scale=1">
  7 + <title>入库列表</title>
  8 + <jsp:include page="../../template/head.jsp"></jsp:include>
  9 +</head>
  10 +<body>
  11 +<div class="container">
  12 + <form id="searchForm">
  13 + <table id="dg" style="width:100%;height:554px"
  14 + title="入库列表" data-options="
  15 + rownumbers:true,
  16 + singleSelect:false,
  17 + autoRowHeight:false,
  18 + pagination:true,
  19 + fitColumns:true,
  20 + striped:true,
  21 + collapsible:true,
  22 + toolbar:'#tb',
  23 + pageSize:10">
  24 + <thead>
  25 + <tr>
  26 + <th field="id" checkbox="true"></th>
  27 + <th field="." formatter="editFormat" width="16">编辑</th>
  28 + <!-- <th field="platNo2" sortable="true" width="70">外部企业编码</th> -->
  29 + <th field="tradesCode" width="80">预录入编号</th>
  30 + <!-- <th field="entryId" width="100">报关单号</th> -->
  31 + <th field="ordersNo" width="50">提运单号</th>
  32 + <th field="storeTypeName" width="50">入库方式</th>
  33 + <th field="goodsTypeName" width="50">货物流向</th>
  34 + <th field="remark" width="50">发送状态</th>
  35 + <th field="inReportName"formatter="findReport" width="50">入库申请状态</th>
  36 + <th field="inApprName" formatter="findAPPR" width="50">入库审批状态</th>
  37 + </tr>
  38 + </thead>
  39 + </table>
  40 + <div id="tb" style="padding:0 30px;" ms-controller="container">
  41 + <!-- <label>外部企业编码:</label>
  42 + <input class="easyui-textbox" type="text" name="platNo2" id="platNo2"
  43 + style="width:160px;height:35px;line-height:35px;"/> -->
  44 + <label>提运单号: </label>
  45 + <input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"
  46 + style="width:160px;height:35px;line-height:35px;"/>
  47 + <label>预录入编号: </label>
  48 + <input class="easyui-textbox" type="text" name="tradesCode" id="tradesCode"
  49 + style="width:160px;height:35px;line-height:35px;"/>
  50 + <!-- <label>报关单号: </label>
  51 + <input class="easyui-textbox" type="text" name="entryId" id="entryId"
  52 + style="width:160px;height:35px;line-height:35px;"/> -->
  53 + <label>入库方式: </label>
  54 + <select id="storeType" name="storeType" style="width:150px;height:35px;line-height:35px;">
  55 + <option></option>
  56 + <option ms-for="(k,v) in @storeType"
  57 + ms-attr="{id:'storeType_'+@storeType[k].id,value:@storeType[k].id}">
  58 + {{v.parName}}
  59 + </option>
  60 + </select>&nbsp;&nbsp;
  61 + <label>货物流向: </label>
  62 + <select id="goodsType" name="goodsType" style="width:150px;height:35px;line-height:35px;">
  63 + <option></option>
  64 + <option ms-for="(k,v) in @goodsType"
  65 + ms-attr="{id:'sType_'+@goodsType[k].id,value:@goodsType[k].id}">
  66 + {{v.parName}}
  67 + </option>
  68 + </select>
  69 + &nbsp;&nbsp;
  70 + <label>入库申请状态:</label>
  71 + <select id="status" name="status" style="width:80px;height:35px;line-height:35px;">
  72 + <option></option>
  73 + <option value="0">申请成功</option>
  74 + <option value="1">申请失败 </option>
  75 + <option value="2">待申请</option>
  76 +
  77 + </select>
  78 + &nbsp;&nbsp;
  79 + <label>入库审批状态:</label>
  80 + <select id="statusMsg" name="statusMsg" style="width:80px;height:35px;line-height:35px;">
  81 + <option></option>
  82 + <option value="0">审批成功</option>
  83 + <option value="1">审批失败 </option>
  84 + <option value="2">待审批 </option>
  85 +
  86 + </select><br>
  87 + <!-- <label>提单号/转关单号: </label>
  88 + <input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"
  89 + style="width:160px;height:35px;line-height:35px;"/> -->
  90 + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
  91 + data-options="selected:true" >查询</a>
  92 + <a id="add" href="<%=request.getContextPath()%>/inStoragePre/edit" class="easyui-linkbutton add"
  93 + iconCls="icon-add">新增</a>
  94 + <a href="javascript:doDelete()" class="easyui-linkbutton delete" iconCls="icon-remove">删除</a>
  95 + <a id="" href="javascript:doSend()" class="easyui-linkbutton" iconCls="icon-redo">发送海关</a>
  96 + <a id="imp" href="javascript:void(0);" class="easyui-linkbutton add"
  97 + iconCls="icon-add">导入</a>
  98 + <a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"
  99 + data-options="selected:true" >物权所有人</a>
  100 + </div>
  101 + </form>
  102 +</div>
  103 +
  104 +<script>
  105 + //定义 avalon
  106 + var datavm = avalon.define({
  107 + $id: "container",
  108 + goodsType: [],
  109 + storeType: []
  110 + });
  111 +
  112 + function pagerFilter(data) {
  113 + if (data.data) {
  114 + data = data.data;
  115 + }
  116 + return data;
  117 + }
  118 +
  119 + function initgoodsType() {
  120 + var par = {};
  121 + par.parType = 5;
  122 + par.parCode='进库';
  123 + $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
  124 + if (result.status == 200) {
  125 + datavm.goodsType = result.data
  126 + } else {
  127 + $.messager.alert("提示", result.msg);
  128 + }
  129 + });
  130 + }
  131 +
  132 + function initstoreType() {
  133 + var par = {};
  134 + par.parType = 4;
  135 + $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
  136 + if (result.status == 200) {
  137 + datavm.storeType = result.data;
  138 + } else {
  139 + $.messager.alert("提示", result.msg);
  140 + }
  141 + });
  142 + }
  143 +
  144 + function doName(){
  145 + var id = ${bookId};
  146 + var par = {};
  147 + par.id=id;
  148 + $.post("<%=request.getContextPath()%>/rest/eptBook/findByPK", par, function(result) {
  149 + if(result.status==200){
  150 + datavm.data = result.data;
  151 + $("#wq").text('物权所有人:'+result.data.contCustom);
  152 + }else{
  153 + $.messager.alert("提示", result.msg);
  154 + }
  155 + });
  156 + }
  157 +
  158 + function doDelete() {
  159 + var rows = $('#dg').datagrid('getChecked');
  160 + if (rows.length == 0) {
  161 + $.messager.alert("提示", "请先选中要删除的行!");
  162 + return false;
  163 + }
  164 + $.messager.confirm("提示", "确定要删除么?", function (r) {
  165 + if (r) {
  166 + var ids = '';
  167 + for (var i = 0; i < rows.length; i++) {
  168 + if (ids == '') {
  169 + ids = rows[i].id;
  170 + } else {
  171 + ids += ',' + rows[i].id;
  172 + }
  173 + }
  174 + var par = {};
  175 + par.ids = ids;
  176 + $.post("<%=request.getContextPath()%>/rest/eptStoreBillInHead/delete", par, function (data) {
  177 + if (data.status == 200) {
  178 + doSearch();
  179 + } else {
  180 + $.messager.alert("提示", data.msg);
  181 + }
  182 + });
  183 + }
  184 + });
  185 + }
  186 + //入库集报
  187 +
  188 + function doSend(){
  189 + var rows = $('#dg').datagrid('getChecked');
  190 + if (rows.length == 0) {
  191 + $.messager.alert("提示", "请先选中要发送的行!");
  192 + return false;
  193 + }
  194 + $.messager.confirm("提示", "确定要【发送海关】吗?", function (r) {
  195 + if(r){
  196 + var ids = '';
  197 + for (var i = 0; i < rows.length; i++) {
  198 + if (ids == '') {
  199 + ids = rows[i].id;
  200 + } else {
  201 + ids += ',' + rows[i].id;
  202 + }
  203 + }
  204 + var par = {};
  205 + par.ids = ids;
  206 + $.post("<%=request.getContextPath()%>/inStoragePre/inReport", par, function(result) {
  207 + if(result.status==200){
  208 + $.messager.confirm("提示", "提交成功,是否查看报文内容", function (r) {
  209 + if(r){
  210 + parent.layer.open({
  211 + type: 1,
  212 + title:'报文内容',
  213 + area: ['600px', '400px'],
  214 + shadeClose: true, //点击遮罩关闭
  215 + content: "<pre>"+result.data+"</pre>"
  216 + });
  217 + }
  218 + });
  219 + }else{
  220 + $.messager.alert("提示", result.msg);
  221 + }
  222 + });
  223 + }
  224 + });
  225 + }
  226 +
  227 + function editFormat(val, row, index) {
  228 + var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
  229 + return html;
  230 + }
  231 +
  232 + function editRow(id) {
  233 + window.location.href = '<%=request.getContextPath() %>/inStoragePre/edit?id=' + id;
  234 + }
  235 +
  236 + function findReport(val, row, index) {
  237 + var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findByPK(' + row.id + ')">'+row.inReportName+'</a>';
  238 + return html;
  239 + }
  240 +
  241 + function findAPPR(val, row, index) {
  242 + var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findAPPRByPK(' + row.id + ')">'+row.inApprName+'</a>';
  243 + return html;
  244 + }
  245 +
  246 + function findByPK(id){
  247 + $.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {
  248 + if (result.status == 200) {
  249 + var seqNo = result.data.seqNo;
  250 + findBySeqNo(seqNo);
  251 + }else{
  252 + $.messager.alert("提示", result.msg);
  253 + }
  254 + });
  255 +
  256 + }
  257 +
  258 + function findAPPRByPK(id){
  259 + $.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {
  260 + if (result.status == 200) {
  261 + var seqNo = result.data.seqNo;
  262 + findAPPRBySeqNo(seqNo);
  263 + }else{
  264 + $.messager.alert("提示", result.msg);
  265 + }
  266 + });
  267 +
  268 + }
  269 +
  270 + function findBySeqNo(seqNo){
  271 + /* if(storeInNo == null || storeInNo== ""){
  272 + alert("请输入进库单号")
  273 + }else{ */
  274 + layer.open({
  275 + type: 2,
  276 + title: seqNo + '回执内容',
  277 + shadeClose: false,
  278 + shade: false,
  279 + maxmin: true, //开启最大化最小化按钮
  280 + area: ['920px', '420px'],
  281 + content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BRET'
  282 + });
  283 + }
  284 +
  285 + function findAPPRBySeqNo(seqNo){
  286 + /* if(storeInNo == null || storeInNo== ""){
  287 + alert("请输入进库单号")
  288 + }else{ */
  289 + layer.open({
  290 + type: 2,
  291 + title: seqNo + '回执内容',
  292 + shadeClose: false,
  293 + shade: false,
  294 + maxmin: true, //开启最大化最小化按钮
  295 + area: ['920px', '420px'],
  296 + content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BAPPR'
  297 + });
  298 + }
  299 +
  300 + function doSearch() {
  301 + $('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
  302 + $('#dg').datagrid("reload");
  303 + }
  304 +
  305 + $(function () {
  306 + initgoodsType();
  307 + initstoreType();
  308 + doName();
  309 + $('#dg').datagrid({
  310 + url: '<%=request.getContextPath()%>/rest/eptStoreBillInHead/page',
  311 + queryParams: {},
  312 + pagination: true,
  313 + rownumbers: true,
  314 + loadFilter: pagerFilter
  315 + });
  316 + $('#imp').on('click', function(){
  317 + layer.open({
  318 + type: 2,
  319 + title:'进库单导入',
  320 + area: ['520px', '300px'],
  321 + shadeClose: true, //点击遮罩关闭
  322 + content: '<%=request.getContextPath()%>/inStoragePre/popImport'
  323 + });
  324 + });
  325 + son=<%=request.getParameter("son")%>;
  326 + if(son!=null){
  327 + $.messager.show({
  328 + title:'信息',
  329 + msg:'添加成功!',
  330 + showType:'fade',
  331 + style:{
  332 + right:'',
  333 + bottom:''
  334 + }
  335 + });
  336 + }
  337 +
  338 +
  339 + });
  340 +</script>
  341 +</body>
  342 +</html>
@@ -13,14 +13,37 @@ @@ -13,14 +13,37 @@
13 color: #FF0000; 13 color: #FF0000;
14 margin-right: 5px; 14 margin-right: 5px;
15 } 15 }
  16 + .content{
  17 + position:relative;
  18 + left:0;
  19 + top:0;
  20 + z-index:0;
  21 + }
  22 + #con_ten{
  23 + opacity:0.2;
  24 + background:#000000;
  25 + z-index:0;
  26 + position:absolute;
  27 + }
  28 + #searchForm{
  29 + left:0;
  30 + }
  31 + #dg_01{
  32 + position:absolute;
  33 + opacity:0.2;
  34 + left:0;
  35 + background:#000000;
  36 + }
16 </style> 37 </style>
17 </head> 38 </head>
18 <!-- 编辑表头页面 --> 39 <!-- 编辑表头页面 -->
19 <body> 40 <body>
20 <div class="container"> 41 <div class="container">
21 - <div id="tt" class="easyui-tabs" style="width: 100%;">  
22 - <div title="入库表头" style="overflow: auto; padding: 20px;">  
23 - <div class="content" ms-controller="container"> 42 + <!-- <div id="tt" class="easyui-tabs" style="width: 100%;">
  43 + <div title="入库表头" style="overflow: auto; padding: 20px;"> -->
  44 + <div id="con_ten"></div>
  45 + <div class="content" ms-controller="container" id="contentfer">
  46 + <P class="easyui-panel" title="入库表头" >
24 <form class="from-control" id="editForm"> 47 <form class="from-control" id="editForm">
25 <input type="hidden" name="id" ms-duplex="@data.id"> 48 <input type="hidden" name="id" ms-duplex="@data.id">
26 <input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/> 49 <input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/>
@@ -324,10 +347,85 @@ @@ -324,10 +347,85 @@
324 </table> 347 </table>
325 </form> 348 </form>
326 </div> 349 </div>
  350 + <div id='dg_01'></div>
  351 + <input type="hidden" id="headId" name="headId" value="<%=request.getParameter("id")%>"/>
  352 + <form id="searchForm">
  353 + <table id="dg" style="width:100%;height:554px"
  354 + title="入库表体列表" data-options="
  355 + rownumbers:true,
  356 + singleSelect:false,
  357 + autoRowHeight:false,
  358 + pagination:true,
  359 + fitColumns:true,
  360 + striped:true,
  361 + collapsible:true,
  362 + toolbar:'#tb',
  363 + pageSize:10">
  364 + <thead>
  365 + <tr>
  366 + <th field="id" checkbox="true"></th>
  367 + <th field="." formatter="editFormat" width="16">编辑</th>
  368 + <th field="storeBillNo" sortable="true" width="70">进库单号</th>
  369 + <th field="copGNo" width="50">货号</th>
  370 + <th field="gNo" width="50">项号</th>
  371 + <th field="codeTS" width="50">商品编码</th>
  372 + <th field="gName" width="50">货物名称</th>
  373 + <th field="qty" width="50">申报数量</th>
  374 + <th field="total" width="50">总价</th>
  375 + <!-- <th field="gModel" width="50">货物规格</th>
  376 + <th field="eciGoodsFlagName" width="50">成品料件标志</th>
  377 + <th field="currName" width="50">货币</th> -->
  378 + <th field="effectDate" width="100">入库有效期</th>
  379 + </tr>
  380 + </thead>
  381 + </table>
  382 + <div id="tb" style="padding:0 30px;" ms-controller="container1">
  383 + <input type="hidden" name="headId" value="<%=request.getParameter("id")%>">
  384 + <div>
  385 + <label>进库单号:</label>
  386 + <input class="easyui-textbox" type="text" name="storeBillNo" id="storeBillNo"
  387 + style="width:200px;height:35px;line-height:35px;"/>
  388 + <label>货号:</label>
  389 + <input class="easyui-textbox" type="text" name="copGNo" id="copGNo"
  390 + style="width:200px;height:35px;line-height:35px;"/>
  391 + <label>商品编码:</label>
  392 + <input class="easyui-textbox" type="text" name="codeTS" id="codeTS"
  393 + style="width:200px;height:35px;line-height:35px;"/>
  394 + <label>成品料件标志:</label>
  395 + <select id="eciGoodsFlag" name="eciGoodsFlag" style="width:140px;height:35px;line-height:35px;">
  396 + <option></option>
  397 + <option ms-for="(k,v) in @eciGoodsFlag"
  398 + ms-attr="{id:'sFlag_'+@eciGoodsFlag[k].id,value:@eciGoodsFlag[k].parCode}">
  399 + {{v.parName}}
  400 + </option>
  401 + </select>
  402 + </div>
  403 + <div>
  404 + <label>货物名称:</label>
  405 + <input class="easyui-textbox" type="text" name="gName" id="gName"
  406 + style="width:150px;height:35px;line-height:35px;"/>
  407 + <label>货物规格:</label>
  408 + <input class="easyui-textbox" type="text" name="gModel" id="gModel"
  409 + style="width:150px;height:35px;line-height:35px;"/>
  410 + &nbsp;&nbsp;
  411 + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
  412 + data-options="selected:true">查询</a>
  413 + <a id="add"
  414 +
  415 + <%--&seqNo=<%=request.getParameter("seqNo")%>&storeBillNo=<%=request.getParameter("storeBillNo")%>--%>
  416 + class="easyui-linkbutton add" iconCls="icon-add">新增</a>
  417 + <a href="javascript:doDelete()" class="easyui-linkbutton delete" iconCls="icon-remove">删除</a>
  418 + <a id="edithead" class="easyui-linkbutton" >编辑表头</a>
  419 + <a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"
  420 + data-options="selected:true" >物权所有人</a>
  421 + <!-- <a id="" href="javascript:return void(0)" class="easyui-linkbutton" iconCls="icon-redo">发送海关</a> -->
  422 + </div>
  423 + </div>
  424 + </form>
327 </div> 425 </div>
328 - <div title="入库表体" style="padding: 20px; "></div> 426 +<!-- <div title="入库表体" style="padding: 20px; "></div>
329 </div> 427 </div>
330 -</div> 428 +</div> -->
331 <script> 429 <script>
332 //定义 avalon 430 //定义 avalon
333 var datavm = avalon.define({ 431 var datavm = avalon.define({
@@ -336,6 +434,11 @@ @@ -336,6 +434,11 @@
336 goodsType: [], 434 goodsType: [],
337 storeType: [] 435 storeType: []
338 }); 436 });
  437 + //定义 avalon
  438 + var datavm1 = avalon.define({
  439 + $id: "container1",
  440 + eciGoodsFlag: []
  441 + });
339 442
340 //入库时间 443 //入库时间
341 var endTime_start = { 444 var endTime_start = {
@@ -435,7 +538,24 @@ @@ -435,7 +538,24 @@
435 initstoreType(); 538 initstoreType();
436 initgoodsType(); 539 initgoodsType();
437 } 540 }
  541 + function pagerFilter(data) {
  542 + if (data.data) {
  543 + data = data.data;
  544 + }
  545 + return data;
  546 + }
438 547
  548 + function initeciGoodsFlag() {
  549 + var par = {};
  550 + par.parType = 6;
  551 + $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
  552 + if (result.status == 200) {
  553 + datavm1.eciGoodsFlag = result.data;
  554 + } else {
  555 + $.messager.alert("提示", result.msg);
  556 + }
  557 + });
  558 + }
439 function initgoodsType() { 559 function initgoodsType() {
440 var par = {}; 560 var par = {};
441 par.parType = 5; 561 par.parType = 5;
@@ -445,8 +565,8 @@ @@ -445,8 +565,8 @@
445 datavm.goodsType = result.data; 565 datavm.goodsType = result.data;
446 //初始化选项值 566 //初始化选项值
447 if (datavm.data.goodsType != "") { 567 if (datavm.data.goodsType != "") {
448 - //修改  
449 - $('#sType_' + datavm.goodsType[datavm.data.goodsType - 1].id).attr("selected", true) 568 + //修改 + datavm.data.goodsType
  569 + $('#sType_' + datavm.data.goodsType).attr("selected", true)
450 } else { 570 } else {
451 //新增 571 //新增
452 } 572 }
@@ -455,7 +575,19 @@ @@ -455,7 +575,19 @@
455 } 575 }
456 }); 576 });
457 } 577 }
458 - 578 + function doName(){
  579 + var id = ${bookId};
  580 + var par = {};
  581 + par.id=id;
  582 + $.post("<%=request.getContextPath()%>/rest/eptBook/findByPK", par, function(result) {
  583 + if(result.status==200){
  584 + datavm.data = result.data;
  585 + $("#wq").text('物权所有人:'+result.data.contCustom);
  586 + }else{
  587 + $.messager.alert("提示", result.msg);
  588 + }
  589 + });
  590 + }
459 function initstoreType(code1) { 591 function initstoreType(code1) {
460 var par = {}; 592 var par = {};
461 par.parType = 4; 593 par.parType = 4;
@@ -493,6 +625,16 @@ @@ -493,6 +625,16 @@
493 } 625 }
494 }); 626 });
495 } 627 }
  628 + $('#add').on('click', function(){
  629 + var seqNo = $("#seqNo").val();
  630 + <%-- href="<%=request.getContextPath()%>/inStorage/body/edit?headId=<%=request.getParameter("headId")%>&seqNo=<%=request.getParameter("seqNo")%>"
  631 + --%>
  632 + var htmlherf="";
  633 + htmlherf+='<%=request.getContextPath()%>/inStorage/body/edit?headId=<%=request.getParameter("id")%>&seqNo='
  634 + htmlherf+=seqNo
  635 + location.href=htmlherf;
  636 + console.log(htmlherf);
  637 + });
496 //保存 638 //保存
497 function doSave() { 639 function doSave() {
498 var data = $("#editForm").serializeJson(); 640 var data = $("#editForm").serializeJson();
@@ -506,7 +648,20 @@ @@ -506,7 +648,20 @@
506 } 648 }
507 $.post(url, data, function (result) { 649 $.post(url, data, function (result) {
508 if (result.status == 200) { 650 if (result.status == 200) {
509 - window.location.href = "<%=request.getContextPath()%>/inStorage/list"; 651 + <%-- window.location.href = "<%=request.getContextPath()%>/inStorage/list"; --%>
  652 + var height = $('#contentfer').height();
  653 + var width = $('#contentfer').width();
  654 + console.log(height);
  655 + console.log(width);
  656 + $("#con_ten").css('height',height);
  657 + $("#con_ten").css('width',width);
  658 + $("#con_ten").css('z-index','5');
  659 + $("#dg_01").css('z-index','0');
  660 + $("#con_ten").css('opacity','0.2');
  661 + headId = <%=request.getParameter("id")%>;
  662 + if(headId==null){
  663 + window.location.href = "<%=request.getContextPath()%>/inStorage/list?son=1";
  664 + }
510 } else { 665 } else {
511 var html = result.msg + "<br/>"; 666 var html = result.msg + "<br/>";
512 if (result.data) { 667 if (result.data) {
@@ -518,6 +673,32 @@ @@ -518,6 +673,32 @@
518 } 673 }
519 }); 674 });
520 } 675 }
  676 + $('#edithead').on('click', function(){
  677 + $("#con_ten").css('z-index','0');
  678 + $("#con_ten").css('opacity','0');
  679 + var height1 = $('#contentfer').height();
  680 + var height = $('#searchForm').height();
  681 + var width = $('#searchForm').width();
  682 + $("#dg_01").css('height',height);
  683 + $("#dg_01").css('width',width);
  684 + $("#dg_01").css('top',height1)
  685 + $("#dg_01").css('z-index','5');
  686 +
  687 + });
  688 + $(function () {
  689 + headId=<%=request.getParameter("id")%>;
  690 + if(headId!=null){
  691 + doName();
  692 + initeciGoodsFlag();
  693 + $('#dg').datagrid({
  694 + url: '<%=request.getContextPath()%>/rest/eptStoreBillInList/pageByHeadId',
  695 + queryParams: {headId:<%=request.getParameter("id")%>},
  696 + pagination: true,
  697 + rownumbers: true,
  698 + loadFilter: pagerFilter
  699 + });
  700 + }
  701 + });
521 702
522 $(document).ready(function () { 703 $(document).ready(function () {
523 laydate(endTime_start); 704 laydate(endTime_start);
@@ -531,7 +712,17 @@ @@ -531,7 +712,17 @@
531 headId = <%=request.getParameter("id")%> 712 headId = <%=request.getParameter("id")%>
532 loadData(<%=request.getParameter("id")%>); 713 loadData(<%=request.getParameter("id")%>);
533 <%}%> 714 <%}%>
534 - var tabs = $('#tt').tabs().tabs('tabs'); 715 + var height = $('#contentfer').height();
  716 + var width = $('#contentfer').width();
  717 + $("#con_ten").css('height',height);
  718 + $("#con_ten").css('width',width);
  719 + $("#con_ten").css('z-index','2');
  720 + if(headId==null){
  721 + $("#searchForm").css('opacity','0');
  722 + $("#con_ten").css('z-index','0');
  723 + $("#con_ten").css('opacity','0');
  724 + }
  725 +<%-- var tabs = $('#tt').tabs().tabs('tabs');
535 for (var i = 0; i < tabs.length; i++) { 726 for (var i = 0; i < tabs.length; i++) {
536 tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) { 727 tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) {
537 if (e.data.index == 1 && headId != null) { 728 if (e.data.index == 1 && headId != null) {
@@ -542,8 +733,55 @@ @@ -542,8 +733,55 @@
542 return false; 733 return false;
543 } 734 }
544 }); 735 });
545 - } 736 + } --%>
546 }); 737 });
  738 +
  739 +
  740 +
  741 +
  742 + function editFormat(val, row, index) {
  743 + var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
  744 + return html;
  745 + }
  746 +
  747 + var headId = null;
  748 + function editRow(id) {
  749 + window.location.href = '<%=request.getContextPath() %>/inStorage/body/edit?id=' + id + '&headId=' + <%=request.getParameter("id")%>;
  750 + }
  751 +
  752 + function doSearch() {
  753 + $('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
  754 + $('#dg').datagrid("reload");
  755 + }
  756 + function doDelete() {
  757 + var rows = $('#dg').datagrid('getChecked');
  758 + if (rows.length == 0) {
  759 + $.messager.alert("提示", "请先选中要删除的行!");
  760 + return false;
  761 + }
  762 + $.messager.confirm("提示", "确定要删除么?", function (r) {
  763 + if (r) {
  764 + var ids = '';
  765 + for (var i = 0; i < rows.length; i++) {
  766 + if (ids == '') {
  767 + ids = rows[i].id;
  768 + } else {
  769 + ids += ',' + rows[i].id;
  770 + }
  771 + }
  772 + var par = {};
  773 + par.ids = ids;
  774 + $.post("<%=request.getContextPath()%>/rest/eptStoreBillInList/delete", par, function (data) {
  775 + if (data.status == 200) {
  776 + doSearch();
  777 + } else {
  778 + $.messager.alert("提示", data.msg);
  779 + }
  780 + });
  781 + }
  782 + });
  783 + }
  784 +
547 </script> 785 </script>
548 </body> 786 </body>
549 </html> 787 </html>
@@ -13,17 +13,40 @@ @@ -13,17 +13,40 @@
13 color: #FF0000; 13 color: #FF0000;
14 margin-right: 5px; 14 margin-right: 5px;
15 } 15 }
  16 + .content{
  17 + position:relative;
  18 + left:0;
  19 + top:0;
  20 + z-index:0;
  21 + }
  22 + #con_ten{
  23 + opacity:0.2;
  24 + background:#000000;
  25 + z-index:0;
  26 + position:absolute;
  27 + }
  28 + #searchForm{
  29 + left:0;
  30 + }
  31 + #dg_01{
  32 + position:absolute;
  33 + opacity:0.2;
  34 + left:0;
  35 + background:#000000;
  36 + }
16 </style> 37 </style>
17 </head> 38 </head>
18 <body> 39 <body>
19 <div class="container"> 40 <div class="container">
20 - <div class="content" ms-controller="container"> 41 + <div id="con_ten"></div>
  42 + <div class="content" ms-controller="container" id="contentfer">
21 <form class="from-control" id="editForm"> 43 <form class="from-control" id="editForm">
  44 + <P class="easyui-panel" title="入库表头" >
22 <input type="hidden" name="id" ms-duplex="@data.id"> 45 <input type="hidden" name="id" ms-duplex="@data.id">
23 <input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/> 46 <input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/>
24 - <div id="tt" class="easyui-tabs" style="width: 100%;"> 47 + <!-- <div id="tt" class="easyui-tabs" style="width: 100%;">
25 <div title="出库表头" style="padding: 20px; width: 100%; height: 100%; overflow: auto;" 48 <div title="出库表头" style="padding: 20px; width: 100%; height: 100%; overflow: auto;"
26 - ms-controller="container"> 49 + ms-controller="container"> -->
27 <table class="kv-table"> 50 <table class="kv-table">
28 <tbody> 51 <tbody>
29 <tr> 52 <tr>
@@ -287,11 +310,102 @@ @@ -287,11 +310,102 @@
287 </tr> 310 </tr>
288 </tbody> 311 </tbody>
289 </table> 312 </table>
290 - </div> 313 + <!-- </div>
291 <div title="出库表体" style="overflow: auto; padding: 20px; display: none;"></div> 314 <div title="出库表体" style="overflow: auto; padding: 20px; display: none;"></div>
292 - </div> 315 + </div> -->
  316 + </form>
  317 + </div> <div id='dg_01'></div>
  318 + <form id="searchForm">
  319 + <table id="dg" style="width:100%;height:554px"
  320 + title="出库表体列表" data-options="
  321 + rownumbers:true,
  322 + singleSelect:false,
  323 + autoRowHeight:false,
  324 + pagination:true,
  325 + fitColumns:true,
  326 + striped:true,
  327 + collapsible:true,
  328 + toolbar:'#tb',
  329 + pageSize:10">
  330 + <thead>
  331 + <tr>
  332 + <th field="id" checkbox="true"></th>
  333 + <th field="." formatter="editFormat" width="24">编辑</th>
  334 + <th field="storeBillNo" sortable="true" width="70">出库单号</th>
  335 + <th field="inStoreBillNo" sortable="true" width="70">进库单号</th>
  336 + <th field="copGNo" width="35">货号</th>
  337 + <th field="gNo" width="35">项号</th>
  338 + <th field="codeTS" width="50">商品编码</th>
  339 + <th field="gName" width="50">货物名称</th>
  340 + <th field="gModel" width="50">货物规格</th>
  341 + <th field="eciGoodsFlagName" width="30">成品料件标志</th>
  342 + <th field="currName" width="30">货币</th>
  343 + <th field="tinId" width="50">库位编号</th>
  344 + <th field="tinName" width="50">库位名称</th>
  345 + <th field="countryName" width="50">原产国</th>
  346 + </tr>
  347 + </thead>
  348 + </table>
  349 + <div id="tb" style="padding:0 30px;" ms-controller="container1">
  350 + <input type="hidden" name="headId" value="<%=request.getParameter("id")%>">
  351 + <div>
  352 + <label>出库单号:</label>
  353 + <input class="easyui-textbox" type="text" name="storeBillNo" id="storeBillNo"
  354 + style="width:170px;height:35px;line-height:35px;"/>
  355 + <label>进库单号:</label>
  356 + <input class="easyui-textbox" type="text" name="inStoreBillNo" id="inStoreBillNo"
  357 + style="width:170px;height:35px;line-height:35px;"/>
  358 + <label>货号:</label>
  359 + <input class="easyui-textbox" type="text" name="copGNo" id="copGNo"
  360 + style="width:170px;height:35px;line-height:35px;"/>
  361 + <label>商品编码:</label>
  362 + <input class="easyui-textbox" type="text" name="codeTS" id="codeTS"
  363 + style="width:170px;height:35px;line-height:35px;"/>
  364 + </div>
  365 + <div>
  366 + <label>成品料件标志:</label>
  367 + <select id="eciGoodsFlag" name="eciGoodsFlag" style="width:140px;height:35px;line-height:35px;">
  368 + <option></option>
  369 + <option ms-for="(k,v) in @eciGoodsFlag"
  370 + ms-attr="{id:'sFlag_'+@eciGoodsFlag[k].id,value:@eciGoodsFlag[k].parCode}">
  371 + {{v.parName}}
  372 + </option>
  373 + </select>
  374 + <label>货物名称:</label>
  375 + <input class="easyui-textbox" type="text" name="gName" id="gName"
  376 + style="width:200px;height:35px;line-height:35px;"/>
  377 + <label>货物规格:</label>
  378 + <input class="easyui-textbox" type="text" name="gModel" id="gModel"
  379 + style="width:200px;height:35px;line-height:35px;"/>
  380 + </div>
  381 + <div>
  382 + <label>库位编号:</label>
  383 + <input class="easyui-textbox" type="text" name="tinId" id="tinId"
  384 + style="width:200px;height:35px;line-height:35px;"/>
  385 + <label>库位名称:</label>
  386 + <input class="easyui-textbox" type="text" name="tinName" id="tinName"
  387 + style="width:200px;height:35px;line-height:35px;"/>
  388 + &nbsp;&nbsp;
  389 + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
  390 + data-options="selected:true">查询</a>
  391 + <a id="add"
  392 + href="<%=request.getContextPath()%>/outStoragePre/body/edit?headId=<%=request.getParameter("id")%>"
  393 + <%--&seqNo=<%=request.getParameter("seqNo")%>&storeBillNo=<%=request.getParameter("storeBillNo")%>--%>
  394 + class="easyui-linkbutton add" iconCls="icon-add">新增</a>
  395 + <a href="javascript:doDelete()" class="easyui-linkbutton delete"
  396 + iconCls="icon-remove">删除</a>
  397 + <a id="import" href="javascript:void(0);" class="easyui-linkbutton add"
  398 + iconCls="icon-add">导入</a>
  399 + <a id="edithead" class="easyui-linkbutton" >编辑表头</a>
  400 + <a id="add" href="<%=request.getContextPath() %>/resource/excel/outStoragePreList.xlsx" class="easyui-linkbutton"
  401 + iconCls="icon-save">模板下载</a>
  402 + <a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"
  403 + data-options="selected:true" >物权所有人</a>
  404 + <!-- <a id="" href="javascript:return void(0)" class="easyui-linkbutton"
  405 + iconCls="icon-redo">发送海关</a> -->
  406 + </div>
  407 +
293 </form> 408 </form>
294 - </div>  
295 </div> 409 </div>
296 <script> 410 <script>
297 //定义 avalon 411 //定义 avalon
@@ -301,8 +415,19 @@ @@ -301,8 +415,19 @@
301 goodsType: [], 415 goodsType: [],
302 storeType: [] 416 storeType: []
303 }); 417 });
304 -  
305 - 418 + function pagerFilter(data) {
  419 + if (data.data) {
  420 + data = data.data;
  421 + }
  422 + return data;
  423 + }
  424 +
  425 + //定义 avalon
  426 + var datavm1 = avalon.define({
  427 + $id: "container1",
  428 + eciGoodsFlag: []
  429 +
  430 + });
306 //入库时间 431 //入库时间
307 var endTime_start = { 432 var endTime_start = {
308 elem: '#outStartDate', 433 elem: '#outStartDate',
@@ -433,7 +558,19 @@ @@ -433,7 +558,19 @@
433 initgoodsType(); 558 initgoodsType();
434 inittradesCode(); 559 inittradesCode();
435 } 560 }
436 - 561 + function doName(){
  562 + var id = ${bookId};
  563 + var par = {};
  564 + par.id=id;
  565 + $.post("<%=request.getContextPath()%>/rest/eptBook/findByPK", par, function(result) {
  566 + if(result.status==200){
  567 + datavm.data = result.data;
  568 + $("#wq").text('物权所有人:'+result.data.contCustom);
  569 + }else{
  570 + $.messager.alert("提示", result.msg);
  571 + }
  572 + });
  573 + }
437 function initgoodsType() { 574 function initgoodsType() {
438 var par = {}; 575 var par = {};
439 par.parType = 5; 576 par.parType = 5;
@@ -479,7 +616,17 @@ @@ -479,7 +616,17 @@
479 } 616 }
480 }); 617 });
481 } 618 }
482 - 619 + function initeciGoodsFlag() {
  620 + var par = {};
  621 + par.parType = 6;
  622 + $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
  623 + if (result.status == 200) {
  624 + datavm1.eciGoodsFlag = result.data;
  625 + } else {
  626 + $.messager.alert("提示", result.msg);
  627 + }
  628 + });
  629 + }
483 function initstoreType() { 630 function initstoreType() {
484 var par = {}; 631 var par = {};
485 par.parType = 7; 632 par.parType = 7;
@@ -490,7 +637,12 @@ @@ -490,7 +637,12 @@
490 //初始化选项值 637 //初始化选项值
491 if (datavm.data.storeType != "") { 638 if (datavm.data.storeType != "") {
492 //修改 639 //修改
493 - $('#sstoreType_' + datavm.storeType[datavm.data.storeType - 1].id).attr("selected", true) 640 + /* $('#sstoreType_' + datavm.storeType[datavm.data.storeType - 1].id).attr("selected", true) */
  641 + if (datavm.data.storeType == 'SJ01') {
  642 + $('#sstoreType_' + datavm.storeType[1].id).attr("selected", true);
  643 + }else {
  644 + $('#sstoreType_' + datavm.storeType[0].id).attr("selected", true);
  645 + }
494 } else { 646 } else {
495 //新增 647 //新增
496 } 648 }
@@ -499,6 +651,7 @@ @@ -499,6 +651,7 @@
499 } 651 }
500 }); 652 });
501 } 653 }
  654 +
502 655
503 //保存 656 //保存
504 function doSave() { 657 function doSave() {
@@ -514,7 +667,20 @@ @@ -514,7 +667,20 @@
514 } 667 }
515 $.post(url, data, function (result) { 668 $.post(url, data, function (result) {
516 if (result.status == 200) { 669 if (result.status == 200) {
517 - window.location.href = "<%=request.getContextPath()%>/outStoragePre/list"; 670 + <%-- window.location.href = "<%=request.getContextPath()%>/outStoragePre/list"; --%>
  671 + var height = $('#contentfer').height();
  672 + var width = $('#contentfer').width();
  673 + console.log(height);
  674 + console.log(width);
  675 + $("#con_ten").css('height',height);
  676 + $("#con_ten").css('width',width);
  677 + $("#con_ten").css('z-index','5');
  678 + $("#dg_01").css('z-index','0');
  679 + $("#con_ten").css('opacity','0.2');
  680 + headId = <%=request.getParameter("id")%>;
  681 + if(headId==null){
  682 + window.location.href = "<%=request.getContextPath()%>/outStoragePre/list?son=1";
  683 + }
518 } else { 684 } else {
519 var html = result.msg + "<br/>"; 685 var html = result.msg + "<br/>";
520 if (result.data) { 686 if (result.data) {
@@ -526,7 +692,32 @@ @@ -526,7 +692,32 @@
526 } 692 }
527 }); 693 });
528 } 694 }
  695 + $(function () {
  696 + headId=<%=request.getParameter("id")%>;
  697 + if(headId!=null){
  698 + initeciGoodsFlag();
  699 + doName();
  700 + $('#dg').datagrid({
  701 + url: '<%=request.getContextPath()%>/rest/eptStoreBillOutList/pageByHeadId',
  702 + queryParams: {headId:<%=request.getParameter("id")%>},
  703 + pagination: true,
  704 + rownumbers: true,
  705 + loadFilter: pagerFilter
  706 + });
  707 + }
  708 + });
  709 + $('#edithead').on('click', function(){
  710 + $("#con_ten").css('z-index','0');
  711 + $("#con_ten").css('opacity','0');
  712 + var height1 = $('#contentfer').height();
  713 + var height = $('#searchForm').height();
  714 + var width = $('#searchForm').width();
  715 + $("#dg_01").css('height',height);
  716 + $("#dg_01").css('width',width);
  717 + $("#dg_01").css('top',height1)
  718 + $("#dg_01").css('z-index','5');
529 719
  720 + });
530 $(document).ready(function () { 721 $(document).ready(function () {
531 // laydate(endTime_start); 722 // laydate(endTime_start);
532 // laydate(endTime_end); 723 // laydate(endTime_end);
@@ -539,7 +730,21 @@ @@ -539,7 +730,21 @@
539 headId = <%=request.getParameter("id")%> 730 headId = <%=request.getParameter("id")%>
540 loadData(<%=request.getParameter("id")%>); 731 loadData(<%=request.getParameter("id")%>);
541 <%}%> 732 <%}%>
542 - var tabs = $('#tt').tabs().tabs('tabs'); 733 + var height = $('#contentfer').height();
  734 + var width = $('#contentfer').width();
  735 + console.log(height);
  736 + console.log(width);
  737 + $("#con_ten").css('height',height);
  738 + $("#con_ten").css('width',width);
  739 + $("#con_ten").css('z-index','5');
  740 + $("#dg_01").css('z-index','0');
  741 + $("#con_ten").css('opacity','0.2');
  742 + if(headId==null){
  743 + $("#searchForm").css('opacity','0');
  744 + $("#con_ten").css('z-index','0');
  745 + $("#con_ten").css('opacity','0');
  746 + }
  747 +<%-- var tabs = $('#tt').tabs().tabs('tabs');
543 for (var i = 0; i < tabs.length; i++) { 748 for (var i = 0; i < tabs.length; i++) {
544 tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) { 749 tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) {
545 if (e.data.index == 1 && headId != null) { 750 if (e.data.index == 1 && headId != null) {
@@ -550,8 +755,67 @@ @@ -550,8 +755,67 @@
550 return false; 755 return false;
551 } 756 }
552 }); 757 });
553 - } 758 + } --%>
554 }); 759 });
  760 +
  761 +
  762 + $('#import').on('click', function(){
  763 + layer.open({
  764 + type: 2,
  765 + title:'入库申请单导入',
  766 + area: ['520px', '300px'],
  767 + shadeClose: true, //点击遮罩关闭
  768 + content: '<%=request.getContextPath()%>/outStoragePre/body/popImport?headId=<%=request.getParameter("headId")%>'
  769 + });
  770 + });
  771 +
  772 +
  773 +
  774 + function editFormat(val, row, index) {
  775 + var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
  776 + return html;
  777 + }
  778 +
  779 + var headId = null;
  780 +
  781 +
  782 + function editRow(id) {
  783 + window.location.href = '<%=request.getContextPath() %>/outStoragePre/body/edit?id=' + id + '&headId=' + <%=request.getParameter("headId")%>;
  784 + }
  785 +
  786 + function doSearch() {
  787 + $('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
  788 + $('#dg').datagrid("reload");
  789 + }
  790 +
  791 + function doDelete() {
  792 + var rows = $('#dg').datagrid('getChecked');
  793 + if (rows.length == 0) {
  794 + $.messager.alert("提示", "请先选中要删除的行!");
  795 + return false;
  796 + }
  797 + $.messager.confirm("提示", "确定要删除么?", function (r) {
  798 + if (r) {
  799 + var ids = '';
  800 + for (var i = 0; i < rows.length; i++) {
  801 + if (ids == '') {
  802 + ids = rows[i].id;
  803 + } else {
  804 + ids += ',' + rows[i].id;
  805 + }
  806 + }
  807 + var par = {};
  808 + par.ids = ids;
  809 + $.post("<%=request.getContextPath()%>/rest/eptStoreBillOutList/delete", par, function (data) {
  810 + if (data.status == 200) {
  811 + doSearch();
  812 + } else {
  813 + $.messager.alert("提示", data.msg);
  814 + }
  815 + });
  816 + }
  817 + });
  818 + }
555 </script> 819 </script>
556 </body> 820 </body>
557 </html> 821 </html>
1 -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>  
2 -<!DOCTYPE html>  
3 -<html lang="en">  
4 -<head>  
5 - <meta charset="utf-8">  
6 - <meta name="viewport" content="width=device-width, initial-scale=1">  
7 - <title>入库列表</title>  
8 - <jsp:include page="../../template/head.jsp"></jsp:include>  
9 -</head>  
10 -<body>  
11 -<div class="container">  
12 - <div id="tt" class="easyui-tabs" style="width: 100%;">  
13 - <div title="出库表头" style="padding: 20px; "></div>  
14 - <div title="出库表体"  
15 - style="overflow: auto; padding: 20px; ">  
16 - <form id="searchForm">  
17 - <table id="dg" style="width:100%;height:554px"  
18 - title="出库表体列表" data-options="  
19 - rownumbers:true,  
20 - singleSelect:false,  
21 - autoRowHeight:false,  
22 - pagination:true,  
23 - fitColumns:true,  
24 - striped:true,  
25 - collapsible:true,  
26 - toolbar:'#tb',  
27 - pageSize:10">  
28 - <thead>  
29 - <tr>  
30 - <th field="id" checkbox="true"></th>  
31 - <th field="." formatter="editFormat" width="24">编辑</th>  
32 - <th field="storeBillNo" sortable="true" width="70">出库单号</th>  
33 - <th field="inStoreBillNo" sortable="true" width="70">进库单号</th>  
34 - <th field="copGNo" width="100">货号</th>  
35 - <th field="gNo" width="50">项号</th>  
36 - <th field="codeTS" width="50">商品编码</th>  
37 - <th field="gName" width="50">货物名称</th>  
38 - <th field="gModel" width="50">货物规格</th>  
39 - <th field="eciGoodsFlagName" width="50">成品料件标志</th>  
40 - <th field="currName" width="50">货币</th>  
41 - <th field="tinId" width="50">库位编号</th>  
42 - <th field="tinName" width="50">库位名称</th>  
43 - <th field="countryName" width="50">原产国</th>  
44 - </tr>  
45 - </thead>  
46 - </table>  
47 - <div id="tb" style="padding:0 30px;" ms-controller="container">  
48 - <input type="hidden" name="headId" value="<%=request.getParameter("headId")%>">  
49 - <div>  
50 - <label>出库单号:</label>  
51 - <input class="easyui-textbox" type="text" name="storeBillNo" id="storeBillNo"  
52 - style="width:170px;height:35px;line-height:35px;"/>  
53 - <label>进库单号:</label>  
54 - <input class="easyui-textbox" type="text" name="inStoreBillNo" id="inStoreBillNo"  
55 - style="width:170px;height:35px;line-height:35px;"/>  
56 - <label>货号:</label>  
57 - <input class="easyui-textbox" type="text" name="copGNo" id="copGNo"  
58 - style="width:170px;height:35px;line-height:35px;"/>  
59 - <label>商品编码:</label>  
60 - <input class="easyui-textbox" type="text" name="codeTS" id="codeTS"  
61 - style="width:170px;height:35px;line-height:35px;"/>  
62 - </div>  
63 - <div>  
64 - <label>成品料件标志:</label>  
65 - <select id="eciGoodsFlag" name="eciGoodsFlag" style="width:140px;height:35px;line-height:35px;">  
66 - <option></option>  
67 - <option ms-for="(k,v) in @eciGoodsFlag"  
68 - ms-attr="{id:'sFlag_'+@eciGoodsFlag[k].id,value:@eciGoodsFlag[k].parCode}">  
69 - {{v.parName}}  
70 - </option>  
71 - </select>  
72 - <label>货物名称:</label>  
73 - <input class="easyui-textbox" type="text" name="gName" id="gName"  
74 - style="width:200px;height:35px;line-height:35px;"/>  
75 - <label>货物规格:</label>  
76 - <input class="easyui-textbox" type="text" name="gModel" id="gModel"  
77 - style="width:200px;height:35px;line-height:35px;"/>  
78 - </div>  
79 - <div>  
80 - <label>库位编号:</label>  
81 - <input class="easyui-textbox" type="text" name="tinId" id="tinId"  
82 - style="width:200px;height:35px;line-height:35px;"/>  
83 - <label>库位名称:</label>  
84 - <input class="easyui-textbox" type="text" name="tinName" id="tinName"  
85 - style="width:200px;height:35px;line-height:35px;"/>  
86 - &nbsp;&nbsp;  
87 - <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"  
88 - data-options="selected:true">查询</a>  
89 - <a id="add"  
90 - href="<%=request.getContextPath()%>/outStorage/body/edit?headId=<%=request.getParameter("headId")%>"  
91 - <%--&seqNo=<%=request.getParameter("seqNo")%>&storeBillNo=<%=request.getParameter("storeBillNo")%>--%>  
92 - class="easyui-linkbutton add" iconCls="icon-add">新增</a>  
93 - <a href="javascript:doDelete()" class="easyui-linkbutton delete"  
94 - iconCls="icon-remove">删除</a>  
95 - <a id="" href="javascript:return void(0)" class="easyui-linkbutton"  
96 - iconCls="icon-redo">发送海关</a>  
97 - </div>  
98 - </div>  
99 - </div>  
100 - </form>  
101 - </div>  
102 -</div>  
103 -</div>  
104 -<script>  
105 - //定义 avalon  
106 - var datavm = avalon.define({  
107 - $id: "container",  
108 - eciGoodsFlag: []  
109 - });  
110 -  
111 - function pagerFilter(data) {  
112 - if (data.data) {  
113 - data = data.data;  
114 - }  
115 - return data;  
116 - }  
117 -  
118 - function initeciGoodsFlag() {  
119 - var par = {};  
120 - par.parType = 6;  
121 - $.post("<%=request.getContextPath()%>/rest/eptParameter/findByType", par, function (result) {  
122 - if (result.status == 200) {  
123 - datavm.eciGoodsFlag = result.data;  
124 - } else {  
125 - $.messager.alert("提示", result.msg);  
126 - }  
127 - });  
128 - }  
129 -  
130 - function editFormat(val, row, index) {  
131 - var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';  
132 - return html;  
133 - }  
134 -  
135 - var headId = null;  
136 - $(function () {  
137 - initeciGoodsFlag();  
138 - $('#dg').datagrid({  
139 - url: '<%=request.getContextPath()%>/rest/eptStoreBillOutList/pageByHeadId',  
140 - queryParams: {headId:<%=request.getParameter("headId")%>},  
141 - pagination: true,  
142 - rownumbers: true,  
143 - loadFilter: pagerFilter  
144 - });  
145 - <%if(request.getParameter("headId")!=null){%>  
146 - headId = <%=request.getParameter("headId")%>;  
147 - <%}%>  
148 - var tabs = $('#tt').tabs().tabs('tabs');  
149 - for (var i = 0; i < tabs.length; i++) {  
150 - tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) {  
151 - if (e.data.index == 0 && headId != null) {  
152 - window.location.href = '<%=request.getContextPath() %>/outStorage/edit?id=' + <%=request.getParameter("headId")%>;  
153 - }  
154 - });  
155 - $('#tt').tabs('select', 1);  
156 - }  
157 - });  
158 -  
159 - function editRow(id) {  
160 - window.location.href = '<%=request.getContextPath() %>/outStorage/body/edit?id=' + id + '&headId=' + <%=request.getParameter("headId")%>;  
161 - }  
162 -  
163 - function doSearch() {  
164 - $('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());  
165 - $('#dg').datagrid("reload");  
166 - }  
167 -  
168 - function doDelete() {  
169 - var rows = $('#dg').datagrid('getChecked');  
170 - if (rows.length == 0) {  
171 - $.messager.alert("提示", "请先选中要删除的行!");  
172 - return false;  
173 - }  
174 - $.messager.confirm("提示", "确定要删除么?", function (r) {  
175 - if (r) {  
176 - var ids = '';  
177 - for (var i = 0; i < rows.length; i++) {  
178 - if (ids == '') {  
179 - ids = rows[i].id;  
180 - } else {  
181 - ids += ',' + rows[i].id;  
182 - }  
183 - }  
184 - var par = {};  
185 - par.ids = ids;  
186 - $.post("<%=request.getContextPath()%>/rest/eptStoreBillOutList/delete", par, function (data) {  
187 - if (data.status == 200) {  
188 - doSearch();  
189 - } else {  
190 - $.messager.alert("提示", data.msg);  
191 - }  
192 - });  
193 - }  
194 - });  
195 - }  
196 -</script>  
197 -</body> 1 +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
  2 +<!DOCTYPE html>
  3 +<html lang="en">
  4 +<head>
  5 + <meta charset="utf-8">
  6 + <meta name="viewport" content="width=device-width, initial-scale=1">
  7 + <title>入库列表</title>
  8 + <jsp:include page="../../template/head.jsp"></jsp:include>
  9 +</head>
  10 +<body>
  11 +<div class="container">
  12 + <div id="tt" class="easyui-tabs" style="width: 100%;">
  13 + <div title="出库表头" style="padding: 20px; "></div>
  14 + <div title="出库表体"
  15 + style="overflow: auto; padding: 20px; ">
  16 + <form id="searchForm">
  17 + <table id="dg" style="width:100%;height:554px"
  18 + title="出库表体列表" data-options="
  19 + rownumbers:true,
  20 + singleSelect:false,
  21 + autoRowHeight:false,
  22 + pagination:true,
  23 + fitColumns:true,
  24 + striped:true,
  25 + collapsible:true,
  26 + toolbar:'#tb',
  27 + pageSize:10">
  28 + <thead>
  29 + <tr>
  30 + <th field="id" checkbox="true"></th>
  31 + <th field="." formatter="editFormat" width="24">编辑</th>
  32 + <th field="storeBillNo" sortable="true" width="70">出库单号</th>
  33 + <th field="inStoreBillNo" sortable="true" width="70">进库单号</th>
  34 + <th field="copGNo" width="100">货号</th>
  35 + <th field="gNo" width="50">项号</th>
  36 + <th field="codeTS" width="50">商品编码</th>
  37 + <th field="gName" width="50">货物名称</th>
  38 + <th field="gModel" width="50">货物规格</th>
  39 + <th field="eciGoodsFlagName" width="50">成品料件标志</th>
  40 + <th field="currName" width="50">货币</th>
  41 + <th field="tinId" width="50">库位编号</th>
  42 + <th field="tinName" width="50">库位名称</th>
  43 + <th field="countryName" width="50">原产国</th>
  44 + </tr>
  45 + </thead>
  46 + </table>
  47 + <div id="tb" style="padding:0 30px;" ms-controller="container">
  48 + <input type="hidden" name="headId" value="<%=request.getParameter("headId")%>">
  49 + <div>
  50 + <label>出库单号:</label>
  51 + <input class="easyui-textbox" type="text" name="storeBillNo" id="storeBillNo"
  52 + style="width:170px;height:35px;line-height:35px;"/>
  53 + <label>进库单号:</label>
  54 + <input class="easyui-textbox" type="text" name="inStoreBillNo" id="inStoreBillNo"
  55 + style="width:170px;height:35px;line-height:35px;"/>
  56 + <label>货号:</label>
  57 + <input class="easyui-textbox" type="text" name="copGNo" id="copGNo"
  58 + style="width:170px;height:35px;line-height:35px;"/>
  59 + <label>商品编码:</label>
  60 + <input class="easyui-textbox" type="text" name="codeTS" id="codeTS"
  61 + style="width:170px;height:35px;line-height:35px;"/>
  62 + </div>
  63 + <div>
  64 + <label>成品料件标志:</label>
  65 + <select id="eciGoodsFlag" name="eciGoodsFlag" style="width:140px;height:35px;line-height:35px;">
  66 + <option></option>
  67 + <option ms-for="(k,v) in @eciGoodsFlag"
  68 + ms-attr="{id:'sFlag_'+@eciGoodsFlag[k].id,value:@eciGoodsFlag[k].parCode}">
  69 + {{v.parName}}
  70 + </option>
  71 + </select>
  72 + <label>货物名称:</label>
  73 + <input class="easyui-textbox" type="text" name="gName" id="gName"
  74 + style="width:200px;height:35px;line-height:35px;"/>
  75 + <label>货物规格:</label>
  76 + <input class="easyui-textbox" type="text" name="gModel" id="gModel"
  77 + style="width:200px;height:35px;line-height:35px;"/>
  78 + </div>
  79 + <div>
  80 + <label>库位编号:</label>
  81 + <input class="easyui-textbox" type="text" name="tinId" id="tinId"
  82 + style="width:200px;height:35px;line-height:35px;"/>
  83 + <label>库位名称:</label>
  84 + <input class="easyui-textbox" type="text" name="tinName" id="tinName"
  85 + style="width:200px;height:35px;line-height:35px;"/>
  86 + &nbsp;&nbsp;
  87 + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
  88 + data-options="selected:true">查询</a>
  89 + <a id="add"
  90 + href="<%=request.getContextPath()%>/outStorage/body/edit?headId=<%=request.getParameter("headId")%>"
  91 + <%--&seqNo=<%=request.getParameter("seqNo")%>&storeBillNo=<%=request.getParameter("storeBillNo")%>--%>
  92 + class="easyui-linkbutton add" iconCls="icon-add">新增</a>
  93 + <a href="javascript:doDelete()" class="easyui-linkbutton delete"
  94 + iconCls="icon-remove">删除</a>
  95 + <a id="" href="javascript:return void(0)" class="easyui-linkbutton"
  96 + iconCls="icon-redo">发送海关</a>
  97 + </div>
  98 + </div>
  99 + </div>
  100 + </form>
  101 + </div>
  102 +</div>
  103 +</div>
  104 +<script>
  105 + //定义 avalon
  106 + var datavm = avalon.define({
  107 + $id: "container",
  108 + eciGoodsFlag: []
  109 + });
  110 +
  111 + function pagerFilter(data) {
  112 + if (data.data) {
  113 + data = data.data;
  114 + }
  115 + return data;
  116 + }
  117 +
  118 + function initeciGoodsFlag() {
  119 + var par = {};
  120 + par.parType = 6;
  121 + $.post("<%=request.getContextPath()%>/rest/eptParameter/findByType", par, function (result) {
  122 + if (result.status == 200) {
  123 +
  124 + datavm.eciGoodsFlag = result.data;
  125 + console.log(datavm.eciGoodsFlag);
  126 + } else {
  127 + $.messager.alert("提示", result.msg);
  128 + }
  129 + });
  130 + }
  131 +<%-- function initeciGoodsFlag() {
  132 + var par = {};
  133 + par.parType = 6;
  134 + console.log('我进来了');
  135 + $.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
  136 + if (result.status == 200) {
  137 + datavm.eciGoodsFlag = result.data;
  138 + console.log(datavm.eciGoodsFlag);
  139 + } else {
  140 + $.messager.alert("提示", result.msg);
  141 + }
  142 + });
  143 + } --%>
  144 + function editFormat(val, row, index) {
  145 + var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
  146 + return html;
  147 + }
  148 +
  149 + var headId = null;
  150 + $(function () {
  151 + initeciGoodsFlag();
  152 + $('#dg').datagrid({
  153 + url: '<%=request.getContextPath()%>/rest/eptStoreBillOutList/pageByHeadId',
  154 + queryParams: {headId:<%=request.getParameter("headId")%>},
  155 + pagination: true,
  156 + rownumbers: true,
  157 + loadFilter: pagerFilter
  158 + });
  159 + <%if(request.getParameter("headId")!=null){%>
  160 + headId = <%=request.getParameter("headId")%>;
  161 + <%}%>
  162 + var tabs = $('#tt').tabs().tabs('tabs');
  163 + for (var i = 0; i < tabs.length; i++) {
  164 + tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) {
  165 + if (e.data.index == 0 && headId != null) {
  166 + window.location.href = '<%=request.getContextPath() %>/outStorage/edit?id=' + <%=request.getParameter("headId")%>;
  167 + }
  168 + });
  169 + $('#tt').tabs('select', 1);
  170 + }
  171 + });
  172 +
  173 + function editRow(id) {
  174 + window.location.href = '<%=request.getContextPath() %>/outStorage/body/edit?id=' + id + '&headId=' + <%=request.getParameter("headId")%>;
  175 + }
  176 +
  177 + function doSearch() {
  178 + $('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
  179 + $('#dg').datagrid("reload");
  180 + }
  181 +
  182 + function doDelete() {
  183 + var rows = $('#dg').datagrid('getChecked');
  184 + if (rows.length == 0) {
  185 + $.messager.alert("提示", "请先选中要删除的行!");
  186 + return false;
  187 + }
  188 + $.messager.confirm("提示", "确定要删除么?", function (r) {
  189 + if (r) {
  190 + var ids = '';
  191 + for (var i = 0; i < rows.length; i++) {
  192 + if (ids == '') {
  193 + ids = rows[i].id;
  194 + } else {
  195 + ids += ',' + rows[i].id;
  196 + }
  197 + }
  198 + var par = {};
  199 + par.ids = ids;
  200 + $.post("<%=request.getContextPath()%>/rest/eptStoreBillOutList/delete", par, function (data) {
  201 + if (data.status == 200) {
  202 + doSearch();
  203 + } else {
  204 + $.messager.alert("提示", data.msg);
  205 + }
  206 + });
  207 + }
  208 + });
  209 + }
  210 +</script>
  211 +</body>
198 </html> 212 </html>
@@ -262,7 +262,7 @@ @@ -262,7 +262,7 @@
262 <td class="kv-label" style="width: 100px;">备注</td> 262 <td class="kv-label" style="width: 100px;">备注</td>
263 <td class="kv-content" colspan="5"> 263 <td class="kv-content" colspan="5">
264 <textarea rows="" cols="" id="remark" name="remark" 264 <textarea rows="" cols="" id="remark" name="remark"
265 - ms-duplex="@data.remark | notEmpty"></textarea> 265 + ms-duplex="@data.createPerson | notEmpty"></textarea>
266 </td> 266 </td>
267 </tr> 267 </tr>
268 <!-- <tr> 268 <!-- <tr>