Commit 8ad92bd4 authored by lujunye's avatar lujunye

bug修复,物流选择列表

parent cff28e38
...@@ -256,7 +256,7 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA ...@@ -256,7 +256,7 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
return return
} }
if isMultipleS == false { if isMultipleS == false {
if selectNum == nil { if selectNum == nil && selectNum != 10086{
HUD.flash(.label("\(titleLbl.text!)"), delay: 1.2) HUD.flash(.label("\(titleLbl.text!)"), delay: 1.2)
return return
} }
......
<?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="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" 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="15704"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<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"/>
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="XiaDanCGDiZhiCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="XiaDanCGDiZhiCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="64.5"/> <rect key="frame" x="0.0" y="0.0" width="375" height="64.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
...@@ -98,13 +99,13 @@ ...@@ -98,13 +99,13 @@
<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"/>
</namedColor> </namedColor>
<namedColor name="蓝色字体颜色"> <namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
</resources> </resources>
</document> </document>
...@@ -71,20 +71,18 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab ...@@ -71,20 +71,18 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
var selectIdxArr:Array<IndexPath> = [] var selectIdxArr:Array<IndexPath> = []
var isSearch:Bool = false var isSearch:Bool = false
var seacrchArr:Array<GetGoodsInfoDataModel> = [] //搜索数据 var seacrchArr:Array<GetGoodsInfoDataModel> = [] //搜索数据
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
navbar.title = barTitle navbar.title = barTitle
self.view.addSubview(navbar) self.view.addSubview(navbar)
let UserToken = UserDefaults.standard.value(forKey: "user_token")
if barTitle != "修改价格"{ if barTitle != "修改价格"{
getGoodsInfo(["user_token":UserToken,"is_adsale":is_adsale], success: { (data) in headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
let model = data as! GetGoodsInfoModel self.listView!.mj_header = headerMJ
self.datas = model.data! self.listView.mj_header?.beginRefreshing()
self.listView.reloadData()
}) { (error) in
}
} }
listView.separatorStyle = .none listView.separatorStyle = .none
...@@ -106,7 +104,22 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab ...@@ -106,7 +104,22 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
searchBr.delegateL = self searchBr.delegateL = self
listView.register(UINib(nibName: "XuanZeShangPinCell", bundle: nil), forCellReuseIdentifier: "XuanZeShangPinCell") listView.register(UINib(nibName: "XuanZeShangPinCell", bundle: nil), forCellReuseIdentifier: "XuanZeShangPinCell")
} }
@objc func loadData(){
let UserToken = UserDefaults.standard.value(forKey: "user_token")
getGoodsInfo(["user_token":UserToken,"is_adsale":is_adsale], success: { (data) in
let model = data as! GetGoodsInfoModel
self.datas = model.data!
self.listView.reloadData()
self.listView.mj_header?.endRefreshing()
}) { (error) in
}
}
func clearSearchAction() { func clearSearchAction() {
print("清楚搜索文字") print("清楚搜索文字")
isSearch = false isSearch = false
......
...@@ -113,17 +113,67 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie ...@@ -113,17 +113,67 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
@IBAction func addAction(_ sender: Any) { @IBAction func addAction(_ sender: Any) {
if barTitle != "供应商管理" { if barTitle != "供应商管理" {
delegate?.GYSListViewControllerGetGYS(sender: selectTarget!) if selectTarget != nil {
self.navigationController?.popViewController(animated: true) delegate?.GYSListViewControllerGetGYS(sender: selectTarget!)
self.navigationController?.popViewController(animated: true)
}else{
HUD.flash(.label("请选择供应商"), delay: 1.2)
return
}
}else{ }else{
let vc = GYSGLViewController() let vc = GYSGLViewController()
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
} }
//MARK: - 自定义DELEGATE //MARK:--搜索模块
func clearSearchAction() { //MAKR:--调起搜索后添加个蒙版本
var blackBtnView:UIButton! = nil
} func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
blackBtnView = UIButton ()
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(topView.snp_bottom)
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
return true
}
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder()
}
}
//MARK:--搜索按钮代理
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索关键字进行--\(searchBar.text)")
searchBar.resignFirstResponder()
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
}
keyWord = searchBar.text!
listView.mj_header?.beginRefreshing()
}
//MARK:--清空搜索代理
func clearSearchAction() {
}
//MARK:--编辑即将结束
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if keyWord.count > 0 {
keyWord = searchBar.text!
if keyWord.count == 0 {
listView.mj_header?.beginRefreshing()
}
}
}
//MARK: - CELL DELEGATE //MARK: - CELL DELEGATE
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if barTitle == "供应商管理" { if barTitle == "供应商管理" {
...@@ -148,6 +198,7 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie ...@@ -148,6 +198,7 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
if barTitle != "供应商管理" { if barTitle != "供应商管理" {
cell.selectTypeBtn.isSelected = false cell.selectTypeBtn.isSelected = false
cell.selectTypeView.isHidden = false cell.selectTypeView.isHidden = false
cell.selectTypeBtn.isUserInteractionEnabled = false
if selectTarget?.ven_id == model.ven_id { if selectTarget?.ven_id == model.ven_id {
cell.selectTypeBtn.isSelected = true cell.selectTypeBtn.isSelected = true
} }
......
...@@ -535,8 +535,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -535,8 +535,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 119: //新增采购单 case 119: //新增采购单
let vc = YDLBVc() // let vc = YDLBVc()
// let vc = XinCaiGouViewController() let vc = XinCaiGouViewController()
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 120: //商品毛利统计 case 120: //商品毛利统计
......
...@@ -43,7 +43,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -43,7 +43,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
HUD.flash(.progress) HUD.flash(.progress)
purchaseOrderAdd(dict, success: { (data) in purchaseOrderAdd(dict, success: { (data) in
HUD.hide() HUD.hide()
HUD.flash(.labeledSubSuccess(subtitle: "提交成功"), delay: 1.2)
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
}) { (error) in }) { (error) in
...@@ -61,13 +61,16 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -61,13 +61,16 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) { func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) {
typeSelect = selectnum typeSelect = selectnum
view.removeFromSuperview() view.removeFromSuperview()
glSelectView = nil glSelectView = nil
} }
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) { func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
typeSelect = selectNum typeSelect = selectNum
if typeSelect != nil && typeSelect != 10086 {
holderArr.insert(typeArr[typeSelect!], at: 3)
holderArr.remove(at: 4)
listView.reloadData() listView.reloadData()
}
view.removeFromSuperview() view.removeFromSuperview()
glSelectView = nil glSelectView = nil
} }
...@@ -112,7 +115,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -112,7 +115,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
HUD.flash(.label("请输入采购人姓名"), delay: 1.2) HUD.flash(.label("请输入采购人姓名"), delay: 1.2)
return return
} }
if typeSelect == nil { if typeSelect == nil && typeSelect != 10086 {
HUD.flash(.label("请选择采购类型"), delay: 1.2) HUD.flash(.label("请选择采购类型"), delay: 1.2)
return return
} }
...@@ -217,7 +220,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -217,7 +220,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 { if indexPath.section == 0 {
if indexPath.row == 1 || indexPath.row == 4 { if indexPath.row == 1 || indexPath.row == 3{
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell
cell.nameLbl.text = titleArr[indexPath.row] cell.nameLbl.text = titleArr[indexPath.row]
cell.contentLbl.text = holderArr[indexPath.row] cell.contentLbl.text = holderArr[indexPath.row]
...@@ -233,15 +236,8 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -233,15 +236,8 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.nameLbl.text = titleArr[indexPath.row] cell.nameLbl.text = titleArr[indexPath.row]
cell.textTF.placeholder = holderArr[indexPath.row] cell.textTF.placeholder = holderArr[indexPath.row]
if indexPath.row == 3 { cell.textTF.delegate = self
if typeSelect != nil && typeSelect != 10086{ cell.textTF.text = cgName
cell.textTF.text = typeArr[typeSelect!]
}
cell.textTF.isUserInteractionEnabled = false
}else{
cell.textTF.delegate = self
cell.textTF.text = cgName
}
return cell return cell
} }
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<fragment content="代签收(雄狮前台),感谢使用京东冷运;期待再次为您服务(住单总件数:1件)"> <fragment content="代签收(雄狮前台),感谢使用京东冷运;期待再次为您服务(住单总件数:1件)">
<attributes> <attributes>
<color key="NSColor" name="灰色字体颜色"/> <color key="NSColor" name="灰色字体颜色"/>
<font key="NSFont" metaFont="menu" size="11"/> <font key="NSFont" metaFont="message" size="11"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="3" tighteningFactorForTruncation="0.0"/> <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="3" tighteningFactorForTruncation="0.0"/>
</attributes> </attributes>
</fragment> </fragment>
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" 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="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"/>
......
...@@ -53,6 +53,7 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -53,6 +53,7 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
//MARK: - 加载数据 //MARK: - 加载数据
@objc func loadData(){ @objc func loadData(){
print("加载数据") print("加载数据")
self.listView.mj_header?.endRefreshing()
} }
//MARK:--搜索模块 //MARK:--搜索模块
//MAKR:--调起搜索后添加个蒙版本 //MAKR:--调起搜索后添加个蒙版本
......
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