空间管理

master
OathK1per 2022-11-10 14:44:31 +08:00
parent 3df9591441
commit b39bc0d8ca
8 changed files with 1048 additions and 289 deletions

View File

@ -0,0 +1,115 @@
package cn.palmte.work.controller.backend;
import cn.palmte.work.model.Admin;
import cn.palmte.work.model.Project;
import cn.palmte.work.pojo.SpaceVO;
import cn.palmte.work.service.ProjectService;
import cn.palmte.work.service.SpaceService;
import cn.palmte.work.utils.FreeMarkerUtil;
import cn.palmte.work.utils.InterfaceUtil;
import cn.palmte.work.utils.Utils;
import cn.palmte.work.utils.excel.ExportUtils;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.activiti.engine.task.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import top.jfunc.common.db.bean.Page;
import top.jfunc.common.utils.CollectionUtil;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
@Controller
@RequestMapping("/space")
public class SpaceController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(ProjectController.class);
@Autowired
private SpaceService spaceService;
@Autowired
private ProjectService projectService;
/**
*
*/
@RequestMapping("/list")
public String list(@RequestParam(value = "keywords", required = false) String keywords,
@RequestParam(value = "certainty") int certainty,
@RequestParam(value = PAGE_NUMBER, defaultValue = DEFAULT_PAGE_NUMBER) int pageNumber,
@RequestParam(value = PAGE_SIZE, defaultValue = DEFAULT_PAGE_SIZE) int pageSize,
Map<String, Object> model) {
//当前登录人的角色类型
model.put("keywords", keywords);
model.put("pageNumber", pageNumber);
Admin admin = InterfaceUtil.getAdmin();
model.put("adminId", admin.getId());
model.put("admin", admin);
ConcurrentHashMap<String, String> searchInfo = getSearchInfo(keywords, model);
model.put("certainty", certainty);
searchInfo.putIfAbsent("certainty", String.valueOf(certainty));
searchInfo.putIfAbsent("deptName", "销售管理部");
searchInfo.putIfAbsent("estimateStatus", String.valueOf(1));
Page<Project> page = projectService.list(searchInfo, pageNumber, pageSize);
List<Project> list = page.getList();
if(CollectionUtil.isNotEmpty(list)){
int offset = (pageNumber - 1) * pageSize;
for (int i = 0 , size = list.size(); i < size; i++) {
list.get(i).setTempId(i+1 + offset);
}
}
model.put("pager", page);
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
return "admin/space_list";
}
/**
*
*/
@RequestMapping("/export")
public void export(@RequestParam(value = "keywords", required = false) String keywords, @RequestParam(value = "certainty") int certainty, HttpServletResponse httpServletResponse) throws IOException {
Map<String, String> searchInfo = getSearchInfo(keywords);
searchInfo.putIfAbsent("certainty", String.valueOf(certainty));
downloadHeader(httpServletResponse, Utils.generateExcelName("项目报表"), "application/octet-stream");
String[] headers = {"项目编号", "项目名称", "项目类型", "垫资模式", "垫资利息", "垫资峰值", "项目合同金额", "项目毛利", "项目毛利率", "项目把握度", "汇智产品金额", "华智产品金额",
"华三产品金额", "其他产品金额", "项目状态", "行业场景应用", "解决方案", "客户名称", "最终用户名称", "预计合同签订时间", "项目计划招标时间", "是否二次合作", "直签", "战略合作对象",
"项目负责人", "价值及风险", "主合同收款条款", "主合同具体解决方案", "计收计划", "审核状态", "当前审核人", "项目创建者", "部门名称", "项目开始时间", "项目结束时间", "最后更新时间"};
String[] exportColumns = {"projectNo", "name", "typeDesc", "underwrittenModeStr", "advanceInterestAmountRound", "advancePeakAmountRound", "contractRound", "grossProfitRound", "grossProfitMarginRound", "certaintyStr", "huizhiRound", "huazhiRound",
"huasanRound", "ziguangRound", "statusDesc", "industryScenario", "resolvePlan", "customer", "terminalCustomer", "contractTime", "bidsTime", "isSecondStr", "signTypeStr", "collaborator",
"principal", "valueRisk", "mainContractCollectionTerms", "mainContractResolvePlan", "calculationCollection", "approveStatusDesc", "approveName", "creatorName", "deptName", "startDate", "endDate", "lastUpdateTime"};
ExportUtils.exportToExcel(headers, exportColumns, 1, 10000,
httpServletResponse.getOutputStream(), (pN, pS) -> projectService.list(searchInfo, pN, pS).getList());
}
/**
*
*
* @param model
* @return
*/
@RequestMapping("/statistics")
public String statistics(Map<String, Object> model) {
return "/admin/space_statistics";
}
@RequestMapping("/listData")
@ResponseBody
public String listData() {
SpaceVO spaceVO = spaceService.getListData();
return JSONObject.toJSONString(spaceVO);
}
}

View File

@ -0,0 +1,49 @@
package cn.palmte.work.pojo;
import top.jfunc.common.db.bean.Record;
import java.util.List;
import java.util.Map;
public class SpaceVO {
private Map map;
private Record count;
private Record type;
private List<Record> list;
public Map getMap() {
return map;
}
public void setMap(Map map) {
this.map = map;
}
public Record getCount() {
return count;
}
public void setCount(Record count) {
this.count = count;
}
public Record getType() {
return type;
}
public void setType(Record type) {
this.type = type;
}
public List<Record> getList() {
return list;
}
public void setList(List<Record> list) {
this.list = list;
}
}

View File

