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
e665c46f
Commit
e665c46f
authored
May 20, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增完善
parent
0bb33a17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
79 deletions
+92
-79
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
...inessPlatform/ViewController/商品管理/GoodsManageListVC.swift
+7
-1
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+85
-78
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e665c46f
No preview for this file type
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
View file @
e665c46f
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
import
UIKit
import
UIKit
import
ViewAnimator
import
ViewAnimator
class
GoodsManageListVC
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
HeaderSelectViewDelegate
,
SelectContentViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GoodsCollectionViewCellDelegate
{
class
GoodsManageListVC
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
HeaderSelectViewDelegate
,
SelectContentViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GoodsCollectionViewCellDelegate
,
ProductDetailViewControllerDelegate
{
var
collection
:
UICollectionView
?
=
nil
var
collection
:
UICollectionView
?
=
nil
var
layout
=
UICollectionViewFlowLayout
()
var
layout
=
UICollectionViewFlowLayout
()
...
@@ -257,8 +257,14 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
...
@@ -257,8 +257,14 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
}
let
vc
=
ProductDetailViewController
()
let
vc
=
ProductDetailViewController
()
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
//MARK:--新增回调刷新
func
reloadDataByProductDetailViewController
()
{
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
}
}
//MARK:--下拉视图模块
//MARK:--下拉视图模块
func
showAction
(
sender
:
Int
)
{
func
showAction
(
sender
:
Int
)
{
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
e665c46f
...
@@ -12,7 +12,13 @@ import Photos
...
@@ -12,7 +12,13 @@ import Photos
import
IQKeyboardManagerSwift
import
IQKeyboardManagerSwift
import
Dollar
import
Dollar
protocol
ProductDetailViewControllerDelegate
{
func
reloadDataByProductDetailViewController
()
}
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
,
TitleAndTFCellDelegate
,
YuShouWeiKuanFaHuoCellDelegate
,
UITextFieldDelegate
,
ShowTimeSelectViewDelegate
{
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
,
TitleAndTFCellDelegate
,
YuShouWeiKuanFaHuoCellDelegate
,
UITextFieldDelegate
,
ShowTimeSelectViewDelegate
{
var
delegate
:
ProductDetailViewControllerDelegate
?
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
if
view
.
titleLbl
.
text
==
"请选择商品类型"
{
if
view
.
titleLbl
.
text
==
"请选择商品类型"
{
print
(
itemTypeArr
,
selectArr
)
print
(
itemTypeArr
,
selectArr
)
...
@@ -78,80 +84,80 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -78,80 +84,80 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
//MARK:--保存按钮
//MARK:--保存按钮
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
print
(
"保存按钮submitAction"
)
print
(
"保存按钮submitAction"
)
print
(
itemTypeArr
)
//商品类型
//
print(itemTypeArr)//商品类型
// print(guiGeArr)//商品规格
// print(guiGeArr)//商品规格
//
if itemName.count == 0 {
if
itemName
.
count
==
0
{
//
HUD.flash(.label("请输入商品名称"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请输入商品名称"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if itemTypeArr == [] || itemTypeArr == [99,99,99,99] {
if
itemTypeArr
==
[]
||
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
//
HUD.flash(.label("请选择商品类型"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
//
return
return
//
}
}
//
//待补充
//待补充
//
if itemName.count == 0 {
if
itemName
.
count
==
0
{
//
HUD.flash(.label("请输入商品名称"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请输入商品名称"
),
delay
:
1.2
)
//
return
return
//
}
}
//
//
if itemTypeArr == [99,99,99,99] {
if
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
//
HUD.flash(.label("请选择商品类型"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if selectGoodsClassModel == nil {
if
selectGoodsClassModel
==
nil
{
//
HUD.flash(.label("请选择商品分类"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择商品分类"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if selectPinPaiData == nil {
if
selectPinPaiData
==
nil
{
//
HUD.flash(.label("请选择品牌"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if qiMaiShuLiang.count == 0 {
if
qiMaiShuLiang
.
count
==
0
{
//
HUD.flash(.label("请输入起卖数量"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请输入起卖数量"
),
delay
:
1.2
)
//
return
return
//
}
}
//
//
if singleImgArr.count == 0 {
if
singleImgArr
.
count
==
0
{
//
HUD.flash(.label("请选择商品封面图"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
//
return
return
//
}
}
//
//
if maxFiveImgsArr.count == 0 {
if
maxFiveImgsArr
.
count
==
0
{
//
HUD.flash(.label("请选择商品主图"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择商品主图"
),
delay
:
1.2
)
//
return
return
//
}
}
//
//
if guiGeArr.count == 0 {
if
guiGeArr
.
count
==
0
{
//
HUD.flash(.label("请填写商品规格"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请填写商品规格"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if isYuShouShangPin! {
if
isYuShouShangPin
!
{
//
if faHuoTime.count == 0 {
if
faHuoTime
.
count
==
0
{
//
HUD.flash(.label("请输入尾款发货时间"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请输入尾款发货时间"
),
delay
:
1.2
)
//
return
return
//
}
}
//
}
}
//
if keyWord.count == 0 {
if
keyWord
.
count
==
0
{
//
HUD.flash(.label("请输入关键字"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请输入关键字"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if wuLiuPrice.count == 0 {
if
wuLiuPrice
.
count
==
0
{
//
HUD.flash(.label("请输入物流费用"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请输入物流费用"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if countrySelect == nil {
if
countrySelect
==
nil
{
//
HUD.flash(.label("请选择国家"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择国家"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if shangPinStatus == nil {
if
shangPinStatus
==
nil
{
//
HUD.flash(.label("请选择商品状态"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择商品状态"
),
delay
:
1.2
)
//
return
return
//
}
}
//
//
if yunShuType == nil {
if
yunShuType
==
nil
{
//
HUD.flash(.label("请选择运输方式"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择运输方式"
),
delay
:
1.2
)
//
return
return
//
}
}
//MARK:---新增商品接口
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
@@ -251,11 +257,12 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -251,11 +257,12 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
"sku_info"
:
sku_info
as
Any
]
"sku_info"
:
sku_info
as
Any
]
print
(
dic
)
print
(
dic
)
//MARK:--新增商品接口
//MARK:--新增商品接口
// goodsAdd(dic, success: { (data) in
goodsAdd
(
dic
,
success
:
{
(
data
)
in
//
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
// }) { (error) in
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
//
})
{
(
error
)
in
// }
}
}
}
@IBOutlet
weak
var
submitBtn
:
LGButton
!
@IBOutlet
weak
var
submitBtn
:
LGButton
!
...
...
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