Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ALand
Project
Project
Details
Activity
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
张杰
ALand
Commits
8a12ec72
Commit
8a12ec72
authored
Apr 14, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
封装筛选控件功能 商品管理下级界面数据展示
parent
cc1a1c40
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
178 additions
and
82 deletions
+178
-82
project.pbxproj
ALand.xcodeproj/project.pbxproj
+0
-6
CommodityManagementSortView.h
ALand/CodeClass/Home/View/CommodityManagementSortView.h
+1
-0
CommodityManagementSortView.m
ALand/CodeClass/Home/View/CommodityManagementSortView.m
+43
-6
CommodityManagementTopView.h
ALand/CodeClass/Home/View/CommodityManagementTopView.h
+2
-0
CommodityManagementTopView.m
ALand/CodeClass/Home/View/CommodityManagementTopView.m
+5
-0
CommodityManagementViewController.m
...s/Home/ViewController/CommodityManagementViewController.m
+10
-0
ManagementSearchViewController.h
...lass/Home/ViewController/ManagementSearchViewController.h
+0
-13
ManagementSearchViewController.m
...lass/Home/ViewController/ManagementSearchViewController.m
+0
-54
ManagementViewController.h
.../CodeClass/Home/ViewController/ManagementViewController.h
+2
-0
ManagementViewController.m
.../CodeClass/Home/ViewController/ManagementViewController.m
+115
-3
No files found.
ALand.xcodeproj/project.pbxproj
View file @
8a12ec72
...
@@ -92,7 +92,6 @@
...
@@ -92,7 +92,6 @@
1979754A1CAA4DB900407E3F
/* CommodityMutipleSelectBottomView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
197975491CAA4DB900407E3F
/* CommodityMutipleSelectBottomView.xib */
;
};
1979754A1CAA4DB900407E3F
/* CommodityMutipleSelectBottomView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
197975491CAA4DB900407E3F
/* CommodityMutipleSelectBottomView.xib */
;
};
1979754D1CAB6E1300407E3F
/* JavenMultipleViewWithHeader.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1979754C1CAB6E1300407E3F
/* JavenMultipleViewWithHeader.m */
;
};
1979754D1CAB6E1300407E3F
/* JavenMultipleViewWithHeader.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1979754C1CAB6E1300407E3F
/* JavenMultipleViewWithHeader.m */
;
};
197975511CAB6F5D00407E3F
/* OrderViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
197975501CAB6F5D00407E3F
/* OrderViewController.m */
;
};
197975511CAB6F5D00407E3F
/* OrderViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
197975501CAB6F5D00407E3F
/* OrderViewController.m */
;
};
1983EF451CBE2726004510B3
/* ManagementSearchViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1983EF441CBE2726004510B3
/* ManagementSearchViewController.m */
;
};
199B4D681CABBCF600451E0E
/* OrderDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
199B4D671CABBCF600451E0E
/* OrderDetailViewController.m */
;
};
199B4D681CABBCF600451E0E
/* OrderDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
199B4D671CABBCF600451E0E
/* OrderDetailViewController.m */
;
};
199B4D6A1CABBEF400451E0E
/* OrderDetailTopView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
199B4D691CABBEF400451E0E
/* OrderDetailTopView.xib */
;
};
199B4D6A1CABBEF400451E0E
/* OrderDetailTopView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
199B4D691CABBEF400451E0E
/* OrderDetailTopView.xib */
;
};
199B4D6D1CABBF0800451E0E
/* OrderDetailTopView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
199B4D6C1CABBF0800451E0E
/* OrderDetailTopView.m */
;
};
199B4D6D1CABBF0800451E0E
/* OrderDetailTopView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
199B4D6C1CABBF0800451E0E
/* OrderDetailTopView.m */
;
};
...
@@ -383,8 +382,6 @@
...
@@ -383,8 +382,6 @@
1979754C1CAB6E1300407E3F
/* JavenMultipleViewWithHeader.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
JavenMultipleViewWithHeader.m
;
sourceTree
=
"<group>"
;
};
1979754C1CAB6E1300407E3F
/* JavenMultipleViewWithHeader.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
JavenMultipleViewWithHeader.m
;
sourceTree
=
"<group>"
;
};
1979754F1CAB6F5D00407E3F
/* OrderViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OrderViewController.h
;
sourceTree
=
"<group>"
;
};
1979754F1CAB6F5D00407E3F
/* OrderViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OrderViewController.h
;
sourceTree
=
"<group>"
;
};
197975501CAB6F5D00407E3F
/* OrderViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OrderViewController.m
;
sourceTree
=
"<group>"
;
};
197975501CAB6F5D00407E3F
/* OrderViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OrderViewController.m
;
sourceTree
=
"<group>"
;
};
1983EF431CBE2726004510B3
/* ManagementSearchViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ManagementSearchViewController.h
;
sourceTree
=
"<group>"
;
};
1983EF441CBE2726004510B3
/* ManagementSearchViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ManagementSearchViewController.m
;
sourceTree
=
"<group>"
;
};
199B4D661CABBCF600451E0E
/* OrderDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OrderDetailViewController.h
;
sourceTree
=
"<group>"
;
};
199B4D661CABBCF600451E0E
/* OrderDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OrderDetailViewController.h
;
sourceTree
=
"<group>"
;
};
199B4D671CABBCF600451E0E
/* OrderDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OrderDetailViewController.m
;
sourceTree
=
"<group>"
;
};
199B4D671CABBCF600451E0E
/* OrderDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OrderDetailViewController.m
;
sourceTree
=
"<group>"
;
};
199B4D691CABBEF400451E0E
/* OrderDetailTopView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
OrderDetailTopView.xib
;
sourceTree
=
"<group>"
;
};
199B4D691CABBEF400451E0E
/* OrderDetailTopView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
OrderDetailTopView.xib
;
sourceTree
=
"<group>"
;
};
...
@@ -914,8 +911,6 @@
...
@@ -914,8 +911,6 @@
1979752D1CA90D6C00407E3F
/* CommodityManagementViewController.m */
,
1979752D1CA90D6C00407E3F
/* CommodityManagementViewController.m */
,
197975431CAA2FAB00407E3F
/* ManagementViewController.h */
,
197975431CAA2FAB00407E3F
/* ManagementViewController.h */
,
197975441CAA2FAB00407E3F
/* ManagementViewController.m */
,
197975441CAA2FAB00407E3F
/* ManagementViewController.m */
,
1983EF431CBE2726004510B3
/* ManagementSearchViewController.h */
,
1983EF441CBE2726004510B3
/* ManagementSearchViewController.m */
,
);
);
name
=
CommodityManagement
;
name
=
CommodityManagement
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -1910,7 +1905,6 @@
...
@@ -1910,7 +1905,6 @@
1946DC9A1CB7542D00AC6557
/* CatgoryModel.m in Sources */
,
1946DC9A1CB7542D00AC6557
/* CatgoryModel.m in Sources */
,
197975511CAB6F5D00407E3F
/* OrderViewController.m in Sources */
,
197975511CAB6F5D00407E3F
/* OrderViewController.m in Sources */
,
19DCCBDF1C9AA0450072C3BF
/* ICRPlaceholderTextView.m in Sources */
,
19DCCBDF1C9AA0450072C3BF
/* ICRPlaceholderTextView.m in Sources */
,
1983EF451CBE2726004510B3
/* ManagementSearchViewController.m in Sources */
,
1900A33C1CB602D500B2B7C4
/* StoreNameViewController.m in Sources */
,
1900A33C1CB602D500B2B7C4
/* StoreNameViewController.m in Sources */
,
19DCCBCD1C9AA0450072C3BF
/* UIFont+Custom.m in Sources */
,
19DCCBCD1C9AA0450072C3BF
/* UIFont+Custom.m in Sources */
,
19DCCBE41C9AA0450072C3BF
/* ICRFunctionEntity.m in Sources */
,
19DCCBE41C9AA0450072C3BF
/* ICRFunctionEntity.m in Sources */
,
...
...
ALand/CodeClass/Home/View/CommodityManagementSortView.h
View file @
8a12ec72
...
@@ -18,4 +18,5 @@ typedef void (^selectedRow)(NSInteger);
...
@@ -18,4 +18,5 @@ typedef void (^selectedRow)(NSInteger);
-
(
instancetype
)
sortView
;
-
(
instancetype
)
sortView
;
-
(
void
)
hide
;;
-
(
void
)
hide
;;
-
(
void
)
defaultSelectISLeft
:(
BOOL
)
isLeft
row
:(
NSInteger
)
row
;
@end
@end
ALand/CodeClass/Home/View/CommodityManagementSortView.m
View file @
8a12ec72
...
@@ -22,6 +22,10 @@
...
@@ -22,6 +22,10 @@
@property
(
nonatomic
,
assign
)
NSInteger
selectedMark
;
@property
(
nonatomic
,
assign
)
NSInteger
selectedMark
;
@property
(
nonatomic
,
strong
)
CoverShadowView
*
viewTopCover
;
@property
(
nonatomic
,
strong
)
CoverShadowView
*
viewTopCover
;
@property
(
nonatomic
,
assign
)
BOOL
isTableOpen
;
@property
(
nonatomic
,
assign
)
BOOL
isTableOpen
;
@property
(
nonatomic
,
assign
)
BOOL
isLeft
;
@property
(
nonatomic
,
assign
)
BOOL
isLeftOpen
;
@end
@end
@implementation
CommodityManagementSortView
@implementation
CommodityManagementSortView
-
(
instancetype
)
sortView
{
-
(
instancetype
)
sortView
{
...
@@ -161,6 +165,7 @@
...
@@ -161,6 +165,7 @@
[
self
.
leftBtn
setTitleColor
:
kCustomGreenColor
forState
:
UIControlStateNormal
];
[
self
.
leftBtn
setTitleColor
:
kCustomGreenColor
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:
kTextColorBlack
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:
kTextColorBlack
forState
:
UIControlStateNormal
];
self
.
leftTableSelect
(
indexPath
.
row
);
self
.
leftTableSelect
(
indexPath
.
row
);
self
.
isLeft
=
YES
;
}
else
{
}
else
{
space
=
@"right"
;
space
=
@"right"
;
[
self
rightBtnAction
];
[
self
rightBtnAction
];
...
@@ -168,6 +173,7 @@
...
@@ -168,6 +173,7 @@
[
self
.
leftBtn
setTitleColor
:
kTextColorBlack
forState
:
UIControlStateNormal
];
[
self
.
leftBtn
setTitleColor
:
kTextColorBlack
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:
kCustomGreenColor
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:
kCustomGreenColor
forState
:
UIControlStateNormal
];
self
.
rightTableSelect
(
indexPath
.
row
);
self
.
rightTableSelect
(
indexPath
.
row
);
self
.
isLeft
=
NO
;
}
}
...
@@ -179,13 +185,20 @@
...
@@ -179,13 +185,20 @@
// Configure the cell...
// Configure the cell...
cell
.
tintColor
=
kCustomGreenColor
;
cell
.
tintColor
=
kCustomGreenColor
;
if
(
self
.
selectedMark
==
indexPath
.
row
)
{
if
(
self
.
isLeft
==
self
.
isLeftOpen
)
{
cell
.
textLabel
.
textColor
=
kCustomGreenColor
;
[
cell
setAccessoryType
:
UITableViewCellAccessoryCheckmark
];
if
(
self
.
selectedMark
==
indexPath
.
row
)
{
cell
.
textLabel
.
textColor
=
kCustomGreenColor
;
[
cell
setAccessoryType
:
UITableViewCellAccessoryCheckmark
];
}
else
{
cell
.
textLabel
.
textColor
=
[
UIColor
blackColor
];
[
cell
setAccessoryType
:
UITableViewCellAccessoryNone
];
}
}
else
{
}
else
{
cell
.
textLabel
.
textColor
=
[
UIColor
blackColor
];
cell
.
textLabel
.
textColor
=
[
UIColor
blackColor
];
[
cell
setAccessoryType
:
UITableViewCellAccessoryNone
];
[
cell
setAccessoryType
:
UITableViewCellAccessoryNone
];
}
}
return
cell
;
return
cell
;
}
}
...
@@ -206,10 +219,12 @@
...
@@ -206,10 +219,12 @@
_arrTitles
=
_arrLeft
;
_arrTitles
=
_arrLeft
;
if
(
self
.
clickCount
!=
M_PI
)
{
if
(
self
.
clickCount
!=
M_PI
)
{
[
self
showTableView
];
[
self
showTableView
];
self
.
isLeftOpen
=
YES
;
}
else
{
}
else
{
[
self
hideTableView
];
[
self
hideTableView
];
self
.
isLeftOpen
=
NO
;
}
}
[
self
iconAnimate
];
[
self
iconAnimate
];
}
}
...
@@ -218,10 +233,11 @@
...
@@ -218,10 +233,11 @@
_arrTitles
=
_arrRight
;
_arrTitles
=
_arrRight
;
if
(
self
.
rightClickCount
!=
M_PI
)
{
if
(
self
.
rightClickCount
!=
M_PI
)
{
[
self
showTableView
];
[
self
showTableView
];
self
.
isLeftOpen
=
NO
;
}
else
{
}
else
{
[
self
hideTableView
];
[
self
hideTableView
];
self
.
isLeftOpen
=
NO
;
}
}
[
self
rightIconAnimate
];
[
self
rightIconAnimate
];
}
}
...
@@ -276,6 +292,27 @@
...
@@ -276,6 +292,27 @@
}
}
-
(
void
)
defaultSelectISLeft
:
(
BOOL
)
isLeft
row
:
(
NSInteger
)
row
{
if
(
isLeft
)
{
self
.
isLeft
=
YES
;
self
.
arrTitles
=
self
.
arrLeft
;
[
self
setLeftBtnTitle
:
self
.
arrTitles
[
row
]];
[
self
.
leftBtn
setTitleColor
:
kCustomGreenColor
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:
kTextColorBlack
forState
:
UIControlStateNormal
];
self
.
isLeft
=
YES
;
}
else
{
self
.
isLeft
=
NO
;
self
.
arrTitles
=
self
.
arrRight
;
[
self
.
rightBtn
setTitle
:[
NSString
stringWithFormat
:
@"%@ "
,
self
.
arrTitles
[
row
]]
forState
:
UIControlStateNormal
];
[
self
.
leftBtn
setTitleColor
:
kTextColorBlack
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:
kCustomGreenColor
forState
:
UIControlStateNormal
];
self
.
isLeft
=
NO
;
}
}
/*
/*
// Only override drawRect: if you perform custom drawing.
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
// An empty implementation adversely affects performance during animation.
...
...
ALand/CodeClass/Home/View/CommodityManagementTopView.h
View file @
8a12ec72
...
@@ -10,4 +10,6 @@
...
@@ -10,4 +10,6 @@
@interface
CommodityManagementTopView
:
UIView
@interface
CommodityManagementTopView
:
UIView
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrDatas
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrDatas
;
@property
(
nonatomic
,
assign
)
BOOL
isLeft
;
//判断排序判断选中了左边还是右边
@property
(
nonatomic
,
assign
)
NSInteger
row
;
//判断排序判断选中了哪一行 传到下一个页面
@end
@end
ALand/CodeClass/Home/View/CommodityManagementTopView.m
View file @
8a12ec72
...
@@ -30,6 +30,9 @@
...
@@ -30,6 +30,9 @@
[
self
hideSortView
];
[
self
hideSortView
];
manageVC
.
isShowNavigationBar
=
YES
;
manageVC
.
isShowNavigationBar
=
YES
;
manageVC
.
arrCellData
=
[
self
.
arrDatas
mutableCopy
];
manageVC
.
arrCellData
=
[
self
.
arrDatas
mutableCopy
];
manageVC
.
isLeft
=
self
.
isLeft
;
manageVC
.
row
=
self
.
row
;
[[
self
viewController
]
PushViewController
:
manageVC
animated
:
YES
];
[[
self
viewController
]
PushViewController
:
manageVC
animated
:
YES
];
CLog
(
@"m"
);
CLog
(
@"m"
);
...
@@ -38,6 +41,8 @@
...
@@ -38,6 +41,8 @@
[
self
hideSortView
];
[
self
hideSortView
];
AddCommodityViewController
*
addVC
=
[[
AddCommodityViewController
alloc
]
init
];
AddCommodityViewController
*
addVC
=
[[
AddCommodityViewController
alloc
]
init
];
addVC
.
hidesBottomBarWhenPushed
=
YES
;
addVC
.
hidesBottomBarWhenPushed
=
YES
;
[[
self
viewController
].
navigationController
pushViewController
:
addVC
animated
:
YES
];
[[
self
viewController
].
navigationController
pushViewController
:
addVC
animated
:
YES
];
CLog
(
@"a"
);
CLog
(
@"a"
);
...
...
ALand/CodeClass/Home/ViewController/CommodityManagementViewController.m
View file @
8a12ec72
...
@@ -32,6 +32,9 @@
...
@@ -32,6 +32,9 @@
@property
(
nonatomic
,
strong
)
UIView
*
titleView
;
@property
(
nonatomic
,
strong
)
UIView
*
titleView
;
@property
(
nonatomic
,
strong
)
UIView
*
searchTitleView
;
@property
(
nonatomic
,
strong
)
UIView
*
searchTitleView
;
@end
@end
@implementation
CommodityManagementViewController
@implementation
CommodityManagementViewController
...
@@ -108,6 +111,9 @@
...
@@ -108,6 +111,9 @@
-
(
void
)
leftSelectCodtition
:
(
NSInteger
)
row
{
-
(
void
)
leftSelectCodtition
:
(
NSInteger
)
row
{
self
.
topView
.
isLeft
=
YES
;
self
.
topView
.
row
=
row
;
switch
(
row
)
{
switch
(
row
)
{
case
0
:
case
0
:
{
{
...
@@ -136,6 +142,10 @@
...
@@ -136,6 +142,10 @@
}
}
-
(
void
)
rightSelectCondition
:
(
NSInteger
)
row
{
-
(
void
)
rightSelectCondition
:
(
NSInteger
)
row
{
self
.
topView
.
isLeft
=
NO
;
self
.
topView
.
row
=
row
;
switch
(
row
)
{
switch
(
row
)
{
case
0
:
case
0
:
{
{
...
...
ALand/CodeClass/Home/ViewController/ManagementSearchViewController.h
deleted
100644 → 0
View file @
cc1a1c40
//
// ManagementSearchViewController.h
// ALand
//
// Created by Z on 16/4/13.
// Copyright © 2016年 Z. All rights reserved.
//
#import "IBTUIViewController.h"
@interface
ManagementSearchViewController
:
IBTUIViewController
@end
ALand/CodeClass/Home/ViewController/ManagementSearchViewController.m
deleted
100644 → 0
View file @
cc1a1c40
//
// ManagementSearchViewController.m
// ALand
//
// Created by Z on 16/4/13.
// Copyright © 2016年 Z. All rights reserved.
//
#import "ManagementSearchViewController.h"
@interface
ManagementSearchViewController
()
<
UISearchBarDelegate
,
UITableViewDelegate
,
UITableViewDataSource
>
@end
@implementation
ManagementSearchViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
self
setUpSearchBar
];
// Do any additional setup after loading the view.
}
-
(
void
)
setUpSearchBar
{
UIView
*
titleView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
280
,
35
)];
//allocate titleView
UIColor
*
color
=
self
.
navigationController
.
navigationBar
.
barTintColor
;
[
titleView
setBackgroundColor
:
color
];
UISearchBar
*
searchBar
=
[[
UISearchBar
alloc
]
init
];
searchBar
.
delegate
=
self
;
searchBar
.
frame
=
CGRectMake
(
0
,
0
,
260
,
35
);
searchBar
.
centerX
=
titleView
.
centerX
;
searchBar
.
backgroundImage
=
[
UIImage
imageWithColor
:
color
];
[
searchBar
setAutocapitalizationType
:
UITextAutocapitalizationTypeNone
];
[
titleView
addSubview
:
searchBar
];
self
.
navigationItem
.
titleView
=
titleView
;
[
searchBar
becomeFirstResponder
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
ALand/CodeClass/Home/ViewController/ManagementViewController.h
View file @
8a12ec72
...
@@ -12,4 +12,6 @@
...
@@ -12,4 +12,6 @@
@interface
ManagementViewController
:
IBTUIViewController
@interface
ManagementViewController
:
IBTUIViewController
@property
(
nonatomic
,
strong
)
CommodityManagementSortView
*
sorView
;
@property
(
nonatomic
,
strong
)
CommodityManagementSortView
*
sorView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrCellData
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrCellData
;
@property
(
nonatomic
,
assign
)
BOOL
isLeft
;
//判断排序判断选中了左边还是右边
@property
(
nonatomic
,
assign
)
NSInteger
row
;
//判断排序判断选中了哪一行
@end
@end
ALand/CodeClass/Home/ViewController/ManagementViewController.m
View file @
8a12ec72
...
@@ -10,29 +10,40 @@
...
@@ -10,29 +10,40 @@
#import "CommodityTableViewCell.h"
#import "CommodityTableViewCell.h"
#import "UITableView+Category.h"
#import "UITableView+Category.h"
#import "CommodityMutipleSelectBottomView.h"
#import "CommodityMutipleSelectBottomView.h"
#define kPageSize @999
#define kCellId @"CommodityTableViewCell.h"
#define kCellId @"CommodityTableViewCell.h"
@interface
ManagementViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
ManagementViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
CommodityMutipleSelectBottomView
*
bottomView
;
@property
(
nonatomic
,
strong
)
CommodityMutipleSelectBottomView
*
bottomView
;
@property
(
nonatomic
,
assign
)
NSInteger
page
;
@property
(
nonatomic
,
copy
)
NSString
*
field
;
//排序的字段
@property
(
nonatomic
,
copy
)
NSString
*
direction
;
//排序的顺序 升序或降序
@property
(
nonatomic
,
copy
)
NSString
*
condition
;
@end
@end
@implementation
ManagementViewController
@implementation
ManagementViewController
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
self
.
condition
=
@"shop online only"
;
self
.
field
=
@""
;
self
.
direction
=
@"desc"
;
self
.
navigationItem
.
title
=
@"批量管理"
;
self
.
navigationItem
.
title
=
@"批量管理"
;
[
self
.
view
addSubview
:
self
.
sorView
];
[
self
.
view
addSubview
:
self
.
sorView
];
[
self
.
sorView
defaultSelectISLeft
:
self
.
isLeft
row
:
self
.
row
];
WS
(
weakSelf
)
self
.
sorView
.
leftTableSelect
=
^
(
NSInteger
row
){
self
.
sorView
.
leftTableSelect
=
^
(
NSInteger
row
){
[
weakSelf
leftSelectCodtition
:
row
];
CLog
(
@"l"
);
CLog
(
@"l"
);
};
};
self
.
sorView
.
rightTableSelect
=
^
(
NSInteger
row
){
self
.
sorView
.
rightTableSelect
=
^
(
NSInteger
row
){
[
weakSelf
rightSelectCondition
:
row
];
CLog
(
@"r"
);
CLog
(
@"r"
);
};
};
_tableView
=
[
UITableView
plainTableViewWithTarget
:
self
cellNibName
:
@"CommodityTableViewCell"
cellId
:
kCellId
];
_tableView
=
[
UITableView
plainTableViewWithTarget
:
self
cellNibName
:
@"CommodityTableViewCell"
cellId
:
kCellId
];
[
self
.
view
addSubview
:
_tableView
];
[
self
.
view
addSubview
:
_tableView
];
_tableView
.
sd_layout
.
topSpaceToView
(
self
.
sorView
,
0
).
leftEqualToView
(
self
.
view
).
rightEqualToView
(
self
.
view
).
bottomSpaceToView
(
self
.
view
,
70
);
_tableView
.
sd_layout
.
topSpaceToView
(
self
.
sorView
,
0
).
leftEqualToView
(
self
.
view
).
rightEqualToView
(
self
.
view
).
bottomSpaceToView
(
self
.
view
,
70
);
...
@@ -50,6 +61,107 @@
...
@@ -50,6 +61,107 @@
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
}
}
-
(
void
)
leftSelectCodtition
:
(
NSInteger
)
row
{
switch
(
row
)
{
case
0
:
{
self
.
condition
=
@"shop online only"
;
}
break
;
case
1
:
{
self
.
condition
=
@"shop offline only"
;
}
break
;
default
:
break
;
}
[
self
resetReloadData
];
}
-
(
void
)
rightSelectCondition
:
(
NSInteger
)
row
{
switch
(
row
)
{
case
0
:
{
self
.
field
=
@"shop goods create time"
;
self
.
direction
=
@"desc"
;
}
break
;
case
1
:
{
self
.
field
=
@"salesvolume"
;
self
.
direction
=
@"desc"
;
}
break
;
case
2
:
{
self
.
field
=
@"brokerageRate"
;
self
.
direction
=
@"desc"
;
}
break
;
case
3
:
{
self
.
field
=
@" spec price"
;
self
.
direction
=
@"desc"
;
}
break
;
default
:
break
;
}
[
self
resetReloadData
];
}
//改变排序条件之后重新请求数据
-
(
void
)
resetReloadData
{
[
self
.
arrCellData
removeAllObjects
];
[
self
setUpData
];
}
-
(
void
)
setUpData
{
NSDictionary
*
params
=
@{
@"defintion"
:
@{
@"probePages"
:
@0
,
@"orders"
:
@[@{
@"field"
:
self
.
field
,
@"direction"
:
self
.
direction
}],
@"conditions"
:
@[@{
@"parameters"
:
@[[
UserInfo
shareInstance
].
domain
],
@"operation"
:
@"domain equals"
,
@"parameter"
:
@{
@"operation"
:
@"string"
}},
@{
@"parameters"
:
@[@[[
UserInfo
shareInstance
].
shop
.
uuid
]],
@"operation"
:
@"shop uuid equals"
,
@"parameter"
:
@{
@"operation"
:
@"sring"
}},
@{
@"parameters"
:
@[
@""
],
@"operation"
:
self
.
condition
,
@"parameter"
:
@{
@"operation"
:
@"sring"
}}],
@"pageSize"
:
kPageSize
,
@"page"
:
@0
},
@"fetchParts"
:
@[
@"string"
]};
WS
(
weakSelf
)
[[
HTTPCilent
shareCilent
]
POST
:
@"goods/query2"
parameters
:
params
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
for
(
NSDictionary
*
dic
in
responseObject
[
@"queryResult"
])
{
CommotityListModel
*
model
=
[
CommotityListModel
modelObjectWithDictionary
:
dic
];
[
weakSelf
.
arrCellData
addObject
:
model
];
}
[
weakSelf
.
tableView
reloadData
];
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
}];
}
#pragma mark =========== action ===========
#pragma mark =========== action ===========
-
(
void
)
selectAll
:
(
UIButton
*
)
btn
{
//tag 等于1表示全选
-
(
void
)
selectAll
:
(
UIButton
*
)
btn
{
//tag 等于1表示全选
...
...
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