modle_warehouse_basic_equipment.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>单仓档案管理系统</title>
  6. <link rel="stylesheet" type="text/css" href="/themes/metro/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="/themes/icon.css">
  8. <link rel="stylesheet" href="/themes/oneIndex.css">
  9. <link rel="stylesheet" type="text/css" href="/themes/modle_index.css">
  10. <script src="/src/jquery.min.js"></script>
  11. <script type="text/javascript" src="/src/jquery.easyui.min.js"></script>
  12. <script type="text/javascript" src="/locale/easyui-lang-zh_CN.js"></script>
  13. <script src="/src/page.js"></script>
  14. <script type="text/javascript" src="/src/modle_page.js"></script>
  15. </head>
  16. <body>
  17. <div class="tool-wrap">
  18. <div class="tool">
  19. <span><a href="#">收藏</a>|<a href="#">帮助</a></span>
  20. <span class="emp-item">
  21. <span class="emp-name"><a href="#">某某分公司-某某粮仓-某某管理员</a></span>
  22. <span class="albumn">
  23. <img src="/img/albumn.png"></span>
  24. <a href="">张大鹏</a>
  25. <span class="albumn-arrow"></span>
  26. </span>
  27. </span>
  28. </div>
  29. </div>
  30. <div class="logo-wrap">
  31. <div class="logo">
  32. <img src="/img/logo.png" alt="logo">
  33. </div>
  34. </div>
  35. <div class="nav-wrap">
  36. <div class="nav">
  37. <ul>
  38. <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>
  39. </ul>
  40. </div>
  41. </div>
  42. <div class="con-wrap" style="min-height: 600px;">
  43. <!--上方的足迹导航-->
  44. <span class="back-last">
  45. <img src="/img/back-1.png">&nbsp;上一级
  46. </span>
  47. <span class="status-title" style="font-size: 14px;">
  48. &emsp;仓房基础设施
  49. </span>
  50. <div class="easyui-panel">
  51. <div class="dt-nav">
  52. 器材名称:
  53. <input type="text" name="equip_name"></input>
  54. <!-- <input class="easyui-datebox"></input>&emsp;
  55. 检查类别:
  56. <select style="width:100px;">
  57. <option>全选</option>
  58. <option>门</option>
  59. <option>窗</option>
  60. </select> -->
  61. <a href="#" class="easyui-linkbutton" id="equip_modle_check" style="height: 22px;padding: 0 10px;">搜索</a>
  62. </div>
  63. <div class="dt-item">
  64. <div class="wp-item-export">
  65. <a class="wp-port wp-port-export" id="warehouse_add_equipment_basic">添加</a>
  66. </div>
  67. <table class="easyui-datagrid" style="width:100%;"
  68. toolbar="#" id="warehouse_equipment_list"
  69. title="" iconCls="icon-save"
  70. rownumbers="true" pagination="true">
  71. <thead>
  72. <tr>
  73. <th style="width:15%" data-options="field:'name',align:'center'">器材名称</th>
  74. <th style="width:15%" data-options="field:'number',align:'center'">数量</th>
  75. <th style="width:19%" data-options="field:'changeRecord',align:'center'">变动记录</th>
  76. <th style="width:15%" data-options="field:'uName',align:'center'">经手人</th>
  77. <th style="width:15%" data-options="field:'date',align:'center'">录入时间</th>
  78. <th style="width:19%" data-options="field:'remark',align:'center'">备注</th>
  79. </tr>
  80. </thead>
  81. </table>
  82. </div>
  83. </div>
  84. </div>
  85. <!--主要用来打开和关闭窗口-->
  86. <div id="warehouse_basic_equipment_add_win" class="easyui-window" title="记录查询添加" closed='true' style="width:680px;height:500px;padding:5px;">
  87. <form method="post" id="basic_equip_add_form">
  88. <ul>
  89. <li>
  90. <div class="warehouse_label">名称:&emsp;</div>
  91. <input class="easyui-validatebox" type="text" name="name" required="true"/>
  92. <div class="warehouse_label">数量:&emsp;</div>
  93. <input class="easyui-validatebox" type="text" name="number" />
  94. </li>
  95. <li>
  96. <div class="warehouse_label">经手人:&emsp;</div>
  97. <input class="easyui-validatebox" type="text" name="uName" />
  98. <div class="warehouse_label">仓房名称:&emsp;</div>
  99. <input class="easyui-validatebox" type="text" />
  100. </li>
  101. <li>
  102. <div class="warehouse_label warehouse_basic_msg_text">备注:&emsp;</div>
  103. <textarea style="width:450px;height:90px;" name="remark"></textarea>
  104. </li>
  105. <li>
  106. <div class="warehouse_label warehouse_basic_msg_text">变动记录:&emsp;</div>
  107. <textarea style="width:450px;height:90px;" name="changeRecord"></textarea>
  108. </li>
  109. <li>
  110. <a class="easyui-linkbutton" id="equip_add" icon="icon-ok" style="margin:auto 20px auto 250px;" >提交</a>
  111. <a href="#" class="easyui-linkbutton" id="close_warehouse_equipment_close" icon="icon-cancel" style="margin-left:40px;">取消</a>
  112. </li>
  113. </ul>
  114. </form>
  115. </div>
  116. <script type="text/javascript">
  117. (function(){
  118. function output(){
  119. var init = new inner();
  120. init.init();
  121. init.user_check();
  122. init.add_equip_msg();
  123. }
  124. function inner(){
  125. }
  126. inner.prototype.ip = modle_one._ip;
  127. inner.prototype.init = function(){
  128. //使得添加窗口能够开启和关闭
  129. modle_one._open('#warehouse_add_equipment_basic','#warehouse_basic_equipment_add_win');
  130. modle_one._close('#close_warehouse_equipment_close','#warehouse_basic_equipment_add_win');
  131. //使得表格能够加载
  132. var url = this.ip + '/device/equipment/get';
  133. $('#warehouse_equipment_list').datagrid({
  134. url:url,
  135. method:'get',
  136. rownumbers: true,
  137. pagination: true,
  138. fitColumns:true,
  139. singleSelect: true,
  140. title: '仓房基础设置',
  141. fit: true,
  142. striped:true,
  143. showFooter:true,
  144. loadFilter: function(data) {
  145. // console.log(data);
  146. return {
  147. total: data.page.count,
  148. rows: data.page.list
  149. };
  150. }
  151. })
  152. }
  153. inner.prototype.user_check = function(){
  154. var url = this.ip + '/device/equipment/get';
  155. $('#equip_modle_check').on('click',function(){
  156. var deviceName = $('input[name=equip_name]:text').val();
  157. console.log(data);
  158. var data = {deviceName:deviceName};
  159. $('#warehouse_equipment_list').datagrid({
  160. url:url,
  161. method:'get',
  162. rownumbers: true,
  163. pagination: true,
  164. fitColumns:true,
  165. singleSelect: true,
  166. title: '仓房基础设置',
  167. fit: true,
  168. striped:true,
  169. showFooter:true,
  170. queryParams:data,
  171. loadFilter: function(data) {
  172. console.log(data);
  173. return {
  174. total: data.page.count,
  175. rows: data.page.list
  176. };
  177. }
  178. })
  179. })
  180. }
  181. inner.prototype.add_equip_msg = function(){
  182. var url = this.ip + "/device/equipment/add";
  183. $('#equip_add').on('click',function(){
  184. // console.log('aaa');
  185. //这样进行表单验证正是我想要的
  186. var a = $('#basic_equip_add_form').form('validate');
  187. if(!a) {
  188. $.messager.alert('提示', base.tooltip, 'info');
  189. return;
  190. }
  191. if(a==true){
  192. var _origin = $('#basic_equip_add_form').serializeArray();
  193. var new_obj = modle_one._deal_serialize(_origin);
  194. // console.log(new_obj);
  195. var condition = {
  196. url:url,
  197. data:new_obj
  198. };
  199. $.ajax({
  200. type:'post',
  201. url:url,
  202. data:new_obj,
  203. dataType:'json',
  204. xhrFields: {
  205. withCredentials:true
  206. },
  207. timeout:10000,
  208. success:function(data){
  209. // console.log(data);
  210. modle_one.alert('提示信息','保存成功!');
  211. $('#warehouse_basic_equipment_add_win').window('close');
  212. $('#warehouse_equipment_list').datagrid('reload');
  213. },
  214. error:function(data){
  215. // console.log(data);
  216. modle_one.alert('提示信息','保存失败!');
  217. }
  218. })
  219. // modle_one._post(condition,function(msg){
  220. // console.info(msg);
  221. // if(msg.code=='1'){
  222. // modle_one._alert('信息提示','添加成功!');
  223. // }else{
  224. // modle_one._alert('信息提示','添加失败!');
  225. // }
  226. // });
  227. }
  228. })
  229. }
  230. output();
  231. })()
  232. </script>
  233. </body>
  234. </html>