Commit 59aecc57 authored by danfuman's avatar danfuman

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

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

# Conflicts:
#	dsk-operate-ui/vue.config.js
parents 4fcd6242 3ef7f07e
...@@ -204,6 +204,7 @@ tenant: ...@@ -204,6 +204,7 @@ tenant:
- cb_scene_expense_month - cb_scene_expense_month
- cb_subject - cb_subject
- cb_project_other - cb_project_other
- s_materiel_project
# MyBatisPlus配置 # MyBatisPlus配置
# https://baomidou.com/config/ # https://baomidou.com/config/
......
...@@ -56,6 +56,36 @@ ...@@ -56,6 +56,36 @@
<artifactId>elasticsearch-java</artifactId> <artifactId>elasticsearch-java</artifactId>
<version>8.7.0</version> <version>8.7.0</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.61</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
<groupId>com.zjyj</groupId>
<artifactId>cloudt-rest-client</artifactId>
<version>2.8.0-SNAPSHOT</version>
</dependency>
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>com.tencentcloudapi</groupId>--> <!-- <groupId>com.tencentcloudapi</groupId>-->
......
package com.dsk.component;
import cn.hutool.core.date.DatePattern;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsk.common.exception.ServiceException;
import com.dsk.common.utils.DateUtils;
import com.dsk.cscec.domain.CbProjectRecord;
import com.dsk.cscec.domain.CbQuantitySummary;
import com.dsk.cscec.domain.CbSubject;
import com.dsk.cscec.domain.SMaterielProject;
import com.dsk.cscec.mapper.CbSubjectMapper;
import com.dsk.cscec.service.CbProjectRecordService;
import com.dsk.cscec.service.ICbQuantitySummaryService;
import com.dsk.cscec.service.ISMaterielProjectService;
import com.glodon.cloudt.rest.client.RestServiceClient;
import com.glodon.cloudt.rest.client.data.HmacRestAuthInfo;
import com.glodon.cloudt.rest.client.data.RestResponseInfo;
import com.glodon.cloudt.rest.client.exception.AuthenticateException;
import com.glodon.cloudt.rest.client.exception.InvalidUriException;
import com.glodon.cloudt.rest.client.exception.NoAuthenticateException;
import com.glodon.cloudt.rest.client.impl.HmacRestServiceClient;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 物料相关组件
*
* @Author lcl
* @Data 2024/3/14 15:56
*/
@Component
public class MaterielComponent {
@Resource
private ISMaterielProjectService materielProjectService;
@Resource
private ICbQuantitySummaryService quantitySummaryService;
@Resource
private CbProjectRecordService projectRecordService;
@Resource
private CbSubjectMapper subjectMapper;
/**
* 物料项目定时拉取
*/
@Scheduled(cron = "0 0 1 20 * ? ")
public void materielProjectPull() {
String apiURI = "/api/inspection/v1.0/project/getTenantHasCodeProject";
String resStr = materielRequest(apiURI);
JSONObject jsonObject = JSONObject.parseObject(resStr);
if (!ObjectUtils.isEmpty(jsonObject.getString("data"))) {
List<SMaterielProject> list = JSON.parseArray(jsonObject.getString("data"), SMaterielProject.class);
materielProjectService.saveOrUpdateBatch(list);
}
}
/**
* 物料数据定时拉取
*/
@Scheduled(cron = "0 0 2 20 * ? ")
public void materielDataPull() {
String beginTimestamp = DatePattern.PURE_DATETIME_MS_FORMAT.format(DateUtils.addMonths(new Date(), -1));
String apiURI = "/gys/inspection-api-service/integrate-v2/getSLlist?beginTimestamp=" + beginTimestamp;
String resStr = materielRequest(apiURI);
JSONObject jsonObject = JSONObject.parseObject(resStr);
JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
JSONArray bills = JSONObject.parseArray(data.getString("Bills"));
if(ObjectUtils.isEmpty(bills)) return;
List<CbQuantitySummary> list = new ArrayList<>();
for (int i = 0; i < bills.size(); i++) {
JSONObject obj = bills.getJSONObject(i);
JSONArray bdcls = JSONObject.parseArray(obj.getString("BDCL"));
for (int j = 0; j < bdcls.size(); j++) {
JSONObject bean = bdcls.getJSONObject(j);
//材料code
String code = bean.getString("CLLBBM").substring(bean.getString("CLLBBM").lastIndexOf(".") + 1);
CbSubject subject = subjectMapper.selectOne(Wrappers.<CbSubject>lambdaQuery().eq(CbSubject::getCode, code));
//获取项目id 通过第三方项目id->ipm编码->系统项目id
String projectId = bean.getString("projectId");
if (ObjectUtils.isEmpty(projectId)) {
continue;
}
SMaterielProject materielProject = materielProjectService.getById(projectId);
if (ObjectUtils.isEmpty(materielProject) || ObjectUtils.isEmpty(materielProject.getSyncCode())) {
continue;
}
CbProjectRecord one = projectRecordService.getOne(Wrappers.<CbProjectRecord>lambdaQuery()
.eq(CbProjectRecord::getIpmProjectNo, materielProject.getSyncCode())
.orderByDesc(CbProjectRecord::getCbStage));
if(ObjectUtils.isEmpty(one)){
continue;
}
CbQuantitySummary cb = new CbQuantitySummary();
cb.setProjectId(one.getId());
cb.setCbStage(one.getCbStage());
cb.setCbSubjectName(bean.getString("CLLBMC"));
cb.setCbSubjectNo(subject.getCbSubjectNo());
cb.setCbName(bean.getString("CLMC"));
cb.setUnit(bean.getString("JLDW"));
cb.setQuantity(bean.getDouble("SJSL"));
list.add(cb);
}
}
quantitySummaryService.batchInsert(list);
System.out.println(list);
}
private String materielRequest(String apiURI) {
try {
/** ------------ 授权认证 --------------*/
//第3步:创建客户端实例
RestServiceClient serviceClient = HmacRestServiceClient.getInstance();
//第4步:加载/验证授权文件
//4.1构建认证信息
HmacRestAuthInfo restAuthInfo = new HmacRestAuthInfo();
//4.2设置授权文件路径
// restAuthInfo.setLicPath("src/main/resource/auth/auth.lic");
restAuthInfo.setLicStream(this.getClass().getResourceAsStream("/auth/auth.lic"));
//4.3权限认证
serviceClient.authenticate(restAuthInfo);
/** ------------ 拼接请求地址 --------------*/
//第5步:获取授权文件关联的GYS平台地址hostAddress
String hostAddress = serviceClient.getRestRootAddress();
//第6步:设置请求接口的URI地址apiURI(以获取集成项目列表信息为例)
//第7步:拼装完整的请求网址
String fullURL = hostAddress + apiURI;
//第8步:请求数据准备(本例中为从GYS平台获取数据,无需进行请求数据的准备)
//第9步:发送请求,用来推送/获取数据
RestResponseInfo restResponseInfo = serviceClient.get(fullURL);
/** ------------ 处理请求返回结果 --------------*/
if (restResponseInfo.isSuccess()) {
//请求成功:
//第10步:处理请求结果(第三方系统自行处理)
return restResponseInfo.getStringContent();
} else {
//请求失败:
//第11步:拼接完整的上报请求失败地址
String faultLogApiURI = "/gys/tl/services/trace/api-fault-log";
String faultLogFullURL = hostAddress + faultLogApiURI;
//第12步:构建上报请求失败数据
JSONObject faultLog = new JSONObject();
faultLog.put("requestUrl", fullURL);
faultLog.put("requestMethod", "GET");
faultLog.put("requestBody", "");
faultLog.put("statusCode", restResponseInfo.getErrorCode());
faultLog.put("response", restResponseInfo.getStringContent());
faultLog.put("description", restResponseInfo.getErrorMessage());
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");//时间戳格式,到秒
LocalDateTime dateTime = LocalDateTime.now();
String searchKey = formatter.format(dateTime);
faultLog.put("searchKey", searchKey); //能表征本次请求记录的标识,方便进行问题排查
//第13步:上报请求失败数据
serviceClient.post(faultLogFullURL, faultLog.toJSONString());
}
} catch (AuthenticateException e) {
e.printStackTrace();
} catch (InvalidUriException e) {
e.printStackTrace();
} catch (NoAuthenticateException e) {
e.printStackTrace();
}
throw new ServiceException("物料接口调用失败!");
}
}
...@@ -53,5 +53,7 @@ public class CbSubject implements Serializable { ...@@ -53,5 +53,7 @@ public class CbSubject implements Serializable {
private Date createTime; private Date createTime;
private Integer sort; private Integer sort;
private String code;
} }
package com.dsk.cscec.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* 物料项目类
*
* @Author lcl
* @Data 2024/3/15 9:15
*/
@Data
@TableName("s_materiel_project")
public class SMaterielProject {
/**
* 第三方项目id
*/
@TableId(value = "id")
private Long id;
/**
* 项目名称
*/
private String name;
private String ownerDeptName;
/**
* 项目对应的组织id
*/
private Long ownerOrg;
/**
* 项目对应的父组织id
*/
private Long parentId;
private String shortName;
/**
* 项目(建设)状态 0:未开工; 1:在建; 2:停工; 3:完工; 4:验收
*/
private Integer status;
/**
* 同步编码(ipm项目编码:project_code)
*/
private String syncCode;
/**
* 1:表示普通项目;3:表示搅拌站
*/
private Integer type;
}
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.SMaterielProject;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SMaterielProjectMapper extends BaseMapper<SMaterielProject> {
}
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.SMaterielProject;
public interface ISMaterielProjectService extends IService<SMaterielProject> {
}
...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.excel.ExcelUtils; import com.dsk.common.excel.ExcelUtils;
...@@ -65,7 +66,7 @@ public class CbDirectExpenseServiceImpl extends ServiceImpl<CbDirectExpenseMappe ...@@ -65,7 +66,7 @@ public class CbDirectExpenseServiceImpl extends ServiceImpl<CbDirectExpenseMappe
//校验项目是否存在 //校验项目是否存在
this.checkProjectExist(projectId); this.checkProjectExist(projectId);
//查询清单/费用项分类标识为数字的数字 //查询清单/费用项分类标识为数字123的数据
List<CbDirectExpenseMenuVo> menuVoList = baseMapper.selectMenuData(projectId, regx, CbProjectConstants.DELETE_FLAG_EXIST); List<CbDirectExpenseMenuVo> menuVoList = baseMapper.selectMenuData(projectId, regx, CbProjectConstants.DELETE_FLAG_EXIST);
Assert.isFalse(menuVoList.isEmpty(), "当前项目不存在直接费菜单"); Assert.isFalse(menuVoList.isEmpty(), "当前项目不存在直接费菜单");
...@@ -241,19 +242,28 @@ public class CbDirectExpenseServiceImpl extends ServiceImpl<CbDirectExpenseMappe ...@@ -241,19 +242,28 @@ public class CbDirectExpenseServiceImpl extends ServiceImpl<CbDirectExpenseMappe
*/ */
@Override @Override
public List<CbDirectExpenseDataDetailVo> getDataDetail(Long menuId) { public List<CbDirectExpenseDataDetailVo> getDataDetail(Long menuId) {
//查询该菜单下的 //查询该菜单下的子集
List<CbDirectExpenseDataDetailVo> qingList = BeanUtil.copyToList(baseMapper.selectList(new LambdaQueryWrapper<CbDirectExpense>() List<CbDirectExpenseDataDetailVo> level4List = BeanUtil.copyToList(baseMapper.selectList(new LambdaQueryWrapper<CbDirectExpense>()
.eq(CbDirectExpense::getParentId, menuId) .eq(CbDirectExpense::getParentId, menuId)
//.eq(CbDirectExpense::getExpenseCategoryTag, CbProjectConstants.DIRECT_EXPENSE_CATEGORY_TAG_QING)
), CbDirectExpenseDataDetailVo.class); ), CbDirectExpenseDataDetailVo.class);
Assert.isFalse(qingList.isEmpty(), "该菜单下无数据"); Assert.isFalse(level4List.isEmpty(), "该菜单下无数据");
//生成数据树形 //生成数据树形
qingList.forEach(qing -> { this.generateDataDetailTree(level4List);
qing.getChildrenList().addAll(BeanUtil.copyToList(baseMapper.selectList(new LambdaQueryWrapper<CbDirectExpense>() return level4List;
.eq(CbDirectExpense::getParentId, qing.getId())), CbDirectExpenseDataDetailVo.class)); }
//生成数据详情树形
public void generateDataDetailTree(List<CbDirectExpenseDataDetailVo> level4List) {
level4List.forEach(item -> {
if (ReUtil.isMatch(regx, item.getExpenseCategoryTag())) {
item.setExpenseCategoryTag(null);
}
List<CbDirectExpenseDataDetailVo> childrenList = BeanUtil.copyToList(baseMapper.selectList(new LambdaQueryWrapper<CbDirectExpense>()
.eq(CbDirectExpense::getParentId, item.getId())), CbDirectExpenseDataDetailVo.class);
item.getChildrenList().addAll(childrenList);
generateDataDetailTree(childrenList);
}); });
return qingList;
} }
/** /**
......
...@@ -59,27 +59,36 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM ...@@ -59,27 +59,36 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
List<Map<String, Object>> resultList = new ArrayList<>(); List<Map<String, Object>> resultList = new ArrayList<>();
List<Map<String, Object>> list = baseMapper.selectSubject(bo); List<Map<String, Object>> list = baseMapper.selectSubject(bo);
if (!ObjectUtils.isEmpty(list)) { if (!ObjectUtils.isEmpty(list)) {
Map<String, Map<String, Map<String, List<Map<String, Object>>>>> map = list.stream() Map<String, Map<String, Map<String, Map<String, List<Map<String, Object>>>>>> map = list.stream()
.collect( .collect(
Collectors.groupingBy(item -> item.get("one").toString(), Collectors.groupingBy(item -> item.get("one").toString(),
Collectors.groupingBy(item -> item.get("two").toString(), Collectors.groupingBy(item -> item.get("two").toString(),
Collectors.groupingBy(item -> item.get("three").toString())))); Collectors.groupingBy(item -> item.get("three").toString(),
Collectors.groupingBy(item -> item.get("four").toString()
)))));
Map<String, Object> resMap = new HashMap<>(); Map<String, Object> resMap = new HashMap<>();
List<Map<String, Object>> resList = new ArrayList<>(); List<Map<String, Object>> resList = new ArrayList<>();
resMap.put("name", "房建类成本科目"); resMap.put("name", "房建类成本科目");
resMap.put("sort", 1); resMap.put("sort", 1);
for (Map.Entry<String, Map<String, Map<String, List<Map<String, Object>>>>> entry : map.entrySet()) { for (Map.Entry<String,Map<String, Map<String, Map<String, List<Map<String, Object>>>>>> entry : map.entrySet()) {
Map<String, Object> oneMap = new HashMap<>(); Map<String, Object> oneMap = new HashMap<>();
List<Map<String, Object>> oneList = new ArrayList<>(); List<Map<String, Object>> oneList = new ArrayList<>();
oneMap.put("name", entry.getKey()); oneMap.put("name", entry.getKey());
oneMap.put("sort", cbSubjectMapper.selectOne(Wrappers.<CbSubject>lambdaQuery().eq(CbSubject::getCbSubjectName, entry.getKey())).getSort()); oneMap.put("sort", cbSubjectMapper.selectOne(Wrappers.<CbSubject>lambdaQuery().eq(CbSubject::getCbSubjectName, entry.getKey())).getSort());
for (Map.Entry<String, Map<String, List<Map<String, Object>>>> twoEntry : entry.getValue().entrySet()) { for (Map.Entry<String,Map<String, Map<String, List<Map<String, Object>>>>> twoEntry : entry.getValue().entrySet()) {
Map<String, Object> twoMap = new HashMap<>(); Map<String, Object> twoMap = new HashMap<>();
List<Map<String, Object>> twoList = new ArrayList<>(); List<Map<String, Object>> twoList = new ArrayList<>();
twoMap.put("name", twoEntry.getKey()); twoMap.put("name", twoEntry.getKey());
for (Map.Entry<String, List<Map<String, Object>>> threeEntry : twoEntry.getValue().entrySet()) { for (Map.Entry<String, Map<String,List<Map<String, Object>>>> threeEntry : twoEntry.getValue().entrySet()) {
Map<String, Object> threeMap = new HashMap<>(); Map<String, Object> threeMap = new HashMap<>();
List<Map<String, Object>> threeList = new ArrayList<>();
threeMap.put("name", threeEntry.getKey()); threeMap.put("name", threeEntry.getKey());
for (Map.Entry<String, List<Map<String, Object>>> fourEntry : threeEntry.getValue().entrySet()) {
Map<String, Object> fourMap = new HashMap<>();
fourMap.put("name", fourEntry.getKey());
threeList.add(fourMap);
}
threeMap.put("children", threeList);
twoList.add(threeMap); twoList.add(threeMap);
} }
twoMap.put("children", twoList); twoMap.put("children", twoList);
......
package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.cscec.domain.SMaterielProject;
import com.dsk.cscec.mapper.SMaterielProjectMapper;
import com.dsk.cscec.service.ISMaterielProjectService;
import org.springframework.stereotype.Service;
/**
* @Author lcl
* @Data 2024/3/15 10:00
*/
@Service
public class SMaterielProjectServiceImpl extends ServiceImpl<SMaterielProjectMapper, SMaterielProject> implements ISMaterielProjectService{
}
Fsj/9hmISdE3AkSo8tpwb2an4K+BGCrN5xafwa0p3ej89iE7bllHhR1WU25d+UVI23K9ib+YYOoYqdPpodi1tm5G1AELKEEOhXAb5cAohVJ7Z7a7ABEw4hf39qLy3AjCTWsn8XBJmszNvx9gPZ+6mUGgqOEnuwNa+smkEtV24QXqPfB+wugDXLOMB6GK/GLRzDe5vbbLEWHzoKCbZloAgnMJqfjlBrgfekQRPwwASfsreQsWCeOcuh7ValPaj7/s9fuaDqg3nSTUXZwnORiteC2BH6PJa41hKVDRGgOEZMtXROcD01LizyjbstdQE0EnCJsk3P76zvzaY2w547NCmyqwhl9sCmpoB+CbAVctDR2DXnVg22Y2QdHDe0eoa66dFR/FCZaD1/LTM/xbIGZaZ3kJyP8XzQYtrzq5Go6WkpMUSOeRcjJ4JlNPU7oN67P4AAHiG6sI5n6hZTr+6InpPoCMvqPbcyNanrc+Eo7h3ToqF0XyU9uzblgcZbRtCuvmERvoZ/siTQhl/bTntG71NsA2WT3SnWsAf0MrwlkJqnwErn1ynit5nfeStDeX2+vfL16UCvDDnCG1JU2GcbYYK3dAkPXlADD6lp//s2TJuRzeeBlGfp88rSDS5EmcwSmn1F1ZoVipP7M92vmWq4bO1sowqEaHJmXmMP99WfUiW9KYGZa223CJONINBFEH1IlDrzJ1yh79uE2KxP3E9n00RX6SjZ/TbJWVTgBP5t9oXeASFIMqetdP8ZfgjwsiL0J1ag1uYMbbbmS8nJDL13O2sII6YTPDQ2qcW/9a2Iy/MwILHENplZpWZn1ifmZifsqASVlenVnjy2brnoGXLFS0hbynVRAzt44MDHonOzHsvZ4e4ZfXU55YoBNJRPe6oLgRUCxPsA2LjXWgH5YNa9pJya0XQeI69h876z+w6fg2dFGabJdB+2dE/JTOw2J8gbfjG9N9Lf8FawtLAr5GIEFLzXpr/QusnmYzuIbXN0fxn/7f6DLArS9uABaiuNVDjDrCVuMGNyrgtIgo8rIShuZjU+7uIE3xsD6srnZ7EvV1fA+SATk+XgWNmgMaiPriRDj2y1mTOIXRWtLGHFaCi2w6yA==
\ No newline at end of file
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<mapper namespace="com.dsk.cscec.mapper.CbQuantitySummaryMapper"> <mapper namespace="com.dsk.cscec.mapper.CbQuantitySummaryMapper">
<insert id="batchInsert" parameterType="com.dsk.cscec.domain.CbQuantitySummary"> <insert id="batchInsert" parameterType="com.dsk.cscec.domain.CbQuantitySummary">
INSERT INTO cscec_bms.cb_quantity_summary INSERT INTO cscec_bms.cb_quantity_summary
(project_id, `number`, cb_stage, cb_subject_name, company_no, org_no, cb_name, job_content, (project_id, `number`, cb_stage, cb_subject_name, cb_subject_no, company_no, org_no, cb_name, job_content,
calculation_rule, unit, material_description, guide_price, bid_unit_price, unit_price_difference, quantity, 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) combined_price, combined_price_tax, brand_name, bid_source, remark, cb_project_file_id)
VALUES VALUES
<foreach collection="list" item="item" separator="," > <foreach collection="list" item="item" separator="," >
(#{item.projectId}, #{item.number}, #{item.cbStage}, #{item.cbSubjectName}, #{item.companyNo}, #{item.orgNo}, #{item.cbName}, (#{item.projectId}, #{item.number}, #{item.cbStage}, #{item.cbSubjectName}, #{item.cbSubjectNo}, #{item.companyNo}, #{item.orgNo}, #{item.cbName},
#{item.jobContent},#{item.calculationRule},#{item.unit},#{item.materialDescription},#{item.guidePrice}, #{item.jobContent},#{item.calculationRule},#{item.unit},#{item.materialDescription},#{item.guidePrice},
#{item.bidUnitPrice},#{item.unitPriceDifference},#{item.quantity},#{item.combinedPrice},#{item.combinedPriceTax}, #{item.bidUnitPrice},#{item.unitPriceDifference},#{item.quantity},#{item.combinedPrice},#{item.combinedPriceTax},
#{item.brandName},#{item.bidSource},#{item.remark},#{item.cbProjectFileId}) #{item.brandName},#{item.bidSource},#{item.remark},#{item.cbProjectFileId})
...@@ -17,13 +17,46 @@ ...@@ -17,13 +17,46 @@
<select id="selectSubject" resultType="java.util.Map"> <select id="selectSubject" resultType="java.util.Map">
select select
cs1.cb_subject_name as one, cs2.cb_subject_name as two, cs3.cb_subject_name as three cs1.cb_subject_name as one, cs2.cb_subject_name as two, cs3.cb_subject_name as three , '' as four
from cb_subject cs1 from cb_subject cs1
join cb_subject cs2 on (cs2.cb_subject_no like concat(cs1.cb_subject_no,'%') and cs2.`level` = 2 ) join cb_subject cs2 on (cs2.cb_subject_no like concat(cs1.cb_subject_no,'%') and cs2.`level` = 2 )
join cb_subject cs3 on (cs3.cb_subject_no like concat(cs2.cb_subject_no,'%') and cs3.`level` = 3 ) join cb_subject cs3 on (cs3.cb_subject_no like concat(cs2.cb_subject_no,'%') and cs3.`level` = 3 )
join cb_quantity_summary cqs on (cqs.cb_subject_name = cs3.cb_subject_name and cqs.del_falg = 0 and cqs.project_id = #{projectId} and cqs.cb_stage = #{cbStage} ) join cb_quantity_summary cqs on (cqs.cb_subject_name = cs3.cb_subject_name and cqs.del_falg = 0 and cqs.project_id = #{projectId} and cqs.cb_stage = #{cbStage} )
where cs1.`level` = 1 where cs1.`level` = 1 and cs1.cb_subject_no != 'CL'
group by cs1.cb_subject_name,cs2.cb_subject_name,cs3.cb_subject_name group by cs1.cb_subject_name,cs2.cb_subject_name,cs3.cb_subject_name
union all
select
cs1.cb_subject_name as one, cs2.cb_subject_name as two, '' as three, '' as four
from cb_subject cs1
join cb_subject cs2 on (cs2.cb_subject_no like concat(cs1.cb_subject_no,'%') and cs2.`level` = 2 )
join cb_quantity_summary cqs on (cqs.cb_subject_no = cs2.cb_subject_no and cqs.del_falg = 0 and cqs.project_id = #{projectId} and cqs.cb_stage = #{cbStage} )
where cs1.`level` = 1 and cs1.cb_subject_no = 'CL'
group by cs1.cb_subject_name,cs2.cb_subject_name
union all
select
cs1.cb_subject_name as one, cs2.cb_subject_name as two, cs3.cb_subject_name as three, '' as four
from cb_subject cs1
join cb_subject cs2 on (cs2.cb_subject_no like concat(cs1.cb_subject_no,'%') and cs2.`level` = 2 )
join cb_subject cs3 on (cs3.cb_subject_no like concat(cs2.cb_subject_no,'%') and cs3.`level` = 3 )
join cb_quantity_summary cqs on (cqs.cb_subject_no = cs3.cb_subject_no and cqs.del_falg = 0 and cqs.project_id = #{projectId} and cqs.cb_stage = #{cbStage} )
where cs1.`level` = 1 and cs1.cb_subject_no = 'CL'
group by cs1.cb_subject_name,cs2.cb_subject_name,cs3.cb_subject_name
union all
select
cs1.cb_subject_name as one, cs2.cb_subject_name as two, cs3.cb_subject_name as three, cs4.cb_subject_name as four
from cb_subject cs1
join cb_subject cs2 on (cs2.cb_subject_no like concat(cs1.cb_subject_no,'%') and cs2.`level` = 2 )
join cb_subject cs3 on (cs3.cb_subject_no like concat(cs2.cb_subject_no,'%') and cs3.`level` = 3 )
join cb_subject cs4 on (cs4.cb_subject_no like concat(cs3.cb_subject_no,'%') and cs4.`level` = 4 )
join cb_quantity_summary cqs on (cqs.cb_subject_no = cs4.cb_subject_no and cqs.del_falg = 0 and cqs.project_id = #{projectId} and cqs.cb_stage = #{cbStage} )
where cs1.`level` = 1 and cs1.cb_subject_no = 'CL'
group by cs1.cb_subject_name,cs2.cb_subject_name,cs3.cb_subject_name,cs4.cb_subject_name
</select> </select>
<select id="selectOtherSubjectCount" resultType="java.lang.Integer"> <select id="selectOtherSubjectCount" resultType="java.lang.Integer">
......
...@@ -134,12 +134,12 @@ ...@@ -134,12 +134,12 @@
<select id="getGainLossAnalysisById" resultType="com.dsk.cscec.domain.vo.CbGainLossAnalysisListVo"> <select id="getGainLossAnalysisById" resultType="com.dsk.cscec.domain.vo.CbGainLossAnalysisListVo">
select csu.id, csu.cb_name, csu.tax_exclusive_total, csu.cb_taxes_total, csu.tax_inclusive_total, csa.tax_inclusive_expense, csa.tax_exclusive_expense, select csu.id, csu.cb_name, csu.tax_exclusive_total, csu.cb_taxes_total, csu.tax_inclusive_total, csa.tax_inclusive_expense, csa.tax_exclusive_expense,
sum(cde.tender_control_sum_price) tenderSumPrice, sum(cde.exclude_tax_cb_sum_price) taxExcludeTenderSumPrice, sum(cde.include_tax_cb_sum_price) taxIncludeTenderSumPrice, -- sum(cde.tender_control_sum_price) tenderSumPrice, sum(cde.exclude_tax_cb_sum_price) taxExcludeTenderSumPrice, sum(cde.include_tax_cb_sum_price) taxIncludeTenderSumPrice,
sum(csa1.tax_inclusive_expense) sumTaxInclusiveExpense, sum(csa1.tax_exclusive_expense) sumTaxExclusiveExpense sum(csa1.tax_inclusive_expense) sumTaxInclusiveExpense, sum(csa1.tax_exclusive_expense) sumTaxExclusiveExpense
from cb_summary csu 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 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_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 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 where csu.id = #{id} and csu.del_flag = 0
group by csu.id group by csu.id
order by csu.sort order by csu.sort
...@@ -147,12 +147,12 @@ ...@@ -147,12 +147,12 @@
<select id="getGainLossAnalysisByParentId" resultType="com.dsk.cscec.domain.vo.CbGainLossAnalysisListVo"> <select id="getGainLossAnalysisByParentId" resultType="com.dsk.cscec.domain.vo.CbGainLossAnalysisListVo">
select csu.id, csu.cb_name, csu.tax_exclusive_total, csu.cb_taxes_total, csu.tax_inclusive_total, csa.tax_inclusive_expense, csa.tax_exclusive_expense, select csu.id, csu.cb_name, csu.tax_exclusive_total, csu.cb_taxes_total, csu.tax_inclusive_total, csa.tax_inclusive_expense, csa.tax_exclusive_expense,
sum(cde.tender_control_sum_price) tenderSumPrice, sum(cde.exclude_tax_cb_sum_price) taxExcludeTenderSumPrice, sum(cde.include_tax_cb_sum_price) taxIncludeTenderSumPrice, -- sum(cde.tender_control_sum_price) tenderSumPrice, sum(cde.exclude_tax_cb_sum_price) taxExcludeTenderSumPrice, sum(cde.include_tax_cb_sum_price) taxIncludeTenderSumPrice,
sum(csa1.tax_inclusive_expense) sumTaxInclusiveExpense, sum(csa1.tax_exclusive_expense) sumTaxExclusiveExpense sum(csa1.tax_inclusive_expense) sumTaxInclusiveExpense, sum(csa1.tax_exclusive_expense) sumTaxExclusiveExpense
from cb_summary csu 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 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_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 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 where csu.parent_id = #{parentId} and csu.del_flag = 0
group by csu.id group by csu.id
order by csu.sort order by csu.sort
......
...@@ -635,6 +635,7 @@ export default { ...@@ -635,6 +635,7 @@ export default {
box-shadow: unset; box-shadow: unset;
} }
} }
/* 滚动条在最右侧时 */ /* 滚动条在最右侧时 */
&.is-scrolling-right { &.is-scrolling-right {
/* 右侧固定列 */ /* 右侧固定列 */
...@@ -643,6 +644,19 @@ export default { ...@@ -643,6 +644,19 @@ export default {
box-shadow: unset; box-shadow: unset;
} }
} }
// 没有滚动条
&.is-scrolling-none {
& + .el-table__fixed {
box-shadow: unset;
}
/* 右侧固定列 */
& + .el-table__fixed + .el-table__fixed-right,
& + .el-table__fixed-right {
box-shadow: unset;
}
}
} }
.el-table__fixed-right, .el-table__fixed-right,
.el-table__fixed { .el-table__fixed {
......
...@@ -55,6 +55,8 @@ import DictData from '@/components/DictData'; ...@@ -55,6 +55,8 @@ import DictData from '@/components/DictData';
// 全局缩放 // 全局缩放
import ScreenScal from "@/utils/screenScal"; import ScreenScal from "@/utils/screenScal";
import { decimalFormat } from "@/utils/decimal";
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts; Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey; Vue.prototype.getConfigKey = getConfigKey;
...@@ -66,6 +68,7 @@ Vue.prototype.selectDictLabels = selectDictLabels; ...@@ -66,6 +68,7 @@ Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download; Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree; Vue.prototype.handleTree = handleTree;
Vue.prototype.$mitt = mitt(); Vue.prototype.$mitt = mitt();
Vue.prototype.$decimalFormat = (num) => decimalFormat(num);
// 全局组件挂载 // 全局组件挂载
Vue.component('DictTag', DictTag); Vue.component('DictTag', DictTag);
......
import Decimal from "decimal.js"; import Decimal from "decimal.js";
/**
* 全局方法 处理为特定的decimal 格式
* @param {*} num
*/
export const decimalFormat = (num) => {
// 处理特殊字符为字母的情况
const reg = /[a-zA-Z]/gmi;
if (reg.test(num) && num != undefined && num != null && isFinite(num)) {
return num;
} else if (!parseFloat(num)) {
return "-";
} else {
return add(num, 0, 4, 15, true);
}
};
/** /**
* 加法 * 加法
* @param {*} num1 * @param {*} num1
...@@ -12,7 +29,7 @@ export const add = (num1, num2, digit = 9, intLen = 20, omit = false) => { ...@@ -12,7 +29,7 @@ export const add = (num1, num2, digit = 9, intLen = 20, omit = false) => {
const decimal1 = new Decimal(num1); const decimal1 = new Decimal(num1);
const decimal2 = new Decimal(num2); const decimal2 = new Decimal(num2);
const result = decimal1.plus(decimal2); const result = decimal1.plus(decimal2);
return omit ? result.toFixed(digit, Decimal.ROUND_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_UP).toSignificantDigits(intLen).toString(); return omit ? result.toFixed(digit, Decimal.ROUND_HALF_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_HALF_UP).toSignificantDigits(intLen).toString();
}; };
/** /**
...@@ -27,7 +44,7 @@ export const subtract = (num1, num2, digit = 9, intLen = 20, omit = false) => { ...@@ -27,7 +44,7 @@ export const subtract = (num1, num2, digit = 9, intLen = 20, omit = false) => {
const decimal1 = new Decimal(num1); const decimal1 = new Decimal(num1);
const decimal2 = new Decimal(num2); const decimal2 = new Decimal(num2);
const result = decimal1.minus(decimal2); const result = decimal1.minus(decimal2);
return omit ? result.toFixed(digit, Decimal.ROUND_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_UP).toSignificantDigits(intLen).toString(); return omit ? result.toFixed(digit, Decimal.ROUND_HALF_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_HALF_UP).toSignificantDigits(intLen).toString();
}; };
/** /**
...@@ -42,7 +59,7 @@ export const multiply = (num1, num2, digit = 9, intLen = 20, omit = false) => { ...@@ -42,7 +59,7 @@ export const multiply = (num1, num2, digit = 9, intLen = 20, omit = false) => {
const decimal1 = new Decimal(num1); const decimal1 = new Decimal(num1);
const decimal2 = new Decimal(num2); const decimal2 = new Decimal(num2);
const result = decimal1.times(decimal2); const result = decimal1.times(decimal2);
return omit ? result.toFixed(digit, Decimal.ROUND_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_UP).toSignificantDigits(intLen).toString(); return omit ? result.toFixed(digit, Decimal.ROUND_HALF_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_HALF_UP).toSignificantDigits(intLen).toString();
}; };
/** /**
...@@ -57,7 +74,7 @@ export const divide = (num1, num2, digit = 9, intLen = 20, omit = false) => { ...@@ -57,7 +74,7 @@ export const divide = (num1, num2, digit = 9, intLen = 20, omit = false) => {
const decimal1 = new Decimal(num1); const decimal1 = new Decimal(num1);
const decimal2 = new Decimal(num2); const decimal2 = new Decimal(num2);
const result = decimal1.dividedBy(decimal2); const result = decimal1.dividedBy(decimal2);
return omit ? result.toFixed(digit, Decimal.ROUND_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_UP).toSignificantDigits(intLen).toString(); return omit ? result.toFixed(digit, Decimal.ROUND_HALF_UP) : result.toDecimalPlaces(digit, Decimal.ROUND_HALF_UP).toSignificantDigits(intLen).toString();
}; };
// 检测结果是否是负数 // 检测结果是否是负数
......
...@@ -45,6 +45,22 @@ ...@@ -45,6 +45,22 @@
<el-form :model="dataForm" ref="costSummaryForm" :show-message="false" v-else-if="!tableLoading" class="feed-summary-form"> <el-form :model="dataForm" ref="costSummaryForm" :show-message="false" v-else-if="!tableLoading" class="feed-summary-form">
<custom-table ref="costSummaryTable" :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true" :row-key="rowKey" <custom-table ref="costSummaryTable" :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true" :row-key="rowKey"
:default-expand-all="true" :indent="8" :tableDataTotal="total" :paging="false" :cell-class-name="cellClassName"> :default-expand-all="true" :indent="8" :tableDataTotal="total" :paging="false" :cell-class-name="cellClassName">
<!-- 不含税成本合价 -->
<template slot="taxExclusiveTotal" slot-scope="scope">
{{$decimalFormat(scope.row.taxExclusiveTotal)}}
</template>
<!-- 成本税金合价 -->
<template slot="cbTaxesTotal" slot-scope="scope">
{{$decimalFormat(scope.row.cbTaxesTotal)}}
</template>
<!-- 含税成本合价 -->
<template slot="taxInclusiveTotal" slot-scope="scope">
{{$decimalFormat(scope.row.taxInclusiveTotal)}}
</template>
<!-- 含税成本平米指标 -->
<template slot="taxInclusivePmTarget" slot-scope="scope">
{{$decimalFormat(scope.row.taxInclusivePmTarget)}}
</template>
<!-- 本月费用(含税) --> <!-- 本月费用(含税) -->
<template slot="taxInclusiveExpense" slot-scope="scope"> <template slot="taxInclusiveExpense" slot-scope="scope">
<!-- 本月费用(含税)编辑单元格 --> <!-- 本月费用(含税)编辑单元格 -->
...@@ -53,6 +69,7 @@ ...@@ -53,6 +69,7 @@
<el-input placeholder="请输入" v-model="scope.row.taxInclusiveExpense" clearable <el-input placeholder="请输入" v-model="scope.row.taxInclusiveExpense" clearable
@input="v => editIptValueRectify(v, scope.row, 'taxInclusiveExpense')"></el-input> @input="v => editIptValueRectify(v, scope.row, 'taxInclusiveExpense')"></el-input>
</el-form-item> </el-form-item>
<span v-else-if="!addActualCostEditStatus">{{$decimalFormat(scope.row.taxInclusiveExpense)}}</span>
</template> </template>
<!-- 本月费用(不含税) --> <!-- 本月费用(不含税) -->
<template slot="taxExclusiveExpense" slot-scope="scope"> <template slot="taxExclusiveExpense" slot-scope="scope">
...@@ -61,6 +78,15 @@ ...@@ -61,6 +78,15 @@
<el-input placeholder="请输入" v-model="scope.row.taxExclusiveExpense" clearable <el-input placeholder="请输入" v-model="scope.row.taxExclusiveExpense" clearable
@input="v => editIptValueRectify(v, scope.row, 'taxExclusiveExpense')"></el-input> @input="v => editIptValueRectify(v, scope.row, 'taxExclusiveExpense')"></el-input>
</el-form-item> </el-form-item>
<span v-else-if="!addActualCostEditStatus">{{$decimalFormat(scope.row.taxExclusiveExpense)}}</span>
</template>
<!-- 截止本月费用(含税) -->
<template slot="taxInclusiveExpenseTotal" slot-scope="scope">
{{$decimalFormat(scope.row.taxInclusiveExpenseTotal)}}
</template>
<!-- 截止本月费用(不含税) -->
<template slot="taxExclusiveExpenseTotal" slot-scope="scope">
{{$decimalFormat(scope.row.taxExclusiveExpenseTotal)}}
</template> </template>
</custom-table> </custom-table>
</el-form> </el-form>
...@@ -173,16 +199,16 @@ export default { ...@@ -173,16 +199,16 @@ export default {
formColum: [ formColum: [
{ label: '序号', prop: "number", minWidth: "80", uid: v4(), fixed: "left" }, { label: '序号', prop: "number", minWidth: "80", uid: v4(), fixed: "left" },
{ label: '名称', prop: "cbName", width: "303", uid: v4(), showOverflowTooltip: true, fixed: "left" }, { label: '名称', prop: "cbName", width: "303", uid: v4(), showOverflowTooltip: true, fixed: "left" },
{ label: '不含税成本合价', prop: "taxExclusiveTotal", width: "182", uid: v4() }, { label: '不含税成本合价', prop: "taxExclusiveTotal", width: "182", uid: v4(), slot: true },
{ label: '成本税金合价', prop: "cbTaxesTotal", width: "182", uid: v4() }, { label: '成本税金合价', prop: "cbTaxesTotal", width: "182", uid: v4(), slot: true },
{ label: '含税成本合价', prop: "taxInclusiveTotal", width: "182", uid: v4() }, { label: '含税成本合价', prop: "taxInclusiveTotal", width: "182", uid: v4(), slot: true },
{ label: '成本占比', prop: "cbProportion", width: "182", uid: v4() }, { label: '成本占比', prop: "cbProportion", width: "182", uid: v4() },
{ label: '含税成本平米指标', prop: "taxInclusivePmTarget", width: "182", uid: v4() }, { label: '含税成本平米指标', prop: "taxInclusivePmTarget", width: "182", uid: v4(), slot: true },
{ label: '备注', prop: "remark", width: "182", uid: v4() }, { label: '备注', prop: "remark", width: "182", uid: v4() },
{ label: '本月费用(含税)', prop: "taxInclusiveExpense", width: "182", uid: v4(), slot: true }, { label: '本月费用(含税)', prop: "taxInclusiveExpense", width: "182", uid: v4(), slot: true },
{ label: '本月费用(不含税)', prop: "taxExclusiveExpense", width: "182", uid: v4(), slot: true }, { label: '本月费用(不含税)', prop: "taxExclusiveExpense", width: "182", uid: v4(), slot: true },
{ label: '截止本月费用(含税)', prop: "taxInclusiveExpenseTotal", width: "182", uid: v4() }, { label: '截止本月费用(含税)', prop: "taxInclusiveExpenseTotal", width: "182", uid: v4(), slot: true },
{ label: '截止本月费用(不含税)', prop: "taxExclusiveExpenseTotal", width: "182", uid: v4() }, { label: '截止本月费用(不含税)', prop: "taxExclusiveExpenseTotal", width: "182", uid: v4(), slot: true },
], ],
monthList: [], monthList: [],
// 源数据月份 // 源数据月份
......
...@@ -46,6 +46,30 @@ ...@@ -46,6 +46,30 @@
</div> </div>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<template slot="guidePrice" slot-scope="scope">
{{$decimalFormat(scope.row.guidePrice)}}
</template>
<template slot="bidUnitPrice" slot-scope="scope">
{{$decimalFormat(scope.row.bidUnitPrice)}}
</template>
<template slot="unitPriceDifference" slot-scope="scope">
{{$decimalFormat(scope.row.unitPriceDifference)}}
</template>
<template slot="quantity" slot-scope="scope">
{{$decimalFormat(scope.row.quantity)}}
</template>
<template slot="combinedPrice" slot-scope="scope">
{{$decimalFormat(scope.row.combinedPrice)}}
</template>
<template slot="combinedPriceTax" slot-scope="scope">
{{$decimalFormat(scope.row.combinedPriceTax)}}
</template>
<template slot="totalQuantities" slot-scope="scope">
{{$decimalFormat(scope.row.totalQuantities)}}
</template>
<template slot="pushQuantities" slot-scope="scope">
{{$decimalFormat(scope.row.pushQuantities)}}
</template>
<!-- 本月工程量 --> <!-- 本月工程量 -->
<template slot="quantities" slot-scope="scope"> <template slot="quantities" slot-scope="scope">
<!-- 编辑单元格 --> <!-- 编辑单元格 -->
...@@ -54,6 +78,7 @@ ...@@ -54,6 +78,7 @@
<el-input placeholder="请输入" v-model="scope.row.quantities" clearable <el-input placeholder="请输入" v-model="scope.row.quantities" clearable
@input="v => statisticsSum(v,'quantities',scope.row)"></el-input> @input="v => statisticsSum(v,'quantities',scope.row)"></el-input>
</el-form-item> </el-form-item>
<span v-else-if="!addActualCostEditStatus">{{$decimalFormat(scope.row.quantities)}}</span>
</template> </template>
<!-- 本月采购单价 --> <!-- 本月采购单价 -->
<template slot="purchaseUnitPrice" slot-scope="scope"> <template slot="purchaseUnitPrice" slot-scope="scope">
...@@ -63,6 +88,7 @@ ...@@ -63,6 +88,7 @@
<el-input placeholder="请输入" v-model="scope.row.purchaseUnitPrice" clearable <el-input placeholder="请输入" v-model="scope.row.purchaseUnitPrice" clearable
@input="v => statisticsSum(v,'purchaseUnitPrice',scope.row)"></el-input> @input="v => statisticsSum(v,'purchaseUnitPrice',scope.row)"></el-input>
</el-form-item> </el-form-item>
<span v-else-if="!addActualCostEditStatus">{{$decimalFormat(scope.row.purchaseUnitPrice)}}</span>
</template> </template>
</custom-table> </custom-table>
</el-form> </el-form>
...@@ -76,6 +102,33 @@ ...@@ -76,6 +102,33 @@
@click="parseFloat(scope.row.quantities) ? pushProjectUse(scope.row) : ''">推送物资</span> @click="parseFloat(scope.row.quantities) ? pushProjectUse(scope.row) : ''">推送物资</span>
</div> </div>
</template> </template>
<template slot="guidePrice" slot-scope="scope">
{{$decimalFormat(scope.row.guidePrice)}}
</template>
<template slot="bidUnitPrice" slot-scope="scope">
{{$decimalFormat(scope.row.bidUnitPrice)}}
</template>
<template slot="unitPriceDifference" slot-scope="scope">
{{$decimalFormat(scope.row.unitPriceDifference)}}
</template>
<template slot="quantity" slot-scope="scope">
{{$decimalFormat(scope.row.quantity)}}
</template>
<template slot="combinedPrice" slot-scope="scope">
{{$decimalFormat(scope.row.combinedPrice)}}
</template>
<template slot="combinedPriceTax" slot-scope="scope">
{{$decimalFormat(scope.row.combinedPriceTax)}}
</template>
<template slot="totalQuantities" slot-scope="scope">
{{$decimalFormat(scope.row.totalQuantities)}}
</template>
<template slot="quantities" slot-scope="scope">
{{$decimalFormat(scope.row.quantities)}}
</template>
<template slot="conversionQuantities" slot-scope="scope">
{{$decimalFormat(scope.row.conversionQuantities)}}
</template>
</entity-materials-table> </entity-materials-table>
</div> </div>
...@@ -206,12 +259,12 @@ export default { ...@@ -206,12 +259,12 @@ export default {
{ label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() }, { label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() },
{ {
label: '计划成本', prop: "jhcb", align: "center", uid: v4(), children: [ label: '计划成本', prop: "jhcb", align: "center", uid: v4(), children: [
{ label: '指导价格', prop: "guidePrice", minWidth: "81", uid: v4() }, { label: '指导价格', prop: "guidePrice", minWidth: "81", uid: v4(), slot: true },
{ label: '投标选用单价(不含税)', prop: "bidUnitPrice", minWidth: "179", uid: v4() }, { label: '投标选用单价(不含税)', prop: "bidUnitPrice", minWidth: "179", uid: v4(), slot: true },
{ label: '单价差额', prop: "unitPriceDifference", minWidth: "81", uid: v4() }, { label: '单价差额', prop: "unitPriceDifference", minWidth: "81", uid: v4(), slot: true },
{ label: '数量', prop: "quantity", minWidth: "150", uid: v4() }, { label: '数量', prop: "quantity", minWidth: "150", uid: v4(), slot: true },
{ label: '合价(不含税)', prop: "combinedPrice", minWidth: "150", uid: v4() }, { label: '合价(不含税)', prop: "combinedPrice", minWidth: "150", uid: v4(), slot: true },
{ label: '合价(含税)', prop: "combinedPriceTax", minWidth: "150", uid: v4() }, { label: '合价(含税)', prop: "combinedPriceTax", minWidth: "150", uid: v4(), slot: true },
{ label: '品牌名称', prop: "brandName", minWidth: "81", uid: v4() }, { label: '品牌名称', prop: "brandName", minWidth: "81", uid: v4() },
{ label: '投标选用来源', prop: "bidSource", minWidth: "109", uid: v4() }, { label: '投标选用来源', prop: "bidSource", minWidth: "109", uid: v4() },
] ]
...@@ -224,7 +277,7 @@ export default { ...@@ -224,7 +277,7 @@ export default {
{ label: '填写时间', prop: "createTime", minWidth: "160", uid: v4(), slot: true }, { label: '填写时间', prop: "createTime", minWidth: "160", uid: v4(), slot: true },
] ]
}, },
{ label: '推送工程量', prop: "pushQuantities", width: "95", uid: v4() }, { label: '推送工程量', prop: "pushQuantities", width: "95", uid: v4(), slot: true },
{ label: '备注', prop: "remark", width: "115", uid: v4(), slot: true }, { label: '备注', prop: "remark", width: "115", uid: v4(), slot: true },
{ label: '操作', prop: "action-field-bar", width: "99", uid: v4(), fixed: "right" }, { label: '操作', prop: "action-field-bar", width: "99", uid: v4(), fixed: "right" },
], ],
...@@ -242,12 +295,12 @@ export default { ...@@ -242,12 +295,12 @@ export default {
{ label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() }, { label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() },
{ {
label: '计划成本', prop: "jhcb", align: "center", uid: v4(), children: [ label: '计划成本', prop: "jhcb", align: "center", uid: v4(), children: [
{ label: '指导价格', prop: "guidePrice", minWidth: "81", uid: v4() }, { label: '指导价格', prop: "guidePrice", minWidth: "81", uid: v4(), slot: true },
{ label: '投标选用单价(不含税)', prop: "bidUnitPrice", minWidth: "179", uid: v4() }, { label: '投标选用单价(不含税)', prop: "bidUnitPrice", minWidth: "179", uid: v4(), slot: true },
{ label: '单价差额', prop: "unitPriceDifference", minWidth: "81", uid: v4() }, { label: '单价差额', prop: "unitPriceDifference", minWidth: "81", uid: v4(), slot: true },
{ label: '数量', prop: "quantity", minWidth: "150", uid: v4() }, { label: '数量', prop: "quantity", minWidth: "150", uid: v4(), slot: true },
{ label: '合价(不含税)', prop: "combinedPrice", minWidth: "150", uid: v4() }, { label: '合价(不含税)', prop: "combinedPrice", minWidth: "150", uid: v4(), slot: true },
{ label: '合价(含税)', prop: "combinedPriceTax", minWidth: "150", uid: v4() }, { label: '合价(含税)', prop: "combinedPriceTax", minWidth: "150", uid: v4(), slot: true },
{ label: '品牌名称', prop: "brandName", minWidth: "81", uid: v4() }, { label: '品牌名称', prop: "brandName", minWidth: "81", uid: v4() },
{ label: '投标选用来源', prop: "bidSource", minWidth: "109", uid: v4() }, { label: '投标选用来源', prop: "bidSource", minWidth: "109", uid: v4() },
] ]
......
...@@ -27,6 +27,30 @@ ...@@ -27,6 +27,30 @@
<dsk-skeleton v-if="tableLoading"></dsk-skeleton> <dsk-skeleton v-if="tableLoading"></dsk-skeleton>
<custom-table v-else-if="!tableLoading" :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true" <custom-table v-else-if="!tableLoading" :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true"
:tableDataTotal="total" :paging="false"> :tableDataTotal="total" :paging="false">
<template slot="expenseValue" slot-scope="scope">
{{$decimalFormat(scope.row.expenseValue)}}
</template>
<template slot="byfy" slot-scope="scope">
{{$decimalFormat(scope.row.byfy)}}
</template>
<template slot="jzbyzfy" slot-scope="scope">
{{$decimalFormat(scope.row.jzbyzfy)}}
</template>
<template slot="cbCount" slot-scope="scope">
{{$decimalFormat(scope.row.cbCount)}}
</template>
<template slot="unitPrice" slot-scope="scope">
{{$decimalFormat(scope.row.unitPrice)}}
</template>
<template slot="excludeTaxSumPrice" slot-scope="scope">
{{$decimalFormat(scope.row.excludeTaxSumPrice)}}
</template>
<template slot="includeTaxSumPrice" slot-scope="scope">
{{$decimalFormat(scope.row.includeTaxSumPrice)}}
</template>
<template slot="engineeringVolume" slot-scope="scope">
{{$decimalFormat(scope.row.engineeringVolume)}}
</template>
</custom-table> </custom-table>
</div> </div>
</div> </div>
...@@ -98,20 +122,20 @@ export default { ...@@ -98,20 +122,20 @@ export default {
formColumOptions: { formColumOptions: {
"现场经费": [ "现场经费": [
{ label: '名称', prop: "expenseName", minWidth: "175", uid: v4(), showOverflowTooltip: true }, { label: '名称', prop: "expenseName", minWidth: "175", uid: v4(), showOverflowTooltip: true },
{ label: '数量', prop: "expenseValue", width: "175", uid: v4() }, { label: '数量', prop: "expenseValue", width: "175", uid: v4(), slot: true },
{ label: '占比', prop: "proportion", width: "175", uid: v4() }, { label: '占比', prop: "proportion", width: "175", uid: v4() },
{ label: '本月费用', prop: "byfy", minWidth: "175", uid: v4() }, { label: '本月费用', prop: "byfy", minWidth: "175", uid: v4(), slot: true },
{ label: '截至本月总费用', prop: "jzbyzfy", minWidth: "175", uid: v4() }, { label: '截至本月总费用', prop: "jzbyzfy", minWidth: "175", uid: v4(), slot: true },
], ],
"其他费用(包含建设其他费)": [ "其他费用(包含建设其他费)": [
{ label: '序号', prop: "number", width: "60", fixed: false, uid: v4() }, { label: '序号', prop: "number", width: "60", fixed: false, uid: v4() },
{ label: '名称', prop: "expenseName", width: "121", uid: v4(), showOverflowTooltip: true }, { label: '名称', prop: "expenseName", width: "121", uid: v4(), showOverflowTooltip: true },
{ label: '单位', prop: "unit", width: "121", uid: v4() }, { label: '单位', prop: "unit", width: "121", uid: v4() },
{ label: '成本数量', prop: "cbCount", width: "121", uid: v4() }, { label: '成本数量', prop: "cbCount", width: "121", uid: v4(), slot: true },
{ label: '使用时间', prop: "useTime", width: "129", uid: v4() }, { label: '使用时间', prop: "useTime", width: "129", uid: v4() },
{ label: '公司单价', prop: "unitPrice", width: "129", uid: v4() }, { label: '公司单价', prop: "unitPrice", width: "129", uid: v4(), slot: true },
{ label: '目标成本合价(不含税)', prop: "excludeTaxSumPrice", width: "180", uid: v4() }, { label: '目标成本合价(不含税)', prop: "excludeTaxSumPrice", width: "180", uid: v4(), slot: true },
{ label: '目标成本合价(含税)', prop: "includeTaxSumPrice", width: "180", uid: v4() }, { label: '目标成本合价(含税)', prop: "includeTaxSumPrice", width: "180", uid: v4(), slot: true },
{ label: '备注', prop: "remark", width: "384", uid: v4(), showOverflowTooltip: true }, { label: '备注', prop: "remark", width: "384", uid: v4(), showOverflowTooltip: true },
{ label: '成本科目', prop: "cbSubject", width: "129", uid: v4() }, { label: '成本科目', prop: "cbSubject", width: "129", uid: v4() },
{ label: '税金类型', prop: "taxType", width: "129", uid: v4() }, { label: '税金类型', prop: "taxType", width: "129", uid: v4() },
...@@ -122,30 +146,30 @@ export default { ...@@ -122,30 +146,30 @@ export default {
{ label: '序号', prop: "number", width: "60", fixed: false, uid: v4() }, { label: '序号', prop: "number", width: "60", fixed: false, uid: v4() },
{ label: '名称', prop: "expenseName", minWidth: "121", uid: v4(), showOverflowTooltip: true }, { label: '名称', prop: "expenseName", minWidth: "121", uid: v4(), showOverflowTooltip: true },
{ label: '单位', prop: "unit", width: "121", uid: v4() }, { label: '单位', prop: "unit", width: "121", uid: v4() },
{ label: '成本数量', prop: "cbCount", width: "121", uid: v4() }, { label: '成本数量', prop: "cbCount", width: "121", uid: v4(), slot: true },
{ label: '使用时间', prop: "useTime", width: "121", uid: v4() }, { label: '使用时间', prop: "useTime", width: "121", uid: v4() },
{ label: '公司单价', prop: "unitPrice", width: "121", uid: v4() }, { label: '公司单价', prop: "unitPrice", width: "121", uid: v4(), slot: true },
{ label: '目标成本合价(不含税)', prop: "excludeTaxSumPrice", width: "180", uid: v4() }, { label: '目标成本合价(不含税)', prop: "excludeTaxSumPrice", width: "180", uid: v4(), slot: true },
{ label: '目标成本合价(含税)', prop: "includeTaxSumPrice", width: "180", uid: v4() }, { label: '目标成本合价(含税)', prop: "includeTaxSumPrice", width: "180", uid: v4(), slot: true },
{ label: '成本科目', prop: "cbSubject", width: "121", uid: v4() }, { label: '成本科目', prop: "cbSubject", width: "121", uid: v4() },
{ label: '税金类型', prop: "taxType", width: "121", uid: v4() }, { label: '税金类型', prop: "taxType", width: "121", uid: v4() },
{ label: '本月费用', prop: "byfy", width: "121", uid: v4() }, { label: '本月费用', prop: "byfy", width: "121", uid: v4(), slot: true },
{ label: '截止本月总费用', prop: "jzbyzfy", width: "128", uid: v4() }, { label: '截止本月总费用', prop: "jzbyzfy", width: "128", uid: v4(), slot: true },
], ],
"现场管理费": [ "现场管理费": [
{ label: '序号', prop: "number", width: "60", fixed: false, uid: v4() }, { label: '序号', prop: "number", width: "60", fixed: false, uid: v4() },
{ label: '名称', prop: "expenseName", minWidth: "121", uid: v4(), showOverflowTooltip: true }, { label: '名称', prop: "expenseName", minWidth: "121", uid: v4(), showOverflowTooltip: true },
{ label: '单位', prop: "unit", width: "121", uid: v4() }, { label: '单位', prop: "unit", width: "121", uid: v4() },
{ label: '工程量', prop: "engineeringVolume", width: "121", uid: v4() }, { label: '工程量', prop: "engineeringVolume", width: "121", uid: v4(), slot: true },
{ label: '增值税税率', prop: "addedTaxRate", width: "121", uid: v4() }, { label: '增值税税率', prop: "addedTaxRate", width: "121", uid: v4() },
{ label: '不含税单价(元)', prop: "unitPrice", width: "180", uid: v4() }, { label: '不含税单价(元)', prop: "unitPrice", width: "180", uid: v4(), slot: true },
{ label: '不含税合价(元)', prop: "excludeTaxSumPrice", width: "180", uid: v4() }, { label: '不含税合价(元)', prop: "excludeTaxSumPrice", width: "180", uid: v4(), slot: true },
{ label: '含税合价(元)', prop: "includeTaxSumPrice", width: "180", uid: v4() }, { label: '含税合价(元)', prop: "includeTaxSumPrice", width: "180", uid: v4(), slot: true },
{ label: '备注', prop: "remark", width: "121", uid: v4() }, { label: '备注', prop: "remark", width: "121", uid: v4() },
{ label: '成本科目', prop: "cbSubject", width: "121", uid: v4() }, { label: '成本科目', prop: "cbSubject", width: "121", uid: v4() },
{ label: '税金类型', prop: "taxType", width: "121", uid: v4() }, { label: '税金类型', prop: "taxType", width: "121", uid: v4() },
{ label: '本月费用', prop: "byfy", width: "121", uid: v4() }, { label: '本月费用', prop: "byfy", width: "121", uid: v4(), slot: true },
{ label: '截止本月总费用', prop: "jzbyzfy", width: "128", uid: v4() }, { label: '截止本月总费用', prop: "jzbyzfy", width: "128", uid: v4(), slot: true },
] ]
}, },
// 已记录月份集合 // 已记录月份集合
......
...@@ -271,20 +271,48 @@ ...@@ -271,20 +271,48 @@
cbVisible:false, cbVisible:false,
chooseDate:"", chooseDate:"",
isinput:false,//是否填写 isinput:false,//是否填写
tableHeight: window.innerHeight - 355 tableHeight: window.innerHeight - 355,
nowheight:null,
resizeTimer:null,
}; };
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.init(this.comProjectId); this.init(this.comProjectId);
// this.createResizeObserver(); this.getHeight()
}, },
//计算集 //计算集
computed: { computed: {},
beforeDestroy() {
}, this.clearResizeTimer()
//方法集 if (this.observer) {
methods: { this.observer.disconnect()
}
},
//方法集
methods: {
async getHeight(list){
this.nowheight = new ResizeObserver(entries => {
this.clearResizeTimer();
this.resizeTimer = setTimeout(() => {
this.maxHeight();
}, 1000);
});
await this.$nextTick();
this.nowheight.observe(document.querySelector('.profitloss'));
},
maxHeight(){
const domhei = document.querySelector('.profitloss').offsetHeight - 36 - 16 - 32
const conhei = document.querySelector('.meafixed-table').offsetHeight - 32
// const height = window.getComputedStyle(dom).height;
console.log(domhei)
this.tableHeight = domhei
// console.log(height)
},
clearResizeTimer() {
clearTimeout(this.resizeTimer);
this.resizeTimer = null;
},
getGDT(){ getGDT(){
let gdt = document.querySelector('.el-table__body-wrapper') let gdt = document.querySelector('.el-table__body-wrapper')
let w1 = document.querySelector('.el-table__fixed-right-patch') let w1 = document.querySelector('.el-table__fixed-right-patch')
......
...@@ -36,39 +36,43 @@ ...@@ -36,39 +36,43 @@
<template slot-scope="scope">{{scope.row.cbName || '--'}}</template> <template slot-scope="scope">{{scope.row.cbName || '--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="招标控制价" align="center"> <el-table-column label="招标控制价" align="center">
<el-table-column label="招标控制价合价" width="180" prop="tenderSumPrice"><template slot-scope="scope">{{scope.row.tenderSumPrice || '--'}}</template></el-table-column> <el-table-column label="招标控制价合价" width="180" prop="tenderSumPrice">
<el-table-column label="不含税招标合价" width="180" prop="tenderSumPrice"><template slot-scope="scope">{{scope.row.tenderSumPrice || '--'}}</template></el-table-column> <template slot-scope="scope">{{changevalue(scope.row.tenderSumPrice)}}</template>
<el-table-column label="含税招标合价" width="180" prop="taxIncludeTenderSumPrice"><template slot-scope="scope">{{scope.row.taxIncludeTenderSumPrice || '--'}}</template></el-table-column> </el-table-column>
<el-table-column label="不含税招标合价" width="180" prop="taxExcludeTenderSumPrice">
<template slot-scope="scope">{{changevalue(scope.row.taxExcludeTenderSumPrice)}}</template>
</el-table-column>
<el-table-column label="含税招标合价" width="180" prop="taxIncludeTenderSumPrice"><template slot-scope="scope">{{changevalue(scope.row.taxIncludeTenderSumPrice)}}</template></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="投标报价" align="center"> <el-table-column label="投标报价" align="center">
<el-table-column label="投标报价合价" width="180" prop="bidSumPrice"><template slot-scope="scope">{{scope.row.bidSumPrice || '--'}}</template></el-table-column> <el-table-column label="投标报价合价" width="180" prop="bidSumPrice"><template slot-scope="scope">{{changevalue(scope.row.bidSumPrice)}}</template></el-table-column>
<el-table-column label="不含税投标合价" width="180" prop="taxExcludeBidSumPrice"><template slot-scope="scope">{{scope.row.taxExcludeBidSumPrice || '--'}}</template></el-table-column> <el-table-column label="不含税投标合价" width="180" prop="taxExcludeBidSumPrice"><template slot-scope="scope">{{changevalue(scope.row.taxExcludeBidSumPrice)}}</template></el-table-column>
<el-table-column label="含税投标合价" width="180" prop="taxIncludebBidSumPrice"><template slot-scope="scope">{{scope.row.taxIncludebBidSumPrice || '--'}}</template></el-table-column> <el-table-column label="含税投标合价" width="180" prop="taxIncludebBidSumPrice"><template slot-scope="scope">{{changevalue(scope.row.taxIncludebBidSumPrice)}}</template></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="成本汇总" align="center"> <el-table-column label="成本汇总" align="center">
<el-table-column label="不含税成本合价" width="180" prop="taxExclusiveTotal"><template slot-scope="scope">{{scope.row.taxExclusiveTotal || '--'}}</template></el-table-column> <el-table-column label="不含税成本合价" width="180" prop="taxExclusiveTotal"><template slot-scope="scope">{{changevalue(scope.row.taxExclusiveTotal)}}</template></el-table-column>
<el-table-column label="成本税金合价" width="180" prop="cbTaxesTotal"><template slot-scope="scope">{{scope.row.cbTaxesTotal || '--'}}</template></el-table-column> <el-table-column label="成本税金合价" width="180" prop="cbTaxesTotal"><template slot-scope="scope">{{changevalue(scope.row.cbTaxesTotal)}}</template></el-table-column>
<el-table-column label="含税成本合价" width="180" prop="taxInclusiveTotal"><template slot-scope="scope">{{scope.row.taxInclusiveTotal || '--'}}</template></el-table-column> <el-table-column label="含税成本合价" width="180" prop="taxInclusiveTotal"><template slot-scope="scope">{{changevalue(scope.row.taxInclusiveTotal)}}</template></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="造价指标(元/㎡)" align="center"> <el-table-column label="造价指标(元/㎡)" align="center">
<el-table-column label="招标控制价" width="180" prop="costTender"><template slot-scope="scope">{{scope.row.costTender || '--'}}</template></el-table-column> <el-table-column label="招标控制价" width="180" prop="costTender"><template slot-scope="scope">{{changevalue(scope.row.costTender )}}</template></el-table-column>
<el-table-column label="投标报价" width="180" prop="costBid"><template slot-scope="scope">{{scope.row.costBid || '--'}}</template></el-table-column> <el-table-column label="投标报价" width="180" prop="costBid"><template slot-scope="scope">{{changevalue(scope.row.costBid )}}</template></el-table-column>
<el-table-column label="成本" width="180" prop="costExpense"><template slot-scope="scope">{{scope.row.costExpense || '--'}}</template></el-table-column> <el-table-column label="成本" width="180" prop="costExpense"><template slot-scope="scope">{{changevalue(scope.row.costExpense)}}</template></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="含税成本占比" width="180" prop="taxInclusiveExpenseProportion"><template slot-scope="scope">{{scope.row.taxInclusiveExpenseProportion || '--'}}</template></el-table-column> <el-table-column label="含税成本占比" width="180" prop="taxInclusiveExpenseProportion"><template slot-scope="scope">{{changevalue(scope.row.taxInclusiveExpenseProportion)}}</template></el-table-column>
<el-table-column label="控制盈亏对比情况" align="center"> <el-table-column label="控制盈亏对比情况" align="center">
<el-table-column label="含税合价偏差" width="180" prop="tenderSumPriceDeviation"><template slot-scope="scope">{{scope.row.tenderSumPriceDeviation || '--'}}</template></el-table-column> <el-table-column label="含税合价偏差" width="180" prop="tenderSumPriceDeviation"><template slot-scope="scope">{{changevalue(scope.row.tenderSumPriceDeviation )}}</template></el-table-column>
<el-table-column label="含税盈亏率" width="180" prop="tenderProfitLossRatio"><template slot-scope="scope">{{scope.row.tenderProfitLossRatio || '--'}}</template></el-table-column> <el-table-column label="含税盈亏率" width="180" prop="tenderProfitLossRatio"><template slot-scope="scope">{{changevalue(scope.row.tenderProfitLossRatio)}}</template></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="投标报价盈亏对比情况" align="center"> <el-table-column label="投标报价盈亏对比情况" align="center">
<el-table-column label="含税合价偏差" width="180" prop="bidSumPriceDeviation"><template slot-scope="scope">{{scope.row.bidSumPriceDeviation || '--'}}</template></el-table-column> <el-table-column label="含税合价偏差" width="180" prop="bidSumPriceDeviation"><template slot-scope="scope">{{changevalue(scope.row.bidSumPriceDeviation)}}</template></el-table-column>
<el-table-column label="含税盈亏率" width="180" prop="bidProfitLossRatio"><template slot-scope="scope">{{scope.row.bidProfitLossRatio || '--'}}</template></el-table-column> <el-table-column label="含税盈亏率" width="180" prop="bidProfitLossRatio"><template slot-scope="scope">{{changevalue(scope.row.bidProfitLossRatio )}}</template></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="实际成本费用" align="center"> <el-table-column label="实际成本费用" align="center">
<el-table-column label="本月费用(含税)" width="180" prop="taxInclusiveExpense"><template slot-scope="scope">{{scope.row.taxInclusiveExpense || '--'}}</template></el-table-column> <el-table-column label="本月费用(含税)" width="180" prop="taxInclusiveExpense"><template slot-scope="scope">{{changevalue(scope.row.taxInclusiveExpense)}}</template></el-table-column>
<el-table-column label="本月费用(不含税)" width="180" prop="taxExclusiveExpense"><template slot-scope="scope">{{scope.row.taxExclusiveExpense || '--'}}</template></el-table-column> <el-table-column label="本月费用(不含税)" width="180" prop="taxExclusiveExpense"><template slot-scope="scope">{{changevalue(scope.row.taxExclusiveExpense)}}</template></el-table-column>
<el-table-column label="截至本月费用(含税)" width="180" prop="sumTaxInclusiveExpense"><template slot-scope="scope">{{scope.row.sumTaxInclusiveExpense || '--'}}</template></el-table-column> <el-table-column label="截至本月费用(含税)" width="180" prop="sumTaxInclusiveExpense"><template slot-scope="scope">{{changevalue(scope.row.sumTaxInclusiveExpense)}}</template></el-table-column>
<el-table-column label="截至本月费用(不含税)" width="180" prop="sumTaxExclusiveExpense"><template slot-scope="scope">{{scope.row.sumTaxExclusiveExpense || '--'}}</template></el-table-column> <el-table-column label="截至本月费用(不含税)" width="180" prop="sumTaxExclusiveExpense"><template slot-scope="scope">{{changevalue(scope.row.sumTaxExclusiveExpense)}}</template></el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -154,6 +158,10 @@ ...@@ -154,6 +158,10 @@
}, },
//方法集 //方法集
methods: { methods: {
changevalue(value){
let str = parseFloat(value)?value:'--'
return str
},
select(menuPath){ select(menuPath){
this.id = menuPath this.id = menuPath
this.defaultActive = menuPath this.defaultActive = menuPath
......
...@@ -35,8 +35,8 @@ module.exports = { ...@@ -35,8 +35,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://172.17.0.12:9099/prod-api`,//测试 // target: `http://111.204.34.146:9099/prod-api`,//测试
// target: `http://172.17.0.12:9099/prod-api`,//测试 target: `http://172.17.0.12:9099//prod-api`,//测试
// target: `http://192.168.60.5:9098`,//陈跃方 // target: `http://192.168.60.5:9098`,//陈跃方
// target: `http://192.168.60.27:9098`,//邓 // target: `http://192.168.60.27:9098`,//邓
// target: `http://122.9.160.122:9011`, //线上 // target: `http://122.9.160.122:9011`, //线上
......
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