Kaynağa Gözat

财务项目添加是否已开票展示

user5 4 yıl önce
ebeveyn
işleme
e32f2aeea3

+ 18 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecords.java

@@ -67,6 +67,8 @@ public class ProjectRecords extends ActEntity<ProjectRecords> {
 
 	//新添代码
 	private String projectTypeId; //项目类型
+	private String invoiceFlag; //是否开票
+	private String invoiceStatus; //开票状态
 
 	private ProjectReportData reportData;//报告
 
@@ -774,4 +776,20 @@ public class ProjectRecords extends ActEntity<ProjectRecords> {
 	public void setSubmitScale(BigDecimal submitScale) {
 		this.submitScale = submitScale;
 	}
+
+	public String getInvoiceFlag() {
+		return invoiceFlag;
+	}
+
+	public void setInvoiceFlag(String invoiceFlag) {
+		this.invoiceFlag = invoiceFlag;
+	}
+
+	public String getInvoiceStatus() {
+		return invoiceStatus;
+	}
+
+	public void setInvoiceStatus(String invoiceStatus) {
+		this.invoiceStatus = invoiceStatus;
+	}
 }

+ 2 - 0
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java

@@ -677,6 +677,8 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 		/*for (WorkInvoiceDetail workAccount : workInvoice.getWorkAccountList()){
 			workInvoiceDetailDao.delete(workAccount);
 		}*/
+		//删除开票项目信息
+		dao.deleteProjectRelation(workInvoice.getId());
 	}
 
 	/**

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

@@ -769,6 +769,24 @@ public class WorkInvoiceController extends BaseController {
 		project.setProjectStatus(ProjectStatusEnum.SIGNED.getValue());//已签状态
 		project.setLeaderNameStr(UserUtils.getUser().getName());
 		Page<ProjectRecords> page = projectRecordsService.ruralFindPage(new Page<ProjectRecords>(request, response), project);
+		List<ProjectRecords> list = page.getList();
+		for (ProjectRecords info: list) {
+			if("1".equals(info.getInvoiceFlag())){
+				switch (info.getInvoiceStatus()){
+					case "5":
+						info.setInvoiceFlag("已开票");
+						break;
+					case "1":
+					case "2":
+					case "3":
+					case "4":
+						info.setInvoiceFlag("开票中");
+						break;
+					default:
+						info.setInvoiceFlag("");
+				}
+			}
+		}
 		try {
 			fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");
 			fieldKeys = URLDecoder.decode(fieldKeys, "UTF-8");

+ 15 - 1
src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml

@@ -948,7 +948,9 @@
 		wct.name AS "workContractInfo.client.name",
 		o.top_company AS "office.name",
 		dsu.name as "projectRegistrant",
-		prd.number as "reportData.number"
+		prd.number as "reportData.number",
+		if(wipr.project_id is not null,"1","") as invoiceFlag,
+		wi.invoice_state as "invoiceStatus"
 		FROM rural_project_records a
 		<include refid="projectRecordsJoins"/>
 
@@ -961,6 +963,8 @@
 		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
 		LEFT JOIN work_client_info wct on wci.client_id = wct.id
 		LEFT JOIN sys_office o ON o.id = a.office_id
+		left join work_invoice_project_relation wipr on wipr.project_id = a.id
+		left join work_invoice wi on wi.id = wipr.invoice_id
 		<where>
 			<if test="projectId != null and projectId != ''">
 				AND a.project_id like concat('%',#{projectId},'%')
@@ -1016,6 +1020,11 @@
 			<if test="endDate !=null">
 				AND a.create_date &lt; #{endDate}
 			</if>
+			<if test="reportData != null and reportData != ''">
+				<if test="reportData.number != null and reportData.number != ''">
+					AND prd.number like concat(concat('%',#{reportData.number}),'%')
+				</if>
+			</if>
 			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
 			/*and prd.number is not null*/
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
@@ -1103,6 +1112,11 @@
 			<if test="endDate !=null">
 				AND a.create_date &lt; #{endDate}
 			</if>
+			<if test="reportData != null and reportData != ''">
+				<if test="reportData.number != null and reportData.number != ''">
+					AND prd.number like concat(concat('%',#{reportData.number}),'%')
+				</if>
+			</if>
 			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
 			/*and prd.number is not null*/
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAuditTwo.jsp

@@ -436,7 +436,7 @@
 							</div>
 						</div>
 						<div class="layui-item layui-col-sm6" style="display: none;">
-							<label class="layui-form-label">费率合同(费率):</label>
+							<label class="layui-form-label">费率(%):</label>
 							<div class="layui-input-block with-icon">
 								<form:input placeholder="请输入合同费率" id="contractRate" path="projectReportData.contractRate" htmlEscape="false"  readonly="true" class="form-control layui-input "/>
 							</div>

+ 37 - 7
src/main/webapp/webpage/modules/sys/gridinvoiceproject.jsp

@@ -15,11 +15,21 @@
 			    	  $('#contentTable tbody tr td input.i-checks').iCheck('check');
 			    	});
 
-			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
+			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
 			    	  $('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
 			    	});
-			    
-			
+
+			//搜索框收放
+			$('#moresee').click(function(){
+				if($('#moresees').is(':visible'))
+				{
+					$('#moresees').slideUp(0,resizeListWindow1);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+				}else{
+					$('#moresees').slideDown(0,resizeListWindow1);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+				}
+			});
 		});
 
 		function getSelectedItem(){
@@ -35,7 +45,7 @@
 					return "-1";
 				  }
 			    var id =  $("#contentTable tbody tr td input.i-checks:checkbox:checked").attr("id");
-			    
+
 				var label = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel").html();
 				var number = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codenumber").html();
 				return id+"_item_"+label+"_item_"+number;
@@ -72,14 +82,32 @@
 								<form:input path="${searchKey}" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
 							</div>
 						</div>
+						<div class="layui-item query athird">
+							<span class="layui-form-label">项目编号:</span>
+							<div class="layui-input-block">
+								<form:input path="projectId" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+							</div>
+						</div>
 						<div class="layui-item athird fr">
 							<div class="input-group">
-								<button id="searchReset" class="fixed-btn searchReset fr" style="margin-right: 0px;" onclick="resetSearch()">重置</button>
-								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<div class="layui-btn-group search-spacing">
+									<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+									<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+								</div>
 							</div>
 						</div>
 						<div style="    clear:both;"></div>
 					</div>
+					<div id="moresees" style="clear:both;display:none;">
+						<div class="layui-item query athird">
+							<span class="layui-form-label">报告号:</span>
+							<div class="layui-input-block">
+								<form:input path="reportData.number" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div style="clear:both;"></div>
+					</div>
 				</form:form>
 			</div>
 		</div>
@@ -95,6 +123,7 @@
 								<th>项目报告号</th>
 								<th>负责人</th>
 								<th>委托方</th>
+								<th>是否开票</th>
 							</c:forEach>
 						</tr>
 					</thead>
@@ -109,6 +138,7 @@
 									<td class="codenumber">${obj.reportData.number}</td>
 									<td class="codelabel">${obj.leaderNameStr}</td>
 									<td class="codelabel">${obj.workContractInfo.client.name}</td>
+									<td class="codelabel">${obj.invoiceFlag}</td>
 								</tr>
 							</c:forEach>
 						</c:when>
@@ -157,4 +187,4 @@
 	</div>
 </div>
 </body>
-</html>
+</html>