Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
张杰
xffruit
Commits
1fb47ad6
Commit
1fb47ad6
authored
May 08, 2017
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加仓库新增的iswms 和 isproductcenter字段的数据库兼容。2.第一次进入选择仓库界面不显示仓库bug
parent
8867d7d6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
63 deletions
+78
-63
ICRAppDelegate.m
XFFruit/AppDelegate/ICRAppDelegate.m
+1
-1
ICRDataBaseController.h
...it/Controllers/DataBaseController/ICRDataBaseController.h
+4
-0
ICRDataBaseController.m
...it/Controllers/DataBaseController/ICRDataBaseController.m
+19
-0
ICRAppMacro.h
XFFruit/Macro/ICRAppMacro.h
+40
-41
ChooseWarehouseViewController.m
...lers/ChooseViewController/ChooseWarehouseViewController.m
+3
-1
ICRLoginViewController.m
XFFruit/ViewControllers/Login/ICRLoginViewController.m
+8
-20
Warehouse.h
XFFruit/ViewControllers/Purchase/Models/Warehouse.h
+3
-0
No files found.
XFFruit/AppDelegate/ICRAppDelegate.m
View file @
1fb47ad6
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
self
.
window
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
window
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
window
makeKeyWindow
];
[
self
.
window
makeKeyWindow
];
[[
ICRDataBaseController
sharedController
]
compatibilityCheck
];
[
NSURLProtocol
registerClass
:[
ICRURLProtocol
class
]];
[
NSURLProtocol
registerClass
:[
ICRURLProtocol
class
]];
NSString
*
path
=
[
NSSearchPathForDirectoriesInDomains
(
NSDocumentationDirectory
,
NSUserDomainMask
,
YES
)
lastObject
];
NSString
*
path
=
[
NSSearchPathForDirectoriesInDomains
(
NSDocumentationDirectory
,
NSUserDomainMask
,
YES
)
lastObject
];
CLog
(
@"%@"
,
path
);
CLog
(
@"%@"
,
path
);
...
...
XFFruit/Controllers/DataBaseController/ICRDataBaseController.h
View file @
1fb47ad6
...
@@ -47,6 +47,10 @@ typedef void(^ICRDatabaseFetchResultsBlock)(NSArray *fetchedObjects);
...
@@ -47,6 +47,10 @@ typedef void(^ICRDatabaseFetchResultsBlock)(NSArray *fetchedObjects);
handleData
:(
void
(
^
)(
id
<
IBTDatabaseObject
>
))
handleDataBlock
handleData
:(
void
(
^
)(
id
<
IBTDatabaseObject
>
))
handleDataBlock
complete
:(
void
(
^
)(
void
))
complete
complete
:(
void
(
^
)(
void
))
complete
fail
:(
void
(
^
)(
NSError
*
))
fail
;
fail
:(
void
(
^
)(
NSError
*
))
fail
;
/**
* 兼容性校验,对于后来增加的字段进行校验,没有的话进行对应操作。应该在APP初始化的时候就调用
*/
-
(
void
)
compatibilityCheck
;
#pragma mark - Query
#pragma mark - Query
-
(
void
)
runFetchForClass
:(
Class
<
IBTDatabaseObject
>
)
dbObjClass
-
(
void
)
runFetchForClass
:(
Class
<
IBTDatabaseObject
>
)
dbObjClass
...
...
XFFruit/Controllers/DataBaseController/ICRDataBaseController.m
View file @
1fb47ad6
...
@@ -325,4 +325,23 @@ static NSString *ICRDataBasePath = @"";
...
@@ -325,4 +325,23 @@ static NSString *ICRDataBasePath = @"";
return
[
arrObjs
count
]
>
0
?
arrObjs
:
nil
;
return
[
arrObjs
count
]
>
0
?
arrObjs
:
nil
;
}
}
-
(
void
)
compatibilityCheck
{
[
_m_dbQueue
inDatabase
:
^
(
FMDatabase
*
db
)
{
// [db open];
//2017-05-08仓库增加了iswms 和 isproductcenter两个字段
if
(
!
[
db
columnExists
:
@"iswms"
inTableWithName
:
@"Warehouse"
])
{
CLog
(
@"没有iswms 和 isproductcenter两个字段"
);
NSString
*
sql
=
@"DROP TABLE IF EXISTS 'Warehouse'"
;
[
db
executeUpdate
:
sql
];
NSString
*
addTable
=
[
Warehouse
SQLForCreateTable
];
[
db
executeUpdate
:
addTable
];
}
// [db close];
}];
}
@end
@end
XFFruit/Macro/ICRAppMacro.h
View file @
1fb47ad6
...
@@ -10,70 +10,69 @@
...
@@ -10,70 +10,69 @@
#define XFFruit_ICRAppMacro_h
#define XFFruit_ICRAppMacro_h
// COLOR
// COLOR
#define ICR_TINTCOLOR [UIColor colorWithR:63 g:134 b:244 a:1] //蓝色
#define ICR_TINTCOLOR [UIColor colorWithR:63 g:134 b:244 a:1] //蓝色
#define ICR_VIEW_BG_COLOR [UIColor whiteColor]
#define ICR_VIEW_BG_COLOR [UIColor whiteColor]
#define ICR_BLUE_BTN_COLOR ICR_TINTCOLOR
#define ICR_BLUE_BTN_COLOR ICR_TINTCOLOR
#define ICR_GRAY_BTN_COLOR [UIColor lightGrayColor]
#define ICR_GRAY_BTN_COLOR [UIColor lightGrayColor]
#define ICR_ORANGE_BTN_COLOR [UIColor colorWithR:250 g:155 b:52 a:1]
#define ICR_ORANGE_BTN_COLOR [UIColor colorWithR:250 g:155 b:52 a:1]
#define ICR_DISABLE_BTN_COLOR [UIColor colorWithW:202 a:1]
#define ICR_DISABLE_BTN_COLOR [UIColor colorWithW:202 a:1]
#define ICR_NAVIBAR_ITEM_COLOR [UIColor whiteColor]
#define ICR_NAVIBAR_ITEM_COLOR [UIColor whiteColor]
#define ICR_NAVIBAR_ITEM_DISABLE_COLOR [UIColor colorWithW:1 a:.5f]
#define ICR_NAVIBAR_ITEM_DISABLE_COLOR [UIColor colorWithW:1 a:.5f]
#define ICR_NAVIBAR_TITLE_COLOR [UIColor whiteColor]
#define ICR_NAVIBAR_TITLE_COLOR [UIColor whiteColor]
#define ICR_TABBAR_TINT_COLOR [UIColor colorWithR:36 g:38 b:53 a:1]
#define ICR_TABBAR_TINT_COLOR [UIColor colorWithR:36 g:38 b:53 a:1]
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
#ifdef Demonstrate
#ifdef Demonstrate
//********演示环境*********
//********演示环境*********
#define HTTP_REST_API_BASE_URL @"http://jdcg.demo.hd123.cn:7080/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL \
#define HTTP_REST_REPORT_BASE_URL @"http://jdcg.demo.hd123.cn:7080"
@"http://jdcg.demo.hd123.cn:7080/cruiser-server/rest"
#define HTTP_REST_REPORT_BASE_URL @"http://jdcg.demo.hd123.cn:7080"
#else
#else
//********开发环境********
//********开发环境********
//
#define HTTP_REST_API_BASE_URL @"http://gomoredev:8090/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://gomoredev:8090/cruiser-server/rest"
//********测试环境********
//********测试环境********
#define HTTP_REST_API_BASE_URL
@"http://122.224.171.126:7280/cruiser-server/rest"
//#define HTTP_REST_API_BASE_URL
@"http://122.224.171.126:7280/cruiser-server/rest"
////********正式环境*********
//********正式环境*********
//#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
//#define HTTP_REST_API_BASE_URL
#define HTTP_REST_REPORT_BASE_URL @"http://122.224.171.126:7380"
//@"http://122.224.171.126:7380/cruiser-server/rest"
#define HTTP_REST_REPORT_BASE_URL @"http://122.224.171.126:7380"
#endif
#endif
// HTTP
// HTTP
//#define HTTP_REST_API_BASE_URL @"http://115.28.191.44:8080/IPatrol/rest"
//#define HTTP_REST_API_BASE_URL @"http://115.28.191.44:8080/IPatrol/rest"
//10月23 122.224.171.126:7280
// 10月23 122.224.171.126:7280
//#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:8281/XFFruit-server/rest"
//#define HTTP_REST_API_BASE_URL
//@"http://218.244.151.129:8281/XFFruit-server/rest"
#import "ICRUtilsMacro.h"
#import "Accounttitle.h"
#import "ICRVendorMacro.h"
#import "GXFProductUnit.h"
#import "ICRHTTPController.h"
#import "ICRUserUtil.h"
#import "ICRAppViewControllerManager.h"
#import "ICRAppViewControllerManager.h"
#import "ICRDataBaseController.h"
#import "ICRDataBaseController.h"
#import "ICRHTTPController.h"
#import "ICRUserUtil.h"
#import "ICRUtilsMacro.h"
#import "ICRVendorMacro.h"
#import "JavenImages.h"
#import "NSData+EncodeAdditions.h"
#import "NSData+EncodeAdditions.h"
#import "UIScrollView+Content.h"
#import "Product.h"
#import "Product.h"
#import "UIScrollView+Content.h"
#import "User.h"
#import "User.h"
#import "
GXFProductUnit
.h"
#import "
UserWarehouse
.h"
#import "Vendor.h"
#import "Vendor.h"
#import "Warehouse.h"
#import "Warehouse.h"
#import "Accounttitle.h"
#import "UserWarehouse.h"
#import "JavenImages.h"
// Avatar
//Avatar
//颜色
//颜色
#define
GXF_LABLE_TINT_COLOR
HexColor(@"444444")
#define
GXF_LABLE_TINT_COLOR
HexColor(@"444444")
#define
GXF_LABLE_BG_COLOR
XXFBgColor
#define
GXF_LABLE_BG_COLOR
XXFBgColor
#define
GXF_GREEN_COLOR HexColor(@"50bd62")
#define GXF_GREEN_COLOR HexColor(@"50bd62")
#define
GXF_ORIGIN_COLOR HexColor(@"f69100")
#define GXF_ORIGIN_COLOR HexColor(@"f69100")
#define
GXF_GRAY_COLOR
HexColor(@"444444")
#define
GXF_GRAY_COLOR
HexColor(@"444444")
//字体大小
//字体大小
#define GXF_LABLE_FONT FontSize(15)
#define GXF_LABLE_FONT FontSize(15)
// 高度
// 高度
#define NavigationBarHeight 64
#define NavigationBarHeight 64
...
...
XFFruit/ViewControllers/ChooseViewController/ChooseWarehouseViewController.m
View file @
1fb47ad6
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
// [self fetchDataList:@"" tableStr:GXF_BASECLASS_WAREHOUSE];
// [self fetchDataList:@"" tableStr:GXF_BASECLASS_WAREHOUSE];
self
.
currentPage
=
0
;
self
.
currentPage
=
0
;
[
self
getUserWareHouseFromServer
:
self
.
startDate
];
[
self
getUserWareHouseFromServer
:
self
.
startDate
];
}
else
{
}
else
{
self
.
currentPage
++
;
self
.
currentPage
++
;
...
@@ -88,7 +89,8 @@
...
@@ -88,7 +89,8 @@
if
(
pageCount
<=
self
.
currentPage
)
{
if
(
pageCount
<=
self
.
currentPage
)
{
[
self
endRefreshing
];
[
self
endRefreshing
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
self
fetchDataList
:
@""
tableStr
:
GXF_BASECLASS_UserWAREHOUSE
];
[
self
fetchDataList
:
@""
tableStr
:
GXF_BASECLASS_WAREHOUSE
];
}
else
{
}
else
{
self
.
currentPage
++
;
self
.
currentPage
++
;
[
self
getUserWareHouseFromServer
:
self
.
startDate
];
[
self
getUserWareHouseFromServer
:
self
.
startDate
];
...
...
XFFruit/ViewControllers/Login/ICRLoginViewController.m
View file @
1fb47ad6
...
@@ -91,26 +91,6 @@
...
@@ -91,26 +91,6 @@
[
self
.
view
addSubview
:
_m_containerView
];
[
self
.
view
addSubview
:
_m_containerView
];
//#if DEBUG
// self.m_containerView.m_cCodeTextF.text = @"A93jie957lK";
// self.m_containerView.m_userNameTextF.text = @"kevin";
// self.m_containerView.m_passwordTextF.text = @"aaa";
//@"http://218.244.151.129:7580/cruiser-server/rest"
self
.
m_containerView
.
m_cCodeTextF
.
text
=
@"211534962"
;
self
.
m_containerView
.
m_userNameTextF
.
text
=
@"admin"
;
self
.
m_containerView
.
m_passwordTextF
.
text
=
@"thoradmin"
;
//@"http://122.224.171.126:7280/cruiser-server/rest"
// self.m_containerView.m_cCodeTextF.text = @"923";
// self.m_containerView.m_userNameTextF.text = @"admin";
// self.m_containerView.m_passwordTextF.text = @"thoradmin";
//现场正式环境登陆
// self.m_containerView.m_cCodeTextF.text = @"211534968";
// self.m_containerView.m_userNameTextF.text = @"admin";
// self.m_containerView.m_passwordTextF.text = @"thoradmin";
ICRUserUtil
*
userU
=
[
ICRUserUtil
sharedInstance
];
ICRUserUtil
*
userU
=
[
ICRUserUtil
sharedInstance
];
self
.
m_containerView
.
m_cCodeTextF
.
text
=
userU
.
registerCode
;
//*registerCode; //企业认证码
self
.
m_containerView
.
m_cCodeTextF
.
text
=
userU
.
registerCode
;
//*registerCode; //企业认证码
...
@@ -120,6 +100,14 @@
...
@@ -120,6 +100,14 @@
}
else
{
}
else
{
self
.
m_containerView
.
m_passwordTextF
.
text
=
userU
.
password
;
self
.
m_containerView
.
m_passwordTextF
.
text
=
userU
.
password
;
}
}
#ifdef DEBUG
self
.
m_containerView
.
m_cCodeTextF
.
text
=
@"211534962"
;
self
.
m_containerView
.
m_userNameTextF
.
text
=
@"admin"
;
self
.
m_containerView
.
m_passwordTextF
.
text
=
@"thoradmin"
;
#else
#endif
[
self
.
m_containerView
checkLoginEnable
];
[
self
.
m_containerView
checkLoginEnable
];
...
...
XFFruit/ViewControllers/Purchase/Models/Warehouse.h
View file @
1fb47ad6
...
@@ -19,4 +19,7 @@
...
@@ -19,4 +19,7 @@
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_time
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_time
;
//20170508z增加是否wms仓和是否产品中心仓的判断字段
@property
(
nonatomic
,
assign
)
BOOL
iswms
;
@property
(
nonatomic
,
assign
)
BOOL
isProductCenter
;
@end
@end
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