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
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
()
{
;(
function
()
{
let
NODE_ENV
=
'test'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'prod'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
;
let
ENV_VAR
=
null
let
VERSION_NUMBER
=
'1.3.13'
;
//版本号
let
VERSION_NUMBER
=
'1.3.19'
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
NODE_ENV
===
'dev'
)
{
if
(
NODE_ENV
===
'dev'
)
{
ENV_VAR
=
require
(
'./.env.dev.js'
);
ENV_VAR
=
require
(
'./.env.dev.js'
)
}
else
if
(
NODE_ENV
===
'test'
)
{
}
else
if
(
NODE_ENV
===
'test'
)
{
ENV_VAR
=
require
(
'./.env.test.js'
);
ENV_VAR
=
require
(
'./.env.test.js'
)
}
else
if
(
NODE_ENV
===
'prod'
)
{
}
else
if
(
NODE_ENV
===
'prod'
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
);
ENV_VAR
=
require
(
'./.env.prod.js'
)
}
}
// 百度地图AK,请勿删除
// 百度地图AK,请勿删除
ENV_VAR
[
'bmapAK'
]
=
'G1wPip2Oj62NnoUctXhiE1faZVHbeo2A'
ENV_VAR
[
'bmapAK'
]
=
'G1wPip2Oj62NnoUctXhiE1faZVHbeo2A'
}
else
if
(
process
.
env
.
NODE_ENV
===
"production"
)
{
}
else
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
if
(
NODE_ENV
===
'test'
)
{
if
(
NODE_ENV
===
'test'
)
{
ENV_VAR
=
require
(
'./.env.test.js'
);
ENV_VAR
=
require
(
'./.env.test.js'
)
}
else
if
(
NODE_ENV
===
'prod'
)
{
}
else
if
(
NODE_ENV
===
'prod'
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
);
ENV_VAR
=
require
(
'./.env.prod.js'
)
}
}
// 百度地图AK,请勿删除
// 百度地图AK,请勿删除
ENV_VAR
[
'bmapAK'
]
=
'lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI'
ENV_VAR
[
'bmapAK'
]
=
'lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI'
}
}
if
(
ENV_VAR
)
{
if
(
ENV_VAR
)
{
process
.
uniEnv
=
{};
process
.
uniEnv
=
{}
process
.
uniEnv
[
'node_env'
]
=
NODE_ENV
;
process
.
uniEnv
[
'node_env'
]
=
NODE_ENV
process
.
uniEnv
[
'version_number'
]
=
VERSION_NUMBER
;
process
.
uniEnv
[
'version_number'
]
=
VERSION_NUMBER
for
(
let
key
in
ENV_VAR
)
{
for
(
let
key
in
ENV_VAR
)
{
process
.
uniEnv
[
key
]
=
ENV_VAR
[
key
];
process
.
uniEnv
[
key
]
=
ENV_VAR
[
key
]
}
}
}
}
})()
;
})()
src/components/createCom/XhCheckbox.vue
View file @
1bf70585
<!-- ******************* 多选框 ******************* -->
<!-- ******************* 多选框 ******************* -->
<
template
>
<
template
>
<view
class=
"list"
>
<view
class=
"list"
>
<view
v-for=
"(item,index) in settings"
:key=
"index"
<view
:class=
"
{'txt':true,'active':checkStatus(item.key)}" @click="setValue(item.key)">
{{
item
.
label
}}
v-for=
"(item, index) in settings"
</view>
:key=
"index"
</view>
:class=
"
{ txt: true, active: checkStatus(item.key) }"
@click="setValue(item.key)"
>
{{
item
.
label
}}
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
arrMixin
from
'./arrMixin'
import
arrMixin
from
'./arrMixin'
export
default
{
export
default
{
name
:
'XhRadio'
,
name
:
'XhRadio'
,
components
:
{},
components
:
{},
mixins
:
[
arrMixin
],
mixins
:
[
arrMixin
],
props
:
{},
props
:
{},
filters
:{},
filters
:
{},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{
computed
:
{
settings
()
{
settings
()
{
return
this
.
item
.
fieldsOptions
||
[]
return
this
.
item
.
fieldsOptions
||
[]
}
},
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
checkStatus
(
item
){
checkStatus
(
item
)
{
if
(
!
item
){
if
(
!
item
)
{
return
false
return
false
}
}
const
dataValue
=
this
.
dataValue
const
dataValue
=
this
.
dataValue
let
flag
=
Array
.
isArray
(
dataValue
)
&&
dataValue
.
indexOf
(
item
)
>-
1
let
flag
=
Array
.
isArray
(
dataValue
)
&&
dataValue
.
indexOf
(
item
)
>
-
1
return
flag
return
flag
},
},
setValue
(
txt
)
{
setValue
(
txt
)
{
const
dataValue
=
this
.
dataValue
||
[]
if
(
this
.
disabled
)
return
let
idx
=
dataValue
.
indexOf
(
txt
)
const
dataValue
=
this
.
dataValue
||
[]
if
(
idx
>
-
1
)
{
let
idx
=
dataValue
.
indexOf
(
txt
)
dataValue
.
splice
(
idx
,
1
)
if
(
idx
>
-
1
)
{
}
else
{
dataValue
.
splice
(
idx
,
1
)
dataValue
.
push
(
txt
)
}
else
{
}
dataValue
.
push
(
txt
)
this
.
dataValue
=
dataValue
}
this
.
valueChange
(
this
.
dataValue
)
this
.
dataValue
=
dataValue
}
this
.
valueChange
(
this
.
dataValue
)
}
},
}
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.list
{
.list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
.txt
{
.txt
{
color
:
#333
;
color
:
#333
;
padding
:
10rpx
30rpx
;
padding
:
10rpx
30rpx
;
margin
:
10rpx
;
margin
:
10rpx
;
background
:
#F4F5F
7
;
background
:
#f4f5f
7
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
line-height
:
50rpx
;
max-width
:
46%
;
max-width
:
46%
;
align-items
:
center
;
align-items
:
center
;
&
.active
{
&
.active
{
background-color
:
#2272FF
;
background-color
:
#2272ff
;
color
:
#fff
;
color
:
#fff
;
}
}
}
}
}
}
</
style
>
</
style
>
src/components/createCom/XhFiles.vue
View file @
1bf70585
<!-- ******************* 文件上传 ******************* -->
<!-- ******************* 文件上传 ******************* -->
<
template
>
<
template
>
<view>
<view>
<view
class=
"file-box"
>
<view
class=
"file-box"
>
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"img-list"
v-for=
"(item,index) in imgList"
:key=
"index"
>
<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>
<u-image
<view
class=
"icon-del-box"
@
click
.
stop=
"delFile(index)"
>
class=
"pic"
<view
class=
"icon-del"
></view>
width=
"160"
<view
class=
"icon-del rotate"
></view>
height=
"160"
</view>
:src=
"
</view>
item.path
<slot></slot>
? item.path
<!--
<view
class=
"img-list"
>
: 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>
<u-image
class=
"pic"
width=
"160rpx"
height=
"160rpx"
:border-radius=
"10"
@
click=
"selectUpload"
:src=
"uploadImage"
></u-image>
</view>
-->
</view>
-->
</view>
</view>
<!--
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
-->
<!--
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
-->
</view>
</view>
<!--
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
-->
<!--
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
-->
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
arrMixin
from
'./arrMixin'
import
arrMixin
from
'./arrMixin'
import
baseFile
from
'@/components/upload/index'
;
import
baseFile
from
'@/components/upload/index'
import
takePhoto
from
'@/components/take/index.vue'
import
takePhoto
from
'@/components/take/index.vue'
// import uploader from '@/plugins/uploader/index.js'
// import uploader from '@/plugins/uploader/index.js'
export
default
{
export
default
{
name
:
'XhFiles'
,
name
:
'XhFiles'
,
components
:
{
components
:
{
'take-photo'
:
takePhoto
'take-photo'
:
takePhoto
,
},
},
mixins
:
[
arrMixin
,
baseFile
],
mixins
:
[
arrMixin
,
baseFile
],
props
:
{
props
:
{
files
:
{
files
:
{
type
:
Array
,
type
:
Array
,
},
},
partnerCompanyId
:
{
partnerCompanyId
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
,
},
},
categoryId
:
{
categoryId
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
,
},
},
brandId
:
{
brandId
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
,
},
},
},
},
filters
:{},
filters
:
{},
data
()
{
data
()
{
return
{
return
{
maskShow
:
false
,
maskShow
:
false
,
list
:
[
list
:
[
{
{
text
:
'相册'
text
:
'相册'
,
},
},
{
{
text
:
'拍照'
text
:
'拍照'
,
}
},
],
],
takeStatus
:
false
,
takeStatus
:
false
,
currentItemDate
:{},
currentItemDate
:
{},
}
}
},
},
computed
:
{
computed
:
{
settings
()
{
settings
()
{
return
this
.
item
.
settings
||
[]
return
this
.
item
.
settings
||
[]
},
},
uploadImage
()
{
uploadImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-file.png'
return
process
.
uniEnv
.
qn_base_url
+
'upload-file.png'
},
},
},
},
mounted
()
{
mounted
()
{
if
(
this
.
value
){
if
(
this
.
value
)
{
this
.
imgList
=
this
.
value
.
filter
(
v
=>
v
).
map
(
img
=>
{
this
.
imgList
=
this
.
value
return
{
src
:
img
?
img
:
''
}
.
filter
((
v
)
=>
v
)
})
.
map
((
img
)
=>
{
this
.
setValue
()
return
{
src
:
img
?
img
:
''
}
}
})
},
this
.
setValue
()
methods
:
{
}
setTmpValue
(
values
)
{
},
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
methods
:
{
const
dataValue
=
this
.
imgList
.
map
(
v
=>
v
.
src
)
setTmpValue
(
values
)
{
this
.
valueChange
(
dataValue
)
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
},
const
dataValue
=
this
.
imgList
.
map
((
v
)
=>
v
.
src
)
setValue
()
{
this
.
valueChange
(
dataValue
)
const
dataValue
=
this
.
imgList
.
map
(
item
=>
item
.
src
)
},
this
.
valueChange
(
dataValue
)
setValue
()
{
},
const
dataValue
=
this
.
imgList
.
map
((
item
)
=>
item
.
src
)
prviewImage
(
item
,
index
)
{
this
.
valueChange
(
dataValue
)
uni
.
previewImage
({
},
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
prviewImage
(
item
,
index
)
{
current
:
index
uni
.
previewImage
({
});
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
},
current
:
index
,
delFile
(
index
)
{
})
this
.
imgList
.
splice
(
index
,
1
)
},
this
.
setValue
()
delFile
(
index
)
{
},
this
.
imgList
.
splice
(
index
,
1
)
/*
this
.
setValue
()
},
/*
selectUpload(){
selectUpload(){
if (this.imgList.length === 10) {
if (this.imgList.length === 10) {
return this.$refs.uToast.show({
return this.$refs.uToast.show({
...
@@ -197,66 +216,64 @@
...
@@ -197,66 +216,64 @@
}
}
});
});
}*/
}*/
}
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
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
{
.icon-del-box
{
position
:
relative
;
/* #ifndef APP-NVUE */
margin
:
8rpx
;
display
:
flex
;
width
:
160rpx
;
/* #endif */
height
:
160rpx
;
align-items
:
center
;
justify-content
:
center
;
.pic
{
position
:
absolute
;
// margin-right: 15rpx;
top
:
10rpx
;
// margin-bottom: 15rpx;
right
:
10rpx
;
&
:nth-child
(
3n
)
{
height
:
40rpx
;
margin-right
:
0
;
width
:
40rpx
;
}
border-radius
:
50%
;
}
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
.icon-del-box
{
transform
:
rotate
(
-45deg
);
/* #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
{
.icon-del
{
width
:
30rpx
;
width
:
30rpx
;
height
:
4rpx
;
height
:
4rpx
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.rotate
{
.rotate
{
position
:
absolute
;
position
:
absolute
;
transform
:
rotate
(
90deg
);
transform
:
rotate
(
90deg
);
}
}
}
}
// .list {
// .list {
// display: flex;
// display: flex;
// .txt {
// .txt {
// color: #666;
// color: #666;
// padding: 10rpx;
// padding: 10rpx;
// &.active {
// &.active {
// background-color: red;
// background-color: red;
// color: #fff;
// color: #fff;
// }
// }
// }
// }
// }
// }
</
style
>
</
style
>
src/components/createCom/XhLocation.vue
View file @
1bf70585
<!-- ******************* 定位 ******************* -->
<!-- ******************* 定位 ******************* -->
<
template
>
<
template
>
<view>
<view>
<view
class=
"list u-flex u-row-between"
>
<view
class=
"list u-flex u-row-between"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 location-name"
@
click=
"getLocation"
>
<view
class=
"u-flex-1 location-name"
@
click=
"getLocation"
>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
自动定位
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
自动定位
</view>
</view>
</view>
</view>
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
arrMixin
from
'./arrMixin'
import
arrMixin
from
'./arrMixin'
export
default
{
export
default
{
name
:
'XhLocation'
,
name
:
'XhLocation'
,
components
:
{},
components
:
{},
mixins
:
[
arrMixin
],
mixins
:
[
arrMixin
],
props
:
{},
props
:
{},
filters
:{},
filters
:
{},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{
computed
:
{
valueTxt
()
{
valueTxt
()
{
let
str
=
''
let
str
=
''
const
dataValue
=
this
.
dataValue
const
dataValue
=
this
.
dataValue
if
(
dataValue
&&
dataValue
.
length
>
1
){
if
(
dataValue
&&
dataValue
.
length
>
1
)
{
str
=
'经度:'
+
dataValue
[
0
].
toFixed
(
4
)
+
','
+
'纬度:'
+
dataValue
[
1
].
toFixed
(
4
)
str
=
}
'经度:'
+
return
str
dataValue
[
0
].
toFixed
(
4
)
+
},
','
+
mixingImage
()
{
'纬度:'
+
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
dataValue
[
1
].
toFixed
(
4
)
}
}
},
return
str
watch
:
{},
},
created
()
{
mixingImage
()
{
this
.
getLocation
()
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
},
methods
:
{
},
getLocation
()
{
watch
:
{},
let
self
=
this
created
()
{
const
dataValue
=
this
.
dataValue
||
[]
this
.
getLocation
()
const
waterInfo
=
this
.
waterInfo
},
uni
.
getLocation
({
methods
:
{
type
:
'gcj02'
,
getLocation
()
{
success
:
function
(
res
)
{
if
(
this
.
disabled
)
return
dataValue
.
push
(
res
.
longitude
)
let
self
=
this
dataValue
.
push
(
res
.
latitude
)
const
dataValue
=
this
.
dataValue
||
[]
self
.
dataValue
=
dataValue
const
waterInfo
=
this
.
waterInfo
self
.
setValue
(
dataValue
)
uni
.
getLocation
({
},
type
:
'gcj02'
,
fail
(
err
)
{}
success
:
function
(
res
)
{
});
dataValue
.
push
(
res
.
longitude
)
},
dataValue
.
push
(
res
.
latitude
)
setValue
(
txt
)
{
self
.
dataValue
=
dataValue
this
.
valueChange
(
this
.
dataValue
)
self
.
setValue
(
dataValue
)
}
},
}
fail
(
err
)
{},
}
})
},
setValue
(
txt
)
{
this
.
valueChange
(
this
.
dataValue
)
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.required
{
.required
{
padding-right
:
10rpx
;
padding-right
:
10rpx
;
font-size
:
28rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
color
:
#fa3534
;
}
}
.item-image
{
.item-image
{
width
:
24rpx
;
width
:
24rpx
;
height
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
margin-right
:
10rpx
;
}
}
.location-name
{
.location-name
{
color
:
#2272FF
;
color
:
#2272ff
;
text-align
:
right
;
text-align
:
right
;
}
}
.location
{
.location
{
background
:
#F4F5F
7
;
background
:
#f4f5f
7
;
padding
:
10rpx
20rpx
;
padding
:
10rpx
20rpx
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
}
}
</
style
>
</
style
>
src/components/createCom/XhMultiInput.vue
View file @
1bf70585
<!-- ******************* 多个输入框 ******************* -->
<!-- ******************* 多个输入框 ******************* -->
<
template
>
<
template
>
<view
class=
"u-flex u-flex-wrap"
>
<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" />
<u-input
</view>
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
>
</
template
>
<
script
>
<
script
>
import
objMixin
from
'./objMixin'
import
objMixin
from
'./objMixin'
export
default
{
export
default
{
name
:
'XhMultiInput'
,
name
:
'XhMultiInput'
,
components
:
{},
components
:
{},
mixins
:
[
objMixin
],
mixins
:
[
objMixin
],
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{
computed
:
{
inputOptions
()
{
inputOptions
()
{
let
options
=
this
.
item
.
inputOptions
||
[]
let
options
=
this
.
item
.
inputOptions
||
[]
let
result
=
options
.
map
(
item
=>
{
let
result
=
options
.
map
((
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
value
:
''
value
:
''
,
}
}
})
})
return
result
return
result
}
},
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
getValue
(
item
)
{
getValue
(
item
)
{
let
currentValue
=
{}
let
currentValue
=
{}
currentValue
[
item
.
fieldsName
]
=
item
.
value
currentValue
[
item
.
fieldsName
]
=
item
.
value
// 以key,value的对象形式传递
// 以key,value的对象形式传递
this
.
valueChange
(
currentValue
)
this
.
valueChange
(
currentValue
)
}
},
}
},
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.input-item
{
.input-item
{
width
:
31%
;
width
:
31%
;
margin
:
5
rpx
;
margin
:
5
rpx
;
background
:
#F4F5F7
;
background
:
#f4f5f7
;
}
}
</
style
>
</
style
>
src/components/createCom/XhScan.vue
View file @
1bf70585
<!-- ******************* 扫码 ******************* -->
<!-- ******************* 扫码 ******************* -->
<
template
>
<
template
>
<view
class=
""
>
<view
class=
""
>
<view
class=
"u-flex"
@
click=
"scanCode"
>
<view
class=
"u-flex"
@
click=
"scanCode"
>
<view
class=
"txt u-flex-1"
>
扫描二维码(仅挚达充电桩可扫描)
</view>
<view
class=
"txt u-flex-1"
>
扫描二维码(仅挚达充电桩可扫描)
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
<view
class=
"u-flex"
>
<view
class=
"u-flex"
>
<u-input
class=
"u-flex-1 input-item"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
/>
<u-input
</view>
class=
"u-flex-1 input-item"
</view>
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
:disabled=
"disabled"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
export
default
{
export
default
{
name
:
'XhScan'
,
name
:
'XhScan'
,
components
:
{},
components
:
{},
mixins
:
[
stringMixin
],
mixins
:
[
stringMixin
],
props
:
{},
props
:
{},
filters
:
{},
filters
:
{},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{
computed
:
{},
},
watch
:
{
},
watch
:
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
scanCode
(
type
)
{
scanCode
(
type
){
if
(
this
.
disabled
)
return
const
self
=
this
const
self
=
this
uni
.
scanCode
({
uni
.
scanCode
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
result
=
res
.
result
let
result
=
res
.
result
if
(
result
.
substring
(
0
,
4
)
===
'http'
)
{
if
(
result
.
substring
(
0
,
4
)
===
'http'
)
{
let
arr
=
result
.
split
(
'/#/'
)
let
arr
=
result
.
split
(
'/#/'
)
if
(
arr
.
length
<
2
)
arr
=
result
.
split
(
'?'
)
if
(
arr
.
length
<
2
)
arr
=
result
.
split
(
'?'
)
result
=
arr
[
1
]
result
=
arr
[
1
]
}
}
self
.
dataValue
=
result
self
.
dataValue
=
result
self
.
valueChange
(
result
)
self
.
valueChange
(
result
)
}
},
});
})
}
},
}
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.required
{
.required
{
padding-right
:
10rpx
;
padding-right
:
10rpx
;
font-size
:
28rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
color
:
#fa3534
;
}
}
.input-item
{
.input-item
{
background
:
#F4F5F
7
;
background
:
#f4f5f
7
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding-left
:
20rpx
;
padding-left
:
20rpx
;
}
}
</
style
>
</
style
>
src/components/createCom/XhSelect.vue
View file @
1bf70585
<!-- ******************* 单个下拉选择 ******************* -->
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<
template
>
<view
class=
"xh-select"
:style=
"
{'width': fieldsWidth
}">
<view
class=
"xh-select"
:style=
"
{ width: fieldsWidth
}">
<!--
<u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
<!--
<u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
:custom-style=
"customStyle"
:clearable=
"false"
></u-input>
:custom-style=
"customStyle"
:clearable=
"false"
></u-input>
<u-select
:list=
"settings"
v-model=
"show"
@
confirm=
"actionSheetCallback"
safe-area-inset-bottom
></u-select>
<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>
-->
<u-icon
class=
"input-icon"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
-->
<view
class=
"u-flex u-row-between picker-common"
>
<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"
>
<picker
<view
class=
"txt"
>
{{
text
||
'请选择'
}}
</view>
mode=
"selector"
</picker>
:value=
"index"
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
range-key=
"label"
</view>
:range=
"settings"
</view>
@
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
>
</
template
>
<
script
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
export
default
{
export
default
{
name
:
'XhSelect'
,
name
:
'XhSelect'
,
components
:
{},
components
:
{},
mixins
:
[
stringMixin
],
mixins
:
[
stringMixin
],
props
:
{
props
:
{
placeholder
:
{
placeholder
:
{
type
:
String
,
type
:
String
,
default
:
'请选择'
default
:
'请选择'
,
},
},
width
:
{
// 例如:454rpx
width
:
{
type
:
String
,
// 例如:454rpx
default
:
'100%'
type
:
String
,
}
default
:
'100%'
,
},
},
data
()
{
},
return
{
data
()
{
show
:
false
,
return
{
index
:
''
show
:
false
,
}
index
:
''
,
},
}
computed
:
{
},
type
()
{
computed
:
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
type
()
{
return
this
.
item
.
fieldsType
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
}
else
{
return
this
.
item
.
fieldsType
return
'text'
}
else
{
}
return
'text'
},
}
settings
()
{
},
let
result
=
[]
settings
()
{
let
settings
=
this
.
item
.
fieldsOptions
||
[]
let
result
=
[]
result
=
settings
.
map
(
item
=>
{
let
settings
=
this
.
item
.
fieldsOptions
||
[]
return
{
result
=
settings
.
map
((
item
)
=>
{
label
:
item
.
label
,
return
{
value
:
item
.
key
,
label
:
item
.
label
,
color
:
'#333333'
,
value
:
item
.
key
,
fontSize
:
26
color
:
'#333333'
,
}
fontSize
:
26
,
})
}
return
result
})
},
return
result
text
(){
},
let
option
=
this
.
item
.
fieldsOptions
.
find
(
a
=>
{
return
a
.
key
===
this
.
dataValue
})
text
()
{
return
option
?
option
.
label
:
''
let
option
=
this
.
item
.
fieldsOptions
.
find
((
a
)
=>
{
},
return
a
.
key
===
this
.
dataValue
placeholderStyle
()
{
})
return
'color:#999999;font-size:26rpx'
return
option
?
option
.
label
:
''
},
},
customStyle
()
{
placeholderStyle
()
{
return
{
return
'color:#999999;font-size:26rpx'
'background-color'
:
'#F4F5F7'
,
},
'border-radius'
:
'12rpx'
,
customStyle
()
{
'color'
:
'#333333'
,
return
{
'padding-left'
:
'20rpx'
,
'background-color'
:
'#F4F5F7'
,
'padding-right'
:
'60rpx'
,
'border-radius'
:
'12rpx'
,
'width'
:
this
.
width
,
color
:
'#333333'
,
'font-size'
:
'26rpx'
,
'padding-left'
:
'20rpx'
,
'height'
:
'76rpx'
'padding-right'
:
'60rpx'
,
}
width
:
this
.
width
,
},
'font-size'
:
'26rpx'
,
fieldsWidth
()
{
height
:
'76rpx'
,
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
}
},
},
},
fieldsWidth
()
{
watch
:
{},
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
mounted
()
{},
},
methods
:
{
},
actionSheetCallback
(
event
)
{
watch
:
{},
const
id
=
event
[
0
].
value
mounted
()
{},
this
.
dataValue
=
id
methods
:
{
this
.
valueChange
(
id
)
actionSheetCallback
(
event
)
{
},
const
id
=
event
[
0
].
value
pickerChange
(
data
)
{
this
.
dataValue
=
id
this
.
index
=
data
.
detail
.
value
this
.
valueChange
(
id
)
const
id
=
this
.
item
.
fieldsOptions
[
this
.
index
].
key
},
this
.
dataValue
=
id
pickerChange
(
data
)
{
this
.
valueChange
(
id
)
this
.
index
=
data
.
detail
.
value
},
const
id
=
this
.
item
.
fieldsOptions
[
this
.
index
].
key
}
this
.
dataValue
=
id
}
this
.
valueChange
(
id
)
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.xh-select
{
.xh-select
{
position
:
relative
;
position
:
relative
;
.input-icon
{
.input-icon
{
position
:
absolute
;
position
:
absolute
;
right
:
20rpx
;
right
:
20rpx
;
top
:
26rpx
;
top
:
26rpx
;
color
:
#2272FF
;
color
:
#2272ff
;
}
}
}
}
.picker-common
{
.picker-common
{
min-height
:
35px
;
min-height
:
35px
;
background-color
:
#F4F5F
7
;
background-color
:
#f4f5f
7
;
border-radius
:
6px
;
border-radius
:
6px
;
color
:
#333333
;
color
:
#333333
;
padding-left
:
10px
;
padding-left
:
10px
;
padding-right
:
12px
;
padding-right
:
12px
;
width
:
100%
;
width
:
100%
;
height
:
38px
;
height
:
38px
;
.txt
{
.txt
{
font-size
:
14px
;
font-size
:
14px
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
}
}
</
style
>
</
style
>
src/components/createCom/XhServiceMeasure.vue
View file @
1bf70585
...
@@ -12,11 +12,12 @@
...
@@ -12,11 +12,12 @@
:value=
"index"
:value=
"index"
range-key=
"label"
range-key=
"label"
:range=
"settings"
:range=
"settings"
:disabled=
"disabled"
@
click=
"showPicker = true"
@
click=
"showPicker = true"
@
change=
"pickerChange"
@
change=
"pickerChange"
class=
"txt u-flex-1"
class=
"txt u-flex-1"
>
>
<view>
{{
text
||
"请选择"
}}
</view>
<view>
{{
text
||
'请选择'
}}
</view>
</picker>
</picker>
<u-icon
<u-icon
class=
"input-icon"
class=
"input-icon"
...
@@ -30,9 +31,9 @@
...
@@ -30,9 +31,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
objMixin
from
"./objMixin"
;
import
objMixin
from
'./objMixin'
export
default
{
export
default
{
name
:
"XhPicker"
,
name
:
'XhPicker'
,
components
:
{},
components
:
{},
mixins
:
[
objMixin
],
mixins
:
[
objMixin
],
props
:
{
props
:
{
...
@@ -40,17 +41,17 @@ export default {
...
@@ -40,17 +41,17 @@ export default {
defaultSelector
:
{
defaultSelector
:
{
type
:
Array
,
type
:
Array
,
default
()
{
default
()
{
return
[
0
]
;
return
[
0
]
},
},
},
},
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
rangeKey
:
{
rangeKey
:
{
type
:
String
,
type
:
String
,
default
:
"label"
,
default
:
'label'
,
},
},
value
:
{
value
:
{
type
:
String
,
type
:
String
,
default
:
"{}"
,
default
:
'{}'
,
},
},
orderId
:
{
orderId
:
{
type
:
Number
,
type
:
Number
,
...
@@ -62,11 +63,11 @@ export default {
...
@@ -62,11 +63,11 @@ export default {
},
},
specificationId
:
{
specificationId
:
{
type
:
String
,
type
:
String
,
default
:
"0"
,
default
:
'0'
,
},
},
orderServiceType
:
{
orderServiceType
:
{
type
:
String
,
type
:
String
,
default
:
"安装"
,
default
:
'安装'
,
},
},
},
},
filters
:
{},
filters
:
{},
...
@@ -76,47 +77,47 @@ export default {
...
@@ -76,47 +77,47 @@ export default {
showPicker
:
false
,
showPicker
:
false
,
settings
:
[],
settings
:
[],
measure
:
[],
measure
:
[],
index
:
""
,
index
:
''
,
}
;
}
},
},
computed
:
{
computed
:
{
text
()
{
text
()
{
let
val
=
""
;
let
val
=
''
if
(
this
.
value
)
{
if
(
this
.
value
)
{
let
data
=
JSON
.
parse
(
this
.
value
)
;
let
data
=
JSON
.
parse
(
this
.
value
)
val
=
data
[
0
].
measureTypeName
+
"-"
+
data
[
0
].
measureName
;
val
=
data
[
0
].
measureTypeName
+
'-'
+
data
[
0
].
measureName
}
}
return
val
;
return
val
},
},
fieldsWidth
()
{
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
"rpx"
:
"100%"
;
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
},
},
},
},
watch
:
{
watch
:
{
specificationId
(
val
,
oldVal
)
{
specificationId
(
val
,
oldVal
)
{
this
.
initComponent
()
;
this
.
initComponent
()
},
},
},
},
mounted
()
{
mounted
()
{
this
.
isNotMulti
=
this
.
orderServiceType
===
"安装"
;
this
.
isNotMulti
=
this
.
orderServiceType
===
'安装'
this
.
initComponent
()
;
this
.
initComponent
()
},
},
methods
:
{
methods
:
{
openPicker
()
{
openPicker
()
{
if
(
this
.
specificationId
===
"0"
)
{
if
(
this
.
specificationId
===
'0'
)
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
"请先选择规格"
,
title
:
'请先选择规格'
,
type
:
"error"
,
type
:
'error'
,
})
;
})
return
;
return
}
}
this
.
showPicker
=
true
;
this
.
showPicker
=
true
},
},
initComponent
()
{
initComponent
()
{
if
(
this
.
isNotMulti
)
{
if
(
this
.
isNotMulti
)
{
this
.
initMeasure
()
;
this
.
initMeasure
()
}
else
{
}
else
{
this
.
initSymptoms
()
;
this
.
initSymptoms
()
}
}
},
},
initSymptoms
()
{
initSymptoms
()
{
...
@@ -133,50 +134,50 @@ export default {
...
@@ -133,50 +134,50 @@ export default {
categoryId
:
this
.
categoryId
,
categoryId
:
this
.
categoryId
,
specificationId
:
this
.
specificationId
,
specificationId
:
this
.
specificationId
,
orderServiceTypeText
:
this
.
orderServiceType
,
orderServiceTypeText
:
this
.
orderServiceType
,
}
;
}
this
.
$u
.
api
.
getMeasureV2
(
param
).
then
(
res
=>
{
this
.
$u
.
api
.
getMeasureV2
(
param
).
then
(
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
let
result
=
[]
;
let
result
=
[]
for
(
let
key
in
res
.
data
)
{
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
)
=>
{
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
===
"安装"
)
{
if
(
this
.
orderServiceType
===
'安装'
)
{
this
.
settings
=
result
;
this
.
settings
=
result
}
else
{
}
else
{
this
.
settings
[
2
]
=
result
;
this
.
settings
[
2
]
=
result
}
}
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"查询措施失败"
);
console
.
log
(
res
.
message
,
'查询措施失败'
)
}
}
})
;
})
}
}
},
},
pickerConfirm
(
data
)
{
pickerConfirm
(
data
)
{
let
result
=
[]
;
let
result
=
[]
if
(
this
.
isMulti
)
{
if
(
this
.
isMulti
)
{
// 维修
// 维修
}
else
{
}
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
)
{
pickerChange
(
data
)
{
this
.
showPicker
=
false
;
this
.
showPicker
=
false
this
.
index
=
data
.
detail
.
value
;
this
.
index
=
data
.
detail
.
value
let
result
=
[]
;
let
result
=
[]
if
(
this
.
isMulti
)
{
if
(
this
.
isMulti
)
{
// 维修
// 维修
}
else
{
}
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
)
{
columnchange
(
data
)
{
// // 树列改变时进行联动操作
// // 树列改变时进行联动操作
...
@@ -185,7 +186,7 @@ export default {
...
@@ -185,7 +186,7 @@ export default {
// this.settings.splice(column+1,1,arr)
// this.settings.splice(column+1,1,arr)
},
},
},
},
}
;
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.picker-common
{
.picker-common
{
...
...
src/components/createCom/XhServiceMore.vue
View file @
1bf70585
...
@@ -23,66 +23,67 @@
...
@@ -23,66 +23,67 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
arrMixin
from
"./arrMixin"
;
import
arrMixin
from
'./arrMixin'
export
default
{
export
default
{
name
:
"XhInput"
,
// 新建 input
name
:
'XhInput'
,
// 新建 input
components
:
{},
components
:
{},
mixins
:
[
arrMixin
],
mixins
:
[
arrMixin
],
props
:
{
props
:
{
placeholder
:
{
placeholder
:
{
type
:
String
,
type
:
String
,
default
:
"请输入"
,
default
:
'请输入'
,
},
},
orderId
:
{
orderId
:
{
type
:
String
,
type
:
String
,
default
:
"请输入"
,
default
:
'请输入'
,
},
},
},
},
data
()
{
data
()
{
return
{
return
{
maxlength
:
140
,
maxlength
:
140
,
}
;
}
},
},
computed
:
{
computed
:
{
mixingImage
()
{
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"mixing.png"
;
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
},
arrowText
()
{
arrowText
()
{
if
(
this
.
$u
.
test
.
isEmpty
(
this
.
dataValue
))
return
"请选择"
;
if
(
this
.
$u
.
test
.
isEmpty
(
this
.
dataValue
))
return
'请选择'
if
(
this
.
item
.
fieldsName
==
"materialList"
)
{
if
(
this
.
item
.
fieldsName
==
'materialList'
)
{
let
hasMate
=
false
let
hasMate
=
false
var
newData
=
this
.
dataValue
.
find
((
item
)
=>
{
var
newData
=
this
.
dataValue
.
find
((
item
)
=>
{
if
(
!
this
.
$u
.
test
.
isEmpty
(
item
.
useLength
))
{
if
(
!
this
.
$u
.
test
.
isEmpty
(
item
.
useLength
))
{
hasMate
=
true
hasMate
=
true
return
item
.
useLength
!=
'0'
return
item
.
useLength
!=
'0'
}
}
})
})
if
(
hasMate
&&
this
.
$u
.
test
.
isEmpty
(
newData
))
return
"请选择"
if
(
hasMate
&&
this
.
$u
.
test
.
isEmpty
(
newData
))
return
'请选择'
}
}
return
"已选择"
;
return
'已选择'
},
},
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
toMaterialPage
()
{
toMaterialPage
()
{
let
self
=
this
;
if
(
this
.
disabled
)
return
let
self
=
this
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
url
:
"pages/order/material?orderId="
+
'pages/order/material?orderId='
+
this
.
orderId
+
this
.
orderId
+
"&fieldName="
+
'&fieldName='
+
this
.
item
.
fieldsName
,
this
.
item
.
fieldsName
,
// 接口调用成功的回调函数,即跳转到B页面 test.vue 后的回调函数
// 接口调用成功的回调函数,即跳转到B页面 test.vue 后的回调函数
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// 通过eventChannel向被打开页面传送数据
// 通过eventChannel向被打开页面传送数据
res
.
eventChannel
.
emit
(
"showMaterialData"
,
self
.
dataValue
);
res
.
eventChannel
.
emit
(
'showMaterialData'
,
self
.
dataValue
)
},
},
})
;
})
},
},
},
},
}
;
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/components/createCom/XhSpecifications.vue
View file @
1bf70585
<!-- ******************* 单个下拉选择 ******************* -->
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<
template
>
<view
class=
"xh-specifications"
:style=
"
{'width': fieldsWidth}">
<view
class=
"xh-specifications"
:style=
"
{ width: fieldsWidth }">
<view
class=
"u-flex u-row-between picker-common"
@
click=
"$u.throttle(handleClick, 500)"
>
<view
<view>
{{
text
||
'请选择'
}}
</view>
class=
"u-flex u-row-between picker-common"
<u-icon
class=
"input-icon"
color=
"#2272FF"
name=
"arrow-down"
></u-icon>
@
click=
"$u.throttle(handleClick, 500)"
</view>
>
</view>
<view>
{{
text
||
'请选择'
}}
</view>
<u-icon
class=
"input-icon"
color=
"#2272FF"
name=
"arrow-down"
></u-icon>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
export
default
{
export
default
{
name
:
'XhSpecifications'
,
name
:
'XhSpecifications'
,
components
:
{},
components
:
{},
mixins
:
[
stringMixin
],
mixins
:
[
stringMixin
],
props
:
{
props
:
{
placeholder
:
{
placeholder
:
{
type
:
String
,
type
:
String
,
default
:
'请选择'
default
:
'请选择'
,
},
},
width
:
{
// 例如:454rpx
width
:
{
type
:
String
,
// 例如:454rpx
default
:
'100%'
type
:
String
,
},
default
:
'100%'
,
type
:
{
},
type
:
String
,
type
:
{
default
:
'text'
type
:
String
,
},
default
:
'text'
,
},
},
data
()
{
},
return
{
data
()
{
}
return
{}
},
},
computed
:
{
computed
:
{
fieldsWidth
()
{
// 后台返回宽度就用后台的
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
// 后台返回宽度就用后台的
},
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
text
(){
// 根据选中的key显示
},
let
option
=
this
.
item
.
fieldsOptions
.
find
(
a
=>
{
return
a
.
key
===
this
.
dataValue
})
text
()
{
return
option
?
option
.
label
:
''
// 根据选中的key显示
}
let
option
=
this
.
item
.
fieldsOptions
.
find
((
a
)
=>
{
},
return
a
.
key
===
this
.
dataValue
watch
:
{},
})
mounted
()
{},
return
option
?
option
.
label
:
''
methods
:
{
},
handleClick
()
{
},
var
pages
=
getCurrentPages
();
watch
:
{},
if
(
pages
.
length
>=
1
)
{
mounted
()
{},
var
page
=
pages
[
pages
.
length
-
1
];
methods
:
{
page
.
info
=
this
.
item
// 给下个页面传递数据
handleClick
()
{
}
if
(
this
.
disabled
)
return
uni
.
navigateTo
({
// 把选中的key传给下个页面
var
pages
=
getCurrentPages
()
url
:
'pages/order/specification?selectedId='
+
this
.
dataValue
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
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.xh-specifications
{
.xh-specifications
{
position
:
relative
;
position
:
relative
;
.input-icon
{
.input-icon
{
position
:
absolute
;
position
:
absolute
;
right
:
20rpx
;
right
:
20rpx
;
top
:
26rpx
;
top
:
26rpx
;
color
:
#2272FF
;
color
:
#2272ff
;
}
}
}
}
.picker-common
{
.picker-common
{
min-height
:
35px
;
min-height
:
35px
;
background-color
:
#F4F5F
7
;
background-color
:
#f4f5f
7
;
border-radius
:
6px
;
border-radius
:
6px
;
color
:
#333333
;
color
:
#333333
;
padding-left
:
10px
;
padding-left
:
10px
;
padding-right
:
12px
;
padding-right
:
12px
;
width
:
100%
;
width
:
100%
;
height
:
38px
;
height
:
38px
;
.txt
{
.txt
{
font-size
:
14px
;
font-size
:
14px
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
}
}
</
style
>
</
style
>
src/components/createCom/XhTime.vue
View file @
1bf70585
<!-- ******************* 输入框 ******************* -->
<!-- ******************* 输入框 ******************* -->
<
template
>
<
template
>
<view
class=
"picker-box"
>
<view
class=
"picker-box"
>
<!--
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<!--
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<view
class=
"txt u-flex-1"
>
{{
dataValue
||
'请选择时间'
}}
</view>
<view
class=
"txt u-flex-1"
>
{{
dataValue
||
'请选择时间'
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
<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>
-->
<!--
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
-->
<view
class=
"u-flex u-row-between"
>
<view
class=
"u-flex u-row-between"
>
<picker
mode=
"date"
:value=
"dataValue"
@
change=
"bindDateChange"
class=
"txt u-flex-1"
>
<picker
<view>
{{
dataValue
||
'请选择时间'
}}
</view>
mode=
"date"
</picker>
:value=
"dataValue"
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
@
change=
"bindDateChange"
</view>
class=
"txt u-flex-1"
</view>
:disabled=
"disabled"
>
<view>
{{
dataValue
||
'请选择时间'
}}
</view>
</picker>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
export
default
{
export
default
{
components
:
{},
components
:
{},
mixins
:
[
stringMixin
],
mixins
:
[
stringMixin
],
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
showPicker
:
false
,
showPicker
:
false
,
params
:
{
params
:
{
year
:
true
,
year
:
true
,
month
:
true
,
month
:
true
,
day
:
true
,
day
:
true
,
hour
:
false
,
hour
:
false
,
minute
:
false
,
minute
:
false
,
second
:
false
,
second
:
false
,
timestamp
:
true
,
timestamp
:
true
,
},
},
date
:
'请选择'
,
date
:
'请选择'
,
}
}
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
openPicker
()
{
openPicker
()
{
this
.
showPicker
=
true
this
.
showPicker
=
true
},
},
pickerConfirm
(
data
)
{
pickerConfirm
(
data
)
{
let
result
=
[]
let
result
=
[]
let
dataValue
=
data
.
year
+
'-'
+
data
.
month
+
'-'
+
data
.
day
let
dataValue
=
data
.
year
+
'-'
+
data
.
month
+
'-'
+
data
.
day
this
.
dataValue
=
dataValue
this
.
dataValue
=
dataValue
this
.
valueChange
(
dataValue
)
this
.
valueChange
(
dataValue
)
},
},
bindDateChange
:
function
(
e
)
{
bindDateChange
:
function
(
e
)
{
const
value
=
e
.
target
.
value
const
value
=
e
.
target
.
value
this
.
dataValue
=
value
this
.
dataValue
=
value
this
.
valueChange
(
value
)
this
.
valueChange
(
value
)
}
},
}
},
}
}
</
script
>
</
script
>
<
style
>
<
style
></
style
>
</
style
>
src/components/order/detail.vue
View file @
1bf70585
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
<view
class=
"order-cell"
>
<view
class=
"order-cell"
>
<text>
合作厂商:
</text>
<text>
合作厂商:
</text>
<text>
{{
order
.
partnerCompanyName
}}
</text>
<text>
{{
order
.
partnerCompanyName
}}
</text>
</view>
</view>
<view
class=
"order-cell"
>
<view
class=
"order-cell"
>
<text>
厂商编号:
</text>
<text>
厂商编号:
</text>
<text>
{{
order
.
partnerSerialNumber
}}
</text>
<text>
{{
order
.
partnerSerialNumber
}}
</text>
</view>
</view>
<view
class=
"order-cell between-cell"
>
<view
class=
"order-cell between-cell"
>
<view
class=
"left"
>
<view
class=
"left"
>
...
@@ -131,6 +131,7 @@
...
@@ -131,6 +131,7 @@
if
(
this
.
operate
)
{
if
(
this
.
operate
)
{
const
latitude
=
this
.
order
.
contactAddressLatitud
//res.latitude;
const
latitude
=
this
.
order
.
contactAddressLatitud
//res.latitude;
const
longitude
=
this
.
order
.
contactAddressLongitud
//res.longitude;
const
longitude
=
this
.
order
.
contactAddressLongitud
//res.longitude;
getApp
().
track
(
"order_open_location"
,
{
address
:
address
});
uni
.
openLocation
({
uni
.
openLocation
({
latitude
:
Number
(
latitude
),
latitude
:
Number
(
latitude
),
longitude
:
Number
(
longitude
),
longitude
:
Number
(
longitude
),
...
@@ -142,6 +143,7 @@
...
@@ -142,6 +143,7 @@
},
},
phoneToCustomer
(
phone
)
{
// 联系客户
phoneToCustomer
(
phone
)
{
// 联系客户
if
(
this
.
operate
)
{
if
(
this
.
operate
)
{
getApp
().
track
(
"order_make_phone_call"
,
{
phone
:
phone
});
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
phoneNumber
:
phone
,
//仅为示例
phoneNumber
:
phone
,
//仅为示例
complete
()
{}
complete
()
{}
...
@@ -158,14 +160,14 @@
...
@@ -158,14 +160,14 @@
},
},
handleClick
(
val
)
{
handleClick
(
val
)
{
this
.
$emit
(
'update:readMore'
,
val
)
this
.
$emit
(
'update:readMore'
,
val
)
},
},
handleLongpress
(
text
)
{
handleLongpress
(
text
)
{
uni
.
setClipboardData
({
uni
.
setClipboardData
({
data
:
text
,
data
:
text
,
success
:
function
()
{
success
:
function
()
{
console
.
log
(
'success'
);
console
.
log
(
'success'
);
}
}
});
});
}
}
}
}
}
}
...
@@ -299,4 +301,4 @@
...
@@ -299,4 +301,4 @@
text-align
:
left
;
text-align
:
left
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
</
style
>
</
style
>
src/components/order/index.vue
View file @
1bf70585
<
template
>
<
template
>
<view
class=
"order-view"
@
click=
"handleClickCell"
>
<view
class=
"order-view"
@
click=
"handleClickCell"
>
<view
class=
"order-top-view"
>
<view
class=
"order-top-view"
>
<view
class=
"left-view"
>
<view
class=
"left-view"
>
<view
:class=
"['tag-view',
{'active': active}]">
<view
:class=
"['tag-view',
{ active: active }]">
{{
orderData
.
orderServiceType
}}
{{
orderData
.
orderServiceType
}}
</view>
</view>
<view
class=
"store-view"
>
{{
orderData
.
categoryName
}}
</view>
<view
class=
"store-view"
>
{{
orderData
.
categoryName
}}
</view>
</view>
</view>
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
</view>
</view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
<view
class=
"info-title"
>
<view
class=
"info-title"
>
<text>
{{
item
.
name
+
':'
}}
</text>
<text>
{{
item
.
name
+
':'
}}
</text>
</view>
</view>
<view
class=
"info-content"
>
<view
class=
"info-content"
>
<text
@
longpress=
"handleLongpress(key, orderData[key])"
>
{{
orderData
[
key
]
}}
</text>
<text
@
longpress=
"handleLongpress(key, orderData[key])"
>
{{
<text
v-if=
"item.content"
>
{{
' / '
+
orderData
[
item
.
content
]
}}
</text>
orderData
[
key
]
</view>
}}
</text>
</view>
<text
v-if=
"item.content"
>
{{
' / '
+
orderData
[
item
.
content
]
}}
</text>
<view
class=
"address-view"
>
</view>
<view
class=
"address-left-view"
>
</view>
<image
class=
"address-image"
:src=
"dizhiImage"
mode=
"widthFix"
></image>
<view
class=
"address-view"
>
<text>
{{
formatAddress
(
orderData
)
}}
</text>
<view
class=
"address-left-view"
>
</view>
<image
<view
v-if=
"showDistance"
class=
"address-right-view"
>
class=
"address-image"
{{
orderDistance
}}
km
:src=
"dizhiImage"
</view>
mode=
"widthFix"
</view>
></image>
</view>
<text>
{{
formatAddress
(
orderData
)
}}
</text>
</view>
<view
v-if=
"showDistance"
class=
"address-right-view"
>
{{
orderDistance
}}
km
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<view
class=
"reason-view"
v-if=
"showReason"
>
<view
class=
"reason-view"
v-if=
"showReason"
>
<view
class=
"reason-title"
><text>
未通过原因:
</text></view>
<view
class=
"reason-title"
><text>
未通过原因:
</text></view>
<view
class=
"reason-text"
><text
v-for=
"(item, index) in orderData.auditResults"
:key=
"index"
>
{{
item
}}
</text></view>
<view
class=
"reason-text"
</view>
><text
v-for=
"(item, index) in orderData.auditResults"
:key=
"index"
>
{{
<view
class=
"bottom-view"
>
item
<view>
}}
</text></view
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
>
<view
:class=
"['bottom-tag-view',
{'timeout': timeout}]">
<text>
{{
tagText
}}
</text></view>
</view>
<u-count-down
:timestamp=
"timestamp"
font-size=
"40"
show-days
separator=
"zh"
<view
class=
"bottom-view"
>
:color=
"timeout ? '#FA5A49' : '#FF930D'"
@
change=
"handleChange"
separator-color=
"#666666"
ref=
"order-count-down"
></u-count-down>
<view>
</view>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
v-else-if=
"showTime"
>
<view
:class=
"['bottom-tag-view',
{ timeout: timeout }]"
<text>
{{
timeTitle
}}
</text>
>
<text>
{{
tagText
}}
</text></view
<text>
{{
timeText
}}
</text>
>
</view>
<u-count-down
</view>
:timestamp=
"timestamp"
<u-button
class=
"right-btn"
@
click
.
stop=
"handleClick"
:custom-style=
"buttonStyle"
type=
"primary"
font-size=
"40"
shape=
"circle"
:hover-class=
"buttonTextType ? 'none' : ''"
>
show-days
{{
orderText
}}
separator=
"zh"
</u-button>
:color=
"timeout ? '#FA5A49' : '#FF930D'"
</view>
@
change=
"handleChange"
</view>
separator-color=
"#666666"
ref=
"order-count-down"
></u-count-down>
</view>
<view
v-else-if=
"showTime"
>
<text>
{{
timeTitle
}}
</text>
<text>
{{
timeText
}}
</text>
</view>
</view>
<u-button
class=
"right-btn"
@
click
.
stop=
"handleClick"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
>
{{
orderText
}}
</u-button>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
orderData
:
{
orderData
:
{
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{
return
{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
categoryName
:
'充电桩'
,
// 品类:充电桩
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
orderNumber
:
'OR2021041809827'
,
// 工单编号
orderNumber
:
'OR2021041809827'
,
// 工单编号
contactName
:
'郭小清'
,
// 客户信息
contactName
:
'郭小清'
,
// 客户信息
contactPhone
:
'13631612077'
,
// 联系方式
contactPhone
:
'13631612077'
,
// 联系方式
contactAddress
:
'湾街道荔枝花园D座125号'
,
// 详细地址
contactAddress
:
'湾街道荔枝花园D座125号'
,
// 详细地址
contactAddressLatitud
:
'116.3896'
,
// 联系人地址经度
contactAddressLatitud
:
'116.3896'
,
// 联系人地址经度
contactAddressLongitud
:
'39.91917'
,
// 联系人地址纬度
contactAddressLongitud
:
'39.91917'
,
// 联系人地址纬度
orderStatus
:
0
,
// 工单状态
orderStatus
:
0
,
// 工单状态
appointmentDatetime
:
''
,
// 预约时间
appointmentDatetime
:
''
,
// 预约时间
currentWillOverTime
:
10000
,
// 剩余时间
currentWillOverTime
:
10000
,
// 剩余时间
currentOverTime
:
new
Date
().
getTime
()
+
10000
,
// 超过时间点
currentOverTime
:
new
Date
().
getTime
()
+
10000
,
// 超过时间点
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
orderFinishDatetime
:
'2021.04.19 16:24:48'
,
// 提交时间
orderFinishDatetime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
auditResults
:
{},
// 审核结果
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderId
:
'0'
,
// 订单id
orderId
:
'0'
,
// 订单id
}
}
}
},
},
},
/* 订单类型
/* 订单类型
waitAccept:待接单、
waitAccept:待接单、
waitAppointment:待预约、
waitAppointment:待预约、
waitCheckIn:待签到、
waitCheckIn:待签到、
...
@@ -92,141 +117,173 @@
...
@@ -92,141 +117,173 @@
exception:异常单、
exception:异常单、
finish:已完工
finish:已完工
*/
*/
type
:
String
,
type
:
String
,
location
:
{
// 当前坐标
location
:
{
type
:
Array
,
// 当前坐标
default
()
{
type
:
Array
,
return
[
116.3896
,
39.91917
]
// 纬度,经度
default
()
{
}
return
[
116.3896
,
39.91917
]
// 纬度,经度
}
},
},
},
data
()
{
},
return
{
data
()
{
timeout
:
false
,
return
{
timestamp
:
0
,
timeout
:
false
,
};
timestamp
:
0
,
},
}
computed
:
{
},
orderText
()
{
// 按钮文字
computed
:
{
return
this
.
typeTexts
[
this
.
orderType
]
orderText
()
{
},
// 按钮文字
buttonStyle
()
{
// 按钮样式
return
this
.
typeTexts
[
this
.
orderType
]
/** orderType
},
0 待接单、
buttonStyle
()
{
1 待预约、
// 按钮样式
2 待签到、
/** orderType
3 待完工、
0 待接单、
4 审核中、
1 待预约、
5 异常单、
2 待签到、
6 已完工
3 待完工、
4 审核中、
5 异常单、
6 已完工
*/
*/
switch
(
this
.
orderType
)
{
switch
(
this
.
orderType
)
{
case
0
:
case
0
:
if
(
!
this
.
isCompetition
)
{
if
(
!
this
.
isCompetition
)
{
return
this
.
buttonStyles
[
0
]
return
this
.
buttonStyles
[
0
]
}
else
{
}
else
{
return
this
.
buttonStyles
[
1
]
return
this
.
buttonStyles
[
1
]
}
}
case
1
:
case
1
:
case
2
:
case
2
:
case
3
:
case
3
:
case
5
:
case
5
:
return
this
.
buttonStyles
[
0
]
case
4
:
case
4
:
case
6
:
case
6
:
return
this
.
buttonStyles
[
0
]
return
this
.
buttonStyles
[
2
]
}
}
},
},
showCountTime
()
{
showCountTime
()
{
// ((待预约、 待签到、 待完工) || (待接单 && 业务类型非抢单)) && 有超过时间点
// ((待预约、 待签到、 待完工) || (待接单 && 业务类型非抢单)) && 有超过时间点
return
([
1
,
2
,
3
].
indexOf
(
this
.
orderType
)
!=
-
1
||
(
this
.
orderType
==
0
&&
!
this
.
isCompetition
))
&&
this
.
orderData
.
currentOverTime
return
(
},
([
1
,
2
,
3
].
indexOf
(
this
.
orderType
)
!=
-
1
||
showTime
()
{
(
this
.
orderType
==
0
&&
!
this
.
isCompetition
))
&&
return
[
4
,
5
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
this
.
orderData
.
currentOverTime
},
)
infoTexts
()
{
},
return
{
showTime
()
{
'orderNumber'
:
{
name
:
'工单编号'
},
return
[
4
,
5
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
'partnerCompanyName'
:
{
name
:
'合作厂商'
},
},
'contactName'
:
{
name
:
'客户信息'
,
content
:
'contactPhone'
},
infoTexts
()
{
return
{
}
orderNumber
:
{
name
:
'工单编号'
},
},
partnerCompanyName
:
{
name
:
'合作厂商'
},
typeTexts
()
{
contactName
:
{
name
:
'客户信息'
,
content
:
'contactPhone'
},
return
[
this
.
type0Text
,
'去预约'
,
'去签到'
,
'去完工'
,
'审核中'
,
'去处理'
,
'已完工'
]
}
},
},
isCompetition
()
{
// 是:订单池,抢单; 否:指派单,接单
typeTexts
()
{
return
this
.
orderData
.
orderBusinessType
==
'R'
return
[
},
this
.
type0Text
,
type0Text
()
{
'去预约'
,
return
!
this
.
isCompetition
?
'接单'
:
'抢单'
'去签到'
,
},
'去完工'
,
buttonStyles
()
{
'去查看'
,
return
[{
'去处理'
,
'background-color'
:
'#2272FF'
,
'去查看'
,
'color'
:
'#FFFFFF'
,
]
'font-size'
:
'32rpx'
,
},
'height'
:
'80rpx'
,
isCompetition
()
{
'width'
:
'200rpx'
// 是:订单池,抢单; 否:指派单,接单
},
{
return
this
.
orderData
.
orderBusinessType
==
'R'
'background-color'
:
'#FF930D'
,
},
'color'
:
'#FFFFFF'
,
type0Text
()
{
'font-size'
:
'32rpx'
,
return
!
this
.
isCompetition
?
'接单'
:
'抢单'
'height'
:
'80rpx'
,
},
'width'
:
'200rpx'
buttonStyles
()
{
},
{
return
[
'background-color'
:
'transparent'
,
{
'color'
:
'#2272FF'
,
'background-color'
:
'#2272FF'
,
'font-size'
:
'32rpx'
,
color
:
'#FFFFFF'
,
'height'
:
'32rpx'
,
'font-size'
:
'32rpx'
,
'width'
:
'100rpx'
height
:
'80rpx'
,
}]
width
:
'200rpx'
,
},
},
buttonTextType
()
{
{
return
this
.
orderType
==
4
||
this
.
orderType
==
6
'background-color'
:
'#FF930D'
,
},
color
:
'#FFFFFF'
,
dizhiImage
()
{
'font-size'
:
'32rpx'
,
return
process
.
uniEnv
.
qn_base_url
+
'shouye-dizhi.png'
height
:
'80rpx'
,
},
width
:
'200rpx'
,
active
()
{
},
return
this
.
orderData
.
orderServiceType
==
'安装'
// {
},
// 'background-color': 'transparent',
tagText
()
{
// color: '#2272FF',
return
this
.
timeout
?
'超'
:
'剩'
// 'font-size': '32rpx',
},
// height: '32rpx',
timeText
()
{
// width: '100rpx',
let
time
=
this
.
orderType
==
4
?
this
.
orderData
.
orderFinishDatetime
:
this
.
orderData
.
auditDatetime
// },
return
time
?
this
.
$u
.
timeFormat
(
time
,
'yyyy.mm.dd hh:MM:ss'
)
:
''
]
},
},
timeTitle
()
{
// buttonTextType() {
return
this
.
orderType
==
4
?
'提交时间:'
:
'审核时间:'
// return this.orderType == 4 || this.orderType == 6
},
// },
showReason
()
{
dizhiImage
()
{
return
this
.
orderType
==
5
return
process
.
uniEnv
.
qn_base_url
+
'shouye-dizhi.png'
},
},
showDistance
()
{
active
()
{
return
this
.
orderType
==
0
&&
this
.
location
.
length
>=
2
&&
(
this
.
orderData
.
contactAddressLatitud
||
this
.
orderData
.
contactAddressLongitud
)
return
this
.
orderData
.
orderServiceType
==
'安装'
},
},
isWaitFinish
()
{
tagText
()
{
return
this
.
orderType
==
3
return
this
.
timeout
?
'超'
:
'剩'
},
},
isException
()
{
timeText
()
{
return
this
.
orderType
==
5
let
time
=
},
this
.
orderType
==
4
types
()
{
?
this
.
orderData
.
orderFinishDatetime
return
{
:
this
.
orderData
.
auditDatetime
'waitAccept'
:
0
,
// 待接单、
return
time
?
this
.
$u
.
timeFormat
(
time
,
'yyyy.mm.dd hh:MM:ss'
)
:
''
'waitAppointment'
:
1
,
// 待预约、
},
'waitCheckIn'
:
2
,
// 待签到、
timeTitle
()
{
'waitFinish'
:
3
,
// 待完工、
return
this
.
orderType
==
4
?
'提交时间:'
:
'审核时间:'
'audit'
:
4
,
// 审核中、
},
'exception'
:
5
,
// 异常单、
showReason
()
{
'finish'
:
6
,
//已完工
return
this
.
orderType
==
5
}
},
},
showDistance
()
{
orderDistance
()
{
return
(
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
])
this
.
orderType
==
0
&&
},
this
.
location
.
length
>=
2
&&
/** orderType
(
this
.
orderData
.
contactAddressLatitud
||
this
.
orderData
.
contactAddressLongitud
)
)
},
isWaitFinish
()
{
return
this
.
orderType
==
3
},
isException
()
{
return
this
.
orderType
==
5
},
types
()
{
return
{
waitAccept
:
0
,
// 待接单、
waitAppointment
:
1
,
// 待预约、
waitCheckIn
:
2
,
// 待签到、
waitFinish
:
3
,
// 待完工、
audit
:
4
,
// 审核中、
exception
:
5
,
// 异常单、
finish
:
6
,
//已完工
}
},
orderDistance
()
{
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
]
)
},
/** orderType
0 待接单、
0 待接单、
1 待预约、
1 待预约、
2 待签到、
2 待签到、
...
@@ -235,281 +292,323 @@
...
@@ -235,281 +292,323 @@
5 异常单、
5 异常单、
6 已完工
6 已完工
*/
*/
orderType
()
{
orderType
()
{
/*
/*
orderStatus:
orderStatus:
待接单 orderStatus<31 工单状态小于31
待接单 orderStatus<31
工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
待预约 orderStatus == 31 and appointmentDatetime == null
工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
待完工 orderStatus >31 and orderStatus < 80
工单状态大于31 小于80
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
审核中 orderStatus ==85 or orderStatus == 87
工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
异常 orderStatus ==86 or orderStatus == 88
工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
已完工 orderStatus in(80,81,89,110)
工单状态 等于80 or 81 or 89 or 110
*/
*/
if
(
!
this
.
type
)
{
if
(
!
this
.
type
)
{
if
(
this
.
orderData
.
orderStatus
<
31
)
{
if
(
this
.
orderData
.
orderStatus
<
31
)
{
return
0
return
0
}
else
if
(
this
.
orderData
.
orderStatus
==
31
)
{
}
else
if
(
this
.
orderData
.
orderStatus
==
31
)
{
if
(
this
.
orderData
.
appointmentDatetime
)
{
if
(
this
.
orderData
.
appointmentDatetime
)
{
return
2
return
2
}
else
{
}
else
{
return
1
return
1
}
}
}
else
if
(
this
.
orderData
.
orderStatus
>
31
&&
this
.
orderData
.
orderStatus
<
80
)
{
}
else
if
(
return
3
this
.
orderData
.
orderStatus
>
31
&&
}
else
if
(
this
.
orderData
.
orderStatus
==
85
||
this
.
orderData
.
orderStatus
==
87
)
{
this
.
orderData
.
orderStatus
<
80
return
4
)
{
}
else
if
(
this
.
orderData
.
orderStatus
==
86
||
this
.
orderData
.
orderStatus
==
88
)
{
return
3
return
5
}
else
if
(
}
else
if
([
80
,
81
,
89
,
110
].
indexOf
(
this
.
orderData
.
orderStatus
)
!=
-
1
)
{
this
.
orderData
.
orderStatus
==
85
||
return
6
this
.
orderData
.
orderStatus
==
87
}
else
{
)
{
return
0
return
4
}
}
else
if
(
}
else
{
this
.
orderData
.
orderStatus
==
86
||
return
this
.
types
[
this
.
type
]
this
.
orderData
.
orderStatus
==
88
}
)
{
}
return
5
},
}
else
if
(
created
()
{
[
80
,
81
,
89
,
110
].
indexOf
(
this
.
orderData
.
orderStatus
)
!=
-
1
this
.
updateTime
()
)
{
},
return
6
watch
:{
}
else
{
'orderData.currentCellTime'
(
val
)
{
return
0
// 从后台重新获取数据之后,时间重新计算
}
this
.
updateTime
()
}
else
{
}
return
this
.
types
[
this
.
type
]
},
}
methods
:
{
},
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
},
handleClick
()
{
created
()
{
var
func
=
'click'
this
.
updateTime
()
if
(
this
.
isWaitFinish
||
this
.
isException
)
{
// 不是待完工、不是异常单点按钮算点cell
},
func
=
'action'
watch
:
{
}
'orderData.currentCellTime'
(
val
)
{
this
.
$emit
(
func
,
this
.
orderData
,
this
.
type
,
this
.
showCountTime
?
'show'
:
''
)
// 从后台重新获取数据之后,时间重新计算
},
this
.
updateTime
()
handleClickCell
()
{
},
var
func
=
'click'
},
if
(
this
.
isException
)
{
// 异常单点cell算点按钮
methods
:
{
func
=
'action'
handleExceptions
()
{
}
if
(
this
.
isException
)
{
this
.
$emit
(
func
,
this
.
orderData
,
this
.
type
,
this
.
showCountTime
?
'show'
:
''
)
getApp
().
track
(
'order_handleExceptions'
,
{})
},
}
handleChange
(
timestamp
)
{
},
if
(
this
.
timeout
)
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
if
(
timestamp
==
0
&&
!
this
.
timeout
)
{
// 超时之后倒计时变为正计时
handleClick
()
{
setTimeout
(()
=>
{
var
func
=
'click'
this
.
timestamp
=
1
this
.
handleExceptions
()
this
.
timeout
=
true
// 不是待完工、审核中、异常单、已完工点按钮算点cell
},
1000
)
if
([
3
,
4
,
5
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
)
{
}
func
=
'action'
},
}
formatAddress
(
order
)
{
this
.
$emit
(
let
address
=
""
func
,
if
(
order
)
{
this
.
orderData
,
address
=
order
.
contactProvinceText
||
""
this
.
type
,
address
+=
order
.
contactCityText
||
""
this
.
showCountTime
?
'show'
:
''
address
+=
order
.
contactCommunityText
||
""
)
address
+=
order
.
contactStreetText
||
""
},
address
+=
order
.
contactAddress
||
""
handleClickCell
()
{
}
var
func
=
'click'
return
address
this
.
handleExceptions
()
},
if
(
this
.
isException
)
{
/**
// 异常单点cell算点按钮
* echo distance(116.3896,39.91917,116.3940,39.91726);
func
=
'action'
* 计算两点之间直线距离
}
* @param float $lon1 纬度
this
.
$emit
(
* @param float $lat1 经度
func
,
* @param float $lon2 纬度
this
.
orderData
,
* @param float $lat2 经度
this
.
type
,
* @return float 浮点数
this
.
showCountTime
?
'show'
:
''
*/
)
distance
(
lat1
,
lng1
,
lat2
,
lng2
)
{
},
var
radLat1
=
this
.
Rad
(
lat1
);
handleChange
(
timestamp
)
{
var
radLat2
=
this
.
Rad
(
lat2
);
if
(
this
.
timeout
)
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
var
a
=
radLat1
-
radLat2
;
if
(
timestamp
==
0
&&
!
this
.
timeout
)
{
var
b
=
this
.
Rad
(
lng1
)
-
this
.
Rad
(
lng2
);
// 超时之后倒计时变为正计时
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
a
/
2
),
2
)
+
setTimeout
(()
=>
{
Math
.
cos
(
radLat1
)
*
Math
.
cos
(
radLat2
)
*
Math
.
pow
(
Math
.
sin
(
b
/
2
),
2
)));
this
.
timestamp
=
1
s
=
s
*
6378.137
;
// EARTH_RADIUS;
this
.
timeout
=
true
s
=
Math
.
round
(
s
*
10000
)
/
10000
//输出为米
},
1000
)
return
Number
(
s
?
s
.
toFixed
(
2
):
0
);
}
},
},
Rad
(
d
){
formatAddress
(
order
)
{
return
d
*
Math
.
PI
/
180.0
;
//经纬度转换成三角函数中度分表形式。
let
address
=
''
},
if
(
order
)
{
updateTime
()
{
address
=
order
.
contactProvinceText
||
''
var
time
=
new
Date
().
getTime
()
address
+=
order
.
contactCityText
||
''
this
.
timeout
=
this
.
orderData
.
currentOverTime
<
time
address
+=
order
.
contactCommunityText
||
''
this
.
timestamp
=
Math
.
round
(
Math
.
abs
(
this
.
orderData
.
currentOverTime
-
time
)
/
1000
)
address
+=
order
.
contactStreetText
||
''
},
address
+=
order
.
contactAddress
||
''
handleLongpress
(
key
,
text
)
{
// 长按复制单号
}
if
(
key
==
'orderNumber'
)
{
return
address
uni
.
setClipboardData
({
},
data
:
text
,
/**
success
:
function
()
{
* echo distance(116.3896,39.91917,116.3940,39.91726);
console
.
log
(
'success'
);
* 计算两点之间直线距离
}
* @param float $lon1 纬度
});
* @param float $lat1 经度
}
* @param float $lon2 纬度
}
* @param float $lat2 经度
}
* @return float 浮点数
}
*/
distance
(
lat1
,
lng1
,
lat2
,
lng2
)
{
var
radLat1
=
this
.
Rad
(
lat1
)
var
radLat2
=
this
.
Rad
(
lat2
)
var
a
=
radLat1
-
radLat2
var
b
=
this
.
Rad
(
lng1
)
-
this
.
Rad
(
lng2
)
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
a
/
2
),
2
)
+
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
//输出为米
return
Number
(
s
?
s
.
toFixed
(
2
)
:
0
)
},
Rad
(
d
)
{
return
(
d
*
Math
.
PI
)
/
180.0
//经纬度转换成三角函数中度分表形式。
},
updateTime
()
{
var
time
=
new
Date
().
getTime
()
this
.
timeout
=
this
.
orderData
.
currentOverTime
<
time
this
.
timestamp
=
Math
.
round
(
Math
.
abs
(
this
.
orderData
.
currentOverTime
-
time
)
/
1000
)
},
handleLongpress
(
key
,
text
)
{
// 长按复制单号
if
(
key
==
'orderNumber'
)
{
uni
.
setClipboardData
({
data
:
text
,
success
:
function
()
{
console
.
log
(
'success'
)
},
})
}
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-view
{
.order-view
{
width
:
100%
;
width
:
100%
;
background-color
:
#FFFFFF
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
30rpx
;
padding
:
30rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
.order-top-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.order-top-view
{
.left-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.left-view
{
.tag-view
{
display
:
flex
;
text-align
:
center
;
align-items
:
center
;
width
:
84rpx
;
height
:
40rpx
;
color
:
#ffffff
;
border-radius
:
8rpx
;
background-image
:
linear-gradient
(
to
right
,
#ff930d
,
#ffc174
);
font-size
:
22rpx
;
line-height
:
42rpx
;
&
.active
{
background-image
:
linear-gradient
(
to
right
,
#2272ff
,
#47abff
);
}
}
.tag-view
{
.store-view
{
text-align
:
center
;
color
:
#333333
;
width
:
84rpx
;
font-size
:
36rpx
;
height
:
40rpx
;
font-weight
:
bold
;
color
:
#FFFFFF
;
margin-left
:
20rpx
;
border-radius
:
8rpx
;
}
background-image
:
linear-gradient
(
to
right
,
#FF930D
,
#FFC174
);
}
font-size
:
22rpx
;
line-height
:
42rpx
;
&
.active
{
background-image
:
linear-gradient
(
to
right
,
#2272FF
,
#47ABFF
);
}
}
.store-view
{
.right-view
{
color
:
#333333
;
text-align
:
center
;
font-size
:
36rpx
;
width
:
100rpx
;
font-weight
:
bold
;
height
:
40rpx
;
margin-left
:
20rpx
;
background-color
:
#f4f5f7
;
}
border-radius
:
20rpx
;
}
color
:
#333333
;
font-size
:
22rpx
;
line-height
:
40rpx
;
}
}
.right-view
{
.content-view
{
text-align
:
center
;
.info-view
{
width
:
100rpx
;
text-align
:
left
;
height
:
40rpx
;
color
:
#333333
;
background-color
:
#F4F5F7
;
font-size
:
26rpx
;
border-radius
:
20rpx
;
margin-top
:
18rpx
;
color
:
#333333
;
margin-bottom
:
18rpx
;
font-size
:
22rpx
;
display
:
flex
;
line-height
:
40rpx
;
align-items
:
flex-start
;
}
}
.content-view
{
.info-title
{
.info-view
{
flex-shrink
:
0
;
text-align
:
left
;
}
color
:
#333333
;
.info-content
{
font-size
:
26rpx
;
word-break
:
break-all
;
margin-top
:
18rpx
;
}
margin-bottom
:
18rpx
;
}
display
:
flex
;
align-items
:
flex-start
;
.info-title
{
flex-shrink
:
0
;
}
.info-content
{
word-break
:
break-all
;
}
}
.address-view
{
.address-view
{
display
:
flex
;
display
:
flex
;
align-items
:
flex-start
;
align-items
:
flex-start
;
justify-content
:
space-between
;
justify-content
:
space-between
;
color
:
#333333
;
color
:
#333333
;
font-size
:
24rpx
;
font-size
:
24rpx
;
margin-top
:
20rpx
;
margin-top
:
20rpx
;
.address-left-view
{
.address-left-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
align-items
:
flex-start
;
align-items
:
flex-start
;
text-align
:
left
;
text-align
:
left
;
.address-image
{
width
:
26rpx
;
height
:
28rpx
;
margin-right
:
8rpx
;
flex-shrink
:
0
;
margin-top
:
4rpx
;
}
}
.address-right-view
{
.address-image
{
margin-left
:
30rpx
;
width
:
26rpx
;
}
height
:
28rpx
;
}
margin-right
:
8rpx
;
}
flex-shrink
:
0
;
margin-top
:
4rpx
;
}
}
.line-view
{
.address-right-view
{
background-color
:
#F4F5F7
;
margin-left
:
30rpx
;
height
:
2rpx
;
}
width
:
100%
;
}
margin-top
:
30rpx
;
}
}
.reason-view
{
.line-view
{
text-align
:
left
;
background-color
:
#f4f5f7
;
margin-top
:
30rpx
;
height
:
2rpx
;
font-size
:
26rpx
;
width
:
100%
;
color
:
#FA5A49
;
margin-top
:
30rpx
;
display
:
flex
;
}
align-items
:
flex-start
;
display
:
flex
;
.reason-title
{
flex-shrink
:
0
;
color
:
#666666
;
}
.reason-text
{
display
:
flex
;
flex-direction
:
column
;
}
}
.bottom-view
{
.reason-view
{
display
:
flex
;
text-align
:
left
;
align-items
:
center
;
margin-top
:
30rpx
;
justify-content
:
space-between
;
font-size
:
26rpx
;
margin-top
:
30rpx
;
color
:
#fa5a49
;
display
:
flex
;
align-items
:
flex-start
;
display
:
flex
;
.reason-title
{
flex-shrink
:
0
;
color
:
#666666
;
}
.reason-text
{
display
:
flex
;
flex-direction
:
column
;
}
}
.bottom-left-view
{
.bottom-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
30rpx
;
.bottom-tag-view
{
.bottom-left-view
{
width
:
52rpx
;
display
:
flex
;
height
:
52rpx
;
align-items
:
center
;
border-radius
:
26rpx
;
color
:
#FFFFFF
;
font-size
:
26rpx
;
background-color
:
#FF930D
;
margin-right
:
16rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
&
.timeout
{
.bottom-tag-view
{
background-color
:
#FA5A49
;
width
:
52rpx
;
}
height
:
52rpx
;
}
border-radius
:
26rpx
;
}
color
:
#ffffff
;
font-size
:
26rpx
;
background-color
:
#ff930d
;
margin-right
:
16rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
&
.timeout
{
}
background-color
:
#fa5a49
;
}
}
}
}
}
</
style
>
</
style
>
src/components/photo/preview.vue
View file @
1bf70585
...
@@ -72,29 +72,43 @@
...
@@ -72,29 +72,43 @@
return
return
}
}
let
path
=
''
let
path
=
''
let
pass
=
true
if
(
photo
.
tempPath
.
origin
&&
photo
?.
waterSetting
?.
hasOrigin
){
if
(
photo
.
tempPath
.
origin
&&
photo
?.
waterSetting
?.
hasOrigin
){
// 保存原图到本地
// 保存原图到本地
path
=
photo
.
tempPath
.
origin
path
=
photo
.
tempPath
.
origin
let
result
=
await
this
.
saveLocal
(
path
)
await
this
.
saveLocal
(
path
).
then
(
res
=>
{
if
(
result
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
title
:
'已将照片原图保存到本地相册'
title
:
'已将照片原图保存到本地相册'
})
})
}
}).
catch
(
e
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
e
})
pass
=
false
that
.
$parent
.
goBack
()
})
}
}
// 如果用户不同意保存到相册
if
(
!
pass
)
return
if
(
photo
.
tempPath
.
mixWater
){
if
(
photo
.
tempPath
.
mixWater
){
// 保存水印处理图片到本地
// 保存水印处理图片到本地
path
=
photo
.
tempPath
.
mixWater
path
=
photo
.
tempPath
.
mixWater
let
result1
=
await
this
.
saveLocal
(
path
)
this
.
saveLocal
(
path
).
then
(
res
=>
{
if
(
result1
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
title
:
'已将水印图片保存到本地相册'
title
:
'已将水印图片保存到本地相册'
})
})
resolve
()
resolve
()
}
}).
catch
(
e
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
e
})
that
.
$parent
.
goBack
()
})
}
}
})
})
},
},
...
@@ -105,8 +119,25 @@
...
@@ -105,8 +119,25 @@
success
()
{
success
()
{
resolve
(
true
)
resolve
(
true
)
},
},
fail
()
{
fail
(
e
)
{
reject
(
'保存失败'
)
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 @@
...
@@ -8,8 +8,8 @@
<u-image
:src=
"partsImage(info.images)"
width=
"200rpx"
height=
"200rpx"
/>
<u-image
:src=
"partsImage(info.images)"
width=
"200rpx"
height=
"200rpx"
/>
</view>
</view>
<view
class=
"u-flex right-content"
>
<view
class=
"u-flex right-content"
>
<view
class=
"right-content-name"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-name
u-line-2
"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-desc"
>
{{
info
.
remark
}}
</view>
<view
class=
"right-content-desc
u-line-2
"
>
{{
info
.
remark
}}
</view>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"no"
v-if=
"info.stock"
>
<view
class=
"no"
v-if=
"info.stock"
>
可用
{{
info
.
stock
}}
件
可用
{{
info
.
stock
}}
件
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
overflow
:
hidden
;
overflow
:
hidden
;
.right-img
{
.right-img
{
padding-right
:
20rpx
;
padding-right
:
20rpx
;
align-self
:
baseline
;
}
}
.right-content
{
.right-content
{
flex
:
1
;
flex
:
1
;
...
@@ -91,8 +92,6 @@
...
@@ -91,8 +92,6 @@
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#333
;
color
:
#333
;
font-weight
:
bold
;
font-weight
:
bold
;
height
:
48rpx
;
overflow
:
hidden
;
}
}
.right-content-desc
{
.right-content-desc
{
font-size
:
24rpx
;
font-size
:
24rpx
;
...
...
src/components/take/index.vue
View file @
1bf70585
...
@@ -268,12 +268,6 @@
...
@@ -268,12 +268,6 @@
t
()
t
()
},
},
cameraError
(
e
)
{
cameraError
(
e
)
{
const
{
errMsg
}
=
e
.
detail
if
(
errMsg
!==
'insertCamera:fail auth deny'
)
{
return
}
this
.
showSettingModal
(
'camera'
)
this
.
showSettingModal
(
'camera'
)
},
},
//获取位置
//获取位置
...
@@ -329,9 +323,12 @@
...
@@ -329,9 +323,12 @@
success
(
res
)
{
success
(
res
)
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
self
.
openSetting
()
self
.
openSetting
()
}
else
if
(
res
.
cancel
)
{
if
(
type
===
'camera'
||
type
===
'location'
)
self
.
goBack
()
}
}
},
},
fail
()
{}
fail
()
{
}
})
})
},
},
openSetting
()
{
openSetting
()
{
...
@@ -346,6 +343,8 @@
...
@@ -346,6 +343,8 @@
// 位置授权成功
// 位置授权成功
self
.
authSetting
.
location
=
true
self
.
authSetting
.
location
=
true
self
.
getLocation
()
self
.
getLocation
()
}
else
{
self
.
showSettingModal
(
'location'
)
}
}
if
(
res
.
authSetting
[
'scope.camera'
])
{
if
(
res
.
authSetting
[
'scope.camera'
])
{
self
.
authSetting
.
camera
=
true
self
.
authSetting
.
camera
=
true
...
...
src/pages/index/learn.vue
View file @
1bf70585
...
@@ -749,6 +749,7 @@ export default {
...
@@ -749,6 +749,7 @@ export default {
},
},
// 安装文件
// 安装文件
goToDocument
()
{
goToDocument
()
{
getApp
().
track
(
"learn_goToDocument"
,
{})
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/order/document'
,
url
:
'pages/order/document'
,
})
})
...
@@ -826,6 +827,10 @@ export default {
...
@@ -826,6 +827,10 @@ export default {
},
},
//跳转到播放
//跳转到播放
goPlay
(
info
)
{
goPlay
(
info
)
{
getApp
().
track
(
"learn_allPlayCounts"
,
{
courseId
:
info
.
id
})
if
(
info
.
title
===
"小程序使用指南"
)
{
getApp
().
track
(
"learn_guidePlayCounts"
,
{
courseId
:
info
.
id
})
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
url
:
"/pages/learn/section?section_id="
+
"/pages/learn/section?section_id="
+
...
@@ -834,13 +839,14 @@ export default {
...
@@ -834,13 +839,14 @@ export default {
info
.
id
,
info
.
id
,
});
});
},
},
//跳转到
//跳转到
消息详情页
bbb
(
e
)
{
bbb
(
e
)
{
var
news
=
{
var
news
=
{
body
:
e
.
body
,
body
:
e
.
body
,
title
:
e
.
title
,
title
:
e
.
title
,
create_at
:
e
.
create_at
,
create_at
:
e
.
create_at
,
};
};
getApp
().
track
(
"learn_goToMessage"
,
{})
let
that
=
this
;
let
that
=
this
;
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"/pages/learn/news-details"
,
url
:
"/pages/learn/news-details"
,
...
...
src/pages/index/order.vue
View file @
1bf70585
<
template
>
<
template
>
<TabBarPage
title=
"订单"
:fixed=
"true"
@
click=
"goTop"
>
<TabBarPage
title=
"订单"
:fixed=
"true"
@
click=
"goTop"
>
<view
class=
"tools-box"
>
<view
class=
"tools-box"
>
<view
class=
"search-sub"
>
<view
class=
"search-sub"
>
<u-subsection
:current=
"curNow"
:list=
"subList"
active-color=
"white"
bg-color=
"white"
<u-subsection
inactive-color=
"#666"
button-color=
"#2272FF"
border-radius=
"36"
@
change=
"sectionChange"
height=
"72"
:current=
"curNow"
bold
>
:list=
"subList"
</u-subsection>
active-color=
"white"
</view>
bg-color=
"white"
<view
class=
"search-btn"
@
click=
"handleClickSearch"
>
inactive-color=
"#666"
<image
class=
"search-image"
mode=
"widthFix"
:src=
"sousuoImage"
></image>
button-color=
"#2272FF"
<text
class=
"search-btn-text"
>
搜订单
</text>
border-radius=
"36"
</view>
@
change=
"sectionChange"
</view>
height=
"72"
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
bold
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
>
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
</u-subsection>
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
</view>
</view>
<view
class=
"search-btn"
@
click=
"handleClickSearch"
>
<image
class=
"search-image"
mode=
"widthFix"
:src=
"sousuoImage"
></image>
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[0, 0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
</view>
<view
class=
"tab-view"
>
<view
class=
"tab-view"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
<scroll-view
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
:scroll-top=
"scrollTop"
scroll-y
refresher-background=
"#F4F5F7"
@
refresherrefresh=
"onRefresh"
style=
"height: 100%;width: 100%;"
@
refresherrestore=
"onRestore"
@
scroll=
"scroll"
enable-back-to-top
>
@
scrolltolower=
"reachBottom"
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
scroll-anchoring
<u-loading
mode=
"flower"
></u-loading>
refresher-enabled=
"true"
</view>
:refresher-triggered=
"triggered"
<NoOrder
v-else-if=
"noMore"
imageName=
"zwdd.png"
:customStyle=
"noOrderCustomStyle"
/>
:refresher-threshold=
"100"
<template
v-else
>
:scroll-top=
"scrollTop"
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
refresher-background=
"#F4F5F7"
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick"
@
refresherrefresh=
"onRefresh"
@
action=
"handleClickCellButton"
>
</OrderCell>
@
refresherrestore=
"onRestore"
</view>
@
scroll=
"scroll"
<view
class=
"load-more-view"
>
enable-back-to-top
<u-loadmore
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
>
</view>
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
</
template
>
<u-loading
mode=
"flower"
></u-loading>
</scroll-view>
</view>
</view>
<NoOrder
v-else-if=
"noMore"
</TabBarPage>
imageName=
"zwdd.png"
:customStyle=
"noOrderCustomStyle"
/>
<template
v-else
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick"
@
action=
"handleClickCellButton"
>
</OrderCell>
</view>
<view
class=
"load-more-view"
>
<u-loadmore
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</
template
>
</scroll-view>
</view>
</TabBarPage>
</template>
</template>
<
script
>
<
script
>
import
TabBarPage
from
"@/components/tabBarList/index.vue"
import
TabBarPage
from
'@/components/tabBarList/index.vue'
import
OrderCell
from
"@/components/order/index.vue"
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
"@/components/order/noOrder.vue"
import
NoOrder
from
'@/components/order/noOrder.vue'
export
default
{
components
:
{
TabBarPage
,
OrderCell
,
NoOrder
,
},
data
()
{
return
{
curNow
:
0
,
pageNumber
:
0
,
pageSize
:
1000
,
// 因为需要排序,所以暂时去掉分页
orderList
:
[],
list
:
[
{
name
:
'待预约'
,
total
:
0
,
},
{
name
:
'待签到'
,
total
:
0
,
},
{
name
:
'待完工'
,
total
:
0
,
},
{
name
:
'审核中'
,
total
:
0
,
},
{
name
:
'异常单'
,
total
:
0
,
},
],
current
:
0
,
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
,
triggered
:
true
,
_freshing
:
false
,
scrollTop
:
0
,
old
:
{
scrollTop
:
0
,
},
}
},
computed
:
{
subList
()
{
return
[
'待处理'
,
'已完工'
]
},
// 0:'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5'已完工'
orderType
()
{
return
this
.
indexStatus
[
this
.
currentIndex
]
},
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
current
:
5
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
types
()
{
return
{
waitAppointment
:
0
,
// 待预约、
waitCheckIn
:
1
,
// 待签到、
waitFinish
:
2
,
// 待完工、
audit
:
3
,
// 审核中、
exception
:
4
,
// 异常单、
finish
:
5
,
//已完工
}
},
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
()
{
return
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'audit'
,
4
:
'exception'
,
5
:
'finish'
,
}
},
countKeys
()
{
return
[
'toAppointmentCount'
,
'toCheckinCount'
,
'toFinishCount'
,
'reviewingCount'
,
'exceptionCount'
,
]
},
noMore
()
{
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
},
noOrderCustomStyle
()
{
return
this
.
curNow
==
0
?
'margin-top: 100rpx;background-color: #F4F5F7'
:
'margin-top: 200rpx;background-color: #F4F5F7'
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'订单首页'
)
this
.
_freshing
=
false
if
(
e
&&
e
.
type
)
{
this
.
current
=
e
.
type
}
},
onShow
()
{
this
.
reloadOrderInfo
()
},
methods
:
{
sectionChange
(
index
)
{
this
.
curNow
=
index
this
.
reloadOrderList
()
},
// tab栏切换
change
(
index
)
{
this
.
current
=
index
this
.
reloadOrderList
()
},
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getOrderList
(
this
.
currentIndex
)
},
// 页面数据
getOrderList
(
index
)
{
// 状态处理
this
.
pageNumber
+=
1
if
(
this
.
pageNumber
==
1
)
{
this
.
loaded
=
false
}
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
keyword
:
''
,
type
:
this
.
indexStatus
[
index
],
}
var
self
=
this
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
type
!=
self
.
orderType
)
return
export
default
{
if
(
self
.
pageNumber
==
1
)
{
components
:
{
self
.
orderList
=
[]
TabBarPage
,
}
OrderCell
,
if
(
res
.
data
.
list
)
{
NoOrder
self
.
orderList
.
push
(...
res
.
data
.
list
)
},
if
(
self
.
list
[
self
.
types
[
res
.
data
.
type
]])
{
data
()
{
self
.
list
[
self
.
types
[
res
.
data
.
type
]].
total
=
res
.
data
.
total
return
{
}
curNow
:
0
,
pageNumber
:
0
,
self
.
orderList
.
sort
((
x
,
y
)
=>
{
pageSize
:
20
,
return
x
.
currentOverTime
<=
y
.
currentOverTime
?
1
:
-
1
orderList
:
[],
})
list
:
[{
name
:
'待预约'
,
total
:
0
,
},
{
name
:
'待签到'
,
total
:
0
,
},
{
name
:
'待完工'
,
total
:
0
,
},
{
name
:
'审核中'
,
total
:
0
,
},
{
name
:
'异常单'
,
total
:
0
,
}
],
current
:
0
,
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
,
triggered
:
true
,
_freshing
:
false
,
scrollTop
:
0
,
old
:
{
scrollTop
:
0
}
};
},
computed
:
{
subList
()
{
return
[
'待处理'
,
'已完工'
]
},
// 0:'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5'已完工'
orderType
()
{
return
this
.
indexStatus
[
this
.
currentIndex
]
},
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
current
:
5
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
types
()
{
return
{
'waitAppointment'
:
0
,
// 待预约、
'waitCheckIn'
:
1
,
// 待签到、
'waitFinish'
:
2
,
// 待完工、
'audit'
:
3
,
// 审核中、
'exception'
:
4
,
// 异常单、
'finish'
:
5
,
//已完工
}
},
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
()
{
return
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'audit'
,
4
:
'exception'
,
5
:
'finish'
}
},
countKeys
()
{
return
[
'toAppointmentCount'
,
'toCheckinCount'
,
'toFinishCount'
,
'reviewingCount'
,
'exceptionCount'
]
},
noMore
()
{
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
},
noOrderCustomStyle
()
{
return
this
.
curNow
==
0
?
'margin-top: 100rpx;background-color: #F4F5F7'
:
'margin-top: 200rpx;background-color: #F4F5F7'
}
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'订单首页'
)
this
.
_freshing
=
false
;
if
(
e
&&
e
.
type
)
{
this
.
current
=
e
.
type
}
},
onShow
()
{
this
.
reloadOrderInfo
()
},
methods
:
{
sectionChange
(
index
)
{
this
.
curNow
=
index
;
this
.
reloadOrderList
()
},
// tab栏切换
change
(
index
)
{
this
.
current
=
index
;
this
.
reloadOrderList
()
},
reachBottom
(
e
)
{
self
.
loadStatus
=
if
(
this
.
loadStatus
!=
'loadmore'
)
return
res
.
data
.
total
>
self
.
orderList
.
length
&&
this
.
loadStatus
==
'loading'
res
.
data
.
list
.
length
==
self
.
pageSize
this
.
getOrderList
(
this
.
currentIndex
)
?
'loadmore'
},
:
'nomore'
// 页面数据
}
getOrderList
(
index
)
{
}
else
{
// 状态处理
console
.
log
(
res
.
message
,
'获取订单数量失败!'
)
this
.
pageNumber
+=
1
}
if
(
this
.
pageNumber
==
1
)
{
self
.
$nextTick
(()
=>
{
this
.
loaded
=
false
if
(
self
.
_freshing
)
{
}
self
.
triggered
=
false
var
param
=
{
self
.
_freshing
=
false
pageNumber
:
this
.
pageNumber
,
}
pageSize
:
this
.
pageSize
,
})
keyword
:
''
,
this
.
loaded
=
true
type
:
this
.
indexStatus
[
index
]
})
}
},
var
self
=
this
;
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
type
!=
self
.
orderType
)
return
if
(
self
.
pageNumber
==
1
)
{
self
.
orderList
=
[]
}
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
if
(
self
.
list
[
self
.
types
[
res
.
data
.
type
]])
{
self
.
list
[
self
.
types
[
res
.
data
.
type
]].
total
=
res
.
data
.
total
}
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
&&
res
.
data
.
list
.
length
==
self
.
pageSize
?
'loadmore'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
self
.
$nextTick
(()
=>
{
if
(
self
.
_freshing
)
{
self
.
triggered
=
false
;
self
.
_freshing
=
false
;
}
})
this
.
loaded
=
true
});
},
// 获取订单数量
getOrderCount
()
{
var
self
=
this
self
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
// 修改各个tab数量
var
i
=
0
var
count
=
0
for
(
var
item
of
self
.
list
)
{
item
.
total
=
res
.
data
[
self
.
countKeys
[
i
]]
count
+=
item
.
total
i
++
}
// 获取订单数量
// 修改tab总数
getOrderCount
()
{
if
(
count
>
0
)
{
var
self
=
this
uni
.
setTabBarBadge
({
self
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
index
:
1
,
if
(
res
.
code
==
200
)
{
text
:
String
(
count
),
if
(
res
.
data
)
{
})
// 修改各个tab数量
}
else
{
var
i
=
0
uni
.
removeTabBarBadge
({
var
count
=
0
index
:
1
,
for
(
var
item
of
self
.
list
)
{
})
item
.
total
=
res
.
data
[
self
.
countKeys
[
i
]]
}
count
+=
item
.
total
}
i
++
}
else
{
}
console
.
log
(
res
.
message
,
'获取订单数量失败!'
)
}
// 修改tab总数
})
if
(
count
>
0
)
{
},
uni
.
setTabBarBadge
({
handleClickCellButton
(
item
)
{
index
:
1
,
// 去完工
text
:
String
(
count
)
uni
.
navigateTo
({
})
url
:
}
else
{
'pages/order/complete?orderId='
+
uni
.
removeTabBarBadge
({
item
.
orderId
+
index
:
1
'&categoryId='
+
})
item
.
categoryId
+
}
'&orderServiceType='
+
}
item
.
orderServiceType
+
}
else
{
'&inGuaranteePeriod='
+
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
item
.
inGuaranteePeriod
+
}
'&partnerCompanyId='
+
});
item
.
partnerCompanyId
+
},
'&maintainStep='
+
handleClickCellButton
(
item
)
{
item
.
maintainStep
+
// 去完工
'&orderStatus='
+
uni
.
navigateTo
({
item
.
orderStatus
+
url
:
'pages/order/complete?orderId='
+
item
.
orderId
'&brandId='
+
+
"&categoryId="
+
item
.
categoryId
item
.
lianbaoBrandId
+
+
"&orderServiceType="
+
item
.
orderServiceType
'&auditResults='
+
+
"&inGuaranteePeriod="
+
item
.
inGuaranteePeriod
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
).
join
()
:
''
),
+
"&partnerCompanyId="
+
item
.
partnerCompanyId
})
+
"&auditResultsId="
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
)[
Object
.
keys
(
item
.
auditResults
).
length
-
1
]:
''
)
},
+
"&maintainStep="
+
item
.
maintainStep
handleClick
(
item
,
type
,
showCountTime
)
{
+
'&orderStatus='
+
item
.
orderStatus
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
+
'&brandId='
+
item
.
lianbaoBrandId
//type类型
})
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
},
uni
.
navigateTo
({
handleClick
(
item
,
type
,
showCountTime
)
{
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
url
:
//type类型
'pages/order/detail?id='
+
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
item
.
orderId
+
uni
.
navigateTo
({
'&type='
+
url
:
'pages/order/detail?id='
+
item
.
orderId
+
'&type='
+
type
+
'&showCountTime='
+
showCountTime
type
+
})
'&showCountTime='
+
},
showCountTime
,
handleClickSearch
()
{
})
uni
.
navigateTo
({
},
url
:
'pages/order/search'
handleClickSearch
()
{
})
uni
.
navigateTo
({
},
url
:
'pages/order/search'
,
onRefresh
()
{
})
if
(
this
.
_freshing
)
return
;
},
this
.
_freshing
=
true
;
onRefresh
()
{
this
.
reloadOrderInfo
()
if
(
this
.
_freshing
)
return
},
this
.
_freshing
=
true
onRestore
()
{
this
.
reloadOrderInfo
()
this
.
triggered
=
'restore'
;
// 需要重置
},
},
onRestore
()
{
reloadOrderInfo
()
{
this
.
triggered
=
'restore'
// 需要重置
this
.
reloadOrderList
()
},
this
.
getOrderCount
();
reloadOrderInfo
()
{
},
this
.
reloadOrderList
()
reloadOrderList
()
{
this
.
getOrderCount
()
this
.
pageNumber
=
0
},
this
.
loadStatus
=
'loading'
reloadOrderList
()
{
this
.
getOrderList
(
this
.
currentIndex
);
this
.
pageNumber
=
0
},
this
.
loadStatus
=
'loading'
scroll
(
e
)
{
this
.
getOrderList
(
this
.
currentIndex
)
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
},
},
scroll
(
e
)
{
goTop
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
this
.
scrollTop
=
this
.
old
.
scrollTop
},
this
.
$nextTick
(
function
()
{
goTop
(
e
)
{
this
.
scrollTop
=
0
this
.
scrollTop
=
this
.
old
.
scrollTop
});
this
.
$nextTick
(
function
()
{
},
this
.
scrollTop
=
0
}
})
};
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.u-tabs-box
{
.u-tabs-box
{
margin-bottom
:
30rpx
;
margin-bottom
:
30rpx
;
}
}
.tab-view
{
.tab-view
{
height
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow
:
auto
;
// padding-bottom: 20rpx;
// padding-bottom: 20rpx;
.load-more-view
{
.load-more-view
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
.loading-view
{
.loading-view
{
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
margin-top
:
300rpx
;
margin-top
:
300rpx
;
position
:
absolute
;
position
:
absolute
;
}
}
}
}
.tools-box
{
.tools-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding-bottom
:
20rpx
;
padding-bottom
:
20rpx
;
.search-sub
{
.search-sub
{
height
:
72rpx
;
height
:
72rpx
;
width
:
320rpx
;
width
:
320rpx
;
}
}
.search-btn
{
.search-btn
{
height
:
72rpx
;
height
:
72rpx
;
width
:
220rpx
;
width
:
220rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
border-radius
:
36rpx
;
border-radius
:
36rpx
;
color
:
#999999
;
color
:
#999999
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
.search-image
{
.search-image
{
width
:
36rpx
;
width
:
36rpx
;
height
:
32rpx
;
height
:
32rpx
;
flex-shrink
:
0
;
flex-shrink
:
0
;
margin-right
:
24rpx
;
margin-right
:
24rpx
;
}
}
.search-btn-text
{
.search-btn-text
{
line-height
:
36rpx
;
line-height
:
36rpx
;
font-weight
:
400
;
font-weight
:
400
;
font-size
:
26rpx
;
font-size
:
26rpx
;
}
}
}
}
}
}
</
style
>
</
style
>
src/pages/mine/contract/index.vue
View file @
1bf70585
...
@@ -77,6 +77,7 @@ export default {
...
@@ -77,6 +77,7 @@ export default {
});
});
},
},
goBaidu
(
a
)
{
goBaidu
(
a
)
{
getApp
().
track
(
"mine_lookContract"
,
{
url
:
a
})
getApp
().
globalData
.
contractUrl
=
a
;
getApp
().
globalData
.
contractUrl
=
a
;
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"./out"
,
url
:
"./out"
,
...
...
src/pages/order/complete.vue
View file @
1bf70585
...
@@ -62,7 +62,12 @@
...
@@ -62,7 +62,12 @@
label-position=
"top"
label-position=
"top"
:prop=
"item.fieldsName"
:prop=
"item.fieldsName"
:border-bottom=
"false"
:border-bottom=
"false"
v-show=
"item.fieldsName != 'actualPaid' || show200"
v-show=
"
(item.fieldsName != 'actualPaid' || show200) &&
((readOnly &&
!$u.test.isEmpty(form[item.fieldsName])) ||
!readOnly)
"
:id=
"`item$
{item.fieldsId}`"
:id=
"`item$
{item.fieldsId}`"
>
>
<view
<view
...
@@ -84,7 +89,7 @@
...
@@ -84,7 +89,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"item.disabled || false"
:disabled=
"
readOnly ||
item.disabled || false"
:slotContent=
"item.fieldsInfo"
:slotContent=
"item.fieldsInfo"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
...
@@ -95,6 +100,7 @@
...
@@ -95,6 +100,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-multi-input>
</xh-multi-input>
...
@@ -104,7 +110,7 @@
...
@@ -104,7 +110,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"item.disabled || false"
:disabled=
"
readOnly ||
item.disabled || false"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-radio>
</xh-radio>
...
@@ -114,6 +120,7 @@
...
@@ -114,6 +120,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-checkbox>
</xh-checkbox>
...
@@ -123,6 +130,7 @@
...
@@ -123,6 +130,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-select>
</xh-select>
...
@@ -132,6 +140,7 @@
...
@@ -132,6 +140,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-specifications>
</xh-specifications>
...
@@ -144,10 +153,11 @@
...
@@ -144,10 +153,11 @@
:partnerCompanyId="partnerCompanyId"
:partnerCompanyId="partnerCompanyId"
:categoryId="categoryId"
:categoryId="categoryId"
:value="form[item.fieldsName] || []"
:value="form[item.fieldsName] || []"
:disabled="readOnly"
@value-change="fieldValueChange"
@value-change="fieldValueChange"
>
>
<template
v-slot
>
<template
v-slot
>
<view
class=
"img-list"
>
<view
class=
"img-list"
v-if=
"!readOnly"
>
<u-image
<u-image
class=
"pic"
class=
"pic"
width=
"160rpx"
width=
"160rpx"
...
@@ -173,6 +183,7 @@
...
@@ -173,6 +183,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-location>
</xh-location>
...
@@ -182,6 +193,7 @@
...
@@ -182,6 +193,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-scan>
</xh-scan>
...
@@ -195,6 +207,7 @@
...
@@ -195,6 +207,7 @@
:orderServiceType=
"orderServiceType"
:orderServiceType=
"orderServiceType"
:specificationId=
"form['specificationId'] || 0"
:specificationId=
"form['specificationId'] || 0"
:value=
"form[item.fieldsName]"
:value=
"form[item.fieldsName]"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-service-measure>
</xh-service-measure>
...
@@ -204,6 +217,7 @@
...
@@ -204,6 +217,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-time>
</xh-time>
...
@@ -214,6 +228,7 @@
...
@@ -214,6 +228,7 @@
:item=
"item"
:item=
"item"
:order-id=
"orderId"
:order-id=
"orderId"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-service-more>
</xh-service-more>
...
@@ -235,7 +250,11 @@
...
@@ -235,7 +250,11 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"orderStatus === '88' || orderStatus === '86'"
:disabled=
"
orderStatus === '88' ||
orderStatus === '86' ||
readOnly
"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-parts>
</xh-parts>
...
@@ -247,9 +266,16 @@
...
@@ -247,9 +266,16 @@
</u-form>
</u-form>
</scroll-view>
</scroll-view>
</view>
</view>
<view
:class=
"['btn-wrap', 'flex-xc', { 'btn-bottom': tabIndex > 0 }]"
>
<view
:class=
"[
'btn-wrap',
'flex-xc',
{ 'btn-bottom': tabIndex > 0, 'read-only': readOnly },
]"
>
<u-button
<u-button
class=
"btn-submit"
class=
"btn-submit"
v-if=
"!readOnly"
@
click=
"saveComplete"
@
click=
"saveComplete"
type=
"primary"
type=
"primary"
shape=
"circle"
shape=
"circle"
...
@@ -266,7 +292,15 @@
...
@@ -266,7 +292,15 @@
shape=
"circle"
shape=
"circle"
:hover-class=
"submitStatus ? '' : 'none'"
:hover-class=
"submitStatus ? '' : 'none'"
>
>
{{ tabIndex === list.length - 1 ? "提交" : "下一步" }}
{{
tabIndex === list.length - 1
? readOnly
? '返回列表'
: '提交'
: readOnly
? '查看下一步'
: '下一步'
}}
</u-button>
</u-button>
</view>
</view>
</view>
</view>
...
@@ -286,53 +320,53 @@
...
@@ -286,53 +320,53 @@
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
XhInput
from
"@/components/createCom/XhInput.vue"
;
import
XhInput
from
'@/components/createCom/XhInput.vue'
import
XhMultiInput
from
"@/components/createCom/XhMultiInput.vue"
;
import
XhMultiInput
from
'@/components/createCom/XhMultiInput.vue'
import
XhRadio
from
"@/components/createCom/XhRadio.vue"
;
import
XhRadio
from
'@/components/createCom/XhRadio.vue'
import
XhCheckbox
from
"@/components/createCom/XhCheckbox.vue"
;
import
XhCheckbox
from
'@/components/createCom/XhCheckbox.vue'
import
XhSelect
from
"@/components/createCom/XhSelect.vue"
;
import
XhSelect
from
'@/components/createCom/XhSelect.vue'
import
XhSpecifications
from
"@/components/createCom/XhSpecifications.vue"
;
import
XhSpecifications
from
'@/components/createCom/XhSpecifications.vue'
import
XhFiles
from
"@/components/createCom/XhFiles.vue"
;
import
XhFiles
from
'@/components/createCom/XhFiles.vue'
import
XhLocation
from
"@/components/createCom/XhLocation.vue"
;
import
XhLocation
from
'@/components/createCom/XhLocation.vue'
import
XhScan
from
"@/components/createCom/XhScan.vue"
;
import
XhScan
from
'@/components/createCom/XhScan.vue'
import
XhTime
from
"@/components/createCom/XhTime.vue"
;
import
XhTime
from
'@/components/createCom/XhTime.vue'
import
XhServiceMeasure
from
"@/components/createCom/XhServiceMeasure.vue"
;
import
XhServiceMeasure
from
'@/components/createCom/XhServiceMeasure.vue'
import
XhServiceMore
from
"../../components/createCom/XhServiceMore"
;
import
XhServiceMore
from
'../../components/createCom/XhServiceMore'
import
XhLabel
from
"../../components/createCom/XhLabel"
;
import
XhLabel
from
'../../components/createCom/XhLabel'
import
XhParts
from
"@/components/createCom/XhParts"
;
import
XhParts
from
'@/components/createCom/XhParts'
import
takePhoto
from
"@/components/take/index.vue"
;
import
takePhoto
from
'@/components/take/index.vue'
import
baseFile
from
"@/components/upload/index"
;
import
baseFile
from
'@/components/upload/index'
import
Detail
from
"@/components/order/detail.vue"
;
import
Detail
from
'@/components/order/detail.vue'
import
returnPartsVue
from
"../parts/returnParts.vue"
;
import
returnPartsVue
from
'../parts/returnParts.vue'
// 表单类型map
// 表单类型map
const
formType
=
new
Map
([
const
formType
=
new
Map
([
[
"text"
,
[
"input"
,
"textarea"
]],
[
'text'
,
[
'input'
,
'textarea'
]],
[
"password"
,
[
"password"
,
"input"
]],
[
'password'
,
[
'password'
,
'input'
]],
[
"textarea"
,
[
"input"
,
"digit"
]],
[
'textarea'
,
[
'input'
,
'digit'
]],
[
"number"
,
[
"input"
,
"digit"
]],
[
'number'
,
[
'input'
,
'digit'
]],
[
"decimal"
,
[
"input"
,
"digit"
]],
[
'decimal'
,
[
'input'
,
'digit'
]],
[
"double"
,
[
"input"
,
"digit"
]],
[
'double'
,
[
'input'
,
'digit'
]],
[
"integer"
,
[
"input"
,
"digit"
]],
[
'integer'
,
[
'input'
,
'digit'
]],
[
"string"
,
[
"input"
,
"text"
]],
[
'string'
,
[
'input'
,
'text'
]],
[
"jscode"
,
[
"input"
,
"text"
]],
[
'jscode'
,
[
'input'
,
'text'
]],
[
"multiinput"
,
[
"multiinput"
,
"text"
]],
[
'multiinput'
,
[
'multiinput'
,
'text'
]],
[
"select"
,
[
"select"
,
"text"
]],
[
'select'
,
[
'select'
,
'text'
]],
[
"specifications"
,
[
"select-new-page"
,
"text"
]],
[
'specifications'
,
[
'select-new-page'
,
'text'
]],
[
"radio"
,
[
"radio"
,
"text"
]],
[
'radio'
,
[
'radio'
,
'text'
]],
[
"checkbox"
,
[
"checkbox"
,
"text"
]],
[
'checkbox'
,
[
'checkbox'
,
'text'
]],
[
"file"
,
[
"file"
,
"text"
]],
[
'file'
,
[
'file'
,
'text'
]],
[
"photos"
,
[
"file"
,
"text"
]],
[
'photos'
,
[
'file'
,
'text'
]],
[
"location"
,
[
"location"
,
"text"
]],
[
'location'
,
[
'location'
,
'text'
]],
[
"scan"
,
[
"scan"
,
"text"
]],
[
'scan'
,
[
'scan'
,
'text'
]],
[
"machine_code"
,
[
"scan"
,
"text"
]],
[
'machine_code'
,
[
'scan'
,
'text'
]],
[
"service_measures"
,
[
"servicemeasure"
,
"text"
]],
[
'service_measures'
,
[
'servicemeasure'
,
'text'
]],
[
"time"
,
[
"time"
,
"text"
]],
[
'time'
,
[
'time'
,
'text'
]],
[
"date"
,
[
"time"
,
"text"
]],
[
'date'
,
[
'time'
,
'text'
]],
[
"form"
,
[
"form"
,
"text"
]],
[
'form'
,
[
'form'
,
'text'
]],
[
"label"
,
[
"label"
,
"text"
]],
[
'label'
,
[
'label'
,
'text'
]],
[
"parts"
,
[
"parts"
,
"text"
]],
[
'parts'
,
[
'parts'
,
'text'
]],
])
;
])
/**
/**
* modal 弹窗校验
* modal 弹窗校验
...
@@ -345,80 +379,80 @@ const formType = new Map([
...
@@ -345,80 +379,80 @@ const formType = new Map([
const
actions
=
(
name
,
pass
,
type
,
submit
)
=>
{
const
actions
=
(
name
,
pass
,
type
,
submit
)
=>
{
const
handerProgrom
=
{
const
handerProgrom
=
{
perfect
:
{
perfect
:
{
confirmText
:
"去完善"
,
confirmText
:
'去完善'
,
action
:
"handerProgrom"
,
action
:
'handerProgrom'
,
},
},
appointment
:
{
appointment
:
{
confirmText
:
"好的,再次预约"
,
confirmText
:
'好的,再次预约'
,
action
:
"appointment"
,
action
:
'appointment'
,
},
},
next
:
{
next
:
{
confirmText
:
"下一步"
,
confirmText
:
'下一步'
,
action
:
"nextAction"
,
action
:
'nextAction'
,
},
},
noPerfectSubmit
:
{
noPerfectSubmit
:
{
confirmText
:
"去完善"
,
confirmText
:
'去完善'
,
action
:
"handerProgrom"
,
action
:
'handerProgrom'
,
cancelText
:
"部分提交"
,
cancelText
:
'部分提交'
,
cancelAction
:
"appointment"
,
cancelAction
:
'appointment'
,
},
},
submit
:
{
submit
:
{
confirmText
:
"提交"
,
confirmText
:
'提交'
,
action
:
"orderFinish"
,
action
:
'orderFinish'
,
},
},
confirm
:
{
confirm
:
{
confirmText
:
"确定"
,
confirmText
:
'确定'
,
action
:
"nextAction"
,
action
:
'nextAction'
,
cancelText
:
"取消"
,
cancelText
:
'取消'
,
cancelAction
:
"closeCheckResult"
,
cancelAction
:
'closeCheckResult'
,
},
},
}
;
}
if
(
name
===
"partnerInspectItem"
)
{
if
(
name
===
'partnerInspectItem'
)
{
// 勘察
// 勘察
if
(
!
pass
)
return
handerProgrom
.
perfect
;
if
(
!
pass
)
return
handerProgrom
.
perfect
return
type
return
type
?
type
===
"01"
?
type
===
'01'
?
handerProgrom
.
next
?
handerProgrom
.
next
:
handerProgrom
.
appointment
:
handerProgrom
.
appointment
:
handerProgrom
.
perfect
;
:
handerProgrom
.
perfect
}
else
if
(
name
===
"partnerInstallItem"
)
{
}
else
if
(
name
===
'partnerInstallItem'
)
{
// 安装
// 安装
let
hander
=
""
;
let
hander
=
''
switch
(
type
)
{
switch
(
type
)
{
case
"01"
:
// 安装完成
case
'01'
:
// 安装完成
hander
=
!
pass
?
handerProgrom
.
perfect
:
handerProgrom
.
next
;
hander
=
!
pass
?
handerProgrom
.
perfect
:
handerProgrom
.
next
break
;
break
case
"02"
:
// 二次安装
case
'02'
:
// 二次安装
hander
=
!
pass
hander
=
!
pass
?
handerProgrom
.
noPerfectSubmit
?
handerProgrom
.
noPerfectSubmit
:
handerProgrom
.
appointment
;
:
handerProgrom
.
appointment
break
;
break
case
"03"
:
//不安装
case
'03'
:
//不安装
hander
=
handerProgrom
.
confirm
;
hander
=
handerProgrom
.
confirm
break
;
break
default
:
default
:
hander
=
handerProgrom
.
perfect
;
hander
=
handerProgrom
.
perfect
break
;
break
}
}
return
hander
;
return
hander
}
else
{
}
else
{
// 基础信息
// 基础信息
if
(
!
pass
)
return
handerProgrom
.
perfect
;
if
(
!
pass
)
return
handerProgrom
.
perfect
return
submit
?
handerProgrom
.
submit
:
handerProgrom
.
next
;
return
submit
?
handerProgrom
.
submit
:
handerProgrom
.
next
}
}
}
;
}
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
hiddenTitle
:
[
"location"
,
"form"
,
"label"
,
"parts"
],
hiddenTitle
:
[
'location'
,
'form'
,
'label'
,
'parts'
],
orderId
:
0
,
orderId
:
0
,
categoryId
:
0
,
categoryId
:
0
,
brandId
:
0
,
brandId
:
0
,
orderServiceType
:
""
,
orderServiceType
:
''
,
inGuaranteePeriod
:
""
,
inGuaranteePeriod
:
''
,
partnerCompanyId
:
""
,
partnerCompanyId
:
''
,
auditResults
Id
:
""
,
auditResults
:
[]
,
list
:
[],
list
:
[],
tabIndex
:
0
,
tabIndex
:
0
,
scrollTop
:
0
,
//tab标题的滚动条位置
scrollTop
:
0
,
//tab标题的滚动条位置
...
@@ -426,8 +460,8 @@ export default {
...
@@ -426,8 +460,8 @@ export default {
current
:
0
,
// 预设当前项的值
current
:
0
,
// 预设当前项的值
menuHeight
:
0
,
// 左边菜单的高度
menuHeight
:
0
,
// 左边菜单的高度
menuItemHeight
:
0
,
// 左边菜单item的高度
menuItemHeight
:
0
,
// 左边菜单item的高度
itemId
:
""
,
// 栏目右边scroll-view用于滚动的id
itemId
:
''
,
// 栏目右边scroll-view用于滚动的id
oldItemId
:
""
,
oldItemId
:
''
,
menuItemPos
:
[],
menuItemPos
:
[],
arr
:
[],
arr
:
[],
scrollRightTop
:
0
,
// 右边栏目scroll-view的滚动条高度
scrollRightTop
:
0
,
// 右边栏目scroll-view的滚动条高度
...
@@ -439,10 +473,10 @@ export default {
...
@@ -439,10 +473,10 @@ export default {
completeCheck
:
{
completeCheck
:
{
status
:
false
,
status
:
false
,
resulut
:
[],
resulut
:
[],
confirmText
:
"去完善"
,
confirmText
:
'去完善'
,
cancelText
:
""
,
cancelText
:
''
,
action
:
""
,
action
:
''
,
cancelAction
:
""
,
cancelAction
:
''
,
},
},
waitHandlerPanelIndex
:
0
,
waitHandlerPanelIndex
:
0
,
waitHandlerGroupIndex
:
0
,
waitHandlerGroupIndex
:
0
,
...
@@ -451,20 +485,20 @@ export default {
...
@@ -451,20 +485,20 @@ export default {
// 上传组件相关
// 上传组件相关
carmeraList
:
[
carmeraList
:
[
{
{
text
:
"相册"
,
text
:
'相册'
,
},
},
{
{
text
:
"拍照"
,
text
:
'拍照'
,
},
},
],
],
maskShow
:
false
,
maskShow
:
false
,
takeStatus
:
false
,
takeStatus
:
false
,
currentItemDate
:
{},
currentItemDate
:
{},
photoItem
:
{},
photoItem
:
{},
maintainStep
:
"partnerInspectItem"
,
maintainStep
:
'partnerInspectItem'
,
orderStatus
:
""
,
orderStatus
:
''
,
// showTab: true,
// showTab: true,
}
;
}
},
},
components
:
{
components
:
{
XhInput
,
XhInput
,
...
@@ -482,187 +516,234 @@ export default {
...
@@ -482,187 +516,234 @@ export default {
XhLabel
,
XhLabel
,
XhParts
,
XhParts
,
Detail
,
Detail
,
"take-photo"
:
takePhoto
,
'take-photo'
:
takePhoto
,
},
},
mixins
:
[
baseFile
],
mixins
:
[
baseFile
],
created
()
{
created
()
{
// console.log(allComponents,'allComponents')
// console.log(allComponents,'allComponents')
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
getApp
().
trackPage
(
"订单完工信息页"
);
getApp
().
trackPage
(
'订单完工信息页'
)
if
(
option
)
{
if
(
option
)
{
this
.
maintainStep
=
option
.
maintainStep
;
this
.
maintainStep
=
option
.
maintainStep
this
.
orderId
=
option
.
orderId
;
this
.
orderId
=
option
.
orderId
this
.
categoryId
=
option
.
categoryId
;
this
.
categoryId
=
option
.
categoryId
this
.
brandId
=
option
.
brandId
;
this
.
brandId
=
option
.
brandId
this
.
orderServiceType
=
decodeURIComponent
(
option
.
orderServiceType
);
this
.
orderServiceType
=
decodeURIComponent
(
option
.
orderServiceType
)
this
.
inGuaranteePeriod
=
option
.
inGuaranteePeriod
;
this
.
inGuaranteePeriod
=
option
.
inGuaranteePeriod
this
.
partnerCompanyId
=
option
.
partnerCompanyId
;
this
.
partnerCompanyId
=
option
.
partnerCompanyId
this
.
auditResultsId
=
option
.
auditResultsId
;
this
.
orderStatus
=
option
.
orderStatus
this
.
orderStatus
=
option
.
orderStatus
;
this
.
auditResults
=
option
?.
auditResults
?
option
?.
auditResults
.
split
(
','
)
:
[]
// this.showTab =item.partnerCompanyName == '挚达充电桩'
// this.showTab =item.partnerCompanyName == '挚达充电桩'
}
else
{
}
else
{
this
.
orderId
=
11880091
;
this
.
orderId
=
11880091
this
.
categoryId
=
1100000214
;
this
.
categoryId
=
1100000214
this
.
orderServiceType
=
"安装"
;
this
.
orderServiceType
=
'安装'
this
.
inGuaranteePeriod
=
"Y"
;
this
.
inGuaranteePeriod
=
'Y'
}
}
this
.
getCompleteData
()
;
this
.
getCompleteData
()
},
},
updated
()
{
updated
()
{
//console.log(this.form.name, 'form.name')
//console.log(this.form.name, 'form.name')
},
},
computed
:
{
computed
:
{
readOnly
()
{
return
[
80
,
81
,
85
,
87
,
89
,
110
].
indexOf
(
Number
(
this
.
orderStatus
))
!=
-
1
},
tabList
()
{
tabList
()
{
// 没有数据的时候tab要有占位数据,不然有页面有晃动
// 没有数据的时候tab要有占位数据,不然有页面有晃动
return
this
.
list
.
length
>
0
return
this
.
list
.
length
>
0
?
this
.
list
[
this
.
tabIndex
].
items
?
this
.
list
[
this
.
tabIndex
].
items
:
[{
name
:
""
}];
:
[{
name
:
''
}]
},
},
mixingImage
()
{
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"mixing.png"
;
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
},
uploadImage
()
{
uploadImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"upload-file.png"
;
return
process
.
uniEnv
.
qn_base_url
+
'upload-file.png'
},
},
buttonStyle
()
{
buttonStyle
()
{
return
{
return
{
color
:
"#FFFFFF"
,
color
:
'#FFFFFF'
,
"background-color"
:
"#2272FF;"
,
'background-color'
:
'#2272FF;'
,
width
:
"300rpx"
,
width
:
'300rpx'
,
height
:
"104rpx"
,
height
:
'104rpx'
,
"font-size"
:
"32rpx"
,
'font-size'
:
'32rpx'
,
"font-weight"
:
"bold"
,
'font-weight'
:
'bold'
,
"margin-left"
:
"50rpx"
,
'margin-left'
:
'50rpx'
,
}
;
}
},
},
customStyle
()
{
customStyle
()
{
return
{
return
{
"background-color"
:
"#D1D4D4"
,
'background-color'
:
'#D1D4D4'
,
width
:
"300rpx"
,
width
:
'300rpx'
,
height
:
"104rpx"
,
height
:
'104rpx'
,
"background-color"
:
"transparent"
,
'background-color'
:
'transparent'
,
border
:
"1px solid #2272FF"
,
border
:
'1px solid #2272FF'
,
color
:
"#2272FF"
,
color
:
'#2272FF'
,
"font-weight"
:
"bold"
,
'font-weight'
:
'bold'
,
"font-size"
:
"32rpx"
,
'font-size'
:
'32rpx'
,
}
;
}
},
},
show200
()
{
show200
()
{
return
(
return
(
this
.
form
.
paymentMethodsType
&&
this
.
form
.
paymentMethodsType
!=
"03"
this
.
form
.
paymentMethodsType
&&
this
.
form
.
paymentMethodsType
!=
'03'
)
;
)
},
},
},
},
methods
:
{
methods
:
{
getCompleteData
()
{
getCompleteData
()
{
//获取工单配置的完工项目
//获取工单配置的完工项目
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中"
,
title
:
'加载中'
,
})
;
})
if
(
this
.
orderId
)
{
if
(
this
.
orderId
)
{
this
.
$u
.
api
.
getCompleteConfigAndData
(
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
getCompleteConfigAndData
(
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
initData
(
res
)
;
this
.
initData
(
res
)
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
||
res
.
data
,
title
:
res
.
message
||
res
.
data
,
type
:
"error"
,
type
:
'error'
,
})
;
})
}
}
})
;
})
}
}
},
},
initData
(
res
)
{
initData
(
res
)
{
this
.
form
=
res
.
data
.
value
||
{};
this
.
form
=
res
.
data
.
value
||
{}
this
.
initFormData
();
this
.
initFormData
()
const
list
=
res
.
data
.
config
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
);
const
list
=
res
.
data
.
config
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
if
(
this
.
readOnly
)
this
.
tabIndex
=
0
list
.
forEach
((
item
,
index
)
=>
{
list
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
maintainStep
===
item
.
panelFieldsName
)
this
.
tabIndex
=
index
;
if
(
this
.
maintainStep
===
item
.
panelFieldsName
&&
!
this
.
readOnly
)
{
this
.
tabIndex
=
index
}
item
.
items
.
forEach
((
v
)
=>
{
item
.
items
.
forEach
((
v
)
=>
{
v
.
items
.
forEach
((
d
)
=>
{
v
.
items
.
forEach
((
d
)
=>
{
const
type
=
d
.
fieldsType
.
toLocaleLowerCase
()
;
const
type
=
d
.
fieldsType
.
toLocaleLowerCase
()
const
formMap
=
formType
.
get
(
type
)
||
formType
.
get
(
"text"
);
const
formMap
=
formType
.
get
(
type
)
||
formType
.
get
(
'text'
)
d
.
formType
=
formMap
[
0
]
;
d
.
formType
=
formMap
[
0
]
d
.
inputType
=
formMap
[
1
]
;
d
.
inputType
=
formMap
[
1
]
if
(
d
.
fieldsName
===
"actualPaid"
&&
res
.
data
.
value
)
{
if
(
d
.
fieldsName
===
'actualPaid'
&&
res
.
data
.
value
)
{
d
.
required
=
res
.
data
.
value
[
"paymentMethodsType"
]
d
.
required
=
res
.
data
.
value
[
'paymentMethodsType'
]
?
res
.
data
.
value
[
"paymentMethodsType"
]
!=
"03"
?
res
.
data
.
value
[
'paymentMethodsType'
]
!=
'03'
:
false
;
:
false
}
}
if
(
d
.
fieldsName
===
"pipe"
||
d
.
fieldsName
===
"pipeUseLength"
)
{
if
(
d
.
fieldsName
===
'pipe'
||
d
.
fieldsName
===
'pipeUseLength'
)
{
// 申请费用计算
// 申请费用计算
this
.
calcMoney
()
;
this
.
calcMoney
()
}
}
if
(
d
.
fieldsName
===
"materialList"
)
{
if
(
d
.
fieldsName
===
'materialList'
)
{
d
.
subtitle
=
"(必填项)"
;
d
.
subtitle
=
'(必填项)'
}
}
if
(
d
.
fieldsName
===
"craftList"
)
{
if
(
d
.
fieldsName
===
'craftList'
)
{
d
.
subtitle
=
"(若有增项,则为必填项)"
;
d
.
subtitle
=
'(若有增项,则为必填项)'
}
}
})
;
})
})
;
})
})
;
})
this
.
list
=
list
;
// this.showTab = this.list.length > 1
// this.showTab = this.list.length > 1
// 异常单处理
// 异常单处理
if
(
this
.
auditResultsId
)
this
.
checkCompleteError
();
if
(
uni
.
hideLoading
();
this
.
auditResults
.
length
>
0
&&
(
this
.
orderStatus
===
'88'
||
this
.
orderStatus
===
'86'
)
)
{
this
.
checkCompleteError
(
list
)
}
else
{
this
.
list
=
list
}
uni
.
hideLoading
()
},
},
initFormData
()
{
initFormData
()
{
this
.
loadOrderDetail
()
;
this
.
loadOrderDetail
()
},
},
loadOrderDetail
()
{
loadOrderDetail
()
{
if
(
!
this
.
$u
.
test
.
isEmpty
(
this
.
form
)
&&
this
.
form
.
hasOwnProperty
(
"installComfirmTime"
)
if
(
&&
this
.
$u
.
test
.
isEmpty
(
this
.
form
.
installComfirmTime
))
{
!
this
.
$u
.
test
.
isEmpty
(
this
.
form
)
&&
this
.
form
.
hasOwnProperty
(
'installComfirmTime'
)
&&
this
.
$u
.
test
.
isEmpty
(
this
.
form
.
installComfirmTime
)
)
{
this
.
$u
.
api
.
orderDetail
(
null
,
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
orderDetail
(
null
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
!
this
.
$u
.
test
.
isEmpty
(
res
.
data
.
checkInDateTime
))
{
if
(
!
this
.
$u
.
test
.
isEmpty
(
res
.
data
.
checkInDateTime
))
{
this
.
$set
(
this
.
$set
(
this
.
form
,
this
.
form
,
"installComfirmTime"
,
'installComfirmTime'
,
this
.
moment
(
res
.
data
.
checkInDateTime
).
format
(
"YYYY-MM-DD"
)
this
.
moment
(
res
.
data
.
checkInDateTime
).
format
(
'YYYY-MM-DD'
)
)
;
)
}
}
}
}
})
;
})
}
}
},
},
checkCompleteError
()
{
checkCompleteError
(
list
)
{
// 异常单定位错误项
// 异常单定位错误项
let
self
=
this
;
let
errArr
=
[]
self
.
list
.
forEach
((
panel
,
panelIndex
)
=>
{
list
.
forEach
((
panel
,
panelIndex
)
=>
{
panel
.
items
.
forEach
((
group
,
groupIndex
)
=>
{
panel
.
items
.
forEach
((
group
,
groupIndex
)
=>
{
group
.
items
.
forEach
((
ele
,
eleIndex
)
=>
{
group
.
items
.
forEach
((
ele
,
eleIndex
)
=>
{
if
(
ele
.
fieldsName
===
self
.
auditResultsId
)
{
if
(
this
.
auditResults
.
includes
(
ele
.
fieldsName
))
{
self
.
waitHandlerPanelIndex
=
panelIndex
;
const
errGroup
=
{
self
.
waitHandlerGroupIndex
=
groupIndex
;
componentType
:
group
.
componentType
,
self
.
waitHandlerEleIndex
=
eleIndex
;
name
:
group
.
name
,
self
.
oldItemId
=
`item
${
ele
.
fieldsId
}
`
;
items
:
ele
,
}
errArr
.
push
(
errGroup
)
}
}
});
})
});
})
});
})
this
.
locationCompleteItem
(
self
.
waitHandlerPanelIndex
,
const
result
=
errArr
.
reduce
((
groups
,
item
)
=>
{
self
.
waitHandlerGroupIndex
,
let
groupFound
=
groups
.
find
((
arrItem
)
=>
item
.
name
===
arrItem
.
name
)
self
.
waitHandlerEleIndex
if
(
groupFound
)
{
);
groupFound
.
componentType
=
item
.
componentType
if
(
groupFound
.
items
.
indexOf
(
item
.
items
)
==
-
1
)
{
//去重
groupFound
.
items
.
push
(
item
.
items
)
}
}
else
{
//不要直接在原来的对象修改,新建对象
let
newGroup
=
{
name
:
item
.
name
,
componentType
:
item
.
componentType
,
items
:
[
item
.
items
],
}
groups
.
push
(
newGroup
)
}
return
groups
},
[])
let
index
=
list
.
length
++
list
[
index
]
=
{
order
:
index
+
1
,
panelFieldsName
:
'error'
,
panelName
:
'异常处理'
,
items
:
result
,
}
this
.
list
=
list
this
.
tabIndex
=
index
},
},
handleSaveData
()
{
handleSaveData
()
{
let
param
=
{}
;
let
param
=
{}
const
name
=
this
.
list
[
this
.
tabIndex
].
panelFieldsName
;
const
name
=
this
.
list
[
this
.
tabIndex
].
panelFieldsName
this
.
list
.
forEach
((
panel
)
=>
{
this
.
list
.
forEach
((
panel
)
=>
{
param
[
panel
.
panelFieldsName
]
=
[]
;
param
[
panel
.
panelFieldsName
]
=
[]
panel
.
items
.
forEach
((
group
)
=>
{
panel
.
items
.
forEach
((
group
)
=>
{
group
.
items
.
forEach
((
ele
)
=>
{
group
.
items
.
forEach
((
ele
)
=>
{
if
(
name
===
"partnerInspectItem"
)
{
if
(
name
===
'partnerInspectItem'
)
{
if
(
!
this
.
form
?.
installationMethodType
)
{
if
(
!
this
.
form
?.
installationMethodType
)
{
this
.
$set
(
this
.
form
,
"installationMethodType"
,
this
.
form
.
installType
);
this
.
$set
(
this
.
form
,
'installationMethodType'
,
this
.
form
.
installType
)
}
}
}
}
if
(
this
.
form
[
ele
.
fieldsName
])
{
if
(
this
.
form
[
ele
.
fieldsName
])
{
...
@@ -671,96 +752,95 @@ export default {
...
@@ -671,96 +752,95 @@ export default {
fieldsType
:
ele
.
fieldsType
,
fieldsType
:
ele
.
fieldsType
,
fieldsValue
:
this
.
form
[
ele
.
fieldsName
],
fieldsValue
:
this
.
form
[
ele
.
fieldsName
],
required
:
ele
.
required
,
required
:
ele
.
required
,
})
;
})
}
}
})
;
})
})
;
})
})
;
})
return
param
;
return
param
},
},
saveComplete
()
{
saveComplete
()
{
// 保存完工信息
// 保存完工信息
// this.submitParts() // 不调这个接口;没完工不能调提交配件
// this.submitParts() // 不调这个接口;没完工不能调提交配件
const
param
=
this
.
handleSaveData
()
;
const
param
=
this
.
handleSaveData
()
this
.
$u
.
api
.
saveCompleteData
(
param
,
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
saveCompleteData
(
param
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
"保存成功"
,
title
:
'保存成功'
,
type
:
"success"
,
type
:
'success'
,
})
;
})
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
||
res
.
data
,
title
:
res
.
message
||
res
.
data
,
type
:
"error"
,
type
:
'error'
,
})
;
})
}
}
})
;
})
},
},
checkCompleteItem
()
{
checkCompleteItem
()
{
let
checkResult
=
[]
;
let
checkResult
=
[]
let
pass
=
true
;
let
pass
=
true
let
first
=
true
;
let
first
=
true
const
lists
=
this
.
tabList
;
const
lists
=
this
.
tabList
lists
.
forEach
((
group
,
groupIndex
)
=>
{
lists
.
forEach
((
group
,
groupIndex
)
=>
{
const
checkRequired
=
group
.
items
.
some
((
v
)
=>
v
.
required
)
;
const
checkRequired
=
group
.
items
.
some
((
v
)
=>
v
.
required
)
if
(
checkRequired
)
{
if
(
checkRequired
)
{
let
panelResult
=
{
let
panelResult
=
{
label
:
group
.
name
,
label
:
group
.
name
,
submitted
:
0
,
submitted
:
0
,
required
:
0
,
required
:
0
,
pass
:
true
,
pass
:
true
,
}
;
}
group
.
items
.
forEach
((
ele
,
eleIndex
)
=>
{
group
.
items
.
forEach
((
ele
,
eleIndex
)
=>
{
if
(
ele
.
required
)
{
if
(
ele
.
required
)
{
panelResult
.
required
++
;
panelResult
.
required
++
let
value
=
this
.
form
[
ele
.
fieldsName
]
;
let
value
=
this
.
form
[
ele
.
fieldsName
]
if
(
value
&&
!
Array
.
isArray
(
value
))
{
if
(
value
&&
!
Array
.
isArray
(
value
))
{
panelResult
.
submitted
++
;
panelResult
.
submitted
++
}
else
if
(
value
&&
Array
.
isArray
(
value
)
&&
value
.
length
>
0
)
{
}
else
if
(
value
&&
Array
.
isArray
(
value
)
&&
value
.
length
>
0
)
{
if
(
ele
.
fieldsName
===
"materialList"
)
{
if
(
ele
.
fieldsName
===
'materialList'
)
{
let
hasMate
=
false
;
let
hasMate
=
false
let
mateRow
=
value
.
find
((
mate
)
=>
{
let
mateRow
=
value
.
find
((
mate
)
=>
{
if
(
mate
.
hasOwnProperty
(
"useLength"
))
{
if
(
mate
.
hasOwnProperty
(
'useLength'
))
{
hasMate
=
true
;
hasMate
=
true
return
!
this
.
$u
.
test
.
isEmpty
(
mate
.
useLength
)
;
return
!
this
.
$u
.
test
.
isEmpty
(
mate
.
useLength
)
}
}
})
;
})
if
(
!
hasMate
||
!
this
.
$u
.
test
.
isEmpty
(
mateRow
))
{
if
(
!
hasMate
||
!
this
.
$u
.
test
.
isEmpty
(
mateRow
))
{
panelResult
.
submitted
++
;
panelResult
.
submitted
++
}
}
panelResult
.
submitted
++
;
panelResult
.
submitted
++
}
else
{
}
else
{
panelResult
.
submitted
++
;
panelResult
.
submitted
++
}
}
}
else
if
(
first
)
{
}
else
if
(
first
)
{
// 记录第一个 为空 并且需要必填的项 用于定位
// 记录第一个 为空 并且需要必填的项 用于定位
first
=
false
;
first
=
false
this
.
waitHandlerPanelIndex
=
this
.
tabIndex
;
this
.
waitHandlerPanelIndex
=
this
.
tabIndex
this
.
waitHandlerGroupIndex
=
groupIndex
;
this
.
waitHandlerGroupIndex
=
groupIndex
this
.
waitHandlerEleIndex
=
eleIndex
;
this
.
waitHandlerEleIndex
=
eleIndex
this
.
oldItemId
=
`item
${
ele
.
fieldsId
}
`
;
this
.
oldItemId
=
`item
${
ele
.
fieldsId
}
`
}
}
}
}
})
;
})
panelResult
.
pass
=
panelResult
.
required
<=
panelResult
.
submitted
;
panelResult
.
pass
=
panelResult
.
required
<=
panelResult
.
submitted
pass
=
pass
&&
panelResult
.
pass
;
pass
=
pass
&&
panelResult
.
pass
checkResult
.
push
(
panelResult
)
;
checkResult
.
push
(
panelResult
)
}
}
})
;
})
console
.
log
(
checkResult
);
this
.
completeCheck
.
result
=
checkResult
this
.
completeCheck
.
result
=
checkResult
;
return
pass
return
pass
;
},
},
// 检查结果窗口取消回调
// 检查结果窗口取消回调
closeCheckResult
()
{
closeCheckResult
()
{
this
.
completeCheck
.
status
=
false
;
this
.
completeCheck
.
status
=
false
this
[
this
.
completeCheck
.
cancelAction
]()
;
this
[
this
.
completeCheck
.
cancelAction
]()
},
},
// 检查结果窗口 确认回调
// 检查结果窗口 确认回调
confirm
()
{
confirm
()
{
this
.
completeCheck
.
status
=
false
;
this
.
completeCheck
.
status
=
false
this
[
this
.
completeCheck
.
action
]()
;
this
[
this
.
completeCheck
.
action
]()
},
},
// 去完善
// 去完善
handerProgrom
()
{
handerProgrom
()
{
...
@@ -768,50 +848,64 @@ export default {
...
@@ -768,50 +848,64 @@ export default {
this
.
waitHandlerPanelIndex
,
this
.
waitHandlerPanelIndex
,
this
.
waitHandlerGroupIndex
,
this
.
waitHandlerGroupIndex
,
this
.
waitHandlerEleIndex
this
.
waitHandlerEleIndex
)
;
)
},
},
// 去预约
// 去预约
async
appointment
()
{
async
appointment
()
{
const
save
=
await
this
.
nextStepSaveData
()
;
const
save
=
await
this
.
nextStepSaveData
()
if
(
save
)
{
if
(
save
)
{
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
"/pages/index/order?type=0"
,
url
:
'/pages/index/order?type=0'
,
})
;
})
}
}
},
},
// 下一步动作
// 下一步动作
async
nextAction
()
{
async
nextAction
()
{
const
save
=
await
this
.
nextStepSaveData
();
const
save
=
await
this
.
nextStepSaveData
()
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
&&
save
)
{
if
(
save
)
{
this
.
tabIndex
++
;
this
.
nextTab
()
this
.
arr
=
[];
}
this
.
scrollRightTop
=
0
;
},
this
.
current
=
0
;
nextTab
()
{
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
)
{
this
.
tabIndex
++
this
.
arr
=
[]
this
.
scrollRightTop
=
0
this
.
current
=
0
//this.itemId = ''
//this.itemId = ''
//const itemId = this.list[this.tabIndex].items[0].items[0].fieldsId
//const itemId = this.list[this.tabIndex].items[0].items[0].fieldsId
//this.oldItemId = `item${itemId}`
//this.oldItemId = `item${itemId}`
this
.
$nextTick
(
async
()
=>
{
this
.
$nextTick
(
async
()
=>
{
await
this
.
swichMenu
(
0
)
;
await
this
.
swichMenu
(
0
)
})
;
})
}
}
},
},
// 下一步弹窗处理
// 下一步弹窗处理
nextStep
()
{
nextStep
()
{
this
.
pass
=
this
.
checkCompleteItem
();
if
(
this
.
readOnly
)
{
if
(
this
.
tabIndex
===
this
.
list
.
length
-
1
)
{
uni
.
navigateBack
()
}
else
{
this
.
nextTab
()
}
return
}
this
.
pass
=
this
.
checkCompleteItem
()
const
name
=
this
.
list
[
this
.
tabIndex
].
panelFieldsName
;
const
name
=
this
.
list
[
this
.
tabIndex
].
panelFieldsName
const
type
=
const
type
=
name
===
"partnerInspectItem"
name
===
'partnerInspectItem'
?
this
.
form
.
inspectConclusionType
?
this
.
form
.
inspectConclusionType
:
this
.
form
.
constructionConclusionType
;
:
this
.
form
.
constructionConclusionType
const
submit
=
this
.
tabIndex
===
this
.
list
.
length
-
1
;
const
submit
=
this
.
tabIndex
===
this
.
list
.
length
-
1
const
result
=
actions
(
name
,
this
.
pass
,
type
,
submit
)
;
const
result
=
actions
(
name
,
this
.
pass
,
type
,
submit
)
this
.
completeCheck
.
status
=
true
;
this
.
completeCheck
.
status
=
true
this
.
completeCheck
.
confirmText
=
result
.
confirmText
;
this
.
completeCheck
.
confirmText
=
result
.
confirmText
this
.
completeCheck
.
action
=
result
.
action
;
this
.
completeCheck
.
action
=
result
.
action
this
.
completeCheck
.
cancelText
=
result
.
cancelText
||
""
;
this
.
completeCheck
.
cancelText
=
result
.
cancelText
||
''
this
.
completeCheck
.
cancelAction
=
result
.
cancelAction
||
""
;
this
.
completeCheck
.
cancelAction
=
result
.
cancelAction
||
''
},
},
// 下一步数据保存
// 下一步数据保存
nextStepSaveData
()
{
nextStepSaveData
()
{
...
@@ -819,274 +913,274 @@ export default {
...
@@ -819,274 +913,274 @@ export default {
maintainFields
:
this
.
handleSaveData
(),
maintainFields
:
this
.
handleSaveData
(),
currentStep
:
this
.
list
[
this
.
tabIndex
].
panelFieldsName
,
currentStep
:
this
.
list
[
this
.
tabIndex
].
panelFieldsName
,
nextStep
:
this
.
list
[
this
.
tabIndex
+
1
].
panelFieldsName
,
nextStep
:
this
.
list
[
this
.
tabIndex
+
1
].
panelFieldsName
,
}
;
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中"
,
title
:
'加载中'
,
})
;
})
return
this
.
$u
.
api
.
completeNextStep
(
params
,
this
.
orderId
).
then
((
res
)
=>
{
return
this
.
$u
.
api
.
completeNextStep
(
params
,
this
.
orderId
).
then
((
res
)
=>
{
uni
.
hideLoading
()
;
uni
.
hideLoading
()
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
return
Promise
.
resolve
(
true
)
;
return
Promise
.
resolve
(
true
)
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
||
res
.
data
,
title
:
res
.
message
||
res
.
data
,
type
:
"error"
,
type
:
'error'
,
})
;
})
return
Promise
.
resolve
(
false
)
;
return
Promise
.
resolve
(
false
)
}
}
})
;
})
},
},
locationCompleteItem
(
panelIndex
,
groupIndex
,
eleIndex
)
{
locationCompleteItem
(
panelIndex
,
groupIndex
,
eleIndex
)
{
// 页面定位到某一项
// 页面定位到某一项
this
.
tabIndex
=
panelIndex
;
this
.
tabIndex
=
panelIndex
this
.
current
=
groupIndex
;
this
.
current
=
groupIndex
this
.
itemId
=
""
;
this
.
itemId
=
''
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
if
(
this
.
oldItemId
)
this
.
itemId
=
this
.
oldItemId
;
if
(
this
.
oldItemId
)
this
.
itemId
=
this
.
oldItemId
})
;
})
},
},
// 提交配件信息
// 提交配件信息
submitParts
()
{
submitParts
()
{
if
(
this
.
form
.
orderSpareParts
)
{
if
(
this
.
form
.
orderSpareParts
)
{
const
orderSpareParts
=
JSON
.
parse
(
this
.
form
.
orderSpareParts
)
;
const
orderSpareParts
=
JSON
.
parse
(
this
.
form
.
orderSpareParts
)
const
lists
=
orderSpareParts
.
filter
((
v
)
=>
v
.
quantity
>
0
)
;
const
lists
=
orderSpareParts
.
filter
((
v
)
=>
v
.
quantity
>
0
)
const
params
=
{
const
params
=
{
workOrderId
:
this
.
orderId
,
workOrderId
:
this
.
orderId
,
applyType
:
"10"
,
applyType
:
'10'
,
parts
:
lists
?
JSON
.
stringify
(
lists
)
:
""
,
parts
:
lists
?
JSON
.
stringify
(
lists
)
:
''
,
}
;
}
this
.
$u
.
api
.
createParts
(
params
).
then
((
res
)
=>
{
this
.
$u
.
api
.
createParts
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
,
title
:
res
.
data
,
type
:
"error"
,
type
:
'error'
,
})
;
})
}
}
})
;
})
}
}
},
},
// 提交订单
// 提交订单
orderFinish
()
{
orderFinish
()
{
const
param
=
this
.
handleSaveData
()
;
const
param
=
this
.
handleSaveData
()
// 完工事件埋点
// 完工事件埋点
getApp
().
track
(
"order_finish"
,
{
getApp
().
track
(
'order_finish'
,
{
id
:
this
.
vuex_user
.
id
,
id
:
this
.
vuex_user
.
id
,
mobile
:
this
.
vuex_user
.
mobile
,
mobile
:
this
.
vuex_user
.
mobile
,
orderId
:
Number
(
this
.
orderId
),
orderId
:
Number
(
this
.
orderId
),
})
;
})
this
.
$u
.
api
.
saveCompleteData
(
param
,
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
saveCompleteData
(
param
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
//完工项信息保存成功再次完工工单
//完工项信息保存成功再次完工工单
if
(
this
.
inGuaranteePeriod
===
"Y"
)
{
if
(
this
.
inGuaranteePeriod
===
'Y'
)
{
this
.
$u
.
api
.
inOrderFinish
(
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
inOrderFinish
(
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
submitParts
()
;
this
.
submitParts
()
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
"提交成功"
,
title
:
'提交成功'
,
type
:
"success"
,
type
:
'success'
,
callback
:
()
=>
{
callback
:
()
=>
{
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
"/pages/index/order?type=3"
,
url
:
'/pages/index/order?type=3'
,
})
;
})
},
},
})
;
})
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
,
title
:
res
.
data
,
type
:
"error"
,
type
:
'error'
,
})
;
})
}
}
})
;
})
}
else
{
}
else
{
this
.
$u
.
api
this
.
$u
.
api
.
outOrderFinish
({
customerPayType
:
"CASH"
},
this
.
orderId
)
.
outOrderFinish
({
customerPayType
:
'CASH'
},
this
.
orderId
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
"提交成功"
,
title
:
'提交成功'
,
type
:
"success"
,
type
:
'success'
,
callback
:
()
=>
{
callback
:
()
=>
{
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
"/pages/index/order?type=3"
,
url
:
'/pages/index/order?type=3'
,
})
;
})
},
},
})
;
})
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
,
title
:
res
.
data
,
type
:
"error"
,
type
:
'error'
,
})
;
})
}
}
})
;
})
}
}
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
,
title
:
res
.
data
,
type
:
"error"
,
type
:
'error'
,
})
;
})
}
}
})
;
})
},
},
calMaterialCraftListAmount
(
arr
)
{
calMaterialCraftListAmount
(
arr
)
{
let
amount
=
0
;
let
amount
=
0
if
(
arr
)
{
if
(
arr
)
{
arr
.
forEach
((
item
)
=>
{
arr
.
forEach
((
item
)
=>
{
let
useLength
=
let
useLength
=
(
item
.
hasOwnProperty
(
"useLength"
)
&&
Number
(
item
.
useLength
))
||
0
;
(
item
.
hasOwnProperty
(
'useLength'
)
&&
Number
(
item
.
useLength
))
||
0
let
freeLength
=
let
freeLength
=
(
item
.
hasOwnProperty
(
"freeLength"
)
&&
Number
(
item
.
freeLength
))
||
0
;
(
item
.
hasOwnProperty
(
'freeLength'
)
&&
Number
(
item
.
freeLength
))
||
0
let
unitAmt
=
let
unitAmt
=
(
item
.
hasOwnProperty
(
"unitAmt"
)
&&
Number
(
item
.
unitAmt
))
||
0
;
(
item
.
hasOwnProperty
(
'unitAmt'
)
&&
Number
(
item
.
unitAmt
))
||
0
amount
+=
Math
.
max
(
useLength
-
freeLength
,
0
)
*
unitAmt
;
amount
+=
Math
.
max
(
useLength
-
freeLength
,
0
)
*
unitAmt
if
(
item
.
hasOwnProperty
(
"extraAmt"
)
&&
Number
(
item
.
extraAmt
))
{
if
(
item
.
hasOwnProperty
(
'extraAmt'
)
&&
Number
(
item
.
extraAmt
))
{
amount
+=
Number
(
item
.
extraAmt
)
;
amount
+=
Number
(
item
.
extraAmt
)
}
}
})
;
})
}
}
return
amount
;
return
amount
},
},
setData
(
data
)
{
setData
(
data
)
{
// 通过页面设置数据
// 通过页面设置数据
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
this
.
$set
(
this
.
form
,
key
,
data
[
key
])
;
this
.
$set
(
this
.
form
,
key
,
data
[
key
])
})
;
})
// 更新预计超出金额
// 更新预计超出金额
let
amount
=
0
;
let
amount
=
0
amount
+=
this
.
calMaterialCraftListAmount
(
this
.
form
.
materialList
)
;
amount
+=
this
.
calMaterialCraftListAmount
(
this
.
form
.
materialList
)
amount
+=
this
.
calMaterialCraftListAmount
(
this
.
form
.
craftList
)
;
amount
+=
this
.
calMaterialCraftListAmount
(
this
.
form
.
craftList
)
this
.
$set
(
this
.
form
,
"overAmount"
,
amount
||
0
);
this
.
$set
(
this
.
form
,
'overAmount'
,
amount
||
0
)
},
},
// 字段的值更新
// 字段的值更新
fieldValueChange
(
data
)
{
fieldValueChange
(
data
)
{
const
groupItem
=
this
.
list
[
this
.
tabIndex
].
items
[
data
.
groupIndex
]
;
const
groupItem
=
this
.
list
[
this
.
tabIndex
].
items
[
data
.
groupIndex
]
let
innerItem
;
let
innerItem
if
(
groupItem
.
items
)
{
if
(
groupItem
.
items
)
{
innerItem
=
groupItem
.
items
[
data
.
itemIndex
]
;
innerItem
=
groupItem
.
items
[
data
.
itemIndex
]
}
}
if
(
innerItem
.
fieldsType
===
"multiInput"
)
{
if
(
innerItem
.
fieldsType
===
'multiInput'
)
{
// 多个输入框的值触发
// 多个输入框的值触发
let
key
=
Object
.
keys
(
data
.
value
)[
0
]
;
let
key
=
Object
.
keys
(
data
.
value
)[
0
]
this
.
form
[
key
]
=
data
.
value
[
key
]
;
this
.
form
[
key
]
=
data
.
value
[
key
]
}
else
{
}
else
{
this
.
$set
(
this
.
form
,
innerItem
.
fieldsName
,
data
.
value
)
;
this
.
$set
(
this
.
form
,
innerItem
.
fieldsName
,
data
.
value
)
}
}
if
(
innerItem
.
fieldsName
===
"paymentMethodsType"
)
{
if
(
innerItem
.
fieldsName
===
'paymentMethodsType'
)
{
// 选不需要收款的时候,收款金额修改为非必选
// 选不需要收款的时候,收款金额修改为非必选
const
row
=
groupItem
.
items
.
find
((
v
)
=>
v
.
fieldsName
===
"actualPaid"
);
const
row
=
groupItem
.
items
.
find
((
v
)
=>
v
.
fieldsName
===
'actualPaid'
)
row
.
required
=
data
.
value
!=
"03"
;
row
.
required
=
data
.
value
!=
'03'
}
}
if
(
if
(
innerItem
.
fieldsName
===
"pipe"
||
innerItem
.
fieldsName
===
'pipe'
||
innerItem
.
fieldsName
===
"pipeUseLength"
innerItem
.
fieldsName
===
'pipeUseLength'
)
{
)
{
// 申请费用计算
// 申请费用计算
this
.
calcMoney
()
;
this
.
calcMoney
()
}
}
},
},
// 申请费用计算
// 申请费用计算
calcMoney
()
{
calcMoney
()
{
const
price
=
parseInt
(
this
.
form
.
pipe
)
||
0
;
const
price
=
parseInt
(
this
.
form
.
pipe
)
||
0
const
pipeUseLength
=
parseFloat
(
this
.
form
.
pipeUseLength
)
||
0
;
const
pipeUseLength
=
parseFloat
(
this
.
form
.
pipeUseLength
)
||
0
if
(
price
&&
pipeUseLength
)
{
if
(
price
&&
pipeUseLength
)
{
const
money
=
(
price
*
pipeUseLength
).
toFixed
(
2
)
;
const
money
=
(
price
*
pipeUseLength
).
toFixed
(
2
)
this
.
$set
(
this
.
form
,
"pipeAmount"
,
money
);
this
.
$set
(
this
.
form
,
'pipeAmount'
,
money
)
}
else
{
}
else
{
this
.
$set
(
this
.
form
,
"pipeAmount"
,
0
);
this
.
$set
(
this
.
form
,
'pipeAmount'
,
0
)
}
}
},
},
// ------------------------- 以下方法为上传组件相关 -------------------------
// ------------------------- 以下方法为上传组件相关 -------------------------
// 弹出上传选项
// 弹出上传选项
selectUpload
(
item
,
groupIndex
,
itemIndex
)
{
selectUpload
(
item
,
groupIndex
,
itemIndex
)
{
const
imgList
=
const
imgList
=
this
.
$refs
[
`fileChild
${
groupIndex
}${
itemIndex
}
`
][
0
]
this
.
$refs
[
`fileChild
${
groupIndex
}${
itemIndex
}
`
][
0
].
imgList
;
.
imgList
if
(
imgList
.
length
===
10
)
{
if
(
imgList
.
length
===
10
)
{
return
this
.
$refs
.
uToast
.
show
({
return
this
.
$refs
.
uToast
.
show
({
title
:
"图片已超出最大数量"
,
title
:
'图片已超出最大数量'
,
type
:
"error"
,
type
:
'error'
,
})
;
})
}
}
this
.
photoItem
=
{
this
.
photoItem
=
{
...
JSON
.
parse
(
item
),
...
JSON
.
parse
(
item
),
groupIndex
,
groupIndex
,
itemIndex
,
itemIndex
,
}
;
}
// 弹窗展示
// 弹窗展示
this
.
maskShow
=
true
;
this
.
maskShow
=
true
},
},
// 区分上传动作
// 区分上传动作
uploadSelect
(
index
)
{
uploadSelect
(
index
)
{
if
(
index
===
0
)
{
if
(
index
===
0
)
{
this
.
uploadFile
(
"photo"
);
this
.
uploadFile
(
'photo'
)
}
else
{
}
else
{
this
.
uploadFile
()
;
this
.
uploadFile
()
}
}
},
},
// 拍照回调
// 拍照回调
async
closeTake
(
val
)
{
async
closeTake
(
val
)
{
if
(
val
&&
val
.
length
>
0
)
{
if
(
val
&&
val
.
length
>
0
)
{
const
files
=
val
.
map
((
v
)
=>
v
.
path
)
;
const
files
=
val
.
map
((
v
)
=>
v
.
path
)
const
value
=
await
this
.
saveToTask
(
files
)
;
const
value
=
await
this
.
saveToTask
(
files
)
this
.
$refs
[
this
.
$refs
[
`fileChild
${
this
.
photoItem
.
groupIndex
}${
this
.
photoItem
.
itemIndex
}
`
`fileChild
${
this
.
photoItem
.
groupIndex
}${
this
.
photoItem
.
itemIndex
}
`
][
0
].
setTmpValue
(
value
)
;
][
0
].
setTmpValue
(
value
)
}
}
this
.
takeStatus
=
false
;
this
.
takeStatus
=
false
},
},
// 上传图片
// 上传图片
async
uploadFile
(
type
)
{
async
uploadFile
(
type
)
{
const
self
=
this
;
const
self
=
this
if
(
type
&&
type
===
"photo"
)
{
if
(
type
&&
type
===
'photo'
)
{
// 直接打开相册
// 直接打开相册
let
options
=
{
let
options
=
{
sourceType
:
[
"album"
],
//['album', 'camera']
sourceType
:
[
'album'
],
//['album', 'camera']
count
:
3
,
count
:
3
,
sizeType
:
[
"compressed"
],
sizeType
:
[
'compressed'
],
}
;
}
const
value
=
await
this
.
chooseImg
(
options
)
;
const
value
=
await
this
.
chooseImg
(
options
)
self
.
$refs
[
self
.
$refs
[
`fileChild
${
self
.
photoItem
.
groupIndex
}${
self
.
photoItem
.
itemIndex
}
`
`fileChild
${
self
.
photoItem
.
groupIndex
}${
self
.
photoItem
.
itemIndex
}
`
][
0
].
setTmpValue
(
value
)
;
][
0
].
setTmpValue
(
value
)
return
;
return
}
}
// 使用拍照工具拍摄
// 使用拍照工具拍摄
this
.
photograph
()
;
this
.
photograph
()
this
.
getWatermark
()
;
this
.
getWatermark
()
},
},
// 获取拍照规范
// 获取拍照规范
photograph
()
{
photograph
()
{
let
self
=
this
;
let
self
=
this
let
param
=
{
let
param
=
{
partnerCompanyId
:
this
.
partnerCompanyId
||
""
,
partnerCompanyId
:
this
.
partnerCompanyId
||
''
,
categoryId
:
this
.
categoryId
,
categoryId
:
this
.
categoryId
,
brandId
:
this
.
brandId
||
""
,
brandId
:
this
.
brandId
||
''
,
fieldName
:
this
.
photoItem
.
fieldsName
,
fieldName
:
this
.
photoItem
.
fieldsName
,
}
;
}
this
.
$u
.
api
.
orderStandardItem
(
param
).
then
((
res
)
=>
{
this
.
$u
.
api
.
orderStandardItem
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
&&
res
.
data
.
length
>
0
)
{
if
(
res
.
code
==
200
&&
res
.
data
.
length
>
0
)
{
self
.
currentItemDate
=
res
.
data
[
0
]
;
self
.
currentItemDate
=
res
.
data
[
0
]
}
else
{
}
else
{
console
.
log
(
"获取完工项的拍照标准异常"
,
res
.
data
.
message
);
console
.
log
(
'获取完工项的拍照标准异常'
,
res
.
data
.
message
)
}
}
self
.
takeStatus
=
true
;
self
.
takeStatus
=
true
})
;
})
},
},
// 获取水印
// 获取水印
getWatermark
()
{
getWatermark
()
{
if
(
getApp
().
globalData
.
photo
.
waterSetting
)
{
if
(
getApp
().
globalData
.
photo
.
waterSetting
)
{
return
;
return
}
}
var
data
=
{
partnerCompanyId
:
this
.
partnerCompanyId
||
""
};
var
data
=
{
partnerCompanyId
:
this
.
partnerCompanyId
||
''
}
this
.
$u
.
api
.
getWatermark
(
data
).
then
((
res
)
=>
{
this
.
$u
.
api
.
getWatermark
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
getApp
().
globalData
.
photo
.
waterSetting
=
res
.
data
;
getApp
().
globalData
.
photo
.
waterSetting
=
res
.
data
}
else
{
}
else
{
console
.
log
(
"获取水印备注异常"
,
res
.
data
.
message
);
console
.
log
(
'获取水印备注异常'
,
res
.
data
.
message
)
}
}
})
;
})
},
},
// ------------------------- 以上方法为上传组件相关 -------------------------
// ------------------------- 以上方法为上传组件相关 -------------------------
...
@@ -1094,77 +1188,77 @@ export default {
...
@@ -1094,77 +1188,77 @@ export default {
// 点击左边的栏目切换
// 点击左边的栏目切换
async
swichMenu
(
index
)
{
async
swichMenu
(
index
)
{
if
(
this
.
arr
.
length
==
0
)
{
if
(
this
.
arr
.
length
==
0
)
{
await
this
.
getMenuItemTop
()
;
await
this
.
getMenuItemTop
()
}
}
// if (index == this.current) return;
// if (index == this.current) return;
this
.
scrollRightTop
=
this
.
oldScrollTop
;
this
.
scrollRightTop
=
this
.
oldScrollTop
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// 没有指定滚动到某一小项,就滚动到大的项
// 没有指定滚动到某一小项,就滚动到大的项
this
.
scrollRightTop
=
this
.
arr
[
index
]
;
this
.
scrollRightTop
=
this
.
arr
[
index
]
this
.
current
=
index
;
this
.
current
=
index
},
100
)
;
},
100
)
})
;
})
},
},
// 获取右边菜单每个item到顶部的距离
// 获取右边菜单每个item到顶部的距离
getMenuItemTop
()
{
getMenuItemTop
()
{
new
Promise
((
resolve
)
=>
{
new
Promise
((
resolve
)
=>
{
let
selectorQuery
=
uni
.
createSelectorQuery
()
;
let
selectorQuery
=
uni
.
createSelectorQuery
()
selectorQuery
selectorQuery
.
selectAll
(
".class-item"
)
.
selectAll
(
'.class-item'
)
.
boundingClientRect
((
rects
)
=>
{
.
boundingClientRect
((
rects
)
=>
{
// 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行
// 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行
if
(
!
rects
.
length
)
{
if
(
!
rects
.
length
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getMenuItemTop
()
;
this
.
getMenuItemTop
()
},
10
)
;
},
10
)
return
;
return
}
}
rects
.
forEach
((
rect
)
=>
{
rects
.
forEach
((
rect
)
=>
{
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
this
.
arr
.
push
(
rect
.
top
-
rects
[
0
].
top
)
;
this
.
arr
.
push
(
rect
.
top
-
rects
[
0
].
top
)
resolve
()
;
resolve
()
})
;
})
})
})
.
exec
()
;
.
exec
()
})
;
})
},
},
// 右边菜单滚动
// 右边菜单滚动
async
rightScroll
(
e
)
{
async
rightScroll
(
e
)
{
this
.
oldScrollTop
=
e
.
detail
.
scrollTop
;
this
.
oldScrollTop
=
e
.
detail
.
scrollTop
if
(
this
.
arr
.
length
==
0
)
{
if
(
this
.
arr
.
length
==
0
)
{
await
this
.
getMenuItemTop
()
;
await
this
.
getMenuItemTop
()
}
}
if
(
this
.
timer
)
return
;
if
(
this
.
timer
)
return
this
.
timer
=
setTimeout
(()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
// 节流
// 节流
this
.
timer
=
null
;
this
.
timer
=
null
// scrollHeight为右边菜单垂直中点位置
// scrollHeight为右边菜单垂直中点位置
let
scrollHeight
=
e
.
detail
.
scrollTop
;
let
scrollHeight
=
e
.
detail
.
scrollTop
for
(
let
i
=
0
;
i
<
this
.
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
arr
.
length
;
i
++
)
{
let
height1
=
this
.
arr
[
i
]
;
let
height1
=
this
.
arr
[
i
]
let
height2
=
this
.
arr
[
i
+
1
]
;
let
height2
=
this
.
arr
[
i
+
1
]
// 如果不存在height2,意味着数据循环已经到了最后一个,设置左边菜单为最后一项即可
// 如果不存在height2,意味着数据循环已经到了最后一个,设置左边菜单为最后一项即可
if
(
!
height2
||
(
scrollHeight
>=
height1
&&
scrollHeight
<
height2
))
{
if
(
!
height2
||
(
scrollHeight
>=
height1
&&
scrollHeight
<
height2
))
{
this
.
current
=
i
;
this
.
current
=
i
return
;
return
}
}
}
}
},
10
)
;
},
10
)
},
},
handleTouchstart
()
{
handleTouchstart
()
{
// 防止输入光标滚动出现错乱
// 防止输入光标滚动出现错乱
uni
.
hideKeyboard
()
;
uni
.
hideKeyboard
()
},
},
// 返回上一页更新订单状态
// 返回上一页更新订单状态
backGo
()
{
backGo
()
{
const
pages
=
getCurrentPages
()
;
const
pages
=
getCurrentPages
()
const
beforePage
=
pages
[
pages
.
length
-
2
]
;
const
beforePage
=
pages
[
pages
.
length
-
2
]
if
(
beforePage
.
$vm
.
loadOrderDetail
)
beforePage
.
$vm
.
loadOrderDetail
()
;
if
(
beforePage
.
$vm
.
loadOrderDetail
)
beforePage
.
$vm
.
loadOrderDetail
()
uni
.
navigateBack
()
;
uni
.
navigateBack
()
},
},
},
},
}
;
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -1362,6 +1456,10 @@ export default {
...
@@ -1362,6 +1456,10 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
}
}
.read-only
{
justify-content
:
flex-end
;
padding-right
:
30rpx
;
}
.btn-save
{
.btn-save
{
color
:
#ffffff
;
color
:
#ffffff
;
...
...
src/pages/order/detail.vue
View file @
1bf70585
...
@@ -642,9 +642,11 @@
...
@@ -642,9 +642,11 @@
this
.
clickFeedback
()
this
.
clickFeedback
()
break
break
case
2
:
case
2
:
getApp
().
track
(
"order_errorSign"
,
{
orderId
:
this
.
orderId
})
this
.
take
()
this
.
take
()
break
break
case
3
:
case
3
:
getApp
().
track
(
"order_scenePhotoClick"
,
{
orderId
:
this
.
orderId
})
this
.
scenePhotoClick
()
this
.
scenePhotoClick
()
break
break
case
4
:
case
4
:
...
@@ -763,6 +765,10 @@
...
@@ -763,6 +765,10 @@
},
},
// 去业务材料页面
// 去业务材料页面
handleClickFile
()
{
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
})
this
.
$u
.
route
({
url
:
'pages/order/document'
+
'?partnerCompanyId='
+
this
.
order
.
partnerCompanyId
+
'&brandId='
+
this
.
order
.
lianbaoBrandId
})
},
},
trackOrder
()
{
trackOrder
()
{
...
@@ -788,6 +794,10 @@
...
@@ -788,6 +794,10 @@
this
.
centerBtnDisabled
=
true
this
.
centerBtnDisabled
=
true
},
},
clickFeedback
(){
clickFeedback
(){
getApp
().
track
(
"order_clickFeedback"
,
{
orderId
:
this
.
order
.
orderId
,
categoryId
:
this
.
order
.
categoryId
})
// 过程反馈
// 过程反馈
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/order/feedback?orderId='
+
this
.
order
.
orderId
+
'&categoryId='
+
this
.
order
.
categoryId
+
'&showGY='
+
(
this
.
bottomButtonText
!=
'预约'
?
'1'
:
'0'
)
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
<
template
>
<
template
>
<view
:class=
"['doc-wrap',
{'order-file': orderFile}]">
<view
:class=
"['doc-wrap',
{ 'order-file': orderFile }]">
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"安装文件"
titleColor=
"#333333"
<u-navbar
:border-bottom=
"false"
title-bold
></u-navbar>
back-icon-color=
"#333333"
<template
v-if=
"!orderFile"
>
background=
"#FFFFFF"
<!-- 合作商、品牌标签列表 -->
title=
"安装文件"
<view
v-for=
"(item, key) in labels"
:key=
"key"
class=
"label-list"
>
titleColor=
"#333333"
<view
class=
"label-title"
>
:border-bottom=
"false"
<!-- 合作商或品牌 -->
title-bold
<view>
{{
items
[
key
]
}}
</view>
></u-navbar>
<!-- 跳转到所有标签页面的更多按钮 -->
<template
v-if=
"!orderFile"
>
<view
class=
"label-file-right"
@
click=
"handleMore(key)"
v-if=
"item.length > 3"
>
<!-- 合作商、品牌标签列表 -->
<text
class=
"label-right-text"
>
更多
</text>
<view
v-for=
"(item, key) in labels"
:key=
"key"
class=
"label-list"
>
<u-icon
name=
"arrow-right"
></u-icon>
<view
class=
"label-title"
>
</view>
<!-- 合作商或品牌 -->
</view>
<view>
{{
items
[
key
]
}}
</view>
<scroll-view
scroll-x=
"true"
class=
"label-content"
:scroll-into-view=
"scrollId[key]"
>
<!-- 跳转到所有标签页面的更多按钮 -->
<view
v-for=
"(label, ind) in item"
:key=
"ind"
class=
"label-item"
:id=
"idText + label.id"
>
<view
<!-- 选中为蓝底,非选中状态为灰底 -->
class=
"label-file-right"
<view
:class=
"['label-normal',
{'selected': label.id == selected[key].id}]" @click="handleClick(key, label)">
@
click=
"handleMore(key)"
<text
class=
"label-text"
>
{{
label
.
name
}}
</text>
v-if=
"item.length > 3"
</view>
>
</view>
<text
class=
"label-right-text"
>
更多
</text>
<!-- 标签加载中 -->
<u-icon
name=
"arrow-right"
></u-icon>
<view
class=
"tag-loading-view"
v-if=
"tapLoading[key]"
>
</view>
<u-loading
mode=
"flower"
></u-loading>
</view>
</view>
<scroll-view
<!-- 无供应商、无品牌 -->
scroll-x=
"true"
<view
class=
"tag-tip-view"
v-else-if=
"item.length
<
=
0
"
>
{{
'暂无'
+
items
[
key
]
}}
</view>
class=
"label-content"
</scroll-view>
:scroll-into-view=
"scrollId[key]"
</view>
>
</
template
>
<view
<view
class=
"file-title"
>
文件列表
</view>
v-for=
"(label, ind) in item"
<view
class=
"file-list"
>
:key=
"ind"
<!-- 文件列表 -->
class=
"label-item"
<view
class=
"file-row"
v-for=
"(item, index) in list"
:key=
"index"
>
:id=
"idText + label.id"
<view
class=
"file-left"
>
>
<view
class=
"file-name"
>
<!-- 选中为蓝底,非选中状态为灰底 -->
<u-icon
class=
"item-icon"
name=
"doc"
custom-prefix=
"wxh"
size=
"52"
color=
"#2272FF"
></u-icon>
<view
<!-- 文件后缀的首字母,大写 -->
:class=
"[
<view
class=
"file-format-text"
>
{{formatText(item.name)}}
</view>
'label-normal',
</view>
{ selected: label.id == selected[key].id },
]"
<text>
{{item.name}}
</text>
@click="handleClick(key, label)"
</view>
>
<!-- 文件操作按钮 -->
<text
class=
"label-text u-line-2"
>
{{
label
.
name
}}
</text>
<view
class=
"file-right"
>
</view>
<u-button
:custom-style=
"shareStyle"
shape=
"circle"
@
click=
"handleShare(item)"
>
分享
</u-button>
</view>
<u-button
:custom-style=
"previewStyle"
shape=
"circle"
@
click=
"handlePreview(item)"
>
查看
</u-button>
<!-- 标签加载中 -->
</view>
<view
class=
"tag-loading-view"
v-if=
"tapLoading[key]"
>
</view>
<u-loading
mode=
"flower"
></u-loading>
<!-- 如果是加载中,就显示转圈;如果加载完成 -->
</view>
<view
class=
"loading-view"
v-if=
"loading"
>
<!-- 无供应商、无品牌 -->
<u-loading
mode=
"flower"
></u-loading>
<view
class=
"tag-tip-view"
v-else-if=
"item.length
<
=
0
"
>
{{
</view>
'暂无'
+
items
[
key
]
<!-- 加载完成之后,没有数据的提示:未选择品牌提示、无文件提示 -->
}}
</view>
<view
class=
"tip-view"
v-else-if=
"list.length <= 0"
>
{{tipText}}
</view>
</scroll-view>
</view>
</view>
</view>
</
template
>
<view
class=
"file-title"
>
文件列表
</view>
<view
class=
"file-list"
>
<!-- 文件列表 -->
<view
class=
"file-row"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"file-left"
>
<view
class=
"file-name"
>
<u-icon
class=
"item-icon"
name=
"doc"
custom-prefix=
"wxh"
size=
"52"
color=
"#2272FF"
></u-icon>
<!-- 文件后缀的首字母,大写 -->
<view
class=
"file-format-text"
>
{{ formatText(item.name) }}
</view>
</view>
<text>
{{ item.name }}
</text>
</view>
<!-- 文件操作按钮 -->
<view
class=
"file-right"
>
<u-button
:custom-style=
"shareStyle"
shape=
"circle"
@
click=
"handleShare(item)"
>
分享
</u-button
>
<u-button
:custom-style=
"previewStyle"
shape=
"circle"
@
click=
"handlePreview(item)"
>
查看
</u-button
>
</view>
</view>
<!-- 如果是加载中,就显示转圈;如果加载完成 -->
<view
class=
"loading-view"
v-if=
"loading"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<!-- 加载完成之后,没有数据的提示:未选择品牌提示、无文件提示 -->
<view
class=
"tip-view"
v-else-if=
"list.length <= 0"
>
{{ tipText }}
</view>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[],
// 文件列表
list
:
[],
// 文件列表
firstLoad
:
true
,
// 初次加载
firstLoad
:
true
,
// 初次加载
labels
:
{
// 标签列表
labels
:
{
'1'
:
[],
// 合作商标签列表
// 标签列表
'2'
:
[]
// 品牌标签列表
'1'
:
[],
// 合作商标签列表
},
'2'
:
[],
// 品牌标签列表
selected
:
{
// 选中的标签
},
'1'
:
{},
// 选中的合作商
selected
:
{
'2'
:
{}
// 选中的品牌
// 选中的标签
},
'1'
:
{},
// 选中的合作商
scrollId
:
{
'2'
:
{},
// 选中的品牌
'1'
:
''
,
// 选中的合作商view的id
},
'2'
:
''
// 选中的品牌view的id
scrollId
:
{
},
'1'
:
''
,
// 选中的合作商view的id
loading
:
false
,
// 文件列表加载中
'2'
:
''
,
// 选中的品牌view的id
tapLoading
:
{
},
'1'
:
true
,
// 合作商加载中
loading
:
false
,
// 文件列表加载中
'2'
:
true
// 品牌加载中
tapLoading
:
{
},
'1'
:
true
,
// 合作商加载中
orderFile
:
false
,
// 是否是订单详情进来
'2'
:
true
,
// 品牌加载中
fileList
:
{},
// 文件地址缓存 {url最后一段: tmpPath}
},
};
orderFile
:
false
,
// 是否是订单详情进来
},
fileList
:
{},
// 文件地址缓存 {url最后一段: tmpPath}
computed
:
{
}
// 合作商的key是'1',品牌的key是'2'
},
items
()
{
computed
:
{
return
{
// 合作商的key是'1',品牌的key是'2'
'1'
:
'合作商'
,
items
()
{
'2'
:
'品牌'
return
{
}
'1'
:
'合作商'
,
},
'2'
:
'品牌'
,
// 分享按钮风格
}
shareStyle
()
{
},
return
{
// 分享按钮风格
marginRight
:
'10rpx'
,
shareStyle
()
{
width
:
'100rpx'
,
return
{
height
:
'52rpx'
,
marginRight
:
'10rpx'
,
background
:
'#FFFFFF'
,
width
:
'100rpx'
,
color
:
'#2272FF'
,
height
:
'52rpx'
,
fontSize
:
'24rpx'
,
background
:
'#FFFFFF'
,
fontWeight
:
'400'
,
color
:
'#2272FF'
,
lineHeight
:
'52rpx'
fontSize
:
'24rpx'
,
}
fontWeight
:
'400'
,
},
lineHeight
:
'52rpx'
,
// 查看按钮风格
}
previewStyle
()
{
},
return
{
// 查看按钮风格
width
:
'100rpx'
,
previewStyle
()
{
height
:
'52rpx'
,
return
{
background
:
'#2272FF'
,
width
:
'100rpx'
,
color
:
'#FFFFFF'
,
height
:
'52rpx'
,
fontSize
:
'24rpx'
,
background
:
'#2272FF'
,
fontWeight
:
'400'
,
color
:
'#FFFFFF'
,
lineHeight
:
'52rpx'
fontSize
:
'24rpx'
,
}
fontWeight
:
'400'
,
},
lineHeight
:
'52rpx'
,
// 文件列表文件图片
}
wenjianImage
()
{
},
return
process
.
uniEnv
.
qn_base_url
+
'wenjian-bk.png'
// 文件列表文件图片
},
wenjianImage
()
{
// 列表无数据的提示文字
return
process
.
uniEnv
.
qn_base_url
+
'wenjian-bk.png'
tipText
()
{
},
return
(
this
.
selected
[
'2'
].
name
||
this
.
orderFile
)
?
'暂无文件'
:
'请选择品牌'
// 列表无数据的提示文字
},
tipText
()
{
idText
()
{
return
this
.
selected
[
'2'
].
name
||
this
.
orderFile
return
'item'
?
'暂无文件'
}
:
'请选择品牌'
},
},
onLoad
(
e
)
{
idText
()
{
if
(
e
&&
e
.
partnerCompanyId
&&
e
.
brandId
)
{
// 订单详情进来获取指定合作商和品牌的文件资料
return
'item'
this
.
orderFile
=
true
},
this
.
loadFileList
(
e
.
partnerCompanyId
,
e
.
brandId
)
},
}
else
{
// 获取所有文件资料
onLoad
(
e
)
{
this
.
loadFileLabel
(
'1'
)
if
(
e
&&
e
.
partnerCompanyId
&&
e
.
brandId
)
{
}
// 订单详情进来获取指定合作商和品牌的文件资料
this
.
fileList
=
getApp
().
globalData
.
fileList
||
{}
// 文件地址缓存 {url最后一段: tmpPath}
this
.
orderFile
=
true
},
this
.
loadFileList
(
e
.
partnerCompanyId
,
e
.
brandId
)
onShow
()
{
}
else
{
// 从标签列表页面返回,获取选中的标签
// 获取所有文件资料
let
pages
=
getCurrentPages
();
this
.
loadFileLabel
(
'1'
)
let
page
=
pages
[
pages
.
length
-
1
];
}
let
selectedItem
=
page
.
selectedItem
;
this
.
fileList
=
getApp
().
globalData
.
fileList
||
{}
// 文件地址缓存 {url最后一段: tmpPath}
if
(
selectedItem
)
{
},
page
.
selectedItem
=
null
onShow
()
{
for
(
var
item
of
this
.
labels
[
selectedItem
.
type
])
{
// 从标签列表页面返回,获取选中的标签
if
(
item
.
id
==
selectedItem
.
id
)
{
let
pages
=
getCurrentPages
()
this
.
handleClick
(
selectedItem
.
type
,
item
)
let
page
=
pages
[
pages
.
length
-
1
]
this
.
scrollId
[
selectedItem
.
type
]
=
this
.
idText
+
selectedItem
.
id
let
selectedItem
=
page
.
selectedItem
return
if
(
selectedItem
)
{
}
page
.
selectedItem
=
null
}
for
(
var
item
of
this
.
labels
[
selectedItem
.
type
])
{
}
if
(
item
.
id
==
selectedItem
.
id
)
{
},
this
.
handleClick
(
selectedItem
.
type
,
item
)
methods
:
{
this
.
scrollId
[
selectedItem
.
type
]
=
this
.
idText
+
selectedItem
.
id
// 选中标签
return
handleClick
(
key
,
label
)
{
}
this
.
selected
[
key
]
=
label
}
this
.
scrollId
[
key
]
=
''
}
if
(
key
==
'1'
)
{
// 合作商
},
this
.
selected
[
'2'
]
=
{}
// 清空选中品牌标签
methods
:
{
this
.
list
=
[]
// 清空文件列表
// 选中标签
this
.
loadFileLabel
(
'2'
,
label
.
id
)
// 获取新合作商对应品牌
handleClick
(
key
,
label
)
{
}
else
{
// 品牌
this
.
selected
[
key
]
=
label
this
.
loadFileList
(
this
.
selected
[
'1'
].
id
,
this
.
selected
[
'2'
].
id
)
// 获取文件列表
this
.
scrollId
[
key
]
=
''
}
if
(
key
==
'1'
)
{
},
// 合作商
// 跳转到所有标签
this
.
selected
[
'2'
]
=
{}
// 清空选中品牌标签
handleMore
(
key
)
{
this
.
list
=
[]
// 清空文件列表
var
partnerCompanyId
=
''
// 合作商id
this
.
loadFileLabel
(
'2'
,
label
.
id
)
// 获取新合作商对应品牌
if
(
key
==
'2'
)
{
// 点击品牌的更多,跳转要传合作商id
}
else
{
partnerCompanyId
=
this
.
selected
[
'1'
].
id
// 品牌
}
this
.
loadFileList
(
this
.
selected
[
'1'
].
id
,
this
.
selected
[
'2'
].
id
)
// 获取文件列表
this
.
$u
.
route
({
url
:
'pages/order/document-tag'
+
'?partnerCompanyId='
+
partnerCompanyId
+
'&selectedId='
+
this
.
selected
[
key
].
id
})
}
},
},
// 点击了分享
// 跳转到所有标签
handleShare
(
item
)
{
handleMore
(
key
)
{
// 分享资料事件
var
partnerCompanyId
=
''
// 合作商id
getApp
().
track
(
'share_document'
,
{
if
(
key
==
'2'
)
{
id
:
this
.
vuex_user
.
id
,
// 点击品牌的更多,跳转要传合作商id
url
:
item
.
url
partnerCompanyId
=
this
.
selected
[
'1'
].
id
});
}
let
filePath
=
this
.
fileList
[(
item
.
url
||
''
).
split
(
'/'
).
pop
()]
this
.
$u
.
route
({
if
(
filePath
)
{
// 有下载记录
url
:
wx
.
shareFileMessage
({
// 如果用checkFile检查文件是否存在后再分享,shareFileMess报错:shareFileMessage:fail can only be invoked by user TAP gesture.
'pages/order/document-tag'
+
filePath
:
filePath
,
'?partnerCompanyId='
+
fileName
:
item
.
name
,
partnerCompanyId
+
success
()
{},
'&selectedId='
+
fail
:
(
error
)
=>
{
this
.
selected
[
key
].
id
,
console
.
log
(
error
)
})
if
(
error
.
errMsg
.
indexOf
(
'internal'
)
!=
-
1
)
{
// 文件不存在重新下载
},
this
.
downloadFile
(
item
.
url
,
(
result
)
=>
{
// 点击了分享
wx
.
shareFileMessage
({
handleShare
(
item
)
{
filePath
:
result
.
tempFilePath
,
// 分享资料事件
fileName
:
item
.
name
,
getApp
().
track
(
'share_document'
,
{
success
()
{},
id
:
this
.
vuex_user
.
id
,
fail
:
console
.
error
,
url
:
item
.
url
,
})
})
})
let
filePath
=
this
.
fileList
[(
item
.
url
||
''
).
split
(
'/'
).
pop
()]
}
if
(
filePath
)
{
},
// 有下载记录
})
wx
.
shareFileMessage
({
}
else
{
// 无下载记录
// 如果用checkFile检查文件是否存在后再分享,shareFileMess报错:shareFileMessage:fail can only be invoked by user TAP gesture.
this
.
downloadFile
(
item
.
url
,
(
res
)
=>
{
// 下载
filePath
:
filePath
,
wx
.
shareFileMessage
({
fileName
:
item
.
name
,
filePath
:
res
.
tempFilePath
,
success
()
{},
fileName
:
item
.
name
,
fail
:
(
error
)
=>
{
success
()
{},
console
.
log
(
error
)
fail
:
console
.
error
,
if
(
error
.
errMsg
.
indexOf
(
'internal'
)
!=
-
1
)
{
})
// 文件不存在重新下载
})
this
.
downloadFile
(
item
.
url
,
(
result
)
=>
{
}
wx
.
shareFileMessage
({
},
filePath
:
result
.
tempFilePath
,
// 点击了查看
fileName
:
item
.
name
,
handlePreview
(
item
)
{
success
()
{},
// 查看资料事件
fail
:
console
.
error
,
getApp
().
track
(
'preview_document'
,
{
})
id
:
this
.
vuex_user
.
id
,
})
url
:
item
.
url
}
});
},
let
filePath
=
this
.
fileList
[(
item
.
url
||
''
).
split
(
'/'
).
pop
()]
})
if
(
filePath
)
{
// 有下载记录
}
else
{
this
.
checkFile
(
filePath
,
(
res
)
=>
{
// 文件是否还存在
// 无下载记录
if
(
res
.
size
&&
res
.
size
>
0
)
{
// 存在,预览文件
this
.
downloadFile
(
item
.
url
,
(
res
)
=>
{
this
.
previewFile
(
filePath
)
// 下载
}
else
{
// 文件已经不存在, 下载
wx
.
shareFileMessage
({
this
.
downloadFile
(
item
.
url
,
(
result
)
=>
{
filePath
:
res
.
tempFilePath
,
this
.
previewFile
(
result
.
tempFilePath
)
fileName
:
item
.
name
,
})
success
()
{},
}
fail
:
console
.
error
,
})
})
}
else
{
// 无下载记录
})
this
.
downloadFile
(
item
.
url
,
(
res
)
=>
{
// 下载
}
this
.
previewFile
(
res
.
tempFilePath
)
},
})
// 点击了查看
}
handlePreview
(
item
)
{
},
// 查看资料事件
// 缓存文件是否存在
getApp
().
track
(
'preview_document'
,
{
checkFile
(
filePath
,
complete
)
{
id
:
this
.
vuex_user
.
id
,
uni
.
getFileInfo
({
url
:
item
.
url
,
filePath
:
filePath
,
})
complete
:
complete
let
filePath
=
this
.
fileList
[(
item
.
url
||
''
).
split
(
'/'
).
pop
()]
})
if
(
filePath
)
{
},
// 有下载记录
// 下载文件
this
.
checkFile
(
filePath
,
(
res
)
=>
{
downloadFile
(
url
,
block
)
{
// 文件是否还存在
uni
.
showLoading
({
if
(
res
.
size
&&
res
.
size
>
0
)
{
title
:
'加载中'
// 存在,预览文件
})
this
.
previewFile
(
filePath
)
uni
.
downloadFile
({
}
else
{
url
:
url
,
// 文件已经不存在, 下载
success
:
(
res
)
=>
{
this
.
downloadFile
(
item
.
url
,
(
result
)
=>
{
uni
.
hideLoading
()
this
.
previewFile
(
result
.
tempFilePath
)
this
.
fileList
[
url
.
split
(
'/'
).
pop
()]
=
res
.
tempFilePath
})
block
(
res
)
}
}
})
});
}
else
{
},
// 无下载记录
// 预览文件
this
.
downloadFile
(
item
.
url
,
(
res
)
=>
{
previewFile
(
filePath
)
{
// 下载
if
(
/
\.(
gif|jpg|jpeg|png|GIF|JPG|PNG
)
$/
.
test
(
filePath
))
{
// 查看图片
this
.
previewFile
(
res
.
tempFilePath
)
wx
.
previewImage
({
})
current
:
filePath
,
// 当前显示图片的http链接
}
urls
:
[
filePath
]
// 需要预览的图片http链接列表
},
})
// 缓存文件是否存在
}
else
{
// 查看文件
checkFile
(
filePath
,
complete
)
{
uni
.
openDocument
({
uni
.
getFileInfo
({
filePath
:
filePath
,
filePath
:
filePath
,
success
:
function
(
res
)
{
complete
:
complete
,
console
.
log
(
'打开文档成功'
);
})
}
},
});
// 下载文件
}
downloadFile
(
url
,
block
)
{
},
uni
.
showLoading
({
// 获取合作商或品牌列表
title
:
'加载中'
,
async
loadFileLabel
(
type
,
partnerCompanyId
)
{
})
this
.
tapLoading
[
type
]
=
true
uni
.
downloadFile
({
let
param
=
{
url
:
url
,
type
:
type
,
// 1:合作商标签,2:品牌标签
success
:
(
res
)
=>
{
}
uni
.
hideLoading
()
if
(
type
==
'2'
)
{
this
.
fileList
[
url
.
split
(
'/'
).
pop
()]
=
res
.
tempFilePath
param
.
partnerCompanyId
=
partnerCompanyId
// 合作商的标签id
block
(
res
)
}
},
let
res
=
await
this
.
$u
.
api
.
fileLabel
(
param
)
})
this
.
tapLoading
[
type
]
=
false
},
if
(
res
&&
res
.
code
==
200
)
{
// 预览文件
this
.
labels
[
type
]
=
res
.
data
||
[]
previewFile
(
filePath
)
{
if
(
/
\.(
gif|jpg|jpeg|png|GIF|JPG|PNG
)
$/
.
test
(
filePath
))
{
// this.labels[type] = [...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data] // 测试模拟多条数据
// 查看图片
wx
.
previewImage
({
// 初次进入页面,获取完合作商列表之后,接着获取第一个合作商的品牌列表
current
:
filePath
,
// 当前显示图片的http链接
if
(
this
.
firstLoad
&&
type
==
'1'
)
{
urls
:
[
filePath
],
// 需要预览的图片http链接列表
this
.
firstLoad
=
false
})
if
(
this
.
labels
[
type
].
length
>
0
)
{
}
else
{
this
.
selected
[
type
]
=
this
.
labels
[
type
][
0
]
// 查看文件
this
.
loadFileLabel
(
'2'
,
this
.
selected
[
type
].
id
)
uni
.
openDocument
({
}
filePath
:
filePath
,
}
success
:
function
(
res
)
{
}
console
.
log
(
'打开文档成功'
)
},
},
// 获取文件列表
})
async
loadFileList
(
partnerCompanyId
,
brandId
)
{
}
this
.
loading
=
true
},
let
res
=
await
this
.
$u
.
api
.
fileList
({
// 获取合作商或品牌列表
partnerCompanyId
:
partnerCompanyId
,
// 合作商标签
async
loadFileLabel
(
type
,
partnerCompanyId
)
{
brandId
:
brandId
// 品牌标签
this
.
tapLoading
[
type
]
=
true
})
let
param
=
{
this
.
loading
=
false
type
:
type
,
// 1:合作商标签,2:品牌标签
if
(
res
&&
res
.
code
==
200
)
{
}
this
.
list
=
res
.
data
||
[]
if
(
type
==
'2'
)
{
param
.
partnerCompanyId
=
partnerCompanyId
// 合作商的标签id
// this.list = [...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data] // 测试模拟多条数据
}
}
let
res
=
await
this
.
$u
.
api
.
fileLabel
(
param
)
},
this
.
tapLoading
[
type
]
=
false
// 文件后缀的首字母,大写
if
(
res
&&
res
.
code
==
200
)
{
formatText
(
name
)
{
this
.
labels
[
type
]
=
res
.
data
||
[]
let
arr
=
name
.
split
(
'.'
)
if
(
arr
.
length
>
1
)
{
// this.labels[type] = [...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data] // 测试模拟多条数据
let
item
=
arr
.
pop
()
return
item
.
substr
(
0
,
1
).
toUpperCase
()
// 初次进入页面,获取完合作商列表之后,接着获取第一个合作商的品牌列表
}
else
{
if
(
this
.
firstLoad
&&
type
==
'1'
)
{
return
'P'
this
.
firstLoad
=
false
}
if
(
this
.
labels
[
type
].
length
>
0
)
{
},
this
.
selected
[
type
]
=
this
.
labels
[
type
][
0
]
}
this
.
loadFileLabel
(
'2'
,
this
.
selected
[
type
].
id
)
};
}
}
}
},
// 获取文件列表
async
loadFileList
(
partnerCompanyId
,
brandId
)
{
this
.
loading
=
true
let
res
=
await
this
.
$u
.
api
.
fileList
({
partnerCompanyId
:
partnerCompanyId
,
// 合作商标签
brandId
:
brandId
,
// 品牌标签
})
this
.
loading
=
false
if
(
res
&&
res
.
code
==
200
)
{
this
.
list
=
res
.
data
||
[]
// this.list = [...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data] // 测试模拟多条数据
}
},
// 文件后缀的首字母,大写
formatText
(
name
)
{
let
arr
=
name
.
split
(
'.'
)
if
(
arr
.
length
>
1
)
{
let
item
=
arr
.
pop
()
return
item
.
substr
(
0
,
1
).
toUpperCase
()
}
else
{
return
'P'
}
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.doc-wrap
{
.doc-wrap
{
background-color
:
#F4F5F7
;
background-color
:
#f4f5f7
;
height
:
100vh
;
height
:
100vh
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
&
.order-file
{
background-color
:
#FFFFFF
;
}
.label-list
{
&
.order-file
{
padding
:
0
0
40rpx
30rpx
;
background-color
:
#ffffff
;
}
.label-title
{
.label-list
{
font-size
:
32rpx
;
padding
:
0
0
40rpx
30rpx
;
font-weight
:
bold
;
color
:
#333333
;
margin-bottom
:
30rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.label-file-right
{
.label-title
{
display
:
flex
;
font-size
:
32rpx
;
align-items
:
center
;
font-weight
:
bold
;
justify-content
:
flex-end
;
color
:
#333333
;
color
:
#2272FF
;
margin-bottom
:
30rpx
;
font-size
:
26rpx
;
display
:
flex
;
padding-right
:
30rpx
;
justify-content
:
space-between
;
align-items
:
center
;
.label-right-text
{
.label-file-right
{
font-weight
:
400
;
display
:
flex
;
}
align-items
:
center
;
}
justify-content
:
flex-end
;
}
color
:
#2272ff
;
font-size
:
26rpx
;
padding-right
:
30rpx
;
.label-content
{
.label-right-text
{
width
:
100%
;
font-weight
:
400
;
height
:
104rpx
;
}
white-space
:
nowrap
;
}
.label-item
{
}
overflow
:
hidden
;
padding-right
:
20rpx
;
flex-shrink
:
0
;
display
:
inline-block
;
.label-normal
{
height
:
104rpx
;
width
:
200rpx
;
font-size
:
26rpx
;
color
:
#666666
;
background-color
:
#FFFFFF
;
border-radius
:
8rpx
;
padding-left
:
20rpx
;
padding-right
:
20rpx
;
text-align
:
center
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.label-text
{
word-break
:break-all
;
white-space
:
normal
!
important
;
}
&
.selected
{
color
:
#FFFFFF
;
background-color
:
#2272FF
;
}
}
}
.tag-loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
20rpx
;
position
:
absolute
;
padding-right
:
30rpx
;
}
.tag-tip-view
{
color
:
#999999
;
width
:
100%
;
margin-top
:
30rpx
;
text-align
:
center
;
position
:
absolute
;
padding-right
:
30rpx
;
}
}
}
}
.file-title
{
.label-content
{
font-size
:
32rpx
;
width
:
100%
;
font-weight
:
bold
;
height
:
104rpx
;
color
:
#333333
;
white-space
:
nowrap
;
padding
:
20rpx
30rpx
;
.label-item
{
border-radius
:
32rpx
;
overflow
:
hidden
;
background-color
:
#FFFFFF
;
padding-right
:
20rpx
;
// margin-top: 10rpx;
flex-shrink
:
0
;
}
display
:
inline-block
;
.label-normal
{
height
:
104rpx
;
width
:
200rpx
;
font-size
:
26rpx
;
color
:
#666666
;
background-color
:
#ffffff
;
border-radius
:
8rpx
;
padding-left
:
20rpx
;
padding-right
:
20rpx
;
text-align
:
center
;
// display: flex;
// justify-content: center;
// align-items: center;
display
:
table
;
.label-text
{
word-break
:
break-all
;
white-space
:
normal
!
important
;
display
:
table-cell
;
vertical-align
:
middle
;
}
&
.selected
{
color
:
#ffffff
;
background-color
:
#2272ff
;
}
}
}
.tag-loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
20rpx
;
position
:
absolute
;
padding-right
:
30rpx
;
}
.tag-tip-view
{
color
:
#999999
;
width
:
100%
;
margin-top
:
30rpx
;
text-align
:
center
;
position
:
absolute
;
padding-right
:
30rpx
;
}
}
}
}
.file-list
{
.file-title
{
padding
:
0
30rpx
;
font-size
:
32rpx
;
height
:
100%
;
font-weight
:
bold
;
overflow
:
auto
;
color
:
#333333
;
background-color
:
#FFFFFF
;
padding
:
20rpx
30rpx
;
border-radius
:
32rpx
;
background-color
:
#ffffff
;
// margin-top: 10rpx;
}
.file-row
{
.file-list
{
display
:
flex
;
padding
:
0
30rpx
;
align-items
:
center
;
height
:
100%
;
justify-content
:
space-between
;
overflow
:
auto
;
margin-top
:
10rpx
;
background-color
:
#ffffff
;
margin-bottom
:
50rpx
;
.file-left
{
.file-row
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
color
:
#333333
;
justify-content
:
space-between
;
font-size
:
26rpx
;
margin-top
:
10rpx
;
margin-bottom
:
50rpx
;
.file-name
{
.file-left
{
margin-right
:
20rpx
;
display
:
flex
;
position
:
relative
;
align-items
:
center
;
.item-icon
{
color
:
#333333
;
position
:
absolute
;
font-size
:
26rpx
;
}
.file-format-text
{
position
:
relative
;
width
:
52rpx
;
height
:
52rpx
;
text-align
:
center
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#FFFFFF
;
line-height
:
52rpx
;
}
}
}
.file-name
{
margin-right
:
20rpx
;
position
:
relative
;
.item-icon
{
position
:
absolute
;
}
.file-format-text
{
position
:
relative
;
width
:
52rpx
;
height
:
52rpx
;
text-align
:
center
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#ffffff
;
line-height
:
52rpx
;
}
}
}
.file-right
{
.file-right
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
.button-class
{
.button-class
{
margin-left
:
10rpx
;
margin-left
:
10rpx
;
}
}
}
}
}
}
.tip-view
{
.tip-view
{
color
:
#999999
;
color
:
#999999
;
width
:
100%
;
width
:
100%
;
margin-top
:
200rpx
;
margin-top
:
200rpx
;
text-align
:
center
;
text-align
:
center
;
}
}
.loading-view
{
.loading-view
{
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
margin-top
:
200rpx
;
margin-top
:
200rpx
;
}
}
}
}
</
style
>
</
style
>
src/pages/order/feedback.vue
View file @
1bf70585
...
@@ -357,6 +357,10 @@ export default {
...
@@ -357,6 +357,10 @@ export default {
}
}
self
.
submiting
=
true
;
self
.
submiting
=
true
;
getApp
().
track
(
"order_feedback_submitForm"
,
{
reasonType
:
self
.
trace
.
reasonType
,
traceDate
:
self
.
traceDate
})
let
params
=
this
.
$u
.
deepClone
(
self
.
trace
);
let
params
=
this
.
$u
.
deepClone
(
self
.
trace
);
if
(
self
.
trace
.
reasonType
!=
'改约'
)
{
if
(
self
.
trace
.
reasonType
!=
'改约'
)
{
if
(
self
.
timeItem
&&
self
.
timeItem
.
pkey
&&
self
.
traceDate
){
if
(
self
.
timeItem
&&
self
.
timeItem
.
pkey
&&
self
.
traceDate
){
...
...
src/pages/order/search.vue
View file @
1bf70585
...
@@ -85,7 +85,10 @@
...
@@ -85,7 +85,10 @@
searchOrder
(
index
)
{
searchOrder
(
index
)
{
this
.
search
.
pageNumber
=
1
this
.
search
.
pageNumber
=
1
this
.
loadStaus
=
'loading'
;
this
.
loadStaus
=
'loading'
;
this
.
getOrderList
()
if
(
this
.
search
.
keyword
)
{
getApp
().
track
(
'search_order'
,
{
keyword
:
this
.
search
.
keyword
});
this
.
getOrderList
()
}
},
},
// 页面数据
// 页面数据
getOrderList
(
event
)
{
getOrderList
(
event
)
{
...
...
src/pages/parts/application.vue
View file @
1bf70585
...
@@ -224,6 +224,7 @@ export default {
...
@@ -224,6 +224,7 @@ export default {
if
(
!
this
.
validateForm
())
{
if
(
!
this
.
validateForm
())
{
return
false
return
false
}
}
getApp
().
track
(
"parts_application_submitParts"
,
{})
const
address
=
this
.
addressInfo
const
address
=
this
.
addressInfo
let
params
=
{
let
params
=
{
applyType
:
'1'
,
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