Commit e5739657 authored by 牛虎林's avatar 牛虎林

Merge remote-tracking branch 'origin/develop' into develop

parents 2854f2fd b8b45bd6
...@@ -9,19 +9,22 @@ ...@@ -9,19 +9,22 @@
<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
type="text" type="text"
preIcon="ant-design:delete-outlined" preIcon="ant-design:delete-outlined"
danger danger
v-if="!disabled" v-if="!disabled"
@click="deleteItem(index)" @click="deleteItem(index)"
/> />
</template> </template>
<BasicForm :loading="loading" @register="item.Form[0]" /> <BasicForm :loading="loading" @register="item.Form[0]" />
<div style="width: 500px"> <div style="width: 500px">
<BasicTable <BasicTable
:ref="(el) => setSwipeCellRef(item, index)" @register="item.table"
@register="item.table" :beforeEditSubmit="
:beforeEditSubmit="beforeEditSubmit(item, index)" (e) => {
beforeEditSubmit(item, index);
}
"
/> />
</div> </div>
</PageCard> </PageCard>
...@@ -83,29 +86,29 @@ ...@@ -83,29 +86,29 @@
const swipeCellRefList = ref<HTMLElement[]>([]); const swipeCellRefList = ref<HTMLElement[]>([]);
// 动态设置ref // 动态设置ref
function setSwipeCellRef(item, index) { function setSwipeCellRef(item, index) {
if (item) { console.log('setSwipeCellRefsetSwipeCellRef', item, index);
swipeCellRefList.value[index] = item; // if (item) {
} // swipeCellRefList.value[index] = item;
// }
} }
function beforeEditSubmit(item, index) { function beforeEditSubmit(item, index) {
console.log('beforeEditSubmit', item, index);
// setSwipeCellRef(item, index); // setSwipeCellRef(item, index);
swipeCellRefList.value?.forEach((data: any) => { let { getDataSource } = item.table[1];
let { getDataSource } = data.table[1]; const res = getDataSource();
const res = getDataSource(); const totalNo = res.reduce((prev, next) => {
const totalNo = res.reduce((prev, next) => { prev += Number(next.amount);
prev += Number(next.amount); return prev;
return prev; }, 0);
}, 0); tabsFormSchema[index].table[1].setProps({summaryData: [{
show.value = [ year: '合计',
{ // _row: '合计',
year: '合计', // _index: '合计',
// _row: '合计', amount: totalNo,
// _index: '合计', }]})
amount: totalNo, console.log('totalNo', totalNo);
}, console.log(tabsFormSchema)
]; return true;
return true;
});
} }
// const [registerTable, { getDataSource, setTableData }] = useTable({ // const [registerTable, { getDataSource, setTableData }] = useTable({
...@@ -125,14 +128,14 @@ ...@@ -125,14 +128,14 @@
// }); // });
onMounted(async () => { onMounted(async () => {
show.value = [ // show.value = [
{ // {
year: '合计', // year: '合计',
// _row: '合计', // // _row: '合计',
// _index: '合计', // // _index: '合计',
amount: '-', // amount: '-',
}, // },
]; // ];
// setTableData([ // setTableData([
// { // {
// year: '2022', // year: '2022',
...@@ -181,6 +184,13 @@ ...@@ -181,6 +184,13 @@
isUpdate.value = true; isUpdate.value = true;
let res = await getItem({ id }); let res = await getItem({ id });
for (let i = 0; i < res.length; i++) { for (let i = 0; i < res.length; i++) {
console.log(' 获取详情planYear', res[i].planYear);
const planYearList = res[i].planYear;
let num = 0;
for (let a = 0; a < planYearList.length; a++) {
num += Number(planYearList[a].amount);
}
console.log('num ', num);
const item = { const item = {
name: '序号' + (i + 1), name: '序号' + (i + 1),
forceRender: true, forceRender: true,
...@@ -194,7 +204,14 @@ ...@@ -194,7 +204,14 @@
// rowSelection: { type: 'checkbox' }, // rowSelection: { type: 'checkbox' },
columns: disabled.value == 1 ? basicColumnsDisabled() : getBasicColumns(), columns: disabled.value == 1 ? basicColumnsDisabled() : getBasicColumns(),
showSummary: true, showSummary: true,
summaryData: show, summaryData: [
{
year: '合计',
// _row: '合计',
// _index: '合计',
amount: num,
},
],
maxHeight: 180, maxHeight: 180,
maxWidth: 200, maxWidth: 200,
showIndexColumn: false, showIndexColumn: false,
...@@ -249,6 +266,7 @@ ...@@ -249,6 +266,7 @@
type TabsFormType = { type TabsFormType = {
name: string; name: string;
forceRender?: boolean; forceRender?: boolean;
sumData?: any;
Form: UseFormReturnType; Form: UseFormReturnType;
show?: boolean; show?: boolean;
table: any; table: any;
...@@ -279,27 +297,36 @@ ...@@ -279,27 +297,36 @@
console.log('存到tabsFormSchema前拿到所选的项目数据', info); console.log('存到tabsFormSchema前拿到所选的项目数据', info);
// 获取当前年份 // 获取当前年份
// const currentYear = JSON.stringify(new Date().getFullYear()); // const currentYear = JSON.stringify(new Date().getFullYear());
const item = { let item = {
name: '序号' + (tabsFormSchema.length + 1), name: '序号' + (tabsFormSchema.length + 1),
forceRender: true, forceRender: true,
show: true, show: true,
sumData: [
{
year: '合计',
// _row: '合计',
// _index: '合计',
amount: '-',
},
],
Form: useForm(Object.assign({ schemas: formSchema }, baseFormConfig) as FormProps), Form: useForm(Object.assign({ schemas: formSchema }, baseFormConfig) as FormProps),
table: useTable({ table: [],
title: '表尾行合计示例',
// api: demoListApi,
// rowSelection: { type: 'checkbox' },
columns: getBasicColumns(),
showSummary: true,
summaryData: show,
maxHeight: 180,
maxWidth: 200,
showIndexColumn: false,
pagination: false,
// scroll: { x: 2000 },
// canResize: false,
// showSelectionBar: true, // 显示多选状态栏
}),
}; };
item.table = useTable({
title: '表尾行合计示例',
// api: demoListApi,
// rowSelection: { type: 'checkbox' },
columns: getBasicColumns(),
showSummary: true,
summaryData: item.sumData,
maxHeight: 180,
maxWidth: 200,
showIndexColumn: false,
pagination: false,
// scroll: { x: 2000 },
// canResize: false,
// showSelectionBar: true, // 显示多选状态栏
});
const { setTableData } = item.table[1]; const { setTableData } = item.table[1];
const { setFieldsValue } = item.Form[1]; const { setFieldsValue } = item.Form[1];
......
...@@ -23,6 +23,13 @@ export const annualFormSchema: FormSchema[] = [ ...@@ -23,6 +23,13 @@ export const annualFormSchema: FormSchema[] = [
required: false, required: false,
component: 'Input', component: 'Input',
}, },
{
label: '项目类型',
field: 'projectType',
labelWidth: '140px',
required: false,
component: 'Input',
},
{ {
label: '建设地点', label: '建设地点',
field: 'constructionSite', field: 'constructionSite',
...@@ -30,6 +37,16 @@ export const annualFormSchema: FormSchema[] = [ ...@@ -30,6 +37,16 @@ export const annualFormSchema: FormSchema[] = [
required: false, required: false,
component: 'Input', component: 'Input',
}, },
{
label: '计划投资',
labelWidth: '140px',
field: 'planFunds',
required: false,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
},
{ {
label: '立项总投资', label: '立项总投资',
labelWidth: '140px', labelWidth: '140px',
...@@ -40,6 +57,36 @@ export const annualFormSchema: FormSchema[] = [ ...@@ -40,6 +57,36 @@ export const annualFormSchema: FormSchema[] = [
addonAfter: '万元', addonAfter: '万元',
}, },
}, },
{
label: '上一年资金执行情况计划额',
labelWidth: '140px',
field: 'situationPlanLimit',
required: false,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
},
{
label: '上一年资金执行情况实付额',
labelWidth: '140px',
field: 'actualAmountSituation',
required: false,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
},
{
label: '上一年累计实付额度',
labelWidth: '140px',
field: 'cumulativeActualLimit',
required: false,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
},
{ {
label: '年资金计划额合计', label: '年资金计划额合计',
labelWidth: '140px', labelWidth: '140px',
......
...@@ -40,6 +40,13 @@ export const biddingManagementFormSchema: FormSchema[] = [ ...@@ -40,6 +40,13 @@ export const biddingManagementFormSchema: FormSchema[] = [
required: false, required: false,
component: 'Input', component: 'Input',
}, },
{
label: '评标方法',
labelWidth: '140px',
field: 'evaluationMethod',
required: false,
component: 'Input',
},
{ {
label: '招标内容', label: '招标内容',
labelWidth: '140px', labelWidth: '140px',
...@@ -154,6 +161,13 @@ export const biddingManagementFormSchema: FormSchema[] = [ ...@@ -154,6 +161,13 @@ export const biddingManagementFormSchema: FormSchema[] = [
required: false, required: false,
component: 'Input', component: 'Input',
}, },
{
label: '详细信息',
labelWidth: '140px',
field: 'detailedInformation',
required: false,
component: 'Input',
},
{ {
label: '招标公告发布网址\n' + '\n' + '(仅限公开招标项目)', label: '招标公告发布网址\n' + '\n' + '(仅限公开招标项目)',
labelWidth: '140px', labelWidth: '140px',
......
import { FormSchema } from '@/components/Table'; import { FormSchema } from '@/components/Table';
//变更签证管理详情抽屉 // 9-变更签证管理详情
export const changeSignatureDrawer: FormSchema[] = [ export const changeSignatureDrawer: FormSchema[] = [
{ {
label: '填报周期', label: '填报周期',
...@@ -10,7 +10,7 @@ export const changeSignatureDrawer: FormSchema[] = [ ...@@ -10,7 +10,7 @@ export const changeSignatureDrawer: FormSchema[] = [
component: 'Input', component: 'Input',
}, },
{ {
label: '合同名称', label: '合同名称',
field: 'contractName', field: 'contractName',
labelWidth: '280px', labelWidth: '280px',
required: true, required: true,
......
...@@ -30,6 +30,20 @@ export const monthFormSchema: FormSchema[] = [ ...@@ -30,6 +30,20 @@ export const monthFormSchema: FormSchema[] = [
required: false, required: false,
component: 'Input', component: 'Input',
}, },
{
label: '结算金额',
field: 'investmentAmount',
labelWidth: '140px',
required: false,
component: 'Input',
},
{
label: '合同名称',
field: 'contrcatName',
labelWidth: '140px',
required: false,
component: 'Input',
},
{ {
label: '合同额', label: '合同额',
labelWidth: '140px', labelWidth: '140px',
...@@ -150,6 +164,16 @@ export const monthFormSchema: FormSchema[] = [ ...@@ -150,6 +164,16 @@ export const monthFormSchema: FormSchema[] = [
addonAfter: '万元', addonAfter: '万元',
}, },
}, },
{
label: '资金来源类型',
labelWidth: '140px',
field: 'sourceType',
required: false,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
},
{ {
label: '资金缺口', label: '资金缺口',
labelWidth: '140px', labelWidth: '140px',
......
...@@ -65,6 +65,17 @@ export const performanceFormSchema: FormSchema[] = [ ...@@ -65,6 +65,17 @@ export const performanceFormSchema: FormSchema[] = [
required: false, required: false,
component: 'Input', component: 'Input',
}, },
// 后加的
{
label: '该年实付金额',
labelWidth: '140px',
field: 'actualPay',
required: false,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
},
{ {
label: '总投资', label: '总投资',
labelWidth: '140px', labelWidth: '140px',
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
required: true, required: true,
componentProps: { componentProps: {
api: uploadApi, api: uploadApi,
resultField: 'data.data.fullPath', resultField: 'data.data.serverPath',
accept: ['rar', 'zip', 'doc', 'docx', 'pdf'], accept: ['rar', 'zip', 'doc', 'docx', 'pdf'],
multiple: false, multiple: false,
maxSize: 20, maxSize: 20,
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
required: true, required: true,
componentProps: { componentProps: {
api: uploadApi, api: uploadApi,
resultField: 'data.data.fullPath', resultField: 'data.data.serverPath',
accept: ['rar', 'zip', 'doc', 'docx', 'pdf'], accept: ['rar', 'zip', 'doc', 'docx', 'pdf'],
multiple: false, multiple: false,
maxSize: 20, maxSize: 20,
......
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