168 lines
6.4 KiB
Vue
168 lines
6.4 KiB
Vue
<template>
|
|
<div class="p-2">
|
|
<el-tabs type="border-card" @tab-change="handleTabChange" v-model="activeTab">
|
|
<el-tab-pane v-for="(item, index) in tabList" :key="index" :label="item.label" :name="item.value">
|
|
<el-card shadow="hover">
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
<el-form-item label="计划月份" prop="month">
|
|
<el-date-picker v-model="queryParams.month" type="month" value-format="YYYY-MM" placeholder="请选择计划月份" />
|
|
</el-form-item>
|
|
<el-form-item label="产值类型" prop="valueType">
|
|
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
|
<el-option label="设计" value="1" />
|
|
<el-option label="采购" value="2" />
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-card>
|
|
<el-card shadow="never">
|
|
<el-table v-loading="loading" :data="tableData" v-if="activeTab == '1' || activeTab == '2'">
|
|
<el-table-column label="项目" align="center" prop="projectName" />
|
|
<el-table-column label="累计完工产值" align="center" prop="totalCompletionOutputValue" />
|
|
<el-table-column label="累计结算产值" align="center" prop="totalSettlementOutputValue" />
|
|
<el-table-column label="完工未结算额" align="center" prop="completionUnsettledAmount" />
|
|
<el-table-column label="完工未结算比例" align="center" prop="completionUnsettledRatio" />
|
|
<!-- <el-table-column label="操作" align="center">
|
|
<template #default="scope">
|
|
<el-button type="primary" @click="handleEdit(scope.row)" link icon="Position">联查分包结算</el-button>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table>
|
|
<el-table v-loading="loading" :data="tableData" v-if="activeTab == '3'">
|
|
<el-table-column label="项目" align="center" prop="projectName" />
|
|
<el-table-column label="累计完工产值" align="center" prop="totalCompletionOutputValue" />
|
|
<el-table-column label="分包累计结算产值" align="center" prop="subTotalSettlementOutputValue" />
|
|
<el-table-column label="业主累计结算产值" align="center" prop="ownerTotalSettlementOutputValue" />
|
|
<el-table-column label="差额" align="center" prop="differenceValue" />
|
|
<!-- <el-table-column label="操作" align="center">
|
|
<template #default="scope">
|
|
<el-button type="primary" @click="handleEdit(scope.row)" link icon="Position">联查分包结算</el-button>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table>
|
|
<el-table v-loading="loading" :data="tableData" v-if="activeTab == '4'">
|
|
<el-table-column label="项目" align="center" prop="projectName" />
|
|
<el-table-column label="对甲计划总产值" align="center" prop="ownerTotal" />
|
|
<el-table-column label="对乙计划总产值" align="center" prop="subTotal" />
|
|
<el-table-column label="对甲月计划产值" align="center" prop="ownerPlanTotal" />
|
|
<el-table-column label="对乙月计划产值" align="center" prop="subPlanTotal" />
|
|
<el-table-column label="对甲月实际产值" align="center" prop="ownerActualTotal" />
|
|
<el-table-column label="对乙月实际产值" align="center" prop="subActualTotal" />
|
|
<!-- <el-table-column label="操作" align="center">
|
|
<template #default="scope">
|
|
<el-button type="primary" @click="handleEdit(scope.row)" link icon="Position">联查分包结算</el-button>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table>
|
|
<pagination
|
|
v-show="total > 0"
|
|
:total="total"
|
|
v-model:page="queryParams.pageNum"
|
|
v-model:limit="queryParams.pageSize"
|
|
@pagination="getList"
|
|
/>
|
|
</el-card>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useUserStoreHook } from '@/store/modules/user';
|
|
import { listOutTable, comparisonOfOutputValue, comparisonOfSettlementValue } from '@/api/out/outDesignTableVS/index';
|
|
|
|
import { dayjs } from 'element-plus';
|
|
const userStore = useUserStoreHook();
|
|
const currentProject = computed(() => userStore.selectedProject);
|
|
const activeTab = ref('1');
|
|
const queryParams = ref({
|
|
month: '',
|
|
valueType: '2',
|
|
pageNum: 1,
|
|
pageSize: 10
|
|
});
|
|
const total = ref(0);
|
|
const tableData = ref([]);
|
|
const loading = ref(false);
|
|
|
|
const tabList = [
|
|
{
|
|
value: '2',
|
|
label: '对乙产值和对乙结算'
|
|
},
|
|
{
|
|
value: '3',
|
|
label: '对甲结算和对乙结算'
|
|
},
|
|
{
|
|
value: '1',
|
|
label: '对甲产值和对甲结算'
|
|
},
|
|
{
|
|
value: '4',
|
|
label: '对甲产值和对乙产值'
|
|
}
|
|
];
|
|
|
|
//切换表单
|
|
const handleTabChange = (tab) => {
|
|
activeTab.value = tab;
|
|
|
|
handleQuery();
|
|
};
|
|
|
|
/** 搜索按钮操作 */
|
|
const handleQuery = () => {
|
|
queryParams.value.pageNum = 1;
|
|
getList();
|
|
};
|
|
|
|
/** 重置按钮操作 */
|
|
const resetQuery = () => {
|
|
queryParams.value.month = '';
|
|
queryParams.value.valueType = '';
|
|
handleQuery();
|
|
};
|
|
// 获取列表
|
|
const getList = async () => {
|
|
const params = {
|
|
...queryParams.value,
|
|
projectId: currentProject.value?.id,
|
|
type: activeTab.value
|
|
};
|
|
if (activeTab.value == '4') {
|
|
comparisonOfOutputValue(params).then((res) => {
|
|
if (res.code == 200) {
|
|
tableData.value = res.rows;
|
|
total.value = res.total;
|
|
}
|
|
});
|
|
} else if (activeTab.value == '3') {
|
|
comparisonOfSettlementValue(params).then((res) => {
|
|
if (res.code == 200) {
|
|
tableData.value = res.rows;
|
|
total.value = res.total;
|
|
}
|
|
});
|
|
} else {
|
|
const res = await listOutTable(params);
|
|
if (res.code == 200) {
|
|
tableData.value = res.rows;
|
|
total.value = res.total;
|
|
}
|
|
}
|
|
};
|
|
const handleEdit = (row: any) => {};
|
|
onMounted(() => {
|
|
const currentMonthString = ref(dayjs().format('YYYY-MM'));
|
|
queryParams.value.month = currentMonthString.value;
|
|
getList();
|
|
});
|
|
</script>
|
|
|
|
<style scoped lang="scss"></style>
|