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

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

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