rock_goods_pdck.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. {params}
  5. //根据仓库统计下面的物品数量
  6. var depotid = params.depotid;if(!depotid)depotid='';
  7. var columns = [{
  8. text:'编号',dataIndex:'num'
  9. },{
  10. text:'名称',dataIndex:'name',align:'left'
  11. },{
  12. text:'分类',dataIndex:'typeid',align:'left'
  13. },{
  14. text:'单价',dataIndex:'price',sortable:true
  15. },{
  16. text:'单位',dataIndex:'unit'
  17. },{
  18. text:'规格',dataIndex:'guige'
  19. },{
  20. text:'型号',dataIndex:'xinghao'
  21. },{
  22. text:'ID',dataIndex:'id',sortable:true
  23. },{
  24. text:'数量',dataIndex:'stock'
  25. }];
  26. var a = $('#view_{rand}').bootstable({
  27. tablename:'goodss',celleditor:true,fanye:true,
  28. url:publicstore('{mode}','{dir}'),params:{'depotid':depotid},storebeforeaction:'pdck_beforeshow',storeafteraction:'pdck_aftershow',
  29. columns:columns
  30. });
  31. var c = {
  32. search:function(){
  33. var s=get('key_{rand}').value;
  34. a.setparams({key:s,dt:get('dt1_{rand}').value},true);
  35. },
  36. daochu:function(o1){
  37. publicdaochuobj({
  38. 'objtable':a,
  39. 'btnobj':o1
  40. });
  41. }
  42. };
  43. js.initbtn(c);
  44. });
  45. </script>
  46. <div>
  47. <table width="100%"><tr>
  48. <td align="left" nowrap>
  49. <input placeholder="截止日期" style="width:120px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt1_{rand}" >
  50. </td>
  51. <td style="padding-left:10px">
  52. <input class="form-control" style="width:200px" id="key_{rand}" placeholder="物品名/型号/规格">
  53. </td>
  54. <td style="padding-left:10px">
  55. <button class="btn btn-default" click="search" type="button">搜索</button>
  56. </td>
  57. <td width="90%">
  58. </td>
  59. <td align="right" nowrap>
  60. <button class="btn btn-default" click="daochu,1" type="button">导出 <i class="icon-angle-down"></i></button>
  61. </td>
  62. </tr></table>
  63. </div>
  64. <div class="blank10"></div>
  65. <div id="view_{rand}"></div>
粤ICP备19079148号