@ -100,6 +100,10 @@ public class ProjectService {
if(StrUtil.isNotEmpty(searchInfo.get("certainty")) && !"-1".equals(searchInfo.get("certainty"))){
queryHelper.addCondition("p.certainty=?", Integer.parseInt(searchInfo.get("certainty")));
}
queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("deptName")),"p.dept_name LIKE ?", "%"+searchInfo.get("deptName")+"%");
if(StrUtil.isNotEmpty(searchInfo.get("estimateStatus")) && !"-1".equals(searchInfo.get("estimateStatus"))){
queryHelper.addCondition("p.approve_status_estimate>=1 and p.approve_status_estimate<=2");
}
if(StrUtil.isNotEmpty(searchInfo.get("extend")) && "0".equals(searchInfo.get("extend"))) {
if (StrUtil.isNotEmpty(searchInfo.get("isSecond")) && !"-1".equals(searchInfo.get("isSecond"))) {

View File

@ -0,0 +1,38 @@
package cn.palmte.work.service;
import cn.palmte.work.pojo.SpaceVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.jfunc.common.db.bean.Record;
import top.jfunc.common.db.utils.Pagination;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class SpaceService {
@Autowired
private Pagination pagination;
public SpaceVO getListData() {
String sql = "SELECT count(id) as sum, certainty, certainty_str as name FROM project WHERE approve_status_estimate >= 1 and approve_status_estimate <= 2 and dept_name = '销售管理部' GROUP BY certainty";
List<Record> pie = pagination.find(sql);
String sql2 = "SELECT sum(IFNULL(contract_amount,0)) as sum, avg(IFNULL(gross_profit_margin, 0)) as average, certainty, certainty_str as name FROM project WHERE approve_status_estimate >= 1 and approve_status_estimate <= 2 and dept_name = '销售管理部' GROUP BY certainty";
List<Record> bar = pagination.find(sql2);
return combineData(pie, bar);
}
private SpaceVO combineData(List<Record> pie, List<Record> bar) {
Map<String, Record> map = pie.stream().collect(Collectors.toMap(record -> String.valueOf(record.getInt("certainty")), Function.identity()));
SpaceVO spaceVO = new SpaceVO();
spaceVO.setMap(map);
spaceVO.setList(bar);
return spaceVO;
}
}

View File

@ -333,26 +333,7 @@
>${project.valueRisk!}</textarea>
</td>
</tr>
<#-- </table>-->
<#-- <!--endprint&ndash;&gt;-->
<#-- </div>-->
<#-- <!--验证表单元素validate end&ndash;&gt;-->
<#-- <div class="am-tab-panel am-fade am-in" id="tab2">-->
<#-- <div class="am-u-sm-12 am-u-md-12" style="padding:0 1.6rem 1.6rem 1rem;margin:0;">-->
<#-- <div class="am-btn-toolbar" style="padding-left:.5rem;">-->
<#-- <div class="am-btn-group am-btn-group-xs">-->
<#-- <button type="button" class="am-btn am-btn-default" onclick="location.href='${base}/project/estimateSecondExport?id=${project.id!}'">-->
<#-- <span class="am-icon-archive"></span> 导出-->
<#-- </button>-->
<#-- </div>-->
<#-- </div>-->
<#-- </div>-->
<#-- <table id="myTable" class="am-table am-table-bordered">-->
<#-- <tr class="am-text-nowrap">-->
<#-- <th class="table-title" colspan="6" style="text-align: center">项目立项(概算)其他信息</th>-->
<#-- <input type="hidden" style="border-style:none;" name="id" id="id" value="${id!}"/>-->
<#-- </tr>-->
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目负责人:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${project.principal!}"/></td>

View File

@ -102,309 +102,202 @@
<input type="hidden" style="border-style:none;" name="id" id="id" value="${id!}"/>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">部门名称:</span></th>
<td class="table-title" colspan="2" ><input style="border-style:none;" readonly value="${project.deptName!}" /></td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目编号:</span></th>
<td class="table-title" colspan="2" ><input style="border-style:none;" readonly value="${project.projectNo!}" /></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">部门名称:</span></th>
<td class="table-title" colspan="2" ><input readonly value="${project.deptName!}"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目编号:</span></th>
<td class="table-title" colspan="2" ><input readonly value="${project.projectNo!}"/></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目名称:</span></th>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目名称:</span></th>
<td class="table-title" colspan="5" ><input readonly value="${project.name!}"/></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目类型:</span></th>
<td class="table-title" colspan="1" >
<#if project.type??>
<#if (project.type) =1>
<input readonly value="工程集成类"/>
<#elseif (project.type) =2>
<input readonly value="设备集成类"/>
<#elseif (project.type) =3>
<input readonly value="战略合作类"/>
</#if>
<#else>
<input readonly value=""/>
</#if>
</td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目计划开始时间:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${(project.startDate?string("yyyy-MM-dd"))!}"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目计划结束时间:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${(project.endDate?string("yyyy-MM-dd"))!}"/></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">垫资模式:</span></th>
<td class="table-title" <#if project.underwrittenMode! <= 2> colspan="5" <#else> colspan="1" </#if> >
<#if project.underwrittenMode??>
<#if (project.underwrittenMode) =1>
<input readonly value="A类-不垫资"/>
<#elseif (project.underwrittenMode) =3>
<input readonly value="B类-垫资(账期覆盖)"/>
<#elseif (project.underwrittenMode) =4>
<input readonly value="C类-垫资(账期不覆盖)"/>
</#if>
<#else>
<input readonly value=""/>
</#if>
</td>
<#if project.underwrittenMode! gt 2>
<th class="table-title" colspan="1" ><span style="font-size: 15px">垫资利息:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.advanceInterestAmount)}元" /></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">垫资峰值:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.advancePeakAmount)}元" /></td>
</#if>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">垫资模式:</span></th>
<td class="table-title" <#if project.cooperateType! == 1> colspan="1" <#else> colspan="5" </#if> >
<#if project.cooperateType??>
<#if (project.cooperateType) =1>
<input readonly value="战略合作类"/>
<#elseif (project.cooperateType) =2>
<input readonly value="非战略合作类"/>
</#if>
<#else>
<input readonly value=""/>
</#if>
</td>
<#if project.cooperateType! == 1>
<th class="table-title" colspan="1" ><span style="font-size: 15px">合作对象:</span></th>
<td class="table-title" colspan="3" ><input readonly value="${project.collaborator!}"/>
<#if project.collaboratorUrl?? && project.collaboratorUrl != "">
<div class="am-form-file am-text-xs">
<a href="${project.collaboratorUrl!}" download>
<i class="am-icon-cloud-upload"></i> 下载附件
</a>
</div>
<#else>
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</#if>
</td>
</#if>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">合同金额:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.contractAmount)}元"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目毛利:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.grossProfit)}元" /></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目毛利率:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.grossProfitMargin)}%" /></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">汇智产品金额:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.huizhiProductAmount, '0.00')}元"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">华智产品金额:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.huazhiProductAmount, '0.00')}元"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">华三产品金额:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.huasanProductAmount, '0.00')}元"/></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">其他产品金额:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${Utils.format(project.ziguangOtherAmount, '0.00')}元"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目把握度:</span></th>
<td class="table-title" colspan="1" >
<#if project.certainty??>
<#if (project.certainty) =1>
<input readonly value="A项目成功率80%-100%"/>
<#elseif (project.certainty) =2>
<input readonly value="B项目成功率60%-80%"/>
<#elseif (project.certainty) =3>
<input readonly value="C项目成功率40%-60%"/>
</#if>
<#else>
<input readonly value=""/>
</#if>
</td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">行业场景应用:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${project.industryScenario!}"/></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目解决方案:</span></th>
<td class="table-title" colspan="1" >
<#if project.resolvePlan??>
<#if (project.resolvePlan!) =1>
<input readonly value="公共服务(智慧交通、雪亮工程、治安防控体系等)"/>
<#elseif (project.resolvePlan!) =2>
<input readonly value="泛行业(智慧园区、智慧医疗、智慧工地等)"/>
<#elseif (project.resolvePlan!) =3>
<input readonly value="其他生态"/>
</#if>
<#else>
<input readonly value=""/>
</#if>
</td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">客户名称:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${project.customer!}"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">最终用户名称:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${project.terminalCustomer!}"/></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">价值及风险:</span></th>
<td class="table-title" colspan="5" >
<input type="text" id="name" style="border-style:none;" data-validate-async data-validation-message="请输入项目名称1000字符以内"
name="name" placeholder="请输入项目名称1000字符以内" maxlength="1000" value="${project.name!}" />
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目类型:</span></th>
<td class="table-title" colspan="1" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="type" name="type" >
<option value="1" <#if project.type=1>selected</#if>>工程集成类</option>
<option value="2" <#if project.type=2>selected</#if>>设备集成类</option>
</select>
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目计划开始时间:</span></th>
<td class="table-title" colspan="1" >
<#-- <i class="am-icon-calendar"></i>-->
<input type="text" style="border-style:none;" id="startDate"
name="startDate" autocomplete="off"
value="${(project.startDate?string("yyyy-MM-dd"))!}" placeholder="项目计划开始时间"
data-am-datepicker >
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目计划结束时间:</span></th>
<td class="table-title" colspan="1" >
<#-- <i class="am-icon-calendar"></i>-->
<input type="text" style="border-style:none;" id="endDate"
name="endDate" autocomplete="off"
value="${(project.endDate?string("yyyy-MM-dd"))!}" placeholder="项目计划结束时间"
data-am-datepicker >
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">垫资模式:</span></th>
<td class="table-title" colspan="1" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="underwrittenMode" name="underwrittenMode" onchange="changeCheck()">
<option value="1" <#if project.underwrittenMode=1>selected</#if>>A类-不垫资</option>
<option value="3" <#if project.underwrittenMode=3>selected</#if>>B类-垫资(账期覆盖)</option>
<option value="4" <#if project.underwrittenMode=4>selected</#if>>C类-垫资(账期不覆盖)</option>
</select>
</td>
<th class="table-title" colspan="1" id="noUnder1" <#if project.underwrittenMode! <= 2>hidden</#if>><span style="color: red;">*</span><span style="font-size: 15px">垫资利息:</span></th>
<td class="table-title" colspan="1" id="noUnder2" <#if project.underwrittenMode! <= 2>hidden</#if>>
<input type="text" class="number am-input" style="border-style:none;" data-validate-async data-validation-message="请输入垫资利息"
name="advanceInterestAmount" id="advanceInterestAmount" placeholder="单位(元)" maxlength="16"
value="${Utils.format(project.advanceInterestAmount)}" />
</td>
<th class="table-title" colspan="1" id="noUnder3" <#if project.underwrittenMode! <= 2>hidden</#if>><span style="color: red;">*</span><span style="font-size: 15px">垫资峰值:</span></th>
<td class="table-title" colspan="1" id="noUnder4" <#if project.underwrittenMode! <= 2>hidden</#if>>
<input type="text" class="number am-input" style="border-style:none;" data-validate-async data-validation-message="请输入垫资峰值"
name="advancePeakAmount" id="advancePeakAmount" placeholder="单位(元)" maxlength="16"
value="${Utils.format(project.advancePeakAmount)}" />
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">合作类型:</span></th>
<td class="table-title" colspan="1" id="spanMode" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="cooperateType" name="cooperateType" onchange="changeCheck2()">
<option value="1" <#if project.cooperateType=1>selected</#if>>战略合作类</option>
<option value="2" <#if project.cooperateType=2>selected</#if>>非战略合作类</option>
</select>
</td>
<th class="table-title" colspan="1" id="coop1" <#if project.cooperateType! != 1>hidden</#if> ><span style="color: red;">*</span><span style="font-size: 15px">合作对象:</span></th>
<td class="table-title" colspan="3" id="coop2" <#if project.cooperateType! != 1>hidden</#if> >
<div class="sameline">
<input type="text" style="border-style:none;width: 50%;" data-validate-async data-validation-message="请输入合作对象"
name="collaborator" id="collaborator" placeholder="请输入合作对象" maxlength="20"
value="${project.collaborator!}" />
<span class="am-form-file am-text-xs spanline">
<button type="button" class="am-btn am-btn-primary am-btn-sm" style="border: none">
<i class="am-icon-cloud-upload"></i> 上传附件
</button>
<input id="file_upload_icon" type="file" name="files[]" >
<span style="display:none;" id="collaboratorUrl_span">${project.collaboratorUrl!}</span>
<span id="collaboratorUrl_check"><#if project.collaboratorUrl??>已上传</#if></span>
<input id="collaboratorUrl" name="collaboratorUrl" type="hidden" value="${project.collaboratorUrl!}"/>
</span>
</div>
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">合同金额:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="number am-input" style="border-style:none;" data-validate-async data-validation-message="请输入合同金额"
name="contractAmount" id="contractAmount" placeholder="单位(元)" maxlength="16"
value="${Utils.format(project.contractAmount)}" />
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目毛利:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="number am-input" style="border-style:none;" data-validate-async data-validation-message="请输入项目毛利"
name="grossProfit" id="grossProfit" placeholder="单位(元)" maxlength="16"
value="${Utils.format(project.grossProfit)}" />
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目毛利率:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="number am-input" style="border-style:none;" data-validate-async data-validation-message="请输入项目毛利率"
name="grossProfitMargin" id="grossProfitMargin" placeholder="单位(%" maxlength="16"
value="${Utils.format(project.grossProfitMargin)}" />
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">汇智产品金额:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="number am-input" style="border-style:none;" data-validation-message="汇智产品金额"
name="huizhiProductAmount" id="huizhiProductAmount" placeholder="单位(元)" maxlength="16" value="${Utils.format(project.huizhiProductAmount, "0.00")}" />
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">华智产品金额:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="number am-input" style="border-style:none;" data-validation-message="华智产品金额"
name="huazhiProductAmount" id="huazhiProductAmount" placeholder="单位(元)" maxlength="16" value="${Utils.format(project.huazhiProductAmount, "0.00")}" />
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">华三产品金额:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="number am-input" style="border-style:none;" data-validation-message="华三产品金额"
name="huasanProductAmount" id="huasanProductAmount" placeholder="单位(元)" maxlength="16" value="${Utils.format(project.huasanProductAmount, "0.00")}" />
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">其他产品金额:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="number am-input" style="border-style:none;" data-validation-message="请输入其他产品金额"
name="ziguangOtherAmount" id="ziguangOtherAmount" placeholder="单位(元)" maxlength="16" value="${Utils.format(project.ziguangOtherAmount, "0.00")}" />
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目把握度:</span></th>
<td class="table-title" colspan="1" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="certainty" name="certainty">
<#if project.certainty??>
<option value="1" <#if project.certainty=1>selected</#if>>A项目成功率80%-100%</option>
<option value="2" <#if project.certainty=2>selected</#if>>B项目成功率60%-80%</option>
<option value="3" <#if project.certainty=3>selected</#if>>C项目成功率40%-60%</option>
<#else>
<option value="1" >A项目成功率40%-60%</option>
<option value="2" >B项目成功率40%-60%</option>
<option value="3" >C项目成功率40%-60%</option>
</#if>
</select>
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">行业场景应用:</span></th>
<td class="table-title" colspan="1" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="industryScene" name="industryScene">
<#if project.industryScene??>
<option value="1" <#if project.industryScene=1>selected</#if>>信息安全</option>
<option value="2" <#if project.industryScene=2>selected</#if>>政府</option>
<option value="3" <#if project.industryScene=3>selected</#if>>公安</option>
<option value="4" <#if project.industryScene=4>selected</#if>>企业</option>
<option value="5" <#if project.industryScene=5>selected</#if>>教育</option>
<option value="6" <#if project.industryScene=6>selected</#if>>交通</option>
<option value="7" <#if project.industryScene=7>selected</#if>>医疗</option>
<option value="8" <#if project.industryScene=8>selected</#if>>电力资源</option>
<option value="9" <#if project.industryScene=9>selected</#if>>运营商</option>
<option value="10" <#if project.industryScene=10>selected</#if>>金融</option>
<option value="11" <#if project.industryScene=11>selected</#if>>专网</option>
<option value="12" <#if project.industryScene=12>selected</#if>>其他</option>
<option value="13" <#if project.industryScene=13>selected</#if>>互联网</option>
<option value="14" <#if project.industryScene=14>selected</#if>>银行</option>
<#else>
<option value="1" >信息安全</option>
<option value="2" >政府</option>
<option value="3" >公安</option>
<option value="4" >企业</option>
<option value="5" >教育</option>
<option value="6" >交通</option>
<option value="7" >医疗</option>
<option value="8" >电力资源</option>
<option value="9" >运营商</option>
<option value="10" >金融</option>
<option value="11" >专网</option>
<option value="12" >其他</option>
<option value="13" >互联网</option>
<option value="14" >银行</option>
</#if>
</select>
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目解决方案:</span></th>
<td class="table-title" colspan="1" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="resolvePlan" name="resolvePlan">
<#if project.resolvePlan??>
<option value="1" <#if project.resolvePlan=1>selected</#if>>公共服务(智慧交通、雪亮工程、治安防控体系等)</option>
<option value="2" <#if project.resolvePlan=2>selected</#if>>泛行业(智慧园区、智慧医疗、智慧工地等)</option>
<option value="3" <#if project.resolvePlan=3>selected</#if>>其他生态</option>
<#else>
<option value="1" >公共服务(智慧交通、雪亮工程、治安防控体系等)</option>
<option value="2" >泛行业(智慧园区、智慧医疗、智慧工地等)</option>
<option value="3" >其他生态</option>
</#if>
</select>
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">客户名称:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="am-input" style="border-style:none;" data-validate-async data-validation-message="请输入客户名称1000字符以内"
name="customer" id="customer" placeholder="请输入客户名称1000字符以内" maxlength="1000"
value="${project.customer!}" />
</td>
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">最终用户名称:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="am-input" style="border-style:none;" data-validate-async data-validation-message="请输入最终用户名称1000字符以内"
name="terminalCustomer" id="terminalCustomer" placeholder="请输入最终用户名称1000字符以内" maxlength="1000"
value="${project.terminalCustomer!}" />
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">价值及风险:</span></th>
<td class="table-title" colspan="5" >
<textarea rows="5" cols="20" id="valueRisk" name="valueRisk" maxlength="1000"
class="am-input" style="border-style:none;" data-validate-async data-validation-message="请输入价值及风险"
placeholder="请输入价值及风险"
<textarea rows="5" cols="20" style="border-style:none;background-color: white;" disabled="disabled"
>${project.valueRisk!}</textarea>
</td>
</tr>
<#-- </table>-->
<#-- </div>-->
<#-- <!--验证表单元素validate end&ndash;&gt;-->
<#-- <div class="am-tab-panel am-fade am-in" id="tab2">-->
<#-- <table id="myTable" class="am-table am-table-bordered">-->
<#-- <tr class="am-text-nowrap">-->
<#-- <th class="table-title" colspan="6" style="text-align: center">项目立项(概算)其他信息</th>-->
<#-- <input type="hidden" style="border-style:none;" name="id" id="id" value="${id!}"/>-->
<#-- </tr>-->
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目负责人:</span></th>
<td class="table-title" colspan="1" >
<input type="text" id="principal" class="am-input" style="border-style:none;" data-validate-async data-validation-message="请输入项目负责人"
name="principal" placeholder="请输入项目负责人" maxlength="20"
value="${project.principal!}" />
</td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目负责人:</span></th>
<td class="table-title" colspan="1" ><input readonly value="${project.principal!}"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">预计合同签订时间:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="am-form-field am-input-sm" style="border-style:none;" id="contractTime"
name="contractTime" autocomplete="off"
value="${(project.contractTime?string("yyyy-MM-dd"))!}" placeholder="预计合同签订时间"
data-am-datepicker>
</td>
<td class="table-title" colspan="1" ><input readonly value="${(project.contractTime?string("yyyy-MM-dd"))!}"/></td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">项目计划招标时间:</span></th>
<td class="table-title" colspan="1" >
<input type="text" class="am-form-field am-input-sm" style="border-style:none;" id="bidsTime"
name="bidsTime" autocomplete="off"
value="${(project.bidsTime?string("yyyy-MM-dd"))!}" placeholder="项目计划招标时间"
data-am-datepicker>
</td>
<td class="table-title" colspan="1" ><input readonly value="${(project.bidsTime?string("yyyy-MM-dd"))!}"/></td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">是否二次合作:</span></th>
<td class="table-title" colspan="1" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="isSecond" name="isSecond">
<#if project.isSecond??>
<option value="-1" ></option>
<option value="1" <#if project.isSecond=1>selected</#if>>是</option>
<option value="2" <#if project.isSecond=2>selected</#if>>否</option>
<#else>
<option value="-1" ></option>
<option value="1" >是</option>
<option value="2" >否</option>
<#if project.isSecond??>
<#if (project.isSecond!) =1>
<input readonly value="是"/>
<#elseif (project.isSecond!) =2>
<input readonly value="否"/>
<#else >
<input readonly value=""/>
</#if>
</select>
<#else>
<input readonly value=""/>
</#if>
</td>
<th class="table-title" colspan="1" ><span style="font-size: 15px">直签:</span></th>
<td class="table-title" colspan="3" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="signType" name="signType">
<#if project.signType??>
<option value="-1" ></option>
<option value="1" <#if project.signType=1>selected</#if>>紫光汇智直接投标</option>
<#else>
<option value="-1" ></option>
<option value="1" >紫光汇智直接投标</option>
<#if project.signType??>
<#if (project.signType!) =1>
<input readonly value="紫光汇智直接投标"/>
<#else >
<input readonly value=""/>
</#if>
</select>
<#else>
<input readonly value=""/>
</#if>
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">主合同收款条款:</span></th>
<td class="table-title" colspan="5" >
<textarea rows="3" cols="20" id="mainContractCollectionTerms" name="mainContractCollectionTerms" maxlength="1000"
class="am-input" style="border-style:none;" data-validate-async data-validation-message="请输入收款条款"
placeholder="请输入收款条款"
<textarea rows="3" cols="20" style="border-style:none;background-color: white;" disabled="disabled"
>${project.mainContractCollectionTerms!}</textarea>
</td>
</tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">主合同具体解决方案:</span></th>
<td class="table-title" colspan="5" >
<textarea rows="3" cols="20" id="mainContractResolvePlan" name="mainContractResolvePlan" maxlength="1000"
class="am-input" style="border-style:none;" data-validate-async data-validation-message="请输入具体解决方案"
placeholder="请输入具体解决方案"
<textarea rows="3" cols="20" style="border-style:none;background-color: white;" disabled="disabled"
>${project.mainContractResolvePlan!}</textarea>
</td>
</tr>
</td> </tr>
<tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="font-size: 15px">计收计划:</span></th>
<td class="table-title" colspan="5" >
<textarea rows="3" cols="20" id="calculationCollection" name="calculationCollection" maxlength="1000"
class="am-input" style="border-style:none;" data-validate-async data-validation-message="按照开票金额及时间罗列计收计划"
placeholder="按照开票金额及时间罗列计收计划"
<textarea rows="3" cols="20" style="border-style:none;background-color: white;" disabled="disabled"
>${project.calculationCollection!}</textarea>
</td>
</tr>

View File

@ -0,0 +1,458 @@
<#assign base=request.contextPath />
<#import "../common/defaultLayout.ftl" as defaultLayout>
<@defaultLayout.layout>
<link rel="stylesheet" href="../assets/css/amazeui.switch.css"/>
<style type="text/css">
.huanhang{
// 表格自动换行
table-layout:fixed;
word-break:break-all
}
.focus{
// 表格自动换行
table-layout:fixed;
word-break:break-all
}
/*固定表头的列表*/
.fixed-list {
flex: 1 1 auto;
overflow: hidden;
}
.fixed-list table {
display: block;
width: 100%;
max-height: 100%;
border-spacing: 0px;
border-collapse: collapse;
border: none;
overflow-y: hidden;
overflow-x: auto;
margin: 0;
}
.fixed-list.is-vertical-scroll table tbody {
max-height: calc(100% - 71px);
}
.fixed-list table>thead>tr>th {
height: 40px;
text-align: center;
vertical-align: middle;
}
.fixed-list table td {
height: 55px;
text-align: center;
}
.fixed-list table tbody {
display: block;
width: 100%;
max-height: calc(100% - 45px);
overflow-y: scroll;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
.fixed-list table tr {
table-layout: fixed;
display: table;
}
.fixed-list table thead tr {
width: calc(100% - 18px);
border-top: 1px solid #ddd;
border-bottom: none;
}
.fixed-list table tbody tr {
width: 100%;
}
</style>
<div class="admin-content">
<div class="am-cf am-padding" style="padding:1rem 1.6rem 1.6rem 1rem;margin:0px;">
<!-- padding:1px 2px 3px 4px;上、右、下,和左 -->
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">商务应用</strong> /
<small>空间管理明细数据</small>
</div>
</div>
<div class="am-g">
<div class="am-u-sm-12">
<form class="am-form" id="listForm" action="${base}/project/list" method="POST">
<input type="hidden" id="keywords" name="keywords" value='${keywords!""}'/>
<input type="hidden" id="pageNumber" name="pageNumber" value='${pageNumber!}'/>
<input type="hidden" id="orderTypeStr" name="orderTypeStr" value='${orderTypeStr!""}'/>
<style>
.flex-row {
display: -webkit-box;
display: -webkit-flex;
display: flex;
display: -ms-flex;
}
.search-table {
position: relative;
width: 100%;
padding: 6px 0 0;
border: 1px solid #d8d8d8;
border-radius: 4px;
}
.search-table input {
border-color: #e6e6e6!important;
}
.search-table .st-row {
position: relative;
width: 100%;
justify-content: flex-start;
/*align-items: center;*/
padding: 0 6px 6px;
margin-bottom: 6px;
border-bottom: 1px solid #d8d8d8;
}
.search-table .tools-row {
position: relative;
width: 100%;
justify-content: flex-end;
padding-right: 6px;
margin-bottom: 6px;
}
.tools-row button {
margin-left: 12px;
}
/* 默认5等分一行5个 */
.st-row .st-col {
position: relative;
flex: 0 0 18%;
margin-right: 2%;
}
/* 4等分一行4个 */
.st-col.st-col-4 {
flex: 0 0 22%;
margin-right: 3%;
}
/* 3等分一行3个 */
.st-col.st-col-3 {
flex: 0 0 31%;
margin-right: 2.3%;
}
/* 2等分一行2个 */
.st-col.st-col-2 {
flex: 0 0 48%;
margin-right: 2%;
}
.st-col.hidden {
display: none;
}
.st-col .st-col-title {
font-size: 14px;
color: #333;
margin-bottom: 6px;
white-space: nowrap;
font-weight: bold;
}
.st-col .st-col-field {
align-items: center;
}
.st-col .mid-connect {
margin: 0 4px;
}
.expand-section {
display: block;
}
.expand-section.fold {
display: none;
}
</style>
<div class="search-table">
<!-- 第一行 -->
<div class="flex-row st-row">
<div class="st-col">
<div class="st-col-title">项目名称</div>
<div class="st-col-field">
<input type="text" id="name" class="am-form-field am-input-sm" value="${name!}"/>
</div>
</div>
<div class="st-col">
<div class="st-col-title">项目类型</div>
<div class="st-col-field">
<select data-am-selected="{btnSize: 'sm',btnWidth: '100%',maxHeight: 500,searchBox: 1}" id="type" name="type">
<option value="-1">全部</option>
<option value="1" <#if type?? && type='1'>selected</#if>>工程集成类</option>
<option value="2" <#if type?? && type='2'>selected</#if>>设备集成类</option>
</select>
</div>
</div>
<div class="st-col">
<div class="st-col-title">客户名称</div>
<div class="st-col-field">
<input type="text" id="customer" class="am-form-field am-input-sm" value="${customer!}"/>
</div>
</div>
<div class="st-col">
<div class="st-col-title">最终用户名称</div>
<div class="st-col-field">
<input type="text" id="terminalCustomer" class="am-form-field am-input-sm" value="${terminalCustomer!}"/>
</div>
</div>
</div>
<!-- 第二行 -->
<div class="flex-row st-row">
<div class="st-col">
<div class="st-col-title">项目负责人</div>
<div class="st-col-field">
<input type="text" id="principal" class="am-form-field am-input-sm" value="${principal!}"/>
</div>
</div>
<div class="st-col">
<div class="st-col-title">审核状态</div>
<div class="st-col-field">
<select data-am-selected="{btnSize: 'sm',btnWidth: '100%',maxHeight: 500,searchBox: 1}" id="approveStatus" name="approveStatus">
<option value="-1">全部</option>
<option value="0" <#if approveStatus?? && approveStatus='0'>selected</#if>>草稿</option>
<option value="1" <#if approveStatus?? && approveStatus='1'>selected</#if>>待审核</option>
<option value="2" <#if approveStatus?? && approveStatus='2'>selected</#if>>审核通过</option>
<option value="3" <#if approveStatus?? && approveStatus='3'>selected</#if>>审核不通过</option>
</select>
</div>
</div>
<div class="st-col">
<div class="st-col-title">是否二次合作</div>
<div class="st-col-field">
<select data-am-selected="{btnSize: 'sm',btnWidth: '100%',maxHeight: 500}" id="isSecond" name="isSecond">
<option value="-1">全部</option>
<option value="1" <#if isSecond?? && isSecond='1'>selected</#if>>是</option>
<option value="2" <#if isSecond?? && isSecond='2'>selected</#if>>否</option>
</select>
</div>
</div>
<div class="st-col">
<div class="st-col-title">项目解决方案</div>
<div class="st-col-field">
<select data-am-selected="{btnSize: 'sm',btnWidth: '100%',maxHeight: 500}" id="resolvePlan" name="resolvePlan">
<option value="-1">全部</option>
<option value="1" <#if resolvePlan?? && resolvePlan='1'>selected</#if>>公共服务(智慧交通、雪亮工程、治安防控体系等)</option>
<option value="2" <#if resolvePlan?? && resolvePlan='2'>selected</#if>>泛行业(智慧园区、智慧医疗、智慧工地等)</option>
<option value="3" <#if resolvePlan?? && resolvePlan='3'>selected</#if>>其他生态</option>
</select>
</div>
</div>
</div>
<!-- 第三行 -->
<div class="flex-row st-row">
<div class="st-col st-col-4">
<div class="st-col-title">项目周期</div>
<div class="flex-row st-col-field">
<div class="am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="startDate"
value="${startDate!}" placeholder="开始日期" autocomplete="off" data-am-datepicker>
</div>
<div class="mid-connect">至</div>
<div class="am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="endDate"
value="${endDate!}" placeholder="结束日期" autocomplete="off" data-am-datepicker>
</div>
</div>
</div>
<div class="st-col st-col-4">
<div class="st-col-title">预计合同签订时间</div>
<div class="flex-row st-col-field">
<div class="am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="contractStartTime"
value="${contractStartTime!}" placeholder="开始日期" autocomplete="off" data-am-datepicker>
</div>
<div class="mid-connect">至</div>
<div class="am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="contractEndTime"
value="${contractEndTime!}" placeholder="结束日期" autocomplete="off" data-am-datepicker>
</div>
</div>
</div>
</div>
<div class="flex-row tools-row">
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
id="submit-btn">搜索
</button>
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
id="submit-btn-export">导出
</button>
</div>
</div>
</form>
</div>
</div>
<div class="am-g fixed-list is-vertical-scroll">
<div class="am-u-sm-12">
<div class="list-content">
<style>
td {
word-break: break-all;
}
</style>
<table class="am-table am-table-striped am-table-hover table-main">
<thead style="display:block;width: 4200px;">
<tr class="am-text-nowrap">
<th class="table-title" width="60px">序号</th>
<th class="table-title" width="120px">项目编号</th>
<th class="table-title" width="480px">项目名称</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">客户名称</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>
</tr>
</thead>
<tbody style="display:block;width: 4200px;">
<#list pager.list as list>
<tr>
<td width="60px">${list.tempId!}</td>
<td class="huanhang" width="120px">${list.projectNo!}</td>
<td class="huanhang" width="480px"><a style="cursor: pointer;text-decoration:none" onclick="approve(${list.id})">${list.name!}</a></td>
<td>${list.typeDesc!}</td>
<td>${list.underwrittenModeStr!}</td>
<td>${Utils.format(list.advanceInterestAmount, "0.00")}</td>
<td>${Utils.format(list.advancePeakAmount, "0.00")}</td>
<td>${Utils.format(list.contractAmount, "0.00")}</td>
<td>${Utils.format(list.grossProfit, "0.00")}</td>
<td>${Utils.format(list.grossProfitMargin, "0.00")}</td>
<td>${list.certaintyStr!}</td>
<td>${Utils.format(list.huizhiProductAmount, "0.00")}</td>
<td>${Utils.format(list.huazhiProductAmount, "0.00")}</td>
<td>${Utils.format(list.huasanProductAmount, "0.00")}</td>
<td>${Utils.format(list.ziguangOtherAmount, "0.00")}</td>
<td>${list.statusDesc!}</td>
<td>${list.industryScenario!}</td>
<td>${list.resolvePlanStr!}</td>
<td>${list.customer!}</td>
<td>${list.terminalCustomer!}</td>
<td>${(list.contractTime?string("yyyy-MM-dd"))!}</td>
<td>${(list.bidsTime?string("yyyy-MM-dd"))!}</td>
<td>${list.isSecondStr!}</td>
<td>${list.signTypeStr!}</td>
<td>${list.collaborator!}</td>
<td>${list.principal!}</td>
<td>${list.approveStatusDesc!}</td>
<td>${list.approveName!}</td>
<td>${list.creatorName!}</td>
<td>${list.deptName!}</td>
<td>${(list.startDate?string("yyyy-MM"))!} ~ ${(list.endDate?string("yyyy-MM"))!}</td>
<td>${(list.lastUpdateTime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
</tr>
</#list>
</tbody>
</table>
</div>
</div>
</div>
<footer class="admin-content-footer">
<div class="am-cf">
<!-- 分页 -->
<#if (pager.list)?exists && (pager.list?size>0) >
<div class="am-fr">
<#include "../common/project_pager.ftl">
</div>
<#else>
<div class="am-kai" align="center">
<h3>没有找到任何记录!</h3>
</div>
</#if>
</div>
</footer>
</div>
</@defaultLayout.layout>
<script type="text/javascript" src="../modal/js/modal.js"></script>
<script src="../assets/js/amazeui.switch.js"></script>
<script src="${base}/assets/js/project_common.js"></script>
<script type="text/javascript">
var approve = function (id) {
var pageNumber = $("#pageNumber").val();
var keywords = $("#keywords").val();
keywords = keywords.replace(/\{/g, '%7b').replace(/\}/g, '%7d');
console.log("keywords: " + keywords);
location.href = '${base}/project/approve?listFrom=list&type=1&id=' + id + '&pageNumber=' + pageNumber + '&keywords=' + keywords;
};
$(function () {
$("#submit-btn").on("click", function () {
$("#pageNumber").val(1);
setKeywords();
$("#listForm").attr("action","${base}/space/list");
$("#listForm").submit();
});
$("#submit-btn-export").on("click", function () {
setKeywords();
$("#listForm").attr("action","${base}/space/export");
$("#listForm").submit();
});
function setKeywords() {
var keywordsObj = {};
var extend = $("#extend").val();
keywordsObj.extend = extend;
if ($("#name").val())
keywordsObj.name = $("#name").val();
if ($("#type").val())
keywordsObj.type = $("#type").val();
if ($("#customer").val())
keywordsObj.customer = $("#customer").val();
if ($("#terminalCustomer").val())
keywordsObj.terminalCustomer = $("#terminalCustomer").val();
if ($("#principal").val())
keywordsObj.principal = $("#principal").val();
if ($("#approveStatus").val())
keywordsObj.approveStatus = $("#approveStatus").val();
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 ($("#contractStartTime").val())
keywordsObj.contractStartTime = $("#contractStartTime").val();
if ($("#contractEndTime").val())
keywordsObj.contractEndTime = $("#contractEndTime").val();
var keywords = "";
if (!$.isEmptyObject(keywordsObj)) {
keywords = JSON.stringify(keywordsObj);
}
console.log("keywords = " + keywords);
$("#keywords").val(keywords);
}
});
</script>

View File

@ -0,0 +1,221 @@
<#assign base=request.contextPath />
<#import "../common/defaultLayout.ftl" as defaultLayout>
<@defaultLayout.layout>
<link rel="stylesheet" href="../assets/css/amazeui.switch.css"/>
<div class="admin-content">
<div class="admin-content-body">
<div class="am-cf am-padding">
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">商务信息管理</strong> /
<small>空间管理</small></div>
</div>
<div class="am-u-sm-12 am-u-md-12" style="padding:0 1.6rem 1.6rem 1rem;margin:0;">
<form class="am-form" id="listForm" action="#" method="POST">
<input type="hidden" id="keywords" name="keywords" value='${keywords!""}'/>
<div class="am-btn-toolbar" style="padding-left:.5rem;">
<div class="am-btn-group am-btn-group-xs">
<div class="am-btn-group am-btn-group-xs am-form-file">
<div id="chartmain" style="width:1000px; height: 600px;margin:20px auto"></div>
<div id="chartmain2" style="width:1000px; height: 600px;margin:20px auto"></div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</@defaultLayout.layout>
<script src="${base}/assets/js/echarts.min.js"></script>
<script src="${base}/layui/layui.js"></script>
<script type="text/javascript">
const colors = ['#5470C6', '#91CC75', '#EE6666'];
var domOption = {
title: {
text: '项目数量',
subtext: '',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left'
},
color:[colors[0], colors[1], colors[2]],
sum: 0,
graphic: {
type: 'text',
left: 'center',
//left: '37%',
top: 'center',
style: {
text:
'项目总数' +
'\n\n' +
String(this.sum).replace(/(\d)(?=(?:\d{6})+$)/g, '$1.'),
textAlign: 'center',
fill: '#333',
width: 30,
height: 30,
fontSize: 14
}
},
series: [
{
name: '把握度',
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: true,
data: [],
label: {
normal: {
formatter: '{b}:{d}%'
}
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
var option = {
title: {
text: '项目金额及平均毛利率情况'
},
tooltip: {
trigger: 'axis'
},
color:[colors[0], colors[1]],
xAxis: {
type: 'category',
name: '项目把握度',
axisLabel: {
interval:0
},
data: []
},
yAxis: [
{
type: 'value',
name: '元',
position: 'left',
alignTicks: true,
axisLine: {
show: true,
lineStyle: {
color: colors[0]
}
},
axisLabel: {
formatter: '{value}'
},
minInterval: 1,
max: function(value) {
return value.max + 5;
}
},
{
type: 'value',
name: '%',
position: 'right',
alignTicks: true,
axisLine: {
show: true,
lineStyle: {
color: colors[1]
}
},
axisLabel: {
formatter: '{value}'
},
minInterval: 1,
max: function(value) {
return value.max + 5;
}
}
],
series: [
{
type: 'bar',
yAxisIndex: 0,
data: []
},
{
type: 'bar',
yAxisIndex: 1,
data: []
}
]
};
window.onload = function(){
loadDate(domOption, option);
};
//初始化echarts实例
var myChart = echarts.init(document.getElementById('chartmain'));
var myChart2 = echarts.init(document.getElementById('chartmain2'));
function loadDate(domOption, option){
$.ajax({
url : "${base}/space/listData",
dataType : "json",
type : "post",
async:false,
success : function(data){
var list = data.list;
$.each(list, function (index, value) {
option.xAxis.data.push(value.columns.name);
});
$.each(list, function (index, value) {
option.series[0].data.push(value.columns.sum);
});
$.each(list, function (index, value) {
option.series[1].data.push(value.columns.average);
});
var map = data.map;
$.each(map, function (index, value) {
domOption.series[0].data.push({"value":value.columns.sum,"name":value.columns.name,"id":value.columns.certainty});
domOption.sum += value.columns.sum;
});
domOption.graphic.style.text = '项目总数\n\n' + String(domOption.sum).replace(/(\d)(?=(?:\d{6})+$)/g, '$1.');
myChart.setOption(domOption);
myChart2.setOption(option);
},
error : function(msg) { // 若Ajax处理失败后回调函数msg是返回的错误信息
console.log(msg);
}
});
}
myChart.on('click', function (param) {
var certainty = param.data.id;
window.location.href = "${base}/space/list?certainty=" + certainty;
});
</script>