* Add budget comment.

This commit is contained in:
tianshujie98
2020-08-27 11:27:55 +08:00
parent 6eb4d2b698
commit 822bf9ecbd
8 changed files with 115 additions and 25 deletions
+31 -13
View File
@@ -1,16 +1,34 @@
<?php
/**
* The control file of budget currentModule of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package budget
* @version $Id: control.php 5107 2013-07-12 01:46:12Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
class budget extends control
{
/**
* __construct
*
* @param string $module
* @param string $method
* @access public
* @return void
*/
public function __construct($module = '', $method = '')
{
parent::__construct($module, $method);
$this->view->program = $this->loadModel('project')->getByID($this->session->program);
$this->view->program = $this->loadModel('project')->getByID($this->session->program);
}
/**
* The budget browse page.
*
* @param varchar $orderBy
* @param varchar $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
@@ -80,7 +98,7 @@ class budget extends control
$budgetID = $this->budget->create();
if(dao::isError())
{
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
@@ -114,7 +132,7 @@ class budget extends control
$changes = $this->budget->update($budgetID);
if(dao::isError())
{
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
@@ -143,7 +161,7 @@ class budget extends control
/**
* View a budget.
*
* @param int $budgetID
* @param int $budgetID
* @access public
* @return void
*/
@@ -161,7 +179,7 @@ class budget extends control
/**
* Delete a budget.
*
* @param int $budgetID
* @param int $budgetID
* @param varchar $confirm
* @access public
* @return void
@@ -169,16 +187,16 @@ class budget extends control
public function delete($budgetID = 0, $confirm = 'no')
{
if($confirm == 'no')
{
echo js::confirm($this->lang->budget->confirmDelete, $this->createLink('budget', 'delete', "id=$budgetID&confirm=yes"));
{
echo js::confirm($this->lang->budget->confirmDelete, $this->createLink('budget', 'delete', "id=$budgetID&confirm=yes"));
exit;
}
else
{
}
else
{
$this->budget->delete(TABLE_BUDGET, $budgetID);
die(js::locate(inlink('browse'), 'parent'));
}
}
/**
@@ -194,7 +212,7 @@ class budget extends control
$this->budget->batchCreate();
if(dao::isError())
{
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
+22 -10
View File
@@ -1,11 +1,23 @@
<?php
/**
* The model file of budget module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package budget
* @version $Id: model.php 5079 2013-07-10 00:44:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php
class budgetModel extends model
{
/**
* Get subject option.
*
* @access public
* @return void
* @return object
*/
public function getSubjectOption()
{
@@ -26,7 +38,7 @@ class budgetModel extends model
*
* @param int $budgetID
* @access public
* @return void
* @return array
*/
public function getByID($budgetID)
{
@@ -42,7 +54,7 @@ class budgetModel extends model
* @param varchar $orderBy
* @param pager $object
* @access public
* @return void
* @return object
*/
public function getList($orderBy = 'id_desc', $pager = null)
{
@@ -58,7 +70,7 @@ class budgetModel extends model
* Get stages.
*
* @access public
* @return void
* @return array
*/
public function getStages()
{
@@ -73,7 +85,7 @@ class budgetModel extends model
* Get subjects.
*
* @access public
* @return void
* @return array
*/
public function getSubjects()
{
@@ -88,7 +100,7 @@ class budgetModel extends model
* Get subject structure.
*
* @access public
* @return void
* @return array
*/
public function getSubjectStructure()
{
@@ -115,7 +127,7 @@ class budgetModel extends model
* Get summary.
*
* @access public
* @return void
* @return array
*/
public function getSummary()
{
@@ -151,7 +163,7 @@ class budgetModel extends model
* Create a budget.
*
* @access public
* @return void
* @return int
*/
public function create()
{
@@ -176,7 +188,7 @@ class budgetModel extends model
* Batch create budgets.
*
* @access public
* @return void
* @return bool
*/
public function batchCreate()
{
@@ -223,7 +235,7 @@ class budgetModel extends model
*
* @param int $budgetID
* @access public
* @return void
* @return array
*/
public function update($budgetID)
{
+12
View File
@@ -1,3 +1,15 @@
<?php
/**
* The batchCreate view of budget module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package budget
* @version $Id: batchCreate.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id="mainContent" class="main-content fade">
+12
View File
@@ -1,3 +1,15 @@
<?php
/**
* The browse view of budget module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package budget
* @version $Id: browse.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<style>
.browse-active{color: #0c64eb;font-weight: 700;}
+12
View File
@@ -1,3 +1,15 @@
<?php
/**
* The create view of budget module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package budget
* @version $Id: create.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id="mainContent" class="main-content fade">
+12
View File
@@ -1,3 +1,15 @@
<?php
/**
* The edit view of budget module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package budget
* @version $Id: edit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id="mainContent" class="main-content fade">
+12
View File
@@ -1,3 +1,15 @@
<?php
/**
* The summary view of budget module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package budget
* @version $Id: summary.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<style>
.summary-active{color: #0c64eb;font-weight: 700;}
+2 -2
View File
@@ -1,11 +1,11 @@
<?php
/**
* The view file of bug module of ZenTaoPMS.
* The view file of budget module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bug
* @package budget
* @version $Id: view.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/