Commit c541db2c authored by lujunye's avatar lujunye

修复打印bug

parent 23a4b7fd
......@@ -10,7 +10,6 @@ import UIKit
class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlertTbAddViewCellDelegate,TitleAndSelectCellDelegate{
var is_gys = false {
didSet{
if is_gys{
......@@ -40,7 +39,6 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
func loadData(){
HUD.flash(.progress)
if is_gys {
print("2")
if gys_centers.count == 0 {
getSupShop(["user_token":UserToken as Any]) { (data) in
let model = data as! getSupShopModel
......@@ -54,7 +52,6 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
return
}else{
print("3")
if centers.count == 0 {
getDbtShop(["user_token":UserToken as Any]) { (data) in
let model = data as! getDbtShopModel
......@@ -192,14 +189,11 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}.map {
$0.element
}
results.forEach { (str) in
if str != "" {
d.append(str)
}
}
if title_lbl.text == "新增供应商" {
for i in 0 ..< d.count{
let str = d[i]
......@@ -285,7 +279,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
print("2")
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
......@@ -296,7 +290,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
bottom_tableview.separatorStyle = .none
bottom_tableview.register(UINib(nibName: "TitleAndSelectCell", bundle: nil), forCellReuseIdentifier: "TitleAndSelectCell")
loadData()
// loadData()
}
//加载xib
func loadViewFromNib() -> UIView {
......
......@@ -152,7 +152,7 @@
</userDefinedRuntimeAttributes>
</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">
<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"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
......@@ -176,7 +176,7 @@
<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="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>
</view>
</subviews>
......
......@@ -29,7 +29,7 @@ class TitleAndSelectCell: UITableViewCell {
override func layoutIfNeeded() {
super.layoutIfNeeded()
if is_center_select {
selectBtn.setImage(UIImage(named: ""), for: .normal)
selectBtn.setImage(UIImage(), for: .normal)
selectBtn.setImage(UIImage(named: "icon_gou"), for: .selected)
}
}
......
......@@ -149,20 +149,20 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FeE-s9-kvq">
<rect key="frame" x="0.0" y="832" width="414" height="30"/>
<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">
<rect key="frame" x="193.66666666666666" y="7" width="27" height="16"/>
<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="203" y="7" width="8.3333333333333428" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="#F57575"/>
<nil key="highlightedColor"/>
</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">
<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"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</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">
<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"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
......
......@@ -46,14 +46,14 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
func rightBtnClick() {
print("新增店铺")//GLAlertTbAddView
let alertView = GLAlertTbAddView(frame: self.view.window!.bounds)
let alertView = GLAlertTbAddView(frame: self.view.bounds)
alertView.bottom_tableview.isHidden = true
if title_str != "分销商管理" {
alertView.is_gys = true
}else{
alertView.is_gys = false
}
self.view.window?.addSubview(alertView)
self.view.addSubview(alertView)
}
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
......
......@@ -22,6 +22,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
}
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) {
HUD.flash(.progress, delay: 1.2)
if is_Edit {
......@@ -51,11 +52,10 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
self.selectItem.removeAll()
self.home_list_tbv.mj_header?.beginRefreshing()
HUD.hide()
} failture: { (err) in
}
} failture: { (err) in}
return
}
let model = datas[tag]
let dic = ["user_token":UserToken as Any,
"operation_type":operation_type as Any,
......@@ -69,8 +69,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
view.removeFromSuperview()
self.home_list_tbv.mj_header?.beginRefreshing()
HUD.hide()
} failture: { (err) in
}
} failture: { (err) in}
}
func GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) {
......@@ -142,14 +141,12 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
default: break
}
}
func colseAction(sender: Int) {
if showSelectV != nil {
showSelectV.removeFromSuperview()
}
}
var keyword = ""
......@@ -160,18 +157,21 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
removeBlackBtnView()
home_list_tbv.mj_header?.beginRefreshing()
}
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder()
}
}
var blackBtnView:UIButton! = nil
//MARK:--取消搜索代理
func clearSearchAction() {
print("取消搜索代理了--")
// home_list_tbv.mj_header?.beginRefreshing()
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
......@@ -182,6 +182,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
}
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
if showSelectV != nil {
......@@ -303,7 +304,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
self.home_list_tbv.mj_footer = self.footerMJ
}
//MARK: - tableview_delegate
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datas.count
......
......@@ -113,8 +113,8 @@
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</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">
<rect key="frame" x="31.5" y="9.5" width="22.5" height="11"/>
<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="7" height="11"/>
<constraints>
<constraint firstAttribute="height" constant="11" id="XIV-gv-rHH"/>
</constraints>
......@@ -123,7 +123,7 @@
<nil key="highlightedColor"/>
</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">
<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>
<constraint firstAttribute="height" constant="11" id="1Ta-p5-MZ0"/>
</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