Merge remote-tracking branch 'origin/master'
commit
f95d2329c8
|
@ -133,31 +133,86 @@ public class FinalBean {
|
|||
*/
|
||||
private BigDecimal grossProfitFinalTotal;
|
||||
|
||||
public BigDecimal getGrossProfitFinalTotal() {
|
||||
BigDecimal incomeTotal = getIncomeTotal();
|
||||
BigDecimal costTotal = getCostTotal();
|
||||
BigDecimal costExpropriationFinalTotal = getCostExpropriationFinalTotal();
|
||||
return incomeTotal.subtract(costTotal).subtract(costExpropriationFinalTotal);
|
||||
}
|
||||
|
||||
public void setGrossProfitFinalTotal(BigDecimal grossProfitFinalTotal) {
|
||||
this.grossProfitFinalTotal = grossProfitFinalTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目毛利利润率
|
||||
*/
|
||||
private BigDecimal grossProfitProfitMargin;
|
||||
|
||||
public BigDecimal getGrossProfitProfitMargin() {
|
||||
return grossProfitProfitMargin;
|
||||
}
|
||||
|
||||
public void setGrossProfitProfitMargin(BigDecimal grossProfitProfitMargin) {
|
||||
this.grossProfitProfitMargin = grossProfitProfitMargin;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目贡献利润决算总额
|
||||
*/
|
||||
private BigDecimal contributionMarginFinalTotal;
|
||||
|
||||
public BigDecimal getContributionMarginFinalTotal() {
|
||||
BigDecimal grossProfitFinalTotal = getGrossProfitFinalTotal();
|
||||
BigDecimal costCompanyManageFinalTotal = getCostCompanyManageFinalTotal();
|
||||
return grossProfitFinalTotal.subtract(costCompanyManageFinalTotal);
|
||||
}
|
||||
|
||||
public void setContributionMarginFinalTotal(BigDecimal contributionMarginFinalTotal) {
|
||||
this.contributionMarginFinalTotal = contributionMarginFinalTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目贡献利润利润率
|
||||
*/
|
||||
private BigDecimal contributionMarginProfitMargin;
|
||||
|
||||
public BigDecimal getContributionMarginProfitMargin() {
|
||||
return contributionMarginProfitMargin;
|
||||
}
|
||||
|
||||
public void setContributionMarginProfitMargin(BigDecimal contributionMarginProfitMargin) {
|
||||
this.contributionMarginProfitMargin = contributionMarginProfitMargin;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目净利润决算总额
|
||||
*/
|
||||
private BigDecimal netMarginFinalTotal;
|
||||
|
||||
public BigDecimal getNetMarginFinalTotal() {
|
||||
BigDecimal contributionMarginFinalTotal = getContributionMarginFinalTotal();
|
||||
BigDecimal costIncomeTaxFinalTotal = getCostIncomeTaxFinalTotal();
|
||||
return contributionMarginFinalTotal.subtract(costIncomeTaxFinalTotal);
|
||||
}
|
||||
|
||||
public void setNetMarginFinalTotal(BigDecimal netMarginFinalTotal) {
|
||||
this.netMarginFinalTotal = netMarginFinalTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目净利润利润率
|
||||
*/
|
||||
private BigDecimal netMarginProfitMargin;
|
||||
|
||||
public BigDecimal getNetMarginProfitMargin() {
|
||||
return netMarginProfitMargin;
|
||||
}
|
||||
|
||||
public void setNetMarginProfitMargin(BigDecimal netMarginProfitMargin) {
|
||||
this.netMarginProfitMargin = netMarginProfitMargin;
|
||||
}
|
||||
|
||||
//========================结算现金流量表================================
|
||||
|
||||
/**
|
||||
|
@ -189,6 +244,28 @@ public class FinalBean {
|
|||
* g=a+c+b-d-f-e
|
||||
*/
|
||||
private BigDecimal netCashFlow;
|
||||
|
||||
public BigDecimal getNetCashFlow() {
|
||||
|
||||
BigDecimal saleIncomeCash = getSaleIncomeCash();
|
||||
BigDecimal taxReturn = getTaxReturn();
|
||||
BigDecimal earnestMoneyIncome = getEarnestMoneyIncome();
|
||||
BigDecimal purchaseCost = getPurchaseCost();
|
||||
BigDecimal taxCost = getTaxCost();
|
||||
BigDecimal earnestMoneyCost = getEarnestMoneyCost();
|
||||
|
||||
return saleIncomeCash
|
||||
.add(taxReturn)
|
||||
.add(earnestMoneyIncome)
|
||||
.subtract(purchaseCost)
|
||||
.subtract(taxCost)
|
||||
.subtract(earnestMoneyCost);
|
||||
}
|
||||
|
||||
public void setNetCashFlow(BigDecimal netCashFlow) {
|
||||
this.netCashFlow = netCashFlow;
|
||||
}
|
||||
|
||||
/**
|
||||
* h投资活动现金流入
|
||||
*/
|
||||
|
@ -214,12 +291,36 @@ public class FinalBean {
|
|||
* m=k-l
|
||||
*/
|
||||
private BigDecimal financingCapitalCashflow;
|
||||
|
||||
public BigDecimal getFinancingCapitalCashflow() {
|
||||
BigDecimal financingCapitalInflow = getFinancingCapitalInflow();
|
||||
BigDecimal financingCapitalOutflow = getFinancingCapitalOutflow();
|
||||
return financingCapitalInflow.subtract(financingCapitalOutflow);
|
||||
}
|
||||
|
||||
public void setFinancingCapitalCashflow(BigDecimal financingCapitalCashflow) {
|
||||
this.financingCapitalCashflow = financingCapitalCashflow;
|
||||
}
|
||||
|
||||
/**
|
||||
* n货币资金净增加额
|
||||
* n=g+j+m
|
||||
*/
|
||||
private BigDecimal netIncreaseMonetaryFunds;
|
||||
|
||||
public BigDecimal getNetIncreaseMonetaryFunds() {
|
||||
BigDecimal netCashFlow = getNetCashFlow();
|
||||
BigDecimal netCashFromInvestingActivities = getNetCashFromInvestingActivities();
|
||||
BigDecimal financingCapitalCashflow = getFinancingCapitalCashflow();
|
||||
return netCashFlow
|
||||
.add(netCashFromInvestingActivities)
|
||||
.add(financingCapitalCashflow);
|
||||
}
|
||||
|
||||
public void setNetIncreaseMonetaryFunds(BigDecimal netIncreaseMonetaryFunds) {
|
||||
this.netIncreaseMonetaryFunds = netIncreaseMonetaryFunds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有现金流量决算总额
|
||||
* @return
|
||||
|
@ -349,54 +450,6 @@ public class FinalBean {
|
|||
this.costIncomeTaxFinalTotal = costIncomeTaxFinalTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossProfitFinalTotal() {
|
||||
return grossProfitFinalTotal;
|
||||
}
|
||||
|
||||
public void setGrossProfitFinalTotal(BigDecimal grossProfitFinalTotal) {
|
||||
this.grossProfitFinalTotal = grossProfitFinalTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossProfitProfitMargin() {
|
||||
return grossProfitProfitMargin;
|
||||
}
|
||||
|
||||
public void setGrossProfitProfitMargin(BigDecimal grossProfitProfitMargin) {
|
||||
this.grossProfitProfitMargin = grossProfitProfitMargin;
|
||||
}
|
||||
|
||||
public BigDecimal getContributionMarginFinalTotal() {
|
||||
return contributionMarginFinalTotal;
|
||||
}
|
||||
|
||||
public void setContributionMarginFinalTotal(BigDecimal contributionMarginFinalTotal) {
|
||||
this.contributionMarginFinalTotal = contributionMarginFinalTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getContributionMarginProfitMargin() {
|
||||
return contributionMarginProfitMargin;
|
||||
}
|
||||
|
||||
public void setContributionMarginProfitMargin(BigDecimal contributionMarginProfitMargin) {
|
||||
this.contributionMarginProfitMargin = contributionMarginProfitMargin;
|
||||
}
|
||||
|
||||
public BigDecimal getNetMarginFinalTotal() {
|
||||
return netMarginFinalTotal;
|
||||
}
|
||||
|
||||
public void setNetMarginFinalTotal(BigDecimal netMarginFinalTotal) {
|
||||
this.netMarginFinalTotal = netMarginFinalTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getNetMarginProfitMargin() {
|
||||
return netMarginProfitMargin;
|
||||
}
|
||||
|
||||
public void setNetMarginProfitMargin(BigDecimal netMarginProfitMargin) {
|
||||
this.netMarginProfitMargin = netMarginProfitMargin;
|
||||
}
|
||||
|
||||
public BigDecimal getSaleIncomeCash() {
|
||||
return saleIncomeCash;
|
||||
}
|
||||
|
@ -485,27 +538,5 @@ public class FinalBean {
|
|||
this.financingCapitalOutflow = financingCapitalOutflow;
|
||||
}
|
||||
|
||||
public BigDecimal getFinancingCapitalCashflow() {
|
||||
return financingCapitalCashflow;
|
||||
}
|
||||
|
||||
public void setFinancingCapitalCashflow(BigDecimal financingCapitalCashflow) {
|
||||
this.financingCapitalCashflow = financingCapitalCashflow;
|
||||
}
|
||||
|
||||
public BigDecimal getNetIncreaseMonetaryFunds() {
|
||||
return netIncreaseMonetaryFunds;
|
||||
}
|
||||
|
||||
public void setNetIncreaseMonetaryFunds(BigDecimal netIncreaseMonetaryFunds) {
|
||||
this.netIncreaseMonetaryFunds = netIncreaseMonetaryFunds;
|
||||
}
|
||||
|
||||
public BigDecimal getNetCashFlow() {
|
||||
return netCashFlow;
|
||||
}
|
||||
|
||||
public void setNetCashFlow(BigDecimal netCashFlow) {
|
||||
this.netCashFlow = netCashFlow;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,14 +58,14 @@ public class HumanCostController extends BaseController{
|
|||
Map<String, Object> model) {
|
||||
//当前登录人的角色类型
|
||||
Admin admin = getAdmin();
|
||||
int roleId = admin.getRoleId();
|
||||
int roleLevel = admin.getRoleLevel();
|
||||
List<Project> selfProjects = projectRepository.findByCreator(admin.getId(), new Date());
|
||||
if (roleId <= 18) {
|
||||
if (roleLevel <= 2 || roleLevel == 4) {
|
||||
model.put("deptVary", 1);
|
||||
model.put("deptList", deptRepository.findAll());
|
||||
model.put("projectList", projectRepository.findAll());
|
||||
model.put("showSalary", 1);
|
||||
} else if (roleId <= 20) {
|
||||
} else if (roleLevel == 3) {
|
||||
model.put("deptVary", -1);
|
||||
model.put("deptList", new ArrayList<>());
|
||||
model.put("projectList", projectRepository.findByDeptId(admin.getDeptId()));
|
||||
|
@ -140,14 +140,12 @@ public class HumanCostController extends BaseController{
|
|||
*/
|
||||
@RequestMapping("/template")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
String[] headers = new String[]{"项目名称", "人员1", "人员2"};
|
||||
String[] columns = new String[]{""};
|
||||
downloadHeader(response , Utils.generateExcelName("人力成本导入模板"));
|
||||
ExportUtils exportUtils = new ExportUtils(headers);
|
||||
List<String> data = new ArrayList<>();
|
||||
data.add("成本");
|
||||
data.add("项目1");
|
||||
data.add("项目2");
|
||||
String[] headers = humanCostService.template(data);
|
||||
ExportUtils exportUtils = new ExportUtils(headers);
|
||||
exportUtils.exportTemplate(columns , data, "yyyy-MM-dd HH:mm:ss" , 1);
|
||||
exportUtils.write(response.getOutputStream());
|
||||
}
|
||||
|
|
|
@ -376,6 +376,7 @@ public class ProjectController extends BaseController {
|
|||
Project project = projectService.getProject(id);
|
||||
EstimateBean estimateBean = projectEstimateService.getEstimate(project);
|
||||
model.put("estimateBean", estimateBean);
|
||||
model.put("adminId", InterfaceUtil.getAdminId());
|
||||
model.put("project", project);
|
||||
model.put("formerBean", projectSettleService.getFormerSettle(project, time));
|
||||
model.put("monthBean", projectSettleService.getMonthSettle(project, time));
|
||||
|
@ -403,6 +404,8 @@ public class ProjectController extends BaseController {
|
|||
model.put("finalBean", projectFinalSevice.getFinal(project));
|
||||
//freemarker可以利用的静态方法
|
||||
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
|
||||
List<ProjectTaskRecord> list = projectTaskRecordService.list(id);
|
||||
model.put("taskRecords", list);
|
||||
return "admin/project_approve";
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,11 @@ public class ProjectFinalController extends BaseController{
|
|||
public String add(@RequestParam("id") int id, Map<String, Object> model) {
|
||||
Project project = projectService.getProject(id);
|
||||
ProjectSettleIncome projectSettleIncome = projectSettleIncomeRepository.findNewByProjectId(id);
|
||||
String time = projectSettleIncome.getTime();
|
||||
String time = "";
|
||||
if(null != projectSettleIncome){
|
||||
time = projectSettleIncome.getTime();
|
||||
}
|
||||
|
||||
List<ProjectBudgetPlanDetail> projectBudgetPlanDetails = projectBudgetService.getProjectBudgetPlanDetails(project);
|
||||
model.put("project", project);
|
||||
model.put("estimateBean", projectEstimateService.getEstimate(project));
|
||||
|
|
|
@ -4,10 +4,7 @@ import cn.palmte.work.bean.BudgetSettleBean;
|
|||
import cn.palmte.work.bean.EstimateSettleBean;
|
||||
import cn.palmte.work.bean.FormerBean;
|
||||
import cn.palmte.work.bean.SettleBean;
|
||||
import cn.palmte.work.model.Project;
|
||||
import cn.palmte.work.model.ProjectBudgetPlanDetail;
|
||||
import cn.palmte.work.model.ProjectSettleIncome;
|
||||
import cn.palmte.work.model.ProjectSettleIncomeRepository;
|
||||
import cn.palmte.work.model.*;
|
||||
import cn.palmte.work.service.ProjectBudgetService;
|
||||
import cn.palmte.work.service.ProjectEstimateService;
|
||||
import cn.palmte.work.service.ProjectService;
|
||||
|
@ -18,7 +15,9 @@ 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 top.jfunc.common.utils.CollectionUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -48,8 +47,12 @@ public class ProjectSettleController extends BaseController{
|
|||
@Autowired
|
||||
private ProjectSettleIncomeRepository projectSettleIncomeRepository;
|
||||
|
||||
@Autowired
|
||||
private ProjectUserTimeRepository projectUserTimeRepository;
|
||||
|
||||
@RequestMapping("/add")
|
||||
public String add(@RequestParam("id") int id, Map<String, Object> model) {
|
||||
String time = null;
|
||||
Project project = projectService.getProject(id);
|
||||
List<ProjectBudgetPlanDetail> projectBudgetPlanDetails = projectBudgetService.getProjectBudgetPlanDetails(project);
|
||||
ProjectSettleIncome projectSettleIncome = projectSettleIncomeRepository.findNewByProjectId(id);
|
||||
|
@ -60,11 +63,11 @@ public class ProjectSettleController extends BaseController{
|
|||
instance.setTime(date);
|
||||
instance.set(Calendar.MONTH, instance.get(Calendar.MONTH) + 1);
|
||||
Date current = instance.getTime();
|
||||
String time = DateKit.toStr(current, DateKit.DATE_FORMAT_YEAR_MONTH2);
|
||||
time = DateKit.toStr(current, DateKit.DATE_FORMAT_YEAR_MONTH2);
|
||||
model.put("time", time);
|
||||
model.put("formerBean", projectSettleService.getFormerSettle(project, time));
|
||||
} else {
|
||||
String time = DateKit.toStr(project.getStartDate(), DateKit.DATE_FORMAT_YEAR_MONTH2);
|
||||
time = DateKit.toStr(project.getStartDate(), DateKit.DATE_FORMAT_YEAR_MONTH2);
|
||||
|
||||
model.put("time", time);
|
||||
model.put("formerBean", new FormerBean());
|
||||
|
@ -73,7 +76,13 @@ public class ProjectSettleController extends BaseController{
|
|||
model.put("project", project);
|
||||
model.put("estimateBean", projectEstimateService.getEstimate(project));
|
||||
model.put("budgetBean", projectBudgetService.getBudget(project));
|
||||
|
||||
List<ProjectUserTime> projectUserTimes = projectUserTimeRepository.findByProjectIdAndTime(project.getId(), time);
|
||||
if(CollectionUtil.isNotEmpty(projectUserTimes)){
|
||||
BigDecimal result = projectUserTimes.stream().map((ProjectUserTime t) -> t.getUserCost().multiply(t.getUserSalary())).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
model.put("salary", result);
|
||||
} else {
|
||||
model.put("salary", new BigDecimal(0));
|
||||
}
|
||||
//现金表
|
||||
model.put("cashFlowBean", projectBudgetService.getCashFlowBean(project, projectBudgetPlanDetails));
|
||||
//freemarker可以利用的静态方法
|
||||
|
@ -94,6 +103,13 @@ public class ProjectSettleController extends BaseController{
|
|||
model.put("formerBean", projectSettleService.getFormerSettle(project, time));
|
||||
model.put("monthBean", projectSettleService.getMonthSettle(project, time));
|
||||
model.put("currentBean", projectSettleService.getCurrentSettle(project, time));
|
||||
List<ProjectUserTime> projectUserTimes = projectUserTimeRepository.findByProjectIdAndTime(project.getId(), time);
|
||||
if(CollectionUtil.isNotEmpty(projectUserTimes)){
|
||||
BigDecimal result = projectUserTimes.stream().map((ProjectUserTime t) -> t.getUserCost().multiply(t.getUserSalary())).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
model.put("salary", result);
|
||||
} else {
|
||||
model.put("salary", new BigDecimal(0));
|
||||
}
|
||||
//现金表
|
||||
model.put("cashFlowBean", projectBudgetService.getCashFlowBean(project, projectBudgetPlanDetails));
|
||||
//freemarker可以利用的静态方法
|
||||
|
|
|
@ -53,8 +53,7 @@ public class ProjectSummaryController extends BaseController {
|
|||
} else {
|
||||
time = searchInfo.get("time");
|
||||
}
|
||||
|
||||
List<SettleBean> list = projectSummaryService.getList(searchInfo, time);
|
||||
List<SettleBean> list = projectSummaryService.getList(searchInfo, time, admin);
|
||||
model.put("pager", list);
|
||||
|
||||
return "admin/project_statistics";
|
||||
|
|
|
@ -5,6 +5,7 @@ import org.springframework.data.jpa.repository.Modifying;
|
|||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -20,6 +21,9 @@ public interface ProjectUserTimeRepository extends JpaRepository<ProjectUserTime
|
|||
@Query(value = "select * from project_user_time where time = ?1", nativeQuery = true)
|
||||
List<ProjectUserTime> findAllByTime(String time);
|
||||
|
||||
@Query(value = "select * from project_user_time where project_id = ?1 and time = ?2", nativeQuery = true)
|
||||
List<ProjectUserTime> findByProjectIdAndTime(int projectId, String time);
|
||||
|
||||
@Modifying
|
||||
@Query(value = "delete from project_user_time where time = ?1", nativeQuery = true)
|
||||
int deleteByTime(String date);
|
||||
|
|
|
@ -163,39 +163,49 @@ public class ActProcInsService {
|
|||
|
||||
public void createProcInsPng(HttpServletResponse response, String procInsId) throws IOException {
|
||||
try {
|
||||
//获取历史流程实例
|
||||
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(procInsId).singleResult();
|
||||
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(procInsId).singleResult(); //获取历史流程实例
|
||||
//获取流程中已经执行的节点,按照执行先后顺序排序
|
||||
List<HistoricActivityInstance> hai = historyService.createHistoricActivityInstanceQuery().processInstanceId(procInsId).orderByHistoricActivityInstanceStartTime().asc().list();
|
||||
//开始和结束事件
|
||||
List<HistoricActivityInstance> startEndEventList = new ArrayList<>();
|
||||
List<HistoricActivityInstance> activityInstanceList = new ArrayList<>();
|
||||
|
||||
if (hai != null && !hai.isEmpty()) {
|
||||
for (HistoricActivityInstance historicActivityInstance : hai) {
|
||||
// 历史流程节点中
|
||||
List<HistoricActivityInstance> newHisActInstanceList = new ArrayList<HistoricActivityInstance>();
|
||||
List<HistoricActivityInstance> newHisTaskInstanceList = new ArrayList<HistoricActivityInstance>();
|
||||
if (hai != null && hai.size() > 0) {
|
||||
for (int i = 0; i < hai.size(); i++) {
|
||||
HistoricActivityInstance historicActivityInstance = hai.get(i);
|
||||
String activityType = historicActivityInstance.getActivityType();
|
||||
|
||||
if (activityType.equals("startEvent") || activityType.equals("endEvent")) {
|
||||
startEndEventList.add(historicActivityInstance);
|
||||
newHisActInstanceList.add(historicActivityInstance);
|
||||
} else if (activityType.equals("serviceTask") || activityType.equals("userTask") || activityType.equals("exclusiveGateway") || activityType.equals("parallelGateway")) {
|
||||
List<String> collect = activityInstanceList.stream().map(HistoricActivityInstance::getActivityId).collect(Collectors.toList());
|
||||
if (collect.contains(historicActivityInstance.getActivityId())) {
|
||||
//情况已经执行任务 处理驳回的情况
|
||||
activityInstanceList.clear();
|
||||
if (newHisTaskInstanceList.size() > 0) {
|
||||
for (int j = 0; j < newHisTaskInstanceList.size(); j++) {
|
||||
HistoricActivityInstance historicTaskInstance = newHisTaskInstanceList.get(j);
|
||||
if (historicTaskInstance.getActivityId().equals(historicActivityInstance.getActivityId())) { //如果列表中已包括
|
||||
newHisTaskInstanceList.clear();
|
||||
newHisTaskInstanceList.add(historicActivityInstance);
|
||||
break;
|
||||
} else {
|
||||
newHisTaskInstanceList.add(historicActivityInstance);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
newHisTaskInstanceList.add(historicActivityInstance);
|
||||
}
|
||||
|
||||
activityInstanceList.add(historicActivityInstance);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < newHisActInstanceList.size(); i++) {
|
||||
HistoricActivityInstance historicActivityInstance = newHisActInstanceList.get(i);
|
||||
newHisTaskInstanceList.add(historicActivityInstance);
|
||||
}
|
||||
|
||||
activityInstanceList.addAll(startEndEventList);
|
||||
|
||||
List<String> executedActivityIdList = new ArrayList<String>(); // 构造已执行的节点ID集合
|
||||
for (HistoricActivityInstance activityInstance : newHisTaskInstanceList) {
|
||||
executedActivityIdList.add(activityInstance.getActivityId());
|
||||
}
|
||||
BpmnModel bpmnModel = repositoryService.getBpmnModel(historicProcessInstance.getProcessDefinitionId()); // 获取bpmnModel
|
||||
List<String> flowIds = this.getExecutedFlows(bpmnModel, activityInstanceList); // 获取流程已发生流转的线ID集合
|
||||
|
||||
List<String> idList = activityInstanceList.stream().map(HistoricActivityInstance::getActivityId).collect(Collectors.toList());
|
||||
actUtil.responsePng(response, bpmnModel, idList, flowIds);
|
||||
List<String> flowIds = this.getExecutedFlows(bpmnModel, newHisTaskInstanceList); // 获取流程已发生流转的线ID集合
|
||||
actUtil.responsePng(response, bpmnModel, executedActivityIdList, flowIds);
|
||||
} catch (Exception e) {
|
||||
logger.error("an exception happens in try catch statement", e);
|
||||
}
|
||||
|
@ -203,31 +213,35 @@ public class ActProcInsService {
|
|||
}
|
||||
|
||||
public List<String> getExecutedFlows(BpmnModel bpmnModel, List<HistoricActivityInstance> historicActivityInstances) {
|
||||
List<String> flowIdList = new ArrayList<String>(); //流转线ID集合
|
||||
List<String> flowIdList = new ArrayList<String>(); //流转线ID集合
|
||||
List<FlowNode> historicFlowNodeList = new LinkedList<FlowNode>(); //全部活动实例
|
||||
List<HistoricActivityInstance> finishedActivityInstanceList = new LinkedList<HistoricActivityInstance>(); //已完成的历史活动节点
|
||||
List list = new ArrayList();
|
||||
|
||||
Process mainProcess = bpmnModel.getMainProcess();
|
||||
for (HistoricActivityInstance historicActivityInstance : historicActivityInstances) {
|
||||
FlowNode flowElement = (FlowNode) mainProcess.getFlowElement(historicActivityInstance.getActivityId(), true);
|
||||
historicFlowNodeList.add(flowElement);
|
||||
|
||||
historicFlowNodeList.add((FlowNode) bpmnModel.getMainProcess().getFlowElement(historicActivityInstance.getActivityId(), true));
|
||||
if (historicActivityInstance.getEndTime() != null) {
|
||||
finishedActivityInstanceList.add(historicActivityInstance);
|
||||
}
|
||||
|
||||
}
|
||||
for (int x = 0; x < historicActivityInstances.size(); x++) {
|
||||
HistoricActivityInstance historicActivityInstance = historicActivityInstances.get(x);
|
||||
String activityType = historicActivityInstance.getActivityType();
|
||||
String activityId = historicActivityInstance.getActivityId();
|
||||
if (!list.contains(activityId)) {
|
||||
if (!list.contains(activityId) && ("userTask".equals(activityType)
|
||||
|| "serviceTask".equals(activityType)
|
||||
|| "endEvent".equals(activityType)
|
||||
|| "exclusiveGateway".equals(activityType)
|
||||
|| "parallelGateway".equals(activityType))) {
|
||||
list.add(activityId);
|
||||
}
|
||||
}
|
||||
|
||||
/**遍历已完成的活动实例,从每个实例的outgoingFlows中找到已执行的*/
|
||||
FlowNode currentFlowNode = null;
|
||||
for (HistoricActivityInstance currentActivityInstance : finishedActivityInstanceList) {
|
||||
/**获得当前活动对应的节点信息及outgoingFlows信息*/
|
||||
currentFlowNode = (FlowNode) mainProcess.getFlowElement(currentActivityInstance.getActivityId(), true);
|
||||
currentFlowNode = (FlowNode) bpmnModel.getMainProcess().getFlowElement(currentActivityInstance.getActivityId(), true);
|
||||
List<SequenceFlow> sequenceFlowList = currentFlowNode.getOutgoingFlows();
|
||||
/**
|
||||
* 遍历outgoingFlows并找到已流转的
|
||||
|
@ -236,15 +250,17 @@ public class ActProcInsService {
|
|||
* 2.当前节点是以上两种类型之外的,通过outgoingFlows查找到的时间最近的流转节点视为有效流转
|
||||
*/
|
||||
FlowNode targetFlowNode = null;
|
||||
if ("parallelGateway".equals(currentActivityInstance.getActivityType()) || "inclusiveGateway".equals(currentActivityInstance.getActivityType())) {
|
||||
if ("parallelGateway".equals(currentActivityInstance.getActivityType())
|
||||
|| "inclusiveGateway".equals(currentActivityInstance.getActivityType())) {
|
||||
for (SequenceFlow sequenceFlow : sequenceFlowList) { //遍历历史活动节点,找到匹配Flow目标节点的
|
||||
targetFlowNode = (FlowNode) mainProcess.getFlowElement(sequenceFlow.getTargetRef(), true);
|
||||
targetFlowNode = (FlowNode) bpmnModel.getMainProcess().getFlowElement(sequenceFlow.getTargetRef(), true);
|
||||
if (historicFlowNodeList.contains(targetFlowNode)) {
|
||||
flowIdList.add(sequenceFlow.getId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<Map<String, String>> tempMapList = new LinkedList<Map<String, String>>();
|
||||
// for(SequenceFlow sequenceFlow : sequenceFlowList) { //遍历历史活动节点,找到匹配Flow目标节点的
|
||||
for (int i = 0; i < sequenceFlowList.size(); i++) { //遍历历史活动节点,找到匹配Flow目标节点的
|
||||
SequenceFlow sequenceFlow = sequenceFlowList.get(i);
|
||||
int taskSeq = list.indexOf(sequenceFlow.getSourceRef()); // 获取当前flow目标节点key在审批顺序
|
||||
|
@ -271,9 +287,9 @@ public class ActProcInsService {
|
|||
flowId = map.get("flowId");
|
||||
flowIdList.add(flowId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return flowIdList;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ public class ActTaskDefService {
|
|||
}
|
||||
|
||||
if (StringUtils.isNotBlank(actHisTask.getDeleteReason())) {
|
||||
actHisTask.setComments("【驳回】" + actHisTask.getComments());
|
||||
actHisTask.setComments("【审核不通过】" + actHisTask.getComments());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import top.jfunc.common.db.bean.Page;
|
||||
import top.jfunc.common.db.utils.Pagination;
|
||||
import top.jfunc.common.utils.CollectionUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -36,6 +37,9 @@ public class HumanCostService {
|
|||
@Autowired
|
||||
private AdminRepository adminRepository;
|
||||
|
||||
@Autowired
|
||||
private Pagination pagination;
|
||||
|
||||
public Page<ProjectUserTime> project(ConcurrentHashMap<String, String> searchInfo, Admin admin, int pageNumber, int pageSize) {
|
||||
Page<ProjectUserTime> list = projectUserTimeRepositoryImpl.project(searchInfo, admin, pageNumber, pageSize);
|
||||
return list;
|
||||
|
@ -214,4 +218,31 @@ public class HumanCostService {
|
|||
}
|
||||
return new BigDecimal(0);
|
||||
}
|
||||
|
||||
public String[] template(List<String> data) {
|
||||
List<Admin> admins = adminRepository.getAllEnable();
|
||||
String[] headers = new String[admins.size() + 1];
|
||||
headers[0] = "项目名称";
|
||||
for (int i = 1; i < admins.size(); i++) {
|
||||
headers[i] = admins.get(i - 1).getRealName();
|
||||
}
|
||||
Admin admin = InterfaceUtil.getAdmin();
|
||||
List<Project> projectList = null;
|
||||
if (admin.getRoleLevel() <= 2 || admin.getRoleLevel() == 4) {
|
||||
String sql = "select proj.id, proj.name from project proj where proj.status = ? order by proj.id asc";
|
||||
projectList = pagination.find(sql, Project.class, Project.STATUS_SETTLE);
|
||||
} else {
|
||||
String sql = "select proj.id, proj.name from project proj where proj.status = ? and " +
|
||||
" (proj.creator_id=? OR proj.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=?)) order by proj.id asc";
|
||||
//项目可见性,根据角色和人员id
|
||||
int roleId = admin.getRoleId();
|
||||
Integer adminId = admin.getId();
|
||||
//自己创建的肯定能看见
|
||||
projectList = pagination.find(sql, Project.class, Project.STATUS_SETTLE, adminId, roleId, adminId);
|
||||
}
|
||||
for (Project project : projectList) {
|
||||
data.add(project.getName());
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import top.jfunc.common.utils.CollectionUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -441,6 +442,10 @@ public class ProjectFinalSevice {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
finalBean.setGrossProfitProfitMargin(finalBean.getGrossProfitFinalTotal().divide(finalBean.getIncomeTotal(),4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
|
||||
finalBean.setContributionMarginProfitMargin(finalBean.getContributionMarginFinalTotal().divide(finalBean.getIncomeTotal(),4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
|
||||
finalBean.setNetMarginProfitMargin(finalBean.getNetMarginFinalTotal().divide(finalBean.getIncomeTotal(),4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
|
||||
return finalBean;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,31 +44,13 @@ public class ProjectSettleService {
|
|||
|
||||
|
||||
public void save(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) {
|
||||
//收入记录
|
||||
income(project, settleBean, budgetBean, estimateBean, time);
|
||||
//成本记录
|
||||
cost(project, settleBean, budgetBean, estimateBean, time);
|
||||
//管理记录
|
||||
costManage(project, settleBean, budgetBean, estimateBean, time);
|
||||
//利润记录
|
||||
profit(project, settleBean, budgetBean, estimateBean, time);
|
||||
//资金流量记录
|
||||
cashFlow(project, settleBean, budgetBean, time);
|
||||
step(project, settleBean, budgetBean, estimateBean, time);
|
||||
|
||||
projectService.updateStatusAndApproveStatus(project.getId(), StatusEnum.SETTLE_ACCOUNTS, ApproveStatusEnum.APPROVAL_UNCOMMIT);
|
||||
}
|
||||
|
||||
public void saveAndApprove(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) throws Exception{
|
||||
//收入记录
|
||||
income(project, settleBean, budgetBean, estimateBean, time);
|
||||
//成本记录
|
||||
cost(project, settleBean, budgetBean, estimateBean, time);
|
||||
//管理记录
|
||||
costManage(project, settleBean, budgetBean, estimateBean, time);
|
||||
//利润记录
|
||||
profit(project, settleBean, budgetBean, estimateBean, time);
|
||||
//资金流量记录
|
||||
cashFlow(project, settleBean, budgetBean, time);
|
||||
step(project, settleBean, budgetBean, estimateBean, time);
|
||||
|
||||
projectService.updateStatusAndApproveStatus(project.getId(), StatusEnum.SETTLE_ACCOUNTS, ApproveStatusEnum.APPROVAL_PENDING);
|
||||
|
||||
|
@ -77,8 +59,23 @@ public class ProjectSettleService {
|
|||
|
||||
}
|
||||
|
||||
private void step(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) {
|
||||
//清除旧纪录
|
||||
clearSettle(project, time);
|
||||
//收入记录
|
||||
income(project, settleBean, budgetBean, estimateBean, time);
|
||||
//成本记录
|
||||
cost(project, settleBean, budgetBean, estimateBean, time);
|
||||
//管理记录
|
||||
costManage(project, settleBean, budgetBean, estimateBean, time);
|
||||
//利润记录
|
||||
profit(project, settleBean, budgetBean, estimateBean, time);
|
||||
//资金流量记录
|
||||
cashFlow(project, settleBean, budgetBean, time);
|
||||
}
|
||||
|
||||
public void clearSettle(Project project, String time){
|
||||
|
||||
private void clearSettle(Project project, String time){
|
||||
List<ProjectSettleIncome> incomes = projectSettleIncomeRepository.findAllByProjectIdAndTime(project.getId(), time);
|
||||
if(CollectionUtil.isNotEmpty(incomes)){
|
||||
projectSettleIncomeRepository.deleteInBatch(incomes);
|
||||
|
|
|
@ -11,9 +11,7 @@ import top.jfunc.common.utils.CollectionUtil;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
|
@ -45,15 +43,24 @@ public class ProjectSummaryService {
|
|||
@Autowired
|
||||
private Pagination pagination;
|
||||
|
||||
public List<SettleBean> getList(ConcurrentHashMap<String, String> searchInfo, String time) {
|
||||
//预算金额
|
||||
Map<String, BigDecimal> budget = new HashMap<>(40);
|
||||
String sql = "select proj.id, proj.name, proj.approve_status_budget from project_settle_cost psc left join project proj on psc.project_id = proj.id where psc.time = ? group by proj.id order by proj.id asc";
|
||||
List<Project> projectList = pagination.find(sql, Project.class, time);
|
||||
public List<SettleBean> getList(ConcurrentHashMap<String, String> searchInfo, String time, Admin admin) {
|
||||
List<Project> projectList = null;
|
||||
if (admin.getRoleLevel() <= 2 || admin.getRoleLevel() == 4) {
|
||||
String sql = "select proj.id, proj.name, proj.approve_status_settle from project_settle_cost psc left join project proj on psc.project_id = proj.id where psc.time = ? group by proj.id order by proj.id asc";
|
||||
projectList = pagination.find(sql, Project.class, time);
|
||||
} else {
|
||||
String sql = "select proj.id, proj.name, proj.approve_status_settle from project_settle_cost psc left join project proj on psc.project_id = proj.id where psc.time = ? and " +
|
||||
" (proj.creator_id=? OR proj.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=?)) group by proj.id order by proj.id asc";
|
||||
//项目可见性,根据角色和人员id
|
||||
int roleId = admin.getRoleId();
|
||||
Integer adminId = admin.getId();
|
||||
//自己创建的肯定能看见
|
||||
projectList = pagination.find(sql, Project.class, time, adminId, roleId, adminId);
|
||||
}
|
||||
List<Project> projects = new ArrayList<>();
|
||||
List<Integer> projectInt = new ArrayList<>();
|
||||
for (Project project : projectList) {
|
||||
if (project.getApproveStatusBudget() == 2) {
|
||||
if (project.getApproveStatusSettle() == 2) {
|
||||
projects.add(project);
|
||||
projectInt.add(project.getId());
|
||||
continue;
|
||||
|
@ -107,12 +114,12 @@ public class ProjectSummaryService {
|
|||
|
||||
BigDecimal costProjectManage = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
budgetBean.setCostProjectManage(costProjectManage );
|
||||
BigDecimal costProjectManageInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// BigDecimal costProjectManageInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
BigDecimal costOtherOther = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
budgetBean.setCostOther(costOtherOther);
|
||||
BigDecimal costOtherOtherInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
taxTotal = taxTotal.add(budgetBean.getCostTotal()).subtract(costDeviceInclude).subtract(costBuildInclude).subtract(costServiceInclude).subtract(costOtherInclude).subtract(costProjectManageInclude).subtract(costOtherOtherInclude);
|
||||
taxTotal = taxTotal.add(budgetBean.getCostTotal()).subtract(costDeviceInclude).subtract(costBuildInclude).subtract(costServiceInclude).subtract(costOtherInclude).subtract(costProjectManage).subtract(costOtherOtherInclude);
|
||||
}
|
||||
|
||||
List<ProjectBudgetCostManage> manages = projectBudgetCostManageRepository.findAllByProjectIds(projectInt);
|
||||
|
@ -177,11 +184,12 @@ public class ProjectSummaryService {
|
|||
|
||||
private void setProfitMargin(SettleBean monthSettle) {
|
||||
BigDecimal divide2 = monthSettle.getIncomeTotal();
|
||||
if (divide2.equals(new BigDecimal(0))) {
|
||||
BigDecimal min = new BigDecimal(0.01);
|
||||
if (divide2.compareTo(min) < 0) {
|
||||
divide2 = new BigDecimal(1);
|
||||
}
|
||||
monthSettle.setGrossProfitProfitMargin(monthSettle.getGrossProfit().multiply(new BigDecimal(100).divide(divide2, BigDecimal.ROUND_HALF_UP)));
|
||||
monthSettle.setContributionProfitProfitMargin(monthSettle.getContributionProfit().multiply(new BigDecimal(100).divide(divide2, BigDecimal.ROUND_HALF_UP)));
|
||||
monthSettle.setNetProfitProfitMargin(monthSettle.getNetProfit().multiply(new BigDecimal(100).divide(divide2, BigDecimal.ROUND_HALF_UP)));
|
||||
monthSettle.setGrossProfitProfitMargin(monthSettle.getGrossProfit().multiply(new BigDecimal(100).divide(divide2, 4, BigDecimal.ROUND_HALF_UP)));
|
||||
monthSettle.setContributionProfitProfitMargin(monthSettle.getContributionProfit().multiply(new BigDecimal(100).divide(divide2, 4, BigDecimal.ROUND_HALF_UP)));
|
||||
monthSettle.setNetProfitProfitMargin(monthSettle.getNetProfit().multiply(new BigDecimal(100).divide(divide2, 4, BigDecimal.ROUND_HALF_UP)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package cn.palmte.work.service;
|
||||
|
||||
import cn.palmte.work.bean.CashFlowBean;
|
||||
import cn.palmte.work.bean.CashFlowStatisticsBean;
|
||||
import cn.palmte.work.bean.PrimaryIndicatorBean;
|
||||
import cn.palmte.work.model.*;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import top.jfunc.common.utils.CollectionUtil;
|
||||
|
|
|
@ -134,7 +134,7 @@ public class SysRoleService {
|
|||
|
||||
SysRole role=new SysRole();
|
||||
role.setName(reqMap.get("roleName")!=null?reqMap.get("roleName").toString():null);
|
||||
//role.setLevel(reqMap.containsKey("roleLevel")?Integer.parseInt(reqMap.get("roleLevel").toString()):1);//第一个版本 默认都是省级
|
||||
role.setLevel(Integer.parseInt(reqMap.get("level").toString()));
|
||||
role.setIsEnable(Integer.parseInt(reqMap.get("isActive").toString()));
|
||||
//role.setType(Integer.parseInt(reqMap.get("roleType").toString()));
|
||||
role.setCreatedBy(InterfaceUtil.getAdminId());//当前登录人
|
||||
|
@ -249,7 +249,7 @@ public class SysRoleService {
|
|||
|
||||
SysRole role =sysRoleRepository.findSysRoleById(roleId);
|
||||
role.setName(reqMap.get("roleName").toString());
|
||||
//role.setLevel(Integer.parseInt(reqMap.get("roleLevel").toString()));
|
||||
role.setLevel(Integer.parseInt(reqMap.get("level").toString()));
|
||||
//role.setType(Integer.parseInt(reqMap.get("roleType").toString()));
|
||||
role.setIsEnable(Integer.parseInt(reqMap.get("isActive").toString()));
|
||||
role.setLastUpdatedBy(InterfaceUtil.getAdminId());
|
||||
|
|
|
@ -243,7 +243,7 @@ public class ExportUtils {
|
|||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public void exportTemplate(String[] columns, List<?> dataset, String pattern, int rowIndex) throws IOException{
|
||||
public void exportTemplate(String[] columns, List<?> dataset, String pattern, int rowIndex) throws IOException{
|
||||
// 遍历集合数据,产生数据行
|
||||
int index = rowIndex;
|
||||
Font font3 = workbook.createFont();
|
||||
|
|
|
@ -33,51 +33,76 @@ function calculateFinal() {
|
|||
|
||||
$("input[name='costExpropriationFinalTotal']").change(function () {
|
||||
calManageFinalTotal();
|
||||
calGrossProfitFinalTotal();
|
||||
calGrossProfitProfitMargin();
|
||||
});
|
||||
$("input[name='costCompanyManageFinalTotal']").change(function () {
|
||||
calManageFinalTotal();
|
||||
calContributionMarginFinalTotal();
|
||||
calContributionMarginProfitMargin();
|
||||
});
|
||||
$("input[name='costIncomeTaxFinalTotal']").change(function () {
|
||||
calManageFinalTotal();
|
||||
calNetMarginFinalTotal();
|
||||
calNetMarginProfitMargin();
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("input[name='saleIncomeCash']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calNetCashFlow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='taxReturn']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calNetCashFlow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='earnestMoneyIncome']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calNetCashFlow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='purchaseCost']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calNetCashFlow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='taxCost']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calNetCashFlow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='earnestMoneyCost']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calNetCashFlow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='netCashFlow']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
});
|
||||
$("input[name='cashInflowFromInvestingActivities']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
});
|
||||
calNetCashFromInvestingActivities();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
})
|
||||
$("input[name='cashOutflowFromInvestingActivities']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calNetCashFromInvestingActivities();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='netCashFromInvestingActivities']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
});
|
||||
$("input[name='financingCapitalInflow']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calFinancingCapitalCashflow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='financingCapitalOutflow']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
calFinancingCapitalCashflow();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
});
|
||||
$("input[name='financingCapitalCashflow']").change(function () {
|
||||
calCashFluxFinalTotal();
|
||||
|
@ -86,6 +111,76 @@ function calculateFinal() {
|
|||
calCashFluxFinalTotal();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 经营活动产生的现金流量净额
|
||||
*/
|
||||
function calNetCashFlow() {
|
||||
|
||||
var saleIncomeCash = $("input[name='saleIncomeCash']").val();
|
||||
var taxReturn = $("input[name='taxReturn']").val();
|
||||
var earnestMoneyIncome = $("input[name='earnestMoneyIncome']").val();
|
||||
var purchaseCost = $("input[name='purchaseCost']").val();
|
||||
var taxCost = $("input[name='taxCost']").val();
|
||||
var earnestMoneyCost = $("input[name='earnestMoneyCost']").val();
|
||||
|
||||
var netCashFlow = $("input[name='netCashFlow']");
|
||||
|
||||
if(saleIncomeCash && taxReturn && earnestMoneyIncome
|
||||
&& purchaseCost && taxCost && earnestMoneyCost){
|
||||
netCashFlow.val(parseFloat(saleIncomeCash)+parseFloat(taxReturn)+parseFloat(earnestMoneyIncome)
|
||||
-parseFloat(purchaseCost)-parseFloat(taxCost)-parseFloat(earnestMoneyCost));
|
||||
}else {
|
||||
netCashFlow.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 投资活动产生的现金流量净额
|
||||
*/
|
||||
function calNetCashFromInvestingActivities() {
|
||||
var cashInflowFromInvestingActivities = $("input[name='cashInflowFromInvestingActivities']").val();
|
||||
var cashOutflowFromInvestingActivities = $("input[name='cashOutflowFromInvestingActivities']").val();
|
||||
|
||||
var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']");
|
||||
|
||||
if(cashInflowFromInvestingActivities && cashOutflowFromInvestingActivities ){
|
||||
netCashFromInvestingActivities.val(parseFloat(cashInflowFromInvestingActivities)-parseFloat(cashOutflowFromInvestingActivities));
|
||||
}else {
|
||||
netCashFromInvestingActivities.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 筹资活动产生的现金流量净额
|
||||
*/
|
||||
function calFinancingCapitalCashflow() {
|
||||
var financingCapitalInflow = $("input[name='financingCapitalInflow']").val();
|
||||
var financingCapitalOutflow = $("input[name='financingCapitalOutflow']").val();
|
||||
|
||||
var financingCapitalCashflow = $("input[name='financingCapitalCashflow']");
|
||||
|
||||
if(financingCapitalInflow && financingCapitalOutflow ){
|
||||
financingCapitalCashflow.val(parseFloat(financingCapitalInflow)-parseFloat(financingCapitalOutflow));
|
||||
}else {
|
||||
financingCapitalCashflow.val("");
|
||||
}
|
||||
}
|
||||
|
||||
function calNetIncreaseMonetaryFunds() {
|
||||
var netCashFlow = $("input[name='netCashFlow']").val();
|
||||
var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']").val();
|
||||
var financingCapitalCashflow = $("input[name='financingCapitalCashflow']").val();
|
||||
|
||||
var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']");
|
||||
|
||||
if(netCashFlow && netCashFromInvestingActivities && financingCapitalCashflow){
|
||||
netIncreaseMonetaryFunds.val(parseFloat(netCashFlow)+parseFloat(netCashFromInvestingActivities)+parseFloat(financingCapitalCashflow));
|
||||
}else {
|
||||
netIncreaseMonetaryFunds.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -181,6 +276,105 @@ function calCashFluxFinalTotal() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目毛利决算总额
|
||||
*/
|
||||
function calGrossProfitFinalTotal() {
|
||||
var incomeFinalTotal = $("input[name='incomeFinalTotal']").val();
|
||||
var costFinalTotal = $("input[name='costFinalTotal']").val();
|
||||
var costExpropriationFinalTotal = $("input[name='costExpropriationFinalTotal']").val();
|
||||
|
||||
var grossProfitFinalTotal = $("input[name='grossProfitFinalTotal']");
|
||||
|
||||
if(incomeFinalTotal && costFinalTotal && costExpropriationFinalTotal){
|
||||
grossProfitFinalTotal.val(parseFloat(incomeFinalTotal)-parseFloat(costFinalTotal)-parseFloat(costExpropriationFinalTotal));
|
||||
}else {
|
||||
grossProfitFinalTotal.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目毛利利润率
|
||||
*/
|
||||
function calGrossProfitProfitMargin() {
|
||||
var grossProfitFinalTotal = $("input[name='grossProfitFinalTotal']").val();
|
||||
var incomeFinalTotal = $("input[name='incomeFinalTotal']").val();
|
||||
|
||||
var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']");
|
||||
if(grossProfitFinalTotal && incomeFinalTotal){
|
||||
grossProfitProfitMargin.val(f2(grossProfitFinalTotal) / f2(incomeFinalTotal));
|
||||
}else {
|
||||
grossProfitProfitMargin.val("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 项目贡献利润决算总额
|
||||
*/
|
||||
function calContributionMarginFinalTotal() {
|
||||
var grossProfitFinalTotal = $("input[name='grossProfitFinalTotal']").val();
|
||||
var costCompanyManageFinalTotal = $("input[name='costCompanyManageFinalTotal']").val();
|
||||
|
||||
var contributionMarginFinalTotal = $("input[name='contributionMarginFinalTotal']");
|
||||
|
||||
if(grossProfitFinalTotal && costCompanyManageFinalTotal ){
|
||||
contributionMarginFinalTotal.val(parseFloat(grossProfitFinalTotal)-parseFloat(costCompanyManageFinalTotal));
|
||||
}else {
|
||||
contributionMarginFinalTotal.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目贡献利润利润率
|
||||
*/
|
||||
function calContributionMarginProfitMargin() {
|
||||
var contributionMarginFinalTotal = $("input[name='contributionMarginFinalTotal']").val();
|
||||
var incomeFinalTotal = $("input[name='incomeFinalTotal']").val();
|
||||
|
||||
var contributionMarginProfitMargin = $("input[name='contributionMarginProfitMargin']");
|
||||
if(contributionMarginFinalTotal && incomeFinalTotal){
|
||||
contributionMarginProfitMargin.val(f2(contributionMarginFinalTotal) / f2(incomeFinalTotal));
|
||||
}else {
|
||||
contributionMarginProfitMargin.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目净利润决算总额
|
||||
*/
|
||||
function calNetMarginFinalTotal() {
|
||||
var contributionMarginFinalTotal = $("input[name='contributionMarginFinalTotal']").val();
|
||||
var costIncomeTaxFinalTotal = $("input[name='costIncomeTaxFinalTotal']").val();
|
||||
|
||||
|
||||
var netMarginFinalTotal = $("input[name='netMarginFinalTotal']");
|
||||
|
||||
if(contributionMarginFinalTotal && costIncomeTaxFinalTotal ){
|
||||
netMarginFinalTotal.val(parseFloat(contributionMarginFinalTotal)-parseFloat(costIncomeTaxFinalTotal));
|
||||
}else {
|
||||
netMarginFinalTotal.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目净利润利润率
|
||||
*/
|
||||
function calNetMarginProfitMargin() {
|
||||
var netMarginFinalTotal = $("input[name='netMarginFinalTotal']").val();
|
||||
var incomeFinalTotal = $("input[name='incomeFinalTotal']").val();
|
||||
|
||||
var netMarginProfitMargin = $("input[name='netMarginProfitMargin']");
|
||||
if(netMarginFinalTotal && incomeFinalTotal){
|
||||
netMarginProfitMargin.val(f2(netMarginFinalTotal) / f2(incomeFinalTotal));
|
||||
}else {
|
||||
netMarginProfitMargin.val("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,16 +4,19 @@ function calculateSettle() {
|
|||
calIncomeDeviceSettleTotal();
|
||||
calIncomeTotal();
|
||||
calIncomeSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='incomeEngineer']").change(function () {
|
||||
calIncomeEngineerSettleTotal();
|
||||
calIncomeTotal();
|
||||
calIncomeSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='incomeService']").change(function () {
|
||||
calIncomeServiceSettleTotal();
|
||||
calIncomeTotal();
|
||||
calIncomeSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
|
||||
|
||||
|
@ -21,31 +24,37 @@ function calculateSettle() {
|
|||
calCostPurchaseDeviceSettleTotal();
|
||||
calCostTotal();
|
||||
calCostSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='costPurchaseBuild']").change(function () {
|
||||
calCostPurchaseBuildSettleTotal();
|
||||
calCostTotal();
|
||||
calCostSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='costPurchaseService']").change(function () {
|
||||
calCostPurchaseServiceSettleTotal();
|
||||
calCostTotal();
|
||||
calCostSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='costPurchaseOther']").change(function () {
|
||||
calCostPurchaseOtherSettleTotal();
|
||||
calCostTotal();
|
||||
calCostSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='costProjectManage']").change(function () {
|
||||
calCostProjectManageSettleTotal();
|
||||
calCostTotal();
|
||||
calCostSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='costOther']").change(function () {
|
||||
calCostOtherSettleTotal();
|
||||
calCostTotal();
|
||||
calCostSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
|
||||
|
||||
|
@ -53,106 +62,176 @@ function calculateSettle() {
|
|||
calCostExpropriationSettleTotal();
|
||||
calCostManageTotal();
|
||||
calCostManageSettleTotal();
|
||||
calProfit();
|
||||
});
|
||||
$("input[name='costCompanyManage']").change(function () {
|
||||
calCostCompanyManageSettleTotal();
|
||||
calCostManageTotal();
|
||||
calCostManageSettleTotal();
|
||||
|
||||
calContributionProfit();
|
||||
calContributionProfitSettleTotal();
|
||||
calContributionProfitProfitMargin();
|
||||
calNetProfit();
|
||||
calNetProfitSettleTotal();
|
||||
calNetProfitProfitMargin();
|
||||
});
|
||||
$("input[name='costIncomeTax']").change(function () {
|
||||
calCostIncomeTaxSettleTotal();
|
||||
calCostManageTotal();
|
||||
calCostManageSettleTotal();
|
||||
});
|
||||
|
||||
|
||||
$("input[name='grossProfit']").change(function () {
|
||||
calGrossProfitSettleTotal();
|
||||
calGrossProfitProfitMargin();
|
||||
});
|
||||
$("input[name='contributionProfit']").change(function () {
|
||||
calContributionProfitSettleTotal();
|
||||
calContributionProfitProfitMargin();
|
||||
});
|
||||
$("input[name='netProfit']").change(function () {
|
||||
calNetProfit();
|
||||
calNetProfitSettleTotal();
|
||||
calNetProfitProfitMargin();
|
||||
});
|
||||
|
||||
|
||||
// $("input[name='grossProfit']").change(function () {
|
||||
// calGrossProfitSettleTotal();
|
||||
// calGrossProfitProfitMargin();
|
||||
// });
|
||||
// $("input[name='contributionProfit']").change(function () {
|
||||
// calContributionProfitSettleTotal();
|
||||
// calContributionProfitProfitMargin();
|
||||
// });
|
||||
// $("input[name='netProfit']").change(function () {
|
||||
// calNetProfitSettleTotal();
|
||||
// calNetProfitProfitMargin();
|
||||
// });
|
||||
|
||||
|
||||
$("input[name='saleIncomeCash']").change(function () {
|
||||
calSaleIncomeCashSettle();
|
||||
calNetCashFlow();
|
||||
calNetCashFlowSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='taxReturn']").change(function () {
|
||||
calTaxReturnSettle();
|
||||
calNetCashFlow();
|
||||
calNetCashFlowSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='earnestMoneyIncome']").change(function () {
|
||||
calEarnestMoneyIncomeSettle();
|
||||
calNetCashFlow();
|
||||
calNetCashFlowSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='purchaseCost']").change(function () {
|
||||
calPurchaseCostSettle();
|
||||
calNetCashFlow();
|
||||
calNetCashFlowSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='taxCost']").change(function () {
|
||||
calTaxCostSettle();
|
||||
calNetCashFlow();
|
||||
calNetCashFlowSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='earnestMoneyCost']").change(function () {
|
||||
calEarnestMoneyCostSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='netCashFlow']").change(function () {
|
||||
calNetCashFlow();
|
||||
calNetCashFlowSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
// $("input[name='netCashFlow']").change(function () {
|
||||
// calNetCashFlowSettle();
|
||||
// calNetIncreaseMonetaryFunds();
|
||||
// calCashFlowTotal();
|
||||
// calCashFlowSettleTotal();
|
||||
// });
|
||||
$("input[name='cashInflowFromInvestingActivities']").change(function () {
|
||||
calCashInflowFromInvestingActivitiesSettle();
|
||||
calNetCashFromInvestingActivities();
|
||||
calNetCashFromInvestingActivitiesSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='cashOutflowFromInvestingActivities']").change(function () {
|
||||
calCashOutflowFromInvestingActivitiesSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='netCashFromInvestingActivities']").change(function () {
|
||||
calNetCashFromInvestingActivities();
|
||||
calNetCashFromInvestingActivitiesSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
// $("input[name='netCashFromInvestingActivities']").change(function () {
|
||||
// calNetCashFromInvestingActivitiesSettle();
|
||||
// calNetIncreaseMonetaryFunds();
|
||||
// calCashFlowTotal();
|
||||
// calCashFlowSettleTotal();
|
||||
// });
|
||||
$("input[name='financingCapitalInflow']").change(function () {
|
||||
calFinancingCapitalInflowSettle();
|
||||
calFinancingCapitalCashflow();
|
||||
calFinancingCapitalCashflowSettle();
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='financingCapitalOutflow']").change(function () {
|
||||
calFinancingCapitalOutflowSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='financingCapitalCashflow']").change(function () {
|
||||
calFinancingCapitalCashflow();
|
||||
calFinancingCapitalCashflowSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
$("input[name='netIncreaseMonetaryFunds']").change(function () {
|
||||
calNetIncreaseMonetaryFunds();
|
||||
calNetIncreaseMonetaryFundsSettle();
|
||||
calCashFlowTotal();
|
||||
calCashFlowSettleTotal();
|
||||
});
|
||||
// $("input[name='financingCapitalCashflow']").change(function () {
|
||||
// calFinancingCapitalCashflowSettle();
|
||||
// calNetIncreaseMonetaryFunds();
|
||||
// calCashFlowTotal();
|
||||
// calCashFlowSettleTotal();
|
||||
// });
|
||||
// $("input[name='netIncreaseMonetaryFunds']").change(function () {
|
||||
// calNetIncreaseMonetaryFundsSettle();
|
||||
// calCashFlowTotal();
|
||||
// calCashFlowSettleTotal();
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 收入和支出均需调用的利润方法
|
||||
*/
|
||||
function calProfit() {
|
||||
calGrossProfit();
|
||||
calGrossProfitSettleTotal();
|
||||
calGrossProfitProfitMargin();
|
||||
calContributionProfit();
|
||||
calContributionProfitSettleTotal();
|
||||
calContributionProfitProfitMargin();
|
||||
calNetProfit();
|
||||
calNetProfitSettleTotal();
|
||||
calNetProfitProfitMargin();
|
||||
}
|
||||
|
||||
/**
|
||||
* 收入设备类结算总额(不含税),有一项没填就置空
|
||||
*/
|
||||
|
@ -455,6 +534,23 @@ function calCostManageSettleTotal() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月项目毛利结算总额,有一项没填就置空
|
||||
*/
|
||||
function calGrossProfit() {
|
||||
var incomeTotal = $("input[name='incomeTotal']").val();
|
||||
var costTotal = $("input[name='costTotal']").val();
|
||||
var costExpropriation = $("input[name='costExpropriation']").val();
|
||||
|
||||
var grossProfit = $("input[name='grossProfit']");
|
||||
|
||||
if(incomeTotal && costTotal && costExpropriation){
|
||||
grossProfit.val(parseFloat(incomeTotal)-parseFloat(costTotal)-parseFloat(costExpropriation));
|
||||
}else {
|
||||
grossProfit.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目毛利结算总额,有一项没填就置空
|
||||
*/
|
||||
|
@ -487,6 +583,22 @@ function calGrossProfitProfitMargin() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月项目贡献利润,有一项没填就置空
|
||||
*/
|
||||
function calContributionProfit() {
|
||||
var grossProfit = $("input[name='grossProfit']").val();
|
||||
var costCompanyManage = $("input[name='costCompanyManage']").val();
|
||||
|
||||
var contributionProfit = $("input[name='contributionProfit']");
|
||||
|
||||
if(grossProfit && costCompanyManage){
|
||||
contributionProfit.val(parseFloat(grossProfit)-parseFloat(costCompanyManage));
|
||||
}else {
|
||||
contributionProfit.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目贡献利润,有一项没填就置空
|
||||
*/
|
||||
|
@ -519,6 +631,22 @@ function calContributionProfitProfitMargin() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月项目净利润,有一项没填就置空
|
||||
*/
|
||||
function calNetProfit() {
|
||||
var contributionProfit = $("input[name='contributionProfit']").val();
|
||||
var costIncomeTax = $("input[name='costIncomeTax']").val();
|
||||
|
||||
var netProfit = $("input[name='netProfit']");
|
||||
|
||||
if(contributionProfit && costIncomeTax){
|
||||
netProfit.val(parseFloat(contributionProfit)-parseFloat(costIncomeTax));
|
||||
}else {
|
||||
netProfit.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目净利润,有一项没填就置空
|
||||
*/
|
||||
|
@ -543,7 +671,7 @@ function calNetProfitProfitMargin() {
|
|||
var incomeSettleTotal = $("input[name='incomeSettleTotal']").val();
|
||||
|
||||
var netProfitProfitMargin = $("input[name='netProfitProfitMargin']");
|
||||
console.log("calNetProfitProfitMargin " + netProfitSettleTotal + " " + incomeSettleTotal);
|
||||
|
||||
if(netProfitSettleTotal && incomeSettleTotal){
|
||||
netProfitProfitMargin.val(100*(parseFloat(netProfitSettleTotal)/parseFloat(incomeSettleTotal)));
|
||||
}else {
|
||||
|
@ -776,6 +904,77 @@ function calNetIncreaseMonetaryFundsSettle() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月经营活动产生的现金流量净额,有一项没填就置空
|
||||
*/
|
||||
function calNetCashFlow() {
|
||||
var saleIncomeCash = $("input[name='saleIncomeCash']").val();
|
||||
var taxReturn = $("input[name='taxReturn']").val();
|
||||
var earnestMoneyIncome = $("input[name='earnestMoneyIncome']").val();
|
||||
var purchaseCost = $("input[name='purchaseCost']").val();
|
||||
var taxCost = $("input[name='taxCost']").val();
|
||||
var earnestMoneyCost = $("input[name='earnestMoneyCost']").val();
|
||||
|
||||
var netCashFlow = $("input[name='netCashFlow']");
|
||||
|
||||
if(saleIncomeCash && taxReturn && earnestMoneyIncome &&
|
||||
purchaseCost && taxCost && earnestMoneyCost) {
|
||||
netCashFlow.val(parseFloat(saleIncomeCash)+parseFloat(taxReturn)+parseFloat(earnestMoneyIncome)-
|
||||
parseFloat(purchaseCost)-parseFloat(taxCost)-parseFloat(earnestMoneyCost));
|
||||
}else {
|
||||
netCashFlow.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月投资活动产生的现金流量净额,有一项没填就置空
|
||||
*/
|
||||
function calNetCashFromInvestingActivities() {
|
||||
var cashInflowFromInvestingActivities = $("input[name='cashInflowFromInvestingActivities']").val();
|
||||
var cashOutflowFromInvestingActivities = $("input[name='cashOutflowFromInvestingActivities']").val();
|
||||
|
||||
var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']");
|
||||
|
||||
if(cashInflowFromInvestingActivities && cashOutflowFromInvestingActivities){
|
||||
netCashFromInvestingActivities.val(parseFloat(cashInflowFromInvestingActivities)-parseFloat(cashOutflowFromInvestingActivities));
|
||||
}else {
|
||||
netCashFromInvestingActivities.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月筹资活动产生的现金流量净额,有一项没填就置空
|
||||
*/
|
||||
function calFinancingCapitalCashflow() {
|
||||
var financingCapitalInflow = $("input[name='financingCapitalInflow']").val();
|
||||
var financingCapitalOutflow = $("input[name='financingCapitalOutflow']").val();
|
||||
|
||||
var financingCapitalCashflow = $("input[name='financingCapitalCashflow']");
|
||||
|
||||
if(financingCapitalInflow && financingCapitalOutflow){
|
||||
financingCapitalCashflow.val(parseFloat(financingCapitalInflow)-parseFloat(financingCapitalOutflow));
|
||||
}else {
|
||||
financingCapitalCashflow.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月货币资金净增加额,有一项没填就置空
|
||||
*/
|
||||
function calNetIncreaseMonetaryFunds() {
|
||||
var netCashFlow = $("input[name='netCashFlow']").val();
|
||||
var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']").val();
|
||||
var financingCapitalCashflow = $("input[name='financingCapitalCashflow']").val();
|
||||
|
||||
var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']");
|
||||
|
||||
if(netCashFlow && netCashFromInvestingActivities && financingCapitalCashflow){
|
||||
netIncreaseMonetaryFunds.val(parseFloat(netCashFlow)+parseFloat(netCashFromInvestingActivities)+parseFloat(financingCapitalCashflow));
|
||||
}else {
|
||||
netIncreaseMonetaryFunds.val("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月现金流量表总额(不含税),有一项没填就置空
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,454 @@
|
|||
var valid = function() {
|
||||
return incomeDeviceValid() && incomeEngineerValid() && incomeServiceValid() && costPurchaseDeviceValid() && costPurchaseBuildValid() && costPurchaseServiceValid() && costPurchaseOtherValid() && costProjectManageValid() && costOtherValid() && costExpropriationValid() && costCompanyManageValid()
|
||||
&& grossProfitValid() && contributionProfitValid() && netProfitValid() && saleIncomeCashValid() && earnestMoneyIncomeValid() && purchaseCostValid() && earnestMoneyCostValid() && financingCapitalInflowValid() && financingCapitalOutflowValid() && financingCapitalCashflowValid();
|
||||
};
|
||||
|
||||
var incomeDeviceValid = function() {
|
||||
var settle = $("input[name='incomeDeviceSettleTotal']").val();
|
||||
var month = $("input[name='incomeDevice']").val();
|
||||
var budget = $("input[name='incomeDeviceBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月收入设备类数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("收入设备类结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var incomeEngineerValid = function() {
|
||||
var settle = $("input[name='incomeEngineerSettleTotal']").val();
|
||||
var month = $("input[name='incomeEngineer']").val();
|
||||
var budget = $("input[name='incomeEngineerBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月收入工程类数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("收入工程类结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var incomeServiceValid = function() {
|
||||
var settle = $("input[name='incomeServiceSettleTotal']").val();
|
||||
var month = $("input[name='incomeService']").val();
|
||||
var budget = $("input[name='incomeServiceBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月收入服务类数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("收入服务类结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costPurchaseDeviceValid = function() {
|
||||
var settle = $("input[name='costPurchaseDeviceSettleTotal']").val();
|
||||
var month = $("input[name='costPurchaseDevice']").val();
|
||||
var budget = $("input[name='costPurchaseDeviceBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月采购成本设备类数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("采购成本设备类结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costPurchaseBuildValid = function() {
|
||||
var settle = $("input[name='costPurchaseBuildSettleTotal']").val();
|
||||
var month = $("input[name='costPurchaseBuild']").val();
|
||||
var budget = $("input[name='costPurchaseBuildBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月采购成本施工类数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("采购成本施工类结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costPurchaseServiceValid = function() {
|
||||
var settle = $("input[name='costPurchaseServiceSettleTotal']").val();
|
||||
var month = $("input[name='costPurchaseService']").val();
|
||||
var budget = $("input[name='costPurchaseServiceBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月采购成本服务类数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("采购成本服务类结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costPurchaseOtherValid = function() {
|
||||
var settle = $("input[name='costPurchaseOtherSettleTotal']").val();
|
||||
var month = $("input[name='costPurchaseOther']").val();
|
||||
var budget = $("input[name='costPurchaseOtherBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月采购成本其他类数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("采购成本其他类结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costProjectManageValid = function() {
|
||||
var settle = $("input[name='costProjectManageSettleTotal']").val();
|
||||
var month = $("input[name='costProjectManage']").val();
|
||||
var salary = $("input[name='salary']").val();
|
||||
var budget = $("input[name='costProjectManageBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月项目管理成本数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(salary) > parseFloat(month)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("本月项目管理成本不能低于人力成本");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("项目管理成本结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costOtherValid = function() {
|
||||
var settle = $("input[name='costOtherSettleTotal']").val();
|
||||
var month = $("input[name='costOther']").val();
|
||||
var budget = $("input[name='costOtherBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月其他成本数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("其他成本结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costExpropriationValid = function() {
|
||||
var settle = $("input[name='costExpropriationSettleTotal']").val();
|
||||
var month = $("input[name='costExpropriation']").val();
|
||||
var budget = $("input[name='costExpropriationBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月财务费用数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("财务费用结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var costCompanyManageValid = function() {
|
||||
var settle = $("input[name='costCompanyManageSettleTotal']").val();
|
||||
var month = $("input[name='costCompanyManage']").val();
|
||||
var budget = $("input[name='costCompanyManageBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月公司管理费用数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("公司管理费用结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var grossProfitValid = function() {
|
||||
var settle = $("input[name='grossProfitSettleTotal']").val();
|
||||
var month = $("input[name='grossProfit']").val();
|
||||
var budget = $("input[name='grossProfitBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月项目毛利数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("项目毛利结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var contributionProfitValid = function() {
|
||||
var settle = $("input[name='contributionProfitSettleTotal']").val();
|
||||
var month = $("input[name='contributionProfit']").val();
|
||||
var budget = $("input[name='contributionProfitBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月项目贡献利润数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("项目贡献利润结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var netProfitValid = function() {
|
||||
var settle = $("input[name='netProfitSettleTotal']").val();
|
||||
var month = $("input[name='netProfit']").val();
|
||||
var budget = $("input[name='netProfitBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月项目净利润数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("项目净利润结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var saleIncomeCashValid = function() {
|
||||
var settle = $("input[name='saleIncomeCashSettleTotal']").val();
|
||||
var month = $("input[name='saleIncomeCash']").val();
|
||||
var budget = $("input[name='saleIncomeCashBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月销售商品、提供劳务收到的现金数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("销售商品、提供劳务收到的现金结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var earnestMoneyIncomeValid = function() {
|
||||
var settle = $("input[name='earnestMoneyIncomeSettleTotal']").val();
|
||||
var month = $("input[name='earnestMoneyIncome']").val();
|
||||
var budget = $("input[name='earnestMoneyIncomeBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月收到其他与经营活动有关的现金数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("收到其他与经营活动有关的现金结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var purchaseCostValid = function() {
|
||||
var settle = $("input[name='purchaseCostSettleTotal']").val();
|
||||
var month = $("input[name='purchaseCost']").val();
|
||||
var budget = $("input[name='purchaseCostBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月购买商品、接受劳务支付的现金数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("购买商品、接受劳务支付的现金结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var earnestMoneyCostValid = function() {
|
||||
var settle = $("input[name='earnestMoneyCostSettleTotal']").val();
|
||||
var month = $("input[name='earnestMoneyCost']").val();
|
||||
var budget = $("input[name='earnestMoneyCostBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月支付其他与经营活动有关的现金数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("支付其他与经营活动有关的现金结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var financingCapitalInflowValid = function() {
|
||||
var settle = $("input[name='financingCapitalInflowSettleTotal']").val();
|
||||
var month = $("input[name='financingCapitalInflow']").val();
|
||||
var budget = $("input[name='financingCapitalInflowBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月融资资金流入数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("融资资金流入结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var financingCapitalOutflowValid = function() {
|
||||
var settle = $("input[name='financingCapitalOutflowSettleTotal']").val();
|
||||
var month = $("input[name='financingCapitalOutflow']").val();
|
||||
var budget = $("input[name='financingCapitalOutflowBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月还款资金流出数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("还款资金流出结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var financingCapitalCashflowValid = function() {
|
||||
var settle = $("input[name='financingCapitalCashflowSettleTotal']").val();
|
||||
var month = $("input[name='financingCapitalCashflow']").val();
|
||||
var budget = $("input[name='financingCapitalCashflowBudgetTotal']").val();
|
||||
if (month == "") {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("请填入本月筹资活动产生的现金流量净额数据");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(settle) > parseFloat(budget)) {
|
||||
layui.use('layer', function(){
|
||||
var layer = layui.layer;
|
||||
layer.alert("筹资活动产生的现金流量净额结算总额不能高于预算总额");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
|
@ -1725,12 +1725,32 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-tabs am-margin" data-am-tabs>
|
||||
<div class="am-tabs-bd">
|
||||
<div class="am-tab-panel am-fade am-in am-active">
|
||||
<div class="am-g am-form-group am-margin-top" style="display: flex;">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right">
|
||||
审核意见
|
||||
</div>
|
||||
<div class="am-u-sm-8 am-u-md-10 am-text-left">
|
||||
<#list taskRecords as node>
|
||||
<span>${node.assigneeName} : ${node.taskComment} ${node.createTime}</span>
|
||||
<hr/>
|
||||
</#list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--选项卡(tabs)end-->
|
||||
<div class="am-margin">
|
||||
<button type="button" class="am-btn am-btn-warning am-btn-xs" onclick="javascript:history.go(-1);">
|
||||
返回上一级
|
||||
</button>
|
||||
<#if project.creatorId!=project.approveId && adminId==project.approveId>
|
||||
<button type="submit" class="am-btn am-btn-primary am-btn-xs" id="saveFinal">审核</button>
|
||||
</#if>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
@ -1739,12 +1759,12 @@
|
|||
<script>
|
||||
var base = "${base}";
|
||||
</script>
|
||||
<script src="${base}/assets/js/project_common.js"></script>
|
||||
<#-- <script src="${base}/assets/js/project_common.js"></script>
|
||||
<script src="${base}/assets/js/project_budget.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_income.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_cost.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_cost_project_manage.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_plan.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_plan.js"></script>-->
|
||||
</@defaultLayout.layout>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -1507,12 +1507,12 @@
|
|||
<script>
|
||||
var base = "${base}";
|
||||
</script>
|
||||
<script src="${base}/assets/js/project_common.js"></script>
|
||||
<#--<script src="${base}/assets/js/project_common.js"></script>
|
||||
<script src="${base}/assets/js/project_budget.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_income.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_cost.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_cost_project_manage.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_plan.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_plan.js"></script>-->
|
||||
</@defaultLayout.layout>
|
||||
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@
|
|||
<td><input name="projectGrossProfit" type="number" value="${Utils.format(estimateBean.getProjectGrossProfit(),'0')}" readonly required title="项目毛利概算总额"></td>
|
||||
<td><input name="projectGrossProfit" type="number" value="${Utils.format(budgetBean.getProjectGrossProfit(),'0')}" readonly required title="项目毛利预算总额"></td>
|
||||
<td><input name="grossProfitSettleTotal" type="number" value="${Utils.format(settleBean.grossProfit,'0')}" readonly required title="项目毛利结算总额"></td>
|
||||
<td><input name="grossProfitFinalTotal" required type="number" title="项目毛利决算总额"></td>
|
||||
<td><input name="grossProfitFinalTotal" required readonly type="number" title="项目毛利决算总额"></td>
|
||||
<td><input name="grossProfitProfitMargin" type="number" required readonly title="项目毛利利润率"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -226,7 +226,7 @@
|
|||
<td><input name="projectContributionProfit" type="number" value="${Utils.format(estimateBean.getProjectContributionProfit(),'0')}" readonly required title="项目贡献利润概算总额"></td>
|
||||
<td><input name="projectContributionProfit" type="number" value="${Utils.format(budgetBean.getProjectContributionProfit(),'0')}" readonly required title="项目贡献利润预算总额"></td>
|
||||
<td><input name="contributionMarginSettleTotal" type="number" value="${Utils.format(settleBean.contributionProfit,'0')}" readonly required title="项目贡献利润结算总额"></td>
|
||||
<td><input name="contributionMarginFinalTotal" type="number" required title="项目贡献利润决算总额"></td>
|
||||
<td><input name="contributionMarginFinalTotal" type="number" required readonly title="项目贡献利润决算总额"></td>
|
||||
<td><input name="contributionMarginProfitMargin" type="number" required readonly title="项目贡献利润利润率"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -234,8 +234,8 @@
|
|||
<td>/</td>
|
||||
<td><input name="netMarginBudgetTotal" type="number" value="${Utils.format(finalBean.netMarginBudgetTotal,'0')}" readonly required title="项目净利润预算总额"></td>
|
||||
<td><input name="netMarginSettleTotal" type="number" value="${Utils.format(settleBean.netProfit,'0')}" readonly required title="项目净利润结算总额"></td>
|
||||
<td><input name="netMarginFinalTotal" type="number" required title="项目净利润决算总额"></td>
|
||||
<td><input name="netMarginProfitMargin" type="number" value="${Utils.format(finalBean.netMarginProfitMargin,'0')}" required readonly title="项目净利润利润率"></td>
|
||||
<td><input name="netMarginFinalTotal" type="number" required readonly title="项目净利润决算总额"></td>
|
||||
<td><input name="netMarginProfitMargin" type="number" required readonly title="项目净利润利润率"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -289,7 +289,7 @@
|
|||
<td>经营活动产生的现金流量净额</td>
|
||||
<td><input name="budgetNetCashFlow" type="number" value="${Utils.format(cashFlowBean.getNetCashFlow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input type="number" value="${Utils.format(settleBean.netCashFlow,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="netCashFlow" type="number" required title="决算总额"></td>
|
||||
<td><input name="netCashFlow" type="number" readonly required title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>投资活动现金流入</td>
|
||||
|
@ -307,7 +307,7 @@
|
|||
<td>投资活动产生的现金流量净额</td>
|
||||
<td>/</td>
|
||||
<td><input type="number" value="${Utils.format(settleBean.netCashFromInvestingActivities,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="netCashFromInvestingActivities" type="number" required title="决算总额"></td>
|
||||
<td><input name="netCashFromInvestingActivities" type="number" required readonly title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>融资资金流入</td>
|
||||
|
@ -325,13 +325,13 @@
|
|||
<td>筹资活动产生的现金流量净额</td>
|
||||
<td><input name="budgetFinancingCapitalCashflow" type="number" value="${Utils.format(cashFlowBean.getFinancingCapitalCashflow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input type="number" value="${Utils.format(settleBean.financingCapitalCashflow,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="financingCapitalCashflow" type="number" required title="决算总额"></td>
|
||||
<td><input name="financingCapitalCashflow" type="number" required readonly title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>货币资金净增加额</td>
|
||||
<td><input name="budgetNetIncreaseMonetaryFunds" type="number" value="${Utils.format(cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="type14SettleTotal" type="number" value="${Utils.format(settleBean.netIncreaseMonetaryFunds,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="netIncreaseMonetaryFunds" type="number" required title="决算总额"></td>
|
||||
<td><input name="netIncreaseMonetaryFunds" type="number" readonly required title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合计</td>
|
||||
|
@ -360,7 +360,7 @@
|
|||
var base = "${base}";
|
||||
</script>
|
||||
<script src="${base}/assets/js/project_common.js"></script>
|
||||
<script src="${base}/assets/js/project_final.js"></script>
|
||||
<script src="${base}/assets/js/project_final.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
calculateFinal();
|
||||
|
|
|
@ -218,7 +218,7 @@
|
|||
<td><input name="projectGrossProfit" type="number" value="${Utils.format(estimateBean.getProjectGrossProfit(),'0')}" readonly required title="项目毛利概算总额"></td>
|
||||
<td><input name="projectGrossProfit" type="number" value="${Utils.format(budgetBean.getProjectGrossProfit(),'0')}" readonly required title="项目毛利预算总额"></td>
|
||||
<td><input name="grossProfitSettleTotal" type="number" value="${Utils.format(finalBean.grossProfitSettleTotal,'0')}" readonly required title="项目毛利结算总额"></td>
|
||||
<td><input name="grossProfitFinalTotal" type="number" value="${Utils.format(finalBean.grossProfitFinalTotal,'0')}" required title="项目毛利决算总额"></td>
|
||||
<td><input name="grossProfitFinalTotal" type="number" value="${Utils.format(finalBean.grossProfitFinalTotal,'0')}" readonly required title="项目毛利决算总额"></td>
|
||||
<td><input name="grossProfitProfitMargin" type="number" value="${Utils.format(finalBean.grossProfitProfitMargin,'0')}" required readonly title="项目毛利利润率"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -226,7 +226,7 @@
|
|||
<td><input name="projectContributionProfit" type="number" value="${Utils.format(estimateBean.getProjectContributionProfit(),'0')}" readonly required title="项目贡献利润概算总额"></td>
|
||||
<td><input name="projectContributionProfit" type="number" value="${Utils.format(budgetBean.getProjectContributionProfit(),'0')}" readonly required title="项目贡献利润预算总额"></td>
|
||||
<td><input name="contributionMarginSettleTotal" type="number" value="${Utils.format(settleBean.contributionProfit,'0')}" readonly required title="项目贡献利润结算总额"></td>
|
||||
<td><input name="contributionMarginFinalTotal" type="number" value="${Utils.format(finalBean.contributionMarginFinalTotal,'0')}" required title="项目贡献利润决算总额"></td>
|
||||
<td><input name="contributionMarginFinalTotal" type="number" value="${Utils.format(finalBean.contributionMarginFinalTotal,'0')}" readonly required title="项目贡献利润决算总额"></td>
|
||||
<td><input name="contributionMarginProfitMargin" type="number" value="${Utils.format(finalBean.contributionMarginProfitMargin,'0')}" required readonly title="项目贡献利润利润率"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -234,7 +234,7 @@
|
|||
<td>/</td>
|
||||
<td><input name="netMarginBudgetTotal" type="number" value="${Utils.format(finalBean.netMarginBudgetTotal,'0')}" readonly required title="项目净利润预算总额"></td>
|
||||
<td><input name="netMarginSettleTotal" type="number" value="${Utils.format(settleBean.netProfit,'0')}" readonly required title="项目净利润结算总额"></td>
|
||||
<td><input name="netMarginFinalTotal" type="number" value="${Utils.format(finalBean.netMarginFinalTotal,'0')}" required title="项目净利润决算总额"></td>
|
||||
<td><input name="netMarginFinalTotal" type="number" value="${Utils.format(finalBean.netMarginFinalTotal,'0')}" readonly required title="项目净利润决算总额"></td>
|
||||
<td><input name="netMarginProfitMargin" type="number" value="${Utils.format(finalBean.netMarginProfitMargin,'0')}" required readonly title="项目净利润利润率"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -289,7 +289,7 @@
|
|||
<td>经营活动产生的现金流量净额</td>
|
||||
<td><input name="budgetNetCashFlow" type="number" value="${Utils.format(cashFlowBean.getNetCashFlow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input type="number" value="${Utils.format(settleBean.netCashFlow,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="netCashFlow" type="number" value="${Utils.format(finalBean.netCashFlow,'0')}" required title="决算总额"></td>
|
||||
<td><input name="netCashFlow" type="number" value="${Utils.format(finalBean.netCashFlow,'0')}" readonly required title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>投资活动现金流入</td>
|
||||
|
@ -307,7 +307,7 @@
|
|||
<td>投资活动产生的现金流量净额</td>
|
||||
<td>/</td>
|
||||
<td><input type="number" value="${Utils.format(settleBean.netCashFromInvestingActivities,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="netCashFromInvestingActivities" type="number" value="${Utils.format(finalBean.netCashFromInvestingActivities,'0')}" required title="决算总额"></td>
|
||||
<td><input name="netCashFromInvestingActivities" type="number" value="${Utils.format(finalBean.netCashFromInvestingActivities,'0')}" readonly required title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>融资资金流入</td>
|
||||
|
@ -325,13 +325,13 @@
|
|||
<td>筹资活动产生的现金流量净额</td>
|
||||
<td><input name="budgetFinancingCapitalCashflow" type="number" value="${Utils.format(cashFlowBean.getFinancingCapitalCashflow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input type="number" value="${Utils.format(settleBean.financingCapitalCashflow,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="financingCapitalCashflow" type="number" value="${Utils.format(finalBean.financingCapitalCashflow,'0')}" required title="决算总额"></td>
|
||||
<td><input name="financingCapitalCashflow" type="number" value="${Utils.format(finalBean.financingCapitalCashflow,'0')}" readonly required title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>货币资金净增加额</td>
|
||||
<td><input name="budgetNetIncreaseMonetaryFunds" type="number" value="${Utils.format(cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="type14SettleTotal" type="number" value="${Utils.format(settleBean.netIncreaseMonetaryFunds,'0')}" readonly required title="结算总额"></td>
|
||||
<td><input name="netIncreaseMonetaryFunds" type="number" value="${Utils.format(finalBean.netIncreaseMonetaryFunds,'0')}" required title="决算总额"></td>
|
||||
<td><input name="netIncreaseMonetaryFunds" type="number" value="${Utils.format(finalBean.netIncreaseMonetaryFunds,'0')}" readonly required title="决算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合计</td>
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
<#list pager.list as list>
|
||||
<tr>
|
||||
<td>${list.id!}</td>
|
||||
<td>${list.name!}</td>
|
||||
<td><a style="cursor: pointer;text-decoration:none" onclick="location.href='${base}/project/detail?id=${list.id}'">${list.name!}</a></td>
|
||||
<td>${list.typeDesc!}</td>
|
||||
<td>${list.statusDesc!}</td>
|
||||
<td>${list.approveStatusDesc!}</td>
|
||||
|
@ -231,7 +231,7 @@
|
|||
<#-- </@shiro.hasPermission>-->
|
||||
|
||||
<#-- 项目等于预算状态、预算审核等于通过状态 -->
|
||||
<#if list.status==5 && list.approveStatusBudget=2 >
|
||||
<#if (list.status==5 && list.approveStatusBudget=2) || (list.status=10 && list.approveStatusSettle=2) >
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/settle/add?id=${list.id}'"><span
|
||||
|
@ -266,14 +266,14 @@
|
|||
</button>
|
||||
</#if>
|
||||
|
||||
<button type="button"
|
||||
<#--<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/detail?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>查看
|
||||
</button>
|
||||
</button>-->
|
||||
|
||||
|
||||
<#if adminId==list.approveId>
|
||||
<#if list.creatorId!=list.approveId && adminId==list.approveId>
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/approve?listFrom=list&id=${list.id}'"><span
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
<div class="am-tabs-bd">
|
||||
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
|
||||
<input name="id" id="id" type="hidden" value="${project.id}" />
|
||||
<input name="salary" id="salary" type="hidden" value="${Utils.format(salary,'0')}" />
|
||||
|
||||
<div class="am-u-sm-10">
|
||||
<div class="am-form am-form-inline">
|
||||
<div class="am-form-group am-form-icon">
|
||||
|
@ -152,7 +154,9 @@
|
|||
<td>项目管理成本</td>
|
||||
<td><input name="costProjectManageEstimateTotal" type="number" value="${Utils.format(estimateBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本概算总额"></td>
|
||||
<td><input name="costProjectManageBudgetTotal" type="number" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本预算总额"></td>
|
||||
<td><input name="costProjectManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costProjectManageTaxExclude,'0')}" required readonly title="项目管理成本上月结算总额"></td>
|
||||
<td><input name="costProjectManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costProjectManageTaxExclude,'0')}" required readonly title="项目管理成本上月结算总额">
|
||||
<span>人力成本:${Utils.format(salary,'0')} 元</span>
|
||||
</td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costProjectManage" required title="项目管理成本本月结算金额"></td>
|
||||
<td><input type="number" name="costProjectManageSettleTotal" readonly title="项目管理成本结算总额"></td>
|
||||
</tr>
|
||||
|
@ -246,7 +250,7 @@
|
|||
<td><input name="grossProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利概算总额"></td>
|
||||
<td><input name="grossProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利预算总额"></td>
|
||||
<td><input name="grossProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.grossProfit,'0')}" required readonly title="项目毛利上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="grossProfit" required title="项目毛利本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="grossProfit" readonly required title="项目毛利本月结算金额"></td>
|
||||
<td><input type="number" name="grossProfitSettleTotal" readonly title="项目毛利结算总额"></td>
|
||||
<td><input name="grossProfitProfitMargin" type="number" readonly title="项目毛利利润率"></td>
|
||||
</tr>
|
||||
|
@ -255,7 +259,7 @@
|
|||
<td><input name="contributionProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润概算总额"></td>
|
||||
<td><input name="contributionProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润预算总额"></td>
|
||||
<td><input name="contributionProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.contributionProfit,'0')}" required readonly title="项目贡献利润上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="contributionProfit" required title="项目贡献利润本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="contributionProfit" readonly required title="项目贡献利润本月结算金额"></td>
|
||||
<td><input type="number" name="contributionProfitSettleTotal" readonly title="项目贡献利润结算总额"></td>
|
||||
<td><input name="contributionProfitProfitMargin" type="number" readonly title="项目贡献利润利润率"></td>
|
||||
</tr>
|
||||
|
@ -264,7 +268,7 @@
|
|||
<td><input name="netProfitBudgetTotal" type="number" value="${Utils.format(estimateBean.contributionProfitTaxExclude,'0')}" required readonly title="项目净利润预算总额"></td>
|
||||
<td><input name="netProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.contributionProfitTaxExclude,'0')}" required readonly title="项目净利润预算总额"></td>
|
||||
<td><input name="netProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.netProfit,'0')}" required readonly title="项目净利润上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netProfit" required title="项目净利润本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netProfit" readonly required title="项目净利润本月结算金额"></td>
|
||||
<td><input type="number" name="netProfitSettleTotal" readonly title="项目净利润结算总额"></td>
|
||||
<td><input name="netProfitProfitMargin" type="number" readonly title="项目净利润利润率"></td>
|
||||
</tr>
|
||||
|
@ -327,7 +331,7 @@
|
|||
<td>经营活动产生的现金流量净额</td>
|
||||
<td><input name="netCashFlowBudget" type="number" value="${Utils.format(cashFlowBean.getNetCashFlow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="netCashFlowFormerSettle" type="number" value="${Utils.format(formerBean.netCashFlow,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFlow" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFlow" readonly required title="本月结算金额"></td>
|
||||
<td><input name="netCashFlowSettle" type="number" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -348,7 +352,7 @@
|
|||
<td>投资活动产生的现金流量净额</td>
|
||||
<td>/</td>
|
||||
<td><input name="netCashFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.netCashFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFromInvestingActivities" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFromInvestingActivities" readonly required title="本月结算金额"></td>
|
||||
<td><input name="netCashFromInvestingActivitiesSettle" type="number" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -369,14 +373,14 @@
|
|||
<td>筹资活动产生的现金流量净额</td>
|
||||
<td><input name="financingCapitalCashflowBudget" type="number" value="${Utils.format(cashFlowBean.getFinancingCapitalCashflow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="financingCapitalCashflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalCashflow,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalCashflow" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalCashflow" readonly required title="本月结算金额"></td>
|
||||
<td><input name="financingCapitalCashflowSettle" type="number" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>货币资金净增加额</td>
|
||||
<td><input name="netIncreaseMonetaryFundsBudget" type="number" value="${Utils.format(cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="netIncreaseMonetaryFundsFormerSettle" type="number" value="${Utils.format(formerBean.netIncreaseMonetaryFunds,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netIncreaseMonetaryFunds" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netIncreaseMonetaryFunds" readonly required title="本月结算金额"></td>
|
||||
<td><input name="netIncreaseMonetaryFundsSettle" type="number" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -407,71 +411,11 @@
|
|||
<script>
|
||||
var base = "${base}";
|
||||
</script>
|
||||
<#-- <script src="${base}/layui/layui.js"></script>-->
|
||||
<script src="${base}/layui/layui.js"></script>
|
||||
<script src="${base}/assets/js/project_common.js"></script>
|
||||
<script src="${base}/assets/js/project_settle.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
/*表单验证:begin*/
|
||||
//自定义规则,用法:验证元素上加class="js-pattern-sort"
|
||||
if ($.AMUI && $.AMUI.validator) {
|
||||
$.AMUI.validator.patterns.sort = /^([0-9]+)$/;
|
||||
}
|
||||
$("#tmpForm").validator({
|
||||
// 域通过验证时回调
|
||||
onValid: function (validity) {
|
||||
$(validity.field).closest('.am-form-group').find('.am-alert').hide();
|
||||
},
|
||||
// 域验证通过时添加的操作,通过该接口可定义各种验证提示
|
||||
markValid: function (validity) {
|
||||
// this is Validator instance
|
||||
var $field = $(validity.field);
|
||||
//add by zxl,只对有required属性的字段进行验证
|
||||
if (typeof ($field.attr("required")) != "undefined") {
|
||||
var options = this.options;
|
||||
var $parent = $field.closest('.am-form-group');
|
||||
$field.addClass(options.validClass).removeClass(options.inValidClass);
|
||||
|
||||
$parent.addClass('am-form-success').removeClass('am-form-error');
|
||||
|
||||
options.onValid.call(this, validity);
|
||||
}
|
||||
},
|
||||
// 验证出错时的回调, validity 对象包含相关信息,格式通 H5 表单元素的 validity 属性
|
||||
onInValid: function (validity) {
|
||||
var $field = $(validity.field);
|
||||
var $group = $field.closest('.am-form-group');
|
||||
var $alert = $group.find('.am-alert');
|
||||
// 使用自定义的提示信息 或 插件内置的提示信息
|
||||
var msg = $field.data('validationMessage') || this.getValidationMessage(validity);
|
||||
|
||||
if (!$alert.length) {
|
||||
$alert = $("<div class='am-alert am-alert-danger'></div>").hide().appendTo($group.find(".input-msg"));
|
||||
}
|
||||
console.log("onInValid : " + $field.val());
|
||||
$alert.html(msg).show();
|
||||
},
|
||||
//自定义验证
|
||||
validate: function (validity) {
|
||||
var $field = $(validity.field);
|
||||
var validityIdCard = function () {
|
||||
var settle = $("#incomeDeviceSettleTotal").val();
|
||||
var budget = $("#incomeDeviceBudgetTotal").val();
|
||||
|
||||
if (settle > budget) {
|
||||
$myField = $field;
|
||||
myMsg = "身份证信息不合法!";
|
||||
validity.valid = false;
|
||||
}
|
||||
};
|
||||
if ($(validity.field).is('#incomeDeviceSettleTotal')) {
|
||||
validityIdCard();
|
||||
};
|
||||
}
|
||||
});
|
||||
/*表单验证:end*/
|
||||
});
|
||||
|
||||
<script src="${base}/assets/js/project_settle_valid.js"></script>
|
||||
<script>
|
||||
// layui.use('laydate', function(){
|
||||
// var laydate = layui.laydate;
|
||||
//
|
||||
|
@ -488,16 +432,28 @@
|
|||
|
||||
$(function () {
|
||||
calculateSettle();
|
||||
|
||||
$("#saveSettle").click(function () {
|
||||
$("#pmsForm").attr("action","${base}/project/settle/save");
|
||||
$("#pmsForm").submit();
|
||||
var result = valid();
|
||||
console.log(result);
|
||||
if (result) {
|
||||
console.log("result: " + result);
|
||||
$("#pmsForm").attr("action", "${base}/project/settle/save");
|
||||
$("#pmsForm").submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#saveApprove").click(function () {
|
||||
$("#pmsForm").attr("action",base+"/project/settle/saveAndApprove");
|
||||
$("#pmsForm").submit();
|
||||
var result = valid();
|
||||
if (result) {
|
||||
$("#pmsForm").attr("action",base+"/project/settle/saveAndApprove");
|
||||
$("#pmsForm").submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目结算表</strong> / <small>${project.name}</small></div>
|
||||
</div>
|
||||
|
||||
<form method="post" class="am-form" id="pmsForm" action="${base}/project/settleAdd">
|
||||
<form method="post" class="am-form" id="pmsForm">
|
||||
<!--选项卡(tabs)begin-->
|
||||
<div class="am-tabs am-margin" data-am-tabs>
|
||||
<ul class="am-tabs-nav am-nav am-nav-tabs">
|
||||
|
@ -34,6 +34,7 @@
|
|||
<div class="am-tabs-bd">
|
||||
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
|
||||
<input name="id" id="id" type="hidden" value="${project.id}" />
|
||||
<input name="salary" id="salary" type="hidden" value="${Utils.format(salary,'0')}" />
|
||||
<div class="am-u-sm-10">
|
||||
<div class="am-form am-form-inline">
|
||||
<div class="am-form-group am-form-icon">
|
||||
|
@ -62,7 +63,7 @@
|
|||
<td><input name="incomeDeviceBudgetTotal" type="number" value="${Utils.format(budgetBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类预算总额"></td>
|
||||
<td><input name="incomeDeviceFormerSettleTotal" type="number" value="${Utils.format(formerBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="incomeDevice" value="${Utils.format(monthBean.incomeDevice,'0')}" required title="本月结算金额"></td>
|
||||
<td><input type="number" name="incomeDeviceSettleTotal" value="${Utils.format(currentBean.incomeDeviceTaxExclude,'0')}" readonly title="设备类结算总额"></td>
|
||||
<td><input type="number" name="incomeDeviceSettleTotal" value="${Utils.format(currentBean.incomeDeviceTaxExclude,'0')}" readonly title="设备类结算总额" data-validate-async data-validation-message="结算总额不能大于预算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>收入</td>
|
||||
|
@ -153,7 +154,8 @@
|
|||
<td><input name="costProjectManageEstimateTotal" type="number" value="${Utils.format(estimateBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本概算总额"></td>
|
||||
<td><input name="costProjectManageBudgetTotal" type="number" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本预算总额"></td>
|
||||
<td><input name="costProjectManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costProjectManageTaxExclude,'0')}" required readonly title="项目管理成本上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costProjectManage" value="${Utils.format(monthBean.costProjectManage,'0')}" required title="项目管理成本本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costProjectManage" value="${Utils.format(monthBean.costProjectManage,'0')}" required title="项目管理成本本月结算金额">
|
||||
<span>人力成本:${Utils.format(salary,'0')} 元</span>
|
||||
<td><input type="number" name="costProjectManageSettleTotal" value="${Utils.format(currentBean.costProjectManageTaxExclude,'0')}" readonly title="项目管理成本结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -246,7 +248,7 @@
|
|||
<td><input name="grossProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利概算总额"></td>
|
||||
<td><input name="grossProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利预算总额"></td>
|
||||
<td><input name="grossProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.grossProfit,'0')}" required readonly title="项目毛利上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="grossProfit" value="${Utils.format(monthBean.grossProfit,'0')}" required title="项目毛利本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="grossProfit" value="${Utils.format(monthBean.grossProfit,'0')}" readonly required title="项目毛利本月结算金额"></td>
|
||||
<td><input type="number" name="grossProfitSettleTotal" value="${Utils.format(currentBean.grossProfit,'0')}" readonly title="项目毛利结算总额"></td>
|
||||
<td><input name="grossProfitProfitMargin" type="number" value="${Utils.format(100 * currentBean.grossProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目毛利利润率"></td>
|
||||
</tr>
|
||||
|
@ -255,7 +257,7 @@
|
|||
<td><input name="contributionProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润概算总额"></td>
|
||||
<td><input name="contributionProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润预算总额"></td>
|
||||
<td><input name="contributionProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.contributionProfit,'0')}" required readonly title="项目贡献利润上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="contributionProfit" value="${Utils.format(monthBean.contributionProfit,'0')}" required title="项目贡献利润本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="contributionProfit" value="${Utils.format(monthBean.contributionProfit,'0')}" readonly required title="项目贡献利润本月结算金额"></td>
|
||||
<td><input type="number" name="contributionProfitSettleTotal" value="${Utils.format(currentBean.contributionProfit,'0')}" readonly title="项目贡献利润结算总额"></td>
|
||||
<td><input name="contributionProfitProfitMargin" type="number" value="${Utils.format(100 * currentBean.contributionProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目贡献利润利润率"></td>
|
||||
</tr>
|
||||
|
@ -264,7 +266,7 @@
|
|||
<td>/</td>
|
||||
<td><input name="netProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.netProfitTaxExclude,'0')}" required readonly title="项目净利润预算总额"></td>
|
||||
<td><input name="netProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.netProfit,'0')}" required readonly title="项目净利润上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netProfit" value="${Utils.format(monthBean.netProfit,'0')}" required title="项目净利润本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netProfit" value="${Utils.format(monthBean.netProfit,'0')}" readonly required title="项目净利润本月结算金额"></td>
|
||||
<td><input type="number" name="netProfitSettleTotal" value="${Utils.format(currentBean.netProfit,'0')}" readonly title="项目净利润结算总额"></td>
|
||||
<td><input name="netProfitProfitMargin" type="number" value="${Utils.format(100 * currentBean.netProfit / currentBean.getIncomeTotalTaxExclude(),'0')}" readonly title="项目净利润利润率"></td>
|
||||
</tr>
|
||||
|
@ -327,7 +329,7 @@
|
|||
<td>经营活动产生的现金流量净额</td>
|
||||
<td><input name="netCashFlowBudget" type="number" value="${Utils.format(cashFlowBean.getNetCashFlow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="netCashFlowFormerSettle" type="number" value="${Utils.format(formerBean.netCashFlow,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFlow" value="${Utils.format(monthBean.netCashFlow,'0')}" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFlow" value="${Utils.format(monthBean.netCashFlow,'0')}" readonly required title="本月结算金额"></td>
|
||||
<td><input name="netCashFlowSettle" type="number" value="${Utils.format(currentBean.netCashFlow,'0')}" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -348,7 +350,7 @@
|
|||
<td>投资活动产生的现金流量净额</td>
|
||||
<td>/</td>
|
||||
<td><input name="netCashFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.netCashFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFromInvestingActivities" value="${Utils.format(monthBean.netCashFromInvestingActivities,'0')}" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFromInvestingActivities" value="${Utils.format(monthBean.netCashFromInvestingActivities,'0')}" readonly required title="本月结算金额"></td>
|
||||
<td><input name="netCashFromInvestingActivitiesSettle" type="number" value="${Utils.format(currentBean.netCashFromInvestingActivities,'0')}" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -369,14 +371,14 @@
|
|||
<td>筹资活动产生的现金流量净额</td>
|
||||
<td><input name="financingCapitalCashflowBudget" type="number" value="${Utils.format(cashFlowBean.getFinancingCapitalCashflow(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="financingCapitalCashflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalCashflow,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalCashflow" value="${Utils.format(monthBean.financingCapitalCashflow,'0')}" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalCashflow" value="${Utils.format(monthBean.financingCapitalCashflow,'0')}" readonly required title="本月结算金额"></td>
|
||||
<td><input name="financingCapitalCashflowSettle" type="number" value="${Utils.format(currentBean.financingCapitalCashflow,'0')}" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>货币资金净增加额</td>
|
||||
<td><input name="netIncreaseMonetaryFundsBudget" type="number" value="${Utils.format(cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="预算总额"></td>
|
||||
<td><input name="netIncreaseMonetaryFundsFormerSettle" type="number" value="${Utils.format(formerBean.netIncreaseMonetaryFunds,'0')}" required readonly title="上月结算总额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netIncreaseMonetaryFunds" value="${Utils.format(monthBean.netIncreaseMonetaryFunds,'0')}" required title="本月结算金额"></td>
|
||||
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netIncreaseMonetaryFunds" value="${Utils.format(monthBean.netIncreaseMonetaryFunds,'0')}" readonly required title="本月结算金额"></td>
|
||||
<td><input name="netIncreaseMonetaryFundsSettle" type="number" value="${Utils.format(currentBean.netIncreaseMonetaryFunds,'0')}" readonly title="结算总额"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -407,10 +409,11 @@
|
|||
<script>
|
||||
var base = "${base}";
|
||||
</script>
|
||||
<#-- <script src="${base}/layui/layui.js"></script>-->
|
||||
<script src="${base}/layui/layui.js"></script>
|
||||
<script src="${base}/assets/js/project_common.js"></script>
|
||||
<script src="${base}/assets/js/project_settle.js"></script>
|
||||
<script>
|
||||
<script src="${base}/assets/js/project_settle_valid.js"></script>
|
||||
<script>
|
||||
// layui.use('laydate', function(){
|
||||
// var laydate = layui.laydate;
|
||||
//
|
||||
|
@ -425,18 +428,32 @@
|
|||
// });
|
||||
// });
|
||||
|
||||
|
||||
$(function () {
|
||||
calculateSettle();
|
||||
$("#saveSettle").click(function () {
|
||||
$("#pmsForm").attr("action","${base}/project/settle/save");
|
||||
$("#pmsForm").submit();
|
||||
});
|
||||
|
||||
$("#saveApprove").click(function () {
|
||||
$("#saveSettle").click(function () {
|
||||
var result = valid();
|
||||
console.log(result);
|
||||
if (result) {
|
||||
console.log("result: " + result);
|
||||
$("#pmsForm").attr("action", "${base}/project/settle/save");
|
||||
$("#pmsForm").submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#saveApprove").click(function () {
|
||||
var result = valid();
|
||||
if (result) {
|
||||
$("#pmsForm").attr("action",base+"/project/settle/saveAndApprove");
|
||||
$("#pmsForm").submit();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</@defaultLayout.layout>
|
|
@ -28,8 +28,8 @@
|
|||
<span></span>
|
||||
</div>
|
||||
<div class="time-axis-title"> ${node.roleName}-${node.assigneeName}:
|
||||
<#if node.taskIndex!=2 && node.taskStatus==2>审批通过</#if>
|
||||
<#if node.taskIndex!=2 && node.taskStatus==3>审批不通过</#if>
|
||||
<#if node.taskIndex!=2 && node.taskStatus==2>审核通过</#if>
|
||||
<#if node.taskIndex!=2 && node.taskStatus==3>审核不通过</#if>
|
||||
</div>
|
||||
<div class="time-axis-title">
|
||||
${node.taskComment}
|
||||
|
|
|
@ -34,6 +34,21 @@
|
|||
<div class="am-u-sm-2 am-u-md-4 input-msg" id="role_name_valid"></div>
|
||||
</div>
|
||||
|
||||
<div class="am-g am-form-group am-margin-top" style="display: flex;">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right">
|
||||
<span style="color: red;">*</span>角色等级</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<select data-am-selected="{btnWidth: '40%', btnSize: 'sm'" id="level" name="level">
|
||||
<option value="1" <#if role.level! ==1>selected</#if> >一级</option>
|
||||
<option value="2" <#if role.level! ==2>selected</#if> >二级</option>
|
||||
<option value="3" <#if role.level! ==3>selected</#if> >三级</option>
|
||||
<option value="4" <#if role.level! ==4>selected</#if> >四级</option>
|
||||
<option value="5" <#if role.level! ==5>selected</#if> >五级</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="roleLevel" name="roleLevel" value='1' />
|
||||
<!--radio begin-->
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<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-date">创建日期</th>
|
||||
<th class="table-date">最后更新日期</th>
|
||||
|
@ -65,6 +66,19 @@
|
|||
<input type="checkbox" name="ids" value="${list.id}"/>
|
||||
</td>
|
||||
<td>${list.name!}</td>
|
||||
<td>
|
||||
<#if list.level ==1 >
|
||||
一级
|
||||
<#elseif list.level ==2>
|
||||
二级
|
||||
<#elseif list.level ==3>
|
||||
三级
|
||||
<#elseif list.level ==4>
|
||||
四级
|
||||
<#elseif list.level ==5>
|
||||
五级
|
||||
</#if>
|
||||
</td>
|
||||
<td>
|
||||
<#if list.isEnable ==1 >
|
||||
是
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<#assign base=request.contextPath />
|
||||
<div class="am-u-sm-10">
|
||||
<div class="am-form am-form-inline">
|
||||
<div class="am-form-group am-form-icon">
|
||||
<input type="text" id="time" autocomplete="off" value="${time!}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../assets/js/jquery.ajaxfileupload.js"></script>
|
||||
<script src="../assets/js/amazeui.switch.js"></script>
|
||||
<script src="${base}/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use('laydate', function(){
|
||||
var laydate = layui.laydate;
|
||||
|
||||
laydate.render({
|
||||
elem: '#time',
|
||||
type: 'month',
|
||||
btns: ['confirm'],
|
||||
trigger: 'click',
|
||||
ready: function(date){
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue