提交
This commit is contained in:
@ -1,44 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<el-tabs type="border-card" @tab-change="handleTabChange" v-model="activeTab">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<el-tab-pane v-for="(item, index) in tabList" :key="index" :label="item.label" :name="item.value">
|
||||||
<el-card shadow="hover">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-form-item label="计划月份" prop="month">
|
<el-card shadow="hover">
|
||||||
<el-date-picker v-model="queryParams.month" type="month" value-format="YYYY-MM" placeholder="请选择计划月份" />
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
</el-form-item>
|
<el-form-item label="计划月份" prop="month">
|
||||||
<el-form-item label="产值类型" prop="valueType">
|
<el-date-picker v-model="queryParams.month" type="month" value-format="YYYY-MM" placeholder="请选择计划月份" />
|
||||||
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
</el-form-item>
|
||||||
<el-option label="设计" value="1" />
|
<el-form-item label="产值类型" prop="valueType">
|
||||||
<el-option label="采购" value="2" />
|
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
||||||
</el-select>
|
<el-option label="设计" value="1" />
|
||||||
</el-form-item>
|
<el-option label="采购" value="2" />
|
||||||
<el-form-item>
|
</el-select>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
</el-form-item>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-form-item>
|
||||||
</el-form-item>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
</el-form>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
</el-card>
|
</el-form-item>
|
||||||
</div>
|
</el-form>
|
||||||
</transition>
|
</el-card>
|
||||||
<el-card shadow="never">
|
</div>
|
||||||
<template #header>
|
</transition>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-card shadow="never">
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<template #header>
|
||||||
</el-row>
|
<el-row :gutter="10" class="mb8">
|
||||||
</template>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="valueAllocationList">
|
<el-table v-loading="loading" :data="valueAllocationList">
|
||||||
<el-table-column label="项目" align="center" prop="projectName" />
|
<el-table-column label="项目" align="center" prop="projectName" />
|
||||||
<el-table-column label="月预计产值" align="center" prop="monthEstimatedValue" />
|
<el-table-column label="月预计产值" align="center" prop="monthEstimatedValue" />
|
||||||
<el-table-column label="完成产值月合计" align="center" prop="monthCompletionValue" />
|
<el-table-column label="完成产值月合计" align="center" prop="monthCompletionValue" />
|
||||||
<el-table-column label="产值差额" align="center" prop="valueDifference" />
|
<el-table-column label="产值差额" align="center" prop="valueDifference" />
|
||||||
<el-table-column label="项目总产值" align="center" prop="totalValue" />
|
<el-table-column label="项目总产值" align="center" prop="totalValue" />
|
||||||
<el-table-column label="累计完成产值" align="center" prop="accumulatedCompletionValue" />
|
<el-table-column label="累计完成产值" align="center" prop="accumulatedCompletionValue" />
|
||||||
<el-table-column label="项目完成率" align="center" prop="projectCompletionRate" />
|
<el-table-column label="项目完成率" align="center" prop="projectCompletionRate" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination
|
||||||
</el-card>
|
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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -66,8 +76,23 @@ const data = reactive({
|
|||||||
month: undefined
|
month: undefined
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const activeTab = ref('1');
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
const tabList = [
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '对甲采购设计报表'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '对乙采购设计报表'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const handleTabChange = (tab) => {
|
||||||
|
activeTab.value = tab;
|
||||||
|
data.queryParams.valueType = '1';
|
||||||
|
data.queryParams.month = '';
|
||||||
|
};
|
||||||
|
|
||||||
/** 查询项目总产值分配列表 */
|
/** 查询项目总产值分配列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<el-tabs type="border-card" @tab-change="handleTabChange" v-model="activeTab">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<el-tab-pane v-for="(item, index) in tabList" :key="index" :label="item.label" :name="item.value">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="计划月份" prop="month">
|
<el-form-item label="计划月份" prop="month">
|
||||||
@ -9,7 +9,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产值类型" prop="valueType">
|
<el-form-item label="产值类型" prop="valueType">
|
||||||
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
||||||
<el-option v-for="item in out_value_type" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option label="设计" value="1" />
|
||||||
|
<el-option label="采购" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -18,68 +19,74 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
<el-card shadow="never">
|
||||||
</transition>
|
<el-table v-loading="loading" :data="tableData">
|
||||||
<el-card shadow="never">
|
<el-table-column label="项目" align="center" prop="projectName" />
|
||||||
<template #header>
|
<el-table-column label="累计完工产值" align="center" prop="totalCompletionOutputValue" />
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-table-column label="分包结算金额" align="center" prop="subTotalSettlementOutputValue" />
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<el-table-column label="业主结算金额" align="center" prop="ownerTotalSettlementOutputValue" />
|
||||||
</el-row>
|
<el-table-column label="业主结算-分包结算" align="center" prop="differenceValue" />
|
||||||
</template>
|
<el-table-column label="操作" align="center">
|
||||||
|
<template #default="scope">
|
||||||
<el-table v-loading="loading" :data="valueAllocationList">
|
<el-button type="primary" @click="handleEdit(scope.row)" link icon="Position">联查分包结算</el-button>
|
||||||
<el-table-column label="项目" align="center" prop="projectName" />
|
</template>
|
||||||
<el-table-column label="累计完工产值" align="center" prop="totalCompletionOutputValue" />
|
</el-table-column>
|
||||||
<el-table-column label="累计结算产值" align="center" prop="totalSettlementOutputValue" />
|
</el-table>
|
||||||
<el-table-column label="完工未结算额" align="center" prop="completionUnsettledAmount" />
|
<pagination
|
||||||
<el-table-column label="完工未结算比例" align="center" prop="completionUnsettledRatio" />
|
v-show="total > 0"
|
||||||
<el-table-column label="操作" align="center">
|
:total="total"
|
||||||
<template #default="scope">
|
v-model:page="queryParams.pageNum"
|
||||||
<el-button type="primary" @click="handleEdit(scope.row)" link icon="Position">联查分包结算</el-button>
|
v-model:limit="queryParams.pageSize"
|
||||||
</template>
|
@pagination="getList"
|
||||||
</el-table-column>
|
/>
|
||||||
</el-table>
|
</el-card>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
</el-tab-pane>
|
||||||
</el-card>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="ValueAllocation" lang="ts">
|
<script setup lang="ts">
|
||||||
import { listOutTable } from '@/api/out/outDesignTableVS';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import { dayjs } from 'element-plus';
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
const valueAllocationList = ref([]);
|
const activeTab = ref('1');
|
||||||
const loading = ref(true);
|
const queryParams = ref({
|
||||||
const showSearch = ref(true);
|
month: '',
|
||||||
const total = ref(0);
|
valueType: '1',
|
||||||
const { out_value_type } = toRefs<any>(proxy?.useDict('out_value_type'));
|
|
||||||
|
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
pageNum: 1,
|
||||||
const data = reactive({
|
pageSize: 10
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
valueType: '1',
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
month: undefined
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
const total = ref(0);
|
||||||
|
const tableData = ref([]);
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const tabList = [
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '对乙产值和对乙结算'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '对甲产值和对乙结算'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
label: '对甲产值和对甲结算'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '4',
|
||||||
|
label: '对甲产值和对乙产值'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
/** 查询项目总产值分配列表 */
|
//切换表单
|
||||||
const getList = async () => {
|
const handleTabChange = (tab) => {
|
||||||
loading.value = true;
|
activeTab.value = tab;
|
||||||
|
queryParams.value.month = '';
|
||||||
|
queryParams.value.valueType = '';
|
||||||
|
|
||||||
const res = await listOutTable(queryParams.value);
|
handleQuery();
|
||||||
valueAllocationList.value = res.rows;
|
|
||||||
total.value = res.total;
|
|
||||||
loading.value = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -88,45 +95,23 @@ const handleQuery = () => {
|
|||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 联查分包结算 */
|
|
||||||
const handleEdit = (row: any) => {
|
|
||||||
proxy?.$tab.openPage('/out/settlementValueSubcontract');
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
queryFormRef.value?.resetFields();
|
queryParams.value.month = '';
|
||||||
|
queryParams.value.valueType = '';
|
||||||
|
|
||||||
handleQuery();
|
handleQuery();
|
||||||
};
|
};
|
||||||
|
// 获取列表
|
||||||
/** 导出按钮操作 */
|
const getList = async () => {
|
||||||
const handleExport = () => {
|
const params = {
|
||||||
proxy?.download(
|
...queryParams.value,
|
||||||
'out/valueAllocation/export',
|
projectId: currentProject.value?.id,
|
||||||
{
|
activeTab: activeTab.value
|
||||||
...queryParams.value
|
};
|
||||||
},
|
console.log(params);
|
||||||
`valueAllocation_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
const handleEdit = (row: any) => {};
|
||||||
onMounted(() => {
|
|
||||||
// 也可以使用字符串格式(例如 YYYY-MM)
|
|
||||||
const currentMonthString = ref(dayjs().format('YYYY-MM'));
|
|
||||||
queryParams.value.month = currentMonthString.value;
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
|
|
||||||
//监听项目id刷新数据
|
|
||||||
const listeningProject = watch(
|
|
||||||
() => currentProject.value?.id,
|
|
||||||
(nid, oid) => {
|
|
||||||
queryParams.value.projectId = nid;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
listeningProject();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
|
Reference in New Issue
Block a user