diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate index f726965..0c8b31e 100644 Binary files a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate and b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 72f88e4..f57b525 100644 --- a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -462,8 +462,8 @@ filePath = "OrderScheduling/Common/WebView/WebViewTool.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "59" - endingLineNumber = "59" + startingLineNumber = "60" + endingLineNumber = "60" landmarkName = "init()" landmarkType = "7"> @@ -2958,8 +2958,8 @@ filePath = "OrderScheduling/Common/WebView/WebViewTool.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "62" - endingLineNumber = "62" + startingLineNumber = "63" + endingLineNumber = "63" landmarkName = "init()" landmarkType = "7"> @@ -4772,5 +4772,21 @@ landmarkType = "7"> + + + + diff --git a/OrderScheduling/Common/WebView/WebViewTool.swift b/OrderScheduling/Common/WebView/WebViewTool.swift index 52c479d..613c130 100644 --- a/OrderScheduling/Common/WebView/WebViewTool.swift +++ b/OrderScheduling/Common/WebView/WebViewTool.swift @@ -36,6 +36,7 @@ open class WebViewTool : NSObject { case docmentList = "文档资料" case newTrainingList = "新人培训" case kpiIndex = "KPI数据统计" + case batteryList = "电瓶进销存" } public override init() { @@ -128,6 +129,9 @@ open class WebViewTool : NSObject { case .kpiIndex: vc = WebViewController(showNavBar:true, title: nil, url: "\((h5Models?.kpiIndex)!)?token=\((USER.token)!)"+(appending ?? "")) break + case .batteryList: + vc = WebViewController(showNavBar:false, title: nil, url: "\((h5Models?.batteryList)!)?token=\((USER.token)!)"+(appending ?? "")) + break } if let vc { diff --git a/OrderScheduling/HttpResponseModel/ResponseModel.swift b/OrderScheduling/HttpResponseModel/ResponseModel.swift index 3191fae..953ce14 100644 --- a/OrderScheduling/HttpResponseModel/ResponseModel.swift +++ b/OrderScheduling/HttpResponseModel/ResponseModel.swift @@ -260,6 +260,7 @@ public class DispatchAppH5UrlDataModel : Decodable { var docmentList : String var newTrainingList : String var kpiIndex : String + var batteryList : String } public class VersionCheckDataModel : Decodable { diff --git a/OrderScheduling/Mine/ViewController/MineController.swift b/OrderScheduling/Mine/ViewController/MineController.swift index 51ceac0..0524cb9 100644 --- a/OrderScheduling/Mine/ViewController/MineController.swift +++ b/OrderScheduling/Mine/ViewController/MineController.swift @@ -111,6 +111,13 @@ extension MineController { }) .disposed(by: disposeBag) + mineView.dianpingjinxiaocunGes.rx.event + .observe(on: MainScheduler.instance) + .subscribe(onNext: { _ in + WEBTOOL.open(name: .batteryList, appending: nil) + }) + .disposed(by: disposeBag) + mineView.wendangziliaoGes.rx.event .observe(on: MainScheduler.instance) .subscribe(onNext: { _ in @@ -185,24 +192,50 @@ open class MineController : ZDViewController { mineView.gongdanduizhang.titleLabel.text = "工单对账" mineView.kaipiaotongzhi.titleLabel.text = "开票通知" mineView.luqiaofeibaoxiao.titleLabel.text = "路桥费报销" + mineView.dianpingjinxiaocun.titleLabel.text = "电瓶进销存" mineView.peixunwendang.titleLabel.text = "培训文档" mineView.wendangziliao.titleLabel.text = "文档资料" mineView.banbenjiance.titleLabel.text = "版本检测" mineView.tongzhitixing.titleLabel.text = "通知提醒" + var orderRadiusViewAddHeightCount = 0 + if (USER.supplierId != 1128) && USER.supplierType == 1 { - mineView.kaipiaotongzhi.line.isHidden = false + orderRadiusViewAddHeightCount+=1 mineView.luqiaofeibaoxiao.isHidden = false - mineView.orderRadiusView.snp.updateConstraints({ make in - make.height.equalTo(auto(165)) - }) + mineView.luqiaofeibaoxiao.snp.updateConstraints { make in + make.height.equalTo(auto(55)) + } + }else{ + mineView.luqiaofeibaoxiao.isHidden = true + mineView.luqiaofeibaoxiao.snp.updateConstraints { make in + make.height.equalTo(0) + } + } + + if USER.supplierType == 1 { + orderRadiusViewAddHeightCount+=1 + mineView.dianpingjinxiaocun.isHidden = false + }else{ + mineView.dianpingjinxiaocun.isHidden = true + } + + if orderRadiusViewAddHeightCount > 0 { + mineView.kaipiaotongzhi.line.isHidden = false }else{ mineView.kaipiaotongzhi.line.isHidden = true - mineView.luqiaofeibaoxiao.isHidden = true - mineView.orderRadiusView.snp.updateConstraints({ make in - make.height.equalTo(auto(110)) - }) } + + if orderRadiusViewAddHeightCount == 2 { + mineView.luqiaofeibaoxiao.line.isHidden = false + }else{ + mineView.luqiaofeibaoxiao.line.isHidden = true + } + + mineView.orderRadiusView.snp.updateConstraints({ make in + make.height.equalTo(auto(110) + CGFloat(orderRadiusViewAddHeightCount) * auto(55)) + }) + addActions() } @@ -237,6 +270,8 @@ open class MineView : DDView { public let kaipiaotongzhi : MineCell public let luqiaofeibaoxiaoGes : UITapGestureRecognizer public let luqiaofeibaoxiao : MineCell + public let dianpingjinxiaocunGes : UITapGestureRecognizer + public let dianpingjinxiaocun : MineCell public let peixunwendangGes : UITapGestureRecognizer public let peixunwendang : MineCell public let wendangziliaoGes : UITapGestureRecognizer @@ -271,6 +306,8 @@ open class MineView : DDView { luqiaofeibaoxiao = MineCell() kaipiaotongzhiGes = UITapGestureRecognizer() kaipiaotongzhi = MineCell() + dianpingjinxiaocunGes = UITapGestureRecognizer() + dianpingjinxiaocun = MineCell() peixunwendangGes = UITapGestureRecognizer() peixunwendang = MineCell() wendangziliaoGes = UITapGestureRecognizer() @@ -325,6 +362,10 @@ open class MineView : DDView { luqiaofeibaoxiao.line.isHidden = true luqiaofeibaoxiao.isHidden = true orderRadiusView.addSubview(luqiaofeibaoxiao) + dianpingjinxiaocun.addGestureRecognizer(dianpingjinxiaocunGes) + dianpingjinxiaocun.line.isHidden = true + dianpingjinxiaocun.isHidden = true + orderRadiusView.addSubview(dianpingjinxiaocun) peixunwendang.addGestureRecognizer(peixunwendangGes) materialRadiusView.addSubview(peixunwendang) wendangziliao.line.isHidden = true @@ -435,7 +476,13 @@ open class MineView : DDView { luqiaofeibaoxiao.snp.makeConstraints { make in make.top.equalTo(kaipiaotongzhi.snp.bottom) - make.left.bottom.right.equalToSuperview() + make.left.right.equalToSuperview() + make.height.equalTo(0) + } + + dianpingjinxiaocun.snp.makeConstraints { make in + make.top.equalTo(luqiaofeibaoxiao.snp.bottom) + make.left.right.bottom.equalToSuperview() } peixunwendang.snp.makeConstraints { make in