页面自定义排序
parent
ab5bce4ea1
commit
076ff1097e
|
@ -163,8 +163,67 @@ public class ProjectService {
|
|||
queryHelper.addCondition("(p.creator_id=? OR p.approve_id=? OR p.id in (SELECT pv1.project_id FROM project_visible pv1 WHERE pv1.type=1 AND pv1.tid=? UNION SELECT pv2.project_id FROM project_visible pv2 WHERE pv2.type=2 AND pv2.tid=?))", adminId, adminId, roleId, adminId);
|
||||
}
|
||||
|
||||
|
||||
queryHelper.addDescOrderProperty("p.last_update_time");
|
||||
if (searchInfo.containsKey("orderType")) {
|
||||
if ("projectNoDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.project_no");
|
||||
} else if ("projectNoUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.project_no");
|
||||
} else if ("projectNameDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.name");
|
||||
} else if ("projectNameUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.name");
|
||||
} else if ("projectTypeDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.type_desc");
|
||||
} else if ("projectTypeUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.type_desc");
|
||||
} else if ("underModeDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.underwritten_mode_str");
|
||||
} else if ("underModeUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.underwritten_mode_str");
|
||||
} else if ("underIntDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.advance_interest_amount");
|
||||
} else if ("underIntUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.advance_interest_amount");
|
||||
} else if ("underPeakDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.advance_peak_amount");
|
||||
} else if ("underPeakUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.advance_peak_amount");
|
||||
} else if ("projectContractDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.contract_amount");
|
||||
} else if ("projectContractUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.contract_amount");
|
||||
} else if ("grossProfitDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.gross_profit");
|
||||
} else if ("grossProfitUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.gross_profit");
|
||||
} else if ("grossProfitMarginDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.gross_profit_margin");
|
||||
} else if ("grossProfitMarginUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.gross_profit_margin");
|
||||
} else if ("certaintyDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.certainty_str");
|
||||
} else if ("certaintyUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.certainty_str");
|
||||
} else if ("huizhiDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.huizhi_product_amount");
|
||||
} else if ("huizhiUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.huizhi_product_amount");
|
||||
} else if ("huazhiDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.huazhi_product_amount");
|
||||
} else if ("huazhiUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.huazhi_product_amount");
|
||||
} else if ("huasanDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.huasan_product_amount");
|
||||
} else if ("huasanUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.huasan_product_amount");
|
||||
} else if ("otherDown".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addDescOrderProperty("p.ziguang_other_amount");
|
||||
} else if ("otherUp".equals(searchInfo.get("orderType"))) {
|
||||
queryHelper.addAscOrderProperty("p.ziguang_other_amount");
|
||||
}
|
||||
} else {
|
||||
queryHelper.addDescOrderProperty("p.last_update_time");
|
||||
}
|
||||
|
||||
return queryHelper;
|
||||
}
|
||||
|
|
|
@ -325,20 +325,20 @@
|
|||
<th class="table-check">
|
||||
<input type="checkbox" id="allCheck"></th>
|
||||
<th class="table-title">序号</th>
|
||||
<th class="table-title">项目编号</th>
|
||||
<th class="table-title">项目名称</th>
|
||||
<th class="table-title">项目类型</th>
|
||||
<th class="table-title">垫资模式</th>
|
||||
<th class="table-title">垫资利息</th>
|
||||
<th class="table-title">垫资峰值</th>
|
||||
<th class="table-title">项目合同金额</th>
|
||||
<th class="table-title">项目毛利</th>
|
||||
<th class="table-title">项目毛利率</th>
|
||||
<th class="table-title">项目把握度</th>
|
||||
<th class="table-title">汇智产品金额</th>
|
||||
<th class="table-title">华智产品金额</th>
|
||||
<th class="table-title">华三产品金额</th>
|
||||
<th class="table-title">其他产品金额</th>
|
||||
<th class="table-title">项目编号<i class="am-icon-caret-down" onclick="sub_function('projectNoDown')"></i><i class="am-icon-caret-up" onclick="sub_function('projectNoUp')"></i></th>
|
||||
<th class="table-title">项目名称<i class="am-icon-caret-down" onclick="sub_function('projectNameDown')"></i><i class="am-icon-caret-up" onclick="sub_function('projectNameUp')"></i></th>
|
||||
<th class="table-title">项目类型<i class="am-icon-caret-down" onclick="sub_function('projectTypeDown')"></i><i class="am-icon-caret-up" onclick="sub_function('projectTypeUp')"></i></th>
|
||||
<th class="table-title">垫资模式<i class="am-icon-caret-down" onclick="sub_function('underModeDown')"></i><i class="am-icon-caret-up" onclick="sub_function('underModeUp')"></i></th>
|
||||
<th class="table-title">垫资利息<i class="am-icon-caret-down" onclick="sub_function('underIntDown')"></i><i class="am-icon-caret-up" onclick="sub_function('underIntUp')"></i></th>
|
||||
<th class="table-title">垫资峰值<i class="am-icon-caret-down" onclick="sub_function('underPeakDown')"></i><i class="am-icon-caret-up" onclick="sub_function('underPeakUp')"></i></th>
|
||||
<th class="table-title">项目合同金额<i class="am-icon-caret-down" onclick="sub_function('projectContractDown')"></i><i class="am-icon-caret-up" onclick="sub_function('projectContractUp')"></i></th>
|
||||
<th class="table-title">项目毛利<i class="am-icon-caret-down" onclick="sub_function('grossProfitDown')"></i><i class="am-icon-caret-up" onclick="sub_function('grossProfitUp')"></i></th>
|
||||
<th class="table-title">项目毛利率<i class="am-icon-caret-down" onclick="sub_function('grossProfitMarginDown')"></i><i class="am-icon-caret-up" onclick="sub_function('grossProfitMarginUp')"></i></th>
|
||||
<th class="table-title">项目把握度<i class="am-icon-caret-down" onclick="sub_function('certaintyDown')"></i><i class="am-icon-caret-up" onclick="sub_function('certaintyUp')"></i></th>
|
||||
<th class="table-title">汇智产品金额<i class="am-icon-caret-down" onclick="sub_function('huizhiDown')"></i><i class="am-icon-caret-up" onclick="sub_function('huizhiUp')"></i></th>
|
||||
<th class="table-title">华智产品金额<i class="am-icon-caret-down" onclick="sub_function('huazhiDown')"></i><i class="am-icon-caret-up" onclick="sub_function('huazhiUp')"></i></th>
|
||||
<th class="table-title">华三产品金额<i class="am-icon-caret-down" onclick="sub_function('huasanDown')"></i><i class="am-icon-caret-up" onclick="sub_function('huasanUp')"></i></th>
|
||||
<th class="table-title">其他产品金额<i class="am-icon-caret-down" onclick="sub_function('otherDown')"></i><i class="am-icon-caret-up" onclick="sub_function('otherUp')"></i></th>
|
||||
<th class="table-title">项目状态</th>
|
||||
<th class="table-title">行业场景应用</th>
|
||||
<th class="table-title">解决方案</th>
|
||||
|
@ -741,6 +741,75 @@
|
|||
location.href = '${base}/project/approve?listFrom=list&type=1&id=' + id + '&pageNumber=' + pageNumber + '&keywords=' + keywords;
|
||||
};
|
||||
|
||||
var sub_function = function (type) {
|
||||
$("#pageNumber").val(1);
|
||||
initSearch(type);
|
||||
$("#listForm").attr("action", "${base}/project/list");
|
||||
$("#listForm").submit();
|
||||
|
||||
};
|
||||
|
||||
var initSearch = function (type) {
|
||||
|
||||
var keywordsObj = {};
|
||||
var extend = $("#extend").val();
|
||||
keywordsObj.extend = extend;
|
||||
keywordsObj.orderType = type;
|
||||
if ($("#projectNo").val())
|
||||
keywordsObj.projectNo = $("#projectNo").val();
|
||||
if ($("#name").val())
|
||||
keywordsObj.name = $("#name").val();
|
||||
if ($("#creatorName").val())
|
||||
keywordsObj.creatorName = $("#creatorName").val();
|
||||
if ($("#status").val())
|
||||
keywordsObj.status = $("#status").val();
|
||||
if ($("#approveStatus").val())
|
||||
keywordsObj.approveStatus = $("#approveStatus").val();
|
||||
if ($("#deptId").val())
|
||||
keywordsObj.deptId = $("#deptId").val();
|
||||
if ($("#type").val())
|
||||
keywordsObj.type = $("#type").val();
|
||||
if ($("#underwrittenMode").val())
|
||||
keywordsObj.underwrittenMode = $("#underwrittenMode").val();
|
||||
if ($("#certainty").val())
|
||||
keywordsObj.certainty = $("#certainty").val();
|
||||
if (extend === '0') {
|
||||
if ($("#isSecond").val())
|
||||
keywordsObj.isSecond = $("#isSecond").val();
|
||||
if ($("#signType").val())
|
||||
keywordsObj.signType = $("#signType").val();
|
||||
if ($("#resolvePlan").val())
|
||||
keywordsObj.resolvePlan = $("#resolvePlan").val();
|
||||
if ($("#startDate").val())
|
||||
keywordsObj.startDate = $("#startDate").val();
|
||||
if ($("#endDate").val())
|
||||
keywordsObj.endDate = $("#endDate").val();
|
||||
if ($("#startUpdateDate").val())
|
||||
keywordsObj.startUpdateDate = $("#startUpdateDate").val();
|
||||
if ($("#endUpdateDate").val())
|
||||
keywordsObj.endUpdateDate = $("#endUpdateDate").val();
|
||||
if ($("#contractStartTime").val())
|
||||
keywordsObj.contractStartTime = $("#contractStartTime").val();
|
||||
if ($("#contractEndTime").val())
|
||||
keywordsObj.contractEndTime = $("#contractEndTime").val();
|
||||
if ($("#industryScene").val())
|
||||
keywordsObj.industryScene = $("#industryScene").val();
|
||||
}
|
||||
if ($("#customer").val())
|
||||
keywordsObj.customer = $("#customer").val();
|
||||
if ($("#terminalCustomer").val())
|
||||
keywordsObj.terminalCustomer = $("#terminalCustomer").val();
|
||||
if ($("#principal").val())
|
||||
keywordsObj.principal = $("#principal").val();
|
||||
var keywords = "";
|
||||
if (!$.isEmptyObject(keywordsObj)) {
|
||||
keywords = JSON.stringify(keywordsObj);
|
||||
}
|
||||
console.log("keywords = " + keywords);
|
||||
|
||||
$("#keywords").val(keywords);
|
||||
};
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#extend").on("click", function () {
|
||||
|
|
Loading…
Reference in New Issue