Commit 48dee4c3 authored by lujunye's avatar lujunye

读取默认仓库

parent e2b91bcc
......@@ -128,11 +128,11 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
@IBAction func gmAction(_ sender: Any) {
if holderArr[0] == "默认仓库" {
if holderArr[0] == "请选择仓库" {
HUD.flash(.label("请选择仓库"), delay: 1.2)
return
}
if holderArr[1] == "默认库位" {
if holderArr[1] == "请选择库位" {
HUD.flash(.label("请选择库位"), delay: 1.2)
return
}
......@@ -155,7 +155,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
@IBOutlet weak var lgBtn: LGButton!
var isGm = false
let titleArr = ["仓库:","库位:","入库类型:","入库时间:"]
var holderArr = ["默认仓库","默认库位","请选择入库类型","时间"]
var holderArr = ["请选择仓库","请选择库位","请选择入库类型","时间"]
//入库类型
var rkTypeArr = ["采购","调入","退货","生产","调出被拒绝","外采","其他","固定采购","临时采购"]
var typeSelect:Int?
......@@ -195,7 +195,18 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
model.data?.auth?.forEach({ (str) in
self.authArr.append(str)
})
model.data?.warehouse_res?.forEach({ (item) in
if item.is_default == 1 {
self.holderArr.insert(item.w_name!, at: 0)
self.holderArr.remove(at: 1)
item.warehouse_position?.forEach({ (data) in
if data.is_default == 1 {
self.holderArr.insert(data.p_name!, at: 1)
self.holderArr.remove(at: 2)
}
})
}
})
if self.authArr.contains("63") == false && self.authArr.contains("65") == false {
self.listView.isHidden = true
self.lgBtn.isHidden = true
......
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