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
2eebd1d3
Commit
2eebd1d3
authored
Dec 10, 2025
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(电子账单): 添加机型类别自动判断功能
在添加除冰电子账单页面,当选择机型时自动判断并设置机型类别。将原本在组件中的判断逻辑提取到公共函数中,便于复用和维护。宽体机判断前缀列表也进行了更新和优化。
parent
9dc45f32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
13 deletions
+25
-13
src/pages/modules/mocp/panel/electronicBill/deicing/add.vue
+11
-13
src/pages/modules/mocp/panel/electronicBill/deicing/constants/add.functionals.js
+14
-0
No files found.
src/pages/modules/mocp/panel/electronicBill/deicing/add.vue
View file @
2eebd1d3
...
@@ -45,7 +45,15 @@
...
@@ -45,7 +45,15 @@
<global-picker
pickAlign=
"right"
v-model=
"formData.weatherToday"
dictkey=
"eb_weatherToday"
clearable
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.weatherToday"
dictkey=
"eb_weatherToday"
clearable
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机型"
prop=
"model"
:borderBottom=
"true"
required
>
<up-form-item
label=
"机型"
prop=
"model"
:borderBottom=
"true"
required
>
<global-picker
v-model=
"formData.model"
pickAlign=
"right"
:options=
"allAcType"
clearable
filter
customize
></global-picker>
<global-picker
v-model=
"formData.model"
pickAlign=
"right"
:options=
"allAcType"
@
change=
"changeModel"
clearable
filter
customize
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机型类别"
prop=
"modelType"
:borderBottom=
"true"
required
>
<up-form-item
label=
"机型类别"
prop=
"modelType"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.modelType"
dictkey=
"eb_modelType"
clearable
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.modelType"
dictkey=
"eb_modelType"
clearable
></global-picker>
...
@@ -679,7 +687,8 @@ import {
...
@@ -679,7 +687,8 @@ import {
getAntiicingFile
,
getAntiicingFile
,
confirmAntiicing2
,
confirmAntiicing2
,
getAntiicing2File
,
getAntiicing2File
,
submitAntiicing2
submitAntiicing2
,
changeModel
}
from
'./constants/add.functionals'
}
from
'./constants/add.functionals'
import
{
onUnmounted
,
watch
,
watchEffect
}
from
'vue'
import
{
onUnmounted
,
watch
,
watchEffect
}
from
'vue'
import
{
getTerminalSelect
}
from
'mocp/utils/permission'
import
{
getTerminalSelect
}
from
'mocp/utils/permission'
...
@@ -776,17 +785,6 @@ watch([() => formData.antiicing2QuantityTotal, () => formData.weatherToday, () =
...
@@ -776,17 +785,6 @@ watch([() => formData.antiicing2QuantityTotal, () => formData.weatherToday, () =
antiicing2File
.
value
=
[]
antiicing2File
.
value
=
[]
}
}
})
})
// 海航集团内部的宽体机——A330-,787-,747-,777-,A350-,其余为窄体,集团外部机型-机型类别无对应数据需要手动选择
const
prefixes
=
[
'A330-'
,
'787-'
,
'747-'
,
'777-'
,
'A350-'
]
watchEffect
(()
=>
{
if
(
formData
.
model
)
{
if
(
prefixes
.
some
((
prefix
)
=>
formData
.
model
.
startsWith
(
prefix
)))
{
formData
.
modelType
=
'1'
}
else
{
formData
.
modelType
=
'2'
}
}
})
onUnmounted
(()
=>
{
onUnmounted
(()
=>
{
resetData
()
resetData
()
})
})
...
...
src/pages/modules/mocp/panel/electronicBill/deicing/constants/add.functionals.js
View file @
2eebd1d3
...
@@ -25,6 +25,7 @@ export const changeAcreg = async (acreg) => {
...
@@ -25,6 +25,7 @@ export const changeAcreg = async (acreg) => {
if
(
res
.
data
?.
actype
)
{
if
(
res
.
data
?.
actype
)
{
formData
.
model
=
res
.
data
.
actype
formData
.
model
=
res
.
data
.
actype
}
}
setModelType
()
if
(
res
.
data
?.
flightNo
)
{
if
(
res
.
data
?.
flightNo
)
{
formData
.
flightNoIn
=
res
.
data
.
flightNo
formData
.
flightNoIn
=
res
.
data
.
flightNo
formData
.
flightNoOut
=
res
.
data
.
flightNo
formData
.
flightNoOut
=
res
.
data
.
flightNo
...
@@ -33,6 +34,19 @@ export const changeAcreg = async (acreg) => {
...
@@ -33,6 +34,19 @@ export const changeAcreg = async (acreg) => {
uni
.
$mocpMessage
.
error
(
res
.
message
)
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
}
}
export
const
changeModel
=
(
model
)
=>
{
setModelType
(
model
)
}
// 海航集团内部的宽体机——'A33','330', '787', '747', '777', '350','A35',其余为窄体,集团外部机型-机型类别无对应数据需要手动选择
const
prefixes
=
[
'A33'
,
'330'
,
'787'
,
'747'
,
'777'
,
'350'
,
'A35'
]
export
const
setModelType
=
()
=>
{
if
(
!
formData
.
model
)
return
if
(
prefixes
.
some
((
prefix
)
=>
formData
.
model
.
includes
(
prefix
)))
{
formData
.
modelType
=
'1'
}
else
{
formData
.
modelType
=
'2'
}
}
export
const
getDeicingFile
=
(
value
)
=>
{
export
const
getDeicingFile
=
(
value
)
=>
{
deicingFile
.
value
=
value
deicingFile
.
value
=
value
}
}
...
...
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