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
f8f1d4dc
Commit
f8f1d4dc
authored
Nov 05, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取数据
parent
5e8b2a95
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
124 additions
and
53 deletions
+124
-53
ICRAppDelegate.m
XFFruit/AppDelegate/ICRAppDelegate.m
+3
-3
ICRDataBaseController.m
...it/Controllers/DataBaseController/ICRDataBaseController.m
+1
-1
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+2
-1
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+3
-2
ChooseParentViewController.h
...l/Classes/BaseViewController/ChooseParentViewController.h
+2
-0
ChooseParentViewController.m
...l/Classes/BaseViewController/ChooseParentViewController.m
+16
-4
ICRAppMacro.h
XFFruit/Macro/ICRAppMacro.h
+3
-3
ChooseProductViewController.m
...ollers/ChooseViewController/ChooseProductViewController.m
+51
-8
GXFProductUnit.h
XFFruit/ViewControllers/GXFCommon/GXFProductUnit.h
+2
-2
GXFSearchVendorViewController.m
...llers/GXFCommon/GXFSelect/GXFSearchVendorViewController.m
+1
-1
ICRLoginViewController.m
XFFruit/ViewControllers/Login/ICRLoginViewController.m
+10
-6
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+1
-1
Vendor.h
XFFruit/ViewControllers/Purchase/Models/Vendor.h
+6
-0
Warehouse.h
XFFruit/ViewControllers/Purchase/Models/Warehouse.h
+6
-0
ProductBillCell.m
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
+0
-10
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+7
-7
User.h
XFFruit/ViewControllers/Survey/Views/User.h
+2
-2
Product.h
XFFruit/ViewControllers/Survey/models/Product.h
+2
-2
Accounttitle.h
XFFruit/ViewControllers/Transport/Models/Accounttitle.h
+6
-0
No files found.
XFFruit/AppDelegate/ICRAppDelegate.m
View file @
f8f1d4dc
...
...
@@ -124,9 +124,9 @@
if
(
comResult
==
NSOrderedAscending
)
{
if
(
self
.
severForceUpdate
)
{
//强制更新
UIAlertView
*
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"去下载"
,
nil
];
alertV
.
tag
=
1001
;
[
alertV
show
];
//
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: @"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil];
//
alertV.tag = 1001;
//
[alertV show];
}
else
{
UIAlertView
*
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
@"下次再说"
otherButtonTitles
:
@"去下载"
,
nil
];
//
...
...
XFFruit/Controllers/DataBaseController/ICRDataBaseController.m
View file @
f8f1d4dc
...
...
@@ -177,7 +177,7 @@ static NSString *ICRDataBasePath = @"";
}
CLog
(
@"%@"
,
sql
);
[
db
executeUpdate
:
sql
withArgumentsInArray
:
arrIDs
];
//
[db executeUpdate:sql withArgumentsInArray:arrIDs];
}
@autoreleasepool
{
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
f8f1d4dc
...
...
@@ -217,7 +217,8 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
//1.下载商品信息
-
(
void
)
getProductWithPage_number
:(
NSUInteger
)
page_number
-
(
void
)
getProductWithStartDate
:(
NSString
*
)
startDate
Page_number
:(
NSUInteger
)
page_number
page_size
:(
NSUInteger
)
page_size
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
f8f1d4dc
...
...
@@ -1518,7 +1518,8 @@ acceptTypeJson:YES
}
//商品
-
(
void
)
getProductWithPage_number
:
(
NSUInteger
)
page_number
-
(
void
)
getProductWithStartDate
:
(
NSString
*
)
startDate
Page_number
:
(
NSUInteger
)
page_number
page_size
:
(
NSUInteger
)
page_size
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
...
...
@@ -1555,7 +1556,7 @@ acceptTypeJson:YES
}
};
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_GetProduct
]
stringByAppendingFormat
:
@"?start_date=%@&page_number=%@&page_size=%@"
,
@"2015-05-04"
,
@
(
page_number
),
@
(
page_size
)];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_GetProduct
]
stringByAppendingFormat
:
@"?start_date=%@&page_number=%@&page_size=%@"
,
startDate
,
@
(
page_number
),
@
(
page_size
)];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
parameters
:
NULL
...
...
XFFruit/General/Classes/BaseViewController/ChooseParentViewController.h
View file @
f8f1d4dc
...
...
@@ -27,6 +27,8 @@ typedef void(^ChoseBaseInfo)(NSArray *baseInfos);
@property
(
nonatomic
,
copy
)
ChoseBaseInfo
choseBaseInfo
;
@property
(
nonatomic
,
assign
)
BOOL
isFirst
;
@property
(
nonatomic
,
strong
)
NSString
*
selectStr
;
@property
(
nonatomic
,
assign
)
NSInteger
currentPage
;
-
(
void
)
endRefreshing
;
-
(
void
)
getBaseDataFromServer
;
...
...
XFFruit/General/Classes/BaseViewController/ChooseParentViewController.m
View file @
f8f1d4dc
...
...
@@ -72,10 +72,15 @@
return
;
}
self
.
isRefresh
=
YES
;
[
self
getBaseDataFromServer
];
self
.
currentPage
=
0
;
[
self
getLastModifiedTime
];
}];
}
-
(
void
)
getLastModifiedTime
{
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
...
...
@@ -142,8 +147,7 @@
}
#pragma mark - 按钮事件
-
(
void
)
boxValueChanged
:
(
NSNotification
*
)
fication
{
// NSString *tilkeStr = [IBTCommon trimmingCharacters:self.selectTextFiled.text];
// [self fetchDataList:tilkeStr];
}
-
(
void
)
tableViewRefresh
:
(
NSString
*
)
titltstr
{
self
.
currentIndexPath
=
nil
;
...
...
@@ -197,7 +201,12 @@
self
.
isFirst
=
NO
;
[
GXF_NSUSERFEFTAULTS
setObject
:[
NSDate
date
]
forKey
:
self
.
tableView
.
header
.
lastUpdatedTimeKey
];
[
GXF_NSUSERFEFTAULTS
synchronize
];
[
self
getBaseDataFromServer
];
if
([
tableStr
isEqualToString
:
GXF_BASECLASS_PRODUCT
])
{
NSString
*
befortDate
=
@"2014-01-01"
;
[
self
getBaseDataFromServerWithStartDate
:
befortDate
];
}
else
{
[
self
getBaseDataFromServer
];
}
}
else
{
[
strongSelf
.
dataArr
removeAllObjects
];
if
(
!
self
.
tableView
.
header
.
lastUpdatedTime
)
{
...
...
@@ -241,6 +250,9 @@
-
(
void
)
getBaseDataFromServer
{
}
-
(
void
)
getBaseDataFromServerWithStartDate
:
(
NSString
*
)
startDate
{
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
XFFruit/Macro/ICRAppMacro.h
View file @
f8f1d4dc
...
...
@@ -23,13 +23,13 @@
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
//阿里云内部测试环境
//
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/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 @"http://122.224.171.126:7380/cruiser-server/rest"
// HTTP
...
...
XFFruit/ViewControllers/ChooseViewController/ChooseProductViewController.m
View file @
f8f1d4dc
...
...
@@ -10,33 +10,76 @@
#define TopMargin 50
#define TableHeight 50
@interface
ChooseProductViewController
()
{
}
@property
(
nonatomic
,
strong
)
NSString
*
startDate
;
@end
@implementation
ChooseProductViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
currentPage
=
0
;
self
.
tableStr
=
GXF_BASECLASS_PRODUCT
;
//记录更新时间
self
.
tableView
.
header
.
lastUpdatedTimeKey
=
ChooseProductUpdateDate
;
self
.
title
=
@"选择商品"
;
[
self
fetchDataList
:
@""
tableStr
:
GXF_BASECLASS_PRODUCT
];
}
-
(
void
)
getBaseDataFromServer
{
-
(
void
)
getBaseDataFromServerWithStartDate
:
(
NSString
*
)
startDate
{
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
[
strongSelf
endRefreshing
];
[
strongSelf
fetchDataList
:
@""
tableStr
:
GXF_BASECLASS_PRODUCT
];
//请求成功之后
strongSelf
.
startDate
=
startDate
;
[
strongSelf
getLastDateFromServer
:
data
];
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
[
self
endRefreshing
];
};
if
(
self
.
currentPage
==
0
)
{
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
}
[[
ICRHTTPController
sharedController
]
getProductWithStartDate
:
startDate
Page_number
:
self
.
currentPage
page_size
:
100
success
:
succ
failure
:
fail
];
}
-
(
void
)
getLastDateFromServer
:
(
id
)
data
{
if
(
data
)
{
NSDictionary
*
pageDict
=
data
[
@"data"
][
@"paging"
];
NSInteger
pageCount
=
[
pageDict
[
@"pageCount"
]
integerValue
];
if
(
pageCount
<=
self
.
currentPage
)
{
[
self
endRefreshing
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
self
fetchDataList
:
@""
tableStr
:
GXF_BASECLASS_PRODUCT
];
}
else
{
self
.
currentPage
++
;
[
self
getBaseDataFromServerWithStartDate
:
self
.
startDate
];
}
}
}
-
(
void
)
getLastModifiedTime
{
ICRDatabaseFetchBlock
fetchBlk
=
^
FMResultSet
*
(
FMDatabase
*
db
)
{
NSString
*
sql
=
[
NSString
stringWithFormat
:
@"select * from %@ order by lastModify_time desc limit 1"
,
GXF_BASECLASS_PRODUCT
];
return
[
db
executeQuery
:
sql
];
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[[
ICRHTTPController
sharedController
]
getProductWithPage_number
:
0
page_size
:
1000
success
:
succ
failure
:
fail
];
__weak
typeof
(
self
)
weakSelf
=
self
;
ICRDatabaseFetchResultsBlock
fetchResultsBlk
=
^
(
NSArray
*
fetchedObjects
)
{
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
fetchedObjects
.
count
>
0
)
{
Product
*
product
=
fetchedObjects
[
0
];
[
strongSelf
getBaseDataFromServerWithStartDate
:
product
.
lastModify_time
];
}
};
ICRDataBaseController
*
dbCtrl
=
[
ICRDataBaseController
sharedController
];
[
dbCtrl
runFetchForClass
:
NSClassFromString
(
GXF_BASECLASS_PRODUCT
)
fetchBlock
:
fetchBlk
fetchResultsBlock
:
fetchResultsBlk
];
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"MaskCell"
;
MaskCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
...
...
XFFruit/ViewControllers/GXFCommon/GXFProductUnit.h
View file @
f8f1d4dc
...
...
@@ -12,10 +12,10 @@
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
copy
)
NSString
*
name
;
//名称
@property
(
nonatomic
,
assign
)
BOOL
enabled
;
//是否启用
@property
(
nonatomic
,
strong
)
NS
Date
*
create_time
;
//创建时间
@property
(
nonatomic
,
strong
)
NS
String
*
create_time
;
//创建时间
@property
(
nonatomic
,
copy
)
NSString
*
create_id
;
//创建人代码
@property
(
nonatomic
,
copy
)
NSString
*
crete_operName
;
//创建人名称
@property
(
nonatomic
,
strong
)
NS
Date
*
lastModified_time
;
//最后修改时间
@property
(
nonatomic
,
strong
)
NS
String
*
lastModified_time
;
//最后修改时间
@property
(
nonatomic
,
copy
)
NSString
*
lastModified_id
;
//最后修改人代码
@property
(
nonatomic
,
copy
)
NSString
*
lastModified_operName
;
//最后修改人名称
@property
(
nonatomic
,
assign
)
NSInteger
priority
;
//新增字段优先级
...
...
XFFruit/ViewControllers/GXFCommon/GXFSelect/GXFSearchVendorViewController.m
View file @
f8f1d4dc
...
...
@@ -86,7 +86,7 @@
NSInteger
pageSize
=
100
;
//判断选择
if
([
self
.
title
isEqualToString
:[
IBTCommon
localizableString
:
@"ProductTitle"
]])
{
[[
ICRHTTPController
sharedController
]
getProductWithPage_number
:
0
page_size
:
100
success
:
succ
failure
:
fail
];
[[
ICRHTTPController
sharedController
]
getProductWith
StartDate
:
@"2014-01-01"
Page_number
:
0
page_size
:
100
success
:
succ
failure
:
fail
];
}
else
if
([
self
.
title
isEqualToString
:[
IBTCommon
localizableString
:
@"VendorTitle"
]])
{
[[
ICRHTTPController
sharedController
]
getVendorWithPage_number
:
0
page_size
:
100
success
:
succ
failure
:
fail
];
...
...
XFFruit/ViewControllers/Login/ICRLoginViewController.m
View file @
f8f1d4dc
...
...
@@ -100,18 +100,22 @@
// 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";
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 = @"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";
[
self
.
m_containerView
checkLoginEnable
];
#else
...
...
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
f8f1d4dc
...
...
@@ -161,7 +161,7 @@ typedef enum : NSUInteger {
for
(
PurchaseBillProduct
*
billProduct
in
purchaseProduct
)
{
totalPrice
+=
[
billProduct
.
total
floatValue
];
}
_purchaseView
.
purchasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
totalPrice
+
otherPrice
];
_purchaseView
.
purchasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
totalPrice
+
otherPrice
];
_purchaseView
.
chargePurchase
=
[
NSNumber
numberWithFloat
:
otherPrice
];
_purchaseView
.
total
=
[
NSNumber
numberWithFloat
:
totalPrice
+
otherPrice
];
}
...
...
XFFruit/ViewControllers/Purchase/Models/Vendor.h
View file @
f8f1d4dc
...
...
@@ -13,6 +13,12 @@
@property
(
nonatomic
,
strong
)
NSString
*
code
;
//代码
@property
(
nonatomic
,
strong
)
NSString
*
name
;
//名称
@property
(
nonatomic
,
assign
)
BOOL
enabled
;
//状态
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
create_time
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_time
;
@end
XFFruit/ViewControllers/Purchase/Models/Warehouse.h
View file @
f8f1d4dc
...
...
@@ -13,4 +13,10 @@
@property
(
nonatomic
,
strong
)
NSString
*
code
;
//代码
@property
(
nonatomic
,
strong
)
NSString
*
name
;
//名称
@property
(
nonatomic
,
assign
)
BOOL
enabled
;
//状态
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
create_time
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_time
;
@end
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
View file @
f8f1d4dc
...
...
@@ -47,18 +47,15 @@
self
.
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftWidth
,
0
,
headWidth
,
TableHeight
))];
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
titleLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
titleLabel
.
text
=
@"苹果桃子"
;
self
.
titleLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
priceLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
titleLabel
.
frame
)
+
SpaceMargin
,
0
,
headWidth
,
TableHeight
))];
self
.
priceLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
priceLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
priceLabel
.
text
=
@"80"
;
self
.
priceLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
countLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
priceLabel
.
frame
)
+
SpaceMargin
,
0
,
headWidth
,
TableHeight
))];
self
.
countLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
countLabel
.
text
=
@"200"
;
self
.
countLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
countLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
...
...
@@ -79,43 +76,36 @@
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
seqLabel
.
frame
),
CGRectGetMaxY
(
self
.
showNameLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showStandLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showStandLabel
.
text
=
@"包装规格:1*12斤"
;
self
.
showStandLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showCountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showNameLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showCountLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showCountLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showCountLabel
.
text
=
@"包装数量:10000"
;
self
.
showCountLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showBaseCountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showStandLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showBaseCountLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showBaseCountLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showBaseCountLabel
.
text
=
@"基础数量:300"
;
self
.
showBaseCountLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showPriceLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showCountLabel
.
frame
),
CGRectGetMaxY
(
self
.
showStandLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showPriceLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showPriceLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showPriceLabel
.
text
=
@"包装单价:11元"
;
self
.
showPriceLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showBasePriceLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showBaseCountLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showBasePriceLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showBasePriceLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showBasePriceLabel
.
text
=
@"基础单价:1000"
;
self
.
showBasePriceLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showTotalLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showCountLabel
.
frame
),
CGRectGetMaxY
(
self
.
showBaseCountLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showTotalLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showTotalLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showTotalLabel
.
text
=
@"总金额:100"
;
self
.
showTotalLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showNoteLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showBasePriceLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showNoteLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showNoteLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showNoteLabel
.
text
=
@"备注:1000"
;
self
.
showNoteLabel
.
font
=
GXF_THREETEENTH_SIZE
;
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
f8f1d4dc
...
...
@@ -134,7 +134,7 @@ typedef enum : NSUInteger {
}
//总金额
if
([
self
.
shopDetail
.
totalMoney
floatValue
]
<=
0
)
{
totalMoney
.
text
=
@"0.00
"
;
totalMoney
.
text
=
@"0.00
00"
;
}
else
{
totalMoney
.
text
=
self
.
shopDetail
.
totalMoney
;
}
...
...
@@ -481,10 +481,10 @@ typedef enum : NSUInteger {
if
(
foundationUnitPrice
.
text
.
length
>
0
)
{
if
(
foundationQuantity
.
text
.
length
>
0
)
{
float
totalPrice
=
[
foundationUnitPrice
.
text
floatValue
]
*
[
foundationQuantity
.
text
floatValue
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
totalPrice
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
totalPrice
];
if
(
packageQuantity
.
text
.
length
>
0
&&
[
packageQuantity
.
text
integerValue
]
>
0
)
{
float
packagePrice
=
totalPrice
/
[
packageQuantity
.
text
floatValue
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
packagePrice
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
packagePrice
];
}
}
}
...
...
@@ -494,10 +494,10 @@ typedef enum : NSUInteger {
if
(
packageUnitPrice
.
text
.
length
>
0
)
{
if
(
packageQuantity
.
text
.
length
>
0
)
{
float
totalPrice
=
[
packageUnitPrice
.
text
floatValue
]
*
[
packageQuantity
.
text
floatValue
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
totalPrice
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
totalPrice
];
if
(
foundationQuantity
.
text
.
length
>
0
&&
[
foundationQuantity
.
text
integerValue
]
>
0
)
{
float
packagePrice
=
totalPrice
/
[
foundationQuantity
.
text
floatValue
];
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
packagePrice
];
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
packagePrice
];
}
}
}
...
...
@@ -507,11 +507,11 @@ typedef enum : NSUInteger {
if
(
totalMoney
.
text
.
length
>
0
)
{
if
(
packageQuantity
.
text
.
length
>
0
&&
[
packageQuantity
.
text
floatValue
]
>
0
)
{
float
packagePrice
=
[
totalMoney
.
text
floatValue
]
/
[
packageQuantity
.
text
floatValue
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
packagePrice
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
packagePrice
];
}
if
(
foundationQuantity
.
text
.
length
>
0
&&
[
foundationQuantity
.
text
floatValue
]
>
0
)
{
float
packagePrice
=
[
totalMoney
.
text
floatValue
]
/
[
foundationQuantity
.
text
floatValue
];
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
packagePrice
];
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
packagePrice
];
}
}
}
...
...
XFFruit/ViewControllers/Survey/Views/User.h
View file @
f8f1d4dc
...
...
@@ -11,10 +11,10 @@
@interface
User
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
version
;
//版本号
@property
(
nonatomic
,
strong
)
NS
Date
*
create_time
;
//创建时间
@property
(
nonatomic
,
strong
)
NS
String
*
create_time
;
//创建时间
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
//创建人代码
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
//创建人名称
@property
(
nonatomic
,
strong
)
NS
Date
*
lastModify_time
;
//最后修改时间
@property
(
nonatomic
,
strong
)
NS
String
*
lastModify_time
;
//最后修改时间
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
//最后修改人代码
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
//最后修改人名称
@property
(
nonatomic
,
strong
)
NSArray
*
company
;
//所属公司
...
...
XFFruit/ViewControllers/Survey/models/Product.h
View file @
f8f1d4dc
...
...
@@ -21,10 +21,10 @@
@property
(
nonatomic
,
strong
)
NSString
*
isNew
;
//是否新品
@property
(
nonatomic
,
strong
)
NSString
*
categoryUuid
;
//所属商品类别
@property
(
nonatomic
,
strong
)
NSString
*
image
;
//图片相对路径
@property
(
nonatomic
,
strong
)
NS
Date
*
create_time
;
//创建时间
@property
(
nonatomic
,
strong
)
NS
String
*
create_time
;
//创建时间
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
//创建人代码
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
//创建人名称
@property
(
nonatomic
,
strong
)
NS
Date
*
lastModify_time
;
//最后修改时间
@property
(
nonatomic
,
strong
)
NS
String
*
lastModify_time
;
//最后修改时间
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
//最后修改人代码
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
//最后修改人名称
@property
(
nonatomic
,
assign
)
NSInteger
enabled
;
//是否启用
...
...
XFFruit/ViewControllers/Transport/Models/Accounttitle.h
View file @
f8f1d4dc
...
...
@@ -12,4 +12,10 @@
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
name
;
//名称
@property
(
nonatomic
,
assign
)
BOOL
enabled
;
//是否启用
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
create_time
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_time
;
@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