Commit 356d4821 authored by 刘俊宏's avatar 刘俊宏

分销订单管理

parent eae5f8f2
...@@ -583,6 +583,10 @@ ...@@ -583,6 +583,10 @@
F96E9D5D246656A700B5B94A /* HGImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96E9D58246656A700B5B94A /* HGImagePickerController.swift */; }; F96E9D5D246656A700B5B94A /* HGImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96E9D58246656A700B5B94A /* HGImagePickerController.swift */; };
F96E9D60246657B500B5B94A /* HGImage.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F96E9D5E246657B500B5B94A /* HGImage.xcassets */; }; F96E9D60246657B500B5B94A /* HGImage.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F96E9D5E246657B500B5B94A /* HGImage.xcassets */; };
F96E9D61246657B500B5B94A /* HGImage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F96E9D5F246657B500B5B94A /* HGImage.storyboard */; }; F96E9D61246657B500B5B94A /* HGImage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F96E9D5F246657B500B5B94A /* HGImage.storyboard */; };
F970B3672550F5AA0026F9D5 /* RetailManageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F970B3652550F5AA0026F9D5 /* RetailManageViewController.swift */; };
F970B3682550F5AA0026F9D5 /* RetailManageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F970B3662550F5AA0026F9D5 /* RetailManageViewController.xib */; };
F970B3702551280B0026F9D5 /* TimeShowDownView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F970B36F2551280B0026F9D5 /* TimeShowDownView.xib */; };
F970B3752551281A0026F9D5 /* TimeShowDownView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F970B3742551281A0026F9D5 /* TimeShowDownView.swift */; };
F971D7B3248B6432007F1619 /* address_new.json in Resources */ = {isa = PBXBuildFile; fileRef = F971D7B2248B6432007F1619 /* address_new.json */; }; F971D7B3248B6432007F1619 /* address_new.json in Resources */ = {isa = PBXBuildFile; fileRef = F971D7B2248B6432007F1619 /* address_new.json */; };
F993C66E24CADE2400493CC7 /* WayBillStautsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F993C66C24CADE2400493CC7 /* WayBillStautsTableViewCell.swift */; }; F993C66E24CADE2400493CC7 /* WayBillStautsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F993C66C24CADE2400493CC7 /* WayBillStautsTableViewCell.swift */; };
F993C66F24CADE2400493CC7 /* WayBillStautsTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F993C66D24CADE2400493CC7 /* WayBillStautsTableViewCell.xib */; }; F993C66F24CADE2400493CC7 /* WayBillStautsTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F993C66D24CADE2400493CC7 /* WayBillStautsTableViewCell.xib */; };
...@@ -1285,6 +1289,10 @@ ...@@ -1285,6 +1289,10 @@
F96E9D58246656A700B5B94A /* HGImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HGImagePickerController.swift; sourceTree = "<group>"; }; F96E9D58246656A700B5B94A /* HGImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HGImagePickerController.swift; sourceTree = "<group>"; };
F96E9D5E246657B500B5B94A /* HGImage.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = HGImage.xcassets; sourceTree = "<group>"; }; F96E9D5E246657B500B5B94A /* HGImage.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = HGImage.xcassets; sourceTree = "<group>"; };
F96E9D5F246657B500B5B94A /* HGImage.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = HGImage.storyboard; sourceTree = "<group>"; }; F96E9D5F246657B500B5B94A /* HGImage.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = HGImage.storyboard; sourceTree = "<group>"; };
F970B3652550F5AA0026F9D5 /* RetailManageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetailManageViewController.swift; sourceTree = "<group>"; };
F970B3662550F5AA0026F9D5 /* RetailManageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RetailManageViewController.xib; sourceTree = "<group>"; };
F970B36F2551280B0026F9D5 /* TimeShowDownView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TimeShowDownView.xib; sourceTree = "<group>"; };
F970B3742551281A0026F9D5 /* TimeShowDownView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeShowDownView.swift; sourceTree = "<group>"; };
F971D7B2248B6432007F1619 /* address_new.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = address_new.json; sourceTree = "<group>"; }; F971D7B2248B6432007F1619 /* address_new.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = address_new.json; sourceTree = "<group>"; };
F993C66C24CADE2400493CC7 /* WayBillStautsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WayBillStautsTableViewCell.swift; sourceTree = "<group>"; }; F993C66C24CADE2400493CC7 /* WayBillStautsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WayBillStautsTableViewCell.swift; sourceTree = "<group>"; };
F993C66D24CADE2400493CC7 /* WayBillStautsTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WayBillStautsTableViewCell.xib; sourceTree = "<group>"; }; F993C66D24CADE2400493CC7 /* WayBillStautsTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WayBillStautsTableViewCell.xib; sourceTree = "<group>"; };
...@@ -2002,6 +2010,7 @@ ...@@ -2002,6 +2010,7 @@
E077DC6725512E73000B0DA5 /* 分销商品管理 */, E077DC6725512E73000B0DA5 /* 分销商品管理 */,
E077DC5C25512489000B0DA5 /* 供应商合作管理 */, E077DC5C25512489000B0DA5 /* 供应商合作管理 */,
E0AD92E62550E4DD00D82C17 /* 供应商分销商品管理 */, E0AD92E62550E4DD00D82C17 /* 供应商分销商品管理 */,
F970B3642550F59D0026F9D5 /* 分销订单管理 */,
F9C2F6EF254FDEAC00516E00 /* 分销商分账设置 */, F9C2F6EF254FDEAC00516E00 /* 分销商分账设置 */,
F9A4AB6A24C9220C00094BD1 /* 货拉拉 */, F9A4AB6A24C9220C00094BD1 /* 货拉拉 */,
F90F881B24C822750050EF02 /* 城市列表 */, F90F881B24C822750050EF02 /* 城市列表 */,
...@@ -2677,6 +2686,8 @@ ...@@ -2677,6 +2686,8 @@
F9956B1B2463D941001A617D /* WorkSelectTimeView.xib */, F9956B1B2463D941001A617D /* WorkSelectTimeView.xib */,
F9956B1D2463D94E001A617D /* WorkSelectTimeView.swift */, F9956B1D2463D94E001A617D /* WorkSelectTimeView.swift */,
F93E31FC24727A2D00524DFC /* ShowTimeSelectView.swift */, F93E31FC24727A2D00524DFC /* ShowTimeSelectView.swift */,
F970B36F2551280B0026F9D5 /* TimeShowDownView.xib */,
F970B3742551281A0026F9D5 /* TimeShowDownView.swift */,
); );
path = TimeSelectView; path = TimeSelectView;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3050,6 +3061,15 @@ ...@@ -3050,6 +3061,15 @@
path = HGImage; path = HGImage;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
F970B3642550F59D0026F9D5 /* 分销订单管理 */ = {
isa = PBXGroup;
children = (
F970B3652550F5AA0026F9D5 /* RetailManageViewController.swift */,
F970B3662550F5AA0026F9D5 /* RetailManageViewController.xib */,
);
path = "分销订单管理";
sourceTree = "<group>";
};
F9956B1F24640865001A617D /* 商品分类 */ = { F9956B1F24640865001A617D /* 商品分类 */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -3323,6 +3343,7 @@ ...@@ -3323,6 +3343,7 @@
F9A4AB7424C933A700094BD1 /* XiaDanUserInfoViewController.xib in Resources */, F9A4AB7424C933A700094BD1 /* XiaDanUserInfoViewController.xib in Resources */,
F9A4F25024C9689600D1DD13 /* OtherDemandViewController.xib in Resources */, F9A4F25024C9689600D1DD13 /* OtherDemandViewController.xib in Resources */,
E09B03C12445B96500211A51 /* FgPassViewController.xib in Resources */, E09B03C12445B96500211A51 /* FgPassViewController.xib in Resources */,
F970B3702551280B0026F9D5 /* TimeShowDownView.xib in Resources */,
E06524EE2458008900CA22E2 /* RuKuViewController.xib in Resources */, E06524EE2458008900CA22E2 /* RuKuViewController.xib in Resources */,
F96E48A824CA90DC000AB8D4 /* DriverItemTableViewCell.xib in Resources */, F96E48A824CA90DC000AB8D4 /* DriverItemTableViewCell.xib in Resources */,
E06524F624580BB600CA22E2 /* BaoZhiQiCell.xib in Resources */, E06524F624580BB600CA22E2 /* BaoZhiQiCell.xib in Resources */,
...@@ -3470,6 +3491,7 @@ ...@@ -3470,6 +3491,7 @@
E0A2E82C24555D8600D6DB34 /* KuCunXiangQingCell.xib in Resources */, E0A2E82C24555D8600D6DB34 /* KuCunXiangQingCell.xib in Resources */,
E020632D246CDD3F007A40C4 /* OrderDViewFooterView.xib in Resources */, E020632D246CDD3F007A40C4 /* OrderDViewFooterView.xib in Resources */,
E02392072490819600C4C632 /* CGDListCell.xib in Resources */, E02392072490819600C4C632 /* CGDListCell.xib in Resources */,
F970B3682550F5AA0026F9D5 /* RetailManageViewController.xib in Resources */,
E0F3C2CC24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib in Resources */, E0F3C2CC24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib in Resources */,
E02C88272456B24F00925766 /* WuLiuGenZongViewController.xib in Resources */, E02C88272456B24F00925766 /* WuLiuGenZongViewController.xib in Resources */,
F9D44E8924CBC6A400FBD8DB /* ToAndFormSelectViewController.xib in Resources */, F9D44E8924CBC6A400FBD8DB /* ToAndFormSelectViewController.xib in Resources */,
...@@ -3815,6 +3837,7 @@ ...@@ -3815,6 +3837,7 @@
F9697248248F88C70010D39B /* GeliAltetCodeView.swift in Sources */, F9697248248F88C70010D39B /* GeliAltetCodeView.swift in Sources */,
F93615DB2480B421004187F9 /* WorkInterface.swift in Sources */, F93615DB2480B421004187F9 /* WorkInterface.swift in Sources */,
F956D5A0246A2D9C003FF510 /* LMNImageView.m in Sources */, F956D5A0246A2D9C003FF510 /* LMNImageView.m in Sources */,
F970B3672550F5AA0026F9D5 /* RetailManageViewController.swift in Sources */,
E0E341EA246E95EE0060AC20 /* PingLunCell.swift in Sources */, E0E341EA246E95EE0060AC20 /* PingLunCell.swift in Sources */,
F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */, F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */,
F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */, F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */,
...@@ -3829,6 +3852,7 @@ ...@@ -3829,6 +3852,7 @@
E040399824D14E0E008CF965 /* LalamoveInterface.swift in Sources */, E040399824D14E0E008CF965 /* LalamoveInterface.swift in Sources */,
F933F6CE2452C68B00189561 /* PKHUDSquareBaseView.swift in Sources */, F933F6CE2452C68B00189561 /* PKHUDSquareBaseView.swift in Sources */,
E0B5308424728D7E00FFCC15 /* ShopWarehouseListModel.swift in Sources */, E0B5308424728D7E00FFCC15 /* ShopWarehouseListModel.swift in Sources */,
F970B3752551281A0026F9D5 /* TimeShowDownView.swift in Sources */,
E06524F524580BB600CA22E2 /* BaoZhiQiCell.swift in Sources */, E06524F524580BB600CA22E2 /* BaoZhiQiCell.swift in Sources */,
E0BE8AA4245AA31400E80134 /* YingFuZhangKuanXQViewController.swift in Sources */, E0BE8AA4245AA31400E80134 /* YingFuZhangKuanXQViewController.swift in Sources */,
F94A315324626D7800FEC38E /* WorkCViewController.swift in Sources */, F94A315324626D7800FEC38E /* WorkCViewController.swift in Sources */,
......
...@@ -29,8 +29,8 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource { ...@@ -29,8 +29,8 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource {
var dataArr : [String] = []{ var dataArr : [String] = []{
didSet{ didSet{
if dataArr.count > 3 { if dataArr.count > 3 {
if dataArr.count > 6 { if dataArr.count > 8 {
tabContentHeight.constant = 50 * 5 * glscale + 5 tabContentHeight.constant = 50 * 7 * glscale + 5
}else{ }else{
tabContentHeight.constant = CGFloat((50 * Int(glscale)) * dataArr.count + 5) tabContentHeight.constant = CGFloat((50 * Int(glscale)) * dataArr.count + 5)
...@@ -44,8 +44,6 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource { ...@@ -44,8 +44,6 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource {
func setTabv() { func setTabv() {
tableV = UITableView() tableV = UITableView()
tableV.showsVerticalScrollIndicator = false
tableV.showsHorizontalScrollIndicator = false
tabContentV.addSubview(tableV); tabContentV.addSubview(tableV);
tableV.snp.makeConstraints { (make) in tableV.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
</view> </view>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bMO-eQ-C5Q"> <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bMO-eQ-C5Q">
<rect key="frame" x="0.0" y="-5" width="375" height="155"/> <rect key="frame" x="0.0" y="-5" width="375" height="155"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="155" id="S1h-DP-cWZ"/> <constraint firstAttribute="height" constant="155" id="S1h-DP-cWZ"/>
</constraints> </constraints>
...@@ -63,5 +64,8 @@ ...@@ -63,5 +64,8 @@
<namedColor name="提示视图背景色"> <namedColor name="提示视图背景色">
<color red="0.1803921568627451" green="0.1803921568627451" blue="0.1803921568627451" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.1803921568627451" green="0.1803921568627451" blue="0.1803921568627451" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources> </resources>
</document> </document>
//
// TimeShowDownView.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/11/3.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol TimeShowDownViewDeleagte {
func TimeShowDownViewRemoveForSup()
}
class TimeShowDownView: UIView,TimeSelectViewDelgate {
var delegate:TimeShowDownViewDeleagte?
@IBAction func resetAction(_ sender: UIButton) {
self.delegate?.TimeShowDownViewRemoveForSup()
self.removeFromSuperview()
}
@IBAction func sureAction(_ sender: UIButton) {
self.delegate?.TimeShowDownViewRemoveForSup()
self.removeFromSuperview()
}
@IBAction func balckTapAction(_ sender: UITapGestureRecognizer) {
self.delegate?.TimeShowDownViewRemoveForSup()
self.removeFromSuperview()
}
var BeginDate: Date! = nil
var EndDate: Date! = nil
func selectMoreDate(beginDate: Date, endginDate: Date) {
let timeInterval:TimeInterval = beginDate.timeIntervalSince1970
let timeIntervalEnd:TimeInterval = endginDate.timeIntervalSince1970
startTimeBtn.setTitle(dayByDouble(sender: timeInterval), for: .normal)
endTimeBtn.setTitle(dayByDouble(sender: timeIntervalEnd), for: .normal)
EndDate = endginDate
BeginDate = beginDate
}
@IBOutlet weak var startTimeBtn: UIButton!
@IBOutlet weak var endTimeBtn: UIButton!
var contentView:UIView!
@IBOutlet weak var timeBgView: UIView!
weak var CalendarV:TimeSelectView?
func addTimeView() {
let calendarV = TimeSelectView(frame: CGRect(x: 0, y: 8, width: fullScreenWidth, height: 230*glscale))
calendarV.moreSelection = true
timeBgView.addSubview(calendarV)
calendarV.delegate = self
CalendarV = calendarV
}
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
addTimeView()
}
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
addTimeView()
}
//加载xib
func loadViewFromNib() -> UIView {
let className = type(of: self)
let bundle = Bundle(for: className)
let name = NSStringFromClass(className).components(separatedBy: ".").last
let nib = UINib(nibName: name!, bundle: bundle)
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
return view
}
}
This diff is collapsed.
//
// RetailManageViewController.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/11/3.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class RetailManageViewController: BaseViewController,UISearchBarDelegate,SearchBarViewDelegate,HeaderSelectViewDelegate ,SelectContentViewDelegate,TimeShowDownViewDeleagte{
@IBOutlet weak var listView: UITableView!
@IBOutlet weak var searchBgView: UIView!
@IBOutlet weak var changeBgView: UIView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "分销订单管理"
navbar.lineView.isHidden = true
self.view.addSubview(navbar)
SetTopFrame(view: searchBgView, height: 45)
//searchbar
initSearchBar()
initHeaderSelectView()
}
//MARK:--initSearchBar
weak var searchV: SearchBarView? = nil
var keyword = ""
func initSearchBar() {
let searchBr = SearchBarView.init()
self.searchBgView.addSubview(searchBr)
searchBr.snp.makeConstraints { (make) in
make.left.right.equalTo(0)
make.centerY.equalToSuperview()
make.height.equalTo(35)
}
searchV = searchBr
searchBr.placeholderStr = "分销员/分销商"
searchBr.cornerRadius = 35/2.0
searchBr.delegate = self
searchBr.delegateL = self
}
//MARK: - searchView delegate
func clearSearchAction() {
print("取消搜索代理了--")
}
//MARK:--编辑即将结束
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
loadData()
}
}
removeBlackBtnView()
}
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
keyword = searchBar.text!
removeBlackBtnView()
// listView.mj_header?.beginRefreshing()
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
if showSelectV != nil {
showSelectV.removeFromSuperview()
selectV.colseBytitleArr(arr: [], index:showSelectvIndex)
}
if timeShowDView != nil {
timeShowDView.removeFromSuperview()
selectV.colseBytitleArr(arr: [], index:showSelectvIndex)
}
blackBtnView = UIButton ()
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
self.view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.top.equalTo(searchBgView.snp_bottom)
make.left.right.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
return true
}
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder()
}
}
var blackBtnView:UIButton! = nil
//MARK:--HeaderSelectView
weak var selectV: HeaderSelectView! = nil
var showSelectvIndex = 0
weak var showSelectV: SelectContentView! = nil
weak var timeShowDView: TimeShowDownView! = nil
var selectIndexArr = [0,0,0]
func initHeaderSelectView() {
let selectView = HeaderSelectView()
selectView.firstBtn.setTitle("结算方式", for: .normal)
selectView.secBtn.setTitle("订单类型", for: .normal)
selectView.thereBtn.setTitle("结算时间", for: .normal)
changeBgView.addSubview(selectView)
selectView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalTo(0);
}
selectView.delegate = self
selectV = selectView
}
//MARK:--下拉视图模块
func showAction(sender: Int) {
showSelectvIndex = sender
switch sender {
case 0:
do {
let showSelectView = SelectContentView()
showSelectView.delegate = self
self.view.addSubview(showSelectView)
showSelectView.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(changeBgView.snp_bottom)
}
showSelectV = showSelectView
showSelectView.dataArr = ["全部", "人工结算", "自动结算", "待自动结算", "已自动结算", "待人工结算", "已人工结算"]
showSelectView.selectIndx = selectIndexArr[0]
}
break
case 1:
do {
let showSelectView = SelectContentView()
showSelectView.delegate = self
self.view.addSubview(showSelectView)
showSelectView.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(changeBgView.snp_bottom)
}
showSelectV = showSelectView
showSelectView.dataArr = ["全部", "分销员订单", "分销商订单"]
showSelectView.selectIndx = selectIndexArr[1]
}
break
case 2:
do {
//选择时间
let timeShowDownView = TimeShowDownView()
self.view.addSubview(timeShowDownView)
timeShowDownView.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(changeBgView.snp_bottom)
}
timeShowDView = timeShowDownView
timeShowDownView.delegate = self
}
break
default: break
}
}
func colseAction(sender: Int) {
if showSelectV != nil {
showSelectV.removeFromSuperview()
}
if timeShowDView != nil {
timeShowDView.removeFromSuperview()
}
}
//MARK:--SelectContentViewDelegate
func didselectCell(sender: Int) {
selectIndexArr[showSelectvIndex] = sender
selectV.colseBytitleArr(arr: [], index:showSelectvIndex)
// listView.mj_header?.beginRefreshing()
}
func selectContentvRemoveForSup() {
selectV.colseBytitleArr(arr: [], index:showSelectvIndex)
}
//MARK:--TimeShowDownViewDeleagte
func TimeShowDownViewRemoveForSup() {
selectV.colseBytitleArr(arr: [], index:showSelectvIndex)
}
//MARK:--loadData
@objc func loadData(){
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RetailManageViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="changeBgView" destination="Dne-dW-uPU" id="U0z-0u-4EA"/>
<outlet property="listView" destination="rD1-9Z-Grg" id="zax-lF-6eL"/>
<outlet property="searchBgView" destination="9De-Db-9oa" id="i9d-Xs-UPi"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9De-Db-9oa">
<rect key="frame" x="0.0" y="44" width="414" height="45"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="Ypr-rF-zvE"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dne-dW-uPU">
<rect key="frame" x="0.0" y="89" width="414" height="45"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="6Ma-LE-6Vg"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="rD1-9Z-Grg">
<rect key="frame" x="0.0" y="134" width="414" height="762"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="rD1-9Z-Grg" secondAttribute="trailing" id="I3i-6b-ylF"/>
<constraint firstItem="9De-Db-9oa" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="IMa-9D-pY4"/>
<constraint firstItem="Dne-dW-uPU" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="RTk-rs-WuV"/>
<constraint firstItem="rD1-9Z-Grg" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="aEw-6L-Zh2"/>
<constraint firstAttribute="bottom" secondItem="rD1-9Z-Grg" secondAttribute="bottom" id="eeT-2r-TnA"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Dne-dW-uPU" secondAttribute="trailing" id="iCd-pX-M1p"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="9De-Db-9oa" secondAttribute="trailing" id="iEb-Y0-FwM"/>
<constraint firstItem="9De-Db-9oa" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="rx4-C1-4Ad"/>
<constraint firstItem="rD1-9Z-Grg" firstAttribute="top" secondItem="Dne-dW-uPU" secondAttribute="bottom" id="vjO-k6-gBs"/>
<constraint firstItem="Dne-dW-uPU" firstAttribute="top" secondItem="9De-Db-9oa" secondAttribute="bottom" id="xzt-pE-zLt"/>
</constraints>
<point key="canvasLocation" x="109" y="127"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</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