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
af178223
Commit
af178223
authored
Jun 24, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.banshouhui.com/lijundan/self-support
into dev
parents
49da1533
2e13902c
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
593 additions
and
99 deletions
+593
-99
order.js
src/common/api/order.js
+5
-2
noOrder.vue
src/components/order/noOrder.vue
+7
-11
appliedPartsCell.vue
src/components/parts/appliedPartsCell.vue
+142
-12
pages.json
src/pages.json
+9
-0
order.vue
src/pages/index/order.vue
+12
-1
index.vue
src/pages/mine/warehouse/index.vue
+84
-73
partsDetail.vue
src/pages/mine/warehouse/partsDetail.vue
+334
-0
No files found.
src/common/api/order.js
View file @
af178223
...
@@ -188,6 +188,8 @@ let orderApiFun = function(vm){
...
@@ -188,6 +188,8 @@ let orderApiFun = function(vm){
let
returnedParts
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/return'
,
params
);
let
returnedParts
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/return'
,
params
);
// 备件仓列表
// 备件仓列表
let
reserveList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/items/reserve'
,
params
);
let
reserveList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/items/reserve'
,
params
);
// 配件物流
let
getLogistics
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/orders/'
+
orderId
+
'/express'
,{},
formType
);
const
orderApi
=
{
const
orderApi
=
{
listByRecommendOrder
,
listByRecommendOrder
,
...
@@ -235,7 +237,8 @@ let orderApiFun = function(vm){
...
@@ -235,7 +237,8 @@ let orderApiFun = function(vm){
completeNextStep
,
completeNextStep
,
applyList
,
applyList
,
returnedParts
,
returnedParts
,
reserveList
reserveList
,
getLogistics
}
}
return
orderApi
return
orderApi
}
}
...
...
src/components/order/noOrder.vue
View file @
af178223
...
@@ -12,22 +12,18 @@
...
@@ -12,22 +12,18 @@
type
:
String
,
type
:
String
,
default
:
'background-color: #FFFFFF'
default
:
'background-color: #FFFFFF'
},
},
typ
e
:
{
// 图片
imageNam
e
:
{
// 图片
type
:
String
,
type
:
String
,
default
:
'white'
,
default
:
'wudingdan.png'
},
text
:
{
// 提示文字
type
:
String
,
default
:
'当前暂无订单'
}
}
},
},
computed
:
{
computed
:
{
wudingdanImage
()
{
wudingdanImage
()
{
var
name
=
'wudingdan.png'
return
process
.
uniEnv
.
qn_base_url
+
this
.
imageName
switch
(
this
.
type
)
{
case
'black'
:
name
=
"zwdd.png"
break
default
:
break
}
return
process
.
uniEnv
.
qn_base_url
+
name
}
}
}
}
}
}
...
...
src/components/parts/appliedPartsCell.vue
View file @
af178223
<
template
>
<
template
>
<!-- 已申请配件cell -->
<!-- 已申请配件cell -->
<view
class=
"applied-cell"
>
<view
class=
"applied-cell"
@
click=
"handleClick"
>
<view
class=
"title-view"
>
<view
class=
"title-view"
>
<view
v-for=
"(item, key) in labels"
:key=
"key"
>
<text
class=
"title-text"
:style=
"
{'color': titleColor}">
{{
title
}}
</text>
<text>
{{
item
}}
:
</text>
<view>
<text>
{{
info
[
key
]
}}
</text>
<text>
工单编号:
</text>
<text>
{{
info
.
orderNumber
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"list-content"
>
<view
class=
"list-content"
>
<view
v-for=
"(item, index) in info.items"
:key=
"index"
>
<view
class=
"image-list"
>
<!--
<PartsCell
@
operate=
"handleOperate"
:info=
"item"
></PartsCell>
-->
<image
class=
"image-view"
v-for=
"(item, index) in images"
:key=
"index"
:src=
"item"
></image>
<view
class=
"info-view"
v-if=
"info.items.length == 1"
>
<view
class=
"name-text"
>
{{
info
.
items
[
0
].
name
}}
</view>
<view>
{{
info
.
categoryName
+
'-'
+
info
.
brandName
}}
</view>
</view>
</view>
<view
class=
"count-view"
>
共
{{
info
.
items
.
length
}}
种
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"total-view"
>
<text>
合计:
</text>
<text
class=
"amount-view"
>
{{
total
}}
</text>
<text>
件
</text>
</view>
<u-button
v-if=
"buttonText"
:custom-style=
"customStyle"
shape=
"circle"
@
click
.
stop=
"handleOperate"
type=
"primary"
>
{{
buttonText
}}
</u-button>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -23,7 +37,7 @@
...
@@ -23,7 +37,7 @@
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{
return
{
status
:
0
,
//
-1 已驳回,-1 已取消,0 新申请,1 待审核,10 待发货,11 配货中,12 采购中,15 已发货,20 已签收,21 待返件,22 返件中,90 已转备件,100 已完成
status
:
0
,
//
待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
}
}
}
}
}
}
...
@@ -35,7 +49,12 @@
...
@@ -35,7 +49,12 @@
},
},
computed
:
{
computed
:
{
texts
()
{
texts
()
{
return
{}
return
{
'1'
:
'取消申请'
,
'10'
:
''
,
'15'
:
'签收'
,
'20'
:
''
,
}
},
},
buttonText
()
{
buttonText
()
{
return
this
.
texts
[
this
.
info
.
status
]
return
this
.
texts
[
this
.
info
.
status
]
...
@@ -46,14 +65,62 @@
...
@@ -46,14 +65,62 @@
'width'
:
'100%'
,
'width'
:
'100%'
,
}
}
},
},
labels
()
{
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
title
()
{
return
this
.
titles
[
String
(
this
.
info
.
status
)]
},
titles
()
{
return
{
'1'
:
'待审核'
,
'10'
:
'待发货'
,
'15'
:
'代签收'
,
'20'
:
'已签收'
,
'-1'
:
'审核未通过'
,
'1'
:
'已取消'
}
},
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
},
images
()
{
var
array
=
[]
for
(
var
item
of
this
.
info
.
items
)
{
if
(
item
.
images
)
{
array
.
push
(
process
.
uniEnv
.
systemUrl
.
apiUrl
+
item
.
images
.
split
(
','
).
shift
())
}
else
{
array
.
push
(
this
.
placeholderImage
)
}
}
return
array
},
placeholderImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'logo.png'
},
customStyle
()
{
return
{
return
{
'
id'
:
'申请单号
'
,
'
height'
:
'80rpx
'
,
'
statusText'
:
'状态'
'
width'
:
'200rpx'
,
}
}
}
}
},
},
methods
:
{
methods
:
{
handleClick
()
{
this
.
$emit
(
'action'
,
this
.
info
)
},
handleOperate
()
{
handleOperate
()
{
this
.
$emit
(
'operate'
,
this
.
info
)
this
.
$emit
(
'operate'
,
this
.
info
)
}
}
...
@@ -63,12 +130,75 @@
...
@@ -63,12 +130,75 @@
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.applied-cell
{
.applied-cell
{
padding
:
30rpx
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
.title-view
{
.title-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
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
{
.list-content
{
display
:
flex
;
width
:
100%
;
margin-top
:
40rpx
;
margin-bottom
:
40rpx
;
.image-list
{
overflow-x
:
auto
;
display
:
flex
;
width
:
100%
;
border-right
:
2rpx
solid
#F4F5F7
;
margin-right
:
30rpx
;
.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
{
width
:
30rpx
;
text-align
:
center
;
font-size
:
26rpx
;
color
:
#666666
;
}
}
.bottom-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.total-view
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
.amount-view
{
color
:
#2272FF
;
padding-right
:
10rpx
;
}
}
}
}
}
}
...
...
src/pages.json
View file @
af178223
...
@@ -270,6 +270,15 @@
...
@@ -270,6 +270,15 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
"path"
:
"warehouse/partsDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
""
,
//
配件详情
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
{
"path"
:
"superLogin/index"
,
"path"
:
"superLogin/index"
,
"style"
:
{
"style"
:
{
...
...
src/pages/index/order.vue
View file @
af178223
...
@@ -23,7 +23,10 @@
...
@@ -23,7 +23,10 @@
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
:scroll-top=
"scrollTop"
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
:scroll-top=
"scrollTop"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
@
scroll=
"scroll"
enable-back-to-top
>
@
refresherrestore=
"onRestore"
@
scroll=
"scroll"
enable-back-to-top
>
<NoOrder
v-if=
"noMore"
type=
"black"
:customStyle=
"noOrderCustomStyle"
/>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<NoOrder
v-else-if=
"noMore"
imageName=
"zwdd.png"
:customStyle=
"noOrderCustomStyle"
/>
<template
v-else
>
<template
v-else
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick"
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick"
...
@@ -298,6 +301,14 @@
...
@@ -298,6 +301,14 @@
.load-more-view
{
.load-more-view
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
.loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
300rpx
;
position
:
absolute
;
}
}
}
.tools-box
{
.tools-box
{
...
...
src/pages/mine/warehouse/index.vue
View file @
af178223
This diff is collapsed.
Click to expand it.
src/pages/mine/warehouse/partsDetail.vue
0 → 100644
View file @
af178223
<
template
>
<view
class=
"parts-detail"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#F4F5F7"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
>
</u-navbar>
<view
class=
"title-text"
:style=
"
{'color': titleColor}">
{{
title
}}
</view>
<view
class=
"content-view"
>
<view
class=
"title-view"
>
<view>
<text>
工单编号:
</text>
<text>
{{
info
.
orderNumber
}}
</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"
>
<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>
</view>
<view
class=
"line-view"
></view>
<view
class=
"detail-info-view"
>
<view
v-for=
"(value, key) in detailKey"
:key=
"key"
class=
"info-item"
>
<text>
{{
value
}}
:
</text>
<text>
{{
detail
[
key
]
}}
</text>
</view>
</view>
<view
class=
"logistics-view"
></view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"total-view"
>
<text>
合计:
</text>
<text
class=
"amount-view"
>
{{
total
}}
</text>
<text>
件
</text>
</view>
<u-button
v-if=
"buttonText"
:custom-style=
"customStyle"
shape=
"circle"
@
click=
"handleClick"
type=
"primary"
>
{{
buttonText
}}
</u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
info
:
{
items
:[],
express
:
[]},
logisticsRecords
:
[],
// 物流
};
},
computed
:
{
texts
()
{
return
{
'1'
:
'取消申请'
,
'10'
:
''
,
'15'
:
'签收'
,
'20'
:
''
,
}
},
buttonText
()
{
return
this
.
texts
[
this
.
info
.
status
]
},
buttonStyle
()
{
return
{
'height'
:
'104rpx'
,
'width'
:
'100%'
,
}
},
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
title
()
{
return
this
.
titles
[
String
(
this
.
info
.
status
)]
},
titles
()
{
return
{
'1'
:
'待审核'
,
'10'
:
'待发货'
,
'15'
:
'代签收'
,
'20'
:
'已签收'
,
'-1'
:
'审核未通过'
,
'1'
:
'已取消'
}
},
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'
},
customStyle
()
{
return
{
'height'
:
'80rpx'
,
'width'
:
'200rpx'
,
}
},
noteText
()
{
return
this
.
info
.
categoryName
+
'-'
+
this
.
info
.
brandName
},
detail
()
{
// 详情
return
{
'orderNumber'
:
this
.
info
.
orderNumber
,
'createTime'
:
this
.
info
.
createTime
,
'name'
:
this
.
info
.
express
.
com
,
'number'
:
this
.
info
.
express
.
number
}
},
detailKey
()
{
// 详情
return
{
'orderNumber'
:
'申请单号'
,
'createTime'
:
'申请时间'
,
'name'
:
'物流公司'
,
'number'
:
'物流单号'
}
}
},
onLoad
()
{
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
()
{
},
imageUrl
(
item
)
{
return
item
.
images
?
item
.
images
.
split
(
','
).
shift
()
:
this
.
placeholderImage
},
}
};
</
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
;
.title-text
{
font-size
:
48rpx
;
font-weight
:
bold
;
padding
:
0
30rpx
30rpx
30rpx
;
;
}
.content-view
{
margin
:
0
30rpx
30rpx
30rpx
;
padding
:
30rpx
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
height
:
100%
;
overflow
:
auto
;
.title-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
26rpx
;
color
:
#333333
;
}
.line-view
{
background-color
:
#F4F5F7
;
height
:
2rpx
;
width
:
100%
;
margin-top
:
20rpx
;
}
.list-content
{
margin-top
:
40rpx
;
margin-bottom
:
40rpx
;
.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
:
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
;
}
}
}
.detail-info-view
{
padding
:
30rpx
0
;
.info-item
{
margin-bottom
:
20rpx
;
color
:
#333333
;
font-size
:
26rpx
;
}
}
.ogistics-view
{}
}
.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
>
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