remindModel.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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=0, $fobj=null)
  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. $summary = $flow->moders['summary'];
  37. $vstrs = $this->rock->reparr($summary, $flow->rs);
  38. if($lx==1){
  39. $str[]= array(
  40. 'name' => $vstrs,
  41. 'num' => $num,
  42. 'mid' => $mid,
  43. );
  44. }else{
  45. $url = $flow->getxiangurl($num, $mid, 'auto');
  46. $str .= '<div class="list-items">'.$vstrs.'';
  47. if(!$flow->daochubo)$str .= ' <a temp="clo" href="javascript:;" onclick="js.open(\''.$url.'\')">详</a>';
  48. $str .= '</div>';
  49. }
  50. }
  51. if($lx != 1){
  52. if($str)$str = '<div class="list-items-group">'.$str.'</div>';
  53. }
  54. return $str;
  55. }
  56. }
粤ICP备19079148号