|
@@ -9,69 +9,18 @@
|
|
|
*/
|
|
|
class InvoiceController extends DooController {
|
|
|
public $staff;
|
|
|
- public $verifyId;
|
|
|
- public $executeId;
|
|
|
- public static $NEW = 0;
|
|
|
- public static $NEW2 = 0;
|
|
|
private $INVOICEKEY = "APPROVAL";
|
|
|
function __construct() {
|
|
|
if (isset ( $_COOKIE ["staff"] )) {
|
|
|
-
|
|
|
if (! empty ( $_COOKIE ["staff"] )) {
|
|
|
-
|
|
|
Doo::loadModel ( 'staff' );
|
|
|
- Doo::loadModel ( 'verify' );
|
|
|
- $verify = new verify ();
|
|
|
$staff = new staff ();
|
|
|
- Doo::loadModel ( "execute" );
|
|
|
- $execute = new execute ();
|
|
|
+ Doo::loadModel("invoiceManage");
|
|
|
+ $invoiceManage=new invoiceManage();
|
|
|
|
|
|
- $verifyList = $verify->find ( array (
|
|
|
- 'select' => 'staff',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
- $list = array ();
|
|
|
+ //$invoiceManage
|
|
|
|
|
|
- // 判断角色的审批权限
|
|
|
- foreach ( $verifyList as $key => $value ) {
|
|
|
- $ver = json_decode ( $value ['staff'] );
|
|
|
-
|
|
|
- foreach ( $ver as $k => $v ) {
|
|
|
- if ($v [1] == 'ROLE') {
|
|
|
- $roleList = json_decode ( $v [3] );
|
|
|
- foreach ( $roleList as $t => $g ) {
|
|
|
- $gList = explode ( "_", $g );
|
|
|
- array_push ( $list, $gList [0] );
|
|
|
- // print_r($list);
|
|
|
- }
|
|
|
- } else
|
|
|
- array_push ( $list, $v [0] );
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 判断执行人的审批权限
|
|
|
- $executeList = $execute->find ( array (
|
|
|
- 'select' => 'staff',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
- $list2 = array ();
|
|
|
- foreach ( $executeList as $key => $value ) {
|
|
|
- $ver = json_decode ( $value ['staff'] );
|
|
|
-
|
|
|
- foreach ( $ver as $k => $v ) {
|
|
|
- array_push ( $list2, $v [0] );
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- $eidList = file_get_contents ( "protected/config/execute/execute.ini" );
|
|
|
- $eidList = array_filter ( explode ( ",", $eidList ) );
|
|
|
-
|
|
|
- $this->executeId = array_merge ( $list2, $eidList );
|
|
|
-
|
|
|
- $this->verifyId = $list;
|
|
|
$this->staff = $staff->getUserByIdList ( $_COOKIE ["staff"] );
|
|
|
- ReceiptController::$NEW = $this->getReceiptCount ();
|
|
|
- ReceiptController::$NEW2 = $this->getExeCount ();
|
|
|
return "/";
|
|
|
}
|
|
|
}
|
|
@@ -96,8 +45,6 @@ class InvoiceController extends DooController {
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoice';
|
|
|
- $data ['verifyId'] = $this->verifyId;
|
|
|
- $data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/invoice", $data );
|
|
|
}
|
|
|
function invoiceAdd() {
|
|
@@ -113,8 +60,6 @@ class InvoiceController extends DooController {
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoice';
|
|
|
- $data ['verifyId'] = $this->verifyId;
|
|
|
- $data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/invoiceAdd", $data );
|
|
|
}
|
|
|
|
|
@@ -279,8 +224,6 @@ class InvoiceController extends DooController {
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoiceApproval';
|
|
|
- $data ['verifyId'] = $this->verifyId;
|
|
|
- $data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/invoiceApproval", $data );
|
|
|
}
|
|
|
function invoiceDetail() {
|
|
@@ -309,8 +252,6 @@ class InvoiceController extends DooController {
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoiceApproval';
|
|
|
- $data ['verifyId'] = $this->verifyId;
|
|
|
- $data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/invoiceApprovalDetail", $data );
|
|
|
}
|
|
|
|
|
@@ -486,8 +427,6 @@ class InvoiceController extends DooController {
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoicePrint';
|
|
|
- $data ['verifyId'] = $this->verifyId;
|
|
|
- $data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/invoicePrint", $data );
|
|
|
}
|
|
|
/**
|
|
@@ -522,8 +461,6 @@ class InvoiceController extends DooController {
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoicePrint';
|
|
|
- $data ['verifyId'] = $this->verifyId;
|
|
|
- $data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/invoicePrintDetail", $data );
|
|
|
}
|
|
|
/**
|
|
@@ -549,8 +486,8 @@ class InvoiceController extends DooController {
|
|
|
$item = array (
|
|
|
'iid' => $iid,
|
|
|
'status' => 5,
|
|
|
- 'updateTime'=>date ( "Y-m-d H:i:s" ),
|
|
|
- 'printTime'=>date ( "Y-m-d H:i:s" ),
|
|
|
+ 'updateTime' => date ( "Y-m-d H:i:s" ),
|
|
|
+ 'printTime' => date ( "Y-m-d H:i:s" ),
|
|
|
'invoiceNo' => $invoiceNo
|
|
|
);
|
|
|
$invoice->setPrintByInvoice ( $item );
|
|
@@ -576,15 +513,13 @@ class InvoiceController extends DooController {
|
|
|
Doo::loadModel ( 'invoice' );
|
|
|
$invoice = new invoice ();
|
|
|
|
|
|
- $invoicePost=$invoice->getPostByInvoice();
|
|
|
+ $invoicePost = $invoice->getPostByInvoice ();
|
|
|
|
|
|
$data ['invoicePost'] = $invoicePost;
|
|
|
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoicePost';
|
|
|
- $data ['verifyId'] = $this->verifyId;
|
|
|
- $data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/invoicePost", $data );
|
|
|
}
|
|
|
private function getExeCount() {
|
|
@@ -704,9 +639,5 @@ class InvoiceController extends DooController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-class ReceiptController {
|
|
|
- public static $NEW = 0;
|
|
|
- public static $NEW2 = 0;
|
|
|
-}
|
|
|
|
|
|
?>
|