rock_goods_xiang.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. var at = $('#optionview_{rand}').bootstree({
  5. url:js.getajaxurl('gettreedata','option','system',{'num':'goodstype'}),
  6. columns:[{
  7. text:'物品分类',dataIndex:'name',align:'left',xtype:'treecolumn',width:'79%'
  8. },{
  9. text:'ID',dataIndex:'id',width:'20%'
  10. }],
  11. load:function(d){
  12. c.loadfile('0','所有出入库详情');
  13. },
  14. itemdblclick:function(d){
  15. c.loadfile(d.id,d.name);
  16. }
  17. });
  18. var forbo = false;
  19. var a = $('#view_{rand}').bootstable({
  20. tablename:'goodss',autoLoad:false,celleditor:true,fanye:true,dir:'desc',sort:'a.id',checked:true,
  21. url:publicstore('{mode}','{dir}'),storebeforeaction:'xiangbeforeshow',storeafteraction:'xiangaftershow',
  22. columns:[{
  23. text:'名称',dataIndex:'name',align:'left'
  24. },{
  25. text:'规格',dataIndex:'guige'
  26. },{
  27. text:'型号',dataIndex:'xinghao'
  28. },{
  29. text:'分类',dataIndex:'typeid',align:'left'
  30. },{
  31. text:'类型',dataIndex:'kind',sortable:true
  32. },{
  33. text:'日期',dataIndex:'applydt',sortable:true
  34. },{
  35. text:'操作人',dataIndex:'optname'
  36. },{
  37. text:'数量',dataIndex:'count',sortable:true,align:'right'
  38. },{
  39. text:'对应仓库',dataIndex:'depotname'
  40. },{
  41. text:'说明',dataIndex:'explain',align:'left'
  42. },{
  43. text:'状态',dataIndex:'status'
  44. }],
  45. loadbefore:function(d){
  46. if(!forbo){
  47. var d1 = [];
  48. for(var i in d.tyeparr)d1.push({value:i,name:d.tyeparr[i]});
  49. js.setselectdata(get('type_{rand}'),d1,'value');
  50. }
  51. forbo = true;
  52. }
  53. });
  54. var c = {
  55. search:function(){
  56. var s=get('key_{rand}').value;
  57. a.setparams({key:s,dt:get('dt1_{rand}').value},true);
  58. },
  59. clickdt:function(o1, lx){
  60. $(o1).rockdatepicker({initshow:true,view:'month',inputid:'dt'+lx+'_{rand}'});
  61. },
  62. daochu:function(o1){
  63. publicdaochuobj({
  64. 'objtable':a,
  65. 'modename':'物品出入库详情',
  66. 'btnobj':o1
  67. });
  68. },
  69. loadfile:function(spd,nsd){
  70. $('#megss{rand}').html(nsd);
  71. a.setparams({'typeid':spd}, true);
  72. },
  73. genmu:function(){
  74. this.loadfile('0','所有出入库详情');
  75. },
  76. del:function(){
  77. a.del({checked:true,url:js.getajaxurl('delxiang','{mode}','{dir}')});
  78. },
  79. changetype:function(o1){
  80. a.setparams({types:o1.value},true);
  81. }
  82. };
  83. js.initbtn(c);
  84. $('#optionview_{rand}').css('height',''+(viewheight-25)+'px');
  85. $('#type_{rand}').change(function(){
  86. c.changetype(this);
  87. });
  88. });
  89. </script>
  90. <table width="100%">
  91. <tr valign="top">
  92. <td width="220">
  93. <div style="border:1px #cccccc solid">
  94. <div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
  95. </div>
  96. </td>
  97. <td width="10"></td>
  98. <td>
  99. <div>
  100. <table width="100%"><tr>
  101. <td align="left" nowrap>
  102. <button class="btn btn-default" click="genmu" type="button">所有详情</button>&nbsp;
  103. </td>
  104. <td nowrap style="padding-left:10px">
  105. <div style="width:120px" class="input-group">
  106. <input placeholder="月份" readonly class="form-control" id="dt1_{rand}" >
  107. <span class="input-group-btn">
  108. <button class="btn btn-default" click="clickdt,1" type="button"><i class="icon-calendar"></i></button>
  109. </span>
  110. </div>
  111. </td>
  112. <td style="padding-left:10px">
  113. <input class="form-control" style="width:200px" id="key_{rand}" placeholder="物品名/操作人/仓库">
  114. </td>
  115. <td>
  116. <select class="form-control" style="width:130px" id="type_{rand}"><option value="">所有类型</option></select>
  117. </td>
  118. <td style="padding-left:10px">
  119. <button class="btn btn-default" click="search" type="button">搜索</button>
  120. </td>
  121. <td width="90%">
  122. &nbsp;&nbsp;<span id="megss{rand}"></span>
  123. </td>
  124. <td align="right" nowrap>
  125. <button class="btn btn-default" click="daochu,1" type="button">导出 <i class="icon-angle-down"></i></button>&nbsp;&nbsp;
  126. <button class="btn btn-danger" id="del_{rand}" click="del" type="button"><i class="icon-trash"></i> 删除</button>
  127. </td>
  128. </tr></table>
  129. </div>
  130. <div class="blank10"></div>
  131. <div id="view_{rand}"></div>
  132. </td>
  133. </tr>
  134. </table>
粤ICP备19079148号