Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
万
万科
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
张杰
万科
Commits
4f433e78
Commit
4f433e78
authored
Apr 27, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本1.2.1
parent
bb781be6
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
183 additions
and
161 deletions
+183
-161
Info.plist
vanke/Info.plist
+2
-2
VankeConfig.h
vanke/VankeConfig.h
+2
-2
VankeAffairsBoard_iPhone.m
.../view_iPhone/templates/affairs/VankeAffairsBoard_iPhone.m
+1
-1
ChooseProjectTableViewController.m
.../salesInput/Controller/ChooseProjectTableViewController.m
+0
-6
ChooseShopViewController.m
...emplates/salesInput/Controller/ChooseShopViewController.m
+8
-2
HistoryViewController.m
...e/templates/salesInput/Controller/HistoryViewController.m
+89
-79
SalesInputViewController.m
...emplates/salesInput/Controller/SalesInputViewController.m
+75
-67
SalesInputCommitView.m
...w_iPhone/templates/salesInput/View/SalesInputCommitView.m
+4
-0
SalesInputTotalView.xib
..._iPhone/templates/salesInput/View/SalesInputTotalView.xib
+2
-2
No files found.
vanke/Info.plist
View file @
4f433e78
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.
0.1
1
<
/string
>
<
string
>
1.
2.
1
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
04
<
/string
>
<
string
>
1
.2.1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
tru
e
/
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
...
...
vanke/VankeConfig.h
View file @
4f433e78
...
@@ -22,10 +22,10 @@
...
@@ -22,10 +22,10 @@
#define VANKE_BAIDU_WEATHER_SERVER_URL @"http://api.map.baidu.com/telematics/v3/weather"
#define VANKE_BAIDU_WEATHER_SERVER_URL @"http://api.map.baidu.com/telematics/v3/weather"
// 后台服务基准地址
// 后台服务基准地址
//
#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest"
#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest"
// 测试环境
// 测试环境
#define VANKE_SERVER_BASE_URL @"http://218.244.151.129:7580/wanke-server/rest"
//
#define VANKE_SERVER_BASE_URL @"http://218.244.151.129:7580/wanke-server/rest"
//#define VANKE_SERVER_BASE_URL @"http://139.196.39.77:8080/wanke-server/rest"
//#define VANKE_SERVER_BASE_URL @"http://139.196.39.77:8080/wanke-server/rest"
...
...
vanke/view_iPhone/templates/affairs/VankeAffairsBoard_iPhone.m
View file @
4f433e78
...
@@ -133,7 +133,7 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) {
...
@@ -133,7 +133,7 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) {
SalesInputViewController
*
salesVC
=
[[
SalesInputViewController
alloc
]
init
];
SalesInputViewController
*
salesVC
=
[[
SalesInputViewController
alloc
]
init
];
WS
(
weakSelf
)
WS
(
weakSelf
)
if
([[
model
getAuthOrgs
]
count
]
==
1
)
{
if
([[
model
getAuthOrgs
]
count
]
>
1
)
{
ChooseProjectTableViewController
*
chooseVC
=
[[
ChooseProjectTableViewController
alloc
]
init
];
ChooseProjectTableViewController
*
chooseVC
=
[[
ChooseProjectTableViewController
alloc
]
init
];
chooseVC
.
arrAuthorized
=
[
model
getAuthOrgs
];
chooseVC
.
arrAuthorized
=
[
model
getAuthOrgs
];
...
...
vanke/view_iPhone/templates/salesInput/Controller/ChooseProjectTableViewController.m
View file @
4f433e78
...
@@ -32,11 +32,6 @@
...
@@ -32,11 +32,6 @@
[[
UINavigationBar
appearance
]
setBarTintColor
:[
UIColor
colorWithRed
:
0
.
953
green
:
0
.
439
blue
:
0
.
063
alpha
:
1
.
000
]];
[[
UINavigationBar
appearance
]
setBarTintColor
:[
UIColor
colorWithRed
:
0
.
953
green
:
0
.
439
blue
:
0
.
063
alpha
:
1
.
000
]];
UIBarButtonItem
*
rightButton
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"取消"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
cancellACtion
)];
UIBarButtonItem
*
rightButton
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"取消"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
cancellACtion
)];
self
.
navigationItem
.
rightBarButtonItem
=
rightButton
;
self
.
navigationItem
.
rightBarButtonItem
=
rightButton
;
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
[
self
.
tableView
registerClass
:[
UITableViewCell
class
]
forCellReuseIdentifier
:
kCellID
];
[
self
.
tableView
registerClass
:[
UITableViewCell
class
]
forCellReuseIdentifier
:
kCellID
];
}
}
...
@@ -66,7 +61,6 @@
...
@@ -66,7 +61,6 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellID
forIndexPath
:
indexPath
];
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellID
forIndexPath
:
indexPath
];
cell
.
textLabel
.
text
=
[
self
.
arrAuthorized
[
indexPath
.
row
]
name
];
cell
.
textLabel
.
text
=
[
self
.
arrAuthorized
[
indexPath
.
row
]
name
];
// Configure the cell...
return
cell
;
return
cell
;
}
}
...
...
vanke/view_iPhone/templates/salesInput/Controller/ChooseShopViewController.m
View file @
4f433e78
...
@@ -18,11 +18,16 @@
...
@@ -18,11 +18,16 @@
@property
(
nonatomic
,
copy
)
NSString
*
searchText
;
@property
(
nonatomic
,
copy
)
NSString
*
searchText
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrData
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrData
;
@property
(
nonatomic
,
strong
)
NSArray
*
results
;
@property
(
nonatomic
,
strong
)
NSArray
*
results
;
@property
(
nonatomic
,
strong
)
VankeShopModel
*
shop
;
@property
(
nonatomic
,
assign
)
BOOL
isChoose
;
@end
@end
@implementation
ChooseShopViewController
@implementation
ChooseShopViewController
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
self
.
arrData
=
[
LoginShopsInstance
shareInstance
].
arrShops
;
self
.
arrData
=
[
LoginShopsInstance
shareInstance
].
arrShops
;
self
.
results
=
[
NSArray
arrayWithArray
:
self
.
arrData
];
self
.
results
=
[
NSArray
arrayWithArray
:
self
.
arrData
];
...
@@ -53,7 +58,7 @@
...
@@ -53,7 +58,7 @@
-
(
void
)
searchBar
:
(
UISearchBar
*
)
searchBar
textDidChange
:
(
NSString
*
)
searchText
{
-
(
void
)
searchBar
:
(
UISearchBar
*
)
searchBar
textDidChange
:
(
NSString
*
)
searchText
{
self
.
searchText
=
searchText
;
self
.
searchText
=
searchText
;
NSPredicate
*
pred
=
[
NSPredicate
predicateWithFormat
:
@"name contains [cd] %@
"
,
searchText
];
NSPredicate
*
pred
=
[
NSPredicate
predicateWithFormat
:
@"name contains [cd] %@
OR code contains [cd] %@"
,
searchText
,
searchText
];
self
.
results
=
[
self
.
arrData
filteredArrayUsingPredicate
:
pred
];
self
.
results
=
[
self
.
arrData
filteredArrayUsingPredicate
:
pred
];
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
NSLog
(
@"df"
);
NSLog
(
@"df"
);
...
@@ -103,8 +108,9 @@
...
@@ -103,8 +108,9 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellId
forIndexPath
:
indexPath
];
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellId
forIndexPath
:
indexPath
];
VankeShopModel
*
shop
=
self
.
results
[
indexPath
.
row
];
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@
"
,
[
self
.
results
[
indexPath
.
row
]
name
]
];
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@
【%@】"
,
shop
.
name
,
shop
.
code
];
return
cell
;
return
cell
;
}
}
...
...
vanke/view_iPhone/templates/salesInput/Controller/HistoryViewController.m
View file @
4f433e78
...
@@ -54,7 +54,13 @@
...
@@ -54,7 +54,13 @@
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
self
.
topView
.
labelShopName
.
text
=
self
.
shop
.
name
;
self
.
topView
.
labelShopName
.
text
=
[
NSString
stringWithFormat
:
@"%@【%@】"
,
self
.
shop
.
name
,
self
.
shop
.
code
];
if
(
self
.
shop
==
nil
)
{
self
.
topView
.
labelShopName
.
text
=
@""
;
}
else
{
self
.
topView
.
labelShopName
.
text
=
[
NSString
stringWithFormat
:
@"%@【%@】"
,
self
.
shop
.
name
,
self
.
shop
.
code
];
}
}
}
-
(
void
)
setUPScrollView
{
-
(
void
)
setUPScrollView
{
...
@@ -167,7 +173,7 @@
...
@@ -167,7 +173,7 @@
-
(
void
)
setUpDatePicker
{
-
(
void
)
setUpDatePicker
{
UIDatePicker
*
startDatePicker
=
[[
UIDatePicker
alloc
]
init
];
UIDatePicker
*
startDatePicker
=
[[
UIDatePicker
alloc
]
init
];
startDatePicker
.
date
=
[
NSDate
date
WithTimeInterval
:
-
60
*
60
*
24
sinceDate
:[
NSDate
date
]
];
startDatePicker
.
date
=
[
NSDate
date
];
startDatePicker
.
tag
=
1100
;
startDatePicker
.
tag
=
1100
;
startDatePicker
.
datePickerMode
=
UIDatePickerModeDate
;
startDatePicker
.
datePickerMode
=
UIDatePickerModeDate
;
[
startDatePicker
addTarget
:
self
action
:
@selector
(
oneDatePickerValueChanged
:
)
forControlEvents
:
UIControlEventValueChanged
];
[
startDatePicker
addTarget
:
self
action
:
@selector
(
oneDatePickerValueChanged
:
)
forControlEvents
:
UIControlEventValueChanged
];
...
@@ -229,6 +235,9 @@
...
@@ -229,6 +235,9 @@
}
}
-
(
void
)
setUpData
{
-
(
void
)
setUpData
{
if
(
self
.
shop
==
nil
)
{
}
else
{
WS
(
weakSelf
)
WS
(
weakSelf
)
...
@@ -241,7 +250,7 @@
...
@@ -241,7 +250,7 @@
NSDictionary
*
params
=
@{
@"shopCodeEquals"
:
self
.
shop
.
code
,
NSDictionary
*
params
=
@{
@"shopCodeEquals"
:
self
.
shop
.
code
,
@"beginDateEquals"
:
self
.
topView
.
startDate
.
text
,
@"beginDateEquals"
:
self
.
topView
.
startDate
.
text
,
@"endDateEquals"
:
endStr
,
@"endDateEquals"
:
self
.
topView
.
endDate
.
text
,
@"pageNumber"
:
@0
,
@"pageNumber"
:
@0
,
@"pageSize"
:
@0
};
@"pageSize"
:
@0
};
...
@@ -318,6 +327,7 @@
...
@@ -318,6 +327,7 @@
}
failure
:^
(
id
data
)
{
}
failure
:^
(
id
data
)
{
}];
}];
}
}
}
...
...
vanke/view_iPhone/templates/salesInput/Controller/SalesInputViewController.m
View file @
4f433e78
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#define kCellCount 20
#define kCellCount 20
#define kCellID @"SalesInputTableViewCell.h"
#define kCellID @"SalesInputTableViewCell.h"
@interface
SalesInputViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
SalesInputViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
SalesInputTopView
*
topView
;
@property
(
nonatomic
,
strong
)
SalesInputTopView
*
topView
;
@property
(
nonatomic
,
strong
)
UIDatePicker
*
datePicker
;
@property
(
nonatomic
,
strong
)
UIDatePicker
*
datePicker
;
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
cellDataDic
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
cellDataDic
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrPaymentType
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrPaymentType
;
@property
(
nonatomic
,
strong
)
SalesInputCommitView
*
submitView
;
@property
(
nonatomic
,
strong
)
SalesInputCommitView
*
submitView
;
@property
(
nonatomic
,
copy
)
NSString
*
todayTotalAmount
;
@end
@end
@implementation
SalesInputViewController
@implementation
SalesInputViewController
...
@@ -43,12 +45,17 @@
...
@@ -43,12 +45,17 @@
self
.
cellDataDic
=
[
NSMutableDictionary
dictionary
];
self
.
cellDataDic
=
[
NSMutableDictionary
dictionary
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
if
([
LoginShopsInstance
shareInstance
].
arrShops
.
count
>
0
)
{
self
.
shop
=
[
LoginShopsInstance
shareInstance
].
arrShops
[
0
];
}
[
self
setUpNavigationBar
];
[
self
setUpNavigationBar
];
[
self
setUpTopView
];
[
self
setUpTopView
];
[
self
setUpTableView
];
[
self
setUpTableView
];
[
self
setUpTotalView
];
[
self
setUpTotalView
];
[
self
setUpCommitView
];
[
self
setUpCommitView
];
[
self
setUpData
];
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
}
}
...
@@ -64,34 +71,18 @@
...
@@ -64,34 +71,18 @@
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
[[
VankeAppBoard_iPhone
sharedInstance
]
hideMenu
];
[[
VankeAppBoard_iPhone
sharedInstance
]
hideMenu
];
if
([
LoginShopsInstance
shareInstance
].
arrShops
.
count
>
1
&&
self
.
shop
==
nil
)
{
if
([
LoginShopsInstance
shareInstance
].
arrShops
.
count
==
1
){
[
self
chooseShopAction
];
}
else
if
([
LoginShopsInstance
shareInstance
].
arrShops
.
count
==
1
){
self
.
topView
.
buttonName
.
userInteractionEnabled
=
NO
;
self
.
topView
.
buttonName
.
userInteractionEnabled
=
NO
;
self
.
shop
=
[
LoginShopsInstance
shareInstance
].
arrShops
[
0
];
[
self
setUpData
];
}
}
[
self
.
topView
setShopName
:
self
.
shop
.
name
];
if
([[
VankeCommonModel
sharedInstance
]
curUserIsStore
])
{
if
(
self
.
shop
==
nil
)
{
NSLog
(
@"store"
);
[
self
.
topView
setShopName
:
@""
];
self
.
authorizedOrg
=
[[
VankeCommonModel
sharedInstance
]
getAuthOrgs
][
0
];
}
else
{
}
else
if
(
self
.
authorizedOrg
==
nil
){
[
self
.
topView
setShopName
:[
NSString
stringWithFormat
:
@"%@【%@】"
,
self
.
shop
.
name
,
self
.
shop
.
code
]];
}
// ChooseProjectTableViewController *chooseVC = [[ChooseProjectTableViewController alloc] init];
[
self
getTodayTotalAmount
];
// chooseVC.arrAuthorized = [[VankeCommonModel sharedInstance] getAuthOrgs];
// [self.navigationController addChildViewController:chooseVC];
//
// UIView *chooseView = chooseVC.view;
// chooseView.frame = CGRectMake(20, 50, SCREEN_WIDTH - 40, SCREEN_HEIGHT - 100);
//
// [self.view addSubview:chooseView];
}
}
}
...
@@ -154,6 +145,7 @@ ON_WILL_APPEAR( signal )
...
@@ -154,6 +145,7 @@ ON_WILL_APPEAR( signal )
topView
.
frame
=
CGRectMake
(
0
,
0
,
SCREEN_WIDTH
,
125
+
64
);
topView
.
frame
=
CGRectMake
(
0
,
0
,
SCREEN_WIDTH
,
125
+
64
);
self
.
topView
=
topView
;
self
.
topView
=
topView
;
topView
.
textfieldDate
.
inputView
=
self
.
datePicker
;
topView
.
textfieldDate
.
inputView
=
self
.
datePicker
;
topView
.
textfieldDate
.
delegate
=
self
;
NSDateFormatter
*
df
=
[[
NSDateFormatter
alloc
]
init
];
NSDateFormatter
*
df
=
[[
NSDateFormatter
alloc
]
init
];
[
df
setDateFormat
:
@"yyyy-MM-dd"
];
[
df
setDateFormat
:
@"yyyy-MM-dd"
];
...
@@ -171,6 +163,10 @@ ON_WILL_APPEAR( signal )
...
@@ -171,6 +163,10 @@ ON_WILL_APPEAR( signal )
}
}
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
{
[
self
getTodayTotalAmount
];
}
-
(
void
)
setUpTotalView
{
-
(
void
)
setUpTotalView
{
self
.
totalView
=
[
self
viewWithNibName
:
@"SalesInputTotalView"
];
self
.
totalView
=
[
self
viewWithNibName
:
@"SalesInputTotalView"
];
...
@@ -212,34 +208,43 @@ ON_WILL_APPEAR( signal )
...
@@ -212,34 +208,43 @@ ON_WILL_APPEAR( signal )
}
}
-
(
void
)
getTodayTotalAmount
{
-
(
void
)
getTodayTotalAmount
{
WS
(
weakSelf
)
if
(
self
.
shop
==
nil
)
{
NSDateFormatter
*
f
=
[[
NSDateFormatter
alloc
]
init
];
[
f
setDateFormat
:
@"yyyy-MM-dd"
];
}
else
{
// NSDate *endDate = [f dateFromString:self.topView.endDate.text];
NSDate
*
today
=
[
NSDate
date
];
NSString
*
startStr
=
[
f
stringFromDate
:
today
];
NSDate
*
tomorrow
=
[
NSDate
dateWithTimeInterval
:
60
*
60
*
24
sinceDate
:[
NSDate
date
]];
[
self
.
cellDataDic
removeAllObjects
];
NSString
*
endStr
=
[
f
stringFromDate
:
tomorrow
];
[
self
.
tableView
reloadData
];
WS
(
weakSelf
)
NSDictionary
*
params
=
@{
@"shopCodeEquals"
:
self
.
shop
.
code
,
NSDictionary
*
params
=
@{
@"shopCodeEquals"
:
self
.
shop
.
code
,
@"beginDateEquals"
:
startStr
,
@"beginDateEquals"
:
self
.
topView
.
textfieldDate
.
text
,
@"endDateEquals"
:
endStr
,
@"endDateEquals"
:
self
.
topView
.
textfieldDate
.
text
,
@"pageNumber"
:
@0
,
@"pageNumber"
:
@0
,
@"pageSize"
:
@0
};
@"pageSize"
:
@0
};
ICRHTTPController
*
httpCtrl
=
[
ICRHTTPController
sharedController
];
ICRHTTPController
*
httpCtrl
=
[
ICRHTTPController
sharedController
];
[
httpCtrl
getUrl
:
@"salesinput/query"
params
:
params
success
:^
(
id
data
)
{
[
httpCtrl
getUrl
:
@"salesinput/query"
params
:
params
success
:^
(
id
data
)
{
if
([
data
[
@"data"
][
@"records"
]
count
]
>
0
)
{
NSNumber
*
amount
=
data
[
@"data"
][
@"records"
][
0
][
@"amount"
];
NSNumber
*
amount
=
data
[
@"data"
][
@"records"
][
0
][
@"amount"
];
NSString
*
amountStr
=
[
NSString
stringWithFormat
:
@"%.0f"
,
[
amount
floatValue
]];
NSString
*
amountStr
=
[
NSString
stringWithFormat
:
@"%.0f"
,
[
amount
floatValue
]];
weakSelf
.
todayTotalAmount
=
amountStr
;
weakSelf
.
totalView
.
labelTotalAmount
.
text
=
amountStr
;
weakSelf
.
totalView
.
labelTotalAmount
.
text
=
amountStr
;
}
else
{
weakSelf
.
todayTotalAmount
=
@"0"
;
weakSelf
.
totalView
.
labelTotalAmount
.
text
=
@"0"
;
}
[
weakSelf
countTotalMonney
];
NSLog
(
@"d"
);
NSLog
(
@"d"
);
}
failure
:^
(
id
data
)
{
}
failure
:^
(
id
data
)
{
}];
}];
}
}
}
...
@@ -262,16 +267,15 @@ ON_WILL_APPEAR( signal )
...
@@ -262,16 +267,15 @@ ON_WILL_APPEAR( signal )
CGFloat
monney
=
[
array
[
0
]
floatValue
];
CGFloat
monney
=
[
array
[
0
]
floatValue
];
count
=
count
+
monney
;
count
=
count
+
monney
;
}
}
self
.
totalView
.
labelTotal
.
text
=
[
NSString
stringWithFormat
:
@"%.0f"
,
count
];
self
.
totalView
.
labelTotal
.
text
=
[
NSString
stringWithFormat
:
@"%.0f"
,
count
];
self
.
totalView
.
labelTotalAmount
.
text
=
[
NSString
stringWithFormat
:
@"%.0f"
,
count
+
[
self
.
totalView
.
labelTotalAmount
.
text
floatValue
]];
self
.
totalView
.
labelTotalAmount
.
text
=
[
NSString
stringWithFormat
:
@"%.0f"
,
count
+
[
self
.
todayTotalAmount
floatValue
]];
}
}
-
(
id
)
viewWithNibName
:
(
NSString
*
)
viewName
{
-
(
id
)
viewWithNibName
:
(
NSString
*
)
viewName
{
NSArray
*
nibView
=
[[
NSBundle
mainBundle
]
loadNibNamed
:
viewName
owner
:
nil
options
:
nil
];
NSArray
*
nibView
=
[[
NSBundle
mainBundle
]
loadNibNamed
:
viewName
owner
:
nil
options
:
nil
];
return
[
nibView
objectAtIndex
:
0
];
return
[
nibView
objectAtIndex
:
0
];
...
@@ -316,7 +320,9 @@ ON_WILL_APPEAR( signal )
...
@@ -316,7 +320,9 @@ ON_WILL_APPEAR( signal )
}
}
-
(
void
)
submit
{
-
(
void
)
submit
{
if
(
self
.
shop
==
nil
)
{
}
else
{
ICRHTTPController
*
httpCtrl
=
[
ICRHTTPController
sharedController
];
ICRHTTPController
*
httpCtrl
=
[
ICRHTTPController
sharedController
];
NSDictionary
*
params
=
[
self
getParams
];
NSDictionary
*
params
=
[
self
getParams
];
...
@@ -331,6 +337,8 @@ ON_WILL_APPEAR( signal )
...
@@ -331,6 +337,8 @@ ON_WILL_APPEAR( signal )
}
failure
:^
(
id
data
)
{
}
failure
:^
(
id
data
)
{
}];
}];
}
}
}
...
...
vanke/view_iPhone/templates/salesInput/View/SalesInputCommitView.m
View file @
4f433e78
...
@@ -10,6 +10,10 @@
...
@@ -10,6 +10,10 @@
@implementation
SalesInputCommitView
@implementation
SalesInputCommitView
-
(
void
)
awakeFromNib
{
self
.
buttonCommit
.
layer
.
cornerRadius
=
8
;
}
/*
/*
// 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.
...
...
vanke/view_iPhone/templates/salesInput/View/SalesInputTotalView.xib
View file @
4f433e78
...
@@ -57,8 +57,8 @@
...
@@ -57,8 +57,8 @@
<constraint
firstItem=
"qWe-Q2-slF"
firstAttribute=
"leading"
secondItem=
"kPx-jb-maY"
secondAttribute=
"leading"
constant=
"10"
id=
"tXQ-lW-a71"
/>
<constraint
firstItem=
"qWe-Q2-slF"
firstAttribute=
"leading"
secondItem=
"kPx-jb-maY"
secondAttribute=
"leading"
constant=
"10"
id=
"tXQ-lW-a71"
/>
</constraints>
</constraints>
</view>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
misplaced=
"YES"
text=
"
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"S1O-1V-wvJ"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"0
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"S1O-1V-wvJ"
>
<rect
key=
"frame"
x=
"
334"
y=
"50"
width=
"0.0"
height=
"0.0
"
/>
<rect
key=
"frame"
x=
"
274"
y=
"50"
width=
"18"
height=
"34
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"28"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"28"
/>
<color
key=
"textColor"
red=
"0.92941176470588238"
green=
"0.10588235294117647"
blue=
"0.13725490196078433"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.92941176470588238"
green=
"0.10588235294117647"
blue=
"0.13725490196078433"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
...
...
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