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
78356bd1
Commit
78356bd1
authored
May 09, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
金额输入框修改
parent
7b7b882f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
XhInput.vue
src/components/createCom/XhInput.vue
+16
-8
index.vue
src/components/order/index.vue
+0
-3
complete.vue
src/pages/order/complete.vue
+6
-3
No files found.
src/components/createCom/XhInput.vue
View file @
78356bd1
...
...
@@ -2,7 +2,7 @@
<
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"
/>
:custom-style=
"customStyle"
:clearable=
"false"
:border=
"border"
border-color=
"#ECECEC"
:maxlength=
"maxlength"
/>
</view>
</
template
>
...
...
@@ -23,18 +23,26 @@
// }
},
data
()
{
return
{}
return
{
maxlength
:
140
,
}
},
computed
:
{
type
()
{
let
ty
=
this
.
item
.
fieldsType
.
toLocaleLowerCase
()
if
(
this
.
item
&&
ty
==
'password'
)
{
return
this
.
item
.
fieldsType
}
else
if
(
this
.
item
&&
ty
==
'text'
)
{
return
'textarea'
}
else
{
return
'text'
if
(
this
.
item
.
fieldsId
==
200
)
{
this
.
maxlength
=
9
return
'digit'
}
else
{
if
(
this
.
item
&&
ty
==
'password'
)
{
return
this
.
item
.
fieldsType
}
else
if
(
this
.
item
&&
ty
==
'text'
)
{
return
'textarea'
}
else
{
return
'text'
}
}
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
...
...
src/components/order/index.vue
View file @
78356bd1
...
...
@@ -211,7 +211,6 @@
}
},
orderDistance
()
{
console
.
log
(
'orderData.contactAddressLatitud:'
,
this
.
orderData
.
contactAddressLatitud
,
'orderData.contactAddressLongitud'
,
this
.
orderData
.
contactAddressLongitud
,
'location:'
,
this
.
location
[
0
],
this
.
location
[
1
])
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
])
}
},
...
...
@@ -291,7 +290,6 @@
* @return float 浮点数
*/
distance
(
lat1
,
lng1
,
lat2
,
lng2
)
{
console
.
log
(
lat1
,
lng1
,
lat2
,
lng2
)
var
radLat1
=
this
.
Rad
(
lat1
);
var
radLat2
=
this
.
Rad
(
lat2
);
var
a
=
radLat1
-
radLat2
;
...
...
@@ -300,7 +298,6 @@
Math
.
cos
(
radLat1
)
*
Math
.
cos
(
radLat2
)
*
Math
.
pow
(
Math
.
sin
(
b
/
2
),
2
)));
s
=
s
*
6378.137
;
// EARTH_RADIUS;
s
=
Math
.
round
(
s
*
10000
)
/
10000
//输出为米
console
.
log
(
"计算结果"
,
s
,
'M'
);
return
Number
(
s
?
s
.
toFixed
(
2
):
0
);
},
Rad
(
d
){
...
...
src/pages/order/complete.vue
View file @
78356bd1
...
...
@@ -22,9 +22,9 @@
<view
class=
"class-item"
:key=
"groupIndex"
v-show=
"current == groupIndex"
>
<view
class=
"title"
v-if=
"groupItem.name !== '基本信息'"
>
{{
groupItem
.
name
}}
</view>
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.items"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
>
<view
:class=
"[
{'label-bold': groupItem.name === '基本信息'}, 'label']"
v-if="typeToComponentType(item.fieldsType)!=='location'"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.items"
:key=
"itemIndex"
v-if=
"typeToComponentType(item.fieldsType)!=='location'"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
v-show=
"item.fieldsId != 200 || show200"
>
<view
:class=
"[
{'label-bold': groupItem.name === '基本信息'}, 'label']">
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
</view>
...
...
@@ -124,6 +124,7 @@
inGuaranteePeriod
:
''
,
list
:
[],
tabIndex
:
0
,
show200
:
true
,
// 基础信息显示金额输入框
scrollTop
:
0
,
//tab标题的滚动条位置
oldScrollTop
:
0
,
current
:
0
,
// 预设当前项的值
...
...
@@ -385,6 +386,7 @@
if
(
groupItem
.
items
)
{
innerItem
=
groupItem
.
items
[
data
.
itemIndex
]
}
if
(
innerItem
.
fieldsType
===
'multiInput'
){
// 多个输入框的值触发
let
key
=
Object
.
keys
(
data
.
value
)[
0
]
...
...
@@ -392,6 +394,7 @@
}
else
{
this
.
$set
(
this
.
form
,
innerItem
.
fieldsName
,
data
.
value
)
}
this
.
show200
=
innerItem
.
fieldsId
!=
199
||
data
.
value
!=
'03'
console
.
log
(
this
.
form
)
},
nextStep
()
{
...
...
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