ソースを参照

发票管理首页调整

user5 4 年 前
コミット
e50ee1b07e

+ 36 - 0
src/main/java/com/jeeplus/modules/workinvoice/entity/WorkInvoice.java

@@ -39,7 +39,9 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	private String projectName;		// 项目名称
 	private Double money;		// 价税合计
 	private String invoiceType;		// 发票类型
+	private String invoiceTypeStr;		// 发票类型Str
 	private String chargeType;		// 收款类型
+	private String billingContent;		// 开票内容
 	private String content;		// 开票内容要求
 	private User drawer;		// 开票经办人(暂时弃用)
 	private Office office;		// 所属部门
@@ -66,6 +68,8 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	private String home;
 	private Date beginContractDate;		// 开始
 	private Date endContractDate;		// 结束
+	private Date receiptMoneyDate;		// 收款日期
+	private String receiptMoney;		// 是否收款
 	private List<WorkInvoiceDetail> workAccountList = Lists.newArrayList();//发票明细
 	public String getOfficeId() {
 		return officeId;
@@ -420,4 +424,36 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	public void setExt(String ext) {
 		this.ext = ext;
 	}
+
+	public String getBillingContent() {
+		return billingContent;
+	}
+
+	public void setBillingContent(String billingContent) {
+		this.billingContent = billingContent;
+	}
+
+	public String getInvoiceTypeStr() {
+		return invoiceTypeStr;
+	}
+
+	public void setInvoiceTypeStr(String invoiceTypeStr) {
+		this.invoiceTypeStr = invoiceTypeStr;
+	}
+
+	public Date getReceiptMoneyDate() {
+		return receiptMoneyDate;
+	}
+
+	public void setReceiptMoneyDate(Date receiptMoneyDate) {
+		this.receiptMoneyDate = receiptMoneyDate;
+	}
+
+	public String getReceiptMoney() {
+		return receiptMoney;
+	}
+
+	public void setReceiptMoney(String receiptMoney) {
+		this.receiptMoney = receiptMoney;
+	}
 }

+ 4 - 4
src/main/java/com/jeeplus/modules/workinvoice/web/WorkInvoiceController.java

