Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
d14388e1
Commit
d14388e1
authored
Sep 08, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 【前后台】流水号限制长度8位数字,输入框提示:请填写交易流水号后8位数字
parent
4af0ed5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
92 deletions
+120
-92
XhInput.vue
src/components/createCom/XhInput.vue
+109
-84
complete.vue
src/pages/order/complete.vue
+11
-8
No files found.
src/components/createCom/XhInput.vue
View file @
d14388e1
<!-- ******************* 输入框 ******************* -->
<
template
>
<view
:style=
"
{'width': fieldsWidth}">
<u-input
:type=
"type"
class=
"input-item"
v-model=
"dataValue"
@
input=
"valueChange"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
:custom-style=
"customStyle"
:clearable=
"false"
:border=
"border"
border-color=
"#ECECEC"
:maxlength=
"maxlength"
:cursor-spacing=
"10"
:disabled=
"isDisabled"
hold-keyboard
/>
<view
class=
"content"
v-if=
"slotContent"
>
<text
class=
"txt"
>
{{
slotContent
}}
</text>
</view>
</view>
<view
:style=
"
{ width: fieldsWidth }">
<u-input
:type=
"type"
class=
"input-item"
v-model=
"dataValue"
@
input=
"valueChange"
:placeholder=
"placeholderText"
:placeholder-style=
"placeholderStyle"
:custom-style=
"customStyle"
:clearable=
"false"
:border=
"border"
border-color=
"#ECECEC"
:maxlength=
"maxlength"
:cursor-spacing=
"10"
:disabled=
"isDisabled"
hold-keyboard
/>
<view
class=
"content"
v-if=
"slotContent"
>
<text
class=
"txt"
>
{{
slotContent
}}
</text>
</view>
</view>
</
template
>
<
script
>
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhInput'
,
// 新建 input
components
:
{},
mixins
:
[
stringMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请输入'
},
item
:
{
type
:
Object
,
default
()
{
return
{}
}
},
type
:
{
type
:
String
,
default
:
'text'
},
slotContent
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
inputType
:
'text'
}
},
computed
:
{
maxlength
()
{
return
this
.
type
==
'digit'
?
9
:
140
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
placeholderStyle
()
{
return
'color:#999999;font-size:26rpx'
},
customStyle
()
{
return
{
'background-color'
:
this
.
backgroundColor
,
'border-radius'
:
'12rpx'
,
'color'
:
'#333333'
,
'padding-left'
:
this
.
textarea
?
'0rpx'
:
'20rpx'
,
'font-size'
:
'26rpx'
,
'height'
:
'76rpx'
}
},
border
()
{
return
this
.
textarea
},
textarea
()
{
return
this
.
inputType
==
'textarea'
},
backgroundColor
()
{
return
this
.
textarea
?
'transparent'
:
'#F4F5F7'
},
isDisabled
()
{
return
this
.
item
.
fieldsName
===
'pipeAmount'
||
this
.
disabled
?
true
:
false
}
},
watch
:
{},
mounted
()
{},
methods
:
{}
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhInput'
,
// 新建 input
components
:
{},
mixins
:
[
stringMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请输入'
,
},
item
:
{
type
:
Object
,
default
()
{
return
{}
},
},
type
:
{
type
:
String
,
default
:
'text'
,
},
slotContent
:
{
type
:
String
,
default
:
''
,
},
},
data
()
{
return
{
inputType
:
'text'
,
}
},
computed
:
{
isDigit
()
{
return
this
.
type
==
'digit'
},
maxlength
()
{
return
this
.
isDigit
?
9
:
(
this
.
isESerialNum
?
8
:
140
)
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
},
placeholderStyle
()
{
return
'color:#999999;font-size:26rpx'
},
customStyle
()
{
return
{
'background-color'
:
this
.
backgroundColor
,
'border-radius'
:
'12rpx'
,
color
:
'#333333'
,
'padding-left'
:
this
.
textarea
?
'0rpx'
:
'20rpx'
,
'font-size'
:
'26rpx'
,
height
:
'76rpx'
,
}
},
border
()
{
return
this
.
textarea
},
textarea
()
{
return
this
.
inputType
==
'textarea'
},
backgroundColor
()
{
return
this
.
textarea
?
'transparent'
:
'#F4F5F7'
},
isDisabled
()
{
return
this
.
item
.
fieldsName
===
'pipeAmount'
||
this
.
disabled
?
true
:
false
},
isESerialNum
()
{
return
this
.
item
.
fieldsName
===
'eSerialNum'
},
placeholderText
()
{
return
this
.
isESerialNum
?
'请填写交易流水号后8位数字'
:
this
.
placeholder
}
},
watch
:
{},
mounted
()
{},
methods
:
{},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.input-item
{
background
:
#F4F5F
7
;
}
.content
{
padding-top
:
20rpx
;
line-height
:
45rpx
;
.txt
{
font-size
:
24rpx
;
color
:
#999
;
}
}
.input-item
{
background
:
#f4f5f
7
;
}
.content
{
padding-top
:
20rpx
;
line-height
:
45rpx
;
.txt
{
font-size
:
24rpx
;
color
:
#999
;
}
}
</
style
>
src/pages/order/complete.vue
View file @
d14388e1
...
...
@@ -347,7 +347,7 @@ const formType = new Map([
[
'decimal'
,
[
'input'
,
'digit'
]],
[
'double'
,
[
'input'
,
'digit'
]],
[
'integer'
,
[
'input'
,
'digit'
]],
[
'string'
,
[
'input'
,
'
text
'
]],
[
'string'
,
[
'input'
,
'
number
'
]],
[
'jscode'
,
[
'input'
,
'text'
]],
[
'multiinput'
,
[
'multiinput'
,
'text'
]],
[
'select'
,
[
'select'
,
'text'
]],
...
...
@@ -827,7 +827,10 @@ export default {
panelResult
.
required
++
let
value
=
this
.
form
[
ele
.
fieldsName
]
if
(
value
&&
!
Array
.
isArray
(
value
))
{
panelResult
.
submitted
++
// 非付款流水号 || 8位付款流水号
if
(
ele
.
fieldsName
!=
'eSerialNum'
||
value
.
length
==
8
)
{
panelResult
.
submitted
++
}
}
else
if
(
value
&&
Array
.
isArray
(
value
)
&&
value
.
length
>
0
)
{
if
(
ele
.
fieldsName
===
'materialList'
)
{
let
hasMate
=
false
...
...
@@ -950,7 +953,7 @@ export default {
maintainFields
:
this
.
handleSaveData
(),
currentStep
:
this
.
list
[
this
.
tabIndex
].
panelFieldsName
,
nextStep
:
this
.
list
[
this
.
tabIndex
+
1
].
panelFieldsName
,
version
:
2
version
:
2
,
}
uni
.
showLoading
({
title
:
'加载中'
,
...
...
@@ -1135,12 +1138,12 @@ export default {
const
actualPaid
=
groupItem
.
items
.
find
(
(
v
)
=>
v
.
fieldsName
===
'actualPaid'
)
actualPaid
.
required
=
data
.
value
!=
'03'
if
(
actualPaid
)
actualPaid
.
required
=
data
.
value
!=
'03'
const
eSerialNum
=
groupItem
.
items
.
find
(
(
v
)
=>
v
.
fieldsName
===
'eSerialNum'
)
eSerialNum
.
required
=
data
.
value
!=
'03'
if
(
eSerialNum
)
eSerialNum
.
required
=
data
.
value
!=
'03'
}
if
(
...
...
@@ -1196,7 +1199,7 @@ export default {
orderNumber
:
this
.
orderNumber
,
fieldsName
:
this
.
photoItem
.
fieldsName
,
fieldsTitle
:
this
.
photoItem
.
fieldsTitle
,
uploadType
:
'camera'
uploadType
:
'camera'
,
}
const
value
=
await
this
.
saveToTask
(
val
,
order
)
this
.
$refs
[
...
...
@@ -1213,13 +1216,13 @@ export default {
let
options
=
{
sourceType
:
[
'album'
],
//['album', 'camera']
count
:
3
,
sizeType
:
[
'original'
]
sizeType
:
[
'original'
]
,
}
const
order
=
{
orderNumber
:
this
.
orderNumber
,
fieldsName
:
this
.
photoItem
.
fieldsName
,
fieldsTitle
:
this
.
photoItem
.
fieldsTitle
,
uploadType
:
'album'
uploadType
:
'album'
,
}
const
value
=
await
this
.
chooseImg
(
options
,
order
)
self
.
$refs
[
...
...
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