123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>单仓档案管理系统</title>
- <link rel="stylesheet" type="text/css" href="/themes/metro/easyui.css">
- <link rel="stylesheet" type="text/css" href="/themes/icon.css">
- <link rel="stylesheet" href="/themes/oneIndex.css">
- <link rel="stylesheet" type="text/css" href="/themes/modle_index.css">
- <script src="/src/jquery.min.js"></script>
- <script type="text/javascript" src="/src/jquery.easyui.min.js"></script>
- <script type="text/javascript" src="/locale/easyui-lang-zh_CN.js"></script>
- <script src="/src/page.js"></script>
- <script type="text/javascript" src="/src/modle_page.js"></script>
- </head>
- <body>
- <div class="tool-wrap">
- <div class="tool">
- <span><a href="#">收藏</a>|<a href="#">帮助</a></span>
- <span class="emp-item">
- <span class="emp-name"><a href="#">某某分公司-某某粮仓-某某管理员</a></span>
- <span class="albumn">
- <img src="/img/albumn.png"></span>
- <a href="">张大鹏</a>
- <span class="albumn-arrow"></span>
- </span>
- </span>
- </div>
- </div>
- <div class="logo-wrap">
- <div class="logo">
- <img src="/img/logo.png" alt="logo">
- </div>
- </div>
- <div class="nav-wrap">
- <div class="nav">
- <ul>
- <li><a href="/index.html">首页</a></li><li class="active"><a href="/pages/company.html">单仓档案</a></li><li>工作平台</li><li>单仓设备集成平台</li><li>单仓业务分析系统</li><li>手持移动端管理</li><li>用户管理</li><li>基础参数管理</li><li>站点平台管理</li>
- </ul>
- </div>
- </div>
- <div class="con-wrap" style="min-height: 600px;">
- <!--上方的足迹导航-->
- <span class="back-last">
- <img src="/img/back-1.png"> 上一级
- </span>
- <span class="status-title" style="font-size: 14px;">
-  仓房基础设施
- </span>
- <div class="easyui-panel">
- <div class="dt-nav">
- 器材名称:
- <input type="text" name="equip_name"></input>
- <!-- <input class="easyui-datebox"></input> 
- 检查类别:
- <select style="width:100px;">
- <option>全选</option>
- <option>门</option>
- <option>窗</option>
- </select> -->
- <a href="#" class="easyui-linkbutton" id="equip_modle_check" style="height: 22px;padding: 0 10px;">搜索</a>
- </div>
- <div class="dt-item">
- <div class="wp-item-export">
- <a class="wp-port wp-port-export" id="warehouse_add_equipment_basic">添加</a>
- </div>
- <table class="easyui-datagrid" style="width:100%;"
- toolbar="#" id="warehouse_equipment_list"
- title="" iconCls="icon-save"
- rownumbers="true" pagination="true">
- <thead>
- <tr>
- <th style="width:15%" data-options="field:'name',align:'center'">器材名称</th>
- <th style="width:15%" data-options="field:'number',align:'center'">数量</th>
- <th style="width:19%" data-options="field:'changeRecord',align:'center'">变动记录</th>
- <th style="width:15%" data-options="field:'uName',align:'center'">经手人</th>
- <th style="width:15%" data-options="field:'date',align:'center'">录入时间</th>
- <th style="width:19%" data-options="field:'remark',align:'center'">备注</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
- <!--主要用来打开和关闭窗口-->
- <div id="warehouse_basic_equipment_add_win" class="easyui-window" title="记录查询添加" closed='true' style="width:680px;height:500px;padding:5px;">
- <form method="post" id="basic_equip_add_form">
- <ul>
- <li>
- <div class="warehouse_label">名称: </div>
- <input class="easyui-validatebox" type="text" name="name" required="true"/>
- <div class="warehouse_label">数量: </div>
- <input class="easyui-validatebox" type="text" name="number" />
- </li>
- <li>
- <div class="warehouse_label">经手人: </div>
- <input class="easyui-validatebox" type="text" name="uName" />
- <div class="warehouse_label">仓房名称: </div>
- <input class="easyui-validatebox" type="text" />
- </li>
- <li>
- <div class="warehouse_label warehouse_basic_msg_text">备注: </div>
- <textarea style="width:450px;height:90px;" name="remark"></textarea>
- </li>
- <li>
- <div class="warehouse_label warehouse_basic_msg_text">变动记录: </div>
- <textarea style="width:450px;height:90px;" name="changeRecord"></textarea>
- </li>
- <li>
- <a class="easyui-linkbutton" id="equip_add" icon="icon-ok" style="margin:auto 20px auto 250px;" >提交</a>
- <a href="#" class="easyui-linkbutton" id="close_warehouse_equipment_close" icon="icon-cancel" style="margin-left:40px;">取消</a>
- </li>
- </ul>
- </form>
- </div>
- <script type="text/javascript">
- (function(){
- function output(){
- var init = new inner();
- init.init();
- init.user_check();
- init.add_equip_msg();
- }
- function inner(){
- }
- inner.prototype.ip = modle_one._ip;
- inner.prototype.init = function(){
- //使得添加窗口能够开启和关闭
- modle_one._open('#warehouse_add_equipment_basic','#warehouse_basic_equipment_add_win');
- modle_one._close('#close_warehouse_equipment_close','#warehouse_basic_equipment_add_win');
- //使得表格能够加载
- var url = this.ip + '/device/equipment/get';
- $('#warehouse_equipment_list').datagrid({
- url:url,
- method:'get',
- rownumbers: true,
- pagination: true,
- fitColumns:true,
- singleSelect: true,
- title: '仓房基础设置',
- fit: true,
- striped:true,
- showFooter:true,
- loadFilter: function(data) {
- // console.log(data);
- return {
- total: data.page.count,
- rows: data.page.list
- };
- }
- })
- }
- inner.prototype.user_check = function(){
- var url = this.ip + '/device/equipment/get';
- $('#equip_modle_check').on('click',function(){
- var deviceName = $('input[name=equip_name]:text').val();
- console.log(data);
- var data = {deviceName:deviceName};
- $('#warehouse_equipment_list').datagrid({
- url:url,
- method:'get',
- rownumbers: true,
- pagination: true,
- fitColumns:true,
- singleSelect: true,
- title: '仓房基础设置',
- fit: true,
- striped:true,
- showFooter:true,
- queryParams:data,
- loadFilter: function(data) {
- console.log(data);
- return {
- total: data.page.count,
- rows: data.page.list
- };
- }
- })
- })
- }
- inner.prototype.add_equip_msg = function(){
- var url = this.ip + "/device/equipment/add";
- $('#equip_add').on('click',function(){
- // console.log('aaa');
- //这样进行表单验证正是我想要的
- var a = $('#basic_equip_add_form').form('validate');
- if(!a) {
- $.messager.alert('提示', base.tooltip, 'info');
- return;
- }
- if(a==true){
- var _origin = $('#basic_equip_add_form').serializeArray();
- var new_obj = modle_one._deal_serialize(_origin);
- // console.log(new_obj);
- var condition = {
- url:url,
- data:new_obj
- };
- $.ajax({
- type:'post',
- url:url,
- data:new_obj,
- dataType:'json',
- xhrFields: {
- withCredentials:true
- },
- timeout:10000,
- success:function(data){
- // console.log(data);
- modle_one.alert('提示信息','保存成功!');
- $('#warehouse_basic_equipment_add_win').window('close');
- $('#warehouse_equipment_list').datagrid('reload');
- },
- error:function(data){
- // console.log(data);
- modle_one.alert('提示信息','保存失败!');
- }
- })
- // modle_one._post(condition,function(msg){
- // console.info(msg);
- // if(msg.code=='1'){
- // modle_one._alert('信息提示','添加成功!');
- // }else{
- // modle_one._alert('信息提示','添加失败!');
- // }
- // });
- }
- })
- }
- output();
- })()
- </script>
- </body>
- </html>
|