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
Expand all
Show 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 {
REPAIR_MATERIAL_SHOW
:
baseUrl
+
'
/worker/material/show
'
,
// 查看耗材
REPAIR_TRANSFER
:
baseUrl
+
'
/worker/repair/transfer
'
,
// 发起转单
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 @@
.item-title
{
// min-width: 1.5rem;
color
:
#000000
;
white-space
:
nowrap
;
}
.item-desc
{
color
:
#727272
;
...
...
src/router/index.js
View file @
46fc69cc
...
...
@@ -35,6 +35,15 @@ const routes = [
},
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
'
,
name
:
'
mesmodifyPhonesage
'
,
...
...
@@ -84,6 +93,7 @@ const router = new VueRouter({
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
let
token
=
window
.
localStorage
.
getItem
(
'
token
'
)
let
status
=
window
.
localStorage
.
getItem
(
'
status
'
)
let
role
=
window
.
localStorage
.
getItem
(
'
role
'
)
if
(
to
.
path
===
'
/login
'
&&
token
&&
status
)
{
next
()
return
true
...
...
@@ -92,6 +102,11 @@ router.beforeEach((to, from, next) => {
console
.
log
(
'
ok-------0
'
,
status
)
token
=
to
.
query
.
token
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(status)
window
.
localStorage
.
setItem
(
'
token
'
,
token
)
...
...
src/views/my/charge.vue
View file @
46fc69cc
...
...
@@ -62,11 +62,11 @@
</div>
<div
class=
"item flex-h flex-vc"
>
<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
class=
"item flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材价格
</div>
<div
class=
"title_r"
>
{{
item
.
price
}}
</div>
<div
class=
"title_r"
>
{{
item
.
single_
price
}}
</div>
</div>
<div
v-if=
"addList.length>1"
class=
"delete-btn"
@
click=
"delMeth(index)"
>
<img
src=
"@assets/images/lajitong.png"
alt=
""
>
...
...
@@ -103,7 +103,7 @@
<div
class=
"bottom flex-h flex-hb flex-vc"
>
<div
class=
"left"
>
共
<span>
{{
addList
.
length
}}
</span>
件,总金额:
<span>
{{
goods_number
}}
</span>
件,总金额:
<span>
¥
{{
total_price
}}
</span>
</div>
<div
class=
"skBtn"
@
click=
"launch(repair_order_id)"
>
发起收款
</div>
...
...
@@ -120,10 +120,12 @@ export default {
{
zl
:
''
,
mc
:
''
,
sl
:
''
,
price
:
'
暂无
'
,
number
:
''
,
single_
price
:
'
暂无
'
,
zlSelect
:
false
,
mcSelect
:
false
mcSelect
:
false
,
parent_id
:
''
,
goods_id
:
''
,
}
],
showPicker
:
false
,
...
...
@@ -138,6 +140,7 @@ export default {
hcList
:
[],
total_price
:
0
,
hc_price
:
''
,
goods_number
:
0
,
}
},
created
()
{
...
...
@@ -146,9 +149,6 @@ export default {
// console.log(this.$route.query.id,'接收的id');
this
.
getDetail
()
},
// mounted(){
// this.getDetail()
// },
methods
:
{
getDetail
()
{
const
curParams
=
{
...
...
@@ -173,16 +173,19 @@ export default {
this
.
addList
[
index
].
zlSelect
=
true
},
typeConfirm
(
value
,
index
)
{
console
.
log
(
'
11111
'
,
value
);
this
.
hcList
=
value
this
.
addList
[
index
].
zl
=
value
.
goods_name
this
.
addList
[
index
].
zlSelect
=
false
this
.
addList
[
index
].
parent_id
=
value
.
id
console
.
log
(
'
parent_id
'
,
this
.
addList
[
index
].
parent_id
);
var
childArr
=
[]
for
(
let
i
in
value
.
son
){
childArr
.
push
({
id
:
value
.
son
[
i
].
id
,
goods_name
:
value
.
son
[
i
].
goods_name
,
price
:
value
.
son
[
i
].
price
single_
price
:
value
.
son
[
i
].
price
})
}
this
.
hcName
=
childArr
...
...
@@ -194,20 +197,41 @@ export default {
this
.
addList
[
index
].
mcSelect
=
true
},
hcConfirm
(
value
,
index
)
{
console
.
log
(
value
,
'
耗材名称
'
);
console
.
log
(
'
啊啊啊
'
,
value
);
// console.log('addlist',this.addList);
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
console
.
log
(
'
家对的被动方法
'
,
this
.
addList
[
index
].
price
);
// this.total_price = this.addList[index].price
this
.
hc_price
=
this
.
addList
[
index
].
price
this
.
total_price
=
this
.
hc_number
*
this
.
hc_price
this
.
addList
[
index
].
goods_id
=
value
.
id
this
.
hc_price
=
this
.
addList
[
index
].
single_price
console
.
log
(
'
goods_id
'
,
this
.
addList
[
index
].
goods_id
);
this
.
getMonery
()
},
changeInput
(
e
,
index
){
console
.
log
(
'
啊啊啊啊
'
,
e
);
console
.
log
(
'
哎哎哎哎哎哎
'
,
index
);
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
)
{
this
.
addList
[
index
].
mcSelect
=
false
...
...
@@ -216,8 +240,8 @@ export default {
this
.
addList
.
push
({
zl
:
''
,
mc
:
''
,
sl
:
''
,
price
:
'
暂无
'
,
number
:
''
,
single_
price
:
'
暂无
'
,
zlSelect
:
false
,
mcSelect
:
false
})
...
...
@@ -225,10 +249,17 @@ export default {
delMeth
(
index
){
console
.
log
(
'
删除的项
'
,
index
);
this
.
addList
.
splice
(
index
,
1
)
this
.
getMonery
()
},
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
=
{
repair_order_id
:
this
.
repair_order_id
,
goods
:
this
.
addList
...
...
@@ -237,6 +268,8 @@ export default {
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_ORDER
,
curParams
)
.
then
(
res
=>
{
console
.
log
(
'
执行了吗
'
);
this
.
$toast
.
success
(
'
发起成功
'
)
this
.
$router
.
go
(
-
1
)
})
.
catch
(()
=>
{})
},
...
...
src/views/my/lookEvaluate.vue
View file @
46fc69cc
...
...
@@ -29,10 +29,10 @@
export
default
{
data
(){
return
{
totalStar
:
''
,
speedStar
:
''
,
qualityStar
:
''
,
attitudeStar
:
''
,
totalStar
:
0
,
speedStar
:
0
,
qualityStar
:
0
,
attitudeStar
:
0
,
repair_order_id
:
''
,
comment
:
''
,
}
...
...
@@ -44,13 +44,8 @@ export default {
// this.getStatus()
},
methods
:
{
onChange
(
event
)
{
this
.
setData
({
value
:
event
.
detail
,
});
},
// 查看评论
look_comment
(
i
tem
)
{
look_comment
(
i
d
)
{
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
}
...
...
@@ -58,10 +53,10 @@ export default {
.
get
(
this
.
$myApi
.
REPAIR_APPRAISAL
,
curParams
)
.
then
((
data
)
=>
{
this
.
comment
=
data
this
.
speedStar
=
data
.
speed_stars
this
.
qualityStar
=
data
.
quality_stars
this
.
attitudeStar
=
data
.
attitude_stars
this
.
totalStar
=
data
.
stars
this
.
speedStar
=
Number
(
data
.
speed_stars
)
this
.
qualityStar
=
Number
(
data
.
quality_stars
)
this
.
attitudeStar
=
Number
(
data
.
attitude_stars
)
this
.
totalStar
=
Number
(
data
.
stars
)
})
.
catch
(()
=>
{})
},
...
...
src/views/tabbar/Home.vue
View file @
46fc69cc
...
...
@@ -355,7 +355,7 @@ export default {
// 备注提交
bz_submit
()
{
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
this
.
addList
.
some
(
item
=>
{
if
(
trimStrSpace
(
item
.
goods_name
)
===
''
||
item
.
number
===
''
)
{
...
...
@@ -380,8 +380,9 @@ export default {
.
post
(
this
.
$myApi
.
MATERIAL_REMARK
,
curParams
)
.
then
((
data
)
=>
{
this
.
hcShow
=
false
// vm.$set(vm.list, index, data)
this
.
$toast
(
'
操作成功
'
)
vm
.
$set
(
vm
.
list
,
index
,
data
)
})
.
catch
(()
=>
{
this
.
hcShow
=
false
...
...
src/views/tabbar/admin_home.vue
0 → 100644
View file @
46fc69cc
This diff is collapsed.
Click to expand it.
vue.config.js
View file @
46fc69cc
...
...
@@ -57,7 +57,7 @@ module.exports = {
host
:
'
localhost
'
,
// host: "192.168.3.44",
https
:
false
,
// https:{type:Boolean}
open
:
tru
e
,
// 配置自动启动浏览器
open
:
fals
e
,
// 配置自动启动浏览器
proxy
:
{
'
/api/
'
:
{
// 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