Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
5d2fd070
Commit
5d2fd070
authored
Jun 03, 2020
by
ljh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善出入库记录的筛选和搜索
parent
9e46857f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
134 additions
and
49 deletions
+134
-49
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/AppDelegate.swift
GeliBusinessPlatform/AppDelegate.swift
+1
-1
GeliBusinessPlatform/View/MoreBtnView/MoreAndTimeSelectView.swift
...nessPlatform/View/MoreBtnView/MoreAndTimeSelectView.swift
+19
-13
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
+113
-34
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+1
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
5d2fd070
No preview for this file type
GeliBusinessPlatform/AppDelegate.swift
View file @
5d2fd070
...
...
@@ -258,7 +258,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
tabBarController
.
selectedIndex
=
1
tabBarController
.
selectedIndex
=
2
...
...
GeliBusinessPlatform/View/MoreBtnView/MoreAndTimeSelectView.swift
View file @
5d2fd070
...
...
@@ -281,9 +281,10 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
}
bugSArr
[
index
]
=
sender
.
isSelected
let
suv
=
contenV
.
viewWithTag
(
10086
)
suv
?
.
removeFromSuperview
()
if
index
>
0
&&
sender
.
isSelected
{
let
suv
=
contenV
.
viewWithTag
(
10086
)
suv
?
.
removeFromSuperview
()
//选择了出入库
print
(
"选择了出入库"
)
if
sendSArr
.
count
==
0
{
...
...
@@ -326,18 +327,23 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
}
else
{
print
(
"选择全部"
)
let
statusV
=
addTitleAndMoreBtn
(
title
:
"具体类型"
,
arrStr
:
[],
btnTag
:
3000
)
sendSArr
=
[]
contenV
.
addSubview
(
statusV
)
statusV
.
tag
=
10086
statusV
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
15*
glscale
)
make
.
top
.
equalTo
(
line3
.
snp_bottom
)
.
offset
(
15*
glscale
)
make
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
20*
glscale
)
if
sendSArr
.
count
>
0
{
let
suv
=
contenV
.
viewWithTag
(
10086
)
suv
?
.
removeFromSuperview
()
let
statusV
=
addTitleAndMoreBtn
(
title
:
"具体类型"
,
arrStr
:
[],
btnTag
:
3000
)
sendSArr
=
[]
contenV
.
addSubview
(
statusV
)
statusV
.
tag
=
10086
statusV
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
15*
glscale
)
make
.
top
.
equalTo
(
line3
.
snp_bottom
)
.
offset
(
15*
glscale
)
make
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
20*
glscale
)
}
contentH
=
contentH
-
120*
glscale
contentHeight
.
constant
=
contentH
}
contentH
=
contentH
-
120*
glscale
contentHeight
.
constant
=
contentH
}
}
else
{
...
...
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
View file @
5d2fd070
...
...
@@ -15,21 +15,37 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
func
CRKXiangQVCFinishAction
()
{
listView
.
mj_header
?
.
beginRefreshing
()
}
func
searchBarShouldBeginEditing
(
_
searchBar
:
UISearchBar
)
->
Bool
{
print
(
"调起搜索后添加个蒙版本"
)
if
moreTimeSelectView
!=
nil
{
moreTimeSelectView
.
removeFromSuperview
()
moreTimeSelectView
=
nil
}
return
true
}
var
isSearch
=
false
weak
var
searchV
:
SearchBarView
!
func
searchBarShouldBeginEditing
(
_
searchBar
:
UISearchBar
)
->
Bool
{
print
(
"调起搜索后添加个蒙版本"
)
blackBtnView
=
UIButton
()
blackBtnView
.
backgroundColor
=
UIColor
.
init
(
named
:
"提示视图背景色"
)
self
.
view
.
addSubview
(
blackBtnView
)
blackBtnView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
searchBgView
.
snp_bottom
)
make
.
left
.
right
.
bottom
.
equalToSuperview
()
}
blackBtnView
.
addTarget
(
self
,
action
:
#selector(
removeBlackBtnView
)
,
for
:
.
touchUpInside
)
if
moreTimeSelectView
!=
nil
{
moreTimeSelectView
.
removeFromSuperview
()
moreTimeSelectView
=
nil
}
return
true
}
@objc
func
removeBlackBtnView
(){
if
blackBtnView
!=
nil
{
blackBtnView
.
removeFromSuperview
()
searchV
!.
resignFirstResponder
()
}
}
var
isSearch
=
false
var
blackBtnView
:
UIButton
!
=
nil
//MARK: - searchView delegate
func
clearSearchAction
()
{
print
(
"取消搜索代理了--"
)
print
(
"取消搜索代理了--"
)
}
//MARK:--编辑即将结束
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
...
...
@@ -40,13 +56,17 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
loadData
()
}
}
removeBlackBtnView
()
}
func
searchBarSearchButtonClicked
(
_
searchBar
:
UISearchBar
)
{
print
(
"点击搜索进行--"
)
searchBar
.
resignFirstResponder
()
keyword
=
searchBar
.
text
!
listView
.
mj_header
?
.
beginRefreshing
()
removeBlackBtnView
()
listView
.
mj_header
?
.
beginRefreshing
()
}
var
isGm
=
true
...
...
@@ -61,6 +81,8 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
var
moreTimeSelectView
:
MoreAndTimeSelectView
!
=
nil
@IBAction
func
openViewAction
(
_
sender
:
Any
)
{
print
(
"筛选选项"
)
removeBlackBtnView
()
if
moreTimeSelectView
==
nil
{
moreTimeSelectView
=
MoreAndTimeSelectView
()
moreTimeSelectView
.
delegate
=
self
...
...
@@ -77,8 +99,8 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
moreTimeSelectView
.
removeFromSuperview
()
moreTimeSelectView
=
nil
}
}
//MARK:--筛选回调数据
func
sureActionMoreAndTimeSelectView
(
beginDate
:
Date
?,
endginDate
:
Date
?,
paySelectArr
:
Array
<
Bool
>
,
bugSelectArr
:
Array
<
Bool
>
,
sendSelectArr
:
Array
<
Bool
>
)
{
...
...
@@ -88,7 +110,63 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
paySArr
=
paySelectArr
bugSArr
=
bugSelectArr
sendSArr
=
sendSelectArr
if
BeginDate
==
nil
{
start_time
=
0
end_time
=
0
}
else
{
let
timeInterval
:
TimeInterval
=
BeginDate
!.
timeIntervalSince1970
let
timeIntervalEnd
:
TimeInterval
=
EndDate
!.
timeIntervalSince1970
start_time
=
Int
(
timeInterval
)
end_time
=
Int
(
timeIntervalEnd
)
}
//单选处理--多选就做拼接。里层UI就不做限制
for
i
in
0
..<
paySArr
.
count
{
let
rowBool
=
paySArr
[
i
]
if
rowBool
{
status
=
i
break
}
}
for
i
in
0
..<
bugSArr
.
count
{
let
rowBool
=
bugSArr
[
i
]
if
rowBool
{
io_type
=
i
break
}
}
if
io_type
==
1
{
//入库
i_type
=
0
o_type
=
0
for
i
in
0
..<
sendSArr
.
count
{
let
rowBool
=
sendSArr
[
i
]
if
rowBool
{
i_type
=
i
break
}
}
}
else
if
io_type
==
2
{
//出库
i_type
=
0
o_type
=
0
for
i
in
0
..<
sendSArr
.
count
{
let
rowBool
=
sendSArr
[
i
]
if
rowBool
{
o_type
=
i
break
}
}
}
else
{
//全部
i_type
=
0
o_type
=
0
}
listView
.
mj_header
?
.
beginRefreshing
()
}
//MARK:--筛选回调数据
func
colseActionMoreAndTimeSelectView
()
{
...
...
@@ -108,6 +186,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
//searchbar
let
searchBr
=
SearchBarView
.
init
()
searchV
=
searchBr
self
.
searchBgView
.
addSubview
(
searchBr
)
searchBr
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
0
)
...
...
@@ -128,12 +207,12 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
listView
.
register
(
UINib
(
nibName
:
"CRKCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CRKCell"
)
//下拉刷新相关设置
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadData
)
)
self
.
listView
!.
mj_header
=
headerMJ
//上拉加载相关设置
footerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadMoreData
)
)
self
.
listView
!.
mj_footer
=
footerMJ
self
.
listView
?
.
mj_header
?
.
beginRefreshing
()
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadData
)
)
self
.
listView
!.
mj_header
=
headerMJ
//上拉加载相关设置
footerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadMoreData
)
)
self
.
listView
!.
mj_footer
=
footerMJ
self
.
listView
?
.
mj_header
?
.
beginRefreshing
()
}
var
status
=
0
// 出入库(审核)状态,1审核中,2通过,3不通过;0全部
...
...
@@ -144,21 +223,21 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
var
end_time
=
0
var
keyword
=
""
var
page
=
0
@objc
func
loadData
(){
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"status"
:
0
as
Any
,
"page"
:
page
as
Any
,
"io_type"
:
io_type
as
Any
,
"i_type"
:
i_type
as
Any
,
"o_type"
:
o_type
as
Any
,
"start_time"
:
""
,
"end_time"
:
""
,
"keyword"
:
""
]
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"status"
:
status
as
Any
,
"page"
:
page
as
Any
,
"io_type"
:
io_type
as
Any
,
"i_type"
:
i_type
as
Any
,
"o_type"
:
o_type
as
Any
,
"start_time"
:
start_time
as
Any
,
"end_time"
:
end_time
as
Any
,
"keyword"
:
keyword
as
Any
]
WarehouseIoList
(
dic
,
success
:
{
(
data
)
in
self
.
datas
?
.
removeAll
()
let
model
=
data
as!
WarehouseIoListModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
datas
?
.
append
(
item
)
})
self
.
listView
.
reloadData
()
self
.
listView
.
mj_header
?
.
endRefreshing
()
self
.
page
=
2
self
.
listView
.
performBatchUpdates
({
...
...
@@ -173,7 +252,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
self
.
listView
?
.
mj_footer
?
.
endRefreshing
()
}
})
{
(
error
)
in
self
.
listView
?
.
mj_header
?
.
endRefreshing
()
self
.
listView
?
.
mj_header
?
.
endRefreshing
()
}
}
...
...
@@ -182,7 +261,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
print
(
"加载更多数据"
)
print
(
"page = "
,
page
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"status"
:
0
as
Any
,
"page"
:
page
as
Any
,
"io_type"
:
io_type
as
Any
,
"i_type"
:
i_type
as
Any
,
"o_type"
:
o_type
as
Any
,
"start_time"
:
""
,
"end_time"
:
""
,
"keyword"
:
""
]
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"status"
:
status
as
Any
,
"page"
:
page
as
Any
,
"io_type"
:
io_type
as
Any
,
"i_type"
:
i_type
as
Any
,
"o_type"
:
o_type
as
Any
,
"start_time"
:
start_time
as
Any
,
"end_time"
:
end_time
as
Any
,
"keyword"
:
keyword
as
Any
]
WarehouseIoList
(
dic
,
success
:
{
(
data
)
in
let
dataM
=
data
as!
WarehouseIoListModel
...
...
@@ -211,11 +290,11 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
if
sender
.
tag
==
0
{
//通过
print
(
"1"
,
cell
.
tag
)
}
else
{
//不通过
print
(
"2"
,
cell
.
tag
)
print
(
"2"
,
cell
.
tag
)
}
}
//MARK: - CELL DELEGATE
//MARK: - CELL DELEGATE
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
//MARK: - 跳转详情
let
model
=
datas
!
[
indexPath
.
row
]
...
...
@@ -232,8 +311,8 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"CRKCell"
)
as!
CRKCell
CRKCell
cell
.
isGm
=
isGm
let
model
=
datas
!
[
indexPath
.
row
]
cell
.
status
=
model
.
status
...
...
@@ -275,5 +354,5 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
}
}
}
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
5d2fd070
...
...
@@ -187,7 +187,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
dataModel
?
.
auth_res
?
.
forEach
({
(
pmd
)
in
if
md
.
auth_id
==
pmd
.
auth_id
{
//存在且还常用
self
.
oftenArr
?
.
append
(
md
)
self
.
oftenArr
?
.
append
(
p
md
)
}
})
})
...
...
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