Commit 140663a6 authored by ccc2wdd's avatar ccc2wdd

工程项目投资计划完成情况填报,数据填报周期

parent 61eb75a4
......@@ -15,6 +15,7 @@
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { setCycel } from '@/api/project/performance';
import moment from 'moment/moment';
const props = defineProps({
userData: { type: Object },
......@@ -31,6 +32,7 @@
component: 'DatePicker',
componentProps: {
placeholder: '年份',
defaultValue: moment().format('YYYY'),
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
......@@ -45,12 +47,8 @@
},
});
const cycleData = ref({
beginTime: '2024-07-01',
endTime: '2024-09-02',
fillCycle: '2026',
isEdit: '0',
deptNum: 8,
noNum: 6,
planType: '',
});
const [register, { closeModal }] = useModalInner((data) => {
cycleData.value = data.data;
......
......@@ -204,9 +204,11 @@ export const searchFormSchema: FormSchema[] = [
{ label: '自投', value: '自投' },
{ label: '代建', value: '代建' },
{ label: '承建', value: '承建' },
{ label: '储备', value: '储备' },
],
placeholder: '类型',
},
ifShow: false,
colProps: { span: 4 },
},
{
......
......@@ -46,10 +46,11 @@
},
];
const getTitle = ref('');
const params = ref({ mothCycle: '' });
const params = ref({ mothCycle: '', planType: '' });
const [register, { closeModal }] = useModalInner(async (data) => {
params.value.mothCycle = data.data.fillCycle;
params.value.planType = data.data.planType;
dataSource.value = await getFillComDetails(params.value);
});
</script>
......
......@@ -78,8 +78,20 @@
</div>
<div>
<BasicTable @register="registerTable" :title="'工程项目投资计划完成情况填报'">
<template #tabSlot>
<div>
<Tabs v-model:activeKey="planType" size="large" @change="clickTab">
<a-tab-pane key="自投" tab="自投" />
<a-tab-pane key="代建" tab="代建" />
<a-tab-pane key="承建" tab="承建" />
<a-tab-pane key="储备" tab="储备" />
</Tabs>
</div>
</template>
<template #toolbar>
<a-button class="btn" type="primary" @click="handleCreate"> 新建完成情况 </a-button>
<a-button class="btn" type="primary" @click="handleCreate(planType)">
{{ '新建完成情况' + '(' + planType + ')' }}
</a-button>
</template>
<template #bodyCell="{ column, text, record, index }">
<!-- 当前列是序号列时,显示序号 -->
......@@ -117,10 +129,10 @@
},
},
{
label: '审核',
label: '上报',
color: 'success',
popConfirm: {
title: '是否确认审核',
title: '是否确认上报',
placement: 'left',
confirm: examine.bind(null, record, true),
},
......@@ -157,7 +169,7 @@
import { useModal } from '@/components/Modal';
import { useRouter } from 'vue-router';
import performanceModel from './performanceModel.vue';
import { Col, Divider, Row, Tag } from 'ant-design-vue';
import { Col, Tabs, Divider, Row, Tag } from 'ant-design-vue';
import { onMounted, ref } from 'vue';
import { getDepartmentList } from '@/api/project/settlementManage';
import { useMessage } from '@/hooks/web/useMessage';
......@@ -171,7 +183,7 @@
const [registerCycleModel, { openModal: openCycleModel }] = useModal();
const [registerFillDetail, { openModal: openFillDetailModel }] = useModal();
defineOptions({ name: 'Performance' });
const [registerTable, { reload }] = useTable({
const [registerTable, { reload, getForm }] = useTable({
api: getListByPage,
title: '工程项目投资计划完成情况',
columns,
......@@ -198,9 +210,10 @@
fillCycle: '2020年第一季度',
isEdit: '0',
deptNum: 12,
planType: '',
noNum: 6,
});
const planType = ref('自投');
function handleEdit(record: Recordable, disabled: number) {
console.log(record);
push({
......@@ -234,9 +247,9 @@
reload();
}
function handleCreate() {
function handleCreate(planType) {
openModal(true, {
data: '2023',
data: ['year'],
});
}
function handleNew(e) {
......@@ -282,10 +295,12 @@
function selectCycle() {
openCycleModel(true, {
data: mothCycle.value,
planType: planType.value,
});
}
function returnEdit() {
mothCycle.value.planType = planType.value;
if (mothCycle.value.isEdit == '1') {
mothCycle.value.isEdit = '0';
setEditStatus(mothCycle.value);
......@@ -297,7 +312,19 @@
}
async function getSetCycle() {
mothCycle.value = await getCycel();
mothCycle.value = await getCycel({ planType: planType.value });
}
async function clickTab(value) {
planType.value = value;
getForm()
.setFieldsValue({
planType: value,
})
.then(() => {
reload();
getSetCycle();
});
}
</script>
<style scoped lang="less">
......
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