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
5251ce27
Commit
5251ce27
authored
May 26, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑完成后回调刷新方法
parent
2160b655
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
5 deletions
+21
-5
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/AddImgCell.swift
GeliBusinessPlatform/View/Cell/AddImgCell.swift
+2
-0
GeliBusinessPlatform/View/Cell/AddImgCell.xib
GeliBusinessPlatform/View/Cell/AddImgCell.xib
+1
-1
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
...inessPlatform/ViewController/商品管理/GoodsManageListVC.swift
+8
-1
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+10
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
5251ce27
No preview for this file type
GeliBusinessPlatform/View/Cell/AddImgCell.swift
View file @
5251ce27
...
@@ -21,6 +21,7 @@ class AddImgCell: UITableViewCell {
...
@@ -21,6 +21,7 @@ class AddImgCell: UITableViewCell {
willSet
{
willSet
{
isEdit
=
newValue
isEdit
=
newValue
addBtn
.
isHidden
=
!
isEdit
!
addBtn
.
isHidden
=
!
isEdit
!
}
}
}
}
@IBAction
func
btnClick
(
_
sender
:
Any
)
{
@IBAction
func
btnClick
(
_
sender
:
Any
)
{
...
@@ -98,6 +99,7 @@ class AddImgCell: UITableViewCell {
...
@@ -98,6 +99,7 @@ class AddImgCell: UITableViewCell {
make
.
left
.
equalTo
(
105*
i
)
make
.
left
.
equalTo
(
105*
i
)
}
}
if
isAllEditing
{
if
isAllEditing
{
let
changeBtn
=
UIButton
()
let
changeBtn
=
UIButton
()
changeBtn
.
tag
=
i
changeBtn
.
tag
=
i
...
...
GeliBusinessPlatform/View/Cell/AddImgCell.xib
View file @
5251ce27
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<objects>
<objects>
<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=
"AddImgCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"AddImgCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"148.5"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"148.5"
/>
<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"
>
...
...
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
View file @
5251ce27
...
@@ -9,7 +9,9 @@
...
@@ -9,7 +9,9 @@
import
UIKit
import
UIKit
import
ViewAnimator
import
ViewAnimator
class
GoodsManageListVC
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
HeaderSelectViewDelegate
,
SelectContentViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GoodsCollectionViewCellDelegate
,
ProductDetailViewControllerDelegate
,
GeliAlertViewDelegate
{
class
GoodsManageListVC
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
HeaderSelectViewDelegate
,
SelectContentViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GoodsCollectionViewCellDelegate
,
ProductDetailViewControllerDelegate
,
GeliAlertViewDelegate
,
EPViewControllerDelegate
{
var
collection
:
UICollectionView
?
=
nil
var
collection
:
UICollectionView
?
=
nil
var
layout
=
UICollectionViewFlowLayout
()
var
layout
=
UICollectionViewFlowLayout
()
...
@@ -262,6 +264,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
...
@@ -262,6 +264,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
}
//MARK:--新增回调刷新
//MARK:--新增回调刷新
func
EPViewControllerFinishEdit
()
{
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
}
func
reloadDataByProductDetailViewController
()
{
func
reloadDataByProductDetailViewController
()
{
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
...
@@ -418,6 +423,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
...
@@ -418,6 +423,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
print
(
"选中===
\(
indexPath
)
"
)
print
(
"选中===
\(
indexPath
)
"
)
let
item
=
collection
?
.
cellForItem
(
at
:
indexPath
)
as!
GoodsCollectionViewCell
let
item
=
collection
?
.
cellForItem
(
at
:
indexPath
)
as!
GoodsCollectionViewCell
let
vc
=
EPViewController
()
let
vc
=
EPViewController
()
vc
.
delegate
=
self
vc
.
titleStrArr
=
[
item
.
leftBtn
.
titleLabel
!.
text
!
,
item
.
rightBtn
.
titleLabel
!.
text
!
]
vc
.
titleStrArr
=
[
item
.
leftBtn
.
titleLabel
!.
text
!
,
item
.
rightBtn
.
titleLabel
!.
text
!
]
let
data
=
items
[
indexPath
.
row
]
let
data
=
items
[
indexPath
.
row
]
vc
.
goods_id
=
data
.
goods_id
vc
.
goods_id
=
data
.
goods_id
...
@@ -430,6 +436,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
...
@@ -430,6 +436,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
let
item
=
collection
?
.
cellForItem
(
at
:
idx
)
as!
GoodsCollectionViewCell
let
item
=
collection
?
.
cellForItem
(
at
:
idx
)
as!
GoodsCollectionViewCell
let
vc
=
EPViewController
()
let
vc
=
EPViewController
()
vc
.
delegate
=
self
vc
.
titleStrArr
=
[
item
.
leftBtn
.
titleLabel
!.
text
!
,
item
.
rightBtn
.
titleLabel
!.
text
!
]
vc
.
titleStrArr
=
[
item
.
leftBtn
.
titleLabel
!.
text
!
,
item
.
rightBtn
.
titleLabel
!.
text
!
]
let
data
=
items
[
index
]
let
data
=
items
[
index
]
vc
.
goods_id
=
data
.
goods_id
vc
.
goods_id
=
data
.
goods_id
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
5251ce27
...
@@ -12,11 +12,13 @@ import Photos
...
@@ -12,11 +12,13 @@ import Photos
import
IQKeyboardManagerSwift
import
IQKeyboardManagerSwift
import
Dollar
import
Dollar
protocol
EPViewControllerDelegate
{
func
EPViewControllerFinishEdit
()
}
class
EPViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
,
TitleAndTFCellDelegate
,
YuShouWeiKuanFaHuoCellDelegate
,
UITextFieldDelegate
,
ShowTimeSelectViewDelegate
,
LMNoteViewControllerDelegate
,
GeliAlertViewDelegate
{
class
EPViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
,
TitleAndTFCellDelegate
,
YuShouWeiKuanFaHuoCellDelegate
,
UITextFieldDelegate
,
ShowTimeSelectViewDelegate
,
LMNoteViewControllerDelegate
,
GeliAlertViewDelegate
{
var
delegate
:
EPViewControllerDelegate
?
@IBOutlet
weak
var
btmBtnViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
btmBtnViewH
:
NSLayoutConstraint
!
...
@@ -216,6 +218,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -216,6 +218,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
self
.
editBtn
!.
setTitle
(
"编辑"
,
for
:
.
normal
)
self
.
editBtn
!.
setTitle
(
"编辑"
,
for
:
.
normal
)
self
.
isAllEditing
=
false
self
.
isAllEditing
=
false
self
.
listTbv
.
reloadData
()
self
.
listTbv
.
reloadData
()
self
.
delegate
?
.
EPViewControllerFinishEdit
()
})
{
(
error
)
in
})
{
(
error
)
in
}
}
...
@@ -691,7 +694,11 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -691,7 +694,11 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddImg"
)
as!
AddImgCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddImg"
)
as!
AddImgCell
cell
.
addBtn
.
isUserInteractionEnabled
=
isAllEditing
cell
.
addBtn
.
isUserInteractionEnabled
=
isAllEditing
cell
.
isAllEditing
=
isAllEditing
cell
.
isAllEditing
=
isAllEditing
cell
.
addBtn
.
isHidden
=
!
isAllEditing
if
isAllEditing
{
cell
.
addBtn
.
isHidden
=
false
}
else
{
cell
.
addBtn
.
isHidden
=
true
}
cell
.
nameLbl
.
text
=
sptpArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
sptpArr
[
indexPath
.
row
]
if
indexPath
.
row
==
0
{
if
indexPath
.
row
==
0
{
cell
.
isSingle
=
true
cell
.
isSingle
=
true
...
...
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