Ver código fonte

印章审批流程

qr 6 meses atrás
pai
commit
2af1fd073a

+ 56 - 17
webmain/flow/input/mode_sealaplAction.php

@@ -72,25 +72,64 @@ class mode_sealaplClassAction extends inputAction{
 		return $barr;
 	}
 
-    public function sealaplaftershow($table) {
+    public function sealaplaftershow($table,$rows)
+    {
+        $barr['rows'] 		= $rows;
+        $barr['atypearr'] 	= $this->atypearr;
+        if($this->loadci==1){
+            $vobj	= m('view');
+            $barr['isadd'] 		= $vobj->isadd($this->modeid, $this->adminid); //判断是否可添加
+            $barr['isdaoru'] 	= $vobj->isdaoru($this->modeid, $this->adminid); //判断是否可导入
+            $barr['isdaochu'] 	= $vobj->isdaochu($this->modeid, $this->adminid); //判断是否可导入
+//            $barr['listinfo']	= m('mode')->createlistpage($this->flow->moders,0,1,$this);
+        }
+        $barr['souarr']		= $this->flow->flowsearchfields();
+        $rows 				= $this->flow->viewjinfields($rows);//禁看字段处理
+        $farrl	= array();
+        foreach($this->flow->fieldsarra as $k2=>$rs2){
+            if($rs2['fieldstype']=='uploadimg')$farrl[$rs2['fields']]=$rs2['fieldstype'];
+        }
 
-        return array(
-            'rows' => [
-
-            ],
-            'where' =>'1=1',
-            'order'=>'id desc',
-            'table'=> $table
-        );
+        if($rows)foreach($rows as $k1=>$rs1){
+            foreach($farrl as $fid=>$flx){
+                if(isset($rs1[$fid])){
+                    $val = $rs1[$fid];
+                    if($flx=='uploadimg'){
+                        $val = $this->rock->gethttppath($val);
+                        $rows[$k1][$fid] = $val;
+                        //if($this->flow->modeid>92)$val='<img src="'.$val.'" height="60">';
+                    }
+                }
+            }
+        }
+        $barr['modeid'] 	= $this->modeid;
+        $barr['loadci'] 	= $this->loadci;
+//        $barr['rows'] 		= $rows;
+        $scarr 				= $this->storeafter($table, $rows, $barr);
+        if(is_array($scarr))foreach($scarr as $k=>$v)$barr[$k]=$v;
+        return $barr;
     }
 
-    public function sealaplbeforeshow($table) {
-
-        return array(
-            'where' =>'1=1',
-            'order'=>'id desc',
-            'table'=> $table
-        );
-    }
+//    public function sealaplaftershow($table) {
+//
+//        return array(
+//            'rows' => [
+//
+//            ],
+//            'where' =>'1=1',
+//            'order'=>'id desc',
+//            'table'=> $table
+//        );
+//    }
+//
+//
+//    public function sealaplbeforeshow($table) {
+//
+//        return array(
+//            'where' =>'1=1',
+//            'order'=>'id desc',
+//            'table'=> $table
+//        );
+//    }
 }	
 			

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
webmain/flow/page/input_seal.html


Diferenças do arquivo suprimidas por serem muito extensas
+ 66 - 20
webmain/flow/page/rock_page_sealapl.php


+ 26 - 0
webmain/model/flow/sealaplModel.php

@@ -12,7 +12,12 @@ class flow_sealaplClassModel extends flowModel
 
     //单据判断条件从写$lx类型,$uid用户Id
     protected function flowbillwhere($lx, $uid){
+        $where = '';
+        if ($uid == 'all') {
+            $where = 'and '.$this->adminid.' in (1, 28)';
+        }
         return [
+            'where' 	=> $where,
             'order'=>'id desc'
         ];
     }
@@ -72,9 +77,23 @@ class flow_sealaplClassModel extends flowModel
         $rs['seal_name'] = m('seal')->getone("id = {$rs['seal_name']}")['name'];
         $rs['opinion_relay'] = str_replace($rs['opinion_relay'], '\n', '<br />');
 
+        // 流程状态
+        $rs['state_info'] = $this->getApproval($rs['nowcheckname'] ?? ''); // 当前审核人
+
 		return $rs;
 	}
 
+    // 审核样式
+    public function getApproval($names) {
+
+        if (empty($names)) {
+            $html = '<font style="background-color:#00c959; padding: 2px 8px; border-radius: 4px; color: #fff">已审核</font>';
+            return $html;
+        } else {
+            $html = '<font style="background-color:#ff4974; padding: 2px 8px; border-radius: 4px; color: #fff">待审核</font><br /><font style="color: #ff4974">审核人:'.$names.'</font>';
+            return $html;
+        }
+    }
 	public function inputtitle()
 	{
 		return "枣泉煤矿用印审批表";
@@ -114,6 +133,13 @@ class flow_sealaplClassModel extends flowModel
                     }
             }
         }
+        if(isset($this->nowcourse['step']) && !empty($sm)) {
+            $info_old = $this->rs['notes'];
+            $info = $this->nowcourse['step'].'.'.$this->adminname.":".$sm."\n";
+            $info = $info_old.$info;
+            $info = substr($info, 0, strlen($info)-1);
+            m('sealapl')->update(["notes"=>$info],"id={$this->id}");
+        }
     }