Commit e190d86e authored by lujunye's avatar lujunye

代客下单逻辑补充

parent 20e6b0bd
...@@ -25,6 +25,9 @@ import IQKeyboardManagerSwift ...@@ -25,6 +25,9 @@ import IQKeyboardManagerSwift
} }
class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleAndSelectCellDelegate,KuWeiCellCellDelegate,UITextFieldDelegate{ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleAndSelectCellDelegate,KuWeiCellCellDelegate,UITextFieldDelegate{
var deSelectArr:Array<Int> = []
var isMultipleS:Bool = false var isMultipleS:Bool = false
var contentView:UIView! var contentView:UIView!
var delegate:GLAlertSelectViewDelegate? var delegate:GLAlertSelectViewDelegate?
...@@ -175,12 +178,12 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA ...@@ -175,12 +178,12 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
cell.delegate = self cell.delegate = self
cell.tag = indexPath.row cell.tag = indexPath.row
let model = kuWeiArr[indexPath.row] as! ShopWarehouseDetailDataPositionModel let model = kuWeiArr[indexPath.row] as! ShopWarehouseDetailDataPositionModel
print("3",model.p_name)
cell.nameTF.text = model.p_name cell.nameTF.text = model.p_name
cell.nameTF.delegate = self cell.nameTF.delegate = self
cell.nameTF.isUserInteractionEnabled = false cell.nameTF.isUserInteractionEnabled = false
return cell return cell
} }
let cell = tableView.dequeueReusableCell(withIdentifier: "selectTbvCell") as! TitleAndSelectCell let cell = tableView.dequeueReusableCell(withIdentifier: "selectTbvCell") as! TitleAndSelectCell
cell.titleLbl.text = dataArr[indexPath.row] as! String cell.titleLbl.text = dataArr[indexPath.row] as! String
cell.delegate = self cell.delegate = self
...@@ -200,6 +203,15 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA ...@@ -200,6 +203,15 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
cell.selectBtn.isSelected = true cell.selectBtn.isSelected = true
} }
} }
print("deSelectArr.count",deSelectArr.count)
if deSelectArr.count > 0 {
for i in deSelectArr {
if i == indexPath.row {
cell.titleLbl.textColor = UIColor(named: "灰色字体颜色")
cell.selectBtn.isUserInteractionEnabled = false
}
}
}
return cell return cell
} }
@IBAction func submitClick(_ sender: Any) { @IBAction func submitClick(_ sender: Any) {
......
...@@ -11,6 +11,8 @@ import UIKit ...@@ -11,6 +11,8 @@ import UIKit
protocol XuanZeShangPinViewControllerDelegate { protocol XuanZeShangPinViewControllerDelegate {
func XuanZeShangPinViewControllerSubmitAction(datas:Array<Any>) func XuanZeShangPinViewControllerSubmitAction(datas:Array<Any>)
func XuanZeShangPinViewControllerYuShou(YuShouData:String) func XuanZeShangPinViewControllerYuShou(YuShouData:String)
func XuanZeShangPinViewControllerEdit(datas:Array<Any>)
} }
class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,XuanZeShangPinCellDelegate,UISearchBarDelegate,SearchBarViewDelegate{ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,XuanZeShangPinCellDelegate,UISearchBarDelegate,SearchBarViewDelegate{
...@@ -21,14 +23,20 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab ...@@ -21,14 +23,20 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
//XuanZeShangPinCell //XuanZeShangPinCell
@IBAction func submitAction(_ sender: Any) { @IBAction func submitAction(_ sender: Any) {
print("submit") print("submit")
if barTitle == "修改价格"{
delegate?.XuanZeShangPinViewControllerEdit(datas:["返回","数据"])
}else{
if isYuShou { if isYuShou {
delegate?.XuanZeShangPinViewControllerYuShou(YuShouData: "abc") delegate?.XuanZeShangPinViewControllerYuShou(YuShouData: "abc")
}else{ }else{
delegate?.XuanZeShangPinViewControllerSubmitAction(datas: selectIdxArr) delegate?.XuanZeShangPinViewControllerSubmitAction(datas: selectIdxArr)
} }
}
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
var barTitle:String?//
@IBOutlet weak var btmLbl: UILabel! @IBOutlet weak var btmLbl: UILabel!
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
@IBOutlet weak var topView: UIView! @IBOutlet weak var topView: UIView!
...@@ -40,7 +48,7 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab ...@@ -40,7 +48,7 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
navbar.title = "选择商品" navbar.title = barTitle
self.view.addSubview(navbar) self.view.addSubview(navbar)
listView.separatorStyle = .none listView.separatorStyle = .none
...@@ -80,6 +88,11 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab ...@@ -80,6 +88,11 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
let cell = tableView.dequeueReusableCell(withIdentifier: "XuanZeShangPinCell") as! XuanZeShangPinCell let cell = tableView.dequeueReusableCell(withIdentifier: "XuanZeShangPinCell") as! XuanZeShangPinCell
cell.delegate = self cell.delegate = self
cell.idx = indexPath cell.idx = indexPath
if barTitle == "修改价格"{
cell.selectBtn.isHidden = true
cell.btmView.isHidden = false
cell.btmViewHeight.constant = 89
}else{
if isYuShou {//预售 if isYuShou {//预售
if idx == indexPath { if idx == indexPath {
cell.selectBtn.isSelected = true cell.selectBtn.isSelected = true
...@@ -102,9 +115,13 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab ...@@ -102,9 +115,13 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
} }
} }
} }
}
return cell return cell
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if barTitle == "修改价格"{
return 210
}
if idx != nil { if idx != nil {
if indexPath == idx { if indexPath == idx {
return 210 return 210
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<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>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="XuanZeShangPinViewController" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="XuanZeShangPinViewController" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="btmLbl" destination="5Kt-Ig-zbb" id="fUx-No-8SV"/> <outlet property="btmLbl" destination="5Kt-Ig-zbb" id="fUx-No-8SV"/>
<outlet property="listView" destination="YuT-X7-ecw" id="wKf-Ej-i9r"/> <outlet property="listView" destination="YuT-X7-ecw" id="wKf-Ej-i9r"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.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>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChangeGoodsPriceVC" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChangeGoodsPriceVC" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="sureBtn" destination="u6y-CU-3oP" id="jeI-hQ-epr"/> <outlet property="sureBtn" destination="u6y-CU-3oP" id="jeI-hQ-epr"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.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>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="XiuGaiYuShouJiaViewController" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="XiuGaiYuShouJiaViewController" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="color" destination="af6-Wa-4Sy" id="gC1-9R-E1C"/> <outlet property="color" destination="af6-Wa-4Sy" id="gC1-9R-E1C"/>
<outlet property="countLbl" destination="nUd-42-xVV" id="HNp-gi-Qb7"/> <outlet property="countLbl" destination="nUd-42-xVV" id="HNp-gi-Qb7"/>
......
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