Commit e3d006d9 authored by tianhongyang's avatar tianhongyang

现场经费对接完毕

parent 2c063b4c
...@@ -319,3 +319,49 @@ export const getProjectOtherList = (params = {}) => request({ ...@@ -319,3 +319,49 @@ export const getProjectOtherList = (params = {}) => request({
method: "get", method: "get",
params params
}); });
// 现场经费
/**
* 获取现场经费左侧菜单
* @param {*} params
* @returns
*/
export const getFieldExpensesMenuTreeApi = (projectId) => request({
url: `/cbSceneExpenseChildren/getMenuList/${projectId}`,
method: "get",
params: {}
});
/**
* 获取现场经费统计月份
* @param {*} params
* @returns
*/
export const getFieldExpensesMonthListApi = (params = {}) => request({
url: ``,
method: "get",
params
});
/**
* 获取现场经费列表
* @param {*} params
* @returns
*/
export const getFieldExpensesListApi = (projectId) => request({
url: `/CbProjectExpenseSummary/getCbSceneExpenseSummaryData/${projectId}`,
method: "get",
params: {}
});
/**
* 获取现场经费 除开现场经费汇总之外的列表
* @param {*} params
* @returns
*/
export const getFieldExpensesOtherListApi = (params = {}) => request({
url: `/cbSceneExpenseChildren/getChildrenData`,
method: "get",
params
});
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
<!-- 有自定义插槽 --> <!-- 有自定义插槽 -->
<slot v-if="item.slot" :name="item.prop" :row="scope.row" :data="item" :row-index="scope.$index"> <slot v-if="item.slot" :name="item.prop" :row="scope.row" :data="item" :row-index="scope.$index">
<!-- 默认取值 --> <!-- 默认取值 -->
{{ scope.row[item.prop] ? scope.row[item.prop] : '-' }} {{ checkEmptyStr(scope.row[item.prop]) ? scope.row[item.prop] : '-' }}
</slot> </slot>
<!-- 操作栏 不需要设置slot--> <!-- 操作栏 不需要设置slot-->
<slot v-else-if="item.prop == 'action-field-bar'" name="action-field-bar" :row="scope.row" :data="item" :row-index="scope.$index"></slot> <slot v-else-if="item.prop == 'action-field-bar'" name="action-field-bar" :row="scope.row" :data="item" :row-index="scope.$index"></slot>
<!-- 没有插槽 --> <!-- 没有插槽 -->
<span v-else> <span v-else>
{{ scope.row[item.prop] ? scope.row[item.prop] : '-' }} {{ checkEmptyStr(scope.row[item.prop]) ? scope.row[item.prop] : '-' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -64,8 +64,8 @@ export default { ...@@ -64,8 +64,8 @@ export default {
type: Array, type: Array,
default: () => [] default: () => []
}, },
columIndex : { columIndex: {
type : Number, type: Number,
} }
}, },
watch: { watch: {
...@@ -98,6 +98,12 @@ export default { ...@@ -98,6 +98,12 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
checkEmptyStr(prop) {
if (prop && prop.toString().trim() && prop.toString().trim() != "0") {
return true;
}
return false;
},
flexWidth(len = 0, width = 50, hasQueryParams) { flexWidth(len = 0, width = 50, hasQueryParams) {
if (hasQueryParams) { if (hasQueryParams) {
let currentMax = this.queryParams.pageNum * this.queryParams.pageSize - this.queryParams.pageSize + len; let currentMax = this.queryParams.pageNum * this.queryParams.pageSize - this.queryParams.pageSize + len;
......
...@@ -143,6 +143,7 @@ export default { ...@@ -143,6 +143,7 @@ export default {
comMaxHeight: null, comMaxHeight: null,
hasQueryParams: false, hasQueryParams: false,
comMaxBodyHeight: 0, comMaxBodyHeight: 0,
headerLastBlockHeight: 40,
observer: null, observer: null,
resizeTimer: null resizeTimer: null
}; };
...@@ -168,7 +169,8 @@ export default { ...@@ -168,7 +169,8 @@ export default {
computed: { computed: {
maxBodyFixedStyle() { maxBodyFixedStyle() {
return { return {
"--body-max-height": `${this.comMaxBodyHeight}px` "--body-max-height": `${this.comMaxBodyHeight}px`,
"--header-last-block-height": `${this.headerLastBlockHeight}px`
}; };
} }
}, },
...@@ -233,6 +235,12 @@ export default { ...@@ -233,6 +235,12 @@ export default {
// console.log(bodyMaxHeight, "bodyMaxHeight"); // console.log(bodyMaxHeight, "bodyMaxHeight");
this.comMaxBodyHeight = bodyMaxHeight; this.comMaxBodyHeight = bodyMaxHeight;
} }
// 正常情况下 计算默认header高度
const defaultHeader = this.$el.querySelector(".el-table__header-wrapper");
if (defaultHeader) {
const headerHeight = parseInt(window.getComputedStyle(defaultHeader).height);
this.headerLastBlockHeight = headerHeight;
}
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
...@@ -357,8 +365,10 @@ export default { ...@@ -357,8 +365,10 @@ export default {
display: table-cell !important; display: table-cell !important;
} }
/* header 表头最后一个方块 */
.el-table--border th.gutter:last-of-type { .el-table--border th.gutter:last-of-type {
display: block !important; display: block !important;
height: var(--header-last-block-height) !important;
padding-right: 16px; padding-right: 16px;
} }
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<template v-for="(index, name) in $slots" :slot="name"> <template v-for="(index, name) in $slots" :slot="name">
<slot :name="name" /> <slot :name="name" />
</template> </template>
<template v-for="(index, name) in $scopedSlots" :slot="name" slot-scope="{row,$index}"> <template v-for="(index, name) in $scopedSlots" :slot="name" slot-scope="{row,index}">
<slot :name="name" :data="child" :row="row" :index="$index"></slot> <slot :name="name" :data="child" :row="row" :index="index"></slot>
</template> </template>
</table-list-column> </table-list-column>
</template> </template>
......
...@@ -41,13 +41,18 @@ ...@@ -41,13 +41,18 @@
<template slot="action-field-bar" slot-scope="scope"> <template slot="action-field-bar" slot-scope="scope">
<div class="project-action-field-bar" v-if="scope.row.id != '0'"> <div class="project-action-field-bar" v-if="scope.row.id != '0'">
<span class="push-project">推送工程量</span> <span class="push-project">推送工程量</span>
{{scope}}
</div> </div>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<!-- 本月工程量 --> <!-- 本月工程量 -->
<template slot="quantities" slot-scope="scope"> <template slot="quantities" slot-scope="scope">
<!-- 统计行 -->
<template v-if="scope.rowIndex == '0'">
</template>
<el-form-item v-else-if="addActualCostEditStatus">
</el-form-item>
</template> </template>
</custom-table> </custom-table>
</el-form> </el-form>
...@@ -143,7 +148,7 @@ export default { ...@@ -143,7 +148,7 @@ export default {
total: 0, total: 0,
// 列表表头 // 列表表头
formColum: [ formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: "left", uid: v4() }, { label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: false, uid: v4() },
{ label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4(), slot: true }, { label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4(), slot: true },
{ label: '公司编码', prop: "companyNo", width: "137", uid: v4() }, { label: '公司编码', prop: "companyNo", width: "137", uid: v4() },
{ label: '集团编码', prop: "orgNo", width: "137", uid: v4() }, { label: '集团编码', prop: "orgNo", width: "137", uid: v4() },
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
//计算集 //计算集
computed: { computed: {
checkHasChidren() { checkHasChidren() {
return !!(this.menuItem && this.menuItem?.children && this.menuItem.children.length); return !!(this.menuItem && this.menuItem?.children?.length);
}, },
}, },
//方法集 //方法集
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
<!-- 盈亏分析对比 --> <!-- 盈亏分析对比 -->
<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>
<!-- 现场经费 -->
<field-expenses v-if="current == 'fieldExpenses'" :project-id="projectId" :project-detail-info="detailInfo"></field-expenses>
</div> </div>
</div> </div>
</div> </div>
...@@ -46,6 +48,8 @@ import MeasureItems from "@/views/projectCostLedger/detail/components/MeasureIte ...@@ -46,6 +48,8 @@ import MeasureItems from "@/views/projectCostLedger/detail/components/MeasureIte
import OtherProjects from "@/views/projectCostLedger/detail/components/OtherProjects"; import OtherProjects from "@/views/projectCostLedger/detail/components/OtherProjects";
// 盈亏分析对比 // 盈亏分析对比
import ProfitLoss from "@/views/projectCostLedger/detail/components/ProfitLoss"; import ProfitLoss from "@/views/projectCostLedger/detail/components/ProfitLoss";
// 现场经费
import FieldExpenses from "@/views/projectCostLedger/detail/components/FieldExpenses";
import { v4 } from "uuid"; import { v4 } from "uuid";
import { cloneDeep } from "lodash-es"; import { cloneDeep } from "lodash-es";
import { getProjectDetailApi } from "@/api/projectCostLedger"; import { getProjectDetailApi } from "@/api/projectCostLedger";
...@@ -59,7 +63,8 @@ export default { ...@@ -59,7 +63,8 @@ export default {
DirectCost, DirectCost,
OtherProjects, OtherProjects,
ProfitLoss, ProfitLoss,
MeasureItems MeasureItems,
FieldExpenses
}, },
data() { data() {
return { return {
......
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