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
af969a4d
Commit
af969a4d
authored
Sep 23, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 收费单优化
parent
96e7742d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
23 deletions
+179
-23
components.d.ts
+1
-0
src/mocp/components/global-number-input/global-number-input.vue
+94
-0
src/pages/modules/mocp/panel/electronicBill/deicing/add.vue
+80
-12
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/add.vue
+0
-0
src/pages/modules/mocp/panel/electronicBill/routineWork/add.vue
+4
-11
No files found.
components.d.ts
View file @
af969a4d
...
...
@@ -23,6 +23,7 @@ declare module 'vue' {
GlobalField
:
typeof
import
(
'./src/mocp/components/global-field/global-field.vue'
)[
'default'
]
GlobalIcon
:
typeof
import
(
'./src/mocp/components/global-icon/global-icon.vue'
)[
'default'
]
GlobalNavbar
:
typeof
import
(
'./src/mocp/components/global-navbar/global-navbar.vue'
)[
'default'
]
GlobalNumberInput
:
typeof
import
(
'./src/mocp/components/global-number-input/global-number-input.vue'
)[
'default'
]
GlobalPage
:
typeof
import
(
'./src/mocp/components/global-page/global-page.vue'
)[
'default'
]
GlobalPageSwiper
:
typeof
import
(
'./src/mocp/components/global-page-swiper/global-page-swiper.vue'
)[
'default'
]
GlobalPageSwiperItem
:
typeof
import
(
'./src/mocp/components/global-page-swiper-item/global-page-swiper-item.vue'
)[
'default'
]
...
...
src/mocp/components/global-number-input/global-number-input.vue
0 → 100644
View file @
af969a4d
<
template
>
<!-- 数字输入框 -->
<up-input
v-model=
"inputVal"
type=
"number"
:inputAlign=
"inputAlign"
:border=
"border"
:placeholder=
"placeholder"
:clearable=
"clearable"
@
change=
"change"
@
blur=
"blur"
></up-input>
</
template
>
<
script
setup
>
import
{
ref
,
watch
}
from
'vue'
const
es
=
defineEmits
([
'update:modelValue'
,
'change'
])
const
ps
=
defineProps
({
modelValue
:
{
type
:
[
Number
,
String
],
default
:
null
},
inputAlign
:
{
type
:
String
,
default
:
'right'
},
border
:
{
type
:
String
,
default
:
'none'
},
placeholder
:
{
type
:
String
,
default
:
'请输入'
},
clearable
:
{
type
:
Boolean
,
default
:
true
},
precision
:
{
type
:
Number
,
default
:
0
},
min
:
{
type
:
Number
,
default
:
0
},
max
:
{
type
:
Number
,
default
:
Infinity
},
// 大于
greater
:
{
type
:
Number
,
default
:
-
Infinity
}
})
const
inputVal
=
ref
(
ps
.
modelValue
)
watch
(
()
=>
ps
.
modelValue
,
(
newValue
)
=>
{
inputVal
.
value
=
newValue
}
)
const
change
=
(
value
)
=>
{
if
(
value
.
includes
(
'.'
))
{
if
(
ps
.
precision
===
0
)
{
value
=
value
.
replace
(
'.'
,
''
)
}
else
{
const
nums
=
String
(
value
).
split
(
'.'
)
if
(
nums
[
1
].
length
>=
ps
.
precision
)
{
value
=
nums
[
0
]
+
'.'
+
nums
[
1
].
substring
(
0
,
ps
.
precision
)
}
}
}
let
val
=
value
?
parseFloat
(
value
)
:
''
if
(
val
<
ps
.
min
||
val
>
ps
.
max
)
{
val
=
Math
.
min
(
Math
.
max
(
val
,
ps
.
min
),
ps
.
max
)
}
setTimeout
(()
=>
{
inputVal
.
value
=
val
es
(
'update:modelValue'
,
val
)
},
10
)
}
const
blur
=
(
value
)
=>
{
if
(
parseFloat
(
value
)
<=
ps
.
greater
)
{
setTimeout
(()
=>
{
inputVal
.
value
=
''
es
(
'update:modelValue'
,
''
)
},
10
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/pages/modules/mocp/panel/electronicBill/deicing/add.vue
View file @
af969a4d
...
...
@@ -76,9 +76,19 @@
</up-form-item>
<up-form-item
label=
"自定义混合比"
prop=
"deicingMix"
:borderBottom=
"true"
v-if=
"formData.deicingMix == 'Other'"
>
<view
style=
"display: flex; align-items: center"
>
<up-input
type=
"number"
v-model=
"formData.deicingMix1"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.deicingMix1"
placeholder=
"请输入"
inputAlign=
"left"
border=
"surround"
></global-number-input>
<text
style=
"margin: 0 20rpx"
>
:
</text>
<up-input
type=
"number"
v-model=
"formData.deicingMix2"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.deicingMix2"
placeholder=
"请输入"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
</up-form-item>
<view
class=
"sample-table"
>
...
...
@@ -104,7 +114,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.deicingQuantity1"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.deicingQuantity1"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
@@ -121,7 +137,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.deicingQuantity2"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.deicingQuantity2"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
@@ -138,7 +160,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.deicingQuantity3"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.deicingQuantity3"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
@@ -155,7 +183,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.deicingQuantity4"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.deicingQuantity4"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
@@ -212,9 +246,19 @@
</up-form-item>
<up-form-item
label=
"自定义混合比"
prop=
"antiicingMix"
:borderBottom=
"true"
v-if=
"formData.antiicingMix == 'Other'"
>
<view
style=
"display: flex; align-items: center"
>
<up-input
type=
"number"
v-model=
"formData.antiicingMix1"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.antiicingMix1"
placeholder=
"请输入"
inputAlign=
"left"
border=
"surround"
></global-number-input>
<text
style=
"margin: 0 20rpx"
>
:
</text>
<up-input
type=
"number"
v-model=
"formData.antiicingMix2"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.antiicingMix2"
placeholder=
"请输入"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
</up-form-item>
<view
class=
"sample-table"
>
...
...
@@ -240,7 +284,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.antiicingQuantity1"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.antiicingQuantity1"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
@@ -257,7 +307,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.antiicingQuantity2"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.antiicingQuantity2"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
@@ -274,7 +330,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.antiicingQuantity3"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.antiicingQuantity3"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
@@ -291,7 +353,13 @@
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
<up-input
type=
"number"
v-model=
"formData.antiicingQuantity4"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.antiicingQuantity4"
:greater=
"0"
:precision=
"2"
inputAlign=
"left"
border=
"surround"
></global-number-input>
</view>
<view
class=
"spacer"
></view>
<view
class=
"sample-tbody-td"
>
...
...
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/add.vue
View file @
af969a4d
This diff is collapsed.
Click to expand it.
src/pages/modules/mocp/panel/electronicBill/routineWork/add.vue
View file @
af969a4d
...
...
@@ -72,23 +72,16 @@
<view
class=
"mocp-title"
>
设备使用记录
</view>
<view
class=
"mocp-form"
>
<up-form-item
label=
"电源车(单位/小时)"
prop=
"groundPower"
:borderBottom=
"true"
>
<
up-input
type=
"number"
v-model=
"formData.groundPower"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up
-input>
<
global-number-input
v-model=
"formData.groundPower"
></global-number
-input>
</up-form-item>
<up-form-item
label=
"气源车(单位/次)"
prop=
"airStarter"
:borderBottom=
"true"
>
<
up-input
type=
"number"
v-model=
"formData.airStarter"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up
-input>
<
global-number-input
v-model=
"formData.airStarter"
></global-number
-input>
</up-form-item>
<up-form-item
label=
"牵引车(单位/次)"
prop=
"towPus"
:borderBottom=
"true"
>
<
up-input
type=
"number"
v-model=
"formData.towPus"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up
-input>
<
global-number-input
v-model=
"formData.towPus"
></global-number
-input>
</up-form-item>
<up-form-item
label=
"空调车(单位/小时)"
prop=
"airConditioning"
:borderBottom=
"true"
>
<up-input
type=
"number"
v-model=
"formData.airConditioning"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
<global-number-input
v-model=
"formData.airConditioning"
></global-number-input>
</up-form-item>
<up-form-item
label=
"其他"
prop=
"others1"
:borderBottom=
"true"
>
<up-input
v-model=
"formData.others1"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
...
...
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