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
9714b31a
Commit
9714b31a
authored
Sep 01, 2021
by
石盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4ae576d7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
582 additions
and
293 deletions
+582
-293
apiList.js
src/api/apiList.js
+5
-1
admin_index.scss
src/assets/styles/tabbar/admin_index.scss
+1
-0
index.scss
src/assets/styles/tabbar/index.scss
+57
-3
index.js
src/router/index.js
+71
-63
login.vue
src/views/login/login.vue
+12
-1
charge.vue
src/views/my/charge.vue
+4
-1
Home.vue
src/views/tabbar/Home.vue
+312
-166
admin_home.vue
src/views/tabbar/admin_home.vue
+120
-58
No files found.
src/api/apiList.js
View file @
9714b31a
...
@@ -9,12 +9,16 @@ const baseUrl = '/api'
...
@@ -9,12 +9,16 @@ const baseUrl = '/api'
// todo: url
// todo: url
const
httpUrl
=
'
https://repairtest.zeruiedu.com
'
// 测试接口
const
httpUrl
=
'
https://repairtest.zeruiedu.com
'
// 测试接口
const
h5Url
=
'
http://localhost:8080/
'
// 测试h5线上地址
const
h5Url
=
'
http://localhost:8080/
'
// 测试h5线上地址
window
.
localStorage
.
setItem
(
'
httpUrl
'
,
httpUrl
)
window
.
localStorage
.
setItem
(
'
h5Url
'
,
h5Url
)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
const
wxLogin
=
'
/api/worker/login
'
// 微信登录获取token、登录状态
const
wxLogin
=
'
/api/worker/login
'
// 微信登录获取token、登录状态
window
.
localStorage
.
setItem
(
'
wxLogin
'
,
wxLogin
)
const
curScope
=
'
scopes=snsapi_base&type=1
'
const
curScope
=
'
scopes=snsapi_base&type=1
'
export
default
{
export
default
{
// url地址
// url地址
...
...
src/assets/styles/tabbar/admin_index.scss
View file @
9714b31a
...
@@ -159,6 +159,7 @@
...
@@ -159,6 +159,7 @@
.item-title
{
.item-title
{
// min-width: 1.5rem;
// min-width: 1.5rem;
color
:
#000000
;
color
:
#000000
;
white-space
:
nowrap
;
}
}
.item-desc
{
.item-desc
{
...
...
src/assets/styles/tabbar/index.scss
View file @
9714b31a
...
@@ -110,7 +110,15 @@
...
@@ -110,7 +110,15 @@
}
}
.ma-item
{
.ma-item
{
// margin-top: 0.3rem;
// margin-top: 0.3rem;
height
:
0
.6rem
;
height
:
0
.4rem
;
margin-top
:
0
.2rem
;
}
.item_line
{
width
:
6
.28rem
;
height
:
0
.01rem
;
background
:
#f1f1f1
;
margin-bottom
:
0
.4rem
;
margin-top
:
0
.4rem
;
}
}
.bz-title
{
.bz-title
{
margin-bottom
:
0
.2rem
;
margin-bottom
:
0
.2rem
;
...
@@ -145,16 +153,25 @@
...
@@ -145,16 +153,25 @@
.blank
{
.blank
{
height
:
1rem
;
height
:
1rem
;
}
}
.
van-popup
{
.
cancel_cont
{
width
:
6
.9rem
;
width
:
6
.9rem
;
max-height
:
7rem
;
max-height
:
7rem
;
// height: 5.9rem;
background
:
#fff
;
background
:
#fff
;
border-radius
:
0
.12rem
;
border-radius
:
0
.12rem
;
padding-top
:
0
.4rem
;
padding-top
:
0
.4rem
;
padding-bottom
:
0
.2rem
;
padding-bottom
:
0
.2rem
;
text-align
:
center
;
text-align
:
center
;
}
}
// .van-popup {
// width: 6.9rem;
// max-height: 7rem;
// // height: 5.9rem;
// background: #fff;
// border-radius: 0.12rem;
// padding-top: 0.4rem;
// padding-bottom: 0.2rem;
// text-align: center;
// }
.pop_title
{
.pop_title
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.36rem
;
font-size
:
0
.36rem
;
...
@@ -235,4 +252,41 @@
...
@@ -235,4 +252,41 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
0
.78rem
;
line-height
:
0
.78rem
;
margin
:
1
.2rem
auto
;
margin
:
1
.2rem
auto
;
}
// 日期选择样式
.date
{
width
:
92%
;
height
:
0
.58rem
;
margin
:
0
.36rem
auto
0
.4rem
;
}
.date
.start
{
width
:
3
.08rem
;
height
:
0
.58rem
;
background
:
#FFFFFF
;
border
:
0
.02rem
solid
#0054FF
;
border-radius
:
0
.12rem
;
text-align
:
center
;
line-height
:
0
.58rem
;
color
:
#000000
;
font-size
:
0
.28rem
;
}
.date
.end
{
width
:
3
.08rem
;
height
:
0
.58rem
;
background
:
#FFFFFF
;
border
:
0
.02rem
solid
#0054FF
;
border-radius
:
0
.12rem
;
text-align
:
center
;
line-height
:
0
.58rem
;
color
:
#000000
;
font-size
:
0
.28rem
;
}
.date
.blue
{
width
:
0
.31rem
;
height
:
0
.03rem
;
background
:
#0054FF
;
}
}
\ No newline at end of file
src/router/index.js
View file @
9714b31a
...
@@ -4,81 +4,79 @@ import Home from '../views/tabbar/Home.vue'
...
@@ -4,81 +4,79 @@ import Home from '../views/tabbar/Home.vue'
import
selfApi
from
'
@/api/apiList
'
import
selfApi
from
'
@/api/apiList
'
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
const
routes
=
[{
const
routes
=
[
path
:
'
/
'
,
{
name
:
'
home
'
,
path
:
'
/
'
,
meta
:
{
name
:
'
home
'
,
title
:
'
工单
'
,
meta
:
{
hideBack
:
true
,
title
:
'
工单
'
,
keepAlive
:
true
hideBack
:
true
,
keepAlive
:
true
},
component
:
Home
},
},
// 登录
component
:
Home
{
},
path
:
'
/login
'
,
// 登录
name
:
'
login
'
,
{
meta
:
{
path
:
'
/login
'
,
title
:
'
登录
'
,
name
:
'
login
'
,
hideBack
:
true
meta
:
{
}
,
title
:
'
登录
'
,
component
:
()
=>
import
(
'
@/views/login/login.vue
'
)
hideBack
:
true
},
},
{
component
:
()
=>
import
(
'
@/views/login/login.vue
'
)
path
:
'
/mine
'
,
}
,
name
:
'
mine
'
,
{
meta
:
{
path
:
'
/mine
'
,
title
:
'
我的
'
,
name
:
'
mine
'
,
hideBack
:
true
meta
:
{
}
,
title
:
'
我的
'
,
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
hideBack
:
true
},
},
{
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
path
:
'
/admin_home
'
,
}
,
name
:
'
admin_home
'
,
{
meta
:
{
path
:
'
/admin_home
'
,
title
:
'
报修工单
'
,
name
:
'
admin_home
'
,
hideBack
:
true
meta
:
{
}
,
title
:
'
报修工单
'
,
component
:
()
=>
import
(
'
../views/tabbar/admin_home.vue
'
)
hideBack
:
true
},
},
{
component
:
()
=>
import
(
'
../views/tabbar/admin_home.vue
'
)
path
:
'
/modifyPhone
'
,
}
,
name
:
'
mesmodifyPhonesage
'
,
{
meta
:
{
path
:
'
/modifyPhone
'
,
title
:
'
修改手机号
'
,
name
:
'
mesmodifyPhonesage
'
,
hideBack
:
true
meta
:
{
}
,
title
:
'
修改手机号
'
,
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
hideBack
:
true
},
},
// 个人中心
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
{
},
path
:
'
/charge
'
,
// 个人中心
name
:
'
charge
'
,
{
meta
:
{
path
:
'
/charge
'
,
title
:
'
发起收费
'
,
name
:
'
charge
'
,
hideBack
:
true
meta
:
{
}
,
title
:
'
发起收费
'
,
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
hideBack
:
true
},
},
{
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
path
:
'
/lookEvaluate
'
,
},
name
:
'
lookEvaluate
'
,
{
meta
:
{
path
:
'
/lookEvaluate
'
,
title
:
'
查看评价
'
,
name
:
'
lookEvaluate
'
,
hideBack
:
true
meta
:
{
},
title
:
'
查看评价
'
,
component
:
()
=>
import
(
'
@/views/my/lookEvaluate.vue
'
)
hideBack
:
true
}
},
component
:
()
=>
import
(
'
@/views/my/lookEvaluate.vue
'
)
}
]
]
const
router
=
new
VueRouter
({
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
{
...
@@ -107,6 +105,8 @@ router.beforeEach((to, from, next) => {
...
@@ -107,6 +105,8 @@ router.beforeEach((to, from, next) => {
role
=
to
.
query
.
role
role
=
to
.
query
.
role
window
.
localStorage
.
setItem
(
'
role
'
,
role
)
window
.
localStorage
.
setItem
(
'
role
'
,
role
)
}
}
console
.
log
(
'
router里的
'
,
window
.
localStorage
.
getItem
(
'
role
'
));
// console.log(token)
// console.log(token)
// console.log(status)
// console.log(status)
window
.
localStorage
.
setItem
(
'
token
'
,
token
)
window
.
localStorage
.
setItem
(
'
token
'
,
token
)
...
@@ -114,6 +114,14 @@ router.beforeEach((to, from, next) => {
...
@@ -114,6 +114,14 @@ router.beforeEach((to, from, next) => {
}
}
if
(
token
&&
status
===
'
200
'
)
{
if
(
token
&&
status
===
'
200
'
)
{
console
.
log
(
'
ok-------1
'
,
200
)
console
.
log
(
'
ok-------1
'
,
200
)
if
(
role
==
2
)
{
window
.
localStorage
.
setItem
(
'
role
'
,
''
)
setTimeout
(()
=>
{
next
({
path
:
'
/admin_home
'
})
},
50
)
}
next
()
next
()
}
else
if
(
token
&&
status
===
'
100
'
)
{
}
else
if
(
token
&&
status
===
'
100
'
)
{
console
.
log
(
'
ok-------2
'
,
100
)
console
.
log
(
'
ok-------2
'
,
100
)
...
...
src/views/login/login.vue
View file @
9714b31a
...
@@ -82,7 +82,18 @@ export default {
...
@@ -82,7 +82,18 @@ export default {
}
}
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
window
.
document
.
location
=
this
.
$myApi
.
WINDOWHREF_ASK
// url-
const
httpUrl
=
window
.
localStorage
.
getItem
(
'
httpUrl
'
)
console
.
log
(
'
httpUrl
'
,
httpUrl
)
const
h5Url
=
window
.
localStorage
.
getItem
(
'
h5Url
'
)
console
.
log
(
'
h5Url
'
,
h5Url
)
const
wxLogin
=
window
.
localStorage
.
getItem
(
'
wxLogin
'
)
console
.
log
(
'
wxLogin
'
,
wxLogin
)
const
t
=
res
.
role
==
3
?
h5Url
:
`
${
h5Url
}
admin_home`
// 测试h5线上地址
console
.
log
(
'
的数据傅雷家书蝶恋蜂狂
'
,
res
,
'
链接
'
,
httpUrl
,
'
h5Url
'
,
h5Url
,
'
role
'
,
t
)
let
url
=
`
${
httpUrl
}${
wxLogin
}
?callBack=
${
t
}
&scopes=snsapi_userinfo&type=1`
console
.
log
(
'
1111111111111111111111111111111链接
'
,
url
)
window
.
document
.
location
=
url
// url-
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
...
...
src/views/my/charge.vue
View file @
9714b31a
...
@@ -211,8 +211,11 @@ export default {
...
@@ -211,8 +211,11 @@ export default {
changeInput
(
e
,
index
){
changeInput
(
e
,
index
){
this
.
hc_number
=
e
.
target
.
value
this
.
hc_number
=
e
.
target
.
value
console
.
log
(
'
商品数量
'
,
this
.
hc_number
)
console
.
log
(
'
商品数量
'
,
this
.
hc_number
)
this
.
getMonery
()
this
.
totalCount
()
this
.
totalCount
()
if
(
this
.
addList
[
index
].
mc
){
this
.
getMonery
()
}
},
},
getMonery
(){
getMonery
(){
console
.
log
(
'
addlist
'
,
this
.
addList
);
console
.
log
(
'
addlist
'
,
this
.
addList
);
...
...
src/views/tabbar/Home.vue
View file @
9714b31a
<
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"
>
<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>
</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"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"item.id"
>
<div
class=
"title"
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"title"
>
{{
item
.
order_status_display
}}
</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
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
<div
</div>
class=
"item-desc"
<div
class=
"item-title"
>
问题描述:
</div>
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
description
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
repair_type
.
type_name
}}
-
{{
item
.
description
}}
</div>
<div
class=
"item-desc"
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
<div
class=
"item flex-h flex-start"
>
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item flex-h flex-vc"
>
<div
<div
class=
"item-title"
>
客户姓名:
</div>
class=
"item-desc"
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
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"
>
{{
item
.
telephone
}}
</div>
<div
class=
"item-desc"
>
{{
item
.
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"
>
{{
item
.
created_at
}}
</div>
<div
class=
"item-desc phone"
>
{{
item
.
telephone
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<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 item.image"
:key=
"index"
>
<div
class=
"item-desc"
>
{{
item
.
created_at
}}
</div>
<img
:src=
"child.url"
alt
/>
</div>
</div>
<div
class=
"item flex-h flex-start"
>
</div>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"line"
></div>
<div
<div
class=
"item flex-h flex-vc"
>
@
click=
"preview(item.image,index)"
<div
class=
"item-title"
>
派工对象:
</div>
class=
"img flex-h"
<div
class=
"item-desc"
>
{{
item
.
worker
.
name
}}
</div>
v-for=
"(child, index) in item.image"
</div>
:key=
"index"
<div
class=
"item flex-h flex-vc"
>
>
<div
class=
"item-title"
>
联系电话:
</div>
<img
:src=
"child.url"
alt
/>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
</div>
</div>
</div>
<div
class=
"material"
v-if=
"item.no_pay_order != null"
>
<div
class=
"line"
></div>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"item flex-h flex-vc"
v-if=
"item.worker"
>
<div
class=
"ma-item flex-h flex-hb"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"one"
>
洁具
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
name
}}
</div>
<div
class=
"one"
>
水龙头*1
</div>
</div>
<div
class=
"one"
>
¥16
</div>
<div
class=
"item flex-h flex-vc"
v-if=
"item.worker"
>
</div>
<div
class=
"item-title"
>
联系电话:
</div>
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
<div
class=
"line"
></div>
</div>
<div
class=
"material"
v-if=
"item.free_material_order && item.order_status_display !== '已完成'"
>
<div
class=
"material"
v-if=
"item.pay_order != ''"
>
<div
class=
"item-title bz-title"
>
备注耗材
</div>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in item.free_material_order.goods"
:key=
"index"
>
<div
v-for=
"(parent, index) in item.pay_order"
:key=
"index"
>
<div
class=
"one"
>
免费
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in parent.goods"
:key=
"index"
>
<div
class=
"one"
>
{{
child
.
goods_name
}}
*
{{
child
.
number
}}
</div>
<div
class=
"one"
>
{{
child
.
parent_detail
.
goods_name
}}
</div>
<div
class=
"one"
>
¥0
</div>
<div
class=
"one"
>
{{
child
.
good_detail
.
goods_name
}}
*
{{
child
.
number
}}
</div>
</div>
<div
class=
"one"
>
¥
{{
child
.
price
}}
</div>
</div>
<div
class=
"btn flex-h flex-hr"
>
<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_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-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=
"pop_title"
>
备注转单原因
</div>
<textarea
placeholder=
"请输入转单理由"
v-model=
"reason"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"zd_submit"
>
提交
</div>
</div>
</van-popup>
<!-- 备注耗材弹窗 -->
<van-popup
v-model=
"hcShow"
close-icon=
"close"
>
<div
class=
"pop_title"
>
备注耗材
</div>
<div
class=
"list-item"
v-for=
"(item,index) in addList"
:key=
"index"
>
<input
class=
"input"
v-model=
"item.goods_name"
type=
"text"
placeholder=
"请输入耗材名称"
/>
<input
class=
"input"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
/>
</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>
</van-popup>
<!-- 查看耗材弹窗 -->
<van-popup
v-model=
"lookShow"
close-icon=
"close"
>
<div
class=
"pop_title"
>
查看耗材
</div>
<div
class=
"tc_line"
></div>
<div
class=
"ma-item one-item flex-h flex-hb"
v-for=
"(item, index) in expend_detail.list"
:key=
"index"
>
<div
class=
"one"
>
{{
item
.
parent_detail
?
item
.
parent_detail
.
goods_name
:
'
其它
'
}}
</div>
<div
class=
"one"
>
{{
item
.
goods_name
}}
*
{{
item
.
number
}}
</div>
<div
class=
"one"
>
{{
item
.
is_free
?
'
免费
'
:
'
¥
'
+
item
.
price
}}
</div>
</div>
</div>
<div
class=
"hc_total"
>
共计
{{
expend_detail
.
number
}}
件,总价: ¥
{{
expend_detail
.
price
}}
</div>
</div>
<div
class=
"sure-btn"
@
click=
"cancel"
>
确定
</div>
<div
class=
"item_line"
></div>
</van-popup>
</div>
<!-- tabbar -->
<!--
<div
class=
"line"
></div>
-->
<my-tabbar
curname=
"home"
></my-tabbar>
<div
class=
"material"
v-if=
"item.free_material_order"
>
</div>
<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"
>
免费
</div>
<div
class=
"one"
>
{{
child
.
goods_name
}}
*
{{
child
.
number
}}
</div>
<div
class=
"one"
>
¥0
</div>
</div>
<div
class=
"item_line"
></div>
</div>
<div
class=
"btn flex-h flex-hr"
>
<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_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-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=
"请输入转单理由"
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=
"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"
v-model=
"item.goods_name"
type=
"text"
placeholder=
"请输入耗材名称"
/>
<input
class=
"input"
v-model.number=
"item.number"
type=
"number"
placeholder=
"请输入耗材个数"
/>
</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-hb"
v-for=
"(item, index) in expend_detail.list"
:key=
"index"
>
<div
class=
"one"
>
{{
item
.
parent_detail
?
item
.
parent_detail
.
goods_name
:
'
其它
'
}}
</div>
<div
class=
"one"
>
{{
item
.
goods_name
}}
*
{{
item
.
number
}}
</div>
<div
class=
"one"
>
{{
item
.
is_free
?
'
免费
'
:
'
¥
'
+
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
}
from
'
vant
'
;
export
default
{
export
default
{
name
:
'
home
'
,
name
:
'
home
'
,
components
:
{
components
:
{
...
@@ -206,6 +261,19 @@ export default {
...
@@ -206,6 +261,19 @@ export default {
lookShow
:
false
,
// 查看耗材弹窗
lookShow
:
false
,
// 查看耗材弹窗
expend_detail
:
{},
// 耗材详情
expend_detail
:
{},
// 耗材详情
user
:
''
,
user
:
''
,
startTime
:
'
请选择开始日期
'
,
showStart
:
false
,
startObj
:{
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
},
endObj
:{
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
},
currentDate
:
new
Date
(
2021
,
0
,
17
),
showEnd
:
false
,
endTime
:
"
请选择截止日期
"
,
}
}
},
},
created
()
{
created
()
{
...
@@ -213,6 +281,73 @@ export default {
...
@@ -213,6 +281,73 @@ export default {
this
.
getUserInfo
()
this
.
getUserInfo
()
},
},
methods
:
{
methods
:
{
preview
(
img
,
index
){
let
temp
=
img
.
map
(
item
=>
{
return
item
.
url
})
ImagePreview
({
images
:
temp
,
startPosition
:
index
,
});
},
endShow
(){
this
.
showEnd
=
true
},
stShow
(){
this
.
showStart
=
true
},
formatter
(
type
,
val
)
{
if
(
type
===
"
year
"
)
{
return
`
${
val
}
年`
;
}
else
if
(
type
===
"
month
"
)
{
return
`
${
val
}
月`
;
}
else
if
(
type
===
"
day
"
)
{
return
`
${
val
}
日`
;
}
return
val
;
},
birConfirm
(
value
)
{
this
.
showStart
=
false
if
(
this
.
startTime
==
this
.
conversionTime
(
value
)){
return
}
console
.
log
(
'
啊啊啊
'
,
value
);
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
$set
(
this
.
endObj
,
'
minDate
'
,
value
)
this
.
anginList
()
console
.
log
(
'
开始时间
'
,
this
.
startTime
);
},
conversionTime
(
temp
){
let
mounth
=
(
temp
.
getMonth
()
+
1
)
<
10
?
'
0
'
+
(
temp
.
getMonth
()
+
1
)
:
(
temp
.
getMonth
()
+
1
)
let
date
=
temp
.
getDate
()
<
10
?
'
0
'
+
temp
.
getDate
()
:
temp
.
getDate
()
return
temp
.
getFullYear
()
+
"
-
"
+
mounth
+
"
-
"
+
date
},
birCancel
()
{
this
.
showStart
=
false
;
},
endTimeConfirm
(
value
){
this
.
showEnd
=
false
if
(
this
.
endTime
==
this
.
conversionTime
(
value
)){
return
}
this
.
endTime
=
this
.
conversionTime
(
value
)
this
.
$set
(
this
.
startObj
,
'
maxDate
'
,
value
)
this
.
anginList
()
console
.
log
(
'
结束时间
'
,
this
.
endTime
);
},
endTimeCancel
()
{
this
.
showEnd
=
false
;
},
anginList
(){
if
(
this
.
startTime
!=
'
请选择开始日期
'
&&
this
.
endTime
!=
'
请选择截止日期
'
){
this
.
initData
()
this
.
getList
()
}
},
// 初始化
// 初始化
initData
()
{
initData
()
{
this
.
list
=
[]
this
.
list
=
[]
...
@@ -242,10 +377,21 @@ export default {
...
@@ -242,10 +377,21 @@ export default {
getList
()
{
getList
()
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
this
.
isloading
=
true
this
.
isloading
=
true
const
curParams
=
{
let
curParams
=
{}
time_type
:
this
.
curSelect
.
type
,
if
(
this
.
curSelect
.
type
==
4
){
page
:
this
.
page
,
curParams
=
{
limit
:
this
.
limit
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
limit
:
this
.
limit
,
start
:
this
.
startTime
,
end
:
this
.
endTime
,
}
}
else
{
curParams
=
{
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
limit
:
this
.
limit
,
}
}
}
this
.
$http
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
...
@@ -279,10 +425,11 @@ export default {
...
@@ -279,10 +425,11 @@ 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
setTimeout
(()
=>
{
if
(
this
.
curSelect
.
type
==
4
){
this
.
initData
()
return
this
.
getList
()
}
},
0
)
this
.
initData
()
this
.
getList
()
}
}
},
},
// 开始维修
// 开始维修
...
@@ -380,7 +527,6 @@ export default {
...
@@ -380,7 +527,6 @@ export default {
.
post
(
this
.
$myApi
.
MATERIAL_REMARK
,
curParams
)
.
post
(
this
.
$myApi
.
MATERIAL_REMARK
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
hcShow
=
false
this
.
hcShow
=
false
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
})
})
...
...
src/views/tabbar/admin_home.vue
View file @
9714b31a
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
description
}}
</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 flex-h flex-start"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
<div
...
@@ -56,9 +56,10 @@
...
@@ -56,9 +56,10 @@
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
</div>
</div>
<!--
<a
:href=
"'tel' + item.telephone"
>
{{
item
.
telephone
}}
</a>
-->
<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"
>
{{
item
.
telephone
}}
</div>
<div
class=
"item-desc phone"
@
click=
"callPhone(item)"
>
{{
item
.
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>
...
@@ -66,32 +67,39 @@
...
@@ -66,32 +67,39 @@
</div>
</div>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item flex-h flex-start"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img flex-h"
v-for=
"(child, index) in item.image"
:key=
"index"
>
<div
@
click=
"preview(item.image,index)"
class=
"img flex-h"
v-for=
"(child, index) in item.image"
:key=
"index"
>
<img
:src=
"child.url"
alt
/>
<img
:src=
"child.url"
alt
/>
</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
v-if=
"item.is_can_assign_worker==1"
class=
"item flex-h flex-vc flex-hb"
@
click=
"workers"
>
<div
<div
class=
"flex-h flex-vc"
>
v-if=
"item.is_can_assign_worker==1"
<div
class=
"item-title"
>
派工对象:
</div>
class=
"item flex-h flex-vc flex-hb"
<div
class=
"item-desc"
>
{{
workerName
}}
</div>
@
click=
"workers"
</div>
>
<div
class=
"flex-h flex-vc"
>
<div
class=
"flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"select_txt"
>
选择
</div>
<div
class=
"item-desc"
>
{{
workerName
}}
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
</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>
<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>
<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)"
>
确定
</div>
<div
v-if=
"item.is_can_cancel==1"
class=
"button"
@
click=
"cancelOrder(item)"
>
取消
</div>
</div>
</div>
</div>
</div>
<!-- 空数据 -->
<!-- 空数据 -->
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
...
@@ -125,8 +133,8 @@
...
@@ -125,8 +133,8 @@
v-model=
"currentDate"
v-model=
"currentDate"
type=
"date"
type=
"date"
title=
"选择年月日"
title=
"选择年月日"
:min-date=
"minDate"
:min-date=
"
startObj.
minDate"
:max-date=
"maxDate"
:max-date=
"
startObj.
maxDate"
@
confirm=
"birConfirm"
@
confirm=
"birConfirm"
@
cancel=
"birCancel"
@
cancel=
"birCancel"
:formatter=
"formatter"
:formatter=
"formatter"
...
@@ -138,8 +146,8 @@
...
@@ -138,8 +146,8 @@
v-model=
"currentDate"
v-model=
"currentDate"
type=
"date"
type=
"date"
title=
"选择年月日"
title=
"选择年月日"
:min-date=
"minDate"
:min-date=
"
endObj.
minDate"
:max-date=
"maxDate"
:max-date=
"
endObj.
maxDate"
@
confirm=
"endTimeConfirm"
@
confirm=
"endTimeConfirm"
@
cancel=
"endTimeCancel"
@
cancel=
"endTimeCancel"
:formatter=
"formatter"
:formatter=
"formatter"
...
@@ -151,6 +159,7 @@
...
@@ -151,6 +159,7 @@
<
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
}
from
'
vant
'
;
export
default
{
export
default
{
name
:
'
home
'
,
name
:
'
home
'
,
components
:
{
components
:
{
...
@@ -160,14 +169,20 @@ export default {
...
@@ -160,14 +169,20 @@ export default {
return
{
return
{
reson
:
''
,
//取消原因
reson
:
''
,
//取消原因
qxShow
:
false
,
// 发起转单弹窗
qxShow
:
false
,
// 发起转单弹窗
workerName
:
'
请选择
'
,
workerName
:
''
,
worker_id
:
''
,
worker_id
:
''
,
showWorker
:
false
,
showWorker
:
false
,
columns
:
[],
columns
:
[],
startTime
:
'
请选择开始日期
'
,
startTime
:
'
请选择开始日期
'
,
showStart
:
false
,
showStart
:
false
,
minDate
:
new
Date
(
1931
,
0
,
1
),
startObj
:{
maxDate
:
new
Date
(),
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
},
endObj
:{
minDate
:
new
Date
(
2021
,
0
,
1
),
maxDate
:
new
Date
(),
},
currentDate
:
new
Date
(
2021
,
0
,
17
),
currentDate
:
new
Date
(
2021
,
0
,
17
),
showEnd
:
false
,
showEnd
:
false
,
endTime
:
"
请选择截止日期
"
,
endTime
:
"
请选择截止日期
"
,
...
@@ -181,7 +196,7 @@ export default {
...
@@ -181,7 +196,7 @@ export default {
{
type
:
'
4
'
,
name
:
'
自定义
'
}
{
type
:
'
4
'
,
name
:
'
自定义
'
}
],
],
statusShow
:
false
,
statusShow
:
false
,
curSelectStatus
:
{
statustype
:
'
1
'
,
name
:
'
未受理
'
},
curSelectStatus
:
{
statustype
:
'
2
'
,
name
:
'
派工中
'
},
statusList
:
[
statusList
:
[
{
statustype
:
'
1
'
,
name
:
'
未受理
'
},
{
statustype
:
'
1
'
,
name
:
'
未受理
'
},
{
statustype
:
'
2
'
,
name
:
'
派工中
'
},
{
statustype
:
'
2
'
,
name
:
'
派工中
'
},
...
@@ -213,11 +228,26 @@ export default {
...
@@ -213,11 +228,26 @@ export default {
this
.
getWorkers
()
this
.
getWorkers
()
},
},
methods
:
{
methods
:
{
preview
(
img
,
index
){
let
temp
=
img
.
map
(
item
=>
{
return
item
.
url
})
ImagePreview
({
images
:
temp
,
startPosition
:
index
,
});
},
callPhone
(
item
){
console
.
log
(
'
电话
'
,
item
)
let
phoneNumber
=
item
.
telephone
window
.
location
.
href
=
'
tel://
'
+
phoneNumber
},
//指派工人
//指派工人
sureOrder
(
item
){
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
(
'
1111
'
,
item
);
// console.log('index',index);
// console.log('1111',item);
this
.
curItem
=
item
this
.
curItem
=
item
this
.
repair_order_id
=
item
.
id
this
.
repair_order_id
=
item
.
id
if
(
this
.
worker_id
==
''
)
{
if
(
this
.
worker_id
==
''
)
{
...
@@ -231,11 +261,19 @@ export default {
...
@@ -231,11 +261,19 @@ 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
);
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
this
.
changeList
(
data
,
index
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
changeList
(
data
,
index
){
if
(
this
.
curSelectStatus
.
statustype
==
0
){
this
.
$set
(
this
.
list
,
index
,
data
)
}
else
{
this
.
list
.
splice
(
index
,
1
)
}
},
// 取消工单
// 取消工单
cancelOrder
(
item
){
cancelOrder
(
item
){
console
.
log
(
'
aaa
'
,
item
);
console
.
log
(
'
aaa
'
,
item
);
...
@@ -271,9 +309,14 @@ export default {
...
@@ -271,9 +309,14 @@ export default {
return
val
;
return
val
;
},
},
birConfirm
(
value
)
{
birConfirm
(
value
)
{
this
.
showStart
=
false
console
.
log
(
'
啊啊啊
'
,
value
);
console
.
log
(
'
啊啊啊
'
,
value
);
if
(
this
.
startTime
==
this
.
conversionTime
(
value
)){
return
}
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
showStart
=
false
this
.
$set
(
this
.
endObj
,
'
minDate
'
,
value
)
this
.
anginList
()
console
.
log
(
'
开始时间
'
,
this
.
startTime
);
console
.
log
(
'
开始时间
'
,
this
.
startTime
);
},
},
conversionTime
(
temp
){
conversionTime
(
temp
){
...
@@ -289,10 +332,21 @@ export default {
...
@@ -289,10 +332,21 @@ export default {
this
.
showStart
=
false
;
this
.
showStart
=
false
;
},
},
endTimeConfirm
(
value
){
endTimeConfirm
(
value
){
this
.
showEnd
=
false
if
(
this
.
endTime
==
this
.
conversionTime
(
value
)){
return
}
this
.
endTime
=
this
.
conversionTime
(
value
)
this
.
endTime
=
this
.
conversionTime
(
value
)
this
.
showEnd
=
false
this
.
$set
(
this
.
startObj
,
'
maxDate
'
,
value
)
this
.
anginList
()
console
.
log
(
'
结束时间
'
,
this
.
endTime
);
console
.
log
(
'
结束时间
'
,
this
.
endTime
);
},
},
anginList
(){
if
(
this
.
startTime
!=
'
请选择开始日期
'
&&
this
.
endTime
!=
'
请选择截止日期
'
){
this
.
initData
()
this
.
getList
()
}
},
endTimeCancel
()
{
endTimeCancel
()
{
this
.
showEnd
=
false
;
this
.
showEnd
=
false
;
},
},
...
@@ -320,26 +374,24 @@ export default {
...
@@ -320,26 +374,24 @@ export default {
getList
()
{
getList
()
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
this
.
isloading
=
true
this
.
isloading
=
true
let
curParams
=
{}
console
.
log
(
'
类型
'
,
this
.
curSelect
.
type
);
console
.
log
(
'
类型
'
,
this
.
curSelect
.
type
);
// if(this.curSelect.type==4){
if
(
this
.
curSelect
.
type
==
4
){
// const 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
,
// }
status
:
this
.
curSelectStatus
.
statustype
// }else{
}
// const curParams = {
}
else
{
// time_type: this.curSelect.type,
curParams
=
{
// page: this.page,
time_type
:
this
.
curSelect
.
type
,
// limit: this.limit
page
:
this
.
page
,
// }
limit
:
this
.
limit
,
// }
status
:
this
.
curSelectStatus
.
statustype
const
curParams
=
{
}
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
limit
:
this
.
limit
}
}
this
.
$http
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
...
@@ -350,6 +402,12 @@ export default {
...
@@ -350,6 +402,12 @@ export default {
this
.
locked
=
false
this
.
locked
=
false
this
.
isloading
=
false
this
.
isloading
=
false
this
.
count
=
data
.
count
this
.
count
=
data
.
count
if
(
data
.
worker
){
this
.
worker_id
=
data
.
worker
.
id
this
.
workerName
=
data
.
worker
.
name
}
console
.
log
(
'
工人
'
,
data
.
worker
.
id
,
data
.
worker
.
name
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
locked
=
false
this
.
locked
=
false
...
@@ -378,6 +436,9 @@ export default {
...
@@ -378,6 +436,9 @@ 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
){
return
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
initData
()
this
.
initData
()
this
.
getList
()
this
.
getList
()
...
@@ -388,14 +449,15 @@ export default {
...
@@ -388,14 +449,15 @@ export default {
changeStatus
(
item
)
{
changeStatus
(
item
)
{
if
(
item
.
statustype
!==
this
.
curSelectStatus
.
statustype
)
{
if
(
item
.
statustype
!==
this
.
curSelectStatus
.
statustype
)
{
this
.
curSelectStatus
=
item
this
.
curSelectStatus
=
item
console
.
log
(
'
1111
'
,
this
.
curSelectStatus
);
this
.
statusShow
=
false
this
.
statusShow
=
false
setTimeout
(()
=>
{
setTimeout
(()
=>
{
//
this.initData()
this
.
initData
()
//
this.getList()
this
.
getList
()
},
0
)
},
0
)
}
}
},
},
//
转
单提交
//
取消工
单提交
qx_submit
()
{
qx_submit
()
{
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
)
...
@@ -412,7 +474,7 @@ export default {
...
@@ -412,7 +474,7 @@ export default {
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
qxShow
=
false
this
.
qxShow
=
false
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
this
.
changeList
(
data
,
index
)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
qxShow
=
false
this
.
qxShow
=
false
...
...
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