Commit 140663a6 authored by ccc2wdd's avatar ccc2wdd

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

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