Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
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
张杰
红星美凯龙管理在线APP IOS
Commits
1e87f045
Commit
1e87f045
authored
Dec 24, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善在线抽查
parent
22ef2cab
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
145 additions
and
33 deletions
+145
-33
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+2
-2
OnLineViewController.m
...on/OnLine/AddOnLine/ViewController/OnLineViewController.m
+125
-10
OnLineResultDetailCell.h
...ion/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.h
+1
-0
OnLineResultDetailCell.m
...ion/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.m
+3
-3
OnLineResultViewController.m
...kOnLineResult/ViewController/OnLineResultViewController.m
+1
-1
OnLineCompleteViewController.m
...askComplete/ViewController/OnLineCompleteViewController.m
+4
-8
SpotCheckOnLineViewController.m
...heckOnLine/ViewController/SpotCheckOnLineViewController.m
+4
-4
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+5
-5
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
1e87f045
No preview for this file type
redstar/Classes/Macro/Url.h
View file @
1e87f045
...
...
@@ -10,10 +10,10 @@
#define Url_h
// url 测试环境
//
#define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://218.244.151.129:7580/"
// 正式环境
#define kRedStarURL @"http://219.235.234.225:7580/"
//
#define kRedStarURL @"http://219.235.234.225:7580/"
// 检查更新
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/ViewController/OnLineViewController.m
View file @
1e87f045
...
...
@@ -22,6 +22,11 @@
@property
(
nonatomic
,
strong
)
NSMutableArray
*
uuidArray
;
@property
(
nonatomic
,
strong
)
OnLineFooterView
*
footView
;
@property
(
nonatomic
,
strong
)
NSString
*
storeName
;
@property
(
nonatomic
,
strong
)
NSString
*
dateStr
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
@property
(
nonatomic
,
strong
)
UIView
*
pickBackView
;
@property
(
nonatomic
,
strong
)
UIDatePicker
*
datePicker
;
@end
@implementation
OnLineViewController
...
...
@@ -50,6 +55,7 @@
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
_storeName
=
@"全部"
;
_dateStr
=
@""
;
}
-
(
void
)
doBack
:
(
id
)
sender
...
...
@@ -75,6 +81,20 @@
-
(
void
)
saveClick
:
(
UIButton
*
)
sender
{
if
(
_dateStr
.
length
==
0
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"请选择截止时间!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
}
if
(
self
.
footView
.
titleTextView
.
text
.
length
==
0
||
self
.
footView
.
contentTextView
.
text
.
length
==
0
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"任务标题和任务内容不能为空!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
}
// 提示框
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您确定要下达新的抽查任务吗?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
334281
;
...
...
@@ -82,6 +102,31 @@
[
alert
show
];
}
-
(
void
)
closeBackGroundView
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_backGroundView
.
alpha
=
.
0
f
;
_pickBackView
.
alpha
=
0
.
0
f
;
}
completion
:^
(
BOOL
finished
)
{
[
_backGroundView
removeFromSuperview
];
[
_datePicker
removeFromSuperview
];
[
_pickBackView
removeFromSuperview
];
_backGroundView
=
nil
;
_datePicker
=
nil
;
_pickBackView
=
nil
;
}];
}
-
(
void
)
okClick
:
(
UIButton
*
)
sender
{
NSDate
*
select
=
[
_datePicker
date
];
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"yyyy-MM-dd"
];
_dateStr
=
[
dateFormatter
stringFromDate
:
select
];
[
self
closeBackGroundView
];
[
self
.
tableView
reloadData
];
}
#pragma mark - SelectStoreDelegate
-
(
void
)
deliverWithArray
:
(
NSMutableArray
*
)
array
{
...
...
@@ -103,6 +148,7 @@
if
(
alertView
.
tag
==
334281
)
{
if
(
buttonIndex
==
1
)
{
NSDate
*
date
=
[
NSDate
date
];
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"YYYY-MM-dd hh:mm:ss"
];
...
...
@@ -117,24 +163,35 @@
NSLog
(
@"发起抽查url = %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"title"
:
self
.
footView
.
titleTextView
.
text
,
NSDictionary
*
parameters
=
@{
@"title"
:
self
.
footView
.
titleTextView
.
text
,
@"content"
:
self
.
footView
.
contentTextView
.
text
,
@"endDate"
:
dateString
,
@"endDate"
:
_dateStr
,
@"state"
:
@"initial"
,
@"stores"
:
_uuidArray
};
@"stores"
:
_uuidArray
};
NSLog
(
@"发起抽查par = %@"
,
parameters
);
[
httpClient
saveSportCheckWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"发起抽查 response = %@"
,
response
);
NSLog
(
@"发起抽查 error = %@"
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"下达任务成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
334285
;
[
alert
show
];
}
}];
}
}
if
(
alertView
.
tag
==
334285
)
{
if
(
buttonIndex
==
0
)
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}
}
#pragma mark - TableView Delegate/DateSource
...
...
@@ -153,7 +210,13 @@
}
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_titleArray
[
indexPath
.
row
]];
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
if
(
indexPath
.
row
==
0
)
{
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_storeName
];
}
else
{
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_dateStr
];
}
return
cell
;
...
...
@@ -167,12 +230,64 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
0
)
{
SelectStoreViewController
*
select
=
[[
SelectStoreViewController
alloc
]
init
];
select
.
delegate
=
self
;
[
self
.
navigationController
pushViewController
:
select
animated
:
YES
];
}
else
{
if
(
!
_backGroundView
)
{
_backGroundView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeBackGroundView
)];
[
_backGroundView
addGestureRecognizer
:
tapGR
];
}
if
(
!
_pickBackView
)
{
_pickBackView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
280
,
190
)];
_pickBackView
.
backgroundColor
=
[
UIColor
whiteColor
];
_pickBackView
.
center
=
CGPointMake
(
self
.
view
.
center
.
x
,
self
.
view
.
center
.
y
-
120
);
_pickBackView
.
alpha
=
0
.
0
;
UIButton
*
okButton
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
140
,
150
,
140
,
40
)];
[
okButton
setTitle
:
@"确定"
forState
:
UIControlStateNormal
];
okButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
[
okButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
[
okButton
addTarget
:
self
action
:
@selector
(
okClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_pickBackView
addSubview
:
okButton
];
UIButton
*
quitButton
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
150
,
140
,
40
)];
[
quitButton
setTitle
:
@"取消"
forState
:
UIControlStateNormal
];
quitButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
[
quitButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
[
quitButton
addTarget
:
self
action
:
@selector
(
closeBackGroundView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_pickBackView
addSubview
:
quitButton
];
}
if
(
!
_datePicker
)
{
_datePicker
=
[[
UIDatePicker
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
280
,
150
)];
_datePicker
.
datePickerMode
=
UIDatePickerModeDate
;
[
_pickBackView
addSubview
:
_datePicker
];
}
_backGroundView
.
alpha
=
0
;
_backGroundView
.
backgroundColor
=
[
UIColor
blackColor
];
[
self
.
view
insertSubview
:
_backGroundView
aboveSubview
:
_tableView
];
[
self
.
view
insertSubview
:
_pickBackView
aboveSubview
:
_backGroundView
];
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_backGroundView
.
alpha
=
0
.
6
;
_pickBackView
.
alpha
=
1
.
0
;
}];
}
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
{
if
(
!
_tableView
)
{
...
...
redstar/Classes/Module/Function/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.h
View file @
1e87f045
...
...
@@ -15,4 +15,5 @@
@property
(
nonatomic
,
strong
)
UILabel
*
addressLabel
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
showScrollView
;
// 轮播图
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
storePictures
:(
NSArray
*
)
storePictures
;
@end
redstar/Classes/Module/Function/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.m
View file @
1e87f045
...
...
@@ -11,16 +11,16 @@
#import <UIButton+WebCache.h>
@implementation
OnLineResultDetailCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
storePictures
:(
NSArray
*
)
storePictures
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
setupScrollView
];
[
self
setupScrollView
WithStorePictures
:
storePictures
];
}
return
self
;
}
-
(
void
)
setupScrollView
-
(
void
)
setupScrollView
WithStorePictures
:(
NSArray
*
)
storePictures
{
int
imageCount
=
4
;
...
...
redstar/Classes/Module/Function/OnLine/LookOnLineResult/ViewController/OnLineResultViewController.m
View file @
1e87f045
...
...
@@ -180,7 +180,7 @@
{
OnLineResultDetailCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kOnLineResultDetailCell
];
if
(
!
cell
)
{
cell
=
[[
OnLineResultDetailCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineResultDetailCell
];
cell
=
[[
OnLineResultDetailCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineResultDetailCell
storePictures
:
_storeDetail
.
storePictures
];
}
cell
.
contentView
.
backgroundColor
=
kResultTitleBackColor
;
cell
.
shopNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_storeDetail
.
store_name
];
...
...
redstar/Classes/Module/Function/OnLine/OnLineTaskComplete/ViewController/OnLineCompleteViewController.m
View file @
1e87f045
...
...
@@ -176,14 +176,10 @@
if
(
indexPath
.
section
==
0
)
{
return
;
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前功能正在开发!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
// OnLineResultViewController *onLineResult = [[OnLineResultViewController alloc] init];
// onLineResult.storeDetail = _allStoreArray[indexPath.row];
// onLineResult.checkUuid = self.uuid;
// [self.navigationController pushViewController:onLineResult animated:YES];
OnLineResultViewController
*
onLineResult
=
[[
OnLineResultViewController
alloc
]
init
];
onLineResult
.
storeDetail
=
_allStoreArray
[
indexPath
.
row
];
onLineResult
.
checkUuid
=
self
.
uuid
;
[
self
.
navigationController
pushViewController
:
onLineResult
animated
:
YES
];
}
}
...
...
redstar/Classes/Module/Function/OnLine/SpotCheckOnLine/ViewController/SpotCheckOnLineViewController.m
View file @
1e87f045
...
...
@@ -193,10 +193,10 @@
-
(
void
)
addSpotCheckTaskClick
:
(
UIButton
*
)
sender
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前功能正在开发!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
//
OnLineViewController *onlineVC = [[OnLineViewController alloc] init];
//
[self.navigationController pushViewController:onlineVC animated:YES];
//
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"当前功能正在开发!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
//
[alert show];
OnLineViewController
*
onlineVC
=
[[
OnLineViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
onlineVC
animated
:
YES
];
}
-
(
void
)
dropCilck
:
(
MenuButton
*
)
sender
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
1e87f045
...
...
@@ -493,12 +493,12 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前功能正在开发!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
//
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"当前功能正在开发!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
//
[alert show];
//
return;
//
LookOnLineViewController *lookOnLine = [[LookOnLineViewController alloc] init];
//
nav = [[UINavigationController alloc] initWithRootViewController:lookOnLine];
LookOnLineViewController
*
lookOnLine
=
[[
LookOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
lookOnLine
];
// StandardViewController *standardVC = [[StandardViewController alloc] init];
...
...
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