1
0

rock_goods_cropt.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. var a = $('#view_{rand}').bootstable({
  5. tablename:'goodm',fanye:true,dir:'desc',sort:'a.id',storebeforeaction:'croptbeforeshow',storeafteraction:'croptaftershow', url:publicstore('{mode}','{dir}'),
  6. columns:[{
  7. text:'单号',dataIndex:'sericnum'
  8. },{
  9. text:'申请人',dataIndex:'uname'
  10. },{
  11. text:'申请人部门',dataIndex:'udeptname'
  12. },{
  13. text:'类型',dataIndex:'type',sortable:true
  14. },{
  15. text:'申请日期',dataIndex:'applydt',sortable:true
  16. },{
  17. text:'操作时间',dataIndex:'optdt'
  18. },{
  19. text:'说明',dataIndex:'explain',align:'left'
  20. },{
  21. text:'出入库状态',dataIndex:'state'
  22. },{
  23. text:'',dataIndex:'opt',renderer:function(v,d){
  24. var v='<a href="javascript:;" onclick="rukuope{rand}('+d.id+','+d.typev+')">去操作</a>';
  25. return v;
  26. }
  27. }],
  28. itemdblclick:function(d){
  29. if(d.mknum)openxiangs(d.type,d.mknum,d.id);
  30. }
  31. });
  32. var c = {
  33. search:function(){
  34. var s=get('key_{rand}').value;
  35. a.setparams({key:s},true);
  36. }
  37. };
  38. rukuope{rand}=function(id,kind){
  39. var lex = ['领用出库','采购入库','销售出库','调拨入库','归还入库','退货入库'];
  40. var typa= [1,0,1,0,0,0];
  41. var kina= [0,0,1,3,1,4]; //从数据选项中的来的
  42. var type = typa[kind]; //0入库,1出库
  43. addtabs({url:'main,goods,churuku,type='+type+',mid='+id+',kind='+kina[kind]+',kindname='+lex[kind]+'','num':'rukuopt'+id+'',name:''+id+'.'+lex[kind]+''});
  44. }
  45. js.initbtn(c);
  46. });
  47. </script>
  48. <div>
  49. <table width="100%"><tr>
  50. <td >
  51. <input class="form-control" style="width:200px" id="key_{rand}" placeholder="申请人/单号">
  52. </td>
  53. <td style="padding-left:10px">
  54. <button class="btn btn-default" click="search" type="button">搜索</button>
  55. </td>
  56. <td width="90%">
  57. &nbsp;&nbsp;<span id="megss{rand}"></span>
  58. </td>
  59. <td align="right" nowrap>
  60. </td>
  61. </tr></table>
  62. </div>
  63. <div class="blank10"></div>
  64. <div id="view_{rand}"></div>
粤ICP备19079148号