@@ -335,8 +335,8 @@ public class WorkInvoiceController extends BaseController {
 	@RequiresPermissions("workinvoice:workInvoice:del")
 	@RequestMapping(value = "delete")
 	public String delete(WorkInvoice workInvoice, RedirectAttributes redirectAttributes) {
-		workInvoiceService.delete(workInvoice);
-		addMessage(redirectAttributes, "删除发票管理成功");
+		//workInvoiceService.delete(workInvoice);
+		addMessage(redirectAttributes, "作废发票管理成功");
 		return "redirect:"+Global.getAdminPath()+"/workinvoice/workInvoice/?repage";
 	}
 	
@@ -348,9 +348,9 @@ public class WorkInvoiceController extends BaseController {
 	public String deleteAll(String ids, RedirectAttributes redirectAttributes) {
 		String idArray[] =ids.split(",");
 		for(String id : idArray){
-			workInvoiceService.delete(workInvoiceService.get(id));
+			//workInvoiceService.delete(workInvoiceService.get(id));
 		}
-		addMessage(redirectAttributes, "删除发票管理成功");
+		addMessage(redirectAttributes, "作废发票管理成功");
 		return "redirect:"+Global.getAdminPath()+"/workinvoice/workInvoice/?repage";
 	}
 	

+ 17 - 4
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -11,6 +11,7 @@
 		a.project_name AS "projectName",
 		a.money AS "money",
 		a.invoice_type AS "invoiceType",
+		(case when a.invoice_type = '1' then '专票' when a.invoice_type = '2' then '普票' else '' end) as invoiceTypeStr,
 		a.charge_type AS "chargeType",
 		a.content AS "content",
 		a.drawer_id AS "drawer.id",
@@ -36,9 +37,11 @@
 		a.bank_number AS "bankNumber",
 		a.cancle_reason AS "cancaleReason",
 		u.name AS "drawer.name",
+		su.name AS "createBy.name",
 		so.top_company AS "office.name",
 		w.name AS "client.name",
 		p.project_name AS "project.projectName",
+		p.id AS "project.id",
 		a.invoice_state AS "invoiceState",
 		p.project_id AS "project.projectId",
 		ci.name AS "project.workContractInfo.name",
@@ -51,13 +54,20 @@
 		w.address AS "client.address",
 		a.officee_id AS "officeId",
 		a.province AS "province",
-		a.ext AS "ext"
+		a.ext AS "ext",
+		a.billing_content as "billingContent",
+		prd.number as "project.reportData.number",
+		p.area_name as "project.county",
+		a.receipt_money_date as "receiptMoneyDate",
+		(case when a.receipt_money = '0' then '否' when a.receipt_money = '1' then '是' else '否' end) as receiptMoney
 	</sql>
 	
 	<sql id="workInvoiceJoins">
 		LEFT JOIN sys_user u ON u.id = a.drawer_id
+		LEFT JOIN sys_user su ON su.id = a.create_by
 		LEFT JOIN work_client_info w ON  w.id = a.client_id
 	  	LEFT JOIN rural_project_records p ON  p.id = a.project_id
+	  	LEFT JOIN project_report_data prd ON  p.id = prd.project_id
 	  	left JOIN work_contract_info ci on ci.id = p.contract_id
 	  	JOIN sys_office o ON o.id = a.office_id
 		JOIN sys_office s ON s.id = a.company_id
@@ -335,7 +345,8 @@
 			cancle_reason,
 			officee_id,
 			province,
-			ext
+			ext,
+			billing_content
 		) VALUES (
 			#{id},
 			#{number},
@@ -372,7 +383,8 @@
 			#{cancleReason},
 			#{officeId},
 			#{province},
-			#{ext}
+			#{ext},
+			#{billingContent}
 		)
 	</insert>
 	
@@ -409,7 +421,8 @@
 			cancle_reason=#{cancleReason},
 			officee_id=#{officeId},
 			province = #{province},
-			ext = #{ext}
+			ext = #{ext},
+			billing_content = #{billingContent}
 		WHERE id = #{id}
 	</update>
 	

+ 23 - 5
src/main/webapp/webpage/modules/workinvoice/workInvoiceForm.jsp

@@ -344,7 +344,7 @@
 			<form:hidden path="invoiceDate"/>
 			<form:hidden path="province" id="province"/>
 
-			<div class="form-group layui-row first lw14">
+			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>基本信息</h2></div>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
@@ -391,10 +391,10 @@
 					<%--</div>--%>
 				<%--</div>--%>
 			</div>
-			<div class="form-group layui-row first lw14">
+			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>发票详情</h2></div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>上级/本公司开票:</label>
+					<label class="layui-form-label double-line"><span class="require-item">*</span>上级/本公司开票:</label>
 					<div class="layui-input-block">
 						<c:choose>
 							<c:when test="${workInvoice.invoiceState == 4}">
@@ -426,7 +426,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>实际开票单位:</label>
+					<label class="layui-form-label double-line"><span class="require-item">*</span>实际开票单位:</label>
 					<div class="layui-input-block with-icon">
 						<sys:gridselect url="${ctx}/workinvoice/workInvoice/selectclient" id="client" name="client.id"  value="${workInvoice.client.id}"  title="选择开票单位" labelName="workInvoice.client.name"
 										labelValue="${workInvoice.client.name}" cssClass="form-control required layui-input" fieldLabels="单位" fieldKeys="name" searchLabel="客户名称" searchKey="name" ></sys:gridselect>
@@ -434,7 +434,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item invoicetype">*</span>纳税人识别号:</label>
+					<label class="layui-form-label double-line"><span class="require-item invoicetype">*</span>纳税人识别号:</label>
 					<div class="layui-input-block">
 						<form:input id="orUnicode" path="orUnicode" htmlEscape="false"    class="form-control isUscCode layui-input"/>
 					</div>
@@ -463,6 +463,24 @@
 						<form:input id="bankNumber" path="bankNumber" htmlEscape="false"   class="form-control number layui-input"/>
 					</div>
 				</div>
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>收款类型:</label>
+					<div class="layui-input-block">
+						<form:select  path="chargeType" class="form-control simple-select required">
+							<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>开票内容:</label>
+					<div class="layui-input-block">
+						<form:select path="billingContent" class="form-control simple-select required">
+							<form:options items="${fns:getMainDictList('billing_content')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+
 				<div class="layui-item layui-col-sm12">
 					<label class="layui-form-label"><span class="require-item">*</span>价税合计(元):</label>
 					<div class="layui-input-block">

+ 55 - 22
src/main/webapp/webpage/modules/workinvoice/workInvoiceList.jsp

@@ -200,14 +200,14 @@
 <div class="wrapper wrapper-content">
 	<sys:message content="${message}"/>
 	<div class="layui-row ">
-		<div class="full-width fl">
+		<%--<div class="full-width fl">
 			<div class=" contentShadow shadowLTR list-form-tab" id="tabDiv">
 				<ul class="list-tabs" >
 					<li class="active"><a href="${ctx}/workinvoice/workInvoice/list">发票管理</a></li>
 					<li><a href="${ctx}/workinvoicealter/workInvoiceAlter/list">发票变更</a></li>
 				</ul>
 			</div>
-		</div>
+		</div>--%>
 		<div class="full-width fl">
 			<div class=" layui-row contentShadow shadowLR" id="queryDiv">
 				<form:form id="searchForm" modelAttribute="workInvoice" action="${ctx}/workinvoice/workInvoice/" method="post" class="form-inline">
@@ -273,7 +273,7 @@
 							<div class="layui-input-block with-icon">
 								<form:select path="invoiceState" class="form-control simple-select">
 									<form:option value="" label=""/>
-									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									<form:options items="${fns:getDictList('invoice_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 								</form:select>
 							</div>
 						</div>
@@ -289,7 +289,9 @@
 					</shiro:hasPermission>
 
 					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
-
+					<%--<shiro:hasPermission name="workinvoice:workInvoice:del">
+						<table:delRow url="${ctx}/workinvoice/workInvoice/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+					</shiro:hasPermission>--%>
 					<div style="clear: both;"></div>
 				</div>
 				<table class="oa-table layui-table" id="contentTable"></table>
@@ -310,27 +312,45 @@
             ,elem: '#contentTable'
             ,page: false
             ,cols: [[
-                // {checkbox: true, fixed: true},
+				{checkbox: true, fixed: true},
                 {field:'index',align:'center', title: '序号',width:40}
-                ,{field:'invoiceNum',align:'center', sort:true,title: '发票申请编号', minWidth:150,templet:function(d){
+				,{field:'projName',align:'center', title: '项目名称', minWidth:160,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.projectId +"','95%', '95%')\">" + d.projName + "</a>";
+					}}
+                ,{field:'invoiceNum',align:'center', sort:true,title: '发票编号', minWidth:130,templet:function(d){
                         return "<a class=\"attention-info\" title=\""+ d.invoiceNum +"\"href=\"javascript:void(0);\" onclick=\"openDialogView('查看发票管理', '${ctx}/workinvoice/workInvoice/form?id=" + d.id + "&tabId=1','95%', '95%')\">" + d.invoiceNum + "</a>";
                     }}
-                ,{field:'projNum',align:'center', sort:true,title: '项目编号', minWidth:150,templet:function(d){
-                        return "<span title='"+ d.projNum +"'>" + d.projNum + "</span>";
-                    }}
-                ,{field:'projName',align:'center', title: '项目名称', minWidth:100,templet:function(d){
-                        return "<span title='"+ d.projName +"'>" + d.projName + "</span>";
+				,{field:'clientName', align:'center',title: '开票单位', minWidth:160,templet:function(d){
+						return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
+					}}
+				,{field:'responsibleName', align:'center',title: '经办人', minWidth:80,templet:function(d){
+						return "<span title='"+ d.responsibleName +"'>" + d.responsibleName + "</span>";
+					}}
+				,{field:'officeName', align:'center',title: '经办单位',width:80,templet:function(d){
+						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+					}}
+				,{field:'money',align:'center', title: '开票金额',  width:90,templet:function(d){
+						return "<span title='"+ d.money +"'>" + d.money + "</span>";
+					}}
+				,{field:'billingContent',align:'center', title: '开票内容',  width:90,templet:function(d){
+						return "<span title='"+ d.billingContent +"'>" + d.billingContent + "</span>";
+					}}
+				,{field:'chargeType',align:'center', title: '收款类型',  width:90,templet:function(d){
+						return "<span title='"+ d.chargeType +"'>" + d.chargeType + "</span>";
+					}}
+				,{field:'invoiceType',align:'center', title: '发票类型',  width:90,templet:function(d){
+						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
+					}}
+                ,{field:'reportNumber',align:'center', title: '报告号', minWidth:150,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.reportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看报告信息', '${ctx}/ruralProject/ruralProjectMessage/modify?projectId=" + d.projectId + "&view=view','95%', '95%')\">" + d.reportNumber + "</a>";
                     }}
-                ,{field:'clientName', align:'center',title: '实际开票单位', minWidth:150,templet:function(d){
-                        return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
+                ,{field:'areaName',align:'center', title: '项目所在地', minWidth:80,templet:function(d){
+                        return "<span title='"+ d.areaName +"'>" + d.areaName + "</span>";
                     }}
-                ,{field:'officeName', align:'center',title: '所属部门',width:150,templet:function(d){
-                        return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
-                    }}
-                ,{field:'money',align:'center', title: '价税合计(元)',  width:90,templet:function(d){
-                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
-                    }}
-                ,{field:'createDate',align:'center', sort:true,title: '创建时间',  width:80}
+				,{field:'createDate',align:'center', sort:true,title: '开票日期',  width:80}
+				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:80}
+				,{field:'receiptMoney',align:'center', title: '是否收款',  width:80}
+				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
                 ,{align:'center', title: '状态',  width:70,templet:function(d){
                         <%--var st = getAuditState(d.status);--%>
 
@@ -366,10 +386,10 @@
                         {
                             xml += "<a href=\"${ctx}/workinvoice/workInvoice/cancelInvalidate?id="+ d.id +"\" onclick=\"return confirmx('确认要强制撤回?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
                         }
-                        if(d.canalter != undefined && d.canalter =="1")
+                        /*if(d.canalter != undefined && d.canalter =="1")
                         {
                             xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('变更发票管理', '${ctx}/workinvoice/workInvoice/alterForm?id="+ d.id +"','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
-                        }
+                        }*/
                         return xml;
 
                     }}
@@ -382,12 +402,21 @@
                     "index":"${index.index+1}"
                     ,"id":"${workInvoice.id}"
                     ,"invoiceNum":"${workInvoice.number}"
+                    ,"chargeType":"${fns:getMainDictLabels(workInvoice.chargeType,',','receipt_type', '')}"
+                    ,"billingContent":"${fns:getMainDictLabels(workInvoice.billingContent,',','billing_content', '')}"
+                    ,"invoiceType":"${workInvoice.invoiceTypeStr}"
                     ,"projNum":"${workInvoice.project.projectId}"
+                    ,"projectId":"${workInvoice.project.id}"
+                    ,"areaName":"${workInvoice.project.county}"
+                    ,"reportNumber":"${workInvoice.project.reportData.number}"
                     ,"projName":"${workInvoice.project.projectName}"
                     ,"clientName":"${workInvoice.client.name}"
                     ,"officeName":"${workInvoice.office.name}"
+                    ,"responsibleName":"${workInvoice.createBy.name}"
+                    ,"receiptMoney":"${workInvoice.receiptMoney}"
                     ,"money":"<fmt:formatNumber value="${workInvoice.money}" pattern="#,#0.00"/>"
                     ,"createDate":"<fmt:formatDate value="${workInvoice.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"receiptMoneyDate":"<fmt:formatDate value="${workInvoice.receiptMoneyDate}" pattern="yyyy-MM-dd"/>"
                     ,"status":"${workInvoice.invoiceState}"
                     <c:if test="${workInvoice.invoiceState == 1 && fns:getUser().id == workInvoice.createBy.id}"><shiro:hasPermission name="workinvoice:workInvoice:edit">,"canedit1":"1"</shiro:hasPermission></c:if><%--暂存-修改--%>
                     <c:if test="${workInvoice.invoiceState == '4' && fns:getUser().id == workInvoice.createBy.id}">,"canedit2":"1"</c:if><%--驳回--修改--%>
@@ -397,6 +426,10 @@
 					<shiro:hasPermission name="workinvoice:workInvoice:alteredit">
                     <c:if test="${workInvoice.invoiceState == '5'}">,"canalter":"1"</c:if>
                     </shiro:hasPermission>
+					,"cancellation":<c:choose>
+							<c:when test="${workInvoice.invoiceState == '7'}">"是"</c:when>
+					<c:otherwise>"否"</c:otherwise>
+					</c:choose>
                 }
                 </c:forEach>
                 </c:if>