| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- /**
- * 外部调用单据详情页
- */
- class openxiangClassAction extends openapiAction
- {
-
- public function initAction()
- {
- $this->showreturn('', '此页面弃用', 201);//2025-04-09
- }
-
- /**
- * 详情
- */
- public function dataAction()
- {
- $list['hetong'] = 'custract,customer'; //配置可读取模块
- $num = $this->get('num');
- $xcytype = $this->get('xcytype');
- $mid = (int)$this->get('mid','0');
- if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
- $kears = arrvalue($list, $xcytype);
- if(!$kears)return returnerror('无效模块1');
- if(!in_array($num,explode(',', $kears)))return returnerror('无效模块2');
-
- $flow = m('flow')->initflow($num,$mid, false);
- $barr['modename'] = $flow->modename;
- $barr['btndata'] = array();
- $barr['xiangdata']= array();
- if(method_exists($flow,'openxiang')){
- $lbarr = $flow->openxiang();
- if(is_array($lbarr))foreach($lbarr as $k=>$v)$barr[$k]=$v;
- }
- return returnsuccess($barr);
- }
-
- /**
- * 操作菜单
- */
- public function optmenuAction()
- {
- $num = $this->get('num');
- $xcytype = $this->get('xcytype');
- $mid = (int)$this->get('mid','0');
- $menuid = (int)$this->get('menuid','0');
- $sm = c('check')->onlysql($this->jm->base64decode($this->get('sm')));
- if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
- $flow = m('flow')->initflow($num,$mid, false);
- $msg = $flow->optmenu($menuid,1,$sm);
- if($msg!='ok')return returnerror($msg);
- return returnsuccess($msg);
- }
-
- /**
- * 下载文件
- */
- public function downurlAction()
- {
- $id = (int)$this->get('id','0');
- $openid = $this->get('openid');
- if(isempt($openid))return;
- if(m('wxxcyus')->rows("`openid`='$openid'")==0)return;
- m('file')->show($id, true);
- }
-
- /**
- * 返回文件详情
- */
- public function fileinfoAction()
- {
- $id = (int)$this->get('id','0');
- $openid = $this->get('openid');
- if(isempt($openid))return returnerror('无效openid1');
- if(m('wxxcyus')->rows("`openid`='$openid'")==0)return returnerror('无效openid');
- $frs = m('file')->getone($id,'id,filename,filesize,fileext,filepath,filepathout');
- return returnsuccess($frs);
- }
- }
|