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
adcdc662
Commit
adcdc662
authored
Jun 21, 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
33b41120
53744f01
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
362 additions
and
188 deletions
+362
-188
order.js
src/common/api/order.js
+8
-1
bottomButtons.vue
src/components/order/bottomButtons.vue
+3
-3
addSite.vue
src/pages/mine/address/addSite.vue
+168
-112
index.vue
src/pages/mine/address/index.vue
+3
-3
index.vue
src/pages/mine/warehouse/index.vue
+176
-65
records.vue
src/pages/mine/warehouse/records.vue
+4
-4
No files found.
src/common/api/order.js
View file @
adcdc662
...
...
@@ -184,6 +184,11 @@ let orderApiFun = function(vm){
let
fileList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'config/'
+
vm
.
vuex_token
+
'/finish/file'
,
params
);
// 订单配件列表
let
applyList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/orders'
,
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
);
const
orderApi
=
{
listByRecommendOrder
,
listOrderCount
,
...
...
@@ -228,7 +233,9 @@ let orderApiFun = function(vm){
fileLabel
,
fileList
,
completeNextStep
,
applyList
applyList
,
returnedParts
,
reserveList
}
return
orderApi
}
...
...
src/components/order/bottomButtons.vue
View file @
adcdc662
...
...
@@ -133,12 +133,12 @@
flex-direction
:
column
;
width
:
100%
;
&
.image
{
margin-right
:
40
rpx
;
margin-right
:
22
rpx
;
}
&
.text
{
width
:
40
0rpx
;
margin-left
:
40
rpx
;
width
:
36
0rpx
;
margin-left
:
18
rpx
;
&
.one
{
width
:
600rpx
;
margin-left
:
0rpx
;
...
...
src/pages/mine/address/addSite.vue
View file @
adcdc662
...
...
@@ -4,17 +4,17 @@
<view
class=
"top"
>
<view
class=
"item"
>
<view
class=
"left"
>
收货人
</view>
<input
disabled
v-model=
"name"
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写收货人姓名"
/>
<input
:disabled=
"nameStatus"
v-model=
"name"
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写收货人姓名"
/>
</view>
<view
class=
"item"
>
<view
class=
"left"
>
手机
号码
</view>
<input
disabled
v-model=
"mobile"
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写收货人手机号"
/>
<view
class=
"left"
>
电话
号码
</view>
<input
:disabled=
"mobileStatus"
v-model=
"mobile"
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写收货人手机号"
/>
</view>
<view
class=
"item"
>
<view
class=
"left"
>
所在地区
</view>
<input
@
tap=
"showRegionPicker"
disabled
v-model=
"
r
egion"
type=
"text"
placeholder-class=
"line"
placeholder=
"省市区县、乡镇等"
/>
<u-icon
@
click=
"autoLocation"
class=
"right"
name=
"map"
label=
"定位"
label-size=
"24"
label-color=
"#2272FF"
/>
<input
@
tap=
"showRegionPicker"
disabled
v-model=
"
formatR
egion"
type=
"text"
placeholder-class=
"line"
placeholder=
"省市区县、乡镇等"
/>
<u-icon
@
click=
"autoLocation"
class=
"right"
name=
"map"
label=
"定位"
label-size=
"24"
label-color=
"#2272FF"
/>
</view>
<u-field
class=
"item-address"
...
...
@@ -26,13 +26,10 @@
type=
"textarea"
:auto-height=
"false"
:border-bottom=
"false"
>
</u-field>
></u-field>
</view>
<view
class=
"bottom"
>
<button
class=
"btn, bottom-btn"
@
click=
"show = true"
>
<text
class=
"button-text"
>
保存
</text>
</button>
<button
class=
"btn, bottom-btn"
@
click=
"show = true"
><text
class=
"button-text"
>
保存
</text></button>
<!--
<view
class=
"default"
>
<view
class=
"left"
>
<view
class=
"set"
>
设置默认地址
</view>
...
...
@@ -41,149 +38,211 @@
<view
class=
"right"
><switch
color=
"red"
@
change=
"setDefault"
/></view>
</view>
-->
</view>
<u-picker
mode=
"region"
ref=
"uPicker"
v-model=
"showPicker"
:params=
"params"
@
confirm=
"confirmRegion"
/>
<u-popup
border-radius=
"12"
width=
"690"
height=
"520"
v-model=
"show"
mode=
"center"
>
<u-picker
mode=
"region"
v-model=
"showPicker"
:default-region=
"region"
@
confirm=
"confirmRegion"
/>
<u-popup
border-radius=
"12"
width=
"690"
height=
"520"
v-model=
"show"
mode=
"center"
>
<view
class=
"save-pop"
>
<view
class=
"header"
>
确认保存信息
</view>
<view
class=
"content"
>
<view
class=
"tips"
>
您填写的信息尚未保存,是否保存
</view>
</view>
<view
class=
"content"
><view
class=
"tips"
>
您填写的信息尚未保存,是否保存
</view></view>
</view>
<view
class=
"pop-bottom"
>
<button
class=
"plain"
@
click=
"show = false"
shape=
"circle"
:plain=
"true"
>
不保存
</button>
<button
class=
"solid"
shape=
"circle"
@
click=
"$u.throttle(submitForm, 500)"
:loading=
"submiting"
:disabled=
"disabledSubmit"
>
保存
</button>
<u-button
:custom-style=
"submitBtn"
shape=
"circle"
@
click=
"submitForm"
:disabled=
"disabledSubmit"
>
保存
</u-button>
</view>
</u-popup>
</view>
</
template
>
<
script
>
let
r
=
require
(
"libs/bmap-wx.min.js"
);
/**
* addSite 新增地址|修改地址|选择地址(返回选择地址信息)
* @description 编辑地址共通页
* @property {String} type 编辑类型(默认为修改,add--新增、edit--修改、select--选择)
* @property {String} info 地址信息(json字符串:包含地址信息)
*/
let
r
=
require
(
'libs/bmap-wx.min.js'
);
let
h
=
new
r
.
BMapWX
({
ak
:
process
.
uniEnv
.
bmapAK
// ak: process.uniEnv.bmapAK,
ak
:
'G1wPip2Oj62NnoUctXhiE1faZVHbeo2A'
});
export
default
{
data
()
{
return
{
title
:
'新增地址'
,
title
:
'修改地址'
,
siteInfo
:
null
,
siteType
:
'edit'
,
show
:
false
,
location
:
''
,
address
:
''
,
type
:
'充电桩安装'
,
name
:
'
--
'
,
name
:
''
,
mobile
:
''
,
nameStatus
:
true
,
mobileStatus
:
true
,
settled
:
null
,
region
:
[]
,
adcode
:
''
,
regionObj
:
[],
region
:
[],
showPicker
:
false
,
params
:
{
province
:
true
,
city
:
true
,
area
:
true
},
loading
:
true
};
},
computed
:
{},
computed
:
{
formatRegion
()
{
return
this
.
region
.
join
(
' '
);
},
submitBtn
()
{
return
{
color
:
'#FFFFFF'
,
backgroundColor
:
'#2272FF'
};
}
},
async
onLoad
(
e
)
{
getApp
().
trackPage
(
'我的收获地址修改页'
)
if
(
e
&&
e
.
title
)
{
this
.
title
=
decodeURIComponent
(
e
.
title
)
getApp
().
trackPage
(
'我的收获地址修改页'
)
;
if
(
!
this
.
vuex_token
)
{
this
.
$u
.
route
({
url
:
'pages/login/index'
});
}
if
(
!
this
.
vuex_token
)
{
this
.
$u
.
route
({
url
:
'pages/login/index'
})
if
(
e
)
{
if
(
e
.
type
===
'add'
)
{
this
.
title
=
'新增地址'
;
this
.
siteType
=
'add'
;
}
else
if
(
e
.
type
===
'select'
)
{
this
.
title
=
'选择地址'
;
this
.
siteType
=
'select'
;
}
else
if
(
e
.
info
&&
this
.
$u
.
test
.
jsonString
(
e
.
info
))
{
// 默认修改我的地址
this
.
siteInfo
=
JSON
.
parse
(
decodeURIComponent
(
e
.
info
));
}
else
if
(
e
.
type
==
'edit'
)
{
this
.
title
=
'修改地址'
;
this
.
siteType
=
'edit'
;
}
}
},
onShow
()
{
this
.
getData
();
},
methods
:
{
async
getData
()
{
const
callback
=
(
vm
,
res
)
=>
{
vm
.
settled
=
res
.
record
vm
.
address
=
vm
.
settled
.
address
vm
.
name
=
vm
.
settled
.
id_card_name
vm
.
mobile
=
vm
.
settled
.
mobile
}
if
(
this
.
vuex_settled
&&
this
.
vuex_settled
.
record
||
null
)
{
callback
(
this
,
this
.
vuex_settled
)
getData
()
{
if
(
this
.
siteType
==
'add'
||
this
.
siteType
==
'select'
)
{
this
.
nameStatus
=
false
;
this
.
mobileStatus
=
false
;
}
else
if
(
this
.
siteType
==
'edit'
)
{
let
address
=
''
;
if
(
this
.
$u
.
test
.
isEmpty
(
this
.
siteInfo
))
{
const
callback
=
(
vm
,
res
)
=>
{
this
.
settled
=
res
.
record
;
if
(
this
.
loading
)
{
this
.
name
=
this
.
settled
.
id_card_name
;
this
.
mobile
=
this
.
settled
.
mobile
;
this
.
address
=
this
.
settled
.
address
;
this
.
geocoding
();
}
this
.
loading
=
this
.
$u
.
test
.
isEmpty
(
this
.
settled
);
};
if
(
this
.
vuex_settled
&&
this
.
vuex_settled
.
record
)
{
callback
(
this
,
this
.
vuex_settled
);
}
else
{
getApp
().
getBaseInfo
(
this
,
callback
);
}
}
else
{
if
(
this
.
loading
)
{
this
.
loading
=
false
;
this
.
name
=
this
.
siteInfo
.
name
;
this
.
mobile
=
this
.
siteInfo
.
mobile
;
this
.
address
=
this
.
siteInfo
.
address
;
this
.
geocoding
();
}
}
}
getApp
().
getBaseInfo
(
this
,
callback
);
},
showRegionPicker
()
{
this
.
showPicker
=
true
this
.
showPicker
=
true
;
},
confirmRegion
(
params
)
{
this
.
regionObj
=
params
this
.
region
=
params
.
province
.
label
+
params
.
city
.
label
+
params
.
area
.
label
this
.
regionObj
=
params
;
this
.
region
=
[
params
.
province
.
label
,
params
.
city
.
label
,
params
.
area
.
label
];
},
/**
* 百度定位
* @param {Object} long
* @param {Object} lat
*/
baiduLocation
(
long
,
lat
)
{
console
.
log
(
"11111111111"
,
this
.
title
)
let
t
=
{
success
:
(
res
)
=>
{
console
.
log
(
'success:'
,
res
)
let
e
=
res
.
wxMarkerData
[
0
];
let
i
=
e
.
address
;
this
.
location
=
i
;
},
fail
:
(
res
)
=>
{
console
.
log
(
'fail:'
,
res
)
}
}
regeocoding
(
lat
,
long
)
{
if
(
lat
&&
long
)
{
let
e
=
lat
+
","
+
long
t
.
location
=
e
// t.coordtype = 'wgs84'
// t.latitude = lat
// t.longitude = long
console
.
log
(
'regeocoding:'
,
t
)
h
.
regeocoding
(
t
);
h
.
regeocoding
({
location
:
lat
+
','
+
long
,
success
:
data
=>
{
console
.
log
(
'regeocoding[success]:'
,
data
);
this
.
location
=
data
.
wxMarkerData
[
0
];
let
regeocod
=
data
.
originalData
.
result
.
addressComponent
;
this
.
adcode
=
regeocod
.
adcode
;
this
.
region
=
[
regeocod
.
province
,
regeocod
.
city
,
regeocod
.
district
];
let
region
=
this
.
region
.
join
(
''
);
if
(
this
.
$u
.
test
.
contains
(
this
.
address
,
region
))
{
this
.
address
=
this
.
address
.
replace
(
region
,
''
);
}
},
fail
:
res
=>
{
console
.
log
(
'regeocoding[fail]:'
,
res
);
}
});
}
},
geocoding
()
{
if
(
this
.
address
)
{
let
t
=
{
success
:
res
=>
{
console
.
log
(
'[geocoding][success]:'
,
res
);
let
e
=
res
.
wxMarkerData
[
0
];
if
(
e
.
longitude
&&
e
.
latitude
)
{
this
.
regeocoding
(
e
.
latitude
,
e
.
longitude
);
}
},
fail
:
res
=>
{
console
.
log
(
'[geocoding][fail]:'
,
res
);
}
};
t
.
address
=
this
.
address
;
h
.
geocoding
(
t
);
}
},
/**
* 自动定位
*/
autoLocation
()
{
let
that
=
this
let
that
=
this
;
uni
.
chooseLocation
({
success
:
(
res
)
=>
{
this
.
baiduLocation
(
res
.
longitude
,
res
.
latitude
)
success
:
res
=>
{
this
.
address
=
res
.
address
+
res
.
name
;
this
.
regeocoding
(
res
.
latitude
,
res
.
longitude
);
},
fail
:
function
(
res
)
{
// uni.showToast({
// title: '定位失败'
// })
console
.
log
(
'chooseLocation[fail]:'
,
res
);
}
});
},
async
submitForm
()
{
let
self
=
this
let
params
=
{
type
:
self
.
type
,
address
:
self
.
address
}
let
res
=
await
self
.
$u
.
api
.
syncAddress
(
params
)
const
callback
=
(
vm
,
res
)
=>
{
vm
.
$u
.
route
({
type
:
'back'
})
}
if
(
res
&&
res
.
code
==
200
)
{
getApp
().
getBaseInfo
(
this
,
callback
);
if
(
this
.
siteType
===
'add'
)
{
}
else
if
(
this
.
siteType
===
'select'
)
{
}
else
if
(
this
.
siteType
===
'edit'
)
{
if
(
this
.
$u
.
test
.
isEmpty
(
this
.
siteInfo
))
{
let
params
=
{
type
:
this
.
type
,
address
:
this
.
region
.
join
(
""
)
+
this
.
address
};
let
res
=
await
this
.
$u
.
api
.
syncAddress
(
params
);
const
callback
=
(
vm
,
res
)
=>
{
this
.
$u
.
route
({
type
:
'back'
});
this
.
show
=
false
};
if
(
res
&&
res
.
code
==
200
)
{
getApp
().
getBaseInfo
(
this
,
callback
);
}
}
else
{
}
}
}
}
...
...
@@ -196,7 +255,7 @@ export default {
font-size
:
28rpx
;
}
.wrap
{
background-color
:
#
FFFFFF
;
background-color
:
#
ffffff
;
width
:
750rpx
;
height
:
100vh
;
.top
{
...
...
@@ -209,7 +268,7 @@ export default {
color
:
#333333
;
line-height
:
88rpx
;
align-items
:
center
;
border-bottom
:
solid
2rpx
#
F4F5F
7
;
border-bottom
:
solid
2rpx
#
f4f5f
7
;
.left
{
width
:
160rpx
;
color
:
#999999
;
...
...
@@ -218,15 +277,14 @@ export default {
text-align
:
left
;
flex
:
auto
;
}
.textarea
{
}
.right
{
margin-left
:
30rpx
;
font-size
:
30rpx
;
font-weight
:
400
;
color
:
#2272
FF
;
color
:
#2272
ff
;
}
}
.item-address
{
...
...
@@ -236,7 +294,7 @@ export default {
/
deep
/
.u-field
{
padding
:
0
;
padding-top
:
30rpx
;
border-bottom
:
solid
2rpx
#
F4F5F
7
;
border-bottom
:
solid
2rpx
#
f4f5f
7
;
.u-label
{
color
:
#999999
;
line-height
:
normal
;
...
...
@@ -257,7 +315,7 @@ export default {
margin-left
:
30rpx
;
font-size
:
30rpx
;
font-weight
:
400
;
color
:
#2272
FF
;
color
:
#2272
ff
;
align-self
:
top
;
}
}
...
...
@@ -281,7 +339,7 @@ export default {
}
}
}
.save-pop
{
padding
:
0
30rpx
;
.header
{
...
...
@@ -289,7 +347,7 @@ export default {
font-size
:
40rpx
;
font-weight
:
bold
;
color
:
#333333
;
border-bottom
:
solid
2rpx
#
F4F5F
7
;
border-bottom
:
solid
2rpx
#
f4f5f
7
;
line-height
:
40rpx
;
padding
:
60rpx
0
40rpx
0
;
}
...
...
@@ -304,8 +362,6 @@ export default {
line-height
:
28rpx
;
}
}
}
/
deep
/
.pop-bottom
{
padding
:
0
16rpx
;
...
...
@@ -319,12 +375,12 @@ export default {
padding
:
0
;
}
.plain
{
border
:
2px
solid
#2272
FF
;
color
:
#2272
FF
;
border
:
2px
solid
#2272
ff
;
color
:
#2272
ff
;
}
.solid
{
color
:
#
FFFFFF
;
background-color
:
#2272
FF
;
color
:
#
ffffff
;
background-color
:
#2272
ff
;
}
}
}
...
...
src/pages/mine/address/index.vue
View file @
adcdc662
...
...
@@ -58,9 +58,9 @@ export default {
toAddSite
(
title
){
this
.
$u
.
route
({
url
:
'pages/mine/address/addSite'
,
params
:
{
title
:
title
}
//
params: {
//
title: title
//
}
})
}
}
...
...
src/pages/mine/warehouse/index.vue
View file @
adcdc662
<
template
>
<view
class=
"ware-house"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"我的仓库"
titleColor=
"#333333"
<view
class=
"ware-house"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"我的仓库"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"tools-box"
>
<view
class=
"search-sub"
>
...
...
@@ -8,8 +8,8 @@
inactive-color=
"#666"
button-color=
"#2272FF"
bparts-radius=
"36"
@
change=
"sectionChange"
height=
"72"
bold
>
</u-subsection>
</view>
<u-button
class=
"right-btn"
@
click=
"handleClickRecords"
:custom-style=
"buttonStyle"
type=
"primary"
</view>
<u-button
class=
"right-btn"
@
click=
"handleClickRecords"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
>
操作记录
</u-button>
<view
class=
"search-btn"
@
click=
"handleClickSearch"
>
<image
class=
"search-image"
mode=
"widthFix"
:src=
"sousuoImage"
></image>
...
...
@@ -18,16 +18,16 @@
</view>
<view
class=
"u-tabs-box"
>
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list[curNow]"
count=
"total"
:current=
"current[curNow]"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list[curNow]"
count=
"total"
:current=
"current[curNow]"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
</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"
@
scroll=
"scroll"
enable-back-to-top
>
<NoOrder
v-if=
"no
More
"
type=
"black"
:customStyle=
"noPartsCustomStyle"
/>
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
>
<NoOrder
v-if=
"no
Parts
"
type=
"black"
:customStyle=
"noPartsCustomStyle"
/>
<template
v-else
>
<view
v-for=
"(item, index) in partsList"
:key=
"item.id"
>
<AppliedCell
@
operate=
"handleOperate"
:info=
"item"
></AppliedCell>
...
...
@@ -39,6 +39,17 @@
</
template
>
</scroll-view>
</view>
<view
class=
"bottom-view"
v-if=
"isReserve"
>
<view
class=
"selected-all-view"
@
click=
"radioChange"
>
<u-icon
class=
"selected-all-icon"
name=
"checkbox-mark"
:color=
"radioColor"
></u-icon>
<text>
全选
</text>
</view>
<view
class=
"right-view"
>
<u-button
class=
"scd-btn"
@
click=
"handleClickRecords"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
>
{{buttonText}}
</u-button>
</view>
</view>
</view>
</template>
...
...
@@ -57,42 +68,43 @@
pageNumber
:
0
,
pageSize
:
100
,
partsList
:
[],
current
:
[
0
,
0
],
current
:
[
0
,
0
],
// [未入库index, 已入库index]
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
,
triggered
:
false
,
_freshing
:
false
,
scrollTop
:
0
,
old
:
{
scrollTop
:
0
}
scrollTop
:
0
,
selectedAll
:
false
,
};
},
computed
:
{
//
-1 已驳回,-1 已取消,0 新申请,1 待审核,10 待发货,11 配货中,12 采购中,15 已发货,20 已签收,21 待返件,22 返件中,90 已转备件,100 已完成
//
待签收 15;待发货 10;待审核 1;已驳回 -2;已签收 20;已取消 -1;
list
()
{
return
[
[{
'name'
:
'代签收'
,
'status'
:
''
'status'
:
15
},
{
'name'
:
'代发货'
,
'status'
:
''
'status'
:
10
},
{
'name'
:
'代审核'
,
'status'
:
''
'status'
:
1
},
{
'name'
:
'已驳回'
,
'status'
:
-
2
},
{
'name'
:
'已签收'
,
'status'
:
20
},
{
'name'
:
'已取消'
,
'status'
:
''
'status'
:
-
1
},
{
'name'
:
'已签收'
,
'status'
:
''
}
],
[{
'name'
:
'备件仓'
,
...
...
@@ -105,39 +117,52 @@
]
]
},
subList
()
{
subList
()
{
return
[
'未入库'
,
'已入库'
]
},
currentTab
()
{
return
this
.
list
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]
]
return
this
.
list
[
this
.
curNow
][
this
.
current
Index
]
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
no
More
()
{
no
Parts
()
{
return
this
.
partsList
.
length
==
0
&&
this
.
loaded
},
noPartsCustomStyle
()
{
return
this
.
curNow
==
0
?
'margin-top: 100rpx;background-color: #F4F5F7'
:
'margin-top: 200rpx;background-color: #F4F5F7'
},
buttonStyle
()
{
buttonStyle
()
{
return
{
'background-color'
:
'#2272FF'
,
'color'
:
'#FFFFFF'
,
'font-size'
:
'32rpx'
,
'height'
:
'80rpx'
,
'width'
:
'200rpx'
}
}
},
radioColor
()
{
return
this
.
selectedAll
?
'#2272FF'
:
'transparent'
},
currentIndex
()
{
// 当前tab的index
return
this
.
current
[
this
.
curNow
]
},
buttonTexts
()
{
return
[[
'签收'
,
''
,
'取消申请'
,
''
,
''
],
[
'退件'
,
''
]]
},
buttonText
()
{
return
this
.
buttonTexts
[
this
.
curNow
][
this
.
currentIndex
]
},
isReserve
()
{
// 选中备件仓
return
this
.
curNow
==
1
&&
this
.
currentIndex
==
0
}
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'我的仓库列表页'
)
getApp
().
trackPage
(
'我的仓库列表页'
)
this
.
reloadPartsList
()
this
.
_freshing
=
false
;
},
onShow
()
{
this
.
reloadPartsInfo
()
},
methods
:
{
sectionChange
(
index
)
{
this
.
curNow
=
index
;
...
...
@@ -149,35 +174,28 @@
this
.
reloadPartsList
()
},
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getPartsList
(
this
.
currentTab
)
},
// 页面数据
getPartsList
(
index
)
{
// 页面数据:未入库
getUnstockedList
(
status
)
{
// 状态处理
this
.
pageNumber
+=
1
this
.
loaded
=
false
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
keyword
:
''
,
type
:
0
'pageSize'
:
20
,
'pageNumbr'
:
1
,
'status'
:
status
,
//不传值 全部;待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
// 'workOrderId': ''
}
var
self
=
this
;
self
.
$u
.
api
.
listBystock
(
param
).
then
((
res
)
=>
{
this
.
$u
.
api
.
applyList
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
type
!=
self
.
partsType
)
return
self
.
triggered
=
false
;
self
.
_freshing
=
false
;
if
(
self
.
pageNumber
==
1
)
{
self
.
partsList
=
[]
if
(
res
.
data
.
type
!=
this
.
partsType
)
return
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
if
(
this
.
pageNumber
==
1
)
{
this
.
partsList
=
[]
}
if
(
res
.
data
.
list
)
{
self
.
partsList
.
push
(...
res
.
data
.
list
)
self
.
loadStatus
=
res
.
data
.
total
>
self
.
partsList
.
length
&&
res
.
data
.
list
.
length
==
self
.
pageSize
?
'loadmore'
:
'nomore'
this
.
partsList
.
push
(...
res
.
data
.
list
)
this
.
loadStatus
=
res
.
data
.
list
.
length
<
this
.
pageSize
?
'nomore'
:
'loadmore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
...
...
@@ -186,36 +204,104 @@
});
},
getReturnedParts
(
status
)
{
// 返件列表
this
.
pageNumber
+=
1
this
.
loaded
=
false
var
param
=
{
'pageSize'
:
20
,
'pageNumbr'
:
1
,
'items'
:
true
,
'type'
:
'new'
}
this
.
$u
.
api
.
returnedParts
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
type
!=
this
.
partsType
)
return
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
if
(
this
.
pageNumber
==
1
)
{
this
.
partsList
=
[]
}
if
(
res
.
data
.
list
)
{
this
.
partsList
.
push
(...
res
.
data
.
list
)
this
.
loadStatus
=
res
.
data
.
list
.
length
<
this
.
pageSize
?
'nomore'
:
'loadmore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
this
.
loaded
=
true
});
},
getReserveList
()
{
// 备件列表
this
.
pageNumber
+=
1
this
.
loaded
=
false
this
.
$u
.
api
.
reserveList
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
type
!=
this
.
partsType
)
return
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
if
(
this
.
pageNumber
==
1
)
{
this
.
partsList
=
[]
}
if
(
res
.
data
.
list
)
{
this
.
partsList
.
push
(...
res
.
data
.
list
)
this
.
loadStatus
=
res
.
data
.
list
.
length
<
this
.
pageSize
?
'nomore'
:
'loadmore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
this
.
loaded
=
true
});
},
handleOperate
(
type
)
{
// 调接口
// 刷新页面
},
handleClickRecords
()
{
uni
.
navigateTo
({
url
:
'pages/mine/warehouse/records'
})
handleClickRecords
()
{
uni
.
navigateTo
({
url
:
'pages/mine/warehouse/records'
})
},
handleClickSearch
()
{
uni
.
navigateTo
({
url
:
'pages/order/search'
})
},
radioChange
(
e
)
{
this
.
selectedAll
=
!
this
.
selectedAll
},
onRefresh
()
{
if
(
this
.
_freshing
)
return
;
this
.
_freshing
=
true
;
this
.
reloadParts
Info
()
this
.
reloadParts
List
()
},
onRestore
()
{
this
.
triggered
=
'restore'
;
// 需要重置
},
reloadPartsInfo
()
{
this
.
reloadPartsList
()
},
reloadPartsList
()
{
reloadPartsList
()
{
// 第一页数据
this
.
pageNumber
=
0
this
.
loadStatus
=
'loading'
this
.
getPartsList
(
this
.
currentTab
);
this
.
loadStatus
=
'loading'
this
.
loadPartsList
()
},
loadPartsList
()
{
if
(
this
.
curNow
==
0
)
{
// 未入库
this
.
getUnstockedList
(
this
.
currentTab
.
status
);
}
else
{
// 已入库
if
(
this
.
currentIndex
==
0
)
{
// 备件仓
this
.
getReserveList
()
}
else
{
// 已返件
this
.
getReturnedParts
()
}
}
},
reachBottom
(
e
)
{
if
(
this
.
isReserve
)
this
.
loadStatus
=
'nomore'
// 已入库的备件仓没有分页
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
loadPartsList
()
},
scroll
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
...
...
@@ -226,10 +312,14 @@
<
style
lang=
"scss"
scoped
>
.ware-house
{
padding
:
0
30rpx
20rpx
30rpx
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.u-tabs-box
{
margin-bottom
:
30rpx
;
}
.tab-view
{
height
:
100%
;
overflow
:
auto
;
...
...
@@ -273,6 +363,27 @@
font-size
:
26rpx
;
}
}
}
.bottom-view
{
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
.selected-all-view
{
.selected-all-icon
{
border
:
2rpx
solid
#666666
;
}
}
.right-view
{
display
:
flex
;
align-items
:
center
;
.fst-btn
{
}
.scd-btn
{
}
}
}
}
</
style
>
src/pages/mine/warehouse/records.vue
View file @
adcdc662
<
template
>
<view
class=
"ware-wrap"
>
<w-navbar
title=
"
操作记录
"
:background=
"
{backgroundColor: '#F4F5F7'}">
</w-navbar>
<view
class=
"content"
>
<w-navbar
title=
""
:background=
"
{backgroundColor: '#F4F5F7'}">
</w-navbar>
<!--
<view
class=
"content"
>
<view
class=
"panel"
>
<view
class=
"title"
>
物料明细
</view>
<view
class=
"item-table"
>
...
...
@@ -15,9 +15,9 @@
<view
class=
"width-106 center"
>
{{
item
.
systemStock
}}
</view>
</view>
</view>
</view>
</view>
-->
<view
class=
"panel"
>
<
view
class=
"title"
>
操作记录
</view
>
<
!--
<view
class=
"title"
>
操作记录
</view>
--
>
<view
class=
"item-table"
>
<view
class=
"item-header"
>
<view
class=
"width-132"
>
订单编号
</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