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
d693d5c8
Commit
d693d5c8
authored
Mar 28, 2018
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复子工单不是全部已完成或已作废状态,还可以完成总工单、修复工单新建时闪退问题、部门工单编辑界面增加工单费用信息回写、修复子工单操作后,该工单排列顺序改变
parent
489718cc
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
178 additions
and
67 deletions
+178
-67
project.pbxproj
IFS/IFS.xcodeproj/project.pbxproj
+2
-0
Enums.swift
IFS/IFS/Expand/Const/Enums.swift
+3
-1
Urls.swift
IFS/IFS/Expand/Const/Urls.swift
+1
-1
NetworkAPI.swift
IFS/IFS/Expand/Network/NetworkAPI.swift
+2
-1
PhotoAttachmentViewController.swift
...Attachment/Controller/PhotoAttachmentViewController.swift
+5
-1
DeviceModel.swift
IFS/IFS/Expand/Public/SearchVc/Model/DeviceModel.swift
+11
-8
DeviceQueryModel.swift
IFS/IFS/Expand/Public/SearchVc/Model/DeviceQueryModel.swift
+3
-3
RepairOrderChildBillDetailViewController.swift
...Controller/RepairOrderChildBillDetailViewController.swift
+7
-7
RepairOrderCompletedViewController.swift
...Order/Controller/RepairOrderCompletedViewController.swift
+5
-2
RepairOrderDetailBgController.swift
...epairOrder/Controller/RepairOrderDetailBgController.swift
+8
-0
RepairOrderDetailViewController.swift
...airOrder/Controller/RepairOrderDetailViewController.swift
+12
-16
RepairOrderEditSonOrderViewController.swift
...er/Controller/RepairOrderEditSonOrderViewController.swift
+24
-2
ChildBillDetailResultModel.swift
...siness/RepairOrder/Model/ChildBillDetailResultModel.swift
+11
-10
SaveRepairOrderModel.swift
...ain/Business/RepairOrder/Model/SaveRepairOrderModel.swift
+4
-0
CostOrBorrowTableViewCell.swift
...Business/RepairOrder/View/CostOrBorrowTableViewCell.swift
+3
-1
RepairOrderAddViewModel.swift
...iness/RepairOrder/ViewModel/RepairOrderAddViewModel.swift
+3
-4
ReparirChildBillViewModel.swift
...ess/RepairOrder/ViewModel/ReparirChildBillViewModel.swift
+4
-0
Function.storyboard
IFS/IFS/Main/Storyboards/Function.storyboard
+70
-10
No files found.
IFS/IFS.xcodeproj/project.pbxproj
View file @
d693d5c8
...
...
@@ -1395,6 +1395,7 @@
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_TEAM
=
W54V2VB863
;
ENABLE_BITCODE
=
NO
;
INFOPLIST_FILE
=
"$(SRCROOT)/IFS/Resource/Info.plist"
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
...
...
@@ -1416,6 +1417,7 @@
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_TEAM
=
W54V2VB863
;
ENABLE_BITCODE
=
NO
;
INFOPLIST_FILE
=
"$(SRCROOT)/IFS/Resource/Info.plist"
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
...
...
IFS/IFS/Expand/Const/Enums.swift
View file @
d693d5c8
...
...
@@ -87,13 +87,15 @@ public enum REPAIR_ORDER_DETAIL_SECTION: Int {
/// 子工单编辑界面分区
///
/// - BASIC: 基本信息
/// - COST: 费用与设备信息
/// - COST: 费用信息
/// - BORROW: 借用信息
/// - DESCRIBE: 描述
/// - AFTERATTACHMENT: 维修前照片
/// - BEFORATTACHMENT: 维修后照片
public
enum
CHILD_BILL_EDIT_SECTION
:
Int
{
case
BASIC
=
0
case
COST
case
BORROW
case
DESCRIBE
case
BEFORATTACHMENT
case
AFTERATTACHMENT
...
...
IFS/IFS/Expand/Const/Urls.swift
View file @
d693d5c8
...
...
@@ -45,7 +45,7 @@ public let projectUrl: String = "/store/query"
/// 新建工单位置
public
let
positionUrl
:
String
=
"/information/position/query"
/// 新建工单设施
public
let
deviceUrl
:
String
=
"/
information/
device/query"
public
let
deviceUrl
:
String
=
"/device/query"
/// 新建工单提交
public
let
saveRepairOrderUrl
:
String
=
"/work/saveOrUpdate"
/// 工单列表查询
...
...
IFS/IFS/Expand/Network/NetworkAPI.swift
View file @
d693d5c8
...
...
@@ -147,7 +147,8 @@ extension Service: TargetType {
case
.
QueryprocessMethods
:
return
processMethodsUrl
case
.
CompleteOrder
:
return
completedBillUrl
let
path
=
completedBillUrl
+
"?operator.operId=
\(
kUser
()
.
userCode
!
)
&operator.operName=
\(
kUser
()
.
userName
!
)
&time=
\(
NSDate
()
.
httpParameterString
()
!
)
"
return
path
.
urlEncoded
()
case
.
UploadAttachment
(
let
model
):
return
String
(
format
:
uploadAttachmentUrl
,
model
.
entityType
,
model
.
entityUuid
)
case
.
DownloadAttachment
(
let
entity_type
,
let
entity_uuid
):
...
...
IFS/IFS/Expand/Public/PhotoAttachment/Controller/PhotoAttachmentViewController.swift
View file @
d693d5c8
...
...
@@ -91,7 +91,11 @@ class PhotoAttachmentViewController: BaseViewController {
open
func
attachmentHeight
(
_
count
:
Int
,
_
key
:
String
?)
->
CGFloat
{
self
.
key
=
key
let
rows
=
(
count
+
COUNT
-
kONE
)
/
COUNT
return
CGFloat
(
rows
)
*
imageHeight
+
CGFloat
((
rows
-
kONE
)
*
SPACE
)
let
height
=
CGFloat
(
rows
)
*
imageHeight
+
CGFloat
((
rows
-
kONE
)
*
SPACE
)
if
height
<
20
{
return
20
}
return
height
}
}
...
...
IFS/IFS/Expand/Public/SearchVc/Model/DeviceModel.swift
View file @
d693d5c8
...
...
@@ -50,18 +50,20 @@ class DeviceData{
class
DeviceRecord
{
var
bussiness
:
String
!
var
code
:
String
!
var
createId
:
String
!
var
createOperName
:
String
!
var
createTime
:
String
!
var
deviceType
:
AnyObject
!
var
enabled
:
Bool
!
var
lastModifyId
:
String
!
var
lastModifyOperName
:
String
!
var
lastModifyTime
:
String
!
var
location
:
String
!
var
name
:
String
!
var
position
:
UCN
!
var
note
:
String
!
var
store
:
UCN
!
var
type
:
UCN
!
var
uuid
:
String
!
var
version
:
Int
!
...
...
@@ -73,28 +75,29 @@ class DeviceRecord{
if
json
.
isEmpty
{
return
}
bussiness
=
json
[
"bussiness"
]
.
stringValue
code
=
json
[
"code"
]
.
stringValue
createId
=
json
[
"create_id"
]
.
stringValue
createOperName
=
json
[
"create_operName"
]
.
stringValue
createTime
=
json
[
"create_time"
]
.
stringValue
deviceType
=
json
[
"deviceType"
]
as
AnyObject
enabled
=
json
[
"enabled"
]
.
boolValue
lastModifyId
=
json
[
"lastModify_id"
]
.
stringValue
lastModifyOperName
=
json
[
"lastModify_operName"
]
.
stringValue
lastModifyTime
=
json
[
"lastModify_time"
]
.
stringValue
location
=
json
[
"location"
]
.
stringValue
name
=
json
[
"name"
]
.
stringValue
let
positionJson
=
json
[
"position"
]
if
!
positionJson
.
isEmpty
{
position
=
UCN
(
fromJson
:
positionJson
)
}
note
=
json
[
"note"
]
.
stringValue
let
storeJson
=
json
[
"store"
]
if
!
storeJson
.
isEmpty
{
store
=
UCN
(
fromJson
:
storeJson
)
}
let
typeJson
=
json
[
"type"
]
if
!
typeJson
.
isEmpty
{
type
=
UCN
(
fromJson
:
typeJson
)
}
uuid
=
json
[
"uuid"
]
.
stringValue
version
=
json
[
"version"
]
.
intValue
}
}
...
...
IFS/IFS/Expand/Public/SearchVc/Model/DeviceQueryModel.swift
View file @
d693d5c8
...
...
@@ -18,7 +18,7 @@ open class DeviceQueryModel {
var
page
:
Int
!
var
pageSize
:
Int
!
var
stateEquals
:
String
!
=
"true"
var
store
Uui
dEquals
:
String
!
var
store
I
dEquals
:
String
!
func
toDictionary
()
->
[
String
:
Any
]
{
...
...
@@ -29,8 +29,8 @@ open class DeviceQueryModel {
if
nameLike
!=
nil
{
dictionary
[
"nameLike"
]
=
nameLike
}
if
store
Uui
dEquals
!=
nil
{
dictionary
[
"store
UuidEquals"
]
=
storeUui
dEquals
if
store
I
dEquals
!=
nil
{
dictionary
[
"store
IdEquals"
]
=
storeI
dEquals
}
if
order
!=
nil
{
dictionary
[
"order"
]
=
order
.
toDictionary
()
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderChildBillDetailViewController.swift
View file @
d693d5c8
...
...
@@ -161,7 +161,7 @@ class RepairOrderChildBillDetailViewController: BaseTableViewController {
if
indexPath
.
section
==
CHILD_BILL_DETAIL_SECTION
.
COST
.
rawValue
{
if
indexPath
.
row
!=
kZERO
{
let
costCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
CostOrBorrowTableViewCell
.
name
(),
for
:
indexPath
)
as!
CostOrBorrowTableViewCell
let
model
=
childBillViewModel
.
childBillDetailData
.
costArray
[
indexPath
.
row
-
kONE
]
let
model
=
childBillViewModel
.
childBillDetailData
.
executeOutsources
[
indexPath
.
row
-
kONE
]
costCell
.
updateCell
(
model
,
indexPath
)
return
costCell
}
...
...
@@ -191,13 +191,13 @@ class RepairOrderChildBillDetailViewController: BaseTableViewController {
override
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
switch
section
{
case
CHILD_BILL_DETAIL_SECTION
.
COST
.
rawValue
:
if
childBillViewModel
.
childBillDetailData
.
costArray
==
nil
{
return
k
ZERO
if
childBillViewModel
.
childBillDetailData
.
executeOutsources
==
nil
{
return
k
ONE
}
return
childBillViewModel
.
childBillDetailData
.
costArray
.
count
+
kONE
return
childBillViewModel
.
childBillDetailData
.
executeOutsources
.
count
+
kONE
case
CHILD_BILL_DETAIL_SECTION
.
BORROW
.
rawValue
:
if
childBillViewModel
.
childBillDetailData
.
costArray
==
nil
{
return
k
ZERO
if
childBillViewModel
.
childBillDetailData
.
executeMateriels
==
nil
{
return
k
ONE
}
return
childBillViewModel
.
childBillDetailData
.
executeMateriels
.
count
+
kONE
case
CHILD_BILL_DETAIL_SECTION
.
DESCRIBE
.
rawValue
:
...
...
@@ -257,7 +257,7 @@ class RepairOrderChildBillDetailViewController: BaseTableViewController {
return
}
let
costVc
=
ChildBillDetailCostViewController
.
instantiateViewController
(
.
Function
)
as!
ChildBillDetailCostViewController
costVc
.
costModel
=
childBillViewModel
.
childBillDetailData
.
costArray
[
indexPath
.
row
-
kONE
]
costVc
.
costModel
=
childBillViewModel
.
childBillDetailData
.
executeOutsources
[
indexPath
.
row
-
kONE
]
pushVC
(
costVc
)
break
case
CHILD_BILL_DETAIL_SECTION
.
BORROW
.
rawValue
:
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderCompletedViewController.swift
View file @
d693d5c8
...
...
@@ -58,10 +58,13 @@ class RepairOrderCompletedViewController: BaseTableViewController {
let
finishModel
=
UCN
(
kUser
()
.
userCode
,
kUser
()
.
userName
,
kUser
()
.
userUuid
)
billCompleteViewModel
.
billCompltedModel
.
finishUser
=
finishModel
billCompleteViewModel
.
complteRepairOrderAction
(
billCompleteViewModel
.
billCompltedModel
)
.
subscribe
(
onNext
:
{[
weak
self
]
()
in
ShowMessage
(
"完成成功"
)
self
?
.
stateBlock
(
SUBMIT_REPAIR_ORDER_STATE
.
FINISHED
.
rawValue
)
/// 延时一秒调用
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
DispatchTime
.
now
()
+
1.0
,
execute
:
{
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_LIST
)))
})
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_DETAIL_LIST
)))
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_LIST
))
)
ShowMessage
(
"完成成功"
)
self
?
.
popVC
()
})
.
disposed
(
by
:
disposeBag
)
}
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderDetailBgController.swift
View file @
d693d5c8
...
...
@@ -93,6 +93,14 @@ class RepairOrderDetailBgController: BaseViewController {
ShowMessage
(
"当前用户对此工单没有完成权限!"
)
return
;
}
// 判断子工单是否是终止状态
for
executeModel
in
detailVc
.
orderDetailViewModel
.
billDetailModel
.
executes
{
if
executeModel
.
state
!=
SUBMIT_REPAIR_ORDER_STATE
.
CANCLED
.
rawValue
&&
executeModel
.
state
!=
SUBMIT_REPAIR_ORDER_STATE
.
DONE
.
rawValue
{
ShowMessage
(
"还有部门工单未完成"
)
return
}
}
let
completeVc
=
RepairOrderCompletedViewController
.
instantiateViewController
(
.
Function
)
as!
RepairOrderCompletedViewController
let
model
=
BillCompletedRequestModel
(
fromJson
:
JSON
(
detailVc
.
orderDetailViewModel
.
billDetailModel
.
toDictionary
()))
completeVc
.
setStateBlock
({[
weak
self
]
(
state
)
in
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderDetailViewController.swift
View file @
d693d5c8
...
...
@@ -203,20 +203,18 @@ class RepairOrderDetailViewController: BaseTableViewController {
// MARK: - 获取图片附件通过entity uuid
fileprivate
func
disposeAttachment
()
{
//获取照片面试附件
orderDetailViewModel
.
downloadAttachmentAction
(
ATTACHMENT_TYPE
.
BILL_ATTACHMENT_TYPE
.
rawValue
)
.
subscribe
(
onNext
:
{[
weak
self
]
(
attachments
)
in
self
?
.
attachmentVc
.
attachmentViewModel
.
photoAttachments
.
removeAll
()
for
model
in
attachments
{
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
),
self
!.
attachmentCount
)
let
attHeight
=
self
?
.
attachmentVc
.
attachmentHeight
(
attachments
.
count
,
nil
)
if
attHeight
!
>
self
!.
attachmentHeight
{
//获取照片描述附件
orderDetailViewModel
.
downloadAttachmentAction
(
ATTACHMENT_TYPE
.
BILL_ATTACHMENT_TYPE
.
rawValue
)
.
subscribe
(
onNext
:
{[
weak
self
]
(
attachments
)
in
self
?
.
attachmentVc
.
attachmentViewModel
.
photoAttachments
.
removeAll
()
for
model
in
attachments
{
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
),
self
!.
attachmentCount
)
let
attHeight
=
self
?
.
attachmentVc
.
attachmentHeight
(
attachments
.
count
,
nil
)
self
?
.
attachmentHeight
=
attHeight
}
self
?
.
tableView
.
reloadData
()
})
.
disposed
(
by
:
disposeBag
)
self
?
.
tableView
.
reloadData
()
})
.
disposed
(
by
:
disposeBag
)
//获取位置图附件
orderDetailViewModel
.
downloadLocationAttAction
(
ATTACHMENT_TYPE
.
BILL_ATTACHMENT_TYPE
.
rawValue
)
.
subscribe
(
onNext
:
{[
weak
self
]
(
attachments
)
in
...
...
@@ -227,9 +225,7 @@ class RepairOrderDetailViewController: BaseTableViewController {
self
?
.
locationAttVc
.
attachmentViewModel
.
photoAttachments
.
append
(
PhotoAttachmentModel
(
url
,
ATTACHMENT_TYPE
.
BILL_ATTACHMENT_TYPE
.
rawValue
,
model
.
entityUuid
,
ATTACHMENT_LOCATION
.
ATTACHMENT_HTTP
))
self
?
.
locationAttVc
.
setItemSize
(
CGSize
(
width
:
self
!.
imageWidth
,
height
:
self
!.
imageWidth
),
self
!.
attachmentCount
)
let
attHeight
=
self
?
.
locationAttVc
.
attachmentHeight
(
kONE
,
nil
)
if
attHeight
!
>
self
!.
locationAttHeight
{
self
?
.
locationAttHeight
=
attHeight
}
self
?
.
locationAttHeight
=
attHeight
}
self
?
.
tableView
.
reloadData
()
})
.
disposed
(
by
:
disposeBag
)
...
...
IFS/IFS/Main/Business/RepairOrder/Controller/RepairOrderEditSonOrderViewController.swift
View file @
d693d5c8
...
...
@@ -78,6 +78,7 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
describeTextView
.
placeholder
=
"描述"
title
=
String
(
format
:
"完成%@工单"
,
billModel
.
dept
.
name
)
describeTextView
.
textContainerInset
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
)
tableView
.
register
(
UINib
(
nibName
:
CostOrBorrowTableViewCell
.
name
(),
bundle
:
nil
),
forCellReuseIdentifier
:
CostOrBorrowTableViewCell
.
name
())
}
// MARK: - 设置附件VC
...
...
@@ -150,9 +151,11 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
if
index
==
kZERO
{
return
}
self
?
.
uploadActtachmentAction
()
.
subscribe
(
onNext
:
{
(
result
)
in
self
?
.
childBillViewModel
.
finishChildBillAction
()
.
subscribe
(
onNext
:
{
()
in
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_DETAIL_LIST
)))
self
?
.
popVC
()
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
DispatchTime
.
now
()
+
1.0
,
execute
:
{
NotificationCenter
.
default
.
post
(
Notification
(
name
:
Notification
.
Name
(
rawValue
:
UPDATE_BILL_DETAIL_LIST
)))
})
ShowMessage
(
"子工单完成"
)
self
?
.
popVC
()
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
.
disposed
(
by
:
self
!.
disposeBag
)
})
...
...
@@ -239,6 +242,25 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
return
sectionHeight
}
override
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
switch
section
{
case
CHILD_BILL_DETAIL_SECTION
.
COST
.
rawValue
:
if
childBillViewModel
.
childBillDetailData
.
executeOutsources
==
nil
{
return
kONE
}
return
childBillViewModel
.
childBillDetailData
.
executeOutsources
.
count
+
kONE
case
CHILD_BILL_DETAIL_SECTION
.
BORROW
.
rawValue
:
if
childBillViewModel
.
childBillDetailData
.
executeMateriels
==
nil
{
return
kONE
}
return
childBillViewModel
.
childBillDetailData
.
executeMateriels
.
count
+
kONE
default
:
break
}
return
super
.
tableView
(
tableView
,
numberOfRowsInSection
:
section
)
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
CHILD_BILL_EDIT_SECTION
.
BEFORATTACHMENT
.
rawValue
{
return
beforAttachmentHeight
+
20
...
...
IFS/IFS/Main/Business/RepairOrder/Model/ChildBillDetailResultModel.swift
View file @
d693d5c8
...
...
@@ -58,7 +58,7 @@ open class ChildBillDetailData : NSObject{
var
dept
:
UCN
!
var
endAttachmentId
:
String
!
var
executeMateriels
:
[
ExecuteMateriel
]
!
var
costArray
:
[
ExecuteMateriel
]
!
var
executeOutsources
:
[
ExecuteMateriel
]
!
var
executeNo
:
String
!
var
hasOut
:
Bool
!
var
hasPaid
:
Bool
!
...
...
@@ -105,15 +105,16 @@ open class ChildBillDetailData : NSObject{
dept
=
UCN
(
fromJson
:
deptJson
)
}
executeMateriels
=
[
ExecuteMateriel
]()
costArray
=
[
ExecuteMateriel
]()
executeOutsources
=
[
ExecuteMateriel
]()
let
executeMaterielsArray
=
json
[
"executeMateriels"
]
.
arrayValue
for
executeMaterielsJson
in
executeMaterielsArray
{
let
value
=
ExecuteMateriel
(
fromJson
:
executeMaterielsJson
)
if
value
.
sourceType
==
CHILDORDERCOST_TYPE
.
COST
.
rawValue
{
costArray
.
append
(
value
)
}
else
{
executeMateriels
.
append
(
value
)
}
executeMateriels
.
append
(
value
)
}
let
executeOutsourcesArray
=
json
[
"executeOutsources"
]
.
arrayValue
for
executeMaterielsJson
in
executeOutsourcesArray
{
let
value
=
ExecuteMateriel
(
fromJson
:
executeMaterielsJson
)
executeOutsources
.
append
(
value
)
}
endAttachmentId
=
json
[
"endAttachmentId"
]
.
stringValue
executeNo
=
json
[
"executeNo"
]
.
stringValue
...
...
@@ -174,9 +175,9 @@ open class ChildBillDetailData : NSObject{
if
executeNo
!=
nil
{
dictionary
[
"executeNo"
]
=
executeNo
}
//
if !executeOutsources.isEmpty {
//
dictionary["executeOutsources"] = executeOutsources
//
}
if
!
executeOutsources
.
isEmpty
{
dictionary
[
"executeOutsources"
]
=
executeOutsources
}
if
hasOut
!=
nil
{
dictionary
[
"hasOut"
]
=
hasOut
}
...
...
IFS/IFS/Main/Business/RepairOrder/Model/SaveRepairOrderModel.swift
View file @
d693d5c8
...
...
@@ -25,6 +25,7 @@ open class SaveRepairOrderModel {
var
serviceType
:
String
!
var
locationAttachmentId
:
String
!
var
locationAttachmentUrl
:
String
!
var
deviceadree
:
String
!
var
source
:
String
!
var
state
:
String
!
var
workNo
:
String
!
...
...
@@ -35,6 +36,9 @@ open class SaveRepairOrderModel {
if
attachmentId
!=
nil
{
dictionary
[
"attachmentId"
]
=
attachmentId
}
if
deviceadree
!=
nil
{
dictionary
[
"deviceadree"
]
=
deviceadree
}
if
brokenTime
!=
nil
{
dictionary
[
"brokenTime"
]
=
brokenTime
}
...
...
IFS/IFS/Main/Business/RepairOrder/View/CostOrBorrowTableViewCell.swift
View file @
d693d5c8
...
...
@@ -22,7 +22,9 @@ class CostOrBorrowTableViewCell: UITableViewCell {
// MARK: - 更新cell
open
func
updateCell
(
_
model
:
ExecuteMateriel
,
_
indexPath
:
IndexPath
)
{
titleLabel
.
text
=
model
.
materiel
.
name
if
model
.
materiel
!=
nil
{
titleLabel
.
text
=
model
.
materiel
.
name
}
if
model
.
sourceType
==
CHILDORDERCOST_TYPE
.
BORROW
.
rawValue
{
detailLabel
.
text
=
model
.
outputbillno
}
else
{
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/RepairOrderAddViewModel.swift
View file @
d693d5c8
...
...
@@ -332,7 +332,7 @@ extension RepairOrderAddViewModel {
return
}
let
model
=
DeviceQueryModel
()
model
.
store
Uui
dEquals
=
saveOrderModel
.
store
.
uuid
model
.
store
I
dEquals
=
saveOrderModel
.
store
.
uuid
filterViewModel
.
queryDevice
(
model
)
.
subscribe
(
onNext
:
{[
weak
self
]
(
result
)
in
if
result
.
isEmpty
{
ShowMessage
(
"无数据"
)
...
...
@@ -352,13 +352,12 @@ extension RepairOrderAddViewModel {
let
deviceModel
=
result
[
index
!
]
let
choiceModel
=
choices
.
first
!
controller
.
deviceTitleLabel
.
text
=
choiceModel
.
title
if
deviceModel
.
position
!=
nil
{
controller
.
deviceLocationLabel
.
text
=
deviceModel
.
position
.
name
}
controller
.
deviceLocationLabel
.
text
=
deviceModel
.
location
controller
.
deviceTitleLabel
.
textColor
=
kBlackColor
controller
.
deviceLocationLabel
.
textColor
=
kBlackColor
let
device
=
UCN
(
deviceModel
.
code
,
deviceModel
.
name
,
deviceModel
.
uuid
)
self
?
.
saveOrderModel
.
device
=
device
self
?
.
saveOrderModel
.
deviceadree
=
deviceModel
.
location
})
controller
.
pushVC
(
publicFilterVc
)
})
.
disposed
(
by
:
disposeBag
)
...
...
IFS/IFS/Main/Business/RepairOrder/ViewModel/ReparirChildBillViewModel.swift
View file @
d693d5c8
...
...
@@ -64,6 +64,8 @@ extension ReparirChildBillViewModel {
childBillDetailData
.
lastModifyTime
=
nil
childBillDetailData
.
lastModifyId
=
nil
childBillDetailData
.
lastModifyOperName
=
nil
childBillDetailData
.
executeOutsources
=
[]
childBillDetailData
.
executeMateriels
=
[]
return
Observable
.
create
({
(
observer
)
->
Disposable
in
Network
.
request
(
target
:
.
SaveChildBill
(
self
.
childBillDetailData
),
success
:
{
(
json
)
in
let
resultModel
=
PublicResultModel
(
fromJson
:
json
)
...
...
@@ -87,6 +89,8 @@ extension ReparirChildBillViewModel {
childBillDetailData
.
lastModifyTime
=
nil
childBillDetailData
.
lastModifyId
=
nil
childBillDetailData
.
lastModifyOperName
=
nil
childBillDetailData
.
executeOutsources
=
[]
childBillDetailData
.
executeMateriels
=
[]
return
Observable
.
create
({
(
observer
)
->
Disposable
in
Network
.
request
(
target
:
.
FinishChildBill
(
self
.
childBillDetailData
),
success
:
{
(
json
)
in
let
resultModel
=
PublicResultModel
(
fromJson
:
json
)
...
...
IFS/IFS/Main/Storyboards/Function.storyboard
View file @
d693d5c8
...
...
@@ -1044,12 +1044,8 @@
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection
headerTitle=
"费用与设备信息"
id=
"Tp4-4j-lyh"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
id=
"G5Q-eW-Rem"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
402
.33333333333337"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
363
.33333333333337"
width=
"375"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"G5Q-eW-Rem"
id=
"O3C-Ed-MVo"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"43.666666666666664"
/>
...
...
@@ -1080,7 +1076,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
id=
"io0-XT-kHc"
>
<rect
key=
"frame"
x=
"0.0"
y=
"4
46
.33333333333337"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"4
07
.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=
"375"
height=
"43.666666666666664"
/>
...
...
@@ -1108,10 +1104,74 @@
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection
headerTitle=
"费用信息"
id=
"Oo2-KM-37J"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"Lz8-Qj-hD9"
>
<rect
key=
"frame"
x=
"0.0"
y=
"490.33333333333337"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"Lz8-Qj-hD9"
id=
"78e-7c-7gf"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"29.666666666666668"
/>
<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=
"mzR-pl-iVJ"
>
<rect
key=
"frame"
x=
"30"
y=
"7"
width=
"27"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
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=
"612-Wl-4G3"
>
<rect
key=
"frame"
x=
"291"
y=
"7"
width=
"50"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstItem=
"mzR-pl-iVJ"
firstAttribute=
"centerY"
secondItem=
"78e-7c-7gf"
secondAttribute=
"centerY"
id=
"TdA-5K-vmi"
/>
<constraint
firstItem=
"612-Wl-4G3"
firstAttribute=
"centerY"
secondItem=
"mzR-pl-iVJ"
secondAttribute=
"centerY"
id=
"XGm-0V-8gx"
/>
<constraint
firstItem=
"mzR-pl-iVJ"
firstAttribute=
"leading"
secondItem=
"78e-7c-7gf"
secondAttribute=
"leading"
constant=
"30"
id=
"aP7-gp-u9Z"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"612-Wl-4G3"
secondAttribute=
"trailing"
constant=
"34"
id=
"hud-dn-zz7"
/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection
headerTitle=
"借用信息"
id=
"hNy-Kf-o4G"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"30"
id=
"pzG-Ef-kys"
>
<rect
key=
"frame"
x=
"0.0"
y=
"559.33333333333337"
width=
"375"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"pzG-Ef-kys"
id=
"8vB-M3-t6N"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"29.666666666666668"
/>
<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=
"1St-B3-VT3"
>
<rect
key=
"frame"
x=
"30"
y=
"7"
width=
"27"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
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=
"2PS-Lg-IG7"
>
<rect
key=
"frame"
x=
"314"
y=
"7"
width=
"27"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstItem=
"1St-B3-VT3"
firstAttribute=
"centerY"
secondItem=
"8vB-M3-t6N"
secondAttribute=
"centerY"
id=
"8Ia-MW-qzT"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"2PS-Lg-IG7"
secondAttribute=
"trailing"
constant=
"34"
id=
"MFF-u8-azO"
/>
<constraint
firstItem=
"1St-B3-VT3"
firstAttribute=
"leading"
secondItem=
"8vB-M3-t6N"
secondAttribute=
"leading"
constant=
"30"
id=
"MHs-us-5Cu"
/>
<constraint
firstItem=
"2PS-Lg-IG7"
firstAttribute=
"centerY"
secondItem=
"1St-B3-VT3"
secondAttribute=
"centerY"
id=
"v77-JN-8hb"
/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection
id=
"cvP-te-yqy"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"100"
id=
"6dU-Yd-LFr"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
509
.33333333333337"
width=
"375"
height=
"100"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
608
.33333333333337"
width=
"375"
height=
"100"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"6dU-Yd-LFr"
id=
"h0x-1k-gXc"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"99.666666666666671"
/>
...
...
@@ -1145,7 +1205,7 @@
<tableViewSection
headerTitle=
"维修前照片"
id=
"C0j-Xq-zD3"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"100"
id=
"drC-5R-qld"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
648
.33333333333337"
width=
"375"
height=
"100"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
747
.33333333333337"
width=
"375"
height=
"100"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"drC-5R-qld"
id=
"lIy-rt-yW2"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"99.666666666666671"
/>
...
...
@@ -1157,7 +1217,7 @@
<tableViewSection
headerTitle=
"维修后照片"
id=
"n5s-jX-DgQ"
>
<cells>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
rowHeight=
"100"
id=
"V7L-D9-XKX"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
787
.33333333333337"
width=
"375"
height=
"100"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
886
.33333333333337"
width=
"375"
height=
"100"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"V7L-D9-XKX"
id=
"qlg-vC-gGa"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"99.666666666666671"
/>
...
...
@@ -3245,6 +3305,6 @@
<image
name=
"todo_icon"
width=
"23"
height=
"24"
/>
</resources>
<inferredMetricsTieBreakers>
<segue
reference=
"
ui0-ve-aBK
"
/>
<segue
reference=
"
eK1-nw-kV4
"
/>
</inferredMetricsTieBreakers>
</document>
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