remindModel.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. //单据提醒设置
  3. class remindClassModel extends Model
  4. {
  5. public function initModel()
  6. {
  7. $this->settable('flow_remind');
  8. }
  9. public function todorun()
  10. {
  11. return m('flow')->initflow('remind')->getremindtodo();
  12. }
  13. /**
  14. * 获取主ID
  15. */
  16. public function getremindrs($table, $mid)
  17. {
  18. $rs = $this->getone("`table`='$table' and `mid`='$mid'");
  19. return $rs;
  20. }
  21. /**
  22. * 2026-03-06新增
  23. * 相关单据显示$lx0详情,1编辑,2列表
  24. */
  25. public function relevantshow($xgstr, $lx, $fobj)
  26. {
  27. if(isempt($xgstr))return '';
  28. $farr = explode(',', $xgstr);
  29. $str = '';if($lx==1)$str = array();
  30. foreach($farr as $fars){
  31. $farra = explode('|', $fars);
  32. $num = $farra[0];
  33. $mid = $farra[1];
  34. $flow = m('flow')->initflow($num, $mid, false);
  35. $flow->ismobile = $fobj->ismobile;
  36. $flow->openmode = $fobj->openmode;
  37. $summary = $flow->moders['summary'];
  38. $vstrs = $this->rock->reparr($summary, $flow->rs);
  39. if($lx==1){
  40. $str[]= array(
  41. 'name' => $vstrs,
  42. 'num' => $num,
  43. 'mid' => $mid,
  44. );
  45. }else{
  46. $url = $flow->getxiangurl($num, $mid, 'auto');
  47. $str .= '<div class="list-items">'.$vstrs.'';
  48. if(!$flow->daochubo)$str .= ' <a temp="clo" href="javascript:;" onclick="js.open(\''.$url.'\')">详</a>';
  49. $str .= '</div>';
  50. }
  51. }
  52. if($lx != 1){
  53. if($str)$str = '<div class="list-items-group">'.$str.'</div>';
  54. }
  55. return $str;
  56. }
  57. }
粤ICP备19079148号