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
46fc69cc
Commit
46fc69cc
authored
Aug 31, 2021
by
石盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理员端页面+接口
parent
c9e6ef3f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
874 additions
and
43 deletions
+874
-43
apiList.js
src/api/apiList.js
+6
-1
admin_index.scss
src/assets/styles/tabbar/admin_index.scss
+350
-0
index.scss
src/assets/styles/tabbar/index.scss
+1
-0
index.js
src/router/index.js
+15
-0
charge.vue
src/views/my/charge.vue
+58
-25
lookEvaluate.vue
src/views/my/lookEvaluate.vue
+9
-14
Home.vue
src/views/tabbar/Home.vue
+3
-2
admin_home.vue
src/views/tabbar/admin_home.vue
+431
-0
vue.config.js
vue.config.js
+1
-1
No files found.
src/api/apiList.js
View file @
46fc69cc
...
@@ -38,5 +38,10 @@ export default {
...
@@ -38,5 +38,10 @@ export default {
REPAIR_MATERIAL_SHOW
:
baseUrl
+
'
/worker/material/show
'
,
// 查看耗材
REPAIR_MATERIAL_SHOW
:
baseUrl
+
'
/worker/material/show
'
,
// 查看耗材
REPAIR_TRANSFER
:
baseUrl
+
'
/worker/repair/transfer
'
,
// 发起转单
REPAIR_TRANSFER
:
baseUrl
+
'
/worker/repair/transfer
'
,
// 发起转单
REPAIR_COMPLETE
:
baseUrl
+
'
/worker/repair/complete
'
,
// 确认完成
REPAIR_COMPLETE
:
baseUrl
+
'
/worker/repair/complete
'
,
// 确认完成
REPAIR_APPRAISAL
:
baseUrl
+
'
/worker/repair/appraisal
'
// 查看评论
REPAIR_APPRAISAL
:
baseUrl
+
'
/worker/repair/appraisal
'
,
// 查看评论
// 管理员端
GET_WORKER
:
baseUrl
+
'
/worker/get/worker
'
,
// 查看评论
REPAIR_CANCEL
:
baseUrl
+
'
/worker/repair/cancel
'
,
// 查看评论
REPAIR_ASSIGN
:
baseUrl
+
'
/worker/repair/assign
'
// 指派工人
}
}
src/assets/styles/tabbar/admin_index.scss
0 → 100644
View file @
46fc69cc
@import
"../global.scss"
;
.cont
{
min-height
:
100vh
;
background
:
#fff
;
padding
:
0
.4rem
0rem
;
}
.top
{
height
:
0
.36rem
;
margin-bottom
:
0
.38rem
;
margin-left
:
0
.3rem
;
}
.top
.point
{
width
:
0
.1rem
;
height
:
0
.1rem
;
background
:
#0054ff
;
border-radius
:
50%
;
margin-right
:
0
.13rem
;
}
.top
.status
{
color
:
#0054ff
;
font-size
:
0
.36rem
;
font-weight
:
bold
;
}
.menu
.hc_total
{
color
:
#727272
;
font-size
:
0
.28rem
;
}
.menu
.options
{
width
:
1
.76rem
;
height
:
0
.58rem
;
background
:
#ffffff
;
border
:
1px
solid
#0054ff
;
border-radius
:
0
.12rem
;
color
:
#0054ff
;
font-size
:
0
.28rem
;
line-height
:
0
.58rem
;
text-align
:
center
;
position
:
relative
;
z-index
:
10
;
margin-right
:
0
.3rem
;
}
.menu
.options
.option-box
{
width
:
1
.7rem
;
// height: 2rem;
background
:
#fff
;
border
:
1px
solid
#0054ff
;
position
:
absolute
;
top
:
0
.57rem
;
left
:
0rem
;
z-index
:
10
;
border-radius
:
0
0
0
.12rem
0
.12rem
;
}
// 日期选择样式
.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
;
}
.select
.select_txt
{
color
:
#0054ff
;
font-size
:
0
.3rem
;
margin-right
:
0
.2rem
;
}
.select
img
{
width
:
0
.15rem
;
height
:
0
.26rem
;
}
.allBtn
.button
{
width
:
1
.80rem
;
height
:
0
.70rem
;
background
:
#FFFFFF
;
border
:
0
.01rem
solid
#C8C8C8
;
border-radius
:
0
.35rem
;
text-align
:
center
;
line-height
:
0
.7rem
;
color
:
#000000
;
font-size
:
0
.24rem
;
// margin-right: 0.2rem;
}
.allBtn
.sureBtn
{
width
:
1
.8rem
;
height
:
0
.7rem
;
background
:
#0054FF
;
border-radius
:
0
.35rem
;
text-align
:
center
;
line-height
:
0
.7rem
;
color
:
#fff
;
font-size
:
0
.24rem
;
margin-left
:
0
.2rem
;
}
.cancel_cont
{
width
:
6
.9rem
;
max-height
:
7rem
;
background
:
#fff
;
border-radius
:
0
.12rem
;
padding-top
:
0
.4rem
;
padding-bottom
:
0
.2rem
;
text-align
:
center
;
}
.order-item
{
width
:
6
.9rem
;
background
:
#ffffff
;
box-shadow
:
0px
0px
0
.12rem
0
.01rem
rgba
(
214
,
214
,
214
,
0
.78
);
border-radius
:
0
.12rem
;
margin
:
0
.4rem
auto
0
.2rem
;
padding
:
0
.4rem
0
.3rem
;
font-size
:
0
.3rem
;
}
.title
{
color
:
#0054ff
;
font-size
:
0
.32rem
;
font-weight
:
bold
;
margin-bottom
:
0
.5rem
;
}
.item
{
// height: 0.3rem;
margin-bottom
:
0
.2rem
;
}
.item-title
{
// min-width: 1.5rem;
color
:
#000000
;
}
.item-desc
{
color
:
#727272
;
}
.que-desc
{
margin
:
.2rem
auto
;
}
.img
{
width
:
1
.2rem
;
height
:
1
.2rem
;
border-radius
:
0
.08rem
;
margin-top
:
0
.08rem
;
}
.img
img
{
width
:
100%
;
height
:
100%
;
border-radius
:
0
.08rem
;
margin-left
:
0
.16rem
;
margin-right
:
0
.16rem
;
}
.list-item
{
margin-bottom
:
0
.4rem
;
}
.line
{
width
:
6
.28rem
;
height
:
0
.01rem
;
background
:
#f1f1f1
;
margin-bottom
:
0
.4rem
;
}
.tc_line
{
width
:
100%
;
height
:
0
.01rem
;
background
:
#f1f1f1
;
margin
:
0
auto
0
.4rem
;
}
.ma-item
{
// margin-top: 0.3rem;
height
:
0
.6rem
;
}
.bz-title
{
margin-bottom
:
0
.2rem
;
}
.one
{
color
:
#727272
;
margin-bottom
:
0
.3rem
;
}
.one-item
{
margin-left
:
0
.3rem
;
margin-right
:
0
.3rem
;
}
.btn
{
margin-top
:
0
.2rem
;
}
.btn-item
{
width
:
1
.8rem
;
height
:
0
.7rem
;
background
:
#0054ff
;
border-radius
:
0
.35rem
;
text-align
:
center
;
line-height
:
0
.7rem
;
color
:
#fff
;
font-size
:
0
.27rem
;
margin-left
:
0
.2rem
;
}
.sf-btn
{
background
:
#ffffff
;
border
:
1px
solid
#0054ff
;
color
:
#0054ff
;
}
.blank
{
height
:
1rem
;
}
// .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
{
color
:
#000000
;
font-size
:
0
.36rem
;
font-weight
:
bold
;
margin-bottom
:
0
.4rem
;
}
.van-popup
textarea
{
width
:
6
.3rem
;
height
:
3rem
;
border
:
1px
solid
#f1f1f1
;
border-radius
:
0
.08rem
;
padding
:
0
.3rem
0
.2rem
;
}
.
van-popup
textarea
:
:-
webkit-input-placeholder
{
color
:
#c8c8c8
;
font-size
:
0
.26rem
;
}
.btnItem
{
margin-top
:
0
.4rem
;
margin-left
:
0
.65rem
;
}
.btnItem
.cancel
{
width
:
2
.65rem
;
height
:
0
.78rem
;
border
:
1px
solid
#c8c8c8
;
border-radius
:
0
.39rem
;
color
:
#000000
;
font-size
:
0
.32rem
;
text-align
:
center
;
line-height
:
0
.78rem
;
margin-right
:
0
.3rem
;
}
.btnItem
.sure
{
width
:
2
.65rem
;
height
:
0
.78rem
;
background
:
linear-gradient
(
270deg
,
#0054ff
,
#1965ff
);
border-radius
:
0
.39rem
;
color
:
#ffffff
;
font-size
:
0
.32rem
;
text-align
:
center
;
line-height
:
0
.78rem
;
margin-right
:
0
.3rem
;
}
.input
{
width
:
6
.3rem
;
height
:
0
.76rem
;
background
:
#ffffff
;
border
:
1px
solid
#f1f1f1
;
border-radius
:
0
.08rem
;
text-align
:
left
;
padding-left
:
0
.2rem
;
margin-bottom
:
0
.1rem
;
font-size
:
0
.3rem
;
}
.
input
:
:-
webkit-input-placeholder
{
color
:
#c8c8c8
;
font-size
:
0
.3rem
;
}
.math-btn
{
margin-left
:
0
.3rem
;
margin-right
:
0
.3rem
;
color
:
#0256ff
;
font-size
:
0
.3rem
;
}
.hc_total
{
text-align
:
left
;
color
:
#000000
;
font-size
:
0
.26rem
;
margin-left
:
0
.3rem
;
}
.sure-btn
{
width
:
3
.12rem
;
height
:
0
.78rem
;
background
:
linear-gradient
(
270deg
,
#0054ff
,
#1965ff
);
border-radius
:
0
.39rem
;
color
:
#ffffff
;
text-align
:
center
;
line-height
:
0
.78rem
;
margin
:
1
.2rem
auto
;
}
\ No newline at end of file
src/assets/styles/tabbar/index.scss
View file @
46fc69cc
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
.item-title
{
.item-title
{
// min-width: 1.5rem;
// min-width: 1.5rem;
color
:
#000000
;
color
:
#000000
;
white-space
:
nowrap
;
}
}
.item-desc
{
.item-desc
{
color
:
#727272
;
color
:
#727272
;
...
...
src/router/index.js
View file @
46fc69cc
...
@@ -35,6 +35,15 @@ const routes = [
...
@@ -35,6 +35,15 @@ const routes = [
},
},
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
},
},
{
path
:
'
/admin_home
'
,
name
:
'
admin_home
'
,
meta
:
{
title
:
'
报修工单
'
,
hideBack
:
true
},
component
:
()
=>
import
(
'
../views/tabbar/admin_home.vue
'
)
},
{
{
path
:
'
/modifyPhone
'
,
path
:
'
/modifyPhone
'
,
name
:
'
mesmodifyPhonesage
'
,
name
:
'
mesmodifyPhonesage
'
,
...
@@ -84,6 +93,7 @@ const router = new VueRouter({
...
@@ -84,6 +93,7 @@ const router = new VueRouter({
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
let
token
=
window
.
localStorage
.
getItem
(
'
token
'
)
let
token
=
window
.
localStorage
.
getItem
(
'
token
'
)
let
status
=
window
.
localStorage
.
getItem
(
'
status
'
)
let
status
=
window
.
localStorage
.
getItem
(
'
status
'
)
let
role
=
window
.
localStorage
.
getItem
(
'
role
'
)
if
(
to
.
path
===
'
/login
'
&&
token
&&
status
)
{
if
(
to
.
path
===
'
/login
'
&&
token
&&
status
)
{
next
()
next
()
return
true
return
true
...
@@ -92,6 +102,11 @@ router.beforeEach((to, from, next) => {
...
@@ -92,6 +102,11 @@ router.beforeEach((to, from, next) => {
console
.
log
(
'
ok-------0
'
,
status
)
console
.
log
(
'
ok-------0
'
,
status
)
token
=
to
.
query
.
token
token
=
to
.
query
.
token
status
=
to
.
query
.
status
status
=
to
.
query
.
status
console
.
log
(
'
1111
'
,
to
.
query
)
if
(
to
.
query
.
role
!=
0
)
{
role
=
to
.
query
.
role
window
.
localStorage
.
setItem
(
'
role
'
,
role
)
}
// console.log(token)
// console.log(token)
// console.log(status)
// console.log(status)
window
.
localStorage
.
setItem
(
'
token
'
,
token
)
window
.
localStorage
.
setItem
(
'
token
'
,
token
)
...
...
src/views/my/charge.vue
View file @
46fc69cc
...
@@ -62,11 +62,11 @@
...
@@ -62,11 +62,11 @@
</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=
"number"
placeholder=
"请输入"
v-model=
"item.sl
"
@
input=
"changeInput($event,index)"
/>
<input
type=
"number"
:min=
"1"
placeholder=
"请输入"
v-model=
"item.number
"
@
input=
"changeInput($event,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
.
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
v-if=
"addList.length>1"
class=
"delete-btn"
@
click=
"delMeth(index)"
>
<img
src=
"@assets/images/lajitong.png"
alt=
""
>
<img
src=
"@assets/images/lajitong.png"
alt=
""
>
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
<div
class=
"bottom flex-h flex-hb flex-vc"
>
<div
class=
"bottom flex-h flex-hb flex-vc"
>
<div
class=
"left"
>
<div
class=
"left"
>
共
共
<span>
{{
addList
.
length
}}
</span>
件,总金额:
<span>
{{
goods_number
}}
</span>
件,总金额:
<span>
¥
{{
total_price
}}
</span>
<span>
¥
{{
total_price
}}
</span>
</div>
</div>
<div
class=
"skBtn"
@
click=
"launch(repair_order_id)"
>
发起收款
</div>
<div
class=
"skBtn"
@
click=
"launch(repair_order_id)"
>
发起收款
</div>
...
@@ -120,10 +120,12 @@ export default {
...
@@ -120,10 +120,12 @@ export default {
{
{
zl
:
''
,
zl
:
''
,
mc
:
''
,
mc
:
''
,
sl
:
''
,
number
:
''
,
price
:
'
暂无
'
,
single_
price
:
'
暂无
'
,
zlSelect
:
false
,
zlSelect
:
false
,
mcSelect
:
false
mcSelect
:
false
,
parent_id
:
''
,
goods_id
:
''
,
}
}
],
],
showPicker
:
false
,
showPicker
:
false
,
...
@@ -138,6 +140,7 @@ export default {
...
@@ -138,6 +140,7 @@ export default {
hcList
:
[],
hcList
:
[],
total_price
:
0
,
total_price
:
0
,
hc_price
:
''
,
hc_price
:
''
,
goods_number
:
0
,
}
}
},
},
created
()
{
created
()
{
...
@@ -146,9 +149,6 @@ export default {
...
@@ -146,9 +149,6 @@ export default {
// console.log(this.$route.query.id,'接收的id');
// console.log(this.$route.query.id,'接收的id');
this
.
getDetail
()
this
.
getDetail
()
},
},
// mounted(){
// this.getDetail()
// },
methods
:
{
methods
:
{
getDetail
()
{
getDetail
()
{
const
curParams
=
{
const
curParams
=
{
...
@@ -173,16 +173,19 @@ export default {
...
@@ -173,16 +173,19 @@ export default {
this
.
addList
[
index
].
zlSelect
=
true
this
.
addList
[
index
].
zlSelect
=
true
},
},
typeConfirm
(
value
,
index
)
{
typeConfirm
(
value
,
index
)
{
console
.
log
(
'
11111
'
,
value
);
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
console
.
log
(
'
parent_id
'
,
this
.
addList
[
index
].
parent_id
);
var
childArr
=
[]
var
childArr
=
[]
for
(
let
i
in
value
.
son
){
for
(
let
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
,
price
:
value
.
son
[
i
].
price
single_
price
:
value
.
son
[
i
].
price
})
})
}
}
this
.
hcName
=
childArr
this
.
hcName
=
childArr
...
@@ -194,20 +197,41 @@ export default {
...
@@ -194,20 +197,41 @@ export default {
this
.
addList
[
index
].
mcSelect
=
true
this
.
addList
[
index
].
mcSelect
=
true
},
},
hcConfirm
(
value
,
index
)
{
hcConfirm
(
value
,
index
)
{
console
.
log
(
value
,
'
耗材名称
'
);
console
.
log
(
'
啊啊啊
'
,
value
);
// console.log('addlist',this.addList);
this
.
addList
[
index
].
mc
=
value
.
goods_name
this
.
addList
[
index
].
mc
=
value
.
goods_name
this
.
addList
[
index
].
price
=
value
.
price
this
.
addList
[
index
].
single_price
=
value
.
single_price
this
.
addList
[
index
].
mcSelect
=
false
this
.
addList
[
index
].
mcSelect
=
false
console
.
log
(
'
家对的被动方法
'
,
this
.
addList
[
index
].
price
);
this
.
addList
[
index
].
goods_id
=
value
.
id
// this.total_price = this.addList[index].price
this
.
hc_price
=
this
.
addList
[
index
].
single_price
this
.
hc_price
=
this
.
addList
[
index
].
price
console
.
log
(
'
goods_id
'
,
this
.
addList
[
index
].
goods_id
);
this
.
total_price
=
this
.
hc_number
*
this
.
hc_price
this
.
getMonery
()
},
},
changeInput
(
e
,
index
){
changeInput
(
e
,
index
){
console
.
log
(
'
啊啊啊啊
'
,
e
);
console
.
log
(
'
哎哎哎哎哎哎
'
,
index
);
this
.
hc_number
=
e
.
target
.
value
this
.
hc_number
=
e
.
target
.
value
this
.
total_price
=
this
.
hc_number
*
this
.
hc_price
console
.
log
(
'
商品数量
'
,
this
.
hc_number
)
this
.
getMonery
()
this
.
totalCount
()
},
getMonery
(){
console
.
log
(
'
addlist
'
,
this
.
addList
);
console
.
log
(
'
执行了吗
'
);
let
total_price
=
0
for
(
let
i
=
0
;
i
<
this
.
addList
.
length
;
i
++
){
total_price
+=
this
.
addList
[
i
].
single_price
*
this
.
addList
[
i
].
number
}
this
.
total_price
=
total_price
console
.
log
(
'
总价钱
'
,
total_price
);
},
totalCount
(){
console
.
log
(
'
走了嘛
'
);
let
count
=
0
for
(
let
i
=
0
;
i
<
this
.
addList
.
length
;
i
++
){
count
+=
Number
(
this
.
addList
[
i
].
number
)
}
this
.
goods_number
=
count
console
.
log
(
'
商品总数量
'
,
this
.
goods_number
);
},
},
hcCancel
(
index
)
{
hcCancel
(
index
)
{
this
.
addList
[
index
].
mcSelect
=
false
this
.
addList
[
index
].
mcSelect
=
false
...
@@ -216,19 +240,26 @@ export default {
...
@@ -216,19 +240,26 @@ export default {
this
.
addList
.
push
({
this
.
addList
.
push
({
zl
:
''
,
zl
:
''
,
mc
:
''
,
mc
:
''
,
sl
:
''
,
number
:
''
,
price
:
'
暂无
'
,
single_
price
:
'
暂无
'
,
zlSelect
:
false
,
zlSelect
:
false
,
mcSelect
:
false
mcSelect
:
false
})
})
},
},
delMeth
(
index
){
delMeth
(
index
){
console
.
log
(
'
删除的项
'
,
index
);
console
.
log
(
'
删除的项
'
,
index
);
this
.
addList
.
splice
(
index
,
1
)
this
.
addList
.
splice
(
index
,
1
)
this
.
getMonery
()
},
},
launch
(
id
){
launch
(
id
){
console
.
log
(
'
东西啊啊
'
,
this
.
addList
[
0
].
sl
);
let
bool
=
this
.
addList
.
every
(
item
=>
{
return
item
.
number
&&
item
.
mc
&&
item
.
zl
})
if
(
!
bool
){
this
.
$toast
.
fail
(
'
请输入完整
'
)
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
...
@@ -237,6 +268,8 @@ export default {
...
@@ -237,6 +268,8 @@ export default {
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
.
$router
.
go
(
-
1
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
...
...
src/views/my/lookEvaluate.vue
View file @
46fc69cc
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
totalStar
:
''
,
totalStar
:
0
,
speedStar
:
''
,
speedStar
:
0
,
qualityStar
:
''
,
qualityStar
:
0
,
attitudeStar
:
''
,
attitudeStar
:
0
,
repair_order_id
:
''
,
repair_order_id
:
''
,
comment
:
''
,
comment
:
''
,
}
}
...
@@ -44,13 +44,8 @@ export default {
...
@@ -44,13 +44,8 @@ export default {
// this.getStatus()
// this.getStatus()
},
},
methods
:
{
methods
:
{
onChange
(
event
)
{
this
.
setData
({
value
:
event
.
detail
,
});
},
// 查看评论
// 查看评论
look_comment
(
i
tem
)
{
look_comment
(
i
d
)
{
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
repair_order_id
:
this
.
repair_order_id
}
}
...
@@ -58,10 +53,10 @@ export default {
...
@@ -58,10 +53,10 @@ export default {
.
get
(
this
.
$myApi
.
REPAIR_APPRAISAL
,
curParams
)
.
get
(
this
.
$myApi
.
REPAIR_APPRAISAL
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
comment
=
data
this
.
comment
=
data
this
.
speedStar
=
data
.
speed_stars
this
.
speedStar
=
Number
(
data
.
speed_stars
)
this
.
qualityStar
=
data
.
quality_stars
this
.
qualityStar
=
Number
(
data
.
quality_stars
)
this
.
attitudeStar
=
data
.
attitude_stars
this
.
attitudeStar
=
Number
(
data
.
attitude_stars
)
this
.
totalStar
=
data
.
stars
this
.
totalStar
=
Number
(
data
.
stars
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
...
...
src/views/tabbar/Home.vue
View file @
46fc69cc
...
@@ -355,7 +355,7 @@ export default {
...
@@ -355,7 +355,7 @@ export default {
// 备注提交
// 备注提交
bz_submit
()
{
bz_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
)
let
noall
=
false
let
noall
=
false
this
.
addList
.
some
(
item
=>
{
this
.
addList
.
some
(
item
=>
{
if
(
trimStrSpace
(
item
.
goods_name
)
===
''
||
item
.
number
===
''
)
{
if
(
trimStrSpace
(
item
.
goods_name
)
===
''
||
item
.
number
===
''
)
{
...
@@ -380,8 +380,9 @@ export default {
...
@@ -380,8 +380,9 @@ export default {
.
post
(
this
.
$myApi
.
MATERIAL_REMARK
,
curParams
)
.
post
(
this
.
$myApi
.
MATERIAL_REMARK
,
curParams
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
this
.
hcShow
=
false
this
.
hcShow
=
false
// vm.$set(vm.list, index, data)
this
.
$toast
(
'
操作成功
'
)
this
.
$toast
(
'
操作成功
'
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
hcShow
=
false
this
.
hcShow
=
false
...
...
src/views/tabbar/admin_home.vue
0 → 100644
View file @
46fc69cc
<
template
>
<div
class=
"cont"
>
<div
class=
"menu flex-h flex-hb flex-vc"
>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"flex-h flex-hb"
>
<div
class=
"options"
>
<div
@
click=
"chooseStatus"
>
{{
curSelectStatus
.
name
}}
</div>
<div
class=
"option-box"
v-show=
"statusShow"
>
<div
class=
"option-item"
v-for=
"item in statusList"
:key=
"item.statustype"
:value=
"item.name"
@
click=
"changeStatus(item)"
>
{{
item
.
name
}}
</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
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"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"index"
>
<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
class=
"item-desc que-desc"
>
{{
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"
>
{{
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
class=
"img flex-h"
v-for=
"(child, index) in item.image"
:key=
"index"
>
<img
:src=
"child.url"
alt
/>
</div>
</div>
<div
v-if=
"item.is_can_assign_worker==1"
>
<div
class=
"line"
></div>
<div
v-if=
"item.is_can_assign_worker==1"
class=
"item flex-h flex-vc flex-hb"
@
click=
"workers"
>
<div
class=
"flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-desc"
>
{{
workerName
}}
</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
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>
<!-- 空数据 -->
<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"
></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=
"showWorker"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"columns"
value-key=
"name"
@
cancel=
"Cancel"
@
confirm=
"onConfirm"
/>
</van-popup>
<!-- 选择开始日期弹窗 -->
<van-popup
v-model=
"showStart"
round
position=
"bottom"
>
<van-datetime-picker
v-model=
"currentDate"
type=
"date"
title=
"选择年月日"
:min-date=
"minDate"
:max-date=
"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=
"minDate"
:max-date=
"maxDate"
@
confirm=
"endTimeConfirm"
@
cancel=
"endTimeCancel"
:formatter=
"formatter"
/>
</van-popup>
</div>
</
template
>
<
script
>
import
myTabbar
from
'
@components/common/tabbar.vue
'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
export
default
{
name
:
'
home
'
,
components
:
{
myTabbar
},
data
()
{
return
{
reson
:
''
,
//取消原因
qxShow
:
false
,
// 发起转单弹窗
workerName
:
'
请选择
'
,
worker_id
:
''
,
showWorker
:
false
,
columns
:
[],
startTime
:
'
请选择开始日期
'
,
showStart
:
false
,
minDate
:
new
Date
(
1931
,
0
,
1
),
maxDate
:
new
Date
(),
currentDate
:
new
Date
(
2021
,
0
,
17
),
showEnd
:
false
,
endTime
:
"
请选择截止日期
"
,
// 头部日期范围筛选
tabShow
:
false
,
// tab范围选择框是否显示
curSelect
:
{
type
:
'
3
'
,
name
:
'
本月
'
},
// 当前选择的日期范围
optionList
:
[
{
type
:
'
1
'
,
name
:
'
今日
'
},
{
type
:
'
2
'
,
name
:
'
本周
'
},
{
type
:
'
3
'
,
name
:
'
本月
'
},
{
type
:
'
4
'
,
name
:
'
自定义
'
}
],
statusShow
:
false
,
curSelectStatus
:
{
statustype
:
'
1
'
,
name
:
'
未受理
'
},
statusList
:
[
{
statustype
:
'
1
'
,
name
:
'
未受理
'
},
{
statustype
:
'
2
'
,
name
:
'
派工中
'
},
{
statustype
:
'
3
'
,
name
:
'
已派工
'
},
{
statustype
:
'
4
'
,
name
:
'
维修中
'
},
{
statustype
:
'
5
'
,
name
:
'
已撤回
'
},
{
statustype
:
'
6
'
,
name
:
'
已转单
'
},
{
statustype
:
'
7
'
,
name
:
'
已退回
'
},
{
statustype
:
'
8
'
,
name
:
'
已完成
'
},
{
statustype
:
'
0
'
,
name
:
'
全部
'
}
],
// 工单数据
count
:
''
,
// 工单总数
list
:
[],
// 列表
isloading
:
false
,
page
:
1
,
more
:
true
,
locked
:
false
,
limit
:
10
,
imgList
:
[],
// 转单
curItem
:
''
,
// 当前选中要操作的数据
reason
:
''
,
// 原因
}
},
created
()
{
this
.
getList
()
this
.
getWorkers
()
},
methods
:
{
//指派工人
sureOrder
(
item
){
const
vm
=
this
const
index
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
this
.
curItem
.
id
)
console
.
log
(
'
1111
'
,
item
);
this
.
curItem
=
item
this
.
repair_order_id
=
item
.
id
if
(
this
.
worker_id
==
''
)
{
this
.
$toast
(
'
请选择工人
'
)
return
}
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
,
worker_id
:
this
.
worker_id
}
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_ASSIGN
,
curParams
)
.
then
((
data
)
=>
{
this
.
$toast
(
'
操作成功
'
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
})
.
catch
(()
=>
{})
},
// 取消工单
cancelOrder
(
item
){
console
.
log
(
'
aaa
'
,
item
);
this
.
curItem
=
item
this
.
qxShow
=
true
;
},
workers
(){
this
.
showWorker
=
true
},
onConfirm
(
value
)
{
console
.
log
(
'
1111
'
,
value
);
this
.
workerName
=
value
.
name
;
this
.
worker_id
=
value
.
id
this
.
showWorker
=
false
;
},
Cancel
(){
this
.
showWorker
=
false
;
},
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
)
{
console
.
log
(
'
啊啊啊
'
,
value
);
this
.
startTime
=
this
.
conversionTime
(
value
)
this
.
showStart
=
false
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
.
endTime
=
this
.
conversionTime
(
value
)
this
.
showEnd
=
false
console
.
log
(
'
结束时间
'
,
this
.
endTime
);
},
endTimeCancel
()
{
this
.
showEnd
=
false
;
},
//获取工人列表
getWorkers
(){
const
curParams
=
{}
this
.
$http
.
get
(
this
.
$myApi
.
GET_WORKER
,
curParams
)
.
then
((
data
)
=>
{
this
.
columns
=
data
})
.
catch
(()
=>
{
})
},
// 初始化
initData
()
{
this
.
list
=
[]
this
.
page
=
1
this
.
more
=
true
this
.
locked
=
false
this
.
isloading
=
false
},
// 获取工单列表
getList
()
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
this
.
isloading
=
true
console
.
log
(
'
类型
'
,
this
.
curSelect
.
type
);
// if(this.curSelect.type==4){
// const curParams = {
// time_type: this.curSelect.type,
// page: this.page,
// limit: this.limit,
// start: this.startTime,
// end: this.endTime
// }
// }else{
// const curParams = {
// time_type: this.curSelect.type,
// page: this.page,
// limit: this.limit
// }
// }
const
curParams
=
{
time_type
:
this
.
curSelect
.
type
,
page
:
this
.
page
,
limit
:
this
.
limit
}
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
.
then
((
data
)
=>
{
this
.
list
=
this
.
page
===
1
?
data
.
list
:
this
.
list
.
concat
(
data
.
list
)
this
.
page
=
data
.
page
this
.
more
=
data
.
more
this
.
locked
=
false
this
.
isloading
=
false
this
.
count
=
data
.
count
})
.
catch
(()
=>
{
this
.
locked
=
false
this
.
isloading
=
false
})
}
},
onRefresh
()
{
this
.
initData
()
if
(
!
this
.
locked
)
{
this
.
locked
=
true
this
.
getList
()
}
},
// 点击选择日期维度
chooseTab
(
e
)
{
this
.
tabShow
=
!
this
.
tabShow
},
//点击选择工单状态
chooseStatus
(
e
)
{
this
.
statusShow
=
!
this
.
statusShow
},
// 日期维度变化
changeItem
(
item
)
{
if
(
item
.
type
!==
this
.
curSelect
.
type
)
{
this
.
curSelect
=
item
this
.
tabShow
=
false
setTimeout
(()
=>
{
this
.
initData
()
this
.
getList
()
},
0
)
}
},
//订单状态变化
changeStatus
(
item
)
{
if
(
item
.
statustype
!==
this
.
curSelectStatus
.
statustype
)
{
this
.
curSelectStatus
=
item
this
.
statusShow
=
false
setTimeout
(()
=>
{
// this.initData()
// this.getList()
},
0
)
}
},
// 转单提交
qx_submit
()
{
const
vm
=
this
const
index
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
this
.
curItem
.
id
)
if
(
this
.
reason
===
''
)
{
this
.
$toast
(
'
取消原因不可为空
'
)
return
}
const
curParams
=
{
repair_order_id
:
this
.
curItem
.
id
,
content
:
this
.
reason
}
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_CANCEL
,
curParams
)
.
then
((
data
)
=>
{
this
.
qxShow
=
false
this
.
$toast
(
'
操作成功
'
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
})
.
catch
(()
=>
{
this
.
qxShow
=
false
})
},
// 取消按钮
cancel
()
{
this
.
qxShow
=
false
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/tabbar/admin_index.scss"
;
</
style
>
vue.config.js
View file @
46fc69cc
...
@@ -57,7 +57,7 @@ module.exports = {
...
@@ -57,7 +57,7 @@ module.exports = {
host
:
'
localhost
'
,
host
:
'
localhost
'
,
// host: "192.168.3.44",
// host: "192.168.3.44",
https
:
false
,
// https:{type:Boolean}
https
:
false
,
// https:{type:Boolean}
open
:
tru
e
,
// 配置自动启动浏览器
open
:
fals
e
,
// 配置自动启动浏览器
proxy
:
{
proxy
:
{
'
/api/
'
:
{
'
/api/
'
:
{
// todo: url
// todo: url
...
...
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