diff --git a/ruoyi-ui/src/views/project/costOutput/costContract.vue b/ruoyi-ui/src/views/project/costOutput/costContract.vue
index b7b91497..003f3266 100644
--- a/ruoyi-ui/src/views/project/costOutput/costContract.vue
+++ b/ruoyi-ui/src/views/project/costOutput/costContract.vue
@@ -3,49 +3,62 @@
- {{ costType==11? '工程进度款支付明细':'支付明细'}}
+ {{ costType == 11 ? '工程进度款支付明细' : '支付明细' }}
增加期数
-
@@ -53,10 +66,12 @@
diff --git a/ruoyi-ui/src/views/project/costOutput/costOutputDrawer.vue b/ruoyi-ui/src/views/project/costOutput/costOutputDrawer.vue
index bb1e920d..2d6d74ce 100644
--- a/ruoyi-ui/src/views/project/costOutput/costOutputDrawer.vue
+++ b/ruoyi-ui/src/views/project/costOutput/costOutputDrawer.vue
@@ -11,7 +11,8 @@
-
+
万元
@@ -127,6 +128,7 @@ export default {
contract: [],//合同金额明细
safety: [],//安措支付明细
loading: false,
+ depts: [],
};
},
@@ -139,9 +141,12 @@ export default {
costSafetyChange(datas) {
let m2sum = 0;
let m3sum = 0;
- datas.forEach(d => {
- m2sum += d.money2;
- m3sum += d.money3;
+ datas.forEach(d => {
+ let tmps=d.dataList12;
+ tmps.forEach(it=>{
+ m2sum += it.money2;
+ m3sum += it.money3;
+ });
});
this.form.safety2.money = m2sum;
this.form.safety3.money = m3sum;
@@ -149,21 +154,33 @@ export default {
handleClick(tab, event) {
},
checkData() {
- if (!this.$refs.costContract.checkData()) {
- this.activeName = "second";
- return false;
- }
- if (!this.$refs.costSafety.checkData()) {
- this.activeName = "third";
- return false;
+ if(this.activeName == 'third'){
+ if (!this.$refs.costSafety.checkData()) {
+ this.activeName = "third";
+ return false;
+ }
+ if (!this.$refs.costContract.checkData()) {
+ this.activeName = "second";
+ return false;
+ }
+ }else{
+ if (!this.$refs.costContract.checkData()) {
+ this.activeName = "second";
+ return false;
+ }
+ if (!this.$refs.costSafety.checkData()) {
+ this.activeName = "third";
+ return false;
+ }
}
+
+
return true;
},
doSave() {
if (!this.checkData()) {
return;
}
-
let objs = this.oldData.filter(d => d.costType != 11 && d.costType != 12).map(it => {
let obj = { ...it };
obj.money = obj.money ? obj.money * 10000 : 0;
@@ -173,14 +190,14 @@ export default {
this.$message.error("请检查,金额不能为负数!");
return;
}
- let contractObjs = this.$refs.costContract.dataList.map(it => {
+ let contractObjs = this.$refs.costContract.getDataList().map(it => {
let obj = { ...it };
obj.money = obj.money ? obj.money * 10000 : 0;
obj.money2 = obj.money2 ? obj.money2 * 10000 : 0;
obj.date1 = this.$dt(obj.date1).format("YYYY-MM-DD");
return obj;
});
- let safetyObjs = this.$refs.costSafety.dataList.map(it => {
+ let safetyObjs = this.$refs.costSafety.getDataList().map(it => {
let obj = { ...it };
obj.money = obj.money ? obj.money * 10000 : 0;
obj.money2 = obj.money2 ? obj.money2 * 10000 : 0;
@@ -214,7 +231,7 @@ export default {
},
loadData(init) {
- listByProjectId(this.prj.id).then((d) => {
+ listByProjectId(this.prj.id).then((d) => {
let tmps = (d.data || []).map(it => {
it.money = it.money ? it.money / 10000.0 : 0;
it.money2 = it.money2 ? it.money2 / 10000.0 : 0;
@@ -254,8 +271,8 @@ export default {
setTimeout(() => {
this.$refs.costYear.init(this.yearInv, this.prj);
this.$refs.costMonth.init(this.monthInv, this.prj);
- this.$refs.costContract.init(this.contract, this.prj, 11);
- this.$refs.costSafety.init(this.safety, this.prj, 12);
+ this.$refs.costContract.init(this.contract, this.prj, 11, this.depts);
+ this.$refs.costSafety.init(this.safety, this.prj, 12, this.depts);
}, 400)
});
},
@@ -272,11 +289,26 @@ export default {
tmps.push(obj);
return obj;
},
+ loadSub(cb) {
+ this.$api.publics.queryUnitList({
+ projectId: this.prj.id,
+ unitTypes: "2".split(","),
+ }).then((d) => {
+ this.depts = (d.rows || []).map(it => {
+ it.dataList11 = [];
+ it.dataList12 = [];
+ return it;
+ });
+ cb && cb();
+ });
+ },
show(prj) {
this.prj = prj;
this.title = prj.projectName;
this.isOpen = true;
- this.loadData(true);
+ this.loadSub(() => {
+ this.loadData(true);
+ });
},
},
};
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectCostOutput.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectCostOutput.java
index cb3cfe02..badceabc 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectCostOutput.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectCostOutput.java
@@ -29,6 +29,25 @@ public class SurProjectCostOutput extends BaseEntity
@Excel(name = "金额")
private Long money;
+ public String getDeptName() {
+ return deptName;
+ }
+
+ public void setDeptName(String deptName) {
+ this.deptName = deptName;
+ }
+
+ private String deptName;
+ public Long getDeptId() {
+ return deptId;
+ }
+
+ public void setDeptId(Long deptId) {
+ this.deptId = deptId;
+ }
+
+ private Long deptId;
+
/** 年份 */
@Excel(name = "年份")
private Long year;
diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectCostOutputMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectCostOutputMapper.xml
index 2a59d7c0..ce72fb2d 100644
--- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectCostOutputMapper.xml
+++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectCostOutputMapper.xml
@@ -20,16 +20,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
- select id, project_id, money, year, month, cost_type, remark, is_del, create_by, create_time, update_by, update_time,money2,date1,date2 from sur_project_cost_output
+ select id, project_id, money, year, month, cost_type, remark, is_del, create_by, create_time, update_by, update_time,money2,date1,date2,deptId from sur_project_cost_output