Commit 81fde3f4 authored by lujunye's avatar lujunye

删除旧入库代码

parent 57cea19e
......@@ -173,8 +173,6 @@
E0571C6E248DD4DE00E85711 /* AdressInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0571C6D248DD4DE00E85711 /* AdressInterface.swift */; };
E05FAD272498A5E500D8C90D /* accountsPayableInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E05FAD262498A5E500D8C90D /* accountsPayableInterface.swift */; };
E05FAD2A2498A5F200D8C90D /* accountsPayableListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E05FAD292498A5F200D8C90D /* accountsPayableListModel.swift */; };
E06524ED2458008900CA22E2 /* RuKuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E06524EB2458008900CA22E2 /* RuKuViewController.swift */; };
E06524EE2458008900CA22E2 /* RuKuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E06524EC2458008900CA22E2 /* RuKuViewController.xib */; };
E06524F124580AAC00CA22E2 /* RuKuJiaGeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E06524EF24580AAC00CA22E2 /* RuKuJiaGeCell.swift */; };
E06524F224580AAC00CA22E2 /* RuKuJiaGeCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E06524F024580AAC00CA22E2 /* RuKuJiaGeCell.xib */; };
E06524F524580BB600CA22E2 /* BaoZhiQiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E06524F324580BB600CA22E2 /* BaoZhiQiCell.swift */; };
......@@ -873,8 +871,6 @@
E0571C6D248DD4DE00E85711 /* AdressInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdressInterface.swift; sourceTree = "<group>"; };
E05FAD262498A5E500D8C90D /* accountsPayableInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = accountsPayableInterface.swift; sourceTree = "<group>"; };
E05FAD292498A5F200D8C90D /* accountsPayableListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = accountsPayableListModel.swift; sourceTree = "<group>"; };
E06524EB2458008900CA22E2 /* RuKuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RuKuViewController.swift; sourceTree = "<group>"; };
E06524EC2458008900CA22E2 /* RuKuViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RuKuViewController.xib; sourceTree = "<group>"; };
E06524EF24580AAC00CA22E2 /* RuKuJiaGeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RuKuJiaGeCell.swift; sourceTree = "<group>"; };
E06524F024580AAC00CA22E2 /* RuKuJiaGeCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RuKuJiaGeCell.xib; sourceTree = "<group>"; };
E06524F324580BB600CA22E2 /* BaoZhiQiCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaoZhiQiCell.swift; sourceTree = "<group>"; };
......@@ -1940,8 +1936,6 @@
E06524EA2458006600CA22E2 /* 入库 */ = {
isa = PBXGroup;
children = (
E06524EB2458008900CA22E2 /* RuKuViewController.swift */,
E06524EC2458008900CA22E2 /* RuKuViewController.xib */,
E06524EF24580AAC00CA22E2 /* RuKuJiaGeCell.swift */,
E06524F024580AAC00CA22E2 /* RuKuJiaGeCell.xib */,
E06524F324580BB600CA22E2 /* BaoZhiQiCell.swift */,
......@@ -3605,7 +3599,6 @@
F9A4F25024C9689600D1DD13 /* OtherDemandViewController.xib in Resources */,
E09B03C12445B96500211A51 /* FgPassViewController.xib in Resources */,
F970B3702551280B0026F9D5 /* TimeShowDownView.xib in Resources */,
E06524EE2458008900CA22E2 /* RuKuViewController.xib in Resources */,
F96E48A824CA90DC000AB8D4 /* DriverItemTableViewCell.xib in Resources */,
E06524F624580BB600CA22E2 /* BaoZhiQiCell.xib in Resources */,
E0D197C7244845FD002B080C /* PersonCenterViewController.xib in Resources */,
......@@ -4068,7 +4061,6 @@
F950FDE424518B9500C40530 /* FSCalendarTransitionCoordinator.m in Sources */,
F9B6D9E12486890D00111698 /* MoreAndTimeSelectView.swift in Sources */,
E0BE8A90245A9B9600E80134 /* YingFuZhangKuanCell.swift in Sources */,
E06524ED2458008900CA22E2 /* RuKuViewController.swift in Sources */,
F9171F0224513C5B00359C2B /* UpDataModel.swift in Sources */,
F950FDAD245163E500C40530 /* GoodsListModel.swift in Sources */,
F9D44E8824CBC6A400FBD8DB /* ToAndFormSelectViewController.swift in Sources */,
......
//
// RuKuViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/28.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class RuKuViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,AddGuiGeCellDelegate{
let p1Arr1 = ["仓库:","库位:","入库类型:","入库时间:"]
let chu1Arr1 = ["仓库:","库位:","出库类型:","入库时间:"]
let p1Arr2 = ["默认仓库","默认库位","请选择入库类型","0"]
let chu1Arr2 = ["默认仓库","默认库位","请选择出库类型","0"]
let p3Arr1 = ["入库价格:","入库数量:","生产日期:","保质期:","检测报告:"]
@IBAction func submitAction(_ sender: Any) {
}
var barTitle:String?
@IBOutlet weak var btmView: UIView!
@IBOutlet weak var listVIew: UITableView!
//测试数据
var selectArr = ["1","2"]
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = barTitle
self.view.addSubview(navbar)
listVIew.separatorStyle = .none
listVIew.snp.makeConstraints { (make) in
make.top.equalTo(NavCGRect.height)
make.left.right.equalTo(0)
make.bottom.equalTo(btmView.snp_top)
}
listVIew.register(UINib(nibName: "TitleAndTFCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFCell")
listVIew.register(UINib(nibName: "TitleAndBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndBtnCell")
listVIew.register(UINib(nibName: "AddGuiGeCell", bundle: nil), forCellReuseIdentifier: "AddGuiGeCell")
listVIew.register(UINib(nibName: "TitleAndOnlyBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndOnlyBtnCell")
listVIew.register(UINib(nibName: "RuKuJiaGeCell", bundle: nil), forCellReuseIdentifier: "RuKuJiaGeCell")
listVIew.register(UINib(nibName: "BaoZhiQiCell", bundle: nil), forCellReuseIdentifier: "BaoZhiQiCell")
listVIew.register(UINib(nibName: "ChuKuCell", bundle: nil), forCellReuseIdentifier: "ChuKuCell")
}
//MARK: - cell delegate
//header
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 1 {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 36))
view.backgroundColor = UIColor.white
let title = UILabel()
title.text = "商品清单"
title.font = UIFont.boldSystemFont(ofSize: 15)
title.textColor = UIColor(named: "标题字颜色")
view.addSubview(title)
title.sizeToFit()
title.snp.makeConstraints { (make) in
make.left.equalTo(15)
make.height.equalTo(21)
make.width.equalTo(title.bounds.size.width)
make.bottom.equalTo(0)
}
let ti1 = UILabel()
if barTitle == "入库"{
ti1.text = "(只可选择一种商品入库)"
}else{
ti1.text = "(只可选择一种商品出库)"
}
ti1.font = UIFont.boldSystemFont(ofSize: 11)
ti1.textColor = UIColor(named: "灰色字体颜色")
view.addSubview(ti1)
ti1.sizeToFit()
ti1.snp.makeConstraints { (make) in
make.left.equalTo(title.snp_right)
make.height.equalTo(15)
make.width.equalTo(ti1.bounds.size.width)
make.bottom.equalTo(0)
}
return view
}
return UIView()
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if section == 1 {
return 38
}
return 0.001
}
//footer
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 10
}
//cell
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 1 {
return 123.5
}
return 49
}
func numberOfSections(in tableView: UITableView) -> Int {
return 3
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 0: return 4
case 1:return 1
default:
if barTitle == "入库" {
return 5
}
return 1 + selectArr.count
}
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch indexPath.section {
case 0:
if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.textTF.isUserInteractionEnabled = false
if barTitle == "入库"{
cell.nameLbl.text = p1Arr1[indexPath.row]
}else{
cell.nameLbl.text = chu1Arr1[indexPath.row]
}
cell.textTF.text = "2020.03.16 15:03:56"
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell
if barTitle == "入库"{
cell.nameLbl.text = p1Arr1[indexPath.row]
cell.contentLbl.text = p1Arr2[indexPath.row]
}else{
cell.nameLbl.text = chu1Arr1[indexPath.row]
cell.contentLbl.text = chu1Arr2[indexPath.row]
}
return cell
case 1:
let cell = tableView.dequeueReusableCell(withIdentifier: "AddGuiGeCell") as! AddGuiGeCell
cell.imgBtn.setImage(UIImage(named: "tianjiashangpin"), for: .normal)
cell.delegate = self
return cell
default:
if barTitle == "入库" {
switch indexPath.row {
case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: "RuKuJiaGeCell") as! RuKuJiaGeCell
cell.nameLbl.text = p3Arr1[indexPath.row]
return cell
case 1:
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.nameLbl.text = p3Arr1[indexPath.row]
cell.textTF.layer.cornerRadius = 3
cell.textTF.layer.masksToBounds = true
cell.textTF.layer.borderWidth = 1
cell.textTF.placeholder = "0"
cell.textTF.textAlignment = .center
cell.textTF.keyboardType = .numberPad
cell.textTF.layer.borderColor = UIColor(named: "灰色字体颜色")?.cgColor
cell.textTF.snp.makeConstraints { (make) in
make.centerY.equalTo(cell.snp_centerY)
make.right.equalTo(-15)
make.width.equalTo(83)
make.height.equalTo(32)
}
return cell
case 2:
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell
cell.nameLbl.text = p3Arr1[indexPath.row]
cell.contentLbl.text = "请选择生产日期"
return cell
case 3:
let cell = tableView.dequeueReusableCell(withIdentifier: "BaoZhiQiCell") as! BaoZhiQiCell
cell.nameLbl.text = p3Arr1[indexPath.row]
return cell
default:
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndOnlyBtnCell") as! TitleAndOnlyBtnCell
cell.titleLbl.text = p3Arr1[indexPath.row]
cell.button.setTitle("编辑", for: .normal)
return cell
}
}else{
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell
cell.nameLbl.text = "出库数量:"
cell.contentLbl.text = "选择批次/填写出库数量"
if selectArr.count > 0 {
cell.lineWidth.constant = 0
}else{
cell.lineWidth.constant = 15
}
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "ChuKuCell") as! ChuKuCell
return cell
}
}
}
//MARK: - 自定义delegate
func AddGuiGeCellClick(cell: AddGuiGeCell) {
print("添加商品")
}
}
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