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
ef87c320
Commit
ef87c320
authored
Jun 24, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索页、物流信息页、配件单详情页
parent
2e13902c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
756 additions
and
321 deletions
+756
-321
appliedPartsCell.vue
src/components/parts/appliedPartsCell.vue
+9
-1
pages.json
src/pages.json
+18
-1
express.vue
src/pages/mine/warehouse/express.vue
+237
-0
index.vue
src/pages/mine/warehouse/index.vue
+132
-154
partsDetail.vue
src/pages/mine/warehouse/partsDetail.vue
+192
-165
searchParts.vue
src/pages/mine/warehouse/searchParts.vue
+168
-0
No files found.
src/components/parts/appliedPartsCell.vue
View file @
ef87c320
...
...
@@ -5,7 +5,7 @@
<text
class=
"title-text"
:style=
"
{'color': titleColor}">
{{
title
}}
</text>
<view>
<text>
工单编号:
</text>
<text>
{{
info
.
orderNumber
}}
</text>
<text
@
longpress=
"handleLongpress"
>
{{
info
.
orderNumber
}}
</text>
</view>
</view>
<view
class=
"line-view"
></view>
...
...
@@ -123,6 +123,14 @@
},
handleOperate
()
{
this
.
$emit
(
'operate'
,
this
.
info
)
},
handleLongpress
()
{
// 长按复制单号
uni
.
setClipboardData
({
data
:
this
.
info
.
orderNumber
,
success
:
function
()
{
console
.
log
(
'success'
);
}
})
}
}
}
...
...
src/pages.json
View file @
ef87c320
...
...
@@ -258,9 +258,26 @@
"path"
:
"warehouse/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"我的
仓库
"
,
"navigationBarTitleText"
:
"我的
配件
"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"warehouse/searchParts"
,
"style"
:
{
"navigationBarTitleText"
:
" "
,
//
配件单搜索
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"warehouse/express"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
" "
,
//
配件单物流
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"warehouse/records"
,
...
...
src/pages/mine/warehouse/express.vue
0 → 100644
View file @
ef87c320
<
template
>
<view
class=
"parts-detail"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#F4F5F7"
title=
"物流信息"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
>
</u-navbar>
<view
class=
"content-view"
>
<view
class=
"contacts-view"
>
<view
:style=
"
{'color': titleColor}">
{{
title
}}
</view>
<view><image
class=
"image-view"
:src=
"imageUrl"
></image></view>
<view
class=
"right-view"
>
<view
class=
"title-view"
>
{{
title
}}
</view>
<view>
{{
'物流公司:'
+
info
.
express
.
com
}}
</view>
<view
class=
"number-view"
>
<text>
{{
'物流单号:'
+
info
.
express
.
number
}}
</text>
<text
class=
"copy-view"
@
click=
"$u.throttle(handleClick, 500)"
>
复制
</text>
</view>
</view>
</view>
<view
class=
"record-view"
>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
info
:
{
items
:[],
express
:
[]},
logisticsRecords
:
[],
// 物流
};
},
computed
:
{
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
title
()
{
return
this
.
titles
[
String
(
this
.
info
.
status
)]
},
titles
()
{
return
{
'1'
:
'待审核'
,
'10'
:
'待发货'
,
'15'
:
'代签收'
,
'20'
:
'已签收'
,
'-1'
:
'审核未通过'
,
'1'
:
'已取消'
}
},
imageUrl
()
{
let
item
=
this
.
info
.
items
[
0
]
||
{}
return
item
.
images
?
item
.
images
.
split
(
','
).
shift
()
:
this
.
placeholderImage
},
titleColor
()
{
switch
(
String
(
this
.
info
.
status
))
{
case
'-1'
:
// 审核未通过
return
'#FA5A49'
case
'1'
:
// 已取消
return
'#666666'
default
:
return
'#2272FF'
}
},
total
()
{
// 合计
var
i
=
0
for
(
var
item
of
this
.
info
.
items
)
{
i
+=
item
.
quantity
}
return
i
},
placeholderImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'logo.png'
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'配件单物流信息'
)
var
pages
=
getCurrentPages
();
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
];
this
.
info
=
page
.
info
}
this
.
getLogistics
()
},
methods
:
{
getLogistics
()
{
this
.
$u
.
api
.
getLogistics
(
this
.
info
.
id
).
then
((
res
)
=>
{
res
=
{
"code"
:
200
,
"message"
:
""
,
"data"
:
{
"orderId"
:
1883
,
"status"
:
15
,
"com"
:
"sf"
,
"number"
:
"SF1314164238675"
,
"name"
:
"周明杨"
,
"phoneNumber"
:
"17630408443"
,
"areaCode"
:
0
,
"province"
:
"44"
,
"city"
:
"4401"
,
"district"
:
"440106"
,
"street"
:
"440106001"
,
"address"
:
"广东省 广州市 天河区 长兴街道 芩村北街四巷16号菜鸟驿站"
,
"fullAddress"
:
null
,
"remark"
:
""
,
"createTime"
:
1624104976000
,
"deliveryTime"
:
1624256100000
,
"receiveTime"
:
null
,
"updateTime"
:
1624256100000
,
"expressInfo"
:
{
"state"
:
"1"
,
"state_name"
:
"transporting"
,
"state_orig"
:
"0"
,
"records"
:
[{
"datetime"
:
"2021-06-22 04:09:08"
,
"context"
:
"[杭州市]快件在【杭州萧山铁路站点】完成分拣,准备发往 【广州棠溪铁路站点】"
},
{
"datetime"
:
"2021-06-22 04:09:08"
,
"context"
:
"[杭州市]快件到达 【杭州萧山铁路站点】"
},
{
"datetime"
:
"2021-06-21 23:46:32"
,
"context"
:
"[金华市]快件已发车"
},
{
"datetime"
:
"2021-06-21 23:46:26"
,
"context"
:
"[金华市]快件在【金华金东中转场】完成分拣,准备发往 【杭州萧山铁路站点】"
},
{
"datetime"
:
"2021-06-21 19:33:17"
,
"context"
:
"[金华市]快件到达 【金华金东中转场】"
},
{
"datetime"
:
"2021-06-21 18:41:02"
,
"context"
:
"[金华市]快件已发车"
},
{
"datetime"
:
"2021-06-21 18:40:53"
,
"context"
:
"[金华市]快件在【金华永康滨江速运营业点】完成分拣,准备发往 【金华金东中转场】"
},
{
"datetime"
:
"2021-06-21 17:17:54"
,
"context"
:
"[金华市]顺丰速运 已收取快件"
}]
}
}
}
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
records
)
{
this
.
logisticsRecords
=
res
.
data
.
records
}
}
else
{
console
.
log
(
res
.
message
)
}
});
},
handleClick
()
{
uni
.
setClipboardData
({
data
:
this
.
info
.
orderNumber
,
success
:
function
()
{
console
.
log
(
'success'
);
}
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.parts-detail
{
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
background-color
:
#F4F5F7
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.content-view
{
padding
:
30rpx
;
height
:
100%
;
overflow
:
auto
;
.contacts-view
{
padding
:
30rpx
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
display
:
flex
;
align-items
:
flex-start
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
.image-view
{
width
:
120rpx
;
height
:
120rpx
;
border-radius
:
12rpx
;
}
.right-view
{
font-size
:
26rpx
;
color
:
#333333
;
padding-left
:
30rpx
;
width
:
100%
;
.title-view
{
font-weight
:
bold
;
font-size
:
32rpx
;
}
.number-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.copy-view
{
color
:
#2272FF
;
width
:
80rpx
;
text-align
:
right
;
}
}
}
}
.record-view
{
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
}
}
.bottom-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin
:
10rpx
30rpx
44rpx
30rpx
;
.total-view
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
.amount-view
{
color
:
#2272FF
;
}
}
}
}
</
style
>
src/pages/mine/warehouse/index.vue
View file @
ef87c320
This diff is collapsed.
Click to expand it.
src/pages/mine/warehouse/partsDetail.vue
View file @
ef87c320
This diff is collapsed.
Click to expand it.
src/pages/mine/warehouse/searchParts.vue
0 → 100644
View file @
ef87c320
<!-- 工单-搜索页 -->
<
template
>
<view
class=
"search-parts"
>
<view
class=
"top-item"
>
<u-search
v-model=
"search.keyword"
bg-color=
"#FFFFFF"
placeholder=
"请输入关键字"
search-icon-color=
"#999999"
color=
"#333333"
placeholder-color=
"#999999"
height=
"72"
margin=
"0 30rpx"
:animation=
"true"
:show-action=
"true"
:action-style=
"
{
'font-size': '32rpx',
'font-weight': 500,
'color': '#2272FF'
}"
:focus="true"
@search="searchOrder"
@custom="searchOrder"
>
</u-search>
</view>
<view
class=
"content-item"
>
<view
v-if=
"partsList && partsList.length > 0"
class=
"order-row"
>
<view
v-for=
"(item, index) in partsList"
:key=
"item.orderId"
>
<AppliedCell
@
operate=
"handleOperate"
:info=
"item"
@
action=
"handleClickCell"
></AppliedCell>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
<view
v-else-if=
"loaded"
class=
"empty-result"
>
<NoOrder
imageName=
"SearchEmpty.png"
text=
"当前暂无搜索结果"
:customStyle=
"noPartsCustomStyle"
/>
</view>
</view>
</view>
</
template
>
<
script
>
import
AppliedCell
from
"@/components/parts/appliedPartsCell.vue"
import
NoOrder
from
"@/components/order/noOrder.vue"
export
default
{
components
:
{
AppliedCell
,
NoOrder
},
data
()
{
return
{
search
:
{
keyword
:
''
,
pageSize
:
20
,
pageNumber
:
0
,
},
partsList
:
[],
loaded
:
false
,
total
:
10
,
loadStaus
:
'loadmore'
,
};
},
onLoad
()
{
getApp
().
trackPage
(
'订单搜索页'
)
// this.searchOrder()
},
computed
:
{
noPartsCustomStyle
()
{
return
'margin-top: 100rpx;background-color: #F4F5F7'
},
},
methods
:
{
searchOrder
(
index
)
{
this
.
search
.
pageNumber
=
1
this
.
loadStaus
=
'loading'
;
this
.
getPartsList
()
},
// 页面数据
getPartsList
(
event
)
{
if
(
!
this
.
search
.
keyword
)
{
return
false
}
this
.
loaded
=
false
this
.
$u
.
api
.
applyList
(
this
.
search
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
if
(
this
.
search
.
pageNumber
==
1
)
{
this
.
partsList
=
[]
}
let
list
=
res
.
data
||
[]
this
.
partsList
.
push
(...
list
)
this
.
loadStatus
=
list
.
length
<
this
.
pageSize
?
'nomore'
:
'loadmore'
}
}
else
{
console
.
log
(
res
.
message
)
}
self
.
loaded
=
true
});
},
handleOperate
(
type
)
{
// 调接口
// 修改info的status
// 刷新页面
},
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'
})
},
},
onReachBottom
()
{
let
len
=
this
.
partsList
&&
this
.
partsList
.
length
||
0
if
(
!
this
.
loaded
||
len
>=
this
.
total
)
return
;
this
.
loadStaus
=
'loading'
;
this
.
search
.
pageNumber
+=
1
;
this
.
getPartsList
(
'onReachBottom'
)
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.search-parts
{
.top-item
{
position
:
sticky
;
padding
:
20rpx
0
;
top
:
0rpx
;
background-color
:
#F4F5F7
;
z-index
:
2
;
/
deep
/
.u-search
.u-content
{
padding
:
0
20rpx
0
40rpx
;
}
/
deep
/
.u-search
.u-input
{
margin
:
0
24rpx
;
}
/
deep
/
.u-search
.u-icon--right
.u-iconfont
{
font-size
:
36rpx
!
important
;
}
/
deep
/
.u-search
.u-close-wrap
.u-iconfont
{
color
:
#CCCCCC
;
}
}
.content-item
{
padding
:
10rpx
30rpx
20rpx
30rpx
;
.empty-result
{
padding-top
:
354rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.empty-message
{
padding-top
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
28rpx
;
}
}
}
}
</
style
>
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