Skip to content

Commit

Permalink
修改商品基本完成
Browse files Browse the repository at this point in the history
  • Loading branch information
woaomo committed Sep 11, 2015
1 parent 5078ff0 commit 2afab90
Show file tree
Hide file tree
Showing 34 changed files with 838 additions and 15 deletions.
26 changes: 26 additions & 0 deletions YHB_Prj/YHB_Prj.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,14 @@
ABAAFB6E1B996B250012D1C6 /* DJYDCXResult.m in Sources */ = {isa = PBXBuildFile; fileRef = ABAAFB6A1B996B250012D1C6 /* DJYDCXResult.m */; };
ABAAFB6F1B996B250012D1C6 /* DJYDCXRows.m in Sources */ = {isa = PBXBuildFile; fileRef = ABAAFB6C1B996B250012D1C6 /* DJYDCXRows.m */; };
ABAE34A11BA0109C00221980 /* ScanVC.m in Sources */ = {isa = PBXBuildFile; fileRef = ABAE34A01BA0109C00221980 /* ScanVC.m */; };
ABDDB3711BA2CF4000DCD659 /* JHLSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABDDB3701BA2CF4000DCD659 /* JHLSViewController.m */; };
ABE71E241B9C32E2000651A9 /* FBViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABE71E231B9C32E2000651A9 /* FBViewController.m */; };
ABEF1DA71B929D5400C1C2EA /* SupplierDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABEF1DA61B929D5400C1C2EA /* SupplierDetailViewController.m */; };
ABEF1DAB1B92A18E00C1C2EA /* ClerkDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABEF1DAA1B92A18E00C1C2EA /* ClerkDetailViewController.m */; };
ABEF1DAF1B92AD2700C1C2EA /* TenantViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABEF1DAE1B92AD2700C1C2EA /* TenantViewController.m */; };
ABFAB0E51BA1ABCD009D8654 /* PGProductList.m in Sources */ = {isa = PBXBuildFile; fileRef = ABFAB0E41BA1ABCD009D8654 /* PGProductList.m */; };
ABFAB0EC1BA1C0DE009D8654 /* SPEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABFAB0EB1BA1C0DE009D8654 /* SPEditViewController.m */; };
ABFAB0EF1BA29CF9009D8654 /* SPManager.m in Sources */ = {isa = PBXBuildFile; fileRef = ABFAB0EE1BA29CF9009D8654 /* SPManager.m */; };
FF012FA91B8EB92C00AE563C /* VipInfoMode.m in Sources */ = {isa = PBXBuildFile; fileRef = FF012F941B8EB92C00AE563C /* VipInfoMode.m */; };
FF012FAA1B8EB92C00AE563C /* HYXFJLListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FF012F961B8EB92C00AE563C /* HYXFJLListViewController.xib */; };
FF012FAB1B8EB92C00AE563C /* HYXFJLListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF012F971B8EB92C00AE563C /* HYXFJLListViewController.m */; };
Expand Down Expand Up @@ -407,6 +410,8 @@
ABAAFB6C1B996B250012D1C6 /* DJYDCXRows.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJYDCXRows.m; sourceTree = "<group>"; };
ABAE349F1BA0109C00221980 /* ScanVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScanVC.h; sourceTree = "<group>"; };
ABAE34A01BA0109C00221980 /* ScanVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScanVC.m; sourceTree = "<group>"; };
ABDDB36F1BA2CF4000DCD659 /* JHLSViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JHLSViewController.h; sourceTree = "<group>"; };
ABDDB3701BA2CF4000DCD659 /* JHLSViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JHLSViewController.m; sourceTree = "<group>"; };
ABE71E221B9C32E2000651A9 /* FBViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBViewController.h; sourceTree = "<group>"; };
ABE71E231B9C32E2000651A9 /* FBViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBViewController.m; sourceTree = "<group>"; };
ABEF1DA51B929D5400C1C2EA /* SupplierDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SupplierDetailViewController.h; sourceTree = "<group>"; };
Expand All @@ -417,6 +422,10 @@
ABEF1DAE1B92AD2700C1C2EA /* TenantViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TenantViewController.m; sourceTree = "<group>"; };
ABFAB0E31BA1ABCD009D8654 /* PGProductList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PGProductList.h; sourceTree = "<group>"; };
ABFAB0E41BA1ABCD009D8654 /* PGProductList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PGProductList.m; sourceTree = "<group>"; };
ABFAB0EA1BA1C0DE009D8654 /* SPEditViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPEditViewController.h; sourceTree = "<group>"; };
ABFAB0EB1BA1C0DE009D8654 /* SPEditViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPEditViewController.m; sourceTree = "<group>"; };
ABFAB0ED1BA29CF9009D8654 /* SPManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPManager.h; sourceTree = "<group>"; };
ABFAB0EE1BA29CF9009D8654 /* SPManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPManager.m; sourceTree = "<group>"; };
FF012F941B8EB92C00AE563C /* VipInfoMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VipInfoMode.m; sourceTree = "<group>"; };
FF012F951B8EB92C00AE563C /* VipInfoMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VipInfoMode.h; sourceTree = "<group>"; };
FF012F961B8EB92C00AE563C /* HYXFJLListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HYXFJLListViewController.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1121,6 +1130,19 @@
path = Tenant;
sourceTree = "<group>";
};
ABFAB0E61BA1BE80009D8654 /* EditSPVC */ = {
isa = PBXGroup;
children = (
ABFAB0EA1BA1C0DE009D8654 /* SPEditViewController.h */,
ABFAB0EB1BA1C0DE009D8654 /* SPEditViewController.m */,
ABFAB0ED1BA29CF9009D8654 /* SPManager.h */,
ABFAB0EE1BA29CF9009D8654 /* SPManager.m */,
ABDDB36F1BA2CF4000DCD659 /* JHLSViewController.h */,
ABDDB3701BA2CF4000DCD659 /* JHLSViewController.m */,
);
path = EditSPVC;
sourceTree = "<group>";
};
FF2A6BD11A0F3780001607AC = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1435,6 +1457,7 @@
FF357C7D1BA00ADC00DFCAC0 /* shangpinguanli */ = {
isa = PBXGroup;
children = (
ABFAB0E61BA1BE80009D8654 /* EditSPVC */,
FF357C7E1BA0151D00DFCAC0 /* ShangpinguanliVC.h */,
FF357C7F1BA0151D00DFCAC0 /* ShangpinguanliVC.m */,
FF357C801BA0151D00DFCAC0 /* ShangpinguanliVC.xib */,
Expand Down Expand Up @@ -1986,6 +2009,7 @@
FF357C941BA052F500DFCAC0 /* SPGLSearchCell.m in Sources */,
AB8071C51B96C7AA002114C9 /* EmpManage.m in Sources */,
ABEF1DA71B929D5400C1C2EA /* SupplierDetailViewController.m in Sources */,
ABFAB0EF1BA29CF9009D8654 /* SPManager.m in Sources */,
5B1F7FA01B90A9C000763059 /* DJProductCheckListCell.m in Sources */,
FF3C20081A2F2A440081D3C7 /* GlobObserverObject.m in Sources */,
ABAAFB6E1B996B250012D1C6 /* DJYDCXResult.m in Sources */,
Expand Down Expand Up @@ -2019,6 +2043,7 @@
FFF3919B1B846F58007DC652 /* AFURLResponseSerialization.m in Sources */,
AB25793C1B8F02010015039A /* IQTextView.m in Sources */,
FF4DFD081B85B21C00617660 /* NSDateTool.m in Sources */,
ABFAB0EC1BA1C0DE009D8654 /* SPEditViewController.m in Sources */,
FF2A6C6B1A0F3B7B001607AC /* MKAnnotationView+WebCache.m in Sources */,
FF5C87271B830F3000F79EC1 /* LoginManager.m in Sources */,
ABAE34A11BA0109C00221980 /* ScanVC.m in Sources */,
Expand Down Expand Up @@ -2056,6 +2081,7 @@
5B54BA421B9336C7002098A4 /* DJCheckCartCell.m in Sources */,
AB311F9E1B9BFCEE0070784E /* PGRows.m in Sources */,
FF2A6C711A0F3B7B001607AC /* SDWebImageDownloaderOperation.m in Sources */,
ABDDB3711BA2CF4000DCD659 /* JHLSViewController.m in Sources */,
5B54BA3B1B92B0BC002098A4 /* DJCheckCartNetService.m in Sources */,
5B1F7F991B8F73C000763059 /* CALayer+CCAddition.m in Sources */,
FF012FAB1B8EB92C00AE563C /* HYXFJLListViewController.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <UIKit/UIKit.h>
@class PGRows;
@class SPGLProductMode;
@interface ProblemGoodsCell : UITableViewCell
@property (strong, nonatomic) IBOutlet UILabel *labelOdd;
@property (strong, nonatomic) IBOutlet UILabel *labelStatus;
Expand All @@ -19,5 +19,5 @@

+ (CGFloat)heightForCell;
- (void)resetCell;
- (void)setCellWithMode:(PGRows *)aMode;
- (void)setCellWithMode:(SPGLProductMode *)aMode;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#import "ProblemGoodsViewController.h"
#import "ProblemGoodsManager.h"
#import "ProblemGoodsCell.h"
#import "PGRows.h"
#import "SPGLProductMode.h"
#import "SVPullToRefresh.h"
#import "SPEditViewController.h"

@interface ProblemGoodsViewController ()<UITableViewDataSource,UITableViewDelegate>

Expand Down Expand Up @@ -105,10 +106,18 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
- (void)tableView:(UITableView *)tableView willDisplayCell:(ProblemGoodsCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.selectionStyle = UITableViewCellSelectionStyleNone;
PGRows *mode = _arrData[indexPath.row];
SPGLProductMode *mode = _arrData[indexPath.row];
[cell setCellWithMode:mode];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:NO];
SPGLProductMode *mode = _arrData[indexPath.row];
SPEditViewController *vc = [[SPEditViewController alloc] initWithMode:mode];
[self.navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
//

#import "BaseViewController.h"

@class SupplierMode;
@interface SupplierViewController : BaseViewController

- (instancetype)initWithSelectBlock:(void(^)(SupplierMode *mode))aBlock;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,24 @@ @interface SupplierViewController ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic, strong) UITableView *supplierTableView;
@property(nonatomic, strong) SupplierManage *manage;
@property(nonatomic, strong) NSMutableArray *dataArray;

@property(nonatomic,strong) void(^ selectBlock)(SupplierMode *);
@end

@implementation SupplierViewController

- (instancetype)initWithSelectBlock:(void (^)(SupplierMode *))aBlock
{
if (self = [super init])
{
_selectBlock = aBlock;
}
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"供货商管理";
self.title = @"供货商列表";

_supplierTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kMainScreenWidth, kMainScreenHeight-64) style:UITableViewStylePlain];
_supplierTableView.backgroundColor = [UIColor whiteColor];
Expand Down Expand Up @@ -98,14 +109,22 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:NO];
SupplierMode *mode = [self.dataArray objectAtIndex:indexPath.row];
SupplierDetailViewController *vc = [[SupplierDetailViewController alloc] initWithSupplierMode:mode withDeleteBlock:^{
[_dataArray removeObjectAtIndex:indexPath.row];
[_supplierTableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
} withChangeBlock:^(SupplierMode *aMode) {
[_dataArray replaceObjectAtIndex:indexPath.row withObject:aMode];
[_supplierTableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}];
[self.navigationController pushViewController:vc animated:YES];
if (_selectBlock)
{
_selectBlock(mode);
[self.navigationController popViewControllerAnimated:YES];
}
else
{
SupplierDetailViewController *vc = [[SupplierDetailViewController alloc] initWithSupplierMode:mode withDeleteBlock:^{
[_dataArray removeObjectAtIndex:indexPath.row];
[_supplierTableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
} withChangeBlock:^(SupplierMode *aMode) {
[_dataArray replaceObjectAtIndex:indexPath.row withObject:aMode];
[_supplierTableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}];
[self.navigationController pushViewController:vc animated:YES];
}
}

- (void)didReceiveMemoryWarning {
Expand Down
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_0.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_0.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_1.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_1.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_2.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_2.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_3.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_3.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_4.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_4.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_5.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_5.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_6.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_6.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/sp_7.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sp_7.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2afab90

Please sign in to comment.