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
37e01016
Commit
37e01016
authored
May 11, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成新增商品品牌选择操作
parent
7a25e418
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
13 deletions
+101
-13
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.xib
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.xib
+2
-2
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+11
-2
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.swift
...orm/ViewController/新增、编辑品牌/PinPaiListViewController.swift
+48
-5
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.xib
...tform/ViewController/新增、编辑品牌/PinPaiListViewController.xib
+40
-4
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
37e01016
No preview for this file type
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.xib
View file @
37e01016
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6096
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_5"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6086
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
37e01016
...
...
@@ -9,7 +9,7 @@
import
UIKit
import
LGButton
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CommendCellDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
{
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CommendCellDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
{
var
glSelectView
:
GLAlertSelectView
?
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
...
...
@@ -279,7 +279,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
if
cell
.
nameLbl
.
text
==
"品牌"
{
let
vc
=
PinPaiListViewController
()
vc
.
isSelectData
=
true
vc
.
delegate
=
self
vc
.
dataModelArray
=
generalInfoModel
?
.
data
?
.
brand
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
if
cell
.
nameLbl
.
text
==
"国家"
{
...
...
@@ -302,6 +306,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
func
blackGoodsClass
(
sender
:
GoodsClassModel
)
{
print
(
"选择商品分类返回数据=
\(
sender
)
"
)
}
//MARK:--选择品牌返回的数据
func
blackSelectPinPaiData
(
sender
:
GeneralInfoBrandModel
)
{
print
(
"选择品牌返回的数据=
\(
sender
)
"
)
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
UIView
)
{
print
(
"单选"
,
selectNum
)
...
...
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.swift
View file @
37e01016
...
...
@@ -7,16 +7,33 @@
//
import
UIKit
protocol
PinPaiListViewControllerDelegate
{
func
blackSelectPinPaiData
(
sender
:
GeneralInfoBrandModel
)
}
class
PinPaiListViewController
:
BaseViewController
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
{
var
dataModelArray
:
Array
<
GeneralInfoBrandModel
>
?
=
[]
var
isSelectData
:
Bool
=
false
var
delegate
:
PinPaiListViewControllerDelegate
?
@IBOutlet
weak
var
sureTop
:
NSLayoutConstraint
!
@IBOutlet
weak
var
tableBottom
:
NSLayoutConstraint
!
@IBOutlet
weak
var
sureLbl
:
UILabel
!
@IBOutlet
weak
var
sureBtn
:
UIButton
!
@IBOutlet
weak
var
topView
:
UIView
!
@IBOutlet
weak
var
listView
:
UITableView
!
var
searchV
:
SearchBarView
?
=
nil
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
if
isSelectData
{
navbar
.
title
=
"请选择品牌"
tableBottom
.
constant
=
CGFloat
(
TabHeight
)
}
else
{
navbar
.
title
=
"品牌列表"
navbar
.
rightTitle
=
"新增"
sureBtn
.
isHidden
=
true
sureLbl
.
isHidden
=
true
}
self
.
view
.
addSubview
(
navbar
)
SetTopFrame
(
view
:
topView
,
height
:
44
)
listView
.
separatorStyle
=
.
none
...
...
@@ -30,8 +47,8 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
make
.
height
.
equalTo
(
30
)
}
searchV
=
searchBr
searchBr
.
placeholderStr
=
"请输入品牌名称
/商品编码
"
searchBr
.
cornerRadius
=
3
0*0.5
searchBr
.
placeholderStr
=
"请输入品牌名称"
searchBr
.
cornerRadius
=
3
5
/
2.0
searchBr
.
delegate
=
self
searchBr
.
delegateL
=
self
...
...
@@ -55,19 +72,45 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
return
49
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
3
return
dataModelArray
!.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
cell
.
nameLbl
.
text
=
"天地壹号"
let
rowModel
=
dataModelArray
!
[
indexPath
.
row
]
as!
GeneralInfoBrandModel
cell
.
nameLbl
.
text
=
rowModel
.
brand_name
cell
.
contentLbl
.
text
=
""
cell
.
btn
.
isUserInteractionEnabled
=
false
cell
.
selectionStyle
=
.
gray
if
isSelectData
{
cell
.
arrowImg
.
isHidden
=
true
}
return
cell
}
var
selectModel
:
GeneralInfoBrandModel
?
=
nil
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
isSelectData
{
let
rowModel
=
dataModelArray
!
[
indexPath
.
row
]
as!
GeneralInfoBrandModel
selectModel
=
rowModel
}
else
{
let
vc
=
XinZengPinPaiViewController
()
vc
.
navTitle
=
"编辑品牌"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
//MARK:--选择品牌确定按钮
@IBAction
func
sureAction
(
_
sender
:
UIButton
)
{
print
(
"选择品牌确定按钮"
)
if
selectModel
==
nil
{
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
}
else
{
self
.
delegate
?
.
blackSelectPinPaiData
(
sender
:
selectModel
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
}
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.xib
View file @
37e01016
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6096
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"15704"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16086"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
...
...
@@ -10,6 +11,10 @@
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"PinPaiListViewController"
customModule=
"GeliBusinessPlatform"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"listView"
destination=
"u1k-5i-gDO"
id=
"yRs-QD-hlI"
/>
<outlet
property=
"sureBtn"
destination=
"NCX-sh-Sjd"
id=
"sei-VK-VFB"
/>
<outlet
property=
"sureLbl"
destination=
"hKC-0a-Rbu"
id=
"mUo-UU-tAl"
/>
<outlet
property=
"sureTop"
destination=
"bbx-dC-NyU"
id=
"ZSL-nl-UjK"
/>
<outlet
property=
"tableBottom"
destination=
"ZQL-aV-zrz"
id=
"qua-zV-aB1"
/>
<outlet
property=
"topView"
destination=
"8ei-hi-CSb"
id=
"Gf2-pT-Nnu"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
...
...
@@ -27,26 +32,57 @@
</constraints>
</view>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"plain"
separatorStyle=
"default"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"u1k-5i-gDO"
>
<rect
key=
"frame"
x=
"0.0"
y=
"88"
width=
"414"
height=
"
774
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"88"
width=
"414"
height=
"
808
"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<connections>
<outlet
property=
"dataSource"
destination=
"-1"
id=
"wNq-qE-Qfi"
/>
<outlet
property=
"delegate"
destination=
"-1"
id=
"QMP-Ey-BaB"
/>
</connections>
</tableView>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"NCX-sh-Sjd"
>
<rect
key=
"frame"
x=
"0.0"
y=
"813"
width=
"414"
height=
"83"
/>
<color
key=
"backgroundColor"
name=
"蓝色字体颜色"
/>
<connections>
<action
selector=
"sureAction:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"VjW-0R-ltX"
/>
</connections>
</button>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"确定"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hKC-0a-Rbu"
>
<rect
key=
"frame"
x=
"0.0"
y=
"813"
width=
"414"
height=
"49"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"49"
id=
"3jR-nd-S8v"
/>
</constraints>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"17"
/>
<color
key=
"textColor"
name=
"白色背景色"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstItem=
"hKC-0a-Rbu"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"1AY-ep-XjO"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"8ei-hi-CSb"
secondAttribute=
"trailing"
id=
"1sp-OU-PVp"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"u1k-5i-gDO"
secondAttribute=
"trailing"
id=
"ACy-YM-7rO"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"NCX-sh-Sjd"
secondAttribute=
"bottom"
id=
"F4A-Z7-lOO"
/>
<constraint
firstItem=
"NCX-sh-Sjd"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"MaD-5F-xcv"
/>
<constraint
firstItem=
"8ei-hi-CSb"
firstAttribute=
"top"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"top"
id=
"NDo-1d-XVB"
/>
<constraint
firstItem=
"u1k-5i-gDO"
firstAttribute=
"top"
secondItem=
"8ei-hi-CSb"
secondAttribute=
"bottom"
id=
"U4T-vU-Gcn"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"bottom"
secondItem=
"u1k-5i-gDO"
secondAttribute=
"bottom"
id=
"ZQL-aV-zrz"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"NCX-sh-Sjd"
secondAttribute=
"trailing"
id=
"ZFZ-me-fRQ"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"u1k-5i-gDO"
secondAttribute=
"bottom"
id=
"ZQL-aV-zrz"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"bottom"
secondItem=
"hKC-0a-Rbu"
secondAttribute=
"bottom"
id=
"b4l-79-J9K"
/>
<constraint
firstItem=
"8ei-hi-CSb"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"bZk-D7-usz"
/>
<constraint
firstItem=
"NCX-sh-Sjd"
firstAttribute=
"top"
secondItem=
"hKC-0a-Rbu"
secondAttribute=
"top"
id=
"bbx-dC-NyU"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"hKC-0a-Rbu"
secondAttribute=
"trailing"
id=
"kIM-sr-htj"
/>
<constraint
firstItem=
"u1k-5i-gDO"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"tyP-du-bhA"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"fnl-2z-Ty3"
/>
<point
key=
"canvasLocation"
x=
"133"
y=
"132"
/>
</view>
</objects>
<resources>
<namedColor
name=
"白色背景色"
>
<color
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27799999713897705"
green=
"0.56099998950958252"
blue=
"0.88999998569488525"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
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