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
1bf70585
Commit
1bf70585
authored
Aug 10, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-1.4.3' into test
parents
09e358de
c4508d5a
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
2952 additions
and
2466 deletions
+2952
-2466
.env.js
.env.js
+33
-33
XhCheckbox.vue
src/components/createCom/XhCheckbox.vue
+69
-64
XhFiles.vue
src/components/createCom/XhFiles.vue
+168
-151
XhLocation.vue
src/components/createCom/XhLocation.vue
+84
-78
XhMultiInput.vue
src/components/createCom/XhMultiInput.vue
+54
-40
XhScan.vue
src/components/createCom/XhScan.vue
+58
-52
XhSelect.vue
src/components/createCom/XhSelect.vue
+131
-115
XhServiceMeasure.vue
src/components/createCom/XhServiceMeasure.vue
+47
-46
XhServiceMore.vue
src/components/createCom/XhServiceMore.vue
+20
-19
XhSpecifications.vue
src/components/createCom/XhSpecifications.vue
+87
-78
XhTime.vue
src/components/createCom/XhTime.vue
+55
-50
detail.vue
src/components/order/detail.vue
+15
-13
index.vue
src/components/order/index.vue
+569
-470
preview.vue
src/components/photo/preview.vue
+40
-9
index.vue
src/components/select-parts/index.vue
+3
-4
index.vue
src/components/take/index.vue
+6
-7
learn.vue
src/pages/index/learn.vue
+7
-1
order.vue
src/pages/index/order.vue
+414
-335
index.vue
src/pages/mine/contract/index.vue
+1
-0
complete.vue
src/pages/order/complete.vue
+521
-423
detail.vue
src/pages/order/detail.vue
+10
-0
document.vue
src/pages/order/document.vue
+551
-477
feedback.vue
src/pages/order/feedback.vue
+4
-0
search.vue
src/pages/order/search.vue
+4
-1
application.vue
src/pages/parts/application.vue
+1
-0
No files found.
.env.js
View file @
1bf70585
(
function
()
{
let
NODE_ENV
=
'test'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
;
let
VERSION_NUMBER
=
'1.3.13'
;
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
ENV_VAR
=
require
(
'./.env.dev.js'
);
}
else
if
(
NODE_ENV
===
'test'
)
{
ENV_VAR
=
require
(
'./.env.test.js'
);
}
else
if
(
NODE_ENV
===
'prod'
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
);
}
// 百度地图AK,请勿删除
ENV_VAR
[
'bmapAK'
]
=
'G1wPip2Oj62NnoUctXhiE1faZVHbeo2A'
}
else
if
(
process
.
env
.
NODE_ENV
===
"production"
)
{
if
(
NODE_ENV
===
'test'
)
{
ENV_VAR
=
require
(
'./.env.test.js'
);
}
else
if
(
NODE_ENV
===
'prod'
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
);
}
// 百度地图AK,请勿删除
ENV_VAR
[
'bmapAK'
]
=
'lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI'
}
if
(
ENV_VAR
)
{
process
.
uniEnv
=
{};
process
.
uniEnv
[
'node_env'
]
=
NODE_ENV
;
process
.
uniEnv
[
'version_number'
]
=
VERSION_NUMBER
;
for
(
let
key
in
ENV_VAR
)
{
process
.
uniEnv
[
key
]
=
ENV_VAR
[
key
];
}
}
})()
;
;(
function
()
{
let
NODE_ENV
=
'prod'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
let
VERSION_NUMBER
=
'1.3.19'
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
NODE_ENV
===
'dev'
)
{
ENV_VAR
=
require
(
'./.env.dev.js'
)
}
else
if
(
NODE_ENV
===
'test'
)
{
ENV_VAR
=
require
(
'./.env.test.js'
)
}
else
if
(
NODE_ENV
===
'prod'
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
)
}
// 百度地图AK,请勿删除
ENV_VAR
[
'bmapAK'
]
=
'G1wPip2Oj62NnoUctXhiE1faZVHbeo2A'
}
else
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
if
(
NODE_ENV
===
'test'
)
{
ENV_VAR
=
require
(
'./.env.test.js'
)
}
else
if
(
NODE_ENV
===
'prod'
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
)
}
// 百度地图AK,请勿删除
ENV_VAR
[
'bmapAK'
]
=
'lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI'
}
if
(
ENV_VAR
)
{
process
.
uniEnv
=
{}
process
.
uniEnv
[
'node_env'
]
=
NODE_ENV
process
.
uniEnv
[
'version_number'
]
=
VERSION_NUMBER
for
(
let
key
in
ENV_VAR
)
{
process
.
uniEnv
[
key
]
=
ENV_VAR
[
key
]
}
}
})()
src/components/createCom/XhCheckbox.vue
View file @
1bf70585
<!-- ******************* 多选框 ******************* -->
<
template
>
<view
class=
"list"
>
<view
v-for=
"(item,index) in settings"
:key=
"index"
:class=
"
{'txt':true,'active':checkStatus(item.key)}" @click="setValue(item.key)">
{{
item
.
label
}}
</view>
</view>
<view
class=
"list"
>
<view
v-for=
"(item, index) in settings"
:key=
"index"
:class=
"
{ txt: true, active: checkStatus(item.key) }"
@click="setValue(item.key)"
>
{{
item
.
label
}}
</view>
</view>
</
template
>
<
script
>
import
arrMixin
from
'./arrMixin'
export
default
{
name
:
'XhRadio'
,
components
:
{},
mixins
:
[
arrMixin
],
props
:
{},
filters
:{},
data
()
{
return
{}
},
computed
:
{
settings
()
{
return
this
.
item
.
fieldsOptions
||
[]
}
},
watch
:
{},
mounted
()
{},
methods
:
{
checkStatus
(
item
){
if
(
!
item
){
return
false
}
const
dataValue
=
this
.
dataValue
let
flag
=
Array
.
isArray
(
dataValue
)
&&
dataValue
.
indexOf
(
item
)
>-
1
return
flag
},
setValue
(
txt
)
{
const
dataValue
=
this
.
dataValue
||
[]
let
idx
=
dataValue
.
indexOf
(
txt
)
if
(
idx
>
-
1
)
{
dataValue
.
splice
(
idx
,
1
)
}
else
{
dataValue
.
push
(
txt
)
}
this
.
dataValue
=
dataValue
this
.
valueChange
(
this
.
dataValue
)
}
}
}
import
arrMixin
from
'./arrMixin'
export
default
{
name
:
'XhRadio'
,
components
:
{},
mixins
:
[
arrMixin
],
props
:
{},
filters
:
{},
data
()
{
return
{}
},
computed
:
{
settings
()
{
return
this
.
item
.
fieldsOptions
||
[]
},
},
watch
:
{},
mounted
()
{},
methods
:
{
checkStatus
(
item
)
{
if
(
!
item
)
{
return
false
}
const
dataValue
=
this
.
dataValue
let
flag
=
Array
.
isArray
(
dataValue
)
&&
dataValue
.
indexOf
(
item
)
>
-
1
return
flag
},
setValue
(
txt
)
{
if
(
this
.
disabled
)
return
const
dataValue
=
this
.
dataValue
||
[]
let
idx
=
dataValue
.
indexOf
(
txt
)
if
(
idx
>
-
1
)
{
dataValue
.
splice
(
idx
,
1
)
}
else
{
dataValue
.
push
(
txt
)
}
this
.
dataValue
=
dataValue
this
.
valueChange
(
this
.
dataValue
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.list
{
display
:
flex
;
flex-wrap
:
wrap
;
.txt
{
color
:
#333
;
padding
:
10rpx
30rpx
;
margin
:
10rpx
;
background
:
#F4F5F
7
;
border-radius
:
10rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
max-width
:
46%
;
align-items
:
center
;
&
.active
{
background-color
:
#2272FF
;
color
:
#fff
;
}
}
}
.list
{
display
:
flex
;
flex-wrap
:
wrap
;
.txt
{
color
:
#333
;
padding
:
10rpx
30rpx
;
margin
:
10rpx
;
background
:
#f4f5f
7
;
border-radius
:
10rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
max-width
:
46%
;
align-items
:
center
;
&
.active
{
background-color
:
#2272ff
;
color
:
#fff
;
}
}
}
</
style
>
src/components/createCom/XhFiles.vue
View file @
1bf70585
<!-- ******************* 文件上传 ******************* -->
<
template
>
<view>
<view
class=
"file-box"
>
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"img-list"
v-for=
"(item,index) in imgList"
:key=
"index"
>
<u-image
class=
"pic"
width=
"160"
height=
"160"
:src=
"item.path ? item.path : item.src + '?imageView2/1/w/100/h/100/q/75'"
:border-radius=
"10"
@
click
.
stop=
"prviewImage(item,index)"
fade
lazy-load
></u-image>
<view
class=
"icon-del-box"
@
click
.
stop=
"delFile(index)"
>
<view
class=
"icon-del"
></view>
<view
class=
"icon-del rotate"
></view>
</view>
</view>
<slot></slot>
<!--
<view
class=
"img-list"
>
<view>
<view
class=
"file-box"
>
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"img-list"
v-for=
"(item, index) in imgList"
:key=
"index"
>
<u-image
class=
"pic"
width=
"160"
height=
"160"
:src=
"
item.path
? item.path
: item.src + '?imageView2/1/w/100/h/100/q/75'
"
:border-radius=
"10"
@
click
.
stop=
"prviewImage(item, index)"
fade
lazy-load
></u-image>
<view
class=
"icon-del-box"
v-if=
"!disabled"
@
click
.
stop=
"delFile(index)"
>
<view
class=
"icon-del"
></view>
<view
class=
"icon-del rotate"
></view>
</view>
</view>
<slot></slot>
<!--
<view
class=
"img-list"
>
<u-image
class=
"pic"
width=
"160rpx"
height=
"160rpx"
:border-radius=
"10"
@
click=
"selectUpload"
:src=
"uploadImage"
></u-image>
</view>
-->
</view>
<!--
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
-->
</view>
<!--
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
-->
</view>
</view>
<!--
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
-->
</view>
<!--
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
-->
</view>
</
template
>
<
script
>
import
arrMixin
from
'./arrMixin'
import
baseFile
from
'@/components/upload/index'
;
import
takePhoto
from
'@/components/take/index.vue'
// import uploader from '@/plugins/uploader/index.js'
import
arrMixin
from
'./arrMixin'
import
baseFile
from
'@/components/upload/index'
import
takePhoto
from
'@/components/take/index.vue'
// import uploader from '@/plugins/uploader/index.js'
export
default
{
name
:
'XhFiles'
,
components
:
{
'take-photo'
:
takePhoto
},
mixins
:
[
arrMixin
,
baseFile
],
props
:
{
files
:
{
type
:
Array
,
},
partnerCompanyId
:
{
type
:
String
,
default
:
''
},
categoryId
:
{
type
:
String
,
default
:
''
},
brandId
:
{
type
:
String
,
default
:
''
},
},
filters
:{},
data
()
{
return
{
maskShow
:
false
,
list
:
[
{
text
:
'相册'
},
{
text
:
'拍照'
}
],
takeStatus
:
false
,
currentItemDate
:{},
}
},
computed
:
{
settings
()
{
return
this
.
item
.
settings
||
[]
},
uploadImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-file.png'
},
},
mounted
()
{
if
(
this
.
value
){
this
.
imgList
=
this
.
value
.
filter
(
v
=>
v
).
map
(
img
=>
{
return
{
src
:
img
?
img
:
''
}
})
this
.
setValue
()
}
},
methods
:
{
setTmpValue
(
values
)
{
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
const
dataValue
=
this
.
imgList
.
map
(
v
=>
v
.
src
)
this
.
valueChange
(
dataValue
)
},
setValue
()
{
const
dataValue
=
this
.
imgList
.
map
(
item
=>
item
.
src
)
this
.
valueChange
(
dataValue
)
},
prviewImage
(
item
,
index
)
{
uni
.
previewImage
({
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
current
:
index
});
},
delFile
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
this
.
setValue
()
},
/*
export
default
{
name
:
'XhFiles'
,
components
:
{
'take-photo'
:
takePhoto
,
},
mixins
:
[
arrMixin
,
baseFile
],
props
:
{
files
:
{
type
:
Array
,
},
partnerCompanyId
:
{
type
:
String
,
default
:
''
,
},
categoryId
:
{
type
:
String
,
default
:
''
,
},
brandId
:
{
type
:
String
,
default
:
''
,
},
},
filters
:
{},
data
()
{
return
{
maskShow
:
false
,
list
:
[
{
text
:
'相册'
,
},
{
text
:
'拍照'
,
},
],
takeStatus
:
false
,
currentItemDate
:
{},
}
},
computed
:
{
settings
()
{
return
this
.
item
.
settings
||
[]
},
uploadImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-file.png'
},
},
mounted
()
{
if
(
this
.
value
)
{
this
.
imgList
=
this
.
value
.
filter
((
v
)
=>
v
)
.
map
((
img
)
=>
{
return
{
src
:
img
?
img
:
''
}
})
this
.
setValue
()
}
},
methods
:
{
setTmpValue
(
values
)
{
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
const
dataValue
=
this
.
imgList
.
map
((
v
)
=>
v
.
src
)
this
.
valueChange
(
dataValue
)
},
setValue
()
{
const
dataValue
=
this
.
imgList
.
map
((
item
)
=>
item
.
src
)
this
.
valueChange
(
dataValue
)
},
prviewImage
(
item
,
index
)
{
uni
.
previewImage
({
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
current
:
index
,
})
},
delFile
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
this
.
setValue
()
},
/*
selectUpload(){
if (this.imgList.length === 10) {
return this.$refs.uToast.show({
...
...
@@ -197,66 +216,64 @@
}
});
}*/
}
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.img-list
{
position
:
relative
;
margin
:
8rpx
;
width
:
160rpx
;
height
:
160rpx
;
.pic
{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&
:nth-child
(
3n
)
{
margin-right
:
0
;
}
}
.img-list
{
position
:
relative
;
margin
:
8rpx
;
width
:
160rpx
;
height
:
160rpx
;
.pic
{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&
:nth-child
(
3n
)
{
margin-right
:
0
;
}
}
.icon-del-box
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
top
:
10rpx
;
right
:
10rpx
;
height
:
40rpx
;
width
:
40rpx
;
border-radius
:
50%
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
transform
:
rotate
(
-45deg
);
}
.icon-del-box
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
top
:
10rpx
;
right
:
10rpx
;
height
:
40rpx
;
width
:
40rpx
;
border-radius
:
50%
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
transform
:
rotate
(
-45deg
);
}
.icon-del
{
width
:
30rpx
;
height
:
4rpx
;
background-color
:
#fff
;
border-radius
:
2px
;
}
.icon-del
{
width
:
30rpx
;
height
:
4rpx
;
background-color
:
#fff
;
border-radius
:
2px
;
}
.rotate
{
position
:
absolute
;
transform
:
rotate
(
90deg
);
}
}
// .list {
// display: flex;
.rotate
{
position
:
absolute
;
transform
:
rotate
(
90deg
);
}
}
// .list {
// display: flex;
// .txt {
// color: #666;
// padding: 10rpx;
// .txt {
// color: #666;
// padding: 10rpx;
// &.active {
// background-color: red;
// color: #fff;
// }
// }
// }
// &.active {
// background-color: red;
// color: #fff;
// }
// }
// }
</
style
>
src/components/createCom/XhLocation.vue
View file @
1bf70585
<!-- ******************* 定位 ******************* -->
<
template
>
<view>
<view
class=
"list u-flex u-row-between"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 location-name"
@
click=
"getLocation"
>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
自动定位
</view>
</view>
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
</view>
<view>
<view
class=
"list u-flex u-row-between"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 location-name"
@
click=
"getLocation"
>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
自动定位
</view>
</view>
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
</view>
</
template
>
<
script
>
import
arrMixin
from
'./arrMixin'
export
default
{
name
:
'XhLocation'
,
components
:
{},
mixins
:
[
arrMixin
],
props
:
{},
filters
:{},
data
()
{
return
{}
},
computed
:
{
valueTxt
()
{
let
str
=
''
const
dataValue
=
this
.
dataValue
if
(
dataValue
&&
dataValue
.
length
>
1
){
str
=
'经度:'
+
dataValue
[
0
].
toFixed
(
4
)
+
','
+
'纬度:'
+
dataValue
[
1
].
toFixed
(
4
)
}
return
str
},
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
}
},
watch
:
{},
created
()
{
this
.
getLocation
()
},
methods
:
{
getLocation
()
{
let
self
=
this
const
dataValue
=
this
.
dataValue
||
[]
const
waterInfo
=
this
.
waterInfo
uni
.
getLocation
({
type
:
'gcj02'
,
success
:
function
(
res
)
{
dataValue
.
push
(
res
.
longitude
)
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
self
.
setValue
(
dataValue
)
},
fail
(
err
)
{}
});
},
setValue
(
txt
)
{
this
.
valueChange
(
this
.
dataValue
)
}
}
}
import
arrMixin
from
'./arrMixin'
export
default
{
name
:
'XhLocation'
,
components
:
{},
mixins
:
[
arrMixin
],
props
:
{},
filters
:
{},
data
()
{
return
{}
},
computed
:
{
valueTxt
()
{
let
str
=
''
const
dataValue
=
this
.
dataValue
if
(
dataValue
&&
dataValue
.
length
>
1
)
{
str
=
'经度:'
+
dataValue
[
0
].
toFixed
(
4
)
+
','
+
'纬度:'
+
dataValue
[
1
].
toFixed
(
4
)
}
return
str
},
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
},
watch
:
{},
created
()
{
this
.
getLocation
()
},
methods
:
{
getLocation
()
{
if
(
this
.
disabled
)
return
let
self
=
this
const
dataValue
=
this
.
dataValue
||
[]
const
waterInfo
=
this
.
waterInfo
uni
.
getLocation
({
type
:
'gcj02'
,
success
:
function
(
res
)
{
dataValue
.
push
(
res
.
longitude
)
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
self
.
setValue
(
dataValue
)
},
fail
(
err
)
{},
})
},
setValue
(
txt
)
{
this
.
valueChange
(
this
.
dataValue
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.required
{
padding-right
:
10rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
}
.item-image
{
width
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
}
.location-name
{
color
:
#2272FF
;
text-align
:
right
;
}
.location
{
background
:
#F4F5F
7
;
padding
:
10rpx
20rpx
;
border-radius
:
12rpx
;
}
.required
{
padding-right
:
10rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
}
.item-image
{
width
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
}
.location-name
{
color
:
#2272ff
;
text-align
:
right
;
}
.location
{
background
:
#f4f5f
7
;
padding
:
10rpx
20rpx
;
border-radius
:
12rpx
;
}
</
style
>
src/components/createCom/XhMultiInput.vue
View file @
1bf70585
<!-- ******************* 多个输入框 ******************* -->
<
template
>
<view
class=
"u-flex u-flex-wrap"
>
<u-input
class=
"input-item"
v-for=
"(item,index) in inputOptions"
v-model=
"item.value"
@
input=
"val=>
{getValue(item)}" type="text" :key="index" :border="true" :placeholder="item.placeholder" />
</view>
<view
class=
"u-flex u-flex-wrap"
>
<u-input
class=
"input-item"
v-for=
"(item, index) in inputOptions"
v-model=
"item.value"
@
input=
"
(val) =>
{
getValue(item)
}
"
type="text"
:key="index"
:border="true"
:placeholder="item.placeholder"
:disabled="disabled"
/>
</view>
</
template
>
<
script
>
import
objMixin
from
'./objMixin'
export
default
{
name
:
'XhMultiInput'
,
components
:
{},
mixins
:
[
objMixin
],
props
:
{},
data
()
{
return
{}
},
computed
:
{
inputOptions
()
{
let
options
=
this
.
item
.
inputOptions
||
[]
let
result
=
options
.
map
(
item
=>
{
return
{
...
item
,
value
:
''
}
})
return
result
}
},
watch
:
{},
mounted
()
{},
methods
:
{
getValue
(
item
)
{
let
currentValue
=
{}
currentValue
[
item
.
fieldsName
]
=
item
.
value
// 以key,value的对象形式传递
this
.
valueChange
(
currentValue
)
}
}
}
import
objMixin
from
'./objMixin'
export
default
{
name
:
'XhMultiInput'
,
components
:
{},
mixins
:
[
objMixin
],
props
:
{},
data
()
{
return
{}
},
computed
:
{
inputOptions
()
{
let
options
=
this
.
item
.
inputOptions
||
[]
let
result
=
options
.
map
((
item
)
=>
{
return
{
...
item
,
value
:
''
,
}
})
return
result
},
},
watch
:
{},
mounted
()
{},
methods
:
{
getValue
(
item
)
{
let
currentValue
=
{}
currentValue
[
item
.
fieldsName
]
=
item
.
value
// 以key,value的对象形式传递
this
.
valueChange
(
currentValue
)
},
},
}
</
script
>
<
style
scoped
>
.input-item
{
width
:
31%
;
margin
:
5
rpx
;
background
:
#F4F5F7
;
}
.input-item
{
width
:
31%
;
margin
:
5
rpx
;
background
:
#f4f5f7
;
}
</
style
>
src/components/createCom/XhScan.vue
View file @
1bf70585
<!-- ******************* 扫码 ******************* -->
<
template
>
<view
class=
""
>
<view
class=
"u-flex"
@
click=
"scanCode"
>
<view
class=
"txt u-flex-1"
>
扫描二维码(仅挚达充电桩可扫描)
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
<view
class=
"u-flex"
>
<u-input
class=
"u-flex-1 input-item"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
/>
</view>
</view>
<view
class=
""
>
<view
class=
"u-flex"
@
click=
"scanCode"
>
<view
class=
"txt u-flex-1"
>
扫描二维码(仅挚达充电桩可扫描)
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
<view
class=
"u-flex"
>
<u-input
class=
"u-flex-1 input-item"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
:disabled=
"disabled"
/>
</view>
</view>
</
template
>
<
script
>
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhScan'
,
components
:
{},
mixins
:
[
stringMixin
],
props
:
{},
filters
:
{},
data
()
{
return
{}
},
computed
:
{
},
watch
:
{},
mounted
()
{},
methods
:
{
scanCode
(
type
){
const
self
=
this
uni
.
scanCode
({
success
:
function
(
res
)
{
let
result
=
res
.
result
if
(
result
.
substring
(
0
,
4
)
===
'http'
)
{
let
arr
=
result
.
split
(
'/#/'
)
if
(
arr
.
length
<
2
)
arr
=
result
.
split
(
'?'
)
result
=
arr
[
1
]
}
self
.
dataValue
=
result
self
.
valueChange
(
result
)
}
});
}
}
}
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhScan'
,
components
:
{},
mixins
:
[
stringMixin
],
props
:
{},
filters
:
{},
data
()
{
return
{}
},
computed
:
{},
watch
:
{
},
mounted
()
{},
methods
:
{
scanCode
(
type
)
{
if
(
this
.
disabled
)
return
const
self
=
this
uni
.
scanCode
({
success
:
function
(
res
)
{
let
result
=
res
.
result
if
(
result
.
substring
(
0
,
4
)
===
'http'
)
{
let
arr
=
result
.
split
(
'/#/'
)
if
(
arr
.
length
<
2
)
arr
=
result
.
split
(
'?'
)
result
=
arr
[
1
]
}
self
.
dataValue
=
result
self
.
valueChange
(
result
)
},
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.required
{
padding-right
:
10rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
}
.input-item
{
background
:
#F4F5F
7
;
border-radius
:
12rpx
;
padding-left
:
20rpx
;
}
.required
{
padding-right
:
10rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
}
.input-item
{
background
:
#f4f5f
7
;
border-radius
:
12rpx
;
padding-left
:
20rpx
;
}
</
style
>
src/components/createCom/XhSelect.vue
View file @
1bf70585
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<view
class=
"xh-select"
:style=
"
{'width': fieldsWidth
}">
<!--
<u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
<view
class=
"xh-select"
:style=
"
{ width: fieldsWidth
}">
<!--
<u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
:custom-style=
"customStyle"
:clearable=
"false"
></u-input>
<u-select
:list=
"settings"
v-model=
"show"
@
confirm=
"actionSheetCallback"
safe-area-inset-bottom
></u-select>
<u-icon
class=
"input-icon"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
-->
<view
class=
"u-flex u-row-between picker-common"
>
<picker
mode=
"selector"
:value=
"index"
range-key=
"label"
:range=
"settings"
@
click=
"show = true"
@
change=
"pickerChange"
class=
"u-flex-1"
>
<view
class=
"txt"
>
{{
text
||
'请选择'
}}
</view>
</picker>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
</view>
<view
class=
"u-flex u-row-between picker-common"
>
<picker
mode=
"selector"
:value=
"index"
range-key=
"label"
:range=
"settings"
@
click=
"show = true"
@
change=
"pickerChange"
class=
"u-flex-1"
:disabled=
"disabled"
>
<view
class=
"txt"
>
{{
text
||
'请选择'
}}
</view>
</picker>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
</view>
</
template
>
<
script
>
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhSelect'
,
components
:
{},
mixins
:
[
stringMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请选择'
},
width
:
{
// 例如:454rpx
type
:
String
,
default
:
'100%'
}
},
data
()
{
return
{
show
:
false
,
index
:
''
}
},
computed
:
{
type
()
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
return
this
.
item
.
fieldsType
}
else
{
return
'text'
}
},
settings
()
{
let
result
=
[]
let
settings
=
this
.
item
.
fieldsOptions
||
[]
result
=
settings
.
map
(
item
=>
{
return
{
label
:
item
.
label
,
value
:
item
.
key
,
color
:
'#333333'
,
fontSize
:
26
}
})
return
result
},
text
(){
let
option
=
this
.
item
.
fieldsOptions
.
find
(
a
=>
{
return
a
.
key
===
this
.
dataValue
})
return
option
?
option
.
label
:
''
},
placeholderStyle
()
{
return
'color:#999999;font-size:26rpx'
},
customStyle
()
{
return
{
'background-color'
:
'#F4F5F7'
,
'border-radius'
:
'12rpx'
,
'color'
:
'#333333'
,
'padding-left'
:
'20rpx'
,
'padding-right'
:
'60rpx'
,
'width'
:
this
.
width
,
'font-size'
:
'26rpx'
,
'height'
:
'76rpx'
}
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
},
watch
:
{},
mounted
()
{},
methods
:
{
actionSheetCallback
(
event
)
{
const
id
=
event
[
0
].
value
this
.
dataValue
=
id
this
.
valueChange
(
id
)
},
pickerChange
(
data
)
{
this
.
index
=
data
.
detail
.
value
const
id
=
this
.
item
.
fieldsOptions
[
this
.
index
].
key
this
.
dataValue
=
id
this
.
valueChange
(
id
)
},
}
}
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhSelect'
,
components
:
{},
mixins
:
[
stringMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请选择'
,
},
width
:
{
// 例如:454rpx
type
:
String
,
default
:
'100%'
,
},
},
data
()
{
return
{
show
:
false
,
index
:
''
,
}
},
computed
:
{
type
()
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
return
this
.
item
.
fieldsType
}
else
{
return
'text'
}
},
settings
()
{
let
result
=
[]
let
settings
=
this
.
item
.
fieldsOptions
||
[]
result
=
settings
.
map
((
item
)
=>
{
return
{
label
:
item
.
label
,
value
:
item
.
key
,
color
:
'#333333'
,
fontSize
:
26
,
}
})
return
result
},
text
()
{
let
option
=
this
.
item
.
fieldsOptions
.
find
((
a
)
=>
{
return
a
.
key
===
this
.
dataValue
})
return
option
?
option
.
label
:
''
},
placeholderStyle
()
{
return
'color:#999999;font-size:26rpx'
},
customStyle
()
{
return
{
'background-color'
:
'#F4F5F7'
,
'border-radius'
:
'12rpx'
,
color
:
'#333333'
,
'padding-left'
:
'20rpx'
,
'padding-right'
:
'60rpx'
,
width
:
this
.
width
,
'font-size'
:
'26rpx'
,
height
:
'76rpx'
,
}
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
},
},
watch
:
{},
mounted
()
{},
methods
:
{
actionSheetCallback
(
event
)
{
const
id
=
event
[
0
].
value
this
.
dataValue
=
id
this
.
valueChange
(
id
)
},
pickerChange
(
data
)
{
this
.
index
=
data
.
detail
.
value
const
id
=
this
.
item
.
fieldsOptions
[
this
.
index
].
key
this
.
dataValue
=
id
this
.
valueChange
(
id
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.xh-select
{
position
:
relative
;
.input-icon
{
position
:
absolute
;
right
:
20rpx
;
top
:
26rpx
;
color
:
#2272FF
;
}
}
.picker-common
{
min-height
:
35px
;
background-color
:
#F4F5F
7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
.xh-select
{
position
:
relative
;
.input-icon
{
position
:
absolute
;
right
:
20rpx
;
top
:
26rpx
;
color
:
#2272ff
;
}
}
.picker-common
{
min-height
:
35px
;
background-color
:
#f4f5f
7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
</
style
>
src/components/createCom/XhServiceMeasure.vue
View file @
1bf70585
...
...
@@ -12,11 +12,12 @@
:value=
"index"
range-key=
"label"
:range=
"settings"
:disabled=
"disabled"
@
click=
"showPicker = true"
@
change=
"pickerChange"
class=
"txt u-flex-1"
>
<view>
{{
text
||
"请选择"
}}
</view>
<view>
{{
text
||
'请选择'
}}
</view>
</picker>
<u-icon
class=
"input-icon"
...
...
@@ -30,9 +31,9 @@
</
template
>
<
script
>
import
objMixin
from
"./objMixin"
;
import
objMixin
from
'./objMixin'
export
default
{
name
:
"XhPicker"
,
name
:
'XhPicker'
,
components
:
{},
mixins
:
[
objMixin
],
props
:
{
...
...
@@ -40,17 +41,17 @@ export default {
defaultSelector
:
{
type
:
Array
,
default
()
{
return
[
0
]
;
return
[
0
]
},
},
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
rangeKey
:
{
type
:
String
,
default
:
"label"
,
default
:
'label'
,
},
value
:
{
type
:
String
,
default
:
"{}"
,
default
:
'{}'
,
},
orderId
:
{
type
:
Number
,
...
...
@@ -62,11 +63,11 @@ export default {
},
specificationId
:
{
type
:
String
,
default
:
"0"
,
default
:
'0'
,
},
orderServiceType
:
{
type
:
String
,
default
:
"安装"
,
default
:
'安装'
,
},
},
filters
:
{},
...
...
@@ -76,47 +77,47 @@ export default {
showPicker
:
false
,
settings
:
[],
measure
:
[],
index
:
""
,
}
;
index
:
''
,
}
},
computed
:
{
text
()
{
let
val
=
""
;
let
val
=
''
if
(
this
.
value
)
{
let
data
=
JSON
.
parse
(
this
.
value
)
;
val
=
data
[
0
].
measureTypeName
+
"-"
+
data
[
0
].
measureName
;
let
data
=
JSON
.
parse
(
this
.
value
)
val
=
data
[
0
].
measureTypeName
+
'-'
+
data
[
0
].
measureName
}
return
val
;
return
val
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
"rpx"
:
"100%"
;
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
},
},
watch
:
{
specificationId
(
val
,
oldVal
)
{
this
.
initComponent
()
;
this
.
initComponent
()
},
},
mounted
()
{
this
.
isNotMulti
=
this
.
orderServiceType
===
"安装"
;
this
.
initComponent
()
;
this
.
isNotMulti
=
this
.
orderServiceType
===
'安装'
this
.
initComponent
()
},
methods
:
{
openPicker
()
{
if
(
this
.
specificationId
===
"0"
)
{
if
(
this
.
specificationId
===
'0'
)
{
this
.
$refs
.
uToast
.
show
({
title
:
"请先选择规格"
,
type
:
"error"
,
})
;
return
;
title
:
'请先选择规格'
,
type
:
'error'
,
})
return
}
this
.
showPicker
=
true
;
this
.
showPicker
=
true
},
initComponent
()
{
if
(
this
.
isNotMulti
)
{
this
.
initMeasure
()
;
this
.
initMeasure
()
}
else
{
this
.
initSymptoms
()
;
this
.
initSymptoms
()
}
},
initSymptoms
()
{
...
...
@@ -133,50 +134,50 @@ export default {
categoryId
:
this
.
categoryId
,
specificationId
:
this
.
specificationId
,
orderServiceTypeText
:
this
.
orderServiceType
,
}
;
this
.
$u
.
api
.
getMeasureV2
(
param
).
then
(
res
=>
{
}
this
.
$u
.
api
.
getMeasureV2
(
param
).
then
(
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
result
=
[]
;
let
result
=
[]
for
(
let
key
in
res
.
data
)
{
this
.
measure
=
res
.
data
[
key
].
measureExtendDtos
;
this
.
measure
=
res
.
data
[
key
].
measureExtendDtos
res
.
data
[
key
].
measureExtendDtos
.
map
((
item
,
index
)
=>
{
result
.
push
({
id
:
item
.
measureId
,
label
:
item
.
measureName
})
;
})
;
result
.
push
({
id
:
item
.
measureId
,
label
:
item
.
measureName
})
})
}
if
(
this
.
orderServiceType
===
"安装"
)
{
this
.
settings
=
result
;
if
(
this
.
orderServiceType
===
'安装'
)
{
this
.
settings
=
result
}
else
{
this
.
settings
[
2
]
=
result
;
this
.
settings
[
2
]
=
result
}
}
else
{
console
.
log
(
res
.
message
,
"查询措施失败"
);
console
.
log
(
res
.
message
,
'查询措施失败'
)
}
})
;
})
}
},
pickerConfirm
(
data
)
{
let
result
=
[]
;
let
result
=
[]
if
(
this
.
isMulti
)
{
// 维修
}
else
{
// 安装
result
.
push
(
this
.
measure
[
data
[
0
]])
;
result
.
push
(
this
.
measure
[
data
[
0
]])
}
this
.
valueChange
(
JSON
.
stringify
(
result
))
;
this
.
valueChange
(
JSON
.
stringify
(
result
))
},
pickerChange
(
data
)
{
this
.
showPicker
=
false
;
this
.
index
=
data
.
detail
.
value
;
this
.
showPicker
=
false
this
.
index
=
data
.
detail
.
value
let
result
=
[]
;
let
result
=
[]
if
(
this
.
isMulti
)
{
// 维修
}
else
{
// 安装
result
.
push
(
this
.
measure
[
this
.
index
])
;
result
.
push
(
this
.
measure
[
this
.
index
])
}
this
.
valueChange
(
JSON
.
stringify
(
result
))
;
this
.
valueChange
(
JSON
.
stringify
(
result
))
},
columnchange
(
data
)
{
// // 树列改变时进行联动操作
...
...
@@ -185,7 +186,7 @@ export default {
// this.settings.splice(column+1,1,arr)
},
},
}
;
}
</
script
>
<
style
lang=
"scss"
scoped
>
.picker-common
{
...
...
src/components/createCom/XhServiceMore.vue
View file @
1bf70585
...
...
@@ -23,66 +23,67 @@
</
template
>
<
script
>
import
arrMixin
from
"./arrMixin"
;
import
arrMixin
from
'./arrMixin'
export
default
{
name
:
"XhInput"
,
// 新建 input
name
:
'XhInput'
,
// 新建 input
components
:
{},
mixins
:
[
arrMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
"请输入"
,
default
:
'请输入'
,
},
orderId
:
{
type
:
String
,
default
:
"请输入"
,
default
:
'请输入'
,
},
},
data
()
{
return
{
maxlength
:
140
,
}
;
}
},
computed
:
{
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"mixing.png"
;
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
arrowText
()
{
if
(
this
.
$u
.
test
.
isEmpty
(
this
.
dataValue
))
return
"请选择"
;
if
(
this
.
item
.
fieldsName
==
"materialList"
)
{
if
(
this
.
$u
.
test
.
isEmpty
(
this
.
dataValue
))
return
'请选择'
if
(
this
.
item
.
fieldsName
==
'materialList'
)
{
let
hasMate
=
false
var
newData
=
this
.
dataValue
.
find
((
item
)
=>
{
if
(
!
this
.
$u
.
test
.
isEmpty
(
item
.
useLength
))
{
if
(
!
this
.
$u
.
test
.
isEmpty
(
item
.
useLength
))
{
hasMate
=
true
return
item
.
useLength
!=
'0'
}
})
if
(
hasMate
&&
this
.
$u
.
test
.
isEmpty
(
newData
))
return
"请选择"
if
(
hasMate
&&
this
.
$u
.
test
.
isEmpty
(
newData
))
return
'请选择'
}
return
"已选择"
;
return
'已选择'
},
},
watch
:
{},
mounted
()
{},
methods
:
{
toMaterialPage
()
{
let
self
=
this
;
if
(
this
.
disabled
)
return
let
self
=
this
uni
.
navigateTo
({
url
:
"pages/order/material?orderId="
+
'pages/order/material?orderId='
+
this
.
orderId
+
"&fieldName="
+
'&fieldName='
+
this
.
item
.
fieldsName
,
// 接口调用成功的回调函数,即跳转到B页面 test.vue 后的回调函数
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// 通过eventChannel向被打开页面传送数据
res
.
eventChannel
.
emit
(
"showMaterialData"
,
self
.
dataValue
);
res
.
eventChannel
.
emit
(
'showMaterialData'
,
self
.
dataValue
)
},
})
;
})
},
},
}
;
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/components/createCom/XhSpecifications.vue
View file @
1bf70585
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<view
class=
"xh-specifications"
:style=
"
{'width': fieldsWidth}">
<view
class=
"u-flex u-row-between picker-common"
@
click=
"$u.throttle(handleClick, 500)"
>
<view>
{{
text
||
'请选择'
}}
</view>
<u-icon
class=
"input-icon"
color=
"#2272FF"
name=
"arrow-down"
></u-icon>
</view>
</view>
<view
class=
"xh-specifications"
:style=
"
{ width: fieldsWidth }">
<view
class=
"u-flex u-row-between picker-common"
@
click=
"$u.throttle(handleClick, 500)"
>
<view>
{{
text
||
'请选择'
}}
</view>
<u-icon
class=
"input-icon"
color=
"#2272FF"
name=
"arrow-down"
></u-icon>
</view>
</view>
</
template
>
<
script
>
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhSpecifications'
,
components
:
{},
mixins
:
[
stringMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请选择'
},
width
:
{
// 例如:454rpx
type
:
String
,
default
:
'100%'
},
type
:
{
type
:
String
,
default
:
'text'
},
},
data
()
{
return
{
}
},
computed
:
{
fieldsWidth
()
{
// 后台返回宽度就用后台的
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
text
(){
// 根据选中的key显示
let
option
=
this
.
item
.
fieldsOptions
.
find
(
a
=>
{
return
a
.
key
===
this
.
dataValue
})
return
option
?
option
.
label
:
''
}
},
watch
:
{},
mounted
()
{},
methods
:
{
handleClick
()
{
var
pages
=
getCurrentPages
();
if
(
pages
.
length
>=
1
)
{
var
page
=
pages
[
pages
.
length
-
1
];
page
.
info
=
this
.
item
// 给下个页面传递数据
}
uni
.
navigateTo
({
// 把选中的key传给下个页面
url
:
'pages/order/specification?selectedId='
+
this
.
dataValue
})
}
}
}
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhSpecifications'
,
components
:
{},
mixins
:
[
stringMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请选择'
,
},
width
:
{
// 例如:454rpx
type
:
String
,
default
:
'100%'
,
},
type
:
{
type
:
String
,
default
:
'text'
,
},
},
data
()
{
return
{}
},
computed
:
{
fieldsWidth
()
{
// 后台返回宽度就用后台的
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
},
text
()
{
// 根据选中的key显示
let
option
=
this
.
item
.
fieldsOptions
.
find
((
a
)
=>
{
return
a
.
key
===
this
.
dataValue
})
return
option
?
option
.
label
:
''
},
},
watch
:
{},
mounted
()
{},
methods
:
{
handleClick
()
{
if
(
this
.
disabled
)
return
var
pages
=
getCurrentPages
()
if
(
pages
.
length
>=
1
)
{
var
page
=
pages
[
pages
.
length
-
1
]
page
.
info
=
this
.
item
// 给下个页面传递数据
}
uni
.
navigateTo
({
// 把选中的key传给下个页面
url
:
'pages/order/specification?selectedId='
+
this
.
dataValue
,
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.xh-specifications
{
position
:
relative
;
.input-icon
{
position
:
absolute
;
right
:
20rpx
;
top
:
26rpx
;
color
:
#2272FF
;
}
}
.picker-common
{
min-height
:
35px
;
background-color
:
#F4F5F
7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
.xh-specifications
{
position
:
relative
;
.input-icon
{
position
:
absolute
;
right
:
20rpx
;
top
:
26rpx
;
color
:
#2272ff
;
}
}
.picker-common
{
min-height
:
35px
;
background-color
:
#f4f5f
7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
</
style
>
src/components/createCom/XhTime.vue
View file @
1bf70585
<!-- ******************* 输入框 ******************* -->
<
template
>
<view
class=
"picker-box"
>
<!--
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<view
class=
"picker-box"
>
<!--
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<view
class=
"txt u-flex-1"
>
{{
dataValue
||
'请选择时间'
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
-->
<!--
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
-->
<view
class=
"u-flex u-row-between"
>
<picker
mode=
"date"
:value=
"dataValue"
@
change=
"bindDateChange"
class=
"txt u-flex-1"
>
<view>
{{
dataValue
||
'请选择时间'
}}
</view>
</picker>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
<!--
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
-->
<view
class=
"u-flex u-row-between"
>
<picker
mode=
"date"
:value=
"dataValue"
@
change=
"bindDateChange"
class=
"txt u-flex-1"
:disabled=
"disabled"
>
<view>
{{
dataValue
||
'请选择时间'
}}
</view>
</picker>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
</
template
>
<
script
>
import
stringMixin
from
'./stringMixin'
export
default
{
components
:
{},
mixins
:
[
stringMixin
],
props
:
{},
data
()
{
return
{
showPicker
:
false
,
params
:
{
year
:
true
,
month
:
true
,
day
:
true
,
hour
:
false
,
minute
:
false
,
second
:
false
,
timestamp
:
true
,
},
date
:
'请选择'
,
}
},
mounted
()
{},
methods
:
{
openPicker
()
{
this
.
showPicker
=
true
},
pickerConfirm
(
data
)
{
let
result
=
[]
let
dataValue
=
data
.
year
+
'-'
+
data
.
month
+
'-'
+
data
.
day
this
.
dataValue
=
dataValue
this
.
valueChange
(
dataValue
)
},
bindDateChange
:
function
(
e
)
{
const
value
=
e
.
target
.
value
this
.
dataValue
=
value
this
.
valueChange
(
value
)
}
}
}
import
stringMixin
from
'./stringMixin'
export
default
{
components
:
{},
mixins
:
[
stringMixin
],
props
:
{},
data
()
{
return
{
showPicker
:
false
,
params
:
{
year
:
true
,
month
:
true
,
day
:
true
,
hour
:
false
,
minute
:
false
,
second
:
false
,
timestamp
:
true
,
},
date
:
'请选择'
,
}
},
mounted
()
{},
methods
:
{
openPicker
()
{
this
.
showPicker
=
true
},
pickerConfirm
(
data
)
{
let
result
=
[]
let
dataValue
=
data
.
year
+
'-'
+
data
.
month
+
'-'
+
data
.
day
this
.
dataValue
=
dataValue
this
.
valueChange
(
dataValue
)
},
bindDateChange
:
function
(
e
)
{
const
value
=
e
.
target
.
value
this
.
dataValue
=
value
this
.
valueChange
(
value
)
},
},
}
</
script
>
<
style
>
</
style
>
<
style
></
style
>
src/components/order/detail.vue
View file @
1bf70585
...
...
@@ -14,10 +14,10 @@
<view
class=
"order-cell"
>
<text>
合作厂商:
</text>
<text>
{{
order
.
partnerCompanyName
}}
</text>
</view>
<view
class=
"order-cell"
>
<text>
厂商编号:
</text>
<text>
{{
order
.
partnerSerialNumber
}}
</text>
</view>
<view
class=
"order-cell"
>
<text>
厂商编号:
</text>
<text>
{{
order
.
partnerSerialNumber
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<view
class=
"left"
>
...
...
@@ -131,6 +131,7 @@
if
(
this
.
operate
)
{
const
latitude
=
this
.
order
.
contactAddressLatitud
//res.latitude;
const
longitude
=
this
.
order
.
contactAddressLongitud
//res.longitude;
getApp
().
track
(
"order_open_location"
,
{
address
:
address
});
uni
.
openLocation
({
latitude
:
Number
(
latitude
),
longitude
:
Number
(
longitude
),
...
...
@@ -142,6 +143,7 @@
},
phoneToCustomer
(
phone
)
{
// 联系客户
if
(
this
.
operate
)
{
getApp
().
track
(
"order_make_phone_call"
,
{
phone
:
phone
});
uni
.
makePhoneCall
({
phoneNumber
:
phone
,
//仅为示例
complete
()
{}
...
...
@@ -158,14 +160,14 @@
},
handleClick
(
val
)
{
this
.
$emit
(
'update:readMore'
,
val
)
},
handleLongpress
(
text
)
{
uni
.
setClipboardData
({
data
:
text
,
success
:
function
()
{
console
.
log
(
'success'
);
}
});
},
handleLongpress
(
text
)
{
uni
.
setClipboardData
({
data
:
text
,
success
:
function
()
{
console
.
log
(
'success'
);
}
});
}
}
}
...
...
@@ -299,4 +301,4 @@
text-align
:
left
;
flex-shrink
:
0
;
}
</
style
>
</
style
>
src/components/order/index.vue
View file @
1bf70585
This diff is collapsed.
Click to expand it.
src/components/photo/preview.vue
View file @
1bf70585
...
...
@@ -72,29 +72,43 @@
return
}
let
path
=
''
let
pass
=
true
if
(
photo
.
tempPath
.
origin
&&
photo
?.
waterSetting
?.
hasOrigin
){
// 保存原图到本地
path
=
photo
.
tempPath
.
origin
let
result
=
await
this
.
saveLocal
(
path
)
if
(
result
){
await
this
.
saveLocal
(
path
).
then
(
res
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'已将照片原图保存到本地相册'
})
}
}).
catch
(
e
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
e
})
pass
=
false
that
.
$parent
.
goBack
()
})
}
// 如果用户不同意保存到相册
if
(
!
pass
)
return
if
(
photo
.
tempPath
.
mixWater
){
// 保存水印处理图片到本地
path
=
photo
.
tempPath
.
mixWater
let
result1
=
await
this
.
saveLocal
(
path
)
if
(
result1
){
this
.
saveLocal
(
path
).
then
(
res
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'已将水印图片保存到本地相册'
})
resolve
()
}
}).
catch
(
e
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
e
})
that
.
$parent
.
goBack
()
})
}
})
},
...
...
@@ -105,8 +119,25 @@
success
()
{
resolve
(
true
)
},
fail
()
{
reject
(
'保存失败'
)
fail
(
e
)
{
uni
.
showModal
({
content
:
'拒绝授权将无法保存图片到本地,是否去设置打开?'
,
confirmText
:
"确认"
,
cancelText
:
'取消'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
openSetting
({
success
(
res
)
{
resolve
(
true
)
}
})
}
else
if
(
res
.
cancel
)
{
reject
(
'保存失败'
)
}
},
fail
()
{
}
})
}
})
})
...
...
src/components/select-parts/index.vue
View file @
1bf70585
...
...
@@ -8,8 +8,8 @@
<u-image
:src=
"partsImage(info.images)"
width=
"200rpx"
height=
"200rpx"
/>
</view>
<view
class=
"u-flex right-content"
>
<view
class=
"right-content-name"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-desc"
>
{{
info
.
remark
}}
</view>
<view
class=
"right-content-name
u-line-2
"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-desc
u-line-2
"
>
{{
info
.
remark
}}
</view>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"no"
v-if=
"info.stock"
>
可用
{{
info
.
stock
}}
件
...
...
@@ -81,6 +81,7 @@
overflow
:
hidden
;
.right-img
{
padding-right
:
20rpx
;
align-self
:
baseline
;
}
.right-content
{
flex
:
1
;
...
...
@@ -91,8 +92,6 @@
font-size
:
32rpx
;
color
:
#333
;
font-weight
:
bold
;
height
:
48rpx
;
overflow
:
hidden
;
}
.right-content-desc
{
font-size
:
24rpx
;
...
...
src/components/take/index.vue
View file @
1bf70585
...
...
@@ -268,12 +268,6 @@
t
()
},
cameraError
(
e
)
{
const
{
errMsg
}
=
e
.
detail
if
(
errMsg
!==
'insertCamera:fail auth deny'
)
{
return
}
this
.
showSettingModal
(
'camera'
)
},
//获取位置
...
...
@@ -329,9 +323,12 @@
success
(
res
)
{
if
(
res
.
confirm
)
{
self
.
openSetting
()
}
else
if
(
res
.
cancel
)
{
if
(
type
===
'camera'
||
type
===
'location'
)
self
.
goBack
()
}
},
fail
()
{}
fail
()
{
}
})
},
openSetting
()
{
...
...
@@ -346,6 +343,8 @@
// 位置授权成功
self
.
authSetting
.
location
=
true
self
.
getLocation
()
}
else
{
self
.
showSettingModal
(
'location'
)
}
if
(
res
.
authSetting
[
'scope.camera'
])
{
self
.
authSetting
.
camera
=
true
...
...
src/pages/index/learn.vue
View file @
1bf70585
...
...
@@ -749,6 +749,7 @@ export default {
},
// 安装文件
goToDocument
()
{
getApp
().
track
(
"learn_goToDocument"
,
{})
this
.
$u
.
route
({
url
:
'pages/order/document'
,
})
...
...
@@ -826,6 +827,10 @@ export default {
},
//跳转到播放
goPlay
(
info
)
{
getApp
().
track
(
"learn_allPlayCounts"
,
{
courseId
:
info
.
id
})
if
(
info
.
title
===
"小程序使用指南"
)
{
getApp
().
track
(
"learn_guidePlayCounts"
,
{
courseId
:
info
.
id
})
}
uni
.
navigateTo
({
url
:
"/pages/learn/section?section_id="
+
...
...
@@ -834,13 +839,14 @@ export default {
info
.
id
,
});
},
//跳转到
//跳转到
消息详情页
bbb
(
e
)
{
var
news
=
{
body
:
e
.
body
,
title
:
e
.
title
,
create_at
:
e
.
create_at
,
};
getApp
().
track
(
"learn_goToMessage"
,
{})
let
that
=
this
;
wx
.
navigateTo
({
url
:
"/pages/learn/news-details"
,
...
...
src/pages/index/order.vue
View file @
1bf70585
This diff is collapsed.
Click to expand it.
src/pages/mine/contract/index.vue
View file @
1bf70585
...
...
@@ -77,6 +77,7 @@ export default {
});
},
goBaidu
(
a
)
{
getApp
().
track
(
"mine_lookContract"
,
{
url
:
a
})
getApp
().
globalData
.
contractUrl
=
a
;
wx
.
navigateTo
({
url
:
"./out"
,
...
...
src/pages/order/complete.vue
View file @
1bf70585
This diff is collapsed.
Click to expand it.
src/pages/order/detail.vue
View file @
1bf70585
...
...
@@ -642,9 +642,11 @@
this
.
clickFeedback
()
break
case
2
:
getApp
().
track
(
"order_errorSign"
,
{
orderId
:
this
.
orderId
})
this
.
take
()
break
case
3
:
getApp
().
track
(
"order_scenePhotoClick"
,
{
orderId
:
this
.
orderId
})
this
.
scenePhotoClick
()
break
case
4
:
...
...
@@ -763,6 +765,10 @@
},
// 去业务材料页面
handleClickFile
()
{
getApp
().
track
(
"order_click_view_files"
,
{
brandId
:
this
.
order
.
lianbaoBrandId
,
partnerCompanyId
:
this
.
order
.
partnerCompanyId
})
this
.
$u
.
route
({
url
:
'pages/order/document'
+
'?partnerCompanyId='
+
this
.
order
.
partnerCompanyId
+
'&brandId='
+
this
.
order
.
lianbaoBrandId
})
},
trackOrder
()
{
...
...
@@ -788,6 +794,10 @@
this
.
centerBtnDisabled
=
true
},
clickFeedback
(){
getApp
().
track
(
"order_clickFeedback"
,
{
orderId
:
this
.
order
.
orderId
,
categoryId
:
this
.
order
.
categoryId
})
// 过程反馈
uni
.
navigateTo
({
url
:
'pages/order/feedback?orderId='
+
this
.
order
.
orderId
+
'&categoryId='
+
this
.
order
.
categoryId
+
'&showGY='
+
(
this
.
bottomButtonText
!=
'预约'
?
'1'
:
'0'
)
...
...
src/pages/order/document.vue
View file @
1bf70585
This diff is collapsed.
Click to expand it.
src/pages/order/feedback.vue
View file @
1bf70585
...
...
@@ -357,6 +357,10 @@ export default {
}
self
.
submiting
=
true
;
getApp
().
track
(
"order_feedback_submitForm"
,
{
reasonType
:
self
.
trace
.
reasonType
,
traceDate
:
self
.
traceDate
})
let
params
=
this
.
$u
.
deepClone
(
self
.
trace
);
if
(
self
.
trace
.
reasonType
!=
'改约'
)
{
if
(
self
.
timeItem
&&
self
.
timeItem
.
pkey
&&
self
.
traceDate
){
...
...
src/pages/order/search.vue
View file @
1bf70585
...
...
@@ -85,7 +85,10 @@
searchOrder
(
index
)
{
this
.
search
.
pageNumber
=
1
this
.
loadStaus
=
'loading'
;
this
.
getOrderList
()
if
(
this
.
search
.
keyword
)
{
getApp
().
track
(
'search_order'
,
{
keyword
:
this
.
search
.
keyword
});
this
.
getOrderList
()
}
},
// 页面数据
getOrderList
(
event
)
{
...
...
src/pages/parts/application.vue
View file @
1bf70585
...
...
@@ -224,6 +224,7 @@ export default {
if
(
!
this
.
validateForm
())
{
return
false
}
getApp
().
track
(
"parts_application_submitParts"
,
{})
const
address
=
this
.
addressInfo
let
params
=
{
applyType
:
'1'
,
...
...
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