Commit c541db2c authored by lujunye's avatar lujunye

修复打印bug

parent 23a4b7fd
...@@ -10,7 +10,6 @@ import UIKit ...@@ -10,7 +10,6 @@ import UIKit
class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlertTbAddViewCellDelegate,TitleAndSelectCellDelegate{ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlertTbAddViewCellDelegate,TitleAndSelectCellDelegate{
var is_gys = false { var is_gys = false {
didSet{ didSet{
if is_gys{ if is_gys{
...@@ -40,7 +39,6 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert ...@@ -40,7 +39,6 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
func loadData(){ func loadData(){
HUD.flash(.progress) HUD.flash(.progress)
if is_gys { if is_gys {
print("2")
if gys_centers.count == 0 { if gys_centers.count == 0 {
getSupShop(["user_token":UserToken as Any]) { (data) in getSupShop(["user_token":UserToken as Any]) { (data) in
let model = data as! getSupShopModel let model = data as! getSupShopModel
...@@ -54,7 +52,6 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert ...@@ -54,7 +52,6 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
} }
return return
}else{ }else{
print("3")
if centers.count == 0 { if centers.count == 0 {
getDbtShop(["user_token":UserToken as Any]) { (data) in getDbtShop(["user_token":UserToken as Any]) { (data) in
let model = data as! getDbtShopModel let model = data as! getDbtShopModel
...@@ -192,14 +189,11 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert ...@@ -192,14 +189,11 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}.map { }.map {
$0.element $0.element
} }
results.forEach { (str) in results.forEach { (str) in
if str != "" { if str != "" {
d.append(str) d.append(str)
} }
} }
if title_lbl.text == "新增供应商" { if title_lbl.text == "新增供应商" {
for i in 0 ..< d.count{ for i in 0 ..< d.count{
let str = d[i] let str = d[i]
...@@ -285,7 +279,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert ...@@ -285,7 +279,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
// /初始化时将xib中的view添加进来 // /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
print("2")
contentView = loadViewFromNib() contentView = loadViewFromNib()
addSubview(contentView) addSubview(contentView)
contentView.snp.makeConstraints { (make) in contentView.snp.makeConstraints { (make) in
...@@ -296,7 +290,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert ...@@ -296,7 +290,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
bottom_tableview.separatorStyle = .none bottom_tableview.separatorStyle = .none
bottom_tableview.register(UINib(nibName: "TitleAndSelectCell", bundle: nil), forCellReuseIdentifier: "TitleAndSelectCell") bottom_tableview.register(UINib(nibName: "TitleAndSelectCell", bundle: nil), forCellReuseIdentifier: "TitleAndSelectCell")
loadData() // loadData()
} }
//加载xib //加载xib
func loadViewFromNib() -> UIView { func loadViewFromNib() -> UIView {
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</view> </view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="0V2-BU-sF9"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="0V2-BU-sF9">
<rect key="frame" x="0.0" y="560.5" width="414" height="340.5"/> <rect key="frame" x="0.0" y="560.5" width="414" height="335.5"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
<constraint firstItem="6RK-yc-lGB" firstAttribute="centerY" secondItem="Mqd-Qa-wVl" secondAttribute="centerY" id="hmz-a9-ddE"/> <constraint firstItem="6RK-yc-lGB" firstAttribute="centerY" secondItem="Mqd-Qa-wVl" secondAttribute="centerY" id="hmz-a9-ddE"/>
<constraint firstItem="0V2-BU-sF9" firstAttribute="top" secondItem="6RK-yc-lGB" secondAttribute="bottom" constant="30" id="k9O-NX-iZq"/> <constraint firstItem="0V2-BU-sF9" firstAttribute="top" secondItem="6RK-yc-lGB" secondAttribute="bottom" constant="30" id="k9O-NX-iZq"/>
<constraint firstItem="6RK-yc-lGB" firstAttribute="centerX" secondItem="Mqd-Qa-wVl" secondAttribute="centerX" id="oUQ-yW-coe"/> <constraint firstItem="6RK-yc-lGB" firstAttribute="centerX" secondItem="Mqd-Qa-wVl" secondAttribute="centerX" id="oUQ-yW-coe"/>
<constraint firstAttribute="bottom" secondItem="0V2-BU-sF9" secondAttribute="bottom" constant="-5" id="rlj-MU-VWI"/> <constraint firstAttribute="bottom" secondItem="0V2-BU-sF9" secondAttribute="bottom" id="rlj-MU-VWI"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
......
...@@ -29,7 +29,7 @@ class TitleAndSelectCell: UITableViewCell { ...@@ -29,7 +29,7 @@ class TitleAndSelectCell: UITableViewCell {
override func layoutIfNeeded() { override func layoutIfNeeded() {
super.layoutIfNeeded() super.layoutIfNeeded()
if is_center_select { if is_center_select {
selectBtn.setImage(UIImage(named: ""), for: .normal) selectBtn.setImage(UIImage(), for: .normal)
selectBtn.setImage(UIImage(named: "icon_gou"), for: .selected) selectBtn.setImage(UIImage(named: "icon_gou"), for: .selected)
} }
} }
......
...@@ -149,20 +149,20 @@ ...@@ -149,20 +149,20 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FeE-s9-kvq"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FeE-s9-kvq">
<rect key="frame" x="0.0" y="832" width="414" height="30"/> <rect key="frame" x="0.0" y="832" width="414" height="30"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="数量" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nTB-Bc-9hg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nTB-Bc-9hg">
<rect key="frame" x="193.66666666666666" y="7" width="27" height="16"/> <rect key="frame" x="203" y="7" width="8.3333333333333428" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="#F57575"/> <color key="textColor" name="#F57575"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="件商品" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2OI-La-hUy"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="件商品" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2OI-La-hUy">
<rect key="frame" x="220.66666666666666" y="7" width="39.999999999999972" height="16"/> <rect key="frame" x="211.33333333333334" y="7" width="40" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已铺货" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Oh6-CW-i5P"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已铺货" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Oh6-CW-i5P">
<rect key="frame" x="153.66666666666666" y="7" width="40" height="16"/> <rect key="frame" x="163" y="7" width="40" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
......
...@@ -46,14 +46,14 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U ...@@ -46,14 +46,14 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
func rightBtnClick() { func rightBtnClick() {
print("新增店铺")//GLAlertTbAddView print("新增店铺")//GLAlertTbAddView
let alertView = GLAlertTbAddView(frame: self.view.window!.bounds) let alertView = GLAlertTbAddView(frame: self.view.bounds)
alertView.bottom_tableview.isHidden = true alertView.bottom_tableview.isHidden = true
if title_str != "分销商管理" { if title_str != "分销商管理" {
alertView.is_gys = true alertView.is_gys = true
}else{ }else{
alertView.is_gys = false alertView.is_gys = false
} }
self.view.window?.addSubview(alertView) self.view.addSubview(alertView)
} }
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
......
...@@ -22,6 +22,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -22,6 +22,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
} }
self.view.addSubview(vc) self.view.addSubview(vc)
} }
func DistributorSettingAlertViewSubmitAction(tag: Int, operation_type: Int, dbt_price: String, commission_type: Int, commission_per: String, commission_val: String,view:DistributorSettingAlertView) { func DistributorSettingAlertViewSubmitAction(tag: Int, operation_type: Int, dbt_price: String, commission_type: Int, commission_per: String, commission_val: String,view:DistributorSettingAlertView) {
HUD.flash(.progress, delay: 1.2) HUD.flash(.progress, delay: 1.2)
if is_Edit { if is_Edit {
...@@ -51,11 +52,10 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -51,11 +52,10 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
self.selectItem.removeAll() self.selectItem.removeAll()
self.home_list_tbv.mj_header?.beginRefreshing() self.home_list_tbv.mj_header?.beginRefreshing()
HUD.hide() HUD.hide()
} failture: { (err) in } failture: { (err) in}
}
return return
} }
let model = datas[tag] let model = datas[tag]
let dic = ["user_token":UserToken as Any, let dic = ["user_token":UserToken as Any,
"operation_type":operation_type as Any, "operation_type":operation_type as Any,
...@@ -69,8 +69,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -69,8 +69,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
view.removeFromSuperview() view.removeFromSuperview()
self.home_list_tbv.mj_header?.beginRefreshing() self.home_list_tbv.mj_header?.beginRefreshing()
HUD.hide() HUD.hide()
} failture: { (err) in } failture: { (err) in}
}
} }
func GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) { func GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) {
...@@ -142,14 +141,12 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -142,14 +141,12 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
default: break default: break
} }
} }
func colseAction(sender: Int) { func colseAction(sender: Int) {
if showSelectV != nil { if showSelectV != nil {
showSelectV.removeFromSuperview() showSelectV.removeFromSuperview()
} }
} }
var keyword = "" var keyword = ""
...@@ -160,18 +157,21 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -160,18 +157,21 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
removeBlackBtnView() removeBlackBtnView()
home_list_tbv.mj_header?.beginRefreshing() home_list_tbv.mj_header?.beginRefreshing()
} }
@objc func removeBlackBtnView(){ @objc func removeBlackBtnView(){
if blackBtnView != nil { if blackBtnView != nil {
blackBtnView.removeFromSuperview() blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder() searchV!.resignFirstResponder()
} }
} }
var blackBtnView:UIButton! = nil var blackBtnView:UIButton! = nil
//MARK:--取消搜索代理 //MARK:--取消搜索代理
func clearSearchAction() { func clearSearchAction() {
print("取消搜索代理了--") print("取消搜索代理了--")
// home_list_tbv.mj_header?.beginRefreshing()
} }
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) { func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--") print("编辑即将结束了--")
removeBlackBtnView() removeBlackBtnView()
...@@ -182,6 +182,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -182,6 +182,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
} }
} }
} }
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool { func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本") print("调起搜索后添加个蒙版本")
if showSelectV != nil { if showSelectV != nil {
...@@ -303,7 +304,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -303,7 +304,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
self.home_list_tbv.mj_footer = self.footerMJ self.home_list_tbv.mj_footer = self.footerMJ
} }
//MARK: - tableview_delegate //MARK: - tableview_delegate
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datas.count return datas.count
......
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
<color key="textColor" name="灰色字体颜色"/> <color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="数量" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cql-r2-rMK"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cql-r2-rMK">
<rect key="frame" x="31.5" y="9.5" width="22.5" height="11"/> <rect key="frame" x="31.5" y="9.5" width="7" height="11"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="11" id="XIV-gv-rHH"/> <constraint firstAttribute="height" constant="11" id="XIV-gv-rHH"/>
</constraints> </constraints>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="件商品" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4z8-dm-8VV"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="件商品" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4z8-dm-8VV">
<rect key="frame" x="59" y="9.5" width="34" height="11"/> <rect key="frame" x="43.5" y="9.5" width="34" height="11"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="11" id="1Ta-p5-MZ0"/> <constraint firstAttribute="height" constant="11" id="1Ta-p5-MZ0"/>
</constraints> </constraints>
......
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