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
d7f3d801
Commit
d7f3d801
authored
Aug 27, 2021
by
郭欢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.xueyoubangedu.com:2228/shipanpan/repair_workers_h5
parents
18f77d7c
13b78aa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
129 additions
and
59 deletions
+129
-59
login.vue
src/views/login/login.vue
+1
-1
charge.vue
src/views/my/charge.vue
+128
-58
No files found.
src/views/login/login.vue
View file @
d7f3d801
...
@@ -77,7 +77,7 @@ export default {
...
@@ -77,7 +77,7 @@ 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
)
...
...
src/views/my/charge.vue
View file @
d7f3d801
...
@@ -125,17 +125,47 @@
...
@@ -125,17 +125,47 @@
>
+新增耗材
</div>
>
+新增耗材
</div>
</div>
</div>
</div>
</div>
<div
class=
"blank"
></div>
<div
class=
"item flex-h flex-vc"
>
<!-- 底部 -->
<div
class=
"title_left"
>
耗材个数
</div>
<div
class=
"bottom flex-h flex-hb flex-vc"
>
<input
type=
"number"
placeholder=
"请输入"
v-model=
"item.sl"
@
input=
"changeInput($event)"
/>
<div
class=
"left"
>
共
<span>
{{
addList
.
length
}}
</span>
件,总金额:
<span>
¥0
</span>
</div>
<div
class=
"sk-btn"
>
发起收款
</div>
</div>
</div>
</div>
<!-- 种类弹窗 -->
<van-popup
v-model=
"item.zlSelect"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"types"
value-key=
"goods_name"
@
confirm=
"(value)=>
{typeConfirm(value,index)}"
@cancel="typeCancel(index)"
/>
</van-popup>
<van-popup
v-model=
"item.mcSelect"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"hcName"
value-key=
"goods_name"
@
confirm=
"(value)=>
{hcConfirm(value,index)}"
@cancel="hcCancel(index)"
/>
</van-popup>
</div>
<div
class=
"line"
></div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增耗材
</div>
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除耗材
</div>
</div>
</div>
<div
class=
"blank"
></div>
<!-- 底部 -->
<div
class=
"bottom flex-h flex-hb flex-vc"
>
<div
class=
"left"
>
共
<span>
{{
addList
.
length
}}
</span>
件,总金额:
<span>
¥
{{
total_price
}}
</span>
</div>
<div
class=
"skBtn"
@
click=
"launch(repair_order_id)"
>
发起收款
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -143,24 +173,27 @@ export default {
...
@@ -143,24 +173,27 @@ export default {
name
:
'
charge
'
,
name
:
'
charge
'
,
data
()
{
data
()
{
return
{
return
{
addList
:
[
addList
:[
{
{
zl
:
''
,
zl
:
''
,
mc
:
''
,
mc
:
''
,
sl
:
''
,
sl
:
''
,
zlSelect
:
false
,
price
:
''
,
mcSelect
:
false
zlSelect
:
false
,
}
mcSelect
:
false
],
}
showPicker
:
false
,
],
types
:
[
'
洁具
'
,
'
木工类
'
,
'
供暖类
'
],
showPicker
:
false
,
type_name
:
'
请选择
'
,
types
:
[],
hcName
:
[
'
水龙头
'
,
'
桌子
'
,
'
暖气管
'
],
type_name
:
'
请选择
'
,
hc_name
:
'
请选择
'
,
hcName
:
[],
hcPicker
:
false
,
hc_name
:
'
请选择
'
,
hcNum
:
''
,
hcPicker
:
false
,
repair_order_id
:
''
,
hcNum
:
''
,
order
:
''
repair_order_id
:
''
,
order
:
''
,
hcList
:
[],
total_price
:
0
,
}
}
},
},
created
()
{
created
()
{
...
@@ -177,35 +210,56 @@ export default {
...
@@ -177,35 +210,56 @@ export default {
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
repair_order_id
:
this
.
repair_order_id
}
}
// const _this = this
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_ORDER_DETAIL
,
curParams
)
this
.
$http
.
then
(
res
=>
{
.
get
(
this
.
$myApi
.
REPAIR_ORDER_DETAIL
,
curParams
)
this
.
order
=
res
.
order
.
then
((
res
)
=>
{
var
arr
=
[]
this
.
order
=
res
.
order
for
(
let
i
in
res
.
material
){
console
.
log
(
this
.
order
,
123456
)
arr
.
push
({
id
:
res
.
material
[
i
].
id
,
goods_name
:
res
.
material
[
i
].
goods_name
,
son
:
res
.
material
[
i
].
son
})
}
this
.
types
=
arr
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
showZl
(
index
)
{
showZl
(
index
){
this
.
addList
[
index
].
zlSelect
=
true
this
.
addList
[
index
].
zlSelect
=
true
},
},
typeConfirm
(
value
,
index
)
{
typeConfirm
(
value
,
index
)
{
this
.
addList
[
index
].
zl
=
value
this
.
hcList
=
value
this
.
addList
[
index
].
zlSelect
=
false
this
.
addList
[
index
].
zl
=
value
.
goods_name
},
this
.
addList
[
index
].
zlSelect
=
false
typeCancel
(
index
)
{
this
.
addList
[
index
].
zlSelect
=
false
var
childArr
=
[]
},
for
(
let
i
in
value
.
son
){
showHc
(
index
)
{
childArr
.
push
({
this
.
addList
[
index
].
mcSelect
=
true
id
:
value
.
son
[
i
].
id
,
},
goods_name
:
value
.
son
[
i
].
goods_name
,
hcConfirm
(
value
,
index
)
{
price
:
value
.
son
[
i
].
price
this
.
addList
[
index
].
mc
=
value
})
this
.
addList
[
index
].
mcSelect
=
false
}
},
this
.
hcName
=
childArr
hcCancel
()
{
},
this
.
addList
[
index
].
mcSelect
=
false
typeCancel
(
index
)
{
},
this
.
addList
[
index
].
zlSelect
=
false
},
showHc
(
index
){
this
.
addList
[
index
].
mcSelect
=
true
},
hcConfirm
(
value
,
index
)
{
console
.
log
(
value
,
'
耗材名称
'
);
this
.
addList
[
index
].
mc
=
value
.
goods_name
this
.
addList
[
index
].
price
=
value
.
price
this
.
addList
[
index
].
mcSelect
=
false
console
.
log
(
'
家对的被动方法
'
,
this
.
addList
[
index
].
price
);
this
.
total_price
=
this
.
addList
[
index
].
price
},
hcCancel
(
index
)
{
this
.
addList
[
index
].
mcSelect
=
false
},
addMeth
()
{
addMeth
()
{
this
.
addList
.
push
({
this
.
addList
.
push
({
zl
:
''
,
zl
:
''
,
...
@@ -215,10 +269,26 @@ export default {
...
@@ -215,10 +269,26 @@ export default {
mcSelect
:
false
mcSelect
:
false
})
})
},
},
delMeth
(
index
)
{
delMeth
(
index
){
this
.
addList
.
splice
(
index
,
1
)
this
.
addList
.
splice
(
index
,
1
)
}
},
}
changeInput
(
e
){
this
.
hc_number
=
e
.
target
.
value
},
launch
(
id
){
console
.
log
(
'
东西啊啊
'
,
this
.
addList
[
0
].
sl
);
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
,
goods
:
this
.
addList
}
// const _this = this
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_ORDER
,
curParams
)
.
then
(
res
=>
{
console
.
log
(
'
执行了吗
'
);
})
.
catch
(()
=>
{})
},
},
}
}
</
script
>
</
script
>
...
...
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