Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
紫光云
web-project
Commits
0cf9d504
Commit
0cf9d504
authored
Jun 12, 2024
by
mengzixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 年度工程资金计划页面接口对接
parent
c4b410ea
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
325 additions
and
248 deletions
+325
-248
annualPlan.ts
src/api/project/annualPlan.ts
+28
-1
completed.ts
src/api/project/completed.ts
+4
-0
completed.ts
src/router/routes/modules/completed.ts
+1
-1
annualPlanEdit.vue
src/views/annualPlan/annualPlanEdit/annualPlanEdit.vue
+78
-74
tableData.tsx
src/views/annualPlan/annualPlanEdit/tableData.tsx
+3
-3
annualPlanModel.vue
src/views/annualPlan/annualPlanModel/annualPlanModel.vue
+1
-1
data.tsx
src/views/annualPlan/annualPlanModel/data.tsx
+37
-3
data.tsx
src/views/annualPlan/data.tsx
+5
-5
index.vue
src/views/annualPlan/index.vue
+46
-16
completedEdit.vue
src/views/completed/completedEdit/completedEdit.vue
+104
-106
completedModel.vue
src/views/completed/completedModel/completedModel.vue
+2
-2
data.tsx
src/views/completed/completedModel/data.tsx
+16
-36
No files found.
src/api/project/annualPlan.ts
View file @
0cf9d504
import
{
ProjectParams
,
ProjectListGetResultModel
,
ProjectModel
}
from
'./model/projectModel'
;
import
{
defHttp
}
from
'@/utils/http/axios'
;
import
{
ListItem
}
from
"@/api/project/model/biddingPlanModel"
;
import
{
ListItem
,
ProjectPageParams
}
from
'@/api/project/model/biddingPlanModel'
;
enum
Api
{
GetList
=
'/pro/fundPlanYear/page'
,
GetContent
=
'/pro/fundPlanYear/selectproBypan'
,
AddannualPlanProject
=
'/pro/fundPlanYear/add'
,
UpdateProject
=
'/pro/fundPlanYear/update'
,
ProjectDetail
=
'/pro/fundPlanYear/details'
,
audit
=
'/pro/fundPlanYear/examine'
,
}
export
const
getAnnualPlanList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
export
const
getContent
=
(
params
?:
{
investmentId
:
any
})
=>
defHttp
.
get
<
ListItem
[]
>
({
url
:
Api
.
GetContent
,
params
});
export
const
addItem
=
(
params
?:
ProjectPageParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
AddannualPlanProject
,
data
:
params
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
},
});
export
const
updateItem
=
(
params
?:
any
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
UpdateProject
,
data
:
params
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
},
});
export
const
getItem
=
(
params
?:
any
)
=>
defHttp
.
get
<
ListItem
[]
>
({
url
:
Api
.
ProjectDetail
,
params
});
export
const
auditItem
=
(
params
?:
any
)
=>
defHttp
.
post
<
ListItem
[]
>
({
url
:
Api
.
audit
,
params
});
src/api/project/completed.ts
View file @
0cf9d504
...
...
@@ -3,6 +3,10 @@ import { defHttp } from '@/utils/http/axios';
enum
Api
{
GetList
=
'/pro/overdueFunds/getList'
,
GetCompletedProjectList
=
'/pro/overdueFunds/getProject'
,
}
export
const
getCompletedList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
export
const
getCompletedProjectList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetCompletedProjectList
,
data
:
params
})
src/router/routes/modules/completed.ts
View file @
0cf9d504
...
...
@@ -30,7 +30,7 @@ const completed: AppRouteModule = {
component
:
()
=>
import
(
'@/views/completed//completedEdit/completedEdit.vue'
),
meta
:
{
// affix: true,
title
:
'已竣工验收项目陈欠资金计划'
,
title
:
'
新建
已竣工验收项目陈欠资金计划'
,
orderNo
:
12
,
},
},
...
...
src/views/annualPlan/annualPlanEdit/annualPlanEdit.vue
View file @
0cf9d504
...
...
@@ -29,12 +29,12 @@
/>
</div>
</PageCard>
<
a-button
v-if=
"!disabled"
type=
"dashed"
@
click=
"add"
preIcon=
"ei:plus"
>
从项目库导入
<
/a-button
>
<
a-button
v-if=
"!disabled"
type=
"dashed"
@
click=
"handleAdd"
class=
"ml-2"
preIcon=
"ei:plus"
>
新建项目
<
/a-button
>
<
!-- <a-button v-if="!disabled" type="dashed" @click="add" preIcon="ei:plus">--
>
<!-- 从项目库导入-->
<
!-- </a-button>--
>
<
!-- <a-button v-if="!disabled" type="dashed" @click="handleAdd" class="ml-2" preIcon="ei:plus">--
>
<!-- 新建项目-->
<
!-- </a-button>--
>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<annualPlanModel
@
register=
"register"
@
close=
"handleNewData"
/>
</PageWrapper>
...
...
@@ -55,8 +55,7 @@
import
{
deepMerge
}
from
'@/utils'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
// import { addItem, updateItem, getItem } from '@/api/project/biddingPlan';
import
{
addItem
,
updateItem
,
getItem
}
from
'@/api/project/engineeringProject'
;
import
{
addItem
,
updateItem
,
getItem
}
from
'@/api/project/annualPlan'
;
import
{
editModel
}
from
'@/api/project/model/engineeringprojectModel'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
getContent
}
from
'@/api/project/annualPlan'
;
...
...
@@ -64,6 +63,8 @@
const
getTitle
=
ref
(
''
);
const
engineerId
=
ref
(
''
);
const
investmentld
=
ref
(
''
);
const
proId
=
ref
(
''
);
const
filingCycle
=
ref
(
''
);
let
show
=
ref
<
Recordable
[]
>
([]);
let
showTwo
=
ref
<
Recordable
[]
>
([]);
// ref数组
...
...
@@ -89,12 +90,12 @@
// console.log('data.table' + index, data.table);
let
{
getDataSource
}
=
data
.
table
[
1
];
const
res
=
getDataSource
();
// console.log('res
', res);
console
.
log
(
'res11111111
'
,
res
);
const
totalNo
=
res
.
reduce
((
prev
,
next
)
=>
{
prev
+=
Number
(
next
.
numericalValue
);
return
prev
;
},
0
);
//
console.log('totalNo', totalNo);
console
.
log
(
'totalNo'
,
totalNo
);
show
.
value
=
[
{
quarter
:
'合计'
,
...
...
@@ -106,10 +107,8 @@
};
function
beforeEditSubmitTwo
(
item
,
index
)
{
swipeCellRefListTwo
.
value
?.
forEach
((
data
:
any
)
=>
{
console
.
log
(
'data.tableTwo[1]'
+
index
,
data
.
tableTwo
[
1
]);
let
{
getDataSource
}
=
data
.
tableTwo
[
1
];
const
res
=
getDataSource
();
// console.log('res', res);
const
totalNo
=
res
.
reduce
((
prev
,
next
)
=>
{
prev
+=
Number
(
next
.
specialFund
);
return
prev
;
...
...
@@ -119,16 +118,15 @@
return
prev
;
},
0
);
const
totalNoThree
=
res
.
reduce
((
prev
,
next
)
=>
{
prev
+=
Number
(
next
.
ownFund
s
);
prev
+=
Number
(
next
.
ownFund
);
return
prev
;
},
0
);
console
.
log
(
'totalNo'
,
totalNo
);
showTwo
.
value
=
[
{
quarter
:
'合计'
,
specialFund
:
totalNo
,
bankFinancing
:
totalNoTwo
,
ownFund
s
:
totalNoThree
,
ownFund
:
totalNoThree
,
},
];
return
true
;
...
...
@@ -146,7 +144,7 @@
quarter
:
'合计'
,
specialFund
:
'-'
,
bankFinancing
:
'-'
,
ownFund
s
:
'-'
,
ownFund
:
'-'
,
},
];
});
...
...
@@ -154,20 +152,26 @@
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
const
{
createMessage
}
=
useMessage
();
getTitle
.
value
=
'新建年度工程资金计划'
;
const
isUpdate
=
ref
(
false
);
const
loading
=
ref
(
false
);
const
formData
=
ref
<
editModel
>
({});
const
disabled
=
ref
(
false
);
onMounted
(
async
()
=>
{
getTitle
.
value
=
'新建年度工程资金计划'
;
const
route
=
useRoute
();
const
id
=
route
.
query
.
id
;
// 获取名为id的参数
if
(
!
id
)
{
const
ids
=
JSON
.
parse
(
route
.
query
.
source
);
filingCycle
.
value
=
ids
[
0
].
filingCycle
;
// console.log('ids', ids);
let
res
=
await
getContent
({
investmentId
:
ids
[
0
].
id
});
// console.log('res', res);
await
handleNew
(
res
);
// formData.value.biddingQuarter = route.query.quarter;
formData
.
value
.
year
=
route
.
query
.
year
;
formData
.
value
.
investmentPlan
=
[];
formData
.
value
.
tenderPlanPro
=
[];
isUpdate
.
value
=
false
;
console
.
log
(
formData
);
//
console.log(formData);
}
else
{
disabled
.
value
=
route
.
query
.
disabled
==
'0'
?
false
:
true
;
if
(
disabled
.
value
)
{
...
...
@@ -177,8 +181,8 @@
}
engineerId
.
value
=
id
;
isUpdate
.
value
=
true
;
let
res
=
await
getItem
({
id
});
console
.
log
(
'getItem'
,
res
);
let
res
=
await
getItem
({
fundId
:
id
});
//
console.log('getItem', res);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
const
item
=
{
name
:
'序号'
+
(
i
+
1
),
...
...
@@ -205,7 +209,7 @@
title
:
'表尾行合计示例'
,
// api: demoListApi,
// rowSelection: { type: 'checkbox' },
columns
:
getBasicColumns
(),
columns
:
getBasicColumns
Two
(),
showSummary
:
true
,
summaryData
:
showTwo
,
maxHeight
:
180
,
...
...
@@ -225,15 +229,16 @@
id
:
info
.
id
,
investmentId
:
info
.
investmentId
,
};
formData
.
value
.
investmentPlan
=
[];
formData
.
value
.
investmentPlan
.
push
(
data
);
console
.
log
(
'info'
,
info
);
setTable
(
item
.
table
[
1
],
info
);
formData
.
value
.
tenderPlanPro
=
[];
formData
.
value
.
tenderPlanPro
.
push
(
data
);
// console.log('info', info);
setTable
(
item
.
table
[
1
],
info
.
plannedQuotaList
);
setTable
(
item
.
tableTwo
[
1
],
info
.
fundingSourceList
);
nextTick
(()
=>
{
setFieldsValue
(
info
);
});
}
console
.
log
(
res
);
//
console.log(res);
}
});
...
...
@@ -272,10 +277,13 @@
*
*/
async
function
handleNew
(
info
:
any
)
{
let
res
=
await
getContent
({
investmentId
:
info
.
id
});
console
.
log
(
'res'
,
res
);
// let res = await getContent({ investmentId: info.id });
let
res
=
info
;
// console.log('handleNew-res', res);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
investmentld
.
value
=
res
[
i
].
id
;
// console.log('d打印第' + i + 1 + '次');
investmentld
.
value
=
Number
(
res
[
i
].
investmentId
);
proId
.
value
=
Number
(
res
[
i
].
proId
);
const
item
=
{
name
:
'序号'
+
(
tabsFormSchema
.
length
+
1
),
forceRender
:
true
,
...
...
@@ -329,43 +337,41 @@
quarter
:
'三季度'
,
numericalValue
:
''
,
},
{
quarter
:
'四季度'
,
numericalValue
:
''
,
},
]);
setTable
(
item
.
tableTwo
[
1
],
[
{
quarter
:
'一季度'
,
numericalValue
:
''
,
specialFund
:
''
,
bankFinancing
:
''
,
ownFund
:
''
,
},
{
quarter
:
'二季度'
,
numericalValue
:
''
,
specialFund
:
''
,
bankFinancing
:
''
,
ownFund
:
''
,
},
{
quarter
:
'三季度'
,
numericalValue
:
''
,
specialFund
:
''
,
bankFinancing
:
''
,
ownFund
:
''
,
},
{
quarter
:
'四季度'
,
numericalValue
:
''
,
specialFund
:
''
,
bankFinancing
:
''
,
ownFund
:
''
,
},
]);
formData
.
value
.
investmentPlan
.
push
({
proId
:
res
[
i
].
id
,
});
//
formData.value.investmentPlan.push({
//
proId: res[i].id,
//
});
nextTick
(()
=>
{
// setTableData([
// {
// quarter: '一季度',
// numericalValue: '',
// },
// {
// quarter: '二季度',
// numericalValue: '',
// },
// {
// quarter: '三季度',
// numericalValue: '',
// },
// ]);
setFieldsValue
({
projectName
:
res
[
i
].
projectName
,
constructionSite
:
res
[
i
].
constructionSite
,
...
...
@@ -382,7 +388,7 @@
}
async
function
deleteItem
(
index
:
any
)
{
tabsFormSchema
.
splice
(
index
,
1
);
formData
.
value
.
investmentPlan
.
splice
(
index
,
1
);
formData
.
value
.
tenderPlanPro
.
splice
(
index
,
1
);
}
async
function
handleAdd
()
{
openDrawer
(
true
,
{
...
...
@@ -390,7 +396,7 @@
});
}
async
function
handleSuccess
(
params
:
any
)
{
console
.
log
(
params
);
//
console.log(params);
handleNew
(
params
);
}
function
getData
(
table
:
any
)
{
...
...
@@ -398,7 +404,7 @@
return
getDataSource
();
}
async
function
handleSubmit
()
{
console
.
log
(
'tabsFormSchema'
,
tabsFormSchema
);
//
console.log('tabsFormSchema', tabsFormSchema);
loading
.
value
=
true
;
try
{
for
(
let
i
=
0
;
i
<
tabsFormSchema
.
length
;
i
++
)
{
...
...
@@ -406,34 +412,32 @@
const
{
validate
,
getFieldsValue
}
=
item
.
Form
[
1
];
let
data
=
getData
(
item
.
table
[
1
]);
let
dataTwo
=
getData
(
item
.
tableTwo
[
1
]);
// const { getDataSource } = item.table[1];
await
validate
();
let
res
=
getFieldsValue
();
// let data = getDataSource();
console
.
log
(
' getFieldsValue()'
,
getFieldsValue
());
// console.log(' getDataSource()', getDataSource());
console
.
log
(
' data111'
,
data
);
data
[
0
].
numericalValue
=
Number
(
data
[
0
].
numericalValue
);
data
[
1
].
numericalValue
=
Number
(
data
[
1
].
numericalValue
);
data
[
2
].
numericalValue
=
Number
(
data
[
2
].
numericalValue
);
// res.biddingPeriod = res.biddingPeriod.join(',');
// res.plannedPeriod = res.plannedPeriod.join(',');
console
.
log
(
' formData()'
,
unref
(
formData
));
console
.
log
(
'engineerId'
,
engineerId
);
formData
.
value
.
investmentPlan
[
i
]
=
deepMerge
(
formData
.
value
.
investmentPlan
[
i
],
res
);
formData
.
value
.
investmentPlan
[
i
].
plannedQuotaList
=
data
;
formData
.
value
.
investmentPlan
[
i
].
fundingSourceList
=
dataTwo
;
formData
.
value
.
investmentPlan
[
i
].
investmentld
=
investmentld
;
// console.log(' getFieldsValue()', getFieldsValue());
// console.log(' data111', data);
for
(
let
a
=
0
;
a
<
data
.
length
;
a
++
)
{
data
[
a
].
numericalValue
=
Number
(
data
[
a
].
numericalValue
);
}
for
(
let
j
=
0
;
j
<
dataTwo
.
length
;
j
++
)
{
data
[
i
].
specialFund
=
Number
(
data
[
i
].
specialFund
);
data
[
i
].
bankFinancing
=
Number
(
data
[
i
].
bankFinancing
);
data
[
i
].
ownFund
=
Number
(
data
[
i
].
ownFund
);
}
formData
.
value
.
tenderPlanPro
[
i
]
=
deepMerge
(
formData
.
value
.
tenderPlanPro
[
i
],
res
);
formData
.
value
.
tenderPlanPro
[
i
].
plannedQuotaList
=
data
;
formData
.
value
.
tenderPlanPro
[
i
].
fundingSourceList
=
dataTwo
;
formData
.
value
.
tenderPlanPro
[
i
].
investmentId
=
investmentld
;
formData
.
value
.
tenderPlanPro
[
i
].
proId
=
proId
;
formData
.
value
.
year
=
filingCycle
;
}
console
.
log
(
' formData()'
,
unref
(
formData
));
// console.log(' setTableData()', setTableData);
let
res
=
isUpdate
.
value
?
await
updateItem
(
unref
(
formData
))
:
await
addItem
(
unref
(
formData
));
loading
.
value
=
false
;
console
.
log
(
res
);
//
console.log(res);
createMessage
.
success
(
'提交成功!'
);
}
catch
(
e
)
{
// 验证失败或出错,切换到对应标签页
console
.
log
(
e
);
//
console.log(e);
}
finally
{
loading
.
value
=
false
;
}
...
...
src/views/annualPlan/annualPlanEdit/tableData.tsx
View file @
0cf9d504
...
...
@@ -46,7 +46,7 @@ export function getBasicColumnsTwo(): BasicColumn[] {
},
{
title
:
'自有资金'
,
dataIndex
:
'ownFund
s
'
,
dataIndex
:
'ownFund'
,
width
:
150
,
// sorter: true,
// defaultHidden: true,
...
...
@@ -140,7 +140,7 @@ export const formSchema: ({ colProps: { offset: number; span: number }; componen
{
field
:
'competentDepartment'
,
label
:
'项目主管部门:'
,
required
:
true
,
//
required: true,
component
:
'Input'
,
componentProps
:
{
readonly
:
true
,
...
...
@@ -201,7 +201,7 @@ export const formSchema: ({ colProps: { offset: number; span: number }; componen
},
{
label
:
'备注'
,
field
:
'remark
s
'
,
field
:
'remark'
,
required
:
true
,
component
:
'InputTextArea'
,
componentProps
:
{
...
...
src/views/annualPlan/annualPlanModel/annualPlanModel.vue
View file @
0cf9d504
...
...
@@ -5,7 +5,7 @@
@
register=
"register"
title=
"选择投资计划"
:minHeight=
"30"
okText=
"
导入
"
okText=
"
新建
"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
>
...
...
src/views/annualPlan/annualPlanModel/data.tsx
View file @
0cf9d504
...
...
@@ -77,12 +77,46 @@ export const columns: (
];
export
const
searchFormSchema
:
FormSchema
[]
=
[
// {
// field: 'projectName',
// label: '',
// component: 'Input',
// componentProps: {
// placeholder: '搜索关键字',
// },
// colProps: { span: 4 },
// },
{
field
:
'
projectNam
e'
,
field
:
'
filingCycl
e'
,
label
:
''
,
component
:
'Input'
,
component
:
'DatePicker'
,
componentProps
:
{
placeholder
:
'年度'
,
picker
:
'year'
,
valueFormat
:
'YYYY'
,
format
:
'YYYY'
,
style
:
{
width
:
'100%'
,
},
},
colProps
:
{
span
:
4
},
},
{
field
:
'planType'
,
label
:
''
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'搜索关键字'
,
placeholder
:
'类型'
,
options
:
[
{
label
:
'工程'
,
value
:
'工程'
,
},
{
label
:
'承建'
,
value
:
'承建'
,
},
],
},
colProps
:
{
span
:
4
},
},
...
...
src/views/annualPlan/data.tsx
View file @
0cf9d504
...
...
@@ -26,11 +26,11 @@ export const columns: (
dataIndex
:
'year'
,
width
:
200
,
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
width
:
180
,
},
//
{
//
title: '类型',
//
dataIndex: 'type',
//
width: 180,
//
},
{
title
:
'年计划投资'
,
dataIndex
:
'planInvestment'
,
...
...
src/views/annualPlan/index.vue
View file @
0cf9d504
...
...
@@ -16,30 +16,45 @@
<TableAction
:actions=
"[
{
icon: 'clarity:note-edit-line',
onClick: handleEdit.bind(null, record),
label: '修改',
onClick: handleEdit.bind(null, record, 0),
// ifShow: (_action) => {
// return record.completionResult == 0;
// },
},
{
icon: 'ant-design:delete-outlined',
color: 'error',
label: '详情',
onClick: handleEdit.bind(null, record, 1),
// ifShow: (_action) => {
// return record.reviewStatus == '1';
// },
},
{
label: '审核',
color: 'success',
popConfirm: {
title: '是否确认
删除
',
title: '是否确认
审核
',
placement: 'left',
confirm:
handleDelete.bind(null, record
),
confirm:
examine.bind(null, record, true
),
},
// ifShow: (_action) => {
// return record.reviewStatus == null;
// },
},
]"
/>
</
template
>
</template>
</BasicTable>
<
yearModa
l
@
register=
"register"
@
close=
"handleNew"
/>
<
annualPlanMode
l
@
register=
"register"
@
close=
"handleNew"
/>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
useRouter
}
from
"vue-router"
;
const
{
push
}
=
useRouter
();
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getAnnualPlanList
}
from
'@/api/project/annualPlan'
;
import
yearModal
from
'@/components/yearModa
l.vue'
;
import
annualPlanModel
from
'./annualPlanModel/annualPlanMode
l.vue'
;
import
{
getListByPage
}
from
'@/api/project/biddingPlan'
;
...
...
@@ -48,6 +63,9 @@ import { useDrawer } from '@/components/Drawer';
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
router
}
from
"@/router"
;
import
{
BasicForm
,
useForm
,
FormProps
,
UseFormReturnType
}
from
'@/components/Form'
;
import
{
formSchema
}
from
"@/views/annualPlan/annualPlanEdit/tableData"
;
import
{
auditItem
}
from
"@/api/project/engineeringProject"
;
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
...
...
@@ -67,7 +85,7 @@ const [registerTable, { reload }] = useTable({
bordered
:
true
,
showIndexColumn
:
false
,
actionColumn
:
{
width
:
80
,
width
:
1
80
,
title
:
'操作'
,
dataIndex
:
'action'
,
// slots: { customRender: 'action' },
...
...
@@ -76,10 +94,13 @@ const [registerTable, { reload }] = useTable({
});
function
handleEdit
(
record
:
Recordable
)
{
openDrawer
(
true
,
{
record
,
isUpdate
:
true
,
function
handleEdit
(
record
:
Recordable
,
disabled
:
number
)
{
push
({
path
:
'/annualPlan/annualPlanEdit'
,
query
:
{
id
:
record
.
id
,
disabled
:
String
(
disabled
),
},
});
}
...
...
@@ -101,13 +122,22 @@ const handleNew = (e) => {
console
.
log
(
'eeee'
,
e
);
router
.
push
({
path
:
'/annualPlan/annualPlanEdit'
,
query
:
e
,
query
:
{
source
:
JSON
.
stringify
(
e
),
},
});
};
const
change
=
(
key
:
string
)
=>
{
reload
();
};
async
function
examine
(
record
:
Recordable
,
disabled
:
boolean
)
{
const
id
=
record
.
id
;
const
res
=
await
auditItem
({
id
});
console
.
log
(
res
);
reload
();
}
</
script
>
<
style
scoped
>
.btn
{
...
...
src/views/completed/completedEdit/completedEdit.vue
View file @
0cf9d504
...
...
@@ -89,7 +89,6 @@
// console.log('data.table' + index, data.table);
let
{
getDataSource
}
=
data
.
table
[
1
];
const
res
=
getDataSource
();
// console.log('res', res);
const
totalNo
=
res
.
reduce
((
prev
,
next
)
=>
{
prev
+=
Number
(
next
.
numericalValue
);
return
prev
;
...
...
@@ -272,10 +271,10 @@
*
*/
async
function
handleNew
(
info
:
any
)
{
let
res
=
await
getContent
({
investmentId
:
info
.
id
});
console
.
log
(
'res'
,
res
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
investmentld
.
value
=
res
[
i
].
id
;
//
let res = await getContent({ investmentId: info.id });
//
console.log('res', res);
//
for (let i = 0; i
<
res
.
length
;
i
++
)
{
//
investmentld.value = res[i].id;
const
item
=
{
name
:
'序号'
+
(
tabsFormSchema
.
length
+
1
),
forceRender
:
true
,
...
...
@@ -348,9 +347,9 @@
numericalValue
:
''
,
},
]);
formData
.
value
.
investmentPlan
.
push
({
proId
:
res
[
i
].
id
,
});
//
formData.value.investmentPlan.push({
// proId: info
[i].id,
//
});
nextTick
(()
=>
{
// setTableData([
// {
...
...
@@ -367,18 +366,17 @@
// },
// ]);
setFieldsValue
({
projectName
:
res
[
i
].
projectName
,
constructionSite
:
res
[
i
].
constructionSite
,
totalInvestment
:
res
[
i
].
totalInvestment
,
planFunds
:
res
[
i
].
planFunds
,
attribute
:
res
[
i
].
attribute
,
beginTime
:
res
[
i
].
beginTime
,
schedule
:
res
[
i
].
schedule
,
competentDepartment
:
res
[
i
].
competentDepartment
,
projectType
:
res
[
i
].
projectType
,
projectName
:
info
.
projectName
,
constructionSite
:
info
.
constructionSite
,
constructionMode
:
info
.
constructionMode
,
projectType
:
info
.
projectType
,
constructionScale
:
info
.
constructionScale
,
projectOverview
:
info
.
projectOverview
,
fundingSource
:
info
.
fundingSource
,
implementingEntity
:
info
.
implementingEntity
,
});
});
}
//
}
}
async
function
deleteItem
(
index
:
any
)
{
tabsFormSchema
.
splice
(
index
,
1
);
...
...
src/views/completed/completedModel/completedModel.vue
View file @
0cf9d504
...
...
@@ -25,10 +25,10 @@ import { BasicModal, useModalInner } from '@/components/Modal';
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
get
MonthlyPlanProjectList
}
from
"@/api/project/monthlyPlan
"
;
import
{
get
CompletedProjectList
}
from
"@/api/project/completed
"
;
const
[
registerTable
,
{
reload
,
getSelectRows
}]
=
useTable
({
api
:
get
MonthlyPlan
ProjectList
,
api
:
get
Completed
ProjectList
,
title
:
'123'
,
columns
,
formConfig
:
{
...
...
src/views/completed/completedModel/data.tsx
View file @
0cf9d504
...
...
@@ -15,63 +15,43 @@ export const columns: (
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
)[]
=
[
{
title
:
'
年度
'
,
dataIndex
:
'
filingCycl
e'
,
title
:
'
基本信息
'
,
dataIndex
:
'
projectNam
e'
,
width
:
180
,
},
{
title
:
'
类型
'
,
dataIndex
:
'
planType
'
,
title
:
'
实施主体
'
,
dataIndex
:
'
implementingEntity
'
,
width
:
180
,
},
{
title
:
'
项目数量
'
,
dataIndex
:
'
totalProject
'
,
title
:
'
建设模式
'
,
dataIndex
:
'
constructionMode
'
,
width
:
200
,
},
{
title
:
'
总投资
'
,
dataIndex
:
'
totalInvestment
'
,
title
:
'
建设地点
'
,
dataIndex
:
'
constructionSite
'
,
width
:
180
,
},
{
title
:
'
合同总额合计
'
,
dataIndex
:
'
totalContract
'
,
title
:
'
项目类型
'
,
dataIndex
:
'
projectType
'
,
width
:
180
,
},
{
title
:
'
三年滚动投资计划合计
'
,
dataIndex
:
'
totalRollingInvestment
'
,
title
:
'
资金来源
'
,
dataIndex
:
'
fundingSource
'
,
width
:
180
,
},
{
title
:
'
公司名称
'
,
dataIndex
:
'co
mpany
'
,
title
:
'
建设目的及项目功能
'
,
dataIndex
:
'co
nstructionPurpose
'
,
width
:
180
,
},
{
title
:
'最新更新人'
,
dataIndex
:
'updateBy'
,
width
:
180
,
},
{
title
:
'最新更新时间'
,
dataIndex
:
'updateTime'
,
width
:
180
,
},
{
title
:
'审核状态'
,
dataIndex
:
'planResult'
,
width
:
180
,
},
{
title
:
'审核人'
,
dataIndex
:
'auditingBy'
,
width
:
180
,
},
{
title
:
'审核时间'
,
dataIndex
:
'auditingTime'
,
title
:
'建设规模'
,
dataIndex
:
'constructionScale'
,
width
:
180
,
},
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment