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
61cab7de
Commit
61cab7de
authored
Sep 25, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 前端-16、小程序端去掉合计这项,后台 “单位”这个字段改为必填项。
parent
fb64824f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
176 additions
and
155 deletions
+176
-155
appliedPartsCell.vue
src/components/parts/appliedPartsCell.vue
+1
-1
returnCell.vue
src/components/parts/returnCell.vue
+9
-9
spareCell.vue
src/components/parts/spareCell.vue
+43
-32
adjust.vue
src/components/select-parts/adjust.vue
+7
-0
index.vue
src/components/select-parts/index.vue
+8
-1
index.vue
src/components/submit-bar/index.vue
+7
-8
index.vue
src/pages/mine/warehouse/index.vue
+3
-4
return.vue
src/pages/mine/warehouse/return.vue
+95
-96
spare.vue
src/pages/mine/warehouse/spare.vue
+3
-4
No files found.
src/components/parts/appliedPartsCell.vue
View file @
61cab7de
...
...
@@ -258,7 +258,7 @@
overflow-x
:
auto
;
display
:
flex
;
width
:
100%
;
border-right
:
2rpx
solid
#F4F5F7
;
//
border-right: 2rpx solid #F4F5F7;
.image-view
{
width
:
120rpx
;
height
:
120rpx
;
...
...
src/components/parts/returnCell.vue
View file @
61cab7de
...
...
@@ -26,8 +26,8 @@
<view
class=
"bottom-view"
>
<view
class=
"total-view"
>
<text>
合计:
</text>
<text
class=
"amount-view"
>
x
{{
total
}}
</text>
<text></text>
<text
class=
"amount-view"
>
x
{{
info
.
items
.
length
}}
</text>
<text>
种
</text>
</view>
</view>
</view>
...
...
@@ -63,13 +63,13 @@
}
return
this
.
info
.
finished
?
'退件完成'
:
text
},
total
()
{
// 合计
var
i
=
0
for
(
var
item
of
this
.
info
.
items
)
{
i
+=
item
.
quantity
}
return
i
},
//
total() { // 合计
//
var i = 0
//
for (var item of this.info.items) {
//
i += item.quantity
//
}
//
return i
//
},
},
methods
:
{
handleLongpress
()
{
// 长按复制单号
...
...
src/components/parts/spareCell.vue
View file @
61cab7de
...
...
@@ -4,17 +4,20 @@
<u-checkbox
v-if=
"showChecked"
icon-size=
"28"
size=
"40"
v-model=
"check"
@
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"
>
<view
v-if=
"showChecked"
>
<u-number-box
v-model=
"value"
:min=
"item.min || 0"
:max=
"item.max || item[type]"
@
minus=
"numChange"
@
plus=
"numChange"
@
blur=
"numChange"
></u-number-box>
</view>
<text
v-else
>
x
{{
item
[
type
]
||
0
}}
</text>
<view
class=
"info-view"
>
<view
class=
"name-text"
>
{{
item
.
name
}}
</view>
<view
class=
"info-bottom"
>
<view>
{{
remarkText
}}
</view>
<view
class=
"count-view"
>
<view
v-if=
"showChecked"
>
<u-number-box
v-model=
"value"
:min=
"item.min || 0"
:max=
"item.max || item[type]"
@
minus=
"numChange"
@
plus=
"numChange"
@
blur=
"numChange"
></u-number-box>
</view>
<text
v-else
>
x
{{
item
[
type
]
||
0
}}
</text>
<text
class=
"unit-text"
v-if=
"item.unit"
>
{{
item
.
unit
}}
</text>
</view>
</view>
</view>
</view>
</
template
>
...
...
@@ -66,23 +69,23 @@
},
},
watch
:
{
'item.quantity'
(
val
)
{
'item.quantity'
(
val
)
{
this
.
check
=
val
>
0
this
.
value
=
val
this
.
value
=
val
},
'item.selected'
(
val
)
{
this
.
check
=
val
this
.
value
=
val
?
this
.
item
.
stock
:
0
this
.
value
=
val
?
this
.
item
.
stock
:
0
},
},
methods
:
{
handleChange
(
event
)
{
this
.
value
=
event
.
value
?
this
.
item
.
stock
:
0
this
.
$emit
(
'change'
,
event
.
value
)
this
.
$emit
(
'change'
,
event
.
value
)
this
.
$emit
(
'numChange'
,
this
.
value
)
},
numChange
(
event
)
{
this
.
check
=
event
.
value
>
0
numChange
(
event
)
{
this
.
check
=
event
.
value
>
0
this
.
$emit
(
'change'
,
this
.
check
)
this
.
$emit
(
'numChange'
,
event
.
value
)
},
...
...
@@ -93,8 +96,7 @@
<
style
lang=
"scss"
scoped
>
.spare-item
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
flex-end
;
align-items
:
center
;
.left-view
{
display
:
flex
;
...
...
@@ -106,24 +108,33 @@
margin-right
:
20rpx
;
flex-shrink
:
0
;
}
}
.info-view
{
font-size
:
24rpx
;
.info-view
{
font-size
:
24rpx
;
color
:
#333333
;
width
:
100%
;
.name-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
.name-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
margin-bottom
:
30rpx
;
}
.info-bottom
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.count-view
{
font-size
:
28rpx
;
color
:
#333333
;
margin-bottom
:
30rpx
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
.unit-text
{
padding-left
:
10rpx
;
}
}
}
}
.count-view
{
font-size
:
28rpx
;
color
:
#333333
;
}
}
</
style
>
</
style
>
src/components/select-parts/adjust.vue
View file @
61cab7de
...
...
@@ -7,6 +7,7 @@
<view
class=
"num"
>
<u-number-box
v-if=
"!disabled"
v-model=
"info.quantity"
:min=
"info.min || 0"
:max=
"info.max || 9999"
@
change=
"numChange"
@
minus=
"minusValue"
@
blur=
"minusValue"
></u-number-box>
<text
class=
"nums"
v-else
>
x
{{
info
.
quantity
||
1
}}
</text>
<text
v-if=
"info.unit"
class=
"unit-text"
>
{{
info
.
unit
||
''
}}
</text>
</view>
</view>
</view>
...
...
@@ -54,9 +55,15 @@
.num
{
width
:
200rpx
;
text-align
:
center
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
.nums
{
//color: #F59A23;
}
.unit-text
{
padding-left
:
10rpx
;
}
}
}
}
...
...
src/components/select-parts/index.vue
View file @
61cab7de
...
...
@@ -12,10 +12,11 @@
<view
class=
"right-content-desc u-line-2"
>
{{
info
.
remark
}}
</view>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"no"
v-if=
"maxShow"
>
可用
{{
info
.
max
}}
件
可用
{{
info
.
max
+
(
info
.
unit
||
''
)
}}
</view>
<view
class=
"num"
>
<u-number-box
v-show=
"!info.disabled"
v-model=
"info.quantity"
:min=
"info.min || 0"
:max=
"info.max || info.quantity"
@
change=
"numChange"
></u-number-box>
<text
v-show=
"!maxShow && !info.disabled && info.unit"
class=
"unit-text"
>
{{
info
.
unit
}}
</text>
<u-button
v-show=
"info.disabled"
type=
"primary"
size=
"mini"
shape=
"circle"
@
click=
"addApply"
>
加入申请
</u-button>
</view>
</view>
...
...
@@ -121,6 +122,12 @@
.num
{
flex
:
1
;
text-align
:
right
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
.unit-text
{
padding-left
:
10rpx
;
}
}
}
}
...
...
src/components/submit-bar/index.vue
View file @
61cab7de
...
...
@@ -6,8 +6,7 @@
<view
class=
"left-list"
>
全选
</view>
</view>
<view
class=
"u-flex bottom-center"
>
<view
class=
"center-list"
>
已选择
{{
partNum
}}
种
</view>
<view
class=
"center-list"
>
共:
<text
class=
"num"
>
{{
num
}}
</text>
件
</view>
<view
class=
"center-list"
>
共:
<text
class=
"num"
>
{{
partNum
}}
</text>
种
</view>
</view>
</view>
<view
class=
"u-flex select-num"
v-if=
"!showChecked"
>
...
...
@@ -15,7 +14,7 @@
<u-badge
type=
"error"
:show-zero=
"true"
:count=
"partNum"
:offset=
"[0, 0]"
></u-badge>
<u-image
width=
"72rpx"
height=
"72rpx"
:lazy-load=
"false"
:src=
"partsImage"
></u-image>
</view>
<view
class=
"num-right"
>
共:
<text
class=
"num"
>
{{
num
}}
</text>
件
</view>
<view
class=
"num-right"
>
共:
<text
class=
"num"
>
{{
partNum
}}
</text>
种
</view>
</view>
<view
class=
"u-flex bottom-right"
>
<button
:class=
"['btn', btnActive]"
@
click=
"submit"
>
{{
submitTxt
}}
</button>
...
...
@@ -143,14 +142,14 @@
align-items
:
flex-start
;
margin-right
:
20rpx
;
.center-list
{
// &:nth-of-type(1) {
// color: #666;
// font-size: 26rpx;
// }
&
:nth-of-type
(
1
)
{
color
:
#666
;
font-size
:
26rpx
;
}
&
:nth-of-type
(
2
)
{
color
:
#333
;
font-size
:
32rpx
;
margin-top
:
8rpx
;
//
margin-top: 8rpx;
font-weight
:
bold
;
.num
{
color
:
#2272FF
;
...
...
src/pages/mine/warehouse/index.vue
View file @
61cab7de
...
...
@@ -20,8 +20,7 @@
<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=
"scroll"
:scroll-top=
"scrollTop"
refresher-background=
"#F4F5F7"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
>
refresher-background=
"#F4F5F7"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
>
<!-- 加载中 && 没有下拉:显示加载中 -->
<view
class=
"loading-view"
v-if=
"!loaded && _freshing"
>
<u-loading
mode=
"flower"
></u-loading>
...
...
@@ -35,7 +34,7 @@
<AppliedCell
@
operate=
"handleOperate"
:info=
"item"
@
action=
"handleClickCell"
@
express=
"handleClickExpress"
></AppliedCell>
</view>
<!-- 底部加载状态 -->
<view
class=
"load-more-view"
v-
if
=
"(pageNumber == 1 && loaded) || pageNumber > 1"
>
<view
class=
"load-more-view"
v-
show
=
"(pageNumber == 1 && loaded) || pageNumber > 1"
>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
...
...
@@ -99,7 +98,7 @@
{
'name'
:
'全部'
,
'status'
:
null
}
}
,
]
},
// 当下tab
...
...
src/pages/mine/warehouse/return.vue
View file @
61cab7de
<
template
>
<
template
>
<!-- 返件信息 -->
<view
class=
"ware-house-return"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"返件信息"
titleColor=
"#333333"
: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"
search-icon-color=
"#999999"
>
</u-search>
</view>
<NoOrder
v-if=
"noParts"
imageName=
"wupeijianxinxi.png"
text=
"当前暂无返件信息"
:customStyle=
"noPartsCustomStyle"
/>
: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"
search-icon-color=
"#999999"
>
</u-search>
</view>
<NoOrder
v-if=
"noParts"
imageName=
"wupeijianxinxi.png"
text=
"当前暂无返件信息"
:customStyle=
"noPartsCustomStyle"
/>
<view
v-else
class=
"tab-view"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
scroll-anchoring
enable-back-to-top
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
enable-back-to-top
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<template
v-else
>
<view
v-for=
"
(item, index)
in partsList"
:key=
"item.id"
>
<view
v-for=
"
item
in partsList"
:key=
"item.id"
>
<ReturnCell
:info=
"item"
></ReturnCell>
</view>
<view
class=
"load-more-view"
>
<u-loadmore
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
<view
class=
"load-more-view"
v-if=
"(pageNumber == 1 && loaded) || pageNumber > 1"
>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</
template
>
</scroll-view>
...
...
@@ -44,8 +43,8 @@
pageSize
:
20
,
partsList
:
[],
loadStatus
:
'loading'
,
loaded
:
false
,
keyword
:
''
,
loaded
:
false
,
keyword
:
''
,
searchedKeyword
:
''
};
},
...
...
@@ -58,45 +57,45 @@
},
noPartsCustomStyle
()
{
return
'margin-top: 100rpx;background-color: #F4F5F7'
},
searchButtonText
()
{
return
this
.
searchedKeyword
==
this
.
keyword
&&
this
.
keyword
?
'取消'
:
'搜索'
},
actionStyle
()
{
return
{
'font-size'
:
'32rpx'
,
'color'
:
'#2272FF'
,
'margin-left'
:
'20rpx'
}
},
searchButtonText
()
{
return
this
.
searchedKeyword
==
this
.
keyword
&&
this
.
keyword
?
'取消'
:
'搜索'
},
actionStyle
()
{
return
{
'font-size'
:
'32rpx'
,
'color'
:
'#2272FF'
,
'margin-left'
:
'20rpx'
}
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'我的配件页'
)
getApp
().
trackPage
(
'我的配件页'
)
this
.
reloadPartsList
()
},
methods
:
{
methods
:
{
getReturnedParts
()
{
// 返件列表
this
.
pageNumber
+=
1
if
(
this
.
pageNumber
==
1
)
{
this
.
loaded
=
false
if
(
this
.
pageNumber
==
1
)
{
this
.
loaded
=
false
}
var
param
=
{
'pageSize'
:
this
.
pageSize
,
'pageNumber'
:
this
.
pageNumber
,
'items'
:
true
,
'type'
:
'new'
}
if
(
this
.
keyword
)
{
param
.
keyword
=
this
.
keyword
}
'pageSize'
:
this
.
pageSize
,
'pageNumber'
:
this
.
pageNumber
,
'items'
:
true
,
'type'
:
'new'
}
if
(
this
.
keyword
)
{
param
.
keyword
=
this
.
keyword
}
this
.
searchedKeyword
=
this
.
keyword
this
.
$u
.
api
.
returnedParts
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
this
.
pageNumber
==
1
)
{
this
.
partsList
=
[]
}
let
list
=
res
.
data
||
[]
this
.
partsList
.
push
(...
list
)
}
let
list
=
res
.
data
||
[]
this
.
partsList
.
push
(...
list
)
this
.
loadStatus
=
list
.
length
<
this
.
pageSize
?
'nomore'
:
'loadmore'
}
else
{
console
.
log
(
res
.
message
)
...
...
@@ -104,44 +103,44 @@
this
.
loaded
=
true
});
},
handleClickCell
(
info
)
{
var
pages
=
getCurrentPages
();
if
(
pages
.
length
>=
1
)
{
var
page
=
pages
[
pages
.
length
-
1
];
page
.
info
=
info
}
uni
.
navigateTo
({
url
:
'pages/mine/warehouse/partsDetail'
})
},
handleClickCell
(
info
)
{
var
pages
=
getCurrentPages
();
if
(
pages
.
length
>=
1
)
{
var
page
=
pages
[
pages
.
length
-
1
];
page
.
info
=
info
}
uni
.
navigateTo
({
url
:
'pages/mine/warehouse/partsDetail'
})
},
handleClickSearch
()
{
// 软键盘搜索
this
.
reloadPartsList
()
},
handleClear
()
{
// 清空搜索
if
(
this
.
searchedKeyword
)
{
this
.
reloadPartsList
()
}
},
handleClickButton
()
{
// 点了搜索按钮
if
(
this
.
searchedKeyword
==
this
.
keyword
)
{
this
.
keyword
=
''
}
this
.
reloadPartsList
()
handleClickSearch
()
{
// 软键盘搜索
this
.
reloadPartsList
()
},
handleClear
()
{
// 清空搜索
if
(
this
.
searchedKeyword
)
{
this
.
reloadPartsList
()
}
},
handleClickButton
()
{
// 点了搜索按钮
if
(
this
.
searchedKeyword
==
this
.
keyword
)
{
this
.
keyword
=
''
}
this
.
reloadPartsList
()
},
onRestore
()
{
this
.
triggered
=
'restore'
;
// 需要重置
},
reloadPartsList
()
{
// 第一页数据
this
.
pageNumber
=
0
this
.
loadStatus
=
'loading'
this
.
loadStatus
=
'loading'
this
.
getReturnedParts
()
},
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getReturnedParts
()
},
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getReturnedParts
()
},
}
};
...
...
@@ -150,21 +149,21 @@
<
style
lang=
"scss"
scoped
>
.ware-house-return
{
padding
:
0
30rpx
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.search-view
{
margin-bottom
:
30rpx
;
margin-top
:
10rpx
;
/
deep
/
.u-search
.u-content
{
padding-left
:
40rpx
;
}
/
deep
/
.u-search
.u-input
{
margin
:
0
20rpx
;
}
/
deep
/
.u-search
.u-icon--right
.u-iconfont
{
font-size
:
36rpx
!
important
;
}
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.search-view
{
margin-bottom
:
30rpx
;
margin-top
:
10rpx
;
/
deep
/
.u-search
.u-content
{
padding-left
:
40rpx
;
}
/
deep
/
.u-search
.u-input
{
margin
:
0
20rpx
;
}
/
deep
/
.u-search
.u-icon--right
.u-iconfont
{
font-size
:
36rpx
!
important
;
}
}
.tab-view
{
...
...
@@ -173,15 +172,15 @@
.load-more-view
{
margin-bottom
:
68rpx
;
}
.loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
300rpx
;
position
:
absolute
;
}
.loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
300rpx
;
position
:
absolute
;
}
}
}
</
style
>
</
style
>
src/pages/mine/warehouse/spare.vue
View file @
61cab7de
...
...
@@ -25,7 +25,7 @@
</view>
<!-- 物料列表 -->
<view
class=
"tab-view"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
scroll-anchoring
enable-back-to-top
@
scroll=
"scroll"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
enable-back-to-top
>
<!-- 加载转圈页面 -->
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
...
...
@@ -37,9 +37,8 @@
@
change=
"handleChange($event, index)"
@
numChange=
"handleNumChange($event, index)"
/>
</view>
<!-- 底部加载状态 -->
<view
class=
"load-more-view"
>
<u-loadmore
v-show=
"partsList.length > 0"
status=
"nomore"
bgColor=
"#F4F5F7"
>
</u-loadmore>
<view
class=
"load-more-view"
v-if=
"partsList.length > 0"
>
<u-loadmore
status=
"nomore"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</
template
>
</scroll-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