Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
komatsu-lease-app
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
komatsu
komatsu-lease-app
Commits
8b847b37
Commit
8b847b37
authored
Jan 12, 2023
by
WangRui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feature]项目查询页面调整
parent
81eb1ef4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
48 deletions
+34
-48
index.js
src/modules/projectList/store/index.js
+8
-5
index.vue
src/modules/projectList/views/index.vue
+15
-10
plan.vue
src/modules/projectList/views/plan.vue
+4
-1
projectForm.vue
src/modules/projectList/views/projectForm.vue
+7
-32
No files found.
src/modules/projectList/store/index.js
View file @
8b847b37
const
state
=
{};
import
{
ref
,
computed
}
from
'vue'
import
{
defineStore
}
from
'pinia'
export
default
{
namespaced
:
true
,
state
,
};
export
const
useProjectList
=
defineStore
(
'formStore'
,
()
=>
{
const
contractId
=
ref
(
''
)
return
{
contractId
}
})
src/modules/projectList/views/index.vue
View file @
8b847b37
...
...
@@ -8,7 +8,7 @@
<PullRefresh
v-model=
"refreshing"
@
refresh=
"getList"
class=
"scroll"
>
<List
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"loadApproval"
>
<ListItem
v-for=
"item in listValue"
:other_title=
"item.other_title"
:title=
"item.title"
:values=
"item.values"
@
click=
"jump"
/>
@
click=
"jump
(item.contractId)
"
/>
</List>
</PullRefresh>
</section>
...
...
@@ -25,7 +25,9 @@ import ListItem from '@/components/ListItem.vue'
import
Plus
from
'@/components/Plus.vue'
import
api
from
"../api"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useProjectList
}
from
"../store"
;
const
formStore
=
useProjectList
()
// const listValue = $ref([
// {
// title: '2204-DB001-001',
...
...
@@ -42,18 +44,20 @@ let listValue = $ref([]);
const
getList
=
async
()
=>
{
// 下拉重置参数,重新加载
let
list
=
await
api
.
getProjectList
({
userId
:
window
.
localStorage
.
getItem
(
'userId'
)});
if
(
list
.
result
===
'SUCCESS'
){
list
=
list
.
data
.
map
(
item
=>
({
let
res
=
await
api
.
getProjectList
({
userId
:
window
.
localStorage
.
getItem
(
'userId'
)});
console
.
log
(
'hha'
,
res
);
let
list
=
[]
if
(
res
.
success
){
list
=
res
.
rows
.
map
(
item
=>
({
...
item
,
title
:
item
.
i
ntention
Number
,
other_title
:
item
.
creationDate
.
split
(
' '
)[
0
],
values
:
[[
"机型"
,
"状态"
,
"代理店"
],
[
item
.
model
,
item
.
intentionStatusN
,
item
.
agen
t
BpName
]]
title
:
item
.
i
temProject
Number
,
other_title
:
item
.
creationDate
?
.
split
(
' '
)[
0
],
values
:
[[
"机型"
,
"状态"
,
"代理店"
],
[
item
.
model
,
item
.
intentionStatusN
,
item
.
agen
cy
BpName
]]
}))
}
else
{
list
=
[];
}
listValue
=
list
.
reverse
()
;
listValue
=
list
;
refreshing
=
false
;
};
getList
();
...
...
@@ -64,8 +68,9 @@ const loadApproval = () => {
}
const
router
=
useRouter
();
const
jump
=
()
=>
{
router
.
push
({
name
:
'projectList-views-projectForm'
})
const
jump
=
(
id
)
=>
{
formStore
.
contractId
=
id
;
router
.
push
({
name
:
'projectList-views-projectForm'
})
}
</
script
>
...
...
src/modules/projectList/views/plan.vue
View file @
8b847b37
...
...
@@ -51,8 +51,10 @@ import RepayPlan from '@/components/RepayPlan.vue'
import
{
Icon
}
from
'vant'
import
{
useRouter
}
from
'vue-router'
import
api
from
"../api"
;
import
{
useProjectList
}
from
"../store"
;
const
router
=
useRouter
()
const
formStore
=
useProjectList
()
let
currencyObj
=
$ref
({
// financingCurrency: '200,000.00',
// headerCurrency: '5,000.00',
...
...
@@ -62,7 +64,8 @@ let currencyObj = $ref({
let
cashflow
=
[]
const
getRepayPlanInfo
=
async
()
=>
{
const
result
=
await
api
.
getRepaymentDetails
({
"contractId"
:
"777"
})
// "contractId": "777"
const
result
=
await
api
.
getRepaymentDetails
({
"contractId"
:
formStore
.
contractId
})
if
(
result
.
message
===
'请求成功'
){
const
rows
=
result
.
rows
[
0
];
currencyObj
=
{
...
...
src/modules/projectList/views/projectForm.vue
View file @
8b847b37
...
...
@@ -23,9 +23,13 @@ import AuFormClass from "@/components/useAuForm";
import
GuarantorList
from
'../components/GuarantorList.vue'
import
{
onActivated
}
from
"vue"
;
import
api
from
"../api"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useProjectList
}
from
"../store"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
const
route
=
useRoute
();
const
router
=
useRouter
();
const
formStore
=
useProjectList
()
const
formBaseConfigArr
=
[
{
title
:
'合同编号'
,
...
...
@@ -279,9 +283,8 @@ const formleaseInfoConfig = $ref(new AuFormClass(formleaseInfoArr))
let
contractId
=
$ref
(
null
);
const
projectInfoDetail
=
async
()
=>
{
// 下拉重置参数,重新加载
let
result
=
await
api
.
getProjectDetail
({
"contractId"
:
"777"
});
console
.
log
(
'list==='
,
result
);
console
.
log
(
'url'
,
formStore
.
contractId
);
let
result
=
await
api
.
getProjectDetail
({
"contractId"
:
formStore
.
contractId
});
if
(
result
.
success
)
{
let
rows
=
result
.
rows
;
let
baseInfo
=
[];
...
...
@@ -331,37 +334,9 @@ const projectInfoDetail = async () => {
projectInfoDetail
();
// const setup = (props,ctx) => {
// // const router = useRouter();
// //router是全局路由对象,route= userRoute()是当前路由对象
// let router = useRouter();
// let gotoRepayPlan = () => {
// console.log('hhaha')
// router.push({
// //传递参数使用query的话,指定path或者name都行,但使用params的话,只能使用name指定
// // path:'/home',
// // query:{
// // num:1
// // }
// name: 'repayPlan-views-plan',
// params: {
// contractId: '777'
// }
// });
// }
// return{
// gotoRepayPlan
// }
// }
const
router
=
useRouter
();
const
gotoRepayPlan
=
()
=>
{
console
.
log
(
contractId
);
router
.
push
({
name
:
'projectList-views-plan'
,
query
:
{
contractId
:
contractId
}
})
}
...
...
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