Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
I
IFS-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
张杰
IFS-iOS
Commits
4441eae2
Commit
4441eae2
authored
Apr 19, 2018
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单详情界面的子工单列表只显示isEditable 为true的数据
parent
e7f11098
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
16354 additions
and
36 deletions
+16354
-36
project.pbxproj
IFS/IFS.xcodeproj/project.pbxproj
+48
-2
BaseTableViewPullController.swift
IFS/IFS/Expand/Base/BaseTableViewPullController.swift
+5
-1
Enums.swift
IFS/IFS/Expand/Const/Enums.swift
+2
-2
Urls.swift
IFS/IFS/Expand/Const/Urls.swift
+4
-4
RepairOrderDetailResultModel.swift
...ness/RepairOrder/Model/RepairOrderDetailResultModel.swift
+3
-1
RepairOrderDetailViewModel.swift
...ss/RepairOrder/ViewModel/RepairOrderDetailViewModel.swift
+16
-16
RepairOrderViewModel.swift
...Business/RepairOrder/ViewModel/RepairOrderViewModel.swift
+1
-1
HomeTableViewController.swift
IFS/IFS/Main/Home/Controller/HomeTableViewController.swift
+1
-1
IFS-Bridging-Header.h
IFS/IFS/Resource/IFS-Bridging-Header.h
+1
-1
Info.plist
IFS/IFS/Resource/Info.plist
+2
-2
YXAddressPickerView.h
IFS/IFS/Vender/YXPickerView/YXAddressPickerView.h
+26
-0
YXAddressPickerView.m
IFS/IFS/Vender/YXPickerView/YXAddressPickerView.m
+341
-0
city.json
IFS/IFS/Vender/YXPickerView/YXBundle.bundle/city.json
+15118
-0
YXCityModel.h
IFS/IFS/Vender/YXPickerView/YXCityModel.h
+30
-0
YXCityModel.m
IFS/IFS/Vender/YXPickerView/YXCityModel.m
+14
-0
YXDatePickerView.h
IFS/IFS/Vender/YXPickerView/YXDatePickerView.h
+29
-0
YXDatePickerView.m
IFS/IFS/Vender/YXPickerView/YXDatePickerView.m
+171
-0
YXGeneralPickerView.h
IFS/IFS/Vender/YXPickerView/YXGeneralPickerView.h
+27
-0
YXGeneralPickerView.m
IFS/IFS/Vender/YXPickerView/YXGeneralPickerView.m
+193
-0
YXPickerManager.h
IFS/IFS/Vender/YXPickerView/YXPickerManager.h
+57
-0
YXPickerManager.m
IFS/IFS/Vender/YXPickerView/YXPickerManager.m
+89
-0
YXToolbar.h
IFS/IFS/Vender/YXPickerView/YXToolbar.h
+70
-0
YXToolbar.m
IFS/IFS/Vender/YXPickerView/YXToolbar.m
+105
-0
Podfile
IFS/Podfile
+0
-1
Podfile.lock
IFS/Podfile.lock
+1
-4
No files found.
IFS/IFS.xcodeproj/project.pbxproj
View file @
4441eae2
...
@@ -18,6 +18,13 @@
...
@@ -18,6 +18,13 @@
294B8642201974930035BF32
/* PermissionsManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294B8641201974930035BF32
/* PermissionsManager.swift */
;
};
294B8642201974930035BF32
/* PermissionsManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294B8641201974930035BF32
/* PermissionsManager.swift */
;
};
294B8646201AECAD0035BF32
/* ProjectQueryModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294B8645201AECAC0035BF32
/* ProjectQueryModel.swift */
;
};
294B8646201AECAD0035BF32
/* ProjectQueryModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294B8645201AECAC0035BF32
/* ProjectQueryModel.swift */
;
};
294B8648201AF2DB0035BF32
/* ProjectResultModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294B8647201AF2DB0035BF32
/* ProjectResultModel.swift */
;
};
294B8648201AF2DB0035BF32
/* ProjectResultModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294B8647201AF2DB0035BF32
/* ProjectResultModel.swift */
;
};
294BE7FF2080431500F783F8
/* YXAddressPickerView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294BE7F32080431500F783F8
/* YXAddressPickerView.m */
;
};
294BE8002080431500F783F8
/* YXBundle.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294BE7F42080431500F783F8
/* YXBundle.bundle */
;
};
294BE8012080431500F783F8
/* YXCityModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294BE7F62080431500F783F8
/* YXCityModel.m */
;
};
294BE8022080431500F783F8
/* YXDatePickerView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294BE7F82080431500F783F8
/* YXDatePickerView.m */
;
};
294BE8032080431500F783F8
/* YXGeneralPickerView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294BE7FA2080431500F783F8
/* YXGeneralPickerView.m */
;
};
294BE8042080431500F783F8
/* YXPickerManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294BE7FC2080431500F783F8
/* YXPickerManager.m */
;
};
294BE8052080431500F783F8
/* YXToolbar.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294BE7FE2080431500F783F8
/* YXToolbar.m */
;
};
295064B7200C9E50008DC8DD
/* AttachmentReponseModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
295064B6200C9E4F008DC8DD
/* AttachmentReponseModel.swift */
;
};
295064B7200C9E50008DC8DD
/* AttachmentReponseModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
295064B6200C9E4F008DC8DD
/* AttachmentReponseModel.swift */
;
};
295064B9200CAA6B008DC8DD
/* AttachmentResultModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
295064B8200CAA6B008DC8DD
/* AttachmentResultModel.swift */
;
};
295064B9200CAA6B008DC8DD
/* AttachmentResultModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
295064B8200CAA6B008DC8DD
/* AttachmentResultModel.swift */
;
};
295064BB200CC7F5008DC8DD
/* ChildBillSaveOrUpdateModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
295064BA200CC7F5008DC8DD
/* ChildBillSaveOrUpdateModel.swift */
;
};
295064BB200CC7F5008DC8DD
/* ChildBillSaveOrUpdateModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
295064BA200CC7F5008DC8DD
/* ChildBillSaveOrUpdateModel.swift */
;
};
...
@@ -158,6 +165,19 @@
...
@@ -158,6 +165,19 @@
294B8641201974930035BF32
/* PermissionsManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PermissionsManager.swift
;
sourceTree
=
"<group>"
;
};
294B8641201974930035BF32
/* PermissionsManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PermissionsManager.swift
;
sourceTree
=
"<group>"
;
};
294B8645201AECAC0035BF32
/* ProjectQueryModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ProjectQueryModel.swift
;
sourceTree
=
"<group>"
;
};
294B8645201AECAC0035BF32
/* ProjectQueryModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ProjectQueryModel.swift
;
sourceTree
=
"<group>"
;
};
294B8647201AF2DB0035BF32
/* ProjectResultModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ProjectResultModel.swift
;
sourceTree
=
"<group>"
;
};
294B8647201AF2DB0035BF32
/* ProjectResultModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ProjectResultModel.swift
;
sourceTree
=
"<group>"
;
};
294BE7F22080431500F783F8
/* YXAddressPickerView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
YXAddressPickerView.h
;
sourceTree
=
"<group>"
;
};
294BE7F32080431500F783F8
/* YXAddressPickerView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
YXAddressPickerView.m
;
sourceTree
=
"<group>"
;
};
294BE7F42080431500F783F8
/* YXBundle.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
path
=
YXBundle.bundle
;
sourceTree
=
"<group>"
;
};
294BE7F52080431500F783F8
/* YXCityModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
YXCityModel.h
;
sourceTree
=
"<group>"
;
};
294BE7F62080431500F783F8
/* YXCityModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
YXCityModel.m
;
sourceTree
=
"<group>"
;
};
294BE7F72080431500F783F8
/* YXDatePickerView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
YXDatePickerView.h
;
sourceTree
=
"<group>"
;
};
294BE7F82080431500F783F8
/* YXDatePickerView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
YXDatePickerView.m
;
sourceTree
=
"<group>"
;
};
294BE7F92080431500F783F8
/* YXGeneralPickerView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
YXGeneralPickerView.h
;
sourceTree
=
"<group>"
;
};
294BE7FA2080431500F783F8
/* YXGeneralPickerView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
YXGeneralPickerView.m
;
sourceTree
=
"<group>"
;
};
294BE7FB2080431500F783F8
/* YXPickerManager.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
YXPickerManager.h
;
sourceTree
=
"<group>"
;
};
294BE7FC2080431500F783F8
/* YXPickerManager.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
YXPickerManager.m
;
sourceTree
=
"<group>"
;
};
294BE7FD2080431500F783F8
/* YXToolbar.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
YXToolbar.h
;
sourceTree
=
"<group>"
;
};
294BE7FE2080431500F783F8
/* YXToolbar.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
YXToolbar.m
;
sourceTree
=
"<group>"
;
};
295064B6200C9E4F008DC8DD
/* AttachmentReponseModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AttachmentReponseModel.swift
;
sourceTree
=
"<group>"
;
};
295064B6200C9E4F008DC8DD
/* AttachmentReponseModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AttachmentReponseModel.swift
;
sourceTree
=
"<group>"
;
};
295064B8200CAA6B008DC8DD
/* AttachmentResultModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AttachmentResultModel.swift
;
sourceTree
=
"<group>"
;
};
295064B8200CAA6B008DC8DD
/* AttachmentResultModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AttachmentResultModel.swift
;
sourceTree
=
"<group>"
;
};
295064BA200CC7F5008DC8DD
/* ChildBillSaveOrUpdateModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChildBillSaveOrUpdateModel.swift
;
sourceTree
=
"<group>"
;
};
295064BA200CC7F5008DC8DD
/* ChildBillSaveOrUpdateModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChildBillSaveOrUpdateModel.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -314,6 +334,26 @@
...
@@ -314,6 +334,26 @@
path
=
Permissions
;
path
=
Permissions
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
294BE7F12080431500F783F8
/* YXPickerView */
=
{
isa
=
PBXGroup
;
children
=
(
294BE7F22080431500F783F8
/* YXAddressPickerView.h */
,
294BE7F32080431500F783F8
/* YXAddressPickerView.m */
,
294BE7F42080431500F783F8
/* YXBundle.bundle */
,
294BE7F52080431500F783F8
/* YXCityModel.h */
,
294BE7F62080431500F783F8
/* YXCityModel.m */
,
294BE7F72080431500F783F8
/* YXDatePickerView.h */
,
294BE7F82080431500F783F8
/* YXDatePickerView.m */
,
294BE7F92080431500F783F8
/* YXGeneralPickerView.h */
,
294BE7FA2080431500F783F8
/* YXGeneralPickerView.m */
,
294BE7FB2080431500F783F8
/* YXPickerManager.h */
,
294BE7FC2080431500F783F8
/* YXPickerManager.m */
,
294BE7FD2080431500F783F8
/* YXToolbar.h */
,
294BE7FE2080431500F783F8
/* YXToolbar.m */
,
);
path
=
YXPickerView
;
sourceTree
=
"<group>"
;
};
296AAC951FFDF462008BE04C
/* SearchVc */
=
{
296AAC951FFDF462008BE04C
/* SearchVc */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -763,6 +803,7 @@
...
@@ -763,6 +803,7 @@
29EA0BC31FEA3156005A6170
/* Vender */
=
{
29EA0BC31FEA3156005A6170
/* Vender */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
294BE7F12080431500F783F8
/* YXPickerView */
,
29B0C6681FEA382F00FF37ED
/* MBProgressView */
,
29B0C6681FEA382F00FF37ED
/* MBProgressView */
,
);
);
path
=
Vender
;
path
=
Vender
;
...
@@ -1040,6 +1081,7 @@
...
@@ -1040,6 +1081,7 @@
29B0C66C1FEA3A7000FF37ED
/* LaunchScreen.storyboard in Resources */
,
29B0C66C1FEA3A7000FF37ED
/* LaunchScreen.storyboard in Resources */
,
296FE4581FFB7CED00810820
/* function.plist in Resources */
,
296FE4581FFB7CED00810820
/* function.plist in Resources */
,
29516A92200DEE9500C3A17E
/* RepairOrderAttachmentTableViewCell.xib in Resources */
,
29516A92200DEE9500C3A17E
/* RepairOrderAttachmentTableViewCell.xib in Resources */
,
294BE8002080431500F783F8
/* YXBundle.bundle in Resources */
,
29516A8A200DEC4400C3A17E
/* MaintainBeforAttachmentTableViewCell.xib in Resources */
,
29516A8A200DEC4400C3A17E
/* MaintainBeforAttachmentTableViewCell.xib in Resources */
,
29516A8E200DEC5A00C3A17E
/* MaintainAfterAttachmentTableViewCell.xib in Resources */
,
29516A8E200DEC5A00C3A17E
/* MaintainAfterAttachmentTableViewCell.xib in Resources */
,
29DA416A200334BC002762A2
/* RepairOrderSubOrderTableViewCell.xib in Resources */
,
29DA416A200334BC002762A2
/* RepairOrderSubOrderTableViewCell.xib in Resources */
,
...
@@ -1083,7 +1125,6 @@
...
@@ -1083,7 +1125,6 @@
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework"
,
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework"
,
"${BUILT_PRODUCTS_DIR}/YXAlertController/YXAlertController.framework"
,
"${BUILT_PRODUCTS_DIR}/YXAlertController/YXAlertController.framework"
,
"${BUILT_PRODUCTS_DIR}/YXKit/YXKit.framework"
,
"${BUILT_PRODUCTS_DIR}/YXKit/YXKit.framework"
,
"${BUILT_PRODUCTS_DIR}/YXPickerView/YXPickerView.framework"
,
);
);
name
=
"[CP] Embed Pods Frameworks"
;
name
=
"[CP] Embed Pods Frameworks"
;
outputPaths
=
(
outputPaths
=
(
...
@@ -1108,7 +1149,6 @@
...
@@ -1108,7 +1149,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YXAlertController.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YXAlertController.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YXKit.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YXKit.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YXPickerView.framework"
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellPath
=
/bin/sh
;
...
@@ -1184,12 +1224,15 @@
...
@@ -1184,12 +1224,15 @@
29B0C66A1FEA382F00FF37ED
/* MBProgressView.swift in Sources */
,
29B0C66A1FEA382F00FF37ED
/* MBProgressView.swift in Sources */
,
296DAD7E2006FBEB00615A2D
/* RepairOrderAddViewModel.swift in Sources */
,
296DAD7E2006FBEB00615A2D
/* RepairOrderAddViewModel.swift in Sources */
,
29EA0C0B1FEA3156005A6170
/* Public.swift in Sources */
,
29EA0C0B1FEA3156005A6170
/* Public.swift in Sources */
,
294BE8022080431500F783F8
/* YXDatePickerView.m in Sources */
,
294BE8042080431500F783F8
/* YXPickerManager.m in Sources */
,
29516A91200DEE9500C3A17E
/* RepairOrderAttachmentTableViewCell.swift in Sources */
,
29516A91200DEE9500C3A17E
/* RepairOrderAttachmentTableViewCell.swift in Sources */
,
296AAC9F1FFDF54A008BE04C
/* FilterTableViewCell.swift in Sources */
,
296AAC9F1FFDF54A008BE04C
/* FilterTableViewCell.swift in Sources */
,
29DA416C2003419A002762A2
/* RepairOrderDetailSuspendView.swift in Sources */
,
29DA416C2003419A002762A2
/* RepairOrderDetailSuspendView.swift in Sources */
,
29F6B8EE2007498A00EE4630
/* DeviceQueryModel.swift in Sources */
,
29F6B8EE2007498A00EE4630
/* DeviceQueryModel.swift in Sources */
,
296968062007142B0049B5CC
/* PublicFilterModel.swift in Sources */
,
296968062007142B0049B5CC
/* PublicFilterModel.swift in Sources */
,
29DA417A200367EF002762A2
/* RepairOrderEditSonOrderCompleteView.swift in Sources */
,
29DA417A200367EF002762A2
/* RepairOrderEditSonOrderCompleteView.swift in Sources */
,
294BE8032080431500F783F8
/* YXGeneralPickerView.m in Sources */
,
29CD9D9F20562CB200BB7C8D
/* TenantResultModel.swift in Sources */
,
29CD9D9F20562CB200BB7C8D
/* TenantResultModel.swift in Sources */
,
29D530931FFF715D00851F00
/* PhotoAttachmentViewModel.swift in Sources */
,
29D530931FFF715D00851F00
/* PhotoAttachmentViewModel.swift in Sources */
,
296DAD7C2006F63B00615A2D
/* ProjectSponsorsModel.swift in Sources */
,
296DAD7C2006F63B00615A2D
/* ProjectSponsorsModel.swift in Sources */
,
...
@@ -1211,6 +1254,7 @@
...
@@ -1211,6 +1254,7 @@
296DAD82200711CA00615A2D
/* InitiatorModel.swift in Sources */
,
296DAD82200711CA00615A2D
/* InitiatorModel.swift in Sources */
,
29EA0C011FEA3156005A6170
/* BaseColletionViewPullController.swift in Sources */
,
29EA0C011FEA3156005A6170
/* BaseColletionViewPullController.swift in Sources */
,
29D530801FFF626500851F00
/* RepairOrderViewController.swift in Sources */
,
29D530801FFF626500851F00
/* RepairOrderViewController.swift in Sources */
,
294BE7FF2080431500F783F8
/* YXAddressPickerView.m in Sources */
,
29D530911FFF6FA800851F00
/* PhotoAttachmentViewController.swift in Sources */
,
29D530911FFF6FA800851F00
/* PhotoAttachmentViewController.swift in Sources */
,
29DA41662003163D002762A2
/* RepairOrderDetailSectionView.swift in Sources */
,
29DA41662003163D002762A2
/* RepairOrderDetailSectionView.swift in Sources */
,
295064B7200C9E50008DC8DD
/* AttachmentReponseModel.swift in Sources */
,
295064B7200C9E50008DC8DD
/* AttachmentReponseModel.swift in Sources */
,
...
@@ -1236,8 +1280,10 @@
...
@@ -1236,8 +1280,10 @@
296FE44A1FFB5C9600810820
/* HomeContentViewController.swift in Sources */
,
296FE44A1FFB5C9600810820
/* HomeContentViewController.swift in Sources */
,
29D530861FFF628A00851F00
/* TodoViewController.swift in Sources */
,
29D530861FFF628A00851F00
/* TodoViewController.swift in Sources */
,
29EA0BFC1FEA3156005A6170
/* AppManager.swift in Sources */
,
29EA0BFC1FEA3156005A6170
/* AppManager.swift in Sources */
,
294BE8052080431500F783F8
/* YXToolbar.m in Sources */
,
29DA4180200373C3002762A2
/* LoginViewModel.swift in Sources */
,
29DA4180200373C3002762A2
/* LoginViewModel.swift in Sources */
,
29696808200728F50049B5CC
/* QueryModel.swift in Sources */
,
29696808200728F50049B5CC
/* QueryModel.swift in Sources */
,
294BE8012080431500F783F8
/* YXCityModel.m in Sources */
,
296FE44C1FFB5CAB00810820
/* HomeTableViewController.swift in Sources */
,
296FE44C1FFB5CAB00810820
/* HomeTableViewController.swift in Sources */
,
29EA0C131FEA3156005A6170
/* UIView+Extension.swift in Sources */
,
29EA0C131FEA3156005A6170
/* UIView+Extension.swift in Sources */
,
29D5308A1FFF635C00851F00
/* TodoViewModel.swift in Sources */
,
29D5308A1FFF635C00851F00
/* TodoViewModel.swift in Sources */
,
...
...
IFS/IFS/Expand/Base/BaseTableViewPullController.swift
View file @
4441eae2
...
@@ -99,7 +99,11 @@ class BaseTableViewPullController: BaseViewController {
...
@@ -99,7 +99,11 @@ class BaseTableViewPullController: BaseViewController {
tableView
.
reloadData
()
tableView
.
reloadData
()
if
tableView
.
isEmptyDataSetVisible
{
if
tableView
.
isEmptyDataSetVisible
{
tableView
.
reloadEmptyDataSet
()
tableView
.
reloadEmptyDataSet
()
}
}
tableView
.
mj_footer
.
isHidden
=
true
}
else
{
tableView
.
mj_footer
.
isHidden
=
false
}
}
// MARK: - 结束刷新切显示无更多的数据
// MARK: - 结束刷新切显示无更多的数据
func
endRefreshNomoreData
()
{
func
endRefreshNomoreData
()
{
...
...
IFS/IFS/Expand/Const/Enums.swift
View file @
4441eae2
...
@@ -148,7 +148,7 @@ public func repairOrderChineseState(_ state: String) ->String {
...
@@ -148,7 +148,7 @@ public func repairOrderChineseState(_ state: String) ->String {
case
SUBMIT_REPAIR_ORDER_STATE
.
CREATED
.
rawValue
:
case
SUBMIT_REPAIR_ORDER_STATE
.
CREATED
.
rawValue
:
return
"未发出"
return
"未发出"
case
SUBMIT_REPAIR_ORDER_STATE
.
SUBMIT
.
rawValue
:
case
SUBMIT_REPAIR_ORDER_STATE
.
SUBMIT
.
rawValue
:
return
"
已发出
"
return
"
未派单
"
case
SUBMIT_REPAIR_ORDER_STATE
.
PROCESSING
.
rawValue
:
case
SUBMIT_REPAIR_ORDER_STATE
.
PROCESSING
.
rawValue
:
return
"处理中"
return
"处理中"
case
SUBMIT_REPAIR_ORDER_STATE
.
FINISHED
.
rawValue
:
case
SUBMIT_REPAIR_ORDER_STATE
.
FINISHED
.
rawValue
:
...
@@ -177,7 +177,7 @@ public func repairOrderEnglishState(_ state: String) ->String {
...
@@ -177,7 +177,7 @@ public func repairOrderEnglishState(_ state: String) ->String {
switch
state
{
switch
state
{
case
"未发出"
:
case
"未发出"
:
return
SUBMIT_REPAIR_ORDER_STATE
.
CREATED
.
rawValue
return
SUBMIT_REPAIR_ORDER_STATE
.
CREATED
.
rawValue
case
"
已发出
"
:
case
"
未派单
"
:
return
SUBMIT_REPAIR_ORDER_STATE
.
SUBMIT
.
rawValue
return
SUBMIT_REPAIR_ORDER_STATE
.
SUBMIT
.
rawValue
case
"处理中"
:
case
"处理中"
:
return
SUBMIT_REPAIR_ORDER_STATE
.
PROCESSING
.
rawValue
return
SUBMIT_REPAIR_ORDER_STATE
.
PROCESSING
.
rawValue
...
...
IFS/IFS/Expand/Const/Urls.swift
View file @
4441eae2
...
@@ -14,12 +14,12 @@ import Foundation
...
@@ -14,12 +14,12 @@ import Foundation
//public let BaseAttachmentUrl: String = "http://192.168.1.176:9030"
//public let BaseAttachmentUrl: String = "http://192.168.1.176:9030"
//测试环境
//测试环境
public
let
BaseUrl
:
String
=
"http://222.180.250.18:7080/ifs-server/rest"
//
public let BaseUrl: String = "http://222.180.250.18:7080/ifs-server/rest"
public
let
BaseAttachmentUrl
:
String
=
"http://222.180.250.18:7080"
//
public let BaseAttachmentUrl: String = "http://222.180.250.18:7080"
//外网开发环境
//外网开发环境
//
public let BaseUrl: String = "http://dev.gomoretech.com/ifs-server/rest"
public
let
BaseUrl
:
String
=
"http://dev.gomoretech.com/ifs-server/rest"
//
public let BaseAttachmentUrl: String = "http://dev.gomoretech.com"
public
let
BaseAttachmentUrl
:
String
=
"http://dev.gomoretech.com"
/// 登录
/// 登录
public
let
loginUrl
:
String
=
"/user/login/%@"
public
let
loginUrl
:
String
=
"/user/login/%@"
...
...
IFS/IFS/Main/Business/RepairOrder/Model/RepairOrderDetailResultModel.swift
View file @
4441eae2
...
@@ -136,8 +136,10 @@ open class BillDetailData : NSObject{
...
@@ -136,8 +136,10 @@ open class BillDetailData : NSObject{
let
executesArray
=
json
[
"executes"
]
.
arrayValue
let
executesArray
=
json
[
"executes"
]
.
arrayValue
for
executesJson
in
executesArray
{
for
executesJson
in
executesArray
{
let
value
=
BillDetailExecute
(
fromJson
:
executesJson
)
let
value
=
BillDetailExecute
(
fromJson
:
executesJson
)
if
value
.
isEditable
{
executes
.
append
(
value
)
executes
.
append
(
value
)
}
}
}
feedback
=
json
[
"feedback"
]
.
stringValue
feedback
=
json
[
"feedback"
]
.
stringValue
feedbackNote
=
json
[
"feedbackNote"
]
.
stringValue
feedbackNote
=
json
[
"feedbackNote"
]
.
stringValue
finish
=
json
[
"finish"
]
.
boolValue
finish
=
json
[
"finish"
]
.
boolValue
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/RepairOrderDetailViewModel.swift
View file @
4441eae2
...
@@ -109,23 +109,23 @@ extension RepairOrderDetailViewModel {
...
@@ -109,23 +109,23 @@ extension RepairOrderDetailViewModel {
// MARK: - 查询工单转交部门
// MARK: - 查询工单转交部门
func
queryRepairOrderDepartmentAction
(
_
model
:
QueryModel
)
->
Observable
<
DepartmentData
>
{
func
queryRepairOrderDepartmentAction
(
_
model
:
QueryModel
)
->
Observable
<
DepartmentData
>
{
if
AppManager
.
shareInstance
.
userStoreModel
!=
nil
{
//
if AppManager.shareInstance.userStoreModel != nil {
return
queryRepairOrderDepartmentAction2
()
return
queryRepairOrderDepartmentAction2
()
}
else
{
//
}else {
return
Observable
.
create
({
(
observer
)
->
Disposable
in
//
return Observable.create({ (observer) -> Disposable in
Network
.
request
(
target
:
.
GetRepairOrderDepartment
(
model
),
success
:
{
(
json
)
in
//
Network.request(target: .GetRepairOrderDepartment(model), success: { (json) in
let
resultModel
=
DepartmentResultModel
(
fromJson
:
json
)
//
let resultModel = DepartmentResultModel(fromJson: json)
if
resultModel
.
success
{
//
if resultModel.success {
observer
.
onNext
(
resultModel
.
data
)
//
observer.onNext(resultModel.data)
}
else
{
//
}else {
ShowMessage
(
resultModel
.
message
)
//
ShowMessage(resultModel.message)
}
//
}
},
failure
:
{
(
error
)
in
//
}, failure: { (error) in
ShowMessage
(
error
.
localizedDescription
)
//
ShowMessage(error.localizedDescription)
})
//
})
return
Disposables
.
create
()
//
return Disposables.create()
})
//
})
}
//
}
}
}
// MARK: - 查询工单转交部门2(当前登录人所属项目不为空时调用)
// MARK: - 查询工单转交部门2(当前登录人所属项目不为空时调用)
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/RepairOrderViewModel.swift
View file @
4441eae2
...
@@ -115,7 +115,7 @@ extension RepairOrderViewModel {
...
@@ -115,7 +115,7 @@ extension RepairOrderViewModel {
})
})
break
break
case
REPAIR_ORDER_FILTER_BUTTON_TAG
.
STATE
.
rawValue
:
case
REPAIR_ORDER_FILTER_BUTTON_TAG
.
STATE
.
rawValue
:
YXPickerManager
.
share
()
.
showGeneralPickerView
(
kNavColor
,
dataArray
:
[
"全部状态"
,
"未发出"
,
"
已发出
"
,
"处理中"
,
"已完成"
,
"已删除"
,
"已作废"
],
defaultString
:
sender
.
currentTitle
,
commit
:
{
(
text
,
index
)
in
YXPickerManager
.
share
()
.
showGeneralPickerView
(
kNavColor
,
dataArray
:
[
"全部状态"
,
"未发出"
,
"
未派单
"
,
"处理中"
,
"已完成"
,
"已删除"
,
"已作废"
],
defaultString
:
sender
.
currentTitle
,
commit
:
{
(
text
,
index
)
in
sender
.
isSelected
=
false
sender
.
isSelected
=
false
sender
.
addBorder
(
1.0
,
kGaryColor
)
sender
.
addBorder
(
1.0
,
kGaryColor
)
sender
.
setTitle
(
text
,
for
:
.
normal
)
sender
.
setTitle
(
text
,
for
:
.
normal
)
...
...
IFS/IFS/Main/Home/Controller/HomeTableViewController.swift
View file @
4441eae2
...
@@ -54,7 +54,7 @@ class HomeTableViewController: BaseTableViewPullController {
...
@@ -54,7 +54,7 @@ class HomeTableViewController: BaseTableViewPullController {
default
:
default
:
break
break
}
}
self
?
.
tableView
.
reloadData
()
self
?
.
reloadData
()
}
.
disposed
(
by
:
disposeBag
)
}
.
disposed
(
by
:
disposeBag
)
}
}
...
...
IFS/IFS/Resource/IFS-Bridging-Header.h
View file @
4441eae2
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#import "UIImage+Category.h"
#import "UIImage+Category.h"
#import "UINavigationController+FDFullscreenPopGesture.h"
#import "UINavigationController+FDFullscreenPopGesture.h"
#import "YXKitHeader.h"
#import "YXKitHeader.h"
@
import
YXPickerView
;
#import "YXPickerManager.h"
@
import
YXAlertController
;
@
import
YXAlertController
;
@
import
YXKit
;
@
import
YXKit
;
#import "IQTextView.h"
#import "IQTextView.h"
...
...
IFS/IFS/Resource/Info.plist
View file @
4441eae2
...
@@ -17,9 +17,9 @@
...
@@ -17,9 +17,9 @@
<
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.
4
<
/string
>
<
string
>
1.0.
5
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.0.
4
<
/string
>
<
string
>
1.0.
5
<
/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
>
...
...
IFS/IFS/Vender/YXPickerView/YXAddressPickerView.h
0 → 100644
View file @
4441eae2
//
// YXAddressPickerView.h
// YXAddressPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "YXToolbar.h"
@interface
YXAddressPickerView
:
UIPickerView
@property
(
nonatomic
,
strong
)
YXToolbar
*
toolbar
;
/**
显示省市区选择框
@param tintColor 主题颜色
@param address 默认地址
@param commitBlock 确认回调
@param cancelBlock 取消回调
*/
-
(
void
)
showAddressPickerView
:(
UIColor
*
)
tintColor
defaultAddress
:(
NSString
*
)
address
commitBlock
:(
void
(
^
)(
NSString
*
address
,
NSString
*
zipcode
))
commitBlock
cancelBlock
:(
void
(
^
)())
cancelBlock
;
@end
IFS/IFS/Vender/YXPickerView/YXAddressPickerView.m
0 → 100644
View file @
4441eae2
//
// YXAddressPickerView.m
// YXAddressPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import "YXAddressPickerView.h"
#import "YXCityModel.h"
/**
取消回调
*/
typedef
void
(
^
CancelBlock
)();
@interface
YXAddressPickerView
()
<
UIPickerViewDelegate
,
UIPickerViewDataSource
>
@property
(
nonatomic
,
strong
)
UIView
*
bgView
;
@property
(
nonatomic
,
strong
)
UIView
*
containerView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
datasArray
;
/**
选中省
*/
@property
(
nonatomic
,
assign
)
NSInteger
selectedIndex_province
;
/**
选中市
*/
@property
(
nonatomic
,
assign
)
NSInteger
selectedIndex_city
;
/**
选中区
*/
@property
(
nonatomic
,
assign
)
NSInteger
selectedIndex_area
;
@property
(
nonatomic
,
copy
)
CancelBlock
block
;
@end
@implementation
YXAddressPickerView
#pragma mark -lazy
-
(
NSMutableArray
*
)
datasArray
{
if
(
!
_datasArray
)
{
_datasArray
=
[
NSMutableArray
array
];
}
return
_datasArray
;
}
-
(
instancetype
)
initWithFrame
:
(
CGRect
)
frame
{
[
self
initToolBar
];
[
self
initContainerView
];
CGRect
initialFrame
;
if
(
CGRectIsEmpty
(
frame
))
{
initialFrame
=
CGRectMake
(
0
,
self
.
toolbar
.
frame
.
size
.
height
,
WIDTH
,
216
);
}
else
{
initialFrame
=
frame
;
}
self
=
[
super
initWithFrame
:
initialFrame
];
if
(
self
)
{
self
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
delegate
=
self
;
self
.
dataSource
=
self
;
self
.
autoresizingMask
=
UIViewAutoresizingFlexibleWidth
;
[
self
initBgView
];
[
self
getDatas
];
}
return
self
;
}
-
(
void
)
initBgView
{
self
.
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
HEIGHT
-
self
.
frame
.
size
.
height
-
44
,
WIDTH
,
self
.
frame
.
size
.
height
+
self
.
toolbar
.
frame
.
size
.
height
)];
}
-
(
void
)
initToolBar
{
self
.
toolbar
=
[[
YXToolbar
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
WIDTH
,
44
)];
self
.
toolbar
.
translucent
=
NO
;
}
-
(
void
)
initContainerView
{
self
.
containerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
WIDTH
,
HEIGHT
)];
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
4
];
self
.
containerView
.
userInteractionEnabled
=
YES
;
[
self
.
containerView
addGestureRecognizer
:[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
hiddenWithAnimation
)]];
}
-
(
void
)
showWithAnimation
{
[
self
addViews
];
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
0
];
CGFloat
height
=
self
.
bgView
.
frame
.
size
.
height
;
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
+
height
/
2
);
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
-
height
/
2
);
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
4
];
}];
}
-
(
void
)
hiddenWithAnimation
{
self
.
block
();
CGFloat
height
=
self
.
bgView
.
frame
.
size
.
height
;
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
+
height
/
2
);
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
0
];
}
completion
:^
(
BOOL
finished
)
{
[
self
hiddenViews
];
}];
}
-
(
void
)
addViews
{
UIWindow
*
window
=
[
UIApplication
sharedApplication
].
keyWindow
;
[
window
addSubview
:
self
.
containerView
];
[
window
addSubview
:
self
.
bgView
];
[
self
.
bgView
addSubview
:
self
.
toolbar
];
[
self
.
bgView
addSubview
:
self
];
}
-
(
void
)
hiddenViews
{
[
self
removeFromSuperview
];
[
self
.
toolbar
removeFromSuperview
];
[
self
.
bgView
removeFromSuperview
];
[
self
.
containerView
removeFromSuperview
];
}
#pragma mark -解析省市区JSON数据
-
(
void
)
getDatas
{
NSBundle
*
bundlePath
=
[
NSBundle
bundleWithPath
:[[
NSBundle
bundleForClass
:[
YXAddressPickerView
class
]]
pathForResource
:
@"YXBundle"
ofType
:
@"bundle"
]];
NSData
*
data
=
[
NSData
dataWithContentsOfFile
:[
bundlePath
pathForResource
:
@"city"
ofType
:
@"json"
]];
NSDictionary
*
dict
=
[
NSJSONSerialization
JSONObjectWithData
:
data
options
:
NSJSONReadingAllowFragments
error
:
nil
];
NSArray
*
provinceArray
=
dict
[
@"root"
][
@"province"
];
for
(
NSDictionary
*
cityDict
in
provinceArray
)
{
YXCityModel
*
model
=
[[
YXCityModel
alloc
]
init
];
[
model
setValuesForKeysWithDictionary
:
cityDict
];
[
self
.
datasArray
addObject
:
model
];
}
[
self
reloadAllComponents
];
}
#pragma mark - 开始选择
-
(
void
)
showAddressPickerView
:
(
UIColor
*
)
tintColor
defaultAddress
:
(
NSString
*
)
address
commitBlock
:
(
void
(
^
)(
NSString
*
,
NSString
*
))
commitBlock
cancelBlock
:
(
void
(
^
)())
cancelBlock
{
self
.
block
=
cancelBlock
;
[
self
showDefaultAddress
:
address
];
self
.
toolbar
.
tintColor
=
tintColor
;
[
self
showWithAnimation
];
__weak
typeof
(
self
)
weakSelf
=
self
;
self
.
toolbar
.
cancelBlock
=
^
{
if
(
cancelBlock
)
{
[
weakSelf
hiddenWithAnimation
];
}
};
self
.
toolbar
.
commitBlock
=
^
{
if
(
commitBlock
)
{
[
weakSelf
hiddenWithAnimation
];
YXCityModel
*
model
=
weakSelf
.
datasArray
[
weakSelf
.
selectedIndex_province
];
NSDictionary
*
dict
=
model
.
city
[
weakSelf
.
selectedIndex_city
];
id
object
=
dict
[
@"district"
];
NSDictionary
*
dict1
=
nil
;
if
([
object
isKindOfClass
:[
NSDictionary
class
]])
{
dict1
=
object
;
}
else
{
dict1
=
dict
[
@"district"
][
self
.
selectedIndex_area
];
}
NSString
*
address
=
[
NSString
stringWithFormat
:
@"%@-%@-%@"
,
model
.
name
,
dict
[
@"name"
],
dict1
[
@"name"
]];
NSString
*
zipcode
=
[
NSString
stringWithFormat
:
@"%@-%@-%@"
,
model
.
zipcode
,
dict
[
@"zipcode"
],
dict1
[
@"zipcode"
]];
commitBlock
(
address
,
zipcode
);
}
};
}
#pragma mark -显示默认地址
-
(
void
)
showDefaultAddress
:
(
NSString
*
)
address
{
if
(
!
address
)
{
return
;
}
NSArray
*
addressArray
=
[
address
componentsSeparatedByString
:
@"-"
];
[
self
.
datasArray
enumerateObjectsUsingBlock
:
^
(
YXCityModel
*
obj
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
if
([
obj
.
name
isEqualToString
:
addressArray
.
firstObject
])
{
self
.
selectedIndex_province
=
idx
;
[
obj
.
city
enumerateObjectsUsingBlock
:
^
(
NSDictionary
*
dict
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
if
([
dict
[
@"name"
]
isEqualToString
:
addressArray
[
1
]])
{
self
.
selectedIndex_city
=
idx
;
id
object
=
dict
[
@"district"
];
if
([
object
isKindOfClass
:[
NSDictionary
class
]])
{
self
.
selectedIndex_area
=
0
;
}
else
{
[
object
enumerateObjectsUsingBlock
:
^
(
id
_Nonnull
obj
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
if
([
obj
[
@"name"
]
isEqualToString
:[
addressArray
lastObject
]])
{
self
.
selectedIndex_area
=
idx
;
*
stop
=
YES
;
}
}];
}
}
}];
}
}];
[
self
reloadComponent
:
0
];
[
self
reloadComponent
:
1
];
[
self
reloadComponent
:
2
];
[
self
selectRow
:
self
.
selectedIndex_province
inComponent
:
0
animated
:
NO
];
[
self
selectRow
:
self
.
selectedIndex_city
inComponent
:
1
animated
:
NO
];
[
self
selectRow
:
self
.
selectedIndex_area
inComponent
:
2
animated
:
NO
];
}
#pragma mark -<UIPickerViewDelegate,UIPickerViewDataSource>
-
(
NSInteger
)
numberOfComponentsInPickerView
:
(
UIPickerView
*
)
pickerView
{
return
3
;
}
-
(
NSString
*
)
pickerView
:
(
UIPickerView
*
)
pickerView
titleForRow
:
(
NSInteger
)
row
forComponent
:
(
NSInteger
)
component
{
switch
(
component
)
{
case
0
:
{
YXCityModel
*
model
=
self
.
datasArray
[
row
];
return
model
.
name
;
}
break
;
case
1
:
{
YXCityModel
*
model
=
self
.
datasArray
[
self
.
selectedIndex_province
];
NSDictionary
*
dict
=
model
.
city
[
row
];
return
dict
[
@"name"
];
}
break
;
case
2
:
{
YXCityModel
*
model
=
self
.
datasArray
[
self
.
selectedIndex_province
];
NSDictionary
*
dict
=
model
.
city
[
self
.
selectedIndex_city
];
id
object
=
dict
[
@"district"
];
if
([
object
isKindOfClass
:[
NSDictionary
class
]])
{
return
object
[
@"name"
];
}
NSDictionary
*
dict1
=
dict
[
@"district"
][
row
];
return
dict1
[
@"name"
];
}
break
;
default
:
break
;
}
return
@""
;
}
-
(
NSInteger
)
pickerView
:
(
UIPickerView
*
)
pickerView
numberOfRowsInComponent
:
(
NSInteger
)
component
;
{
switch
(
component
)
{
case
0
:
{
return
self
.
datasArray
.
count
;
}
break
;
case
1
:
{
YXCityModel
*
model
=
self
.
datasArray
[
self
.
selectedIndex_province
];
return
model
.
city
.
count
;
}
break
;
case
2
:
{
YXCityModel
*
model
=
self
.
datasArray
[
self
.
selectedIndex_province
];
NSDictionary
*
dict
=
model
.
city
[
self
.
selectedIndex_city
];
id
object
=
dict
[
@"district"
];
if
([
object
isKindOfClass
:[
NSDictionary
class
]])
{
return
1
;
}
return
[
dict
[
@"district"
]
count
];
}
break
;
default
:
break
;
}
return
10
;
}
-
(
void
)
pickerView
:
(
UIPickerView
*
)
pickerView
didSelectRow
:
(
NSInteger
)
row
inComponent
:
(
NSInteger
)
component
{
switch
(
component
)
{
case
0
:
self
.
selectedIndex_province
=
row
;
self
.
selectedIndex_city
=
0
;
self
.
selectedIndex_area
=
0
;
[
pickerView
reloadComponent
:
1
];
[
pickerView
reloadComponent
:
2
];
[
pickerView
selectRow
:
0
inComponent
:
1
animated
:
NO
];
[
pickerView
selectRow
:
0
inComponent
:
2
animated
:
NO
];
break
;
case
1
:
self
.
selectedIndex_city
=
row
;
self
.
selectedIndex_area
=
0
;
[
pickerView
reloadComponent
:
2
];
[
pickerView
selectRow
:
0
inComponent
:
2
animated
:
NO
];
break
;
case
2
:
self
.
selectedIndex_area
=
row
;
break
;
default
:
break
;
}
}
@end
IFS/IFS/Vender/YXPickerView/YXBundle.bundle/city.json
0 → 100644
View file @
4441eae2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
IFS/IFS/Vender/YXPickerView/YXCityModel.h
0 → 100644
View file @
4441eae2
//
// YXCityModel.h
// YXPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
YXCityModel
:
NSObject
@property
(
nonatomic
,
copy
)
NSString
*
name
;
@property
(
nonatomic
,
copy
)
NSString
*
zipcode
;
@property
(
nonatomic
,
strong
)
NSArray
*
city
;
@end
IFS/IFS/Vender/YXPickerView/YXCityModel.m
0 → 100644
View file @
4441eae2
//
// YXCityModel.m
// YXPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import "YXCityModel.h"
@implementation
YXCityModel
@end
IFS/IFS/Vender/YXPickerView/YXDatePickerView.h
0 → 100644
View file @
4441eae2
//
// YXDatePickerView.h
// demo
//
// Created by 曹云霄 on 2017/7/17.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "YXToolbar.h"
@interface
YXDatePickerView
:
UIDatePicker
@property
(
nonatomic
,
strong
)
YXToolbar
*
toolbar
;
/**
显示时间选择框
@param tintColor 主题颜色
@param model NSDate类型
@param minimumDate 最小时间
@param maximumDate 最大时间
@param dateString 默认时间字符串
@param commitBlock 确认回调
@param cancelBlock 取消回调
*/
-
(
void
)
showDatePickerView
:(
UIColor
*
)
tintColor
datePickerModel
:(
UIDatePickerMode
)
model
minimumDate
:(
NSDate
*
)
minimumDate
maximumDate
:(
NSDate
*
)
maximumDate
defaultDate
:(
NSString
*
)
dateString
commitBlock
:(
void
(
^
)(
NSString
*
date
))
commitBlock
cancelBlock
:(
void
(
^
)())
cancelBlock
;
@end
IFS/IFS/Vender/YXPickerView/YXDatePickerView.m
0 → 100644
View file @
4441eae2
//
// YXDatePickerView.m
// demo
//
// Created by 曹云霄 on 2017/7/17.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import "YXDatePickerView.h"
@interface
YXDatePickerView
()
@property
(
nonatomic
,
strong
)
UIView
*
bgView
;
@property
(
nonatomic
,
strong
)
UIView
*
containerView
;
@end
@implementation
YXDatePickerView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
[
self
initToolBar
];
[
self
initContainerView
];
CGRect
initialFrame
;
if
(
CGRectIsEmpty
(
frame
))
{
initialFrame
=
CGRectMake
(
0
,
self
.
toolbar
.
frame
.
size
.
height
,
WIDTH
,
216
);
}
else
{
initialFrame
=
frame
;
}
self
=
[
super
initWithFrame
:
initialFrame
];
if
(
self
)
{
self
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
autoresizingMask
=
UIViewAutoresizingFlexibleWidth
;
[
self
initBgView
];
}
return
self
;
}
-
(
void
)
initBgView
{
self
.
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
HEIGHT
-
self
.
frame
.
size
.
height
-
44
,
WIDTH
,
self
.
frame
.
size
.
height
+
self
.
toolbar
.
frame
.
size
.
height
)];
}
-
(
void
)
initToolBar
{
self
.
toolbar
=
[[
YXToolbar
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
WIDTH
,
44
)];
self
.
toolbar
.
translucent
=
NO
;
}
-
(
void
)
initContainerView
{
self
.
containerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
WIDTH
,
HEIGHT
)];
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
4
];
self
.
containerView
.
userInteractionEnabled
=
YES
;
[
self
.
containerView
addGestureRecognizer
:[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
hiddenWithAnimation
)]];
}
-
(
void
)
showWithAnimation
{
[
self
addViews
];
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
0
];
CGFloat
height
=
self
.
bgView
.
frame
.
size
.
height
;
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
+
height
/
2
);
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
-
height
/
2
);
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
4
];
}];
}
-
(
void
)
hiddenWithAnimation
{
CGFloat
height
=
self
.
bgView
.
frame
.
size
.
height
;
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
+
height
/
2
);
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
0
];
}
completion
:^
(
BOOL
finished
)
{
[
self
hiddenViews
];
}];
}
-
(
void
)
addViews
{
UIWindow
*
window
=
[
UIApplication
sharedApplication
].
keyWindow
;
[
window
addSubview
:
self
.
containerView
];
[
window
addSubview
:
self
.
bgView
];
[
self
.
bgView
addSubview
:
self
.
toolbar
];
[
self
.
bgView
addSubview
:
self
];
}
-
(
void
)
hiddenViews
{
[
self
removeFromSuperview
];
[
self
.
toolbar
removeFromSuperview
];
[
self
.
bgView
removeFromSuperview
];
[
self
.
containerView
removeFromSuperview
];
}
-
(
void
)
showDatePickerView
:
(
UIColor
*
)
tintColor
datePickerModel
:
(
UIDatePickerMode
)
model
minimumDate
:
(
NSDate
*
)
minimumDate
maximumDate
:
(
NSDate
*
)
maximumDate
defaultDate
:
(
NSString
*
)
dateString
commitBlock
:
(
void
(
^
)(
NSString
*
))
commitBlock
cancelBlock
:
(
void
(
^
)())
cancelBlock
{
if
(
dateString
)
{
self
.
date
=
[
self
returnDate
:
dateString
];
}
else
{
self
.
date
=
[
NSDate
date
];
}
self
.
datePickerMode
=
model
;
self
.
minimumDate
=
minimumDate
;
self
.
maximumDate
=
maximumDate
;
self
.
toolbar
.
tintColor
=
tintColor
;
[
self
showWithAnimation
];
__weak
typeof
(
self
)
weakSelf
=
self
;
self
.
toolbar
.
cancelBlock
=
^
{
if
(
cancelBlock
)
{
[
weakSelf
hiddenWithAnimation
];
cancelBlock
();
}
};
self
.
toolbar
.
commitBlock
=
^
{
if
(
commitBlock
)
{
[
weakSelf
hiddenWithAnimation
];
commitBlock
([
weakSelf
returnDateString
:
weakSelf
.
date
]);
}
};
}
/**
格式化NSDate
@param date NSDate
@return 时间字符串
*/
-
(
NSString
*
)
returnDateString
:
(
NSDate
*
)
date
{
NSDateFormatter
*
format
=
[[
NSDateFormatter
alloc
]
init
];
format
.
dateFormat
=
@"yyyy-MM-dd HH:mm:ss"
;
NSString
*
string
=
[
format
stringFromDate
:
date
];
return
string
;
}
/**
格式化NSString
@param dateString 时间字符串
@return NSDate
*/
-
(
NSDate
*
)
returnDate
:
(
NSString
*
)
dateString
{
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"yyyy-MM-dd HH:mm:ss"
];
NSDate
*
date
=
[
dateFormatter
dateFromString
:
dateString
];
return
date
;
}
@end
IFS/IFS/Vender/YXPickerView/YXGeneralPickerView.h
0 → 100644
View file @
4441eae2
//
// YXGeneralPickerView.h
// demo
//
// Created by 曹云霄 on 2017/9/22.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "YXToolbar.h"
@interface
YXGeneralPickerView
:
UIPickerView
@property
(
nonatomic
,
strong
)
YXToolbar
*
toolbar
;
/**
显示选择框
@param tintColor 主题颜色
@param defaultString 默认选中
@param commitBlock 确认回调
@param cancelBlock 取消回调
*/
-
(
void
)
showGeneralPickerView
:(
UIColor
*
)
tintColor
dataArray
:(
NSArray
<
NSString
*>
*
)
dataArray
defaultString
:(
NSString
*
)
defaultString
commitBlock
:(
void
(
^
)(
NSString
*
selectedItem
,
NSInteger
index
))
commitBlock
cancelBlock
:(
void
(
^
)())
cancelBlock
;
@end
IFS/IFS/Vender/YXPickerView/YXGeneralPickerView.m
0 → 100644
View file @
4441eae2
//
// YXGeneralPickerView.m
// demo
//
// Created by 曹云霄 on 2017/9/22.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import "YXGeneralPickerView.h"
/**
取消回调
*/
typedef
void
(
^
CancelBlock
)();
@interface
YXGeneralPickerView
()
<
UIPickerViewDelegate
,
UIPickerViewDataSource
>
@property
(
nonatomic
,
strong
)
UIView
*
bgView
;
@property
(
nonatomic
,
strong
)
UIView
*
containerView
;
@property
(
nonatomic
,
strong
)
NSArray
*
datasArray
;
/**
选中下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
selectedIndex
;
@property
(
nonatomic
,
copy
)
CancelBlock
block
;
@end
@implementation
YXGeneralPickerView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
[
self
initToolBar
];
[
self
initContainerView
];
CGRect
initialFrame
;
if
(
CGRectIsEmpty
(
frame
))
{
initialFrame
=
CGRectMake
(
0
,
self
.
toolbar
.
frame
.
size
.
height
,
WIDTH
,
216
);
}
else
{
initialFrame
=
frame
;
}
self
=
[
super
initWithFrame
:
initialFrame
];
if
(
self
)
{
self
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
delegate
=
self
;
self
.
dataSource
=
self
;
self
.
autoresizingMask
=
UIViewAutoresizingFlexibleWidth
;
[
self
initBgView
];
}
return
self
;
}
-
(
void
)
initBgView
{
self
.
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
HEIGHT
-
self
.
frame
.
size
.
height
-
44
,
WIDTH
,
self
.
frame
.
size
.
height
+
self
.
toolbar
.
frame
.
size
.
height
)];
}
-
(
void
)
initToolBar
{
self
.
toolbar
=
[[
YXToolbar
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
WIDTH
,
44
)];
self
.
toolbar
.
translucent
=
NO
;
}
-
(
void
)
initContainerView
{
self
.
containerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
WIDTH
,
HEIGHT
)];
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
4
];
self
.
containerView
.
userInteractionEnabled
=
YES
;
[
self
.
containerView
addGestureRecognizer
:[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
hiddenWithAnimation
)]];
}
-
(
void
)
showWithAnimation
{
[
self
addViews
];
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
0
];
CGFloat
height
=
self
.
bgView
.
frame
.
size
.
height
;
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
+
height
/
2
);
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
-
height
/
2
);
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
4
];
}];
}
-
(
void
)
hiddenWithAnimation
{
self
.
block
();
CGFloat
height
=
self
.
bgView
.
frame
.
size
.
height
;
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
self
.
bgView
.
center
=
CGPointMake
(
WIDTH
/
2
,
HEIGHT
+
height
/
2
);
self
.
containerView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
0
];
}
completion
:^
(
BOOL
finished
)
{
[
self
hiddenViews
];
}];
}
-
(
void
)
addViews
{
UIWindow
*
window
=
[
UIApplication
sharedApplication
].
keyWindow
;
[
window
addSubview
:
self
.
containerView
];
[
window
addSubview
:
self
.
bgView
];
[
self
.
bgView
addSubview
:
self
.
toolbar
];
[
self
.
bgView
addSubview
:
self
];
}
-
(
void
)
hiddenViews
{
[
self
removeFromSuperview
];
[
self
.
toolbar
removeFromSuperview
];
[
self
.
bgView
removeFromSuperview
];
[
self
.
containerView
removeFromSuperview
];
}
-
(
void
)
showGeneralPickerView
:
(
UIColor
*
)
tintColor
dataArray
:
(
NSArray
<
NSString
*>
*
)
dataArray
defaultString
:
(
NSString
*
)
defaultString
commitBlock
:
(
void
(
^
)(
NSString
*
selectedItem
,
NSInteger
index
))
commitBlock
cancelBlock
:
(
void
(
^
)())
cancelBlock
{
self
.
block
=
cancelBlock
;
self
.
datasArray
=
dataArray
;
[
self
showDefaultItem
:
defaultString
];
[
self
reloadAllComponents
];
self
.
toolbar
.
tintColor
=
tintColor
;
[
self
showWithAnimation
];
__weak
typeof
(
self
)
weakSelf
=
self
;
self
.
toolbar
.
cancelBlock
=
^
{
if
(
cancelBlock
)
{
[
weakSelf
hiddenWithAnimation
];
}
};
self
.
toolbar
.
commitBlock
=
^
{
if
(
commitBlock
)
{
[
weakSelf
hiddenWithAnimation
];
commitBlock
(
weakSelf
.
datasArray
[
weakSelf
.
selectedIndex
],
weakSelf
.
selectedIndex
);
}
};
}
-
(
void
)
showDefaultItem
:
(
NSString
*
)
defaultString
{
NSInteger
index
=
[
self
.
datasArray
indexOfObject
:
defaultString
];
[
self
reloadComponent
:
0
];
if
(
defaultString
)
{
if
(
index
>
self
.
datasArray
.
count
-
1
)
{
index
=
0
;
}
self
.
selectedIndex
=
index
;
[
self
selectRow
:
index
inComponent
:
0
animated
:
NO
];
}
else
{
self
.
selectedIndex
=
0
;
}
}
#pragma mark -<UIPickerViewDelegate,UIPickerViewDataSource>
-
(
NSInteger
)
numberOfComponentsInPickerView
:
(
UIPickerView
*
)
pickerView
{
return
1
;
}
-
(
NSString
*
)
pickerView
:
(
UIPickerView
*
)
pickerView
titleForRow
:
(
NSInteger
)
row
forComponent
:
(
NSInteger
)
component
{
return
self
.
datasArray
[
row
];
}
-
(
NSInteger
)
pickerView
:
(
UIPickerView
*
)
pickerView
numberOfRowsInComponent
:
(
NSInteger
)
component
;
{
return
self
.
datasArray
.
count
;
}
-
(
void
)
pickerView
:
(
UIPickerView
*
)
pickerView
didSelectRow
:
(
NSInteger
)
row
inComponent
:
(
NSInteger
)
component
{
self
.
selectedIndex
=
row
;
}
@end
IFS/IFS/Vender/YXPickerView/YXPickerManager.h
0 → 100644
View file @
4441eae2
//
// YXPickerManager.h
// YXPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "YXAddressPickerView.h"
#import "YXDatePickerView.h"
#import "YXGeneralPickerView.h"
@interface
YXPickerManager
:
NSObject
+
(
YXPickerManager
*
)
shareManager
;
@property
(
nonatomic
,
strong
)
YXAddressPickerView
*
addressPickerView
;
@property
(
nonatomic
,
strong
)
YXDatePickerView
*
datePickerView
;
@property
(
nonatomic
,
strong
)
YXGeneralPickerView
*
generalPickerView
;
/**
显示省市区选择框
@param tintColor 主题颜色
@param address 默认地址
@param commitBlock 确认回调
@param cancelBlock 取消回调
*/
-
(
void
)
showAddressPickerView
:(
UIColor
*
)
tintColor
defaultAddress
:(
NSString
*
)
address
commitBlock
:(
void
(
^
)(
NSString
*
address
,
NSString
*
zipcode
))
commitBlock
cancelBlock
:(
void
(
^
)())
cancelBlock
;
/**
显示选择框
@param tintColor 主题颜色
@param dataArray 默认选中
@param defaultString 默认选中
@param commitBlock 确认回调
@param cancelBlock 取消回调
*/
-
(
void
)
showGeneralPickerView
:(
UIColor
*
)
tintColor
dataArray
:(
NSArray
<
NSString
*>
*
)
dataArray
defaultString
:(
NSString
*
)
defaultString
commitBlock
:(
void
(
^
)(
NSString
*
selectedItem
,
NSInteger
index
))
commitBlock
cancelBlock
:(
void
(
^
)())
cancelBlock
;
/**
显示时间选择框
@param tintColor 主题颜色
@param model NSDate类型
@param minimumDate 最小时间
@param maximumDate 最大时间
@param dateString 默认时间字符串
@param commitBlock 确认回调
@param cancelBlock 取消回调
*/
-
(
void
)
showDatePickerView
:(
UIColor
*
)
tintColor
datePickerModel
:(
UIDatePickerMode
)
model
minimumDate
:(
NSDate
*
)
minimumDate
maximumDate
:(
NSDate
*
)
maximumDate
defaultDate
:(
NSString
*
)
dateString
commitBlock
:(
void
(
^
)(
NSString
*
date
))
commitBlock
cancelBlock
:(
void
(
^
)())
cancelBlock
;
@end
IFS/IFS/Vender/YXPickerView/YXPickerManager.m
0 → 100644
View file @
4441eae2
//
// YXPickerManager.m
// YXPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import "YXPickerManager.h"
@implementation
YXPickerManager
+
(
YXPickerManager
*
)
shareManager
{
static
YXPickerManager
*
manager
=
nil
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
manager
=
[[
YXPickerManager
alloc
]
init
];
});
return
manager
;
}
-
(
YXAddressPickerView
*
)
addressPickerView
{
if
(
!
_addressPickerView
)
{
_addressPickerView
=
[[
YXAddressPickerView
alloc
]
init
];
}
return
_addressPickerView
;
}
-
(
YXDatePickerView
*
)
datePickerView
{
if
(
!
_datePickerView
)
{
_datePickerView
=
[[
YXDatePickerView
alloc
]
init
];
}
return
_datePickerView
;
}
-
(
YXGeneralPickerView
*
)
generalPickerView
{
if
(
!
_generalPickerView
)
{
_generalPickerView
=
[[
YXGeneralPickerView
alloc
]
init
];
}
return
_generalPickerView
;
}
-
(
void
)
showAddressPickerView
:
(
UIColor
*
)
tintColor
defaultAddress
:
(
NSString
*
)
address
commitBlock
:
(
void
(
^
)(
NSString
*
,
NSString
*
))
commitBlock
cancelBlock
:
(
void
(
^
)())
cancelBlock
{
[
self
.
addressPickerView
showAddressPickerView
:
tintColor
defaultAddress
:
address
commitBlock
:^
(
NSString
*
address
,
NSString
*
zipcode
)
{
commitBlock
(
address
,
zipcode
);
}
cancelBlock
:^
{
if
(
cancelBlock
)
{
cancelBlock
();
}
}];
}
-
(
void
)
showGeneralPickerView
:
(
UIColor
*
)
tintColor
dataArray
:
(
NSArray
<
NSString
*>
*
)
dataArray
defaultString
:
(
NSString
*
)
defaultString
commitBlock
:
(
void
(
^
)(
NSString
*
selectedItem
,
NSInteger
index
))
commitBlock
cancelBlock
:
(
void
(
^
)())
cancelBlock
{
[
self
.
generalPickerView
showGeneralPickerView
:
tintColor
dataArray
:
dataArray
defaultString
:
defaultString
commitBlock
:^
(
NSString
*
selectedItem
,
NSInteger
index
)
{
commitBlock
(
selectedItem
,
index
);
}
cancelBlock
:^
{
if
(
cancelBlock
)
{
cancelBlock
();
}
}];
}
-
(
void
)
showDatePickerView
:
(
UIColor
*
)
tintColor
datePickerModel
:
(
UIDatePickerMode
)
model
minimumDate
:
(
NSDate
*
)
minimumDate
maximumDate
:
(
NSDate
*
)
maximumDate
defaultDate
:
(
NSString
*
)
dateString
commitBlock
:
(
void
(
^
)(
NSString
*
))
commitBlock
cancelBlock
:
(
void
(
^
)())
cancelBlock
{
[
self
.
datePickerView
showDatePickerView
:
tintColor
datePickerModel
:
model
minimumDate
:
minimumDate
maximumDate
:
maximumDate
defaultDate
:
dateString
commitBlock
:^
(
NSString
*
date
)
{
commitBlock
(
date
);
}
cancelBlock
:^
{
if
(
cancelBlock
)
{
cancelBlock
();
}
}];
}
@end
IFS/IFS/Vender/YXPickerView/YXToolbar.h
0 → 100644
View file @
4441eae2
//
// YXToolbar.h
// YXPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import <UIKit/UIKit.h>
#define WIDTH [[UIScreen mainScreen] bounds].size.width
#define HEIGHT [[UIScreen mainScreen] bounds].size.height
#define COLOR [UIColor colorWithRed:0.804 green:0.804 blue:0.804 alpha:1]
@interface
YXToolbar
:
UIToolbar
@property
(
nonatomic
,
strong
)
UIBarButtonItem
*
cancelButtonItem
;
@property
(
nonatomic
,
strong
)
UIBarButtonItem
*
commitButtonItem
;
@property
(
nonatomic
,
strong
)
UIBarButtonItem
*
titleButtonItem
;
/**
toolBar主题色
*/
@property
(
nonatomic
,
strong
)
UIColor
*
toolBarTintColor
;
/**
标题
*/
@property
(
nonatomic
,
copy
)
NSString
*
title
;
/**
标题字体颜色
*/
@property
(
nonatomic
,
strong
)
UIColor
*
titleColor
;
/**
取消
*/
@property
(
nonatomic
,
copy
)
NSString
*
cancelTitle
;
/**
取消字体颜色
*/
@property
(
nonatomic
,
strong
)
UIColor
*
cancelTitleColor
;
/**
提交
*/
@property
(
nonatomic
,
copy
)
NSString
*
commitTitle
;
/**
提交字体颜色
*/
@property
(
nonatomic
,
strong
)
UIColor
*
commitTitleColor
;
/**
取消回调
*/
@property
(
nonatomic
,
copy
)
void
(
^
cancelBlock
)();
/**
提交回调
*/
@property
(
nonatomic
,
copy
)
void
(
^
commitBlock
)();
@end
IFS/IFS/Vender/YXPickerView/YXToolbar.m
0 → 100644
View file @
4441eae2
//
// YXToolbar.m
// YXPickerView
//
// Created by 曹云霄 on 2017/7/14.
// Copyright © 2017年 曹云霄. All rights reserved.
//
#import "YXToolbar.h"
@implementation
YXToolbar
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
UIBarButtonItem
*
leftFixBar
=
[[
UIBarButtonItem
alloc
]
initWithBarButtonSystemItem
:
UIBarButtonSystemItemFixedSpace
target
:
self
action
:
nil
];
leftFixBar
.
width
=
15
;
UIBarButtonItem
*
rightFixBar
=
[[
UIBarButtonItem
alloc
]
initWithBarButtonSystemItem
:
UIBarButtonSystemItemFixedSpace
target
:
self
action
:
nil
];
rightFixBar
.
width
=
15
;
UIBarButtonItem
*
spaceItem
=
[[
UIBarButtonItem
alloc
]
initWithBarButtonSystemItem
:
UIBarButtonSystemItemFlexibleSpace
target
:
nil
action
:
nil
];
self
.
titleButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"请选择"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
nil
];
self
.
titleButtonItem
.
enabled
=
NO
;
[
self
.
titleButtonItem
setTitleTextAttributes
:@{
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
],
NSForegroundColorAttributeName
:
[
UIColor
lightGrayColor
]}
forState
:
UIControlStateNormal
];
self
.
cancelButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"取消"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
cancelButtonClickAction
)];
self
.
commitButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"确认"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
commitButtonClickAction
)];
self
.
items
=
@[
leftFixBar
,
self
.
cancelButtonItem
,
spaceItem
,
self
.
titleButtonItem
,
spaceItem
,
self
.
commitButtonItem
,
rightFixBar
];
self
.
tintColor
=
[
UIColor
redColor
];
UIView
*
bottomLineView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
43
.
5
,
WIDTH
,
0
.
5
)];
bottomLineView
.
backgroundColor
=
COLOR
;
[
self
addSubview
:
bottomLineView
];
[
self
bringSubviewToFront
:
bottomLineView
];
}
return
self
;
}
-
(
void
)
setTitle
:(
NSString
*
)
title
{
if
(
self
.
titleButtonItem
)
{
self
.
titleButtonItem
.
title
=
title
;
}
}
-
(
void
)
setTitleColor
:(
UIColor
*
)
titleColor
{
if
(
self
.
titleButtonItem
)
{
self
.
titleButtonItem
.
tintColor
=
titleColor
;
}
}
-
(
void
)
setToolBarTintColor
:(
UIColor
*
)
toolBarTintColor
{
self
.
tintColor
=
toolBarTintColor
;
}
-
(
void
)
setCancelTitle
:(
NSString
*
)
cancelTitle
{
if
(
self
.
cancelButtonItem
)
{
self
.
cancelButtonItem
.
title
=
cancelTitle
;
}
}
-
(
void
)
setCancelTitleColor
:(
UIColor
*
)
cancelTitleColor
{
if
(
self
.
cancelButtonItem
)
{
self
.
cancelButtonItem
.
tintColor
=
cancelTitleColor
;
}
}
-
(
void
)
setCommitTitle
:(
NSString
*
)
commitTitle
{
if
(
self
.
commitButtonItem
)
{
self
.
commitButtonItem
.
title
=
commitTitle
;
}
}
-
(
void
)
setCommitTitleColor
:(
UIColor
*
)
commitTitleColor
{
if
(
self
.
commitButtonItem
)
{
self
.
commitButtonItem
.
tintColor
=
commitTitleColor
;
}
}
-
(
void
)
cancelButtonClickAction
{
if
(
self
.
cancelBlock
)
{
self
.
cancelBlock
();
}
}
-
(
void
)
commitButtonClickAction
{
if
(
self
.
commitBlock
)
{
self
.
commitBlock
();
}
}
@end
IFS/Podfile
View file @
4441eae2
...
@@ -18,7 +18,6 @@ target ‘IFS’ do
...
@@ -18,7 +18,6 @@ target ‘IFS’ do
pod
'FDFullscreenPopGesture'
,
'~> 1.1'
pod
'FDFullscreenPopGesture'
,
'~> 1.1'
pod
'ImagePicker'
pod
'ImagePicker'
pod
'SKPhotoBrowser'
,
'~> 5.0.0'
pod
'SKPhotoBrowser'
,
'~> 5.0.0'
pod
'YXPickerView'
pod
'YXAlertController'
pod
'YXAlertController'
pod
'PPBadgeViewSwift'
pod
'PPBadgeViewSwift'
pod
'SVProgressHUD'
,
'~> 2.2.2'
pod
'SVProgressHUD'
,
'~> 2.2.2'
...
...
IFS/Podfile.lock
View file @
4441eae2
...
@@ -26,7 +26,6 @@ PODS:
...
@@ -26,7 +26,6 @@ PODS:
- UMengAnalytics (4.2.4)
- UMengAnalytics (4.2.4)
- YXAlertController (1.0.8)
- YXAlertController (1.0.8)
- YXKit (0.0.8)
- YXKit (0.0.8)
- YXPickerView (2.0.0)
DEPENDENCIES:
DEPENDENCIES:
- DeviceKit
- DeviceKit
...
@@ -49,7 +48,6 @@ DEPENDENCIES:
...
@@ -49,7 +48,6 @@ DEPENDENCIES:
- UMengAnalytics
- UMengAnalytics
- YXAlertController
- YXAlertController
- YXKit
- YXKit
- YXPickerView
SPEC CHECKSUMS:
SPEC CHECKSUMS:
Alamofire: f41a599bd63041760b26d393ec1069d9d7b917f4
Alamofire: f41a599bd63041760b26d393ec1069d9d7b917f4
...
@@ -74,8 +72,7 @@ SPEC CHECKSUMS:
...
@@ -74,8 +72,7 @@ SPEC CHECKSUMS:
UMengAnalytics: ef8d45f94c0e5771dc364cf6a5731d9d3b101da2
UMengAnalytics: ef8d45f94c0e5771dc364cf6a5731d9d3b101da2
YXAlertController: 37a54642cb8e8b43b79004fe9148bb8ff2fab814
YXAlertController: 37a54642cb8e8b43b79004fe9148bb8ff2fab814
YXKit: 73d6ffbcf7530f1159e030460207286e9153b080
YXKit: 73d6ffbcf7530f1159e030460207286e9153b080
YXPickerView: 527ca74d8fbe73b4e9bd0bbff6e143133dced907
PODFILE CHECKSUM:
0eaafb4a7b07d07aea77b58f3cd8a90edc556faf
PODFILE CHECKSUM:
dee9f1dd9eac675051bb335b7b1d13637a8eabc1
COCOAPODS: 1.3.1
COCOAPODS: 1.3.1
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