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
96ff636e
Commit
96ff636e
authored
Nov 11, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分销商管理,新增。
parent
3438b316
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
375 additions
and
34 deletions
+375
-34
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+4
-4
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
+163
-2
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.xib
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.xib
+40
-3
GeliBusinessPlatform/View/AlertView/GLAlertTbAddViewCell.swift
...usinessPlatform/View/AlertView/GLAlertTbAddViewCell.swift
+14
-2
GeliBusinessPlatform/View/AlertView/GLAlertTbAddViewCell.xib
GeliBusinessPlatform/View/AlertView/GLAlertTbAddViewCell.xib
+20
-9
GeliBusinessPlatform/View/Cell/GYS_GuanLi_Cell.xib
GeliBusinessPlatform/View/Cell/GYS_GuanLi_Cell.xib
+1
-1
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC.swift
...Platform/ViewController/供应商分销商品管理/GYS_FX_Product_VC.swift
+5
-5
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_SearchViewController.swift
...iewController/供应商分销商品管理/GYS_FX_SearchViewController.swift
+2
-0
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
+126
-8
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
96ff636e
...
@@ -277,6 +277,7 @@
...
@@ -277,6 +277,7 @@
E0AA3A89248F3E1400CBFC27
/* StatisticsInterface.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AA3A88248F3E1400CBFC27
/* StatisticsInterface.swift */
;
};
E0AA3A89248F3E1400CBFC27
/* StatisticsInterface.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AA3A88248F3E1400CBFC27
/* StatisticsInterface.swift */
;
};
E0AA3A91248F626400CBFC27
/* XinCaiGouViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AA3A8F248F626400CBFC27
/* XinCaiGouViewController.swift */
;
};
E0AA3A91248F626400CBFC27
/* XinCaiGouViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AA3A8F248F626400CBFC27
/* XinCaiGouViewController.swift */
;
};
E0AA3A92248F626400CBFC27
/* XinCaiGouViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AA3A90248F626400CBFC27
/* XinCaiGouViewController.xib */
;
};
E0AA3A92248F626400CBFC27
/* XinCaiGouViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AA3A90248F626400CBFC27
/* XinCaiGouViewController.xib */
;
};
E0AACC76255BB03C00FC9010
/* TitleAndSelectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AACC75255BB03C00FC9010
/* TitleAndSelectCell.swift */
;
};
E0AD92E92550E50500D82C17
/* GYS_FX_Product_VC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AD92E72550E50500D82C17
/* GYS_FX_Product_VC.swift */
;
};
E0AD92E92550E50500D82C17
/* GYS_FX_Product_VC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AD92E72550E50500D82C17
/* GYS_FX_Product_VC.swift */
;
};
E0AD92EA2550E50500D82C17
/* GYS_FX_Product_VC.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AD92E82550E50500D82C17
/* GYS_FX_Product_VC.xib */
;
};
E0AD92EA2550E50500D82C17
/* GYS_FX_Product_VC.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AD92E82550E50500D82C17
/* GYS_FX_Product_VC.xib */
;
};
E0AD92F92550FD1500D82C17
/* GYS_FX_SearchViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AD92F72550FD1500D82C17
/* GYS_FX_SearchViewController.swift */
;
};
E0AD92F92550FD1500D82C17
/* GYS_FX_SearchViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0AD92F72550FD1500D82C17
/* GYS_FX_SearchViewController.swift */
;
};
...
@@ -349,7 +350,6 @@
...
@@ -349,7 +350,6 @@
E0D4166024482AAF008DCAB4
/* AccountViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D4165E24482AAF008DCAB4
/* AccountViewController.xib */
;
};
E0D4166024482AAF008DCAB4
/* AccountViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D4165E24482AAF008DCAB4
/* AccountViewController.xib */
;
};
E0D4166424483058008DCAB4
/* ChangePassViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D4166224483058008DCAB4
/* ChangePassViewController.swift */
;
};
E0D4166424483058008DCAB4
/* ChangePassViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D4166224483058008DCAB4
/* ChangePassViewController.swift */
;
};
E0D4166524483058008DCAB4
/* ChangePassViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D4166324483058008DCAB4
/* ChangePassViewController.xib */
;
};
E0D4166524483058008DCAB4
/* ChangePassViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D4166324483058008DCAB4
/* ChangePassViewController.xib */
;
};
E0D46C5624503EC50087B564
/* TitleAndSelectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D46C5424503EC50087B564
/* TitleAndSelectCell.swift */
;
};
E0D46C5724503EC50087B564
/* TitleAndSelectCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D46C5524503EC50087B564
/* TitleAndSelectCell.xib */
;
};
E0D46C5724503EC50087B564
/* TitleAndSelectCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0D46C5524503EC50087B564
/* TitleAndSelectCell.xib */
;
};
E0DDCB0F244AD8C500DF54C7
/* DaiQueRenCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0DDCB0D244AD8C500DF54C7
/* DaiQueRenCell.swift */
;
};
E0DDCB0F244AD8C500DF54C7
/* DaiQueRenCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0DDCB0D244AD8C500DF54C7
/* DaiQueRenCell.swift */
;
};
E0DDCB10244AD8C500DF54C7
/* DaiQueRenCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0DDCB0E244AD8C500DF54C7
/* DaiQueRenCell.xib */
;
};
E0DDCB10244AD8C500DF54C7
/* DaiQueRenCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0DDCB0E244AD8C500DF54C7
/* DaiQueRenCell.xib */
;
};
...
@@ -942,6 +942,7 @@
...
@@ -942,6 +942,7 @@
E0AA3A88248F3E1400CBFC27
/* StatisticsInterface.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
StatisticsInterface.swift
;
sourceTree
=
"<group>"
;
};
E0AA3A88248F3E1400CBFC27
/* StatisticsInterface.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
StatisticsInterface.swift
;
sourceTree
=
"<group>"
;
};
E0AA3A8F248F626400CBFC27
/* XinCaiGouViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
XinCaiGouViewController.swift
;
sourceTree
=
"<group>"
;
};
E0AA3A8F248F626400CBFC27
/* XinCaiGouViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
XinCaiGouViewController.swift
;
sourceTree
=
"<group>"
;
};
E0AA3A90248F626400CBFC27
/* XinCaiGouViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
XinCaiGouViewController.xib
;
sourceTree
=
"<group>"
;
};
E0AA3A90248F626400CBFC27
/* XinCaiGouViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
XinCaiGouViewController.xib
;
sourceTree
=
"<group>"
;
};
E0AACC75255BB03C00FC9010
/* TitleAndSelectCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TitleAndSelectCell.swift
;
sourceTree
=
"<group>"
;
};
E0AD92E72550E50500D82C17
/* GYS_FX_Product_VC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GYS_FX_Product_VC.swift
;
sourceTree
=
"<group>"
;
};
E0AD92E72550E50500D82C17
/* GYS_FX_Product_VC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GYS_FX_Product_VC.swift
;
sourceTree
=
"<group>"
;
};
E0AD92E82550E50500D82C17
/* GYS_FX_Product_VC.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GYS_FX_Product_VC.xib
;
sourceTree
=
"<group>"
;
};
E0AD92E82550E50500D82C17
/* GYS_FX_Product_VC.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GYS_FX_Product_VC.xib
;
sourceTree
=
"<group>"
;
};
E0AD92F72550FD1500D82C17
/* GYS_FX_SearchViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GYS_FX_SearchViewController.swift
;
sourceTree
=
"<group>"
;
};
E0AD92F72550FD1500D82C17
/* GYS_FX_SearchViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GYS_FX_SearchViewController.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -1023,7 +1024,6 @@
...
@@ -1023,7 +1024,6 @@
E0D4165E24482AAF008DCAB4
/* AccountViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
AccountViewController.xib
;
sourceTree
=
"<group>"
;
};
E0D4165E24482AAF008DCAB4
/* AccountViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
AccountViewController.xib
;
sourceTree
=
"<group>"
;
};
E0D4166224483058008DCAB4
/* ChangePassViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChangePassViewController.swift
;
sourceTree
=
"<group>"
;
};
E0D4166224483058008DCAB4
/* ChangePassViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChangePassViewController.swift
;
sourceTree
=
"<group>"
;
};
E0D4166324483058008DCAB4
/* ChangePassViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
ChangePassViewController.xib
;
sourceTree
=
"<group>"
;
};
E0D4166324483058008DCAB4
/* ChangePassViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
ChangePassViewController.xib
;
sourceTree
=
"<group>"
;
};
E0D46C5424503EC50087B564
/* TitleAndSelectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TitleAndSelectCell.swift
;
sourceTree
=
"<group>"
;
};
E0D46C5524503EC50087B564
/* TitleAndSelectCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
TitleAndSelectCell.xib
;
sourceTree
=
"<group>"
;
};
E0D46C5524503EC50087B564
/* TitleAndSelectCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
TitleAndSelectCell.xib
;
sourceTree
=
"<group>"
;
};
E0DDCB0D244AD8C500DF54C7
/* DaiQueRenCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DaiQueRenCell.swift
;
sourceTree
=
"<group>"
;
};
E0DDCB0D244AD8C500DF54C7
/* DaiQueRenCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DaiQueRenCell.swift
;
sourceTree
=
"<group>"
;
};
E0DDCB0E244AD8C500DF54C7
/* DaiQueRenCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
DaiQueRenCell.xib
;
sourceTree
=
"<group>"
;
};
E0DDCB0E244AD8C500DF54C7
/* DaiQueRenCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
DaiQueRenCell.xib
;
sourceTree
=
"<group>"
;
};
...
@@ -2550,7 +2550,7 @@
...
@@ -2550,7 +2550,7 @@
F9023F702449ACA800DD5A63
/* TitleAndSwitchCell.xib */
,
F9023F702449ACA800DD5A63
/* TitleAndSwitchCell.xib */
,
E0C4F4A5244EC82A00CC7E2F
/* TitleAndBtnCell.swift */
,
E0C4F4A5244EC82A00CC7E2F
/* TitleAndBtnCell.swift */
,
E0C4F4A6244EC82A00CC7E2F
/* TitleAndBtnCell.xib */
,
E0C4F4A6244EC82A00CC7E2F
/* TitleAndBtnCell.xib */
,
E0
D46C5424503EC50087B564
/* TitleAndSelectCell.swift */
,
E0
AACC75255BB03C00FC9010
/* TitleAndSelectCell.swift */
,
E0D46C5524503EC50087B564
/* TitleAndSelectCell.xib */
,
E0D46C5524503EC50087B564
/* TitleAndSelectCell.xib */
,
E0F97B0A24516B1F001BD600
/* AddImgCell.swift */
,
E0F97B0A24516B1F001BD600
/* AddImgCell.swift */
,
E0F97B0B24516B1F001BD600
/* AddImgCell.xib */
,
E0F97B0B24516B1F001BD600
/* AddImgCell.xib */
,
...
@@ -3769,6 +3769,7 @@
...
@@ -3769,6 +3769,7 @@
F95D9CA424493E840080D6E3
/* ShopInfoViewController.swift in Sources */
,
F95D9CA424493E840080D6E3
/* ShopInfoViewController.swift in Sources */
,
E013D7902484D5AF0092DE46
/* NewCKCell.swift in Sources */
,
E013D7902484D5AF0092DE46
/* NewCKCell.swift in Sources */
,
F9171EFC245128B200359C2B
/* Interface.swift in Sources */
,
F9171EFC245128B200359C2B
/* Interface.swift in Sources */
,
E0AACC76255BB03C00FC9010
/* TitleAndSelectCell.swift in Sources */
,
E0F97B082451620B001BD600
/* ProductDetailViewController.swift in Sources */
,
E0F97B082451620B001BD600
/* ProductDetailViewController.swift in Sources */
,
F95A9EDD24557CD500867849
/* GuanLianKehuVC.swift in Sources */
,
F95A9EDD24557CD500867849
/* GuanLianKehuVC.swift in Sources */
,
E00D85DF244561FD00F5F816
/* AppDelegate.swift in Sources */
,
E00D85DF244561FD00F5F816
/* AppDelegate.swift in Sources */
,
...
@@ -3972,7 +3973,6 @@
...
@@ -3972,7 +3973,6 @@
F9531F3B2465108800724BEE
/* JXPhotoBrowserZoomSupportedCell.swift in Sources */
,
F9531F3B2465108800724BEE
/* JXPhotoBrowserZoomSupportedCell.swift in Sources */
,
F950FDE024518B9500C40530
/* FSCalendarExtensions.m in Sources */
,
F950FDE024518B9500C40530
/* FSCalendarExtensions.m in Sources */
,
E09B03A32445AF9500211A51
/* NetworkRequest.swift in Sources */
,
E09B03A32445AF9500211A51
/* NetworkRequest.swift in Sources */
,
E0D46C5624503EC50087B564
/* TitleAndSelectCell.swift in Sources */
,
E0706EF424B40BE800D8251C
/* TitleAndTfYuanCell.swift in Sources */
,
E0706EF424B40BE800D8251C
/* TitleAndTfYuanCell.swift in Sources */
,
F90F881E24C8233D0050EF02
/* CityListViewController.swift in Sources */
,
F90F881E24C8233D0050EF02
/* CityListViewController.swift in Sources */
,
F93E32112473E05C00524DFC
/* GeliAlertTextView.swift in Sources */
,
F93E32112473E05C00524DFC
/* GeliAlertTextView.swift in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
96ff636e
No preview for this file type
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
View file @
96ff636e
...
@@ -8,9 +8,158 @@
...
@@ -8,9 +8,158 @@
import
UIKit
import
UIKit
class
GLAlertTbAddView
:
UIView
{
class
GLAlertTbAddView
:
UIView
,
UITableViewDelegate
,
UITableViewDataSource
,
GLAlertTbAddViewCellDelegate
,
TitleAndSelectCellDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
func
GLAlertTbAddViewCellBtnAction
(
target
:
String
,
tag
:
Int
)
{
if
target
==
"新增"
{
datas
.
insert
(
""
,
at
:
0
)
}
else
{
datas
.
remove
(
at
:
tag
)
}
list_tableview
.
reloadData
()
}
func
loadData
(){
HUD
.
flash
(
.
progress
)
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
}
}
}
var
centers
:
Array
<
getDbtShopDataModel
>
=
[]
var
datas
:
Array
<
String
>
=
[
""
]
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
tableView
==
list_tableview
{
return
datas
.
count
}
else
{
return
centers
.
count
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
tableView
==
list_tableview
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GLAlertTbAddViewCell"
)
!
as!
GLAlertTbAddViewCell
cell
.
delegate
=
self
cell
.
actionBtn
.
setTitle
(
"新增"
,
for
:
.
normal
)
cell
.
actionBtn
.
setTitleColor
(
UIColor
(
named
:
"按钮背景颜色"
),
for
:
.
normal
)
cell
.
tag
=
indexPath
.
row
cell
.
count_lbl
.
text
=
"店铺"
+
StringByInt
(
number
:
datas
.
count
-
indexPath
.
row
)
if
datas
.
count
>
1
{
if
indexPath
.
row
!=
0
{
cell
.
actionBtn
.
setTitle
(
"删除"
,
for
:
.
normal
)
cell
.
actionBtn
.
setTitleColor
(
UIColor
(
named
:
"#F57575"
),
for
:
.
normal
)
}
}
let
str
=
datas
[
indexPath
.
row
]
as!
String
if
str
.
count
>
0
{
cell
.
title_lbl
.
text
=
str
}
else
{
cell
.
title_lbl
.
text
=
"请选择店铺"
}
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelectCell"
)
!
as!
TitleAndSelectCell
cell
.
is_center_select
=
true
cell
.
delegate
=
self
let
model
=
centers
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
model
.
shop_name
let
str
=
datas
[
idx
]
as!
String
if
indexPath
.
row
==
idx
&&
str
.
count
>
0
{
cell
.
selectBtn
.
isSelected
=
true
}
else
{
cell
.
selectBtn
.
isSelected
=
false
}
return
cell
}
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
bottom_tableview
.
isHidden
=
true
}
var
idx
:
Int
=
0
func
GLAlertTbAddViewCellSelectAction
(
tag
:
Int
)
{
bottom_tableview
.
isHidden
=
false
idx
=
tag
bottom_tableview
.
reloadData
()
}
//MARK: - 选择店铺
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
tableView
==
bottom_tableview
{
let
str
=
datas
[
idx
]
as!
String
tableView
.
visibleCells
.
forEach
{
(
item
)
in
let
cell
=
item
as!
TitleAndSelectCell
cell
.
selectBtn
.
isSelected
=
false
}
bottom_tableview
.
isHidden
=
true
let
model
=
centers
[
indexPath
.
row
]
datas
.
insert
(
model
.
shop_name
!
,
at
:
idx
)
datas
.
remove
(
at
:
idx
+
1
)
list_tableview
.
reloadData
()
}
}
var
contentView
:
UIView
!
var
contentView
:
UIView
!
@IBAction
func
closeCover
(
_
sender
:
UIButton
)
{
self
.
removeFromSuperview
()
}
@IBAction
func
btnAction
(
_
sender
:
UIButton
)
{
if
sender
.
tag
==
0
{
var
shop_id
=
""
for
i
in
0
..<
datas
.
count
{
let
str
=
datas
[
i
]
centers
.
forEach
{
(
item
)
in
if
item
.
shop_name
==
str
{
if
i
<
datas
.
count
-
1
{
shop_id
+=
StringByInt
(
number
:
item
.
shop_id
!
)
+
","
}
else
{
shop_id
+=
StringByInt
(
number
:
item
.
shop_id
!
)
}
}
}
}
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"
)
}
failture
:
{
(
err
)
in
}
}
else
{
self
.
removeFromSuperview
()
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
tableView
==
list_tableview
{
return
65
}
else
{
return
44
}
}
@IBOutlet
weak
var
bottom_tableview
:
UITableView
!
@IBOutlet
weak
var
list_tableview
:
UITableView
!
//初始化时将xib中的view添加进来
//初始化时将xib中的view添加进来
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
...
@@ -19,6 +168,12 @@ class GLAlertTbAddView: UIView {
...
@@ -19,6 +168,12 @@ class GLAlertTbAddView: UIView {
contentView
.
snp
.
makeConstraints
{
(
make
)
in
contentView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
top
.
right
.
bottom
.
equalToSuperview
()
}
}
list_tableview
.
separatorStyle
=
.
none
list_tableview
.
register
(
UINib
(
nibName
:
"GLAlertTbAddViewCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GLAlertTbAddViewCell"
)
bottom_tableview
.
separatorStyle
=
.
none
bottom_tableview
.
register
(
UINib
(
nibName
:
"TitleAndSelectCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndSelectCell"
)
loadData
()
}
}
// /初始化时将xib中的view添加进来
// /初始化时将xib中的view添加进来
required
init
?(
coder
aDecoder
:
NSCoder
)
{
required
init
?(
coder
aDecoder
:
NSCoder
)
{
...
@@ -28,6 +183,12 @@ class GLAlertTbAddView: UIView {
...
@@ -28,6 +183,12 @@ class GLAlertTbAddView: UIView {
contentView
.
snp
.
makeConstraints
{
(
make
)
in
contentView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
top
.
right
.
bottom
.
equalToSuperview
()
}
}
list_tableview
.
separatorStyle
=
.
none
list_tableview
.
register
(
UINib
(
nibName
:
"GLAlertTbAddViewCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GLAlertTbAddViewCell"
)
bottom_tableview
.
separatorStyle
=
.
none
bottom_tableview
.
register
(
UINib
(
nibName
:
"TitleAndSelectCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndSelectCell"
)
loadData
()
}
}
//加载xib
//加载xib
func
loadViewFromNib
()
->
UIView
{
func
loadViewFromNib
()
->
UIView
{
...
...
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.xib
View file @
96ff636e
...
@@ -3,14 +3,19 @@
...
@@ -3,14 +3,19 @@
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1712
6
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1712
5
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
<objects>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"GLAlertTbAddView"
customModule=
"TestClass"
customModuleProvider=
"target"
/>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"GLAlertTbAddView"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"bottom_tableview"
destination=
"0V2-BU-sF9"
id=
"iJ3-vo-ZiD"
/>
<outlet
property=
"list_tableview"
destination=
"ai3-h9-DLi"
id=
"3Wi-eZ-2xQ"
/>
</connections>
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
...
@@ -19,6 +24,17 @@
...
@@ -19,6 +24,17 @@
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Mqd-Qa-wVl"
userLabel=
"blackView"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Mqd-Qa-wVl"
userLabel=
"blackView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<subviews>
<subviews>
<button
opaque=
"NO"
alpha=
"0.40000000000000002"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"9TM-Mu-fwk"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<color
key=
"backgroundColor"
name=
"标题字颜色"
/>
<color
key=
"tintColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<state
key=
"normal"
>
<color
key=
"titleColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
</state>
<connections>
<action
selector=
"closeCover:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"Ogu-4H-khj"
/>
</connections>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"6RK-yc-lGB"
userLabel=
"tishiView"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"6RK-yc-lGB"
userLabel=
"tishiView"
>
<rect
key=
"frame"
x=
"59.5"
y=
"365.5"
width=
"295"
height=
"165"
/>
<rect
key=
"frame"
x=
"59.5"
y=
"365.5"
width=
"295"
height=
"165"
/>
<subviews>
<subviews>
...
@@ -49,7 +65,7 @@
...
@@ -49,7 +65,7 @@
<constraint
firstAttribute=
"width"
constant=
"1"
id=
"fgO-SC-mmb"
/>
<constraint
firstAttribute=
"width"
constant=
"1"
id=
"fgO-SC-mmb"
/>
</constraints>
</constraints>
</view>
</view>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
hasAttributedTitle=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"UYr-wl-9KU"
>
<button
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
hasAttributedTitle=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"UYr-wl-9KU"
>
<rect
key=
"frame"
x=
"0.0"
y=
"115"
width=
"147"
height=
"50"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"115"
width=
"147"
height=
"50"
/>
<color
key=
"tintColor"
name=
"灰色字体颜色"
/>
<color
key=
"tintColor"
name=
"灰色字体颜色"
/>
<state
key=
"normal"
>
<state
key=
"normal"
>
...
@@ -61,6 +77,9 @@
...
@@ -61,6 +77,9 @@
</fragment>
</fragment>
</attributedString>
</attributedString>
</state>
</state>
<connections>
<action
selector=
"btnAction:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"JPK-BR-cQD"
/>
</connections>
</button>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
hasAttributedTitle=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dGv-gS-5Ge"
>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
hasAttributedTitle=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dGv-gS-5Ge"
>
<rect
key=
"frame"
x=
"148"
y=
"115"
width=
"147"
height=
"50"
/>
<rect
key=
"frame"
x=
"148"
y=
"115"
width=
"147"
height=
"50"
/>
...
@@ -74,6 +93,9 @@
...
@@ -74,6 +93,9 @@
</fragment>
</fragment>
</attributedString>
</attributedString>
</state>
</state>
<connections>
<action
selector=
"btnAction:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"Qky-vX-BCh"
/>
</connections>
</button>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"pQa-v3-eKL"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"pQa-v3-eKL"
>
<rect
key=
"frame"
x=
"0.0"
y=
"38"
width=
"295"
height=
"1"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"38"
width=
"295"
height=
"1"
/>
...
@@ -85,6 +107,10 @@
...
@@ -85,6 +107,10 @@
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"plain"
separatorStyle=
"default"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ai3-h9-DLi"
>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"plain"
separatorStyle=
"default"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ai3-h9-DLi"
>
<rect
key=
"frame"
x=
"0.0"
y=
"39"
width=
"295"
height=
"75"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"39"
width=
"295"
height=
"75"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<connections>
<outlet
property=
"dataSource"
destination=
"-1"
id=
"c6X-ub-hB2"
/>
<outlet
property=
"delegate"
destination=
"-1"
id=
"yAA-po-iea"
/>
</connections>
</tableView>
</tableView>
</subviews>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
...
@@ -131,12 +157,20 @@
...
@@ -131,12 +157,20 @@
<real
key=
"value"
value=
"5"
/>
<real
key=
"value"
value=
"5"
/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes>
<connections>
<outlet
property=
"dataSource"
destination=
"-1"
id=
"Ycv-ey-Q5n"
/>
<outlet
property=
"delegate"
destination=
"-1"
id=
"weI-1n-ASm"
/>
</connections>
</tableView>
</tableView>
</subviews>
</subviews>
<color
key=
"backgroundColor"
name=
"提示视图背景色"
/>
<color
key=
"backgroundColor"
name=
"提示视图背景色"
/>
<constraints>
<constraints>
<constraint
firstItem=
"0V2-BU-sF9"
firstAttribute=
"leading"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"leading"
id=
"5fc-HL-N7q"
/>
<constraint
firstItem=
"0V2-BU-sF9"
firstAttribute=
"leading"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"leading"
id=
"5fc-HL-N7q"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"9TM-Mu-fwk"
secondAttribute=
"trailing"
id=
"8Af-F8-l5c"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"0V2-BU-sF9"
secondAttribute=
"trailing"
id=
"T8r-7I-oaa"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"0V2-BU-sF9"
secondAttribute=
"trailing"
id=
"T8r-7I-oaa"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"9TM-Mu-fwk"
secondAttribute=
"bottom"
id=
"XPR-yz-cOR"
/>
<constraint
firstItem=
"9TM-Mu-fwk"
firstAttribute=
"top"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"top"
id=
"bC3-0P-Stp"
/>
<constraint
firstItem=
"9TM-Mu-fwk"
firstAttribute=
"leading"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"leading"
id=
"ddP-Dt-e3G"
/>
<constraint
firstItem=
"6RK-yc-lGB"
firstAttribute=
"centerY"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"centerY"
id=
"hmz-a9-ddE"
/>
<constraint
firstItem=
"6RK-yc-lGB"
firstAttribute=
"centerY"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"centerY"
id=
"hmz-a9-ddE"
/>
<constraint
firstItem=
"0V2-BU-sF9"
firstAttribute=
"top"
secondItem=
"6RK-yc-lGB"
secondAttribute=
"bottom"
constant=
"30"
id=
"k9O-NX-iZq"
/>
<constraint
firstItem=
"0V2-BU-sF9"
firstAttribute=
"top"
secondItem=
"6RK-yc-lGB"
secondAttribute=
"bottom"
constant=
"30"
id=
"k9O-NX-iZq"
/>
<constraint
firstItem=
"6RK-yc-lGB"
firstAttribute=
"centerX"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"centerX"
id=
"oUQ-yW-coe"
/>
<constraint
firstItem=
"6RK-yc-lGB"
firstAttribute=
"centerX"
secondItem=
"Mqd-Qa-wVl"
secondAttribute=
"centerX"
id=
"oUQ-yW-coe"
/>
...
@@ -163,6 +197,9 @@
...
@@ -163,6 +197,9 @@
<namedColor
name=
"标题字颜色"
>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"灰色分界线"
>
<namedColor
name=
"灰色分界线"
>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
...
...
GeliBusinessPlatform/View/AlertView/GLAlertTbAddViewCell.swift
View file @
96ff636e
...
@@ -7,9 +7,21 @@
...
@@ -7,9 +7,21 @@
//
//
import
UIKit
import
UIKit
protocol
GLAlertTbAddViewCellDelegate
{
func
GLAlertTbAddViewCellSelectAction
(
tag
:
Int
)
func
GLAlertTbAddViewCellBtnAction
(
target
:
String
,
tag
:
Int
)
}
class
GLAlertTbAddViewCell
:
UITableViewCell
{
class
GLAlertTbAddViewCell
:
UITableViewCell
{
var
delegate
:
GLAlertTbAddViewCellDelegate
?
@IBOutlet
weak
var
title_lbl
:
UILabel
!
@IBOutlet
weak
var
count_lbl
:
UILabel
!
@IBAction
func
select_action
(
_
sender
:
UIButton
)
{
delegate
?
.
GLAlertTbAddViewCellSelectAction
(
tag
:
self
.
tag
)
}
@IBAction
func
btn_Action
(
_
sender
:
UIButton
)
{
delegate
?
.
GLAlertTbAddViewCellBtnAction
(
target
:
(
sender
.
titleLabel
?
.
text
)
!
,
tag
:
self
.
tag
)
}
@IBOutlet
weak
var
actionBtn
:
UIButton
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
// Initialization code
// Initialization code
...
...
GeliBusinessPlatform/View/AlertView/GLAlertTbAddViewCell.xib
View file @
96ff636e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1712
6
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1712
5
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
@@ -12,20 +12,20 @@
...
@@ -12,20 +12,20 @@
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"GLAlertTbAddViewCell"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"GLAlertTbAddViewCell"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"352"
height=
"
44
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"352"
height=
"
65
"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"352"
height=
"
44
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"352"
height=
"
65
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"店铺1:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5fi-Fa-DeI"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"店铺1:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5fi-Fa-DeI"
>
<rect
key=
"frame"
x=
"10"
y=
"
12.5
"
width=
"35"
height=
"19"
/>
<rect
key=
"frame"
x=
"10"
y=
"
23
"
width=
"35"
height=
"19"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"TVf-Jn-LWN"
>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"TVf-Jn-LWN"
>
<rect
key=
"frame"
x=
"50"
y=
"
4.
5"
width=
"246"
height=
"35"
/>
<rect
key=
"frame"
x=
"50"
y=
"
1
5"
width=
"246"
height=
"35"
/>
<color
key=
"backgroundColor"
name=
"搜索框背景色"
/>
<color
key=
"backgroundColor"
name=
"搜索框背景色"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"35"
id=
"Bxn-PF-cgm"
/>
<constraint
firstAttribute=
"height"
constant=
"35"
id=
"Bxn-PF-cgm"
/>
...
@@ -35,9 +35,12 @@
...
@@ -35,9 +35,12 @@
<real
key=
"value"
value=
"3"
/>
<real
key=
"value"
value=
"3"
/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes>
<connections>
<action
selector=
"select_action:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"p2o-Hv-3c4"
/>
</connections>
</button>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"IHB-UU-Spa"
>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"IHB-UU-Spa"
>
<rect
key=
"frame"
x=
"296"
y=
"0.0"
width=
"56"
height=
"
44
"
/>
<rect
key=
"frame"
x=
"296"
y=
"0.0"
width=
"56"
height=
"
65
"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"56"
id=
"rqL-BP-gyN"
/>
<constraint
firstAttribute=
"width"
constant=
"56"
id=
"rqL-BP-gyN"
/>
</constraints>
</constraints>
...
@@ -45,15 +48,18 @@
...
@@ -45,15 +48,18 @@
<state
key=
"normal"
title=
"新增"
>
<state
key=
"normal"
title=
"新增"
>
<color
key=
"titleColor"
name=
"蓝色字体颜色"
/>
<color
key=
"titleColor"
name=
"蓝色字体颜色"
/>
</state>
</state>
<connections>
<action
selector=
"btn_Action:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"JUD-hI-gHQ"
/>
</connections>
</button>
</button>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"请选择
/输入店铺名称
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"9yi-HN-uNk"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"请选择
店铺
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"9yi-HN-uNk"
>
<rect
key=
"frame"
x=
"60"
y=
"
12.5"
width=
"123
.5"
height=
"19"
/>
<rect
key=
"frame"
x=
"60"
y=
"
23"
width=
"65
.5"
height=
"19"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"3"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"lFI-Fa-62J"
>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"3"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"lFI-Fa-62J"
>
<rect
key=
"frame"
x=
"281.5"
y=
"
17.5
"
width=
"4.5"
height=
"9"
/>
<rect
key=
"frame"
x=
"281.5"
y=
"
28
"
width=
"4.5"
height=
"9"
/>
</imageView>
</imageView>
</subviews>
</subviews>
<constraints>
<constraints>
...
@@ -74,6 +80,11 @@
...
@@ -74,6 +80,11 @@
</constraints>
</constraints>
</tableViewCellContentView>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"actionBtn"
destination=
"IHB-UU-Spa"
id=
"jJk-Vr-O0g"
/>
<outlet
property=
"count_lbl"
destination=
"5fi-Fa-DeI"
id=
"TMZ-eb-3hB"
/>
<outlet
property=
"title_lbl"
destination=
"9yi-HN-uNk"
id=
"tgT-Dq-AXd"
/>
</connections>
<point
key=
"canvasLocation"
x=
"162.31884057971016"
y=
"126.5625"
/>
<point
key=
"canvasLocation"
x=
"162.31884057971016"
y=
"126.5625"
/>
</tableViewCell>
</tableViewCell>
</objects>
</objects>
...
...
GeliBusinessPlatform/View/Cell/GYS_GuanLi_Cell.xib
View file @
96ff636e
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
状态
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Bv7-SU-FnU"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
合作中
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Bv7-SU-FnU"
>
<rect
key=
"frame"
x=
"81.5"
y=
"107"
width=
"278.5"
height=
"15"
/>
<rect
key=
"frame"
x=
"81.5"
y=
"107"
width=
"278.5"
height=
"15"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"15"
id=
"lFk-Ma-hwQ"
/>
<constraint
firstAttribute=
"height"
constant=
"15"
id=
"lFk-Ma-hwQ"
/>
...
...
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC.swift
View file @
96ff636e
...
@@ -129,15 +129,15 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
...
@@ -129,15 +129,15 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
getNoti(noti:)
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"haveChange"
),
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
getNoti(noti:)
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"haveChange"
),
object
:
nil
)
}
}
@objc
func
getNoti
(
noti
:
Notification
){
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
deinit
{
deinit
{
/// 移除通知
/// 移除通知
NotificationCenter
.
default
.
removeObserver
(
self
)
NotificationCenter
.
default
.
removeObserver
(
self
)
}
}
@objc
func
getNoti
(
noti
:
Notification
){
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
...
...
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_SearchViewController.swift
View file @
96ff636e
...
@@ -48,6 +48,8 @@ class GYS_FX_SearchViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -48,6 +48,8 @@ class GYS_FX_SearchViewController: BaseViewController,UITableViewDelegate,UITabl
//MARK:--取消搜索代理
//MARK:--取消搜索代理
func
clearSearchAction
()
{
func
clearSearchAction
()
{
print
(
"取消搜索代理了--"
)
print
(
"取消搜索代理了--"
)
keyword
=
""
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
}
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
print
(
"编辑即将结束了--"
)
print
(
"编辑即将结束了--"
)
...
...
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
View file @
96ff636e
...
@@ -8,21 +8,62 @@
...
@@ -8,21 +8,62 @@
import
UIKit
import
UIKit
class
GYS_HZ_Vc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GYS_GuanLi_CellDelegate
{
class
GYS_HZ_Vc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GYS_GuanLi_CellDelegate
,
GeliAlertViewDelegate
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
title_str
==
"分销商管理"
{
let
model
=
dbt_datas
[
sender
.
tag
]
stopContract
([
"user_token"
:
UserToken
as
Any
,
"dbt_id"
:
model
.
dbt_id
])
{
(
data
)
in
HUD
.
flash
(
.
label
(
"删除成功~"
),
delay
:
1.2
)
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
failture
:
{
(
err
)
in
}
return
}
let
model
=
gys_datas
[
sender
.
tag
]
stopContract
([
"user_token"
:
UserToken
as
Any
,
"sup_id"
:
model
.
sup_id
])
{
(
data
)
in
HUD
.
flash
(
.
label
(
"终止合作成功~"
),
delay
:
1.2
)
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
failture
:
{
(
err
)
in
}
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
func
GYS_GuanLi_CellStopAction
(
idx
:
Int
)
{
func
GYS_GuanLi_CellStopAction
(
idx
:
Int
)
{
print
(
"target = "
,
idx
)
var
content
=
"终止和单个供应商的合作后,从该供应商处代销的所有产品都将不再能订单回流,且立即生效,是否确认终止合作?"
if
title_str
==
"分销商管理"
{
content
=
"删除该店铺后,该店铺将无法代销对应的分销产品,是否确定删除该分销商?"
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
content
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确定"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
idx
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
func
rightBtnClick
()
{
print
(
"新增店铺"
)
//GLAlertTbAddView
let
alertView
=
GLAlertTbAddView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
bottom_tableview
.
isHidden
=
true
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
}
var
keyword
=
""
var
keyword
=
""
func
searchBarSearchButtonClicked
(
_
searchBar
:
UISearchBar
)
{
func
searchBarSearchButtonClicked
(
_
searchBar
:
UISearchBar
)
{
print
(
"点击搜索进行--"
)
print
(
"点击搜索进行--"
)
searchBar
.
resignFirstResponder
()
searchBar
.
resignFirstResponder
()
keyword
=
searchBar
.
text
!
keyword
=
searchBar
.
text
!
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
}
//MARK:--取消搜索代理
//MARK:--取消搜索代理
func
clearSearchAction
()
{
func
clearSearchAction
()
{
print
(
"取消搜索代理了--"
)
print
(
"取消搜索代理了--"
)
keyword
=
""
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
}
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
print
(
"编辑即将结束了--"
)
print
(
"编辑即将结束了--"
)
...
@@ -40,9 +81,13 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
...
@@ -40,9 +81,13 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
weak
var
searchV
:
SearchBarView
?
=
nil
weak
var
searchV
:
SearchBarView
?
=
nil
@IBOutlet
weak
var
search_view
:
UIView
!
@IBOutlet
weak
var
search_view
:
UIView
!
@IBOutlet
weak
var
home_list_tbv
:
UITableView
!
@IBOutlet
weak
var
home_list_tbv
:
UITableView
!
var
gys_datas
:
Array
<
supListDataModel
>
=
[]
var
dbt_datas
:
Array
<
dbtListDataModel
>
=
[]
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
title_str
=
"分销商管理"
SetTopFrame
(
view
:
search_view
,
height
:
44
)
SetTopFrame
(
view
:
search_view
,
height
:
44
)
navbar
.
title
=
title_str
navbar
.
title
=
title_str
...
@@ -50,11 +95,12 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
...
@@ -50,11 +95,12 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
let
searchBr
=
SearchBarView
.
init
()
let
searchBr
=
SearchBarView
.
init
()
searchV
=
searchBr
searchV
=
searchBr
var
holder_str
=
"请输入供应商名称"
var
holder_str
=
"请输入供应商名称"
if
title_str
==
"分销商管理"
{
if
title_str
==
"分销商管理"
{
navbar
.
rightTitle
=
"新增店铺"
navbar
.
rightTitle
=
"新增店铺"
// holder_str = "请输入供应商名称"
holder_str
=
"请输入分销商名称"
}
}
searchBr
.
placeholderStr
=
holder_str
searchBr
.
placeholderStr
=
holder_str
...
@@ -72,11 +118,67 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
...
@@ -72,11 +118,67 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
home_list_tbv
.
register
(
UINib
(
nibName
:
"GYS_GuanLi_Cell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GYS_GuanLi_Cell"
)
home_list_tbv
.
register
(
UINib
(
nibName
:
"GYS_GuanLi_Cell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GYS_GuanLi_Cell"
)
home_list_tbv
.
separatorStyle
=
.
none
home_list_tbv
.
separatorStyle
=
.
none
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
//下拉刷新相关设置
self
.
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
self.loadData
)
)
self
.
home_list_tbv
.
mj_header
=
self
.
headerMJ
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
getNoti(noti:)
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"haveAdd"
),
object
:
nil
)
}
}
deinit
{
//MARK: - tableview_delegate
/// 移除通知
NotificationCenter
.
default
.
removeObserver
(
self
)
}
@objc
func
getNoti
(
noti
:
Notification
){
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
@objc
func
loadData
(){
if
title_str
==
"分销商管理"
{
dbtList
([
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
as
Any
])
{
(
data
)
in
self
.
dbt_datas
.
removeAll
()
let
model
=
data
as!
dbtListModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
dbt_datas
.
append
(
item
)
})
self
.
home_list_tbv
.
reloadData
()
self
.
home_list_tbv
?
.
mj_header
?
.
endRefreshing
()
if
model
.
data
?
.
count
==
0
{
self
.
home_list_tbv
?
.
mj_footer
?
.
endRefreshingWithNoMoreData
()
}
else
{
self
.
home_list_tbv
?
.
mj_footer
?
.
endRefreshing
()
}
}
failture
:
{
(
err
)
in
self
.
home_list_tbv
?
.
mj_header
?
.
endRefreshing
()
}
}
else
{
supList
([
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
as
Any
])
{
(
data
)
in
self
.
gys_datas
.
removeAll
()
let
model
=
data
as!
supListModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
gys_datas
.
append
(
item
)
})
self
.
home_list_tbv
.
reloadData
()
self
.
home_list_tbv
?
.
mj_header
?
.
endRefreshing
()
if
model
.
data
?
.
count
==
0
{
self
.
home_list_tbv
?
.
mj_footer
?
.
endRefreshingWithNoMoreData
()
}
else
{
self
.
home_list_tbv
?
.
mj_footer
?
.
endRefreshing
()
}
}
failture
:
{
(
err
)
in
self
.
home_list_tbv
?
.
mj_header
?
.
endRefreshing
()
}
}
}
//MARK: - tableview_delegate
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
3
if
title_str
==
"分销商管理"
{
return
dbt_datas
.
count
}
else
{
return
gys_datas
.
count
}
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
@@ -84,8 +186,24 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
...
@@ -84,8 +186,24 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
cell
.
delegate
=
self
cell
.
delegate
=
self
if
title_str
==
"分销商管理"
{
if
title_str
==
"分销商管理"
{
cell
.
isFenXiaoShang
=
true
cell
.
isFenXiaoShang
=
true
if
dbt_datas
.
count
>
0
{
let
model
=
dbt_datas
[
indexPath
.
row
]
cell
.
icon_Img
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
shop_img_thumb
!
))
cell
.
time_Lbl
.
text
=
model
.
create_time
cell
.
adr_Lbl
.
text
=
model
.
address
cell
.
title_Lbl
.
text
=
model
.
shop_name
}
}
else
{
if
gys_datas
.
count
>
0
{
let
model
=
gys_datas
[
indexPath
.
row
]
cell
.
icon_Img
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
shop_img_thumb
!
))
cell
.
time_Lbl
.
text
=
model
.
create_time
cell
.
adr_Lbl
.
text
=
model
.
address
cell
.
title_Lbl
.
text
=
model
.
shop_name
}
}
}
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
return
cell
return
cell
}
}
...
...
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