Commit 6e0f4a48 authored by lujunye's avatar lujunye

修复已知bug3.0

parent ca61e663
......@@ -188,12 +188,18 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
@IBAction func btnAction(_ sender: UIButton) {
if sender.tag == 0 {
var shop_id = ""
var d:Array<String> = []
datas.forEach { (str) in
if str != "" {
d.append(str)
}
}
if title_lbl.text == "新增供应商" {
for i in 0 ..< datas.count{
let str = datas[i]
for i in 0 ..< d.count{
let str = d[i]
gys_centers.forEach { (item) in
if item.shop_name == str {
if i < datas.count-1 {
if i < d.count-1 {
shop_id += StringByInt(number: item.shop_id!) + ","
}else{
shop_id += StringByInt(number: item.shop_id!)
......@@ -201,6 +207,8 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
}
}
dbtAddContract(["user_token":UserToken as Any,"shop_id":shop_id as Any]) { (data) in
self.removeFromSuperview()
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "haveAdd"), object: "fxsAdd")
......@@ -208,11 +216,11 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
return
}
for i in 0 ..< datas.count{
let str = datas[i]
for i in 0 ..< d.count{
let str = d[i]
centers.forEach { (item) in
if item.shop_name == str {
if i < datas.count-1 {
if i < d.count-1 {
shop_id += StringByInt(number: item.shop_id!) + ","
}else{
shop_id += StringByInt(number: item.shop_id!)
......@@ -220,6 +228,8 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
}
}
supAddContract(["user_token":UserToken as Any,"shop_id":shop_id as Any]) { (data) in
self.removeFromSuperview()
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "haveAdd"), object: "fxsAdd")
......
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