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
429a0789
Commit
429a0789
authored
May 26, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单详情,个人中心,支付,商品管理流程完善中
parent
d62a8206
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
473 additions
and
325 deletions
+473
-325
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/CollectionCell/GoodsCollectionViewCell.swift
...latform/View/CollectionCell/GoodsCollectionViewCell.swift
+1
-1
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.swift
...form/ViewController/个人中心/PersonCenterViewController.swift
+1
-1
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+29
-12
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
...inessPlatform/ViewController/商品管理/GoodsManageListVC.swift
+48
-23
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+146
-111
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+107
-98
GeliBusinessPlatform/ViewController/商家信息/ShopInfoViewController.swift
...Platform/ViewController/商家信息/ShopInfoViewController.swift
+1
-1
GeliBusinessPlatform/ViewController/换绑支付账号(绑定,换绑)/BindViewController.swift
...orm/ViewController/换绑支付账号(绑定,换绑)/BindViewController.swift
+34
-2
GeliBusinessPlatform/ViewController/换绑支付账号(绑定,换绑)/BindViewController.xib
...tform/ViewController/换绑支付账号(绑定,换绑)/BindViewController.xib
+5
-5
GeliBusinessPlatform/ViewController/订单管理/查看全部/ShowAlGoodsViewController.swift
.../ViewController/订单管理/查看全部/ShowAlGoodsViewController.swift
+1
-0
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+95
-69
GeliBusinessPlatform/ViewController/账号信息/AccountViewController.swift
...sPlatform/ViewController/账号信息/AccountViewController.swift
+5
-2
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
429a0789
No preview for this file type
GeliBusinessPlatform/View/CollectionCell/GoodsCollectionViewCell.swift
View file @
429a0789
...
...
@@ -48,6 +48,6 @@ class GoodsCollectionViewCell: UICollectionViewCell {
}
@IBAction
func
codeAction
(
_
sender
:
UIButton
)
{
print
(
"点击二维码按钮
\(
sender
.
tag
)
"
)
HUD
.
flash
(
.
label
(
"分享功能开发中"
),
delay
:
1.2
)
}
}
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.swift
View file @
429a0789
...
...
@@ -25,7 +25,7 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
adminInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
self
.
dataModel
=
(
data
as!
AdminInfoModel
)
// self.iconImg.kf.
setImage(with: URL(string: SERVERCE_ImageHost + (self.dataModel?.data?.shop_img)!))
self
.
iconImg
.
sd_
setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
(
self
.
dataModel
?
.
data
?
.
shop_img
)
!
))
self
.
shopNameLbl
.
text
=
self
.
dataModel
?
.
data
?
.
stall_name
self
.
nameLbl
.
text
=
self
.
dataModel
?
.
data
?
.
admin_name
})
{
(
error
)
in
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
429a0789
...
...
@@ -9,7 +9,7 @@
import
UIKit
import
IQKeyboardManagerSwift
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
DZGLViewControllerDelegate
,
XuanZeShangPinViewControllerDelegate
,
DaiKeXiaDanGouWuCellDelegate
,
GuanLianKehuVCDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
TitleAndTFCellDelegate
{
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
DZGLViewControllerDelegate
,
XuanZeShangPinViewControllerDelegate
,
DaiKeXiaDanGouWuCellDelegate
,
GuanLianKehuVCDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
{
let
ddTypeArr
=
[
"普通订单"
,
"预售下单"
]
let
zfTypeArr
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
...
...
@@ -89,17 +89,34 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
"goods_info"
:
goods_info
as
Any
,
"order_info"
:
order_info
as
Any
]
as
[
String
:
Any
]
print
(
order
)
// HUD.flash(.progress)
// addOrder(order, success: { (data) in
// let dataM = data as! UpDataModel
// if dataM.code == 1 {
// HUD.flash(.label("提交成功"), delay: 1.2)
// }else{
// HUD.hide()
// }
// }) { (error) in
//
// }
orderData
=
order
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否立即下单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
var
orderData
:[
String
:
Any
]?
=
nil
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
HUD
.
flash
(
.
progress
)
addOrder
(
orderData
!
,
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
label
(
"提交成功"
),
delay
:
1.2
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
HUD
.
hide
()
}
})
{
(
error
)
in
}
}
}
override
func
viewDidLoad
()
{
...
...
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
View file @
429a0789
...
...
@@ -9,7 +9,7 @@
import
UIKit
import
ViewAnimator
class
GoodsManageListVC
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
HeaderSelectViewDelegate
,
SelectContentViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GoodsCollectionViewCellDelegate
,
ProductDetailViewControllerDelegate
{
class
GoodsManageListVC
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
HeaderSelectViewDelegate
,
SelectContentViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GoodsCollectionViewCellDelegate
,
ProductDetailViewControllerDelegate
,
GeliAlertViewDelegate
{
var
collection
:
UICollectionView
?
=
nil
var
layout
=
UICollectionViewFlowLayout
()
...
...
@@ -430,9 +430,39 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
//MARK:-- cell delegate 上下架,入库
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
changeGoodsResModel
!.
goods_id
as
Any
,
"value"
:
0
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
label
(
"提交成功"
),
delay
:
1.2
)
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
}
})
{
(
erro
)
in
}
}
else
if
sender
.
tag
==
1002
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
changeGoodsResModel
!.
goods_id
as
Any
,
"value"
:
1
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
label
(
"提交成功"
),
delay
:
1.2
)
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
}
})
{
(
erro
)
in
}
}
}
var
changeGoodsResModel
:
GoodsResModel
?
=
nil
func
changeGoodsIsShow
(
isTrue
:
Bool
,
byIndex
:
Int
)
{
//左按钮为false 右按钮为true
let
rowModel
=
self
.
items
[
byIndex
]
changeGoodsResModel
=
rowModel
//添加提示
if
rowModel
.
is_show
==
1
{
if
isTrue
{
...
...
@@ -442,32 +472,27 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
print
(
"下架啦"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
rowModel
.
goods_id
as
Any
,
"value"
:
0
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
label
(
"提交成功"
),
delay
:
1.2
)
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
}
})
{
(
erro
)
in
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否下架商品?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
}
else
{
if
isTrue
{
print
(
"赶紧上架"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
rowModel
.
goods_id
as
Any
,
"value"
:
1
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
label
(
"提交成功"
),
delay
:
1.2
)
self
.
collection
?
.
mj_header
?
.
beginRefreshing
()
}
})
{
(
erro
)
in
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否上架商品?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1002
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
else
{
print
(
"入库哦哦"
)
let
vc
=
RuKuViewController
()
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
429a0789
...
...
@@ -97,19 +97,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var
isAllEditing
=
false
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
}
@objc
func
btmBtnClick
(
sender
:
UIButton
){
switch
sender
.
titleLabel
!.
text
{
case
"编辑"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认编辑订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
self
.
view
.
window
?
.
addSubview
(
alertView
)
///XXXXX
if
sender
.
tag
==
1001
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
GeneralInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
...
...
@@ -121,84 +109,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
})
{
(
error
)
in
}
break
case
"保存"
:
print
(
"保存按钮submitAction"
)
if
itemName
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入商品名称"
),
delay
:
1.2
)
return
}
if
itemTypeArr
==
[]
||
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
return
}
//待补充
if
itemName
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入商品名称"
),
delay
:
1.2
)
return
}
if
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
return
}
if
selectGoodsClassModel
.
cat_id
==
nil
{
HUD
.
flash
(
.
label
(
"请选择商品分类"
),
delay
:
1.2
)
return
}
if
pinPai
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
return
}
if
qiMaiShuLiang
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入起卖数量"
),
delay
:
1.2
)
return
}
if
singleImgArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
return
}
if
maxFiveImgsArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品主图"
),
delay
:
1.2
)
return
}
//
if
guiGeArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写商品规格"
),
delay
:
1.2
)
return
}
if
isYuShouShangPin
!
{
if
faHuoTime
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入尾款发货时间"
),
delay
:
1.2
)
return
}
}
if
keyWord
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入关键字"
),
delay
:
1.2
)
return
}
if
wuLiuPrice
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入物流费用"
),
delay
:
1.2
)
return
}
if
countrySelect
==
nil
{
HUD
.
flash
(
.
label
(
"请选择国家"
),
delay
:
1.2
)
return
}
if
shangPinStatus
==
nil
{
HUD
.
flash
(
.
label
(
"请选择商品状态"
),
delay
:
1.2
)
return
}
if
yunShuType
==
nil
{
HUD
.
flash
(
.
label
(
"请选择运输方式"
),
delay
:
1.2
)
return
}
}
else
if
sender
.
tag
==
1002
{
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
...
@@ -222,7 +133,6 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
var
is_qz
=
0
if
shiFouQZ
{
is_qz
=
1
...
...
@@ -305,18 +215,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
})
{
(
error
)
in
}
break
case
"入库"
:
let
vc
=
RuKuViewController
()
vc
.
barTitle
=
"入库"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
"出库"
:
let
vc
=
ChuKuViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
"上架"
:
//提示是否上架
}
else
if
sender
.
tag
==
1003
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
goods_id
as
Any
,
"value"
:
1
,],
success
:
{
(
data
)
in
...
...
@@ -328,10 +227,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
})
{
(
erro
)
in
}
break
case
"下架"
:
//提示是否下架
}
else
if
sender
.
tag
==
1004
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
goods_id
as
Any
,
"value"
:
0
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
...
...
@@ -343,9 +239,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
})
{
(
erro
)
in
}
break
case
"删除"
:
//提示是否删除
}
else
if
sender
.
tag
==
1005
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"16"
,
"prval"
:
goods_id
as
Any
,
"value"
:
1
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
...
...
@@ -356,6 +250,147 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
})
{
(
erro
)
in
}
}
}
@objc
func
btmBtnClick
(
sender
:
UIButton
){
switch
sender
.
titleLabel
!.
text
{
case
"编辑"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否打开编辑?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"保存"
:
print
(
"保存按钮submitAction"
)
if
itemName
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入商品名称"
),
delay
:
1.2
)
return
}
if
itemTypeArr
==
[]
||
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
return
}
//待补充
if
itemName
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入商品名称"
),
delay
:
1.2
)
return
}
if
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
return
}
if
selectGoodsClassModel
.
cat_id
==
nil
{
HUD
.
flash
(
.
label
(
"请选择商品分类"
),
delay
:
1.2
)
return
}
if
pinPai
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
return
}
if
qiMaiShuLiang
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入起卖数量"
),
delay
:
1.2
)
return
}
if
singleImgArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
return
}
if
maxFiveImgsArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品主图"
),
delay
:
1.2
)
return
}
//
if
guiGeArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写商品规格"
),
delay
:
1.2
)
return
}
if
isYuShouShangPin
!
{
if
faHuoTime
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入尾款发货时间"
),
delay
:
1.2
)
return
}
}
if
keyWord
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入关键字"
),
delay
:
1.2
)
return
}
if
wuLiuPrice
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入物流费用"
),
delay
:
1.2
)
return
}
if
countrySelect
==
nil
{
HUD
.
flash
(
.
label
(
"请选择国家"
),
delay
:
1.2
)
return
}
if
shangPinStatus
==
nil
{
HUD
.
flash
(
.
label
(
"请选择商品状态"
),
delay
:
1.2
)
return
}
if
yunShuType
==
nil
{
HUD
.
flash
(
.
label
(
"请选择运输方式"
),
delay
:
1.2
)
return
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否保存编辑?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1002
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"入库"
:
let
vc
=
RuKuViewController
()
vc
.
barTitle
=
"入库"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
"出库"
:
let
vc
=
ChuKuViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
"上架"
:
//提示是否上架
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否上架商品?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1003
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"下架"
:
//提示是否下架
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否下架商品?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1004
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"删除"
:
//提示是否删除
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否删除商品?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1005
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
default
:
break
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
429a0789
...
...
@@ -16,7 +16,7 @@ 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
,
LMNoteViewControllerDelegate
{
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
,
TitleAndTFCellDelegate
,
YuShouWeiKuanFaHuoCellDelegate
,
UITextFieldDelegate
,
ShowTimeSelectViewDelegate
,
LMNoteViewControllerDelegate
,
GeliAlertViewDelegate
{
var
delegate
:
ProductDetailViewControllerDelegate
?
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
...
...
@@ -136,112 +136,123 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
HUD
.
flash
(
.
label
(
"请选择运输方式"
),
delay
:
1.2
)
return
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否提交商品?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
goods_type
=
""
for
i
in
1
..<
itemTypeArr
!.
count
{
let
num
=
itemTypeArr
!
[
i
]
if
num
!=
99
{
switch
i
{
case
1
:
goods_type
=
"1"
break
case
2
:
goods_type
=
"3"
break
case
3
:
goods_type
=
"4"
break
default
:
break
}
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
goods_type
=
""
for
i
in
1
..<
itemTypeArr
!.
count
{
let
num
=
itemTypeArr
!
[
i
]
if
num
!=
99
{
switch
i
{
case
1
:
goods_type
=
"1"
break
case
2
:
goods_type
=
"3"
break
case
3
:
goods_type
=
"4"
break
default
:
break
}
}
}
}
var
is_qz
=
0
if
shiFouQZ
{
is_qz
=
1
}
var
is_inquiry
=
0
if
shiFouXJ
{
is_inquiry
=
1
}
var
is_adsale
=
0
var
need_check
=
0
var
is_qz
=
0
if
shiFouQZ
{
is_qz
=
1
}
var
is_inquiry
=
0
if
shiFouXJ
{
is_inquiry
=
1
}
var
is_adsale
=
0
var
need_check
=
0
if
isYuShouShangPin
!
{
is_adsale
=
1
if
shiFouSH
{
need_check
=
1
if
isYuShouShangPin
!
{
is_adsale
=
1
if
shiFouSH
{
need_check
=
1
}
}
else
{
faHuoTime
=
""
dj_time_start
=
0
dj_time_end
=
0
wk_time_start
=
0
wk_time_end
=
0
}
}
else
{
faHuoTime
=
""
dj_time_start
=
0
dj_time_end
=
0
wk_time_start
=
0
wk_time_end
=
0
}
var
gs_id
=
1
if
self
.
shangPinStatusArr
!.
count
>
0
{
let
model
=
self
.
shangPinStatusArr
!
[
shangPinStatus
!
]
gs_id
=
model
.
gs_id
!
}
var
gs_id
=
1
if
self
.
shangPinStatusArr
!.
count
>
0
{
let
model
=
self
.
shangPinStatusArr
!
[
shangPinStatus
!
]
gs_id
=
model
.
gs_id
!
}
let
transportation
=
yunShuType
!
+
1
var
lastGoodsBanner
:
Array
<
String
>
=
[]
self
.
goods_banner
?
.
forEach
({
(
str
)
in
if
str
.
count
>
0
{
lastGoodsBanner
.
append
(
str
)
let
transportation
=
yunShuType
!
+
1
var
lastGoodsBanner
:
Array
<
String
>
=
[]
self
.
goods_banner
?
.
forEach
({
(
str
)
in
if
str
.
count
>
0
{
lastGoodsBanner
.
append
(
str
)
}
})
var
goods_bannerStr
:
String
=
""
if
lastGoodsBanner
.
count
>
0
{
goods_bannerStr
=
dataChangeString
(
sender
:
lastGoodsBanner
)
}
})
var
goods_bannerStr
:
String
=
""
if
lastGoodsBanner
.
count
>
0
{
goods_bannerStr
=
dataChangeString
(
sender
:
lastGoodsBanner
)
}
getUpSkuInfoByData
(
dataArr
:
guiGeArr
)
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
//验证token
"cat_id"
:
selectGoodsClassModel
?
.
cat_id
as
Any
,
//分类ID
"brand_id"
:
selectPinPaiData
?
.
brand_id
as
Any
,
// 品牌ID
"goods_name"
:
itemName
,
//商品名称
"is_qz"
:
is_qz
as
Any
,
//是否清真商品,1是0非
"goods_type"
:
goods_type
,
//商品类型,普通2现货3期货4团购
"is_adsale"
:
is_adsale
as
Any
,
//商品类型字段,预售专用,选定”预售”则值为1,否则值为0
"is_inquiry"
:
is_inquiry
as
Any
,
//是否询价:1是0非
"origin_number"
:
qiMaiShuLiang
as
Any
,
//起购数量
"need_check"
:
need_check
as
Any
,
//付款是否需要审核, 1是0非
"dj_time_start"
:
dj_time_start
as
Any
,
//预设预付定金开始时间,时间戳,预售专用
"dj_time_end"
:
dj_time_end
as
Any
,
//预设预付定金结束时间,时间戳,预售专用
"wk_time_start"
:
wk_time_start
as
Any
,
//预设预付尾款开始时间,时间戳,预售专用
"wk_time_end"
:
wk_time_end
as
Any
,
//预设预付尾款结束时间,时间戳,预售专用
"set_time"
:
faHuoTime
as
Any
,
//预付尾款后几天后发货
"keywords"
:
keyWord
as
Any
,
//关键字
"logistics"
:
wuLiuPrice
as
Any
,
//物流费用
"coun_id"
:
"1"
,
//国家id 1(中国)
"gs_id"
:
gs_id
as
Any
,
//商品状态
"transportation"
:
transportation
as
Any
,
//运输方式,1冷链,2常温,3热链
"goods_desc"
:
goodsDesc
as
Any
,
//商品详情 html p标签
"specifications"
:
specifications
as
Any
,
//默认规格,选sku中最低价格(需判定阶梯价)的 规格值
"shop_price"
:
shop_price
as
Any
,
//默认售价,选sku中最低价格(需判定阶梯价)的价格
"goods_unit"
:
goods_unit
as
Any
,
//默认商品单位,选sku中最低价格(需判定阶梯价)的单位
"original_img"
:
original_img
as
Any
,
//商品封面图
"goods_banner"
:
goods_bannerStr
as
Any
,
//商品副图,多张,最多5张,使用一维数组转json格式
"sku_info"
:
sku_info
as
Any
]
print
(
dic
)
//MARK:--新增商品接口
goodsAdd
(
dic
,
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
getUpSkuInfoByData
(
dataArr
:
guiGeArr
)
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
//验证token
"cat_id"
:
selectGoodsClassModel
?
.
cat_id
as
Any
,
//分类ID
"brand_id"
:
selectPinPaiData
?
.
brand_id
as
Any
,
// 品牌ID
"goods_name"
:
itemName
,
//商品名称
"is_qz"
:
is_qz
as
Any
,
//是否清真商品,1是0非
"goods_type"
:
goods_type
,
//商品类型,普通2现货3期货4团购
"is_adsale"
:
is_adsale
as
Any
,
//商品类型字段,预售专用,选定”预售”则值为1,否则值为0
"is_inquiry"
:
is_inquiry
as
Any
,
//是否询价:1是0非
"origin_number"
:
qiMaiShuLiang
as
Any
,
//起购数量
"need_check"
:
need_check
as
Any
,
//付款是否需要审核, 1是0非
"dj_time_start"
:
dj_time_start
as
Any
,
//预设预付定金开始时间,时间戳,预售专用
"dj_time_end"
:
dj_time_end
as
Any
,
//预设预付定金结束时间,时间戳,预售专用
"wk_time_start"
:
wk_time_start
as
Any
,
//预设预付尾款开始时间,时间戳,预售专用
"wk_time_end"
:
wk_time_end
as
Any
,
//预设预付尾款结束时间,时间戳,预售专用
"set_time"
:
faHuoTime
as
Any
,
//预付尾款后几天后发货
"keywords"
:
keyWord
as
Any
,
//关键字
"logistics"
:
wuLiuPrice
as
Any
,
//物流费用
"coun_id"
:
"1"
,
//国家id 1(中国)
"gs_id"
:
gs_id
as
Any
,
//商品状态
"transportation"
:
transportation
as
Any
,
//运输方式,1冷链,2常温,3热链
"goods_desc"
:
goodsDesc
as
Any
,
//商品详情 html p标签
"specifications"
:
specifications
as
Any
,
//默认规格,选sku中最低价格(需判定阶梯价)的 规格值
"shop_price"
:
shop_price
as
Any
,
//默认售价,选sku中最低价格(需判定阶梯价)的价格
"goods_unit"
:
goods_unit
as
Any
,
//默认商品单位,选sku中最低价格(需判定阶梯价)的单位
"original_img"
:
original_img
as
Any
,
//商品封面图
"goods_banner"
:
goods_bannerStr
as
Any
,
//商品副图,多张,最多5张,使用一维数组转json格式
"sku_info"
:
sku_info
as
Any
]
print
(
dic
)
//MARK:--新增商品接口
goodsAdd
(
dic
,
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
}
}
}
@IBOutlet
weak
var
submitBtn
:
LGButton
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
...
...
@@ -475,8 +486,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
let
vc
=
LMNoteViewController
()
vc
.
htmlStr
=
goodsDesc
;
vc
.
delegatedata
=
self
...
...
GeliBusinessPlatform/ViewController/商家信息/ShopInfoViewController.swift
View file @
429a0789
...
...
@@ -39,7 +39,7 @@ class ShopInfoViewController: BaseViewController {
//MARK:--需要计算高度,也可以根据行数确定
self
.
compInfoLbl
.
text
=
self
.
dataModel
?
.
data
?
.
shop_intro
print
(
"简介
\(
self
.
compInfoLbl
.
numberOfLines
)
"
)
self
.
scrollHeight
.
constant
=
950*
glscale
+
CGFloat
(
self
.
compInfoLbl
.
numberOfLines
)
*
15*
glscale
self
.
scrollHeight
.
constant
=
1031
+
CGFloat
(
self
.
compInfoLbl
.
numberOfLines
)
*
15*
glscale
self
.
stallNameLbl
.
text
=
self
.
dataModel
?
.
data
?
.
stall_name
self
.
accoutLbl
.
text
=
self
.
dataModel
?
.
data
?
.
contacts_name
self
.
emailLbl
.
text
=
self
.
dataModel
?
.
data
?
.
shop_email
...
...
GeliBusinessPlatform/ViewController/换绑支付账号(绑定,换绑)/BindViewController.swift
View file @
429a0789
...
...
@@ -9,7 +9,7 @@
import
UIKit
import
LGButton
class
BindViewController
:
BaseViewController
{
class
BindViewController
:
BaseViewController
,
GeliAlertViewDelegate
{
@IBOutlet
weak
var
submitBtn
:
LGButton
!
@IBOutlet
weak
var
accountTF
:
UITextField
!
...
...
@@ -83,6 +83,38 @@ class BindViewController: BaseViewController {
@IBAction
func
submitBindingAction
(
_
sender
:
Any
)
{
print
(
"确认绑定账号"
)
if
accountTF
.
text
?
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写换绑的格利支付账号"
),
delay
:
1.2
)
return
}
if
codeTF
.
text
?
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写验证码"
),
delay
:
1.2
)
return
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"确定更绑格利支付账号?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
bindGeliPay
([
"user_token"
:
UserToken
as
Any
,
"geli_pay_user"
:
accountTF
.
text
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
label
(
"修改成功"
),
delay
:
1.2
)
self
.
navigationController
?
.
popToRootViewController
(
animated
:
true
)
}
else
{
HUD
.
hide
()
}
})
{
(
error
)
in
}
}
}
}
GeliBusinessPlatform/ViewController/换绑支付账号(绑定,换绑)/BindViewController.xib
View file @
429a0789
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1609
6
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1609
7
"
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=
"1608
6
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1608
7
"
/>
<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>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"BindViewController"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"BindViewController"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"accountTF"
destination=
"ffm-Wf-cTs"
id=
"OqY-l4-wn0"
/>
<outlet
property=
"codeBtn"
destination=
"CmK-Hc-fnD"
id=
"Vvl-l9-psO"
/>
...
...
@@ -104,7 +104,7 @@
</connections>
</button>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入验证码"
textAlignment=
"right"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"3oP-hI-HAZ"
>
<rect
key=
"frame"
x=
"2
2
4.33333333333334"
y=
"16.333333333333343"
width=
"79.666666666666657"
height=
"17.333333333333329"
/>
<rect
key=
"frame"
x=
"2
4
4.33333333333334"
y=
"16.333333333333343"
width=
"79.666666666666657"
height=
"17.333333333333329"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
/>
...
...
@@ -113,7 +113,7 @@
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstItem=
"SjA-bd-foE"
firstAttribute=
"leading"
secondItem=
"bCp-kS-a0t"
secondAttribute=
"leading"
constant=
"15"
id=
"8cF-XK-Uuh"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"3oP-hI-HAZ"
secondAttribute=
"trailing"
constant=
"
11
0"
id=
"Fsg-8Y-iXz"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"3oP-hI-HAZ"
secondAttribute=
"trailing"
constant=
"
9
0"
id=
"Fsg-8Y-iXz"
/>
<constraint
firstItem=
"SjA-bd-foE"
firstAttribute=
"centerY"
secondItem=
"bCp-kS-a0t"
secondAttribute=
"centerY"
id=
"bYi-7O-cb0"
/>
<constraint
firstItem=
"3oP-hI-HAZ"
firstAttribute=
"centerY"
secondItem=
"bCp-kS-a0t"
secondAttribute=
"centerY"
id=
"dR0-TZ-WdO"
/>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"hua-5S-NOW"
/>
...
...
GeliBusinessPlatform/ViewController/订单管理/查看全部/ShowAlGoodsViewController.swift
View file @
429a0789
...
...
@@ -46,6 +46,7 @@ class ShowAlGoodsViewController: BaseViewController , UITableViewDelegate, UITa
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"XuanZeShangPinCell"
)
as!
XuanZeShangPinCell
cell
.
selectBtn
.
isHidden
=
true
cell
.
priceLbl
.
isHidden
=
false
let
rowModel
=
order_goods
!
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
rowModel
.
goods_name
cell
.
detailLbl
.
text
=
rowModel
.
goods_attr
...
...
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
429a0789
...
...
@@ -161,69 +161,56 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case
"打印"
:
//暂无
print
(
"暂无"
)
HUD
.
flash
(
.
label
(
"打印功能开发中"
),
delay
:
1.2
)
break
case
"确认订单"
:
isSrueOrder
=
true
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"取消订单"
:
isSrueOrder
=
false
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认取消订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1002
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"直接发货"
:
HUD
.
flash
(
.
progress
)
if
isYuShou
{
sendOutAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
else
{
sendOut
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否发货订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1003
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退款"
:
HUD
.
flash
(
.
progress
)
orderRefund
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否退款?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1004
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退货"
:
HUD
.
flash
(
.
progress
)
if
isYuShou
{
orderReturnedGoodsAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
else
{
orderReturnedGoods
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否退货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1005
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
default
:
break
...
...
@@ -507,6 +494,25 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell
.
arrowImg
.
isHidden
=
false
cell
.
contentRight
.
constant
=
32
if
indexPath
.
row
==
9
{
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_pay_type
==
11
||
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_pay_type
==
12
{
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
}
}
else
if
indexPath
.
row
==
7
{
if
isYuShou
{
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_pay_type
==
11
||
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_pay_type
==
12
{
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
}
}
else
{
if
self
.
dataMdoel
?
.
order_res
?
.
pay_type
==
11
||
self
.
dataMdoel
?
.
order_res
?
.
pay_type
==
12
{
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
}
}
}
switch
indexPath
.
row
{
case
4
:
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lc_name
...
...
@@ -529,6 +535,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
break
case
8
:
if
isYuShou
{
...
...
@@ -540,6 +547,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case
9
:
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_pay_status_cn
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
break
default
:
break
...
...
@@ -549,28 +557,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if
!
isCaneditLatsData
{
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
}
else
{
cell
.
arrowImg
.
isHidden
=
false
cell
.
contentRight
.
constant
=
32
if
indexPath
.
row
==
9
{
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_pay_type
==
11
||
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_pay_type
==
12
{
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
}
}
else
if
indexPath
.
row
==
7
{
if
isYuShou
{
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_pay_type
==
11
||
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_pay_type
==
12
{
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
}
}
else
{
if
self
.
dataMdoel
?
.
order_res
?
.
pay_type
==
11
||
self
.
dataMdoel
?
.
order_res
?
.
pay_type
==
12
{
cell
.
arrowImg
.
isHidden
=
true
cell
.
contentRight
.
constant
=
15
}
}
}
}
return
cell
}
...
...
@@ -1078,22 +1064,20 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
//MARK:--确认和取消订单
var
isSrueOrder
=
false
//MARK:--弹窗代理 --还有其他弹窗,根据tag分类
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
isSrueOrder
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
sender
.
tag
==
1001
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
orderConfirm
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"确认成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
else
{
}
else
if
sender
.
tag
==
1002
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
orderCancel
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"取消成功"
),
delay
:
1.2
)
self
.
loadData
()
...
...
@@ -1101,6 +1085,48 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
})
{
(
error
)
in
}
}
else
if
sender
.
tag
==
1003
{
HUD
.
flash
(
.
progress
)
if
isYuShou
{
sendOutAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
else
{
sendOut
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
}
else
if
sender
.
tag
==
1004
{
HUD
.
flash
(
.
progress
)
orderRefund
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
else
if
sender
.
tag
==
1005
{
HUD
.
flash
(
.
progress
)
if
isYuShou
{
orderReturnedGoodsAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
else
{
orderReturnedGoods
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
self
.
loadData
()
})
{
(
error
)
in
}
}
}
}
...
...
GeliBusinessPlatform/ViewController/账号信息/AccountViewController.swift
View file @
429a0789
...
...
@@ -21,14 +21,17 @@ class AccountViewController: BaseViewController{
super
.
viewDidLoad
()
navbar
.
title
=
"账号信息"
self
.
view
.
addSubview
(
navbar
)
print
(
dataModel
)
// Do any additional setup after loading the view.
firstView
?
.
snp
.
makeConstraints
({
(
make
)
in
make
.
top
.
equalTo
(
NavCGRect
.
height
)
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
50
)
})
nameLbl
.
text
=
dataModel
?
.
data
?
.
admin_name
if
dataModel
?
.
data
?
.
admin_name
?
.
count
==
0
{
nameLbl
.
text
=
"-"
}
else
{
nameLbl
.
text
=
dataModel
?
.
data
?
.
admin_name
}
accountLbl
.
text
=
dataModel
?
.
data
?
.
user_name
phoneLbl
.
text
=
dataModel
?
.
data
?
.
phone
}
...
...
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