1
0

rock_goods_cropt.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. });
  29. var c = {
  30. search:function(){
  31. var s=get('key_{rand}').value;
  32. a.setparams({key:s},true);
  33. }
  34. };
  35. rukuope{rand}=function(id,kind){
  36. var lex = ['领用出库','采购入库','销售出库','调拨入库','归还入库','退货入库'];
  37. var typa= [1,0,1,0,0,0];
  38. var kina= [0,0,1,3,1,4]; //从数据选项中的来的
  39. var type = typa[kind]; //0入库,1出库
  40. addtabs({url:'main,goods,churuku,type='+type+',mid='+id+',kind='+kina[kind]+',kindname='+lex[kind]+'','num':'rukuopt'+id+'',name:''+id+'.'+lex[kind]+''});
  41. }
  42. js.initbtn(c);
  43. });
  44. </script>
  45. <div>
  46. <table width="100%"><tr>
  47. <td >
  48. <input class="form-control" style="width:200px" id="key_{rand}" placeholder="申请人/单号">
  49. </td>
  50. <td style="padding-left:10px">
  51. <button class="btn btn-default" click="search" type="button">搜索</button>
  52. </td>
  53. <td width="90%">
  54. &nbsp;&nbsp;<span id="megss{rand}"></span>
  55. </td>
  56. <td align="right" nowrap>
  57. </td>
  58. </tr></table>
  59. </div>
  60. <div class="blank10"></div>
  61. <div id="view_{rand}"></div>
粤ICP备19079148号