Commit 9188fa11 authored by chenyuefang's avatar chenyuefang

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

parents 09485835 79e4e022
......@@ -67,6 +67,9 @@ user:
spring:
application:
name: ${ruoyi.name}
jpa:
open-in-view: false
# 资源信息
messages:
# 国际化资源文件路径
......@@ -324,14 +327,16 @@ lock4j:
management:
endpoints:
enabled-by-default: false
web:
exposure:
include: '*'
endpoint:
health:
show-details: ALWAYS
logfile:
external-file: ./logs/sys-console.log
# endpoints:
# web:
# exposure:
# include: '*'
# endpoint:
# health:
# show-details: ALWAYS
# logfile:
# external-file: ./logs/sys-console.log
gv:
img-path: D:\dsk\dsk-operate-sys\
......
......@@ -54,71 +54,69 @@ public class DataAnalysisComponent {
if (ObjectUtils.isEmpty(fileList)) return;
//文件处理
for (CbProjectFile file : fileList) {
// if (file.getDelFlag() == 0) {
//文件下载
InputStream inputStream = ossService.downFileIO(file.getFileOssId());
if (ObjectUtil.isNull(inputStream)) {
file.setFileParseStatus(3);
file.setFailRemark("文件数据不存在");
projectFileService.updateById(file);
break;
}
//解析数据
List<CbQuantitySummary> importList = new ExcelUtils<>(CbQuantitySummary.class).importExcelAllSheet(inputStream, 1);
if (importList.isEmpty()) {
//文件下载
InputStream inputStream = ossService.downFileIO(file.getFileOssId());
if (ObjectUtil.isNull(inputStream)) {
file.setFileParseStatus(3);
file.setFailRemark("文件数据不存在");
projectFileService.updateById(file);
break;
}
//解析数据
List<CbQuantitySummary> importList = new ExcelUtils<>(CbQuantitySummary.class).importExcelAllSheet(inputStream, 1);
if (importList.isEmpty()) {
file.setFileParseStatus(3);
file.setFailRemark("表格中不存在待导入数据!");
projectFileService.updateById(file);
break;
}
List<CbQuantitySummary> quantitySummaryList = importList.stream().parallel()
.filter(item -> !ObjectUtils.isEmpty(item.getCbName()))
.peek(item -> {
item.setProjectId(bo.getProjectId());
item.setCbStage(bo.getCbStage());
item.setCbProjectFileId(file.getId());
}).collect(Collectors.toList());
if (quantitySummaryList.isEmpty()) {
throw new ServiceException("表格中不存在有效数据!");
}
transactionTemplate.execute(status -> {
try {
// //分批次插入
// if (quantitySummaryList.size() > 1000) {
// int index = 0;
// int sum = quantitySummaryList.size();
// while (index < sum) {
// List<CbQuantitySummary> divideList = quantitySummaryList.subList(index, Math.min(index + 1000, sum));
// boolean b = quantitySummaryService.saveBatch(divideList);
// if (!b) {
// throw new ServiceException("数据插入失败!");
// }
// index += 1000;
// }
// } else {
// boolean b = quantitySummaryService.saveBatch(quantitySummaryList);
// if (!b) {
// throw new ServiceException("数据插入失败!");
// }
// }
boolean a = quantitySummaryService.batchInsert(quantitySummaryList);
if (!a) {
throw new ServiceException("数据插入失败!");
}
file.setFileParseStatus(2);
boolean b = projectFileService.updateById(file);
if (!b) {
throw new ServiceException("文件状态更新失败!");
}
} catch (Exception e) {
status.setRollbackOnly();
file.setFileParseStatus(3);
file.setFailRemark("表格中不存在待导入数据!");
file.setFailRemark(e.getMessage());
projectFileService.updateById(file);
break;
}
List<CbQuantitySummary> quantitySummaryList = importList.stream().parallel()
.filter(item -> !ObjectUtils.isEmpty(item.getCbName()))
.peek(item -> {
item.setProjectId(bo.getProjectId());
item.setCbStage(bo.getCbStage());
item.setCbProjectFileId(file.getId());
}).collect(Collectors.toList());
if (quantitySummaryList.isEmpty()) {
throw new ServiceException("表格中不存在有效数据!");
}
transactionTemplate.execute(status -> {
try {
//分批次插入
if (quantitySummaryList.size() > 1000) {
int index = 0;
int sum = quantitySummaryList.size();
while (index < sum) {
List<CbQuantitySummary> divideList = quantitySummaryList.subList(index, Math.max((index + 1) * 1000, sum));
boolean b = quantitySummaryService.saveBatch(divideList);
if (!b) {
throw new ServiceException("数据插入失败!");
}
index += 1000;
}
} else {
boolean b = quantitySummaryService.saveBatch(quantitySummaryList);
if (!b) {
throw new ServiceException("数据插入失败!");
}
}
file.setFileParseStatus(2);
boolean b = projectFileService.updateById(file);
if (!b) {
throw new ServiceException("文件状态更新失败!");
}
} catch (Exception e) {
status.setRollbackOnly();
file.setFileParseStatus(3);
file.setFailRemark(e.getMessage());
projectFileService.updateById(file);
}
return Boolean.TRUE;
});
// } else {
// quantitySummaryService.remove(Wrappers.<CbQuantitySummary>lambdaQuery().eq(CbQuantitySummary::getCbProjectFileId, file.getId()));
// projectFileService.removeById(file);
// }
return Boolean.TRUE;
});
}
}
}
......@@ -61,32 +61,32 @@ public interface CbProjectConstants {
/**
* 成本类型:直接费成本
*/
Integer CB_TYPE_DIRECT_EXPENSE = 0;
int CB_TYPE_DIRECT_EXPENSE = 0;
String CB_TYPE_DIRECT_EXPENSE_NAME = "直接费成本";
/**
* 成本类型:工料汇总
*/
Integer CB_TYPE_QUANTITY_SUMMARY = 1;
int CB_TYPE_QUANTITY_SUMMARY = 1;
String CB_TYPE_QUANTITY_SUMMARY_NAME = "工料汇总";
/**
* 成本类型:措施项目
*/
Integer CB_TYPE_MEASURE_PROJECT = 2;
int CB_TYPE_MEASURE_PROJECT = 2;
String CB_TYPE_MEASURE_PROJECT_NAME = "措施项目";
/**
* 成本类型:其他项目
*/
Integer CB_TYPE_OTHER_PROJECT = 3;
int CB_TYPE_OTHER_PROJECT = 3;
String CB_TYPE_OTHER_PROJECT_NAME = "其他项目";
/**
* 成本类型:现场经费
*/
Integer CB_TYPE_SCENE_EXPENSE = 4;
int CB_TYPE_SCENE_EXPENSE = 4;
String CB_TYPE_SCENE_EXPENSE_NAME = "现场经费";
/**
* 成本类型:成本汇总
*/
Integer CB_TYPE_SUMMARY = 5;
int CB_TYPE_SUMMARY = 5;
String CB_TYPE_SUMMARY_NAME = "成本汇总";
}
......@@ -3,6 +3,7 @@ package com.dsk.cscec.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.EasyExcel;
import com.dsk.common.annotation.Log;
......@@ -24,11 +25,13 @@ import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresImportVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresItemVo;
import com.dsk.cscec.domain.vo.CbProjectExpenseSummaryVo;
import com.dsk.cscec.listener.ProjectCostMeasureImportListener;
import com.dsk.cscec.service.CbProjectExpenseSummaryService;
import com.dsk.cscec.service.ICbCostMeasureService;
import com.dsk.system.domain.vo.SysUserImportVo;
import com.dsk.system.listener.SysUserImportListener;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
......@@ -63,6 +66,22 @@ public class CbCostMeasureController {
private CbProjectExpenseSummaryService cbProjectExpenseSummaryService;
/**
* 获取实际月份列表
*
* @param cbCostMeasureBo CB成本衡量范围
* @return {@link R}<{@link List}<{@link String}>>
*/
@SaIgnore
@GetMapping(value = "/actual/months")
public R<List<String>> actualMonths(CbCostMeasureActualBo cbCostMeasureBo) {
List<String> data = cbCostMeasureService.actualMonthList(cbCostMeasureBo);
if (ObjectUtil.isNull(data)) {
data = new ArrayList<>();
}
return R.ok(data);
}
/**
* 措施费一级大类
* 根据项目查询措施费一级大类
......@@ -91,8 +110,13 @@ public class CbCostMeasureController {
// @SaCheckPermission("cb:costmeasures:list")
@SaIgnore
@GetMapping("/list")
public R<List<CbCostMeasureActualVo>> list(CbCostMeasureActualBo cbCostMeasure) {
List<CbCostMeasureActualVo> data= cbCostMeasureService.selectDataList(cbCostMeasure);
public R<List> list(CbCostMeasureActualBo cbCostMeasure) {
if(ObjectUtil.isNotEmpty(cbCostMeasure)&&cbCostMeasure.getId()==0){
Integer dataType=2;
List<CbProjectExpenseSummaryVo> dataList = cbCostMeasureService.getSummaryData(cbCostMeasure.getProjectId(),dataType,cbCostMeasure.getMonth());
return R.ok(dataList);
}
List<Tree<Long>> data= cbCostMeasureService.selectDataList(cbCostMeasure);
if (ObjectUtil.isNull(data)) {
data = new ArrayList<>();
}
......@@ -133,6 +157,24 @@ public class CbCostMeasureController {
/**
* 获取上一次推送工程量
*
* @param measuresId 推送BO
* @return {@link R}<{@link List}<{@link CbCostMeasureActualVo}>>
*/
// @SaCheckPermission("cb:costmeasures:actual:push")
@SaIgnore
@GetMapping("/last/project/volume/{measuresId}")
public R<Object> lastProjectVolume(@PathVariable("measuresId") Long measuresId) {
Assert.notNull(measuresId,"措施费记录id不能为空!");
Object pushJson= cbCostMeasureService.lastProjectVolume(measuresId);
return R.ok("操作成功",pushJson);
}
/**
* 获取批量措施费列表
......@@ -200,10 +242,10 @@ public class CbCostMeasureController {
@Log(title = "措施费汇总获取")
// @SaCheckPermission("system:user:import")
@PostMapping(value = "/summary/data")
public R<List<CbProjectExpenseSummary>> summaryData(Long projectId) throws Exception {
public R<List<CbProjectExpenseSummaryVo>> summaryData(Long projectId,String month) throws Exception {
Integer dataType=2;
List<CbProjectExpenseSummary> cbProjectExpenseSummaries = cbProjectExpenseSummaryService.queryCbSceneExpenseSummaryDataByType(projectId, dataType);
return R.ok(cbProjectExpenseSummaries);
List<CbProjectExpenseSummaryVo> dataList = cbCostMeasureService.getSummaryData(projectId,dataType,month);
return R.ok(dataList);
}
......
......@@ -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.CbProjectInfoVo;
import com.dsk.cscec.domain.vo.CbProjectRecordSearchVo;
import com.dsk.cscec.service.CbProjectRecordService;
import com.dsk.cscec.service.IDProjectService;
......@@ -76,7 +77,7 @@ public class CbProjectRecordController extends BaseController {
* 获取项目历史阶段信息(懒加载)
*/
@GetMapping("/getProjectHistoryInfo")
public R<List<CbProjectRecord>> getProjectHistoryInfo(@RequestBody CbProjectHistorySearchBo searchBo) {
public R<List<CbProjectRecord>> getProjectHistoryInfo(CbProjectHistorySearchBo searchBo) {
return R.ok(baseService.getProjectHistoryInfo(searchBo));
}
......@@ -136,5 +137,13 @@ public class CbProjectRecordController extends BaseController {
public R<Void> deleteDraft(@NotNull(message = "项目ID不能为空") @PathVariable Long projectId) {
return toAjax(baseService.deleteDraft(projectId));
}
/**
* 获取工程项目信息
*/
@GetMapping("/getCbProjectInfo/{projectId}")
public R<CbProjectInfoVo> getCbProjectInfo(@NotNull(message = "项目ID不能为空") @PathVariable Long projectId) {
return R.ok(dProjectService.getCbProjectInfo(projectId));
}
}
......@@ -2,6 +2,7 @@ package com.dsk.cscec.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -10,6 +11,7 @@ import java.io.Serializable;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import org.springframework.util.ObjectUtils;
/**
* 成本-工料汇总基本表(CbQuantitySummary)表实体类
......@@ -32,7 +34,6 @@ public class CbQuantitySummary implements Serializable {
/**
* 序号
*/
@Excel(name = "序号")
private Integer number;
/**
* 成本阶段(0:标前成本 1:标后成本 2:转固成本)
......@@ -141,5 +142,12 @@ public class CbQuantitySummary implements Serializable {
@TableLogic(value = "0", delval = "2")
private Integer delFalg;
@Excel(name = "序号")
@TableField(exist = false)
private String num;
public void setNum(String num) {
this.number = ObjectUtils.isEmpty(num) ? null : Integer.valueOf(num);
}
}
......@@ -33,7 +33,6 @@ public class DProject implements Serializable {
/**
* IPM项目名称
*/
private String projectName;
/**
......@@ -49,7 +48,6 @@ public class DProject implements Serializable {
/**
* 项目简称
*/
private String projectShortName;
/**
......
......@@ -16,33 +16,33 @@ public class CbCostMeasureActualPushBo {
/**
* 截止本月工程量
* 本月实际工程量
*/
private BigDecimal costEffective;
/**
* 本月实际工程量
*/
@TableField(value = "current_project_volume")
private BigDecimal currentProjectVolume;
/**
* 推送工程量
*/
@TableField(value = "submit_project_volume")
private BigDecimal submitProjectVolume;
/**
* 年月
*/
@TableField(value = "`month`")
private String month;
/**
* 推送时间
*/
@TableField(value = "push_time")
private Date pushTime;
/**
* 推送数据json
*/
@TableField(value = "push_data_json")
private String pushDataJson;
/**
......
......@@ -9,6 +9,7 @@ import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
public class CbCostMeasureActualVo {
......@@ -17,6 +18,10 @@ public class CbCostMeasureActualVo {
*/
private Long id;
private Long parentId;
/**
* 序号
*/
......@@ -138,6 +143,9 @@ public class CbCostMeasureActualVo {
private Date pushTime;
private String pushDataJson;
/**
* 修改人
*/
......@@ -162,6 +170,10 @@ public class CbCostMeasureActualVo {
@TableField(value = "update_time")
private Date updateTime;
private List<CbCostMeasureActualVo> childrens;
public static final String COL_ID = "id";
public static final String COL_PLAN_MEASURE_ID = "plan_measure_id";
......
package com.dsk.cscec.domain.vo;
import com.baomidou.mybatisplus.annotation.*;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 项目费用汇总表
*/
@Data
public class CbProjectExpenseSummaryVo {
/**
* 主键ID
*/
private Long id;
/**
* 项目ID
*/
private Long projectId;
/**
* 项目文件ID
*/
private Long projectFileId;
/**
* 成本阶段(0:标前成本、1:标后成本、2:转固成本)
*/
private Integer cbStage;
/**
* 序号
*/
private String number;
/**
* 数据类型(2:措施项目、3:其他项目、4:现场经费)
*/
private Integer dataType;
/**
* 名称
*/
private String expenseName;
/**
* 数值
*/
private String expenseValue;
/**
* 占比
*/
private String proportion;
/**
* 本月工程量
*/
private BigDecimal monthsProjectQuantity;
}
\ No newline at end of file
package com.dsk.cscec.domain.vo;
import lombok.Data;
import java.util.Date;
/**
* @author sxk
* @date 2024.02.28
* @time 14:24
*/
@Data
public class CbProjectInfoVo {
//项目基本情况↓
/**
* 工程名称
*/
private String projectName;
/**
* 区域名称(工程所在地)
*/
private String areaName;
/**
* 城市名称(工程所在地)
*/
private String cityName;
/**
* 县市(工程所在地)
*/
private String districtName;
/**
* 项目地址(工程详细地址)
*/
private String projectAddress;
//业态
/**
* 工程类型上级名称(工程类型)
*/
private String projectType1;
//计价模式(清单/定额)
//承包形式(EPC/DB/EP/PC)
//合同类型
//建设单位
/**
* 设计单位
*/
private String designOrgName;
//勘察单位
/**
* 监理单位
*/
private String supervisorOrgName;
//代理公司(或工料测量师)
//招标形式
//承包方式
//预计合同额(万元)
/**
* 资金来源名称(资金来源)
*/
private String moneySource;
//分包标准费用项价格库
//材料机械标准费用价格库
//专业类别
//平台项目名称
//核定总人数
//折算收入不含税系数(应纳税率)
//收入清单增值税率
//项目特征信息↓
//地上建筑面积
//地下建筑面积
//坑底面积
//占地面积
//结构类型
//基础类型
//单体个数
/**
* 地上层数
*/
private String noOfOverfloor;
/**
* 地下层数
*/
private String noOfUnderfloor;
/**
* 建筑高度(m)
*/
private String constructHeight;
//地下深度
//首层(m)
//标准层(m)
//其他说明
//项目投标时的要点↓
//建筑工程
//机电工程
//专业工程暂估
//装饰工程
//配套工程
//指定分包
//报价方式/合同形式
//指定供应
//电子标
/**
* 计划开工日期
*/
private Date planStartDate;
/**
* 计划竣工日期
*/
private Date planEndDate;
/**
* 合同总工期(总工期)
*/
private String contractWorkDays;
//缺陷责任
//质量标准
//品牌要求
//质量要求
//报价中需要注意的其他问题/风险
//评标办法↓
//评标程序
//评标原则
//招标控制价(如有)
//专家组成
//定标原则
//报价上限(如有)
//投标各时间节点↓
//标前会议(或者领取投标文件的时间)
//投标人提出疑问的截止时间
//招标人答复疑问的截止时间
//现场踏勤时间
//招标控制价(如有)
//报价上限(如有)
//时间
//开标时的要求
//地点
//投标有效期
}
......@@ -13,4 +13,6 @@ public interface CbCostMeasureActualMapper extends BaseMapper<CbCostMeasureActua
int updateByPrimaryKeySelective(CbCostMeasureActual record);
List<CbCostMeasureActualVo> selectDataList(CbCostMeasureActualBo costMeasureActualBo);
List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month);
}
\ No newline at end of file
......@@ -7,10 +7,13 @@ import com.dsk.cscec.domain.CbCostMeasure;
import com.dsk.cscec.domain.CbQuantitySummary;
import com.dsk.cscec.domain.bo.CbCostMeasureActualBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface CbCostMeasureMapper extends BaseMapper<CbCostMeasure> {
List<CbCostMeasureActualVo> selectListByProjectAndNo(CbCostMeasureActualBo cbCostMeasure);
List<String> actualMonthList(CbCostMeasureActualBo cbCostMeasureBo);
}
\ No newline at end of file
......@@ -20,6 +20,7 @@ import java.util.Map;
*/
public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummaryMapper,CbQuantitySummary,CbQuantitySummary> {
int batchInsert(@Param("list") List<CbQuantitySummary> list);
List<Map<String, Object>> selectSubject(CbProjectBaseBo bo);
......@@ -29,5 +30,7 @@ public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummar
List<CbQuantitySummaryListVo> selectListBySubject(CbQuantitySummaryListBo bo);
}
......@@ -19,5 +19,6 @@ import java.util.Map;
*/
public interface ICbCostMeasureActualService extends IService<CbCostMeasureActual> {
List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month);
}
package com.dsk.cscec.service;
import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.entity.SysDictData;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.CbCostMeasure;
import com.dsk.cscec.domain.CbProjectExpenseSummary;
import com.dsk.cscec.domain.bo.CbCostMeasureActualBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualPushBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresItemVo;
import org.springframework.web.multipart.MultipartFile;
import com.dsk.cscec.domain.vo.CbProjectExpenseSummaryVo;
import java.io.InputStream;
import java.util.List;
......@@ -29,7 +25,7 @@ public interface ICbCostMeasureService extends IService<CbCostMeasure> {
List<Map<String, Object>> listByLevel(Long projectId, int i);
List<CbCostMeasureActualVo> selectDataList(CbCostMeasureActualBo cbCostMeasure);
List<Tree<Long>> selectDataList(CbCostMeasureActualBo cbCostMeasure);
void saveBatchCostMeasureActual(List<CbCostMeasureActualSaveBo> boList);
......@@ -40,5 +36,11 @@ public interface ICbCostMeasureService extends IService<CbCostMeasure> {
void parseCbCostMeasureFile(Long projectId);
boolean reparseCbCostMeasureFile(Long projectId,Long projectFileId);
String lastProjectVolume(Long measuresId);
List<String> actualMonthList(CbCostMeasureActualBo cbCostMeasureBo);
List<CbProjectExpenseSummaryVo> getSummaryData(Long projectId, Integer dataType,String month);
}
......@@ -28,5 +28,7 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
void pushData(CbQuantitySummaryActual bo);
boolean batchInsert(List<CbQuantitySummary> list);
}
......@@ -7,6 +7,7 @@ import com.dsk.cscec.domain.DProject;
import com.dsk.cscec.domain.bo.CooperateProjectDetailSearchBo;
import com.dsk.cscec.domain.bo.ProjectDetailBo;
import com.dsk.cscec.domain.bo.ProjectSearchBo;
import com.dsk.cscec.domain.vo.CbProjectInfoVo;
import com.dsk.cscec.domain.vo.CooperateProjectDetailSearchVo;
import com.dsk.cscec.domain.vo.ProjectDetailVo;
import com.dsk.cscec.domain.vo.ProjectSearchVo;
......@@ -60,5 +61,12 @@ public interface IDProjectService extends IService<DProject> {
* @return 校验结果
*/
Boolean checkProjectCodeExist(String projectCode);
/**
* 获取工程项目信息
* @param projectId 项目ID
* @return 工程项目信息
*/
CbProjectInfoVo getCbProjectInfo(Long projectId);
}
package com.dsk.cscec.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.file.FileNameUtil;
import cn.hutool.core.lang.Assert;
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.util.ObjectUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.http.HttpUtil;
......@@ -16,6 +21,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.excel.ExcelResult;
import com.dsk.common.helper.LoginHelper;
import com.dsk.common.utils.JsonUtils;
import com.dsk.common.utils.TreeBuildUtils;
import com.dsk.common.utils.poi.ExcelUtil;
import com.dsk.cscec.constant.CbProjectConstants;
import com.dsk.cscec.domain.*;
......@@ -25,6 +31,7 @@ import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresImportVo;
import com.dsk.cscec.domain.vo.CbProjectExpenseSummaryImportVo;
import com.dsk.cscec.domain.vo.CbProjectExpenseSummaryVo;
import com.dsk.cscec.listener.ProjectCostMeasureImportListener;
import com.dsk.cscec.listener.ProjectCostMeasureSummaryImportListener;
import com.dsk.cscec.service.*;
......@@ -37,11 +44,10 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Slf4j
@Service
......@@ -161,27 +167,53 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
}
@Override
public List<CbCostMeasureActualVo> selectDataList(CbCostMeasureActualBo costMeasureActualBo) {
public List<Tree<Long>> selectDataList(CbCostMeasureActualBo costMeasureActualBo) {
List<CbCostMeasureActualVo> dataList = new ArrayList<>();
Assert.notNull(costMeasureActualBo.getProjectId(), "项目ID不能为空");
CbProjectRecord byId = cbProjectRecordService.getById(costMeasureActualBo.getProjectId());
Assert.notNull(byId, "项目信息不能为空");
checkProjectExist(costMeasureActualBo.getProjectId());
//查询项目某项措施费所有计划成本
dataList = baseMapper.selectListByProjectAndNo(costMeasureActualBo);
// if (CollectionUtil.isEmpty(dataList)) {
// return dataList;
// }
// // 查询项目某项措施费某月所有实际成本
// List<CbCostMeasureActualVo> actualVoList= cbCostMeasureActualMapper.selectDataList(costMeasureActualBo);
// if (CollectionUtil.isEmpty(actualVoList)) {
// return dataList;
// }
// for (CbCostMeasureActualVo cbCostMeasureActualVo : actualVoList) {
//
// }
return dataList;
//配置类
TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
treeNodeConfig.setIdKey("id");
treeNodeConfig.setParentIdKey("parentId");
treeNodeConfig.setChildrenKey("childrens");
//构建树形
List<Tree<Long>> trees = TreeUtil.build(dataList, costMeasureActualBo.getId(), treeNodeConfig, ((object, treeNode) -> {
treeNode.setId(object.getId());//id
treeNode.setParentId(object.getParentId());//父id
// 扩展属性 ...
treeNode.putExtra("itemContent", object.getItemContent());
treeNode.putExtra("number", object.getNumber());
treeNode.putExtra("workContent", object.getWorkContent());
treeNode.putExtra("unit", object.getUnit());
treeNode.putExtra("quantity", object.getQuantity());
treeNode.putExtra("unitPriceExcludingTax", object.getUnitPriceExcludingTax());
treeNode.putExtra("usageTime", object.getUsageTime());
treeNode.putExtra("amountExcludingTax", object.getAmountExcludingTax());
treeNode.putExtra("taxRate", object.getTaxRate());
treeNode.putExtra("amountIncludingTax", object.getAmountIncludingTax());
treeNode.putExtra("amortizationRatio", object.getAmortizationRatio());
treeNode.putExtra("amountIncludeTaxAmortized", object.getAmountIncludeTaxAmortized());
treeNode.putExtra("amountExcludeTaxAmortized", object.getAmountExcludeTaxAmortized());
treeNode.putExtra("taxAmount", object.getTaxAmount());
treeNode.putExtra("remarks", object.getRemarks());
treeNode.putExtra("costSubject", object.getCostSubject());
treeNode.putExtra("taxType", object.getTaxType());
treeNode.putExtra("planMeasureId", object.getPlanMeasureId());
treeNode.putExtra("monthCostRate", object.getMonthCostRate());
treeNode.putExtra("costEffective", object.getCostEffective());
treeNode.putExtra("currentProjectVolume", object.getCurrentProjectVolume());
treeNode.putExtra("submitProjectVolume", object.getSubmitProjectVolume());
treeNode.putExtra("month", object.getMonth());
treeNode.putExtra("pushTime", object.getPushTime());
treeNode.putExtra("pushDataJson", object.getPushDataJson());
treeNode.putExtra("createTime", object.getCreateTime());
}));
return trees;
}
@Override
......@@ -212,7 +244,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
@SneakyThrows
@Override
public List<String> importExcelSummaryData(InputStream inputStream, Long projectId,Long fileId, Integer dataType) {
public List<String> importExcelSummaryData(InputStream inputStream, Long projectId, Long fileId, Integer dataType) {
CbProjectRecord byId = cbProjectRecordService.getById(projectId);
Assert.notNull(byId, "项目信息不能为空");
......@@ -256,7 +288,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
if ("措施费".equals(prefix)) {
byte[] bytes = HttpUtil.downloadBytes(cbProjectFile.getFileOssUrl());
InputStream inputStream = new ByteArrayInputStream(bytes);
List<String> errlist = importExcelSummaryData(inputStream, projectId,cbProjectFile.getId(), 2);
List<String> errlist = importExcelSummaryData(inputStream, projectId, cbProjectFile.getId(), 2);
if (CollectionUtil.isNotEmpty(errlist)) {
cbProjectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
} else {
......@@ -274,7 +306,8 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
}
}
private void checkProjectExist(Long projectId){
private void checkProjectExist(Long projectId) {
CbProjectRecord byId = cbProjectRecordService.getById(projectId);
Assert.notNull(byId, "项目信息不能为空");
}
......@@ -296,7 +329,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
if ("措施费".equals(prefix)) {
byte[] bytes = HttpUtil.downloadBytes(cbProjectFile.getFileOssUrl());
InputStream inputStream = new ByteArrayInputStream(bytes);
List<String> errlist = importExcelSummaryData(inputStream, projectId,projectFileId, 2);
List<String> errlist = importExcelSummaryData(inputStream, projectId, projectFileId, 2);
if (CollectionUtil.isNotEmpty(errlist)) {
cbProjectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
} else {
......@@ -319,6 +352,55 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
return false;
}
@Override
public String lastProjectVolume(Long measuresId) {
LambdaQueryWrapper<CbCostMeasureActual> lambdaQueryWrapper = Wrappers.lambdaQuery();
lambdaQueryWrapper.eq(CbCostMeasureActual::getPlanMeasureId, measuresId)
.isNotNull(CbCostMeasureActual::getPushTime)
.orderByDesc(CbCostMeasureActual::getUpdateTime).last(" limit 1");
CbCostMeasureActual cbCostMeasureActual = cbCostMeasureActualService.getOne(lambdaQueryWrapper);
if (ObjectUtil.isNotEmpty(cbCostMeasureActual)) {
return cbCostMeasureActual.getPushDataJson();
}
return null;
}
@Override
public List<String> actualMonthList(CbCostMeasureActualBo cbCostMeasureBo) {
List<String> months = baseMapper.actualMonthList(cbCostMeasureBo);
return months;
}
@Override
public List<CbProjectExpenseSummaryVo> getSummaryData(Long projectId, Integer dataType, String month) {
List<CbProjectExpenseSummaryVo> dataList = new ArrayList<>();
List<CbProjectExpenseSummary> cbProjectExpenseSummaries = cbProjectExpenseSummaryService.queryCbSceneExpenseSummaryDataByType(projectId, dataType);
if (CollectionUtil.isEmpty(cbProjectExpenseSummaries)) {
return new ArrayList<>();
}
Map<String, BigDecimal> map = new HashMap<>();
//查询本月实际工程量
List<CbCostMeasureActualVo> monthActualCostList = cbCostMeasureActualService.getMonthActualCostList(projectId, month);
if (CollectionUtil.isNotEmpty(monthActualCostList)) {
map = monthActualCostList.stream()
.collect(Collectors.toMap(
CbCostMeasureActualVo::getItemContent, // 把CbCostMeasureActualVo属性提取为map的key
CbCostMeasureActualVo::getCostEffective // 把CbCostMeasureActualVo属性提取为map的value
));
}
for (CbProjectExpenseSummary cbProjectExpenseSummary : cbProjectExpenseSummaries) {
CbProjectExpenseSummaryVo summaryVo = BeanUtil.copyProperties(cbProjectExpenseSummary, CbProjectExpenseSummaryVo.class);
summaryVo.setMonthsProjectQuantity(map.get(cbProjectExpenseSummary.getExpenseName()));
dataList.add(summaryVo);
}
return dataList;
}
/**
* 根据当前序号、项目id、成本阶段查询父级信息
......
......@@ -72,6 +72,7 @@ public class CbProjectExpenseSummaryServiceImpl extends ServiceImpl<CbProjectExp
InputStream inputStream = ossService.downFileIO(projectFile.getFileOssId());
if (ObjectUtil.isNull(inputStream)) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
log.error("FileId:" + projectFile.getId() + ",文件数据不存在");
projectFile.setFailRemark("文件数据不存在");
projectFileMapper.updateById(projectFile);
continue;
......@@ -80,6 +81,7 @@ public class CbProjectExpenseSummaryServiceImpl extends ServiceImpl<CbProjectExp
List<CbProjectExpenseSummary> importList = new ExcelUtils<>(CbProjectExpenseSummary.class).importExcelAllSheet(inputStream, 0);
if (importList.isEmpty()) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
log.error("FileId:" + projectFile.getId() + ",表格中不存在待导入数据");
projectFile.setFailRemark("表格中不存在待导入数据!");
projectFileMapper.updateById(projectFile);
continue;
......@@ -100,7 +102,8 @@ public class CbProjectExpenseSummaryServiceImpl extends ServiceImpl<CbProjectExp
.collect(Collectors.toList());
if (summaryList.size() != importList.size()) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
projectFile.setFailRemark("表格中存在\"名称\"列为空数据!");
log.error("FileId:" + projectFile.getId() + ",表格中存在\"名称\"列为空数据!");
projectFile.setFailRemark("表格中存在\"名称\"列为空数据");
projectFileMapper.updateById(projectFile);
continue;
}
......
......@@ -181,7 +181,7 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
file.setFileParseStatus(3);
file.setFailRemark("文件数据不存在");
projectFileService.updateById(file);
break;
continue;
}
// 文件名称
......@@ -191,7 +191,7 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
Long fileId = file.getId();
if ("其他费".equals(name)) {
totalDataAnalysis(inputStream, name, file, projectId, cbStage);
break;
continue;
}
//解析数据
ExcelResult<CbProjectOtherImportVo> importVoExcelResult =
......@@ -204,7 +204,7 @@ public class CbProjectOtherServiceImpl extends ServiceImpl<CbProjectOtherMapper,
file.setFileParseStatus(3);
file.setFailRemark("表格中不存在待导入数据!");
projectFileService.updateById(file);
break;
continue;
}
log.debug(">>>>" + importVoList.size());
CbProjectOther rootProjectOther = new CbProjectOther();
......
......@@ -139,5 +139,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
//TODO 推送数据
}
@Override
public boolean batchInsert(List<CbQuantitySummary> list) {
int i = baseMapper.batchInsert(list);
return i == list.size();
}
}
......@@ -113,6 +113,7 @@ public class CbSceneExpenseChildrenServiceImpl extends ServiceImpl<CbSceneExpens
InputStream inputStream = ossService.downFileIO(projectFile.getFileOssId());
if (ObjectUtil.isNull(inputStream)) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
log.error("FileId:" + projectFile.getId() + ",文件数据不存在");
projectFile.setFailRemark("文件数据不存在");
projectFileMapper.updateById(projectFile);
continue;
......@@ -121,6 +122,7 @@ public class CbSceneExpenseChildrenServiceImpl extends ServiceImpl<CbSceneExpens
List<CbSceneExpenseChildrenImportBo> importList = new ExcelUtils<>(CbSceneExpenseChildrenImportBo.class).importExcelAllSheet(inputStream, 0);
if (importList.isEmpty()) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
log.error("FileId:" + projectFile.getId() + ",表格中不存在待导入数据");
projectFile.setFailRemark("表格中不存在待导入数据");
projectFileMapper.updateById(projectFile);
continue;
......@@ -154,7 +156,8 @@ public class CbSceneExpenseChildrenServiceImpl extends ServiceImpl<CbSceneExpens
.collect(Collectors.toList());
if (summaryList.size() != importList.size()) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
projectFile.setFailRemark("表格中存在\"名称\"列为空数据!");
log.error("FileId:" + projectFile.getId() + ",表格中存在\"名称\"列为空数据");
projectFile.setFailRemark("表格中存在\"名称\"列为空数据");
projectFileMapper.updateById(projectFile);
continue;
}
......
......@@ -3,11 +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.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.util.List;
/**
* @author tanyang
* @create 2024-02-07 9:38
......@@ -15,4 +18,8 @@ import org.springframework.stereotype.Service;
@Service
public class ICbCostMeasureActualServiceImpl extends ServiceImpl<CbCostMeasureActualMapper, CbCostMeasureActual> implements ICbCostMeasureActualService {
@Override
public List<CbCostMeasureActualVo> getMonthActualCostList(Long projectId, String month) {
return baseMapper.getMonthActualCostList(projectId,month);
}
}
......@@ -3,6 +3,7 @@ package com.dsk.cscec.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -15,15 +16,18 @@ import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.constant.AdvisoryBodyManageQueryConstants;
import com.dsk.cscec.domain.AdvisoryBody;
import com.dsk.cscec.domain.AdvisoryBodyProject;
import com.dsk.cscec.domain.CbProjectRecord;
import com.dsk.cscec.domain.DProject;
import com.dsk.cscec.domain.bo.CooperateProjectDetailSearchBo;
import com.dsk.cscec.domain.bo.ProjectDetailBo;
import com.dsk.cscec.domain.bo.ProjectSearchBo;
import com.dsk.cscec.domain.vo.CbProjectInfoVo;
import com.dsk.cscec.domain.vo.CooperateProjectDetailSearchVo;
import com.dsk.cscec.domain.vo.ProjectDetailVo;
import com.dsk.cscec.domain.vo.ProjectSearchVo;
import com.dsk.cscec.mapper.AdvisoryBodyMapper;
import com.dsk.cscec.mapper.AdvisoryBodyProjectMapper;
import com.dsk.cscec.mapper.CbProjectRecordMapper;
import com.dsk.cscec.mapper.DProjectMapper;
import com.dsk.cscec.service.IDProjectService;
import com.dsk.jsk.domain.EnterpriseInfoHeaderBody;
......@@ -52,6 +56,8 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
private AdvisoryBodyProjectMapper advisoryBodyProjectMapper;
@Resource
private DskOpenApiUtil dskOpenApiUtil;
@Resource
private CbProjectRecordMapper projectRecordMapper;
/**
* 获取所有项目列表数据
......@@ -258,5 +264,19 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
return baseMapper.exists(new LambdaQueryWrapper<DProject>()
.eq(DProject::getProjectCode, projectCode));
}
/**
* 获取工程项目信息
*
* @param projectId 项目ID
* @return 工程项目信息
*/
@Override
public CbProjectInfoVo getCbProjectInfo(Long projectId) {
CbProjectRecord projectRecord = projectRecordMapper.selectById(projectId);
Assert.isTrue(projectRecord.getIsGetProjectDetail(), "请先通过IPM项目编码获取数据,或IPM项目编码无效");
return BeanUtil.toBean(baseMapper.selectOne(new LambdaQueryWrapper<DProject>()
.eq(DProject::getProjectCode, projectRecord.getIpmProjectNo())), CbProjectInfoVo.class);
}
}
......@@ -174,4 +174,14 @@
AND t.cb_stage=#{cbStage}
AND t1.`month`=#{month}
</select>
<select id="getMonthActualCostList" resultType="com.dsk.cscec.domain.vo.CbCostMeasureActualVo">
SELECT t1.item_content, t.cost_effective
FROM cb_cost_measure_actual t
inner JOIN cb_cost_measure t1 ON t1.id=t.plan_measure_id
WHERE
t1.project_id=1
AND t1.parent_id=0
AND t.`month`='202406'
</select>
</mapper>
\ No newline at end of file
......@@ -36,7 +36,7 @@
id, project_id, cb_stage, parent_id, `level`, `number`, `no`,item_content, work_content,
unit, quantity, unit_price_excluding_tax, usage_time, amount_excluding_tax, tax_rate,
amount_including_tax, amortization_ratio, amount_exclude_tax_amortized, amount_include_tax_amortized,
tax_amount, remarks, cost_subject, tax_type, create_time, update_time
tax_amount, remarks, cost_subject, tax_type,data_source, create_time, update_time
</sql>
......@@ -54,4 +54,15 @@
AND t.`no` like concat(#{id},'.%')
ORDER BY id ASC
</select>
<select id="actualMonthList" resultType="java.lang.String">
SELECT
t1.`month`
FROM cb_cost_measure t
inner JOIN cb_cost_measure_actual t1 ON t1.plan_measure_id=t.id
WHERE
t.project_id=#{projectId}
and t1.del_flag=0
GROUP BY t1.`month` ORDER BY t1.`month` desc
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.CbQuantitySummaryMapper">
<insert id="batchInsert" parameterType="com.dsk.cscec.domain.CbQuantitySummary">
INSERT INTO cscec_bms.cb_quantity_summary
(project_id, `number`, cb_stage, cb_subject_name, company_no, org_no, cb_name, job_content,
calculation_rule, unit, material_description, guide_price, bid_unit_price, unit_price_difference, quantity,
combined_price, combined_price_tax, brand_name, bid_source, remark, cb_project_file_id)
VALUES
<foreach collection="list" item="item" separator="," >
(#{item.projectId}, #{item.number}, #{item.cbStage}, #{item.cbSubjectName}, #{item.companyNo}, #{item.orgNo}, #{item.cbName},
#{item.jobContent},#{item.calculationRule},#{item.unit},#{item.materialDescription},#{item.guidePrice},
#{item.bidUnitPrice},#{item.unitPriceDifference},#{item.quantity},#{item.combinedPrice},#{item.combinedPriceTax},
#{item.brandName},#{item.bidSource},#{item.remark},#{item.cbProjectFileId})
</foreach>
</insert>
<select id="selectSubject" resultType="java.util.Map">
select
......
......@@ -134,7 +134,7 @@
from cb_summary csu
left join cb_summary_actual csa on (csu.id = csa.cb_summary_id and csa.expense_date = #{expenseDate} AND csa.del_flag = 0)
left join cb_summary_actual csa1 on (csu.id = csa1.cb_summary_id and csa1.expense_date &lt;= #{expenseDate} AND csa1.del_flag = 0)
left join cb_direct_expense cde on (csu.project_id = cde.project_id and csu.cb_stage = cde.cb_stage and cde.del_flag = 0)
left join cb_direct_expense cde on (csu.project_id = cde.project_id and cde.del_flag = 0)
where csu.id = #{id} and csu.del_flag = 0
group by csu.id
order by csu.sort
......@@ -147,7 +147,7 @@
from cb_summary csu
left join cb_summary_actual csa on (csu.id = csa.cb_summary_id and csa.expense_date = #{expenseDate} AND csa.del_flag = 0)
left join cb_summary_actual csa1 on (csu.id = csa1.cb_summary_id and csa1.expense_date &lt;= #{expenseDate} AND csa1.del_flag = 0)
left join cb_direct_expense cde on (csu.project_id = cde.project_id and csu.cb_stage = cde.cb_stage and cde.del_flag = 0)
left join cb_direct_expense cde on (csu.project_id = cde.project_id and cde.del_flag = 0)
where csu.parent_id = #{parentId} and csu.del_flag = 0
group by csu.id
order by csu.sort
......
......@@ -57,11 +57,20 @@ export function getProjectFileUploadDetail(projectId) {
});
}
//根据项目文件导入数据
export function importData(projectId) {
return request({
url: '/cbProjectRecord/importData/'+projectId,
method: 'post',
});
}
//获取草稿箱列表
export function getDraftDialogList(projectId) {
export function getDraftDialogList(data) {
return request({
url: '/cbProjectRecord/getDraftDialogList',
method: 'get',
params:data
});
}
......@@ -74,10 +83,11 @@ export function uploadCbProjectFile(data) {
});
}
//删除文件
export function deleteCbProjectFile(fileId) {
export function deleteCbProjectFile(data) {
return request({
url: '/cbProjectFile/deleteCbProjectFile/' + fileId,
url: '/cbProjectFile/deleteCbProjectFile',
method: 'Delete',
data: data
});
}
......@@ -154,6 +164,40 @@ export function getSummarydata(data) {
data: data
});
}
//措施费推送工程量
export function pushProjectvolume(data) {
return request({
url: '/cb/cost/measures/push/project/volume',
method: 'post',
data: data
});
}
//措措施费-获取上一次推送工程量
export function projectVolume(data) {
return request({
url: '/cb/cost/measures/last/project/volume/' + data,
method: 'GET',
});
}
//措施费-获取实际成本月份列表
export const getActualMonthsApi = (params = {}) => request({
url: '/cb/cost/measures/actual/months',
method: 'get',
params
});
//批量保存或修改每月措施费
export function saveBatch(data) {
return request({
url: '/cb/cost/measures/saveBatch',
method: 'post',
data:data,
});
}
// 工料汇总
......@@ -169,6 +213,17 @@ export const getFeedSummaryMenuTreeApi = (params = {}) => request({
params
});
/**
* 获取已记录月份集合
* @param {*} params
* @returns
*/
export const getFeedSummaryMonthListApi = (params = {}) => request({
url: "/cb/quantity/summary/monthList",
method: "get",
params
});
/**
* 获取科目月份列表
* @param {{
......@@ -176,8 +231,8 @@ export const getFeedSummaryMenuTreeApi = (params = {}) => request({
* recordDate : string;
* projectId : number;
* cbStage : number
* }} params
* @returns
* }} params
* @returns
*/
export const getFeedSummaryListApi = (params = {}) => request({
url: "/cb/quantity/summary/subjectList",
......@@ -185,6 +240,14 @@ export const getFeedSummaryListApi = (params = {}) => request({
params
});
//工程项目信息
export const getCbProjectInfo = (relatedId) => request({
url: '/cbProjectRecord/getCbProjectInfo/' + relatedId,
method: "get",
});
// 其他项目
//其他项目左侧菜单
......@@ -198,3 +261,10 @@ export const getProjectOtherStatistics = (relatedId) => request({
url: '/cb/projectOther/statistics/' + relatedId,
method: "get",
});
//其他费用-其他费用列表
export const getProjectOtherList = (params = {}) => request({
url: "/cb/projectOther/list",
method: "get",
params
});
<template>
<div class="dsk-skeleton-outer-container">
<el-skeleton :animated="true" class="dsk-skeleton-inner-container">
<template slot="template">
<template v-for="item of count">
<div :key="item">
<el-skeleton-item variant="text" style="width: 60%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
</div>
</template>
</template>
</el-skeleton>
</div>
</template>
<script>
export default {
name: 'dskSkeleton',
data() {
return {
count: 0
};
},
created() {
this.getSkeletonCount();
},
methods: {
async getSkeletonCount() {
try {
await this.$nextTick();
const skeletonContainer = this.$el.querySelector(".dsk-skeleton-inner-container");
const height = skeletonContainer.offsetHeight;
// 160高度为一组
const group = Math.round(height / 160);
this.count = group;
} catch (error) {
}
}
}
}
</script>
<style lang="scss" scoped>
.dsk-skeleton-outer-container {
padding: 0px 16px;
background: #fff;
z-index: 999;
.dsk-skeleton-inner-container {
width: 100%;
height: 100%;
overflow: hidden;
}
}
.el-skeleton__item {
height: 20px;
border-radius: 0;
margin-top: 16px;
background: #f0f0f0;
}
.el-skeleton {
.el-skeleton__item:last-of-type {
/* margin-bottom: 16px; */
}
}
</style>
......@@ -3,11 +3,13 @@
<!-- tab列表 -->
<div class="dsk-tab-items-container">
<div class="dsk-tab-items-container-inner">
<div class="dsk-tab-item" v-for="item of tabs" :key="item.id" :class="{'tab-current' : item.value == currentValue}">
<div class="dsk-tab-item-name" @click="tabChoose(item)">{{item.name}}</div>
<div class="dsk-tab-item" v-for="item of tabs" :key="item.id"
:class="{'tab-current' : item.value == currentValue,'tab-is-disabled' : item.disabled || comDisabled}">
<div class="dsk-tab-item-name" @click="item.disabled || comDisabled ? '' : tabChoose(item)">{{item.name}}</div>
</div>
<!-- 下滑条 -->
<div class="dsk-tab-sliding-bar" v-if="tabs.length" :style="{width : `${silidingBarWidth}px`,transform : `translateX(${silidingBarLeft}px)`}">
<div class="dsk-tab-sliding-bar" v-if="tabs.length && this.showTabsSlidingbar && !comDisabled"
:style="{width : `${silidingBarWidth}px`,transform : `translateX(${silidingBarLeft}px)`}">
</div>
</div>
</div>
......@@ -25,6 +27,10 @@ export default {
required: true,
type: Array,
default: () => []
},
disabled: {
type: Boolean,
default: false
}
},
watch: {
......@@ -32,6 +38,12 @@ export default {
handler(newValue) {
this.initSlidingBar();
}
},
// 全部禁用不显示滚动条
disabled: {
handler(newValue) {
this.comDisabled = newValue ? true : false;
}
}
},
model: {
......@@ -41,7 +53,8 @@ export default {
data() {
return {
silidingBarLeft: 0,
silidingBarWidth: 0
silidingBarWidth: 0,
comDisabled: this.disabled ? true : false
};
},
//可访问data属性
......@@ -50,7 +63,13 @@ export default {
},
//计算集
computed: {
showTabsSlidingbar() {
const current = this.tabs.find(item => item.value == this.currentValue);
if (current) {
return current.disabled ? false : true;
}
return false;
}
},
//方法集
methods: {
......@@ -124,6 +143,13 @@ export default {
font-weight: bold;
}
}
&.tab-is-disabled {
.dsk-tab-item-name {
color: #eee;
cursor: not-allowed;
}
}
}
.dsk-tab-sliding-bar {
......
<template>
<div class="dsk-table-header-setting" @click="showHeaderSetting">
<svg-icons :icon-class="'table-header-setting-icon'" :class-name="'table-header-setting-icon'"></svg-icons>
<div class="table-header-setting-text">表头设置</div>
<div class="dsk-table-header-setting">
<div class="event-target-container" @click="showHeaderSetting">
<svg-icons :icon-class="'table-header-setting-icon'" :class-name="'table-header-setting-icon'"></svg-icons>
<div class="table-header-setting-text">表头设置</div>
</div>
<transition appear name="head" mode="out-in">
<setting-bar v-if="showHeaderSettingStatus" :settingList="settingList" @settingChange="settingChange"
@settingClose="showHeaderSettingStatus = false"></setting-bar>
......@@ -39,6 +41,10 @@ export default {
//方法集
methods: {
showHeaderSetting() {
if (this.showHeaderSettingStatus) {
this.showHeaderSettingStatus = false;
return;
};
this.showHeaderSettingStatus = true;
},
settingChange(use) {
......@@ -62,6 +68,11 @@ export default {
}
}
.event-target-container {
display: flex;
align-items: center;
}
.table-header-setting-icon {
cursor: pointer;
}
......
<template>
<div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal}">
<div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams}">
<div class="table-item">
<el-table v-if="tableDataTotal>0" class="fixed-table" :class="headerFixed ? 'headerFixed':''" v-loading="tableLoading" :data="tableData"
element-loading-text="Loading" ref="tableRef" border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}"
......@@ -9,7 +9,7 @@
:fixed="needSelection.fixed" :align="needSelection.align" :show-overflow-tooltip="needSelection.showOverflowTooltip">
</el-table-column>
<el-table-column type="index" v-if="isIndex" label="序号" :width="flexWidth(tableData)" align="left" :fixed="indexFixed" :resizable="false">
<template slot-scope="scope">{{ queryParams.pageNum * queryParams.pageSize - queryParams.pageSize + scope.$index + 1 }}</template>
<template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template>
</el-table-column>
<template v-for="(item,index) in formColum">
<template v-if="item.use !== false">
......@@ -20,8 +20,9 @@
</el-table-column>
<!-- 序号列 -->
<el-table-column v-else-if="item.type == 'index'" type="index" :key="item.uid ? item.uid : index" :label="item.label ? item.label : '序号'"
:width="flexWidth(tableData)" :align="item.align?item.align:'left'" :fixed="item.fixed" :resizable="false">
<template slot-scope="scope">{{ queryParams.pageNum * queryParams.pageSize - queryParams.pageSize + scope.$index + 1 }}</template>
:width="flexWidth(tableData,item.width)" :min-width="item.minWidth" :align="item.align?item.align:'left'" :fixed="item.fixed"
:resizable="false">
<template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template>
</el-table-column>
<!-- 普通列 -->
<el-table-column v-else :key="item.uid ? item.uid : index" :label="item.label" :prop="item.prop" :width="item.width"
......@@ -63,7 +64,7 @@
</div>
</div>
<div class="pagination-box" v-if="show_page && tableDataTotal>queryParams.pageSize">
<div class="pagination-box" v-if="show_page && hasQueryParams && tableDataTotal>queryParams.pageSize">
<el-pagination background :current-page="current_page" :page-size="queryParams.pageSize" :total="tableDataTotal"
layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</div>
......@@ -169,12 +170,26 @@ export default {
return {
current_page: this.queryParams.pageNum,
show_page: this.paging,
comMaxHeight: null
comMaxHeight: null,
hasQueryParams: false
};
},
watch: {
'queryParams.pageNum'(newVal, oldVal) {
this.current_page = newVal;
},
queryParams: {
handler(newValue) {
const _temp = newValue ? newValue : {};
const keys = Object.keys(_temp);
if (keys.length) {
this.hasQueryParams = true;
} else {
this.hasQueryParams = false;
}
},
immediate: true,
deep: true
}
},
created() {
......@@ -196,6 +211,14 @@ export default {
}
},
pagingHandler(hasQueryParams, queryParams, scope) {
// 有分页参数
if (hasQueryParams) {
return queryParams.pageNum * queryParams.pageSize - queryParams.pageSize + scope.$index + 1;
}
// 不分页
return scope.$index + 1;
},
handleCurrentChange(e) {
if (this.MaxPage < e) {
this.show_page = false;
......@@ -217,12 +240,12 @@ export default {
selectionChange(selectionArray) {
this.$emit("selectionChange", selectionArray);
},
flexWidth(tableData) {
let currentMax = this.queryParams.pageNum * this.queryParams.pageSize - this.queryParams.pageSize + tableData.length, wdth = 50;
flexWidth(tableData, width = 50) {
let currentMax = this.queryParams.pageNum * this.queryParams.pageSize - this.queryParams.pageSize + tableData.length;
if (currentMax.toString().length > 3) {
wdth = wdth + (currentMax.toString().length - 3) * 10;
width = width + (currentMax.toString().length - 3) * 10;
}
return wdth + 'px';
return width + 'px';
}
}
}
......@@ -236,6 +259,12 @@ export default {
height: 100%;
}
}
&.no-pagination {
::v-deep .table-item {
max-height: 100%;
}
}
::v-deep .table-item {
width: 100%;
max-height: calc(100% - 40px);
......
......@@ -44,33 +44,33 @@
</template>
<script>
import InfoTable from '../../../../component/infoTable';
import { getCbProjectInfo } from "@/api/projectCostLedger";
export default {
name: "projectInformation",
components: {InfoTable},
data() {
return {
comProjectId:'',
labelWidth: 250,
forInfo: {
name:'宝安中学(集团)初中部改扩建工程施工总承包(二次公告)',
},
forInfo: { },
defaultList1: [
// { name: '工程名称', prop: 'name', slot: true },
{ name: '工程名称', prop: 'name', style: true },
{ name: '工程所在地', prop: 'creditNo' },
{ name: '工程详细地址', prop: 'operName' },
{ name: '工程名称', prop: 'projectName', style: true },
{ name: '工程所在地', prop: 'areaName' },
{ name: '工程详细地址', prop: 'projectAddress' },
{ name: '业态', prop: 'status' },
{ name: '工程类型', prop: 'startDate' },
{ name: '工程类型', prop: 'projectType1' },
{ name: '计价模式(清单/定额)', prop: 'registCapi' },
{ name: '承包形式(EPC/DB/EP/PC)', prop: 'actualCapi'},
{ name: '合同类型', prop: 'checkDate' },
{ name: '建设单位', prop: 'orgNo' },
{ name: '设计单位', prop: 'regNo' },
{ name: '设计单位', prop: 'designOrgName' },
{ name: '勘察单位', prop: 'creditNo' },
{ name: '监理单位', prop: 'econKind' },
{ name: '监理单位', prop: 'supervisorOrgName' },
{ name: '代理公司(或工料测量师)', prop: 'term'},
{ name: '招标形式', prop: 'qualification' },
{ name: '承包方式', prop: 'provinceCode'},
{ name: '资金来源', prop: 'belongOrg' },
{ name: '资金来源', prop: 'moneySource' },
{ name: '分包标准费用项价格库', prop: 'colleguesNum'},
{ name: '材料机械标准费用价格库', prop: 'colleguesNum'},
{ name: '专业类别', prop: 'scope'},
......@@ -87,9 +87,9 @@ export default {
{ name: '结构类型', prop: 'registCapi' },
{ name: '基础类型', prop: 'actualCapi'},
{ name: '单体个数', prop: 'checkDate', style: true },
{ name: '地上层数', prop: 'orgNo' },
{ name: '地下层数', prop: 'regNo' },
{ name: '建筑高度', prop: 'creditNo' },
{ name: '地上层数', prop: 'noOfOverfloor' },
{ name: '地下层数', prop: 'noOfUnderfloor' },
{ name: '建筑高度', prop: 'constructHeight' },
{ name: '地下深度', prop: 'econKind' },
{ name: '首层(m)', prop: 'term'},
{ name: '标准层(m)', prop: 'qualification' },
......@@ -146,9 +146,9 @@ export default {
time:'2023-10-20'
},
defaultListYd4: [
{ name: '计划开工日期', prop: 'time' },
{ name: '计划竣工日期', prop: 'operName' },
{ name: '总工期(天)', prop: 'status' },
{ name: '计划开工日期', prop: 'planStartDate' },
{ name: '计划竣工日期', prop: 'planEndDate' },
{ name: '总工期(天)', prop: 'contractWorkDays' },
{ name: '缺陷责任', prop: 'startDate' },
],
forInfoYd5:{
......@@ -191,9 +191,40 @@ export default {
],
};
},
props: {
// 项目ID
// projectId: {
// type: String,
// required: true,
// default: ""
// },
// 详情信息
projectDetailInfo: {
type: Object,
default: () => ({})
}
},
watch: {
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {};
// this.getCbProjectInfo(this.comProjectDetailInfo.projectId)
this.getCbProjectInfo('1759507630130479106')
// this.init(this.comProjectDetailInfo);
},
deep: true,
immediate: true
},
projectId: {
handler(newValue) {
this.comProjectId = newValue;
},
immediate: true
}
},
//可访问data属性
created() {
// this.getCbProjectInfo()
},
//计算集
computed: {
......@@ -201,7 +232,17 @@ export default {
},
//方法集
methods: {
async getCbProjectInfo(params) {
try {
const result = await getCbProjectInfo(params);
if (result.code == 200) {
console.log(result.data)
this.forInfo=result.data;
}
} catch (error) {
}
},
},
}
</script>
......
......@@ -2,7 +2,8 @@
<div class="feed-summary-container">
<div class="feed-summary-inner">
<div class="left-side-menu">
<project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="defaultActive">
<project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="currentNodeName"
@select="menuSelect">
<template slot="房建类成本科目-1">
<img src="@/assets/images/projectCostLedger/icon_cost_detail_2.svg" alt="">
<div class="project-sub-menu-title-text">房建类成本科目</div>
......@@ -13,12 +14,48 @@
</template>
</project-side-menu>
</div>
<div class="right-table-list-container">
<div class="project-table-list-header">
<div class="project-table-list-haeder-left">
<!-- <el-date-picker v-model="recordDate" type="month" placeholder="选择月" format="yyyy年MM月" value-format="yyyy-MM"
class="project-record-date" @change="timeChange"></el-date-picker> -->
<el-select v-model="recordDate" placeholder="请选择年月" class="project-month-select-options" clearable @change="monthChange">
<el-option v-for="item in monthList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div class="project-table-list-haeder-right">
<!-- 实体工程材料单位换算 -->
<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>
<!-- 表头设置组件 -->
<dsk-table-header-setting :settingList="formColum" @settingChange="settingChange"></dsk-table-header-setting>
</div>
</div>
<!-- 数据列表部分 -->
<div class="project-feedsummary-list-container">
<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="jhcb">
</template>
</table-list-com>
</div>
</div>
</div>
</div>
</template>
<script>
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getFeedSummaryMenuTreeApi } from "@/api/projectCostLedger";
import { getFeedSummaryMenuTreeApi, getFeedSummaryMonthListApi, getFeedSummaryListApi } from "@/api/projectCostLedger";
import DskTableHeaderSetting from "@/components/DskTableHeaderSetting";
import DskSkeleton from "@/components/DskSkeleton";
import TableListCom from "@/components/TableListCom";
import { v4 } from 'uuid';
import dayjs from "dayjs";
import { cloneDeep } from "lodash-es";
export default {
name: "feedSummary",
props: {
......@@ -37,21 +74,22 @@ export default {
watch: {
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {};
this.comProjectDetailInfo = newValue ? cloneDeep(newValue) : {};
this.init(this.comProjectDetailInfo);
},
deep: true,
immediate: true
},
projectId: {
handler(newValue) {
this.comProjectId = newValue;
},
immediate: true
}
}
},
components: {
ProjectSideMenu
ProjectSideMenu,
DskTableHeaderSetting,
TableListCom,
DskSkeleton
},
data() {
return {
......@@ -59,15 +97,44 @@ export default {
nodeName: "name",
nodeValue: "name",
},
comProjectDetailInfo: {},
comProjectId: "",
defaultActive: "",
menuTreeList: []
comProjectDetailInfo: this.projectDetailInfo ? cloneDeep(this.projectDetailInfo) : {},
comProjectId: this.projectId,
menuTreeList: [],
// 加载数据列表
tableLoading: true,
total: 0,
// 列表表头
formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "52", fixed: false, 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", width: "137", align: "center", slot: true, uid: v4() },
],
// 已记录月份集合
monthList: [],
// 源数据月份
originMonthList: [],
// 当前查询的数据月份
recordDate: "",
// 历史查询月份
oldRecordDate: "",
// 当前选中子菜单的父类名称
currentParentName: "",
// 当前选中的成本科目
currentNodeName: "",
// 数据列表
tableDataList: []
};
},
//可访问data属性
created() {
this.init(this.comProjectDetailInfo);
},
//计算集
computed: {
......@@ -79,25 +146,155 @@ export default {
try {
const { projectId, cbStage } = detail;
if (!projectId) return;
await this.getFeedSummaryMenuTree({
const params = {
projectId,
cbStage
});
};
await this.getFeedSummaryMenuTree(params);
await this.getFeedSummaryMonthList(params);
await this.initDefaultSetting();
} catch (error) {
console.log(error);
}
},
async initDefaultSetting() {
try {
const defaultCurrent = this.findMenuNode(this.menuTreeList, "结构劳务分包");
// 默认选中结构劳务分包
if (defaultCurrent) {
this.currentNodeName = defaultCurrent.name;
const params = this.createRequestConditions();
await this.getFeedSummaryList(params);
}
} catch (error) {
console.log(error);
}
},
createRequestConditions() {
const { projectId, cbStage } = this.comProjectDetailInfo;
const params = {
projectId,
cbStage
};
params["cbSubjectName"] = this.currentNodeName;
// 判断当月是否存在于server返回month集合中
const _now = dayjs(new Date().valueOf()).format("YYYYMM");
if (this.includeNowMonth(_now)) {
params["recordDate"] = _now;
}
return params;
},
// 返回当前月是否在server month集合中
includeNowMonth(time) {
return this.originMonthList.includes(time);
},
findMenuNode(tree, nodeName) {
for (const item of tree) {
if (item.name == nodeName) return item;
if (item.children instanceof Array) {
const result = this.findMenuNode(item.children, nodeName);
if (result) return result;
}
}
},
async getFeedSummaryList(params = {}) {
try {
this.tableLoading = true;
const list = await getFeedSummaryListApi(params);
if (list.code == 200 && list.data instanceof Array) {
this.tableDataList = list.data;
this.total = list.data.length;
}
} catch (error) {
} finally {
this.tableLoading = false;
}
},
async getFeedSummaryMenuTree(params) {
try {
const result = await getFeedSummaryMenuTreeApi(params);
if (result.code == 200) {
if (result.code == 200 && result.data instanceof Array) {
const _tempArray = result.data;
this.menuTreeList = _tempArray;
}
} catch (error) {
}
}
},
async getFeedSummaryMonthList(params) {
try {
const monthList = await getFeedSummaryMonthListApi(params);
if (monthList.code == 200 && monthList.data instanceof Array) {
const data = monthList.data;
this.originMonthList = cloneDeep(data);
const _now = dayjs(new Date().valueOf()).format("YYYYMM");
this.recordDate = _now;
this.oldRecordDate = _now;
// 默认以当前月数据为准 若不包含当前月 需要手动push数据
if (!data.includes(_now)) {
data.push(_now);
data.push("202401");
data.push("202312");
}
this.monthList = data.map(item => {
return {
label: dayjs(item).format("YYYY年MM月"),
value: item
};
});
}
} catch (error) {
}
},
monthChange(month) {
// 当前月
const _now = dayjs(new Date().valueOf()).format("YYYYMM");
// 请求列表参数
const params = this.createRequestConditions();
// 清空了年月默认选中当前月
if (!month) {
this.recordDate = _now;
// 如果命中的旧月份 等于当前月 说明清空的是当前月 不调用接口
if (this.oldRecordDate == _now) return;
} else {
// 正常选择
params["recordDate"] = month;
// 记录历史切换年月
this.oldRecordDate = month;
}
// 获取列表数据
this.getFeedSummaryList(params);
},
menuSelect(currentId, currentTemp) {
this.currentNodeName = currentId;
const parentName = currentTemp.parent ? this.getCurrentType(currentTemp.parent) : currentId;
if (parentName) this.currentParentName = parentName;
// 请求数据列表
const params = this.createRequestConditions();
this.getFeedSummaryList(params);
},
getCurrentType(parent) {
if (parent.level == 2) {
return parent.nodeName;
}
if (parent.parent) {
return this.getCurrentType(parent.parent);
}
},
// 时间选择变化
timeChange(time) {
console.log(time);
},
// 表头设置变化
async settingChange(use) {
try {
this.formColum = use;
} catch (error) {
}
},
},
}
</script>
......@@ -117,6 +314,107 @@ export default {
min-width: 220px;
height: 100%;
}
.right-table-list-container {
width: calc(100% - 220px);
height: 100%;
box-sizing: border-box;
background: #fff;
padding: 16px;
::v-deep .project-table-list-header {
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
.project-table-list-haeder-left {
display: flex;
align-items: center;
.project-record-date {
width: 140px;
.el-input__inner {
height: 32px;
line-height: 32px;
padding: 0px 12px;
border-radius: 2px;
border-color: #dcdfe6;
font-size: 14px;
color: #232323;
font-weight: 350;
}
.el-input__suffix {
right: 12px;
.el-input__icon {
line-height: 32px;
width: auto;
}
}
.el-input__prefix {
display: none;
}
}
.project-month-select-options {
width: 140px;
.el-input__inner {
height: 32px;
line-height: 32px;
padding: 0px 12px;
border-radius: 2px;
border-color: #dcdfe6;
font-size: 14px;
color: #232323;
font-weight: 350;
}
.el-input__suffix {
right: 12px;
.el-input__icon {
line-height: 32px;
width: auto;
}
}
.el-input__prefix {
display: none;
}
}
}
.project-table-list-haeder-right {
display: flex;
align-items: center;
.actual-cost-btn,
.unit-conversion-btn {
height: 32px;
display: flex;
align-items: center;
justify-content: center;
padding: 0px 12px;
background-color: #0081ff;
border-color: #0081ff;
border-radius: 4px;
color: #fff;
font-size: 14px;
font-weight: 350;
margin-right: 16px;
}
}
}
.project-feedsummary-list-container {
width: 100%;
height: calc(100% - 48px);
/* overflow: auto; */
.dsk-skeleton-outer-container {
padding: 0px;
height: 100%;
}
.table-list-com-ins {
height: 100%;
}
}
}
}
}
</style>
......@@ -2,7 +2,8 @@
<div class="feed-summary-container">
<div class="feed-summary-inner">
<div class="left-side-menu">
<project-side-menu ref="profitloss" :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="defaultActive" @select="select">
<project-side-menu ref="profitloss" :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="defaultActive"
@select="select">
<template slot="措施费-1">
<img src="@/assets/images/projectCostLedger/icon_cost_detail_4.svg" alt="">
<div class="project-sub-menu-title-text">措施费</div>
......@@ -11,24 +12,36 @@
</div>
<div class="profitloss">
<div class="search">
<el-date-picker size="small" style="width: 140px"
v-model="expenseDate"
type="month"
placeholder="选择月" @change="changetime"
:picker-options="pickerOptions">
</el-date-picker>
<el-select v-model="expenseDate" @change="changetime" style="width: 140px;">
<el-option v-for="item in dateoptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-button v-if="!isall && !isinput" type="primary" size="small" @click="addcost">添加实际成本</el-button>
<el-button v-if="!isall && isinput" type="primary" size="small" @click="addinputs">保存</el-button>
</div>
<div class="table-item">
<el-table
element-loading-text="Loading"
:data="tableData"
row-key="id"
v-horizontal-scroll="'hover'"
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
border
highlight-current-row
>
<!--汇总-->
<div class="table-item" v-if="isall">
<el-table element-loading-text="Loading" :data="tableData" row-key="id" v-horizontal-scroll="'hover'" default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" border highlight-current-row :cell-class-name="tored" :header-cell-class-name="tored">
<el-table-column label="序号" width="60" align="left" type="index"></el-table-column>
<el-table-column label="名称" width="220" prop="expenseName">
<template slot-scope="scope">{{scope.row.expenseName || '--'}}</template>
</el-table-column>
<el-table-column label="数量" prop="expenseValue">
<template slot-scope="scope">{{scope.row.expenseValue || '--'}}</template>
</el-table-column>
<el-table-column label="占比" prop="proportion">
<template slot-scope="scope">{{scope.row.proportion || '--'}}</template>
</el-table-column>
<el-table-column label="本月工作量" prop="quantity">
<template slot-scope="scope">{{scope.row.quantity || '--'}}</template>
</el-table-column>
</el-table>
</div>
<!--单条-->
<div class="table-item" v-else>
<el-table element-loading-text="Loading" ref="edittable" :data="tableData" row-key="id" v-horizontal-scroll="'hover'" default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" border highlight-current-row :cell-class-name="tored1" :header-cell-class-name="tored1">
<el-table-column label="序号" width="60" align="left" type="index" fixed="left"></el-table-column>
<el-table-column label="清单内容" width="130" prop="itemContent" fixed="left">
<template slot-scope="scope">{{scope.row.itemContent || '--'}}</template>
......@@ -60,10 +73,10 @@
<el-table-column label="摊销比例(%)" width="130" prop="amortizationRatio">
<template slot-scope="scope">{{scope.row.amortizationRatio || '--'}}</template>
</el-table-column>
<el-table-column label="摊销后不含税合价" width="130" prop="amountExcludeTaxAmortized">
<el-table-column label="摊销后不含税合价" width="150" prop="amountExcludeTaxAmortized">
<template slot-scope="scope">{{scope.row.amountExcludeTaxAmortized || '--'}}</template>
</el-table-column>
<el-table-column label="摊销后含税合价" width="130" prop="amountIncludeTaxAmortized">
<el-table-column label="摊销后含税合价" width="150" prop="amountIncludeTaxAmortized">
<template slot-scope="scope">{{scope.row.amountIncludeTaxAmortized || '--'}}</template>
</el-table-column>
<el-table-column label="税金(元)" width="130" prop="taxAmount">
......@@ -76,21 +89,28 @@
<template slot-scope="scope">{{scope.row.taxType || '--'}}</template>
</el-table-column>
<el-table-column label="本月发生成本比例" width="130" prop="monthCostRate">
<template slot-scope="scope">{{scope.row.monthCostRate || '--'}}</template>
<el-table-column label="本月发生成本比例" width="150" prop="monthCostRate">
<template slot-scope="scope">
<template v-if="isinput"><el-input v-model="scope.row.monthCostRate "></el-input></template>
<template v-else>{{scope.row.monthCostRate || '--'}}</template>
</template>
</el-table-column>
<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">
<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>
</el-table-column>
<el-table-column label="截止本月工程量" width="130" prop="currentProjectVolume">
<template slot-scope="scope">{{scope.row.currentProjectVolume || '--'}}</template>
<template slot-scope="scope">{{scope.row.suncurrentProjectVolume || '--'}}</template>
</el-table-column>
<el-table-column label="推送工作量" width="130" prop="submitProjectVolume">
<el-table-column label="本月推送工作量" width="130" prop="submitProjectVolume">
<template slot-scope="scope">{{scope.row.submitProjectVolume || '--'}}</template>
</el-table-column>
<el-table-column label="备注" width="130" prop="remarks">
<template slot-scope="scope">{{scope.row.remarks || '--'}}</template>
</el-table-column>
......@@ -98,162 +118,508 @@
<template slot-scope="scope">{{scope.row.pushTime?"是":"否"}}</template>
</el-table-column>
<el-table-column label="操作" width="130" fixed="right">
<span class="wordprimary">推送工程量</span>
<template slot-scope="scope">
<span class="wordprimary" @click="pushwork(scope.row)">推送工程量</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--推送工程量-->
<el-dialog class="pro-news" :visible.sync="dialogVisible" width="480px">
<div class="poptitle">
<span>推送工程量</span>
</div>
<el-form class="popform" label-width="120px" :model="queryParam" ref="ruleForm">
<el-form-item label="分包项目名称" class="row">
<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-form-item>
<el-form-item label="需推送工程量" class="row">
<el-input type="text" placeholder="请输入需推送工程量" v-model="queryParam.submitProjectVolume"></el-input>
<span class="msgs" v-if="queryParam.submitProjectVolume>queryParam.currentProjectVolume">
<font color="#FF3C3C">注:推送工程量不得大于实际产生的总工程量</font>
</span>
</el-form-item>
<el-form-item label="IPM项目编码" class="row">
<el-input type="text" placeholder="请输入IPM项目编码" v-model="queryParam.ipmProjectCode"></el-input>
</el-form-item>
<el-form-item label="IPM合同编码" class="row">
<el-input type="text" placeholder="请输入IPM合同编码" v-model="queryParam.ipmContractCode"></el-input>
</el-form-item>
<el-form-item label="IPM作业编码" class="row">
<el-input type="text" placeholder="请输入IPM作业编码" v-model="queryParam.ipmBizCode"></el-input>
</el-form-item>
</el-form>
<div class="popbot">
<div class="btn btn_cancel h32" @click="dialogVisible = false">取消</div>
<div class="btn btn_primary h32" @click="savepro">确定推送</div>
</div>
</el-dialog>
<!--添加实际成本-->
<el-dialog class="pro-news" :visible.sync="cbVisible" width="480px">
<div class="poptitle">
<span>填写实际成本</span>
</div>
<el-form class="popform" label-width="72px" style="height: 100px">
<el-form-item label="成本年份" class="row">
<el-date-picker size="small" style="width: 368px"
v-model="chooseDate"
type="month"
placeholder="选择月" @change="changeDate"
value-format="yyyy-MM"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-form>
<div class="popbot">
<div class="btn btn_cancel h32" @click="cbVisible = false">取消</div>
<div class="btn btn_primary h32" @click="inputnum">确定</div>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getMeasureslist,getCostMeasureslist ,getSummarydata} from "@/api/projectCostLedger";
export default {
name: "MeasureItems",
props: {
// 项目ID
projectId: {
type: String,
required: true,
default: ""
import ProjectSideMenu from '@/views/projectCostLedger/detail/components/ProjectSideMenu';
import {
getCostMeasureslist,
getMeasureslist,
getSummarydata,
projectVolume,
pushProjectvolume,
getActualMonthsApi,saveBatch
} from '@/api/projectCostLedger';
import { cloneDeep } from "lodash-es";
export default {
name: "MeasureItems",
props: {
// 项目ID
projectId: {
type: String,
required: true,
default: ""
},
// 详情信息
projectDetailInfo: {
type: Object,
default: () => ({})
}
},
watch: {
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue ? cloneDeep(newValue) : {};
this.init(newValue.projectId);
},
// 详情信息
projectDetailInfo: {
type: Object,
default: () => ({})
}
deep: true
},
watch: {
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {};
this.init(this.projectId);
projectId: {
handler(newValue) {
this.comProjectId = newValue;
}
}
},
components: {
ProjectSideMenu
},
data() {
return {
pickerOptions: {
disabledDate(time) {
let istrue = true;
let month = new Date().getMonth() + 1;
let year = new Date().getFullYear();
let times = (year + 5) + '-' + month + '-01 ' + '00:00:00';
istrue = new Date().getTime() < time.getTime() && time.getTime() < new Date(times).getTime();
return !istrue;
},
deep: true,
immediate: true
},
projectId: {
handler(newValue) {
this.comProjectId = newValue;
},
immediate: true
menuOptions: {
nodeName: "itemContent",
nodeValue: "id",
},
comProjectDetailInfo: this.projectDetailInfo ? cloneDeep(this.projectDetailInfo) : {},
comProjectId: this.projectId,
defaultActive: "",
menuTreeList: [
],
id: 0,
expenseDate: '',
tableData: [],
isall: true,//是否汇总
dialogVisible: false,
queryParam: {},//推送工程量数据
dateoptions: [],
cbVisible:false,
chooseDate:"",
isinput:false,//是否填写
};
},
//可访问data属性
created() {
this.init(this.comProjectId);
},
//计算集
computed: {
},
//方法集
methods: {
tored({column}){
if(column.property=='quantity'){
return 'tored'
}
},
components: {
ProjectSideMenu
tored1({column}){
let arr = ['submitProjectVolume','suncurrentProjectVolume','currentProjectVolume','costEffective','monthCostRate']
if(arr.includes(column.property)&&this.isinput){
return 'tored'
}
},
data() {
return {
pickerOptions: {
disabledDate(time) {
let istrue = true
let month = new Date().getMonth()+1
let year = new Date().getFullYear()
let times = (year+5)+'-'+ month + '-01 ' + '00:00:00'
istrue = new Date().getTime() < time.getTime() && time.getTime() < new Date(times).getTime()
return !istrue
},
},
menuOptions: {
nodeName: "itemContent",
nodeValue: "id",
},
comProjectDetailInfo: {},
comProjectId: "",
defaultActive: "",
menuTreeList: [
],
id: 0,
expenseDate:'',
tableData:[],
async getactualMonths() {
try {
const params = {
projectId: this.comProjectId,
id: this.id
};
let res = await getActualMonthsApi(params);
let data = res.data
let arr = []
let month = new Date().getMonth() +1
let year = new Date().getFullYear()
let thismonth = year + (month>= 9? month:'0'+ month)
let hasmonth = false
data.forEach(item => {
if(item == thismonth){
hasmonth = true
}
let li = {value:item,label:item.substring(0, 4) + '-' + item.substring(4, 6)}
arr.push(li)
});
if(!hasmonth){
let li = {value:thismonth,label:thismonth.substring(0, 4) + '-' + thismonth.substring(4, 6)}
arr.unshift(li)
}
if (arr && arr.length > 0) {
this.expenseDate = arr[0].value;
}
this.dateoptions = arr
} catch (error) {
}
},
async select(menuPath) {
this.id = menuPath;
this.getactualMonths();
// let month = this.expenseDate.replace('-', "");
this.getDatas(menuPath)
},
async getDatas(menuPath){
let param = {
projectId: this.projectId,
id: this.id,
month: this.expenseDate
};
if (menuPath == 0) {//费用汇总
this.isall = true;
// const formData = new FormData();
// formData.append("projectId", this.projectId);
// formData.append("month", this.expenseDate);
// const res = await getSummarydata(formData);
// this.tableData = res.data;
} else {//各个子项
this.isall = false;
// const res = await getCostMeasureslist(param);
// this.tableData = res.data;
}
const res = await getCostMeasureslist(param);
this.tableData = res.data;
this.isinput = false
},
//可访问data属性
created() {
let month = new Date().getMonth() +1
let year = new Date().getFullYear()
this.expenseDate = year + '-' + (month>= 9? month:'0'+ month)
async init(detail = '') {
try {
const projectId = detail;
if (!projectId) return;
await this.getFeedSummaryMenuTree(projectId);
this.getactualMonths();
} catch (error) {
}
},
//计算集
computed: {
async getFeedSummaryMenuTree(params) {
try {
const result = await getMeasureslist(params);
if (result.code == 200) {
let arr = {};
arr.itemContent = '措施费';
arr.id = 0;
let child = result.data;
let li = {};
li.itemContent = '费用汇总';
li.id = 0;
child.unshift(li);
arr.children = child;
const _tempArray = [arr];
this.menuTreeList = _tempArray;
await this.$nextTick();
this.$refs['profitloss'].$refs['customElMenu'].open(_tempArray[0].id);
this.defaultActive = child[0].id;
this.select(child[0].id);
}
} catch (error) {
console.log(error);
}
},
//方法集
methods: {
select(menuPath){
this.id = menuPath
let month = this.expenseDate.replace('-', "");
let param = {
projectId:this.projectId,
id:this.id,
month:month
changetime(val) {
this.getDatas(this.id)
},
//推送工作量
pushwork(row) {
this.queryParam = {
id: row.id,
projectName: '',
submitProjectVolume: '',
ipmProjectCode: '',
ipmContractCode: '',
ipmBizCode: '',
};
projectVolume(row.id).then(res => {
if (res.data) {
let datas = res.data;
this.queryParam.currentProjectVolume = datas.currentProjectVolume;
this.queryParam.ipmProjectCode = datas.ipmProjectCode;
this.queryParam.ipmContractCode = datas.ipmContractCode;
this.queryParam.ipmBizCode = datas.ipmBizCode;
}
getCostMeasureslist(param).then(res=>{
this.tableData = res.data
})
},
async init(detail = '') {
try {
const projectId = detail;
if (!projectId) return;
await this.getFeedSummaryMenuTree(projectId);
} catch (error) {
});
this.dialogVisible = true;
},
//确认推送
savepro() {
pushProjectvolume(this.queryParam).then(res => {
if (res.code == 200) {
this.$message.success(res.msg);
this.dialogVisible = false;
this.select(this.id);
} else {
this.$message.error(res.msg);
}
});
},
addcost() {
this.cbVisible = true
},
addinputs(){
this.tableData.forEach(item=>{
item.month = this.expenseDate
})
saveBatch(JSON.stringify(this.tableData)).then(res=>{
if(res.code == 200){
this.$message.success(res.msg)
this.isinput = false
this.getDatas(this.id)
}else{
this.$message.error(res.msg)
}
},
async getFeedSummaryMenuTree(params) {
try {
const result = await getMeasureslist(params);
if (result.code == 200) {
let arr = {}
arr.itemContent = '措施费'
arr.id = 0
arr.children = result.data
const _tempArray = [arr];
this.menuTreeList = _tempArray;
await this.$nextTick()
this.$refs['profitloss'].$refs['customElMenu'].open(_tempArray[0].id)
this.defaultActive = result.data[0].id
this.select(result.data[0].id)
}
} catch (error) {
console.log(error)
})
},
changeDate(){
let choseDate = this.chooseDate.replace('-','')
let hasdate = false
this.dateoptions.forEach(item=>{
if(item.value == choseDate){
hasdate = true
}
},
changetime(){
this.select(this.id)
},
})
if(!hasdate){
let li = {value:choseDate,label:this.chooseDate}
this.dateoptions.push(li)
this.expenseDate = choseDate
// arr.unshift(li)
}
},
}
inputnum(){
this.cbVisible = false
this.isinput = true
this.$refs.edittable.bodyWrapper.scrollLeft=Number(2220)
}
},
}
</script>
<style lang="scss" scoped>
.feed-summary-container {
.feed-summary-container {
width: 100%;
height: 100%;
::v-deep .tored{
/*background: rgb(255,236,236) !important;*/
}
.feed-summary-inner {
width: 100%;
height: 100%;
display: flex;
align-items: center;
.feed-summary-inner {
width: 100%;
.left-side-menu {
width: 220px;
min-width: 220px;
height: 100%;
display: flex;
align-items: center;
}
.profitloss {
width: calc(100% - 220px);
height: 100%;
background: #fff;
padding: 16px;
.table-item {
margin-top: 16px;
}
}
}
.search {
display: flex;
justify-content: space-between;
}
::v-deep .pro-news {
.el-dialog__body {
padding: 24px 0 0;
}
.el-dialog__headerbtn {
top: 20px;
right: 20px;
z-index: 3;
}
.left-side-menu {
width: 220px;
min-width: 220px;
height: 100%;
.poptitle {
line-height: 56px;
border-bottom: 1px solid #eee;
height: 56px;
position: absolute;
top: 0;
left: 0;
width: 100%;
> span {
padding-left: 20px;
font-weight: bold;
font-size: 16px;
color: #232323;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
width: 385px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.profitloss{
width: calc(100% - 220px);
height: 100%;
background: #fff;
padding: 16px;
.table-item{
margin-top: 16px;
}
.popform {
padding: 24px 20px 0;
.row {
margin-bottom: 16px;
position: relative;
.checkcb {
position: absolute;
left: -100px;
}
.el-form-item__label {
font-weight: 400;
opacity: 0.8;
padding: 0;
font-size: 14px;
color: #232323;
padding-right: 16px;
}
.el-input,
.el-textarea,
.el-select {
display: inline-block;
width: 320px;
.el-input__inner,
.el-textarea__inner {
width: 100%;
height: 32px;
border-radius: 0px;
&:hover {
border-color: #0081ff;
}
}
.el-textarea__inner {
height: 90px;
font-family: inherit;
color: #000;
}
.el-input__suffix {
height: 32px;
}
.el-input__icon {
line-height: 32px;
}
}
.el-form-item__error {
padding-top: 2px;
}
}
.el-input-group--append {
position: relative;
.el-input-group__append {
position: absolute;
right: 0;
width: 76px;
top: 0;
border: 0;
background: none;
&:hover {
background: none !important;
}
.pro-getbtn {
border-left: 1px solid #dcdfe6;
height: 32px;
color: #0081ff;
line-height: 32px;
text-align: center;
}
}
}
}
.popbot {
border-top: 1px solid #eeeeee;
text-align: right;
margin-top: 24px;
padding: 16px 20px;
.btn {
border-radius: 2px;
margin-left: 12px;
padding: 0 24px;
&.btn_disabled {
background: #8bd1ff;
}
}
}
.msgs {
font-size: 12px;
line-height: 17px;
height: 17px;
display: block;
margin: 0 0 -4px;
}
}
}
</style>
......@@ -3,7 +3,7 @@
<div class="otherProjects-cont">
<div class="left">
<div class="left-side-menu">
<project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="defaultActive">
<project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="defaultActive" @select="select">
<template slot="其他费-1">
<img src="@/assets/images/projectCostLedger/icon_cost_detail_5.svg" alt="">
<div class="project-sub-menu-title-text">其他费</div>
......@@ -36,10 +36,10 @@
<tables
v-if="!isSkeleton"
:tableLoading="tableLoading"
:tableData="tableData"
:tableData="tableData1"
:forData="forData1"
:MaxPage=500
:tableDataTotal="tableDataTotal"
:tableDataTotal="tableDataTotal1"
:queryParams="queryParams"
@handle-current-change="handleCurrentChange"
@sort-change="sortChange"
......@@ -56,7 +56,7 @@
</div>
<el-dialog :visible.sync="dialogVisible" width="720px" append-to-body class="dialogVisible" title="单位换算">
<el-tabs v-model="currentList">
<el-tabs v-model="currentList" @tab-click="handleClickTab">
<el-tab-pane
:key="index"
v-for="(item, index) in toggleTabs"
......@@ -71,8 +71,8 @@
<el-option v-for="(item,index) in typeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
</el-select>
<i class="el-icon-sort icon"></i>
<el-select v-model="type1" placeholder="请选择">
<el-option v-for="(item,index) in typeList1" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
<el-select v-model="type2" placeholder="请选择">
<el-option v-for="(item,index) in typeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
</el-select>
</div>
<el-table
......@@ -106,65 +106,54 @@
<script>
import Tables from "../../../../component/Tables"
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getProjectOtherMenuTreeApi,getProjectOtherStatistics } from "@/api/projectCostLedger";
import { getProjectOtherMenuTreeApi,getProjectOtherStatistics,getProjectOtherList } from "@/api/projectCostLedger";
export default {
name: "directCost",
components: {
Tables,ProjectSideMenu
},
props: {
// // 项目ID
// 项目ID
// projectId: {
// type: String,
// required: true,
// default: ""
// },
// // 详情信息
// projectDetailInfo: {
// type: Object,
// default: () => ({})
// }
// 详情信息
projectDetailInfo: {
type: Object,
default: () => ({})
}
},
data() {
return {
comProjectId:'',
isSkeleton:false,
tableLoading:false,
tableData:[
{
name:'技术质量管理类',
number:'236',
proportion:'64'
},
{
name:'工程保险类',
number:'336',
proportion:'64'
},
],
tableData:[],
tableDataTotal:0,
forData: [
{label: '其他项目费用', prop: 'expenseName'},
{label: '数量', prop: 'expenseValue'},
{label: '占比', prop: 'proportion', slot: true},
],
forData1: [
{label: '清单内容', prop: 'name',minWidth:'215'},
{label: '工作内容、做法/规格型号/施工现场配置说明', prop: 'number',minWidth:'302'},
{label: '单位', prop: 'proportion',minWidth:'215'},
{label: '不含税单价', prop: 'proportion',minWidth:'215'},
{label: '不含税合价', prop: 'proportion',minWidth:'215'},
{label: '税率(%)', prop: 'proportion',minWidth:'215'},
{label: '含税合价', prop: 'proportion',minWidth:'215'},
{label: '税金(元)', prop: 'proportion',minWidth:'215'},
{label: '成本科目', prop: 'proportion',minWidth:'215'},
{label: '税金类型', prop: 'proportion',minWidth:'215'},
{label: '备注', prop: 'proportion',minWidth:'215'},
{label: '清单内容', prop: 'itemContent',minWidth:'220'},
{label: '工作内容、做法/规格型号/施工现场配置说明', prop: 'workContent',minWidth:'302'},
{label: '单位', prop: 'unit',minWidth:'115'},
{label: '不含税单价', prop: 'unitPriceExcludingTax',minWidth:'115'},
{label: '不含税合价', prop: 'totalPriceExcludeTax',minWidth:'115'},
{label: '税率(%)', prop: 'taxRate',minWidth:'115'},
{label: '含税合价', prop: 'totalPriceIncludingTax',minWidth:'115'},
{label: '税金(元)', prop: 'taxAmount',minWidth:'115'},
{label: '成本科目', prop: 'costSubject',minWidth:'160'},
{label: '税金类型', prop: 'taxType',minWidth:'115'},
{label: '备注', prop: 'remarks',minWidth:'200'},
],
queryParams:{
pageNum:1,
pageSize:10,
},
tableDataTotal:2,
defaultActive: "费用汇总",
menuTreeList: [
{
......@@ -192,63 +181,69 @@ export default {
value: "type3",
name: "体积",
},
// {
// value: "type4",
// name: "质量",
// },
// {
// value: "type5",
// name: "密度",
// },
],
tableData1:[],
tableDataTotal1:0,
type1:'',
type2:'',
typeList:[
{
value: "type4",
name: "质量",
dictLabel:'千米',
dictValue:'千米'
},
{
value: "type5",
name: "密度",
dictLabel:'米',
dictValue:'米'
},
],
tableData1:[
{
cbkm:'标前成本',
wlyl:'42000KG',
hsyl:'42T'
dictLabel:'分米',
dictValue:'分米'
},
{
cbkm:'标前成本',
wlyl:'42000KG',
hsyl:'42T'
dictLabel:'厘米',
dictValue:'厘米'
},
{
cbkm:'标前成本',
wlyl:'42000KG',
hsyl:'42T'
dictLabel:'毫米',
dictValue:'毫米'
},
{
cbkm:'标前成本',
wlyl:'42000KG',
hsyl:'42T'
dictLabel:'微米',
dictValue:'微米'
},
],
type1:'',
type2:'',
typeList:[],
typeList1:[],
};
},
watch: {
// projectDetailInfo: {
// handler(newValue) {
// this.comProjectDetailInfo = newValue ? newValue : {};
// // this.init(this.comProjectDetailInfo);
// },
// deep: true,
// immediate: true
// },
// projectId: {
// handler(newValue) {
// this.comProjectId = newValue;
// },
// immediate: true
// }
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {};
this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId)
// this.getProjectOtherStatistics('1762014527685136385')
// this.init(this.comProjectDetailInfo);
},
deep: true,
immediate: true
},
projectId: {
handler(newValue) {
this.comProjectId = newValue;
},
immediate: true
}
},
//可访问data属性
created() {
this.getProjectOtherMenuTreeApi('1762014527685136385')
this.getProjectOtherStatistics('1762014527685136385')
},
//计算集
computed: {
......@@ -261,6 +256,7 @@ export default {
const result = await getProjectOtherStatistics(params);
if (result.code == 200) {
const _dataArray = result.data;
this.tableDataTotal=_dataArray.length;
this.tableData = _dataArray;
}
} catch (error) {
......@@ -280,9 +276,18 @@ export default {
}
},
open(menuPath, menuPathArray){
select(menuPath, menuPathArray){
console.log(menuPath)
console.log(menuPathArray)
this.defaultActive=menuPath;
let param = {
projectId:this.comProjectDetailInfo.projectId,
parentId:menuPathArray.originData.id
}
getProjectOtherList(param).then(res=>{
this.tableData1 = res.data;
this.tableDataTotal1=res.data.length;
})
},
//分页
handleCurrentChange(e){
......@@ -293,7 +298,119 @@ export default {
},
sortChange(){
}
},
handleClickTab(v){
this.type1='';
this.type2='';
if(v.label === '长度'){
this.typeList=[
{
dictLabel:'千米',
dictValue:'千米'
},
{
dictLabel:'米',
dictValue:'米'
},
{
dictLabel:'分米',
dictValue:'分米'
},
{
dictLabel:'厘米',
dictValue:'厘米'
},
{
dictLabel:'毫米',
dictValue:'毫米'
},
{
dictLabel:'微米',
dictValue:'微米'
},
]
}
if(v.label === '面积'){
this.typeList=[
{
dictLabel:'平方千米',
dictValue:'平方千米'
},
{
dictLabel:'公顷',
dictValue:'公顷'
},
{
dictLabel:'公亩',
dictValue:'公亩'
},
{
dictLabel:'平方米',
dictValue:'平方米'
},
{
dictLabel:'平方分米',
dictValue:'平方分米'
},
{
dictLabel:'平方厘米',
dictValue:'平方厘米'
},
{
dictLabel:'平方毫米',
dictValue:'平方毫米'
},
]
}
if(v.label === '体积'){
this.typeList=[
{
dictLabel:'立方千米',
dictValue:'立方千米'
},
{
dictLabel:'立方米',
dictValue:'立方米'
},
{
dictLabel:'立方分米',
dictValue:'立方分米'
},
{
dictLabel:'立方厘米',
dictValue:'立方厘米'
},
{
dictLabel:'立方毫米',
dictValue:'立方毫米'
},
{
dictLabel:'升',
dictValue:'升'
},
{
dictLabel:'分升',
dictValue:'分升'
},
{
dictLabel:'毫升',
dictValue:'毫升'
},
{
dictLabel:'微升',
dictValue:'微升'
},
{
dictLabel:'厘升',
dictValue:'厘升'
},
{
dictLabel:'公石',
dictValue:'公石'
},
]
}
},
},
}
</script>
......
......@@ -15,7 +15,8 @@
v-model="expenseDate"
type="month"
placeholder="选择月" @change="changetime"
:picker-options="pickerOptions">
value-format="yyyy-MM"
>
</el-date-picker>
</div>
<div class="table-item">
......@@ -115,14 +116,14 @@
data() {
return {
pickerOptions: {
disabledDate(time) {
let istrue = true
let month = new Date().getMonth()+1
let year = new Date().getFullYear()
let times = (year+5)+'-'+ month + '-01 ' + '00:00:00'
istrue = new Date().getTime() < time.getTime() && time.getTime() < new Date(times).getTime()
return !istrue
},
// disabledDate(time) {
// let istrue = true
// let month = new Date().getMonth()+1
// let year = new Date().getFullYear()
// let times = (year+5)+'-'+ month + '-01 ' + '00:00:00'
// istrue = new Date().getTime() < time.getTime() && time.getTime() < new Date(times).getTime()
// return !istrue
// },
},
menuOptions: {
nodeName: "cbName",
......@@ -216,6 +217,7 @@
id:this.id,
expenseDate:this.expenseDate
}
console.log(param)
getAnalysislist(param).then(res=>{
this.tableData = res.data
})
......@@ -252,7 +254,7 @@
console.log(error)
}
},
changetime(){
changetime(val){
this.select(this.id)
},
},
......
......@@ -3,7 +3,7 @@
<template>
<!-- 有下级菜单 -->
<template v-if="checkHasChidren">
<el-submenu :index="menuItem.nodeValue" ref="projectSubMenuItem" class="project-sub-menu-item"
<el-submenu :index="createMenuIndex(menuItem.nodeValue)" ref="projectSubMenuItem" class="project-sub-menu-item"
:class="`project-sub-menu-item-level-${menuItem.level}`" :disabled="menuItem.originData && menuItem.originData.disabled">
<template slot="title">
<!-- 预留插槽 -->
......@@ -20,8 +20,8 @@
</template>
<!-- 无子集菜单 -->
<template v-else>
<el-menu-item :index="menuItem.nodeValue" class="project-only-menu-item" :class="`project-only-menu-item-level-${menuItem.level}`"
:disabled="menuItem.originData && menuItem.originData.disabled">
<el-menu-item :index="createMenuIndex(menuItem.nodeValue)" class="project-only-menu-item"
:class="`project-only-menu-item-level-${menuItem.level}`" :disabled="menuItem.originData && menuItem.originData.disabled">
<template slot="title">
<div class="project-only-menu-title-container">
<!-- 预留插槽 -->
......@@ -79,6 +79,11 @@ export default {
}
styles["padding-left"] = `${paddingLeft}px`;
return styles;
},
createMenuIndex(index) {
if (index || index == "0") {
return index.toString();
}
}
},
}
......
<template>
<div class="project-side-menu-container">
<el-menu mode="vertical" class="project-side-menu-instance" :unique-opened="uniqueOpened" :default-active="comDefaultActive" @select="menuSelect"
@open="subMenuOpen" @close="subMenuClose" ref="customElMenu">
<el-menu mode="vertical" class="project-side-menu-instance" :unique-opened="uniqueOpened" :default-active="createMenuIndex(comDefaultActive)"
@select="menuSelect" @open="subMenuOpen" @close="subMenuClose" ref="customElMenu">
<template v-for="(item,index) of tempMenuTree">
<project-menu-item :menuItem="item" :key="item.nodeValue">
<template :slot="`${item.nodeName}-${item.level}`" slot-scope="scope">
......@@ -44,7 +44,7 @@ export default {
},
// 默认打开的菜单
defaultActive: {
type: String,
type: [String, Number],
default: ""
}
},
......@@ -101,6 +101,11 @@ export default {
const result = this.getCurrentData(menuPath);
this.$emit("select", menuPath, result);
},
createMenuIndex(index) {
if (index || index == "0") {
return index.toString();
}
},
getCurrentData(only) {
const _tempTree = JSON.parse(JSON.stringify(this.tempMenuTree));
if (_tempTree) {
......
......@@ -3,28 +3,28 @@
<div class="project-cost-ledger-detail-inner">
<project-detail-header :current="current" :breadCrumbTree="createProjectBreadCrumbTree"></project-detail-header>
<!-- tab切换栏 -->
<dsk-tab-toggle v-model="current" :tabs="toggleTabs" @tabToggle="tabToggle"></dsk-tab-toggle>
<dsk-tab-toggle v-model="current" :tabs="toggleTabs" @tabToggle="tabToggle" :disabled="tabsDisabled"></dsk-tab-toggle>
<!-- tab切换组件容器 -->
<div class="project-cost-ledger-detail-module">
<!-- 放入组件 v-if current == ‘xxxx’ 详情变量 this.detailInfo 需要深度监听-->
<!-- 工程项目信息 -->
<engineering-information v-if="current == 'basicEngineeringInformation'"></engineering-information>
<engineering-information v-if="current == 'basicEngineeringInformation'" :project-detail-info="detailInfo"></engineering-information>
<!-- 直接费成本 -->
<direct-cost v-if="current == 'directCost'"></direct-cost>
<direct-cost v-if="current == 'directCost'" :project-detail-info="detailInfo"></direct-cost>
<!-- 工料汇总 -->
<feed-summary v-if="current == 'feedSummary'" :project-id="projectID" :project-detail-info="detailInfo"></feed-summary>
<feed-summary v-if="current == 'feedSummary'" :project-id="projectId" :project-detail-info="detailInfo"></feed-summary>
<!--措施项目-->
<measure-items v-if="current == 'measureItem'" :project-id="projectID" :project-detail-info="detailInfo"></measure-items>
<measure-items v-if="current == 'measureItem'" :project-id="projectId" :project-detail-info="detailInfo"></measure-items>
<!-- 其他项目 -->
<other-projects v-if="current == 'otherItems'"></other-projects>
<other-projects v-if="current == 'otherItems'" :project-detail-info="detailInfo"></other-projects>
<!-- 盈亏分析对比 -->
<profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectID" :project-detail-info="detailInfo"></profit-Loss>
<profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectId" :project-detail-info="detailInfo"></profit-Loss>
</div>
</div>
......@@ -62,14 +62,15 @@ export default {
},
data() {
return {
projectID: "",
projectId: "",
current: "",
// 详情信息变量
detailInfo: {
projectId: "1754425038355890177",
cbStage: 0,
cbType:1
cbType: 1
},
tabsDisabled: false,
toggleTabs: [
{
value: "basicEngineeringInformation",
......@@ -161,21 +162,28 @@ export default {
},
async getProjectQuery() {
try {
this.tabsDisabled = true;
const { query } = this.$route;
// if (!query.projectID) return this.$message.error("缺少项目id");
this.projectID = query.projectID;
// if (!query.projectId) {
// this.$message.error("缺少项目id");
// this.tabsDisabled = true;
// return;
// };
this.projectId = query.projectId;
// 获取详情 保证详情获取完毕 再执行tab命中 进行生命周期
await this.getProjectDetail(query.projectId);
if (query.current) {
this.current = query.current;
} else {
// 默认命中工程项目信息
this.current = "basicEngineeringInformation";
};
await this.getProjectDetail(query.projectID);
this.tabsDisabled = false;
} catch (error) {
console.log(error);
}
},
async getProjectDetail(projectID) {
async getProjectDetail(projectId) {
try {
} catch (error) {
......
......@@ -68,19 +68,18 @@
<el-table-column label="工程名称" width="416" :resizable="false">
<template slot-scope="scope">
<div style="display:flex;align-items:center">
<!--<el-tooltip placement="top" v-if="scope.row.customerText.length>20">-->
<!--<div slot="content">{{scope.row.projectName}}</div>-->
<el-tooltip placement="top" v-if="scope.row.projectText.length>20">
<div class="renling">
<router-link v-if="scope.row.isGetProjectDetail" :to="`/projectCostLedger/detail?projectID=${scope.row.id}`" tag="a"
<router-link v-if="scope.row.projectFileStatus==2" :to="`/projectCostLedger/detail?projectId=${scope.row.id}`" tag="a"
class="wordprimary" v-html="scope.row.projectName"></router-link>
<span v-else v-html="scope.row.projectName"></span>
<span v-else v-html="scope.row.projectName||'--'"></span>
</div>
<!--</el-tooltip>-->
<!--<div class="renling" v-else>-->
<!--<router-link v-if="scope.row.companyId" :to="`/enterprise/${encodeStr(scope.row.companyId)}?path=cooperationRecord&companyName=${scope.row.customerName}`" tag="a"-->
<!--class="wordprimary" v-html="scope.row.customerName"></router-link>-->
<!--<span v-else v-html="scope.row.customerName"></span>-->
<!--</div>-->
</el-tooltip>
<div class="renling" v-else>
<router-link v-if="scope.row.projectFileStatus==2" :to="`/projectCostLedger/detail?projectId=${scope.row.id}`" tag="a"
class="wordprimary" v-html="scope.row.projectName"></router-link>
<span v-else v-html="scope.row.projectName||'--'"></span>
</div>
</div>
</template>
......@@ -157,6 +156,7 @@
</el-dialog>
<!--新增、修改弹窗-->
<el-dialog
:close-on-click-modal="false"
class="pro-news"
:visible.sync="dialogVisible"
width="480px">
......@@ -232,7 +232,7 @@
</el-table-column>
</el-table>
</div>
<div class="pagination clearfix" v-show="total>cgPagesize">
<div class="pagination clearfix" v-show="cgxtotal>cgPagesize">
<el-pagination background :page-size="cgPagesize" :current-page.sync="cgPagenum"
@current-change="getCGXlist" layout="prev, pager, next"
:total="cgxtotal">
......@@ -342,6 +342,9 @@
this.total = res.total
this.formdata.pageNum = res.currentPage
this.tableData = res.rows
this.tableData.forEach(item=>{
item.projectText = item.projectName.replace(/<\/?[^>]+(style=('|")[^'"]*)?>/gi, '')
})
}else{
this.total = 0
this.tableData = []
......@@ -379,8 +382,8 @@
//查看进度
detailpro(row){
this.uploadData = row
this.uploadData.id = this.uploadData.projectId
this.prodetail = true
this.isupload = true
},
//删除项目
deleetpro(row){
......@@ -466,7 +469,7 @@
pageSize:50,
pageNum:1,
}
// this.customerAll()
this.getlist()
},
//添加项目
insertPro(){
......@@ -501,10 +504,11 @@
this.uploadData = data
this.isupload = true
this.cgxVisible = false
this.prodetail = false
},
handleCurrentChange(val){
this.formdata.pageNum = val
this.customerAll()
this.getlist()
},
setHeaderRow() {
return "owner-table-list-header";
......
......@@ -63,7 +63,7 @@
<div class="cz" v-if="item.fileParseStatus != 1">
<div v-if="item.fileParseStatus != 3"><a :href="item.fileOssUrl">下载</a></div>
<div v-if="item.fileParseStatus == 3 && prodetail == false">重新上传</div>
<div class="i" @click="deletefille(item.id)" v-if="prodetail == false">删除</div>
<div class="i" @click="deletefille(item.id,0)" v-if="prodetail == false">删除</div>
</div>
</div>
<div class="wrong" v-if="item.fileParseStatus&&item.fileParseStatus == 3">
......@@ -91,7 +91,7 @@
<div class="cz" v-if="item.fileParseStatus != 1">
<div v-if="item.fileParseStatus != 3"><a :href="item.fileOssUrl">下载</a></div>
<div v-if="item.fileParseStatus == 3 && prodetail == false">重新上传</div>
<div class="i" @click="deletefille(item.id)" v-if="prodetail == false">删除</div>
<div class="i" @click="deletefille(item.id,1)" v-if="prodetail == false">删除</div>
</div>
</div>
<div class="wrong" v-if="item.fileParseStatus&&item.fileParseStatus == 3">
......@@ -119,7 +119,7 @@
<div class="cz" v-if="item.fileParseStatus != 1">
<div v-if="item.fileParseStatus != 3"><a :href="item.fileOssUrl">下载</a></div>
<div v-if="item.fileParseStatus == 3 && prodetail == false">重新上传</div>
<div class="i" @click="deletefille(item.id)" v-if="prodetail == false">删除</div>
<div class="i" @click="deletefille(item.id,2)" v-if="prodetail == false">删除</div>
</div>
</div>
<div class="wrong" v-if="item.fileParseStatus&&item.fileParseStatus == 3">
......@@ -147,7 +147,7 @@
<div class="cz" v-if="item.fileParseStatus != 1">
<div v-if="item.fileParseStatus != 3"><a :href="item.fileOssUrl">下载</a></div>
<div v-if="item.fileParseStatus == 3 && prodetail == false">重新上传</div>
<div class="i" @click="deletefille(item.id)" v-if="prodetail == false">删除</div>
<div class="i" @click="deletefille(item.id,3)" v-if="prodetail == false">删除</div>
</div>
</div>
<div class="wrong" v-if="item.fileParseStatus&&item.fileParseStatus == 3">
......@@ -175,7 +175,7 @@
<div class="cz" v-if="item.fileParseStatus != 1">
<div v-if="item.fileParseStatus != 3"><a :href="item.fileOssUrl">下载</a></div>
<div v-if="item.fileParseStatus == 3 && prodetail == false">重新上传</div>
<div class="i" @click="deletefille(item.id)" v-if="prodetail == false">删除</div>
<div class="i" @click="deletefille(item.id,4)" v-if="prodetail == false">删除</div>
</div>
</div>
<div class="wrong" v-if="item.fileParseStatus&&item.fileParseStatus == 3">
......@@ -203,7 +203,7 @@
<div class="cz" v-if="item.fileParseStatus != 1">
<div v-if="item.fileParseStatus != 3"><a :href="item.fileOssUrl">下载</a></div>
<div v-if="item.fileParseStatus == 3 && prodetail == false">重新上传</div>
<div class="i" @click="deletefille(item.id)" v-if="prodetail == false">删除</div>
<div class="i" @click="deletefille(item.id,5)" v-if="prodetail == false">删除</div>
</div>
</div>
<div class="wrong" v-if="item.fileParseStatus&&item.fileParseStatus == 3">
......@@ -220,7 +220,7 @@
</div>
<el-divider></el-divider>
<div class="pro-btns">
<el-button type="primary" size="small" @click="importdata">导入数据</el-button>
<el-button type="primary" size="small" @click="importdata" v-if="!prodetail">导入数据</el-button>
<el-button size="small" @click="goback">返回</el-button>
</div>
......@@ -243,7 +243,7 @@
<script>
import { getToken } from '@/utils/auth'
// import { getDicts } from '@/api/system/dict/data'
import { deleteCbProjectFile, getProjectFileUploadDetail, uploadCbProjectFile } from '@/api/projectCostLedger/index'
import { deleteCbProjectFile, getProjectFileUploadDetail, uploadCbProjectFile,importData } from '@/api/projectCostLedger/index'
export default {
name: 'upload',
......@@ -283,23 +283,50 @@
uploadtype:0,//上传的版块类型
visible:false,
issub:false,//已填完数据可以开始解析
isclick:true,
}
},
created() {
this.formdata = JSON.parse(JSON.stringify(this.uploadData))
this.formdata.cbStage = this.formdata.cbStage.toString()
this.getDetail()
console.log(this.formdata )
},
methods:{
importdata(){
this.visible = true
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.issub = true
} else {
this.issub = false
}
});
let valid = true
if(this.directExpense.length>0&&this.quantitySummary.length>0
&&this.measureProject.length>0&&this.otherProject.length>0
&&this.sceneExpense.length>0&&this.cbSummary.length>0){
valid = true
importData(this.formdata.id).then(res=>{})
}else{
valid = false
}
if (valid) {
this.issub = true
this.directExpense.forEach(item=>{
item.fileParseStatus = 1
})
this.quantitySummary.forEach(item=>{
item.fileParseStatus = 1
})
this.measureProject.forEach(item=>{
item.fileParseStatus = 1
})
this.otherProject.forEach(item=>{
item.fileParseStatus = 1
})
this.sceneExpense.forEach(item=>{
item.fileParseStatus = 1
})
this.cbSummary.forEach(item=>{
item.fileParseStatus = 1
})
} else {
this.issub = false
}
},
goback(){
this.visible = false
......@@ -326,18 +353,22 @@
})
},
uplpro(type){
if(!this.prodetail){
if(!this.prodetail && this.isclick){
this.uploadtype = type
this.$refs.uploadpro.$el.querySelector('input').click()
}
},
deletefille(id){
deletefille(id,type){
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteCbProjectFile(id).then(res=>{
let param = {
fileId: id,
cbType: type,
}
deleteCbProjectFile(param).then(res=>{
if(res.code == 200){
this.$message({
type: 'success',
......@@ -354,6 +385,7 @@
});
},
handleFileListChange(file, fileList) {
this.isclick = false
var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
const extension = testmsg === "xlsx";
const extension1 = testmsg === "xls";
......@@ -403,6 +435,7 @@
default:
break
}
this.isclick = true
}
})
},
......
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