Merge remote-tracking branch 'origin/1.2.0' into 1.2.0
commit
925653e024
|
@ -28,7 +28,7 @@ public class ProcurementDetail {
|
||||||
|
|
||||||
private String contractParty;
|
private String contractParty;
|
||||||
|
|
||||||
private int isUnderwritten;
|
private boolean isUnderwritten;
|
||||||
private String isUnderwrittenDesc;
|
private String isUnderwrittenDesc;
|
||||||
|
|
||||||
private BigDecimal underwrittenAmount;
|
private BigDecimal underwrittenAmount;
|
||||||
|
@ -60,8 +60,9 @@ public class ProcurementDetail {
|
||||||
|
|
||||||
private Integer amountId;
|
private Integer amountId;
|
||||||
|
|
||||||
public void setIsUnderwritten(int isUnderwritten) {
|
public void setIsUnderwritten(boolean isUnderwritten) {
|
||||||
this.isUnderwritten = isUnderwritten;
|
this.isUnderwritten = isUnderwritten;
|
||||||
this.isUnderwrittenDesc = isUnderwritten == 1 ? "是" : "否";
|
this.isUnderwrittenDesc = isUnderwritten ? "是" : "否";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,7 +296,7 @@ public class ProjectProcessService {
|
||||||
for (BudgetPurchaseAmount amount : purchaseAmount) {
|
for (BudgetPurchaseAmount amount : purchaseAmount) {
|
||||||
ProjectBudgetCostDetail costDetail = getCostDetailById(amount.getBudgetCostId());
|
ProjectBudgetCostDetail costDetail = getCostDetailById(amount.getBudgetCostId());
|
||||||
ProcurementDetail detail = new ProcurementDetail();
|
ProcurementDetail detail = new ProcurementDetail();
|
||||||
BeanUtils.copyProperties(costDetail, detail);
|
BeanUtils.copyProperties(costDetail, detail, "isUnderwritten");
|
||||||
|
|
||||||
Integer amountId = amount.getId();
|
Integer amountId = amount.getId();
|
||||||
// 找对应 预算采购明细的数量记录 的采购详情
|
// 找对应 预算采购明细的数量记录 的采购详情
|
||||||
|
@ -314,6 +314,7 @@ public class ProjectProcessService {
|
||||||
}
|
}
|
||||||
detail.setAmountLeft(allAmount.subtract(amountAlready));
|
detail.setAmountLeft(allAmount.subtract(amountAlready));
|
||||||
detail.setAmountCurrent(amount.getAmountCurrent());
|
detail.setAmountCurrent(amount.getAmountCurrent());
|
||||||
|
detail.setIsUnderwritten(isProjectPrepaid(projectId));
|
||||||
ret.add(detail);
|
ret.add(detail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,7 +322,7 @@ public class ProjectProcessService {
|
||||||
List<ProjectBudgetCostDetail> costDetails = getCostDetails(projectId);
|
List<ProjectBudgetCostDetail> costDetails = getCostDetails(projectId);
|
||||||
for (ProjectBudgetCostDetail costDetail : costDetails) {
|
for (ProjectBudgetCostDetail costDetail : costDetails) {
|
||||||
ProcurementDetail detail = new ProcurementDetail();
|
ProcurementDetail detail = new ProcurementDetail();
|
||||||
BeanUtils.copyProperties(costDetail, detail);
|
BeanUtils.copyProperties(costDetail, detail, "isUnderwritten");
|
||||||
// 可能为 0
|
// 可能为 0
|
||||||
BigDecimal amountAlready = getAmountAlready(costDetail.getId());
|
BigDecimal amountAlready = getAmountAlready(costDetail.getId());
|
||||||
detail.setAmountAlready(amountAlready);
|
detail.setAmountAlready(amountAlready);
|
||||||
|
@ -333,6 +334,7 @@ public class ProjectProcessService {
|
||||||
// TODO 查询太频繁
|
// TODO 查询太频繁
|
||||||
detail.setCategory(getCategory(costDetail));
|
detail.setCategory(getCategory(costDetail));
|
||||||
detail.setBudgetCostId(costDetail.getId());
|
detail.setBudgetCostId(costDetail.getId());
|
||||||
|
detail.setIsUnderwritten(isProjectPrepaid(projectId));
|
||||||
ret.add(detail);
|
ret.add(detail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -500,7 +502,14 @@ public class ProjectProcessService {
|
||||||
* 是否垫资
|
* 是否垫资
|
||||||
*/
|
*/
|
||||||
public boolean isProjectPrepaid(Project project) {
|
public boolean isProjectPrepaid(Project project) {
|
||||||
return BigDecimal.ZERO.equals(getProjectRepaidAmount(project.getId()));
|
return isProjectPrepaid(project.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否垫资
|
||||||
|
*/
|
||||||
|
public boolean isProjectPrepaid(Integer projectId) {
|
||||||
|
return isProjectPrepaid(getProjectRepaidAmount(projectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="垫资金额" v-if="processForm.isPrepaid!=='否'">
|
<el-form-item label="垫资金额" v-if="processForm.isPrepaid!=='否'">
|
||||||
<span>{{processForm.repaidAmount}}元</span>
|
<span>{{processForm.repaidAmount|numberFormat}}元</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="预算毛利率">
|
<el-form-item label="预算毛利率">
|
||||||
|
@ -263,7 +263,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="totalAmount" label="合计金额" width="160" align="center">
|
<el-table-column prop="totalAmount" label="合计金额" width="160" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number size="mini" :precision="2" :step="0.1" :max="100" :min="0"
|
<el-input-number size="mini" :precision="2" :step="0.1" :max="100000000000000" :min="0"
|
||||||
v-model="scope.row.totalAmount" controls-position="right"></el-input-number>
|
v-model="scope.row.totalAmount" controls-position="right"></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
@ -305,7 +305,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="垫资金额" v-if="processForm.isPrepaid!=='否'">
|
<el-form-item label="垫资金额" v-if="processForm.isPrepaid!=='否'">
|
||||||
<span v-if="projectSelected">{{processForm.repaidAmount}}</span>
|
<span v-if="projectSelected">{{processForm.repaidAmount|numberFormat}}</span>
|
||||||
<span v-else>未选择项目</span>
|
<span v-else>未选择项目</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="totalAmount" label="合计金额" width="160" align="center">
|
<el-table-column prop="totalAmount" label="合计金额" width="160" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number size="mini" :precision="2" :step="0.1" :max="100" :min="0"
|
<el-input-number size="mini" :precision="2" :step="0.1" :max="100000000000000" :min="0"
|
||||||
v-model="scope.row.totalAmount"></el-input-number>
|
v-model="scope.row.totalAmount"></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -974,7 +974,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
if (this.projectType === procurementContract) {
|
if (this.processType === procurementContract) {
|
||||||
// 只有 采购合同重置 合同金额 (因为要根据合同清单明细计算)
|
// 只有 采购合同重置 合同金额 (因为要根据合同清单明细计算)
|
||||||
this.initForm({ ...form, contractAmount: 0 })
|
this.initForm({ ...form, contractAmount: 0 })
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,7 +409,7 @@
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 'sale_contract':
|
case 'sale_contract':
|
||||||
return "销售合同流程"
|
return "销售合同流程"
|
||||||
case 'business_procurement':
|
case 'procurement_contract':
|
||||||
return "业务采购流程"
|
return "业务采购流程"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue