Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
repair_workers_h5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
石盼盼
repair_workers_h5
Commits
48cf7b31
Commit
48cf7b31
authored
Oct 27, 2021
by
郭欢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gh_test' into 'master'
Gh test See merge request
!42
parents
ca7a15af
0d033b16
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
2127 additions
and
1796 deletions
+2127
-1796
index.html
public/index.html
+21
-0
App.vue
src/App.vue
+3
-3
apiList.js
src/api/apiList.js
+2
-2
axios.js
src/api/axios.js
+1
-1
wxShare.js
src/api/wxShare.js
+6
-6
self.js
src/assets/js/self.js
+1
-1
common.scss
src/assets/styles/common.scss
+7
-0
tabbar.scss
src/assets/styles/common/tabbar.scss
+3
-3
global.scss
src/assets/styles/global.scss
+4
-0
menulist.scss
src/assets/styles/index/menulist.scss
+1
-1
admin_index.scss
src/assets/styles/tabbar/admin_index.scss
+25
-16
index.scss
src/assets/styles/tabbar/index.scss
+21
-12
modifyPhone.scss
src/assets/styles/tabbar/modifyPhone.scss
+1
-1
main.js
src/main.js
+2
-2
index.js
src/router/index.js
+5
-3
login.vue
src/views/login/login.vue
+18
-8
admin_detail.vue
src/views/my/admin_detail.vue
+311
-284
charge.vue
src/views/my/charge.vue
+229
-176
lookEvaluate.vue
src/views/my/lookEvaluate.vue
+56
-32
order_detail.vue
src/views/my/order_detail.vue
+371
-323
Home.vue
src/views/tabbar/Home.vue
+459
-397
admin_home.vue
src/views/tabbar/admin_home.vue
+465
-434
mine.vue
src/views/tabbar/mine.vue
+76
-68
modifyPhone.vue
src/views/tabbar/modifyPhone.vue
+39
-23
No files found.
public/index.html
View file @
48cf7b31
...
@@ -29,5 +29,26 @@
...
@@ -29,5 +29,26 @@
}
}
window
.
onresize
=
resizeRoot
;
window
.
onresize
=
resizeRoot
;
})(
window
);
})(
window
);
// 强制禁止用户修改微信客户端的字体大小
(
function
()
{
function
handleFontSize
()
{
// 设置网页字体为默认大小
WeixinJSBridge
.
invoke
(
'
setFontSizeCallback
'
,
{
'
fontSize
'
:
0
});
// 重写设置网页字体大小的事件
WeixinJSBridge
.
on
(
'
menu:setfont
'
,
function
()
{
WeixinJSBridge
.
invoke
(
'
setFontSizeCallback
'
,
{
'
fontSize
'
:
0
});
});
}
if
(
typeof
WeixinJSBridge
==
"
object
"
&&
typeof
WeixinJSBridge
.
invoke
==
"
function
"
)
{
handleFontSize
();
}
else
{
if
(
document
.
addEventListener
)
{
document
.
addEventListener
(
"
WeixinJSBridgeReady
"
,
handleFontSize
,
false
);
}
else
if
(
document
.
attachEvent
)
{
document
.
attachEvent
(
"
WeixinJSBridgeReady
"
,
handleFontSize
);
document
.
attachEvent
(
"
onWeixinJSBridgeReady
"
,
handleFontSize
);
}
}
})();
</script>
</script>
</html>
</html>
\ No newline at end of file
src/App.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<keep-alive
v-if=
"$route.meta.keepAlive"
>
<keep-alive
>
<router-view
/>
<router-view
v-if=
"$route.meta.keepAlive"
/>
</keep-alive>
</keep-alive>
<router-view
v-
else
/>
<router-view
v-
if=
"!$route.meta.keepAlive"
/>
<div
class=
"goBack-btn flex-h flex-hc flex-align-center"
v-if=
"!$route.meta.hideBack"
>
<div
class=
"goBack-btn flex-h flex-hc flex-align-center"
v-if=
"!$route.meta.hideBack"
>
<i
class=
"iconfont icon-icon_fanhuishouye"
@
click=
"gohome"
></i>
<i
class=
"iconfont icon-icon_fanhuishouye"
@
click=
"gohome"
></i>
</div>
</div>
...
...
src/api/apiList.js
View file @
48cf7b31
...
@@ -10,8 +10,8 @@ const baseUrl = '/api'
...
@@ -10,8 +10,8 @@ const baseUrl = '/api'
// todo: url
// todo: url
// const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
// const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const
httpUrl
=
'
https://repair.zeruiedu.com
'
// 正式接口
const
httpUrl
=
'
https://repair.zeruiedu.com
'
// 正式接口
const
h5Url
=
'
http://localhost:8080
'
// 测试h5线上地址
//
const h5Url = 'http://localhost:8080' // 测试h5线上地址
//
const h5Url = 'http://repair.h5.zeruiedu.com' // 测试h5线上地址
const
h5Url
=
'
http://repair.h5.zeruiedu.com
'
// 测试h5线上地址
window
.
localStorage
.
setItem
(
'
httpUrl
'
,
httpUrl
)
window
.
localStorage
.
setItem
(
'
httpUrl
'
,
httpUrl
)
window
.
localStorage
.
setItem
(
'
h5Url
'
,
h5Url
)
window
.
localStorage
.
setItem
(
'
h5Url
'
,
h5Url
)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
...
...
src/api/axios.js
View file @
48cf7b31
...
@@ -53,7 +53,7 @@ service.interceptors.response.use(
...
@@ -53,7 +53,7 @@ service.interceptors.response.use(
},
(
err
)
=>
{
},
(
err
)
=>
{
resolve
(
err
)
resolve
(
err
)
window
.
localStorage
.
clear
()
window
.
localStorage
.
clear
()
Toast
(
'
身份失效,请重新登录
'
)
Toast
(
'
身份失效,请重新登录
11111
'
)
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
console
.
log
(
'
错误--------
'
,
err
)
console
.
log
(
'
错误--------
'
,
err
)
})
})
...
...
src/api/wxShare.js
View file @
48cf7b31
var
wx
=
require
(
'
weixin-js-sdk
'
)
import
axios
from
'
axios
'
import
axios
from
'
axios
'
import
apiList
from
'
./apiList
'
import
apiList
from
'
./apiList
'
import
myAxios
from
'
./index
'
import
myAxios
from
'
./index
'
import
{
import
{
Toast
Toast
}
from
'
vant
'
}
from
'
vant
'
var
wx
=
require
(
'
weixin-js-sdk
'
)
// 微信分享方法
// 微信分享方法
const
share
=
(
param
)
=>
{
const
share
=
(
param
)
=>
{
Toast
.
loading
({
Toast
.
loading
({
message
:
"
加载中...
"
,
message
:
'
加载中...
'
,
duration
:
1000
,
//
持续展示 toast
duration
:
1000
//
持续展示 toast
})
})
const
successCall
=
(
res
)
=>
{
const
successCall
=
(
res
)
=>
{
console
.
log
(
'
res
'
,
res
)
console
.
log
(
'
res
'
,
res
)
Toast
.
clear
()
Toast
.
clear
()
le
t
result
=
res
.
conf
cons
t
result
=
res
.
conf
// let result = res.data
// let result = res.data
// let {
// let {
// wxConfig,
// wxConfig,
...
@@ -68,7 +68,7 @@ const share = (param) => {
...
@@ -68,7 +68,7 @@ const share = (param) => {
menuList
:
hideMenuItems
menuList
:
hideMenuItems
})
})
wx
.
showMenuItems
({
wx
.
showMenuItems
({
menuList
:
[
"
menuItem:share:appMessage
"
,
"
menuItem:share:timeline
"
]
// 要显示的菜单项,所有menu项见附录3
menuList
:
[
'
menuItem:share:appMessage
'
,
'
menuItem:share:timeline
'
]
// 要显示的菜单项,所有menu项见附录3
})
})
})
})
}
}
...
@@ -81,7 +81,7 @@ const share = (param) => {
...
@@ -81,7 +81,7 @@ const share = (param) => {
successCall
(
res
)
successCall
(
res
)
Toast
.
clear
()
Toast
.
clear
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
}
}
export
{
export
{
...
...
src/assets/js/self.js
View file @
48cf7b31
// export const SELFSHOP = 'self_shop
'
export
const
REFRESH_LIST
=
'
REFRESH_LIST
'
/**
/**
* 设置缓存 getLocalStorage
* 设置缓存 getLocalStorage
...
...
src/assets/styles/common.scss
View file @
48cf7b31
@charset
"UTF-8"
;
@charset
"UTF-8"
;
/* iOS禁止微信调整字体大小 */
body
{
-webkit-text-size-adjust
:
100%
!
important
;
text-size-adjust
:
100%
!
important
;
-moz-text-size-adjust
:
100%
!
important
;
}
html
,
body
,
div
,
span
,
applet
,
object
,
iframe
,
h1
,
h2
,
h3
,
html
,
body
,
div
,
span
,
applet
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
acronym
,
address
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
acronym
,
address
,
big
,
cite
,
code
,
del
,
dfn
,
em
,
font
,
img
,
ins
,
kbd
,
q
,
s
,
samp
,
big
,
cite
,
code
,
del
,
dfn
,
em
,
font
,
img
,
ins
,
kbd
,
q
,
s
,
samp
,
...
...
src/assets/styles/common/tabbar.scss
View file @
48cf7b31
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
width
:
1
.5rem
;
width
:
1
.5rem
;
height
:
100%
;
height
:
100%
;
text-align
:
center
;
text-align
:
center
;
font-size
:
0
.
26
rem
;
font-size
:
0
.
3
rem
;
color
:
#333333
;
color
:
#333333
;
}
}
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
}
}
.tabbar-item
img
{
.tabbar-item
img
{
width
:
0
.
44
rem
;
width
:
0
.
56
rem
;
height
:
0
.
44
rem
;
height
:
0
.
56
rem
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
\ No newline at end of file
src/assets/styles/global.scss
View file @
48cf7b31
...
@@ -196,4 +196,8 @@ $text-gray: #989794;
...
@@ -196,4 +196,8 @@ $text-gray: #989794;
//
//
.self-cont-sticky
.van-sticky.van-sticky--fixed
{
.self-cont-sticky
.van-sticky.van-sticky--fixed
{
width
:
1rem
!
important
;
width
:
1rem
!
important
;
}
.specile-text
{
color
:
#ff0000
!
important
;
}
}
\ No newline at end of file
src/assets/styles/index/menulist.scss
View file @
48cf7b31
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
}
}
.title-cont
{
.title-cont
{
font-size
:
.32
rem
;
font-size
:
0
.4
rem
;
}
}
}
}
...
...
src/assets/styles/tabbar/admin_index.scss
View file @
48cf7b31
...
@@ -22,13 +22,13 @@
...
@@ -22,13 +22,13 @@
.top
.status
{
.top
.status
{
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.3
6
rem
;
font-size
:
0
.3
8
rem
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.menu
.hc_total
{
.menu
.hc_total
{
color
:
#727272
;
color
:
#727272
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
32
rem
;
}
}
.menu
.options
{
.menu
.options
{
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
border
:
1px
solid
#0054ff
;
border
:
1px
solid
#0054ff
;
border-radius
:
0
.12rem
;
border-radius
:
0
.12rem
;
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
34
rem
;
line-height
:
0
.58rem
;
line-height
:
0
.58rem
;
text-align
:
center
;
text-align
:
center
;
position
:
relative
;
position
:
relative
;
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.58rem
;
line-height
:
0
.58rem
;
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
32
rem
;
}
}
.date
.end
{
.date
.end
{
width
:
3
.08rem
;
width
:
3
.08rem
;
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.58rem
;
line-height
:
0
.58rem
;
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
32
rem
;
}
}
.date
.blue
{
.date
.blue
{
width
:
0
.31rem
;
width
:
0
.31rem
;
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.7rem
;
line-height
:
0
.7rem
;
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
24
rem
;
font-size
:
0
.
32
rem
;
// margin-right: 0.2rem;
// margin-right: 0.2rem;
}
}
.allBtn
.sureBtn
{
.allBtn
.sureBtn
{
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.7rem
;
line-height
:
0
.7rem
;
color
:
#fff
;
color
:
#fff
;
font-size
:
0
.
24
rem
;
font-size
:
0
.
32
rem
;
margin-left
:
0
.2rem
;
margin-left
:
0
.2rem
;
}
}
.cancel_cont
{
.cancel_cont
{
...
@@ -141,12 +141,12 @@
...
@@ -141,12 +141,12 @@
border-radius
:
0
.12rem
;
border-radius
:
0
.12rem
;
margin
:
0
.4rem
auto
0
.2rem
;
margin
:
0
.4rem
auto
0
.2rem
;
padding
:
0
.4rem
0
.3rem
;
padding
:
0
.4rem
0
.3rem
;
font-size
:
0
.
3
rem
;
font-size
:
0
.
4
rem
;
}
}
.title
{
.title
{
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.32
rem
;
// font-size: 0.4
rem;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
0
.5rem
;
margin-bottom
:
0
.5rem
;
}
}
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
}
}
.btn
{
.btn
{
margin-top
:
0
.
2
rem
;
margin-top
:
0
.
5
rem
;
}
}
.btn-item
{
.btn-item
{
...
@@ -236,8 +236,9 @@
...
@@ -236,8 +236,9 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.7rem
;
line-height
:
0
.7rem
;
color
:
#fff
;
color
:
#fff
;
font-size
:
0
.
27
rem
;
font-size
:
0
.
34
rem
;
margin-left
:
0
.2rem
;
margin-left
:
0
.2rem
;
margin-bottom
:
.1rem
;
}
}
.sf-btn
{
.sf-btn
{
...
@@ -263,7 +264,7 @@
...
@@ -263,7 +264,7 @@
.pop_title
{
.pop_title
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
36
rem
;
font-size
:
0
.
4
rem
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
0
.4rem
;
margin-bottom
:
0
.4rem
;
}
}
...
@@ -362,7 +363,7 @@
...
@@ -362,7 +363,7 @@
}
}
.tc-box
.tc-title
{
.tc-box
.tc-title
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
32
rem
;
margin-bottom
:
0
.3rem
;
margin-bottom
:
0
.3rem
;
font-weight
:
bold
;
font-weight
:
bold
;
text-align
:
center
;
text-align
:
center
;
...
@@ -376,7 +377,7 @@
...
@@ -376,7 +377,7 @@
background
:
#f2f2f2
;
background
:
#f2f2f2
;
line-height
:
0
.56rem
;
line-height
:
0
.56rem
;
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
32
rem
;
padding-left
:
0
.3rem
;
padding-left
:
0
.3rem
;
margin-bottom
:
0
.3rem
;
margin-bottom
:
0
.3rem
;
}
}
...
@@ -392,7 +393,7 @@
...
@@ -392,7 +393,7 @@
}
}
.tc-box
.workers
.gr-item
.gr-name
{
.tc-box
.workers
.gr-item
.gr-name
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
32
rem
;
}
}
.tc-box
.workers
.k-img
{
.tc-box
.workers
.k-img
{
width
:
0
.42rem
;
width
:
0
.42rem
;
...
@@ -437,5 +438,13 @@
...
@@ -437,5 +438,13 @@
.none
{
.none
{
margin-left
:
0
.3rem
;
margin-left
:
0
.3rem
;
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.28rem
;
font-size
:
0
.32rem
;
}
/
deep
/
.van-ellipsis
{
font-size
:
0
.4rem
!
important
;
}
/
deep
/
.van-picker__confirm
,
/
deep
/
.van-picker__cancel
{
font-size
:
0
.4rem
!
important
;
}
}
\ No newline at end of file
src/assets/styles/tabbar/index.scss
View file @
48cf7b31
...
@@ -18,12 +18,12 @@
...
@@ -18,12 +18,12 @@
}
}
.top
.status
{
.top
.status
{
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.3
6
rem
;
font-size
:
0
.3
8
rem
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.menu
.hc_total
{
.menu
.hc_total
{
color
:
#727272
;
color
:
#727272
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
4
rem
;
}
}
.menu
.options
{
.menu
.options
{
width
:
1
.76rem
;
width
:
1
.76rem
;
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
border
:
1px
solid
#0054ff
;
border
:
1px
solid
#0054ff
;
border-radius
:
0
.12rem
;
border-radius
:
0
.12rem
;
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
34
rem
;
line-height
:
0
.58rem
;
line-height
:
0
.58rem
;
text-align
:
center
;
text-align
:
center
;
position
:
relative
;
position
:
relative
;
...
@@ -57,11 +57,11 @@
...
@@ -57,11 +57,11 @@
border-radius
:
0
.12rem
;
border-radius
:
0
.12rem
;
margin
:
0
.4rem
auto
0
.2rem
;
margin
:
0
.4rem
auto
0
.2rem
;
padding
:
0
.4rem
0
.3rem
;
padding
:
0
.4rem
0
.3rem
;
font-size
:
0
.
3
rem
;
font-size
:
0
.
4
rem
;
}
}
.title
{
.title
{
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.32
rem
;
// font-size: 0.4
rem;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
0
.5rem
;
margin-bottom
:
0
.5rem
;
}
}
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
margin-right
:
0
.3rem
;
margin-right
:
0
.3rem
;
}
}
.btn
{
.btn
{
margin-top
:
0
.
2
rem
;
margin-top
:
0
.
5
rem
;
}
}
.btn-item
{
.btn-item
{
width
:
1
.8rem
;
width
:
1
.8rem
;
...
@@ -168,8 +168,9 @@
...
@@ -168,8 +168,9 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.7rem
;
line-height
:
0
.7rem
;
color
:
#fff
;
color
:
#fff
;
font-size
:
0
.
27
rem
;
font-size
:
0
.
34
rem
;
margin-left
:
0
.2rem
;
margin-left
:
0
.2rem
;
margin-bottom
:
.1rem
;
}
}
.sf-btn
{
.sf-btn
{
background
:
#ffffff
;
background
:
#ffffff
;
...
@@ -200,7 +201,7 @@
...
@@ -200,7 +201,7 @@
// }
// }
.pop_title
{
.pop_title
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
36
rem
;
font-size
:
0
.
4
rem
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
0
.4rem
;
margin-bottom
:
0
.4rem
;
}
}
...
@@ -213,7 +214,7 @@
...
@@ -213,7 +214,7 @@
}
}
.
van-popup
textarea
:
:-
webkit-input-placeholder
{
.
van-popup
textarea
:
:-
webkit-input-placeholder
{
color
:
#c8c8c8
;
color
:
#c8c8c8
;
font-size
:
0
.
26
rem
;
font-size
:
0
.
34
rem
;
}
}
.btnItem
{
.btnItem
{
margin-top
:
0
.4rem
;
margin-top
:
0
.4rem
;
...
@@ -279,7 +280,7 @@
...
@@ -279,7 +280,7 @@
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.26rem
;
font-size
:
0
.26rem
;
margin-left
:
0
.3rem
;
margin-left
:
0
.3rem
;
margin-top
:
0
.4rem
;
//
margin-top: 0.4rem;
}
}
.sure-btn
{
.sure-btn
{
width
:
3
.12rem
;
width
:
3
.12rem
;
...
@@ -308,7 +309,7 @@
...
@@ -308,7 +309,7 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.58rem
;
line-height
:
0
.58rem
;
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
34
rem
;
}
}
.date
.end
{
.date
.end
{
...
@@ -320,11 +321,19 @@
...
@@ -320,11 +321,19 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.58rem
;
line-height
:
0
.58rem
;
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
34
rem
;
}
}
.date
.blue
{
.date
.blue
{
width
:
0
.31rem
;
width
:
0
.31rem
;
height
:
0
.03rem
;
height
:
0
.03rem
;
background
:
#0054FF
;
background
:
#0054FF
;
}
/
deep
/
.van-ellipsis
{
font-size
:
0
.4rem
!
important
;
}
/
deep
/
.van-picker__confirm
,
/
deep
/
.van-picker__cancel
{
font-size
:
0
.4rem
!
important
;
}
}
\ No newline at end of file
src/assets/styles/tabbar/modifyPhone.scss
View file @
48cf7b31
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
}
}
input
:
:-
webkit-input-placeholder
{
input
:
:-
webkit-input-placeholder
{
color
:
#C8C8C8
;
color
:
#C8C8C8
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
32
rem
;
}
}
.code
{
.code
{
position
:
relative
;
position
:
relative
;
...
...
src/main.js
View file @
48cf7b31
...
@@ -7,11 +7,11 @@ import myApi from './api/apiList'
...
@@ -7,11 +7,11 @@ import myApi from './api/apiList'
import
myAxios
from
'
./api/index
'
import
myAxios
from
'
./api/index
'
import
Vant
from
'
vant
'
import
Vant
from
'
vant
'
import
'
vant/lib/index.css
'
import
'
vant/lib/index.css
'
import
vConsole
from
'
@/plugins/vconsole.js
'
//
import vConsole from '@/plugins/vconsole.js'
import
listTips
from
'
@/components/common/listtips.vue
'
import
listTips
from
'
@/components/common/listtips.vue
'
Vue
.
component
(
'
listTips
'
,
listTips
)
Vue
.
component
(
'
listTips
'
,
listTips
)
Vue
.
use
(
vConsole
)
//
Vue.use(vConsole)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
...
...
src/router/index.js
View file @
48cf7b31
...
@@ -29,7 +29,8 @@ const routes = [{
...
@@ -29,7 +29,8 @@ const routes = [{
name
:
'
mine
'
,
name
:
'
mine
'
,
meta
:
{
meta
:
{
title
:
'
我的
'
,
title
:
'
我的
'
,
hideBack
:
true
hideBack
:
true
,
keepAlive
:
true
},
},
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
},
},
...
@@ -66,7 +67,8 @@ const routes = [{
...
@@ -66,7 +67,8 @@ const routes = [{
name
:
'
order_detail
'
,
name
:
'
order_detail
'
,
meta
:
{
meta
:
{
title
:
'
工单详情
'
,
title
:
'
工单详情
'
,
hideBack
:
true
hideBack
:
true
,
keepAlive
:
true
},
},
component
:
()
=>
import
(
'
@/views/my/order_detail.vue
'
)
component
:
()
=>
import
(
'
@/views/my/order_detail.vue
'
)
},
},
...
@@ -94,7 +96,7 @@ const router = new VueRouter({
...
@@ -94,7 +96,7 @@ const router = new VueRouter({
mode
:
'
history
'
,
mode
:
'
history
'
,
base
:
process
.
env
.
BASE_URL
,
base
:
process
.
env
.
BASE_URL
,
routes
,
routes
,
scrollBehavior
(
to
,
from
,
savePosition
)
{
scrollBehavior
(
to
,
from
,
savePosition
)
{
if
(
savePosition
)
{
if
(
savePosition
)
{
return
savePosition
return
savePosition
}
else
{
}
else
{
...
...
src/views/login/login.vue
View file @
48cf7b31
...
@@ -7,12 +7,22 @@
...
@@ -7,12 +7,22 @@
<div>
<div>
<div
class=
"filed-list"
>
<div
class=
"filed-list"
>
<img
class=
"icon-img"
src=
"@assets/images/login/shouji.png"
/>
<img
class=
"icon-img"
src=
"@assets/images/login/shouji.png"
/>
<van-field
v-model.trim=
"tel"
type=
"tel"
placeholder=
"请输入手机号"
maxlength=
"11"
/>
<van-field
v-model.trim=
"tel"
type=
"tel"
placeholder=
"请输入手机号"
maxlength=
"11"
/>
</div>
</div>
<div
class=
"filed-list code-cont"
>
<div
class=
"filed-list code-cont"
>
<img
class=
"icon-img"
src=
"@assets/images/login/yzm.png"
/>
<img
class=
"icon-img"
src=
"@assets/images/login/yzm.png"
/>
<van-field
v-model.trim=
"code"
type=
"text"
placeholder=
"请输入验证码"
maxlength=
"6"
/>
<van-field
<div
class=
"code-btn"
@
click=
"getCode"
>
{{
buttonText
}}
</div>
v-model.trim=
"code"
type=
"text"
placeholder=
"请输入验证码"
maxlength=
"6"
/>
<div
class=
"code-btn"
@
click=
"getCode"
>
{{
buttonText
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"login-btn"
@
click=
"goLogin"
>
立即登录
</div>
<div
class=
"login-btn"
@
click=
"goLogin"
>
立即登录
</div>
...
@@ -64,7 +74,7 @@ export default {
...
@@ -64,7 +74,7 @@ export default {
this
.
isSending
=
true
this
.
isSending
=
true
this
.
countDown
()
this
.
countDown
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
countDown
()
{
countDown
()
{
let
seconds
=
60
let
seconds
=
60
...
@@ -81,19 +91,19 @@ export default {
...
@@ -81,19 +91,19 @@ export default {
goLogin
()
{
goLogin
()
{
if
(
this
.
checkData
())
return
true
if
(
this
.
checkData
())
return
true
const
curParams
=
{
const
curParams
=
{
tel
:
this
.
tel
,
tel
:
this
.
tel
,
code
:
this
.
code
code
:
this
.
code
}
}
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
const
httpUrl
=
window
.
localStorage
.
getItem
(
'
httpUrl
'
)
const
httpUrl
=
window
.
localStorage
.
getItem
(
'
httpUrl
'
)
const
h5Url
=
window
.
localStorage
.
getItem
(
'
h5Url
'
)
const
h5Url
=
window
.
localStorage
.
getItem
(
'
h5Url
'
)
const
wxLogin
=
window
.
localStorage
.
getItem
(
'
wxLogin
'
)
const
wxLogin
=
window
.
localStorage
.
getItem
(
'
wxLogin
'
)
const
t
=
res
.
role
==
3
?
h5Url
:
`
${
h5Url
}
/admin_home`
// 测试h5线上地址
const
t
=
res
.
role
==
3
?
h5Url
:
`
${
h5Url
}
/admin_home`
// 测试h5线上地址
let
url
=
`
${
httpUrl
}${
wxLogin
}
?callBack=
${
t
}
&scopes=snsapi_userinfo&type=1`
let
url
=
`
${
httpUrl
}${
wxLogin
}
?callBack=
${
t
}
&scopes=snsapi_userinfo&type=1`
window
.
document
.
location
=
url
// url-
window
.
document
.
location
=
url
// url-
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
fetchData
(
to
,
from
)
{
fetchData
(
to
,
from
)
{
this
.
tel
=
''
// 手机号
this
.
tel
=
''
// 手机号
...
@@ -118,5 +128,5 @@ export default {
...
@@ -118,5 +128,5 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/login/login.scss"
;
@import
'@assets/styles/login/login.scss'
;
</
style
>
</
style
>
src/views/my/admin_detail.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
class=
"cont"
v-if=
"order"
>
<div
class=
"cont"
v-if=
"order"
>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<div
class=
"order-item"
>
<div
class=
"order-item"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title"
>
{{
order
.
order_status_display
}}
</div>
<div
class=
"title"
>
{{
order
.
order_status_display
}}
</div>
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
</div>
<div
<div
class=
"item flex-h flex-vc"
>
class=
"item-desc que-desc"
<div
class=
"item-title"
>
服务地址:
</div>
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
</div>
<div
<div
class=
"item flex-h flex-start"
>
class=
"item-desc"
<div
class=
"item-title"
>
服务地址:
</div>
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
<div
</div>
class=
"item-desc"
<div
class=
"item flex-h flex-vc"
>
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
</div>
<div
class=
"item-desc"
>
{{
order
.
realname
}}
</div>
<div
class=
"item flex-h flex-vc"
>
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-desc"
>
{{
order
.
realname
}}
</div>
<div
class=
"item-title"
>
联系电话:
</div>
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(order)"
>
{{
order
.
telephone
}}
</div>
<div
class=
"item flex-h flex-vc"
>
</div>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-desc phone"
@
click=
"callPhone(order)"
>
{{
order
.
telephone
}}
</div>
<div
class=
"item-title"
>
提交时间:
</div>
</div>
<div
class=
"item-desc"
>
2021-06-17 09:28:43
</div>
<div
class=
"item flex-h flex-vc"
>
</div>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-desc"
>
{{
order
.
created_at
}}
</div>
<div
class=
"item-title"
>
图片详情:
</div>
</div>
<div
<div
class=
"item flex-h flex-start"
>
class=
"img"
<div
class=
"item-title"
>
图片详情:
</div>
v-for=
"(child, index) in order.image"
<div
:key=
"index"
class=
"img"
@
click=
"preview(order.image,index)"
v-for=
"(child, index) in order.image"
>
:key=
"index"
<img
:src=
"child.url"
alt
/>
@
click=
"preview(order.image,index)"
</div>
>
</div>
<img
:src=
"child.url"
alt
/>
<div
v-if=
"order.work_name"
>
<div
class=
"line"
></div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-desc"
>
{{
order
.
work_name
}}
</div>
</div>
</div>
<div
class=
"material"
v-if=
"order.no_pay_order"
>
<div
class=
"item-title bz-title"
>
待支付耗材
</div>
<div
class=
"no-pay ma-item flex-h flex-hb"
v-for=
"(child, index) in order.no_pay_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.pay_order != ''"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
v-for=
"(parent, index) in order.pay_order"
:key=
"index"
>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in parent.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.free_material_order"
>
<div
class=
"item-title bz-title"
>
备注耗材
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in order.free_material_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
免费
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
@
click=
"showAll(item,$event)"
>
{{
child
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3 text-line-one"
>
¥0
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_transfer"
>
<div
class=
"item-title"
>
转单备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_transfer
.
remark
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_cancel"
>
<div
class=
"item-title"
>
退回备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_cancel
.
remark
}}
</div>
</div>
<div
v-if=
"order.is_can_assign_worker==1"
>
<div
class=
"line"
></div>
<div
v-if=
"order.is_can_assign_worker==1"
class=
"item flex-h flex-vc flex-hb"
@
click=
"workers"
>
<div
class=
"wo flex-h flex-vc"
>
<div
class=
"item-title"
v-if=
"order.order_status_display == '已派工'"
>
重新派工:
</div>
<div
class=
"item-title"
v-else
>
派工对象:
</div>
<div
class=
"item-desc worker-name"
>
{{
workerName
.
length
?
workerName
.
join
(
'
,
'
)
:
''
}}
</div>
</div>
<div
class=
"flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select_txt"
>
选择
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
</div>
</div>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"allBtn flex-h flex-hr"
>
<div
v-if=
"order.is_can_assign_worker==1"
class=
"button sureBtn"
@
click=
"sureOrder"
>
确定
</div>
<div
v-if=
"order.is_can_cancel==1"
class=
"button"
@
click=
"cancelOrder"
>
取消
</div>
</div>
<!-- 选择工人弹窗 -->
<van-popup
v-model=
"showWorker"
round
>
<div
class=
"tc-box"
>
<div
class=
"tc-title"
>
选择工人
</div>
<div
class=
"workers"
>
<div
class=
"gr-item"
v-for=
"(child_item,child_index) in columns"
:key=
"child_index"
>
<div
class=
"bm-item"
>
{{
child_item
.
name
}}
</div>
<div
v-if=
"child_item.user.length"
>
<div
class=
"people-item flex-h flex-vc flex-hb"
v-for=
"(lchild_item,lchild_index) in child_item.user"
:key=
"lchild_index"
@
click=
"chooseWorker(lchild_item,lchild_index)"
>
<div
class=
"flex-h flex-vc"
>
<img
class=
"gr-img"
:src=
"gr_img"
/>
<div
class=
"gr-name"
v-if=
"lchild_item.repired_count !== 0 || lchild_item.repiring_count !== 0"
>
{{
lchild_item
.
name
}}
(已派工:
{{
lchild_item
.
repired_count
}}
;维修中:
{{
lchild_item
.
repiring_count
}}
)
</div>
<div
class=
"gr-name"
v-else
>
{{
lchild_item
.
name
}}
(休息中)
</div>
</div>
</div>
<img
class=
"k-img"
:src=
"temporaryId && temporaryId.includes(lchild_item.id) ? select_img : unselect_img"
/>
</div>
</div>
</div>
<div
v-else
class=
"none"
>
暂无员工
</div>
<div
v-if=
"order.work_name"
>
</div>
<div
class=
"line"
></div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"allBtn btn-box flex-h flex-hc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"button"
@
click=
"Cancel"
>
取消
</div>
<div
class=
"item-desc"
>
{{
order
.
work_name
}}
</div>
<div
class=
"button sureBtn"
@
click=
"keyConfirm"
>
确定
</div>
</div>
</div>
</div>
</div>
<div
class=
"material"
v-if=
"order.no_pay_order"
>
</van-popup>
<div
class=
"item-title bz-title specile-text"
>
待支付耗材:
</div>
<!-- 取消工单原因弹窗 -->
<div
<van-popup
v-model=
"qxShow"
close-icon=
"close"
>
class=
"no-pay ma-item flex-h flex-hb"
<div
class=
"cancel_cont"
>
v-for=
"(child, index) in order.no_pay_order.goods"
<div
class=
"pop_title"
>
备注取消原因
</div>
:key=
"index"
<textarea
placeholder=
"请输入取消原因"
v-model=
"reason"
maxlength=
"100"
></textarea>
>
<div
class=
"btnItem flex-h"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"sure"
@
click=
"qx_submit"
>
提交
</div>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.pay_order != ''"
>
<div
class=
"item-title"
>
已支付耗材:
</div>
<div
v-for=
"(parent, index) in order.pay_order"
:key=
"index"
>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in parent.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.free_material_order"
>
<div
class=
"item-title bz-title"
>
备注耗材:
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in order.free_material_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
免费
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
@
click=
"showAll(item,$event)"
>
{{
child
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3 text-line-one"
>
¥0
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_transfer"
>
<div
class=
"item-title"
>
转单备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_transfer
.
remark
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_cancel"
>
<div
class=
"item-title"
>
退回备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_cancel
.
remark
}}
</div>
</div>
<div
v-if=
"order.is_can_assign_worker==1"
>
<div
class=
"line"
></div>
<div
v-if=
"order.is_can_assign_worker==1"
class=
"item flex-h flex-vc flex-hb"
@
click=
"workers"
>
<div
class=
"wo flex-h flex-vc"
>
<div
class=
"item-title"
v-if=
"order.order_status_display == '已派工'"
>
重新派工:
</div>
<div
class=
"item-title"
v-else
>
派工对象:
</div>
<div
class=
"item-desc worker-name"
>
{{
workerName
.
length
?
workerName
.
join
(
'
,
'
)
:
''
}}
</div>
</div>
<div
class=
"flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select_txt"
>
选择
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
</div>
</div>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"allBtn flex-h flex-hr"
>
<div
v-if=
"order.is_can_assign_worker==1"
class=
"button sureBtn"
@
click=
"sureOrder"
>
确定
</div>
<div
v-if=
"order.is_can_cancel==1"
class=
"button"
@
click=
"cancelOrder"
>
取消
</div>
</div>
<!-- 选择工人弹窗 -->
<van-popup
v-model=
"showWorker"
round
>
<div
class=
"tc-box"
>
<div
class=
"tc-title"
>
选择工人
</div>
<div
class=
"workers"
>
<div
class=
"gr-item"
v-for=
"(child_item,child_index) in columns"
:key=
"child_index"
>
<div
class=
"bm-item"
>
{{
child_item
.
name
}}
</div>
<div
v-if=
"child_item.user.length"
>
<div
class=
"people-item flex-h flex-vc flex-hb"
v-for=
"(lchild_item,lchild_index) in child_item.user"
:key=
"lchild_index"
@
click=
"chooseWorker(lchild_item,lchild_index)"
>
<div
class=
"flex-h flex-vc"
>
<img
class=
"gr-img"
:src=
"grImg"
/>
<div
class=
"gr-name"
v-if=
"lchild_item.repired_count !== 0 || lchild_item.repiring_count !== 0"
>
{{
lchild_item
.
name
}}
(已派工:
{{
lchild_item
.
repired_count
}}
;维修中:
{{
lchild_item
.
repiring_count
}}
)
</div>
<div
class=
"gr-name"
v-else
>
{{
lchild_item
.
name
}}
(休息中)
</div>
</div>
<img
class=
"k-img"
:src=
"temporaryId && temporaryId.includes(lchild_item.id) ? selectImg : unselectImg"
/>
</div>
</div>
<div
v-else
class=
"none"
>
暂无员工
</div>
</div>
</div>
<div
class=
"allBtn btn-box flex-h flex-hc"
>
<div
class=
"button"
@
click=
"Cancel"
>
取消
</div>
<div
class=
"button sureBtn"
@
click=
"keyConfirm"
>
确定
</div>
</div>
</div>
</van-popup>
<!-- 取消工单原因弹窗 -->
<van-popup
v-model=
"qxShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注取消原因
</div>
<textarea
placeholder=
"请输入取消原因"
v-model=
"reason"
maxlength=
"100"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"qx_submit"
>
提交
</div>
</div>
</div>
</van-popup>
</div>
</div>
</div>
</van-pull-refresh>
</van-popup>
<div
class=
"backBtn"
@
click=
"goBack"
>
</div>
<img
src=
"@assets/images/tabbar/icon_01_sel.png"
alt
/>
</van-pull-refresh>
</div>
<div
class=
"backBtn"
@
click=
"goBack"
>
<img
src=
"@assets/images/tabbar/icon_01_sel.png"
alt
/>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
//
import { trimStrSpace } from '@assets/js/format.js'
import
{
ImagePreview
,
CellGroup
}
from
'
vant
'
;
import
{
ImagePreview
}
from
'
vant
'
import
select
_i
mg
from
'
@assets/images/select.png
'
import
select
I
mg
from
'
@assets/images/select.png
'
import
unselect
_i
mg
from
'
@assets/images/un_select.png
'
import
unselect
I
mg
from
'
@assets/images/un_select.png
'
import
gr
_i
mg
from
'
@assets/images/gr.png
'
import
gr
I
mg
from
'
@assets/images/gr.png
'
export
default
{
export
default
{
name
:
'
admin_detail
'
,
name
:
'
admin_detail
'
,
data
()
{
data
()
{
return
{
return
{
showWorker
:
false
,
showWorker
:
false
,
select
_i
mg
,
select
I
mg
,
unselect
_i
mg
,
unselect
I
mg
,
gr
_i
mg
,
gr
I
mg
,
reson
:
''
,
//
取消原因
reson
:
''
,
//
取消原因
qxShow
:
false
,
// 发起转单弹窗
qxShow
:
false
,
// 发起转单弹窗
workerName
:
''
,
workerName
:
''
,
worker_id
:
''
,
worker_id
:
''
,
showWorker
:
false
,
columns
:
[],
columns
:
[],
locked
:
false
,
locked
:
false
,
// 上拉加载
// 上拉加载
...
@@ -206,85 +224,79 @@ export default {
...
@@ -206,85 +224,79 @@ export default {
imgList
:
[],
imgList
:
[],
// 转单
// 转单
reason
:
''
,
// 原因
reason
:
''
,
// 原因
currentId
:
''
,
currentId
:
''
,
order
:
null
,
order
:
null
,
order_id
:
''
,
order_id
:
''
,
temporaryName
:
''
,
temporaryName
:
''
,
temporaryId
:
''
,
temporaryId
:
''
}
}
},
},
created
()
{
methods
:
{
this
.
order_id
=
this
.
$route
.
query
.
id
goBack
()
{
// this.order_id = 211
this
.
getDetail
()
this
.
getWorkers
()
},
methods
:
{
goBack
(){
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/
'
path
:
'
/
'
}).
catch
(()
=>
{
})
}).
catch
(()
=>
{
})
},
},
getDetail
()
{
getDetail
()
{
this
.
isloading
=
true
this
.
isloading
=
true
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
order_id
repair_order_id
:
this
.
order_id
}
}
this
.
$http
.
get
(
this
.
$myApi
.
ORDER_INFO
,
curParams
)
this
.
$http
.
get
(
this
.
$myApi
.
ORDER_INFO
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
order
=
res
.
order
this
.
order
=
res
.
order
this
.
workerName
=
[]
this
.
workerName
=
[]
this
.
temporaryName
=
[]
this
.
temporaryName
=
[]
this
.
temporaryId
=
[]
this
.
temporaryId
=
[]
this
.
worker_id
=
[]
this
.
worker_id
=
[]
this
.
locked
=
false
this
.
locked
=
false
this
.
isloading
=
false
this
.
isloading
=
false
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
locked
=
false
this
.
locked
=
false
this
.
isloading
=
false
this
.
isloading
=
false
})
})
},
},
// 选择完工人点击确定按钮
// 选择完工人点击确定按钮
keyConfirm
()
{
keyConfirm
()
{
console
.
log
(
'
this.temporaryId
'
,
this
.
temporaryId
);
console
.
log
(
'
this.temporaryId
'
,
this
.
temporaryId
)
console
.
log
(
'
this.temporaryName
'
,
this
.
temporaryName
);
console
.
log
(
'
this.temporaryName
'
,
this
.
temporaryName
)
if
(
!
this
.
temporaryId
.
length
)
{
if
(
!
this
.
temporaryId
.
length
)
{
this
.
$toast
(
'
请选择工人!
'
)
this
.
$toast
(
'
请选择工人!
'
)
return
return
}
}
this
.
workerName
=
[...
this
.
temporaryName
]
this
.
workerName
=
[...
this
.
temporaryName
]
this
.
worker_id
=
[...
this
.
temporaryId
]
this
.
worker_id
=
[...
this
.
temporaryId
]
this
.
showWorker
=
false
this
.
showWorker
=
false
},
},
chooseWorker
(
item
,
lchild_index
)
{
chooseWorker
(
item
,
lchild_index
)
{
console
.
log
(
'
11111111111
'
,
item
,
item
.
id
,
item
.
name
,
lchild_index
);
console
.
log
(
'
11111111111
'
,
item
,
item
.
id
,
item
.
name
,
lchild_index
)
if
(
this
.
temporaryId
.
includes
(
item
.
id
))
{
// 删除
if
(
this
.
temporaryId
.
includes
(
item
.
id
))
{
// 删除
le
t
name_i
=
this
.
temporaryId
.
indexOf
(
item
.
id
)
cons
t
name_i
=
this
.
temporaryId
.
indexOf
(
item
.
id
)
this
.
temporaryId
.
splice
(
name_i
,
1
)
this
.
temporaryId
.
splice
(
name_i
,
1
)
this
.
temporaryName
.
splice
(
name_i
,
1
)
this
.
temporaryName
.
splice
(
name_i
,
1
)
}
else
{
// 加入
}
else
{
// 加入
this
.
temporaryId
.
push
(
item
.
id
)
this
.
temporaryId
.
push
(
item
.
id
)
this
.
temporaryName
.
push
(
item
.
name
)
this
.
temporaryName
.
push
(
item
.
name
)
}
}
},
},
preview
(
img
,
index
)
{
preview
(
img
,
index
)
{
let
temp
=
img
.
map
(
item
=>
{
const
temp
=
img
.
map
(
item
=>
{
return
item
.
url
return
item
.
url
})
})
ImagePreview
({
ImagePreview
({
images
:
temp
,
images
:
temp
,
startPosition
:
index
,
startPosition
:
index
});
})
},
},
callPhone
(
item
)
{
callPhone
(
item
)
{
le
t
phoneNumber
=
item
.
telephone
cons
t
phoneNumber
=
item
.
telephone
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
},
},
//指派工人
//
指派工人
sureOrder
()
{
sureOrder
()
{
const
vm
=
this
const
vm
=
this
if
(
!
this
.
worker_id
.
length
)
{
if
(
!
this
.
worker_id
.
length
)
{
this
.
$toast
(
'
请选择工人
'
)
this
.
$toast
(
'
请选择工人
'
)
return
return
}
}
...
@@ -295,40 +307,40 @@ export default {
...
@@ -295,40 +307,40 @@ export default {
this
.
$http
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_ASSIGN
,
curParams
)
.
post
(
this
.
$myApi
.
REPAIR_ASSIGN
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
console
.
log
(
'
指派工人
'
,
data
);
console
.
log
(
'
指派工人
'
,
data
)
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
workerName
=
[]
this
.
workerName
=
[]
this
.
temporaryName
=
[]
this
.
temporaryName
=
[]
this
.
temporaryId
=
[]
this
.
temporaryId
=
[]
this
.
worker_id
=
[]
this
.
worker_id
=
[]
this
.
reason
=
''
this
.
reason
=
''
this
.
order
=
data
this
.
order
=
data
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
// 取消工单
// 取消工单
cancelOrder
()
{
cancelOrder
()
{
this
.
qxShow
=
true
;
this
.
qxShow
=
true
this
.
reason
=
''
this
.
reason
=
''
},
},
workers
()
{
workers
()
{
this
.
showWorker
=
true
this
.
showWorker
=
true
},
},
Cancel
()
{
Cancel
()
{
this
.
showWorker
=
false
this
.
showWorker
=
false
},
},
//获取工人列表
//
获取工人列表
getWorkers
()
{
getWorkers
()
{
const
curParams
=
{}
const
curParams
=
{}
this
.
$http
this
.
$http
.
get
(
this
.
$myApi
.
GET_WORKER
,
curParams
)
.
get
(
this
.
$myApi
.
GET_WORKER
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
columns
=
data
this
.
columns
=
data
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
})
})
},
},
// 初始化
// 初始化
initData
()
{
initData
()
{
...
@@ -360,8 +372,8 @@ export default {
...
@@ -360,8 +372,8 @@ export default {
.
post
(
this
.
$myApi
.
REPAIR_CANCEL
,
curParams
)
.
post
(
this
.
$myApi
.
REPAIR_CANCEL
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
qxShow
=
false
this
.
qxShow
=
false
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
order
=
data
this
.
order
=
data
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
qxShow
=
false
this
.
qxShow
=
false
...
@@ -371,11 +383,26 @@ export default {
...
@@ -371,11 +383,26 @@ export default {
cancel
()
{
cancel
()
{
this
.
qxShow
=
false
this
.
qxShow
=
false
},
},
fetchData
(
to
,
from
)
{
this
.
order_id
=
to
.
query
?
to
.
query
.
id
:
''
if
(
this
.
order_id
)
{
this
.
getDetail
()
this
.
getWorkers
()
}
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
next
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/tabbar/admin_index.scss"
;
@import
'@assets/styles/tabbar/admin_index.scss'
;
</
style
>
</
style
>
\ No newline at end of file
src/views/my/charge.vue
View file @
48cf7b31
...
@@ -2,51 +2,68 @@
...
@@ -2,51 +2,68 @@
<div
class=
"cont"
v-if=
"order"
>
<div
class=
"cont"
v-if=
"order"
>
<div
class=
"top"
>
<div
class=
"top"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title"
>
维修类目
:
</div>
<div
class=
"title"
>
维修类目
:
</div>
<div
class=
"title"
>
{{
order
.
repair_type
.
type_name
}}
</div>
<div
class=
"title"
>
{{
order
.
repair_type
.
type_name
}}
</div>
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
</div>
<div
class=
"item-desc que-desc"
>
<div
class=
"item flex-h flex-vc"
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
{{
order
.
realname
}}
</div>
<div
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc
phone"
@
click=
"callPhone(order)"
>
{{
order
.
telephone
}}
</div>
<div
class=
"item-desc
"
>
{{
order
.
realname
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc"
>
2021-06-17 09:28:43
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(order)"
>
{{
order
.
telephone
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"img flex-h"
v-for=
"(child, index) in order.image"
:key=
"index"
@
click=
"preview(order.image,index)"
>
<div
class=
"item-desc"
>
{{
order
.
created_at
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img flex-h"
v-for=
"(child, index) in order.image"
:key=
"index"
@
click=
"preview(order.image, index)"
>
<img
:src=
"child.url"
alt
/>
<img
:src=
"child.url"
alt
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"things"
>
<div
class=
"things"
>
<div
class=
"things_title"
>
所需耗材
</div>
<div
class=
"things_title"
>
所需耗材
</div>
<div
class=
"list-item"
v-for=
"(item,index) in addList"
:key=
"index"
>
<div
<div
class=
"item flex-h flex-hb"
@
click=
"showZl(index)"
>
class=
"list-item"
v-for=
"(item, index) in addList"
:key=
"index"
>
<div
class=
"item flex-h flex-hb"
@
click=
"showZl(index)"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材种类
</div>
<div
class=
"title_left"
>
耗材种类
</div>
<div
class=
"title_r"
>
{{
item
.
zl
}}
</div>
<div
class=
"title_r"
>
{{
item
.
zl
}}
</div>
</div>
</div>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select_txt"
>
选择
</div>
<div
class=
"select_txt"
>
选择
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
<img
src=
"@assets/images/my/select.png"
alt
/>
</div>
</div>
</div>
</div>
<div
class=
"item flex-h flex-hb"
@
click=
"showHc(index)"
>
<div
class=
"item flex-h flex-hb"
@
click=
"showHc(index)"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材名称
</div>
<div
class=
"title_left"
>
耗材名称
</div>
<div
class=
"title_r"
>
{{
item
.
mc
}}
</div>
<div
class=
"title_r"
>
{{
item
.
mc
}}
</div>
</div>
</div>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select_txt"
>
选择
</div>
<div
class=
"select_txt"
>
选择
</div>
...
@@ -55,33 +72,52 @@
...
@@ -55,33 +72,52 @@
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材个数
</div>
<div
class=
"title_left"
>
耗材个数
</div>
<input
type=
"tel"
:min=
"1"
maxlength=
"3"
placeholder=
"请输入"
v-model=
"item.number"
@
input=
"changeInput($event,index)"
/>
<input
type=
"tel"
:min=
"1"
maxlength=
"3"
placeholder=
"请输入"
v-model=
"item.number"
@
input=
"changeInput($event, index)"
/>
<!--
<van-field
class=
"hc_field"
v-model=
"item.number"
type=
"number"
placeholder=
"请输入"
maxlength=
"3"
@
input=
"changeInput(item,index)"
/>
-->
<!--
<van-field
class=
"hc_field"
v-model=
"item.number"
type=
"number"
placeholder=
"请输入"
maxlength=
"3"
@
input=
"changeInput(item,index)"
/>
-->
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材单价
</div>
<div
class=
"title_left"
>
耗材单价
</div>
<div
class=
"title_r"
>
{{
item
.
single_price
}}
</div>
<div
class=
"title_r"
>
{{
item
.
single_price
}}
</div>
</div>
</div>
<div
v-if=
"addList.length>1"
class=
"delete-btn"
@
click=
"delMeth(index)"
>
<div
<img
src=
"@assets/images/lajitong.png"
alt=
""
>
v-if=
"addList.length > 1"
class=
"delete-btn"
@
click=
"delMeth(index)"
>
<img
src=
"@assets/images/lajitong.png"
alt=
""
/>
</div>
</div>
<!-- 种类弹窗 -->
<!-- 种类弹窗 -->
<van-popup
v-model=
"item.zlSelect"
round
position=
"bottom"
>
<van-popup
v-model=
"item.zlSelect"
round
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
:columns=
"types"
:columns=
"types"
value-key=
"goods_name"
value-key=
"goods_name"
@
confirm=
"(value)=>
{typeConfirm(value,index)}"
@
confirm=
"
(value) =>
{
typeConfirm(value, index)
}
"
@cancel="typeCancel(index)"
@cancel="typeCancel(index)"
/>
/>
</van-popup>
</van-popup>
<van-popup
v-model=
"item.mcSelect"
round
position=
"bottom"
>
<van-popup
v-model=
"item.mcSelect"
round
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
:columns=
"hcName"
:columns=
"hcName"
value-key=
"goods_name"
value-key=
"goods_name"
@
confirm=
"(value)=>
{hcConfirm(value,index)}"
@
confirm=
"
(value) =>
{
hcConfirm(value, index)
}
"
@cancel="hcCancel(index)"
@cancel="hcCancel(index)"
/>
/>
</van-popup>
</van-popup>
...
@@ -89,95 +125,91 @@
...
@@ -89,95 +125,91 @@
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"add-btn flex-h flex-vc flex-hb"
>
<div
class=
"add-btn flex-h flex-vc flex-hb"
>
<!--
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除耗材
</div>
-->
<!--
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除耗材
</div>
-->
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增耗材
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增耗材
</div>
</div>
</div>
<div
class=
"blank"
></div>
<!-- 底部 -->
<div
class=
"bottom flex-h flex-hb flex-vc"
>
<div
class=
"left"
>
共
<span>
{{
goods_number
}}
</span>
件,总金额:
<!--
<span
v-if=
"isNaN(total_price)"
>
¥暂无
</span>
-->
<span>
¥
{{
total_price
}}
</span>
</div>
</div>
<div
class=
"skBtn"
@
click=
"launch(repair_order_id)"
>
发起收款
</div>
</div>
</div>
<div
class=
"blank"
></div>
<!-- 底部 -->
<div
class=
"bottom flex-h flex-hb flex-vc"
>
<div
class=
"left"
>
共
<span>
{{
goods_number
}}
</span>
件,总金额:
<!--
<span
v-if=
"isNaN(total_price)"
>
¥暂无
</span>
-->
<span>
¥
{{
total_price
}}
</span>
</div>
<div
class=
"skBtn"
@
click=
"launch(repair_order_id)"
>
发起收款
</div>
</div>
<!-- 底部返回按钮 -->
<!-- 底部返回按钮 -->
<div
class=
"backBtn"
@
click=
"goBack"
>
<div
class=
"backBtn"
@
click=
"goBack"
>
<img
src=
"@assets/images/back3.png"
alt=
""
>
<img
src=
"@assets/images/back3.png"
alt=
""
/
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ImagePreview
}
from
'
vant
'
;
import
{
ImagePreview
}
from
'
vant
'
import
{
REFRESH_LIST
,
setLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
export
default
{
name
:
'
charge
'
,
name
:
'
charge
'
,
data
()
{
data
()
{
return
{
return
{
addList
:[
addList
:
[
{
{
zl
:
''
,
zl
:
''
,
mc
:
''
,
mc
:
''
,
number
:
''
,
number
:
''
,
single_price
:
'
暂无
'
,
single_price
:
'
暂无
'
,
zlSelect
:
false
,
zlSelect
:
false
,
mcSelect
:
false
,
mcSelect
:
false
,
parent_id
:
''
,
parent_id
:
''
,
goods_id
:
''
,
goods_id
:
''
}
}
],
],
showPicker
:
false
,
showPicker
:
false
,
types
:
[],
types
:
[],
type_name
:
'
请选择
'
,
type_name
:
'
请选择
'
,
hcName
:
[],
hcName
:
[],
hc_name
:
'
请选择
'
,
hc_name
:
'
请选择
'
,
hcPicker
:
false
,
hcPicker
:
false
,
hcNum
:
''
,
hcNum
:
''
,
repair_order_id
:
''
,
repair_order_id
:
''
,
order
:
''
,
order
:
''
,
hcList
:
[],
hcList
:
[],
total_price
:
0
,
total_price
:
0
,
hc_price
:
''
,
hc_price
:
''
,
goods_number
:
0
,
goods_number
:
0
}
}
},
},
created
()
{
watch
:
{
this
.
repair_order_id
=
this
.
$route
.
query
.
id
addList
:
{
this
.
getDetail
()
handler
(
newValue
,
oldValue
)
{
},
const
filterValue
=
newValue
.
filter
(
item
=>
{
watch
:{
addList
:{
handler
(
newValue
,
oldValue
){
let
filterValue
=
newValue
.
filter
(
item
=>
{
return
(
item
.
zl
&&
item
.
mc
&&
item
.
number
)
return
(
item
.
zl
&&
item
.
mc
&&
item
.
number
)
})
})
if
(
filterValue
.
length
)
{
if
(
filterValue
.
length
)
{
this
.
getMonery
(
filterValue
)
this
.
getMonery
(
filterValue
)
}
else
{
}
else
{
this
.
total_price
=
0
this
.
total_price
=
0
}
}
},
},
deep
:
true
deep
:
true
}
,
}
},
},
methods
:
{
methods
:
{
goBack
()
{
goBack
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
)
},
},
callPhone
(
order
)
{
callPhone
(
order
)
{
le
t
phoneNumber
=
order
.
telephone
cons
t
phoneNumber
=
order
.
telephone
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
},
},
preview
(
img
,
index
)
{
preview
(
img
,
index
)
{
let
temp
=
img
.
map
(
item
=>
{
const
temp
=
img
.
map
(
item
=>
{
return
item
.
url
return
item
.
url
})
})
ImagePreview
({
ImagePreview
({
images
:
temp
,
images
:
temp
,
startPosition
:
index
,
startPosition
:
index
})
;
})
},
},
getDetail
()
{
getDetail
()
{
const
curParams
=
{
const
curParams
=
{
...
@@ -185,29 +217,29 @@ export default {
...
@@ -185,29 +217,29 @@ export default {
}
}
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_ORDER_DETAIL
,
curParams
)
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_ORDER_DETAIL
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
order
=
res
.
order
this
.
order
=
res
.
order
var
arr
=
[]
var
arr
=
[]
for
(
let
i
in
res
.
material
)
{
for
(
const
i
in
res
.
material
)
{
arr
.
push
({
arr
.
push
({
id
:
res
.
material
[
i
].
id
,
id
:
res
.
material
[
i
].
id
,
goods_name
:
res
.
material
[
i
].
goods_name
,
goods_name
:
res
.
material
[
i
].
goods_name
,
son
:
res
.
material
[
i
].
son
son
:
res
.
material
[
i
].
son
})
})
}
}
this
.
types
=
arr
this
.
types
=
arr
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
showZl
(
index
)
{
this
.
addList
[
index
].
zlSelect
=
true
},
},
showZl
(
index
){
typeConfirm
(
value
,
index
)
{
this
.
addList
[
index
].
zlSelect
=
true
if
(
value
.
id
==
this
.
addList
[
index
].
parent_id
)
{
},
typeConfirm
(
value
,
index
)
{
if
(
value
.
id
==
this
.
addList
[
index
].
parent_id
){
this
.
addList
[
index
].
zlSelect
=
false
this
.
addList
[
index
].
zlSelect
=
false
return
return
}
}
this
.
hcList
=
value
this
.
hcList
=
value
this
.
addList
[
index
].
zl
=
value
.
goods_name
this
.
addList
[
index
].
zl
=
value
.
goods_name
this
.
addList
[
index
].
zlSelect
=
false
this
.
addList
[
index
].
zlSelect
=
false
this
.
addList
[
index
].
parent_id
=
value
.
id
this
.
addList
[
index
].
parent_id
=
value
.
id
// 当重新选择耗材种类时要清空之前选择的耗材
// 当重新选择耗材种类时要清空之前选择的耗材
...
@@ -215,58 +247,57 @@ export default {
...
@@ -215,58 +247,57 @@ export default {
this
.
addList
[
index
].
mc
=
''
this
.
addList
[
index
].
mc
=
''
this
.
addList
[
index
].
single_price
=
''
this
.
addList
[
index
].
single_price
=
''
var
childArr
=
[]
var
childArr
=
[]
for
(
let
i
in
value
.
son
)
{
for
(
const
i
in
value
.
son
)
{
childArr
.
push
({
childArr
.
push
({
id
:
value
.
son
[
i
].
id
,
id
:
value
.
son
[
i
].
id
,
goods_name
:
value
.
son
[
i
].
goods_name
,
goods_name
:
value
.
son
[
i
].
goods_name
,
single_price
:
value
.
son
[
i
].
price
single_price
:
value
.
son
[
i
].
price
})
})
}
}
this
.
hcName
=
childArr
this
.
hcName
=
childArr
// this.getMonery()
// this.getMonery()
},
},
typeCancel
(
index
)
{
typeCancel
(
index
)
{
this
.
addList
[
index
].
zlSelect
=
false
this
.
addList
[
index
].
zlSelect
=
false
},
},
showHc
(
index
)
{
showHc
(
index
){
this
.
addList
[
index
].
mcSelect
=
true
this
.
addList
[
index
].
mcSelect
=
true
},
},
hcConfirm
(
value
,
index
)
{
hcConfirm
(
value
,
index
)
{
this
.
addList
[
index
].
mc
=
value
.
goods_name
this
.
addList
[
index
].
mc
=
value
.
goods_name
this
.
addList
[
index
].
single_price
=
value
.
single_price
this
.
addList
[
index
].
single_price
=
value
.
single_price
this
.
addList
[
index
].
mcSelect
=
false
this
.
addList
[
index
].
mcSelect
=
false
this
.
addList
[
index
].
goods_id
=
value
.
id
this
.
addList
[
index
].
goods_id
=
value
.
id
this
.
hc_price
=
this
.
addList
[
index
].
single_price
this
.
hc_price
=
this
.
addList
[
index
].
single_price
let
bool
=
this
.
addList
.
every
(
item
=>
{
const
bool
=
this
.
addList
.
every
(
item
=>
{
return
item
.
number
&&
item
.
mc
&&
item
.
zl
return
item
.
number
&&
item
.
mc
&&
item
.
zl
})
})
// this.getMonery()
// this.getMonery()
},
},
changeInput
(
e
,
index
)
{
changeInput
(
e
,
index
)
{
this
.
hc_number
=
e
.
target
.
value
this
.
hc_number
=
e
.
target
.
value
this
.
totalCount
()
this
.
totalCount
()
},
},
getMonery
(
filterList
)
{
getMonery
(
filterList
)
{
let
total_price
=
0
let
total_price
=
0
filterList
.
map
(
item
=>
{
filterList
.
map
(
item
=>
{
total_price
+=
Number
(
item
.
number
)
*
Number
(
item
.
single_price
)
total_price
+=
Number
(
item
.
number
)
*
Number
(
item
.
single_price
)
})
})
this
.
total_price
=
Number
(
total_price
)
this
.
total_price
=
Number
(
total_price
)
// console.log('总价钱',total_price);
// console.log('总价钱',total_price);
},
},
totalCount
()
{
totalCount
()
{
let
count
=
0
let
count
=
0
for
(
let
i
=
0
;
i
<
this
.
addList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
addList
.
length
;
i
++
)
{
count
+=
Number
(
this
.
addList
[
i
].
number
)
count
+=
Number
(
this
.
addList
[
i
].
number
)
}
}
this
.
goods_number
=
count
this
.
goods_number
=
count
},
},
hcCancel
(
index
)
{
hcCancel
(
index
)
{
this
.
addList
[
index
].
mcSelect
=
false
this
.
addList
[
index
].
mcSelect
=
false
},
},
addMeth
()
{
addMeth
()
{
this
.
addList
.
push
({
this
.
addList
.
push
({
zl
:
''
,
zl
:
''
,
...
@@ -277,47 +308,61 @@ export default {
...
@@ -277,47 +308,61 @@ export default {
mcSelect
:
false
mcSelect
:
false
})
})
},
},
delMeth
(
index
)
{
delMeth
(
index
)
{
this
.
$dialog
.
confirm
({
this
.
$dialog
.
confirm
({
title
:
'
提示
'
,
title
:
'
提示
'
,
message
:
'
确认删除吗?
'
message
:
'
确认删除吗?
'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
addList
.
splice
(
index
,
1
)
this
.
addList
.
splice
(
index
,
1
)
// this.getMonery()
// this.getMonery()
this
.
totalCount
()
this
.
totalCount
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
launch
(
id
)
{
launch
(
id
){
const
bool
=
this
.
addList
.
every
(
item
=>
{
let
bool
=
this
.
addList
.
every
(
item
=>
{
return
item
.
number
&&
item
.
mc
&&
item
.
zl
return
item
.
number
&&
item
.
mc
&&
item
.
zl
})
})
if
(
!
bool
)
{
if
(
!
bool
)
{
this
.
$toast
.
fail
(
'
请输入完整
'
)
this
.
$toast
.
fail
(
'
请输入完整
'
)
return
return
}
}
for
(
let
i
=
0
;
i
<
this
.
addList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
addList
.
length
;
i
++
)
{
if
(
this
.
addList
[
i
].
number
==
0
)
{
if
(
this
.
addList
[
i
].
number
==
0
)
{
this
.
$toast
(
'
耗材个数不能为0
'
)
this
.
$toast
(
'
耗材个数不能为0
'
)
return
return
}
}
}
}
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
,
repair_order_id
:
this
.
repair_order_id
,
goods
:
this
.
addList
goods
:
this
.
addList
}
}
// const _this = this
// const _this = this
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_ORDER
,
curParams
)
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_ORDER
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
'
执行了吗
'
)
;
console
.
log
(
'
执行了吗
'
)
this
.
$toast
.
success
(
'
发起成功
'
)
this
.
$toast
.
success
(
'
发起成功
'
)
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
setLocalStorage
(
REFRESH_LIST
,
true
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
fetchData
(
to
,
from
)
{
this
.
repair_order_id
=
to
.
query
?
to
.
query
.
id
:
''
if
(
this
.
repair_order_id
)
{
this
.
getDetail
()
}
}
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
next
()
}
}
}
</
script
>
</
script
>
...
@@ -326,8 +371,9 @@ export default {
...
@@ -326,8 +371,9 @@ export default {
min-height
:
100vh
;
min-height
:
100vh
;
background
:
#fff
;
background
:
#fff
;
padding-top
:
0
.2rem
;
padding-top
:
0
.2rem
;
font-size
:
0
.4rem
;
}
}
.backBtn
{
.backBtn
{
width
:
1rem
;
width
:
1rem
;
height
:
1rem
;
height
:
1rem
;
background
:
#fff
;
background
:
#fff
;
...
@@ -339,7 +385,7 @@ export default {
...
@@ -339,7 +385,7 @@ export default {
border-radius
:
50%
;
border-radius
:
50%
;
padding
:
0
.1rem
;
padding
:
0
.1rem
;
}
}
.backBtn
img
{
.backBtn
img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
border-radius
:
50%
;
border-radius
:
50%
;
...
@@ -353,29 +399,30 @@ export default {
...
@@ -353,29 +399,30 @@ export default {
margin
:
0rem
auto
;
margin
:
0rem
auto
;
}
}
.item
{
.item
{
height
:
0
.3rem
;
// height: 0.3rem;
margin-bottom
:
0
.4rem
;
margin-bottom
:
0
.2rem
;
font-size
:
0
.4rem
;
}
}
.title
{
.title
{
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.32
rem
;
// font-size: 0.4
rem;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.item-title
{
.item-title
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.3
rem
;
// font-size: 0.4
rem;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.hc_field
{
.hc_field
{
padding
:
0
;
padding
:
0
;
}
}
.item-desc
{
.item-desc
{
color
:
#727272
;
color
:
#727272
;
font-size
:
0
.3rem
;
//
font-size: 0.3rem;
}
}
.que-desc
{
.que-desc
{
margin-top
:
0
.
4
rem
;
margin-top
:
0
.
2
rem
;
margin-bottom
:
0
.
4
rem
;
margin-bottom
:
0
.
2
rem
;
}
}
.phone
{
.phone
{
color
:
#0054ff
;
color
:
#0054ff
;
...
@@ -384,9 +431,9 @@ export default {
...
@@ -384,9 +431,9 @@ export default {
width
:
1
.2rem
;
width
:
1
.2rem
;
height
:
1
.2rem
;
height
:
1
.2rem
;
border-radius
:
0
.08rem
;
border-radius
:
0
.08rem
;
margin-top
:
0
.8rem
;
//
margin-top: 0.8rem;
margin-right
:
0
.16rem
;
margin-right
:
0
.16rem
;
border-radius
:
0
.08rem
;
border-radius
:
0
.08rem
;
}
}
.img
img
{
.img
img
{
width
:
100%
;
width
:
100%
;
...
@@ -403,7 +450,7 @@ export default {
...
@@ -403,7 +450,7 @@ export default {
}
}
.things_title
{
.things_title
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.
3
rem
;
font-size
:
0
.
4
rem
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
0
.4rem
;
margin-bottom
:
0
.4rem
;
}
}
...
@@ -413,11 +460,11 @@ export default {
...
@@ -413,11 +460,11 @@ export default {
}
}
.title_r
{
.title_r
{
color
:
#727272
;
color
:
#727272
;
font-size
:
0
.
3
rem
;
font-size
:
0
.
4
rem
;
}
}
.select
.select_txt
{
.select
.select_txt
{
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.
3
rem
;
font-size
:
0
.
4
rem
;
margin-right
:
0
.2rem
;
margin-right
:
0
.2rem
;
}
}
.select
img
{
.select
img
{
...
@@ -431,12 +478,13 @@ export default {
...
@@ -431,12 +478,13 @@ export default {
}
}
.add-btn
{
.add-btn
{
color
:
#0054ff
;
color
:
#0054ff
;
font-size
:
0
.
3
rem
;
font-size
:
0
.
4
rem
;
margin
:
0
.2rem
auto
0
;
margin
:
0
.2rem
auto
0
;
}
}
.list-item
{
.list-item
{
margin-bottom
:
0
.8rem
;
margin-bottom
:
0
.8rem
;
position
:
relative
;
position
:
relative
;
font-size
:
0
.4rem
;
}
}
.delete-btn
{
.delete-btn
{
width
:
0
.4rem
;
width
:
0
.4rem
;
...
@@ -445,7 +493,7 @@ export default {
...
@@ -445,7 +493,7 @@ export default {
bottom
:
0rem
;
bottom
:
0rem
;
right
:
0rem
;
right
:
0rem
;
}
}
.delete-btn
img
{
.delete-btn
img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
...
@@ -457,7 +505,7 @@ export default {
...
@@ -457,7 +505,7 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
1
.04rem
;
height
:
1
.04rem
;
background
:
#ffffff
;
background
:
#ffffff
;
padding-left
:
0
.3rem
;
padding-left
:
0
.3
4
rem
;
padding-right
:
0
.3rem
;
padding-right
:
0
.3rem
;
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
...
@@ -465,7 +513,7 @@ export default {
...
@@ -465,7 +513,7 @@ export default {
}
}
.left
{
.left
{
color
:
#000
;
color
:
#000
;
font-size
:
0
.
28
rem
;
font-size
:
0
.
36
rem
;
}
}
.left
span
{
.left
span
{
color
:
#0054ff
;
color
:
#0054ff
;
...
@@ -478,16 +526,21 @@ export default {
...
@@ -478,16 +526,21 @@ export default {
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.76rem
;
line-height
:
0
.76rem
;
color
:
#ffffff
;
color
:
#ffffff
;
font-size
:
0
.26rem
;
// font-size: 0.26rem;
font-size
:
0
.36rem
;
}
}
.skBtn
{
.skBtn
{
width
:
3
rem
;
width
:
2
.6
rem
;
height
:
0
.76rem
;
height
:
0
.76rem
;
background
:
#0054ff
;
background
:
#0054ff
;
border-radius
:
0
.38rem
;
border-radius
:
0
.38rem
;
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.76rem
;
line-height
:
0
.76rem
;
color
:
#ffffff
;
color
:
#ffffff
;
font-size
:
0
.26rem
;
// font-size: 0.26rem;
font-size
:
0
.36rem
;
}
/
deep
/
.things
.van-ellipsis
{
font-size
:
0
.4rem
!
important
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/my/lookEvaluate.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
class=
"cont"
>
<div
class=
"cont"
>
<div
class=
"evaluate-cont"
>
<div
class=
"evaluate-cont"
>
<div
class=
"title"
>
整体评价
</div>
<div
class=
"title"
>
整体评价
</div>
<van-rate
readonly
void-icon=
"star"
v-model=
"totalStar"
void-color=
"#eee"
color=
"#FFA300"
/>
<van-rate
<div
class=
"eva_detail"
>
详细评价
</div>
readonly
<div
class=
"flex-h star-item"
>
void-icon=
"star"
<div
class=
"left_title"
>
速度
</div>
v-model=
"totalStar"
<van-rate
readonly
void-icon=
"star"
v-model=
"speedStar"
void-color=
"#eee"
color=
"#FFA300"
/>
void-color=
"#eee"
</div>
color=
"#FFA300"
<div
class=
"flex-h star-item"
>
/>
<div
class=
"left_title"
>
质量
</div>
<div
class=
"eva_detail"
>
详细评价
</div>
<van-rate
readonly
void-icon=
"star"
v-model=
"qualityStar"
void-color=
"#eee"
color=
"#FFA300"
/>
<div
class=
"flex-h star-item"
>
</div>
<div
class=
"left_title"
>
速度
</div>
<div
class=
"flex-h star-item"
>
<van-rate
<div
class=
"left_title"
>
态度
</div>
readonly
<van-rate
readonly
void-icon=
"star"
v-model=
"attitudeStar"
void-color=
"#eee"
color=
"#FFA300"
/>
void-icon=
"star"
</div>
v-model=
"speedStar"
<div
class=
"line"
></div>
void-color=
"#eee"
<div
class=
"comments"
>
color=
"#FFA300"
<div
class=
"title"
>
评价内容
</div>
/>
<div
class=
"content"
>
{{
comment
.
content
}}
</div>
</div>
</div>
<div
class=
"flex-h star-item"
>
<div
class=
"left_title"
>
质量
</div>
<van-rate
readonly
void-icon=
"star"
v-model=
"qualityStar"
void-color=
"#eee"
color=
"#FFA300"
/>
</div>
<div
class=
"flex-h star-item"
>
<div
class=
"left_title"
>
态度
</div>
<van-rate
readonly
void-icon=
"star"
v-model=
"attitudeStar"
void-color=
"#eee"
color=
"#FFA300"
/>
</div>
<div
class=
"line"
></div>
<div
class=
"comments"
>
<div
class=
"title"
>
评价内容
</div>
<div
class=
"content"
>
{{
comment
.
content
}}
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
totalStar
:
0
,
totalStar
:
0
,
speedStar
:
0
,
speedStar
:
0
,
qualityStar
:
0
,
qualityStar
:
0
,
attitudeStar
:
0
,
attitudeStar
:
0
,
repair_order_id
:
''
,
repair_order_id
:
''
,
comment
:
''
,
comment
:
''
}
}
},
},
created
()
{
created
()
{
console
.
log
(
'
接收的id啊
'
,
this
.
$route
.
query
.
id
);
console
.
log
(
'
接收的id啊
'
,
this
.
$route
.
query
.
id
)
this
.
repair_order_id
=
this
.
$route
.
query
.
id
this
.
repair_order_id
=
this
.
$route
.
query
.
id
this
.
look_comment
()
this
.
look_comment
()
// this.getStatus()
// this.getStatus()
...
@@ -58,12 +82,12 @@ export default {
...
@@ -58,12 +82,12 @@ export default {
this
.
attitudeStar
=
Number
(
data
.
attitude_stars
)
this
.
attitudeStar
=
Number
(
data
.
attitude_stars
)
this
.
totalStar
=
Number
(
data
.
stars
)
this
.
totalStar
=
Number
(
data
.
stars
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
}
,
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/my/lookEvaluate.scss"
;
@import
'@assets/styles/my/lookEvaluate.scss'
;
</
style
>
</
style
>
\ No newline at end of file
src/views/my/order_detail.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
class=
"cont"
v-if=
"order"
>
<div
class=
"cont"
v-if=
"order"
>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<div
class=
"order-item"
>
<div
class=
"order-item"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
<div
class=
"title"
class=
"title"
v-if=
"order.pid==0&&order.son_count>0"
v-if=
"order.pid == 0 && order.son_count > 0"
>
{{
order
.
order_status_display
}}
(负责人)
</div>
>
{{
order
.
order_status_display
}}
(负责人)
</div>
<div
class=
"title"
v-else
>
{{
order
.
order_status_display
}}
</div>
<div
class=
"title"
v-else
>
{{
order
.
order_status_display
}}
</div>
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc"
>
{{
order
.
realname
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(order)"
>
{{
order
.
telephone
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-desc"
>
2021-06-17 09:28:43
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img"
v-for=
"(child, index) in order.image"
:key=
"index"
@
click=
"preview(order.image,index)"
>
<img
:src=
"child.url"
alt
/>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-desc"
>
{{
order
.
work_name
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc"
>
{{
order
.
telephone
}}
</div>
</div>
<div
class=
"material"
v-if=
"order.no_pay_order"
>
<div
class=
"item-title bz-title"
>
待支付耗材
</div>
<div
class=
"no-pay ma-item flex-h flex-hb"
v-for=
"(child, index) in order.no_pay_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.pay_order != ''"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
v-for=
"(parent, index) in order.pay_order"
:key=
"index"
>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in parent.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<!--
<div
class=
"one"
>
{{
child
.
good_detail
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.free_material_order"
>
<div
class=
"item-title bz-title"
>
备注耗材
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in order.free_material_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
免费
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
@
click=
"showAll(item,$event)"
>
{{
child
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3 text-line-one"
>
¥0
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_transfer"
>
<div
class=
"item-title"
>
转单备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_transfer
.
remark
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_cancel"
>
<div
class=
"item-title"
>
退回备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_cancel
.
remark
}}
</div>
</div>
<div
class=
"btn flex-h flex-hr"
v-if=
"btnShow"
>
<div
v-if=
"order.is_can_remark_material==1"
class=
"btn-item bz-btn"
@
click=
"bz_click"
>
备注耗材
</div>
<div
v-if=
"order.is_can_confirm_complete==1"
class=
"btn-item qr-btn"
@
click=
"sure_click()"
>
确认完成
</div>
<div
v-if=
"order.is_can_initiate_charge==1"
class=
"btn-item sf-btn"
@
click=
"tz_charge(order.id)"
>
发起收费
</div>
<div
v-if=
"order.is_can_initiate_transfer_order==1"
class=
"btn-item"
@
click=
"zd_click"
>
发起转单
</div>
<div
v-if=
"order.is_can_back==1"
class=
"btn-item"
@
click=
"back_click"
>
发起退回
</div>
<div
v-if=
"order.is_can_begin_repair==1"
class=
"btn-item"
@
click=
"starRepir"
>
开始维修
</div>
<div
v-if=
"order.is_can_see_material==1"
class=
"btn-item sf-btn"
@
click=
"look_click"
>
查看耗材
</div>
</div>
<!-- 弹窗 -->
<!-- 备注耗材弹窗 -->
<van-popup
v-model=
"hcShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注耗材
</div>
<div
class=
"list-item"
v-for=
"(item,index) in addList"
:key=
"index"
>
<input
class=
"input"
maxlength=
"20"
v-model=
"item.goods_name"
type=
"text"
placeholder=
"请输入耗材名称"
/>
<van-field
class=
"hc_field"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
maxlength=
"3"
/>
</div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增
</div>
</div>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"bz_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 发起转单弹窗 -->
<van-popup
v-model=
"zdShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注转单原因
</div>
<textarea
placeholder=
"请输入转单理由"
maxlength=
"20"
v-model=
"reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"zd_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 发起退回弹窗 -->
<van-popup
v-model=
"backShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注退回原因
</div>
<textarea
placeholder=
"请输入退回理由"
maxlength=
"100"
v-model=
"back_reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"back_cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"back_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 查看耗材弹窗 -->
<van-popup
v-model=
"lookShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
查看耗材
</div>
<div
class=
"tc_line"
></div>
<div
class=
"ma-item one-item flex-h flex-vc"
v-for=
"(item, index) in expend_detail.list"
:key=
"index"
>
<div
class=
"one one1 one_title text-line-one"
>
{{
item
.
parent_detail
?
item
.
parent_detail
.
goods_name
:
'
其它
'
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
<div
class=
"_one text-line-one"
class=
"item-desc que-desc"
>
{{
item
.
is_free
==
2
?
item
.
good_detail
.
goods_name
:
item
.
goods_name
}}
</div>
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
item
.
number
}}
</div>
<div
class=
"item flex-h flex-start"
>
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"one one3"
>
¥
{{
item
.
price
}}
</div>
<div
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc"
>
{{
order
.
realname
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(order)"
>
{{
order
.
telephone
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-desc"
>
{{
order
.
created_at
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img"
v-for=
"(child, index) in order.image"
:key=
"index"
@
click=
"preview(order.image, index)"
>
<img
:src=
"child.url"
alt
/>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-desc"
>
{{
order
.
work_name
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc"
>
{{
order
.
telephone
}}
</div>
</div>
<div
class=
"material"
v-if=
"order.no_pay_order"
>
<div
class=
"item-title bz-title specile-text"
>
待支付耗材:
</div>
<div
class=
"no-pay ma-item flex-h flex-hb"
v-for=
"(child, index) in order.no_pay_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.pay_order != ''"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
v-for=
"(parent, index) in order.pay_order"
:key=
"index"
>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in parent.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<!--
<div
class=
"one"
>
{{
child
.
good_detail
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.free_material_order"
>
<div
class=
"item-title bz-title"
>
备注耗材
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in order.free_material_order
.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
免费
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
@
click=
"showAll(item, $event)"
>
{{
child
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3 text-line-one"
>
¥0
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_transfer"
>
<div
class=
"item-title"
>
转单备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_transfer
.
remark
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_cancel"
>
<div
class=
"item-title"
>
退回备注:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_cancel
.
remark
}}
</div>
</div>
<div
class=
"btn flex-h flex-hr flex-hw"
v-if=
"btnShow"
>
<div
v-if=
"order.is_can_remark_material == 1"
class=
"btn-item bz-btn"
@
click=
"bz_click"
>
备注耗材
</div>
<div
v-if=
"order.is_can_confirm_complete == 1"
class=
"btn-item qr-btn"
@
click=
"sure_click()"
>
确认完成
</div>
<div
v-if=
"order.is_can_initiate_charge == 1"
class=
"btn-item sf-btn"
@
click=
"tz_charge(order.id)"
>
发起收费
</div>
<div
v-if=
"order.is_can_initiate_transfer_order == 1"
class=
"btn-item"
@
click=
"zd_click"
>
发起转单
</div>
<div
v-if=
"order.is_can_back == 1"
class=
"btn-item"
@
click=
"back_click"
>
发起退回
</div>
<div
v-if=
"order.is_can_begin_repair == 1"
class=
"btn-item"
@
click=
"starRepir"
>
开始维修
</div>
<div
v-if=
"order.is_can_see_material == 1"
class=
"btn-item sf-btn"
@
click=
"look_click"
>
查看耗材
</div>
</div>
<!-- 弹窗 -->
<!-- 备注耗材弹窗 -->
<van-popup
v-model=
"hcShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注耗材
</div>
<div
class=
"list-item"
v-for=
"(item, index) in addList"
:key=
"index"
>
<input
class=
"input"
maxlength=
"20"
v-model=
"item.goods_name"
type=
"text"
placeholder=
"请输入耗材名称"
/>
<van-field
class=
"hc_field"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
maxlength=
"3"
/>
</div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
v-if=
"addList.length > 1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增
</div>
</div>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"bz_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 发起转单弹窗 -->
<van-popup
v-model=
"zdShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注转单原因
</div>
<textarea
placeholder=
"请输入转单理由"
maxlength=
"20"
v-model=
"reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"zd_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 发起退回弹窗 -->
<van-popup
v-model=
"backShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注退回原因
</div>
<textarea
placeholder=
"请输入退回理由"
maxlength=
"100"
v-model=
"back_reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"back_cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"back_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 查看耗材弹窗 -->
<van-popup
v-model=
"lookShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
查看耗材
</div>
<div
class=
"tc_line"
></div>
<div
class=
"ma-item one-item flex-h flex-vc"
v-for=
"(item, index) in expend_detail.list"
:key=
"index"
>
<div
class=
"one one1 one_title text-line-one"
>
{{
item
.
parent_detail
?
item
.
parent_detail
.
goods_name
:
'
其它
'
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
item
.
is_free
==
2
?
item
.
good_detail
.
goods_name
:
item
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
item
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
item
.
price
}}
</div>
</div>
<div
class=
"hc_total"
>
共计
{{
expend_detail
.
number
}}
件,总价: ¥
{{
expend_detail
.
price
}}
</div>
<div
class=
"sure-btn"
@
click=
"cancel"
>
确定
</div>
</div>
</van-popup>
</div>
</div>
<div
class=
"hc_total"
>
共计
{{
expend_detail
.
number
}}
件,总价: ¥
{{
expend_detail
.
price
}}
</div
>
</van-pull-refresh
>
<div
class=
"sure-btn"
@
click=
"cancel"
>
确定
</div
>
<div
class=
"backBtn"
@
click=
"goBack"
>
</div
>
<img
src=
"@assets/images/tabbar/icon_01_sel.png"
alt
/
>
</
van-popup
>
</
div
>
</div>
</div>
<
/van-pull-refresh
>
<
div
v-else
>
<div
class=
"backBtn"
@
click=
"goBack"
>
<img
class=
"none-img"
src=
"https://img01.yzcdn.cn/vant/empty-image-default.png"
/
>
<img
src=
"@assets/images/tabbar/icon_01_sel.png"
alt
/
>
<p
class=
"none-p"
>
暂无工单哦!
</p
>
</div>
</div>
</div>
<div
v-else
>
<img
class=
"none-img"
src=
"https://img01.yzcdn.cn/vant/empty-image-default.png"
>
<p
class=
"none-p"
>
暂无工单哦!
</p>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ImagePreview
}
from
'
vant
'
;
import
{
ImagePreview
}
from
'
vant
'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
import
{
REFRESH_LIST
,
getLocalStorage
,
removeLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
export
default
{
name
:
'
order_detail
'
,
name
:
'
order_detail
'
,
data
()
{
data
()
{
return
{
return
{
locked
:
false
,
locked
:
false
,
isloading
:
false
,
isloading
:
false
,
btnShow
:
true
,
btnShow
:
true
,
order
:
null
,
order
:
null
,
order_id
:
''
,
order_id
:
''
,
// 备注耗材
// 备注耗材
addList
:
[
addList
:
[
{
{
goods_name
:
''
,
goods_name
:
''
,
...
@@ -234,33 +267,27 @@ export default {
...
@@ -234,33 +267,27 @@ export default {
}
}
],
// 添加的备注耗材数据
],
// 添加的备注耗材数据
hcShow
:
false
,
// 耗材弹窗
hcShow
:
false
,
// 耗材弹窗
lookShow
:
false
,
// 查看耗材弹窗
lookShow
:
false
,
// 查看耗材弹窗
reason
:
''
,
// 转单原因
reason
:
''
,
// 转单原因
zdShow
:
false
,
// 发起转单弹窗
zdShow
:
false
,
// 发起转单弹窗
backShow
:
false
,
//工人退回弹窗
backShow
:
false
,
// 工人退回弹窗
back_reason
:
''
,
//工人退回原因
back_reason
:
''
,
// 工人退回原因
lookShow
:
false
,
// 查看耗材弹窗
expend_detail
:
{}
// 耗材详情
expend_detail
:
{},
// 耗材详情
}
}
},
},
created
()
{
this
.
order_id
=
this
.
$route
.
query
.
id
// this.order_id = 211
this
.
getDetail
()
},
methods
:
{
methods
:
{
preview
(
img
,
index
)
{
preview
(
img
,
index
)
{
let
temp
=
img
.
map
(
item
=>
{
const
temp
=
img
.
map
(
item
=>
{
return
item
.
url
return
item
.
url
})
})
ImagePreview
({
ImagePreview
({
images
:
temp
,
images
:
temp
,
startPosition
:
index
,
startPosition
:
index
});
})
},
},
// 确认完成
// 确认完成
sure_click
(
item
,
index
)
{
sure_click
(
item
,
index
)
{
const
vm
=
this
//
const vm = this
this
.
$dialog
.
confirm
({
this
.
$dialog
.
confirm
({
title
:
'
提示
'
,
title
:
'
提示
'
,
message
:
'
确认完成维修?
'
message
:
'
确认完成维修?
'
...
@@ -272,36 +299,37 @@ export default {
...
@@ -272,36 +299,37 @@ export default {
this
.
$http
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_COMPLETE
,
curParams
)
.
post
(
this
.
$myApi
.
REPAIR_COMPLETE
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
order
=
data
this
.
order
=
data
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
onRefresh
()
{
onRefresh
()
{
if
(
!
this
.
locked
)
{
if
(
!
this
.
locked
)
{
this
.
locked
=
true
this
.
locked
=
true
this
.
getDetail
()
this
.
getDetail
()
}
}
},
},
getDetail
()
{
getDetail
()
{
this
.
isloading
=
true
this
.
isloading
=
true
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
order_id
repair_order_id
:
this
.
order_id
}
}
this
.
$http
.
get
(
this
.
$myApi
.
ORDER_INFO
,
curParams
)
this
.
$http
.
get
(
this
.
$myApi
.
ORDER_INFO
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
order
=
res
.
order
this
.
order
=
res
.
order
this
.
locked
=
false
this
.
locked
=
false
this
.
isloading
=
false
this
.
isloading
=
false
removeLocalStorage
(
REFRESH_LIST
)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
locked
=
false
this
.
locked
=
false
this
.
isloading
=
false
this
.
isloading
=
false
})
})
},
},
bz_click
()
{
bz_click
()
{
this
.
hcShow
=
true
this
.
hcShow
=
true
// 默认为一个空数据
// 默认为一个空数据
this
.
addList
=
[{
this
.
addList
=
[{
...
@@ -354,15 +382,15 @@ export default {
...
@@ -354,15 +382,15 @@ export default {
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
hcShow
=
false
this
.
hcShow
=
false
})
})
},
},
// 发起收费
// 发起收费
tz_charge
(
id
)
{
tz_charge
(
id
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/charge
'
,
path
:
'
/charge
'
,
query
:
{
id
}
query
:
{
id
}
})
})
},
},
// 转单弹窗
// 转单弹窗
zd_click
()
{
zd_click
()
{
this
.
reason
=
''
this
.
reason
=
''
this
.
zdShow
=
true
this
.
zdShow
=
true
...
@@ -381,17 +409,17 @@ export default {
...
@@ -381,17 +409,17 @@ export default {
.
post
(
this
.
$myApi
.
REPAIR_TRANSFER
,
curParams
)
.
post
(
this
.
$myApi
.
REPAIR_TRANSFER
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
zdShow
=
false
this
.
zdShow
=
false
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
btnShow
=
false
this
.
btnShow
=
false
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
zdShow
=
false
this
.
zdShow
=
false
})
})
},
},
// 开始维修
// 开始维修
starRepir
(
id
,
)
{
starRepir
(
id
)
{
// console.log(index)
// console.log(index)
const
vm
=
this
//
const vm = this
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
order_id
repair_order_id
:
this
.
order_id
}
}
...
@@ -400,38 +428,38 @@ export default {
...
@@ -400,38 +428,38 @@ export default {
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
order
=
data
this
.
order
=
data
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
back_click
()
{
back_click
()
{
this
.
back_reason
=
''
this
.
back_reason
=
''
this
.
backShow
=
true
this
.
backShow
=
true
},
},
back_cancel
()
{
back_cancel
()
{
this
.
backShow
=
false
this
.
backShow
=
false
},
},
//
发起退回
//
发起退回
back_submit
()
{
back_submit
()
{
if
(
this
.
back_reason
===
''
)
{
if
(
this
.
back_reason
===
''
)
{
this
.
$toast
(
'
退回原因不可为空
'
)
this
.
$toast
(
'
退回原因不可为空
'
)
return
return
}
}
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
order_id
,
repair_order_id
:
this
.
order_id
,
content
:
this
.
back_reason
content
:
this
.
back_reason
}
}
this
.
$http
this
.
$http
.
get
(
this
.
$myApi
.
WORKER_BACK
,
curParams
)
.
get
(
this
.
$myApi
.
WORKER_BACK
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
backShow
=
false
this
.
backShow
=
false
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
btnShow
=
false
this
.
btnShow
=
false
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
backShow
=
false
this
.
backShow
=
false
})
})
},
},
// 查看耗材弹窗
// 查看耗材弹窗
look_click
()
{
look_click
()
{
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
order_id
repair_order_id
:
this
.
order_id
}
}
...
@@ -442,47 +470,67 @@ export default {
...
@@ -442,47 +470,67 @@ export default {
this
.
expend_detail
=
data
this
.
expend_detail
=
data
this
.
lookShow
=
true
this
.
lookShow
=
true
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
cancel
()
{
cancel
()
{
this
.
zdShow
=
false
this
.
zdShow
=
false
this
.
hcShow
=
false
this
.
hcShow
=
false
this
.
lookShow
=
false
this
.
lookShow
=
false
},
},
goBack
()
{
goBack
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/
'
path
:
'
/
'
})
})
},
},
fetchData
(
to
,
from
)
{
this
.
order_id
=
to
.
query
?
to
.
query
.
id
:
''
if
(
from
.
path
!==
undefined
&&
from
.
path
.
indexOf
(
'
/charge
'
)
!==
-
1
)
{
if
(
getLocalStorage
(
REFRESH_LIST
))
{
this
.
getDetail
()
}
}
else
{
if
(
this
.
order_id
)
{
this
.
getDetail
()
}
}
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
next
()
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/tabbar/index.scss"
;
@import
'@assets/styles/tabbar/index.scss'
;
.backBtn
{
.backBtn
{
width
:
0
.8rem
;
width
:
0
.8rem
;
height
:
0
.8rem
;
height
:
0
.8rem
;
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0
0
0
.1rem
#0054ff
;
box-shadow
:
0
0
0
.1rem
#0054ff
;
position
:
fixed
;
position
:
fixed
;
right
:
0
.6rem
;
right
:
0
.6rem
;
top
:
1rem
;
top
:
1rem
;
z-index
:
1
;
z-index
:
1
;
border-radius
:
50%
;
border-radius
:
50%
;
padding
:
0
.1rem
;
padding
:
0
.1rem
;
}
}
.backBtn
img
{
.backBtn
img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
border-radius
:
50%
;
border-radius
:
50%
;
}
}
.none-img
{
.none-img
{
display
:
block
;
display
:
block
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.none-p
{
.none-p
{
text-align
:
center
;
text-align
:
center
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/tabbar/Home.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
class=
"cont"
>
<div
class=
"cont"
>
<div
class=
"top flex-h flex-vc"
>
<div
class=
"top flex-h flex-vc"
>
<div
class=
"point"
></div>
<div
class=
"point"
></div>
<div
class=
"status"
>
{{
user
.
online_status_display
}}
</div>
<div
class=
"status"
>
{{
user
.
online_status_display
}}
</div>
</div>
</div>
<div
class=
"menu flex-h flex-hb"
>
<div
class=
"menu flex-h flex-hb flex-vc"
>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"options"
>
<div
class=
"options"
>
<div
@
click=
"chooseTab"
>
{{
curSelect
.
name
}}
</div>
<div
@
click=
"chooseTab"
>
{{
curSelect
.
name
}}
</div>
<div
class=
"option-box"
v-show=
"tabShow"
>
<div
class=
"option-box"
v-show=
"tabShow"
>
<div
<div
class=
"option-item"
class=
"option-item"
v-for=
"item in optionList"
v-for=
"item in optionList"
:key=
"item.type"
:key=
"item.type"
:value=
"item.name"
:value=
"item.name"
@
click=
"changeItem(item)"
@
click=
"changeItem(item)"
>
{{
item
.
name
}}
</div>
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
<div
class=
"date flex-h flex-hb flex-vc"
v-if=
"this.curSelect.type == 4"
>
<div
class=
"start"
@
click=
"stShow"
>
{{
startTime
}}
</div>
<div
class=
"blue"
></div>
<div
class=
"end"
@
click=
"endShow"
>
{{
endTime
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"date flex-h flex-hb flex-vc"
v-if=
"this.curSelect.type==4"
>
<div
class=
"start"
@
click=
"stShow"
>
{{
startTime
}}
</div>
<div
class=
"blue"
></div>
<div
class=
"end"
@
click=
"endShow"
>
{{
endTime
}}
</div>
</div>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<van-list
<van-list
v-model=
"loading"
v-model=
"loading"
:finished=
"finished"
:finished=
"finished"
finished-text=
"没有更多了~"
finished-text=
"没有更多了~"
@
load=
"onmore"
@
load=
"onmore"
v-if=
"list.length"
v-if=
"list.length"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"item.id"
>
<div
class=
"title"
v-if=
"item.pid==0&&item.son_count>0"
>
{{
item
.
order_status_display
}}
(负责人)
</div>
<div
class=
"title"
v-else
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
预约时间:
</div>
<div
class=
"item-desc"
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
repair_type
.
type_name
}}
-
{{
item
.
description
}}
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(item)"
>
{{
item
.
telephone
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-desc"
>
{{
item
.
created_at
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
@
click=
"preview(item.image,index)"
class=
"img flex-h"
v-for=
"(child, index) in item.image"
:key=
"index"
>
>
<img
:src=
"child.url"
alt
/>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"item.id"
>
<div
class=
"title"
v-if=
"item.pid == 0 && item.son_count > 0"
>
{{
item
.
order_status_display
}}
(负责人)
</div>
<div
class=
"title"
v-else
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
预约时间:
</div>
<div
class=
"item-desc"
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
repair_type
.
type_name
}}
-
{{
item
.
description
}}
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(item)"
>
{{
item
.
telephone
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-desc"
>
{{
item
.
created_at
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
@
click=
"preview(item.image, index)"
class=
"img flex-h"
v-for=
"(child, index) in item.image"
:key=
"index"
>
<img
:src=
"child.url"
alt
/>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"item flex-h flex-vc"
v-if=
"item.worker"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
name
}}
</div>
</div>
<div
class=
"item flex-h flex-vc"
v-if=
"item.worker"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
</div>
<div
class=
"material"
v-if=
"item.no_pay_order"
>
<div
class=
"item-title bz-title specile-text"
>
待支付耗材:
</div>
<div
class=
"no-pay ma-item flex-h flex-hb"
v-for=
"(child, index) in item.no_pay_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"item.pay_order != ''"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
v-for=
"(parent, index) in item.pay_order"
:key=
"index"
>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in parent.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<!--
<div
class=
"one"
>
{{
child
.
good_detail
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<!--
<div
class=
"line"
></div>
-->
<div
class=
"material"
v-if=
"item.free_material_order"
>
<div
class=
"item-title bz-title"
>
备注耗材:
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in item.free_material_order
.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
免费
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
@
click=
"showAll(item, $event)"
>
{{
child
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<!--
<div
class=
"one one2 text-line-one"
>
{{
child
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
<div
class=
"one one3 text-line-one"
>
¥0
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"btn flex-h flex-hr flex-hw"
>
<div
v-if=
"item.is_can_remark_material == 1"
class=
"btn-item bz-btn"
@
click=
"bz_click(item)"
>
备注耗材
</div>
<div
v-if=
"item.is_can_confirm_complete == 1"
class=
"btn-item qr-btn"
@
click=
"sure_click(item, index)"
>
确认完成
</div>
<div
v-if=
"item.is_can_initiate_charge == 1"
class=
"btn-item sf-btn"
@
click=
"tz_charge(item.id)"
>
发起收费
</div>
<div
v-if=
"item.is_can_initiate_transfer_order == 1"
class=
"btn-item"
@
click=
"zd_click(item)"
>
发起转单
</div>
<div
v-if=
"item.is_can_back == 1"
class=
"btn-item"
@
click=
"back_click(item)"
>
发起退回
</div>
<div
v-if=
"item.is_can_begin_repair == 1"
class=
"btn-item"
@
click=
"starRepir(item.id, index)"
>
开始维修
</div>
<!--
<div
v-if=
"item.is_can_see_appraisal==1"
class=
"btn-item"
@
click=
"look_comment(item)"
>
查看评价
</div>
-->
<div
v-if=
"item.is_can_see_material == 1"
class=
"btn-item sf-btn"
@
click=
"look_click(item)"
>
查看耗材
</div>
</div>
</div>
<!-- 空数据 -->
</van-list>
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
</van-pull-refresh>
<div
class=
"blank"
></div>
<!-- 发起转单弹窗 -->
<van-popup
v-model=
"zdShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注转单原因
</div>
<textarea
placeholder=
"请输入转单理由"
maxlength=
"20"
v-model=
"reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"zd_submit"
>
提交
</div>
</div>
</div>
</div>
</div>
</van-popup>
<div
class=
"line"
></div>
<!-- 发起退回弹窗 -->
<div
class=
"item flex-h flex-vc"
v-if=
"item.worker"
>
<van-popup
v-model=
"backShow"
close-icon=
"close"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"cancel_cont"
>
<div
class=
"item-desc"
>
{{
item
.
worker
.
name
}}
</div>
<div
class=
"pop_title"
>
备注退回原因
</div>
</div>
<textarea
placeholder=
"请输入退回理由"
maxlength=
"100"
v-model=
"back_reason"
></textarea>
<div
class=
"item flex-h flex-vc"
v-if=
"item.worker"
>
<div
class=
"btnItem flex-h"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"cancel"
@
click=
"back_cancel"
>
取消
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
<div
class=
"sure"
@
click=
"back_submit"
>
提交
</div>
</div>
</div>
<div
class=
"material"
v-if=
"item.no_pay_order"
>
<div
class=
"item-title bz-title"
>
待支付耗材
</div>
<div
class=
"no-pay ma-item flex-h flex-hb"
v-for=
"(child, index) in item.no_pay_order.goods"
:key=
"index"
>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</van-popup>
</div>
<!-- 备注耗材弹窗 -->
<div
class=
"material"
v-if=
"item.pay_order != ''"
>
<van-popup
v-model=
"hcShow"
close-icon=
"close"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"cancel_cont"
>
<div
v-for=
"(parent, index) in item.pay_order"
:key=
"index"
>
<div
class=
"pop_title"
>
备注耗材
</div>
<div
<div
class=
"list-item"
v-for=
"(item, index) in addList"
:key=
"index"
>
class=
"ma-item flex-h flex-hb"
<input
v-for=
"(child, index) in parent.goods"
class=
"input"
:key=
"index"
maxlength=
"20"
>
v-model=
"item.goods_name"
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
type=
"text"
<!--
<div
class=
"one"
>
{{
child
.
good_detail
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
placeholder=
"请输入耗材名称"
<div
class=
"one one2 flex-h"
>
/>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<!--
<input
class=
"input"
maxlength=
"3"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
/>
-->
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
<van-field
class=
"hc_field"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
maxlength=
"3"
/>
</div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
v-if=
"addList.length > 1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增
</div>
</div>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"bz_submit"
>
提交
</div>
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</van-popup>
</div>
<!-- 查看耗材弹窗 -->
<!--
<div
class=
"line"
></div>
-->
<van-popup
v-model=
"lookShow"
close-icon=
"close"
>
<div
class=
"material"
v-if=
"item.free_material_order"
>
<div
class=
"cancel_cont"
>
<div
class=
"item-title bz-title"
>
备注耗材
</div>
<div
class=
"pop_title"
>
查看耗材
</div>
<div
<div
class=
"tc_line"
></div>
class=
"ma-item flex-h flex-hb"
<div
v-for=
"(child, index) in item.free_material_order.goods"
class=
"ma-item one-item flex-h flex-vc"
:key=
"index"
v-for=
"(item, index) in expend_detail.list"
>
:key=
"index"
<div
class=
"one one1 text-line-one"
>
免费
</div>
>
<div
class=
"one one2 flex-h"
>
<div
class=
"one one1 one_title text-line-one"
>
<div
class=
"_one text-line-one"
@
click=
"showAll(item,$event)"
>
{{
child
.
goods_name
}}
</div>
{{
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
item
.
parent_detail
</div>
?
item
.
parent_detail
.
goods_name
<!--
<div
class=
"one one2 text-line-one"
>
{{
child
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
:
'
其它
'
<div
class=
"one one3 text-line-one"
>
¥0
</div>
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
item
.
is_free
==
2
?
item
.
good_detail
.
goods_name
:
item
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
item
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
item
.
price
}}
</div>
</div>
<div
class=
"hc_total"
>
共计
{{
expend_detail
.
number
}}
件,总价: ¥
{{
expend_detail
.
price
}}
</div>
<div
class=
"sure-btn"
@
click=
"cancel"
>
确定
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</van-popup>
</div>
<!-- 选择开始日期弹窗 -->
<div
class=
"btn flex-h flex-hr"
>
<van-popup
v-model=
"showStart"
round
position=
"bottom"
>
<div
<van-datetime-picker
v-if=
"item.is_can_remark_material==1"
v-model=
"currentDate"
class=
"btn-item bz-btn"
type=
"date"
@
click=
"bz_click(item)"
title=
"选择年月日"
>
备注耗材
</div>
:min-date=
"startObj.minDate"
<div
:max-date=
"startObj.maxDate"
v-if=
"item.is_can_confirm_complete==1"
@
confirm=
"birConfirm"
class=
"btn-item qr-btn"
@
cancel=
"birCancel"
@
click=
"sure_click(item, index)"
:formatter=
"formatter"
>
确认完成
</div>
/>
<div
</van-popup>
v-if=
"item.is_can_initiate_charge==1"
<!-- 选择截止日期弹窗 -->
class=
"btn-item sf-btn"
<van-popup
v-model=
"showEnd"
round
position=
"bottom"
>
@
click=
"tz_charge(item.id)"
<van-datetime-picker
>
发起收费
</div>
v-model=
"currentDate"
<div
type=
"date"
v-if=
"item.is_can_initiate_transfer_order==1"
title=
"选择年月日"
class=
"btn-item"
:min-date=
"endObj.minDate"
@
click=
"zd_click(item)"
:max-date=
"endObj.maxDate"
>
发起转单
</div>
@
confirm=
"endTimeConfirm"
<div
v-if=
"item.is_can_back==1"
class=
"btn-item"
@
click=
"back_click(item)"
>
发起退回
</div>
@
cancel=
"endTimeCancel"
<div
:formatter=
"formatter"
v-if=
"item.is_can_begin_repair==1"
/>
class=
"btn-item"
</van-popup>
@
click=
"starRepir(item.id,index)"
<!-- tabbar -->
>
开始维修
</div>
<my-tabbar
curname=
"home"
></my-tabbar>
<!--
<div
</div>
v-if=
"item.is_can_see_appraisal==1"
class=
"btn-item"
@
click=
"look_comment(item)"
>
查看评价
</div>
-->
<div
v-if=
"item.is_can_see_material==1"
class=
"btn-item sf-btn"
@
click=
"look_click(item)"
>
查看耗材
</div>
</div>
</div>
<!-- 空数据 -->
</van-list>
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
</van-pull-refresh>
<div
class=
"blank"
></div>
<!-- 发起转单弹窗 -->
<van-popup
v-model=
"zdShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注转单原因
</div>
<textarea
placeholder=
"请输入转单理由"
maxlength=
"20"
v-model=
"reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"zd_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 发起退回弹窗 -->
<van-popup
v-model=
"backShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注退回原因
</div>
<textarea
placeholder=
"请输入退回理由"
maxlength=
"100"
v-model=
"back_reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"back_cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"back_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 备注耗材弹窗 -->
<van-popup
v-model=
"hcShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注耗材
</div>
<div
class=
"list-item"
v-for=
"(item,index) in addList"
:key=
"index"
>
<input
class=
"input"
maxlength=
"20"
v-model=
"item.goods_name"
type=
"text"
placeholder=
"请输入耗材名称"
/>
<!--
<input
class=
"input"
maxlength=
"3"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
/>
-->
<van-field
class=
"hc_field"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
maxlength=
"3"
/>
</div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增
</div>
</div>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"bz_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 查看耗材弹窗 -->
<van-popup
v-model=
"lookShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
查看耗材
</div>
<div
class=
"tc_line"
></div>
<div
class=
"ma-item one-item flex-h flex-vc"
v-for=
"(item, index) in expend_detail.list"
:key=
"index"
>
<div
class=
"one one1 one_title text-line-one"
>
{{
item
.
parent_detail
?
item
.
parent_detail
.
goods_name
:
'
其它
'
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
>
{{
item
.
is_free
==
2
?
item
.
good_detail
.
goods_name
:
item
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
item
.
number
}}
</div>
</div>
<div
class=
"one one3"
>
¥
{{
item
.
price
}}
</div>
</div>
<div
class=
"hc_total"
>
共计
{{
expend_detail
.
number
}}
件,总价: ¥
{{
expend_detail
.
price
}}
</div>
<div
class=
"sure-btn"
@
click=
"cancel"
>
确定
</div>
</div>
</van-popup>
<!-- 选择开始日期弹窗 -->
<van-popup
v-model=
"showStart"
round
position=
"bottom"
>
<van-datetime-picker
v-model=
"currentDate"
type=
"date"
title=
"选择年月日"
:min-date=
"startObj.minDate"
:max-date=
"startObj.maxDate"
@
confirm=
"birConfirm"
@
cancel=
"birCancel"
:formatter=
"formatter"
/>
</van-popup>
<!-- 选择截止日期弹窗 -->
<van-popup
v-model=
"showEnd"
round
position=
"bottom"
>
<van-datetime-picker
v-model=
"currentDate"
type=
"date"
title=
"选择年月日"
:min-date=
"endObj.minDate"
:max-date=
"endObj.maxDate"
@
confirm=
"endTimeConfirm"
@
cancel=
"endTimeCancel"
:formatter=
"formatter"
/>
</van-popup>
<!-- tabbar -->
<my-tabbar
curname=
"home"
></my-tabbar>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
myTabbar
from
'
@components/common/tabbar.vue
'
import
myTabbar
from
'
@components/common/tabbar.vue
'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
import
{
ImagePreview
,
Toast
}
from
'
vant
'
;
import
{
ImagePreview
}
from
'
vant
'
import
{
share
}
from
'
@/api/wxShare.js
'
import
{
share
}
from
'
@/api/wxShare.js
'
import
{
REFRESH_LIST
,
getLocalStorage
,
removeLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
export
default
{
name
:
'
home
'
,
name
:
'
home
'
,
components
:
{
components
:
{
...
@@ -336,42 +371,42 @@ export default {
...
@@ -336,42 +371,42 @@ export default {
],
// 添加的备注耗材数据
],
// 添加的备注耗材数据
hcShow
:
false
,
// 耗材弹窗
hcShow
:
false
,
// 耗材弹窗
lookShow
:
false
,
// 查看耗材弹窗
lookShow
:
false
,
// 查看耗材弹窗
expend_detail
:
{},
// 耗材详情
expend_detail
:
{},
// 耗材详情
user
:
''
,
user
:
''
,
startTime
:
'
请选择开始日期
'
,
startTime
:
'
请选择开始日期
'
,
showStart
:
false
,
showStart
:
false
,
startObj
:{
startObj
:
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
},
},
endObj
:{
endObj
:
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
},
},
currentDate
:
new
Date
(),
currentDate
:
new
Date
(),
showEnd
:
false
,
showEnd
:
false
,
endTime
:
"
请选择截止日期
"
,
endTime
:
'
请选择截止日期
'
,
backShow
:
false
,
//
工人退回弹窗
backShow
:
false
,
//
工人退回弹窗
back_reason
:
''
,
//
工人退回原因
back_reason
:
''
//
工人退回原因
}
}
},
},
created
()
{
created
()
{
share
()
share
()
this
.
getList
()
//
this.getList()
this
.
getUserInfo
()
//
this.getUserInfo()
},
},
methods
:
{
methods
:
{
back_click
(
item
)
{
back_click
(
item
)
{
this
.
curItem
=
item
this
.
curItem
=
item
this
.
back_reason
=
''
this
.
back_reason
=
''
this
.
backShow
=
true
this
.
backShow
=
true
},
},
back_cancel
()
{
back_cancel
()
{
this
.
backShow
=
false
this
.
backShow
=
false
},
},
//
发起退回
//
发起退回
back_submit
()
{
back_submit
()
{
if
(
this
.
back_reason
===
''
)
{
if
(
this
.
back_reason
===
''
)
{
this
.
$toast
(
'
退回原因不可为空
'
)
this
.
$toast
(
'
退回原因不可为空
'
)
return
return
}
}
...
@@ -387,93 +422,92 @@ export default {
...
@@ -387,93 +422,92 @@ export default {
const
idx
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
this
.
curItem
.
id
)
const
idx
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
this
.
curItem
.
id
)
if
(
idx
!==
-
1
)
{
if
(
idx
!==
-
1
)
{
this
.
list
.
splice
(
idx
,
1
)
this
.
list
.
splice
(
idx
,
1
)
this
.
count
=
this
.
count
-
1
this
.
count
=
this
.
count
-
1
}
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
backShow
=
false
this
.
backShow
=
false
})
})
},
},
showAll
(
item
,
e
)
{
showAll
(
item
,
e
)
{
this
.
$toast
(
e
.
target
.
innerHTML
,
{
this
.
$toast
(
e
.
target
.
innerHTML
,
{
duration
:
0
duration
:
0
})
})
},
},
callPhone
(
item
)
{
callPhone
(
item
)
{
console
.
log
(
'
电话
'
,
item
)
console
.
log
(
'
电话
'
,
item
)
le
t
phoneNumber
=
item
.
telephone
cons
t
phoneNumber
=
item
.
telephone
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
},
},
onmore
()
{
onmore
()
{
this
.
getList
()
this
.
getList
()
},
},
preview
(
img
,
index
)
{
preview
(
img
,
index
)
{
let
temp
=
img
.
map
(
item
=>
{
const
temp
=
img
.
map
(
item
=>
{
return
item
.
url
return
item
.
url
})
})
ImagePreview
({
ImagePreview
({
images
:
temp
,
images
:
temp
,
startPosition
:
index
,
startPosition
:
index
})
;
})
},
},
endShow
()
{
endShow
()
{
this
.
showEnd
=
true
this
.
showEnd
=
true
},
},
stShow
()
{
stShow
()
{
this
.
showStart
=
true
this
.
showStart
=
true
},
},
formatter
(
type
,
val
)
{
formatter
(
type
,
val
)
{
if
(
type
===
'
year
'
)
{
if
(
type
===
"
year
"
)
{
return
`
${
val
}
年`
return
`
${
val
}
年`
;
}
else
if
(
type
===
'
month
'
)
{
}
else
if
(
type
===
"
month
"
)
{
return
`
${
val
}
月`
return
`
${
val
}
月`
;
}
else
if
(
type
===
'
day
'
)
{
}
else
if
(
type
===
"
day
"
)
{
return
`
${
val
}
日`
return
`
${
val
}
日`
;
}
}
return
val
;
return
val
},
},
birConfirm
(
value
)
{
birConfirm
(
value
)
{
this
.
showStart
=
false
this
.
showStart
=
false
if
(
this
.
startTime
==
this
.
conversionTime
(
value
))
{
if
(
this
.
startTime
==
this
.
conversionTime
(
value
))
{
return
return
}
}
console
.
log
(
'
啊啊啊
'
,
value
);
console
.
log
(
'
啊啊啊
'
,
value
)
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
$set
(
this
.
endObj
,
'
minDate
'
,
value
)
this
.
$set
(
this
.
endObj
,
'
minDate
'
,
value
)
this
.
anginList
()
this
.
anginList
()
console
.
log
(
'
开始时间
'
,
this
.
startTime
);
console
.
log
(
'
开始时间
'
,
this
.
startTime
)
},
},
conversionTime
(
temp
)
{
conversionTime
(
temp
)
{
let
mounth
=
(
temp
.
getMonth
()
+
1
)
<
10
?
'
0
'
+
(
temp
.
getMonth
()
+
1
)
:
(
temp
.
getMonth
()
+
1
)
const
mounth
=
(
temp
.
getMonth
()
+
1
)
<
10
?
'
0
'
+
(
temp
.
getMonth
()
+
1
)
:
(
temp
.
getMonth
()
+
1
)
let
date
=
temp
.
getDate
()
<
10
?
'
0
'
+
temp
.
getDate
()
:
temp
.
getDate
()
const
date
=
temp
.
getDate
()
<
10
?
'
0
'
+
temp
.
getDate
()
:
temp
.
getDate
()
return
temp
.
getFullYear
()
+
return
temp
.
getFullYear
()
+
"
-
"
+
'
-
'
+
mounth
+
mounth
+
"
-
"
+
'
-
'
+
date
date
},
},
birCancel
()
{
birCancel
()
{
this
.
showStart
=
false
;
this
.
showStart
=
false
},
},
endTimeConfirm
(
value
)
{
endTimeConfirm
(
value
)
{
this
.
showEnd
=
false
this
.
showEnd
=
false
if
(
this
.
endTime
==
this
.
conversionTime
(
value
))
{
if
(
this
.
endTime
==
this
.
conversionTime
(
value
))
{
return
return
}
}
this
.
endTime
=
this
.
conversionTime
(
value
)
this
.
endTime
=
this
.
conversionTime
(
value
)
this
.
$set
(
this
.
startObj
,
'
maxDate
'
,
value
)
this
.
$set
(
this
.
startObj
,
'
maxDate
'
,
value
)
this
.
anginList
()
this
.
anginList
()
console
.
log
(
'
结束时间
'
,
this
.
endTime
);
console
.
log
(
'
结束时间
'
,
this
.
endTime
)
},
},
endTimeCancel
()
{
endTimeCancel
()
{
this
.
showEnd
=
false
;
this
.
showEnd
=
false
},
},
anginList
()
{
anginList
()
{
if
(
this
.
startTime
!=
'
请选择开始日期
'
&&
this
.
endTime
!=
'
请选择截止日期
'
)
{
if
(
this
.
startTime
!=
'
请选择开始日期
'
&&
this
.
endTime
!=
'
请选择截止日期
'
)
{
this
.
initData
()
this
.
initData
()
this
.
getList
()
this
.
getList
()
}
}
},
},
// 初始化
// 初始化
initData
()
{
initData
()
{
...
@@ -484,7 +518,7 @@ export default {
...
@@ -484,7 +518,7 @@ export default {
this
.
isloading
=
false
this
.
isloading
=
false
this
.
loading
=
false
this
.
loading
=
false
this
.
finished
=
false
this
.
finished
=
false
this
.
getUserInfo
()
//
this.getUserInfo()
},
},
getStatus
()
{
getStatus
()
{
this
.
$http
this
.
$http
...
@@ -493,34 +527,35 @@ export default {
...
@@ -493,34 +527,35 @@ export default {
console
.
log
(
res
)
console
.
log
(
res
)
this
.
status
=
res
this
.
status
=
res
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
getUserInfo
()
{
getUserInfo
()
{
this
.
$http
this
.
$http
.
get
(
this
.
$myApi
.
USERINFO
)
.
get
(
this
.
$myApi
.
USERINFO
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
user
=
res
this
.
user
=
res
this
.
getList
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
// 获取工单列表
// 获取工单列表
getList
()
{
getList
()
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
this
.
isloading
=
true
this
.
isloading
=
true
let
curParams
=
{}
let
curParams
=
{}
if
(
this
.
curSelect
.
type
==
4
)
{
if
(
this
.
curSelect
.
type
==
4
)
{
curParams
=
{
curParams
=
{
time_type
:
this
.
curSelect
.
type
,
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
page
:
this
.
page
,
limit
:
this
.
limit
,
limit
:
this
.
limit
,
start
:
this
.
startTime
,
start
:
this
.
startTime
,
end
:
this
.
endTime
,
end
:
this
.
endTime
}
}
}
else
{
}
else
{
curParams
=
{
curParams
=
{
time_type
:
this
.
curSelect
.
type
,
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
page
:
this
.
page
,
limit
:
this
.
limit
,
limit
:
this
.
limit
}
}
}
}
this
.
$http
this
.
$http
...
@@ -533,7 +568,8 @@ export default {
...
@@ -533,7 +568,8 @@ export default {
this
.
isloading
=
false
this
.
isloading
=
false
this
.
count
=
data
.
count
this
.
count
=
data
.
count
this
.
loading
=
false
this
.
loading
=
false
this
.
finished
=
!
data
.
more
;
this
.
finished
=
!
data
.
more
removeLocalStorage
(
REFRESH_LIST
)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
locked
=
false
this
.
locked
=
false
...
@@ -558,18 +594,18 @@ export default {
...
@@ -558,18 +594,18 @@ export default {
this
.
curSelect
=
item
this
.
curSelect
=
item
this
.
tabShow
=
false
this
.
tabShow
=
false
if
(
this
.
curSelect
.
type
==
4
)
{
if
(
this
.
curSelect
.
type
==
4
)
{
this
.
startTime
=
'
请选择开始日期
'
this
.
startTime
=
'
请选择开始日期
'
this
.
endTime
=
'
请选择截止日期
'
this
.
endTime
=
'
请选择截止日期
'
this
.
startObj
=
{
this
.
startObj
=
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
}
}
this
.
endObj
=
{
this
.
endObj
=
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
}
}
return
return
}
}
this
.
initData
()
this
.
initData
()
this
.
getList
()
this
.
getList
()
...
@@ -587,7 +623,7 @@ export default {
...
@@ -587,7 +623,7 @@ export default {
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
vm
.
$set
(
vm
.
list
,
index
,
data
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
// 转单弹窗
// 转单弹窗
zd_click
(
item
)
{
zd_click
(
item
)
{
...
@@ -613,7 +649,7 @@ export default {
...
@@ -613,7 +649,7 @@ export default {
const
idx
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
this
.
curItem
.
id
)
const
idx
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
this
.
curItem
.
id
)
if
(
idx
!==
-
1
)
{
if
(
idx
!==
-
1
)
{
this
.
list
.
splice
(
idx
,
1
)
this
.
list
.
splice
(
idx
,
1
)
this
.
count
=
this
.
count
-
1
this
.
count
=
this
.
count
-
1
}
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
@@ -626,7 +662,7 @@ export default {
...
@@ -626,7 +662,7 @@ export default {
this
.
curItem
=
item
this
.
curItem
=
item
// 默认为一个空数据
// 默认为一个空数据
this
.
addList
=
[{
this
.
addList
=
[{
goods_name
:
''
,
goods_name
:
''
,
number
:
''
number
:
''
}]
}]
this
.
hcShow
=
true
this
.
hcShow
=
true
...
@@ -669,15 +705,15 @@ export default {
...
@@ -669,15 +705,15 @@ export default {
this
.
$http
this
.
$http
.
post
(
this
.
$myApi
.
MATERIAL_REMARK
,
curParams
)
.
post
(
this
.
$myApi
.
MATERIAL_REMARK
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
hcShow
=
false
this
.
hcShow
=
false
// setTimeout(()=>{
// setTimeout(()=>{
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
addList
=
[{
this
.
addList
=
[{
goods_name
:
''
,
goods_name
:
''
,
number
:
''
number
:
''
}]
}]
vm
.
$set
(
vm
.
list
,
index
,
data
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
// },800)
// },800)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
hcShow
=
false
this
.
hcShow
=
false
...
@@ -696,7 +732,7 @@ export default {
...
@@ -696,7 +732,7 @@ export default {
this
.
expend_detail
=
data
this
.
expend_detail
=
data
this
.
lookShow
=
true
this
.
lookShow
=
true
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
// 查看评论
// 查看评论
look_comment
(
item
)
{
look_comment
(
item
)
{
...
@@ -736,9 +772,9 @@ export default {
...
@@ -736,9 +772,9 @@ export default {
vm
.
$set
(
vm
.
list
,
index
,
data
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
// 取消按钮
// 取消按钮
...
@@ -751,14 +787,40 @@ export default {
...
@@ -751,14 +787,40 @@ export default {
tz_charge
(
id
)
{
tz_charge
(
id
)
{
console
.
log
(
id
,
'
jaeofne
'
)
console
.
log
(
id
,
'
jaeofne
'
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/charge
'
,
name
:
'
charge
'
,
query
:
{
id
}
query
:
{
id
:
id
}
})
})
},
fetchData
(
to
,
from
)
{
console
.
log
(
from
.
path
,
'
from----------------
'
)
if
(
from
.
path
!==
undefined
&&
from
.
path
.
indexOf
(
'
/charge
'
)
!==
-
1
)
{
console
.
log
(
!
this
.
list
.
length
,
'
!this.list.length-------
'
,
this
.
list
)
console
.
log
(
getLocalStorage
(
REFRESH_LIST
),
'
getLocalStorage(REFRESH_LIST)-------
'
)
if
(
!
this
.
list
.
length
||
getLocalStorage
(
REFRESH_LIST
))
{
this
.
initData
()
this
.
getList
()
}
}
else
{
this
.
initData
()
this
.
getUserInfo
()
}
}
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
console
.
log
(
this
.
list
,
'
this.list-------------
'
)
// return
next
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/tabbar/index.scss"
;
@import
'@assets/styles/tabbar/index.scss'
;
</
style
>
</
style
>
src/views/tabbar/admin_home.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
class=
"cont"
>
<div
class=
"cont"
>
<div
class=
"menu flex-h flex-hb flex-vc"
>
<div
class=
"menu flex-h flex-hb flex-vc"
>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"flex-h flex-hb"
>
<div
class=
"flex-h flex-hb"
>
<div
class=
"options"
>
<div
class=
"options"
>
<div
@
click=
"chooseStatus"
>
{{
curSelectStatus
.
name
}}
</div>
<div
@
click=
"chooseStatus"
>
{{
curSelectStatus
.
name
}}
</div>
<div
class=
"option-box"
v-show=
"statusShow"
>
<div
class=
"option-box"
v-show=
"statusShow"
>
<div
<div
class=
"option-item"
class=
"option-item"
v-for=
"item in statusList"
v-for=
"item in statusList"
:key=
"item.statustype"
:key=
"item.statustype"
:value=
"item.name"
:value=
"item.name"
@
click=
"changeStatus(item)"
@
click=
"changeStatus(item)"
>
{{
item
.
name
}}
</div>
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
<div
class=
"options"
>
<div
@
click=
"chooseTab"
>
{{
curSelect
.
name
}}
</div>
<div
class=
"option-box"
v-show=
"tabShow"
>
<div
class=
"option-item"
v-for=
"item in optionList"
:key=
"item.type"
:value=
"item.name"
@
click=
"changeItem(item)"
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"options"
>
<div
class=
"date flex-h flex-hb flex-vc"
v-if=
"this.curSelect.type==4"
>
<div
@
click=
"chooseTab"
>
{{
curSelect
.
name
}}
</div>
<div
class=
"start"
@
click=
"stShow"
>
{{
startTime
}}
</div>
<div
class=
"option-box"
v-show=
"tabShow"
>
<div
class=
"blue"
></div>
<div
<div
class=
"end"
@
click=
"endShow"
>
{{
endTime
}}
</div>
class=
"option-item"
v-for=
"item in optionList"
:key=
"item.type"
:value=
"item.name"
@
click=
"changeItem(item)"
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"date flex-h flex-hb flex-vc"
v-if=
"this.curSelect.type==4"
>
<div
class=
"start"
@
click=
"stShow"
>
{{
startTime
}}
</div>
<div
class=
"blue"
></div>
<div
class=
"end"
@
click=
"endShow"
>
{{
endTime
}}
</div>
</div>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<van-list
<van-list
v-model=
"loading"
v-model=
"loading"
:finished=
"finished"
:finished=
"finished"
finished-text=
"没有更多了~"
finished-text=
"没有更多了~"
@
load=
"onmore"
@
load=
"onmore"
v-if=
"list.length"
v-if=
"list.length"
>
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"index"
>
<!-- 选择工人弹窗 -->
<!-- 选择工人弹窗 -->
<van-popup
v-model=
"item.showWorker"
round
>
<van-popup
v-model=
"item.showWorker"
round
>
<!--
<van-picker
<!--
<van-picker
show-toolbar
show-toolbar
:columns=
"columns"
:columns=
"columns"
value-key=
"name"
value-key=
"name"
@
cancel=
"Cancel(index)"
@
cancel=
"Cancel(index)"
@
confirm=
"(value)=>onConfirm(value,index)"
@
confirm=
"(value)=>onConfirm(value,index)"
/>
-->
/>
-->
<div
class=
"tc-box"
>
<div
class=
"tc-box"
>
<div
class=
"tc-title"
>
选择工人
</div>
<div
class=
"tc-title"
>
选择工人
</div>
<div
class=
"workers"
>
<div
class=
"workers"
>
<div
class=
"gr-item"
v-for=
"(child_item,child_index) in columns"
:key=
"child_index"
>
<div
<div
class=
"bm-item"
>
{{
child_item
.
name
}}
</div>
class=
"gr-item"
<div
v-if=
"child_item.user.length"
>
v-for=
"(child_item,child_index) in columns"
:key=
"child_index"
>
<div
class=
"bm-item"
>
{{
child_item
.
name
}}
</div>
<div
v-if=
"child_item.user.length"
>
<div
class=
"people-item flex-h flex-vc flex-hb"
v-for=
"(lchild_item,lchild_index) in child_item.user"
:key=
"lchild_index"
@
click=
"chooseWorker(lchild_item,lchild_index,index)"
>
<div
class=
"flex-h flex-vc"
>
<img
class=
"gr-img"
:src=
"grImg"
/>
<div
class=
"gr-name"
v-if=
"lchild_item.repired_count !== 0 || lchild_item.repiring_count !== 0"
>
{{
lchild_item
.
name
}}
(已派工:
{{
lchild_item
.
repired_count
}}
;维修中:
{{
lchild_item
.
repiring_count
}}
)
</div>
<div
class=
"gr-name"
v-else
>
{{
lchild_item
.
name
}}
(休息中)
</div>
</div>
<img
class=
"k-img"
:src=
"item.temporaryId && item.temporaryId.includes(lchild_item.id) ? selectImg : unselectImg"
/>
</div>
</div>
<div
v-else
class=
"none"
>
暂无员工
</div>
</div>
</div>
<div
class=
"allBtn btn-box flex-h flex-hc"
>
<div
class=
"button"
@
click=
"Cancel(index)"
>
取消
</div>
<div
class=
"button sureBtn"
@
click=
"keyConfirm(index)"
>
确定
</div>
</div>
</div>
</van-popup>
<div
class=
"title"
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
预约时间:
</div>
<div
class=
"item-desc"
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
<div
class=
"people-item flex-h flex-vc flex-hb"
class=
"item-desc que-desc"
v-for=
"(lchild_item,lchild_index) in child_item.user"
>
{{
item
.
repair_type
.
type_name
}}
-
{{
item
.
description
}}
</div>
:key=
"lchild_index"
<div
class=
"item flex-h flex-start"
>
@
click=
"chooseWorker(lchild_item,lchild_index,index)"
<div
class=
"item-title"
>
服务地址:
</div>
>
<div
class=
"flex-h flex-vc"
>
<img
class=
"gr-img"
:src=
gr_img
/>
<div
<div
class=
"gr-name"
class=
"item-desc"
v-if=
"lchild_item.repired_count !== 0 || lchild_item.repiring_count !== 0"
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
>
{{
lchild_item
.
name
}}
(已派工:
{{
lchild_item
.
repired_count
}}
;维修中:
{{
lchild_item
.
repiring_count
}}
)
</div>
<div
class=
"gr-name"
v-else
>
{{
lchild_item
.
name
}}
(休息中)
</div>
</div>
<img
class=
"k-img"
:src=
"item.temporaryId && item.temporaryId.includes(lchild_item.id) ? select_img : unselect_img"
/>
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
v-else
class=
"none"
>
暂无员工
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
</div>
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
</div>
</div>
<div
class=
"allBtn btn-box flex-h flex-hc"
>
<!--
<a
:href=
"'tel' + item.telephone"
>
{{
item
.
telephone
}}
</a>
-->
<div
class=
"button"
@
click=
"Cancel(index)"
>
取消
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"button sureBtn"
@
click=
"keyConfirm(index)"
>
确定
</div>
<div
class=
"item-title"
>
联系电话:
</div>
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(item)"
>
{{
item
.
telephone
}}
</div>
</div>
</div>
</van-popup>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title"
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-desc"
>
{{
item
.
created_at
}}
</div>
<div
class=
"item-title"
>
预约时间:
</div>
</div>
<div
<div
class=
"item flex-h flex-start"
>
class=
"item-desc"
<div
class=
"item-title"
>
图片详情:
</div>
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
<div
</div>
@
click=
"preview(item.image,child_i)"
<div
class=
"item-title"
>
问题描述:
</div>
class=
"img flex-h"
<div
class=
"item-desc que-desc"
>
{{
item
.
repair_type
.
type_name
}}
-
{{
item
.
description
}}
</div>
v-for=
"(child, child_i) in item.image"
<div
class=
"item flex-h flex-start"
>
:key=
"child_i"
<div
class=
"item-title"
>
服务地址:
</div>
>
<div
<img
:src=
"child.url"
alt
/>
class=
"item-desc"
</div>
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
</div>
</div>
<div
class=
"material"
v-if=
"item.no_pay_order"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title bz-title specile-text"
>
待支付耗材:
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
class=
"no-pay ma-item flex-h flex-hb"
</div>
v-for=
"(child, index) in item.no_pay_order.goods"
<!--
<a
:href=
"'tel' + item.telephone"
>
{{
item
.
telephone
}}
</a>
-->
:key=
"index"
<div
class=
"item flex-h flex-vc"
>
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(item)"
>
{{
item
.
telephone
}}
</div>
<div
class=
"one one2 flex-h"
>
</div>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
<div
class=
"item-title"
>
提交时间:
</div>
</div>
<div
class=
"item-desc"
>
{{
item
.
created_at
}}
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item_line"
></div>
<div
class=
"item-title"
>
图片详情:
</div>
</div>
<div
<div
class=
"material"
v-if=
"item.pay_order != ''"
>
@
click=
"preview(item.image,child_i)"
<div
class=
"item-title bz-title"
>
已支付耗材:
</div>
class=
"img flex-h"
<div
v-for=
"(parent, index) in item.pay_order"
:key=
"index"
>
v-for=
"(child, child_i) in item.image"
<div
:key=
"child_i"
class=
"ma-item flex-h flex-hb"
>
v-for=
"(child, index) in parent.goods"
<img
:src=
"child.url"
alt
/>
:key=
"index"
</div>
>
</div>
<div
<div
class=
"material"
v-if=
"item.no_pay_order"
>
class=
"one one1 text-line-one"
<div
class=
"item-title bz-title"
>
待支付耗材
</div>
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
<!--
<div
class=
"one"
>
{{
child
.
good_detail
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
class=
"no-pay ma-item flex-h flex-hb"
<div
class=
"one one2 flex-h"
>
v-for=
"(child, index) in item.no_pay_order.goods"
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
:key=
"index"
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
>
</div>
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
<div
class=
"one one2 flex-h"
>
</div>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
<div
class=
"item_line"
></div>
</div>
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
<!--
<div
class=
"line"
></div>
-->
</div>
<div
class=
"material"
v-if=
"item.free_material_order"
>
<div
class=
"item_line"
></div>
<div
class=
"item-title bz-title"
>
备注耗材:
</div>
</div>
<div
<div
class=
"material"
v-if=
"item.pay_order != ''"
>
class=
"ma-item flex-h flex-hb"
<div
class=
"item-title bz-title"
>
已支付耗材
</div>
v-for=
"(child, index) in item.free_material_order.goods"
<div
v-for=
"(parent, index) in item.pay_order"
:key=
"index"
>
:key=
"index"
<div
>
class=
"ma-item flex-h flex-hb"
<div
class=
"one one1 text-line-one"
>
免费
</div>
v-for=
"(child, index) in parent.goods"
<div
class=
"one one2 flex-h"
>
:key=
"index"
<div
>
class=
"_one text-line-one"
<div
class=
"one one1 text-line-one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
@
click=
"showAll(item,$event)"
<!--
<div
class=
"one"
>
{{
child
.
good_detail
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
>
{{
child
.
goods_name
}}
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
<div
class=
"_one text-line-one"
>
{{
child
.
good_detail
.
goods_name
}}
</div>
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
<!--
<div
class=
"one one2 text-line-one"
>
{{
child
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
</div>
<div
class=
"one one3 text-line-one"
>
¥0
</div>
<div
class=
"one one3"
>
¥
{{
child
.
price
}}
</div>
</div>
</div>
<div
class=
"item_line"
></div>
</div>
</div>
<div
class=
"item_line"
></div>
<div
class=
"item flex-h flex-start"
v-if=
"item.orderlog_transfer"
>
</div>
<div
class=
"item-title"
>
转单备注:
</div>
<!--
<div
class=
"line"
></div>
-->
<div
class=
"item-desc"
>
{{
item
.
orderlog_transfer
.
remark
}}
</div>
<div
class=
"material"
v-if=
"item.free_material_order"
>
</div>
<div
class=
"item-title bz-title"
>
备注耗材
</div>
<div
class=
"item flex-h flex-start"
v-if=
"item.orderlog_cancel"
>
<div
<div
class=
"item-title"
>
退回备注:
</div>
class=
"ma-item flex-h flex-hb"
<div
class=
"item-desc"
>
{{
item
.
orderlog_cancel
.
remark
}}
</div>
v-for=
"(child, index) in item.free_material_order.goods"
</div>
:key=
"index"
<!--
<div
v-if=
"item.worker"
>
>
<div
class=
"one one1 text-line-one"
>
免费
</div>
<div
class=
"one one2 flex-h"
>
<div
class=
"_one text-line-one"
@
click=
"showAll(item,$event)"
>
{{
child
.
goods_name
}}
</div>
<div
class=
"_two text-line-one"
>
*
{{
child
.
number
}}
</div>
</div>
<!--
<div
class=
"one one2 text-line-one"
>
{{
child
.
goods_name
}}
*
{{
child
.
number
}}
</div>
-->
<div
class=
"one one3 text-line-one"
>
¥0
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"item.orderlog_transfer"
>
<div
class=
"item-title"
>
转单备注:
</div>
<div
class=
"item-desc"
>
{{
item
.
orderlog_transfer
.
remark
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"item.orderlog_cancel"
>
<div
class=
"item-title"
>
退回备注:
</div>
<div
class=
"item-desc"
>
{{
item
.
orderlog_cancel
.
remark
}}
</div>
</div>
<!--
<div
v-if=
"item.worker"
>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-title"
>
派工对象:
</div>
...
@@ -198,109 +212,116 @@
...
@@ -198,109 +212,116 @@
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
</div>
</div>
</div>
-->
</div>
-->
<div
v-if=
"item.work_name"
>
<div
v-if=
"item.work_name"
>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-desc"
>
{{
item
.
work_name
}}
</div>
<div
class=
"item-desc"
>
{{
item
.
work_name
}}
</div>
</div>
</div>
</div>
</div>
<div
v-if=
"item.is_can_assign_worker==1"
>
<div
v-if=
"item.is_can_assign_worker==1"
>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
<div
v-if=
"item.is_can_assign_worker==1"
v-if=
"item.is_can_assign_worker==1"
class=
"item flex-h flex-vc flex-hb"
class=
"item flex-h flex-vc flex-hb"
@
click=
"workers(index)"
@
click=
"workers(index)"
>
>
<div
class=
"wo flex-h flex-vc"
>
<div
class=
"wo flex-h flex-vc"
>
<div
class=
"item-title"
v-if=
"item.order_status_display == '已派工'"
>
重新派工:
</div>
<div
<div
class=
"item-title"
v-else
>
派工对象:
</div>
class=
"item-title"
<div
class=
"item-desc worker-name"
>
{{
item
.
realName
}}
</div>
v-if=
"item.order_status_display == '已派工'"
</div>
>
重新派工:
</div>
<div
class=
"flex-h flex-vc"
>
<div
class=
"item-title"
v-else
>
派工对象:
</div>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"item-desc worker-name"
>
{{
item
.
realName
}}
</div>
<div
class=
"select_txt"
>
选择
</div>
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
<div
class=
"flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select_txt"
>
选择
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
</div>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"allBtn flex-h flex-hr"
>
<div
v-if=
"item.is_can_assign_worker==1"
class=
"button sureBtn"
@
click=
"sureOrder(item,index)"
>
确定
</div>
<div
v-if=
"item.is_can_cancel==1"
class=
"button"
@
click=
"cancelOrder(item)"
>
取消
</div>
</div>
</div>
</div>
</van-list>
<!-- 空数据 -->
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
</van-pull-refresh>
<div
class=
"blank"
></div>
<!-- 取消工单原因弹窗 -->
<van-popup
v-model=
"qxShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注取消原因
</div>
<textarea
placeholder=
"请输入取消原因"
v-model=
"reason"
maxlength=
"100"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"qx_submit"
>
提交
</div>
</div>
</div>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"allBtn flex-h flex-hr"
>
<div
v-if=
"item.is_can_assign_worker==1"
class=
"button sureBtn"
@
click=
"sureOrder(item,index)"
>
确定
</div>
<div
v-if=
"item.is_can_cancel==1"
class=
"button"
@
click=
"cancelOrder(item)"
>
取消
</div>
</div>
</div>
</div>
</van-popup>
</div>
</van-list>
<!-- 空数据 -->
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
</van-pull-refresh>
<div
class=
"blank"
></div>
<!-- 取消工单原因弹窗 -->
<van-popup
v-model=
"qxShow"
close-icon=
"close"
>
<div
class=
"cancel_cont"
>
<div
class=
"pop_title"
>
备注取消原因
</div>
<textarea
placeholder=
"请输入取消原因"
v-model=
"reason"
maxlength=
"100"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"qx_submit"
>
提交
</div>
</div>
</div>
</van-popup>
<!-- 选择开始日期弹窗 -->
<!-- 选择开始日期弹窗 -->
<van-popup
v-model=
"showStart"
round
position=
"bottom"
>
<van-popup
v-model=
"showStart"
round
position=
"bottom"
>
<van-datetime-picker
<van-datetime-picker
v-model=
"currentDate"
v-model=
"currentDate"
type=
"date"
type=
"date"
title=
"选择年月日"
title=
"选择年月日"
:min-date=
"startObj.minDate"
:min-date=
"startObj.minDate"
:max-date=
"startObj.maxDate"
:max-date=
"startObj.maxDate"
@
confirm=
"birConfirm"
@
confirm=
"birConfirm"
@
cancel=
"birCancel"
@
cancel=
"birCancel"
:formatter=
"formatter"
:formatter=
"formatter"
/>
/>
</van-popup>
</van-popup>
<!-- 选择截止日期弹窗 -->
<!-- 选择截止日期弹窗 -->
<van-popup
v-model=
"showEnd"
round
position=
"bottom"
>
<van-popup
v-model=
"showEnd"
round
position=
"bottom"
>
<van-datetime-picker
<van-datetime-picker
v-model=
"currentDate"
v-model=
"currentDate"
type=
"date"
type=
"date"
title=
"选择年月日"
title=
"选择年月日"
:min-date=
"endObj.minDate"
:min-date=
"endObj.minDate"
:max-date=
"endObj.maxDate"
:max-date=
"endObj.maxDate"
@
confirm=
"endTimeConfirm"
@
confirm=
"endTimeConfirm"
@
cancel=
"endTimeCancel"
@
cancel=
"endTimeCancel"
:formatter=
"formatter"
:formatter=
"formatter"
/>
/>
</van-popup>
</van-popup>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
myTabbar
from
'
@components/common/tabbar.vue
'
//
import myTabbar from '@components/common/tabbar.vue'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
//
import { trimStrSpace } from '@assets/js/format.js'
import
{
ImagePreview
,
CellGroup
}
from
'
vant
'
;
import
{
ImagePreview
}
from
'
vant
'
import
select
_i
mg
from
'
@assets/images/select.png
'
import
select
I
mg
from
'
@assets/images/select.png
'
import
unselect
_i
mg
from
'
@assets/images/un_select.png
'
import
unselect
I
mg
from
'
@assets/images/un_select.png
'
import
gr
_i
mg
from
'
@assets/images/gr.png
'
import
gr
I
mg
from
'
@assets/images/gr.png
'
export
default
{
export
default
{
name
:
'
home
'
,
name
:
'
home
'
,
components
:
{
components
:
{
myTabbar
//
myTabbar
},
},
data
()
{
data
()
{
return
{
return
{
select
_i
mg
,
select
I
mg
,
unselect
_i
mg
,
unselect
I
mg
,
gr
_i
mg
,
gr
I
mg
,
reson
:
''
,
//
取消原因
reson
:
''
,
//
取消原因
qxShow
:
false
,
// 发起转单弹窗
qxShow
:
false
,
// 发起转单弹窗
workerName
:
''
,
workerName
:
''
,
worker_id
:
''
,
worker_id
:
''
,
...
@@ -308,17 +329,17 @@ export default {
...
@@ -308,17 +329,17 @@ export default {
columns
:
[],
columns
:
[],
startTime
:
'
请选择开始日期
'
,
startTime
:
'
请选择开始日期
'
,
showStart
:
false
,
showStart
:
false
,
startObj
:{
startObj
:
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
},
},
endObj
:{
endObj
:
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
},
},
currentDate
:
new
Date
(),
currentDate
:
new
Date
(),
showEnd
:
false
,
showEnd
:
false
,
endTime
:
"
请选择截止日期
"
,
endTime
:
'
请选择截止日期
'
,
// 头部日期范围筛选
// 头部日期范围筛选
tabShow
:
false
,
// tab范围选择框是否显示
tabShow
:
false
,
// tab范围选择框是否显示
curSelect
:
{
type
:
'
1
'
,
name
:
'
今日
'
},
// 当前选择的日期范围
curSelect
:
{
type
:
'
1
'
,
name
:
'
今日
'
},
// 当前选择的日期范围
...
@@ -357,62 +378,58 @@ export default {
...
@@ -357,62 +378,58 @@ export default {
// 转单
// 转单
curItem
:
''
,
// 当前选中要操作的数据
curItem
:
''
,
// 当前选中要操作的数据
reason
:
''
,
// 原因
reason
:
''
,
// 原因
currentId
:
''
,
currentId
:
''
}
}
},
},
created
()
{
this
.
getList
()
this
.
getWorkers
()
},
methods
:
{
methods
:
{
// 选择完工人点击确定按钮
// 选择完工人点击确定按钮
keyConfirm
(
i
)
{
keyConfirm
(
i
)
{
if
(
!
this
.
list
[
i
].
temporaryId
.
length
)
{
if
(
!
this
.
list
[
i
].
temporaryId
.
length
)
{
this
.
$toast
(
'
请选择工人!
'
)
this
.
$toast
(
'
请选择工人!
'
)
return
return
}
}
this
.
list
[
i
].
workerName
=
[...
this
.
list
[
i
].
temporaryName
]
this
.
list
[
i
].
workerName
=
[...
this
.
list
[
i
].
temporaryName
]
this
.
list
[
i
].
realName
=
this
.
list
[
i
].
workerName
.
length
?
this
.
list
[
i
].
workerName
.
join
(
'
,
'
)
:
''
this
.
list
[
i
].
realName
=
this
.
list
[
i
].
workerName
.
length
?
this
.
list
[
i
].
workerName
.
join
(
'
,
'
)
:
''
this
.
list
[
i
].
worker_id
=
[...
this
.
list
[
i
].
temporaryId
]
this
.
list
[
i
].
worker_id
=
[...
this
.
list
[
i
].
temporaryId
]
this
.
list
[
i
].
showWorker
=
false
this
.
list
[
i
].
showWorker
=
false
},
},
chooseWorker
(
item
,
lchild_index
,
index
)
{
chooseWorker
(
item
,
lchild_index
,
index
)
{
if
(
this
.
list
[
index
].
temporaryId
.
includes
(
item
.
id
))
{
// 删除
if
(
this
.
list
[
index
].
temporaryId
.
includes
(
item
.
id
))
{
// 删除
le
t
name_i
=
this
.
list
[
index
].
temporaryId
.
indexOf
(
item
.
id
)
cons
t
name_i
=
this
.
list
[
index
].
temporaryId
.
indexOf
(
item
.
id
)
this
.
list
[
index
].
temporaryId
.
splice
(
name_i
,
1
)
this
.
list
[
index
].
temporaryId
.
splice
(
name_i
,
1
)
this
.
list
[
index
].
temporaryName
.
splice
(
name_i
,
1
)
this
.
list
[
index
].
temporaryName
.
splice
(
name_i
,
1
)
}
else
{
// 加入
}
else
{
// 加入
this
.
list
[
index
].
temporaryId
.
push
(
item
.
id
)
this
.
list
[
index
].
temporaryId
.
push
(
item
.
id
)
this
.
list
[
index
].
temporaryName
.
push
(
item
.
name
)
this
.
list
[
index
].
temporaryName
.
push
(
item
.
name
)
}
}
},
},
onmore
()
{
onmore
()
{
this
.
getList
()
this
.
getList
()
},
},
preview
(
img
,
index
)
{
preview
(
img
,
index
)
{
let
temp
=
img
.
map
(
item
=>
{
const
temp
=
img
.
map
(
item
=>
{
return
item
.
url
return
item
.
url
})
})
ImagePreview
({
ImagePreview
({
images
:
temp
,
images
:
temp
,
startPosition
:
index
,
startPosition
:
index
})
;
})
},
},
callPhone
(
item
)
{
callPhone
(
item
)
{
console
.
log
(
'
电话
'
,
item
)
console
.
log
(
'
电话
'
,
item
)
le
t
phoneNumber
=
item
.
telephone
cons
t
phoneNumber
=
item
.
telephone
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
},
},
//指派工人
//
指派工人
sureOrder
(
item
,
index
)
{
sureOrder
(
item
,
index
)
{
const
vm
=
this
//
const vm = this
// const index = this.list.findIndex(item => item.id === this.curItem.id)
// const index = this.list.findIndex(item => item.id === this.curItem.id)
// console.log('index',index);
// console.log('index',index);
// console.log('1111',item);
// console.log('1111',item);
this
.
curItem
=
item
this
.
curItem
=
item
this
.
repair_order_id
=
item
.
id
this
.
repair_order_id
=
item
.
id
console
.
log
(
'
工人id
'
,
item
.
worker_id
);
console
.
log
(
'
工人id
'
,
item
.
worker_id
)
if
(
!
item
.
worker_id
.
length
)
{
if
(
!
item
.
worker_id
.
length
)
{
this
.
$toast
(
'
请选择工人
'
)
this
.
$toast
(
'
请选择工人
'
)
return
return
}
}
...
@@ -423,126 +440,126 @@ export default {
...
@@ -423,126 +440,126 @@ export default {
this
.
$http
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_ASSIGN
,
curParams
)
.
post
(
this
.
$myApi
.
REPAIR_ASSIGN
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
data
.
workerName
=
[]
data
.
workerName
=
[]
data
.
realName
=
''
data
.
realName
=
''
data
.
temporaryName
=
[]
data
.
temporaryName
=
[]
data
.
temporaryId
=
[]
data
.
temporaryId
=
[]
data
.
worker_id
=
[]
data
.
worker_id
=
[]
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
reason
=
''
this
.
reason
=
''
this
.
changeList
(
data
,
index
)
this
.
changeList
(
data
,
index
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
changeList
(
data
,
index
)
{
changeList
(
data
,
index
)
{
if
(
this
.
curSelectStatus
.
statustype
==
0
||
this
.
curSelectStatus
.
statustype
==
3
)
{
if
(
this
.
curSelectStatus
.
statustype
==
0
||
this
.
curSelectStatus
.
statustype
==
3
)
{
this
.
$set
(
this
.
list
,
index
,
data
)
this
.
$set
(
this
.
list
,
index
,
data
)
}
else
{
}
else
{
this
.
list
.
splice
(
index
,
1
)
this
.
list
.
splice
(
index
,
1
)
this
.
count
=
this
.
count
-
1
this
.
count
=
this
.
count
-
1
}
}
},
},
// 取消工单
// 取消工单
cancelOrder
(
item
)
{
cancelOrder
(
item
)
{
console
.
log
(
'
aaa
'
,
item
);
console
.
log
(
'
aaa
'
,
item
)
this
.
curItem
=
item
this
.
curItem
=
item
this
.
qxShow
=
true
;
this
.
qxShow
=
true
this
.
reason
=
''
this
.
reason
=
''
},
},
workers
(
index
)
{
workers
(
index
)
{
this
.
$set
(
this
.
list
,
index
,
{...
this
.
list
[
index
],
...{
showWorker
:
true
}
})
this
.
$set
(
this
.
list
,
index
,
{
...
this
.
list
[
index
],
...{
showWorker
:
true
}
})
},
},
// onConfirm(value,i) {
// onConfirm(value,i) {
// console.log('id啊',value.id);
// console.log('id啊',value.id);
// this.$set(this.list,i,{...this.list[i],...{worker_id: value.id, workerName: value.name}})
// this.$set(this.list,i,{...this.list[i],...{worker_id: value.id, workerName: value.name}})
// this.list[i].showWorker = false
// this.list[i].showWorker = false
// },
// },
Cancel
(
i
)
{
Cancel
(
i
)
{
this
.
list
[
i
].
showWorker
=
false
this
.
list
[
i
].
showWorker
=
false
},
},
endShow
()
{
endShow
()
{
this
.
showEnd
=
true
this
.
showEnd
=
true
},
},
stShow
()
{
stShow
()
{
this
.
showStart
=
true
this
.
showStart
=
true
},
},
formatter
(
type
,
val
)
{
formatter
(
type
,
val
)
{
if
(
type
===
"
year
"
)
{
if
(
type
===
'
year
'
)
{
return
`
${
val
}
年`
;
return
`
${
val
}
年`
}
else
if
(
type
===
"
month
"
)
{
}
else
if
(
type
===
'
month
'
)
{
return
`
${
val
}
月`
;
return
`
${
val
}
月`
}
else
if
(
type
===
"
day
"
)
{
}
else
if
(
type
===
'
day
'
)
{
return
`
${
val
}
日`
;
return
`
${
val
}
日`
}
}
return
val
;
return
val
},
},
birConfirm
(
value
)
{
birConfirm
(
value
)
{
this
.
showStart
=
false
this
.
showStart
=
false
console
.
log
(
'
啊啊啊
'
,
value
);
console
.
log
(
'
啊啊啊
'
,
value
)
if
(
this
.
startTime
==
this
.
conversionTime
(
value
))
{
if
(
this
.
startTime
==
this
.
conversionTime
(
value
))
{
return
return
}
}
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
$set
(
this
.
endObj
,
'
minDate
'
,
value
)
this
.
$set
(
this
.
endObj
,
'
minDate
'
,
value
)
this
.
anginList
()
this
.
anginList
()
console
.
log
(
'
开始时间
'
,
this
.
startTime
);
console
.
log
(
'
开始时间
'
,
this
.
startTime
)
},
},
conversionTime
(
temp
)
{
conversionTime
(
temp
)
{
let
mounth
=
(
temp
.
getMonth
()
+
1
)
<
10
?
'
0
'
+
(
temp
.
getMonth
()
+
1
)
:
(
temp
.
getMonth
()
+
1
)
const
mounth
=
(
temp
.
getMonth
()
+
1
)
<
10
?
'
0
'
+
(
temp
.
getMonth
()
+
1
)
:
(
temp
.
getMonth
()
+
1
)
let
date
=
temp
.
getDate
()
<
10
?
'
0
'
+
temp
.
getDate
()
:
temp
.
getDate
()
const
date
=
temp
.
getDate
()
<
10
?
'
0
'
+
temp
.
getDate
()
:
temp
.
getDate
()
return
temp
.
getFullYear
()
+
return
temp
.
getFullYear
()
+
"
-
"
+
'
-
'
+
mounth
+
mounth
+
"
-
"
+
'
-
'
+
date
date
},
},
birCancel
()
{
birCancel
()
{
this
.
showStart
=
false
;
this
.
showStart
=
false
},
},
endTimeConfirm
(
value
)
{
endTimeConfirm
(
value
)
{
this
.
showEnd
=
false
this
.
showEnd
=
false
if
(
this
.
endTime
==
this
.
conversionTime
(
value
))
{
if
(
this
.
endTime
==
this
.
conversionTime
(
value
))
{
return
return
}
}
this
.
endTime
=
this
.
conversionTime
(
value
)
this
.
endTime
=
this
.
conversionTime
(
value
)
this
.
$set
(
this
.
startObj
,
'
maxDate
'
,
value
)
this
.
$set
(
this
.
startObj
,
'
maxDate
'
,
value
)
this
.
anginList
()
this
.
anginList
()
console
.
log
(
'
结束时间
'
,
this
.
endTime
);
console
.
log
(
'
结束时间
'
,
this
.
endTime
)
},
},
anginList
()
{
anginList
()
{
if
(
this
.
startTime
!=
'
请选择开始日期
'
&&
this
.
endTime
!=
'
请选择截止日期
'
)
{
if
(
this
.
startTime
!=
'
请选择开始日期
'
&&
this
.
endTime
!=
'
请选择截止日期
'
)
{
this
.
initData
()
this
.
initData
()
this
.
getList
()
this
.
getList
()
}
}
},
},
endTimeCancel
()
{
endTimeCancel
()
{
this
.
showEnd
=
false
;
this
.
showEnd
=
false
},
},
//获取工人列表
//
获取工人列表
getWorkers
()
{
getWorkers
()
{
const
curParams
=
{}
const
curParams
=
{}
this
.
$http
this
.
$http
.
get
(
this
.
$myApi
.
GET_WORKER
,
curParams
)
.
get
(
this
.
$myApi
.
GET_WORKER
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
columns
=
data
this
.
columns
=
data
console
.
log
(
this
.
columns
,
'
工人
'
)
console
.
log
(
this
.
columns
,
'
工人
'
)
// var arr = []
// var arr = []
// for (let i in data) {
// for (let i in data) {
// let options = {
// let options = {
// name: data[i].name,
// name: data[i].name,
// id: data[i].id,
// id: data[i].id,
// isCheck: false,
// isCheck: false,
// repired_count: data[i].repired_count,
// repired_count: data[i].repired_count,
// repiring_count: data[i].repiring_count,
// repiring_count: data[i].repiring_count,
// }
// }
// arr.push(options); //属性
// arr.push(options); //属性
// }
// }
// this.columns = arr
// this.columns = arr
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
})
})
},
},
// 初始化
// 初始化
initData
()
{
initData
()
{
...
@@ -560,8 +577,8 @@ export default {
...
@@ -560,8 +577,8 @@ export default {
if
(
this
.
more
&&
!
this
.
isloading
)
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
this
.
isloading
=
true
this
.
isloading
=
true
let
curParams
=
{}
let
curParams
=
{}
if
(
this
.
curSelect
.
type
==
4
)
{
if
(
this
.
curSelect
.
type
==
4
)
{
curParams
=
{
curParams
=
{
time_type
:
this
.
curSelect
.
type
,
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
page
:
this
.
page
,
limit
:
this
.
limit
,
limit
:
this
.
limit
,
...
@@ -569,8 +586,8 @@ export default {
...
@@ -569,8 +586,8 @@ export default {
end
:
this
.
endTime
,
end
:
this
.
endTime
,
status
:
this
.
curSelectStatus
.
statustype
status
:
this
.
curSelectStatus
.
statustype
}
}
}
else
{
}
else
{
curParams
=
{
curParams
=
{
time_type
:
this
.
curSelect
.
type
,
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
page
:
this
.
page
,
limit
:
this
.
limit
,
limit
:
this
.
limit
,
...
@@ -581,14 +598,14 @@ export default {
...
@@ -581,14 +598,14 @@ export default {
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
list
=
this
.
page
===
1
?
data
.
list
:
this
.
list
.
concat
(
data
.
list
)
this
.
list
=
this
.
page
===
1
?
data
.
list
:
this
.
list
.
concat
(
data
.
list
)
this
.
list
=
this
.
list
.
map
(
item
=>
{
this
.
list
=
this
.
list
.
map
(
item
=>
{
item
.
showWorker
=
false
item
.
showWorker
=
false
item
.
workerName
=
[]
item
.
workerName
=
[]
item
.
realName
=
''
item
.
realName
=
''
item
.
temporaryName
=
[]
item
.
temporaryName
=
[]
item
.
temporaryId
=
[]
item
.
temporaryId
=
[]
item
.
worker_id
=
[]
item
.
worker_id
=
[]
return
item
return
item
})
})
this
.
page
=
data
.
page
this
.
page
=
data
.
page
this
.
more
=
data
.
more
this
.
more
=
data
.
more
...
@@ -596,10 +613,10 @@ export default {
...
@@ -596,10 +613,10 @@ export default {
this
.
isloading
=
false
this
.
isloading
=
false
this
.
count
=
data
.
count
this
.
count
=
data
.
count
this
.
loading
=
false
this
.
loading
=
false
this
.
finished
=
!
data
.
more
;
this
.
finished
=
!
data
.
more
if
(
data
.
worker
)
{
if
(
data
.
worker
)
{
this
.
worker_id
=
data
.
worker
.
id
this
.
worker_id
=
data
.
worker
.
id
this
.
workerName
=
data
.
worker
.
name
this
.
workerName
=
data
.
worker
.
name
}
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
@@ -620,7 +637,7 @@ export default {
...
@@ -620,7 +637,7 @@ export default {
chooseTab
(
e
)
{
chooseTab
(
e
)
{
this
.
tabShow
=
!
this
.
tabShow
this
.
tabShow
=
!
this
.
tabShow
},
},
//点击选择工单状态
//
点击选择工单状态
chooseStatus
(
e
)
{
chooseStatus
(
e
)
{
this
.
statusShow
=
!
this
.
statusShow
this
.
statusShow
=
!
this
.
statusShow
},
},
...
@@ -629,18 +646,18 @@ export default {
...
@@ -629,18 +646,18 @@ export default {
if
(
item
.
type
!==
this
.
curSelect
.
type
)
{
if
(
item
.
type
!==
this
.
curSelect
.
type
)
{
this
.
curSelect
=
item
this
.
curSelect
=
item
this
.
tabShow
=
false
this
.
tabShow
=
false
if
(
this
.
curSelect
.
type
==
4
)
{
if
(
this
.
curSelect
.
type
==
4
)
{
this
.
startTime
=
'
请选择开始日期
'
this
.
startTime
=
'
请选择开始日期
'
this
.
endTime
=
'
请选择截止日期
'
this
.
endTime
=
'
请选择截止日期
'
this
.
startObj
=
{
this
.
startObj
=
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
}
}
this
.
endObj
=
{
this
.
endObj
=
{
minDate
:
new
Date
(
2021
,
0
,
1
),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
maxDate
:
new
Date
()
}
}
return
return
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
initData
()
this
.
initData
()
...
@@ -648,7 +665,7 @@ export default {
...
@@ -648,7 +665,7 @@ export default {
},
0
)
},
0
)
}
}
},
},
//订单状态变化
//
订单状态变化
changeStatus
(
item
)
{
changeStatus
(
item
)
{
if
(
item
.
statustype
!==
this
.
curSelectStatus
.
statustype
)
{
if
(
item
.
statustype
!==
this
.
curSelectStatus
.
statustype
)
{
this
.
curSelectStatus
=
item
this
.
curSelectStatus
=
item
...
@@ -677,7 +694,7 @@ export default {
...
@@ -677,7 +694,7 @@ export default {
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
qxShow
=
false
this
.
qxShow
=
false
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
this
.
changeList
(
data
,
index
)
this
.
changeList
(
data
,
index
)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
qxShow
=
false
this
.
qxShow
=
false
...
@@ -687,10 +704,24 @@ export default {
...
@@ -687,10 +704,24 @@ export default {
cancel
()
{
cancel
()
{
this
.
qxShow
=
false
this
.
qxShow
=
false
},
},
fetchData
(
to
,
from
)
{
this
.
getList
()
this
.
getWorkers
()
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
next
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/tabbar/admin_index.scss"
;
@import
'@assets/styles/tabbar/admin_index.scss'
;
</
style
>
</
style
>
src/views/tabbar/mine.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
class=
"cont"
v-if=
"user"
>
<div
class=
"cont"
v-if=
"user"
>
<div
class=
"top"
></div>
<div
class=
"top"
></div>
<div
class=
"info-item"
>
<div
class=
"info-item"
>
<div
class=
"photo"
>
<div
class=
"photo"
>
<img
src=
"@assets/images/my/touxiang.png"
alt
/>
<img
src=
"@assets/images/my/touxiang.png"
alt
/>
</div>
</div>
<div
class=
"btn"
>
{{
user
.
online_status_display
}}
</div>
<div
class=
"btn"
>
{{
user
.
online_status_display
}}
</div>
<div
class=
"name"
>
{{
user
.
name
}}
</div>
<div
class=
"name"
>
{{
user
.
name
}}
</div>
<div
class=
"group"
>
{{
user
.
department
.
name
}}
</div>
<div
class=
"group"
>
{{
user
.
department
.
name
}}
</div>
<div
class=
"tel flex-h"
@
click=
"goPhone"
>
<div
class=
"tel flex-h"
@
click=
"goPhone"
>
<div
class=
"telNumber"
>
{{
telToHide
(
user
.
phone
)
}}
</div>
<div
class=
"telNumber"
>
{{
telToHide
(
user
.
phone
)
}}
</div>
<img
src=
"@assets/images/my/bianji.png"
alt
/>
<img
src=
"@assets/images/my/bianji.png"
alt
/>
</div>
</div>
</div>
<!-- tabbar -->
<my-tabbar
curname=
"my"
></my-tabbar>
</div>
</div>
<!-- tabbar -->
<my-tabbar
curname=
"my"
></my-tabbar>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -30,14 +30,11 @@ export default {
...
@@ -30,14 +30,11 @@ export default {
user
:
''
user
:
''
}
}
},
},
created
()
{
this
.
getUserInfo
()
},
methods
:
{
methods
:
{
goPhone
()
{
goPhone
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/modifyPhone
'
,
path
:
'
/modifyPhone
'
,
query
:
{
phone
:
this
.
user
.
phone
}
query
:
{
phone
:
this
.
user
.
phone
}
})
})
},
},
getUserInfo
()
{
getUserInfo
()
{
...
@@ -46,79 +43,90 @@ export default {
...
@@ -46,79 +43,90 @@ export default {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
user
=
res
this
.
user
=
res
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
telToHide
(
tel
)
{
telToHide
(
tel
)
{
var
phone
=
tel
.
substr
(
0
,
3
)
+
'
****
'
+
tel
.
substring
(
7
,
11
);
var
phone
=
tel
.
substr
(
0
,
3
)
+
'
****
'
+
tel
.
substring
(
7
,
11
)
return
phone
;
return
phone
},
fetchData
(
to
,
from
)
{
this
.
getUserInfo
()
}
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
next
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.cont
{
.cont
{
min-height
:
100vh
;
min-height
:
100vh
;
background
:
#f7f7f7
;
background
:
#f7f7f7
;
}
}
.top
{
.top
{
width
:
100%
;
width
:
100%
;
height
:
2
.82rem
;
height
:
2
.82rem
;
background
:
#0054ff
;
background
:
#0054ff
;
position
:
relative
;
position
:
relative
;
}
}
.info-item
{
.info-item
{
width
:
7
.5rem
;
width
:
7
.5rem
;
height
:
8
.05rem
;
height
:
8
.05rem
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
0
.28rem
0
.28rem
0rem
0rem
;
border-radius
:
0
.28rem
0
.28rem
0rem
0rem
;
position
:
absolute
;
position
:
absolute
;
top
:
2
.5rem
;
top
:
2
.5rem
;
left
:
0
;
left
:
0
;
text-align
:
center
;
text-align
:
center
;
}
}
.photo
{
.photo
{
width
:
1
.7rem
;
width
:
1
.7rem
;
height
:
1
.7rem
;
height
:
1
.7rem
;
border-radius
:
50%
;
border-radius
:
50%
;
background
:
#f1f1f1
;
background
:
#f1f1f1
;
position
:
absolute
;
position
:
absolute
;
top
:
-1rem
;
top
:
-1rem
;
left
:
2
.9rem
;
left
:
2
.9rem
;
}
}
.btn
{
.btn
{
width
:
1
.38rem
;
width
:
1
.38rem
;
height
:
0
.48rem
;
height
:
0
.48rem
;
background
:
#0054ff
;
background
:
#0054ff
;
border-radius
:
0
.24rem
;
border-radius
:
0
.24rem
;
color
:
#fff
;
color
:
#fff
;
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.48rem
;
line-height
:
0
.48rem
;
margin
:
1
.13rem
auto
0
.59rem
;
margin
:
1
.13rem
auto
0
.59rem
;
}
}
.name
{
.name
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.38rem
;
font-size
:
0
.38rem
;
margin-bottom
:
0
.27rem
;
margin-bottom
:
0
.27rem
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.group
{
.group
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.3rem
;
font-size
:
0
.3rem
;
margin-bottom
:
0
.48rem
;
margin-bottom
:
0
.48rem
;
}
}
.tel
{
.tel
{
width
:
2rem
;
width
:
2rem
;
height
:
0
.28rem
;
height
:
0
.28rem
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.tel
.telNumber
{
.tel
.telNumber
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.3rem
;
font-size
:
0
.3rem
;
margin-right
:
0
.2rem
;
margin-right
:
0
.2rem
;
}
}
.tel
img
{
.tel
img
{
width
:
0
.28rem
;
width
:
0
.28rem
;
height
:
0
.28rem
;
height
:
0
.28rem
;
}
}
</
style
>
</
style
>
src/views/tabbar/modifyPhone.vue
View file @
48cf7b31
<
template
>
<
template
>
<div
class=
"cont"
>
<div
class=
"cont"
>
<div
class=
"tel"
>
<div
class=
"tel"
>
<input
v-model.trim=
"old_tel"
maxlength=
"11"
type=
"tel"
placeholder=
"请输入原手机号"
/>
<input
v-model.trim=
"old_tel"
maxlength=
"11"
type=
"tel"
placeholder=
"请输入原手机号"
/>
</div>
<div
class=
"tel"
>
<input
v-model.trim=
"tel"
maxlength=
"11"
type=
"tel"
placeholder=
"请输入新的手机号"
/>
</div>
<div
class=
"code flex-h"
>
<van-field
class=
"code_field"
v-model.trim=
"code"
type=
"text"
placeholder=
"请输入验证码"
maxlength=
"6"
/>
<div
class=
"getCode"
@
click=
"getCode"
>
{{
buttonText
}}
</div>
</div>
<div
class=
"submit-btn"
@
click=
"submit"
>
提交
</div>
</div>
</div>
<div
class=
"tel"
>
<input
v-model.trim=
"tel"
maxlength=
"11"
type=
"tel"
placeholder=
"请输入新的手机号"
/>
</div>
<div
class=
"code flex-h"
>
<van-field
class=
"code_field"
v-model.trim=
"code"
type=
"text"
placeholder=
"请输入验证码"
maxlength=
"6"
/>
<div
class=
"getCode"
@
click=
"getCode"
>
{{
buttonText
}}
</div>
</div>
<div
class=
"submit-btn"
@
click=
"submit"
>
提交
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
old_tel
:
''
,
//
旧手机号
old_tel
:
''
,
//
旧手机号
tel
:
''
,
// 手机号
tel
:
''
,
// 手机号
code
:
''
,
// 验证码
code
:
''
,
// 验证码
buttonText
:
'
获取验证码
'
,
buttonText
:
'
获取验证码
'
,
...
@@ -29,7 +45,7 @@ export default {
...
@@ -29,7 +45,7 @@ export default {
},
},
methods
:
{
methods
:
{
checkData
()
{
checkData
()
{
if
(
!
this
.
checkCon
())
{
if
(
!
this
.
checkCon
())
{
return
return
}
}
if
(
this
.
code
.
length
!==
6
)
{
if
(
this
.
code
.
length
!==
6
)
{
...
@@ -38,7 +54,7 @@ export default {
...
@@ -38,7 +54,7 @@ export default {
}
}
return
true
return
true
},
},
checkCon
()
{
checkCon
()
{
if
(
this
.
old_tel
!=
this
.
$route
.
query
.
phone
)
{
if
(
this
.
old_tel
!=
this
.
$route
.
query
.
phone
)
{
this
.
$toast
(
'
请正确输入原手机号码
'
)
this
.
$toast
(
'
请正确输入原手机号码
'
)
return
false
return
false
...
@@ -51,14 +67,14 @@ export default {
...
@@ -51,14 +67,14 @@ export default {
this
.
$toast
(
'
请正确输入新手机号码
'
)
this
.
$toast
(
'
请正确输入新手机号码
'
)
return
false
return
false
}
}
return
true
return
true
},
},
getCode
()
{
getCode
()
{
if
(
this
.
isSending
)
return
if
(
this
.
isSending
)
return
if
(
!
this
.
checkCon
())
{
if
(
!
this
.
checkCon
())
{
return
return
}
}
const
curParams
=
{
const
curParams
=
{
tel
:
this
.
tel
,
tel
:
this
.
tel
,
old_tel
:
this
.
old_tel
,
old_tel
:
this
.
old_tel
,
is_edit
:
1
is_edit
:
1
...
@@ -68,7 +84,7 @@ export default {
...
@@ -68,7 +84,7 @@ export default {
this
.
isSending
=
true
this
.
isSending
=
true
this
.
countDown
()
this
.
countDown
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
countDown
()
{
countDown
()
{
let
seconds
=
60
let
seconds
=
60
...
@@ -83,9 +99,9 @@ export default {
...
@@ -83,9 +99,9 @@ export default {
},
1000
)
},
1000
)
},
},
submit
()
{
submit
()
{
if
(
!
this
.
checkData
())
return
if
(
!
this
.
checkData
())
return
const
curParams
=
{
const
curParams
=
{
tel
:
this
.
tel
,
tel
:
this
.
tel
,
code
:
this
.
code
code
:
this
.
code
}
}
this
.
$http
.
post
(
this
.
$myApi
.
USER_EDIT
,
curParams
)
this
.
$http
.
post
(
this
.
$myApi
.
USER_EDIT
,
curParams
)
...
@@ -93,7 +109,7 @@ export default {
...
@@ -93,7 +109,7 @@ export default {
this
.
$toast
(
'
修改成功
'
)
this
.
$toast
(
'
修改成功
'
)
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
},
},
fetchData
(
to
,
from
)
{
fetchData
(
to
,
from
)
{
this
.
tel
=
''
// 手机号
this
.
tel
=
''
// 手机号
...
@@ -119,5 +135,5 @@ export default {
...
@@ -119,5 +135,5 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/tabbar/modifyPhone.scss"
;
@import
'@assets/styles/tabbar/modifyPhone.scss'
;
</
style
>
</
style
>
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