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
de0dc863
Commit
de0dc863
authored
Jun 21, 2024
by
牛虎林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加树形结构表格组件
parent
a59be6a0
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
568 additions
and
127 deletions
+568
-127
changeSignatrue.ts
src/api/changeSignatrue/changeSignatrue.ts
+11
-1
contract.ts
src/api/contract/contract.ts
+4
-0
settlementManage.ts
src/api/project/settlementManage.ts
+9
-0
Contract.vue
src/components/ContractModel/Contract.vue
+80
-58
ContractTree.vue
src/components/ContractModel/ContractTree.vue
+38
-0
data.tsx
src/components/ContractModel/data.tsx
+37
-0
tableData.tsx
src/components/ContractModel/tableData.tsx
+146
-0
YearSelect.vue
src/components/YearSelect/YearSelect.vue
+1
-5
yearModal.vue
src/components/yearModal/yearModal.vue
+145
-0
addChangeSignature.vue
src/views/changeSignature/addChangeSignature.vue
+29
-29
changeSignatrue.data.ts
src/views/changeSignature/changeSignatrue.data.ts
+5
-5
index.vue
src/views/changeSignature/index.vue
+30
-9
contractDrawer.vue
src/views/contract/contractDrawer.vue
+0
-4
index.vue
src/views/settlementManagement/index.vue
+33
-16
No files found.
src/api/changeSignatrue/changeSignatrue.ts
View file @
de0dc863
...
@@ -18,7 +18,8 @@ enum Api {
...
@@ -18,7 +18,8 @@ enum Api {
//http://58.223.177.48:8088/pro/change-visa/byId-examine
//http://58.223.177.48:8088/pro/change-visa/byId-examine
//批量删除
//批量删除
DeleteList
=
'/pro/change-visa/delete-id'
,
DeleteList
=
'/pro/change-visa/delete-id'
,
//http://58.223.177.48:8088/pro/change-visa/delete-id
// 判断季度选是否已存在
CheckQuarter
=
'/pro/change-visa/is-change'
,
}
}
export
const
getSettlementManageList
=
(
params
?:
ProjectParams
)
=>
export
const
getSettlementManageList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
...
@@ -83,3 +84,12 @@ export const deleteOne = (params?: any) =>
...
@@ -83,3 +84,12 @@ export const deleteOne = (params?: any) =>
url
:
Api
.
DeleteOne
,
url
:
Api
.
DeleteOne
,
params
,
params
,
});
});
export
const
checkQuarter
=
(
params
?:
any
)
=>
defHttp
.
get
<
ProjectModel
>
(
{
url
:
Api
.
CheckQuarter
,
params
,
});
src/api/contract/contract.ts
View file @
de0dc863
...
@@ -10,6 +10,8 @@ enum Api {
...
@@ -10,6 +10,8 @@ enum Api {
GetList
=
'/pro/settlement/select-contract'
,
GetList
=
'/pro/settlement/select-contract'
,
//查询项目下拉框集合
//查询项目下拉框集合
ProjectSelect
=
'/pro/investmentPlan/project-list'
,
ProjectSelect
=
'/pro/investmentPlan/project-list'
,
//查询分组的合同集合
GetGroupList
=
'/pro/settlement/contract-list'
,
//新增合同
//新增合同
Add
=
'/pro/settlement/add-contract'
,
Add
=
'/pro/settlement/add-contract'
,
}
}
...
@@ -28,3 +30,5 @@ export const addItem = (params?: any) =>
...
@@ -28,3 +30,5 @@ export const addItem = (params?: any) =>
'Content-Type'
:
'application/json;charset=UTF-8'
,
'Content-Type'
:
'application/json;charset=UTF-8'
,
},
},
});
});
export
const
getGroupList
=
(
params
?:
any
)
=>
defHttp
.
get
<
ProjectModel
>
({
url
:
Api
.
GetGroupList
,
data
:
params
});
src/api/project/settlementManage.ts
View file @
de0dc863
...
@@ -20,6 +20,9 @@ enum Api {
...
@@ -20,6 +20,9 @@ enum Api {
deleteList
=
'/pro/settlement/del'
,
deleteList
=
'/pro/settlement/del'
,
//查询部门列表
//查询部门列表
getDepartmentList
=
'/pro/sys/sysDept'
,
getDepartmentList
=
'/pro/sys/sysDept'
,
// 查询季度是否已经存在
isSettlement
=
'/pro/settlement/is-settlement'
,
}
}
export
const
getSettlementManageList
=
(
params
?:
ProjectParams
)
=>
export
const
getSettlementManageList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectParams
>
({
url
:
Api
.
GetList
,
data
:
params
});
defHttp
.
post
<
ProjectParams
>
({
url
:
Api
.
GetList
,
data
:
params
});
...
@@ -82,3 +85,9 @@ export const getDepartmentList = () =>
...
@@ -82,3 +85,9 @@ export const getDepartmentList = () =>
defHttp
.
post
<
ProjectModel
>
({
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
getDepartmentList
,
url
:
Api
.
getDepartmentList
,
});
});
export
const
isSettlement
=
(
params
?:
any
)
=>
defHttp
.
get
<
ProjectModel
>
({
url
:
Api
.
isSettlement
,
params
,
});
src/components/ContractModel/Contract.vue
View file @
de0dc863
<
template
>
<
template
>
<BasicModal
<BasicModal
width=
"70%"
width=
"70%"
v-bind=
"$attrs"
v-bind=
"$attrs"
@
register=
"register"
@
register=
"register"
title=
"选择合同导入"
title=
"选择合同导入"
:minHeight=
"30"
:minHeight=
"30"
okText=
"导入"
okText=
"导入"
@
ok=
"handleSubmit"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
@
visible-change=
"handleVisibleChange"
>
>
<BasicTable
@
register=
"registerTable"
>
<BasicTable
@
register=
"registerTable"
>
<template
#
bodyCell=
"
{ column, text, record, index }">
<!-- 当前列是序号列时,显示序号 -->
</BasicTable>
<span
v-if=
"column.dataIndex === 'serialNumber'"
>
{{
index
+
1
}}
</span>
<!-- 其他列正常显示 -->
<span
v-else
>
{{
text
}}
</span>
</
template
>
</BasicTable>
<!-- <button @click="getSelectRowList">获取数据</button>-->
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
getContractListPage
}
from
'@/api/contract/contract'
;
import
{
getGroupList
}
from
'@/api/contract/contract'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
getBasicColumns
}
from
'./data'
;
const
[
registerTable
,
{
reload
,
getSelectRows
}]
=
useTable
({
import
{
onMounted
,
ref
}
from
"vue"
;
api
:
getContractListPage
,
const
tableList
=
ref
([]);
title
:
'123'
,
onMounted
(
async
()
=>
{
columns
,
const
list
=
await
getGroupList
();
formConfig
:
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
labelWidth
:
120
,
list
[
i
].
id
=
list
[
i
].
id
+
"_"
+
Math
.
random
().
toString
(
36
).
substring
(
2
,
10
)
schemas
:
searchFormSchema
,
let
item
=
list
[
i
].
children
;
},
let
childrenList
=
[]
useSearchForm
:
true
,
for
(
let
j
=
0
;
j
<
item
.
length
;
j
++
)
{
showTableSetting
:
false
,
childrenList
.
push
(
Object
.
assign
(
item
[
j
],{
markers
:
"1"
}));
bordered
:
true
,
}
showIndexColumn
:
false
,
list
[
i
].
children
=
childrenList
rowSelection
:
{
}
type
:
'checkbox'
,
tableList
.
value
=
list
console
.
log
(
list
,
"数据查看list"
)
})
const
[
registerTable
,
{
expandAll
,
getSelectRows
}]
=
useTable
({
title
:
'树形表格'
,
isTreeTable
:
true
,
accordion
:
true
,
// 手风琴效果
rowSelection
:
{
type
:
'checkbox'
,
getCheckboxProps
(
record
:
Recordable
)
{
// Demo: 第一行(id为0)的选择框禁用
if
(
record
.
id
===
"0"
)
{
return
{
disabled
:
true
};
}
else
{
return
{
disabled
:
false
};
}
},
},
// actionColumn: {
// width: 80,
// title: '操作',
// dataIndex: 'action',
// // slots: { customRender: 'action' },
// fixed: undefined,
// },
});
const
{
createMessage
}
=
useMessage
();
},
function
getSelectRowList
()
{
titleHelpMessage
:
'树形组件不能和序列号列同时存在'
,
// createMessage.info('请在控制台查看!');
columns
:
getBasicColumns
(),
// console.log(getSelectRows());
dataSource
:
tableList
,
emit
(
'close'
,
getSelectRows
());
rowKey
:
'id'
,
showSelectionBar
:
true
,
// 显示多选状态栏
});
const
{
createMessage
}
=
useMessage
();
function
getSelectRowList
()
{
let
selectData
=
getSelectRows
()
let
data
=
[]
for
(
let
i
=
0
;
i
<
selectData
.
length
;
i
++
)
{
let
item
=
selectData
[
i
]
if
(
item
.
markers
===
"0"
){
for
(
let
j
=
0
;
j
<
item
.
children
.
length
;
j
++
)
{
data
.
push
(
item
.
children
[
j
])
}
}
if
(
item
.
markers
==
"1"
){
data
.
push
(
item
)
}
}
}
console
.
log
(
data
)
emit
(
'close'
,
data
);
}
const
emit
=
defineEmits
([
'close'
]);
const
emit
=
defineEmits
([
'close'
]);
function
handleVisibleChange
(
v
)
{}
function
handleVisibleChange
(
v
)
{}
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
data
;
data
;
});
});
function
handleSubmit
()
{
function
handleSubmit
()
{
getSelectRowList
();
getSelectRowList
();
closeModal
();
closeModal
();
}
}
</
script
>
</
script
>
src/components/ContractModel/ContractTree.vue
0 → 100644
View file @
de0dc863
<
template
>
<div
class=
"p-4"
>
<BasicTable
@
register=
"register"
>
<template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"expandAll"
>
展开全部
</a-button>
<a-button
type=
"primary"
@
click=
"collapseAll"
>
折叠全部
</a-button>
<a-button
type=
"primary"
@
click=
"collapseRows(['4'])"
>
折叠第五行
</a-button>
<a-button
type=
"primary"
@
click=
"expandRows(['4'])"
>
展开第五行
</a-button>
</
template
>
</BasicTable>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
getBasicColumns
,
getTreeTableData
}
from
'./tableData'
;
const
[
register
,
{
expandAll
,
collapseAll
,
expandRows
,
collapseRows
}]
=
useTable
({
title
:
'树形表格'
,
isTreeTable
:
true
,
accordion
:
true
,
// 手风琴效果
rowSelection
:
{
type
:
'checkbox'
,
getCheckboxProps
(
record
:
Recordable
)
{
// Demo: 第一行(id为0)的选择框禁用
if
(
record
.
id
===
'0'
)
{
return
{
disabled
:
true
};
}
else
{
return
{
disabled
:
false
};
}
},
},
titleHelpMessage
:
'树形组件不能和序列号列同时存在'
,
columns
:
getBasicColumns
(),
dataSource
:
getTreeTableData
(),
rowKey
:
'id'
,
showSelectionBar
:
true
,
// 显示多选状态栏
});
</
script
>
src/components/ContractModel/data.tsx
View file @
de0dc863
...
@@ -5,6 +5,13 @@ import { setRoleStatus } from '@/api/demo/system';
...
@@ -5,6 +5,13 @@ import { setRoleStatus } from '@/api/demo/system';
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
type
CheckedType
=
boolean
|
string
|
number
;
type
CheckedType
=
boolean
|
string
|
number
;
export
interface
Data
{
table
:
{
items
:
any
[]
total
:
number
}
}
export
const
columns
:
(
export
const
columns
:
(
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
...
@@ -71,3 +78,33 @@ export const formSchema: FormSchema[] = [
...
@@ -71,3 +78,33 @@ export const formSchema: FormSchema[] = [
},
},
];
];
export
function
getBasicColumns
():
BasicColumn
[]
{
return
[
{
title
:
'项目名称'
,
dataIndex
:
'projectName'
,
width
:
180
,
},
{
title
:
'合同名称'
,
dataIndex
:
'contrcatName'
,
width
:
180
,
},
{
title
:
'收款单位'
,
dataIndex
:
'collectingUnit'
,
width
:
200
,
},
{
title
:
'投资金额'
,
dataIndex
:
'investmentAount'
,
width
:
180
,
},
{
title
:
'合同额'
,
dataIndex
:
'contractAmount'
,
width
:
180
,
}
]
}
src/components/ContractModel/tableData.tsx
0 → 100644
View file @
de0dc863
import
{
optionsListApi
}
from
'@/api/demo/select'
;
import
{
FormProps
,
FormSchema
,
BasicColumn
}
from
'@/components/Table'
;
import
{
VxeFormItemProps
,
VxeGridPropTypes
}
from
'@/components/VxeTable'
;
import
{
ref
}
from
'vue'
;
import
{
Input
}
from
'ant-design-vue'
;
export
function
getBasicColumns
():
BasicColumn
[]
{
return
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
fixed
:
'left'
,
width
:
200
,
},
{
title
:
'姓名'
,
dataIndex
:
'name'
,
width
:
150
,
filters
:
[
{
text
:
'Male'
,
value
:
'male'
},
{
text
:
'Female'
,
value
:
'female'
},
],
},
{
title
:
'地址'
,
dataIndex
:
'address'
,
},
{
title
:
'编号'
,
dataIndex
:
'no'
,
width
:
150
,
sorter
:
true
,
defaultHidden
:
true
,
},
{
title
:
'开始时间'
,
width
:
150
,
sorter
:
true
,
dataIndex
:
'beginTime'
,
},
{
title
:
'结束时间'
,
width
:
150
,
sorter
:
true
,
dataIndex
:
'endTime'
,
},
];
}
export
const
getAdvanceSchema
=
(
itemNumber
=
6
):
FormSchema
[]
=>
{
const
arr
:
FormSchema
[]
=
[];
for
(
let
index
=
0
;
index
<
itemNumber
;
index
++
)
{
arr
.
push
({
field
:
`field
${
index
}
`
,
label
:
`字段
${
index
}
`
,
component
:
'Input'
,
colProps
:
{
xl
:
12
,
xxl
:
8
,
},
});
}
return
arr
;
};
export
function
getTreeTableData
()
{
return
(()
=>
{
const
arr
:
any
=
[];
for
(
let
index
=
0
;
index
<
40
;
index
++
)
{
arr
.
push
({
id
:
`
${
index
}
`
,
name
:
'John Brown'
,
age
:
`1
${
index
}
`
,
no
:
`
${
index
+
10
}
`
,
address
:
'New York No. 1 Lake ParkNew York No. 1 Lake Park'
,
beginTime
:
new
Date
().
toLocaleString
(),
endTime
:
new
Date
().
toLocaleString
(),
children
:
[
{
id
:
`l2-
${
index
}
-1`
,
name
:
'John Brown'
,
age
:
`1`
,
no
:
`
${
index
+
10
}
`
,
address
:
'New York No. 1 Lake ParkNew York No. 1 Lake Park'
,
beginTime
:
new
Date
().
toLocaleString
(),
endTime
:
new
Date
().
toLocaleString
(),
children
:
[
{
id
:
`l3-
${
index
}
-1-1`
,
name
:
'John Brown'
,
age
:
`11`
,
no
:
`11`
,
address
:
'New York No. 1 Lake ParkNew York No. 1 Lake Park'
,
beginTime
:
new
Date
().
toLocaleString
(),
endTime
:
new
Date
().
toLocaleString
(),
},
{
id
:
`l3-
${
index
}
-1-2`
,
name
:
'John Brown'
,
age
:
`12`
,
no
:
`12`
,
address
:
'New York No. 1 Lake ParkNew York No. 1 Lake Park'
,
beginTime
:
new
Date
().
toLocaleString
(),
endTime
:
new
Date
().
toLocaleString
(),
},
],
},
{
id
:
`l2-
${
index
}
-2`
,
name
:
'John Brown'
,
age
:
`2`
,
no
:
`
${
index
+
10
}
`
,
address
:
'New York No. 1 Lake ParkNew York No. 1 Lake Park'
,
beginTime
:
new
Date
().
toLocaleString
(),
endTime
:
new
Date
().
toLocaleString
(),
children
:
[
{
id
:
`l3-
${
index
}
-2-1`
,
name
:
'John Brown'
,
age
:
`21`
,
no
:
`21`
,
address
:
'New York No. 1 Lake ParkNew York No. 1 Lake Park'
,
beginTime
:
new
Date
().
toLocaleString
(),
endTime
:
new
Date
().
toLocaleString
(),
},
{
id
:
`l3-
${
index
}
-2-2`
,
name
:
'John Brown'
,
age
:
`22`
,
no
:
`22`
,
address
:
'New York No. 1 Lake ParkNew York No. 1 Lake Park'
,
beginTime
:
new
Date
().
toLocaleString
(),
endTime
:
new
Date
().
toLocaleString
(),
},
],
},
],
});
}
return
arr
;
})();
}
src/components/YearSelect/YearSelect.vue
View file @
de0dc863
...
@@ -7,15 +7,11 @@
...
@@ -7,15 +7,11 @@
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
unref
,
computed
,
onMounted
,
ref
,
reactive
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
BasicForm
,
useForm
,
FormActionType
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
,
FormActionType
}
from
'@/components/Form'
;
import
{
formSchema
}
from
'./project.data'
;
import
{
formSchema
}
from
'./project.data'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
const
projectId
=
ref
(
0
);
const
detailId
=
ref
(
0
);
const
formElRef
=
ref
<
Nullable
<
FormActionType
>>
(
null
);
const
formElRef
=
ref
<
Nullable
<
FormActionType
>>
(
null
);
const
stype
=
ref
(
null
);
const
[
registerForm
,
{
resetFields
,
setFieldsValue
,
validate
,
updateSchema
}]
=
useForm
({
const
[
registerForm
,
{
resetFields
,
setFieldsValue
,
validate
,
updateSchema
}]
=
useForm
({
labelWidth
:
90
,
labelWidth
:
90
,
baseColProps
:
{
span
:
24
},
baseColProps
:
{
span
:
24
},
...
...
src/components/yearModal/yearModal.vue
0 → 100644
View file @
de0dc863
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
title=
"选择填报周期"
:minHeight=
"30"
okText=
"新建"
@
ok=
"handleSubmit"
@
cancel=
"handleVisibleChange"
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
nextTick
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
let
schemas
=
reactive
<
FormSchema
[]
>
([]);
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
});
const
emit
=
defineEmits
([
'close'
]);
const
modelRef
=
ref
({});
const
[
registerForm
,
{
getFieldsValue
,
validate
,
// // setFieldsValue,
// // setProps
},
]
=
useForm
({
labelWidth
:
120
,
schemas
:
schemas
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
data
&&
onDataReceive
(
data
);
});
function
onDataReceive
(
data
)
{
console
.
log
(
'Data Received'
,
data
);
data
.
data
.
map
((
i
)
=>
{
if
(
i
==
'year'
)
{
schemas
.
push
({
field
:
'year'
,
label
:
''
,
component
:
'DatePicker'
,
required
:
true
,
componentProps
:
{
placeholder
:
'年份'
,
picker
:
'year'
,
valueFormat
:
'YYYY'
,
format
:
'YYYY'
,
style
:
{
width
:
'100%'
,
},
},
colProps
:
{
span
:
11
,
offset
:
1
},
});
}
if
(
i
==
'month'
)
{
schemas
.
push
({
field
:
'month'
,
label
:
''
,
component
:
'DatePicker'
,
required
:
true
,
componentProps
:
{
placeholder
:
'月份'
,
picker
:
'month'
,
valueFormat
:
'YYYY-MM'
,
format
:
'YYYY-MM'
,
style
:
{
width
:
'100%'
,
},
},
colProps
:
{
span
:
11
,
offset
:
1
},
});
}
if
(
i
==
'quarter'
)
{
schemas
.
push
({
field
:
'quarter'
,
label
:
''
,
required
:
true
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'季度'
,
options
:
[
{
label
:
'第一季度'
,
value
:
'第一季度'
,
},
{
label
:
'第二季度'
,
value
:
'第二季度'
,
},
{
label
:
'第三季度'
,
value
:
'第三季度'
,
},
{
label
:
'第四季度'
,
value
:
'第四季度'
,
},
],
},
colProps
:
{
span
:
11
,
offset
:
1
},
});
}
});
// 方式1;
// setFieldsValue({
// field2: data.data,
// field1: data.info,
// });
// // 方式2
// modelRef.value = { field2: data.data, field1: data.info };
// setProps({
// model:{ field2: data.data, field1: data.info }
// })
}
function
handleVisibleChange
(
v
)
{
schemas
=
[];
}
function
handleSubmit
()
{
validate
().
then
(()
=>
{
const
value
=
getFieldsValue
();
console
.
log
(
value
);
schemas
=
[];
console
.
log
(
'submit'
);
emit
(
'close'
,
value
);
// closeModal();
});
}
</
script
>
src/views/changeSignature/addChangeSignature.vue
View file @
de0dc863
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<template
#
extra
>
<template
#
extra
>
<a-button
type=
"primary"
@
click=
"handleSubmit"
v-if=
"showSubmit"
>
提交
</a-button>
<a-button
type=
"primary"
@
click=
"handleSubmit"
v-if=
"showSubmit"
>
提交
</a-button>
<a-button
type=
"default"
@
click=
"router.back()"
>
返回
</a-button>
<a-button
type=
"default"
@
click=
"router.back()"
>
返回
</a-button>
<!--
<a-button
type=
"success"
@
click=
"examine"
v-if=
"isUpdate == false && routerId >0"
>
审核
</a-button>
-->
<!--
<a-button
type=
"success"
@
click=
"examine"
v-if=
"isUpdate == false && routerId >0"
>
审核
</a-button>
-->
</
template
>
</
template
>
<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
>
...
@@ -121,7 +121,7 @@ onMounted(async () => {
...
@@ -121,7 +121,7 @@ onMounted(async () => {
tabsFormSchema
.
push
(
item
);
tabsFormSchema
.
push
(
item
);
contentAdd
(
item
.
Form
[
1
],
source
,
source
.
contractList
[
0
].
amountInvested
)
contentAdd
(
item
.
Form
[
1
],
source
,
source
.
contractList
[
0
].
amountInvested
)
//合同名称集合
//合同名称集合
let
contractList
=
[]
let
contractList
=
[]
for
(
let
j
=
0
;
j
<
source
.
contractList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
source
.
contractList
.
length
;
j
++
)
{
const
sourceItem
=
source
.
contractList
[
j
];
const
sourceItem
=
source
.
contractList
[
j
];
console
.
log
(
sourceItem
,
"数据查看"
)
console
.
log
(
sourceItem
,
"数据查看"
)
...
@@ -190,29 +190,29 @@ async function handleNew(info: any) {
...
@@ -190,29 +190,29 @@ async function handleNew(info: any) {
};
};
const
index
=
tabsFormSchema
.
findIndex
(
obj
=>
obj
.
projectId
===
info
.
projectId
);
const
index
=
tabsFormSchema
.
findIndex
(
obj
=>
obj
.
projectId
===
info
.
projectId
);
const
contractList
=
formData
.
value
.
management
[
index
].
contract
const
contractList
=
formData
.
value
.
management
[
index
].
contract
if
(
contractList
.
some
(
obj
=>
obj
.
contractId
===
info
.
id
)){
if
(
contractList
.
some
(
obj
=>
obj
.
contractId
===
info
.
id
)){
console
.
log
(
"id相同"
,
contractList
[
index
])
console
.
log
(
"id相同"
,
contractList
[
index
])
}
}
else
{
else
{
for
(
let
i
=
0
;
i
<
contractList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
contractList
.
length
;
i
++
)
{
if
(
contractList
[
i
].
contractId
!==
info
.
id
)
{
if
(
contractList
[
i
].
contractId
!==
info
.
id
)
{
console
.
log
(
"id不相同"
,
contractList
[
i
])
console
.
log
(
"id不相同"
,
contractList
[
i
])
contractName
.
value
[
index
].
contractNameList
.
push
(
info
.
contrcatName
)
contractName
.
value
[
index
].
contractNameList
.
push
(
info
.
contrcatName
)
tabsFormSchema
[
index
].
ContentFormList
.
push
(
item
);
tabsFormSchema
[
index
].
ContentFormList
.
push
(
item
);
if
(
isUpdate
){
if
(
isUpdate
){
formData
.
value
.
management
[
index
].
contract
.
push
({
formData
.
value
.
management
[
index
].
contract
.
push
({
contractId
:
info
.
id
,
contractId
:
info
.
id
,
proChngeVisaQuarterId
:
routerId
.
value
proChngeVisaQuarterId
:
routerId
.
value
});
});
}
}
else
{
else
{
formData
.
value
.
management
[
index
].
contract
.
push
({
formData
.
value
.
management
[
index
].
contract
.
push
({
contractId
:
info
.
id
,
contractId
:
info
.
id
,
});
});
}
}
}
}
}
}
}
}
}
else
{
}
else
{
const
contentItem
=
{
const
contentItem
=
{
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
),
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
),
...
@@ -266,7 +266,7 @@ async function handleNew(info: any) {
...
@@ -266,7 +266,7 @@ async function handleNew(info: any) {
}
}
}
}
//提交
//提交
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
//构建数据
//构建数据
const
data
=
{
const
data
=
{
management
:
""
,
management
:
""
,
...
@@ -284,7 +284,7 @@ async function handleNew(info: any) {
...
@@ -284,7 +284,7 @@ async function handleNew(info: any) {
}
}
let
item
=
tabsFormSchema
[
i
];
let
item
=
tabsFormSchema
[
i
];
const
{
validate
}
=
item
.
Form
[
1
];
const
{
validate
}
=
item
.
Form
[
1
];
const
data
=
await
validate
();
const
data
=
await
validate
();
await
handleNewContent
(
item
.
Form
[
1
])
await
handleNewContent
(
item
.
Form
[
1
])
const
{
getFieldsValue
}
=
item
.
Form
[
1
]
const
{
getFieldsValue
}
=
item
.
Form
[
1
]
contrantData
.
projectId
=
tabsFormSchema
[
i
].
projectId
;
contrantData
.
projectId
=
tabsFormSchema
[
i
].
projectId
;
...
@@ -292,7 +292,7 @@ async function handleNew(info: any) {
...
@@ -292,7 +292,7 @@ async function handleNew(info: any) {
for
(
let
j
=
0
;
j
<
item
.
ContentFormList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
item
.
ContentFormList
.
length
;
j
++
)
{
let
content
=
item
.
ContentFormList
[
j
]
let
content
=
item
.
ContentFormList
[
j
]
const
{
getFieldsValue
}
=
content
.
ContentFormList
[
1
]
const
{
getFieldsValue
}
=
content
.
ContentFormList
[
1
]
await
handleNewContent
(
content
.
ContentFormList
[
1
])
await
handleNewContent
(
content
.
ContentFormList
[
1
])
let
res
=
getFieldsValue
();
let
res
=
getFieldsValue
();
if
(
!
isUpdate
){
if
(
!
isUpdate
){
let
itemConetnt
=
Object
.
assign
let
itemConetnt
=
Object
.
assign
...
@@ -312,7 +312,7 @@ async function handleNew(info: any) {
...
@@ -312,7 +312,7 @@ async function handleNew(info: any) {
management
.
push
(
contrantData
)
management
.
push
(
contrantData
)
}
}
data
.
management
=
management
;
data
.
management
=
management
;
//新增接口
//新增接口
if
(
routerId
.
value
){
if
(
routerId
.
value
){
const
res
=
updateItem
(
data
)
const
res
=
updateItem
(
data
)
createMessage
.
success
(
'提交成功!'
);
createMessage
.
success
(
'提交成功!'
);
...
@@ -364,10 +364,10 @@ async function handleAdd() {
...
@@ -364,10 +364,10 @@ async function handleAdd() {
}
}
// 校验方法
// 校验方法
function
handleNewContent
(
params
)
{
function
handleNewContent
(
params
)
{
const
{
validate
}
=
params
;
const
{
validate
}
=
params
;
const
data
=
validate
()
const
data
=
validate
()
return
data
;
return
data
;
}
}
async
function
handleSuccess
(
params
:
any
)
{
async
function
handleSuccess
(
params
:
any
)
{
...
...
src/views/changeSignature/changeSignatrue.data.ts
View file @
de0dc863
...
@@ -284,7 +284,7 @@ export const Content: FormSchema[] = [
...
@@ -284,7 +284,7 @@ export const Content: FormSchema[] = [
field
:
'changeNumber'
,
field
:
'changeNumber'
,
label
:
'变更编号'
,
label
:
'变更编号'
,
required
:
true
,
required
:
true
,
component
:
'
InputNumber
'
,
component
:
'
input
'
,
colProps
:
{
span
:
7
,
offset
:
1
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
},
{
{
...
@@ -320,7 +320,7 @@ export const Content: FormSchema[] = [
...
@@ -320,7 +320,7 @@ export const Content: FormSchema[] = [
field
:
'responsibleParty'
,
field
:
'responsibleParty'
,
label
:
'责任方'
,
label
:
'责任方'
,
required
:
true
,
required
:
true
,
component
:
'
InputNumber
'
,
component
:
'
input
'
,
colProps
:
{
span
:
7
,
offset
:
1
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
},
{
{
...
@@ -344,7 +344,7 @@ export const Content: FormSchema[] = [
...
@@ -344,7 +344,7 @@ export const Content: FormSchema[] = [
label
:
'预估变更金额占合同金额比例:'
,
label
:
'预估变更金额占合同金额比例:'
,
labelWidth
:
"300px"
,
labelWidth
:
"300px"
,
required
:
true
,
required
:
true
,
component
:
'
InputNumber
'
,
component
:
'
input
'
,
colProps
:
{
span
:
7
,
offset
:
1
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
},
//签证编号:
//签证编号:
...
@@ -352,7 +352,7 @@ export const Content: FormSchema[] = [
...
@@ -352,7 +352,7 @@ export const Content: FormSchema[] = [
field
:
'visaNumber'
,
field
:
'visaNumber'
,
label
:
'签证编号:'
,
label
:
'签证编号:'
,
required
:
true
,
required
:
true
,
component
:
'
InputNumber
'
,
component
:
'
input
'
,
colProps
:
{
span
:
7
,
offset
:
1
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
},
//签证类型:
//签证类型:
...
@@ -360,7 +360,7 @@ export const Content: FormSchema[] = [
...
@@ -360,7 +360,7 @@ export const Content: FormSchema[] = [
field
:
'visaType'
,
field
:
'visaType'
,
label
:
'签证类型:'
,
label
:
'签证类型:'
,
required
:
true
,
required
:
true
,
component
:
'
InputNumber
'
,
component
:
'
input
'
,
colProps
:
{
span
:
7
,
offset
:
1
},
colProps
:
{
span
:
7
,
offset
:
1
},
},
},
...
...
src/views/changeSignature/index.vue
View file @
de0dc863
...
@@ -55,20 +55,21 @@
...
@@ -55,20 +55,21 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
yearModal
from
'@/components/yearModal.vue'
;
import
yearModal
from
'@/components/yearModal/yearModal.vue'
;
const
{
createMessage
}
=
useMessage
();
const
{
push
}
=
useRouter
();
const
{
push
}
=
useRouter
();
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
const
[
register
,
{
openModal
:
openModal
,
closeModal
:
closeModal
}]
=
useModal
();
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getSettlementManageList
,
auditItem
,
deleteList
}
from
'@/api/changeSignatrue/changeSignatrue'
;
import
{
getSettlementManageList
,
auditItem
,
deleteList
,
checkQuarter
}
from
'@/api/changeSignatrue/changeSignatrue'
;
import
{
import
{
columns
,
columns
,
searchFormSchema
,
searchFormSchema
,
}
from
'@/views/changeSignature/changeSignatrue.data'
;
}
from
'@/views/changeSignature/changeSignatrue.data'
;
import
{
Tag
}
from
"ant-design-vue"
;
import
{
Tag
}
from
"ant-design-vue"
;
import
{
router
}
from
"@/router"
;
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"
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
}]
=
useTable
({
api
:
getSettlementManageList
,
api
:
getSettlementManageList
,
...
@@ -121,11 +122,23 @@ function handleEdit(record: Recordable,isUpdate:boolean){
...
@@ -121,11 +122,23 @@ function handleEdit(record: Recordable,isUpdate:boolean){
});
});
}
}
//新建变更签证管理 页面跳转
//新建变更签证管理 页面跳转
function
handleNew
(
e
){
async
function
handleNew
(
e
){
push
({
const
secrch
:
dateType
=
{
path
:
'/changeSignature/edit'
,
givenYear
:
e
.
year
,
query
:
e
,
quarter
:
e
.
quarter
});
}
const
res
=
await
checkQuarter
(
secrch
)
if
(
!
res
){
closeModal
()
push
({
path
:
'/changeSignature/edit'
,
query
:
e
,
});
}
else
{
createMessage
.
error
(
"该季度已结算,请选择其他季度"
);
}
}
}
async
function
examine
(
record
:
Recordable
,
disabled
:
boolean
)
{
async
function
examine
(
record
:
Recordable
,
disabled
:
boolean
)
{
const
id
=
record
.
id
const
id
=
record
.
id
...
@@ -133,6 +146,14 @@ async function examine(record: Recordable, disabled: boolean) {
...
@@ -133,6 +146,14 @@ async function examine(record: Recordable, disabled: boolean) {
console
.
log
(
res
)
console
.
log
(
res
)
reload
();
reload
();
}
}
//搜索类型
type
dateType
=
{
givenYear
:
string
,
quarter
:
string
}
</
script
>
</
script
>
<
style
scoped
lang=
"less"
></
style
>
<
style
scoped
lang=
"less"
></
style
>
src/views/contract/contractDrawer.vue
View file @
de0dc863
...
@@ -93,12 +93,8 @@
...
@@ -93,12 +93,8 @@
}
}
// TODO custom api
// TODO custom api
console
.
log
(
values
);
console
.
log
(
values
);
let
res
=
await
addItem
(
values
);
let
res
=
await
addItem
(
values
);
console
.
log
(
res
,
"合同查看"
)
console
.
log
(
res
);
console
.
log
(
res
);
closeDrawer
();
closeDrawer
();
emit
(
'success'
,
res
);
emit
(
'success'
,
res
);
}
finally
{
}
finally
{
...
...
src/views/settlementManagement/index.vue
View file @
de0dc863
...
@@ -15,10 +15,6 @@
...
@@ -15,10 +15,6 @@
<
template
v-if=
"column.key === 'action'"
>
<
template
v-if=
"column.key === 'action'"
>
<TableAction
v-if=
"record.statusResult == '0'"
<TableAction
v-if=
"record.statusResult == '0'"
:actions=
"[
:actions=
"[
//
{
// label: '详情',
// onClick: handleEdit.bind(null, record,false),
// },
{
{
label: '审核',
label: '审核',
color: 'success',
color: 'success',
...
@@ -59,17 +55,18 @@
...
@@ -59,17 +55,18 @@
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
yearModal
from
'@/components/yearModal.vue'
;
import
yearModal
from
'@/components/yearModal
/yearModal
.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
const
{
push
}
=
useRouter
();
const
{
push
}
=
useRouter
();
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
onMounted
}
from
"vue"
import
{
onMounted
}
from
"vue"
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
const
[
register
,
{
openModal
:
openModal
,
closeModal
:
closeModal
}]
=
useModal
();
import
{
getSettlementManageList
,
auditItem
,
deleteLis
,
getDepartmentList
}
from
'@/api/project/settlementManage'
;
import
{
getSettlementManageList
,
auditItem
,
deleteLis
,
getDepartmentList
,
isSettlement
}
from
'@/api/project/settlementManage'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
router
}
from
"@/router"
;
const
{
createMessage
}
=
useMessage
()
;
import
{
Tag
}
from
"ant-design-vue"
;
import
{
Tag
}
from
"ant-design-vue"
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
defineOptions
({
name
:
'SettlementManagement'
});
defineOptions
({
name
:
'SettlementManagement'
});
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
}]
=
useTable
({
...
@@ -135,15 +132,35 @@ function handleSuccess() {
...
@@ -135,15 +132,35 @@ function handleSuccess() {
reload
();
reload
();
}
}
const
handleNew
=
(
e
)
=>
{
// 关闭弹出框
const
handleNew
=
(
e
)
=>
{
console
.
log
(
e
);
console
.
log
(
e
);
push
({
type
dateType
=
{
path
:
'/settlementManagement/edit'
,
givenYear
:
string
,
query
:
{
quarter
:
string
quarter
:
e
.
quarter
,
year
:
e
.
year
,
add
:
"add"
}
}
});
const
search
:
dateType
=
{
givenYear
:
e
.
year
,
quarter
:
e
.
quarter
}
// 判断是否已结算
isSettlement
(
search
).
then
(
res
=>
{
if
(
res
){
createMessage
.
error
(
"该季度已结算,请选择其他季度"
);
return
}
else
{
push
({
path
:
'/settlementManagement/edit'
,
query
:
{
quarter
:
e
.
quarter
,
year
:
e
.
year
,
add
:
"add"
}
});
closeModal
()
}
});
};
};
</
script
>
</
script
>
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