Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mocp-uniapp
Overview
Overview
Details
Activity
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
pangchong
mocp-uniapp
Commits
e4690ef6
Commit
e4690ef6
authored
Jul 19, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: AOG开发
parent
853ceb29
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
604 additions
and
7 deletions
+604
-7
components.d.ts
+1
-0
src/main.js
+5
-0
src/mocp/api/aog.js
+63
-0
src/mocp/components/global-card/global-card.vue
+77
-0
src/mocp/store/aog.js
+150
-2
src/mocp/store/assign-work.js
+6
-2
src/pages.json
+12
-0
src/pages/modules/mocp/panel/aog/components/text-status.vue
+38
-0
src/pages/modules/mocp/panel/aog/constants/details.scss
+70
-0
src/pages/modules/mocp/panel/aog/details.vue
+101
-3
src/pages/modules/mocp/panel/aog/material-details.vue
+50
-0
src/pages/modules/mocp/panel/aog/material-list.vue
+31
-0
No files found.
components.d.ts
View file @
e4690ef6
...
...
@@ -14,6 +14,7 @@ declare module 'vue' {
GlobalAlbum
:
typeof
import
(
'./src/mocp/components/global-album/global-album.vue'
)[
'default'
]
GlobalButton
:
typeof
import
(
'./src/mocp/components/global-button/global-button.vue'
)[
'default'
]
GlobalCalendar
:
typeof
import
(
'./src/mocp/components/global-calendar/global-calendar.vue'
)[
'default'
]
GlobalCard
:
typeof
import
(
'./src/mocp/components/global-card/global-card.vue'
)[
'default'
]
GlobalCheckbox
:
typeof
import
(
'./src/mocp/components/global-checkbox/global-checkbox.vue'
)[
'default'
]
GlobalDate
:
typeof
import
(
'./src/mocp/components/global-date/global-date.vue'
)[
'default'
]
GlobalEmpty
:
typeof
import
(
'./src/mocp/components/global-empty/global-empty.vue'
)[
'default'
]
...
...
src/main.js
View file @
e4690ef6
...
...
@@ -37,6 +37,11 @@ export function createApp() {
activeColor
:
'#165dff'
,
labelColor
:
'#1D2129'
,
labelSize
:
16
},
cell
:
{
titleStyle
:
{
color
:
'#1D2129'
}
}
}
})
...
...
src/mocp/api/aog.js
View file @
e4690ef6
...
...
@@ -8,3 +8,66 @@ export const getAogListApi = (data, config) => {
config
})
}
export
const
getWorkBenchListApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/workbench/getWorkBenchList'
,
data
,
config
})
}
export
const
getAogDisposalPlanApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/getAogDisposalPlan'
,
data
,
config
})
}
export
const
getAogMaterialListApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/getAogMaterialList'
,
data
,
config
})
}
export
const
getAogSupBaseApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/getAogSupBase'
,
data
,
config
})
}
export
const
getAogConstructionApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/getAogConstruction'
,
data
,
config
})
}
export
const
getAogOtherSupApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/getAogOtherSup'
,
data
,
config
})
}
export
const
updateAogMaterialApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/updateAogMaterial'
,
data
,
config
})
}
src/mocp/components/global-card/global-card.vue
0 → 100644
View file @
e4690ef6
<
template
>
<view
class=
"global-card"
:class=
"class"
:style=
"style"
>
<view
class=
"global-card-title"
>
<view
class=
"left"
>
<view
class=
"txt"
>
{{
title
}}
</view>
</view>
<view
class=
"right"
@
tap=
"handleTitleClick"
>
<view
class=
"txt"
>
{{
titleSuffix
}}
</view>
<up-icon
name=
"arrow-right"
size=
"16"
></up-icon>
</view>
</view>
<view
class=
"global-card-content"
>
<slot></slot>
</view>
</view>
</
template
>
<
script
setup
>
const
es
=
defineEmits
([
'handleTitleClick'
])
const
ps
=
defineProps
({
class
:
{
type
:
String
,
default
:
''
},
style
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
},
title
:
{
type
:
String
,
default
:
''
},
titleSuffix
:
{
type
:
String
,
default
:
''
}
})
const
handleTitleClick
=
()
=>
{
es
(
'handleTitleClick'
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
.global-card
{
background
:
#fff
;
border-radius
:
12
rpx
;
padding
:
24
rpx
;
margin-top
:
16
rpx
;
&-title
{
padding-bottom
:
16
rpx
;
border-bottom
:
2
rpx
solid
#f4f4f4
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.left
{
font-size
:
34
rpx
;
.txt
{
color
:
$
mocp-text-5
;
}
}
.right
{
display
:
flex
;
align-items
:
center
;
.txt
{
color
:
$
mocp-text-4
;
margin-right
:
16
rpx
;
}
}
}
&
-content
{
padding-top
:
16
rpx
;
line-height
:
40
rpx
;
color
:
$
mocp-text-4
;
}
}
</
style
>
src/mocp/store/aog.js
View file @
e4690ef6
import
{
defineStore
}
from
'pinia'
import
{
getAogConstructionApi
,
getAogDisposalPlanApi
,
getAogMaterialListApi
,
getAogOtherSupApi
,
getAogSupBaseApi
,
getWorkBenchListApi
}
from
'mocp/api/aog'
const
useAogStore
=
defineStore
(
'aog'
,
{
state
:
()
=>
{
...
...
@@ -18,11 +26,151 @@ const useAogStore = defineStore('aog', {
happenAddr
:
''
,
faultDesc
:
''
},
details
:
undefined
details
:
undefined
,
workBench
:
undefined
,
//工作台详情
disposalPlan
:
[],
//处置方案
avData
:
[],
//航材
toolData
:
[],
//工具
materialIndex
:
-
1
,
//航材(或工具)详情的下标
materialType
:
1
,
//1-航材,2-工具
pData
:
[],
//人员
bbData
:
[],
//施工情况
oData
:
[]
//其他特殊保障
}
},
getters
:
{
getAvStatus
(
state
)
{
let
avStatus
=
3
if
(
state
.
avData
&&
state
.
avData
.
length
)
{
if
(
state
.
avData
.
every
((
a
)
=>
a
.
actualArrivalTime
))
{
avStatus
=
2
}
else
if
(
state
.
avData
.
some
((
a
)
=>
a
.
actualArrivalTime
))
{
avStatus
=
1
}
else
{
avStatus
=
0
}
}
return
avStatus
},
getToolStatus
(
state
)
{
let
toolStatus
=
3
if
(
state
.
toolData
&&
state
.
toolData
.
length
)
{
if
(
state
.
toolData
.
every
((
a
)
=>
a
.
actualArrivalTime
))
{
toolStatus
=
2
}
else
if
(
state
.
toolData
.
some
((
a
)
=>
a
.
actualArrivalTime
))
{
toolStatus
=
1
}
else
{
toolStatus
=
0
}
}
return
toolStatus
},
getPersonnelStatus
(
state
)
{
let
personnelStatus
=
3
if
(
state
.
pData
&&
state
.
pData
.
length
)
{
if
(
state
.
pData
.
every
((
a
)
=>
a
.
realityCompleteTime
))
{
personnelStatus
=
2
}
else
if
(
state
.
pData
.
some
((
a
)
=>
a
.
realityCompleteTime
))
{
personnelStatus
=
1
}
else
{
personnelStatus
=
0
}
}
return
personnelStatus
},
getBbStatus
(
state
)
{
let
bbStatus
=
3
if
(
state
.
bbData
&&
state
.
bbData
.
length
)
{
if
(
state
.
bbData
.
every
((
a
)
=>
a
.
realityCompleteTime
))
{
bbStatus
=
2
}
else
if
(
state
.
bbData
.
some
((
a
)
=>
a
.
realityCompleteTime
))
{
bbStatus
=
1
}
else
{
bbStatus
=
0
}
}
return
bbStatus
},
getOtherStatus
(
state
)
{
let
otherStatus
=
3
if
(
state
.
oData
.
every
((
a
)
=>
a
===
null
||
!
a
.
id
))
{
otherStatus
=
3
}
else
{
if
(
state
.
oData
.
every
((
a
)
=>
a
.
realityCompleteTime
))
{
otherStatus
=
2
}
else
if
(
state
.
oData
.
some
((
a
)
=>
a
.
realityCompleteTime
))
{
otherStatus
=
1
}
else
{
otherStatus
=
0
}
}
return
otherStatus
},
getMaterialData
(
state
)
{
if
(
state
.
materialType
==
1
)
{
return
state
.
avData
}
else
{
return
state
.
toolData
}
},
getMaterialDetails
(
state
)
{
if
(
state
.
materialIndex
>=
0
)
{
if
(
state
.
materialType
==
1
)
{
return
state
.
avData
[
state
.
materialIndex
]
}
else
{
return
state
.
toolData
[
state
.
materialIndex
]
}
}
else
{
return
undefined
}
}
},
getters
:
{},
actions
:
{
async
getWorkBenchList
()
{
const
res
=
await
getWorkBenchListApi
({
workbenchId
:
this
.
details
.
workbenchId
})
if
(
res
.
code
==
200
)
{
this
.
workBench
=
res
.
data
?.
list
[
0
]
}
},
async
getAogDisposalPlan
()
{
const
res
=
await
getAogDisposalPlanApi
({
workbenchId
:
this
.
details
.
workbenchId
})
if
(
res
.
code
==
200
)
{
this
.
disposalPlan
=
res
.
data
}
},
async
getAogMaterialList
(
materialType
)
{
const
res
=
await
getAogMaterialListApi
({
workbenchId
:
this
.
details
.
workbenchId
,
materialType
})
if
(
res
.
code
==
200
)
{
if
(
materialType
==
1
)
{
this
.
avData
=
Object
.
values
(
res
.
data
.
materialMap
).
flat
()
}
else
if
(
materialType
==
2
)
{
this
.
toolData
=
Object
.
values
(
res
.
data
.
materialMap
).
flat
()
}
}
},
async
getAogSupBase
()
{
const
res
=
await
getAogSupBaseApi
({
workbenchId
:
this
.
details
.
workbenchId
})
if
(
res
.
code
==
200
)
{
this
.
pData
=
Object
.
values
(
res
.
data
.
mapList
).
flat
()
}
},
async
getAogConstruction
()
{
const
res
=
await
getAogConstructionApi
({
workbenchId
:
this
.
details
.
workbenchId
})
if
(
res
.
code
==
200
)
{
this
.
bbData
=
res
.
data
.
constructionList
}
},
async
getAogOtherSup
()
{
const
res
=
await
getAogOtherSupApi
({
workbenchId
:
this
.
details
.
workbenchId
})
if
(
res
.
code
==
200
)
{
this
.
oData
=
Object
.
entries
(
res
.
data
).
reduce
((
q
,
w
)
=>
{
if
(
w
[
0
]
!==
'otherData'
)
{
q
.
push
(
w
[
1
])
}
return
q
},
[])
}
},
resetForm
()
{
this
.
searchData
=
{
state
:
'1'
,
...
...
src/mocp/store/assign-work.js
View file @
e4690ef6
...
...
@@ -50,8 +50,12 @@ const useAssignWorkStore = defineStore('assignWork', {
//是否回复人
isReplyUser
(
state
)
{
const
userStore
=
useUserStore
()
const
replyIds
=
JSON
.
parse
(
state
.
details
.
reply
)[
this
.
getArrangeWorkExtendIndex
].
map
((
item
)
=>
item
.
userId
)
return
replyIds
.
includes
(
userStore
.
userInfo
.
id
)
if
(
state
.
details
.
reply
)
{
const
replyIds
=
JSON
.
parse
(
state
.
details
.
reply
)[
this
.
getArrangeWorkExtendIndex
].
map
((
item
)
=>
item
.
userId
)
return
replyIds
.
includes
(
userStore
.
userInfo
.
id
)
}
else
{
return
false
}
},
//是否领导
isPresenterUser
(
state
)
{
...
...
src/pages.json
View file @
e4690ef6
...
...
@@ -259,6 +259,18 @@
"style"
:
{
"navigationBarTitleText"
:
"AOG详情"
}
},
{
"path"
:
"pages/modules/mocp/panel/aog/material-list"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/modules/mocp/panel/aog/material-details"
,
"style"
:
{
"navigationBarTitleText"
:
" "
}
}
],
"globalStyle"
:
{
...
...
src/pages/modules/mocp/panel/aog/components/text-status.vue
0 → 100644
View file @
e4690ef6
<
template
>
<text
:class=
"getStatus.class"
>
{{
getStatus
.
text
}}
</text>
</
template
>
<
script
setup
>
import
{
computed
}
from
'vue'
const
ps
=
defineProps
({
//0-未到位,1-部分到位,2-全部到位,3-无
status
:
{
type
:
Number
,
default
:
3
}
})
const
getStatus
=
computed
(
function
()
{
if
(
ps
.
status
===
1
)
{
return
{
text
:
'部分到位'
,
class
:
'mocp-color-primary-6'
}
}
if
(
ps
.
status
===
2
)
{
return
{
text
:
'全部到位'
,
class
:
'mocp-color-success-6'
}
}
if
(
ps
.
status
===
3
)
{
return
{
text
:
'无'
,
class
:
'mocp-color-text-4'
}
}
return
{
text
:
'未到位'
,
class
:
'mocp-color-warning-6'
}
})
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/pages/modules/mocp/panel/aog/constants/details.scss
View file @
e4690ef6
...
...
@@ -3,4 +3,74 @@
border-radius
:
12rpx
;
background
:
#ffffff
;
color
:
$mocp-text-4
;
&
-header
{
padding-bottom
:
16rpx
;
&
-top
{
display
:
flex
;
align-items
:
center
;
.right
{
.txt
{
margin-left
:
16rpx
;
font-size
:
32rpx
;
}
}
}
&
-footer
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
16rpx
;
.label
{
display
:
flex
;
align-items
:
center
;
.txt
{
margin-left
:
16rpx
;
}
}
.left
{
color
:
$mocp-primary-6
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.txt
{
color
:
$mocp-text-5
;
font-size
:
28rpx
;
margin-left
:
16rpx
;
&
:first-child
{
margin-left
:
0
;
}
}
}
}
}
&
-body
{
border-top
:
2rpx
solid
#f4f4f4
;
border-bottom
:
2rpx
solid
#f4f4f4
;
padding
:
16rpx
0
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
&
-footer
{
padding-top
:
16rpx
;
display
:
flex
;
align-items
:
center
;
.txt
{
margin-left
:
16rpx
;
color
:
$mocp-text-4
;
}
}
}
.card-details
{
color
:
$mocp-text-4
;
&
-item
{
margin-bottom
:
16rpx
;
.msg
{
margin-top
:
8rpx
;
font-size
:
30rpx
;
}
&
:last-child
{
margin-bottom
:
0
;
}
}
}
src/pages/modules/mocp/panel/aog/details.vue
View file @
e4690ef6
<
template
>
<global-page
:padding=
"24"
title=
"AOG详情"
></global-page>
<global-page
:padding=
"24"
title=
"AOG详情"
>
<template
v-if=
"details"
>
<view
class=
"details"
>
<view
class=
"details-header"
>
<view
class=
"details-header-top"
>
<view
class=
"left"
>
<custom-state
:value=
"useGetDictByValue('aog_state', details.state)"
:size=
"32"
></custom-state>
</view>
<view
class=
"right"
>
<text
class=
"txt mocp-color-text-5"
>
{{
details
.
aogNum
}}
</text>
</view>
</view>
<view
class=
"details-header-footer"
>
<view
class=
"left"
>
<text
class=
"txt u-line-1"
v-if=
"details.machineNumber"
>
{{
details
.
machineNumber
}}
</text>
<text
class=
"txt u-line-1"
v-if=
"details.model"
>
{{
details
.
model
}}
</text>
<text
class=
"txt u-line-1"
v-if=
"details.aviation"
>
{{
useGetDictByValue
(
''
,
details
.
aviation
,
{
data
:
baseStore
.
getAirlineSelect
}
)
}}
<
/text
>
<
/view
>
<
view
class
=
"right"
>
<
text
class
=
"txt u-line-1"
v
-
if
=
"details.terminal"
>
{{
details
.
terminal
}}
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"details-body"
>
<
global
-
field
label
=
"发动机型号:"
:
value
=
"workBench?.apuModel || '-'"
><
/global-field
>
<
global
-
field
label
=
"APU型号:"
:
value
=
"workBench?.engineModel || '-'"
><
/global-field
>
<
/view
>
<
view
class
=
"details-footer"
>
<
global
-
icon
icon
=
"calendar"
color
=
"#1D2129"
><
/global-icon
>
<
view
class
=
"txt"
>
{{
timeStampFormat
(
workBench
?.
createdTime
,
{
format
:
'YYYY/MM/DD'
}
)
}}
<
/view
>
<
/view
>
<
/view
>
<
global
-
card
title
=
"信息通报"
>
<
view
class
=
"card-details"
>
<
view
class
=
"card-details-item"
>
<
view
class
=
"title"
>
故障描述:
<
/view
>
<
view
class
=
"msg"
>
{{
details
.
faultDesc
||
'无'
}}
<
/view
>
<
/view
>
<
view
class
=
"card-details-item"
v
-
for
=
"(item, index) in disposalPlan"
:
key
=
"item.id"
>
<
view
class
=
"title"
>
{{
`处置方案${index + 1
}
`
}}
<
/view
>
<
view
class
=
"msg"
>
{{
item
.
planDesc
||
'无'
}}
<
/view
>
<
/view
>
<
/view
>
<
/global-card
>
<
global
-
card
title
=
"航材"
titleSuffix
=
"查看物流"
@
handleTitleClick
=
"goTo('/panel/aog/material-list', { materialType: 1
}
)"
>
<
text
-
status
:
status
=
"aogStore.getAvStatus"
><
/text-status
>
<
/global-card
>
<
global
-
card
title
=
"工具"
titleSuffix
=
"查看物流"
@
handleTitleClick
=
"goTo('/panel/aog/material-list', { materialType: 2
}
)"
>
<
text
-
status
:
status
=
"aogStore.getToolStatus"
><
/text-status
>
<
/global-card
>
<
global
-
card
title
=
"人员"
titleSuffix
=
"查看物流"
>
<
text
-
status
:
status
=
"aogStore.getPersonnelStatus"
><
/text-status
>
<
/global-card
>
<
global
-
card
title
=
"施工情况"
>
<
text
-
status
:
status
=
"aogStore.getBbStatus"
><
/text-status
>
<
/global-card
>
<
global
-
card
title
=
"其他特殊保障"
>
<
text
-
status
:
status
=
"aogStore.getOtherStatus"
><
/text-status
>
<
/global-card
>
<
/template
>
<
/global-page
>
<
/template
>
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
ref
}
from
'vue'
import
useAogStore
from
'mocp/store/aog'
import
useBaseStore
from
'mocp/store/base'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
TextStatus
from
'./components/text-status.vue'
const
baseStore
=
useBaseStore
()
const
aogStore
=
useAogStore
()
const
{
details
}
=
storeToRefs
(
aogStore
)
const
{
getWorkBenchList
,
getAogDisposalPlan
,
getAogMaterialList
,
getAogSupBase
,
getAogConstruction
,
getAogOtherSup
}
=
aogStore
const
{
details
,
disposalPlan
,
workBench
,
materialType
}
=
storeToRefs
(
aogStore
)
onLoad
(
async
()
=>
{
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
}
)
await
Promise
.
all
([
getWorkBenchList
(),
getAogDisposalPlan
(),
getAogMaterialList
(
1
),
getAogMaterialList
(
2
),
getAogSupBase
(),
getAogConstruction
(),
getAogOtherSup
()
])
uni
.
hideLoading
()
}
)
const
goTo
=
(
url
,
params
)
=>
{
if
(
params
)
{
uni
.
$mocpJump
.
navigateTo
(
url
,
params
).
then
(()
=>
{
aogStore
.
setState
(
'materialType'
,
params
.
materialType
)
}
)
}
else
{
uni
.
$mocpJump
.
navigateTo
(
url
)
}
}
uni
.
$on
(
'updateMaterialData'
,
()
=>
{
getAogMaterialList
(
materialType
.
value
)
}
)
<
/script
>
<
style
lang
=
"scss"
scoped
>
@
import
'./constants/details.scss'
;
...
...
src/pages/modules/mocp/panel/aog/material-details.vue
0 → 100644
View file @
e4690ef6
<
template
>
<global-page
title=
"航材进展详情"
showFooterBtn
@
handleFooterClick=
"handleFooterClick"
:footerBtnText=
"getMaterialDetails?.actualArrivalTime ? '取消到位' : '到位'"
>
<view
class=
"mocp-cell"
>
<up-cell-group
v-if=
"getMaterialDetails"
>
<up-cell
title=
"件号"
:value=
"getMaterialDetails.pn"
></up-cell>
<up-cell
title=
"名称"
:value=
"getMaterialDetails.name"
></up-cell>
<up-cell
title=
"需求数量"
:value=
"getMaterialDetails.quantity"
></up-cell>
<up-cell
title=
"属性"
:value=
"getMaterialDetails.aviationAttribute === '0' ? '周转件' : '消耗件'"
></up-cell>
<up-cell
title=
"备注"
:value=
"getMaterialDetails.remake"
></up-cell>
<up-cell
title=
"需求提出时间"
:value=
"getMaterialDetails.proposeDate || '-'"
></up-cell>
<up-cell
title=
"预计到位时间"
:value=
"getMaterialDetails.arrivalTime || '-'"
></up-cell>
<up-cell
title=
"总库存"
:value=
"getMaterialDetails.totalInventory"
></up-cell>
<up-cell
title=
"实际到位时间"
:value=
"getMaterialDetails.actualArrivalTime || '-'"
></up-cell>
</up-cell-group>
</view>
</global-page>
</
template
>
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
useAogStore
from
'mocp/store/aog'
import
{
updateAogMaterialApi
}
from
'mocp/api/aog'
const
aogStore
=
useAogStore
()
const
{
getMaterialDetails
}
=
storeToRefs
(
aogStore
)
const
handleFooterClick
=
async
()
=>
{
const
params
=
{
id
:
getMaterialDetails
.
value
.
id
,
actualArrivalTime
:
getMaterialDetails
.
value
.
actualArrivalTime
?
0
:
Date
.
now
()
}
const
res
=
await
updateAogMaterialApi
(
params
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
uni
.
$emit
(
'updateMaterialData'
)
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
background
:
#fff
;
}
</
style
>
src/pages/modules/mocp/panel/aog/material-list.vue
0 → 100644
View file @
e4690ef6
<
template
>
<global-page
:padding=
"24"
:title=
"getTitle"
>
<template
v-for=
"(item, index) in getMaterialData"
:key=
"item.id"
>
<global-card
:title=
"item.pn"
titleSuffix=
"查看详情"
@
handleTitleClick=
"goTo(index)"
>
{{
item
.
actualArrivalTime
?
'已到位'
:
'未到位'
}}
</global-card>
</
template
>
</global-page>
</template>
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
useAogStore
from
'mocp/store/aog'
import
{
computed
}
from
'vue'
const
aogStore
=
useAogStore
()
const
{
getMaterialData
,
materialType
}
=
storeToRefs
(
aogStore
)
const
goTo
=
(
index
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/aog/material-details'
).
then
(()
=>
{
aogStore
.
setState
(
'materialIndex'
,
index
)
})
}
const
getTitle
=
computed
(()
=>
{
if
(
materialType
.
value
==
1
)
{
return
'航材进展列表'
}
else
{
return
'工具进展列表'
}
})
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
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