Commit 54b92356 authored by danfuman's avatar danfuman

修改

parent 01bd6e20
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
<div class="no-data"> <div class="no-data">
<div class="no-data-box" v-if="show"> <div class="no-data-box" v-if="show">
<img :src="noData" alt="暂未获取无聊数据(每月20号获取)" /> <img :src="noData" alt="暂未获取物料数据(每月20号获取)" />
<span>暂未获取无聊数据(每月20号获取)</span> <span>暂未获取物料数据(每月20号获取)</span>
</div> </div>
</div> </div>
......
<template> <template>
<div class="feed-summary-container"> <div class="feed-summary-container">
<div v-if="!show" class="feed-summary-inner"> <div v-if="!show && tableLoading" class="feed-summary-inner">
<div class="left-side-menu"> <div class="left-side-menu">
<project-side-menu ref="projectSideMenu" :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" <project-side-menu ref="projectSideMenu" :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false"
:default-active="currentNodeName" @select="menuSelect"> :default-active="currentNodeName" @select="menuSelect">
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
<!-- 实体工程材料单位换算 --> <!-- 实体工程材料单位换算 -->
<el-button type="primary" size="medium" class="unit-conversion-btn" v-if="isEntityMaterials">单位换算</el-button> <el-button type="primary" size="medium" class="unit-conversion-btn" v-if="isEntityMaterials">单位换算</el-button>
<!-- 填写实际成本 --> <!-- 填写实际成本 -->
<!--<el-button type="primary" size="medium" class="actual-cost-btn" v-else--> <el-button type="primary" size="medium" class="actual-cost-btn" v-else
<!--@click="addActualCostEditStatus ? saveActualCost() : fillActualCost()">{{addActualCostEditStatus ? '保存成本' : '填写实际成本'}}</el-button>--> @click="addActualCostEditStatus ? saveActualCost() : fillActualCost()">{{addActualCostEditStatus ? '保存成本' : '填写实际成本'}}</el-button>
<!-- 表头设置组件 --> <!-- 表头设置组件 -->
<dsk-table-header-setting :settingList="formColum" @settingChange="settingChange"></dsk-table-header-setting> <dsk-table-header-setting :settingList="formColum" @settingChange="settingChange"></dsk-table-header-setting>
</div> </div>
...@@ -41,11 +41,11 @@ ...@@ -41,11 +41,11 @@
<dsk-skeleton v-if="tableLoading"></dsk-skeleton> <dsk-skeleton v-if="tableLoading"></dsk-skeleton>
<!-- 非实体工程材料列表 --> <!-- 非实体工程材料列表 -->
<el-form :model="dataForm" ref="feedSummaryForm" :show-message="false" v-else-if="!isEntityMaterials" class="feed-summary-form"> <el-form :model="dataForm" ref="feedSummaryForm" :show-message="false" v-else-if="!isEntityMaterials" class="feed-summary-form">
<custom-table :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true" :tableDataTotal="total" :paging="false" <custom-table :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true" :tableDataTotal="total" :paging="false" v-if="total > 0 && !tableLoading"
:header-cell-class-name="headerCellClassName" :cell-class-name="cellClassName"> :header-cell-class-name="headerCellClassName" :cell-class-name="cellClassName">
<template slot="action-field-bar" slot-scope="scope"> <template slot="action-field-bar" slot-scope="scope">
<div class="project-action-field-bar"> <div class="project-action-field-bar">
<span class="push-project-use" @click="pushProjectUse(scope.row)">修改工程量</span> <span class="push-project-use" @click="pushProjectUse(scope.row)" :class="{'is-emty-quantities' : rowHasLastPush(scope.rowIndex)}">修改工程量</span>
</div> </div>
<!--<div class="project-action-field-bar" v-if="rowCanEditInput(scope.rowIndex,hasTarget)">--> <!--<div class="project-action-field-bar" v-if="rowCanEditInput(scope.rowIndex,hasTarget)">-->
<!--<span class="push-project-use" :class="{'is-emty-quantities' : rowHasLastPush(scope.rowIndex)}"--> <!--<span class="push-project-use" :class="{'is-emty-quantities' : rowHasLastPush(scope.rowIndex)}"-->
...@@ -77,10 +77,10 @@ ...@@ -77,10 +77,10 @@
<template slot="pushQuantities" slot-scope="scope"> <template slot="pushQuantities" slot-scope="scope">
{{$decimalFormat(scope.row.pushQuantities)}} {{$decimalFormat(scope.row.pushQuantities)}}
</template> </template>
<!--<template slot="quantities" slot-scope="scope">--> <template slot="actualCombinedPrice" slot-scope="scope">
<!--<div v-if="scope.row.pushQuantities" style="color:#FF204E;">{{$decimalFormat(scope.row.quantities)}}</div>--> <div v-if="scope.row.isActualGreaterThanPlan" style="color:#FF204E;">{{$decimalFormat(scope.row.actualCombinedPrice)}}</div>
<!--<div v-else>{{$decimalFormat(scope.row.quantities)}}</div>--> <div v-else>{{$decimalFormat(scope.row.actualCombinedPrice)}}</div>
<!--</template>--> </template>
<!-- 本月工程量 --> <!-- 本月工程量 -->
<template slot="quantities" slot-scope="scope"> <template slot="quantities" slot-scope="scope">
<!-- 编辑单元格 --> <!-- 编辑单元格 -->
...@@ -148,8 +148,8 @@ ...@@ -148,8 +148,8 @@
<div class="no-data"> <div class="no-data">
<div class="no-data-box" v-if="show"> <div class="no-data-box" v-if="show">
<img :src="noData" alt="暂未获取无聊数据(每月20号获取)" /> <img :src="noData" alt="暂未获取物料数据(每月20号获取)" />
<span>暂未获取无聊数据(每月20号获取)</span> <span>暂未获取物料数据(每月20号获取)</span>
</div> </div>
</div> </div>
...@@ -299,6 +299,7 @@ export default { ...@@ -299,6 +299,7 @@ export default {
{ label: 'IPM本月工程量', prop: "quantities", minWidth: "160", uid: v4(), slot: true }, { label: 'IPM本月工程量', prop: "quantities", minWidth: "160", uid: v4(), slot: true },
{ label: '截止本月工程量', prop: "totalQuantities", minWidth: "160", uid: v4(), slot: true }, { label: '截止本月工程量', prop: "totalQuantities", minWidth: "160", uid: v4(), slot: true },
{ label: '本月采购单价', prop: "purchaseUnitPrice", minWidth: "160", uid: v4(), slot: true }, { label: '本月采购单价', prop: "purchaseUnitPrice", minWidth: "160", uid: v4(), slot: true },
{ label: '合价(不含税)', prop: "actualCombinedPrice", minWidth: "150", uid: v4(), slot: true },
{ label: '填写时间', prop: "createTime", minWidth: "160", uid: v4(), slot: true }, { label: '填写时间', prop: "createTime", minWidth: "160", uid: v4(), slot: true },
] ]
}, },
...@@ -785,6 +786,7 @@ export default { ...@@ -785,6 +786,7 @@ export default {
}, },
// 修改工程用量 // 修改工程用量
pushProjectUse(row) { pushProjectUse(row) {
console.log(row)
if (!row.actualId) return; if (!row.actualId) return;
// 打开推送推送弹窗 // 打开推送推送弹窗
const _temp = { const _temp = {
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
</div> </div>
<div class="no-data"> <div class="no-data">
<div class="no-data-box" v-if="show"> <div class="no-data-box" v-if="show">
<img :src="noData" alt="暂未获取无聊数据(每月20号获取)" /> <img :src="noData" alt="暂未获取物料数据(每月20号获取)" />
<span>暂未获取无聊数据(每月20号获取)</span> <span>暂未获取物料数据(每月20号获取)</span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -19,9 +19,10 @@ ...@@ -19,9 +19,10 @@
<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="addcost">添加实际成本</el-button>
<el-button v-if="!isall && isinput" type="primary" size="small" @click="addinputs">保存</el-button> <el-button v-if="!isall && isinput" type="primary" size="small" @click="addinputs">保存</el-button>
</div> </div>
<dsk-skeleton v-if="tableLoading"></dsk-skeleton>
<!--汇总--> <!--汇总-->
<div class="meafixed-table" v-if="isall"> <div class="meafixed-table" v-if="isall">
<el-table element-loading-text="Loading" :data="tableData" row-key="id" v-horizontal-scroll="'hover'" default-expand-all :max-height="tableHeight" <el-table element-loading-text="Loading" :data="tableData" row-key="id" v-horizontal-scroll="'hover'" default-expand-all :max-height="tableHeight" v-if="tableData.length > 0 &&!tableLoading"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" border highlight-current-row :cell-class-name="tored" :header-cell-class-name="tored" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" border highlight-current-row :cell-class-name="tored" :header-cell-class-name="tored"
:header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"> :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}">
<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>
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
<el-table element-loading-text="Loading" ref="edittable" :data="tableData" row-key="id" <el-table element-loading-text="Loading" ref="edittable" :data="tableData" row-key="id"
:header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"
v-horizontal-scroll="'hover'" :max-height="tableHeight" v-horizontal-scroll="'hover'" :max-height="tableHeight"
v-if="tableData.length > 0 &&!tableLoading"
: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"> :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>
...@@ -196,8 +198,8 @@ ...@@ -196,8 +198,8 @@
</div> </div>
<div class="no-data"> <div class="no-data">
<div class="no-data-box" v-if="show"> <div class="no-data-box" v-if="show">
<img :src="noData" alt="暂未获取无聊数据(每月20号获取)" /> <img :src="noData" alt="暂未获取物料数据(每月20号获取)" />
<span>暂未获取无聊数据(每月20号获取)</span> <span>暂未获取物料数据(每月20号获取)</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -214,7 +216,7 @@ ...@@ -214,7 +216,7 @@
saveBatch saveBatch
} from '@/api/projectCostLedger' } from '@/api/projectCostLedger'
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
import DskSkeleton from "@/components/DskSkeleton";
export default { export default {
name: "MeasureItems", name: "MeasureItems",
props: { props: {
...@@ -245,11 +247,14 @@ ...@@ -245,11 +247,14 @@
} }
}, },
components: { components: {
ProjectSideMenu ProjectSideMenu,
DskSkeleton
}, },
data() { data() {
return { return {
noData: require("@/assets/images/detail/noData.png"), noData: require("@/assets/images/detail/noData.png"),
// 加载数据列表
tableLoading: true,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
let istrue = true; let istrue = true;
...@@ -300,15 +305,14 @@ ...@@ -300,15 +305,14 @@
//方法集 //方法集
methods: { methods: {
projectValue(){ projectValue(){
console.log(this.tableData,"|||||||") // for(var i=0; i<this.tableData.length; i++){
for(var i=0; i<this.tableData.length; i++){ // let value=0
let value=0 // for(var j=0; j<this.tableData[i].children.length; j++){
for(var j=0; j<this.tableData[i].children.length; j++){ // value+=Number(this.tableData[i].children[j].projectVolume)
value+=Number(this.tableData[i].children[j].projectVolume) // }
} // this.tableData[i].projectVolume=value
this.tableData[i].projectVolume=value // console.log(value)
console.log(value) // }
}
}, },
async getHeight(list){ async getHeight(list){
this.nowheight = new ResizeObserver(entries => { this.nowheight = new ResizeObserver(entries => {
...@@ -407,32 +411,39 @@ ...@@ -407,32 +411,39 @@
this.getDatas(menuPath) this.getDatas(menuPath)
}, },
async getDatas(menuPath){ async getDatas(menuPath){
let param = { try {
projectId: this.projectId, let param = {
id: this.id, projectId: this.projectId,
month: this.expenseDate id: this.id,
}; month: this.expenseDate
if (menuPath == 0) {//费用汇总 };
this.isall = true; this.tableLoading = true;
// const formData = new FormData(); if (menuPath == 0) {//费用汇总
// formData.append("projectId", this.projectId); this.isall = true;
// formData.append("month", this.expenseDate); // const formData = new FormData();
// const res = await getSummarydata(formData); // formData.append("projectId", this.projectId);
// this.tableData = res.data; // formData.append("month", this.expenseDate);
} else {//各个子项 // const res = await getSummarydata(formData);
this.isall = false; // this.tableData = res.data;
// const res = await getCostMeasureslist(param); } else {//各个子项
// this.tableData = res.data; this.isall = false;
// const res = await getCostMeasureslist(param);
// this.tableData = res.data;
}
const res = await getCostMeasureslist(param);
this.tableData = res.data;
this.isinput = false
// await this.$nextTick()
this.$nextTick(()=>{
setTimeout(()=>{
this.getGDT()
},500)
})
} catch (error) {
console.log(error);
} finally {
this.tableLoading = false;
} }
const res = await getCostMeasureslist(param);
this.tableData = res.data;
this.isinput = false
// await this.$nextTick()
this.$nextTick(()=>{
setTimeout(()=>{
this.getGDT()
},500)
})
}, },
async init(detail = '') { async init(detail = '') {
try { try {
...@@ -442,6 +453,8 @@ ...@@ -442,6 +453,8 @@
this.getactualMonths(); this.getactualMonths();
} catch (error) { } catch (error) {
} finally {
this.tableLoading = false;
} }
}, },
async getFeedSummaryMenuTree(params) { async getFeedSummaryMenuTree(params) {
...@@ -520,9 +533,6 @@ ...@@ -520,9 +533,6 @@
item.month = this.expenseDate item.month = this.expenseDate
item.monthCostRate = item.monthCostRate?parseInt(item.monthCostRate.replace('%','')):null item.monthCostRate = item.monthCostRate?parseInt(item.monthCostRate.replace('%','')):null
}) })
console.log(tables,"|||||")
saveBatch(JSON.stringify(tables)).then(res=>{ saveBatch(JSON.stringify(tables)).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.$message.success(res.msg) this.$message.success(res.msg)
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
> >
</el-date-picker> </el-date-picker>
</div> </div>
<dsk-skeleton v-if="tableLoading"></dsk-skeleton>
<div class="table-item"> <div class="table-item">
<el-table <el-table
element-loading-text="Loading" element-loading-text="Loading"
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
default-expand-all default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
border border
v-if="!tableLoading"
highlight-current-row highlight-current-row
:max-height="tableHeight" :max-height="tableHeight"
> >
...@@ -81,8 +83,8 @@ ...@@ -81,8 +83,8 @@
</div> </div>
<div class="no-data"> <div class="no-data">
<div class="no-data-box" v-if="show"> <div class="no-data-box" v-if="show">
<img :src="noData" alt="暂未获取无聊数据(每月20号获取)" /> <img :src="noData" alt="暂未获取物料数据(每月20号获取)" />
<span>暂未获取无聊数据(每月20号获取)</span> <span>暂未获取物料数据(每月20号获取)</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -90,7 +92,7 @@ ...@@ -90,7 +92,7 @@
<script> <script>
import ProjectSideMenu from '@/views/projectCostLedger/detail/components/ProjectSideMenu' import ProjectSideMenu from '@/views/projectCostLedger/detail/components/ProjectSideMenu'
import { getAnalysislist, getProfitLossMenuTreeApi } from '@/api/projectCostLedger' import { getAnalysislist, getProfitLossMenuTreeApi } from '@/api/projectCostLedger'
import DskSkeleton from "@/components/DskSkeleton";
export default { export default {
name: "orifitloss", name: "orifitloss",
props: { props: {
...@@ -123,10 +125,13 @@ ...@@ -123,10 +125,13 @@
} }
}, },
components: { components: {
ProjectSideMenu ProjectSideMenu,
DskSkeleton
}, },
data() { data() {
return { return {
// 加载数据列表
tableLoading: true,
noData: require("@/assets/images/detail/noData.png"), noData: require("@/assets/images/detail/noData.png"),
pickerOptions: { pickerOptions: {
// disabledDate(time) { // disabledDate(time) {
...@@ -171,15 +176,22 @@ ...@@ -171,15 +176,22 @@
return str return str
}, },
select(menuPath){ select(menuPath){
this.id = menuPath try {
this.defaultActive = menuPath this.tableLoading = true;
let param = { this.id = menuPath
id:this.id, this.defaultActive = menuPath
expenseDate:this.expenseDate let param = {
id:this.id,
expenseDate:this.expenseDate
}
getAnalysislist(param).then(res=>{
this.tableData = res.data
})
} catch (error) {
} finally {
this.tableLoading = false;
} }
getAnalysislist(param).then(res=>{
this.tableData = res.data
})
}, },
async init(detail = {}) { async init(detail = {}) {
try { try {
...@@ -192,6 +204,8 @@ ...@@ -192,6 +204,8 @@
}); });
} catch (error) { } catch (error) {
} finally {
this.tableLoading = false;
} }
}, },
async getFeedSummaryMenuTree(params) { async getFeedSummaryMenuTree(params) {
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
</el-table-column> </el-table-column>
<el-table-column label="项目状态" prop="customerCode" width="100" :resizable="false"> <el-table-column label="项目状态" prop="customerCode" width="100" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.cbStage ===3">--</span> <span v-if="scope.row.cbStage ===3 || scope.row.cbStage ==='3'">--</span>
<template v-else v-for="item in ztStagelist"> <template v-else v-for="item in ztStagelist">
<template v-if="item.dictValue == scope.row.projectFileStatus"> <template v-if="item.dictValue == scope.row.projectFileStatus">
<span class="zts" :class="'zt'+scope.row.projectFileStatus">{{item.dictLabel}}</span> <span class="zts" :class="'zt'+scope.row.projectFileStatus">{{item.dictLabel}}</span>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<div v-else class="renling">{{scope.row.projectFileName||"--"}}</div> <div v-else class="renling">{{scope.row.projectFileName||"--"}}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成本阶段" prop="customerCode" width="90" :resizable="false"> <el-table-column label="成本阶段" prop="customerCode" width="110" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-for="item in cbStagelist"> <template v-for="item in cbStagelist">
<template v-if="item.dictValue == scope.row.cbStage">{{item.dictLabel}}</template> <template v-if="item.dictValue == scope.row.cbStage">{{item.dictLabel}}</template>
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
<span>{{scope.row.projectName||'--'}}</span> <span>{{scope.row.projectName||'--'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成本阶段" width="105px"> <el-table-column label="成本阶段" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item,index) in cbStagelist" :key="index+11"> <div v-for="(item,index) in cbStagelist" :key="index+11">
<span v-if="scope.row.cbStage == item.dictValue">{{item.dictLabel}}</span> <span v-if="scope.row.cbStage == item.dictValue">{{item.dictLabel}}</span>
......
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