1
0

diaoboModel.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. //调拨单
  3. class flow_diaoboClassModel extends flowModel
  4. {
  5. public $minwidth = 600;//子表最小宽
  6. public function initModel()
  7. {
  8. $this->goodsobj = m('goods');
  9. $this->cangobj = m('godepot');
  10. }
  11. //审核完成处理,要通知仓库管理员出入库
  12. protected function flowcheckfinsh($zt){
  13. }
  14. //子表数据替换处理
  15. protected function flowsubdata($rows, $lx=0){
  16. $db = m('goods');
  17. foreach($rows as $k=>$rs){
  18. $one = $db->getone($rs['aid']);
  19. if($one){
  20. $name = $one['name'];
  21. if(!isempt($one['xinghao']))$name.='('.$one['xinghao'].')';
  22. if($lx==1)$rows[$k]['aid'] = $name; //1展示时
  23. $rows[$k]['temp_aid'] = $name;
  24. }
  25. }
  26. return $rows;
  27. }
  28. //$lx,0默认,1详情展示,2列表显示
  29. public function flowrsreplace($rs,$lx=0)
  30. {
  31. $rs['states']= $rs['state'];
  32. $rs['state'] = $this->goodsobj->crkstate($rs['state']);
  33. if(!isempt($rs['custname'])){
  34. $rs['custid'] = $rs['custname'];
  35. }else{
  36. $rs['custid']= $this->cangobj->getmou('depotname', $rs['custid']);
  37. }
  38. //读取物品
  39. if($lx==2){
  40. $rs['wupinlist'] = $this->goodsobj->getgoodninfo($rs['id'], 1);
  41. }
  42. return $rs;
  43. }
  44. }
粤ICP备19079148号