Commit 5f037245 authored by 曹云霄's avatar 曹云霄

修复海鼎bug

parent 5ac79384
...@@ -57,9 +57,6 @@ class RepairOrderCompletedViewController: BaseTableViewController { ...@@ -57,9 +57,6 @@ class RepairOrderCompletedViewController: BaseTableViewController {
billCompleteViewModel.billCompltedModel.finishTime = NSDate().httpParameterString() billCompleteViewModel.billCompltedModel.finishTime = NSDate().httpParameterString()
let finishModel = UCN(kUser().userCode, kUser().userName, kUser().userUuid) let finishModel = UCN(kUser().userCode, kUser().userName, kUser().userUuid)
billCompleteViewModel.billCompltedModel.finishUser = finishModel billCompleteViewModel.billCompltedModel.finishUser = finishModel
billCompleteViewModel.billCompltedModel.store = billCompleteViewModel.billDetailModel.store
billCompleteViewModel.billCompltedModel.deviceadree = billCompleteViewModel.billDetailModel.deviceadree
billCompleteViewModel.billCompltedModel.reporterPhone = billCompleteViewModel.billDetailModel.reporterPhone
billCompleteViewModel.complteRepairOrderAction(billCompleteViewModel.billCompltedModel).subscribe(onNext: {[weak self] () in billCompleteViewModel.complteRepairOrderAction(billCompleteViewModel.billCompltedModel).subscribe(onNext: {[weak self] () in
self?.stateBlock(SUBMIT_REPAIR_ORDER_STATE.FINISHED.rawValue) self?.stateBlock(SUBMIT_REPAIR_ORDER_STATE.FINISHED.rawValue)
/// 延时一秒调用 /// 延时一秒调用
......
...@@ -49,6 +49,18 @@ class RepairOrderDetailBgController: BaseViewController { ...@@ -49,6 +49,18 @@ class RepairOrderDetailBgController: BaseViewController {
// MARK: - UI // MARK: - UI
fileprivate func uiConfigAction() { fileprivate func uiConfigAction() {
bottomBgView.addShadow(UIColor.black) bottomBgView.addShadow(UIColor.black)
if !PermissionsManager.transferBillPermissions() {
transferButton.isHidden = true
}
if !PermissionsManager.finishBillPermissions() {
completeButton.isHidden = true
}
if !PermissionsManager.finishBillPermissions() && !PermissionsManager.transferBillPermissions() {
bottomLayoutHeight.constant = 0
UIView.animate(withDuration: kAnimationTime, animations: {
self.view.layoutIfNeeded()
})
}
} }
// MARK: - 添加工单详情控制器 // MARK: - 添加工单详情控制器
...@@ -101,12 +113,10 @@ class RepairOrderDetailBgController: BaseViewController { ...@@ -101,12 +113,10 @@ class RepairOrderDetailBgController: BaseViewController {
} }
} }
let completeVc = RepairOrderCompletedViewController.instantiateViewController(.Function) as! RepairOrderCompletedViewController let completeVc = RepairOrderCompletedViewController.instantiateViewController(.Function) as! RepairOrderCompletedViewController
let model = BillCompletedRequestModel(fromJson: JSON(detailVc.orderDetailViewModel.billDetailModel.toDictionary()))
completeVc.setStateBlock({[weak self] (state) in completeVc.setStateBlock({[weak self] (state) in
self?.rapairBillBottomViewAction(state) self?.rapairBillBottomViewAction(state)
}) })
completeVc.billCompleteViewModel.billDetailModel = detailVc.orderDetailViewModel.billDetailModel completeVc.billCompleteViewModel.billCompltedModel = BillCompletedRequestModel(fromJson: JSON(detailVc.orderDetailViewModel.billDetailModel.toDictionary()))
completeVc.billCompleteViewModel.billCompltedModel = model
pushVC(completeVc) pushVC(completeVc)
} }
......
...@@ -253,6 +253,7 @@ class RepairOrderDetailViewController: BaseTableViewController { ...@@ -253,6 +253,7 @@ class RepairOrderDetailViewController: BaseTableViewController {
orderDetailViewModel.queryRepairOrderDepartmentAction(model).subscribe(onNext: {[weak self] (resuleModel) in orderDetailViewModel.queryRepairOrderDepartmentAction(model).subscribe(onNext: {[weak self] (resuleModel) in
self?.orderDetailViewModel.repairOrderDepartmentChoice(resuleModel, self!).subscribe(onNext: { (result) in self?.orderDetailViewModel.repairOrderDepartmentChoice(resuleModel, self!).subscribe(onNext: { (result) in
ShowAlertView(hint, result.0, [cancel,sure], .alert, { (index) in ShowAlertView(hint, result.0, [cancel,sure], .alert, { (index) in
if index == kZERO { return }
self?.transferRepairOrderAction(result.1) self?.transferRepairOrderAction(result.1)
}) })
}).disposed(by: self!.disposeBag) }).disposed(by: self!.disposeBag)
......
...@@ -160,8 +160,12 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController { ...@@ -160,8 +160,12 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
}).disposed(by: self!.disposeBag) }).disposed(by: self!.disposeBag)
}) })
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
tableView.tableFooterView = completeView if PermissionsManager.finishChildPermissions() {
navigationItem.rightBarButtonItem = createButtonItem("保存", nil, self, #selector(RepairOrderEditSonOrderViewController.saveButtonClickAction)) tableView.tableFooterView = completeView
}
if PermissionsManager.saveChildPermissions() {
navigationItem.rightBarButtonItem = createButtonItem("保存", nil, self, #selector(RepairOrderEditSonOrderViewController.saveButtonClickAction))
}
} }
// MARK: - 提交、保存子工单 // MARK: - 提交、保存子工单
...@@ -171,6 +175,7 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController { ...@@ -171,6 +175,7 @@ class RepairOrderEditSonOrderViewController: BaseTableViewController {
return; return;
} }
ShowAlertView(hint, "确定保存此子工单吗?", [cancel,sure], .alert) {[weak self] (index) in ShowAlertView(hint, "确定保存此子工单吗?", [cancel,sure], .alert) {[weak self] (index) in
if index == kZERO { return }
self?.uploadActtachmentAction().subscribe(onNext: { (result) in self?.uploadActtachmentAction().subscribe(onNext: { (result) in
self?.childBillViewModel.saveChildBillAction().subscribe(onNext: { () in self?.childBillViewModel.saveChildBillAction().subscribe(onNext: { () in
self?.popVC() self?.popVC()
......
...@@ -10,29 +10,40 @@ import SwiftyJSON ...@@ -10,29 +10,40 @@ import SwiftyJSON
open class BillCompletedRequestModel : NSObject{ open class BillCompletedRequestModel : NSObject{
var attachmentId : String!
var brokenTime : String! var brokenTime : String!
var descriptionField : String! var descriptionField : String!
var descriptionFieldHeight: CGFloat! = 10
var device : UCN! var device : UCN!
var deviceadree: String! var deviceadree : String!
var finish : Bool! var finish : Bool! = false
var finishNote : String! var finishNote : String!
var finishNoteHeight : CGFloat! = 10
var finishTime : String! var finishTime : String!
var locationAttachmentId: String!
var finishUser : UCN! var finishUser : UCN!
var level : String! var level : String!
var locationAttachmentId: String! var note : String!
var store : UCN! var noteHeight: CGFloat! = 10
var position : UCN!
var receiveTime : String! var receiveTime : String!
var reportUser : UCN! var reportUser : UCN!
var reporterPhone : String!
var requestTime : String! var requestTime : String!
var reporterPhone: String!
var serviceType : String! var serviceType : String!
var source : String! var source : String!
var state : String! var state : String!
var store : UCN!
var tenant : UCN!
var uuid : String! var uuid : String!
var version : Int! var version : Int!
var workNo : String! var workNo : String!
init(_ state: String) {
self.state = state
}
/** /**
* Instantiate the instance using the passed json values to set the properties values * Instantiate the instance using the passed json values to set the properties values
*/ */
...@@ -40,63 +51,79 @@ open class BillCompletedRequestModel : NSObject{ ...@@ -40,63 +51,79 @@ open class BillCompletedRequestModel : NSObject{
if json.isEmpty{ if json.isEmpty{
return return
} }
attachmentId = json["attachmentId"].stringValue
brokenTime = json["brokenTime"].stringValue brokenTime = json["brokenTime"].stringValue
locationAttachmentId = json["locationAttachmentId"].stringValue
descriptionField = json["description"].stringValue descriptionField = json["description"].stringValue
descriptionFieldHeight = descriptionField.calculateStringSize(CGSize(width: kWidth - 105, height: CGFloat.greatestFiniteMagnitude), font: UIFont.systemFont(ofSize: 13)).height
let deviceJson = json["device"] let deviceJson = json["device"]
if !deviceJson.isEmpty{ if !deviceJson.isEmpty{
device = UCN(fromJson: deviceJson) device = UCN(fromJson: deviceJson)
} }
deviceadree = json["deviceadree"].stringValue
finish = json["finish"].boolValue finish = json["finish"].boolValue
finishNote = json["finishNote"].stringValue finishNote = json["finishNote"].stringValue
finishNoteHeight = finishNote.calculateStringSize(CGSize(width: kWidth - 105, height: CGFloat.greatestFiniteMagnitude), font: UIFont.systemFont(ofSize: 13)).height
finishTime = json["finishTime"].stringValue finishTime = json["finishTime"].stringValue
let finishUserJson = json["finishUser"] let finishUserJson = json["finishUser"]
if !finishUserJson.isEmpty{ if !finishUserJson.isEmpty{
finishUser = UCN(fromJson: finishUserJson) finishUser = UCN(fromJson: finishUserJson)
} }
level = json["level"].stringValue level = json["level"].stringValue
note = json["note"].stringValue
noteHeight = note.calculateStringSize(CGSize(width: kWidth - 105, height: CGFloat.greatestFiniteMagnitude), font: UIFont.systemFont(ofSize: 13)).height
let positionJson = json["position"] let positionJson = json["position"]
if !positionJson.isEmpty{ if !positionJson.isEmpty{
store = UCN(fromJson: positionJson) position = UCN(fromJson: positionJson)
} }
receiveTime = json["receiveTime"].stringValue receiveTime = json["receiveTime"].stringValue
let reportUserJson = json["reportUser"] let reportUserJson = json["reportUser"]
if !reportUserJson.isEmpty{ if !reportUserJson.isEmpty{
reportUser = UCN(fromJson: reportUserJson) reportUser = UCN(fromJson: reportUserJson)
} }
deviceadree = json["reporterPhone"].stringValue
locationAttachmentId = json["locationAttachmentId"].stringValue
reporterPhone = json["reporterPhone"].stringValue reporterPhone = json["reporterPhone"].stringValue
requestTime = json["requestTime"].stringValue requestTime = json["requestTime"].stringValue
serviceType = json["serviceType"].stringValue serviceType = json["serviceType"].stringValue
source = json["source"].stringValue source = json["source"].stringValue
state = json["state"].stringValue state = json["state"].stringValue
let storeJson = json["store"]
if !storeJson.isEmpty{
store = UCN(fromJson: storeJson)
}
let tenantJson = json["tenant"]
if !tenantJson.isEmpty{
tenant = UCN(fromJson: tenantJson)
}
uuid = json["uuid"].stringValue uuid = json["uuid"].stringValue
version = json["version"].intValue version = json["version"].intValue
workNo = json["workNo"].stringValue workNo = json["workNo"].stringValue
} }
/** /**
* Returns all the available property values in the form of [String:Any] object where the key is the approperiate json key and the value is the value of the corresponding property * Returns all the available property values in the form of [String:Any] object where the key is the approperiate json key and the value is the value of the corresponding property
*/ */
func toDictionary() -> [String:Any] func toDictionary() -> [String:Any]
{ {
var dictionary = [String:Any]() var dictionary = [String:Any]()
if attachmentId != nil{
dictionary["attachmentId"] = attachmentId
}
if brokenTime != nil{ if brokenTime != nil{
dictionary["brokenTime"] = brokenTime dictionary["brokenTime"] = brokenTime
} }
if descriptionField != nil{ if descriptionField != nil{
dictionary["description"] = descriptionField dictionary["description"] = descriptionField
} }
if locationAttachmentId != nil { if locationAttachmentId != nil{
dictionary["locationAttachmentId"] = locationAttachmentId dictionary["locationAttachmentId"] = locationAttachmentId
} }
if reporterPhone != nil {
dictionary["reporterPhone"] = reporterPhone
}
if device != nil{ if device != nil{
dictionary["device"] = device.toDictionary() dictionary["device"] = device.toDictionary()
} }
if deviceadree != nil{
dictionary["deviceadree"] = deviceadree
}
if finish != nil{ if finish != nil{
dictionary["finish"] = finish dictionary["finish"] = finish
} }
...@@ -112,8 +139,11 @@ open class BillCompletedRequestModel : NSObject{ ...@@ -112,8 +139,11 @@ open class BillCompletedRequestModel : NSObject{
if level != nil{ if level != nil{
dictionary["level"] = level dictionary["level"] = level
} }
if store != nil{ if note != nil{
dictionary["store"] = store.toDictionary() dictionary["note"] = note
}
if position != nil{
dictionary["position"] = position.toDictionary()
} }
if receiveTime != nil{ if receiveTime != nil{
dictionary["receiveTime"] = receiveTime dictionary["receiveTime"] = receiveTime
...@@ -121,21 +151,27 @@ open class BillCompletedRequestModel : NSObject{ ...@@ -121,21 +151,27 @@ open class BillCompletedRequestModel : NSObject{
if reportUser != nil{ if reportUser != nil{
dictionary["reportUser"] = reportUser.toDictionary() dictionary["reportUser"] = reportUser.toDictionary()
} }
if reporterPhone != nil{
dictionary["reporterPhone"] = reporterPhone
}
if requestTime != nil{ if requestTime != nil{
dictionary["requestTime"] = requestTime dictionary["requestTime"] = requestTime
} }
if serviceType != nil{ if serviceType != nil{
dictionary["serviceType"] = serviceType dictionary["serviceType"] = serviceType
} }
if deviceadree != nil{
dictionary["deviceadree"] = deviceadree
}
if source != nil{ if source != nil{
dictionary["source"] = source dictionary["source"] = source
} }
if state != nil{ if state != nil{
dictionary["state"] = state dictionary["state"] = state
} }
if store != nil{
dictionary["store"] = store.toDictionary()
}
if tenant != nil{
dictionary["tenant"] = tenant.toDictionary()
}
if uuid != nil{ if uuid != nil{
dictionary["uuid"] = uuid dictionary["uuid"] = uuid
} }
......
...@@ -55,34 +55,34 @@ class RepairOrderDetailResult : NSObject{ ...@@ -55,34 +55,34 @@ class RepairOrderDetailResult : NSObject{
open class BillDetailData : NSObject{ open class BillDetailData : NSObject{
var attachmentId : String! var attachmentId : String!
var attachments : AnyObject! var attachments : String!
var brokenTime : String! var brokenTime : String!
var cancleReason : AnyObject! var cancleReason : String!
var cancleTime : AnyObject! var cancleTime : String!
var cancleUser : AnyObject! var cancleUser : String!
var createId : String! var createId : String!
var createOperName : String! var createOperName : String!
var createTime : String! var createTime : String!
var descriptionField : String! var descriptionField : String!
var descriptionFieldHeight: CGFloat! = 10 var descriptionFieldHeight: CGFloat! = 10
var device : UCN! var device : UCN!
var deviceType : AnyObject! var deviceType : String!
var deviceadree : String! var deviceadree : String!
var executes : [BillDetailExecute]! var executes : [BillDetailExecute]!
var feedback : AnyObject! var feedback : String!
var feedbackNote : AnyObject! var feedbackNote : String!
var finish : Bool! = false var finish : Bool! = false
var finishNote : String! var finishNote : String!
var finishNoteHeight : CGFloat! = 10 var finishNoteHeight : CGFloat! = 10
var finishTime : String! var finishTime : String!
var locationAttachmentId: String! var locationAttachmentId: String!
var finishUser : UCN! var finishUser : UCN!
var labourfee : AnyObject! var labourfee : String!
var lastModifyId : String! var lastModifyId : String!
var lastModifyOperName : String! var lastModifyOperName : String!
var lastModifyTime : String! var lastModifyTime : String!
var level : String! var level : String!
var materielfee : AnyObject! var materielfee : String!
var note : String! var note : String!
var noteHeight: CGFloat! = 10 var noteHeight: CGFloat! = 10
var position : UCN! var position : UCN!
...@@ -115,11 +115,11 @@ open class BillDetailData : NSObject{ ...@@ -115,11 +115,11 @@ open class BillDetailData : NSObject{
} }
isEditable = json["isEditable"].boolValue isEditable = json["isEditable"].boolValue
attachmentId = json["attachmentId"].stringValue attachmentId = json["attachmentId"].stringValue
attachments = json["attachments"] as AnyObject attachments = json["attachments"].stringValue
brokenTime = json["brokenTime"].stringValue brokenTime = json["brokenTime"].stringValue
cancleReason = json["cancleReason"] as AnyObject cancleReason = json["cancleReason"].stringValue
cancleTime = json["cancleTime"] as AnyObject cancleTime = json["cancleTime"].stringValue
cancleUser = json["cancleUser"] as AnyObject cancleUser = json["cancleUser"].stringValue
createId = json["create_id"].stringValue createId = json["create_id"].stringValue
locationAttachmentId = json["locationAttachmentId"].stringValue locationAttachmentId = json["locationAttachmentId"].stringValue
createOperName = json["create_operName"].stringValue createOperName = json["create_operName"].stringValue
...@@ -130,7 +130,7 @@ open class BillDetailData : NSObject{ ...@@ -130,7 +130,7 @@ open class BillDetailData : NSObject{
if !deviceJson.isEmpty{ if !deviceJson.isEmpty{
device = UCN(fromJson: deviceJson) device = UCN(fromJson: deviceJson)
} }
deviceType = json["deviceType"] as AnyObject deviceType = json["deviceType"].stringValue
deviceadree = json["deviceadree"].stringValue deviceadree = json["deviceadree"].stringValue
executes = [BillDetailExecute]() executes = [BillDetailExecute]()
let executesArray = json["executes"].arrayValue let executesArray = json["executes"].arrayValue
...@@ -138,8 +138,8 @@ open class BillDetailData : NSObject{ ...@@ -138,8 +138,8 @@ open class BillDetailData : NSObject{
let value = BillDetailExecute(fromJson: executesJson) let value = BillDetailExecute(fromJson: executesJson)
executes.append(value) executes.append(value)
} }
feedback = json["feedback"] as AnyObject feedback = json["feedback"].stringValue
feedbackNote = json["feedbackNote"] as AnyObject feedbackNote = json["feedbackNote"].stringValue
finish = json["finish"].boolValue finish = json["finish"].boolValue
finishNote = json["finishNote"].stringValue finishNote = json["finishNote"].stringValue
finishNoteHeight = finishNote.calculateStringSize(CGSize(width: kWidth - 105, height: CGFloat.greatestFiniteMagnitude), font: UIFont.systemFont(ofSize: 13)).height finishNoteHeight = finishNote.calculateStringSize(CGSize(width: kWidth - 105, height: CGFloat.greatestFiniteMagnitude), font: UIFont.systemFont(ofSize: 13)).height
...@@ -148,12 +148,12 @@ open class BillDetailData : NSObject{ ...@@ -148,12 +148,12 @@ open class BillDetailData : NSObject{
if !finishUserJson.isEmpty{ if !finishUserJson.isEmpty{
finishUser = UCN(fromJson: finishUserJson) finishUser = UCN(fromJson: finishUserJson)
} }
labourfee = json["labourfee"] as AnyObject labourfee = json["labourfee"].stringValue
lastModifyId = json["lastModify_id"].stringValue lastModifyId = json["lastModify_id"].stringValue
lastModifyOperName = json["lastModify_operName"].stringValue lastModifyOperName = json["lastModify_operName"].stringValue
lastModifyTime = json["lastModify_time"].stringValue lastModifyTime = json["lastModify_time"].stringValue
level = json["level"].stringValue level = json["level"].stringValue
materielfee = json["materielfee"] as AnyObject materielfee = json["materielfee"].stringValue
note = json["note"].stringValue note = json["note"].stringValue
noteHeight = note.calculateStringSize(CGSize(width: kWidth - 105, height: CGFloat.greatestFiniteMagnitude), font: UIFont.systemFont(ofSize: 13)).height noteHeight = note.calculateStringSize(CGSize(width: kWidth - 105, height: CGFloat.greatestFiniteMagnitude), font: UIFont.systemFont(ofSize: 13)).height
...@@ -259,7 +259,7 @@ open class BillDetailData : NSObject{ ...@@ -259,7 +259,7 @@ open class BillDetailData : NSObject{
dictionary["finishTime"] = finishTime dictionary["finishTime"] = finishTime
} }
if finishUser != nil{ if finishUser != nil{
dictionary["finishUser"] = finishUser dictionary["finishUser"] = finishUser.toDictionary()
} }
if labourfee != nil{ if labourfee != nil{
dictionary["labourfee"] = labourfee dictionary["labourfee"] = labourfee
...@@ -310,7 +310,7 @@ open class BillDetailData : NSObject{ ...@@ -310,7 +310,7 @@ open class BillDetailData : NSObject{
dictionary["state"] = state dictionary["state"] = state
} }
if store != nil{ if store != nil{
dictionary["store"] = store dictionary["store"] = store.toDictionary()
} }
if tenant != nil{ if tenant != nil{
dictionary["tenant"] = tenant.toDictionary() dictionary["tenant"] = tenant.toDictionary()
......
...@@ -238,9 +238,11 @@ extension RepairOrderAddViewModel { ...@@ -238,9 +238,11 @@ extension RepairOrderAddViewModel {
controller.pushVC(publicFilterVc) controller.pushVC(publicFilterVc)
publicFilterVc.setNavigationTitle("筛选报事人",.SINGLE, { (choices, index) in publicFilterVc.setNavigationTitle("筛选报事人",.SINGLE, { (choices, index) in
let choiceModel = choices.first! let choiceModel = choices.first!
let model = result[index!]
controller.originatorLabel.text = choiceModel.title controller.originatorLabel.text = choiceModel.title
controller.phoneNumberText.text = model.mobile
self?.saveOrderModel.reporterPhone = model.mobile
controller.originatorLabel.textColor = kBlackColor controller.originatorLabel.textColor = kBlackColor
let model = result[index!]
let user = UCN(model.login, model.name, model.uuid) let user = UCN(model.login, model.name, model.uuid)
self?.saveOrderModel.reportUser = user self?.saveOrderModel.reportUser = user
}) })
...@@ -364,7 +366,7 @@ extension RepairOrderAddViewModel { ...@@ -364,7 +366,7 @@ extension RepairOrderAddViewModel {
break break
case IndexPath(row: 2, section: 1): case IndexPath(row: 2, section: 1):
let defaultDate = controller.deviceFaultTimeLabel.text == "设施故障时间" ? NSDate().httpParameterString() : controller.deviceFaultTimeLabel.text let defaultDate = controller.deviceFaultTimeLabel.text == "设施故障时间" ? NSDate().httpParameterString() : controller.deviceFaultTimeLabel.text
YXPickerManager.share().showDatePickerView(kMainColor, datePickerModel: UIDatePickerMode.dateAndTime, minimumDate: Date(), maximumDate: nil, defaultDate: defaultDate, commit: {[weak self] (time) in YXPickerManager.share().showDatePickerView(kMainColor, datePickerModel: UIDatePickerMode.dateAndTime, minimumDate: nil, maximumDate: nil, defaultDate: defaultDate, commit: {[weak self] (time) in
controller.deviceFaultTimeLabel.text = time controller.deviceFaultTimeLabel.text = time
controller.deviceFaultTimeLabel.textColor = kBlackColor controller.deviceFaultTimeLabel.textColor = kBlackColor
self?.saveOrderModel.brokenTime = time self?.saveOrderModel.brokenTime = time
......
...@@ -25,7 +25,7 @@ class RepairOrderDetailViewModel: BaseViewModel { ...@@ -25,7 +25,7 @@ class RepairOrderDetailViewModel: BaseViewModel {
return sectionArray return sectionArray
}() }()
/// 主工单完成Model // 主工单完成Model
var billCompltedModel: BillCompletedRequestModel! var billCompltedModel: BillCompletedRequestModel!
} }
......
...@@ -133,12 +133,18 @@ extension RepairOrderViewModel { ...@@ -133,12 +133,18 @@ extension RepairOrderViewModel {
break break
case REPAIR_ORDER_FILTER_BUTTON_TAG.SOURCE.rawValue: case REPAIR_ORDER_FILTER_BUTTON_TAG.SOURCE.rawValue:
self?.filterViewModel.queryProjectSponsors().subscribe(onNext: { (result) in self?.filterViewModel.queryProjectSponsors().subscribe(onNext: { (result) in
YXPickerManager.share().showGeneralPickerView(kNavColor, dataArray: result, defaultString: sender.currentTitle, commit: { (text, index) in let array = NSMutableArray(array: result)
array.insert("全部来源", at: kZERO)
YXPickerManager.share().showGeneralPickerView(kNavColor, dataArray: array as! [String], defaultString: sender.currentTitle, commit: { (text, index) in
sender.isSelected = false sender.isSelected = false
sender.addBorder(1.0, kGaryColor) sender.addBorder(1.0, kGaryColor)
sender.setTitle(text, for: .normal) sender.setTitle(text, for: .normal)
sender.horizontalCenterTitleAndImage(5) sender.horizontalCenterTitleAndImage(5)
self?.queryModel.source = text if index == kZERO {
self?.queryModel.source = nil
}else {
self?.queryModel.source = text
}
observer.onNext(()) observer.onNext(())
}, cancel: { }, cancel: {
sender.isSelected = false sender.isSelected = false
...@@ -148,12 +154,18 @@ extension RepairOrderViewModel { ...@@ -148,12 +154,18 @@ extension RepairOrderViewModel {
break break
case REPAIR_ORDER_FILTER_BUTTON_TAG.PRIORITY.rawValue: case REPAIR_ORDER_FILTER_BUTTON_TAG.PRIORITY.rawValue:
self?.filterViewModel.queryProrityOption().subscribe(onNext: {[weak self] (result) in self?.filterViewModel.queryProrityOption().subscribe(onNext: {[weak self] (result) in
YXPickerManager.share().showGeneralPickerView(kNavColor, dataArray: result, defaultString: sender.currentTitle, commit: { (text, index) in let array = NSMutableArray(array: result)
array.insert("全部优先级", at: kZERO)
YXPickerManager.share().showGeneralPickerView(kNavColor, dataArray: array as! [String], defaultString: sender.currentTitle, commit: { (text, index) in
sender.isSelected = false sender.isSelected = false
sender.addBorder(1.0, kGaryColor) sender.addBorder(1.0, kGaryColor)
sender.setTitle(text, for: .normal) sender.setTitle(text, for: .normal)
sender.horizontalCenterTitleAndImage(5) sender.horizontalCenterTitleAndImage(5)
self?.queryModel.level = text if index == kZERO {
self?.queryModel.level = nil
}else {
self?.queryModel.level = text
}
observer.onNext(()) observer.onNext(())
}, cancel: { }, cancel: {
sender.isSelected = false sender.isSelected = false
......
...@@ -216,7 +216,7 @@ extension ReparirChildBillViewModel { ...@@ -216,7 +216,7 @@ extension ReparirChildBillViewModel {
func childBillDetailAssignment(_ controller: RepairOrderChildBillDetailViewController) { func childBillDetailAssignment(_ controller: RepairOrderChildBillDetailViewController) {
controller.workPersonLabel.text = disposeEmpty2(childBillDetailData.processor) controller.workPersonLabel.text = disposeEmpty2(childBillDetailData.processor)
controller.placeTimeLabel.text = disposeEmpty2(childBillDetailData.processBegin) controller.placeTimeLabel.text = disposeEmpty2(childBillDetailData.processBegin)
controller.leaveTimeLabel.text = disposeEmpty2(childBillDetailData.processBegin) controller.leaveTimeLabel.text = disposeEmpty2(childBillDetailData.processEnd)
controller.failureCauseLabel.text = disposeEmpty2(childBillDetailData.reason) controller.failureCauseLabel.text = disposeEmpty2(childBillDetailData.reason)
controller.processModeLabel.text = disposeEmpty2(childBillDetailData.processMode) controller.processModeLabel.text = disposeEmpty2(childBillDetailData.processMode)
if childBillDetailData.owner != nil { if childBillDetailData.owner != nil {
......
...@@ -3305,6 +3305,6 @@ ...@@ -3305,6 +3305,6 @@
<image name="todo_icon" width="23" height="24"/> <image name="todo_icon" width="23" height="24"/>
</resources> </resources>
<inferredMetricsTieBreakers> <inferredMetricsTieBreakers>
<segue reference="eK1-nw-kV4"/> <segue reference="ui0-ve-aBK"/>
</inferredMetricsTieBreakers> </inferredMetricsTieBreakers>
</document> </document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment