소스 검색

更新相关功能

caipin 7 년 전
부모
커밋
efaded37b9

+ 11 - 0
global/js/invoice.validator.js

@@ -108,6 +108,17 @@ $(function () {
 	    }
 	});
 	
+	//培训班添加
+	$("form[name='invoiceTraining']").validator({
+	    timely: 3,
+	    focusCleanup: true,
+	    fields: {//remote[/ajaxCheckInvoicePrice] 
+	    	trainName: 'required;'
+		    ,trainDate: 'required; '
+			
+	    }
+	});
+	
 	//收款录入
 	$("form[name='receivablesInvoice']").validator({
 	    timely: 3,

+ 2 - 0
protected/config/acl.conf.php

@@ -41,6 +41,8 @@ $acl ['ordinary'] ['allow'] = array (
 				'importInvoiceReceivables',
 				'importInvoiceReceivablesDo',
 				
+				'invoiceTraining',
+				'invoiceTrainingAdd',
 				
 				'testSend'
 		) 

+ 1 - 0
protected/config/execute/invoice.ini

@@ -0,0 +1 @@
+,41,58

+ 1 - 0
protected/config/invoice/invoice.ini

@@ -0,0 +1 @@
+{"\u53d1\u7968\u5ba1\u6279":"41,58"}

+ 4 - 0
protected/config/routes.conf.php

@@ -388,6 +388,10 @@ $route['get']['/invoiceReceivablesAchieve/:page'] = array('InvoiceController', '
 $route['get']['/invoiceReceivablesAchieve/:page/:date'] = array('InvoiceController', 'invoiceReceivablesAchieve');
 $route['get']['/invoiceReceivablesAchieve/:page/:date/:MebSea'] = array('InvoiceController', 'invoiceReceivablesAchieve');
 
+$route['*']['/invoiceTraining'] = array('InvoiceController', 'invoiceTraining');
+$route['post']['/invoiceTrainingAdd'] = array('InvoiceController', 'invoiceTrainingAdd');
+
+
 $route['post']['/ajaxGetInvoiceInfoByType'] = array('InvoiceController', 'ajaxGetInvoiceInfoByType');
 $route['post']['/ajaxGetInvoiceReceivables'] = array('InvoiceController', 'ajaxGetInvoiceReceivables');
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 282 - 134
protected/controller/InvoiceController.php


+ 6 - 2
protected/model/invoice.php

@@ -18,6 +18,7 @@ class invoice extends DooModel {
 	 */
 	public $iid;
 	public $lossIid;
+	public $ipSource;
 	/**
 	 *
 	 * @var integer $status 审批状态
@@ -193,6 +194,7 @@ class invoice extends DooModel {
 	public $_primarykey = 'iid';
 	public $_fields = array (
 			'iid',
+			'ipSource',
 			'lossIid',
 			'invoiceManage',
 			'pendingApprovals',
@@ -268,6 +270,8 @@ class invoice extends DooModel {
 		if (is_numeric ( $iid ) && ! empty ( $iid ))
 			$Detail = $this->getOne ( $condition );
 		
+		if (empty($Detail))	
+			return $Detail;
 		if (isset ( $Detail ['expressCompany'] ) && ! empty ( $Detail ['expressCompany'] )) {
 			$express = explode ( ":", $Detail ['expressCompany'] );
 			$Detail ['expressCompany'] = $express [0];
@@ -453,7 +457,7 @@ class invoice extends DooModel {
 			$list ['pendingInvoice'] = array ();
 			$list ['handleInvoice'] = array ();
 			$list ['pendingInvoice'] = $this->find ( array ( // 加入邮件中也为 处理中 已退票
-					'where' => "((status=1 and untreadStatus=0) or (status=2 and printStatus=0 and untreadStatus=0) or ( status=2 and printStatus=1 and untreadStatus=0 ) or
+					'where' => "((status=1 and untreadStatus=0) or (status=2 and printStatus=0 and untreadStatus=0)  or
 					( status=2 and printStatus=1 and untreadStatus=1 and untreadPost=0)
 					or (postStatus=0 and doPost=1 and status=2 and untreadStatus=0) ) and isDelete=0  and sid=" . $sid,
 					'desc' => 'iid',
@@ -467,7 +471,7 @@ class invoice extends DooModel {
 			$list ['handleInvoice'] = $this->find ( array (
 					// 需求变更 -去除出票状态的数据 or (status=2 and printStatus=1 and untreadStatus=0 ) or (status=2 and printStatus=1 and untreadStatus=2 )
 					// 新加入退票中 需要邮寄的发票
-					'where' => "(status=3 or status=4 or (status=2  and untreadStatus=2 ) or ( status=2 and  untreadStatus=1 )  )  and isDelete=0 and sid=" . $sid,
+					'where' => "(status=3 or status=4 or (status=2  and untreadStatus=2 ) or ( status=2 and  untreadStatus=1 )   )  and isDelete=0 and sid=" . $sid,
 					'desc' => 'iid',
 					'asArray' => TRUE 
 			) );

+ 2 - 1
protected/model/invoiceReceivables.php

@@ -176,9 +176,10 @@ class invoiceReceivables extends DooModel {
 			$invoice = new invoice ();
 			Doo::loadClass ( 'XDeode' );
 			$XDeode = new XDeode ( 5 );
+			//print_r($list ['bindClaim']);
 			foreach ( $list ['bindClaim'] as $key => $value ) {
 				$id = $invoice->getInvoiceByIid ( $value ['iid'] );
-				$id ['iidKeyUrl'] = $XDeode->encode ( $id ['iid'] );
+				$id ['iidKeyUrl'] = $XDeode->encode ( $value ['iid'] );
 				$list ['bindClaim'] [$key] ['invoice'] = $id;
 				$list ['bindClaim'] [$key] ['iridKeyUrl'] = $XDeode->encode ( $value ['irid'] );
 			}

+ 5 - 2
protected/model/invoiceStatistics.php

@@ -45,13 +45,16 @@ class invoiceStatistics extends DooModel {
 	 * @param array $item 相关需要更新的字段信息
 	 * @return number 返回发票ID
 	 */
-	public function updateInvoiceStatisticsByIrid($item = array(), $irid = 0) {
+	public function updateInvoiceStatisticsByIrid($item = array(), $irid = 0,$priceClass=0) {
 		if (is_numeric ( $irid ) && is_array ( $item ) && ! empty ( $item )) {
 			foreach ( $item as $key => $value ) {
 				$this->$key = $value;
 			}
+			$sql="";
+			if (!empty($priceClass))
+				$sql=" and priceClass=".$priceClass;
 			$lid = $this->update ( array (
-					'where' => 'irid=' . $irid 
+					'where' => 'irid=' . $irid .$sql
 			) );
 		}
 		return $lid;

+ 2 - 4
protected/view/admin/invoiceAS.html

@@ -36,6 +36,7 @@
 	  					<a <!-- if {{status}}=='UNRECORD' --> class="now" <!-- endif --> href="/invoiceAS/1/UNRECORD" title="未入账">未入账</a>
 	  					<a <!-- if {{status}}=='RECORD' --> class="now" <!-- endif --> href="/invoiceAS/1/RECORD" title="已入账">已入账</a>
 	  					<a <!-- if {{status}}=='BOUNCED' --> class="now" <!-- endif --> href="/invoiceAS/1/BOUNCED" title="已退票">已退票</a>
+	  					<a <!-- if {{status}}=='PARTRECORD' --> class="now" <!-- endif --> href="/invoiceAS/1/PARTRECORD" title="部分入账">部分入账</a>
 	  					</li>
 							<li>
 								<div class="search">
@@ -93,7 +94,6 @@
 							<!-- elseif {{list' value.sumPrice}}<{{list' value.invoicePrice}} -->
 							<b class="colRed">¥{{list' value.sumPrice}}</b>
 							<!-- endif -->
-							
 							</td>
 							<td>
 							<!-- if ({{list' value.sumPrice}}<{{list' value.invoicePrice}}||{{list' value.sumPrice}}==0)&& {{list' value.untreadStatus}}==0 && {{list' value.status}}==2 && {{list' value.printStatus}}==1 -->
@@ -103,8 +103,6 @@
 						</tr>
 						<!-- endloop -->
 						
-						
-						
 						</tbody>
 					</table>
 				</div>
@@ -178,7 +176,7 @@
 							</td>
 					</tr>
 					<tr>
-						<th class="taC">银行到时间</th><td><input name="receivablesDate"  type="date"></td>
+						<th class="taC">银行到时间</th><td><input name="receivablesDate"  type="date"></td>
 					</tr>
 					</tbody>
 				</table>

+ 1 - 1
protected/view/admin/invoiceApprovalAchieve.html

@@ -190,7 +190,7 @@
     		</tr>
     		<tr>
     			<th>收款银行</th><td>广发银行珠海分行柠溪支行</td>
-    			<th>银行到</th><td>2016-04-11</td>
+    			<th>银行到</th><td>2016-04-11</td>
     		</tr>
     		<tr>
     			<th>录入收款</th><td>张少珊<br>2015-04-12 11:30:02</td>

+ 10 - 12
protected/view/admin/invoiceElement.html

@@ -1,24 +1,22 @@
 
 <!-- if isset({{invoiceDetail}}) -->
 <option <!-- if {{invoiceDetail.invoiceElement}}=='纵横公路工程造价管理系统V9.0' --> selected <!-- endif --> value="纵横公路工程造价管理系统V9.0">纵横公路工程造价管理系统V9.0</option>
-<option <!-- if {{invoiceDetail.invoiceElement}}=='纵横公路造价编审软件V9.0' --> selected <!-- endif --> value="纵横公路造价编审软件V9.0">纵横公路造价编审软件V9.0</option>
 <option <!-- if {{invoiceDetail.invoiceElement}}=='纵横公路工程设计数量表算量软件V3.1' --> selected <!-- endif --> value="纵横公路工程设计数量表算量软件V3.1">纵横公路工程设计数量表算量软件V3.1</option>
 <option <!-- if {{invoiceDetail.invoiceElement}}=='纵横公路工程计量支付决算一体化软件V3.1' --> selected <!-- endif --> value="纵横公路工程计量支付决算一体化软件V3.1">纵横公路工程计量支付决算一体化软件V3.1</option>
-<option <!-- if {{invoiceDetail.invoiceElement}}=='建材在线' --> selected <!-- endif --> value="建材在线">建材在线</option>
-<option <!-- if {{invoiceDetail.invoiceElement}}=='服务费' --> selected <!-- endif --> value="服务费">服务费</option>
+<option <!-- if {{invoiceDetail.invoiceElement}}=='纵横公路造价编审软件V9.0' --> selected <!-- endif --> value="纵横公路造价编审软件V9.0">纵横公路造价编审软件V9.0</option>
 <option <!-- if {{invoiceDetail.invoiceElement}}=='培训费' --> selected <!-- endif --> value="培训费">培训费</option>
-<option <!-- if {{invoiceDetail.invoiceElement}}=='软件升级费' --> selected <!-- endif --> value="软件升级费">软件升级费</option>
-<option <!-- if {{invoiceDetail.invoiceElement}}=='软件报表定制费' --> selected <!-- endif --> value="软件报表定制费">软件报表定制费</option>
-<option <!-- if {{invoiceDetail.invoiceElement}}=='技术服务费' --> selected <!-- endif --> value="技术服务费">技术服务费</option>
+<option <!-- if {{invoiceDetail.invoiceElement}}=='服务费' --> selected <!-- endif --> value="服务费">服务费</option>
+<option <!-- if {{invoiceDetail.invoiceElement}}=='软件培训费' --> selected <!-- endif --> value="软件培训费">软件培训费</option>
+<option <!-- if {{invoiceDetail.invoiceElement}}=='软件服务费' --> selected <!-- endif --> value="软件服务费">软件服务费</option>
+<option <!-- if {{invoiceDetail.invoiceElement}}=='报表定制费' --> selected <!-- endif --> value="报表定制费">报表定制费</option>
 <!-- else -->
 <option value="纵横公路工程造价管理系统V9.0">纵横公路工程造价管理系统V9.0</option>
-<option value="纵横公路造价编审软件V9.0">纵横公路造价编审软件V9.0</option>
 <option value="纵横公路工程设计数量表算量软件V3.1">纵横公路工程设计数量表算量软件V3.1</option>
 <option value="纵横公路工程计量支付决算一体化软件V3.1">纵横公路工程计量支付决算一体化软件V3.1</option>
-<option value="建材在线">建材在线</option>
-<option value="服务费">服务费</option>
+<option value="纵横公路造价编审软件V9.0">纵横公路造价编审软件V9.0</option>
 <option value="培训费">培训费</option>
-<option value="软件升级费">软件升级费</option>
-<option value="软件报表定制费">软件报表定制费</option>
-<option value="技术服务费">技术服务费</option>
+<option value="服务费">服务费</option>
+<option value="软件培训费">软件培训费</option>
+<option value="软件服务费">软件服务费</option>
+<option value="报表定制费">报表定制费</option>
 <!-- endif -->

+ 5 - 0
protected/view/admin/invoiceMenu.html

@@ -4,8 +4,13 @@
 			<!-- if {{receiptMemu}}=="invoice" --> class="selected" <!-- endif -->
 			>我的发票
 	</a></li>
+	<li><a <!-- if {{receiptMemu}}=="invoiceTraining" --> class="selected" <!-- endif --> href="/invoiceTraining">
+培训班发票</a></li>
 <li><a <!-- if {{receiptMemu}}=="invoiceMyReceivables" --> class="selected" <!-- endif --> href="/invoiceMyReceivables">
 我的收款</a></li>
+
+
+
 	<li><a <!-- if {{receiptMemu}}=="invoiceReceivablesClaim" --> class="selected" <!-- endif --> href="/invoiceReceivablesClaim">收款认领</a></li>
 
 

+ 2 - 2
protected/view/admin/invoiceMyReceivables.html

@@ -46,7 +46,7 @@
 							<!-- if !empty({{list.myClaim}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行到帐时间</th><th class="taC">收款处理</th>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到账信息</th><th class="taC">银行到账时间</th><th class="taC">收款处理</th>
 								
 								</tr>
 								<!-- loop list.myClaim -->
@@ -81,7 +81,7 @@
 							<!-- if !empty({{list.bindClaim}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC">银行到信息</th><th class="taC" width="90">收款金额</th><th class="taC">收款流水号</th><th class="taC" width="90">开票金额</th><th class="taC">开票流水号</th><th class="taC">入账时间</th></tr>
+								<tr><th class="taC">银行到信息</th><th class="taC" width="90">收款金额</th><th class="taC">收款流水号</th><th class="taC" width="90">开票金额</th><th class="taC">开票流水号</th><th class="taC">入账时间</th></tr>
 								<!-- loop list.bindClaim -->
 								<tr>
 									<td>{{bindClaim' value.receivablesMessage}}</td>

+ 17 - 2
protected/view/admin/invoicePrintDetail.html

@@ -59,7 +59,19 @@
 							</tr>
 							<tr>
 								<th class="taC" width="150">发票抬头</th><td colspan="3">{{invoiceDetail.invoiceTitle}}</td>
-
+								
+							</tr>
+							<tr>
+								<th class="taC" width="150">纳税人识别码</th><td>{{invoiceDetail.TIN}}</td>
+								
+							</tr>
+							<tr>
+								<th class="taC">注册地址`电话</th><td>{{invoiceDetail.address}}&nbsp;{{invoiceDetail.phone}}</td>
+								
+							</tr>
+							<tr>
+								<th class="taC">开户银行`账号</th><td>{{invoiceDetail.bank}}&nbsp;{{invoiceDetail.bankAccount}}</td>
+								
 							</tr>
 							</tbody>
 						</table>
@@ -71,9 +83,12 @@
 							</tr>
 							<tr>
 								<th class="taC" width="150">单位名称</th><td>{{invoiceDetail.invoiceCompany}}</td>
-								<th class="taC" width="150">纳税人识别码</th><td>{{invoiceDetail.TIN}}</td>
+								
 
 							</tr>
+							<tr>
+								<th class="taC" width="150">纳税人识别码</th><td>{{invoiceDetail.TIN}}</td>
+								
 							</tr>
 							<tr>
 								<th class="taC">注册地址`电话</th><td>{{invoiceDetail.address}}&nbsp;{{invoiceDetail.phone}}</td>

+ 4 - 4
protected/view/admin/invoiceReceivables.html

@@ -82,7 +82,7 @@
 							<!-- if !empty({{receivablesInput}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行/到帐时间</th><th class="taC">收款录入</th><th class="taC">收款认领</th><th class="taC">开票单位</th><th class="taC" width="80">绑定发票</th></tr>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到账信息</th><th class="taC">银行/到账时间</th><th class="taC">收款录入</th><th class="taC">收款认领</th><th class="taC">开票单位</th><th class="taC" width="80">绑定发票</th></tr>
 								
 								<!-- loop receivablesInput -->
 								<tr>
@@ -128,7 +128,7 @@
 							<!-- if !empty({{receivablesList}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行/到帐时间</th>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到账信息</th><th class="taC">银行/到账时间</th>
 								<th class="taC">开票金额</th><th class="taC">开票单位</th><th class="taC">开票流水号</th></tr>
 								<!-- loop receivablesList -->
 								<tr>
@@ -251,7 +251,7 @@
 							</td>
 					</tr>
 					<tr>
-						<th class="taC">银行到时间</th><td><input name="receivablesDate"  type="date"></td>
+						<th class="taC">银行到时间</th><td><input name="receivablesDate"  type="date"></td>
 					</tr>
 					</tbody>
 				</table>
@@ -309,7 +309,7 @@
 							</td>
 						</tr>
 						<tr>
-							<th class="taC">银行到时间</th>
+							<th class="taC">银行到时间</th>
 							<td><input name="receivablesDate" value='{{receivablesDate}}' type="date"></td>
 						</tr>
 						<tr>

+ 11 - 10
protected/view/admin/invoiceReceivablesAS.html

@@ -42,7 +42,7 @@
 					
 	  					<li>
 	  					<div class="search">
-	  					<input type="radio" <!-- if {{timeType}}=='BIND' --> checked <!-- endif --> refreshData=time name="timeType" value="BIND">按到时间
+	  					<input type="radio" <!-- if {{timeType}}=='BIND' --> checked <!-- endif --> refreshData=time name="timeType" value="BIND">按到时间
 	  					 <input type="radio" <!-- if {{timeType}}=='CREATE' --> checked <!-- endif --> refreshData=time name="timeType"  value="CREATE">按录入时间
 	  					<div class="input-append">
 	  					
@@ -66,7 +66,7 @@
 					<tr class="thead">
 						<th>收款金额</th>
 						<th>收款信息</th>
-						<th>到帐银行/到帐时间</th>
+						<th>到账银行/到账时间</th>
 						<th>录入收款</th>
 						<th>收款认领</th>
 						<th>发票入账</th>
@@ -96,16 +96,17 @@
 						<a href="#invdetail" node-invoice='INFO' data-isKey="{{list' value.iidKeyK}}"  data-toggle="modal">{{list' value.irList.invoiceSerial}}</a>
 						</td>
 						<td>
-						<!-- if {{list' value.receivablesStaff}}=='PUBLIC' -->
-							<!-- <a href="#billeidt" data-isKey="{{list' value.iridKey}}" node-irUpdate  data-toggle="modal">修改</a> 
-							<a  href="#billdel" data-isKey="{{list' value.iridKey}}" node-irDelete data-toggle="modal">删除</a>  -->
-						<!-- elseif {{list' value.bindStatus}}==0&&{{list' value.untreadStatus}}==1 -->	
-						<a  href="#search-invoice" bind-invoice='receivables' node-key="{{list' value.iridKey}}" data-toggle="modal">查询发票</a>
-							
-						<!-- elseif {{list' value.receivablesStaff}}!='PUBLIC'&&{{list' value.iid}}==0  -->
+						<!-- if {{list' value.receivablesStaff}}=='PUBLIC'&&{{list' value.iid}}==0 -->
 							<a href="#receive" data-isKey="{{list' value.iridKey}}" node-alter data-toggle="modal">变更</a>
+						<!-- elseif {{list' value.bindStatus}}==0&&{{list' value.receivablesStaff}}!='PUBLIC'&&{{list' value.iid}}==0 -->	
+						<a  href="#search-invoice" bind-invoice='receivables' node-key="{{list' value.iridKey}}" data-toggle="modal">查询发票</a>
+						<!-- if {{list' value.untreadStatus}}==0 -->
+						</br><a href="#receive" data-isKey="{{list' value.iridKey}}" node-alter data-toggle="modal">变更</a>
+						<!-- endif -->
+						
 						<!-- elseif {{list' value.bindStatus}}==1 -->
 						<a href="#Unbundling" data-isKey="{{list' value.iridKey}}" node-unBundLing data-toggle="modal">解绑</a>
+						
 						<!-- endif -->
 						</td>
 						</tr>
@@ -257,7 +258,7 @@
 							</select></td>
 						</tr>
 						<tr>
-							<th class="taC">银行到时间</th>
+							<th class="taC">银行到时间</th>
 							<td><input name="receivablesDate" type="date"></td>
 						</tr>
 						<tr>

+ 4 - 4
protected/view/admin/invoiceReceivablesClaim.html

@@ -32,7 +32,7 @@
 							<!-- if !empty({{receivablesList.csClaim}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">到帐银行/到帐时间</th><th class="taC">收款录入</th><th class="taC" width="120">操作</th></tr>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到账信息</th><th class="taC">到账银行/到账时间</th><th class="taC">收款录入</th><th class="taC" width="120">操作</th></tr>
 								<!-- loop receivablesList.csClaim -->
 								<tr>
 									<td><b>¥{{csClaim' value.receivablesPrice}}</b></td>
@@ -55,7 +55,7 @@
 							<!-- if !empty({{receivablesList.sClaim}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">到帐银行/到帐时间</th><th class="taC">收款录入</th><th class="taC" width="120">操作</th></tr>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到账信息</th><th class="taC">到账银行/到账时间</th><th class="taC">收款录入</th><th class="taC" width="120">操作</th></tr>
 								<!-- loop receivablesList.sClaim -->
 								<tr>
 									<td><b>¥{{csClaim' value.receivablesPrice}}</b></td>
@@ -77,7 +77,7 @@
 <!-- if !empty({{receivablesList.arClaim}}) -->
 							<table class="table table-bordered table-condensed">
 								<tbody>
-								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到帐信息</th><th class="taC">银行/到帐时间</th><th class="taC">收款录入</th><th class="taC">收款认领</th></tr>
+								<tr><th class="taC" width="70">收款金额</th><th class="taC">银行到账信息</th><th class="taC">银行/到账时间</th><th class="taC">收款录入</th><th class="taC">收款认领</th></tr>
 								<!-- loop receivablesList.arClaim -->
 								<tr>
 									<td><b>¥{{csClaim' value.receivablesPrice}}</b></td>
@@ -123,7 +123,7 @@
 					</tr>
 					<tr>
 						<th class="taC">收款银行</th><td node-bank ></td>
-						<th class="taC">银行到</th><td node-date ></td>
+						<th class="taC">银行到</th><td node-date ></td>
 					</tr>
 					<tr>
 						<th class="taC"><span class="colRed">*</span>单位名称</th>