Commit 6aa0d2e7 authored by chenyuefang's avatar chenyuefang

Merge remote-tracking branch 'origin/V20231129-中建一局二公司' into V20231129-中建一局二公司

parents ed4f45d9 4d97f944
...@@ -34,6 +34,10 @@ public class CbProjectOther implements Serializable { ...@@ -34,6 +34,10 @@ public class CbProjectOther implements Serializable {
* 父项id * 父项id
*/ */
private Long parentId; private Long parentId;
/**
* 层级数
*/
private Integer level;
/** /**
* 序号 * 序号
......
...@@ -109,6 +109,10 @@ public class CbProjectOtherImportVo { ...@@ -109,6 +109,10 @@ public class CbProjectOtherImportVo {
* 父项id * 父项id
*/ */
private Long parentId; private Long parentId;
/**
* 层级数
*/
private Integer level;
/** /**
* 处理后序号 * 处理后序号
*/ */
......
...@@ -131,6 +131,7 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper, ...@@ -131,6 +131,7 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
Assert.notNull(byId, "项目信息不能为空"); Assert.notNull(byId, "项目信息不能为空");
CbProjectOther projectOther = new CbProjectOther(); CbProjectOther projectOther = new CbProjectOther();
projectOther.setParentId(0L); projectOther.setParentId(0L);
projectOther.setLevel(i);
projectOther.setProjectId(projectId); projectOther.setProjectId(projectId);
projectOther.setCbStage(byId.getCbStage()); projectOther.setCbStage(byId.getCbStage());
QueryWrapper<CbProjectOther> tWrapper = Wrappers.query(projectOther); QueryWrapper<CbProjectOther> tWrapper = Wrappers.query(projectOther);
...@@ -184,12 +185,12 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper, ...@@ -184,12 +185,12 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
} }
// 文件名称 // 文件名称
String name = file.getFileName(); String fileName = file.getFileName();
name = FileNameUtil.getPrefix(name); fileName = FileNameUtil.getPrefix(fileName);
// 文件Id // 文件Id
Long fileId = file.getId(); Long fileId = file.getId();
if ("其他费".equals(name)) { if ("其他费".equals(fileName)) {
totalDataAnalysis(inputStream, name, file, projectId, cbStage); totalDataAnalysis(inputStream, fileName, file, projectId, cbStage);
continue; continue;
} }
//解析数据 //解析数据
...@@ -206,11 +207,12 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper, ...@@ -206,11 +207,12 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
} }
log.debug(">>>>" + importVoList.size()); log.debug(">>>>" + importVoList.size());
CbProjectOther rootProjectOther = new CbProjectOther(); CbProjectOther rootProjectOther = new CbProjectOther();
rootProjectOther.setItemContent(name); rootProjectOther.setItemContent(fileName);
rootProjectOther.setParentId(0L); rootProjectOther.setParentId(0L);
rootProjectOther.setProjectId(projectId); rootProjectOther.setProjectId(projectId);
rootProjectOther.setLevel(0);
rootProjectOther.setCbStage(cbStage); rootProjectOther.setCbStage(cbStage);
rootProjectOther.setCbProjectFileId(0L); rootProjectOther.setCbProjectFileId(fileId);
LambdaQueryWrapper<CbProjectOther> tWrapper = Wrappers.lambdaQuery(rootProjectOther); LambdaQueryWrapper<CbProjectOther> tWrapper = Wrappers.lambdaQuery(rootProjectOther);
CbProjectOther rootOther = this.getOne(tWrapper); CbProjectOther rootOther = this.getOne(tWrapper);
...@@ -224,17 +226,24 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper, ...@@ -224,17 +226,24 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
if (CollectionUtil.isNotEmpty(importVoList)) { if (CollectionUtil.isNotEmpty(importVoList)) {
for (CbProjectOtherImportVo importVo : importVoList) { for (CbProjectOtherImportVo importVo : importVoList) {
String number = importVo.getNumber(); String number = importVo.getNumber();
CbProjectOther cbProjectOther = new CbProjectOther(); CbProjectOther cbProjectOther = new CbProjectOther();
BeanUtil.copyProperties(importVo, cbProjectOther); BeanUtil.copyProperties(importVo, cbProjectOther);
if (ObjectUtil.isEmpty(number)) {
cbProjectOther.setParentId(rootMeasuresId);
cbProjectOther.setLevel(1);
} else {
//保存一级节点 //保存一级节点
if (ReUtil.isMatch(firstPattern, number) || ReUtil.isMatch(pattern3, number)) { if (ReUtil.isMatch(firstPattern, number) || ReUtil.isMatch(pattern3, number)) {
cbProjectOther.setParentId(rootMeasuresId); cbProjectOther.setParentId(rootMeasuresId);
cbProjectOther.setLevel(1);
} else if (ReUtil.isMatch(secondPattern, number)) { } else if (ReUtil.isMatch(secondPattern, number)) {
// 根据no查询父级节点 // 根据no查询父级节点
CbProjectOther parentCbCostMeasure = getCbProjectOther(rootMeasuresId, number, projectId, cbStage); CbProjectOther parentCbCostMeasure = getCbProjectOther(rootMeasuresId, number, projectId, cbStage);
String[] split = number.split("\\.");
cbProjectOther.setLevel(split.length);
cbProjectOther.setParentId(parentCbCostMeasure.getId()); cbProjectOther.setParentId(parentCbCostMeasure.getId());
} }
}
if (ObjectUtil.isNotEmpty(cbProjectOther.getDealWithNumber())) { if (ObjectUtil.isNotEmpty(cbProjectOther.getDealWithNumber())) {
String newNo = String.valueOf(rootMeasuresId).concat(".").concat(cbProjectOther.getDealWithNumber()); String newNo = String.valueOf(rootMeasuresId).concat(".").concat(cbProjectOther.getDealWithNumber());
cbProjectOther.setDealWithNumber(newNo); cbProjectOther.setDealWithNumber(newNo);
...@@ -277,7 +286,7 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper, ...@@ -277,7 +286,7 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
BeanUtil.copyProperties(importVo, projectExpenseSummary); BeanUtil.copyProperties(importVo, projectExpenseSummary);
projectExpenseSummary.setProjectId(projectId); projectExpenseSummary.setProjectId(projectId);
projectExpenseSummary.setCbStage(cbStage); projectExpenseSummary.setCbStage(cbStage);
projectExpenseSummary.setDataType(1); projectExpenseSummary.setDataType(3);
projectExpenseSummaryService.save(projectExpenseSummary); projectExpenseSummaryService.save(projectExpenseSummary);
} }
} }
......
...@@ -5,7 +5,7 @@ VUE_APP_TITLE = 重庆大司空信息科技有限公司 ...@@ -5,7 +5,7 @@ VUE_APP_TITLE = 重庆大司空信息科技有限公司
ENV = 'development' ENV = 'development'
# 数字化经营履约全生命链路管理系统/开发环境 # 数字化经营履约全生命链路管理系统/开发环境
VUE_APP_BASE_API = 'http://localhost:9098' VUE_APP_BASE_API = '/prod-api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
......
.el-icon-arrow-down{ .el-icon-arrow-down {
color: #C0C4CC; color: #c0c4cc;
} }
.title_wrap,.el-divider{ .title_wrap,
.el-divider {
border-color: #eee; border-color: #eee;
} }
.supplier{ .supplier {
padding: 16px 24px; padding: 16px 24px;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -14,15 +15,26 @@ ...@@ -14,15 +15,26 @@
.search-supplier { .search-supplier {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
border-radius:4px 4px 0px 0px ; border-radius: 4px 4px 0px 0px;
overflow: hidden; overflow: hidden;
.content-supplier {
.el-form {
.el-form-item {
.el-form-item__label {
min-width: 82px;
white-space: nowrap;
}
}
}
}
} }
::v-deep .el-form{ ::v-deep .el-form {
.el-form-item__label{ .el-form-item__label {
font-weight: 400 !important; font-weight: 400 !important;
} }
} }
.el-form-item__label{ .el-form-item__label {
font-weight: 400; font-weight: 400;
} }
.content-supplier { .content-supplier {
...@@ -31,127 +43,131 @@ ...@@ -31,127 +43,131 @@
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
padding: 20px 16px 4px; padding: 20px 16px 4px;
.el-form-item{ .el-form-item {
margin-bottom: 16px; margin-bottom: 16px;
width: 100%; width: 100%;
} }
.el-divider{ .el-divider {
margin-top: 4px; margin-top: 4px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.el-form-item__content{ .el-form-item__content {
width: calc(100% - 100px); width: calc(100% - 100px);
.el-cascader,.el-select,.el-date-editor{ .el-cascader,
.el-select,
.el-date-editor {
width: 100%; width: 100%;
} }
.el-icon-date{ .el-icon-date {
display: none; display: none;
} }
.el-button--small{ .el-button--small {
font-size: 14px; font-size: 14px;
} }
.el-button + .el-button{ .el-button + .el-button {
margin-left: 12px; margin-left: 12px;
} }
} }
} }
.table-supplier{ .table-supplier {
background: #fff; background: #fff;
padding: 16px; padding: 16px;
margin-top: 16px; margin-top: 16px;
border-radius: 0px 0px 4px 4px; border-radius: 0px 0px 4px 4px;
&.i{ &.i {
margin-top: -20px; margin-top: -20px;
} }
.total-title{ .total-title {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
.totals{ .totals {
padding-left: 6px; padding-left: 6px;
position: relative; position: relative;
font-size: 12px; font-size: 12px;
color: #3D3D3D; color: #3d3d3d;
display: inline-block; display: inline-block;
&::before{ &::before {
content: ' '; content: " ";
position: absolute; position: absolute;
width: 2px; width: 2px;
height: 2px; height: 2px;
background: rgba(35,35,35,0.4); background: rgba(35, 35, 35, 0.4);
border-radius: 50%; border-radius: 50%;
left: 0; left: 0;
top: 12px; top: 12px;
} }
} }
.total-dc{ .total-dc {
float: right; float: right;
cursor: pointer; cursor: pointer;
img{ img {
width: 18px; width: 18px;
margin-right: 6px; margin-right: 6px;
margin-top: -4px; margin-top: -4px;
} }
color: rgba(35,35,35,0.8); color: rgba(35, 35, 35, 0.8);
} }
margin-bottom: 16px; margin-bottom: 16px;
} }
.pagination{ .pagination {
text-align: right; text-align: right;
margin-right: -10px; margin-right: -10px;
margin-top: 16px; margin-top: 16px;
} }
.table-item .el-table .is-scrolling-left + .el-table__fixed, .table-item .el-table .is-scrolling-middle + .el-table__fixed, .table-item .el-table .is-scrolling-right + .el-table__fixed{ .table-item .el-table .is-scrolling-left + .el-table__fixed,
.table-item .el-table .is-scrolling-middle + .el-table__fixed,
.table-item .el-table .is-scrolling-right + .el-table__fixed {
bottom: 10px !important; bottom: 10px !important;
} }
.cell a:hover{ .cell a:hover {
color: #0081ff; color: #0081ff;
} }
.tabs{ .tabs {
margin-right: 20px; margin-right: 20px;
&:last-child{ &:last-child {
margin: 0; margin: 0;
} }
} }
} }
.dialog-supplier{ .dialog-supplier {
.el-dialog__header{ .el-dialog__header {
line-height: 24px; line-height: 24px;
padding: 16px 20px; padding: 16px 20px;
font-size: 16px; font-size: 16px;
color: #232323; color: #232323;
font-weight: 700; font-weight: 700;
border-bottom: 1px solid #E5E6EB; border-bottom: 1px solid #e5e6eb;
} }
.el-dialog__body{ .el-dialog__body {
padding: 20px; padding: 20px;
} }
} }
.title_wrap.i{ .title_wrap.i {
border: 0; border: 0;
} }
.access-content{ .access-content {
background: #fff; background: #fff;
border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;
.tabpane .el-tabs__header{ .tabpane .el-tabs__header {
margin-top: -14px; margin-top: -14px;
} }
.acc-title{ .acc-title {
line-height: 22px; line-height: 22px;
&.i{ &.i {
margin-top: 24px; margin-top: 24px;
} }
} }
.main3-box { .main3-box {
margin-top: 16px; margin-top: 16px;
border-top: 1px solid #E6E9F0; border-top: 1px solid #e6e9f0;
p { p {
display: flex; display: flex;
margin: 0; margin: 0;
border-left: 1px solid #E6E9F0; border-left: 1px solid #e6e9f0;
border-right: 1px solid #E6E9F0; border-right: 1px solid #e6e9f0;
border-bottom: 1px solid #E6E9F0; border-bottom: 1px solid #e6e9f0;
background: #fff; background: #fff;
.label { .label {
width: 10%; width: 10%;
...@@ -159,7 +175,7 @@ ...@@ -159,7 +175,7 @@
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
padding: 12px; padding: 12px;
background: #F0F3FA; background: #f0f3fa;
display: flex; display: flex;
align-items: center; align-items: center;
} }
...@@ -177,82 +193,80 @@ ...@@ -177,82 +193,80 @@
width: 90%; width: 90%;
} }
.blue { .blue {
color: #0081FF !important; color: #0081ff !important;
cursor: pointer; cursor: pointer;
} }
.tab{ .tab {
border-right: 1px solid #E6E9F0; border-right: 1px solid #e6e9f0;
} }
.tab:nth-child(1){ .tab:nth-child(1) {
width: 20%; width: 20%;
} }
.tab:nth-child(2){ .tab:nth-child(2) {
width: 15%; width: 15%;
} }
.tab:nth-child(3){ .tab:nth-child(3) {
width: 10%; width: 10%;
} }
.tab:nth-child(4){ .tab:nth-child(4) {
width: 35%; width: 35%;
} }
.tab:nth-child(5){ .tab:nth-child(5) {
width: 20%; width: 20%;
} }
} }
} }
.table-box{ .table-box {
margin-top: 16px; margin-top: 16px;
border: 1px solid #E6E9F0; border: 1px solid #e6e9f0;
width: 100%; width: 100%;
border-top: 0; border-top: 0;
thead{ thead {
background: #F0F3FA; background: #f0f3fa;
} }
tr:nth-child(2n+1){ tr:nth-child(2n + 1) {
background: #F9FCFF; background: #f9fcff;
} }
tr:hover{ tr:hover {
background: #dcebff; background: #dcebff;
} }
td{ td {
border-top: 1px solid #E6E9F0; border-top: 1px solid #e6e9f0;
border-right: 1px solid #E6E9F0; border-right: 1px solid #e6e9f0;
height: auto; height: auto;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
padding: 12px; padding: 12px;
} }
.blue{ .blue {
color: #0081ff; color: #0081ff;
cursor: pointer; cursor: pointer;
} }
} }
} }
.table-supplier .fixed-table .el-table__fixed-header-wrapper{ .table-supplier .fixed-table .el-table__fixed-header-wrapper {
top: -16px !important; top: -16px !important;
} }
.renling{ .renling {
width: 280px; width: 280px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.ellipsis{ .ellipsis {
width: 500px; width: 500px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.el-range-editor--medium{ .el-range-editor--medium {
text-align: left; text-align: left;
} }
.el-date-editor .el-range-input{ .el-date-editor .el-range-input {
text-align: left; text-align: left;
} }
.wrap2{ .wrap2 {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
}, },
methods: { methods: {
async querySubmit() { async querySubmit() {
companyPage(this.queryParamsqueryParams).then(res => { companyPage(this.queryParams).then(res => {
this.isSkeleton = false; this.isSkeleton = false;
this.tableData=res.rows this.tableData=res.rows
this.tableDataTotal=res.total this.tableDataTotal=res.total
......
...@@ -245,8 +245,8 @@ export default { ...@@ -245,8 +245,8 @@ export default {
return ''; return '';
}, },
handleDialogVisible(row){ handleDialogVisible(row){
this.ruleForm={}
this.dialogVisible=true; this.dialogVisible=true;
console.log(row)
this.detailsId=row.id; this.detailsId=row.id;
}, },
handleAdd(){ handleAdd(){
...@@ -254,7 +254,11 @@ export default { ...@@ -254,7 +254,11 @@ export default {
this.ruleForm.qingId = this.detailsId this.ruleForm.qingId = this.detailsId
cbDirectExpenseAdd(JSON.stringify(this.ruleForm)).then(res=>{ cbDirectExpenseAdd(JSON.stringify(this.ruleForm)).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.dialogVisible = false this.dialogVisible = false;
this.$message({
type: 'success',
message: '操作成功'
});
this.getCbDirectExpenseList(this.menuId) this.getCbDirectExpenseList(this.menuId)
} }
}) })
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<el-button type="primary" size="medium" class="unit-conversion-btn" v-if="currentParentName.indexOf('实体工程材料') != -1">单位换算</el-button> <el-button type="primary" size="medium" class="unit-conversion-btn" v-if="currentParentName.indexOf('实体工程材料') != -1">单位换算</el-button>
<!-- 填写实际成本 --> <!-- 填写实际成本 -->
<el-button type="primary" size="medium" class="actual-cost-btn" v-else <el-button type="primary" size="medium" class="actual-cost-btn" v-else
@click="fillActualCost">{{addActualCostEditStatus ? '保存成本' : '填写实际成本'}}</el-button> @click="addActualCostEditStatus ? saveActualCost() : fillActualCost()">{{addActualCostEditStatus ? '保存成本' : '填写实际成本'}}</el-button>
<!-- 表头设置组件 --> <!-- 表头设置组件 -->
<dsk-table-header-setting :settingList="formColum" @settingChange="settingChange"></dsk-table-header-setting> <dsk-table-header-setting :settingList="formColum" @settingChange="settingChange"></dsk-table-header-setting>
</div> </div>
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
}, },
{ label: '推送工程量', prop: "pushQuantities", width: "95", uid: v4() }, { label: '推送工程量', prop: "pushQuantities", width: "95", uid: v4() },
{ label: '备注', prop: "remark", width: "115", uid: v4(), slot: true }, { label: '备注', prop: "remark", width: "115", uid: v4(), slot: true },
{ label: '操作', prop: "action-field-bar", width: "99", uid: v4() }, { label: '操作', prop: "action-field-bar", width: "99", uid: v4(), fixed: "right" },
], ],
// 已记录月份集合 // 已记录月份集合
monthList: [], monthList: [],
...@@ -230,6 +230,9 @@ export default { ...@@ -230,6 +230,9 @@ export default {
console.log(error); console.log(error);
} }
}, },
getNowMonth() {
return dayjs(new Date().valueOf()).format("YYYYMM");
},
createRequestConditions() { createRequestConditions() {
const { projectId, cbStage } = this.comProjectDetailInfo; const { projectId, cbStage } = this.comProjectDetailInfo;
const params = { const params = {
...@@ -238,7 +241,7 @@ export default { ...@@ -238,7 +241,7 @@ export default {
}; };
params["cbSubjectName"] = this.currentNodeName; params["cbSubjectName"] = this.currentNodeName;
// 判断当月是否存在于server返回month集合中 // 判断当月是否存在于server返回month集合中
const _now = dayjs(new Date().valueOf()).format("YYYYMM"); const _now = this.getNowMonth();
if (this.includeNowMonth(_now)) { if (this.includeNowMonth(_now)) {
params["recordDate"] = _now; params["recordDate"] = _now;
} }
...@@ -264,7 +267,7 @@ export default { ...@@ -264,7 +267,7 @@ export default {
if (list.code == 200 && list.data instanceof Array) { if (list.code == 200 && list.data instanceof Array) {
const _temp = list.data; const _temp = list.data;
// 计算总和 // 计算总和
if (this.hasTarget) { if (this.hasTarget && _temp.length) {
const row = this.countRowParams(_temp, statisticsPropNames); const row = this.countRowParams(_temp, statisticsPropNames);
_temp.unshift(row); _temp.unshift(row);
} }
...@@ -324,7 +327,7 @@ export default { ...@@ -324,7 +327,7 @@ export default {
if (monthList.code == 200 && monthList.data instanceof Array) { if (monthList.code == 200 && monthList.data instanceof Array) {
const data = monthList.data; const data = monthList.data;
this.originMonthList = cloneDeep(data); this.originMonthList = cloneDeep(data);
const _now = dayjs(new Date().valueOf()).format("YYYYMM"); const _now = this.getNowMonth();
this.recordDate = _now; this.recordDate = _now;
this.oldRecordDate = _now; this.oldRecordDate = _now;
// 默认以当前月数据为准 若不包含当前月 需要手动push数据 // 默认以当前月数据为准 若不包含当前月 需要手动push数据
...@@ -332,9 +335,7 @@ export default { ...@@ -332,9 +335,7 @@ export default {
data.push(_now); data.push(_now);
} }
// 年月排序 // 年月排序
let _tempMonthList = data.sort((before, after) => { let _tempMonthList = this.monthsSort(data);
return parseInt(after) - parseInt(before);
});
_tempMonthList = _tempMonthList.map(item => { _tempMonthList = _tempMonthList.map(item => {
return { return {
label: dayjs(item).format("YYYY年MM月"), label: dayjs(item).format("YYYY年MM月"),
...@@ -347,23 +348,31 @@ export default { ...@@ -347,23 +348,31 @@ export default {
} }
}, },
monthsSort(monthList) {
const sortResult = monthList.sort((before, after) => {
const _before = Object.prototype.toString.call(before) == "[object Object]" ? before["value"] : before;
const _after = Object.prototype.toString.call(before) == "[object Object]" ? after["value"] : after;
return parseInt(_after) - parseInt(_before);
});
return sortResult;
},
monthChange(month) { monthChange(month) {
this.resetEditStatus();
// 当前月 // 当前月
const _now = dayjs(new Date().valueOf()).format("YYYYMM"); const _now = this.getNowMonth();
// 请求列表参数 // 请求列表参数
const params = this.createRequestConditions(); const params = this.createRequestConditions();
// 清空了年月默认选中当前月 // 清空了年月默认选中当前月
if (!month) { if (!month) {
this.recordDate = _now; this.recordDate = _now;
// 如果命中的旧月份 等于当前月 说明清空的是当前月 不调用接口 // 如果命中的旧月份 等于当前月 且 不处于编辑状态 说明清空的是当前月 不调用接口
if (this.oldRecordDate == _now) return; if (this.oldRecordDate == _now && !this.addActualCostEditStatus) return;
} else { } else {
// 正常选择 // 正常选择
params["recordDate"] = month; params["recordDate"] = month;
// 记录历史切换年月 // 记录历史切换年月
this.oldRecordDate = month; this.oldRecordDate = month;
} }
this.resetEditStatus();
// 获取列表数据 // 获取列表数据
this.getFeedSummaryList(params); this.getFeedSummaryList(params);
}, },
...@@ -396,27 +405,50 @@ export default { ...@@ -396,27 +405,50 @@ export default {
fillActualCost() { fillActualCost() {
this.showAddActualCost = true; this.showAddActualCost = true;
}, },
// 保存
saveActualCost() {
},
// 编辑状态下 进行了其它操作
resetEditStatus() { resetEditStatus() {
// 当前需要编辑或者新增的成本年份
const _selectActualCostTime = this.selectActualCostTime;
this.addActualCostEditStatus = false; this.addActualCostEditStatus = false;
this.selectActualCostTime = ""; this.selectActualCostTime = "";
/**
* 判断 当前需要编辑 或者新增的成本年份是否存在于server返回的month数组中
* 默认本月
*/
if (!this.originMonthList.includes(_selectActualCostTime) && _selectActualCostTime != this.getNowMonth()) {
const index = this.monthList.findIndex(item => item.value == _selectActualCostTime);
if (index != -1) {
this.monthList.splice(index, 1);
}
}
}, },
async timeSelect(selectTime) { async timeSelect(selectTime) {
// 编辑状态 // 编辑状态
this.addActualCostEditStatus = true; this.addActualCostEditStatus = true;
this.selectActualCostTime = selectTime; this.selectActualCostTime = selectTime;
// 判断是否包含 选择的年月 包含则修改 未包含则新增 // 判断是否包含 选择的年月 包含则修改 未包含则新增
const findReslut = this.originMonthList.includes(selectTime); const findReslut = this.originMonthList.includes(selectTime) || this.monthList.find(item => item.value == selectTime);
// 包含所选月
if (findReslut) {
this.recordDate = selectTime;
const params = this.createRequestConditions(); const params = this.createRequestConditions();
if (!findReslut) {
// 不包含当前所选月 新增数据
let _temp = JSON.parse(JSON.stringify(this.monthList));
_temp.push({
label: dayjs(selectTime).format("YYYY年MM月"),
value: selectTime
});
_temp = this.monthsSort(_temp);
console.log(_temp);
this.monthList = _temp;
}
this.recordDate = selectTime;
this.oldRecordDate = selectTime;
params["recordDate"] = selectTime; params["recordDate"] = selectTime;
// 获取选中月数据 // 获取选中月数据
await this.getFeedSummaryList(params); await this.getFeedSummaryList(params);
} else {
// 不包含当前所选月 新增数据
}
} }
}, },
} }
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<div class="project-detail-header-name">{{comDetailInfo.projectName ? comDetailInfo.projectName : "-"}}</div> <div class="project-detail-header-name">{{comDetailInfo.projectName ? comDetailInfo.projectName : "-"}}</div>
<!-- 项目信息 --> <!-- 项目信息 -->
<div class="project-detail-plate"> <div class="project-detail-plate">
<div class="detail-plate-item project-code" v-if="isShowProjectCode.includes(current)"> <div class="detail-plate-item project-code">
<!-- <div class="detail-plate-item project-code" v-if="isShowProjectCode.includes(current)"> -->
<span class="plate-item-name">项目编码:</span> <span class="plate-item-name">项目编码:</span>
<span>{{comDetailInfo.ipmProjectNo ? comDetailInfo.ipmProjectNo : "-"}}</span> <span>{{comDetailInfo.ipmProjectNo ? comDetailInfo.ipmProjectNo : "-"}}</span>
</div> </div>
......
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