Commit ee348886 authored by tianhongyang's avatar tianhongyang

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

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 0ee095ac a71b3705
...@@ -54,71 +54,69 @@ public class DataAnalysisComponent { ...@@ -54,71 +54,69 @@ public class DataAnalysisComponent {
if (ObjectUtils.isEmpty(fileList)) return; if (ObjectUtils.isEmpty(fileList)) return;
//文件处理 //文件处理
for (CbProjectFile file : fileList) { for (CbProjectFile file : fileList) {
// if (file.getDelFlag() == 0) { //文件下载
InputStream inputStream = ossService.downFileIO(file.getFileOssId());
//文件下载 if (ObjectUtil.isNull(inputStream)) {
InputStream inputStream = ossService.downFileIO(file.getFileOssId()); file.setFileParseStatus(3);
if (ObjectUtil.isNull(inputStream)) { file.setFailRemark("文件数据不存在");
file.setFileParseStatus(3); projectFileService.updateById(file);
file.setFailRemark("文件数据不存在"); break;
projectFileService.updateById(file); }
break; //解析数据
} List<CbQuantitySummary> importList = new ExcelUtils<>(CbQuantitySummary.class).importExcelAllSheet(inputStream, 1);
//解析数据 if (importList.isEmpty()) {
List<CbQuantitySummary> importList = new ExcelUtils<>(CbQuantitySummary.class).importExcelAllSheet(inputStream, 1); file.setFileParseStatus(3);
if (importList.isEmpty()) { 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.setFileParseStatus(3);
file.setFailRemark("表格中不存在待导入数据!"); file.setFailRemark(e.getMessage());
projectFileService.updateById(file); projectFileService.updateById(file);
break;
} }
List<CbQuantitySummary> quantitySummaryList = importList.stream().parallel() return Boolean.TRUE;
.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);
// }
} }
} }
} }
...@@ -2,6 +2,7 @@ package com.dsk.cscec.domain; ...@@ -2,6 +2,7 @@ package com.dsk.cscec.domain;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
...@@ -10,6 +11,7 @@ import java.io.Serializable; ...@@ -10,6 +11,7 @@ import java.io.Serializable;
import com.dsk.common.annotation.Excel; import com.dsk.common.annotation.Excel;
import lombok.Data; import lombok.Data;
import org.springframework.util.ObjectUtils;
/** /**
* 成本-工料汇总基本表(CbQuantitySummary)表实体类 * 成本-工料汇总基本表(CbQuantitySummary)表实体类
...@@ -32,7 +34,6 @@ public class CbQuantitySummary implements Serializable { ...@@ -32,7 +34,6 @@ public class CbQuantitySummary implements Serializable {
/** /**
* 序号 * 序号
*/ */
@Excel(name = "序号")
private Integer number; private Integer number;
/** /**
* 成本阶段(0:标前成本 1:标后成本 2:转固成本) * 成本阶段(0:标前成本 1:标后成本 2:转固成本)
...@@ -141,5 +142,12 @@ public class CbQuantitySummary implements Serializable { ...@@ -141,5 +142,12 @@ public class CbQuantitySummary implements Serializable {
@TableLogic(value = "0", delval = "2") @TableLogic(value = "0", delval = "2")
private Integer delFalg; 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);
}
} }
...@@ -20,6 +20,7 @@ import java.util.Map; ...@@ -20,6 +20,7 @@ import java.util.Map;
*/ */
public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummaryMapper,CbQuantitySummary,CbQuantitySummary> { public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummaryMapper,CbQuantitySummary,CbQuantitySummary> {
int batchInsert(@Param("list") List<CbQuantitySummary> list);
List<Map<String, Object>> selectSubject(CbProjectBaseBo bo); List<Map<String, Object>> selectSubject(CbProjectBaseBo bo);
...@@ -29,5 +30,7 @@ public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummar ...@@ -29,5 +30,7 @@ public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummar
List<CbQuantitySummaryListVo> selectListBySubject(CbQuantitySummaryListBo bo); List<CbQuantitySummaryListVo> selectListBySubject(CbQuantitySummaryListBo bo);
} }
...@@ -28,5 +28,7 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> { ...@@ -28,5 +28,7 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
void pushData(CbQuantitySummaryActual bo); void pushData(CbQuantitySummaryActual bo);
boolean batchInsert(List<CbQuantitySummary> list);
} }
...@@ -139,5 +139,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM ...@@ -139,5 +139,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
//TODO 推送数据 //TODO 推送数据
} }
@Override
public boolean batchInsert(List<CbQuantitySummary> list) {
int i = baseMapper.batchInsert(list);
return i == list.size();
}
} }
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <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 id="selectSubject" resultType="java.util.Map">
select select
......
...@@ -57,6 +57,14 @@ export function getProjectFileUploadDetail(projectId) { ...@@ -57,6 +57,14 @@ export function getProjectFileUploadDetail(projectId) {
}); });
} }
//根据项目文件导入数据
export function importData(projectId) {
return request({
url: '/cbProjectRecord/importData/'+projectId,
method: 'get',
});
}
//获取草稿箱列表 //获取草稿箱列表
export function getDraftDialogList(projectId) { export function getDraftDialogList(projectId) {
return request({ return request({
...@@ -179,6 +187,16 @@ export const getActualMonthsApi = (params = {}) => request({ ...@@ -179,6 +187,16 @@ export const getActualMonthsApi = (params = {}) => request({
params params
}); });
//批量保存或修改每月措施费
export function saveBatch(data) {
return request({
url: '/cb/cost/measures/saveBatch',
method: 'post',
data:data,
});
}
// 工料汇总 // 工料汇总
...@@ -196,8 +214,8 @@ export const getFeedSummaryMenuTreeApi = (params = {}) => request({ ...@@ -196,8 +214,8 @@ export const getFeedSummaryMenuTreeApi = (params = {}) => request({
/** /**
* 获取已记录月份集合 * 获取已记录月份集合
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
export const getFeedSummaryMonthListApi = (params = {}) => request({ export const getFeedSummaryMonthListApi = (params = {}) => request({
url: "/cb/quantity/summary/monthList", url: "/cb/quantity/summary/monthList",
...@@ -221,6 +239,14 @@ export const getFeedSummaryListApi = (params = {}) => request({ ...@@ -221,6 +239,14 @@ export const getFeedSummaryListApi = (params = {}) => request({
params params
}); });
//工程项目信息
export const getCbProjectInfo = (relatedId) => request({
url: '/cbProjectRecord/getCbProjectInfo/' + relatedId,
method: "get",
});
// 其他项目 // 其他项目
//其他项目左侧菜单 //其他项目左侧菜单
...@@ -234,3 +260,10 @@ export const getProjectOtherStatistics = (relatedId) => request({ ...@@ -234,3 +260,10 @@ export const getProjectOtherStatistics = (relatedId) => request({
url: '/cb/projectOther/statistics/' + relatedId, url: '/cb/projectOther/statistics/' + relatedId,
method: "get", method: "get",
}); });
//其他费用-其他费用列表
export const getProjectOtherList = (params = {}) => request({
url: "/cb/projectOther/list",
method: "get",
params
});
...@@ -44,33 +44,33 @@ ...@@ -44,33 +44,33 @@
</template> </template>
<script> <script>
import InfoTable from '../../../../component/infoTable'; import InfoTable from '../../../../component/infoTable';
import { getCbProjectInfo } from "@/api/projectCostLedger";
export default { export default {
name: "projectInformation", name: "projectInformation",
components: {InfoTable}, components: {InfoTable},
data() { data() {
return { return {
comProjectId:'',
labelWidth: 250, labelWidth: 250,
forInfo: { forInfo: { },
name:'宝安中学(集团)初中部改扩建工程施工总承包(二次公告)',
},
defaultList1: [ defaultList1: [
// { name: '工程名称', prop: 'name', slot: true }, // { name: '工程名称', prop: 'name', slot: true },
{ name: '工程名称', prop: 'name', style: true }, { name: '工程名称', prop: 'projectName', style: true },
{ name: '工程所在地', prop: 'creditNo' }, { name: '工程所在地', prop: 'areaName' },
{ name: '工程详细地址', prop: 'operName' }, { name: '工程详细地址', prop: 'projectAddress' },
{ name: '业态', prop: 'status' }, { name: '业态', prop: 'status' },
{ name: '工程类型', prop: 'startDate' }, { name: '工程类型', prop: 'projectType1' },
{ name: '计价模式(清单/定额)', prop: 'registCapi' }, { name: '计价模式(清单/定额)', prop: 'registCapi' },
{ name: '承包形式(EPC/DB/EP/PC)', prop: 'actualCapi'}, { name: '承包形式(EPC/DB/EP/PC)', prop: 'actualCapi'},
{ name: '合同类型', prop: 'checkDate' }, { name: '合同类型', prop: 'checkDate' },
{ name: '建设单位', prop: 'orgNo' }, { name: '建设单位', prop: 'orgNo' },
{ name: '设计单位', prop: 'regNo' }, { name: '设计单位', prop: 'designOrgName' },
{ name: '勘察单位', prop: 'creditNo' }, { name: '勘察单位', prop: 'creditNo' },
{ name: '监理单位', prop: 'econKind' }, { name: '监理单位', prop: 'supervisorOrgName' },
{ name: '代理公司(或工料测量师)', prop: 'term'}, { name: '代理公司(或工料测量师)', prop: 'term'},
{ name: '招标形式', prop: 'qualification' }, { name: '招标形式', prop: 'qualification' },
{ name: '承包方式', prop: 'provinceCode'}, { name: '承包方式', prop: 'provinceCode'},
{ name: '资金来源', prop: 'belongOrg' }, { name: '资金来源', prop: 'moneySource' },
{ name: '分包标准费用项价格库', prop: 'colleguesNum'}, { name: '分包标准费用项价格库', prop: 'colleguesNum'},
{ name: '材料机械标准费用价格库', prop: 'colleguesNum'}, { name: '材料机械标准费用价格库', prop: 'colleguesNum'},
{ name: '专业类别', prop: 'scope'}, { name: '专业类别', prop: 'scope'},
...@@ -87,9 +87,9 @@ export default { ...@@ -87,9 +87,9 @@ export default {
{ name: '结构类型', prop: 'registCapi' }, { name: '结构类型', prop: 'registCapi' },
{ name: '基础类型', prop: 'actualCapi'}, { name: '基础类型', prop: 'actualCapi'},
{ name: '单体个数', prop: 'checkDate', style: true }, { name: '单体个数', prop: 'checkDate', style: true },
{ name: '地上层数', prop: 'orgNo' }, { name: '地上层数', prop: 'noOfOverfloor' },
{ name: '地下层数', prop: 'regNo' }, { name: '地下层数', prop: 'noOfUnderfloor' },
{ name: '建筑高度', prop: 'creditNo' }, { name: '建筑高度', prop: 'constructHeight' },
{ name: '地下深度', prop: 'econKind' }, { name: '地下深度', prop: 'econKind' },
{ name: '首层(m)', prop: 'term'}, { name: '首层(m)', prop: 'term'},
{ name: '标准层(m)', prop: 'qualification' }, { name: '标准层(m)', prop: 'qualification' },
...@@ -146,9 +146,9 @@ export default { ...@@ -146,9 +146,9 @@ export default {
time:'2023-10-20' time:'2023-10-20'
}, },
defaultListYd4: [ defaultListYd4: [
{ name: '计划开工日期', prop: 'time' }, { name: '计划开工日期', prop: 'planStartDate' },
{ name: '计划竣工日期', prop: 'operName' }, { name: '计划竣工日期', prop: 'planEndDate' },
{ name: '总工期(天)', prop: 'status' }, { name: '总工期(天)', prop: 'contractWorkDays' },
{ name: '缺陷责任', prop: 'startDate' }, { name: '缺陷责任', prop: 'startDate' },
], ],
forInfoYd5:{ forInfoYd5:{
...@@ -191,9 +191,40 @@ export default { ...@@ -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属性 //可访问data属性
created() { created() {
// this.getCbProjectInfo()
}, },
//计算集 //计算集
computed: { computed: {
...@@ -201,7 +232,17 @@ export default { ...@@ -201,7 +232,17 @@ export default {
}, },
//方法集 //方法集
methods: { 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> </script>
......
...@@ -12,23 +12,17 @@ ...@@ -12,23 +12,17 @@
</div> </div>
<div class="profitloss"> <div class="profitloss">
<div class="search"> <div class="search">
<!--<el-date-picker size="small" style="width: 140px"--> <el-select v-model="expenseDate" @change="changetime" style="width: 140px;">
<!--v-model="expenseDate"-->
<!--type="month"-->
<!--placeholder="选择月" @change="changetime"-->
<!--value-format="yyyy-MM"-->
<!--:picker-options="pickerOptions">-->
<!--</el-date-picker>-->
<el-select v-model="expenseDate">
<el-option v-for="item in dateoptions" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in dateoptions" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-button v-if="!isall" type="primary" size="small" @click="addcost">添加实际成本</el-button> <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>
<!--汇总--> <!--汇总-->
<div class="table-item" v-if="isall"> <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 <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> :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="60" align="left" type="index"></el-table-column>
<el-table-column label="名称" width="220" prop="expenseName"> <el-table-column label="名称" width="220" prop="expenseName">
<template slot-scope="scope">{{scope.row.expenseName || '--'}}</template> <template slot-scope="scope">{{scope.row.expenseName || '--'}}</template>
...@@ -47,7 +41,7 @@ ...@@ -47,7 +41,7 @@
<!--单条--> <!--单条-->
<div class="table-item" v-else> <div class="table-item" v-else>
<el-table element-loading-text="Loading" :data="tableData" row-key="id" v-horizontal-scroll="'hover'" default-expand-all <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> :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="60" align="left" type="index" fixed="left"></el-table-column>
<el-table-column label="清单内容" width="130" prop="itemContent" fixed="left"> <el-table-column label="清单内容" width="130" prop="itemContent" fixed="left">
<template slot-scope="scope">{{scope.row.itemContent || '--'}}</template> <template slot-scope="scope">{{scope.row.itemContent || '--'}}</template>
...@@ -96,13 +90,19 @@ ...@@ -96,13 +90,19 @@
</el-table-column> </el-table-column>
<el-table-column label="本月发生成本比例" width="150" prop="monthCostRate"> <el-table-column label="本月发生成本比例" width="150" prop="monthCostRate">
<template slot-scope="scope">{{scope.row.monthCostRate || '--'}}</template> <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>
<el-table-column label="成本合价" width="130" prop="costEffective"> <el-table-column label="成本合价" width="130" prop="costEffective">
<template slot-scope="scope">{{scope.row.costEffective || '--'}}</template> <template slot-scope="scope">{{scope.row.costEffective || '--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="本月工程量" width="130" prop="currentProjectVolume"> <el-table-column label="本月工程量" width="130" prop="currentProjectVolume">
<template slot-scope="scope">{{scope.row.currentProjectVolume || '--'}}</template> <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>
<el-table-column label="截止本月工程量" width="130" prop="currentProjectVolume"> <el-table-column label="截止本月工程量" width="130" prop="currentProjectVolume">
<template slot-scope="scope">{{scope.row.suncurrentProjectVolume || '--'}}</template> <template slot-scope="scope">{{scope.row.suncurrentProjectVolume || '--'}}</template>
...@@ -159,6 +159,27 @@ ...@@ -159,6 +159,27 @@
<div class="btn btn_primary h32" @click="savepro">确定推送</div> <div class="btn btn_primary h32" @click="savepro">确定推送</div>
</div> </div>
</el-dialog> </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>
</div> </div>
...@@ -171,7 +192,7 @@ import { ...@@ -171,7 +192,7 @@ import {
getSummarydata, getSummarydata,
projectVolume, projectVolume,
pushProjectvolume, pushProjectvolume,
getActualMonthsApi getActualMonthsApi,saveBatch
} from '@/api/projectCostLedger'; } from '@/api/projectCostLedger';
import { cloneDeep } from "lodash-es"; import { cloneDeep } from "lodash-es";
...@@ -235,13 +256,13 @@ export default { ...@@ -235,13 +256,13 @@ export default {
dialogVisible: false, dialogVisible: false,
queryParam: {},//推送工程量数据 queryParam: {},//推送工程量数据
dateoptions: [], dateoptions: [],
cbVisible:false,
chooseDate:"",
isinput:false,//是否填写
}; };
}, },
//可访问data属性 //可访问data属性
created() { created() {
// let month = new Date().getMonth() +1
// let year = new Date().getFullYear()
// this.expenseDate = year + (month>= 9? month:'0'+ month)
this.init(this.comProjectId); this.init(this.comProjectId);
}, },
//计算集 //计算集
...@@ -250,27 +271,56 @@ export default { ...@@ -250,27 +271,56 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
tored({column}){
if(column.property=='quantity'){
return 'tored'
}
},
tored1({column}){
let arr = ['submitProjectVolume','suncurrentProjectVolume','currentProjectVolume','costEffective','monthCostRate']
if(arr.includes(column.property)&&this.isinput){
return 'tored'
}
},
async getactualMonths() { async getactualMonths() {
try { try {
const params = { const params = {
projectId: this.comProjectId, projectId: this.comProjectId,
id: this.id id: this.id
}; };
let data = await getActualMonthsApi(params); 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 => { data.forEach(item => {
item.value = item; if(item == thismonth){
item.label = item.substring(1, 4) + '-' + item.substring(5, 6); hasmonth = true
}
let li = {value:item,label:item.substring(0, 4) + '-' + item.substring(4, 6)}
arr.push(li)
}); });
if (data && data.length > 0) { if(!hasmonth){
this.expenseDate = data[0].value; 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) { } catch (error) {
console.log(error);
} }
}, },
async select(menuPath) { async select(menuPath) {
this.id = menuPath; this.id = menuPath;
this.getactualMonths();
// let month = this.expenseDate.replace('-', ""); // let month = this.expenseDate.replace('-', "");
this.getDatas(menuPath)
},
async getDatas(menuPath){
let param = { let param = {
projectId: this.projectId, projectId: this.projectId,
id: this.id, id: this.id,
...@@ -278,22 +328,26 @@ export default { ...@@ -278,22 +328,26 @@ export default {
}; };
if (menuPath == 0) {//费用汇总 if (menuPath == 0) {//费用汇总
this.isall = true; this.isall = true;
const formData = new FormData(); // const formData = new FormData();
formData.append("projectId", this.projectId); // formData.append("projectId", this.projectId);
const res = await getSummarydata(formData); // formData.append("month", this.expenseDate);
this.tableData = res.data; // const res = await getSummarydata(formData);
// this.tableData = res.data;
} else {//各个子项 } else {//各个子项
this.isall = false; this.isall = false;
const res = await getCostMeasureslist(param); // const res = await getCostMeasureslist(param);
this.tableData = res.data; // this.tableData = res.data;
} }
this.getactualMonths(); const res = await getCostMeasureslist(param);
this.tableData = res.data;
this.isinput = false
}, },
async init(detail = '') { async init(detail = '') {
try { try {
const projectId = detail; const projectId = detail;
if (!projectId) return; if (!projectId) return;
await this.getFeedSummaryMenuTree(projectId); await this.getFeedSummaryMenuTree(projectId);
this.getactualMonths();
} catch (error) { } catch (error) {
} }
...@@ -323,7 +377,7 @@ export default { ...@@ -323,7 +377,7 @@ export default {
} }
}, },
changetime(val) { changetime(val) {
this.select(this.id); this.getDatas(this.id)
}, },
//推送工作量 //推送工作量
pushwork(row) { pushwork(row) {
...@@ -360,8 +414,41 @@ export default { ...@@ -360,8 +414,41 @@ export default {
}, },
addcost() { 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)
}
})
},
changeDate(){
let choseDate = this.chooseDate.replace('-','')
let hasdate = false
this.dateoptions.forEach(item=>{
if(item.value == choseDate){
hasdate = true
}
})
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
}
}, },
} }
</script> </script>
...@@ -370,6 +457,9 @@ export default { ...@@ -370,6 +457,9 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
::v-deep .tored{
/*background: rgb(255,236,236) !important;*/
}
.feed-summary-inner { .feed-summary-inner {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="otherProjects-cont"> <div class="otherProjects-cont">
<div class="left"> <div class="left">
<div class="left-side-menu"> <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"> <template slot="其他费-1">
<img src="@/assets/images/projectCostLedger/icon_cost_detail_5.svg" alt=""> <img src="@/assets/images/projectCostLedger/icon_cost_detail_5.svg" alt="">
<div class="project-sub-menu-title-text">其他费</div> <div class="project-sub-menu-title-text">其他费</div>
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
<tables <tables
v-if="!isSkeleton" v-if="!isSkeleton"
:tableLoading="tableLoading" :tableLoading="tableLoading"
:tableData="tableData" :tableData="tableData1"
:forData="forData1" :forData="forData1"
:MaxPage=500 :MaxPage=500
:tableDataTotal="tableDataTotal" :tableDataTotal="tableDataTotal1"
:queryParams="queryParams" :queryParams="queryParams"
@handle-current-change="handleCurrentChange" @handle-current-change="handleCurrentChange"
@sort-change="sortChange" @sort-change="sortChange"
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</div> </div>
<el-dialog :visible.sync="dialogVisible" width="720px" append-to-body class="dialogVisible" title="单位换算"> <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 <el-tab-pane
:key="index" :key="index"
v-for="(item, index) in toggleTabs" v-for="(item, index) in toggleTabs"
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
<el-option v-for="(item,index) in typeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> <el-option v-for="(item,index) in typeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
</el-select> </el-select>
<i class="el-icon-sort icon"></i> <i class="el-icon-sort icon"></i>
<el-select v-model="type1" placeholder="请选择"> <el-select v-model="type2" placeholder="请选择">
<el-option v-for="(item,index) in typeList1" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> <el-option v-for="(item,index) in typeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
</el-select> </el-select>
</div> </div>
<el-table <el-table
...@@ -106,65 +106,54 @@ ...@@ -106,65 +106,54 @@
<script> <script>
import Tables from "../../../../component/Tables" import Tables from "../../../../component/Tables"
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu"; import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getProjectOtherMenuTreeApi,getProjectOtherStatistics } from "@/api/projectCostLedger"; import { getProjectOtherMenuTreeApi,getProjectOtherStatistics,getProjectOtherList } from "@/api/projectCostLedger";
export default { export default {
name: "directCost", name: "directCost",
components: { components: {
Tables,ProjectSideMenu Tables,ProjectSideMenu
}, },
props: { props: {
// // 项目ID // 项目ID
// projectId: { // projectId: {
// type: String, // type: String,
// required: true, // required: true,
// default: "" // default: ""
// }, // },
// // 详情信息 // 详情信息
// projectDetailInfo: { projectDetailInfo: {
// type: Object, type: Object,
// default: () => ({}) default: () => ({})
// } }
}, },
data() { data() {
return { return {
comProjectId:'', comProjectId:'',
isSkeleton:false, isSkeleton:false,
tableLoading:false, tableLoading:false,
tableData:[ tableData:[],
{ tableDataTotal:0,
name:'技术质量管理类',
number:'236',
proportion:'64'
},
{
name:'工程保险类',
number:'336',
proportion:'64'
},
],
forData: [ forData: [
{label: '其他项目费用', prop: 'expenseName'}, {label: '其他项目费用', prop: 'expenseName'},
{label: '数量', prop: 'expenseValue'}, {label: '数量', prop: 'expenseValue'},
{label: '占比', prop: 'proportion', slot: true}, {label: '占比', prop: 'proportion', slot: true},
], ],
forData1: [ forData1: [
{label: '清单内容', prop: 'name',minWidth:'215'}, {label: '清单内容', prop: 'itemContent',minWidth:'220'},
{label: '工作内容、做法/规格型号/施工现场配置说明', prop: 'number',minWidth:'302'}, {label: '工作内容、做法/规格型号/施工现场配置说明', prop: 'workContent',minWidth:'302'},
{label: '单位', prop: 'proportion',minWidth:'215'}, {label: '单位', prop: 'unit',minWidth:'115'},
{label: '不含税单价', prop: 'proportion',minWidth:'215'}, {label: '不含税单价', prop: 'unitPriceExcludingTax',minWidth:'115'},
{label: '不含税合价', prop: 'proportion',minWidth:'215'}, {label: '不含税合价', prop: 'totalPriceExcludeTax',minWidth:'115'},
{label: '税率(%)', prop: 'proportion',minWidth:'215'}, {label: '税率(%)', prop: 'taxRate',minWidth:'115'},
{label: '含税合价', prop: 'proportion',minWidth:'215'}, {label: '含税合价', prop: 'totalPriceIncludingTax',minWidth:'115'},
{label: '税金(元)', prop: 'proportion',minWidth:'215'}, {label: '税金(元)', prop: 'taxAmount',minWidth:'115'},
{label: '成本科目', prop: 'proportion',minWidth:'215'}, {label: '成本科目', prop: 'costSubject',minWidth:'160'},
{label: '税金类型', prop: 'proportion',minWidth:'215'}, {label: '税金类型', prop: 'taxType',minWidth:'115'},
{label: '备注', prop: 'proportion',minWidth:'215'}, {label: '备注', prop: 'remarks',minWidth:'200'},
], ],
queryParams:{ queryParams:{
pageNum:1, pageNum:1,
pageSize:10, pageSize:10,
}, },
tableDataTotal:2,
defaultActive: "费用汇总", defaultActive: "费用汇总",
menuTreeList: [ menuTreeList: [
{ {
...@@ -192,63 +181,69 @@ export default { ...@@ -192,63 +181,69 @@ export default {
value: "type3", value: "type3",
name: "体积", name: "体积",
}, },
// {
// value: "type4",
// name: "质量",
// },
// {
// value: "type5",
// name: "密度",
// },
],
tableData1:[],
tableDataTotal1:0,
type1:'',
type2:'',
typeList:[
{ {
value: "type4", dictLabel:'千米',
name: "质量", dictValue:'千米'
}, },
{ {
value: "type5", dictLabel:'米',
name: "密度", dictValue:'米'
}, },
],
tableData1:[
{ {
cbkm:'标前成本', dictLabel:'分米',
wlyl:'42000KG', dictValue:'分米'
hsyl:'42T'
}, },
{ {
cbkm:'标前成本', dictLabel:'厘米',
wlyl:'42000KG', dictValue:'厘米'
hsyl:'42T'
}, },
{ {
cbkm:'标前成本', dictLabel:'毫米',
wlyl:'42000KG', dictValue:'毫米'
hsyl:'42T'
}, },
{ {
cbkm:'标前成本', dictLabel:'微米',
wlyl:'42000KG', dictValue:'微米'
hsyl:'42T'
}, },
], ],
type1:'',
type2:'',
typeList:[],
typeList1:[],
}; };
}, },
watch: { watch: {
// projectDetailInfo: { projectDetailInfo: {
// handler(newValue) { handler(newValue) {
// this.comProjectDetailInfo = newValue ? newValue : {}; this.comProjectDetailInfo = newValue ? newValue : {};
// // this.init(this.comProjectDetailInfo); this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId)
// }, // this.getProjectOtherStatistics('1762014527685136385')
// deep: true, // this.init(this.comProjectDetailInfo);
// immediate: true },
// }, deep: true,
// projectId: { immediate: true
// handler(newValue) { },
// this.comProjectId = newValue; projectId: {
// }, handler(newValue) {
// immediate: true this.comProjectId = newValue;
// } },
immediate: true
}
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.getProjectOtherMenuTreeApi('1762014527685136385') this.getProjectOtherMenuTreeApi('1762014527685136385')
this.getProjectOtherStatistics('1762014527685136385')
}, },
//计算集 //计算集
computed: { computed: {
...@@ -261,6 +256,7 @@ export default { ...@@ -261,6 +256,7 @@ export default {
const result = await getProjectOtherStatistics(params); const result = await getProjectOtherStatistics(params);
if (result.code == 200) { if (result.code == 200) {
const _dataArray = result.data; const _dataArray = result.data;
this.tableDataTotal=_dataArray.length;
this.tableData = _dataArray; this.tableData = _dataArray;
} }
} catch (error) { } catch (error) {
...@@ -280,9 +276,18 @@ export default { ...@@ -280,9 +276,18 @@ export default {
} }
}, },
open(menuPath, menuPathArray){ select(menuPath, menuPathArray){
console.log(menuPath) console.log(menuPath)
console.log(menuPathArray) 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){ handleCurrentChange(e){
...@@ -293,7 +298,119 @@ export default { ...@@ -293,7 +298,119 @@ export default {
}, },
sortChange(){ 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> </script>
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<!-- 放入组件 v-if current == ‘xxxx’ 详情变量 this.detailInfo 需要深度监听--> <!-- 放入组件 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>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<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>
......
...@@ -70,13 +70,13 @@ ...@@ -70,13 +70,13 @@
<div style="display:flex;align-items:center"> <div style="display:flex;align-items:center">
<el-tooltip placement="top" v-if="scope.row.projectText.length>20"> <el-tooltip placement="top" v-if="scope.row.projectText.length>20">
<div class="renling"> <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.isGetProjectDetail" :to="`/projectCostLedger/detail?projectId=${scope.row.id}`" tag="a"
class="wordprimary" v-html="scope.row.projectName"></router-link> 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> </div>
</el-tooltip> </el-tooltip>
<div class="renling" v-else> <div class="renling" v-else>
<router-link v-if="scope.row.isGetProjectDetail" :to="`/projectCostLedger/detail?projectID=${scope.row.id}`" tag="a" <router-link v-if="scope.row.isGetProjectDetail" :to="`/projectCostLedger/detail?projectId=${scope.row.id}`" tag="a"
class="wordprimary" v-html="scope.row.projectName"></router-link> 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> </div>
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
<script> <script>
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
// import { getDicts } from '@/api/system/dict/data' // 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 { export default {
name: 'upload', name: 'upload',
...@@ -297,7 +297,28 @@ ...@@ -297,7 +297,28 @@
this.visible = true this.visible = true
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
importData(this.formdata.id).then(res=>{
})
this.issub = true 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 { } else {
this.issub = false this.issub = false
} }
......
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