|  |  | 
 |  |  | -- sqlserver | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl/receiveDetl.html', N'receiveDetl管理', null, '2', null, '1'); | 
 |  |  |  | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#view', N'查询', '30533', '3', '0', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-add', N'新增', '30533', '3', '1', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-edit', N'编辑', '30533', '3', '2', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-delete', N'删除', '30533', '3', '3', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-export', N'导出', '30533', '3', '4', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#view', N'查询', '30529', '3', '0', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-add', N'新增', '30529', '3', '1', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-edit', N'编辑', '30529', '3', '2', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-delete', N'删除', '30529', '3', '3', '1'); | 
 |  |  | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-export', N'导出', '30529', '3', '4', '1'); | 
 
 |  |  | 
 |  |  | //        generator.password="xltys1995"; | 
 |  |  | //        generator.table="sys_host"; | 
 |  |  |         // sqlserver | 
 |  |  |         generator.url="localhost:1433;databasename=wms_saas"; | 
 |  |  |         generator.url="192.168.4.15:1433;databasename=wms_saas"; | 
 |  |  |         generator.username="sa"; | 
 |  |  |         generator.password="sa@123"; | 
 |  |  |         generator.table="man_receive_detl"; | 
 
 |  |  | 
 |  |  |         return null; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getState$(){ | 
 |  |  |         if (this.inQty == 0){ | 
 |  |  |             return "未入库"; | 
 |  |  |         } | 
 |  |  |         if (count - inQty != 0){ | 
 |  |  |             return "入库中"; | 
 |  |  |         } | 
 |  |  |         return "已完成"; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setOrderId(Long orderId) { | 
 |  |  |         this.orderId = orderId; | 
 |  |  |     } | 
 
 |  |  | 
 |  |  | #    password: xltys1995 | 
 |  |  |     # sql-server | 
 |  |  |     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver | 
 |  |  |     url: jdbc:sqlserver://localhost:1433;databasename=wms_saas | 
 |  |  |     url: jdbc:sqlserver://192.168.4.15:1433;databasename=wms_saas | 
 |  |  |     username: sa | 
 |  |  |     password: sa@123 | 
 |  |  |   mvc: | 
 
 |  |  | 
 |  |  | var pageCurr; | 
 |  |  | layui.config({ | 
 |  |  |     base: baseUrl + "/static/layui/lay/modules/" | 
 |  |  | }).use(['table','laydate', 'form', 'admin'], function(){ | 
 |  |  | }).use(['table','laydate', 'form', 'admin', 'treeTable', 'xmSelect'], function(){ | 
 |  |  |     var table = layui.table; | 
 |  |  |     var $ = layui.jquery; | 
 |  |  |     var layer = layui.layer; | 
 |  |  | 
 |  |  |             limit(); | 
 |  |  |         } | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |     var insTb = layui.treeTable.render({ | 
 |  |  |         elem: '#node', | 
 |  |  |         url: baseUrl+'/node/tree/auth', | 
 |  |  |         headers: {token: localStorage.getItem('token')}, | 
 |  |  |         height: 'full-200', | 
 |  |  |         tree: { | 
 |  |  |             iconIndex: 2,           // 折叠图标显示在第几列 | 
 |  |  |             isPidData: true,        // 是否是id、pid形式数据 | 
 |  |  |             idName: 'id',           // id字段名称 | 
 |  |  |             pidName: 'parentId'     // pid字段名称 | 
 |  |  |         }, | 
 |  |  |         cols: [[ | 
 |  |  |             {type: 'checkbox'} | 
 |  |  |             ,{type: 'numbers'} | 
 |  |  |             ,{field: 'name', align: 'left',title: '名称', minWidth: 150} | 
 |  |  |             ,{field: 'type$', align: 'center',title: '类型'} | 
 |  |  |             ,{field: 'leading', align: 'center',title: '负责人'} | 
 |  |  |             ,{field: 'sort', align: 'center',title: '排序', hide: true} | 
 |  |  |             ,{field: 'status$', align: 'center',title: '状态'} | 
 |  |  |             ,{field: 'updateTime$', align: 'center',title: '修改时间'} | 
 |  |  |             ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true} | 
 |  |  |             ,{field: 'memo', align: 'center',title: '备注', hide: true} | 
 |  |  |             ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} | 
 |  |  |         ]], | 
 |  |  |         done: function (data) { | 
 |  |  |             $('.ew-tree-table-box').css('height', '100%'); | 
 |  |  |             insTb.expandAll(); | 
 |  |  |         } | 
 |  |  |     }); | 
 |  |  |     /* 显示表单弹窗 */ | 
 |  |  |     function showNodeSelect() { | 
 |  |  |         admin.open({ | 
 |  |  |             type: 1, | 
 |  |  |             area: '400px', | 
 |  |  |             title: '选择入库货位', | 
 |  |  |             content: $('#nodeSelect').html(), | 
 |  |  |             success: function (layero, dIndex) { | 
 |  |  |                 // 表单提交事件 | 
 |  |  |                 form.on('submit(pakin)', function (data) { | 
 |  |  |                     data.field.nodeSel = insXmSel.getValue('valueStr'); | 
 |  |  |                     var loadIndex = layer.load(2); | 
 |  |  |                     $.ajax({ | 
 |  |  |                         url: baseUrl+"/work/stock/pakin", | 
 |  |  |                         headers: {'token': localStorage.getItem('token')}, | 
 |  |  |                         data: JSON.stringify({ | 
 |  |  |                             nodeId: data.field.nodeSel, | 
 |  |  |                             mats: matCodeData | 
 |  |  |                         }), | 
 |  |  |                         contentType:'application/json;charset=UTF-8', | 
 |  |  |                         method: 'POST', | 
 |  |  |                         success: function (res) { | 
 |  |  |                             layer.close(loadIndex); | 
 |  |  |                             if (res.code === 200){ | 
 |  |  |                                 layer.close(dIndex); | 
 |  |  |                                 matCodeData = []; | 
 |  |  |                                 tableIns.reload({data: matCodeData}); | 
 |  |  |                                 limit(); | 
 |  |  |                                 layer.msg(res.msg, {icon: 1}); | 
 |  |  |                             } else if (res.code === 403){ | 
 |  |  |                                 top.location.href = baseUrl+"/"; | 
 |  |  |                             } else { | 
 |  |  |                                 layer.msg(res.msg, {icon: 2}); | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                     }) | 
 |  |  |                     return false; | 
 |  |  |                 }); | 
 |  |  |                 // 渲染下拉树 | 
 |  |  |                 var insXmSel = layui.xmSelect.render({ | 
 |  |  |                     el: '#nodeSels', | 
 |  |  |                     height: '250px', | 
 |  |  |                     data: insTb.options.data, | 
 |  |  |                     initValue: [], | 
 |  |  |                     model: {label: {type: 'text'}}, | 
 |  |  |                     prop: { | 
 |  |  |                         name: 'name', | 
 |  |  |                         value: 'id' | 
 |  |  |                     }, | 
 |  |  |                     radio: true, | 
 |  |  |                     clickClose: true, | 
 |  |  |                     tree: { | 
 |  |  |                         show: true, | 
 |  |  |                         indent: 15, | 
 |  |  |                         strict: false, | 
 |  |  |                         expandedKeys: true | 
 |  |  |                     } | 
 |  |  |                 }); | 
 |  |  |                 // 弹窗不出现滚动条 | 
 |  |  |                 $(layero).children('.layui-layer-content').css('overflow', 'visible'); | 
 |  |  |                 layui.form.render('select'); | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     // 监听排序事件 | 
 |  |  |     table.on('sort(receiveDetl)', function (obj) { | 
 |  |  | 
 |  |  |             case "add": | 
 |  |  |                 // showEditModel(data); | 
 |  |  |                 startIn(data); | 
 |  |  |                 break; | 
 |  |  |             case "chooseLoc": | 
 |  |  |                 showNodeSelect(); | 
 |  |  |                 break; | 
 |  |  |         } | 
 |  |  |     }); | 
 |  |  | 
 |  |  |         page: {curr: pageCurr} | 
 |  |  |      }); | 
 |  |  | } | 
 |  |  |  | 
 
 |  |  | 
 |  |  |  | 
 |  |  | <script type="text/html" id="operate"> | 
 |  |  |     <!--    <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>--> | 
 |  |  |     <a class="layui-btn layui-btn-xs btn-edit" lay-event="add">开始入库</a> | 
 |  |  |     <a class="layui-btn  layui-btn-normal layui-btn-xs btn-edit" lay-event="add">上架</a> | 
 |  |  |     <a class="layui-btn layui-btn-xs btn-edit" lay-event="chooseLoc">选择库位</a> | 
 |  |  |  | 
 |  |  |     <!--    <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a>--> | 
 |  |  | </script> | 
 |  |  |  | 
 |  |  | <script type="text/html" id="nodeSelect"> | 
 |  |  |     <form id="details" lay-filter="detail" class="layui-form"> | 
 |  |  |         <div class="layui-form-item"> | 
 |  |  |             <label class="layui-form-label">上架货位</label> | 
 |  |  |             <div class="layui-input-block"> | 
 |  |  |                 <div id="nodeSels" class="ew-xmselect-tree"></div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-form-item text-right"> | 
 |  |  |             <button class="layui-btn" lay-filter="pakin" lay-submit="">确认入库</button> | 
 |  |  |             <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> | 
 |  |  |         </div> | 
 |  |  |     </form> | 
 |  |  | </script> | 
 |  |  | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> | 
 |  |  | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> | 
 |  |  | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> | 
 |  |  | 
 |  |  |                         入库位置: | 
 |  |  |                     </label> | 
 |  |  |                     <div class="layui-input-block"> | 
 |  |  |                         <input type="number" class="layui-input" placeholder="可直接点击自动入库"> | 
 |  |  |                         <div id="nodeSel" class="ew-xmselect-tree"></div> | 
 |  |  | <!--                        <input type="number" class="layui-input" placeholder="可直接点击自动入库">--> | 
 |  |  |                     </div> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |             <hr class="layui-bg-gray"> | 
 |  |  |             <div class="layui-form-item text-right"> | 
 |  |  |                 <button class="layui-btn" lay-filter="recommendIn" lay-submit="">自动入库</button> | 
 |  |  | <!--                <button class="layui-btn" lay-filter="recommendIn" lay-submit="">自动入库</button>--> | 
 |  |  |                 <button class="layui-btn layui-btn-normal" lay-filter="inLoc" lay-submit="">入库</button> | 
 |  |  |                 <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> | 
 |  |  |             </div> |