Commit 43b4a8a5 authored by lujunye's avatar lujunye

修改串联bug

parent 1f95bdc9
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// //
import UIKit import UIKit
import SwipeCellKit
class WarehoseMangementCell: UITableViewCell { class WarehoseMangementCell: SwipeTableViewCell {
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="灰色字体颜色"> <namedColor name="灰色字体颜色">
<color red="0.40000000596046448" green="0.40000000596046448" blue="0.40000000596046448" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="白色背景色"> <namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
import UIKit import UIKit
import ViewAnimator import ViewAnimator
import SwipeCellKit
class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource, SearchBarViewDelegate { class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource, SearchBarViewDelegate,SwipeTableViewCellDelegate {
weak var searchV: SearchBarView? = nil weak var searchV: SearchBarView? = nil
@IBOutlet weak var contentView: UIView! @IBOutlet weak var contentView: UIView!
@IBOutlet weak var searchView: UIView! @IBOutlet weak var searchView: UIView!
...@@ -124,7 +125,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV ...@@ -124,7 +125,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "WarehoseMangementCell") as! WarehoseMangementCell let cell = tableView.dequeueReusableCell(withIdentifier: "WarehoseMangementCell") as! WarehoseMangementCell
cell.delegate = self
return cell return cell
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
...@@ -136,4 +137,27 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV ...@@ -136,4 +137,27 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 94*glscale return 94*glscale
} }
//MARK:- 左滑删除
func tableView(_ tableView: UITableView,
editActionsOptionsForRowAt indexPath: IndexPath,
for orientation: SwipeActionsOrientation) -> SwipeTableOptions {
var options = SwipeTableOptions()
options.transitionStyle = .border //变化样式(使用默认的不变)
options.expansionStyle = .selection //展开样式(默认为.none)
return options
}
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? {
//创建“删除”事件按钮
let deleteAction = SwipeAction(style: .destructive, title: nil) {
action, indexPath in
//将对应条目的数据删除
tableView.reloadData()
}
deleteAction.image = UIImage(named: "shanchuWhite")
deleteAction.backgroundColor = UIColor(named: "#F57575")
//返回右侧事件按钮
return [deleteAction,]
}
} }
...@@ -41,6 +41,8 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie ...@@ -41,6 +41,8 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
} }
@IBAction func addAction(_ sender: Any) { @IBAction func addAction(_ sender: Any) {
let vc = GYSGLViewController()
self.navigationController?.pushViewController(vc, animated: true)
} }
//MARK: - 自定义DELEGATE //MARK: - 自定义DELEGATE
func clearSearchAction() { func clearSearchAction() {
......
...@@ -50,7 +50,7 @@ class YingFuZKListViewController: BaseViewController,UISearchBarDelegate,SearchB ...@@ -50,7 +50,7 @@ class YingFuZKListViewController: BaseViewController,UISearchBarDelegate,SearchB
//MARK: - CELL DELEGATE //MARK: - CELL DELEGATE
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YingFuZhangKuanXQViewController() let vc = YingFuZhangKuanXQViewController()
vc.navTitle = "\(navbar.title!)详情" vc.navTitle = "\(barTitle!)详情"
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
......
...@@ -7,10 +7,13 @@ ...@@ -7,10 +7,13 @@
// //
import UIKit import UIKit
@objc protocol YingFuZhangKuanXQCellDelegate {
@objc optional func YingFuZhangKuanXQCellBtnClick(cell:YingFuZhangKuanXQCell,sender:UIButton)
}
class YingFuZhangKuanXQCell: UITableViewCell { class YingFuZhangKuanXQCell: UITableViewCell {
var delegate:YingFuZhangKuanXQCellDelegate?
@IBAction func submitAction(_ sender: Any) { @IBAction func submitAction(_ sender: UIButton) {
delegate?.YingFuZhangKuanXQCellBtnClick?(cell: self,sender:sender)
} }
@IBOutlet weak var p3Title: UILabel! @IBOutlet weak var p3Title: UILabel!
@IBOutlet weak var p2Title: UILabel! @IBOutlet weak var p2Title: UILabel!
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource { class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource,YingFuZhangKuanXQCellDelegate{
var navTitle:String = "" var navTitle:String = ""
var searchV : SearchBarView? = nil var searchV : SearchBarView? = nil
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
...@@ -147,7 +147,8 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea ...@@ -147,7 +147,8 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "YingFuZhangKuanXQCell") as! YingFuZhangKuanXQCell let cell = tableView.dequeueReusableCell(withIdentifier: "YingFuZhangKuanXQCell") as! YingFuZhangKuanXQCell
cell.delegate = self
cell.submitBtn.tag = indexPath.row
if navTitle.contains("应付"){ if navTitle.contains("应付"){
if indexPath.row == 0 { if indexPath.row == 0 {
cell.submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色") cell.submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色")
...@@ -169,4 +170,7 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea ...@@ -169,4 +170,7 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea
} }
return cell return cell
} }
func YingFuZhangKuanXQCellBtnClick(cell: YingFuZhangKuanXQCell, sender: UIButton) {
print("应收/应付账款 == ",sender.tag)
}
} }
...@@ -13,8 +13,8 @@ import IQKeyboardManagerSwift ...@@ -13,8 +13,8 @@ import IQKeyboardManagerSwift
class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,WareHouseSpCellDelegate,GLAlertSelectViewDelegate{ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,WareHouseSpCellDelegate,GLAlertSelectViewDelegate{
var titleStr:String? var titleStr:String?
@IBOutlet weak var bottomBtn: LGButton!
@IBOutlet weak var color: LGButton! @IBOutlet weak var btnTitleLbl: UILabel!
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
var btnArray:NSMutableArray = NSMutableArray() var btnArray:NSMutableArray = NSMutableArray()
...@@ -33,7 +33,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -33,7 +33,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
navbar.title = titleStr navbar.title = titleStr
self.view.addSubview(navbar) self.view.addSubview(navbar)
if titleStr != "新增仓库" { if titleStr != "新增仓库" {
bottomBtn.titleString = "编辑" btnTitleLbl.text = "编辑"
navbar.rightTitle = "删除" navbar.rightTitle = "删除"
} }
listView.delegate = self listView.delegate = self
...@@ -42,11 +42,11 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -42,11 +42,11 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
listView?.register(UINib(nibName: "WareHouseSpCell", bundle: nil), forCellReuseIdentifier: "WareHouse") listView?.register(UINib(nibName: "WareHouseSpCell", bundle: nil), forCellReuseIdentifier: "WareHouse")
listView.isScrollEnabled = false listView.isScrollEnabled = false
color.isUserInteractionEnabled = false
listView.snp.makeConstraints { (make) in listView.snp.makeConstraints { (make) in
make.top.equalTo(NavCGRect.height) make.top.equalTo(NavCGRect.height)
make.left.right.equalTo(0) make.left.right.equalTo(0)
make.bottom.equalTo(bottomBtn.snp_top) make.bottom.equalTo(btnTitleLbl.snp_top)
} }
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CheckWareHourseViewController" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CheckWareHourseViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<connections> <connections>
<outlet property="bottomBtn" destination="3xa-Lo-irO" id="5Em-Lo-mW9"/> <outlet property="btnTitleLbl" destination="Il1-TV-CC8" id="ZxK-s6-x8I"/>
<outlet property="listView" destination="wre-tZ-eDu" id="rds-VX-rIT"/> <outlet property="listView" destination="wre-tZ-eDu" id="rds-VX-rIT"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
...@@ -20,6 +20,25 @@ ...@@ -20,6 +20,25 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3xa-Lo-irO" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
<color key="value" name="按钮渐变色上"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
<color key="value" name="按钮渐变色下,字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="titleFontSize">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="submitAction:" destination="-1" eventType="touchUpInside" id="TSG-mS-OJb"/>
</connections>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Il1-TV-CC8"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Il1-TV-CC8">
<rect key="frame" x="0.0" y="813" width="414" height="49"/> <rect key="frame" x="0.0" y="813" width="414" height="49"/>
<constraints> <constraints>
...@@ -40,25 +59,6 @@ ...@@ -40,25 +59,6 @@
<rect key="frame" x="0.0" y="44" width="414" height="769"/> <rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
</tableView> </tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3xa-Lo-irO" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
<color key="value" name="按钮渐变色上"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
<color key="value" name="按钮渐变色下,字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="titleFontSize">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="submitAction:" destination="-1" eventType="touchUpInside" id="TSG-mS-OJb"/>
</connections>
</view>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
......
...@@ -186,16 +186,9 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -186,16 +186,9 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 0 { if indexPath.section == 0 {
if indexPath.row == 2{ if indexPath.row == 2{//跳转供应商选择
if glSelectView == nil { let vc = GYSListViewController()
let view = GLAlertSelectView(frame: self.view.bounds) self.navigationController?.pushViewController(vc, animated: true)
view.isMultipleSelect = false//是否多选
view.delegate = self
view.titleLbl.text = "请选择供应商"
view.dataArr = ["普通订单","预售下单"]
self.view.addSubview(view)
glSelectView = view
}
} }
if indexPath.row == 5 { if indexPath.row == 5 {
if glSelectView == nil { if glSelectView == nil {
......
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