Commit df17fecb authored by 小费同学阿's avatar 小费同学阿 💬

月计划、计划完成情况主模块注释

parent f976a9a8
<!--月度工程资金计划主模块页面-->
<template> <template>
<div> <div>
<BasicTable @register="registerTable" :title="'月度工程资金计划'"> <BasicTable @register="registerTable" :title="'月度工程资金计划'">
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
</template> </template>
<!-- 其他列正常显示 --> <!-- 其他列正常显示 -->
<span v-else>{{ text }}</span> <span v-else>{{ text }}</span>
<!--操作栏-->
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<TableAction <TableAction
:actions="[ :actions="[
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<!-- 点击新建后的选择填报周期的弹窗 -->
<yearModal @register="register" @close="handleNew" /> <yearModal @register="register" @close="handleNew" />
</div> </div>
</template> </template>
...@@ -79,9 +81,6 @@ ...@@ -79,9 +81,6 @@
import { columns, searchFormSchema } from './data'; import { columns, searchFormSchema } from './data';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const { error } = createMessage;
defineOptions({ name: 'MonthlyPlan' });
import yearModal from '@/components/yearModal.vue'; import yearModal from '@/components/yearModal.vue';
...@@ -90,6 +89,11 @@ ...@@ -90,6 +89,11 @@
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { getDepartmentList } from '@/api/project/settlementManage'; import { getDepartmentList } from '@/api/project/settlementManage';
const { createMessage } = useMessage();
const { error } = createMessage;
defineOptions({ name: 'MonthlyPlan' });
const { push } = useRouter(); const { push } = useRouter();
const [register, { openModal: openModal, closeModal: closeModal }] = useModal(); const [register, { openModal: openModal, closeModal: closeModal }] = useModal();
...@@ -118,7 +122,7 @@ ...@@ -118,7 +122,7 @@
const data = await getDepartmentList(); const data = await getDepartmentList();
searchFormSchema[1].componentProps.options = data; searchFormSchema[1].componentProps.options = data;
}); });
/*编辑按钮跳编辑页面*/
function handleEdit(record: Recordable, disabled: number) { function handleEdit(record: Recordable, disabled: number) {
push({ push({
path: '/monthlyPlan/monthlyPlanEdit', path: '/monthlyPlan/monthlyPlanEdit',
...@@ -128,7 +132,7 @@ ...@@ -128,7 +132,7 @@
}, },
}); });
} }
/*审核按钮的小弹窗*/
function handleDelete(record: Recordable) { function handleDelete(record: Recordable) {
deleteItem({ id: record.id }); deleteItem({ id: record.id });
reload(); reload();
...@@ -138,6 +142,7 @@ ...@@ -138,6 +142,7 @@
reload(); reload();
} }
/*审核按钮的小弹窗*/
async function examine(record: Recordable, disabled: boolean) { async function examine(record: Recordable, disabled: boolean) {
const id = record.id; const id = record.id;
const res = await auditItem({ id }); const res = await auditItem({ id });
...@@ -150,6 +155,7 @@ ...@@ -150,6 +155,7 @@
}); });
}; };
/*新建月度工程资金计划*/
async function handleNew(e) { async function handleNew(e) {
let res = await selectCount(e); let res = await selectCount(e);
if (res == true) { if (res == true) {
......
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
:contentBackground="false" :contentBackground="false"
headerSticky headerSticky
> >
<!-- page页的右上角操作(提交和返回)按钮 -->
<template #extra> <template #extra>
<!-- <a-button type="primary" danger> 删除 </a-button>-->
<a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button> <a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button>
<a-button type="default" @click="router.back()"> 返回 </a-button> <a-button type="default" @click="router.back()"> 返回 </a-button>
</template> </template>
<!-- page页 -->
<PageCard v-for="(item, index) in tabsFormSchema" :key="index" :title="item.name"> <PageCard v-for="(item, index) in tabsFormSchema" :key="index" :title="item.name">
<!-- 右上角的删除按钮 -->
<template #right> <template #right>
<a-button <a-button
v-if="!disabled" v-if="!disabled"
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
/> />
</template> </template>
<BasicForm :loading="loading" @register="item.Form[0]" /> <BasicForm :loading="loading" @register="item.Form[0]" />
<!-- 左上角为项目名 -->
<PageCard <PageCard
v-for="(content, key) in item.list" v-for="(content, key) in item.list"
:key="key" :key="key"
...@@ -32,7 +34,7 @@ ...@@ -32,7 +34,7 @@
<BasicForm :loading="loading" @register="content.form" /> <BasicForm :loading="loading" @register="content.form" />
</PageCard> </PageCard>
</PageCard> </PageCard>
<!--导入或新增按钮-->
<a-button type="dashed" @click="add" preIcon="ei:plus" v-if="!disabled"> <a-button type="dashed" @click="add" preIcon="ei:plus" v-if="!disabled">
从合同中导入 从合同中导入
</a-button> </a-button>
...@@ -40,12 +42,14 @@ ...@@ -40,12 +42,14 @@
<a-button type="dashed" @click="handleAdd" class="ml-2" preIcon="ei:plus" v-if="!disabled"> <a-button type="dashed" @click="handleAdd" class="ml-2" preIcon="ei:plus" v-if="!disabled">
新建合同 新建合同
</a-button> </a-button>
<!-- 新建合同的抽屉-->
<contractDrawer @register="registerDrawer" @success="handleSuccess" /> <contractDrawer @register="registerDrawer" @success="handleSuccess" />
<!-- 选择合同导入的弹窗-->
<projectlibraryModel @register="register" @close="handleNewData" /> <projectlibraryModel @register="register" @close="handleNewData" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { unref, computed, onMounted, ref, reactive, nextTick } from 'vue'; import { unref, onMounted, ref, reactive, nextTick } from 'vue';
import projectlibraryModel from '@/components/ContractModel/Contract.vue'; import projectlibraryModel from '@/components/ContractModel/Contract.vue';
import { useDrawer } from '@/components/Drawer'; import { useDrawer } from '@/components/Drawer';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
...@@ -55,7 +59,7 @@ ...@@ -55,7 +59,7 @@
import { formSchema, subFormSchema } from './tableData'; import { formSchema, subFormSchema } from './tableData';
import { deepMerge } from '@/utils'; import { deepMerge } from '@/utils';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { addItem, updateItem, getItem, Itemdelete } from '@/api/project/monthlyPlan'; import { addItem, updateItem, getItem } from '@/api/project/monthlyPlan';
import { editModel } from '@/api/project/model/monthlyPlanModel'; import { editModel } from '@/api/project/model/monthlyPlanModel';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import { router } from '@/router'; import { router } from '@/router';
...@@ -176,9 +180,7 @@ ...@@ -176,9 +180,7 @@
}); });
} }
} }
/*** /* 往表单page页里带入新建合同的数据*/
*
*/
async function handleNew(info: any) { async function handleNew(info: any) {
let item = {}; let item = {};
let res = tabsFormSchema.filter((item) => item.projectId == info.projectId); let res = tabsFormSchema.filter((item) => item.projectId == info.projectId);
...@@ -239,33 +241,27 @@ ...@@ -239,33 +241,27 @@
setFieldsValue(record); setFieldsValue(record);
}); });
} }
/*新建合同*/
async function handleAdd() { async function handleAdd() {
openDrawer(true, { openDrawer(true, {
isUpdate: false, isUpdate: false,
}); });
} }
/*删除表单*/
async function deleteItem(index: any) { async function deleteItem(index: any) {
// loadingRef.value = true;
// const id = formData.value.engineerConList[index].id;
// if (id) {
// await Itemdelete({
// id,
// });
// formData.value.engineerConList.splice(index, 1);
// tabsFormSchema.splice(index, 1);
// loadingRef.value = false;
// } else {
formData.value.engineerConList.splice(index, 1); formData.value.engineerConList.splice(index, 1);
tabsFormSchema.splice(index, 1); tabsFormSchema.splice(index, 1);
loadingRef.value = false; loadingRef.value = false;
// } // }
} }
/*获取表单数据(用于提交表单用)*/
async function getFormData(form: any) { async function getFormData(form: any) {
const { validate, getFieldsValue } = form; const { validate, getFieldsValue } = form;
await validate(); await validate();
let res = getFieldsValue(); let res = getFieldsValue();
return res; return res;
} }
/*提交表单*/
async function handleSubmit() { async function handleSubmit() {
loadingRef.value = true; loadingRef.value = true;
try { try {
......
import { optionsListApi } from '@/api/demo/select'; import { FormSchema, BasicColumn } from '@/components/Table';
import { FormProps, FormSchema, BasicColumn } from '@/components/Table';
import { VxeFormItemProps, VxeGridPropTypes } from '@/components/VxeTable';
import { ref } from 'vue';
import { Input } from 'ant-design-vue'; import { Input } from 'ant-design-vue';
export function getBasicColumns(): BasicColumn[] { export function getBasicColumns(): BasicColumn[] {
...@@ -21,6 +18,7 @@ export function getBasicColumns(): BasicColumn[] { ...@@ -21,6 +18,7 @@ export function getBasicColumns(): BasicColumn[] {
}, },
]; ];
} }
/*月度计划主模块-创建月度资金计划-page页的前半部分*/
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
field: 'projectName', field: 'projectName',
...@@ -74,6 +72,7 @@ export const formSchema: FormSchema[] = [ ...@@ -74,6 +72,7 @@ export const formSchema: FormSchema[] = [
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
]; ];
/*月度计划主模块-创建月度资金计划-page页的后半部分*/
export const subFormSchema: FormSchema[] = [ export const subFormSchema: FormSchema[] = [
{ {
field: 'contrcatName', field: 'contrcatName',
......
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
import { getProject } from '@/api/project/performance'; import { getProject } from '@/api/project/performance';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicTable, useTable, TableAction } from '@/components/Table'; import { BasicTable, useTable, TableAction } from '@/components/Table';
import { modelColumns2, searchModelFormSchema } from './data'; import { modelColumns2 } from './data';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { Tag } from 'ant-design-vue'; import { Tag } from 'ant-design-vue';
import { inject } from 'vue'; import { inject } from 'vue';
let detailId = inject('detailId'); let detailId = inject('detailId');
const [registerTable, { reload, getSelectRows, clearSelectedRowKeys }] = useTable({ const [registerTable, { reload, getSelectRows, clearSelectedRowKeys }] = useTable({
api: getProject, api: getProject,
......
import { BasicColumn, FormSchema } from '@/components/Table'; import { BasicColumn, FormSchema } from '@/components/Table';
/*创建完成情况列表页显示项*/
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '序号', title: '序号',
...@@ -66,6 +67,7 @@ export const columns: BasicColumn[] = [ ...@@ -66,6 +67,7 @@ export const columns: BasicColumn[] = [
width: 180, width: 180,
}, },
]; ];
/*选择投资计划弹窗列表内容*/
export const searchModelFormSchema: FormSchema[] = [ export const searchModelFormSchema: FormSchema[] = [
{ {
field: 'filingCycle', field: 'filingCycle',
...@@ -102,6 +104,7 @@ export const searchModelFormSchema: FormSchema[] = [ ...@@ -102,6 +104,7 @@ export const searchModelFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
]; ];
/*创建完成情况列表页显示项*/
export const modelColumns: BasicColumn[] = [ export const modelColumns: BasicColumn[] = [
{ {
title: '序号', title: '序号',
...@@ -169,6 +172,7 @@ export const modelColumns: BasicColumn[] = [ ...@@ -169,6 +172,7 @@ export const modelColumns: BasicColumn[] = [
width: 180, width: 180,
}, },
]; ];
/*创建完成情况列表页筛选项*/
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'filingCycle', field: 'filingCycle',
...@@ -213,6 +217,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -213,6 +217,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
]; ];
/*创建完成情况-承建*/
export const formSchema1: FormSchema[] = [ export const formSchema1: FormSchema[] = [
{ {
field: 'projectName', field: 'projectName',
...@@ -451,6 +456,7 @@ export const formSchema1: FormSchema[] = [ ...@@ -451,6 +456,7 @@ export const formSchema1: FormSchema[] = [
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
]; ];
/*创建完成情况-非承建*/
export const formSchema2: FormSchema[] = [ export const formSchema2: FormSchema[] = [
{ {
field: 'projectName', field: 'projectName',
...@@ -690,6 +696,7 @@ export const formSchema2: FormSchema[] = [ ...@@ -690,6 +696,7 @@ export const formSchema2: FormSchema[] = [
}, },
]; ];
/*从投资中选择项目的弹窗内容*/
export const modelColumns2: BasicColumn[] = [ export const modelColumns2: BasicColumn[] = [
{ {
title: '序号', title: '序号',
......
<!--创建完成情况page页-->
<template> <template>
<PageWrapper <PageWrapper
:title="getTitle" :title="getTitle"
...@@ -6,13 +7,16 @@ ...@@ -6,13 +7,16 @@
:contentBackground="false" :contentBackground="false"
headerSticky headerSticky
> >
<!-- page页的右上角操作(提交和返回)按钮 -->
<template #extra> <template #extra>
<!-- <a-button type="primary" danger> 删除 </a-button>--> <!-- <a-button type="primary" danger> 删除 </a-button>-->
<a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button> <a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button>
<a-button type="default" @click="router.back()"> 返回 </a-button> <a-button type="default" @click="router.back()"> 返回 </a-button>
</template> </template>
<!-- page页 -->
<template v-for="(item, index) in tabsFormSchema"> <template v-for="(item, index) in tabsFormSchema">
<PageCard v-if="item.show" :key="index" :title="item.name"> <PageCard v-if="item.show" :key="index" :title="item.name">
<!-- 右上角的删除按钮 -->
<template #right> <template #right>
<a-button <a-button
v-if="!disabled" v-if="!disabled"
...@@ -25,9 +29,11 @@ ...@@ -25,9 +29,11 @@
<BasicForm :loading="loading" @register="item.Form[0]" /> <BasicForm :loading="loading" @register="item.Form[0]" />
</PageCard> </PageCard>
</template> </template>
<!--新增按钮-->
<a-button v-if="!disabled" type="dashed" @click="add" preIcon="ei:plus"> <a-button v-if="!disabled" type="dashed" @click="add" preIcon="ei:plus">
从计划中添加 从计划中添加
</a-button> </a-button>
<!--新增按钮那个触发的弹窗-->
<addPlanModel v-if="!disabled" @register="register" @close="handleNewData" /> <addPlanModel v-if="!disabled" @register="register" @close="handleNewData" />
<!-- <a-button type="dashed" @click="add" preIcon="ei:plus"> 从项目库导入 </a-button> <!-- <a-button type="dashed" @click="add" preIcon="ei:plus"> 从项目库导入 </a-button>
<a-button type="dashed" @click="handleAdd" class="ml-2" preIcon="ei:plus"> 新建项目 </a-button> --> <a-button type="dashed" @click="handleAdd" class="ml-2" preIcon="ei:plus"> 新建项目 </a-button> -->
...@@ -138,9 +144,7 @@ ...@@ -138,9 +144,7 @@
}; };
const tabsFormSchema = reactive<TabsFormType[]>([]); const tabsFormSchema = reactive<TabsFormType[]>([]);
/*** /*创建完成情况*/
*
*/
async function handleNew(info: any) { async function handleNew(info: any) {
console.log(info); console.log(info);
...@@ -166,14 +170,17 @@ ...@@ -166,14 +170,17 @@
clearValidate(); clearValidate();
}); });
} }
/*新增按钮*/
async function add() { async function add() {
openModal(); openModal();
} }
/*右上角的删除按钮*/
async function deleteItem(index: any) { async function deleteItem(index: any) {
tabsFormSchema[index].show = false; tabsFormSchema[index].show = false;
} }
/*新增按钮那个触发的弹窗*/
function handleNewData(data: any) { function handleNewData(data: any) {
data.map((res) => { data.map((res) => {
let item = res; let item = res;
...@@ -181,6 +188,7 @@ ...@@ -181,6 +188,7 @@
handleNew(item); handleNew(item);
}); });
} }
/*page页的右上角操作(提交和返回)按钮*/
async function handleSubmit() { async function handleSubmit() {
loadingRef.value = true; loadingRef.value = true;
try { try {
......
<!--工程项目投资计划完成情况主模块-点击新建完成情况后触发的弹窗-->
<template> <template>
<BasicModal <BasicModal
width="70%" width="70%"
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
import { modelColumns, searchModelFormSchema } from './data'; import { modelColumns, searchModelFormSchema } from './data';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { Tag } from 'ant-design-vue'; import { Tag } from 'ant-design-vue';
const [registerTable, { reload, getSelectRows, clearSelectedRowKeys }] = useTable({ const [registerTable, { reload, getSelectRows, clearSelectedRowKeys }] = useTable({
api: getEngineeringList, api: getEngineeringList,
title: '123', title: '123',
......
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