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
9473a865
Commit
9473a865
authored
Nov 03, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充选择下拉列表
parent
356d4821
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
120 additions
and
23 deletions
+120
-23
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/GYS_FX_ProductCellTableViewCell.swift
...sPlatform/View/Cell/GYS_FX_ProductCellTableViewCell.swift
+0
-5
GeliBusinessPlatform/View/HeaderSelectView/HeaderSelectView.swift
...nessPlatform/View/HeaderSelectView/HeaderSelectView.swift
+20
-13
GeliBusinessPlatform/View/HeaderSelectView/HeaderSelectView.xib
...sinessPlatform/View/HeaderSelectView/HeaderSelectView.xib
+7
-3
GeliBusinessPlatform/View/HeaderSelectView/SelectContentView.xib
...inessPlatform/View/HeaderSelectView/SelectContentView.xib
+1
-1
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
...sPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
+91
-1
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.xib
...essPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.xib
+1
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
9473a865
No preview for this file type
GeliBusinessPlatform/View/Cell/GYS_FX_ProductCellTableViewCell.swift
View file @
9473a865
...
...
@@ -14,11 +14,6 @@ class GYS_FX_ProductCellTableViewCell: UITableViewCell {
var
delegate
:
GYS_FX_ProductCellDelegate
?
@IBAction
func
selectProductAction
(
_
sender
:
UIButton
)
{
// left_btn.isSelected = !left_btn.isSelected
// select_Img.image = UIImage(named: "daixuan")
// if left_btn.isSelected {
// select_Img.image = UIImage(named: "yuxuan")
// }
delegate
?
.
GYS_FX_ProductCellTableViewCellSelect
(
idx
:
self
.
tag
)
}
@IBOutlet
weak
var
left_btn
:
UIButton
!
...
...
GeliBusinessPlatform/View/HeaderSelectView/HeaderSelectView.swift
View file @
9473a865
...
...
@@ -11,12 +11,13 @@ protocol HeaderSelectViewDelegate {
// 协议定义
func
showAction
(
sender
:
Int
)
func
colseAction
(
sender
:
Int
)
}
class
HeaderSelectView
:
UIView
{
var
delegate
:
HeaderSelectViewDelegate
?
@IBOutlet
weak
var
firstBtn
:
UIButton
!
@IBOutlet
weak
var
secBtn
:
UIButton
!
@IBOutlet
weak
var
thereBtn
:
UIButton
!
...
...
@@ -38,14 +39,16 @@ class HeaderSelectView: UIView {
sender
.
setImage
(
upImg
,
for
:
.
normal
)
secBtn
.
setTitleColor
(
upColor
,
for
:
.
normal
)
thereBtn
.
setTitleColor
(
upColor
,
for
:
.
normal
)
secBtnAction
(
secBtn
)
thereBtnAction
(
thereBtn
)
if
thereBtn
!=
nil
{
thereBtn
.
setTitleColor
(
upColor
,
for
:
.
normal
)
thereBtnAction
(
thereBtn
)
}
self
.
delegate
?
.
showAction
(
sender
:
0
)
}
}
@IBAction
func
secBtnAction
(
_
sender
:
UIButton
)
{
...
...
@@ -53,17 +56,19 @@ class HeaderSelectView: UIView {
sender
.
setTitleColor
(
dowColor
,
for
:
.
normal
)
sender
.
setImage
(
dowImg
,
for
:
.
normal
)
self
.
delegate
?
.
colseAction
(
sender
:
1
)
}
else
{
sender
.
setTitleColor
(
upColor
,
for
:
.
normal
)
sender
.
setImage
(
upImg
,
for
:
.
normal
)
firstBtn
.
setTitleColor
(
upColor
,
for
:
.
normal
)
thereBtn
.
setTitleColor
(
upColor
,
for
:
.
normal
)
if
thereBtn
!=
nil
{
thereBtn
.
setTitleColor
(
upColor
,
for
:
.
normal
)
thereBtnAction
(
thereBtn
)
}
fristBtnAction
(
firstBtn
)
thereBtnAction
(
thereBtn
)
self
.
delegate
?
.
showAction
(
sender
:
1
)
}
}
...
...
@@ -72,7 +77,7 @@ class HeaderSelectView: UIView {
sender
.
setTitleColor
(
dowColor
,
for
:
.
normal
)
sender
.
setImage
(
dowImg
,
for
:
.
normal
)
self
.
delegate
?
.
colseAction
(
sender
:
2
)
}
else
{
sender
.
setTitleColor
(
upColor
,
for
:
.
normal
)
sender
.
setImage
(
upImg
,
for
:
.
normal
)
...
...
@@ -82,7 +87,7 @@ class HeaderSelectView: UIView {
fristBtnAction
(
firstBtn
)
secBtnAction
(
secBtn
)
self
.
delegate
?
.
showAction
(
sender
:
2
)
}
}
func
colseBytitleArr
(
arr
:[
String
],
index
:
Int
){
...
...
@@ -98,10 +103,12 @@ class HeaderSelectView: UIView {
}
firstBtn
.
setTitleColor
(
dowColor
,
for
:
.
normal
)
secBtn
.
setTitleColor
(
dowColor
,
for
:
.
normal
)
thereBtn
.
setTitleColor
(
dowColor
,
for
:
.
normal
)
if
thereBtn
!=
nil
{
thereBtn
.
setTitleColor
(
dowColor
,
for
:
.
normal
)
thereBtn
.
setImage
(
dowImg
,
for
:
.
normal
)
}
firstBtn
.
setImage
(
dowImg
,
for
:
.
normal
)
secBtn
.
setImage
(
dowImg
,
for
:
.
normal
)
thereBtn
.
setImage
(
dowImg
,
for
:
.
normal
)
}
//初始化时将xib中的view添加进来
override
init
(
frame
:
CGRect
)
{
...
...
GeliBusinessPlatform/View/HeaderSelectView/HeaderSelectView.xib
View file @
9473a865
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
7156
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
7125
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
...
...
@@ -51,7 +52,7 @@
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstItem=
"fJG-vM-HVA"
firstAttribute=
"width"
secondItem=
"qBG-jC-B4y"
secondAttribute=
"width"
id=
"147-PD-30D"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"fJG-vM-HVA"
secondAttribute=
"bottom"
id=
"3UK-w4-fob"
/>
...
...
@@ -75,5 +76,8 @@
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<systemColor
name=
"systemBackgroundColor"
>
<color
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
</systemColor>
</resources>
</document>
GeliBusinessPlatform/View/HeaderSelectView/SelectContentView.xib
View file @
9473a865
...
...
@@ -3,7 +3,7 @@
<device
id=
"retina4_7"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<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=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
...
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
View file @
9473a865
...
...
@@ -8,7 +8,72 @@
import
UIKit
class
FX_Product_GuanLiVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GYS_FX_ProductCellDelegate
{
class
FX_Product_GuanLiVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GYS_FX_ProductCellDelegate
,
SelectContentViewDelegate
,
HeaderSelectViewDelegate
{
var
selectIndexArr
=
[
0
,
0
]
var
showSelectvIndex
=
0
weak
var
showSelectV
:
SelectContentView
!
=
nil
func
didselectCell
(
sender
:
Int
)
{
selectIndexArr
[
showSelectvIndex
]
=
sender
var
arr
:[
String
]
=
[]
if
showSelectvIndex
==
0
{
let
arr1
=
[
"全部商品"
,
"不参与分销商品"
,
"参与分销商品"
,
"佣金比例商品"
,
"绝对额比例商品"
]
arr
.
append
(
arr1
[
sender
])
}
else
if
showSelectvIndex
==
1
{
let
arr2
=
[
"全部"
,
"上架"
,
"下架"
]
arr
.
append
(
arr2
[
sender
])
}
selectV
.
colseBytitleArr
(
arr
:
arr
,
index
:
showSelectvIndex
)
}
func
selectContentvRemoveForSup
()
{
selectV
.
colseBytitleArr
(
arr
:
[],
index
:
showSelectvIndex
)
}
func
showAction
(
sender
:
Int
)
{
showSelectvIndex
=
sender
switch
sender
{
case
0
:
do
{
let
showSelectView
=
SelectContentView
()
showSelectView
.
delegate
=
self
self
.
view
.
addSubview
(
showSelectView
)
showSelectView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
top_btn_bg_view
.
snp_bottom
)
}
showSelectV
=
showSelectView
showSelectView
.
dataArr
=
[
"全部商品"
,
"不参与分销商品"
,
"参与分销商品"
,
"佣金比例商品"
,
"绝对额比例商品"
]
showSelectView
.
selectIndx
=
selectIndexArr
[
0
]
}
break
case
1
:
do
{
let
showSelectView
=
SelectContentView
()
showSelectView
.
delegate
=
self
self
.
view
.
addSubview
(
showSelectView
)
showSelectView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
top_btn_bg_view
.
snp_bottom
)
}
showSelectV
=
showSelectView
showSelectView
.
dataArr
=
[
"全部"
,
"上架"
,
"下架"
]
showSelectView
.
selectIndx
=
selectIndexArr
[
1
]
}
break
default
:
break
}
}
func
colseAction
(
sender
:
Int
)
{
if
showSelectV
!=
nil
{
showSelectV
.
removeFromSuperview
()
}
}
var
keyword
=
""
func
searchBarSearchButtonClicked
(
_
searchBar
:
UISearchBar
)
{
...
...
@@ -72,9 +137,31 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
@IBOutlet
weak
var
search_view
:
UIView
!
weak
var
searchV
:
SearchBarView
?
=
nil
weak
var
selectV
:
HeaderSelectView
!
=
nil
@IBOutlet
weak
var
top_btn_bg_view
:
UIView
!
@IBOutlet
weak
var
edit_bottom_view_H
:
NSLayoutConstraint
!
func
initHeaderSelectView
()
{
let
selectView
=
HeaderSelectView
()
selectView
.
firstBtn
.
setTitle
(
"全部商品"
,
for
:
.
normal
)
selectView
.
secBtn
.
setTitle
(
"全部"
,
for
:
.
normal
)
selectView
.
thereBtn
.
removeFromSuperview
()
selectView
.
firstBtn
.
snp_makeConstraints
{
(
make
)
in
make
.
left
.
top
.
bottom
.
equalTo
(
0
)
make
.
width
.
equalTo
(
fullScreenWidth
*
0.5
)
}
selectView
.
secBtn
.
snp_makeConstraints
{
(
make
)
in
make
.
right
.
top
.
bottom
.
equalTo
(
0
)
make
.
width
.
equalTo
(
fullScreenWidth
*
0.5
)
}
top_btn_bg_view
.
addSubview
(
selectView
)
selectView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
top
.
right
.
bottom
.
equalTo
(
0
);
}
selectView
.
delegate
=
self
selectV
=
selectView
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -82,6 +169,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
navbar
.
title
=
"分销商品管理"
self
.
view
.
addSubview
(
navbar
)
navbar
.
rightTitle
=
"编辑商品"
let
searchBr
=
SearchBarView
.
init
()
searchV
=
searchBr
searchBr
.
placeholderStr
=
"请输入分销商品名称"
...
...
@@ -96,6 +184,8 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
make
.
height
.
equalTo
(
35
)
}
initHeaderSelectView
()
home_list_tbv
.
register
(
UINib
(
nibName
:
"GYS_FX_ProductCellTableViewCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GYS_FX_ProductCellTableViewCell"
)
home_list_tbv
.
separatorStyle
=
.
none
// Do any additional setup after loading the view.
...
...
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.xib
View file @
9473a865
...
...
@@ -20,6 +20,7 @@
<outlet
property=
"right_arrow_img"
destination=
"Z6Z-hX-dxA"
id=
"cxW-5C-f5A"
/>
<outlet
property=
"right_title"
destination=
"qvp-uj-CDO"
id=
"AWs-ge-IPf"
/>
<outlet
property=
"search_view"
destination=
"PRi-3L-xM8"
id=
"w4D-xa-5mf"
/>
<outlet
property=
"top_btn_bg_view"
destination=
"oxr-Do-FWP"
id=
"2mf-wn-Lfv"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</placeholder>
...
...
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