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
52ebf48d
Commit
52ebf48d
authored
Jun 25, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返件信息
parent
4a214a0d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
237 additions
and
140 deletions
+237
-140
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
return.vue
src/pages/mine/warehouse/return.vue
+37
-52
spare.vue
src/pages/mine/warehouse/spare.vue
+51
-85
No files found.
src/components/order/noOrder.vue
View file @
52ebf48d
<
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 @
52ebf48d
<
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 @
52ebf48d
<
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/pages/mine/warehouse/return.vue
View file @
52ebf48d
This diff is collapsed.
Click to expand it.
src/pages/mine/warehouse/spare.vue
View file @
52ebf48d
...
...
@@ -5,43 +5,46 @@
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"search-view"
>
<u-search
v-model=
"keyword"
:action-text=
"searchButtonText"
@
search=
"handleClickSearch"
@
clear=
"handleClear"
@
custom=
"handleClickButton"
placeholder=
"请输入关键字"
:action-style=
"actionStyle"
placeholder-color=
"#999999"
color=
"#333333"
bg-color=
"#FFFFFF"
height=
"72"
>
@
custom=
"handleClickButton"
placeholder=
"请输入关键字"
:action-style=
"actionStyle"
placeholder-color=
"#999999"
color=
"#333333"
bg-color=
"#FFFFFF"
height=
"72"
>
</u-search>
</view>
<view
class=
"title-view"
>
<view>
备件列表
</view>
<view
class=
"title-right-view"
>
<view
class=
"bounce-view"
v-if=
"!showBounce"
@
click=
"showBounce = true"
>
退件
</view>
<u-button
v-else
:custom-style=
"buttonStyle"
shape=
"circle"
@
click=
"handleClickBounce"
>
退件 ×
</u-button>
</view>
</view>
<view
class=
"tab-view"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
:scroll-top=
"scrollTop"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
<NoOrder
v-if=
"noParts"
imageName=
"zwdd.png"
text=
"当前暂无备件信息"
:customStyle=
"noPartsCustomStyle"
/>
<template
v-else
>
<view
class=
"title-view"
>
<view>
备件列表
</view>
<view
class=
"title-right-view"
>
<view
class=
"bounce-view"
v-if=
"!showBounce"
@
click=
"showBounce = true"
>
退件
</view>
<u-button
v-else
:custom-style=
"buttonStyle"
shape=
"circle"
@
click=
"handleClickBounce"
>
退件 ×
</u-button>
</view>
<NoOrder
v-else-if=
"noParts"
imageName=
"zwdd.png"
text=
"当前暂无备件信息"
:customStyle=
"noPartsCustomStyle"
/>
<template
v-else
>
<view
class=
"list-item"
v-for=
"(item, index) in partsList"
:key=
"item.id"
>
<SpareCell
:item=
"item"
:noteText=
"noteText"
:showChecked=
"showBounce"
@
change=
"handleChange(index)"
/>
</view>
<view
class=
"load-more-view"
>
<u-loadmore
v-show=
"loaded && partsList.length > 0"
status=
"nomore"
bgColor=
"#F4F5F7"
>
</u-loadmore>
</view>
<view
class=
"tab-view"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
:scroll-top=
"scrollTop"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
</
template
>
</scroll-view>
</view>
<view
class=
"bar"
v-if=
"showBounce"
>
<SubmitBar
:partNum=
"subBarInfo.partNum"
:num=
"subBarInfo.num"
:btnStatus=
"subBarInfo.btnStatus"
submitTxt=
"退件"
:allChecked=
"subBarInfo.allChecked"
:customStyle=
"customStyle"
@
select=
"allSelect"
@
submit=
"handleSubmit"
/>
</view>
<template
v-else
>
<view
class=
"list-item"
v-for=
"(item, index) in partsList"
:key=
"item.id"
>
<SpareCell
:item=
"item"
:noteText=
"noteText"
:showChecked=
"showBounce"
@
change=
"handleChange(index)"
/>
</view>
<view
class=
"load-more-view"
>
<u-loadmore
v-show=
"partsList.length > 0"
status=
"nomore"
bgColor=
"#F4F5F7"
>
</u-loadmore>
</view>
</
template
>
</scroll-view>
</view>
<view
class=
"bar"
v-if=
"showBounce"
>
<SubmitBar
:partNum=
"subBarInfo.partNum"
:num=
"subBarInfo.num"
:btnStatus=
"subBarInfo.btnStatus"
submitTxt=
"退件"
:allChecked=
"subBarInfo.allChecked"
:customStyle=
"customStyle"
@
select=
"allSelect"
@
submit=
"handleSubmit"
/>
</view>
</template>
</view>
</template>
...
...
@@ -64,7 +67,6 @@
loaded
:
false
,
showBounce
:
false
,
keyword
:
''
,
// searched: false,
searchedKeyword
:
''
};
},
...
...
@@ -112,9 +114,9 @@
},
customStyle
()
{
return
'background-color: #F4F5F7;padding: 0;'
},
searchButtonText
()
{
return
this
.
searchedKeyword
==
this
.
keyword
&&
this
.
keyword
?
'取消'
:
'搜索'
},
searchButtonText
()
{
return
this
.
searchedKeyword
==
this
.
keyword
&&
this
.
keyword
?
'取消'
:
'搜索'
},
},
onLoad
(
e
)
{
...
...
@@ -126,10 +128,10 @@
this
.
loaded
=
false
var
param
=
{}
if
(
this
.
keyword
)
{
param
.
keyword
=
this
.
keyword
}
this
.
searchedKeyword
=
this
.
keyword
param
.
keyword
=
this
.
keyword
}
this
.
searchedKeyword
=
this
.
keyword
this
.
$u
.
api
.
reserveList
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
res
.
data
=
[{
...
...
@@ -164,7 +166,7 @@
"remark"
:
"dolore quis"
,
"code"
:
"deserunt cillum incididunt proident"
,
"stock"
:
"10"
}]
}]
this
.
partsList
=
[]
let
list
=
res
.
data
||
[]
for
(
var
item
of
list
)
{
...
...
@@ -179,26 +181,23 @@
});
},
handleClickSearch
()
{
// 软键盘搜索
console
.
log
(
'--------软键盘------'
,
this
.
keyword
)
this
.
getReserveList
()
},
handleClear
()
{
// 清空搜索
console
.
log
(
'--------清空------'
,
this
.
keyword
)
if
(
this
.
searchedKeyword
)
{
this
.
getReserveList
()
if
(
this
.
searchedKeyword
)
{
this
.
getReserveList
()
}
},
handleClickButton
()
{
// 点了搜索按钮
console
.
log
(
'--------搜索------'
,
this
.
keyword
)
if
(
this
.
searchedKeyword
==
this
.
keyword
)
{
this
.
keyword
=
''
if
(
this
.
searchedKeyword
==
this
.
keyword
)
{
this
.
keyword
=
''
}
this
.
getReserveList
()
},
handleClickBounce
()
{
this
.
showBounce
=
false
for
(
var
item
of
this
.
partsList
)
{
item
.
selected
=
false
this
.
showBounce
=
false
for
(
var
item
of
this
.
partsList
)
{
item
.
selected
=
false
}
},
allSelect
(
value
)
{
...
...
@@ -225,40 +224,7 @@
flex-direction
:
column
;
.search-view
{
// display: flex;
// justify-content: space-between;
// align-items: center;
margin-bottom
:
30rpx
;
// .search-btn {
// height: 72rpx;
// background-color: #ffffff;
// border-radius: 36rpx;
// color: #999999;
// display: flex;
// align-items: center;
// width: 100%;
// padding-left: 40rpx;
// .search-image {
// width: 36rpx;
// height: 32rpx;
// flex-shrink: 0;
// margin-right: 24rpx;
// }
// .search-btn-placeholder {
// line-height: 36rpx;
// font-weight: 400;
// font-size: 26rpx;
// }
// }
// .search-btn-text {
// line-height: 36rpx;
// font-weight: 400;
// font-size: 32rpx;
// color: #2272FF;
// width: 110rpx;
// text-align: right;
// }
}
.title-view
{
...
...
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