Commit 43afed33 authored by lujunye's avatar lujunye

入库,出库界面合一(根据名字改变)

parent d5876fc0
...@@ -37,13 +37,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg ...@@ -37,13 +37,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
} }
//MARK:--loginVC //MARK:--loginVC
func addLoginVc (isAgain:Bool){ func addLoginVc (isAgain:Bool){
let vc = LoginViewController() // let vc = LoginViewController()
vc.delegate = self // vc.delegate = self
let contentView = vc
// let vc = KuCunShangPinXQViewController()
// let contentView = vc // let contentView = vc
let vc = RuKuViewController()
vc.barTitle = "入库"
let contentView = vc
if let windowScene = sceneC as? UIWindowScene { if let windowScene = sceneC as? UIWindowScene {
if isAgain { if isAgain {
let transtition = CATransition() let transtition = CATransition()
......
...@@ -12,15 +12,19 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -12,15 +12,19 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData
let p1Arr1 = ["仓库:","库位:","入库类型:","入库时间:"] let p1Arr1 = ["仓库:","库位:","入库类型:","入库时间:"]
let chu1Arr1 = ["仓库:","库位:","出库类型:","入库时间:"]
let p1Arr2 = ["默认仓库","默认库位","请选择入库类型","0"] let p1Arr2 = ["默认仓库","默认库位","请选择入库类型","0"]
let chu1Arr2 = ["默认仓库","默认库位","请选择出库类型","0"]
let p3Arr1 = ["入库价格:","入库数量:","生产日期:","保质期:","检测报告:"] let p3Arr1 = ["入库价格:","入库数量:","生产日期:","保质期:","检测报告:"]
@IBAction func submitAction(_ sender: Any) { @IBAction func submitAction(_ sender: Any) {
} }
var barTitle:String?
@IBOutlet weak var btmView: UIView! @IBOutlet weak var btmView: UIView!
@IBOutlet weak var listVIew: UITableView! @IBOutlet weak var listVIew: UITableView!
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
...@@ -56,7 +60,11 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -56,7 +60,11 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData
make.bottom.equalTo(0) make.bottom.equalTo(0)
} }
let ti1 = UILabel() let ti1 = UILabel()
if barTitle == "入库"{
ti1.text = "(只可选择一种商品入库)" ti1.text = "(只可选择一种商品入库)"
}else{
ti1.text = "(只可选择一种商品出库)"
}
ti1.font = UIFont.boldSystemFont(ofSize: 11) ti1.font = UIFont.boldSystemFont(ofSize: 11)
ti1.textColor = UIColor(named: "灰色字体颜色") ti1.textColor = UIColor(named: "灰色字体颜色")
view.addSubview(ti1) view.addSubview(ti1)
...@@ -98,8 +106,11 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -98,8 +106,11 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData
switch section { switch section {
case 0: return 4 case 0: return 4
case 1:return 1 case 1:return 1
default:return 5 default:
if barTitle == "入库" {
return 5
}
return 1
} }
} }
...@@ -109,19 +120,32 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -109,19 +120,32 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData
if indexPath.row == 3 { if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.textTF.isUserInteractionEnabled = false cell.textTF.isUserInteractionEnabled = false
if barTitle == "入库"{
cell.nameLbl.text = p1Arr1[indexPath.row] cell.nameLbl.text = p1Arr1[indexPath.row]
}else{
cell.nameLbl.text = chu1Arr1[indexPath.row]
}
cell.textTF.text = "2020.03.16 15:03:56" cell.textTF.text = "2020.03.16 15:03:56"
return cell return cell
} }
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell
if barTitle == "入库"{
cell.nameLbl.text = p1Arr1[indexPath.row] cell.nameLbl.text = p1Arr1[indexPath.row]
cell.contentLbl.text = p1Arr2[indexPath.row] cell.contentLbl.text = p1Arr2[indexPath.row]
}else{
cell.nameLbl.text = chu1Arr1[indexPath.row]
cell.contentLbl.text = chu1Arr2[indexPath.row]
}
return cell return cell
case 1: case 1:
let cell = tableView.dequeueReusableCell(withIdentifier: "AddGuiGeCell") as! AddGuiGeCell let cell = tableView.dequeueReusableCell(withIdentifier: "AddGuiGeCell") as! AddGuiGeCell
cell.imgBtn.setImage(UIImage(named: "tianjiashangpin"), for: .normal) cell.imgBtn.setImage(UIImage(named: "tianjiashangpin"), for: .normal)
return cell return cell
default: default:
if barTitle == "入库" {
switch indexPath.row { switch indexPath.row {
case 0: case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: "RuKuJiaGeCell") as! RuKuJiaGeCell let cell = tableView.dequeueReusableCell(withIdentifier: "RuKuJiaGeCell") as! RuKuJiaGeCell
...@@ -159,10 +183,13 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -159,10 +183,13 @@ class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewData
cell.titleLbl.text = p3Arr1[indexPath.row] cell.titleLbl.text = p3Arr1[indexPath.row]
cell.button.setTitle("编辑", for: .normal) cell.button.setTitle("编辑", for: .normal)
return cell return cell
} }
}else{
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell
cell.nameLbl.text = "出库数量:"
cell.contentLbl.text = "选择批次/填写出库数量"
return cell
}
} }
} }
......
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