Commit a87885bf authored by danfuman's avatar danfuman

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 364f0bbd 62ba2ce9
......@@ -48,6 +48,10 @@ public interface GlobalConstants {
*/
String BATCH_IMPORT_FAIL_USERS = GLOBAL_REDIS_KEY + "batch_import_fail_users";
/**
* 单位换算提示
*/
String UNIT_CONVERSION_NOTICE = GLOBAL_REDIS_KEY + "unit_conversion_notice:";
/**
* OSS配置
......
......@@ -8,6 +8,7 @@ import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.CbProjectRecord;
import com.dsk.cscec.domain.bo.*;
import com.dsk.cscec.domain.vo.CbProjectCbStageNotDraftVo;
import com.dsk.cscec.domain.vo.CbProjectHeadInfoVo;
import com.dsk.cscec.domain.vo.CbProjectInfoVo;
import com.dsk.cscec.domain.vo.CbProjectRecordSearchVo;
import com.dsk.cscec.service.CbProjectRecordService;
......@@ -138,6 +139,14 @@ public class CbProjectRecordController extends BaseController {
return toAjax(baseService.deleteDraft(projectId));
}
/**
* 获取项目详情头部信息
*/
@GetMapping("/getCbProjectHeadInfo/{projectId}")
public R<CbProjectHeadInfoVo> getCbProjectHeadInfo(@NotNull(message = "项目ID不能为空") @PathVariable Long projectId) {
return R.ok(baseService.getCbProjectHeadInfo(projectId));
}
/**
* 获取工程项目信息
*/
......
......@@ -35,6 +35,14 @@ public class CbCostMeasureActual {
@TableField(value = "cost_effective")
private BigDecimal costEffective;
/**
* 本月工程量
*/
@TableField(value = "project_volume")
private BigDecimal projectVolume;
/**
* 截止本月工程量
*/
......
......@@ -25,6 +25,7 @@ public class CbCostMeasureActualSaveBo {
/**
* 计划成本措施费id
*/
@NotNull(message = "计划成本措施费id不能为空")
private Long planMeasureId;
/**
......@@ -39,6 +40,11 @@ public class CbCostMeasureActualSaveBo {
*/
private BigDecimal costEffective;
/**
* 本月工程量
*/
private BigDecimal projectVolume;
/**
* 截止本月工程量
*/
......
......@@ -19,6 +19,9 @@ public class CbCostMeasureActualVo {
private Long id;
private Long actualId;
private Long parentId;
......@@ -122,6 +125,11 @@ public class CbCostMeasureActualVo {
*/
private BigDecimal costEffective;
/**
* 本月工程量
*/
private BigDecimal projectVolume;
/**
* 截止本月工程量
*/
......@@ -171,7 +179,7 @@ public class CbCostMeasureActualVo {
private Date updateTime;
private List<CbCostMeasureActualVo> childrens;
// private List<CbCostMeasureActualVo> childrens;
public static final String COL_ID = "id";
......
package com.dsk.cscec.domain.vo;
import lombok.Data;
/**
* @author sxk
* @date 2024.03.06
* @time 09:12
*/
@Data
public class CbProjectHeadInfoVo {
/**
* 项目ID
*/
private Long id;
/**
* 项目名称
*/
private String projectName;
/**
* IPM项目编码
*/
private String ipmProjectNo;
/**
* 客商名称(客户名称)
*/
private String merchantName;
/**
* 签订单位
*/
private String signingUnit;
}
......@@ -3,8 +3,11 @@ package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.CbCostMeasureActual;
import com.dsk.cscec.domain.bo.CbCostMeasureActualBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
public interface CbCostMeasureActualMapper extends BaseMapper<CbCostMeasureActual> {
......@@ -14,5 +17,7 @@ public interface CbCostMeasureActualMapper extends BaseMapper<CbCostMeasureActua
List<CbCostMeasureActualVo> selectDataList(CbCostMeasureActualBo costMeasureActualBo);
List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month);
List<CbCostMeasureActualVo> getMonthActualCostList(@Param("projectId") Long projectId,@Param("month") String month);
BigDecimal selectSumData(CbCostMeasureActualSaveBo bo);
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.CbProjectRecord;
import com.dsk.cscec.domain.bo.*;
import com.dsk.cscec.domain.vo.CbProjectCbStageNotDraftVo;
import com.dsk.cscec.domain.vo.CbProjectHeadInfoVo;
import com.dsk.cscec.domain.vo.CbProjectRecordSearchVo;
import java.util.List;
......@@ -105,6 +106,14 @@ public interface CbProjectRecordService extends IService<CbProjectRecord> {
*/
Integer deleteDraft(Long projectId);
/**
* 获取项目详情头部信息
*
* @param projectId 项目ID
* @return 项目详情头部信息
*/
CbProjectHeadInfoVo getCbProjectHeadInfo(Long projectId);
/**
* 每2分钟刷新一次项目台账列表内"解析中"项目的状态
*/
......
......@@ -8,6 +8,7 @@ import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
......@@ -20,5 +21,7 @@ import java.util.Map;
public interface ICbCostMeasureActualService extends IService<CbCostMeasureActual> {
List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month);
BigDecimal selectSumData(CbCostMeasureActualSaveBo bo);
}
......@@ -30,5 +30,6 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
boolean batchInsert(List<CbQuantitySummary> list);
void conversionNotice(CbQuantitySummaryListBo bo);
}
......@@ -9,6 +9,8 @@ import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeNodeConfig;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.math.MathUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.http.HttpUtil;
......@@ -185,6 +187,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
treeNode.setId(object.getId());//id
treeNode.setParentId(object.getParentId());//父id
// 扩展属性 ...
treeNode.putExtra("actualId",object.getActualId());
treeNode.putExtra("itemContent", object.getItemContent());
treeNode.putExtra("number", object.getNumber());
treeNode.putExtra("workContent", object.getWorkContent());
......@@ -205,6 +208,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
treeNode.putExtra("planMeasureId", object.getPlanMeasureId());
treeNode.putExtra("monthCostRate", object.getMonthCostRate());
treeNode.putExtra("costEffective", object.getCostEffective());
treeNode.putExtra("projectVolume", object.getProjectVolume());
treeNode.putExtra("currentProjectVolume", object.getCurrentProjectVolume());
treeNode.putExtra("submitProjectVolume", object.getSubmitProjectVolume());
treeNode.putExtra("month", object.getMonth());
......@@ -223,8 +227,11 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
CbCostMeasureActual cbCostMeasureActual = new CbCostMeasureActual();
BeanUtil.copyProperties(cbCostMeasureActualSaveBo, cbCostMeasureActual);
cbCostMeasureActual.setDelFlag(0);
cbCostMeasureActual.setUpdateId(LoginHelper.getUserId());
cbCostMeasureActual.setUpdateUser(LoginHelper.getUsername());
// cbCostMeasureActual.setUpdateId(LoginHelper.getUserId());
// cbCostMeasureActual.setUpdateUser(LoginHelper.getUsername());
// 查询计划成本累积实际成本
BigDecimal bigDecimal = cbCostMeasureActualService.selectSumData(cbCostMeasureActualSaveBo);
cbCostMeasureActual.setCurrentProjectVolume(NumberUtil.add(bigDecimal,cbCostMeasureActual.getProjectVolume()));
saveList.add(cbCostMeasureActual);
}
cbCostMeasureActualService.saveOrUpdateBatch(saveList);
......
......@@ -19,6 +19,7 @@ import com.dsk.cscec.domain.CbProjectFile;
import com.dsk.cscec.domain.CbProjectRecord;
import com.dsk.cscec.domain.bo.*;
import com.dsk.cscec.domain.vo.CbProjectCbStageNotDraftVo;
import com.dsk.cscec.domain.vo.CbProjectHeadInfoVo;
import com.dsk.cscec.domain.vo.CbProjectRecordSearchVo;
import com.dsk.cscec.mapper.CbProjectFileMapper;
import com.dsk.cscec.mapper.CbProjectRecordMapper;
......@@ -430,6 +431,22 @@ public class CbProjectRecordServiceImpl extends ServiceImpl<CbProjectRecordMappe
return baseMapper.deleteById(projectRecord);
}
/**
* 获取项目详情头部信息
*
* @param projectId 项目ID
* @return 项目详情头部信息
*/
@Override
public CbProjectHeadInfoVo getCbProjectHeadInfo(Long projectId) {
//校验项目是否存在
CbProjectRecord projectRecord = this.checkProjectExist(projectId);
//TODO:客户名称、签订单位字段未确定
CbProjectHeadInfoVo infoVo = BeanUtil.toBean(projectRecord, CbProjectHeadInfoVo.class);
return infoVo;
}
/**
* 每2分钟刷新一次项目台账列表内"解析中"项目的状态
*/
......
......@@ -3,12 +3,14 @@ package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.cscec.domain.CbCostMeasure;
import com.dsk.cscec.domain.CbCostMeasureActual;
import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import com.dsk.cscec.mapper.CbCostMeasureActualMapper;
import com.dsk.cscec.mapper.CbCostMeasureMapper;
import com.dsk.cscec.service.ICbCostMeasureActualService;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List;
/**
......@@ -22,4 +24,9 @@ public class ICbCostMeasureActualServiceImpl extends ServiceImpl<CbCostMeasureAc
public List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month) {
return baseMapper.getMonthActualCostList(projectId,month);
}
@Override
public BigDecimal selectSumData(CbCostMeasureActualSaveBo bo) {
return baseMapper.selectSumData(bo);
}
}
......@@ -7,6 +7,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="plan_measure_id" jdbcType="BIGINT" property="planMeasureId" />
<result column="month_cost_rate" jdbcType="DECIMAL" property="monthCostRate" />
<result column="project_volume" jdbcType="DECIMAL" property="projectVolume" />
<result column="cost_effective" jdbcType="DECIMAL" property="costEffective" />
<result column="current_project_volume" jdbcType="DECIMAL" property="currentProjectVolume" />
<result column="submit_project_volume" jdbcType="DECIMAL" property="submitProjectVolume" />
......@@ -21,7 +22,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, plan_measure_id, month_cost_rate, cost_effective, current_project_volume, submit_project_volume,
id, plan_measure_id, month_cost_rate, cost_effective,project_volume, current_project_volume, submit_project_volume,
`month`, push_time, push_data_json, del_flag, update_user, update_id, create_time,
update_time
</sql>
......@@ -180,8 +181,13 @@
FROM cb_cost_measure_actual t
inner JOIN cb_cost_measure t1 ON t1.id=t.plan_measure_id
WHERE
t1.project_id=1
t1.project_id=#{projectId}
AND t1.parent_id=0
AND t.`month`='202406'
AND t.`month`=#{month}
</select>
<select id="selectSumData" resultType="java.math.BigDecimal">
SELECT SUM(t.project_volume) measureTotal FROM cb_cost_measure_actual t WHERE t.plan_measure_id=#{planMeasureId}
and t.month &lt;#{month}
</select>
</mapper>
\ No newline at end of file
......@@ -41,9 +41,9 @@
<select id="selectListByProjectAndNo" resultType="com.dsk.cscec.domain.vo.CbCostMeasureActualVo">
SELECT t.*,t1.plan_measure_id,t1.month_cost_rate, t1.cost_effective, t1.current_project_volume,t1.submit_project_volume,t1.`month`,t1.push_time FROM cb_cost_measure t
SELECT t.*,t1.actualId,t1.plan_measure_id,t1.month_cost_rate, t1.cost_effective, t1.project_volume,t1.current_project_volume,t1.submit_project_volume,t1.`month`,t1.push_time FROM cb_cost_measure t
left JOIN (
SELECT t1.plan_measure_id,t1.month_cost_rate, t1.cost_effective, t1.current_project_volume,t1.submit_project_volume,t1.`month`,t1.push_time FROM cb_cost_measure t
SELECT t.id actualId,t1.plan_measure_id,t1.month_cost_rate, t1.cost_effective,t1.project_volume, t1.current_project_volume,t1.submit_project_volume,t1.`month`,t1.push_time FROM cb_cost_measure t
inner JOIN cb_cost_measure_actual t1 ON t1.plan_measure_id=t.id
WHERE
t.project_id=#{projectId}
......
......@@ -4,7 +4,14 @@
:min-width="item.minWidth" :align="item.align?item.align:'left'" :fixed="item.fixed"
:sortable="item.sortable ?item.sortable=='custom'? 'custom':true : false" :resizable="false" :show-overflow-tooltip="item.showOverflowTooltip">
<template v-for="(child,index) of item.children">
<table-list-column :key="child.uid ? child.uid : index" :item="child"></table-list-column>
<table-list-column :key="child.uid ? child.uid : index" :item="child">
<template v-for="(index, name) in $slots" :slot="name">
<slot :name="name" />
</template>
<template v-for="(index, name) in $scopedSlots" :slot="name" slot-scope="{row,$index}">
<slot :name="name" :data="child" :row="row" :index="$index"></slot>
</template>
</table-list-column>
</template>
</el-table-column>
<!-- 复选框列 -->
......@@ -18,9 +25,9 @@
<template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template>
</el-table-column>
<!-- 正常列 -->
<el-table-column v-else :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :align="item.align?item.align:'left'"
:fixed="item.fixed" :sortable="item.sortable ?item.sortable=='custom'? 'custom':true : false" :resizable="false"
:show-overflow-tooltip="item.showOverflowTooltip">
<el-table-column v-else :label="item.label" :prop="item.prop" :width="item.width ? item.width : 'auto'" :min-width="item.minWidth"
:align="item.align?item.align:'left'" :fixed="item.fixed" :sortable="item.sortable ?item.sortable=='custom'? 'custom':true : false"
:resizable="false" :show-overflow-tooltip="item.showOverflowTooltip">
<!-- 自定义表头 -->
<template v-if="item.slotHeader" slot="header">
<slot :name="item.slotName"></slot>
......@@ -28,12 +35,15 @@
<!-- 非自定义表头 -->
<template slot-scope="scope">
<!-- 有自定义插槽 -->
<slot v-if="item.slot" :name="item.prop" :row="scope.row" :index="scope.$index" :data="item"></slot>
<!-- 操作栏 -->
<slot v-if="item.slot" :name="item.prop" :row="scope.row" :index="scope.$index" :data="item">
<!-- 默认取值 -->
{{ scope.row[item.prop] || scope.row[item.prop] == '0' ? scope.row[item.prop] : '-' }}
</slot>
<!-- 操作栏 不需要设置slot-->
<slot v-else-if="item.prop == 'action-field-bar'" name="action-field-bar" :row="scope.row" :index="scope.$index" :data="item"></slot>
<!-- 没有插槽 -->
<div v-else>
{{ scope.row[item.prop] || '-' }}
{{ scope.row[item.prop] || scope.row[item.prop] == '0' ? scope.row[item.prop] : '-' }}
</div>
</template>
</el-table-column>
......@@ -77,7 +87,7 @@ export default {
},
//可访问data属性
created() {
},
//计算集
computed: {
......
......@@ -13,8 +13,15 @@
</el-table-column>
<!-- 列二次封装 -->
<template v-for="(item,index) of formColum">
<table-list-column v-if="item.use !== false" :key="item.uid ? item.uid : index" :tableData="tableData" :item="item"
:queryParams="queryParams" :hasQueryParams="hasQueryParams"></table-list-column>
<table-list-column v-if="item.use !== false" :key="item.uid ? item.uid : index" :tableData="tableData" :item="item">
<!-- 根据透传属性创建插槽 -->
<template v-for="(index, name) in $slots" :slot="name">
<slot :name="name" />
</template>
<template v-for="(index, name) in $scopedSlots" :slot="name" slot-scope="{row,index}">
<slot :name="name" :data="item" :row="row" :index="index"></slot>
</template>
</table-list-column>
</template>
<!-- <template v-for="(item,index) in formColum">
......
......@@ -3,11 +3,12 @@
:style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="variables.menuBg" :text-color="variables.menuText"
:unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
<sidebar-item v-for="(route, index) in hidechildren" :key="route.path + index" :is-collapse="isCollapse" :active-menu="activeMenu"
<el-menu :default-active="activeMenu" :default-openeds="comDefaultOpeneds" :collapse="isCollapse" :background-color="variables.menuBg"
:text-color="variables.menuText" :unique-opened="false" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
<sidebar-item v-for="(route, index) of sideBarMenu" :key="route.path + index" :is-collapse="isCollapse" :active-menu="activeMenu"
:item="route" :base-path="route.path" :class="route.fixed&&route.fixed.isFixed?'sideFoot':''"
:style="route.fixed&&route.fixed.isFixed?{'bottom': route.fixed.number*50+'px'}: bottomMenu&&index==routes.length-bottomMenu-2?{'padding-bottom': bottomMenu*50+'px'}:''" class="secondary-menu"/>
:style="route.fixed&&route.fixed.isFixed?{'bottom': route.fixed.number*50+'px'}: bottomMenu&&index==routes.length-bottomMenu-2?{'padding-bottom': bottomMenu*50+'px'}:''"
class="secondary-menu" />
</el-menu>
</el-scrollbar>
<div v-show="isExpand" class="side-expand" @click="toggleSideBar">
......@@ -21,30 +22,24 @@ import { mapGetters, mapState } from "vuex";
import Logo from "./Logo";
import SidebarItem from "./SidebarItem";
import variables from "@/assets/styles/variables.scss";
import { addTreeLevel } from "@/utils";
import { cloneDeep } from "lodash-es";
import { isExternal } from '@/utils/validate';
import path from 'path';
export default {
components: { SidebarItem, Logo },
data() {
return {
isExpand: false
isExpand: false,
comDefaultOpeneds: [],
sideBarMenu: []
};
},
computed: {
...mapState(["settings"]),
...mapGetters(["sidebarRouters", "sidebar"]),
hidechildren() {
return this.sidebarRouters.map(item => {
if (item.children?.length) {
item.children = item.children.filter(i => {
if (typeof (i.hidden) == 'boolean' && i.hidden == false || i.path == "index") {
return i;
}
});
}
return item;
});
},
activeMenu() {
const route = this.$route;
const { meta, path } = route;
......@@ -72,7 +67,83 @@ export default {
return !this.sidebar.opened;
},
},
watch: {
sidebarRouters: {
handler(newValue) {
const result = this.hidechildren(newValue ? newValue : []);
this.sideBarMenu = result;
this.comDefaultOpeneds = this.findSubMenuIndex(result);
},
deep: true,
immediate: true
},
},
methods: {
hidechildren(routes = []) {
let temp = cloneDeep(routes);
temp = addTreeLevel(temp);
const result = temp.map(item => {
if (item.children?.length) {
item.children = item.children.filter(i => {
if (typeof (i.hidden) == 'boolean' && i.hidden == false || i.path == "index") {
return i;
}
});
}
return item;
});
return result;
},
findSubMenuIndex(menu) {
let openeds = this.openTargetAllSubMenu(menu);
if (openeds instanceof Array) {
// 去重
openeds = Array.from(new Set(openeds));
}
return openeds;
},
// 展开所有指定层级的菜单 默认二级
openTargetAllSubMenu(_tempTree = [], level = 2) {
// 组件外传入了值 使用传入值,否则默认获取二级菜单打开二级
if (_tempTree instanceof Array && _tempTree.length) {
// 递归查找当前二级目录index
const result = this.findTargetLevelIndex(_tempTree, level, []);
return result;
}
},
findTargetLevelIndex(data = [], level = 2, result = []) {
if (data.length) {
for (const item of data) {
// level大于传入level直接跳出循环
if (item.level > level) break;
// 确保打开菜单为目录
if (item.level <= level && item.children instanceof Array) {
if (item.path) {
const path = this.resolvePath(item.path, item.path);
path ? result.push(path) : null;
}
}
if (item.children instanceof Array && item.children.length) {
this.findTargetLevelIndex(item.children, level, result);
}
}
}
return result.map(item => this.createMenuIndex(item));
},
createMenuIndex(index) {
if (index || index == "0") {
return index.toString();
}
},
resolvePath(routePath, basePath) {
if (isExternal(routePath)) {
return routePath;
}
if (isExternal(basePath)) {
return basePath;
}
return path.resolve(basePath, routePath);
},
toggleSideBar() {
this.$emit('handleBar', this.isCollapse ? '-96' : '96'); // 96为展开宽度和收起宽度之差
this.$store.dispatch('app/toggleSideBar');
......
......@@ -158,7 +158,7 @@ export default {
menuDetails:{},
menuOptions: {
nodeName: "menuName",
nodeValue: "menuName",
nodeValue: "menuId",
children : "childrenList"
},
detailsId:'',
......
......@@ -38,7 +38,11 @@
<dsk-skeleton v-if="tableLoading"></dsk-skeleton>
<table-list-com :tableData="tableDataList" :formColum="formColum" v-else-if="!tableLoading" :maxHeight="true" :tableDataTotal="total"
:paging="false">
<template slot="action-field-bar" slot-scope="scope">
<div class="project-action-field-bar">
<span class="push-project">推送工程量</span>
</div>
</template>
</table-list-com>
</div>
</div>
......@@ -104,7 +108,7 @@ export default {
// 列表表头
formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: false, uid: v4() },
{ label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4() },
{ label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4(),slot : true },
{ label: '公司编码', prop: "companyNo", width: "137", uid: v4() },
{ label: '集团编码', prop: "orgNo", width: "137", uid: v4() },
{ label: '名称', prop: "cbName", width: "232", uid: v4() },
......@@ -113,10 +117,28 @@ export default {
{ label: '单位', prop: "unit", width: "57", uid: v4() },
{ label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() },
{
label: '计划成本', prop: "jhcb", width: "809", align: "center", uid: v4(), children: [
{ label: '指导价格', prop: "guidePrice", width: "81", 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: "53", uid: v4() },
{ label: '合价(不含税)', prop: "combinedPrice", minWidth: "123", uid: v4() },
{ label: '合价(含税)', prop: "combinedPriceTax", minWidth: "109", 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: "95", uid: v4() },
{ label: '截止本月工程量', prop: "totalQuantities", minWidth: "123", uid: v4() },
{ label: '本月采购单价', prop: "purchaseUnitPrice", minWidth: "109", uid: v4() },
{ label: '填写时间', prop: "createTime", minWidth: "109", uid: v4() },
]
},
{ label: '推送工程量', prop: "pushQuantities", width: "95", uid: v4() },
{ label: '备注', prop: "remark", width: "115", uid: v4(), slot: true },
{ label: '操作', prop: "action-field-bar", width: "99", uid: v4() },
],
// 已记录月份集合
monthList: [],
......@@ -415,7 +437,7 @@ export default {
.table-item {
.el-table {
th {
height: 80px;
height: 40px;
}
.cell {
font-size: 14px;
......@@ -424,6 +446,18 @@ export default {
}
}
}
.project-action-field-bar {
display: flex;
align-items: center;
.push-project {
color: #0081ff;
font-size: 14px;
font-weight: 350;
cursor: pointer;
}
}
}
}
}
......
......@@ -98,10 +98,10 @@
<el-table-column label="成本合价" width="130" prop="costEffective">
<template slot-scope="scope">{{scope.row.costEffective || '--'}}</template>
</el-table-column>
<el-table-column label="本月工程量" width="130" prop="currentProjectVolume">
<el-table-column label="本月工程量" width="130" prop="projectVolume">
<template slot-scope="scope">
<template v-if="isinput"><el-input v-model="scope.row.currentProjectVolume "></el-input></template>
<template v-else>{{scope.row.currentProjectVolume || '--'}}</template>
<template v-if="isinput"><el-input v-model="scope.row.projectVolume "></el-input></template>
<template v-else>{{scope.row.projectVolume || '--'}}</template>
</template>
</el-table-column>
<el-table-column label="截止本月工程量" width="130" prop="currentProjectVolume">
......@@ -136,7 +136,7 @@
<el-input type="text" v-model="queryParam.projectName" placeholder="请输入分包项目名称"></el-input>
</el-form-item>
<el-form-item label="本月实际工程量" class="row">
<el-input type="text" placeholder="请输入本月实际工程量" v-model="queryParam.currentProjectVolume"></el-input>
<el-input type="text" placeholder="请输入本月实际工程量" v-model="queryParam.projectVolume"></el-input>
</el-form-item>
<el-form-item label="需推送工程量" class="row">
<el-input type="text" placeholder="请输入需推送工程量" v-model="queryParam.submitProjectVolume"></el-input>
......@@ -277,7 +277,7 @@ export default {
}
},
tored1({column}){
let arr = ['submitProjectVolume','suncurrentProjectVolume','currentProjectVolume','costEffective','monthCostRate']
let arr = ['submitProjectVolume','suncurrentProjectVolume','projectVolume','currentProjectVolume','costEffective','monthCostRate']
if(arr.includes(column.property)&&this.isinput){
return 'tored'
}
......@@ -392,6 +392,7 @@ export default {
projectVolume(row.id).then(res => {
if (res.data) {
let datas = res.data;
this.queryParam.projectVolume = datas.projectVolume;
this.queryParam.currentProjectVolume = datas.currentProjectVolume;
this.queryParam.ipmProjectCode = datas.ipmProjectCode;
this.queryParam.ipmContractCode = datas.ipmContractCode;
......
......@@ -15,7 +15,7 @@
</div>
</template>
<!-- 子集递归 -->
<project-menu-item v-for="(child,index) of menuItem.children" :menuItem="child" :key="child.nodeValue"></project-menu-item>
<project-menu-item v-for="(child,index) of menuItem.children" :menuItem="child" :key="`${child.nodeValue}-${child.level}`"></project-menu-item>
</el-submenu>
</template>
<!-- 无子集菜单 -->
......
<template>
<div class="project-side-menu-container">
<el-menu mode="vertical" class="project-side-menu-instance" :unique-opened="uniqueOpened" :default-active="createMenuIndex(comDefaultActive)"
@select="menuSelect" @open="subMenuOpen" @close="subMenuClose" ref="customElMenu">
:default-openeds="comDefaultOpeneds" @select="menuSelect" @open="subMenuOpen" @close="subMenuClose" ref="customElMenu">
<template v-for="(item,index) of tempMenuTree">
<project-menu-item :menuItem="item" :key="item.nodeValue">
<project-menu-item :menuItem="item" :key="`${item.nodeValue}-${item.level}`">
<template :slot="`${item.nodeName}-${item.level}`" slot-scope="scope">
<slot :name="`${scope.data.nodeName}-${scope.data.level}`" :data="scope.data"></slot>
</template>
......@@ -46,6 +46,11 @@ export default {
defaultActive: {
type: [String, Number],
default: ""
},
// 默认展开的二级菜单
defaultOpeneds: {
type: Array,
default: () => []
}
},
watch: {
......@@ -61,6 +66,11 @@ export default {
handler(newValue) {
this.comDefaultActive = newValue;
}
},
defaultOpeneds: {
handler(newValue) {
this.comDefaultOpeneds = newValue ? newValue : [];
}
}
},
data() {
......@@ -75,12 +85,13 @@ export default {
tempMenuOptions: {},
tempMenuTree: [],
comMenuTree: this.menuTree,
comDefaultActive: this.defaultActive
comDefaultActive: this.defaultActive,
comDefaultOpeneds: this.defaultOpeneds
};
},
//可访问data属性
created() {
this.openTargetAllSubMenu(this.comDefaultOpeneds);
},
//计算集
computed: {
......@@ -90,6 +101,35 @@ export default {
},
//方法集
methods: {
// 展开所有指定层级的菜单 默认二级
openTargetAllSubMenu(openeds = [], level = 2) {
// 组件外传入了值 使用传入值,否则默认获取二级菜单打开二级
if (openeds instanceof Array && openeds.length) {
// 转换为字符串
this.comDefaultOpeneds = openeds.map(item => this.createMenuIndex(item));
} else {
// 递归查找当前二级目录index
const _tempTree = this.tempMenuTree;
const result = this.findTargetLevelIndex(_tempTree, 2, []);
this.comDefaultOpeneds = result;
}
},
findTargetLevelIndex(data = [], level = level, result = []) {
if (data.length) {
for (const item of data) {
// level大于传入level直接跳出循环
if (item.level > level) break;
// 确保打开菜单为目录
if (item.level <= level && item.children instanceof Array) {
result.push(item.nodeValue);
}
if (item.children instanceof Array && item.children.length) {
this.findTargetLevelIndex(item.children, level, result);
}
}
}
return result.map(item => this.createMenuIndex(item));
},
// 事件订阅
subMenuOpen(menuPath, menuPathArray) {
this.$emit("open", menuPath, menuPathArray);
......@@ -126,7 +166,7 @@ export default {
return null;
},
// 初始化树形结构
initMenuTree(array = []) {
async initMenuTree(array = []) {
if (array?.length) {
// 合并默认配置
const _options = this.mergeMenuOptions(JSON.parse(JSON.stringify(this.menuOptions)));
......@@ -135,6 +175,8 @@ export default {
const resultData = this.mapDataByMenuOptions(JSON.parse(JSON.stringify(this.comMenuTree)), _options);
if (resultData) {
this.tempMenuTree = resultData;
await this.$nextTick();
this.openTargetAllSubMenu(this.comDefaultOpeneds);
}
}
},
......
<template>
<div class="app-container enterprise_contatiner">
<!--<div class="header">-->
<!--<div class="title_wrap">-->
<!--<div class="enterprise_title">-->
<!--评标助手-->
<!--</div>-->
<!--</div>-->
<!--<el-tabs v-model="activeName" >-->
<!--<el-tab-pane label="查资质" name="first"></el-tab-pane>-->
<!--<el-tab-pane label="现行资质标准" name="second"></el-tab-pane>-->
<!--<el-tab-pane label="历史批量查询结果" name="third"></el-tab-pane>-->
<!--</el-tabs>-->
<!--</div>-->
<!--<SearchAptitude @changeActiveName="activeName = 'third'" v-if="activeName === 'first'"></SearchAptitude>-->
<AptitudeStandard></AptitudeStandard>
<!--<SearchResult v-if="activeName === 'third'"></SearchResult>-->
</div>
</template>
<script>
import AptitudeStandard from '../components/AptitudeStandard'
export default {
name: 'AptitudeStandard',
components: {
AptitudeStandard
},
data() {
return {
activeName: 'first'
}
},
}
</script>
<style lang="scss" scoped>
.header{
justify-content: space-between;
background: #FFFFFF;
border-radius: 4px 4px 0 0 ;
border-bottom: 1px solid #EEEEEE;
color: #232323;
position: sticky;
top: -16px;
z-index: 999;
::v-deep .el-tabs{
height: 48px;
line-height: 48px;
.el-tabs__nav-wrap::after {
position: static !important;
}
.el-tabs__header{
margin: 0;
.el-tabs__item{
padding: 0 16px;
font-size: 16px;
}
.is-active{
font-weight: bold;
}
}
.el-tabs__content{
width: 100%;
}
}
.location{
font-size: 14px;
color: #0081FF;
i{
margin-right: 6px;
font-size: 16px;
}
}
}
</style>
<template>
<div class="app-container enterprise_contatiner">
<!--<div class="header">-->
<!--<div class="title_wrap">-->
<!--<div class="enterprise_title">-->
<!--评标助手-->
<!--</div>-->
<!--</div>-->
<!--<el-tabs v-model="activeName" >-->
<!--<el-tab-pane label="查资质" name="first"></el-tab-pane>-->
<!--<el-tab-pane label="现行资质标准" name="second"></el-tab-pane>-->
<!--<el-tab-pane label="历史批量查询结果" name="third"></el-tab-pane>-->
<!--</el-tabs>-->
<!--</div>-->
<SearchAptitude @changeActiveName="activeName = 'third'" v-if="activeName === 'first'"></SearchAptitude>
<!--<AptitudeStandard v-if="activeName === 'second'"></AptitudeStandard>-->
<!--<SearchResult v-if="activeName === 'third'"></SearchResult>-->
</div>
</template>
<script>
import SearchAptitude from '../components/SearchAptitude'
export default {
name: 'SearchAptitude',
components: {
SearchAptitude
},
data() {
return {
activeName: 'first'
}
},
}
</script>
<style lang="scss" scoped>
.header{
justify-content: space-between;
background: #FFFFFF;
border-radius: 4px 4px 0 0 ;
border-bottom: 1px solid #EEEEEE;
color: #232323;
position: sticky;
top: -16px;
z-index: 999;
::v-deep .el-tabs{
height: 48px;
line-height: 48px;
.el-tabs__nav-wrap::after {
position: static !important;
}
.el-tabs__header{
margin: 0;
.el-tabs__item{
padding: 0 16px;
font-size: 16px;
}
.is-active{
font-weight: bold;
}
}
.el-tabs__content{
width: 100%;
}
}
.location{
font-size: 14px;
color: #0081FF;
i{
margin-right: 6px;
font-size: 16px;
}
}
}
</style>
<template>
<div class="app-container enterprise_contatiner">
<!--<div class="header">-->
<!--<div class="title_wrap">-->
<!--<div class="enterprise_title">-->
<!--评标助手-->
<!--</div>-->
<!--</div>-->
<!--<el-tabs v-model="activeName" >-->
<!--<el-tab-pane label="查资质" name="first"></el-tab-pane>-->
<!--<el-tab-pane label="现行资质标准" name="second"></el-tab-pane>-->
<!--<el-tab-pane label="历史批量查询结果" name="third"></el-tab-pane>-->
<!--</el-tabs>-->
<!--</div>-->
<!--<SearchAptitude @changeActiveName="activeName = 'third'" v-if="activeName === 'first'"></SearchAptitude>-->
<!--<AptitudeStandard></AptitudeStandard>-->
<SearchResult></SearchResult>
</div>
</template>
<script>
import SearchResult from '../components/SearchResult'
export default {
name: 'SearchAptitude',
components: {
SearchResult
},
data() {
return {
activeName: 'first'
}
},
}
</script>
<style lang="scss" scoped>
.header{
justify-content: space-between;
background: #FFFFFF;
border-radius: 4px 4px 0 0 ;
border-bottom: 1px solid #EEEEEE;
color: #232323;
position: sticky;
top: -16px;
z-index: 999;
::v-deep .el-tabs{
height: 48px;
line-height: 48px;
.el-tabs__nav-wrap::after {
position: static !important;
}
.el-tabs__header{
margin: 0;
.el-tabs__item{
padding: 0 16px;
font-size: 16px;
}
.is-active{
font-weight: bold;
}
}
.el-tabs__content{
width: 100%;
}
}
.location{
font-size: 14px;
color: #0081FF;
i{
margin-right: 6px;
font-size: 16px;
}
}
}
</style>
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