Commit f3475e35 authored by 刘俊宏's avatar 刘俊宏

理-个人中心+仓库管理

parent ee6201d5
...@@ -54,14 +54,31 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -54,14 +54,31 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
//MARK: -方法 //MARK: -方法
@IBAction func editAction(_ sender: Any) { @IBAction func editAction(_ sender: Any) {
print("编辑资料") print("编辑资料")
let vc = AccountViewController()
self.navigationController?.pushViewController(vc, animated: true)
} }
//MARK:--跳转消息中心
@IBAction func toMsgCenterAction(_ sender: Any) { @IBAction func toMsgCenterAction(_ sender: Any) {
print("跳转消息中心") print("跳转消息中心")
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
} }
//MARK: -Cell delegate方法 //MARK: -Cell delegate方法
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath.row) print(indexPath.row)
if indexPath.row == 0 {
//格利支付
let vc = PayViewController()
self.navigationController?.pushViewController(vc, animated: true)
}else if indexPath.row == 1 {
//蓝牙设置
let vc = BluetoothConnectViewController()
self.navigationController?.pushViewController(vc, animated: true)
}else if indexPath.row == 2{
//权限设置-弹窗
}
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 50*glscale return 50*glscale
......
...@@ -123,7 +123,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV ...@@ -123,7 +123,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath) print(indexPath)
let vc = CheckWareHourseViewController()
self.navigationController?.pushViewController(vc, animated: false)
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
......
...@@ -20,7 +20,7 @@ class ChangePassViewController: BaseViewController { ...@@ -20,7 +20,7 @@ class ChangePassViewController: BaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
navbar.title = "账号信息" navbar.title = "修改密码"
self.view.addSubview(navbar) self.view.addSubview(navbar)
newPassTF.isSecureTextEntry = true newPassTF.isSecureTextEntry = true
......
...@@ -90,13 +90,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect ...@@ -90,13 +90,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
//MARK:--新增触发 //MARK:--新增触发
@IBAction func addNewGoodsAction(_ sender: UIButton) { @IBAction func addNewGoodsAction(_ sender: UIButton) {
print("新增触发-") print("新增触发-")
// let vc = DemoViewController() let vc = ProductDetailViewController()
// self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
//模拟退出登录
NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil)
// UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token")
UserDefaults.standard.removeObject(forKey: "user_token")
UserDefaults.standard.synchronize()
} }
//MARK:--下拉视图各种代理 //MARK:--下拉视图各种代理
func showAction(sender: Int) { func showAction(sender: Int) {
......
...@@ -100,6 +100,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl ...@@ -100,6 +100,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
return cell return cell
} }
} }
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
switch indexPath.section { switch indexPath.section {
......
<?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="16096" 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"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="按钮渐变色下,字体颜色"> <namedColor name="按钮渐变色下,字体颜色">
<color red="0.27450980392156865" green="0.5607843137254902" blue="0.88627450980392153" 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>
...@@ -27,7 +27,6 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -27,7 +27,6 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
make.bottom.equalTo(bottomView.snp_top) make.bottom.equalTo(bottomView.snp_top)
} }
tableView?.register(UINib(nibName: "BlueToothCell", bundle: nil), forCellReuseIdentifier: "BlueTooth") tableView?.register(UINib(nibName: "BlueToothCell", bundle: nil), forCellReuseIdentifier: "BlueTooth")
tableView?.register(UINib(nibName: "TitleAndSwitchCell", bundle: nil), forCellReuseIdentifier: "TitleAndSwitchCell")
} }
...@@ -41,6 +40,9 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -41,6 +40,9 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return 2 return 2
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0{
return 1
}
return 10 return 10
} }
//header //header
...@@ -48,7 +50,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -48,7 +50,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
switch section { switch section {
case 0: case 0:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46)) let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46)) let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "已连接设备" lbl.text = "已连接设备"
lbl.font = UIFont.boldSystemFont(ofSize: 15) lbl.font = UIFont.boldSystemFont(ofSize: 15)
...@@ -57,7 +59,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -57,7 +59,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return view return view
default: default:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46)) let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46)) let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "未连接设备" lbl.text = "未连接设备"
lbl.font = UIFont.boldSystemFont(ofSize: 15) lbl.font = UIFont.boldSystemFont(ofSize: 15)
...@@ -74,7 +76,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -74,7 +76,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
switch section { switch section {
case 0: case 0:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46)) let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46)) let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "选择已经连接的设备作为默认打印设备" lbl.text = "选择已经连接的设备作为默认打印设备"
lbl.font = UIFont.boldSystemFont(ofSize: 11) lbl.font = UIFont.boldSystemFont(ofSize: 11)
...@@ -83,7 +85,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -83,7 +85,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return view return view
default: default:
let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46)) let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height: 46))
view.backgroundColor = UIColor.clear view.backgroundColor = UIColor.init(named: "app底色")!
let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46)) let lbl = UILabel(frame: CGRect(x: 15, y: 0, width: self.view.bounds.size.width, height: 46))
lbl.text = "选择设备进行连接" lbl.text = "选择设备进行连接"
lbl.font = UIFont.boldSystemFont(ofSize: 11) lbl.font = UIFont.boldSystemFont(ofSize: 11)
...@@ -97,12 +99,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -97,12 +99,7 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
} }
//cell //cell
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndSwitchCell") as! TitleAndSwitchCell
cell.infoSw.transform = CGAffineTransform(scaleX: 0.8, y: 0.8)
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "BlueTooth") as! BlueToothCell let cell = tableView.dequeueReusableCell(withIdentifier: "BlueTooth") as! BlueToothCell
if indexPath.section != 0 { if indexPath.section != 0 {
cell.statusIcon.isHidden = true cell.statusIcon.isHidden = true
...@@ -110,9 +107,6 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -110,9 +107,6 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
return cell return cell
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
return 94
}
return 49 return 49
} }
......
...@@ -34,14 +34,23 @@ class AccountViewController: BaseViewController{ ...@@ -34,14 +34,23 @@ class AccountViewController: BaseViewController{
@IBAction func gotoDetailAction(_ sender: Any) { @IBAction func gotoDetailAction(_ sender: Any) {
print("进入商家详情") print("进入商家详情")
let vc = ShopInfoViewController()
self.navigationController?.pushViewController(vc, animated: true)
} }
@IBAction func changPassAction(_ sender: Any) { @IBAction func changPassAction(_ sender: Any) {
print("修改密码") print("修改密码")
let vc = ChangePassViewController()
self.navigationController?.pushViewController(vc, animated: true)
} }
@IBAction func logOutAction(_ sender: Any) { @IBAction func logOutAction(_ sender: Any) {
print("退出登录") print("退出登录")
} //模拟退出登录
UserDefaults.standard.removeObject(forKey: "user_token")
UserDefaults.standard.synchronize()
NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: 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