Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
88948f34
Commit
88948f34
authored
Nov 25, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复刷新数据bug.
parent
c2fa930d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
25 deletions
+36
-25
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
+34
-25
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
+2
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
88948f34
No preview for this file type
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
View file @
88948f34
...
...
@@ -15,8 +15,8 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
didSet
{
if
is_gys
{
title_lbl
.
text
=
"新增供应商"
loadData
()
}
loadData
()
}
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
...
@@ -38,34 +38,33 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
func
loadData
(){
print
(
"1"
)
HUD
.
flash
(
.
progress
)
if
title_lbl
.
text
==
"新增供应商"
{
if
is_gys
{
print
(
"2"
)
if
gys_centers
.
count
==
0
{
getSupShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getSupShopModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
gys_centers
.
append
(
item
)
})
self
.
bottom_tableview
.
reloadData
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
getSupShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getSupShopModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
gys_centers
.
append
(
item
)
})
self
.
bottom_tableview
.
reloadData
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
}
return
}
else
{
print
(
"3"
)
if
centers
.
count
==
0
{
getDbtShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getDbtShopModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
centers
.
append
(
item
)
})
self
.
bottom_tableview
.
reloadData
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
getDbtShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getDbtShopModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
centers
.
append
(
item
)
})
self
.
bottom_tableview
.
reloadData
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
}
...
...
@@ -124,7 +123,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
cell
.
selectBtn
.
isSelected
=
false
}
}
return
cell
}
...
...
@@ -149,7 +148,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
if
scrollView
!=
bottom_tableview
{
bottom_tableview
.
isHidden
=
true
bottom_tableview
.
isHidden
=
true
}
}
...
...
@@ -190,11 +189,19 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
if
sender
.
tag
==
0
{
var
shop_id
=
""
var
d
:
Array
<
String
>
=
[]
datas
.
forEach
{
(
str
)
in
let
results
=
datas
.
enumerated
()
.
filter
{
(
index
,
value
)
->
Bool
in
return
datas
.
firstIndex
(
of
:
value
)
==
index
}
.
map
{
$0
.
element
}
results
.
forEach
{
(
str
)
in
if
str
!=
""
{
d
.
append
(
str
)
}
}
if
title_lbl
.
text
==
"新增供应商"
{
for
i
in
0
..<
d
.
count
{
let
str
=
d
[
i
]
...
...
@@ -223,6 +230,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
for
i
in
0
..<
d
.
count
{
let
str
=
d
[
i
]
centers
.
forEach
{
(
item
)
in
if
item
.
shop_name
==
str
{
if
i
<
d
.
count
-
1
{
...
...
@@ -274,7 +282,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
bottom_tableview
.
separatorStyle
=
.
none
bottom_tableview
.
register
(
UINib
(
nibName
:
"TitleAndSelectCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndSelectCell"
)
loadData
()
//
loadData()
}
// /初始化时将xib中的view添加进来
required
init
?(
coder
aDecoder
:
NSCoder
)
{
...
...
@@ -302,3 +310,4 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
return
view
}
}
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
View file @
88948f34
...
...
@@ -50,6 +50,8 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
alertView
.
bottom_tableview
.
isHidden
=
true
if
title_str
!=
"分销商管理"
{
alertView
.
is_gys
=
true
}
else
{
alertView
.
is_gys
=
false
}
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment