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
344202ed
Commit
344202ed
authored
Nov 13, 2022
by
cx49085
Browse files
增加变量,控制条件,普通查询和同意拒绝之间的耦合;重置数据并且发起请求
parent
28c692ea
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/views/pettyMoney/addPettyMoneyRecord.vue
View file @
344202ed
...
@@ -114,7 +114,7 @@ export default {
...
@@ -114,7 +114,7 @@ export default {
this
.
$message
.
success
(
"
修改成功
"
)
this
.
$message
.
success
(
"
修改成功
"
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$router
.
push
(
'
/pettyMoneyRecord
'
)
this
.
$router
.
push
(
'
/pettyMoneyRecord
'
)
},
10
00
);
},
5
00
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
)
this
.
$message
.
error
(
res
.
msg
)
}
}
...
@@ -126,7 +126,7 @@ export default {
...
@@ -126,7 +126,7 @@ export default {
this
.
$message
.
success
(
"
申请成功
"
)
this
.
$message
.
success
(
"
申请成功
"
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$router
.
push
(
'
/pettyMoneyRecord
'
)
this
.
$router
.
push
(
'
/pettyMoneyRecord
'
)
},
10
00
);
},
5
00
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
)
this
.
$message
.
error
(
res
.
msg
)
}
}
...
...
src/views/pettyMoney/components/examinePetty.vue
View file @
344202ed
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-search"
@
click=
"getexamineList(true)"
>
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-search"
@
click=
"getexamineList(true)"
>
查询
查询
</el-button>
</el-button>
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"examineQuery =
{}">重置
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"examineQuery =
{}
;getexamineList(false)
">重置
</el-button>
</el-button>
<!--
<el-button
size=
"medium"
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"dialogTableVisible = true"
>
添加合同
</el-button>
-->
<!--
<el-button
size=
"medium"
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"dialogTableVisible = true"
>
添加合同
</el-button>
-->
</el-form-item>
</el-form-item>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<div
class=
"footer"
>
<div
class=
"footer"
>
<el-pagination
@
current-change=
"getexamineList"
:current-page.sync=
"examinePageQuery.pageNum"
<el-pagination
@
current-change=
"getexamineList
()
"
:current-page.sync=
"examinePageQuery.pageNum"
:page-size=
"examinePageQuery.pageSize"
layout=
"total, prev, pager, next"
:page-size=
"examinePageQuery.pageSize"
layout=
"total, prev, pager, next"
:total=
"examinePageQuery.total"
>
:total=
"examinePageQuery.total"
>
</el-pagination>
</el-pagination>
...
@@ -181,6 +181,7 @@ export default {
...
@@ -181,6 +181,7 @@ export default {
pageSize
:
10
,
pageSize
:
10
,
total
:
0
total
:
0
},
},
isConditionSelect
:
false
,
approveResult
,
approveResult
,
pettyStates
,
pettyStates
,
examineList
:
[],
examineList
:
[],
...
@@ -192,16 +193,24 @@ export default {
...
@@ -192,16 +193,24 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getexamineList
()
this
.
getexamineList
(
false
)
},
},
methods
:
{
methods
:
{
getexamineList
(
isCondition
)
{
getexamineList
(
isCondition
Select
)
{
const
params
=
{
const
params
=
{
...
this
.
examinePageQuery
,
...
this
.
examinePageQuery
,
companyId
:
this
.
companyId
companyId
:
this
.
companyId
}
}
//不能确定是不是条件查询,则根据上一个查询方式进行条件查询或者一般查询
if
(
isConditionSelect
===
undefined
||
isConditionSelect
===
''
){
this
.
isConditionSelect
&&
Object
.
assign
(
params
,
this
.
examineQuery
)
//确定是某种查询方式,则更新标记,作为下一次查询的标准
}
else
{
this
.
isConditionSelect
=
isConditionSelect
isConditionSelect
&&
Object
.
assign
(
params
,
this
.
examineQuery
)
}
//组件重用,利用tag来区分查询条件
this
.
tag
===
'
unapprove
'
&&
(
params
.
pettyApproval
=
0
)
this
.
tag
===
'
unapprove
'
&&
(
params
.
pettyApproval
=
0
)
isCondition
&&
Object
.
assign
(
params
,
this
.
examineQuery
)
selectCompanyPettyRecord
(
params
).
then
(
res
=>
{
selectCompanyPettyRecord
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
const
{
list
,
total
,
repaymentCount
,
approvalPending
}
=
res
.
data
const
{
list
,
total
,
repaymentCount
,
approvalPending
}
=
res
.
data
...
...
src/views/pettyMoney/components/examineRepay.vue
View file @
344202ed
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-search"
@
click=
"getexamineRepayList(true)"
>
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-search"
@
click=
"getexamineRepayList(true)"
>
查询
查询
</el-button>
</el-button>
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"examineQuery =
{}">重置
<el-button
size=
"medium"
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"examineQuery =
{}
; getexamineRepayList(false)
">重置
</el-button>
</el-button>
<!--
<el-button
size=
"medium"
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"dialogTableVisible = true"
>
添加合同
</el-button>
-->
<!--
<el-button
size=
"medium"
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"dialogTableVisible = true"
>
添加合同
</el-button>
-->
</el-form-item>
</el-form-item>
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button-group>
<el-button-group>
<el-button
type=
"success"
size=
"mini"
@
click=
"agree(scope.row)"
>
同意
</el-button>
<el-button
type=
"success"
size=
"mini"
@
click=
"agree(scope.row)"
>
同意
</el-button>
<el-button
type=
"warning"
size=
"mini"
>
驳回
</el-button>
<el-button
type=
"warning"
size=
"mini"
@
click=
"disagree(scope.row)"
>
驳回
</el-button>
<!--
<el-button
type=
"primary"
size=
"mini"
>
详情
</el-button>
-->
<!--
<el-button
type=
"primary"
size=
"mini"
>
详情
</el-button>
-->
</el-button-group>
</el-button-group>
<!--
<el-button
type=
"text"
<!--
<el-button
type=
"text"
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<div
class=
"footer"
>
<div
class=
"footer"
>
<el-pagination
@
current-change=
"getexamineRepayList"
:current-page.sync=
"examinePageQuery.pageNum"
<el-pagination
@
current-change=
"getexamineRepayList
()
"
:current-page.sync=
"examinePageQuery.pageNum"
:page-size=
"examinePageQuery.pageSize"
layout=
"total, prev, pager, next"
:page-size=
"examinePageQuery.pageSize"
layout=
"total, prev, pager, next"
:total=
"examinePageQuery.total"
>
:total=
"examinePageQuery.total"
>
</el-pagination>
</el-pagination>
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
'
vuex
'
import
{
selectUnrepay
,
agreeRepay
}
from
'
@/api/pettyMoney
'
import
{
selectUnrepay
,
agreeRepay
,
rejectRepay
}
from
'
@/api/pettyMoney
'
import
{
approveResult
,
pettyStates
}
from
'
../pettyMoneyStaticData
'
import
{
approveResult
,
pettyStates
}
from
'
../pettyMoneyStaticData
'
export
default
{
export
default
{
props
:[
'
pettyApproval
'
],
props
:[
'
pettyApproval
'
],
...
@@ -101,6 +101,7 @@ export default {
...
@@ -101,6 +101,7 @@ export default {
pettyName
:
''
,
pettyName
:
''
,
pettyApproval
:
''
,
pettyApproval
:
''
,
},
},
isConditionSelect
:
false
,
examinePageQuery
:
{
examinePageQuery
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -113,15 +114,22 @@ export default {
...
@@ -113,15 +114,22 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getexamineRepayList
()
this
.
getexamineRepayList
(
false
)
},
},
methods
:
{
methods
:
{
getexamineRepayList
(
isCondition
)
{
getexamineRepayList
(
isCondition
Select
)
{
const
params
=
{
const
params
=
{
...
this
.
examinePageQuery
,
...
this
.
examinePageQuery
,
companyId
:
this
.
companyId
companyId
:
this
.
companyId
}
}
isCondition
&&
Object
.
assign
(
params
,
this
.
examineQuery
)
//不能确定是不是条件查询,则根据上一个查询方式进行条件查询或者一般查询
if
(
isConditionSelect
===
undefined
||
isConditionSelect
===
''
){
this
.
isConditionSelect
&&
Object
.
assign
(
params
,
this
.
examineQuery
)
//确定是某种查询方式,则更新标记,作为下一次查询的标准
}
else
{
this
.
isConditionSelect
=
isConditionSelect
isConditionSelect
&&
Object
.
assign
(
params
,
this
.
examineQuery
)
}
selectUnrepay
(
params
).
then
(
res
=>
{
selectUnrepay
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
const
{
list
,
total
}
=
res
.
data
const
{
list
,
total
}
=
res
.
data
...
@@ -146,7 +154,7 @@ export default {
...
@@ -146,7 +154,7 @@ export default {
// return
// return
// }
// }
agree
(
data
){
agree
(
data
){
const
{
repaymentId
,
repaymentApproval
,
pettyId
}
=
data
const
{
repaymentId
,
pettyId
}
=
data
const
params
=
{
const
params
=
{
operationId
:
this
.
urId
,
operationId
:
this
.
urId
,
repaymentId
,
repaymentId
,
...
@@ -161,6 +169,22 @@ export default {
...
@@ -161,6 +169,22 @@ export default {
}
}
})
})
},
disagree
(
data
){
const
{
repaymentId
,
pettyId
}
=
data
const
params
=
{
operationId
:
this
.
urId
,
repaymentId
,
repaymentApproval
:
2
,
pettyId
,
}
rejectRepay
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
getexamineRepayList
()
}
else
{
this
.
$message
.
error
(
"
操作失败
"
)
}
})
}
}
}
}
}
}
...
...
src/views/pettyMoney/pettyMoneyRecord.vue
View file @
344202ed
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"getPettyMoneyList(true)"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"getPettyMoneyList(true)"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"pettyMoneyQuery =
{}">重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"pettyMoneyQuery =
{}
; getPettyMoneyList(false)
">重置
</el-button>
<!--
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"dialogTableVisible = true"
>
添加合同
</el-button>
-->
<!--
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"dialogTableVisible = true"
>
添加合同
</el-button>
-->
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</el-table>
</el-table>
</div>
</div>
<div
class=
"footer"
>
<div
class=
"footer"
>
<el-pagination
@
current-change=
"getPettyMoneyList"
:current-page.sync=
"pettyMoneyPageQuery.pageNum"
<el-pagination
@
current-change=
"getPettyMoneyList
()
"
:current-page.sync=
"pettyMoneyPageQuery.pageNum"
:page-size=
"pettyMoneyPageQuery.pageSize"
layout=
"total, prev, pager, next"
:page-size=
"pettyMoneyPageQuery.pageSize"
layout=
"total, prev, pager, next"
:total=
"pettyMoneyPageQuery.total"
>
:total=
"pettyMoneyPageQuery.total"
>
</el-pagination>
</el-pagination>
...
@@ -162,6 +162,7 @@ export default {
...
@@ -162,6 +162,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
pettyMoneyQuery
:
{},
pettyMoneyQuery
:
{},
isConditionSelect
:
false
,
pettyMoneyPageQuery
:
{
pettyMoneyPageQuery
:
{
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
,
pageNum
:
1
,
...
@@ -178,7 +179,7 @@ export default {
...
@@ -178,7 +179,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getPettyMoneyList
()
this
.
getPettyMoneyList
(
false
)
},
},
methods
:
{
methods
:
{
checkRepayMoney
(
rule
,
value
,
callback
)
{
checkRepayMoney
(
rule
,
value
,
callback
)
{
...
@@ -191,13 +192,20 @@ export default {
...
@@ -191,13 +192,20 @@ export default {
callback
();
callback
();
}
}
},
},
getPettyMoneyList
(
isCondition
=
false
)
{
getPettyMoneyList
(
isCondition
Select
)
{
const
params
=
{
const
params
=
{
...
this
.
pettyMoneyPageQuery
,
...
this
.
pettyMoneyPageQuery
,
companyId
:
this
.
companyId
,
companyId
:
this
.
companyId
,
userId
:
this
.
urId
userId
:
this
.
urId
}
}
isCondition
&&
Object
.
assign
(
params
,
this
.
pettyMoneyQuery
)
//不能确定是不是条件查询,则根据上一个查询方式进行条件查询或者一般查询
if
(
isConditionSelect
===
undefined
||
isConditionSelect
===
''
){
this
.
isConditionSelect
&&
Object
.
assign
(
params
,
this
.
pettyMoneyQuery
)
//确定是某种查询方式,则更新标记,作为下一次查询的标准
}
else
{
this
.
isConditionSelect
=
isConditionSelect
isConditionSelect
&&
Object
.
assign
(
params
,
this
.
pettyMoneyQuery
)
}
selectSelfPettyRecord
(
params
).
then
(
res
=>
{
selectSelfPettyRecord
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
pettyMoneyPageQuery
.
total
=
res
.
data
.
total
this
.
pettyMoneyPageQuery
.
total
=
res
.
data
.
total
...
...
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