Commit 5534011b authored by huangjie's avatar huangjie

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 6c51751f d7ee9ea3
...@@ -140,9 +140,8 @@ public class CbProjectFileServiceImpl extends ServiceImpl<CbProjectFileMapper, C ...@@ -140,9 +140,8 @@ public class CbProjectFileServiceImpl extends ServiceImpl<CbProjectFileMapper, C
Assert.isFalse(fileParseStatus.equals(CbProjectConstants.PROJECT_FILE_STATUS_PARSING), Assert.isFalse(fileParseStatus.equals(CbProjectConstants.PROJECT_FILE_STATUS_PARSING),
"文件正在解析中,不允许删除"); "文件正在解析中,不允许删除");
//解析成功、解析失败的文件需要删除对应的导入数据和每月成本数据 //解析成功的文件需要删除对应的导入数据和每月成本数据
if (fileParseStatus.equals(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS) || if (fileParseStatus.equals(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS)) {
fileParseStatus.equals(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL)) {
switch (deleteBo.getCbType()) { switch (deleteBo.getCbType()) {
case CbProjectConstants.CB_TYPE_DIRECT_EXPENSE: case CbProjectConstants.CB_TYPE_DIRECT_EXPENSE:
//直接费没有每月成本,所以直接删除导入数据即可 //直接费没有每月成本,所以直接删除导入数据即可
......
...@@ -164,6 +164,15 @@ public class CbProjectRecordServiceImpl extends ServiceImpl<CbProjectRecordMappe ...@@ -164,6 +164,15 @@ public class CbProjectRecordServiceImpl extends ServiceImpl<CbProjectRecordMappe
* @param cbTypeName 成本类型名称 * @param cbTypeName 成本类型名称
*/ */
private List<CbProjectFile> checkCbTypeExistFile(Long projectId, Integer cbType, String cbTypeName) { private List<CbProjectFile> checkCbTypeExistFile(Long projectId, Integer cbType, String cbTypeName) {
//如果当前成本类型下已存在解析成功的文件,则跳过校验
if (!projectFileMapper.selectList(new LambdaQueryWrapper<CbProjectFile>()
.eq(CbProjectFile::getProjectId, projectId)
.eq(CbProjectFile::getCbType, cbType)
//项目文件状态:准备中or解析失败
.eq(CbProjectFile::getFileParseStatus, CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS)).isEmpty()) {
return new ArrayList<>();
}
List<CbProjectFile> projectFileList = projectFileMapper.selectList(new LambdaQueryWrapper<CbProjectFile>() List<CbProjectFile> projectFileList = projectFileMapper.selectList(new LambdaQueryWrapper<CbProjectFile>()
.eq(CbProjectFile::getProjectId, projectId) .eq(CbProjectFile::getProjectId, projectId)
.eq(CbProjectFile::getCbType, cbType) .eq(CbProjectFile::getCbType, cbType)
......
...@@ -272,8 +272,10 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject> ...@@ -272,8 +272,10 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
return baseMapper.exists(new LambdaQueryWrapper<DProject>() return baseMapper.exists(new LambdaQueryWrapper<DProject>()
.eq(DProject::getProjectCode, projectCode)); .eq(DProject::getProjectCode, projectCode));
} else { } else {
//修改项目信息or新增新阶段项目时
CbProjectRecord projectRecord = projectRecordMapper.selectById(projectId); CbProjectRecord projectRecord = projectRecordMapper.selectById(projectId);
//未做任何改动时
Assert.isFalse(projectCode.equals(projectRecord.getIpmProjectNo()), "新编码与旧编码相同");
//修改项目信息or新增新阶段项目时
if (projectCode.equals(projectRecord.getIpmProjectNo()) if (projectCode.equals(projectRecord.getIpmProjectNo())
&& projectRecord.getIsGetProjectDetail()) { && projectRecord.getIsGetProjectDetail()) {
return true; return true;
......
<template> <template>
<div class="custom-table-list-com-ins" <div class="custom-table-list-com-ins"
:class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams,'auto-max-height' : maxHeight,'has-y-Scroll' : maxHeight && hasYScroll}" :class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams,'auto-max-height' : maxHeight,'has-y-scroll' : maxHeight && hasYScroll,'has-x-scroll' : maxHeight && hasXScroll}"
:style="maxBodyFixedStyle"> :style="maxBodyFixedStyle">
<div class="custom-table-item"> <div class="custom-table-item">
<el-table v-if="tableDataTotal>0" class="custom-table" v-loading="comTableLoading" :data="tableData" element-loading-text="加载中" <el-table v-if="tableDataTotal>0" class="custom-table" v-loading="comTableLoading" :data="tableData" element-loading-text="加载中"
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
comMaxBodyHeight: 0, comMaxBodyHeight: 0,
headerLastBlockHeight: 0, headerLastBlockHeight: 0,
hasYScroll: false, hasYScroll: false,
hasXScroll: false,
observer: null, observer: null,
resizeTimer: null, resizeTimer: null,
comTableLoading: this.tableLoading comTableLoading: this.tableLoading
...@@ -245,27 +246,32 @@ export default { ...@@ -245,27 +246,32 @@ export default {
} }
// 列表自适应高度 // 列表自适应高度
this.comMaxHeight = containerMaxHeight ? `${containerMaxHeight}px` : null; this.comMaxHeight = containerMaxHeight ? `${containerMaxHeight}px` : null;
// 重新计算表格高度 减去滚动条高度差 16 - 6 有固定列的情况 // 重新计算表格高度 有横向滚动条则需要减去滚动条高度差 16 - 6 有固定列的情况
if (containerMaxHeight) { if (containerMaxHeight) {
/** /**
* @type {HTMLDivElement} * @type {HTMLDivElement}
*/ */
const tableRightHeader = this.$el.querySelector(".el-table__fixed-header-wrapper"); const tableFixedHeader = this.$el.querySelector(".el-table__fixed-header-wrapper");
if (tableRightHeader) { if (tableFixedHeader) {
const headerHeight = parseInt(window.getComputedStyle(tableRightHeader).height); const headerHeight = parseInt(window.getComputedStyle(tableFixedHeader).height);
// 未自适应下 正常表主体
const defaultTableBody = this.$el.querySelector(".el-table__body-wrapper");
// 是否有横向滚动条
const _hasXScroll = defaultTableBody.clientWidth >= defaultTableBody.scrollWidth ? false : true;
//原滚动条高度为6px 差 10px //原滚动条高度为6px 差 10px
const bodyMaxHeight = containerMaxHeight - headerHeight - 16; const bodyMaxHeight = containerMaxHeight - headerHeight - (_hasXScroll ? 16 : 0);
// console.log(bodyMaxHeight, "bodyMaxHeight"); // console.log(bodyMaxHeight, "bodyMaxHeight");
this.comMaxBodyHeight = bodyMaxHeight; this.comMaxBodyHeight = bodyMaxHeight;
// 表体 判断是否有竖向滚动条 容器 bodyMaxHeight 整体 最大高度大于 内部列表高度 则没有滚动条 // 表体 判断是否有 横竖向滚动条 容器 bodyMaxHeight 整体 最大高度宽度大于 内部列表高度宽度 则没有滚动条
const fixedTableBody = this.$el.querySelector(".el-table__fixed-body-wrapper"); const fixedTableBody = this.$el.querySelector(".el-table__fixed-body-wrapper");
// dom更新后 重新比较 高度 // dom更新后 重新比较 高度
await this.$nextTick(); await this.$nextTick();
// 拿到 固定列表体实际高度 包含滚动高度 // 拿到 固定列表体实际高度 包含滚动高度
const fixedBodyHeight = fixedTableBody.scrollHeight; const fixedBodyHeight = fixedTableBody.scrollHeight;
// console.log(bodyMaxHeight,"bodyMaxHeight"); // console.log(bodyMaxHeight,"bodyMaxHeight");
// console.log(parseFloat(fixedBodyHeight),"fixedBodyHeight"); // console.log(parseFloat(fixedBodyHeight),"fixedBodyHeight");
this.hasYScroll = bodyMaxHeight >= parseFloat(fixedBodyHeight) ? false : true; this.hasYScroll = bodyMaxHeight >= parseFloat(fixedBodyHeight) ? false : true;
this.hasXScroll = _hasXScroll;
} else { } else {
// 没有固定列 正常情况下 计算默认header高度 // 没有固定列 正常情况下 计算默认header高度
const defaultHeader = this.$el.querySelector(".el-table__header-wrapper"); const defaultHeader = this.$el.querySelector(".el-table__header-wrapper");
...@@ -278,6 +284,9 @@ export default { ...@@ -278,6 +284,9 @@ export default {
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
},
getsSimulateScrollBar() {
}, },
pagingHandler(hasQueryParams, queryParams, scope) { pagingHandler(hasQueryParams, queryParams, scope) {
// 有分页参数 // 有分页参数
...@@ -355,10 +364,10 @@ export default { ...@@ -355,10 +364,10 @@ export default {
} }
// 自动适配下 减去滚动条高度 // 自动适配下 减去滚动条高度
.el-table__fixed { .el-table__fixed {
height: calc(100% - 15px) !important; height: calc(100%) !important;
} }
.el-table__fixed-right { .el-table__fixed-right {
height: calc(100% - 15px) !important; height: calc(100%) !important;
} }
// 重新计算隐藏列表高度 减去滚动条16px高度 // 重新计算隐藏列表高度 减去滚动条16px高度
...@@ -369,7 +378,7 @@ export default { ...@@ -369,7 +378,7 @@ export default {
} }
// 是否存在Y轴滚动条 // 是否存在Y轴滚动条
&.has-y-Scroll { &.has-y-scroll {
::v-deep .custom-table-item { ::v-deep .custom-table-item {
.el-table { .el-table {
/* 右侧fixed列 */ /* 右侧fixed列 */
...@@ -382,6 +391,20 @@ export default { ...@@ -382,6 +391,20 @@ export default {
} }
} }
} }
// 是否存在X轴滚动条
&.has-x-scroll {
::v-deep .custom-table-item {
.el-table {
.el-table__fixed {
height: calc(100% - 15px) !important;
}
.el-table__fixed-right {
height: calc(100% - 15px) !important;
}
}
}
}
} }
/* 不需要分页 或没有分页参数 */ /* 不需要分页 或没有分页参数 */
...@@ -453,6 +476,14 @@ export default { ...@@ -453,6 +476,14 @@ export default {
font-size: 14px; font-size: 14px;
color: #232323; color: #232323;
.el-table-column--selection {
.cell {
display: flex;
align-items: center;
justify-content: center;
}
}
.cell { .cell {
padding-right: 12px; padding-right: 12px;
padding-left: 12px; padding-left: 12px;
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
<el-input v-model="pushForm.pushQuantities" @input="pushQuantitiesIpt" placeholder="请填写需推送工程量"></el-input> <el-input v-model="pushForm.pushQuantities" @input="pushQuantitiesIpt" placeholder="请填写需推送工程量"></el-input>
</el-form-item> </el-form-item>
<!-- ipm项目编码 --> <!-- ipm项目编码 -->
<el-form-item label="IPM项目编码"> <el-form-item label="IPM项目编码" prop="ipmProjectCode">
<el-input v-model="pushForm.ipmProjectCode" placeholder="请输入IPM项目编码"></el-input> <el-input v-model="pushForm.ipmProjectCode" placeholder="请输入IPM项目编码"></el-input>
</el-form-item> </el-form-item>
<!-- ipm合同编码 --> <!-- ipm合同编码 -->
<el-form-item label="IPM合同编码"> <el-form-item label="IPM合同编码" prop="ipmContractCode">
<el-input v-model="pushForm.ipmContractCode" placeholder="请输入IPM合同编码"></el-input> <el-input v-model="pushForm.ipmContractCode" placeholder="请输入IPM合同编码"></el-input>
</el-form-item> </el-form-item>
<!-- ipm作业编码 --> <!-- ipm作业编码 -->
<el-form-item label="IPM作业编码"> <el-form-item label="IPM作业编码" prop="ipmBizCode">
<el-input v-model="pushForm.ipmBizCode" placeholder="请输入IPM作业编码"></el-input> <el-input v-model="pushForm.ipmBizCode" placeholder="请输入IPM作业编码"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<!-- 底部按钮 --> <!-- 底部按钮 -->
<div class="dialog-footer-content"> <div class="dialog-footer-content">
<div class="footer-btn cancel-submit" @click="cancelSubmit">取消</div> <div class="footer-btn cancel-submit" @click="cancelSubmit">取消</div>
<div class="footer-btn ok-submit">确定推送</div> <div class="footer-btn ok-submit" @click="pushResult">确定推送</div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -87,7 +87,17 @@ export default { ...@@ -87,7 +87,17 @@ export default {
ipmContractCode: "", ipmContractCode: "",
ipmBizCode: "", ipmBizCode: "",
}, },
rules: {} rules: {
ipmProjectCode: [
{ required: true, trigger: ["blur", "change"], message: "请输入IPM项目编码", whitespace: true }
],
ipmContractCode: [
{ required: true, trigger: ["blur", "change"], message: "请输入IPM合同编码", whitespace: true }
],
ipmBizCode: [
{ required: true, trigger: ["blur", "change"], message: "请输入IPM作业编码", whitespace: true }
]
}
}; };
}, },
//可访问data属性 //可访问data属性
...@@ -133,6 +143,21 @@ export default { ...@@ -133,6 +143,21 @@ export default {
}, },
cancelSubmit() { cancelSubmit() {
this.comPushProjectUseDialog = false; this.comPushProjectUseDialog = false;
},
//推送工程量
pushResult() {
this.$refs["pushForm"].validate(flag => {
if (flag) {
const { id, pushQuantities, ipmProjectCode, ipmContractCode, ipmBizCode } = cloneDeep(this.pushForm);
this.$emit("submitPushData", {
id,
pushQuantities,
ipmProjectCode,
ipmContractCode,
ipmBizCode
});
}
});
} }
}, },
} }
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<template slot="action-field-bar" slot-scope="scope"> <template slot="action-field-bar" slot-scope="scope">
<div class="project-action-field-bar"> <div class="project-action-field-bar">
<span class="push-project-use" :class="{'is-emty-quantities' : !parseFloat(scope.row.quantities)}" <span class="push-project-use" :class="{'is-emty-quantities' : !parseFloat(scope.row.quantities)}"
@click="parseFloat(scope.row.quantities) ? pushProjectUse(scope.row) : ''">推送物资用量</span> @click="parseFloat(scope.row.quantities) ? pushProjectUse(scope.row) : ''">推送物资</span>
</div> </div>
</template> </template>
</entity-materials-table> </entity-materials-table>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<!-- 推送工程量 , 推送物资 --> <!-- 推送工程量 , 推送物资 -->
<push-project-use-dialog v-model="pushProjectUseDialog" :is-entity-materials="isEntityMaterials" :row-data="pushProjectUseTemp" <push-project-use-dialog v-model="pushProjectUseDialog" :is-entity-materials="isEntityMaterials" :row-data="pushProjectUseTemp"
@dialogClose="dialogClose"></push-project-use-dialog> @dialogClose="dialogClose" @submitPushData="submitPushData"></push-project-use-dialog>
<!-- 单位换算弹窗 --> <!-- 单位换算弹窗 -->
<unit-conversion v-if="showUnitConversion" :isVisible="showUnitConversion" :dataList="unitConversionList" <unit-conversion v-if="showUnitConversion" :isVisible="showUnitConversion" :dataList="unitConversionList"
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
// 列表表头 // 列表表头
formColum: [ formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: false, uid: v4() }, { label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: false, uid: v4() },
{ label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4(), slot: true }, { label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4() },
{ label: '公司编码', prop: "companyNo", width: "137", uid: v4() }, { label: '公司编码', prop: "companyNo", width: "137", uid: v4() },
{ label: '集团编码', prop: "orgNo", width: "137", uid: v4() }, { label: '集团编码', prop: "orgNo", width: "137", uid: v4() },
{ label: '名称', prop: "cbName", width: "232", uid: v4() }, { label: '名称', prop: "cbName", width: "232", uid: v4() },
...@@ -230,8 +230,38 @@ export default { ...@@ -230,8 +230,38 @@ export default {
], ],
// 实体工程材料表头 // 实体工程材料表头
entityMaterialsFormColum: [ entityMaterialsFormColum: [
{ label: '多选', prop: "staticSerialNumber", type: "selection", lock: true, width: "53", fixed: false, uid: v4() }, { label: '多选', prop: "staticSerialNumber", type: "selection", lock: true, width: "53", fixed: "left", uid: v4() },
{ label: '操作', prop: "action-field-bar", width: "99", uid: v4(), fixed: "right" }, { label: '序号', prop: "staticIndexNumber", type: "index", lock: true, width: "53", fixed: "left", uid: v4() },
{ label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4() },
{ label: '公司编码', prop: "companyNo", width: "137", uid: v4() },
{ label: '集团编码', prop: "orgNo", width: "137", uid: v4() },
{ label: '名称', prop: "cbName", width: "232", uid: v4() },
{ label: '工作内容', prop: "jobContent", width: "341", uid: v4() },
{ label: '计算规则', prop: "calculationRule", width: "137", uid: v4() },
{ label: '单位', prop: "unit", width: "57", uid: v4() },
{ label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() },
{
label: '计划成本', prop: "jhcb", align: "center", uid: v4(), children: [
{ label: '指导价格', prop: "guidePrice", minWidth: "81", uid: v4() },
{ label: '投标选用单价(不含税)', prop: "bidUnitPrice", minWidth: "179", uid: v4() },
{ label: '单价差额', prop: "unitPriceDifference", minWidth: "81", uid: v4() },
{ label: '数量', prop: "quantity", minWidth: "150", uid: v4() },
{ label: '合价(不含税)', prop: "combinedPrice", minWidth: "150", uid: v4() },
{ label: '合价(含税)', prop: "combinedPriceTax", minWidth: "150", uid: v4() },
{ label: '品牌名称', prop: "brandName", minWidth: "81", uid: v4() },
{ label: '投标选用来源', prop: "bidSource", minWidth: "109", uid: v4() },
]
},
{
label: '实际成本', prop: "sjcb", align: "center", uid: v4(), children: [
{ label: '物料验收系统本月总量', prop: "quantities", minWidth: "180", uid: v4(), slot: true },
{ label: '换算后本月总量', prop: "conversionQuantities", minWidth: "160", uid: v4(), slot: true },
{ label: '截至本月总用量', prop: "totalQuantities", minWidth: "160", uid: v4(), slot: true },
{ label: '剩余物料', prop: "sss", minWidth: "160", uid: v4(), slot: true },
{ label: '填写时间', prop: "createTime", minWidth: "160", uid: v4(), slot: true },
]
},
{ label: '操作', prop: "action-field-bar", width: "120", uid: v4(), fixed: "right" },
], ],
// 已记录月份集合 // 已记录月份集合
monthList: [], monthList: [],
...@@ -488,23 +518,10 @@ export default { ...@@ -488,23 +518,10 @@ export default {
if (parentName) this.currentParentName = parentName; if (parentName) this.currentParentName = parentName;
this.resetTableData(); this.resetTableData();
// 实体工程材料 // 实体工程材料
const params = this.createRequestConditions(this.recordDate);
await this.getFeedSummaryList(params);
if (this.isEntityMaterials) { if (this.isEntityMaterials) {
const { projectId, cbStage } = this.comProjectDetailInfo;
const params = {
projectId,
cbStage
};
params["cbSubjectName"] = this.currentNodeName;
// 判断当月是否存在于server返回month集合中
const _now = this.getNowMonth();
if (this.includeNowMonth(_now)) {
params["recordDate"] = _now;
}
this.getFeedSummaryConversionNotice(params); this.getFeedSummaryConversionNotice(params);
} else {
// 非实体工程材料 获取数据
const params = this.createRequestConditions(this.recordDate);
this.getFeedSummaryList(params);
} }
}, },
async getFeedSummaryConversionNotice(params) { async getFeedSummaryConversionNotice(params) {
...@@ -674,15 +691,15 @@ export default { ...@@ -674,15 +691,15 @@ export default {
}, },
// 推送工程用量 // 推送工程用量
pushProjectUse(row) { pushProjectUse(row) {
if (!row.id) return; if (!row.actualId) return;
// 打开推送推送弹窗 // 打开推送推送弹窗
const _temp = { const _temp = {
...this.pushProjectUseTemp, ...{ ...this.pushProjectUseTemp, ...{
id: row.id, id: row.actualId,
projectName: this.projectDetailInfo.projectName, projectName: this.projectDetailInfo.projectName,
totalQuantities: row.totalQuantities, totalQuantities: row.totalQuantities,
pushQuantities: "", pushQuantities: "",
ipmProjectCode: "", ipmProjectCode: this.projectDetailInfo.ipmProjectNo,
ipmContractCode: "", ipmContractCode: "",
ipmBizCode: "" ipmBizCode: ""
} }
...@@ -694,6 +711,14 @@ export default { ...@@ -694,6 +711,14 @@ export default {
dialogClose() { dialogClose() {
this.pushProjectUseTemp = this.$options.data.call(this).pushProjectUseTemp; this.pushProjectUseTemp = this.$options.data.call(this).pushProjectUseTemp;
}, },
// 确定推送
async submitPushData(pushForm) {
try {
const result = await pushFeedSummaryRowsApi(pushForm);
} catch (error) {
}
},
differentCompare() { differentCompare() {
const originData = this.originTableDataList; const originData = this.originTableDataList;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment