Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
柳 佳乐
finance
Commits
611a85d0
Commit
611a85d0
authored
Nov 08, 2022
by
cx49085
Browse files
增加合同的接口调试
parent
7ec49759
Changes
2
Show whitespace changes
Inline
Side-by-side
src/views/contract/components/addContract.vue
View file @
611a85d0
...
...
@@ -8,7 +8,7 @@
<div
class=
"container"
>
<el-form>
<el-descriptions
:column=
"3"
border
class=
"contract-description-form"
>
<el-descriptions-item
label=
"母合同名称"
:span=
"3"
v-if=
"formData.contractNature ===
'2'
"
>
<el-descriptions-item
label=
"母合同名称"
:span=
"3"
v-if=
"
parseInt(
formData.contractNature
)
===
2
"
>
<el-select
v-model=
"formData.contractParent"
:style=
"
{ width: '100%' }" placeholder="请选择母合同名称">
<el-option
v-for=
"(item, index) in contractParentList"
:key=
"item.contractId"
:value=
"item.contractId"
:label=
"item.name"
></el-option>
...
...
@@ -157,7 +157,7 @@ export default {
contarctRemarks
:
'
'
,
contractStartTime
:
''
,
contractFirstParty
:
''
,
contractMoney
:
0
,
contractMoney
:
"
0
"
,
contractNumber
:
''
,
contractPaetyb
:
''
,
contractEndTime
:
''
,
...
...
@@ -203,14 +203,11 @@ export default {
if
(
this
.
$route
.
path
.
indexOf
(
'
/editContract
'
)
>=
0
&&
contractId
)
{
this
.
isEdit
=
true
;
this
.
getContractDetail
(
contractId
)
// getCon
// 添加
}
else
if
(
this
.
$route
.
path
.
indexOf
(
'
/addContract
'
)
>=
0
&&
this
.
$route
.
query
.
checkedContractNature
!==
undefined
)
{
this
.
isEdit
=
false
;
if
(
this
.
$route
.
query
.
checkedContractNature
.
toString
()
===
'
2
'
)
{
this
.
getParentContractList
()
//获取母合同列表
}
else
{
}
}
else
{
this
.
$router
.
back
()
...
...
@@ -243,19 +240,19 @@ export default {
companyId
:
this
.
companyId
||
this
.
$store
.
getters
.
companyId
,
...
this
.
formData
}
const
toNumberKeys
=
[
'
contractNature
'
,
'
contractParent
'
,
'
contractMoney
'
]
toNumberKeys
.
forEach
(
key
=>
{
params
[
key
]
=
Number
(
params
[
key
])
})
//
const toNumberKeys = ['contractNature','contractParent','contractMoney']
//
toNumberKeys.forEach(key => {
//
params[key] = Number(params[key])
//
})
!
this
.
formData
.
contarctRemarks
&&
(
params
.
contarctRemarks
=
'
'
)
if
(
!
this
.
isEdit
)
{
addContract
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
"
成功添加合同
"
)
this
.
addContractFile
(
res
.
i
d
)
//
setTimeout(() => {
//
this.$router.push({path: '/contractList'})
//
}, 1
5
00);
this
.
addContractFile
(
res
.
d
ata
)
setTimeout
(()
=>
{
this
.
$router
.
push
({
path
:
'
/contractList
'
})
},
1
0
00
);
}
else
{
this
.
$message
.
warning
(
"
添加合同失败
"
)
}
...
...
@@ -266,8 +263,8 @@ export default {
if
(
res
.
success
)
{
this
.
$message
.
success
(
"
成功修改合同
"
)
setTimeout
(()
=>
{
//
this.$router.push({path: '/contractList'})
},
1
5
00
);
this
.
$router
.
push
({
path
:
'
/contractList
'
})
},
1
0
00
);
}
else
{
this
.
$message
.
warning
(
"
添加修改失败
"
)
}
...
...
@@ -354,7 +351,7 @@ export default {
delete
requiredParams
.
contractParent
//非母合同
}
for
(
const
key
in
requiredParams
)
{
if
(
!
requiredParams
[
key
]){
if
(
!
requiredParams
[
key
]
&&
requiredParams
[
key
]
!==
0
){
result
.
push
(
key
)
}
}
...
...
src/views/contract/contractList.vue
View file @
611a85d0
...
...
@@ -2,7 +2,7 @@
<div
class=
"main"
>
<div
class=
"header"
>
<el-form
:inline=
"true"
:model=
"contractQuery"
>
<el-form-item>
<!--
<el-form-item>
<el-select
v-model=
"type"
placeholder=
"合同类别"
>
<el-option
v-for=
"item in typeList"
...
...
@@ -31,10 +31,10 @@
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
-->
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"qurey()"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"reset()"
>
重置
</el-button>
<!--
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"qurey()"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"reset()"
>
重置
</el-button>
-->
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"dialogTableVisible = true"
>
添加合同
</el-button>
</el-form-item>
</el-form>
...
...
@@ -52,15 +52,16 @@
<!-- <el-table-column prop="companyName" label="状态"/> -->
<el-table-column
prop=
"contractNumber"
label=
"合同编号"
width=
"120px"
/>
<el-table-column
prop=
"contractName"
label=
"合同名称"
width=
"200px"
/>
<el-table-column
label=
"合同类
别
"
>
<el-table-column
label=
"合同类
型
"
>
<
template
slot-scope=
"scope"
>
<!--
{{
Object
.
values
(
contractTypeList
.
find
(
item
=>
item
.
id
===
scope
.
row
.
typeId
)).
toString
()
}}
-->
{{
contractTypeList
.
find
(
item
=>
item
.
id
===
scope
.
row
.
typeId
)
&&
contractTypeList
.
find
(
item
=>
item
.
id
=
scope
.
row
.
typeId
).
name
}}
<!--
{{
Object
.
values
(
contractTypeList
.
find
(
item
=>
item
.
id
===
scope
.
row
.
typeId
))
}}
-->
{{
contractTypeList
.
find
(
item
=>
item
.
id
===
scope
.
row
.
typeId
)
&&
contractTypeList
.
find
(
item
=>
item
.
id
===
scope
.
row
.
typeId
).
name
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"contractNature"
label=
"合同性质"
>
<
template
slot-scope=
"scope"
>
{{
contractNatures
[
scope
.
row
.
typeId
]
}}
{{
contractNatures
[
scope
.
row
.
contractNature
]
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"contractMoney"
label=
"合同金额/元"
/>
...
...
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