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
714c2739
Commit
714c2739
authored
Jan 19, 2018
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门界面刷新控制,跳转控制,优化部分代码
parent
d47bc6c6
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
324 additions
and
289 deletions
+324
-289
project.pbxproj
IFS/IFS.xcodeproj/project.pbxproj
+8
-18
Urls.swift
IFS/IFS/Expand/Const/Urls.swift
+4
-4
NetworkAPI.swift
IFS/IFS/Expand/Network/NetworkAPI.swift
+1
-1
PhotoAttachmentViewController.swift
...Attachment/Controller/PhotoAttachmentViewController.swift
+10
-7
RepairOrderAddTableViewController.swift
...rOrder/Controller/RepairOrderAddTableViewController.swift
+54
-53
RepairOrderChildBillDetailViewController.swift
...Controller/RepairOrderChildBillDetailViewController.swift
+4
-3
RepairOrderDetailBgController.swift
...epairOrder/Controller/RepairOrderDetailBgController.swift
+3
-2
RepairOrderDetailViewController.swift
...airOrder/Controller/RepairOrderDetailViewController.swift
+43
-24
RepairOrderEditSonOrderViewController.swift
...er/Controller/RepairOrderEditSonOrderViewController.swift
+17
-11
MaintainAfterAttachmentTableViewCell.xib
...RepairOrder/View/MaintainAfterAttachmentTableViewCell.xib
+1
-0
MaintainBeforAttachmentTableViewCell.xib
...RepairOrder/View/MaintainBeforAttachmentTableViewCell.xib
+1
-0
RepairOrderAttachmentTableViewCell.xib
...s/RepairOrder/View/RepairOrderAttachmentTableViewCell.xib
+1
-0
RepairOrderDetailBottomView.swift
...siness/RepairOrder/View/RepairOrderDetailBottomView.swift
+0
-20
RepairOrderDetailBottomView.xib
...Business/RepairOrder/View/RepairOrderDetailBottomView.xib
+0
-75
RepairOrderDetailSuspendView.swift
...iness/RepairOrder/View/RepairOrderDetailSuspendView.swift
+2
-2
RepairOrderSubOrderTableViewCell.xib
...ess/RepairOrder/View/RepairOrderSubOrderTableViewCell.xib
+3
-2
RepairOrderAddViewModel.swift
...iness/RepairOrder/ViewModel/RepairOrderAddViewModel.swift
+6
-2
RepairOrderDetailViewModel.swift
...ss/RepairOrder/ViewModel/RepairOrderDetailViewModel.swift
+27
-14
RepairOrderViewModel.swift
...Business/RepairOrder/ViewModel/RepairOrderViewModel.swift
+1
-0
ReparirChildBillViewModel.swift
...ess/RepairOrder/ViewModel/ReparirChildBillViewModel.swift
+42
-15
TodoViewController.swift
...FS/Main/Business/Todo/Controller/TodoViewController.swift
+20
-1
HomeTableViewController.swift
IFS/IFS/Main/Home/Controller/HomeTableViewController.swift
+15
-0
Function.storyboard
IFS/IFS/Main/Storyboards/Function.storyboard
+57
-29
LoginViewModel.swift
IFS/IFS/Other/Login/ViewModel/LoginViewModel.swift
+3
-1
Podfile
IFS/Podfile
+0
-1
Podfile.lock
IFS/Podfile.lock
+1
-4
No files found.
IFS/IFS.xcodeproj/project.pbxproj
View file @
714c2739
...
...
@@ -39,6 +39,8 @@
296FE44C1FFB5CAB00810820
/* HomeTableViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
296FE44B1FFB5CAB00810820
/* HomeTableViewController.swift */
;
};
296FE44E1FFB5D9A00810820
/* HomeTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
296FE44D1FFB5D9A00810820
/* HomeTableViewCell.swift */
;
};
296FE4581FFB7CED00810820
/* function.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
296FE4571FFB7CED00810820
/* function.plist */
;
};
29A8D9A62011C602001E865C
/* RepairAttachmentTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A8D9A42011C602001E865C
/* RepairAttachmentTableViewCell.swift */
;
};
29A8D9A72011C602001E865C
/* RepairAttachmentTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A8D9A52011C602001E865C
/* RepairAttachmentTableViewCell.xib */
;
};
29B0C66A1FEA382F00FF37ED
/* MBProgressView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B0C6691FEA382F00FF37ED
/* MBProgressView.swift */
;
};
29B0C66C1FEA3A7000FF37ED
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B0C66B1FEA3A7000FF37ED
/* LaunchScreen.storyboard */
;
};
29D5307A1FFF626500851F00
/* FunctionViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D530671FFF626500851F00
/* FunctionViewController.swift */
;
};
...
...
@@ -57,12 +59,8 @@
29D530911FFF6FA800851F00
/* PhotoAttachmentViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D530901FFF6FA800851F00
/* PhotoAttachmentViewController.swift */
;
};
29D530931FFF715D00851F00
/* PhotoAttachmentViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D530921FFF715D00851F00
/* PhotoAttachmentViewModel.swift */
;
};
29D530951FFF724600851F00
/* PhotoAttachmentCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D530941FFF724600851F00
/* PhotoAttachmentCollectionViewCell.swift */
;
};
29D530981FFF76DB00851F00
/* RepairAttachmentTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D530961FFF76DB00851F00
/* RepairAttachmentTableViewCell.swift */
;
};
29D530991FFF76DB00851F00
/* RepairAttachmentTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D530971FFF76DB00851F00
/* RepairAttachmentTableViewCell.xib */
;
};
29DA415C200312CD002762A2
/* RepairOrderDetailViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29DA415B200312CD002762A2
/* RepairOrderDetailViewController.swift */
;
};
29DA416020031329002762A2
/* RepairOrderDetailSectionView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29DA415F20031329002762A2
/* RepairOrderDetailSectionView.xib */
;
};
29DA416220031377002762A2
/* RepairOrderDetailBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29DA416120031377002762A2
/* RepairOrderDetailBottomView.swift */
;
};
29DA41642003137E002762A2
/* RepairOrderDetailBottomView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29DA41632003137E002762A2
/* RepairOrderDetailBottomView.xib */
;
};
29DA41662003163D002762A2
/* RepairOrderDetailSectionView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29DA41652003163D002762A2
/* RepairOrderDetailSectionView.swift */
;
};
29DA4169200334BC002762A2
/* RepairOrderSubOrderTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29DA4167200334BC002762A2
/* RepairOrderSubOrderTableViewCell.swift */
;
};
29DA416A200334BC002762A2
/* RepairOrderSubOrderTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29DA4168200334BC002762A2
/* RepairOrderSubOrderTableViewCell.xib */
;
};
...
...
@@ -167,6 +165,8 @@
296FE44B1FFB5CAB00810820
/* HomeTableViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HomeTableViewController.swift
;
sourceTree
=
"<group>"
;
};
296FE44D1FFB5D9A00810820
/* HomeTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HomeTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
296FE4571FFB7CED00810820
/* function.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.xml
;
path
=
function.plist
;
sourceTree
=
"<group>"
;
};
29A8D9A42011C602001E865C
/* RepairAttachmentTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RepairAttachmentTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
29A8D9A52011C602001E865C
/* RepairAttachmentTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
RepairAttachmentTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
29B0C6691FEA382F00FF37ED
/* MBProgressView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MBProgressView.swift
;
sourceTree
=
"<group>"
;
};
29B0C66B1FEA3A7000FF37ED
/* LaunchScreen.storyboard */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.storyboard
;
path
=
LaunchScreen.storyboard
;
sourceTree
=
"<group>"
;
};
29D530671FFF626500851F00
/* FunctionViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FunctionViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -185,12 +185,8 @@
29D530901FFF6FA800851F00
/* PhotoAttachmentViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoAttachmentViewController.swift
;
sourceTree
=
"<group>"
;
};
29D530921FFF715D00851F00
/* PhotoAttachmentViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoAttachmentViewModel.swift
;
sourceTree
=
"<group>"
;
};
29D530941FFF724600851F00
/* PhotoAttachmentCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoAttachmentCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
29D530961FFF76DB00851F00
/* RepairAttachmentTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RepairAttachmentTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
29D530971FFF76DB00851F00
/* RepairAttachmentTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
RepairAttachmentTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
29DA415B200312CD002762A2
/* RepairOrderDetailViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RepairOrderDetailViewController.swift
;
sourceTree
=
"<group>"
;
};
29DA415F20031329002762A2
/* RepairOrderDetailSectionView.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
RepairOrderDetailSectionView.xib
;
sourceTree
=
"<group>"
;
};
29DA416120031377002762A2
/* RepairOrderDetailBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RepairOrderDetailBottomView.swift
;
sourceTree
=
"<group>"
;
};
29DA41632003137E002762A2
/* RepairOrderDetailBottomView.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
RepairOrderDetailBottomView.xib
;
sourceTree
=
"<group>"
;
};
29DA41652003163D002762A2
/* RepairOrderDetailSectionView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RepairOrderDetailSectionView.swift
;
sourceTree
=
"<group>"
;
};
29DA4167200334BC002762A2
/* RepairOrderSubOrderTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RepairOrderSubOrderTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
29DA4168200334BC002762A2
/* RepairOrderSubOrderTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
RepairOrderSubOrderTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
...
...
@@ -472,12 +468,10 @@
isa
=
PBXGroup
;
children
=
(
29D530771FFF626500851F00
/* RepairOrderTableViewCell.swift */
,
29
D530961FFF76DB00851F00
/* RepairAttachmentTableViewCell.swift */
,
29
D530971FFF76DB00851F00
/* RepairAttachmentTableViewCell.xib */
,
29
A8D9A42011C602001E865C
/* RepairAttachmentTableViewCell.swift */
,
29
A8D9A52011C602001E865C
/* RepairAttachmentTableViewCell.xib */
,
29DA41652003163D002762A2
/* RepairOrderDetailSectionView.swift */
,
29DA415F20031329002762A2
/* RepairOrderDetailSectionView.xib */
,
29DA416120031377002762A2
/* RepairOrderDetailBottomView.swift */
,
29DA41632003137E002762A2
/* RepairOrderDetailBottomView.xib */
,
29DA4167200334BC002762A2
/* RepairOrderSubOrderTableViewCell.swift */
,
29DA4168200334BC002762A2
/* RepairOrderSubOrderTableViewCell.xib */
,
29DA416B2003419A002762A2
/* RepairOrderDetailSuspendView.swift */
,
...
...
@@ -985,12 +979,12 @@
29DA417C200367F5002762A2
/* RepairOrderEditSonOrderCompleteView.xib in Resources */
,
296FE4391FFB1DB300810820
/* Main.storyboard in Resources */
,
29DA416020031329002762A2
/* RepairOrderDetailSectionView.xib in Resources */
,
29A8D9A72011C602001E865C
/* RepairAttachmentTableViewCell.xib in Resources */
,
296FE4401FFB2D3400810820
/* Function.storyboard in Resources */
,
29B0C66C1FEA3A7000FF37ED
/* LaunchScreen.storyboard in Resources */
,
296FE4581FFB7CED00810820
/* function.plist in Resources */
,
29516A92200DEE9500C3A17E
/* RepairOrderAttachmentTableViewCell.xib in Resources */
,
29516A8A200DEC4400C3A17E
/* MaintainBeforAttachmentTableViewCell.xib in Resources */
,
29DA41642003137E002762A2
/* RepairOrderDetailBottomView.xib in Resources */
,
29516A8E200DEC5A00C3A17E
/* MaintainAfterAttachmentTableViewCell.xib in Resources */
,
29DA416A200334BC002762A2
/* RepairOrderSubOrderTableViewCell.xib in Resources */
,
296FE43E1FFB2D2700810820
/* Home.storyboard in Resources */
,
...
...
@@ -998,7 +992,6 @@
29DA416E2003419F002762A2
/* RepairOrderDetailSuspendView.xib in Resources */
,
296FE4421FFB36D600810820
/* Me.storyboard in Resources */
,
29EA0BF81FEA3156005A6170
/* Assets.xcassets in Resources */
,
29D530991FFF76DB00851F00
/* RepairAttachmentTableViewCell.xib in Resources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -1013,7 +1006,6 @@
inputPaths
=
(
"${SRCROOT}/Pods/Target Support Files/Pods-IFS/Pods-IFS-frameworks.sh"
,
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework"
,
"${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework"
,
"${BUILT_PRODUCTS_DIR}/DZNEmptyDataSet/DZNEmptyDataSet.framework"
,
"${BUILT_PRODUCTS_DIR}/DeviceKit/DeviceKit.framework"
,
"${BUILT_PRODUCTS_DIR}/FDFullscreenPopGesture/FDFullscreenPopGesture.framework"
,
...
...
@@ -1040,7 +1032,6 @@
name
=
"[CP] Embed Pods Frameworks"
;
outputPaths
=
(
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Async.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DZNEmptyDataSet.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DeviceKit.framework"
,
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FDFullscreenPopGesture.framework"
,
...
...
@@ -1120,7 +1111,6 @@
29F6B9002008A34700EE4630
/* RepairOrderDetailBgController.swift in Sources */
,
29EA0C0D1FEA3156005A6170
/* Color+Extension.swift in Sources */
,
29D5307F1FFF626500851F00
/* RepairOrderAddTableViewController.swift in Sources */
,
29DA416220031377002762A2
/* RepairOrderDetailBottomView.swift in Sources */
,
29EA0C061FEA3156005A6170
/* BaseViewModel.swift in Sources */
,
29DA418620046E86002762A2
/* AboutUsTableViewController.swift in Sources */
,
29EA0BFF1FEA3156005A6170
/* TabBarViewController.swift in Sources */
,
...
...
@@ -1163,9 +1153,9 @@
29D5307B1FFF626500851F00
/* FunctionModel.swift in Sources */
,
29EA0C141FEA3156005A6170
/* UIViewController+Extension.swift in Sources */
,
29EA0C0E1FEA3156005A6170
/* Date+Extensions.swift in Sources */
,
29A8D9A62011C602001E865C
/* RepairAttachmentTableViewCell.swift in Sources */
,
29F6B8FE20088B2B00EE4630
/* RepairOrderDetailResultModel.swift in Sources */
,
29F6B8F0200753CD00EE4630
/* SaveRepairOrderModel.swift in Sources */
,
29D530981FFF76DB00851F00
/* RepairAttachmentTableViewCell.swift in Sources */
,
296FE44E1FFB5D9A00810820
/* HomeTableViewCell.swift in Sources */
,
29EA0C0C1FEA3156005A6170
/* Urls.swift in Sources */
,
29DA417820036763002762A2
/* RepairOrderChildBillDetailViewController.swift in Sources */
,
...
...
IFS/IFS/Expand/Const/Urls.swift
View file @
714c2739
...
...
@@ -14,12 +14,12 @@ import Foundation
//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
BaseAttachmentUrl
:
String
=
"http://222.180.250.18:7080"
//
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 BaseUrl: String = "http://dev.gomoretech.com/ifs-server/rest"
//
public let BaseAttachmentUrl: String = "http://dev.gomoretech.com"
public
let
BaseUrl
:
String
=
"http://dev.gomoretech.com/ifs-server/rest"
public
let
BaseAttachmentUrl
:
String
=
"http://dev.gomoretech.com"
/// 登录
public
let
loginUrl
:
String
=
"/user/login/%@"
...
...
IFS/IFS/Expand/Network/NetworkAPI.swift
View file @
714c2739
...
...
@@ -120,7 +120,7 @@ extension Service: TargetType {
case
.
QuerybrokenOption
:
return
brokenOptionUrl
case
.
QueryprocessMethods
:
return
pro
tectOption
Url
return
pro
cessMethods
Url
case
.
CompleteOrder
:
return
completedBillUrl
case
.
UploadAttachment
(
let
model
):
...
...
IFS/IFS/Expand/Public/PhotoAttachment/Controller/PhotoAttachmentViewController.swift
View file @
714c2739
...
...
@@ -171,13 +171,16 @@ extension PhotoAttachmentViewController: ImagePickerDelegate {
// MARK: - 删除附件
extension
PhotoAttachmentViewController
:
DeleteAttachmentDelegate
{
func
deleteAttachment
(
_
indexPath
:
IndexPath
)
{
attachmentViewModel
.
photoAttachments
.
remove
(
at
:
indexPath
.
item
)
let
count
=
attachmentViewModel
.
photoAttachments
.
count
let
height
=
attachmentHeight
(
count
,
key
)
ShowAlertView
(
hint
,
"确定删除此附件吗?"
,
[
cancel
,
sure
],
.
actionSheet
)
{[
weak
self
]
(
index
)
in
if
index
==
kZERO
{
return
}
self
?
.
attachmentViewModel
.
photoAttachments
.
remove
(
at
:
indexPath
.
item
)
let
count
=
self
?
.
attachmentViewModel
.
photoAttachments
.
count
let
height
=
self
?
.
attachmentHeight
(
count
!
,
self
?
.
key
)
DispatchQueue
.
main
.
async
(
execute
:
{
self
.
photoAttachmentCollectionView
.
reloadData
()
self
.
delegate
?
.
updatePhotoAttachment
(
height
,
self
.
key
)
self
?
.
photoAttachmentCollectionView
.
reloadData
()
self
?
.
delegate
?
.
updatePhotoAttachment
(
height
!
,
self
?
.
key
)
})
}
}
}
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderAddTableViewController.swift
View file @
714c2739
...
...
@@ -12,7 +12,6 @@ import SKPhotoBrowser
import
RxSwift
import
RxCocoa
import
SVProgressHUD
import
Async
class
RepairOrderAddTableViewController
:
BaseTableViewController
{
...
...
@@ -82,22 +81,25 @@ class RepairOrderAddTableViewController: BaseTableViewController {
// MARK: - 提交工单--上传附件
@objc
fileprivate
func
submitButtonClickAction
()
{
if
!
repairOrderAddViewModel
.
repairOrderAvailable
(
facilitiesSwitch
)
{
return
}
ShowAlertView
(
hint
,
"确认提交此工单吗?"
,
[
cancel
,
sure
],
.
alert
)
{[
weak
self
]
(
index
)
in
if
index
==
kZERO
{
return
}
var
fileUrlArray
=
Array
<
String
>
()
for
i
in
0
..<
attachmentVc
.
attachmentViewModel
.
photoAttachments
.
count
-
1
{
let
image
=
attachmentVc
.
attachmentViewModel
.
photoAttachments
[
i
]
let
imageName
=
randomMD5
()
let
fileUrl
=
saveImage
(
currentImage
:
image
.
attachment
as!
UIImage
,
persent
:
0.8
,
imageName
:
imageName
+
".jpg"
)
fileUrlArray
.
append
(
fileUrl
)
for
i
in
0
..<
self
!.
attachmentVc
.
attachmentViewModel
.
photoAttachments
.
count
-
1
{
let
image
=
self
?
.
attachmentVc
.
attachmentViewModel
.
photoAttachments
[
i
]
let
imageName
=
self
?
.
randomMD5
()
let
fileUrl
=
self
?
.
saveImage
(
currentImage
:
image
?
.
attachment
as!
UIImage
,
persent
:
0.8
,
imageName
:
imageName
!
+
".jpg"
)
fileUrlArray
.
append
(
fileUrl
!
)
}
let
entityUuid
=
randomMD5
()
let
entityUuid
=
self
?
.
randomMD5
()
guard
fileUrlArray
.
count
!=
kZERO
else
{
submitRepairBillAction
(
entityUuid
)
self
?
.
submitRepairBillAction
(
entityUuid
!
)
return
}
var
oberverArray
=
Array
<
Observable
<
Double
>>
()
for
i
in
0
..<
fileUrlArray
.
count
{
let
fileUrl
=
fileUrlArray
[
i
]
let
model
=
UploadPhotoAttachmentModel
(
randomMD5
(),
fileUrl
,
ATTACHMENT_TYPE
.
BILL_ATTACHMENT_TYPE
.
rawValue
,
entityUuid
)
let
model
=
UploadPhotoAttachmentModel
(
self
!.
randomMD5
(),
fileUrl
,
ATTACHMENT_TYPE
.
BILL_ATTACHMENT_TYPE
.
rawValue
,
entityUuid
!
)
let
signal
=
Observable
<
Double
>.
create
({
(
oberver
)
->
Disposable
in
Network
.
upload
(
target
:
.
UploadAttachment
(
model
),
progress
:
{
(
progress
)
in
oberver
.
onNext
(
progress
)
...
...
@@ -121,18 +123,18 @@ class RepairOrderAddTableViewController: BaseTableViewController {
ShowProgressView
(
Float
(
perogress
))
break
case
.
completed
:
self
?
.
submitRepairBillAction
(
entityUuid
)
self
?
.
submitRepairBillAction
(
entityUuid
!
)
break
case
.
error
(
let
error
):
SVProgressHUD
.
showError
(
withStatus
:
error
.
localizedDescription
)
break
}
}
.
disposed
(
by
:
disposeBag
)
}
.
disposed
(
by
:
self
!.
disposeBag
)
}
}
// MARK: - 提交工单
fileprivate
func
submitRepairBillAction
(
_
entityUuid
:
String
)
{
if
repairOrderAddViewModel
.
repairOrderAvailable
(
facilitiesSwitch
)
{
repairOrderAddViewModel
.
saveOrderModel
.
attachmentId
=
entityUuid
repairOrderAddViewModel
.
submitRepairOrder
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_LIST
)))
...
...
@@ -140,7 +142,6 @@ class RepairOrderAddTableViewController: BaseTableViewController {
ShowMessage
(
"提交成功"
)
})
.
disposed
(
by
:
disposeBag
)
}
}
// MARK: - 设置附件VC
fileprivate
func
setupPhotoAttachmentVc
(){
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderChildBillDetailViewController.swift
View file @
714c2739
...
...
@@ -90,7 +90,7 @@ class RepairOrderChildBillDetailViewController: BaseTableViewController {
// MARK: - UI
fileprivate
func
uiConfigAction
()
{
title
=
billModel
.
dept
.
name
title
=
String
(
format
:
"%@工单详情"
,
billModel
.
dept
.
name
)
tableView
.
register
(
UINib
(
nibName
:
RepairOrderDetailSectionView
.
name
(),
bundle
:
nil
),
forHeaderFooterViewReuseIdentifier
:
RepairOrderDetailSectionView
.
name
())
tableView
.
register
(
UINib
(
nibName
:
MaintainBeforAttachmentTableViewCell
.
name
(),
bundle
:
nil
),
forCellReuseIdentifier
:
MaintainBeforAttachmentTableViewCell
.
name
())
tableView
.
register
(
UINib
(
nibName
:
MaintainAfterAttachmentTableViewCell
.
name
(),
bundle
:
nil
),
forCellReuseIdentifier
:
MaintainAfterAttachmentTableViewCell
.
name
())
...
...
@@ -104,6 +104,7 @@ class RepairOrderChildBillDetailViewController: BaseTableViewController {
self
?
.
childBillViewModel
.
childBillDetailAssignment
(
self
!
)
self
?
.
childBillViewModel
.
billDetailStataDispose
(
self
!
)
self
?
.
disposeAttachment
()
self
?
.
tableView
.
reloadData
()
}
.
disposed
(
by
:
disposeBag
)
}
...
...
@@ -143,14 +144,14 @@ class RepairOrderChildBillDetailViewController: BaseTableViewController {
if
indexPath
.
section
==
CHILD_BILL_DETAIL_SECTION
.
DESCRIBE
.
rawValue
{
if
indexPath
.
row
==
kONE
{
let
beforCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
MaintainBeforAttachmentTableViewCell
.
name
(),
for
:
indexPath
)
beforAttachmentVc
.
view
.
frame
=
CGRect
(
x
:
80
,
y
:
0
,
width
:
kWidth
-
8
0
,
height
:
beforAttachmentHeight
)
beforAttachmentVc
.
view
.
frame
=
CGRect
(
x
:
80
,
y
:
0
,
width
:
kWidth
-
9
0
,
height
:
beforAttachmentHeight
)
beforCell
.
contentView
.
addSubview
(
beforAttachmentVc
.
view
)
beforAttachmentVc
.
photoAttachmentCollectionView
.
reloadData
()
return
beforCell
}
if
indexPath
.
row
==
kONE
*
2
{
let
afterCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
MaintainAfterAttachmentTableViewCell
.
name
(),
for
:
indexPath
)
afterAttachmentVc
.
view
.
frame
=
CGRect
(
x
:
80
,
y
:
0
,
width
:
kWidth
-
8
0
,
height
:
afterAttachmentHeight
)
afterAttachmentVc
.
view
.
frame
=
CGRect
(
x
:
80
,
y
:
0
,
width
:
kWidth
-
9
0
,
height
:
afterAttachmentHeight
)
afterCell
.
contentView
.
addSubview
(
afterAttachmentVc
.
view
)
afterAttachmentVc
.
photoAttachmentCollectionView
.
reloadData
()
return
afterCell
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderDetailBgController.swift
View file @
714c2739
...
...
@@ -67,11 +67,11 @@ class RepairOrderDetailBgController: BaseViewController {
self
?
.
suspendView
?
.
alpha
=
alpha
}
detailVc
.
setSuspendViewStateBlock
{[
weak
self
]
(
model
,
indexPath
,
state
)
in
if
state
==
SUBMIT_REPAIR_ORDER_STATE
.
INIT
.
rawValue
{
if
state
==
SUBMIT_REPAIR_ORDER_STATE
.
INIT
.
rawValue
||
state
==
SUBMIT_REPAIR_ORDER_STATE
.
DREW
.
rawValue
{
self
?
.
setupSuspendViewAction
(
model
,
indexPath
)
}
else
{
UIView
.
animate
(
withDuration
:
kAnimationTime
,
animations
:
{
self
?
.
suspendView
?
.
set
h
(
h
:
kHeight
)
self
?
.
suspendView
?
.
set
y
(
y
:
kHeight
)
},
completion
:
{
(
bool
)
in
self
?
.
suspendView
?
.
removeFromSuperview
()
})
...
...
@@ -113,6 +113,7 @@ class RepairOrderDetailBgController: BaseViewController {
// MARK: - 设置悬浮框
fileprivate
func
setupSuspendViewAction
(
_
model
:
BillDetailExecute
,
_
indexPath
:
IndexPath
)
{
self
.
suspendView
?
.
removeFromSuperview
()
let
suspendView
=
RepairOrderDetailSuspendView
.
instantiateFromNib
()
as!
RepairOrderDetailSuspendView
suspendView
.
updateSuspendView
(
model
,
indexPath
)
suspendView
.
frame
=
CGRect
(
x
:
15
,
y
:
kHeight
,
width
:
kWidth
-
30
,
height
:
60
)
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderDetailViewController.swift
View file @
714c2739
...
...
@@ -38,6 +38,8 @@ class RepairOrderDetailViewController: BaseTableViewController {
@IBOutlet
weak
var
createTimeLab
:
UILabel
!
/// 指定时间
@IBOutlet
weak
var
requestTimeLab
:
UILabel
!
/// 位置
@IBOutlet
weak
var
positionLabel
:
UILabel
!
/// 设施
@IBOutlet
weak
var
deviceLab
:
UILabel
!
/// 设施位置
...
...
@@ -73,7 +75,11 @@ class RepairOrderDetailViewController: BaseTableViewController {
/// 工单数据
open
var
billModel
:
RepairOrderRecord
!
/// 图片附件高度
var
attachmentHeight
:
CGFloat
!
=
0
var
attachmentHeight
:
CGFloat
!
=
20
/// 子工单高度
let
childBillCellHeight
:
CGFloat
!
=
70
/// 附件每行显示个数
let
attachmentCount
:
Int
=
3
/// 图片附件
lazy
final
var
attachmentVc
:
PhotoAttachmentViewController
=
{
var
attachmentVc
=
PhotoAttachmentViewController
.
instantiateViewController
(
.
Function
)
as!
PhotoAttachmentViewController
...
...
@@ -136,7 +142,11 @@ class RepairOrderDetailViewController: BaseTableViewController {
fileprivate
func
suspendViewStateAction
()
{
for
i
in
0
..<
orderDetailViewModel
.
billDetailModel
.
executes
.
count
{
let
model
=
orderDetailViewModel
.
billDetailModel
.
executes
[
i
]
if
model
.
dept
.
uuid
==
kUser
()
.
orgUuid
&&
model
.
state
==
SUBMIT_REPAIR_ORDER_STATE
.
INIT
.
rawValue
{
if
model
.
dept
.
uuid
==
kUser
()
.
orgUuid
&&
(
model
.
state
==
SUBMIT_REPAIR_ORDER_STATE
.
INIT
.
rawValue
||
model
.
state
==
SUBMIT_REPAIR_ORDER_STATE
.
DREW
.
rawValue
)
&&
orderDetailViewModel
.
billDetailModel
.
state
!=
SUBMIT_REPAIR_ORDER_STATE
.
FINISHED
.
rawValue
&&
orderDetailViewModel
.
billDetailModel
.
state
!=
SUBMIT_REPAIR_ORDER_STATE
.
CANCLED
.
rawValue
&&
orderDetailViewModel
.
billDetailModel
.
state
!=
SUBMIT_REPAIR_ORDER_STATE
.
DELETED
.
rawValue
{
self
.
suspendViewStateBlock
(
model
,
IndexPath
(
row
:
i
,
section
:
REPAIR_ORDER_DETAIL_SECTION
.
SUBORDER
.
rawValue
),
model
.
state
)
break
}
...
...
@@ -152,17 +162,20 @@ class RepairOrderDetailViewController: BaseTableViewController {
ShowAlertView
(
hint
,
"请确认是否领单?"
,
[
cancel
,
sure
],
.
alert
,
{[
weak
self
]
(
index
)
in
if
index
==
kZERO
{
return
}
self
?
.
orderDetailViewModel
.
getChildBillAction
(
model
.
uuid
)
.
subscribe
(
onNext
:
{
()
in
ShowMessage
(
"领取成功"
)
self
?
.
getBillDetailAction
()
self
?
.
gotoEditingSonOrderVc
(
indexPath
)
ShowMessage
(
"领取成功"
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
}
else
{
childBillViewModel
.
childBillDetailData
=
ChildBillDetailData
(
fromJson
:
JSON
(
model
.
toDictionary
()))
childBillViewModel
.
finishChildBillAction
()
.
subscribe
(
onNext
:
{[
weak
self
]
()
in
ShowMessage
(
"子工单完成"
)
ShowAlertView
(
hint
,
"请确认是否完成此部门工单?"
,
[
cancel
,
sure
],
.
alert
,
{[
weak
self
]
(
index
)
in
if
index
==
kZERO
{
return
}
self
?
.
childBillViewModel
.
childBillDetailData
=
ChildBillDetailData
(
fromJson
:
JSON
(
model
.
toDictionary
()))
self
?
.
childBillViewModel
.
finishChildBillAction
()
.
subscribe
(
onNext
:
{
()
in
self
?
.
getBillDetailAction
()
})
.
disposed
(
by
:
disposeBag
)
ShowMessage
(
"子工单完成"
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
}
}
...
...
@@ -174,8 +187,11 @@ class RepairOrderDetailViewController: BaseTableViewController {
let
url
=
String
(
format
:
attachmentUrl
,
model
.
entityType
,
model
.
entityUuid
,
model
.
fileName
)
self
?
.
attachmentVc
.
attachmentViewModel
.
photoAttachments
.
append
(
PhotoAttachmentModel
(
url
,
ATTACHMENT_TYPE
.
BILL_ATTACHMENT_TYPE
.
rawValue
,
model
.
entityUuid
,
ATTACHMENT_LOCATION
.
ATTACHMENT_HTTP
))
}
self
?
.
attachmentVc
.
setItemSize
(
CGSize
(
width
:
self
!.
imageWidth
,
height
:
self
!.
imageWidth
),
3
)
self
?
.
attachmentHeight
=
self
?
.
attachmentVc
.
attachmentHeight
(
attachments
.
count
,
nil
)
self
?
.
attachmentVc
.
setItemSize
(
CGSize
(
width
:
self
!.
imageWidth
,
height
:
self
!.
imageWidth
),
self
!.
attachmentCount
)
let
attHeight
=
self
?
.
attachmentVc
.
attachmentHeight
(
attachments
.
count
,
nil
)
if
attHeight
!
>
self
!.
attachmentHeight
{
self
?
.
attachmentHeight
=
attHeight
}
self
?
.
tableView
.
reloadData
()
})
.
disposed
(
by
:
disposeBag
)
}
...
...
@@ -212,9 +228,9 @@ class RepairOrderDetailViewController: BaseTableViewController {
model
.
deptUuids
=
array
model
.
workUuid
=
orderDetailViewModel
.
billDetailModel
.
uuid
orderDetailViewModel
.
transferRepairOrderAction
(
model
)
.
subscribe
(
onNext
:
{[
weak
self
]
()
in
ShowMessage
(
"转交成功"
)
self
?
.
getBillDetailAction
()
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_LIST
)))
ShowMessage
(
"转交成功"
)
})
.
disposed
(
by
:
disposeBag
)
}
...
...
@@ -233,9 +249,9 @@ extension RepairOrderDetailViewController {
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SUBORDER
.
rawValue
{
return
orderDetailViewModel
.
dequeueChildBillReusableCell
(
RepairOrderSubOrderTableViewCell
.
name
(),
indexPath
,
tableView
)
}
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SOURCE
.
rawValue
&&
indexPath
.
row
==
1
1
{
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SOURCE
.
rawValue
&&
indexPath
.
row
==
1
2
{
let
attachmentCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
RepairOrderAttachmentTableViewCell
.
name
(),
for
:
indexPath
)
attachmentVc
.
view
.
frame
=
CGRect
(
x
:
80
,
y
:
5
,
width
:
kWidth
-
8
0
,
height
:
attachmentHeight
)
attachmentVc
.
view
.
frame
=
CGRect
(
x
:
80
,
y
:
5
,
width
:
kWidth
-
9
0
,
height
:
attachmentHeight
)
attachmentCell
.
contentView
.
addSubview
(
attachmentVc
.
view
)
return
attachmentCell
}
...
...
@@ -276,13 +292,16 @@ extension RepairOrderDetailViewController {
override
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SUBORDER
.
rawValue
{
return
70
if
indexPath
.
row
==
orderDetailViewModel
.
billDetailModel
.
executes
.
count
-
kONE
{
return
childBillCellHeight
+
10
}
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SOURCE
.
rawValue
&&
indexPath
.
row
==
10
{
return
orderDetailViewModel
.
billDetailModel
.
descriptionFieldHeight
+
20
return
childBillCellHeight
}
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SOURCE
.
rawValue
&&
indexPath
.
row
==
11
{
return
attachmentHeight
+
30
return
orderDetailViewModel
.
billDetailModel
.
descriptionFieldHeight
+
20
}
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SOURCE
.
rawValue
&&
indexPath
.
row
==
12
{
return
attachmentHeight
+
20
}
if
indexPath
.
section
==
REPAIR_ORDER_DETAIL_SECTION
.
COMPLETED
.
rawValue
&&
indexPath
.
row
==
1
{
return
orderDetailViewModel
.
billDetailModel
.
finishNoteHeight
+
20
...
...
@@ -302,14 +321,14 @@ extension RepairOrderDetailViewController {
ShowAlertView
(
hint
,
"请确认是否领单?"
,
[
cancel
,
sure
],
.
alert
,
{[
weak
self
]
(
index
)
in
if
index
==
kZERO
{
return
}
self
?
.
orderDetailViewModel
.
getChildBillAction
(
model
.
uuid
)
.
subscribe
(
onNext
:
{
()
in
ShowMessage
(
"领取成功"
)
self
?
.
getBillDetailAction
()
self
?
.
gotoEditingSonOrderVc
(
indexPath
)
ShowMessage
(
"领取成功"
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
break
case
SUBMIT_REPAIR_ORDER_STATE
.
DREW
.
rawValue
:
if
orderDetailViewModel
.
billDetailModel
.
state
==
SUBMIT_REPAIR_ORDER_STATE
.
FINISHED
.
rawValue
{
if
orderDetailViewModel
.
billDetailModel
.
state
==
SUBMIT_REPAIR_ORDER_STATE
.
FINISHED
.
rawValue
||
orderDetailViewModel
.
billDetailModel
.
state
==
SUBMIT_REPAIR_ORDER_STATE
.
CANCLED
.
rawValue
||
orderDetailViewModel
.
billDetailModel
.
state
==
SUBMIT_REPAIR_ORDER_STATE
.
DELETED
.
rawValue
{
self
.
performSegue
(
withIdentifier
:
RepairOrderChildBillDetailViewController
.
name
(),
sender
:
indexPath
)
return
}
...
...
@@ -347,9 +366,9 @@ extension RepairOrderDetailViewController {
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
if
section
==
REPAIR_ORDER_DETAIL_SECTION
.
SUBORDER
.
rawValue
{
return
kSectionTen
}
//
if section == REPAIR_ORDER_DETAIL_SECTION.SUBORDER.rawValue {
//
return kSectionTen
//
}
return
kSectionZero
}
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderEditSonOrderViewController.swift
View file @
714c2739
...
...
@@ -76,6 +76,7 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
// MARK: - UI
fileprivate
func
uiConfigAction
()
{
describeTextView
.
placeholder
=
"描述"
title
=
String
(
format
:
"完成%@工单"
,
billModel
.
dept
.
name
)
describeTextView
.
textContainerInset
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
)
}
...
...
@@ -141,13 +142,16 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
let
completeView
=
RepairOrderEditSonOrderCompleteView
.
instantiateFromNib
()
as!
RepairOrderEditSonOrderCompleteView
//完成子工单
completeView
.
completeBtn
.
rx
.
controlEvent
(
UIControlEvents
.
touchUpInside
)
.
subscribe
(
onNext
:
{[
weak
self
]
(
event
)
in
self
?
.
uploadActtachmentAction
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
ShowAlertView
(
hint
,
"确定完成此子工单吗?"
,
[
cancel
,
sure
],
.
alert
,
{
(
index
)
in
if
index
==
kZERO
{
return
}
self
?
.
uploadActtachmentAction
()
.
subscribe
(
onNext
:
{
(
result
)
in
self
?
.
childBillViewModel
.
finishChildBillAction
()
.
subscribe
(
onNext
:
{
()
in
ShowMessage
(
"子工单完成"
)
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_DETAIL_LIST
)))
self
?
.
popVC
()
ShowMessage
(
"子工单完成"
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
})
.
disposed
(
by
:
disposeBag
)
tableView
.
tableFooterView
=
completeView
navigationItem
.
rightBarButtonItem
=
createButtonItem
(
"保存"
,
nil
,
self
,
#selector(
RepairOrderEditSonOrderViewController.saveButtonClickAction
)
)
...
...
@@ -155,12 +159,14 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
// MARK: - 提交、保存子工单
@objc
fileprivate
func
saveButtonClickAction
()
{
uploadActtachmentAction
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
ShowAlertView
(
hint
,
"确定保存此子工单吗?"
,
[
cancel
,
sure
],
.
alert
)
{[
weak
self
]
(
index
)
in
self
?
.
uploadActtachmentAction
()
.
subscribe
(
onNext
:
{
(
result
)
in
self
?
.
childBillViewModel
.
saveChildBillAction
()
.
subscribe
(
onNext
:
{
()
in
ShowMessage
(
"保存成功"
)
self
?
.
popVC
()
ShowMessage
(
"保存成功"
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
.
disposed
(
by
:
disposeBag
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
}
}
// MARK: - 上传附件
...
...
IFS/IFS/Main/Business/RepairOrder/View/MaintainAfterAttachmentTableViewCell.xib
View file @
714c2739
...
...
@@ -31,6 +31,7 @@
<constraint
firstItem=
"j4V-Po-dFb"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"utU-tL-C0b"
/>
</constraints>
</tableViewCellContentView>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<point
key=
"canvasLocation"
x=
"25"
y=
"28.5"
/>
</tableViewCell>
...
...
IFS/IFS/Main/Business/RepairOrder/View/MaintainBeforAttachmentTableViewCell.xib
View file @
714c2739
...
...
@@ -31,6 +31,7 @@
<constraint
firstItem=
"IBZ-p5-QTS"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"uNv-wU-GyU"
/>
</constraints>
</tableViewCellContentView>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<point
key=
"canvasLocation"
x=
"-102"
y=
"-17"
/>
</tableViewCell>
...
...
IFS/IFS/Main/Business/RepairOrder/View/RepairOrderAttachmentTableViewCell.xib
View file @
714c2739
...
...
@@ -31,6 +31,7 @@
<constraint
firstItem=
"BEL-rn-e0r"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"egr-iP-at2"
/>
</constraints>
</tableViewCellContentView>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<point
key=
"canvasLocation"
x=
"-72"
y=
"20"
/>
</tableViewCell>
...
...
IFS/IFS/Main/Business/RepairOrder/View/RepairOrderDetailBottomView.swift
deleted
100644 → 0
View file @
d47bc6c6
//
// RepairOrderDetailBottomView.swift
// IFS
//
// Created by 曹云霄 on 2018/1/8.
// Copyright © 2018年 上海勾芒信息科技有限公司. All rights reserved.
//
import
UIKit
class
RepairOrderDetailBottomView
:
UIView
{
/// 转交
@IBOutlet
weak
var
transferButton
:
UIButton
!
/// 完成
@IBOutlet
weak
var
completeButton
:
UIButton
!
}
IFS/IFS/Main/Business/RepairOrder/View/RepairOrderDetailBottomView.xib
deleted
100644 → 0
View file @
d47bc6c6
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"13771"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13772"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"RepairOrderDetailBottomView"
customModule=
"IFS"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"70"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1mh-aC-JRq"
>
<rect
key=
"frame"
x=
"0.0"
y=
"21"
width=
"187.5"
height=
"49"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"49"
id=
"Yza-1q-CFi"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<state
key=
"normal"
title=
"转交"
/>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"OGh-UT-VCv"
>
<rect
key=
"frame"
x=
"187.5"
y=
"21"
width=
"187.5"
height=
"49"
/>
<color
key=
"backgroundColor"
red=
"0.21755459899999999"
green=
"0.53306800129999998"
blue=
"0.99824184179999997"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<state
key=
"normal"
title=
"完成"
>
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"DWW-Eq-xjB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"20"
width=
"375"
height=
"1"
/>
<color
key=
"backgroundColor"
red=
"0.94901960780000005"
green=
"0.94901960780000005"
blue=
"0.94901960780000005"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"y4N-Dd-1UD"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Aqz-jC-Q2t"
>
<rect
key=
"frame"
x=
"0.0"
y=
"69"
width=
"375"
height=
"1"
/>
<color
key=
"backgroundColor"
red=
"0.94901960780000005"
green=
"0.94901960780000005"
blue=
"0.94901960780000005"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"yfP-6J-aYK"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"1mh-aC-JRq"
secondAttribute=
"bottom"
id=
"36x-7m-r3b"
/>
<constraint
firstItem=
"OGh-UT-VCv"
firstAttribute=
"leading"
secondItem=
"1mh-aC-JRq"
secondAttribute=
"trailing"
id=
"3o0-od-HLJ"
/>
<constraint
firstItem=
"Aqz-jC-Q2t"
firstAttribute=
"trailing"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"trailing"
id=
"8fA-X7-kX2"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"OGh-UT-VCv"
secondAttribute=
"bottom"
id=
"G0O-pu-dCE"
/>
<constraint
firstItem=
"1mh-aC-JRq"
firstAttribute=
"top"
secondItem=
"DWW-Eq-xjB"
secondAttribute=
"bottom"
id=
"Z1M-y1-9yS"
/>
<constraint
firstItem=
"OGh-UT-VCv"
firstAttribute=
"width"
secondItem=
"1mh-aC-JRq"
secondAttribute=
"width"
id=
"ZtD-ny-5Rc"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"DWW-Eq-xjB"
secondAttribute=
"trailing"
id=
"bNC-PD-AEV"
/>
<constraint
firstItem=
"OGh-UT-VCv"
firstAttribute=
"trailing"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"trailing"
id=
"dM9-er-Dd0"
/>
<constraint
firstItem=
"vUN-kp-3ea"
firstAttribute=
"bottom"
secondItem=
"Aqz-jC-Q2t"
secondAttribute=
"bottom"
id=
"jd2-Ct-hvz"
/>
<constraint
firstItem=
"DWW-Eq-xjB"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"jmE-PH-fKI"
/>
<constraint
firstItem=
"1mh-aC-JRq"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"p6k-LW-ads"
/>
<constraint
firstItem=
"OGh-UT-VCv"
firstAttribute=
"height"
secondItem=
"1mh-aC-JRq"
secondAttribute=
"height"
id=
"rxI-cN-5oE"
/>
<constraint
firstItem=
"Aqz-jC-Q2t"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"wvI-jq-ap2"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"vUN-kp-3ea"
/>
<connections>
<outlet
property=
"completeButton"
destination=
"OGh-UT-VCv"
id=
"vk6-oA-yP7"
/>
<outlet
property=
"transferButton"
destination=
"1mh-aC-JRq"
id=
"P0y-jq-TXN"
/>
</connections>
<point
key=
"canvasLocation"
x=
"-100.5"
y=
"-210"
/>
</view>
</objects>
</document>
IFS/IFS/Main/Business/RepairOrder/View/RepairOrderDetailSuspendView.swift
View file @
714c2739
...
...
@@ -47,11 +47,11 @@ class RepairOrderDetailSuspendView: UIView {
operationTimeLab
.
text
=
model
.
lastModifyTime
departmentLab
.
text
=
model
.
dept
.
name
switch
model
.
state
{
case
SUBMIT_REPAIR_ORDER_STATE
.
DREW
.
rawValue
:
case
SUBMIT_REPAIR_ORDER_STATE
.
INIT
.
rawValue
:
operationOrderBtn
.
setTitle
(
SUSPEND_BUTTON_TYPE
.
GET
.
rawValue
,
for
:
.
normal
)
operationOrderBtn
.
backgroundColor
=
kBlueColor
break
case
SUBMIT_REPAIR_ORDER_STATE
.
D
ONE
.
rawValue
:
case
SUBMIT_REPAIR_ORDER_STATE
.
D
REW
.
rawValue
:
operationOrderBtn
.
setTitle
(
SUSPEND_BUTTON_TYPE
.
COMPLETED
.
rawValue
,
for
:
.
normal
)
operationOrderBtn
.
backgroundColor
=
kYellowColor
break
...
...
IFS/IFS/Main/Business/RepairOrder/View/RepairOrderSubOrderTableViewCell.xib
View file @
714c2739
...
...
@@ -50,6 +50,7 @@
</subviews>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"WXJ-0x-D52"
secondAttribute=
"trailing"
constant=
"15"
id=
"E7i-7V-QDq"
/>
<constraint
firstAttribute=
"height"
constant=
"60"
id=
"JJB-hv-kxn"
/>
<constraint
firstItem=
"jv3-76-R1p"
firstAttribute=
"centerY"
secondItem=
"iXK-9n-8CZ"
secondAttribute=
"centerY"
multiplier=
"0.6"
id=
"OoP-za-6WD"
/>
<constraint
firstItem=
"2Os-EU-PFL"
firstAttribute=
"centerY"
secondItem=
"JPd-pD-Y4s"
secondAttribute=
"centerY"
id=
"SAb-QY-DX7"
/>
<constraint
firstItem=
"WXJ-0x-D52"
firstAttribute=
"centerY"
secondItem=
"jv3-76-R1p"
secondAttribute=
"centerY"
id=
"dQC-3e-fCi"
/>
...
...
@@ -61,12 +62,12 @@
</view>
</subviews>
<constraints>
<constraint
firstItem=
"iXK-9n-8CZ"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"10"
id=
"0FS-NV-dAg"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"iXK-9n-8CZ"
secondAttribute=
"trailing"
constant=
"15"
id=
"4Ki-3e-u2u"
/>
<constraint
firstItem=
"iXK-9n-8CZ"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"10"
id=
"6m3-VS-Pp5"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"iXK-9n-8CZ"
secondAttribute=
"bottom"
id=
"EJ3-vT-i23"
/>
<constraint
firstItem=
"iXK-9n-8CZ"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"hdP-Ty-wso"
/>
</constraints>
</tableViewCellContentView>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"contentBgView"
destination=
"iXK-9n-8CZ"
id=
"fiE-6x-Xdz"
/>
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/RepairOrderAddViewModel.swift
View file @
714c2739
...
...
@@ -55,8 +55,12 @@ extension RepairOrderAddViewModel {
ShowMessage
(
"请选择工单指定时间"
)
return
false
}
guard
saveOrderModel
.
reporterPhone
!=
nil
else
{
ShowMessage
(
"请输入报事人电话"
)
guard
NSString
(
string
:
saveOrderModel
.
reporterPhone
)
.
isTelephone
()
!=
false
else
{
ShowMessage
(
"报事人电话格式不正确"
)
return
false
}
guard
saveOrderModel
.
position
!=
nil
else
{
ShowMessage
(
"请选择工单指定位置"
)
return
false
}
guard
saveOrderModel
.
position
!=
nil
else
{
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/RepairOrderDetailViewModel.swift
View file @
714c2739
...
...
@@ -145,27 +145,36 @@ extension RepairOrderDetailViewModel {
// MARK: - 工单详情赋值
func
billDetailAssignment
(
_
controller
:
RepairOrderDetailViewController
)
{
controller
.
sourceLab
.
text
=
billDetailModel
.
source
controller
.
serverTypeLab
.
text
=
billDetailModel
.
serviceType
controller
.
priorityLab
.
text
=
billDetailModel
.
level
controller
.
sourceLab
.
text
=
disposeEmpty
(
billDetailModel
.
source
)
controller
.
serverTypeLab
.
text
=
disposeEmpty
(
billDetailModel
.
serviceType
)
controller
.
priorityLab
.
text
=
disposeEmpty
(
billDetailModel
.
level
)
if
billDetailModel
.
reportUser
!=
nil
{
controller
.
userLab
.
text
=
billDetailModel
.
reportUser
.
name
controller
.
userLab
.
text
=
disposeEmpty
(
billDetailModel
.
reportUser
.
name
)
}
controller
.
phoneLab
.
text
=
billDetailModel
.
reporterPhone
controller
.
createTimeLab
.
text
=
billDetailModel
.
createTime
controller
.
requestTimeLab
.
text
=
billDetailModel
.
requestTime
controller
.
phoneLab
.
text
=
disposeEmpty
(
billDetailModel
.
reporterPhone
)
controller
.
createTimeLab
.
text
=
disposeEmpty
(
billDetailModel
.
createTime
)
controller
.
requestTimeLab
.
text
=
disposeEmpty
(
billDetailModel
.
requestTime
)
if
billDetailModel
.
device
!=
nil
{
controller
.
deviceLocationLab
.
text
=
billDetailModel
.
deviceadree
controller
.
deviceLab
.
text
=
billDetailModel
.
device
.
name
controller
.
brokenTimeLab
.
text
=
billDetailModel
.
brokenTime
controller
.
deviceLocationLab
.
text
=
disposeEmpty
(
billDetailModel
.
deviceadree
)
controller
.
deviceLab
.
text
=
disposeEmpty
(
billDetailModel
.
device
.
name
)
controller
.
brokenTimeLab
.
text
=
disposeEmpty
(
billDetailModel
.
brokenTime
)
}
if
billDetailModel
.
position
!=
nil
{
controller
.
deviceLocationLab
.
text
=
billDetailModel
.
position
.
name
controller
.
positionLabel
.
text
=
disposeEmpty
(
billDetailModel
.
position
.
name
)
}
controller
.
descriptionLab
.
text
=
billDetailModel
.
descriptionField
controller
.
deviceLocationLab
.
text
=
disposeEmpty
(
billDetailModel
.
deviceadree
)
controller
.
descriptionLab
.
text
=
disposeEmpty
(
billDetailModel
.
descriptionField
)
controller
.
billNumberLab
.
text
=
billDetailModel
.
workNo
controller
.
isSolveLabel
.
text
=
billDetailModel
.
finish
?
"是"
:
"否"
controller
.
completionLabel
.
text
=
billDetailModel
.
finishNote
controller
.
completionLabel
.
text
=
disposeEmpty
(
billDetailModel
.
finishNote
)
}
// MARK: - 处理空数据
func
disposeEmpty
(
_
string
:
String
)
->
String
?
{
if
string
.
isEmpty
{
return
"---"
}
return
string
}
// MARK: - 工单详情状态处理
...
...
@@ -261,7 +270,11 @@ extension RepairOrderDetailViewModel {
break
case
REPAIR_ORDER_DETAIL_SECTION
.
SUBORDER
.
rawValue
:
sectionView
.
sectionStateLabel
.
text
=
"创建"
// sectionView.stateTimeLabel.text = billDetailModel.executes.first?.createTime
if
billDetailModel
.
executes
!=
nil
{
sectionView
.
stateTimeLabel
.
text
=
billDetailModel
.
executes
.
first
?
.
createTime
}
else
{
sectionView
.
stateTimeLabel
.
text
=
nil
}
break
case
REPAIR_ORDER_DETAIL_SECTION
.
COMPLETED
.
rawValue
:
sectionView
.
sectionStateLabel
.
text
=
"完成情况"
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/RepairOrderViewModel.swift
View file @
714c2739
...
...
@@ -138,6 +138,7 @@ extension RepairOrderViewModel {
sender
.
addBorder
(
1.0
,
kGaryColor
)
sender
.
setTitle
(
text
,
for
:
.
normal
)
sender
.
horizontalCenterTitleAndImage
(
5
)
self
?
.
queryModel
.
source
=
text
observer
.
onNext
(())
},
cancel
:
{
sender
.
isSelected
=
false
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/ReparirChildBillViewModel.swift
View file @
714c2739
...
...
@@ -210,22 +210,21 @@ extension ReparirChildBillViewModel {
// MARK: - 子工单赋值.查看
func
childBillDetailAssignment
(
_
controller
:
RepairOrderChildBillDetailViewController
)
{
controller
.
workPersonLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
processor
)
controller
.
placeTimeLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
processBegin
)
controller
.
leaveTimeLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
processBegin
)
controller
.
failureCauseLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
reason
)
controller
.
processModeLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
processMode
)
controller
.
materialCostLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
materielfee
)
controller
.
workPersonLabel
.
text
=
disposeEmpty2
(
childBillDetailData
.
processor
)
controller
.
placeTimeLabel
.
text
=
disposeEmpty2
(
childBillDetailData
.
processBegin
)
controller
.
leaveTimeLabel
.
text
=
disposeEmpty2
(
childBillDetailData
.
processBegin
)
controller
.
failureCauseLabel
.
text
=
disposeEmpty2
(
childBillDetailData
.
reason
)
controller
.
processModeLabel
.
text
=
disposeEmpty2
(
childBillDetailData
.
processMode
)
if
childBillDetailData
.
owner
!=
nil
{
controller
.
operatorNameLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
owner
.
name
)
controller
.
operatorNameLabel
.
text
=
disposeEmpty
2
(
childBillDetailData
.
owner
.
name
)
}
controller
.
materialCostLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
materielfee
)
controller
.
costLaborLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
labourfee
)
controller
.
describeLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
note
)
controller
.
safetyProtectionLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
processMode
)
controller
.
backupsToolLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
property1
)
controller
.
billNumberTimeLabel
.
text
=
disposeEmpty
(
childBillDetailData
.
ownerTime
)
controller
.
billNumberLab
.
text
=
disposeEmpty
(
childBillDetailData
.
executeNo
)
controller
.
materialCostLabel
.
text
=
disposeEmpty
2
(
childBillDetailData
.
materielfee
)
controller
.
costLaborLabel
.
text
=
disposeEmpty
2
(
childBillDetailData
.
labourfee
)
controller
.
describeLabel
.
text
=
disposeEmpty
2
(
childBillDetailData
.
note
)
controller
.
safetyProtectionLabel
.
text
=
disposeEmpty
2
(
childBillDetailData
.
property2
)
controller
.
backupsToolLabel
.
text
=
disposeEmpty
2
(
childBillDetailData
.
property1
)
controller
.
billNumberTimeLabel
.
text
=
disposeEmpty
2
(
childBillDetailData
.
ownerTime
)
controller
.
billNumberLab
.
text
=
disposeEmpty
2
(
childBillDetailData
.
executeNo
)
}
// MARK: - 处理空数据
...
...
@@ -236,6 +235,14 @@ extension ReparirChildBillViewModel {
return
string
}
// MARK: - 处理空数据
func
disposeEmpty2
(
_
string
:
String
)
->
String
?
{
if
string
.
isEmpty
{
return
"---"
}
return
string
}
// MARK: - 工单详情状态处理
func
billDetailStataDispose
(
_
controller
:
RepairOrderChildBillDetailViewController
)
{
switch
childBillDetailData
.
state
{
...
...
@@ -293,6 +300,10 @@ extension ReparirChildBillViewModel {
switch
indexPath
{
case
IndexPath
(
row
:
0
,
section
:
0
):
filterViewModel
.
queryToolOption
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
if
result
.
isEmpty
{
ShowMessage
(
"无数据"
)
return
}
YXPickerManager
.
share
()
.
showGeneralPickerView
(
kMainColor
,
dataArray
:
result
,
defaultString
:
controller
.
toolOptionLabel
.
text
,
commit
:
{
(
text
,
index
)
in
controller
.
toolOptionLabel
.
text
=
text
controller
.
toolOptionLabel
.
textColor
=
kBlackColor
...
...
@@ -302,6 +313,10 @@ extension ReparirChildBillViewModel {
break
case
IndexPath
(
row
:
1
,
section
:
0
):
filterViewModel
.
queryProtectOption
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
if
result
.
isEmpty
{
ShowMessage
(
"无数据"
)
return
}
YXPickerManager
.
share
()
.
showGeneralPickerView
(
kMainColor
,
dataArray
:
result
,
defaultString
:
controller
.
protectOptionLabel
.
text
,
commit
:
{
(
text
,
index
)
in
controller
.
protectOptionLabel
.
text
=
text
controller
.
protectOptionLabel
.
textColor
=
kBlackColor
...
...
@@ -311,6 +326,10 @@ extension ReparirChildBillViewModel {
break
case
IndexPath
(
row
:
2
,
section
:
0
):
filterViewModel
.
queryInitiator
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
if
result
.
isEmpty
{
ShowMessage
(
"无数据"
)
return
}
let
publicFilterVc
=
FilterViewController
.
instantiateViewController
(
.
Function
)
as!
FilterViewController
for
model
in
result
{
let
filterModel
=
PublicFilterModel
(
uuid
:
model
.
uuid
,
title
:
model
.
name
,
isSelected
:
"
\(
kZERO
)
"
)
...
...
@@ -344,6 +363,10 @@ extension ReparirChildBillViewModel {
break
case
IndexPath
(
row
:
5
,
section
:
0
):
filterViewModel
.
queryBrokenOption
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
if
result
.
isEmpty
{
ShowMessage
(
"无数据"
)
return
}
YXPickerManager
.
share
()
.
showGeneralPickerView
(
kMainColor
,
dataArray
:
result
,
defaultString
:
controller
.
failureCauseLabel
.
text
,
commit
:
{
(
text
,
index
)
in
controller
.
failureCauseLabel
.
text
=
text
controller
.
failureCauseLabel
.
textColor
=
kBlackColor
...
...
@@ -353,6 +376,10 @@ extension ReparirChildBillViewModel {
break
case
IndexPath
(
row
:
6
,
section
:
0
):
filterViewModel
.
queryProcessMethods
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
if
result
.
isEmpty
{
ShowMessage
(
"无数据"
)
return
}
YXPickerManager
.
share
()
.
showGeneralPickerView
(
kMainColor
,
dataArray
:
result
,
defaultString
:
controller
.
processModeLabel
.
text
,
commit
:
{
(
text
,
index
)
in
controller
.
processModeLabel
.
text
=
text
controller
.
processModeLabel
.
textColor
=
kBlackColor
...
...
@@ -378,7 +405,7 @@ extension ReparirChildBillViewModel {
break
case
CHILD_BILL_DETAIL_SECTION
.
DESCRIBE
.
rawValue
:
sectionView
.
sectionStateLabel
.
text
=
"创建"
sectionView
.
stateTimeLabel
.
text
=
childBillDetailData
.
create
Time
sectionView
.
stateTimeLabel
.
text
=
childBillDetailData
.
lastModify
Time
break
default
:
break
...
...
IFS/IFS/Main/Business/Todo/Controller/TodoViewController.swift
View file @
714c2739
...
...
@@ -22,6 +22,12 @@ class TodoViewController: BaseTableViewPullController {
return
todoViewModel
}()
/// 工单详情ViewModel
lazy
final
var
orderDetailViewModel
:
RepairOrderDetailViewModel
=
{
var
orderDetailViewModel
=
RepairOrderDetailViewModel
()
return
orderDetailViewModel
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -60,14 +66,27 @@ class TodoViewController: BaseTableViewPullController {
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
let
model
=
todoViewModel
.
todoResultArray
[
indexPath
.
row
]
switch
model
.
state
{
case
SUBMIT_REPAIR_ORDER_STATE
.
INIT
.
rawValue
:
ShowAlertView
(
hint
,
"请确认是否领单?"
,
[
cancel
,
sure
],
.
alert
,
{[
weak
self
]
(
index
)
in
if
index
==
kZERO
{
return
}
self
?
.
orderDetailViewModel
.
getChildBillAction
(
model
.
uuid
)
.
subscribe
(
onNext
:
{
()
in
self
?
.
loadWebDataSource
()
ShowMessage
(
"领取成功"
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
break
case
SUBMIT_REPAIR_ORDER_STATE
.
DREW
.
rawValue
:
let
childBillVc
=
RepairOrderEditSonOrderViewController
.
instantiateViewController
(
.
Function
)
as!
RepairOrderEditSonOrderViewController
childBillVc
.
billModel
=
BillDetailExecute
(
fromJson
:
JSON
(
model
.
toDictionary
()))
pushVC
(
childBillVc
)
break
case
SUBMIT_REPAIR_ORDER_STATE
.
DONE
.
rawValue
:
let
childBillVc
=
RepairOrderChildBillDetailViewController
.
instantiateViewController
(
.
Function
)
as!
RepairOrderChildBillDetailViewController
childBillVc
.
billModel
=
BillDetailExecute
(
fromJson
:
JSON
(
model
.
toDictionary
()))
pushVC
(
childBillVc
)
break
default
:
break
}
...
...
IFS/IFS/Main/Home/Controller/HomeTableViewController.swift
View file @
714c2739
...
...
@@ -22,6 +22,12 @@ class HomeTableViewController: BaseTableViewPullController {
return
todoViewModel
}()
/// 工单详情ViewModel
lazy
final
var
orderDetailViewModel
:
RepairOrderDetailViewModel
=
{
var
orderDetailViewModel
=
RepairOrderDetailViewModel
()
return
orderDetailViewModel
}()
/// 待办状态
open
var
todoState
:
TODO_STATE
!
...
...
@@ -63,6 +69,15 @@ class HomeTableViewController: BaseTableViewPullController {
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
let
model
=
todoViewModel
.
todoResultArray
[
indexPath
.
row
]
switch
model
.
state
{
case
SUBMIT_REPAIR_ORDER_STATE
.
INIT
.
rawValue
:
ShowAlertView
(
hint
,
"请确认是否领单?"
,
[
cancel
,
sure
],
.
alert
,
{[
weak
self
]
(
index
)
in
if
index
==
kZERO
{
return
}
self
?
.
orderDetailViewModel
.
getChildBillAction
(
model
.
uuid
)
.
subscribe
(
onNext
:
{
()
in
self
?
.
loadWebDataSource
()
ShowMessage
(
"领取成功"
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
break
case
SUBMIT_REPAIR_ORDER_STATE
.
DREW
.
rawValue
:
let
childBillVc
=
RepairOrderEditSonOrderViewController
.
instantiateViewController
(
.
Function
)
as!
RepairOrderEditSonOrderViewController
childBillVc
.
billModel
=
BillDetailExecute
(
fromJson
:
JSON
(
model
.
toDictionary
()))
...
...
IFS/IFS/Main/Storyboards/Function.storyboard
View file @
714c2739
...
...
@@ -211,7 +211,7 @@
<tableView
key=
"view"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
showsHorizontalScrollIndicator=
"NO"
showsVerticalScrollIndicator=
"NO"
dataMode=
"static"
style=
"grouped"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"1"
id=
"yx6-hd-SjZ"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"812"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite
"
/>
<color
key=
"backgroundColor"
cocoaTouchSystemColor=
"groupTableViewBackgroundColor
"
/>
<sections>
<tableViewSection
id=
"PjV-OC-1ZJ"
>
<cells>
...
...
@@ -229,8 +229,8 @@
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"rXb-UC-5Fi"
/>
</constraints>
</view>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"state_
selected
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hPh-1i-LfN"
>
<rect
key=
"frame"
x=
"
47"
y=
"24"
width=
"23"
height=
"23
"
/>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"state_
default
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hPh-1i-LfN"
>
<rect
key=
"frame"
x=
"
60"
y=
"30.666666666666671"
width=
"10"
height=
"10
"
/>
</imageView>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"state_default"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nIc-Ck-mKb"
>
<rect
key=
"frame"
x=
"182.66666666666666"
y=
"30.666666666666671"
width=
"10"
height=
"10"
/>
...
...
@@ -239,19 +239,19 @@
<rect
key=
"frame"
x=
"305"
y=
"30.666666666666671"
width=
"10"
height=
"10"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"已发出"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gRy-pu-9Bq"
>
<rect
key=
"frame"
x=
"
38.666666666666664"
y=
"57.666666666666657"
width=
"39.999999999999993"
height=
"16
"
/>
<rect
key=
"frame"
x=
"
45.333333333333343"
y=
"51.333333333333336"
width=
"40"
height=
"16.000000000000007
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"13"
/>
<color
key=
"textColor"
red=
"0.21755459899999999"
green=
"0.53306800129999998"
blue=
"0.99824184179999997"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite
"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"处理中"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"0HP-jr-VQ3"
>
<rect
key=
"frame"
x=
"167.66666666666666"
y=
"5
7.666666666666657"
width=
"40"
height=
"16
"
/>
<rect
key=
"frame"
x=
"167.66666666666666"
y=
"5
1.333333333333336"
width=
"40"
height=
"16.000000000000007
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"13"
/>
<color
key=
"textColor"
red=
"0.66666666666666663"
green=
"0.66666666666666663"
blue=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"已完成"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ybu-pP-YQz"
>
<rect
key=
"frame"
x=
"290"
y=
"5
7.666666666666657"
width=
"40"
height=
"16
"
/>
<rect
key=
"frame"
x=
"290"
y=
"5
1.333333333333336"
width=
"40"
height=
"16.000000000000007
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -492,9 +492,37 @@
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"
Jdx-Ql-rJL
"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"
l2y-gs-GSi
"
>
<rect
key=
"frame"
x=
"0.0"
y=
"384"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"l2y-gs-GSi"
id=
"tGI-n3-Qhb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"位置"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gNx-v4-eC1"
>
<rect
key=
"frame"
x=
"15"
y=
"7"
width=
"27"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
verticalHuggingPriority=
"251"
text=
"---"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"4YN-xv-6aj"
>
<rect
key=
"frame"
x=
"90"
y=
"7"
width=
"18.666666666666671"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstItem=
"gNx-v4-eC1"
firstAttribute=
"centerY"
secondItem=
"tGI-n3-Qhb"
secondAttribute=
"centerY"
id=
"EW3-ab-qWn"
/>
<constraint
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"4YN-xv-6aj"
secondAttribute=
"trailing"
constant=
"15"
id=
"X6W-P4-OqJ"
/>
<constraint
firstItem=
"4YN-xv-6aj"
firstAttribute=
"centerY"
secondItem=
"gNx-v4-eC1"
secondAttribute=
"centerY"
id=
"hN4-KH-fAL"
/>
<constraint
firstItem=
"4YN-xv-6aj"
firstAttribute=
"leading"
secondItem=
"tGI-n3-Qhb"
secondAttribute=
"leading"
constant=
"90"
id=
"qEw-Sk-Y5l"
/>
<constraint
firstItem=
"gNx-v4-eC1"
firstAttribute=
"leading"
secondItem=
"tGI-n3-Qhb"
secondAttribute=
"leading"
constant=
"15"
id=
"zcl-eD-1Yo"
/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"Jdx-Ql-rJL"
>
<rect
key=
"frame"
x=
"0.0"
y=
"414"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"Jdx-Ql-rJL"
id=
"veQ-ID-Kbm"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
...
...
@@ -521,7 +549,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"cy7-GC-V1M"
>
<rect
key=
"frame"
x=
"0.0"
y=
"4
1
4"
width=
"375"
height=
"30"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"4
4
4"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"cy7-GC-V1M"
id=
"peE-yT-Wpr"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
...
...
@@ -549,7 +577,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"GLx-X6-bCX"
>
<rect
key=
"frame"
x=
"0.0"
y=
"4
4
4"
width=
"375"
height=
"30"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"4
7
4"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"GLx-X6-bCX"
id=
"rNY-h7-Gkf"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
...
...
@@ -577,7 +605,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"ELP-T0-LAZ"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
47
4"
width=
"375"
height=
"30"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
50
4"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"ELP-T0-LAZ"
id=
"Dtj-67-EFa"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
...
...
@@ -605,7 +633,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"44E-jB-OlU"
>
<rect
key=
"frame"
x=
"0.0"
y=
"5
0
4"
width=
"375"
height=
"30"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"5
3
4"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"44E-jB-OlU"
id=
"7jE-Fn-xTB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
...
...
@@ -629,7 +657,7 @@
<tableViewSection
id=
"akT-8B-cQA"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"29"
id=
"IUa-aa-hAd"
>
<rect
key=
"frame"
x=
"0.0"
y=
"5
5
3"
width=
"375"
height=
"29"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"5
8
3"
width=
"375"
height=
"29"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"IUa-aa-hAd"
id=
"J6d-Ag-3qs"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"29"
/>
...
...
@@ -641,7 +669,7 @@
<tableViewSection
id=
"V4Z-o2-h72"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"loi-eF-sJs"
>
<rect
key=
"frame"
x=
"0.0"
y=
"6
0
1"
width=
"375"
height=
"30"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"6
3
1"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"loi-eF-sJs"
id=
"mKu-Yo-W9j"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
...
...
@@ -669,7 +697,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"AlH-ca-Eok"
>
<rect
key=
"frame"
x=
"0.0"
y=
"6
3
1"
width=
"375"
height=
"30"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"6
6
1"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"AlH-ca-Eok"
id=
"md0-YE-7LW"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"30"
/>
...
...
@@ -718,6 +746,7 @@
<outlet
property=
"deviceLocationLab"
destination=
"IXa-tu-bb6"
id=
"EYs-6U-JsH"
/>
<outlet
property=
"isSolveLabel"
destination=
"rps-Bp-swV"
id=
"JTB-BI-Qmr"
/>
<outlet
property=
"phoneLab"
destination=
"BcA-yM-ArB"
id=
"I3m-8Q-STn"
/>
<outlet
property=
"positionLabel"
destination=
"4YN-xv-6aj"
id=
"N8J-xW-27H"
/>
<outlet
property=
"priorityLab"
destination=
"4Gv-CC-Yql"
id=
"Uku-ZV-PTK"
/>
<outlet
property=
"processedStateImg"
destination=
"nIc-Ck-mKb"
id=
"xDO-oZ-HCR"
/>
<outlet
property=
"processedStateLab"
destination=
"0HP-jr-VQ3"
id=
"Nfe-MP-fiF"
/>
...
...
@@ -968,11 +997,11 @@
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
accessoryType=
"disclosureIndicator"
indentationWidth=
"10"
id=
"io0-XT-kHc"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
id=
"io0-XT-kHc"
>
<rect
key=
"frame"
x=
"0.0"
y=
"446.33333333333337"
width=
"375"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"io0-XT-kHc"
id=
"gyg-sg-h2j"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"3
41
"
height=
"43.666666666666664"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"3
75
"
height=
"43.666666666666664"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"物料费"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"FBO-Cq-6MG"
>
...
...
@@ -980,8 +1009,8 @@
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
请选择
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Xq0-eh-LIx"
>
<rect
key=
"frame"
x=
"
298"
y=
"13"
width=
"43
"
height=
"17"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
0
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Xq0-eh-LIx"
>
<rect
key=
"frame"
x=
"
346"
y=
"13.333333333333336"
width=
"9
"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -991,7 +1020,7 @@
<constraint
firstItem=
"FBO-Cq-6MG"
firstAttribute=
"centerY"
secondItem=
"gyg-sg-h2j"
secondAttribute=
"centerY"
id=
"6RO-lD-iDc"
/>
<constraint
firstItem=
"FBO-Cq-6MG"
firstAttribute=
"leading"
secondItem=
"gyg-sg-h2j"
secondAttribute=
"leading"
constant=
"15"
id=
"Nwb-rk-Iam"
/>
<constraint
firstItem=
"Xq0-eh-LIx"
firstAttribute=
"centerY"
secondItem=
"gyg-sg-h2j"
secondAttribute=
"centerY"
id=
"UjB-yt-S7d"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Xq0-eh-LIx"
secondAttribute=
"trailing"
id=
"zy5-sq-jNa"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Xq0-eh-LIx"
secondAttribute=
"trailing"
constant=
"20"
id=
"zy5-sq-jNa"
/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
...
...
@@ -1083,7 +1112,7 @@
<scene
sceneID=
"V1M-4s-BtH"
>
<objects>
<tableViewController
storyboardIdentifier=
"RepairOrderChildBillDetailViewController"
id=
"6A0-4n-VlI"
customClass=
"RepairOrderChildBillDetailViewController"
customModule=
"IFS"
customModuleProvider=
"target"
sceneMemberID=
"viewController"
>
<tableView
key=
"view"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"static"
style=
"grouped"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"1"
id=
"XgS-uV-IRi"
>
<tableView
key=
"view"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
showsHorizontalScrollIndicator=
"NO"
showsVerticalScrollIndicator=
"NO"
dataMode=
"static"
style=
"grouped"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"1"
id=
"XgS-uV-IRi"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"812"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
cocoaTouchSystemColor=
"groupTableViewBackgroundColor"
/>
...
...
@@ -1104,8 +1133,8 @@
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"zP3-6T-bLc"
/>
</constraints>
</view>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"state_
selected
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Oka-Ih-0e2"
>
<rect
key=
"frame"
x=
"
47"
y=
"24"
width=
"23"
height=
"23
"
/>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"state_
default
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Oka-Ih-0e2"
>
<rect
key=
"frame"
x=
"
60"
y=
"30.666666666666671"
width=
"10"
height=
"10
"
/>
</imageView>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"state_default"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"fcu-eo-YQV"
>
<rect
key=
"frame"
x=
"182.66666666666666"
y=
"30.666666666666671"
width=
"10"
height=
"10"
/>
...
...
@@ -1114,19 +1143,19 @@
<rect
key=
"frame"
x=
"305"
y=
"30.666666666666671"
width=
"10"
height=
"10"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"已发出"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"zIH-mp-QRx"
>
<rect
key=
"frame"
x=
"
38.666666666666664"
y=
"57.666666666666657"
width=
"39.999999999999993"
height=
"16
"
/>
<rect
key=
"frame"
x=
"
45.333333333333343"
y=
"51.333333333333336"
width=
"40"
height=
"16.000000000000007
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"13"
/>
<color
key=
"textColor"
red=
"0.21755459899999999"
green=
"0.53306800129999998"
blue=
"0.99824184179999997"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite
"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"处理中"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Aw7-24-uzj"
>
<rect
key=
"frame"
x=
"167.66666666666666"
y=
"5
7.666666666666657"
width=
"40"
height=
"16
"
/>
<rect
key=
"frame"
x=
"167.66666666666666"
y=
"5
1.333333333333336"
width=
"40"
height=
"16.000000000000007
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"已完成"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"uvD-Va-VzJ"
>
<rect
key=
"frame"
x=
"290"
y=
"5
7.666666666666657"
width=
"40"
height=
"16
"
/>
<rect
key=
"frame"
x=
"290"
y=
"5
1.333333333333336"
width=
"40"
height=
"16.000000000000007
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -1865,7 +1894,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"44"
width=
"375"
height=
"768"
/>
<color
key=
"backgroundColor"
red=
"0.94901960780000005"
green=
"0.94901960780000005"
blue=
"0.94901960780000005"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"
default
"
indentationWidth=
"10"
reuseIdentifier=
"TodoTableViewCell"
rowHeight=
"110"
id=
"63j-ih-N5J"
customClass=
"TodoTableViewCell"
customModule=
"IFS"
customModuleProvider=
"target"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"
none
"
indentationWidth=
"10"
reuseIdentifier=
"TodoTableViewCell"
rowHeight=
"110"
id=
"63j-ih-N5J"
customClass=
"TodoTableViewCell"
customModule=
"IFS"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"375"
height=
"110"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"63j-ih-N5J"
id=
"8q0-dW-U83"
>
...
...
@@ -2642,7 +2671,6 @@
<image
name=
"bill_completed_state_selected"
width=
"22"
height=
"22"
/>
<image
name=
"delete"
width=
"22"
height=
"22"
/>
<image
name=
"state_default"
width=
"10"
height=
"10"
/>
<image
name=
"state_selected"
width=
"23"
height=
"23"
/>
<image
name=
"todo_icon"
width=
"23"
height=
"24"
/>
</resources>
<inferredMetricsTieBreakers>
...
...
IFS/IFS/Other/Login/ViewModel/LoginViewModel.swift
View file @
714c2739
...
...
@@ -18,8 +18,10 @@ class LoginViewModel: BaseViewModel {
/// - login: 用户名
/// - password: 密码
func
loginRequest
(
_
login
:
String
,
_
password
:
String
)
->
Observable
<
String
>
{
let
userName
=
NSString
(
string
:
login
)
.
format
()
let
passWord
=
NSString
(
string
:
password
)
.
format
()
return
Observable
.
create
({(
observer
)
->
Disposable
in
Network
.
request
(
target
:
.
Login
(
login
,
password
.
md5
()),
success
:
{(
json
)
in
Network
.
request
(
target
:
.
Login
(
userName
!
,
passWord
!
.
md5
()),
success
:
{(
json
)
in
let
model
=
LoginResultModel
(
fromJson
:
json
)
if
model
.
success
{
model
.
data
.
password
=
password
...
...
IFS/Podfile
View file @
714c2739
...
...
@@ -23,6 +23,5 @@ target ‘IFS’ do
pod
'ObservableArray-RxSwift'
,
'~> 0.2.0'
pod
'PPBadgeViewSwift'
pod
'SVProgressHUD'
,
'~> 2.2.2'
pod
'AsyncSwift'
pod
'UMengAnalytics'
end
IFS/Podfile.lock
View file @
714c2739
PODS:
- Alamofire (4.6.0)
- AsyncSwift (2.0.4)
- DeviceKit (1.4.0)
- DZNEmptyDataSet (1.8.1)
- FDFullscreenPopGesture (1.1)
...
...
@@ -32,7 +31,6 @@ PODS:
- YXPickerView (2.0.0)
DEPENDENCIES:
- AsyncSwift
- DeviceKit
- DZNEmptyDataSet
- FDFullscreenPopGesture (~> 1.1)
...
...
@@ -58,7 +56,6 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Alamofire: f41a599bd63041760b26d393ec1069d9d7b917f4
AsyncSwift: 65775a7b32e740609b24969ece3de58723b9dc3e
DeviceKit: fa74d97499660e88081718b16688e19217595dba
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
...
...
@@ -83,6 +80,6 @@ SPEC CHECKSUMS:
YXKit: 73d6ffbcf7530f1159e030460207286e9153b080
YXPickerView: 527ca74d8fbe73b4e9bd0bbff6e143133dced907
PODFILE CHECKSUM:
5196f50090d24cd5621742bc3c9182ea72ab06d6
PODFILE CHECKSUM:
3e33205a97f219ebdb5a9ce5e01c757323891d82
COCOAPODS: 1.3.0
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