Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
李俊赕
self-support
Commits
8e97548b
Commit
8e97548b
authored
Jun 25, 2021
by
Morson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.banshouhui.com/lijundan/self-support
into dev
parents
d3d0d469
c612caba
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
642 additions
and
392 deletions
+642
-392
parts.js
src/common/api/parts.js
+6
-1
XhParts.vue
src/components/createCom/XhParts.vue
+72
-29
noOrder.vue
src/components/order/noOrder.vue
+1
-1
appliedPartsCell.vue
src/components/parts/appliedPartsCell.vue
+2
-2
returnCell.vue
src/components/parts/returnCell.vue
+146
-0
spareCell.vue
src/components/parts/spareCell.vue
+99
-0
adjust.vue
src/components/select-parts/adjust.vue
+1
-1
index.vue
src/components/submit-bar/index.vue
+1
-1
pages.json
src/pages.json
+3
-2
partsDetail.vue
src/pages/mine/warehouse/partsDetail.vue
+13
-50
records.vue
src/pages/mine/warehouse/records.vue
+17
-14
return.vue
src/pages/mine/warehouse/return.vue
+44
-52
spare.vue
src/pages/mine/warehouse/spare.vue
+224
-208
complete.vue
src/pages/order/complete.vue
+9
-4
parts.vue
src/pages/order/parts.vue
+4
-27
No files found.
src/common/api/parts.js
View file @
8e97548b
...
...
@@ -36,6 +36,10 @@ let partsApiFun = function (vm) {
* 查询自己的备件仓
*/
let
getMyReserve
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
parts
+
vm
.
vuex_token
+
'/items/reserve'
,
params
);
/**
* 查询工单的配件明细
*/
let
getWorkOrderParts
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
parts
+
vm
.
vuex_token
+
'/items/workOrder/'
,
params
);
const
partsApi
=
{
getSiteAddress
,
...
...
@@ -44,7 +48,8 @@ let partsApiFun = function (vm) {
getBrandList
,
getPartsList
,
applyParts
,
getMyReserve
getMyReserve
,
getWorkOrderParts
}
return
partsApi
}
...
...
src/components/createCom/XhParts.vue
View file @
8e97548b
<!-- ******************* 配件选择 ******************* -->
<
template
>
<view
class=
"complete-part"
>
<view
v-if=
"status === 1
"
>
<adjust-parts
v-for=
"(item, index) in lists"
:key=
"index"
:info=
"item"
@
change=
"partsChange($event, index)"
:disabled=
"disabled"
></adjust-parts
>
</view>
<view
class=
"u-flex select-part"
v-else-if=
"status === 2
"
>
<view
class=
"img"
>
<image
src=
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
class=
"part-icon"
/
>
</view>
<view
class=
"u-flex conten
t"
>
<text
class=
"title"
>
暂无配件信息
</text
>
<
text
class=
"desc"
>
可选择备件仓配件
</text
>
<view>
<view
class=
"list u-flex u-row-between
"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image
>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 add-parts"
@
click=
"toParts
"
>
添加配件
<u-icon
name=
"arrow-right"
color=
"#2979ff"
size=
"30"
></u-icon
>
</view
>
</view>
<view
class=
"complete-par
t"
>
<view
v-if=
"status === 1"
>
<
adjust-parts
v-for=
"(item, index) in lists"
:key=
"index"
:info=
"item"
@
change=
"partsChange($event, index)"
:disabled=
"disabled"
></adjust-parts
>
</view>
<view
class=
"btn"
>
<u-button
shape=
"circle"
:custom-style=
"customStyle"
>
去选择
</u-button>
<view
class=
"u-flex select-part"
v-else-if=
"status === 2"
>
<view
class=
"img"
>
<image
:src=
"noPartsImage"
class=
"part-icon"
/>
</view>
<view
class=
"u-flex content"
>
<text
class=
"title"
>
暂无配件信息
</text>
<text
class=
"desc"
>
可选择备件仓配件
</text>
</view>
<view
class=
"btn"
>
<u-button
shape=
"circle"
:custom-style=
"customStyle"
@
click=
"toParts"
>
去选择
</u-button>
</view>
</view>
</view>
</view>
...
...
@@ -31,9 +40,9 @@
},
mixins
:
[
arrMixin
],
props
:
{
status
:
{
type
:
Number
,
default
:
1
orderId
:
{
type
:
String
,
default
:
''
}
},
data
()
{
...
...
@@ -42,18 +51,19 @@
{
id
:
1
,
name
:
"正泰漏保"
,
num
:
1
,
quantity
:
1
,
min
:
1
,
max
:
100
,
},
{
id
:
1
,
name
:
"挚达广汽充电桩"
,
num
:
3
,
quantity
:
3
,
min
:
1
,
max
:
5
,
},
]
],
status
:
2
}
},
computed
:
{
...
...
@@ -64,31 +74,65 @@
'color'
:
'#2272FF'
,
'font-size'
:
'32rpx'
,
}
}
},
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
noPartsImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'no_parts.png'
},
},
created
()
{
this
.
getWorkOrderParts
()
},
methods
:
{
getWorkOrderParts
()
{
const
params
=
{
workOrderId
:
this
.
orderId
}
this
.
$u
.
getWorkOrderParts
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
const
data
=
res
.
data
this
.
status
=
data
.
receivedItems
.
length
>
0
?
1
:
2
this
.
lists
=
data
.
receivedItems
||
[]
}
})
},
partsChange
(
val
,
index
)
{
console
.
log
(
"val"
,
val
,
index
)
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
val
)
},
toParts
()
{
//
uni.navigateTo({
// url: '/pages/
'
//
})
uni
.
navigateTo
({
url
:
'/pages/order/parts
'
})
},
toHandle
(
)
{
handle
(
val
)
{
console
.
log
(
"val"
,
val
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.required
{
padding-right
:
10rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
}
.add-parts
{
color
:
#2272FF
;
text-align
:
right
;
}
.complete-part
{
.select-part
{
align-items
:
center
;
height
:
240rpx
;
.img
{
margin-right
:
20rpx
;
display
:
flex
;
align-items
:
center
;
margin-right
:
30rpx
;
.part-icon
{
width
:
110rpx
;
height
:
110rpx
;
...
...
@@ -113,7 +157,6 @@
text-align
:
left
;
color
:
#999
;
font-size
:
26rpx
;
margin-top
:
20rpx
;
margin-right
:
auto
;
}
}
...
...
src/components/order/noOrder.vue
View file @
8e97548b
<
template
>
<view
class=
"no-order-view"
:style=
"customStyle"
>
<image
class=
"no-order-image"
:src=
"wudingdanImage"
></image>
<text>
当前暂无订单
</text>
<text>
{{
text
}}
</text>
</view>
</
template
>
...
...
src/components/parts/appliedPartsCell.vue
View file @
8e97548b
<
template
>
<!-- 已申请配件cell -->
<view
class=
"
applied
-cell"
@
click=
"handleClick"
>
<view
class=
"
return
-cell"
@
click=
"handleClick"
>
<view
class=
"title-view"
>
<text
class=
"title-text"
:style=
"
{'color': titleColor}">
{{
title
}}
</text>
<view>
...
...
@@ -137,7 +137,7 @@
</
script
>
<
style
lang=
"scss"
scoped
>
.
applied
-cell
{
.
return
-cell
{
padding
:
30rpx
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
...
...
src/components/parts/returnCell.vue
0 → 100644
View file @
8e97548b
<
template
>
<!-- 已申请配件cell -->
<view
class=
"applied-cell"
@
click=
"handleClick"
>
<view
class=
"title-view"
>
<text
class=
"title-text"
>
{{
title
}}
</text>
<view>
<text>
返件时间:
</text>
<text>
{{
info
.
createTime
}}
</text>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"list-content"
>
<view
class=
"list-item"
v-for=
"(item, index) in info.items"
:key=
"index"
>
<SpareCell
:item=
"item"
/>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"info-item"
>
<view>
<text>
返件编号:
</text>
<text
@
longpress=
"handleLongpress"
>
{{
info
.
number
}}
</text>
</view>
<text
class=
"copy-view"
@
click=
"$u.throttle(handleLongpress, 500)"
>
复制
</text>
</view>
<view
class=
"line-view"
></view>
<view
class=
"bottom-view"
>
<view
class=
"total-view"
>
<text>
合计:
</text>
<text
class=
"amount-view"
>
{{
total
}}
</text>
<text>
件
</text>
</view>
</view>
</view>
</
template
>
<
script
>
import
SpareCell
from
"@/components/parts/spareCell.vue"
export
default
{
components
:
{
SpareCell
},
props
:
{
info
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
data
()
{
return
{
}
},
computed
:
{
title
()
{
return
this
.
info
.
finished
?
'已返件'
:
'返件中'
},
total
()
{
// 合计
var
i
=
0
for
(
var
item
of
this
.
info
.
items
)
{
i
+=
item
.
quantity
}
return
i
},
},
methods
:
{
handleLongpress
()
{
// 长按复制单号
uni
.
setClipboardData
({
data
:
this
.
info
.
number
,
success
:
function
()
{
console
.
log
(
'success'
);
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.applied-cell
{
padding
:
30rpx
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
.title-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
26rpx
;
color
:
#333333
;
.title-text
{
font-size
:
36rpx
;
font-weight
:
bold
;
}
}
.line-view
{
background-color
:
#F4F5F7
;
height
:
2rpx
;
width
:
100%
;
margin-top
:
20rpx
;
}
.list-content
{
margin-top
:
40rpx
;
margin-bottom
:
40rpx
;
.list-item
{
margin-bottom
:
30rpx
;
}
}
.info-item
{
margin-top
:
24rpx
;
margin-bottom
:
24rpx
;
color
:
#333333
;
font-size
:
26rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.detail-left-view
{}
.copy-view
{
color
:
#2272FF
;
padding-left
:
30rpx
;
}
}
.bottom-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
24rpx
;
margin-bottom
:
4rpx
;
.total-view
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
.amount-view
{
color
:
#2272FF
;
padding-right
:
10rpx
;
}
}
}
}
</
style
>
src/components/parts/spareCell.vue
0 → 100644
View file @
8e97548b
<
template
>
<view
class=
"spare-item"
>
<view
class=
"left-view"
>
<u-checkbox
v-if=
"showChecked"
icon-size=
"28"
size=
"40"
v-model=
"item.selected"
@
change=
"handleChange"
shape=
"circle"
/>
<image
class=
"image-view"
:src=
"imageUrl"
></image>
<view
class=
"info-view"
>
<view
class=
"name-text"
>
{{
item
.
name
}}
</view>
<view>
{{
remarkText
}}
</view>
</view>
</view>
<view
class=
"count-view"
>
x
{{
item
.
quantity
}}
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
showChecked
:
{
// 是否显示勾选
type
:
Boolean
,
default
()
{
return
false
}
},
item
:
{
type
:
Object
,
default
()
{
return
{}
}
},
noteText
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
checked
:
false
}
},
computed
:
{
remarkText
()
{
return
this
.
noteText
||
this
.
item
.
code
// return this.info.categoryName + '-' + this.info.brandName
},
imageUrl
()
{
return
this
.
item
.
images
?
process
.
uniEnv
.
systemUrl
.
apiUrl
+
this
.
item
.
images
.
split
(
','
).
shift
()
:
this
.
placeholderImage
},
placeholderImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'logo.png'
},
},
methods
:
{
handleChange
()
{
this
.
$emit
(
'change'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.spare-item
{
display
:
flex
;
// width: 100%;
justify-content
:
space-between
;
align-items
:
flex-end
;
// padding: 30rpx;
// background-color: #FFFFFF;
// border-radius: 12rpx;
.left-view
{
display
:
flex
;
align-items
:
center
;
.image-view
{
width
:
120rpx
;
height
:
120rpx
;
margin-right
:
20rpx
;
flex-shrink
:
0
;
}
.info-view
{
font-size
:
24rpx
;
color
:
#333333
;
.name-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
margin-bottom
:
30rpx
;
}
}
}
.count-view
{
font-size
:
28rpx
;
color
:
#333333
;
}
}
</
style
>
src/components/select-parts/adjust.vue
View file @
8e97548b
...
...
@@ -6,7 +6,7 @@
</view>
<view
class=
"num"
>
<u-number-box
v-if=
"!disabled"
v-model=
"info.quantity"
:min=
"info.min || 0"
:max=
"info.max || info.quantity"
@
change=
"numChange"
></u-number-box>
<text
class=
"nums"
v-else
>
x
{{
info
.
num
||
1
}}
</text>
<text
class=
"nums"
v-else
>
x
{{
info
.
quantity
||
1
}}
</text>
</view>
</view>
</view>
...
...
src/components/submit-bar/index.vue
View file @
8e97548b
...
...
@@ -2,7 +2,7 @@
<view
class=
"u-flex bottom"
:style=
"customStyle"
>
<view
class=
"select-view"
>
<view
class=
"u-flex bottom-left"
v-if=
"showChecked"
>
<view
class=
"left-list"
><u-checkbox
icon-size=
"
30
"
size=
"40"
v-model=
"checked"
@
change=
"selectAll"
shape=
"circle"
/></view>
<view
class=
"left-list"
><u-checkbox
icon-size=
"
28
"
size=
"40"
v-model=
"checked"
@
change=
"selectAll"
shape=
"circle"
/></view>
<view
class=
"left-list"
>
全选
</view>
</view>
<view
class=
"u-flex bottom-center"
>
...
...
src/pages.json
View file @
8e97548b
...
...
@@ -300,8 +300,9 @@
"path"
:
"warehouse/records"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"操作记录"
,
"enablePullDownRefresh"
:
false
"navigationBarTitleText"
:
"出入库记录"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
...
...
src/pages/mine/warehouse/partsDetail.vue
View file @
8e97548b
...
...
@@ -21,16 +21,9 @@
</view>
</view>
<view
class=
"detail-view"
>
<view
class=
"list-content"
>
<view
class=
"list-item"
v-for=
"(item, index) in info.items"
:key=
"index"
>
<view
class=
"left-view"
>
<image
class=
"image-view"
:src=
"imageUrl(item)"
></image>
<view
class=
"info-view"
>
<view
class=
"name-text"
>
{{
item
.
name
}}
</view>
<view>
{{
noteText
}}
</view>
</view>
</view>
<view
class=
"count-view"
>
x
{{
item
.
quantity
}}
</view>
<view
class=
"list-content"
>
<view
class=
"list-item"
v-for=
"(item, index) in info.items"
:key=
"index"
>
<SpareCell
:item=
"item"
:noteText=
"noteText"
/>
</view>
</view>
<view
class=
"line-view"
></view>
...
...
@@ -59,8 +52,12 @@
</view>
</
template
>
<
script
>
export
default
{
<
script
>
import
SpareCell
from
"@/components/parts/spareCell.vue"
export
default
{
components
:
{
SpareCell
},
data
()
{
return
{
info
:
{
...
...
@@ -163,7 +160,7 @@
})
},
imageUrl
(
item
)
{
return
item
.
images
?
item
.
images
.
split
(
','
).
shift
()
:
this
.
placeholderImage
return
item
.
images
?
process
.
uniEnv
.
systemUrl
.
apiUrl
+
item
.
images
.
split
(
','
).
shift
()
:
this
.
placeholderImage
},
handleLongpress
(
key
,
text
)
{
// 长按复制单号
if
(
key
==
'orderNumber'
)
{
...
...
@@ -267,45 +264,11 @@
}
.list-content
{
margin-top
:
4
0rpx
;
margin-bottom
:
4
0rpx
;
margin-top
:
1
0rpx
;
margin-bottom
:
1
0rpx
;
.list-item
{
display
:
flex
;
width
:
100%
;
margin-right
:
30rpx
;
justify-content
:
space-between
;
align-items
:
flex-end
;
margin-bottom
:
40rpx
;
.left-view
{
display
:
flex
;
align-items
:
flex-start
;
.image-view
{
width
:
120rpx
;
height
:
120rpx
;
margin-right
:
20rpx
;
flex-shrink
:
0
;
}
.info-view
{
font-size
:
24rpx
;
color
:
#333333
;
.name-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
margin-bottom
:
30rpx
;
}
}
}
.count-view
{
font-size
:
28rpx
;
color
:
#333333
;
}
margin-bottom
:
30rpx
;
}
}
...
...
src/pages/mine/warehouse/records.vue
View file @
8e97548b
<
template
>
<view
class=
"ware-wrap"
>
<w-navbar
title=
""
:background=
"
{backgroundColor: '#F4F5F7'}">
</w-navbar>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"出入库记录"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<!--
<view
class=
"content"
>
<view
class=
"panel"
>
<view
class=
"title"
>
物料明细
</view>
...
...
@@ -61,22 +62,22 @@
},
computed
:
{},
onLoad
()
{
getApp
().
trackPage
(
'
我的仓库-操作
记录'
)
getApp
().
trackPage
(
'
出入库
记录'
)
this
.
getData
();
},
methods
:
{
getData
()
{
let
self
=
this
self
.
initDetails
()
//
self.initDetails()
self
.
loadAccess
()
},
async
initDetails
()
{
let
self
=
this
let
res
=
await
self
.
$u
.
api
.
listBystock
()
if
(
res
&&
res
.
code
==
200
)
{
self
.
details
=
res
.
data
}
},
//
async initDetails() {
//
let self = this
//
let res = await self.$u.api.listBystock()
//
if(res && res.code == 200) {
//
self.details = res.data
//
}
//
},
loadRecord
()
{
if
(
this
.
status
==
'nomore'
)
return
;
this
.
status
=
'loading'
;
...
...
@@ -109,13 +110,15 @@
<
style
lang=
"scss"
scoped
>
.ware-wrap
{
background-color
:
#F
4F5F7
;
.content
{
padding
:
34rpx
30rpx
;
background-color
:
#F
FFFFF
;
//
.content {
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.panel
{
padding
:
0
30rpx
44rpx
30rpx
;
height
:
100%
;
.title
{
margin-bottom
:
30rpx
;
font-size
:
32rpx
;
...
...
@@ -151,7 +154,7 @@
}
}
}
}
//
}
}
}
.width-504
{
...
...
src/pages/mine/warehouse/return.vue
View file @
8e97548b
This diff is collapsed.
Click to expand it.
src/pages/mine/warehouse/spare.vue
View file @
8e97548b
This diff is collapsed.
Click to expand it.
src/pages/order/complete.vue
View file @
8e97548b
...
...
@@ -13,7 +13,7 @@
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.items"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
v-show=
"item.fieldsName != 'actualPaid' || show200"
:id=
"`item$
{item.fieldsId}`">
<view
class=
"label"
v-if=
"
item.formType!=='location'&&item.formType!=='form'&&item.formType!=='label'
"
>
<view
class=
"label"
v-if=
"
!hiddenTitle.includes(item.formType)
"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
</view>
...
...
@@ -70,9 +70,10 @@
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:order-id=
"orderId"
:value=
'form[item.fieldsName] || ""'
@
value-change=
"fieldValueChange"
>
</xh-service-more>
<xh-label
v-else-if=
"item.formType==='label'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
>
<xh-label
v-else-if=
"item.formType==='label'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
>
</xh-label>
<xh-parts
v-else-if=
"item.formType==='parts'"
:order-id=
"orderId"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
>
</xh-parts>
</template>
</u-form-item>
</view>
...
...
@@ -110,6 +111,7 @@
import
XhServiceMeasure
from
'@/components/createCom/XhServiceMeasure.vue'
import
XhServiceMore
from
"@/components/createCom/XhServiceMore"
import
XhLabel
from
"@/components/createCom/XhLabel"
import
XhParts
from
"@/components/createCom/XhParts"
import
takePhoto
from
'@/components/take/index.vue'
import
baseFile
from
'@/components/upload/index'
...
...
@@ -139,6 +141,7 @@
[
'date'
,
[
'time'
,
'text'
]],
[
'form'
,
[
'form'
,
'text'
]],
[
'label'
,
[
'label'
,
'text'
]],
[
'parts'
,
[
'parts'
,
'text'
]],
])
/**
...
...
@@ -209,6 +212,7 @@
export
default
{
data
()
{
return
{
hiddenTitle
:
[
'location'
,
'form'
,
'label'
,
'parts'
],
orderId
:
0
,
categoryId
:
0
,
orderServiceType
:
''
,
...
...
@@ -273,7 +277,8 @@
XhServiceMeasure
,
XhServiceMore
,
XhLabel
,
'take-photo'
:
takePhoto
XhParts
,
takePhoto
},
mixins
:
[
baseFile
],
created
()
{
...
...
src/pages/order/parts.vue
View file @
8e97548b
<
template
>
<view
class=
"u-flex det-wrap"
>
<view
class=
"search"
>
<u-search
:clearabled=
"true"
:action-style=
"searchStyle"
bg-color=
"#fff"
v-model=
"keyword"
@
custom=
"searchParts"
@
search=
"searchParts"
></u-search>
</view>
<view
class=
"content"
v-if=
"lists.length > 0"
>
<scroll-view
style=
"height: 100%;"
scroll-y=
"true"
>
<select-parts
...
...
@@ -56,16 +45,10 @@
},
data
()
{
return
{
lists
:
[],
keyword
:
''
lists
:
[]
}
},
computed
:
{
searchStyle
()
{
return
{
color
:
"#2272FF"
};
},
// 配件数
partNum
()
{
return
this
.
lists
.
reduce
((
counter
,
{
checked
})
=>
checked
?
counter
+=
1
:
counter
,
0
)
...
...
@@ -85,10 +68,7 @@
},
methods
:
{
getReserve
()
{
const
params
=
{
keyword
:
this
.
keyword
}
this
.
$u
.
api
.
getMyReserve
(
params
).
then
(
res
=>
{
this
.
$u
.
api
.
getMyReserve
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
const
data
=
res
.
data
||
[]
this
.
lists
=
data
.
map
(
v
=>
{
...
...
@@ -101,11 +81,6 @@
}
})
},
// 搜索配件
searchParts
(
val
)
{
this
.
keyword
=
val
this
.
getReserve
()
},
numChange
(
val
,
index
)
{
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
val
)
},
...
...
@@ -128,6 +103,8 @@
quantity
:
v
.
quantity
}
})
prevPage
.
$vm
.
handle
(
lists
)
this
.
$u
.
route
({
type
:
'back'
})
console
.
log
(
lists
)
},
qnFile
(
src
)
{
...
...
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