modle_warehouse_basic_msg.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  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. <script type="text/javascript" src="/src/template-native.js"></script>
  16. <!-- <script type="text/javascript" src="/src/template.js"></script> -->
  17. </head>
  18. <body>
  19. <div class="tool-wrap">
  20. <div class="tool">
  21. <span><a href="#">收藏</a>|<a href="#">帮助</a></span>
  22. <span class="emp-item">
  23. <span class="emp-name"><a href="#">某某分公司-某某粮仓-某某管理员</a></span>
  24. <span class="albumn">
  25. <img src="/img/albumn.png"></span>
  26. <a href="">张大鹏</a>
  27. <span class="albumn-arrow"></span>
  28. </span>
  29. </span>
  30. </div>
  31. </div>
  32. <div class="logo-wrap">
  33. <div class="logo">
  34. <img src="/img/logo.png" alt="logo">
  35. </div>
  36. </div>
  37. <div class="nav-wrap">
  38. <div class="nav">
  39. <ul>
  40. <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>
  41. </ul>
  42. </div>
  43. </div>
  44. <div class="con-wrap" style="min-height: 600px;">
  45. <!--上方的足迹导航-->
  46. <span class="back-last"><img src="/img/back-1.png">&nbsp;上一级</span><span class="status-title" style="font-size: 14px;">&emsp;仓房信息档案</span>
  47. <!--左边题目的框架,取出框再次-->
  48. <!-- <div class="easyui-tabs" style="width: 100%;height: 600px;" data-options="tabPosition:'left'"> -->
  49. <!--左边的题目-->
  50. <!-- <div title='仓房信息'> -->
  51. <div class="easyui-tabs" style="width: 100%;height: 100%" data-options="border:false">
  52. <!--每个左边拓展的右边的 仓房基本信息-->
  53. <div title="仓房基本信息" style="padding: 5px;" id="warehouse_basic_message_container">
  54. <script type="text/html" id="warehouse_basic_message">
  55. <div>
  56. <a href="#" class="easyui-linkbutton l-btn l-btn-small l-btn-plain" iconcls="icon-export" plain="true" group="" id="">
  57. <span class="l-btn-text" style="margin-left:0px">导出Excel</span>
  58. </a>
  59. </div>
  60. <form>
  61. <fieldset class="warehouse_base_msg_header">
  62. <legend><h3>仓房基本信息详情</h3></legend>
  63. <ul>
  64. <li>
  65. <div><strong>所属库:</strong></div>
  66. <span> <%=%> </span>
  67. <div><strong>仓房类型:</strong></div>
  68. <span><%=type%></span>
  69. <div><strong>仓号:</strong></div>
  70. <span><%=%></span>
  71. <div><strong>交付使用日期:</strong></div>
  72. <span><%=%></span>
  73. </li>
  74. <li>
  75. <div style="width:26px;"></div>
  76. <div><strong>门窗更换时间:</strong></div>
  77. <input class="easyui-datebox door_time" style="width:160px;" value="<%=doorChangeDate%>"></input>
  78. <button class="easyui-linkbutton door_update" data-id="<%=id%>">
  79. 编辑
  80. </button>&emsp;&emsp;&emsp;
  81. <div><strong>外墙粉刷时间:</strong></div>
  82. <input class="easyui-datebox wall_time" style="width:160px;" value="<%=wallWashDate%>"></input>
  83. <button class="easyui-linkbutton wall_update" data-id="<%=id%>">
  84. 编辑
  85. </button>
  86. </li>
  87. </ul>
  88. </fieldset>
  89. <ul>
  90. <li>
  91. <fieldset class="warehouse_base_msg_body">
  92. <legend>结构</legend>
  93. <ul class="body_block_warehouse">
  94. <li>
  95. <div class='warehouse_label'>墙体:</div>
  96. <span>&emsp;<%=areaWall%>平方米</span>
  97. </li>
  98. <li>
  99. <div class='warehouse_label'>屋面:</div>
  100. <span>&emsp;<%=areaHouse%>平方米</span>
  101. </li>
  102. <li>
  103. <div class='warehouse_label'>地面</div>
  104. <span>&emsp;<%=areaFloor%>平方米</span>
  105. </li>
  106. <li>
  107. <div class='warehouse_label'>设计容量:</div>
  108. <span>&emsp;<%=areaVolume%>吨</span>
  109. </li>
  110. <li>
  111. <div class='warehouse_label'>&emsp;</div>
  112. <span>&emsp;</span>
  113. </li>
  114. </ul>
  115. </fieldset>
  116. <fieldset class="warehouse_base_msg_body">
  117. <legend>仓内</legend>
  118. <ul class="body_block_warehouse">
  119. <li>
  120. <div class='warehouse_label'>长:</div>
  121. <span>&emsp;<%=innerWidth%>米</span>
  122. </li>
  123. <li>
  124. <div class='warehouse_label'>宽:</div>
  125. <span>&emsp;<%=innerHeight%>米</span>
  126. </li>
  127. <li>
  128. <div class='warehouse_label'>堆粮线高:</div>
  129. <span>&emsp;<%=innerLineHeight%>米</span>
  130. </li>
  131. <li>
  132. <div class='warehouse_label'>筒仓内径:</div>
  133. <span>&emsp;<%=innerDiameter%>米</span>
  134. </li>
  135. <li>
  136. <div class='warehouse_label'>仓内体积:</div>
  137. <span>&emsp;<%=innerVolume%>立方米</span>
  138. </li>
  139. </ul>
  140. </fieldset>
  141. <fieldset class="warehouse_base_msg_body">
  142. <legend>其他</legend>
  143. <ul class="body_block_warehouse">
  144. <li>
  145. <div class='warehouse_label'>库门数量:</div>
  146. <span>&emsp;<%=doorNumber%>个</span>
  147. </li>
  148. <li>
  149. <div class='warehouse_label'>库门高度:</div>
  150. <span>&emsp;<%=doorHeight%>米</span>
  151. </li>
  152. <li>
  153. <div class='warehouse_label'>库门宽度:</div>
  154. <span>&emsp;<%=doorWidth%>米</span>
  155. </li>
  156. <li>
  157. <div class='warehouse_label'>通风方式:</div>
  158. <span>&emsp;<%=airFormat%></span>
  159. </li>
  160. <li>
  161. <div class='warehouse_label'> 隔热方式::</div>
  162. <span>&emsp;<%=hotFormat%></span>
  163. </li>
  164. </ul>
  165. </fieldset>
  166. </li>
  167. </ul>
  168. </form>
  169. <div class="warehouse_base_info_foot">
  170. <ul>
  171. <li>
  172. <div class="warehouse_label"><strong>货位列表:</strong></div>
  173. <span><%=%></span>
  174. </li>
  175. <li>
  176. <div class="warehouse_label"><strong>货位号:</strong></div>
  177. <span><%=positionNumber%></span>
  178. </li>
  179. </ul>
  180. </div>
  181. </script>
  182. </div>
  183. <!--每个左边拓展的右边的 仓房电缆布置图-->
  184. <div title="仓房电缆布置图">
  185. <img src="/themes/picture/layout_show.jpg" width='975'>
  186. </div>
  187. <!--每个左边拓展的右边的 记录查询-->
  188. <div title="记录查询" style="padding-left:5px" id="record_check">
  189. <div class="dt-nav">
  190. 检查日期:
  191. <input class="easyui-datebox" type="text" id="start_time_record" value="">-
  192. <input class="easyui-datebox" id="end_time_record" value="">&emsp;
  193. 检查类别:
  194. <select id="apartment_record" style="width: 100px;height: 22px;border-color: rgb(224, 224, 224);">
  195. <option selected="selected" value="0">全选</option>
  196. <script type="text/html" id="record_option_equip">
  197. <%for(var i=0;i<type.length;i++){%>
  198. <option value="<%=type[i]%>"><%=type[i]%></option>
  199. <%}%>
  200. </script>
  201. </select>
  202. <a href="#" class="easyui-linkbutton" style="height: 22px;padding: 0 10px;" id="warehouse_equip_record_search">搜索</a>
  203. </div>
  204. <div class="dt-item" id="">
  205. <div class="wp-item-export">
  206. <a class="wp-port wp-port-export" id="warehouse_add_record">添加</a>
  207. <a class="wp-port wp-port-import">导出</a>
  208. </div>
  209. <table class="easyui-datagrid" id="record_equip" style="width:100%;"
  210. toolbar="#record_equip_tool"
  211. title="" iconCls="icon-save"
  212. rownumbers="true" pagination="true">
  213. <!-- <thead>
  214. <tr>
  215. <th style="width:8%" data-options="field:'checkDate'">检查日期</th>
  216. <th style="width:7%" data-options="field:'type'">检查类别</th>
  217. <th style="width:7%" data-options="field:'bosshead'">检察人员</th>
  218. <th style="width:8%" data-options="field:'problem'">存在问题</th>
  219. <th style="width:6%" data-options="field:'opinion'">处理意见</th>
  220. <th style="width:11%" data-options="field:'maintainStartDate'">维修开始日期</th>
  221. <th style="width:11%" data-options="field:'maintainEndDate'">维修结束日期</th>
  222. <th style="width:11%" data-options="field:'bosshead'">维修责任人</th>
  223. <th style="width:9%" data-options="field:'result'">维修结果</th>
  224. <th style="width:9%" data-options="field:'remark',align:'center'">备注</th>
  225. <th style="width:12%" data-options="field:'operation',align:'center'">操作</th>
  226. </tr>
  227. </thead> -->
  228. </table>
  229. <!--这里是模板渲染出来的地方,在框架中很麻烦,暂时省略-->
  230. <!-- <div id="warehouse_record_list_container">
  231. <script type='text/html' id="warehouse_record_list">
  232. <table class="easyui-datagrid" id="record_equip" style="width:100%;"
  233. toolbar="#tb"
  234. title="" iconCls="icon-save"
  235. rownumbers="true" pagination="true">
  236. <thead>
  237. <tr>
  238. <th style="width:8%" data-options="field:'check_data'">检查日期</th>
  239. <th style="width:7%" data-options="field:'check_type'">检查类别</th>
  240. <th style="width:7%" data-options="field:'check_person'">检察人员</th>
  241. <th style="width:8%" data-options="field:'exsit_pro'">存在问题</th>
  242. <th style="width:6%" data-options="field:'deal_advise'">处理意见</th>
  243. <th style="width:8%" data-options="field:'begin_date'">维修开始日期</th>
  244. <th style="width:8%" data-options="field:'end_date'">维修结束日期</th>
  245. <th style="width:8%" data-options="field:'jjj'">维修责任人</th>
  246. <th style="width:7%" data-options="field:'result'">维修结果</th>
  247. <th style="width:7%" data-options="field:'attachment',align:'center'">备注</th>
  248. <th style="width:12%" data-options="field:'operation',align:'center'">操作</th>
  249. </tr>
  250. </thead>
  251. <tbody>
  252. <%for(var i = 0; i<list.length; i++ ){%>
  253. <tr>
  254. <td><%=list[i]['checkDate']%></td>
  255. <td><%=list[i]['type']%></td>
  256. <td>检察人员?</td>
  257. <td><%=list[i]['problem']%></td>
  258. <td><%=list[i]['opinion']%></td>
  259. <td><%=list[i]['maintainStartDate']%></td>
  260. <td><%=list[i]['maintainEndDate']%></td>
  261. <td><%=list[i]['bosshead']%></td>
  262. <td><%=list[i]['result']%></td>
  263. <td><%=list[i]['remark']%></td>
  264. <td>
  265. <a href="#" data-id='<%=list[i]['id']%>'>【修改】</a>
  266. <a href="#" data-id='<%=list[i]['id']%>'>【详情】</a>
  267. </td>
  268. </tr>
  269. <%}%>
  270. </tbody>
  271. </table>
  272. </script>
  273. </div> -->
  274. </div>
  275. </div>
  276. <!-- </div> -->
  277. <!-- </div> -->
  278. </div>
  279. </div>
  280. <div class="bottom-wrap">&copy; 2018 中储粮-单仓档案管理系统 版权所有</div>
  281. <!--主要窗口的弹窗窗口-->
  282. <div id="warehouse_basic_record_add_win" class="easyui-window " title="记录查询添加" closed='true' style="width:680px;height:500px;padding:5px;">
  283. <form method="post" action="#" id="warehouse_basic_record_add_form">
  284. <input name="id" type="hidden"></input>
  285. <ul class="warehouse_basic_record_add_win_ul">
  286. <li>
  287. <div>检查日期:</div>
  288. <input type="text" name="checkDate" class="easyui-datebox easyui-validatebox"></input>
  289. <div>检查类别:</div>
  290. <input type="text" name="type" class="easyui-validatebox "></input>
  291. <div>检查项目:</div>
  292. <input type="text" name="project" class="easyui-validatebox"></input>
  293. </li>
  294. <li>
  295. <div class="text_title_public_style easyui-validatebox">存在问题:</div>
  296. <textarea name="problem"></textarea>
  297. </li>
  298. <li>
  299. <div class="text_title_public_style easyui-validatebox" name='opinion'>处理意见:</div>
  300. <textarea></textarea>
  301. </li>
  302. <li>
  303. <div>维修责任人:</div>
  304. <input type="text" name="bosshead" class="easyui-validatebox"></input>
  305. <div>维修开始日期:</div>
  306. <input type="text" class="easyui-datebox easyui-validatebox" name="maintainStartDate"></input>
  307. <div>维修结束日期:</div>
  308. <input type="text" class="easyui-datebox easyui-validatebox" name="maintainEndDate"></input>
  309. </li>
  310. <li>
  311. <div class="text_title_public_style">维修结果:</div>
  312. <textarea name="result" class="easyui-validatebox"></textarea>
  313. </li>
  314. <li>
  315. <div class="text_title_public_style">备注:</div>
  316. <textarea name="remark" class="easyui-validatebox"></textarea>
  317. </li>
  318. <li>
  319. <a href="#" class="easyui-linkbutton" icon="icon-ok" data-control='edit' id="comfirm_add_record" style="margin:auto 20px auto 250px;">确认</a>
  320. <a href="#" class="easyui-linkbutton" id="close_warehouse_record_add" icon="icon-cancel" style="margin-left:40px;">取消</a>
  321. </li>
  322. </ul>
  323. </form>
  324. </div>
  325. <script>
  326. (function(win,$){
  327. var ip = modle_one._ip;
  328. var app = {
  329. init:function(){
  330. modle_one._open('#warehouse_add_record','#warehouse_basic_record_add_win');
  331. modle_one._close('#close_warehouse_record_add','#warehouse_basic_record_add_win');
  332. //首次页面出来时候加载的信息
  333. app.get_house_show();
  334. app.update_door_wall();
  335. app.add_equip_record();
  336. app.record_equip_search();
  337. app.delete_record_msg();
  338. app.clear_form_add_record();
  339. app.update_record_msg();
  340. },
  341. dateFormart:function(time){
  342. var date = new Date(time);
  343. var year = date.getFullYear();
  344. var month = date.getMonth()+1;
  345. var day = date.getDate();
  346. return year+'/'+month+'/'+day;
  347. },
  348. //由于添加的表单不是新的窗口,所以啊,每次进入要清空表单的数据
  349. clear_form_add_record:function(){
  350. $('#warehouse_add_record').on('click',function(){
  351. $('#warehouse_basic_record_add_form').form('clear');
  352. })
  353. },
  354. //仓房基本信息进入填充标签页表格数据
  355. get_house_show:function(){
  356. //得到仓房基本信息页面的展示数据
  357. var url_warehouse_basic_msg = ip+"/house/show";
  358. var data_warehouse_basic_msg = {houseId:'1'};
  359. var condition_warehouse_basic_msg =
  360. {
  361. url:url_warehouse_basic_msg,
  362. data:data_warehouse_basic_msg
  363. };
  364. modle_one._get(condition_warehouse_basic_msg,function(msg){
  365. show_data = msg.house;
  366. var html = modle_one._show('warehouse_basic_message',show_data);
  367. $('#warehouse_basic_message_container').html(html);
  368. $.parser.parse($('#warehouse_basic_message_container'));
  369. });
  370. //数据表格
  371. $('#record_equip').datagrid({
  372. url: ip+'/house/record/get',
  373. method: 'get',
  374. // toolbar: '#bd-toolbar',
  375. rownumbers: true,
  376. pagination: true,
  377. fitColumns:true,
  378. singleSelect:false,
  379. title: '记录查询',
  380. fit: true,
  381. striped:true,
  382. showFooter:true,
  383. columns: [[
  384. {field:'checkDate', title:'检查日期', width:'8%'},
  385. {field:'type', title:'检测类型', width:'7%'},
  386. {field:'bosshead', title:'检察人员', width:'7%'},
  387. {field:'problem', title:'存在问题', width:'8%'},
  388. {field:'opinion', title:'处理意见', width:'8%'},
  389. {field:'maintainStartDate', title:'维修开始日期', width:'11%'},
  390. {field:'maintainEndDate', title:'维修结束日期', width:'11%'},
  391. {field:'bosshead', title:'维修责任人', width:'11%'},
  392. {field:'result', title:'处理结果', width:'9%'},
  393. {field:'remark', title:'备注', width:'9%'},
  394. {
  395. field:'id',
  396. title:'操作',
  397. width:'14%',
  398. align: 'center',
  399. formatter: function(value, row, index) {
  400. return '<a class="record_record_update" data-id=' + value + '>修改</a>&nbsp;|&nbsp;<a class="record_equip_del" data-id=' + value + '>删除</a>';
  401. }
  402. }
  403. ]],
  404. loadFilter: function(data) {
  405. return {
  406. // page: e.data.pageNo,
  407. total: data.result.count,
  408. rows: data.result.list
  409. };
  410. },
  411. onLoadSuccess: function(){
  412. }
  413. });
  414. //这里是模板渲染出来的地方,在框架中很麻烦,暂时省略
  415. //得到记录查询的记录
  416. // var url_warehouse_record_msg = ip+'/house/record/get';
  417. // var data_warehouse_record_msg = {};
  418. // var condition_warehouse_record_msg = {
  419. // url:url_warehouse_record_msg,
  420. // data:data_warehouse_record_msg
  421. // };
  422. // modle_one._get(condition_warehouse_record_msg,function(msg){
  423. // console.info(msg);
  424. // //编译单选框
  425. // var select_content = modle_one._show('record_option_equip',msg);
  426. // // console.info(select_content);
  427. // $('#apartment_record').append(select_content);
  428. // //编译内容
  429. // var msg_obj = msg.records;
  430. // var html = modle_one._show('warehouse_record_list',msg_obj);
  431. // // console.log(html);
  432. // $('#warehouse_record_list_container').html(html);
  433. // $.parser.parse($('#warehouse_record_list_container'));
  434. // })
  435. },
  436. //更新门和墙的时间
  437. update_door_wall:function(){
  438. var url = ip+"/house/edit";
  439. $(document).on('click','.door_update',function(){
  440. var door_date_str = $('.door_time').val();
  441. var id = $(this).data('id');
  442. var data = {
  443. doorChangeDate:door_date_str,
  444. houseId:id,
  445. wallWashDate:''
  446. };
  447. var condition = {
  448. url:url,
  449. data:data
  450. };
  451. // console.log(condition);
  452. modle_one._get(condition,function(msg){
  453. // console.info(msg);
  454. modle_one._alert('成功提示','修改成功!');
  455. })
  456. });
  457. $(document).on('click','.wall_update',function(){
  458. var wall_date_str = $('.wall_time').val();
  459. var id = $(this).data('id');
  460. var data = {
  461. doorChangeDate:'',
  462. houseId:id,
  463. wallWashDate:wall_date_str
  464. };
  465. var condition = {
  466. url:url,
  467. data:data
  468. };
  469. // console.log(condition);
  470. modle_one._get(condition,function(msg){
  471. // console.info(msg);
  472. modle_one._alert('成功提示','修改成功!');
  473. })
  474. });
  475. },
  476. //记录添加数据
  477. add_equip_record:function(){
  478. $('#comfirm_add_record').on('click',function(){
  479. //这个control是用来看是是编辑的还是是添加的
  480. var control = $(this).data('control');
  481. console.log(control);
  482. var form_data = $('#warehouse_basic_record_add_form').serializeArray();
  483. var data = {};
  484. var url;
  485. if(control=='edit'){
  486. url = ip+'/house/record/edit';
  487. }
  488. else{
  489. url = ip+'/house/record/insert';
  490. }
  491. console.log(url);
  492. for(var i=0;i<form_data.length;i++){
  493. data[form_data[i]['name']] = form_data[i]['value'];
  494. }
  495. // console.error(data);
  496. var condition = {
  497. url:url,
  498. data:data
  499. };
  500. // console.log(condition);
  501. modle_one._post(condition,function(msg){
  502. // console.log(msg);
  503. modle_one._alert('成功提示','保存成功!');
  504. $('#warehouse_basic_record_add_win').window('close');
  505. $('#record_equip').datagrid('reload');
  506. })
  507. })
  508. },
  509. //warehouse_equip_record_search
  510. record_equip_search:function(){
  511. $('#warehouse_equip_record_search').on('click',function(e){
  512. var start = $('#start_time_record').next().find('*').filter('.textbox-value').val();
  513. var end = $('#end_time_record').next().find('*').filter('.textbox-value').val();;
  514. var type = $('#apartment_record').val();
  515. var data = {};
  516. // console.log(start+''+end+''+type);
  517. if(type ==0){
  518. data = {
  519. maintainStartDate:start,
  520. maintainEndDate:end
  521. };
  522. }else{
  523. data = {
  524. maintainStartDate:start,
  525. maintainEndDate:end,
  526. type:type
  527. };
  528. }
  529. $('#record_equip').datagrid({
  530. url: ip+'/house/record/get',
  531. method: 'get',
  532. // toolbar: '#bd-toolbar',
  533. rownumbers: true,
  534. pagination: true,
  535. fitColumns:true,
  536. singleSelect:false,
  537. title: '记录查询',
  538. fit: true,
  539. striped:true,
  540. showFooter:true,
  541. queryParams:data,
  542. columns: [[
  543. {field:'checkDate', title:'检查日期', width:'8%'},
  544. {field:'type', title:'检测类型', width:'7%'},
  545. {field:'bosshead', title:'检察人员', width:'7%'},
  546. {field:'problem', title:'存在问题', width:'8%'},
  547. {field:'opinion', title:'处理意见', width:'8%'},
  548. {field:'maintainStartDate', title:'维修开始日期', width:'11%'},
  549. {field:'maintainEndDate', title:'维修结束日期', width:'11%'},
  550. {field:'bosshead', title:'维修责任人', width:'11%'},
  551. {field:'result', title:'处理结果', width:'9%'},
  552. {field:'remark', title:'备注', width:'9%'},
  553. {
  554. field:'id',
  555. title:'操作',
  556. width:'14%',
  557. align: 'center',
  558. formatter: function(value, row, index) {
  559. return '<a class="record_record_update" data-id=' + value + '>修改</a>&nbsp;|&nbsp;<a class="record_equip_del" data-id=' + value + '>删除</a>';
  560. }
  561. }
  562. ]],
  563. loadFilter: function(data) {
  564. return {
  565. total: data.result.count,
  566. rows: data.result.list
  567. };
  568. }
  569. });
  570. })
  571. },
  572. delete_record_msg:function(){
  573. $(document).on('click','.record_equip_del',function(){
  574. $.messager.confirm('确认提示','你确认删除磁条记录吗?',function(r){
  575. if (r){
  576. var url = ip+'/house/record/delete';
  577. var data = $('.record_equip_del').data('id');
  578. console.log(data);
  579. var condition = {
  580. url:url,
  581. data:{id:data}
  582. }
  583. modle_one._post(condition,function(msg){
  584. console.log(msg);
  585. if(msg.code=='-1'){
  586. modle_one._alert('成功提示','删除失败!');
  587. }
  588. else{
  589. modle_one._alert('成功提示','删除成功!');
  590. $('#record_equip').datagrid('reload');
  591. }
  592. })
  593. }
  594. });
  595. })
  596. },
  597. update_record_msg:function(){
  598. $(document).on('click','.record_record_update',function(){
  599. //我被坑了半天了,这个easyui里面的时间的格式,就算是传过来给我的是时间戳,
  600. //也要穿个字符串,刚被坑了半天,我真的醉了
  601. var row = $('#record_equip').datagrid('getSelected');
  602. // console.log(row);
  603. modle_one._open('.record_record_update','#warehouse_basic_record_add_win');
  604. $('#warehouse_basic_record_add_form').form('load',row);
  605. });
  606. }
  607. }
  608. app.init();
  609. })(window,jQuery);
  610. </script>
  611. </body>
  612. </html>