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
1746c0dc
Commit
1746c0dc
authored
May 21, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善订单详情修改(待测试完善)
parent
728e2eae
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
279 additions
and
72 deletions
+279
-72
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+4
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Interface/Interface_Z.plist
GeliBusinessPlatform/Interface/Interface_Z.plist
+2
-0
GeliBusinessPlatform/Model/OrderInterface.swift
GeliBusinessPlatform/Model/OrderInterface.swift
+15
-0
GeliBusinessPlatform/Model/OrderManageModel/LogisticsCompanyModel.swift
...atform/Model/OrderManageModel/LogisticsCompanyModel.swift
+40
-0
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
+3
-0
GeliBusinessPlatform/SceneDelegate.swift
GeliBusinessPlatform/SceneDelegate.swift
+8
-8
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
...inessPlatform/ViewController/商品管理/GoodsManageListVC.swift
+2
-12
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
...orm/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
+6
-4
GeliBusinessPlatform/ViewController/订单管理/查看全部/ShowAlGoodsViewController.swift
.../ViewController/订单管理/查看全部/ShowAlGoodsViewController.swift
+7
-3
GeliBusinessPlatform/ViewController/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.swift
...ontroller/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.swift
+5
-5
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+187
-40
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
1746c0dc
...
@@ -466,6 +466,7 @@
...
@@ -466,6 +466,7 @@
F9DDBE922457BFEC00A32CB2
/* HUDEXT.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
;
};
F9DDBE922457BFEC00A32CB2
/* HUDEXT.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
;
};
F9DDBE962457D3EC00A32CB2
/* WebViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE942457D3EC00A32CB2
/* WebViewController.swift */
;
};
F9DDBE962457D3EC00A32CB2
/* WebViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE942457D3EC00A32CB2
/* WebViewController.swift */
;
};
F9DDBE972457D3EC00A32CB2
/* WebViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE952457D3EC00A32CB2
/* WebViewController.xib */
;
};
F9DDBE972457D3EC00A32CB2
/* WebViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE952457D3EC00A32CB2
/* WebViewController.xib */
;
};
F9FF7BA124760DA9006E305E
/* LogisticsCompanyModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9FF7BA024760DA9006E305E
/* LogisticsCompanyModel.swift */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
/* Begin PBXContainerItemProxy section */
...
@@ -1008,6 +1009,7 @@
...
@@ -1008,6 +1009,7 @@
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HUDEXT.swift
;
sourceTree
=
"<group>"
;
};
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HUDEXT.swift
;
sourceTree
=
"<group>"
;
};
F9DDBE942457D3EC00A32CB2
/* WebViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WebViewController.swift
;
sourceTree
=
"<group>"
;
};
F9DDBE942457D3EC00A32CB2
/* WebViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WebViewController.swift
;
sourceTree
=
"<group>"
;
};
F9DDBE952457D3EC00A32CB2
/* WebViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WebViewController.xib
;
sourceTree
=
"<group>"
;
};
F9DDBE952457D3EC00A32CB2
/* WebViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WebViewController.xib
;
sourceTree
=
"<group>"
;
};
F9FF7BA024760DA9006E305E
/* LogisticsCompanyModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LogisticsCompanyModel.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -2219,6 +2221,7 @@
...
@@ -2219,6 +2221,7 @@
F93E31F624721C4200524DFC
/* EditOGPAdModel.swift */
,
F93E31F624721C4200524DFC
/* EditOGPAdModel.swift */
,
F9A0E1DC246D198B00D7F26F
/* CusListAllModel.swift */
,
F9A0E1DC246D198B00D7F26F
/* CusListAllModel.swift */
,
F9A0E1DE246D1B1E00D7F26F
/* GetGoodsInfoModel.swift */
,
F9A0E1DE246D1B1E00D7F26F
/* GetGoodsInfoModel.swift */
,
F9FF7BA024760DA9006E305E
/* LogisticsCompanyModel.swift */
,
);
);
path
=
OrderManageModel
;
path
=
OrderManageModel
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2888,6 +2891,7 @@
...
@@ -2888,6 +2891,7 @@
E0D197C22448431C002B080C
/* BabyRhythm.m in Sources */
,
E0D197C22448431C002B080C
/* BabyRhythm.m in Sources */
,
F956D5A1246A2D9C003FF510
/* LMNToolBar.m in Sources */
,
F956D5A1246A2D9C003FF510
/* LMNToolBar.m in Sources */
,
F950FDDC24518B9500C40530
/* FSCalendar.m in Sources */
,
F950FDDC24518B9500C40530
/* FSCalendar.m in Sources */
,
F9FF7BA124760DA9006E305E
/* LogisticsCompanyModel.swift in Sources */
,
E0206327246CD84A007A40C4
/* TitleAndLblView.swift in Sources */
,
E0206327246CD84A007A40C4
/* TitleAndLblView.swift in Sources */
,
F942A7FD247500C300FDFC47
/* TestClass.swift in Sources */
,
F942A7FD247500C300FDFC47
/* TestClass.swift in Sources */
,
F950FDD824518B9500C40530
/* FSCalendarDelegationProxy.m in Sources */
,
F950FDD824518B9500C40530
/* FSCalendarDelegationProxy.m in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
1746c0dc
No preview for this file type
GeliBusinessPlatform/Interface/Interface_Z.plist
View file @
1746c0dc
...
@@ -68,6 +68,8 @@
...
@@ -68,6 +68,8 @@
<string>
Order/orderReturnedGoodsAd
</string>
<string>
Order/orderReturnedGoodsAd
</string>
<key>
修改订单支付方式(状态)
</key>
<key>
修改订单支付方式(状态)
</key>
<string>
Order/editPayType
</string>
<string>
Order/editPayType
</string>
<key>
获取物流公司信息
</key>
<string>
Order/logisticsCompany
</string>
<key>
获取客户信息
</key>
<key>
获取客户信息
</key>
<string>
Customer/cusListAll
</string>
<string>
Customer/cusListAll
</string>
<key>
获取商品信息
</key>
<key>
获取商品信息
</key>
...
...
GeliBusinessPlatform/Model/OrderInterface.swift
View file @
1746c0dc
...
@@ -254,3 +254,18 @@ func cusListAll(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture
...
@@ -254,3 +254,18 @@ func cusListAll(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture
failture
(
error
)
failture
(
error
)
}
}
}
}
//MARK:--获取物流公司信息
/**
params-key:
user_token(验证token)
*/
func
logisticsCompany
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"获取物流公司信息"
,
params
,
{
(
rep
:
DataResponse
<
LogisticsCompanyModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
GeliBusinessPlatform/Model/OrderManageModel/LogisticsCompanyModel.swift
0 → 100644
View file @
1746c0dc
//
// LogisticsCompanyModel.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/5/21.
// Copyright © 2020 junye lu. All rights reserved.
//
import
Foundation
import
ObjectMapper
//获取物流公司信息
class
LogisticsCompanyModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
Array
<
LogisticsCompanyDataModel
>
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
LogisticsCompanyDataModel
:
Mappable
{
var
lc_id
:
Int
?
//物流公司id
var
lc_name
:
String
?
//物流公司名
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
lc_id
<-
map
[
"lc_id"
]
lc_name
<-
map
[
"lc_name"
]
}
}
GeliBusinessPlatform/Other/LMNote/LMNoteViewController.m
View file @
1746c0dc
...
@@ -216,6 +216,9 @@
...
@@ -216,6 +216,9 @@
{
{
[
self
.
textView
exportHTML
:
^
(
BOOL
succeed
,
NSString
*
html
)
{
[
self
.
textView
exportHTML
:
^
(
BOOL
succeed
,
NSString
*
html
)
{
NSLog
(
@"html:
\n
%@"
,
[
NSString
stringWithFormat
:
@"<html>%@</html>"
,
html
]);
NSLog
(
@"html:
\n
%@"
,
[
NSString
stringWithFormat
:
@"<html>%@</html>"
,
html
]);
LMNWebViewController
*
vc
=
[[
LMNWebViewController
alloc
]
init
];
vc
.
html
=
[
NSString
stringWithFormat
:
@"<html>%@</html>"
,
html
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
YES
];
}];
}];
}
}
...
...
GeliBusinessPlatform/SceneDelegate.swift
View file @
1746c0dc
...
@@ -42,16 +42,16 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
...
@@ -42,16 +42,16 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
}
}
//MARK:--loginVC
//MARK:--loginVC
func
addLoginVc
(
isAgain
:
Bool
){
func
addLoginVc
(
isAgain
:
Bool
){
//
//
let vc = LoginViewController()
let
vc
=
LoginViewController
()
//
vc.delegate = self
vc
.
delegate
=
self
//
let contentView = vc
let
contentView
=
vc
let
vc
=
LMNoteViewController
()
//
let vc = LMNoteViewController()
//
//
//
let
contentView
=
vc
//
let contentView = vc
if
let
windowScene
=
sceneC
as?
UIWindowScene
{
if
let
windowScene
=
sceneC
as?
UIWindowScene
{
...
@@ -98,7 +98,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
...
@@ -98,7 +98,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
// Create the SwiftUI view that provides the window contents.
// Create the SwiftUI view that provides the window contents.
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
tabBarController
.
selectedIndex
=
1
//
tabBarController.selectedIndex = 1
let
contentView
=
tabBarController
let
contentView
=
tabBarController
...
...
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
View file @
1746c0dc
...
@@ -429,12 +429,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
...
@@ -429,12 +429,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
if
isTrue
{
if
isTrue
{
//"下架"
//"下架"
print
(
"下架下架下架"
)
print
(
"下架下架下架"
)
// editField(["user_token":"","function_id":"15","prval":"goods_id","value":"0",], success: { (data) in
}
else
{
// self.loadData()
// }) { (erro) in
//
// }
}
else
{
//"入库"
//"入库"
print
(
"入库--入库"
)
print
(
"入库--入库"
)
...
@@ -446,12 +441,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
...
@@ -446,12 +441,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
else
{
}
else
{
//"上架"
//"上架"
print
(
"上架上架上架上架"
)
print
(
"上架上架上架上架"
)
// editField(["user_token":"","function_id":"15","prval":rowModel.goods_id,"value":"1",], success: { (data) in
// self.loadData()
// }) { (erro) in
//
// }
}
}
}
}
}
}
...
...
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
View file @
1746c0dc
...
@@ -46,10 +46,12 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
...
@@ -46,10 +46,12 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
let
order_goods
=
dataChangeString
(
sender
:
order_goodsArr
!
)
let
order_goods
=
dataChangeString
(
sender
:
order_goodsArr
!
)
editOrderGoodsPrice
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderID
as
Any
,
"order_goods"
:
order_goods
],
success
:
{
(
data
)
in
editOrderGoodsPrice
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderID
as
Any
,
"order_goods"
:
order_goods
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"修改成功"
),
delay
:
1.2
)
if
dataM
.
code
==
1
{
self
.
delegate
?
.
changeGoodsPriByData
(
sender
:
self
.
dataArr
!
)
self
.
delegate
?
.
changeGoodsPriByData
(
sender
:
self
.
dataArr
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
})
{
(
error
)
in
})
{
(
error
)
in
...
...
GeliBusinessPlatform/ViewController/订单管理/查看全部/ShowAlGoodsViewController.swift
View file @
1746c0dc
...
@@ -10,6 +10,7 @@ import UIKit
...
@@ -10,6 +10,7 @@ import UIKit
import
ViewAnimator
import
ViewAnimator
class
ShowAlGoodsViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
class
ShowAlGoodsViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
var
order_goods
:
Array
<
OrderDetailGoodsModel
>
?
=
[]
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
@@ -33,20 +34,23 @@ class ShowAlGoodsViewController: BaseViewController , UITableViewDelegate, UITa
...
@@ -33,20 +34,23 @@ class ShowAlGoodsViewController: BaseViewController , UITableViewDelegate, UITa
tableV
.
dataSource
=
self
tableV
.
dataSource
=
self
tableV
.
separatorStyle
=
.
none
tableV
.
separatorStyle
=
.
none
//不是这个cell-是跟订单详情里面的商品 一样
// tableV?.register(UINib(nibName: "ChangePriceNormalCell", bundle: nil), forCellReuseIdentifier: "ChangePriceNormalCell")
tableV
?
.
register
(
UINib
(
nibName
:
"XuanZeShangPinCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"XuanZeShangPinCell"
)
tableV
?
.
register
(
UINib
(
nibName
:
"XuanZeShangPinCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"XuanZeShangPinCell"
)
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
3
return
order_goods
!.
count
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"XuanZeShangPinCell"
)
as!
XuanZeShangPinCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"XuanZeShangPinCell"
)
as!
XuanZeShangPinCell
cell
.
selectBtn
.
isHidden
=
true
cell
.
selectBtn
.
isHidden
=
true
cell
.
detailLbl2
.
isHidden
=
true
cell
.
detailLbl2
.
isHidden
=
true
let
rowModel
=
order_goods
!
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
rowModel
.
goods_name
cell
.
detailLbl
.
text
=
rowModel
.
goods_attr
cell
.
priceLbl
.
text
=
"¥"
+
(
rowModel
.
goods_price
!
)
return
cell
return
cell
}
}
...
...
GeliBusinessPlatform/ViewController/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.swift
View file @
1746c0dc
...
@@ -58,12 +58,12 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
...
@@ -58,12 +58,12 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
let
rowModel
=
dataModel
?
.
order_goods
!
[
0
]
let
rowModel
=
dataModel
?
.
order_goods
!
[
0
]
editOrderGoodsPriceAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderID
as
Any
,
"og_id"
:
rowModel
?
.
og_id
as
Any
,
"dj_amount"
:
dingJinTF
.
text
as
Any
,
"wk_amount"
:
weiKuanTF
.
text
as
Any
],
success
:
{
(
data
)
in
editOrderGoodsPriceAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderID
as
Any
,
"og_id"
:
rowModel
?
.
og_id
as
Any
,
"dj_amount"
:
dingJinTF
.
text
as
Any
,
"wk_amount"
:
weiKuanTF
.
text
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"修改成功"
),
delay
:
1.2
)
//MARK:--需要更改订单详情的对应数据(不做网络请求,减少加载)
let
dataM
=
data
as!
EditOGPAdModel
let
dataM
=
data
as!
EditOGPAdModel
self
.
delegate
?
.
changeYuShouGoodsByData
(
sender
:
dataM
.
data
!
)
if
dataM
.
code
==
1
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
delegate
?
.
changeYuShouGoodsByData
(
sender
:
dataM
.
data
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
})
{
(
error
)
in
})
{
(
error
)
in
}
}
...
...
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
1746c0dc
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
UIKit
import
UIKit
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
,
GLAlertSelectViewDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
ChangeGoodsPriceVCDelegate
{
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
,
GLAlertSelectViewDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
ChangeGoodsPriceVCDelegate
,
GeliAlertTextFiledDelegate
,
GeliAlertTextViewDelegate
{
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
if
selectnum
!=
10086
{
if
selectnum
!=
10086
{
if
view
.
titleLbl
.
text
==
"请选择支付方式"
{
if
view
.
titleLbl
.
text
==
"请选择支付方式"
{
...
@@ -50,7 +50,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -50,7 +50,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let
zhiFuStatus
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
let
zhiFuStatus
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
var
zhiFuStatusSelect
:
Int
?
//付款状态
var
zhiFuStatusSelect
:
Int
?
//付款状态
let
wuLiuFSArr
=
[
"京东冷链"
,
"顺丰冷运"
,
"达达速运"
]
// let wuLiuFSArr = ["京东冷链","顺丰冷运","达达速运"]
var
wuLiuFSArr
:
Array
<
String
>
=
[]
var
wuLiuSelect
:
Int
?
//物流选择
var
wuLiuSelect
:
Int
?
//物流选择
@IBOutlet
weak
var
btmViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
btmViewH
:
NSLayoutConstraint
!
...
@@ -222,10 +224,16 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -222,10 +224,16 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
//MARK:--修改价格(普通商品返回数据)
//MARK:--修改价格(普通商品返回数据)
func
changeGoodsPriByData
(
sender
:
Array
<
OrderDetailGoodsModel
>
)
{
func
changeGoodsPriByData
(
sender
:
Array
<
OrderDetailGoodsModel
>
)
{
print
(
"修改价格(普通商品返回数据)
\(
sender
)
"
)
print
(
"修改价格(普通商品返回数据)
\(
sender
)
"
)
self
.
dataMdoel
?
.
order_goods
=
sender
listView
.
reloadData
()
}
}
//MARK:--修改价格(预售返回数据)
//MARK:--修改价格(预售返回数据)
func
changeYuShouGoodsByData
(
sender
:
EditOGPAdDataModel
)
{
func
changeYuShouGoodsByData
(
sender
:
EditOGPAdDataModel
)
{
print
(
"修改价格(预售返回数据)--只更新datamodel,不请求网络
\(
sender
)
"
)
print
(
"修改价格(预售返回数据)--只更新datamodel,不请求网络
\(
sender
)
"
)
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
=
sender
.
dj_amount
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
=
sender
.
wk_amount
listView
.
reloadData
()
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
...
@@ -256,11 +264,45 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -256,11 +264,45 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if
indexPath
.
section
==
4
{
if
indexPath
.
section
==
4
{
if
indexPath
.
row
==
5
{
if
indexPath
.
row
==
5
{
print
(
"运单号"
)
print
(
"运单号"
)
let
alterView
=
GeliAlertTextFiled
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
}
if
indexPath
.
row
==
9
{
if
indexPath
.
row
==
9
{
print
(
"备注"
)
print
(
"备注"
)
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
}
}
//MARK:--编辑运单号回调数据
func
sureGeliAlertTextFiledAction
(
sender
:
String
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"47"
,
"prval"
:
orderId
as
Any
,
"value"
:
sender
as
Any
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
self
.
dataMdoel
?
.
order_res
?
.
lwb_no
=
sender
self
.
listView
.
reloadData
()
}
})
{
(
erro
)
in
}
}
//MARK:--编辑订单备注回调数据
func
sureGeliAlertTextViewAction
(
sender
:
String
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"45"
,
"prval"
:
orderId
as
Any
,
"value"
:
sender
as
Any
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
=
sender
self
.
listView
.
reloadData
()
}
}
})
{
(
erro
)
in
}
}
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
...
@@ -310,10 +352,22 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -310,10 +352,22 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case
0
:
case
0
:
print
(
"预售定金"
)
print
(
"预售定金"
)
print
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
print
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
!
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_pay_status
==
1
{
cell
.
textTF
.
text
=
"(已付)"
+
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
!
}
else
{
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
!
}
break
break
case
1
:
case
1
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
)
!
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_pay_status
==
1
{
cell
.
textTF
.
text
=
"(已付)"
+
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
)
!
}
else
{
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
)
!
}
break
break
case
2
:
case
2
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
goods_amount
)
!
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
goods_amount
)
!
...
@@ -398,9 +452,14 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -398,9 +452,14 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break
break
case
9
:
case
9
:
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
if
cell
.
contentLbl
.
text
?
.
count
==
0
{
if
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
==
nil
{
cell
.
contentLbl
.
text
=
"请输入订单备注"
cell
.
contentLbl
.
text
=
"-"
}
else
{
if
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
?
.
count
==
0
{
cell
.
contentLbl
.
text
=
"请输入订单备注"
}
}
}
break
break
default
:
default
:
break
break
...
@@ -409,6 +468,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -409,6 +468,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
}
if
indexPath
.
row
==
4
||
indexPath
.
row
==
6
||
indexPath
.
row
==
7
{
if
indexPath
.
row
==
4
||
indexPath
.
row
==
6
||
indexPath
.
row
==
7
{
cell
.
nameLbl
.
text
=
YuShouPart3Arr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
YuShouPart3Arr
[
indexPath
.
row
]
cell
.
arrowImg
.
isHidden
=
false
switch
indexPath
.
row
{
switch
indexPath
.
row
{
case
4
:
case
4
:
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lc_name
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lc_name
...
@@ -418,6 +479,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -418,6 +479,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break
break
case
7
:
case
7
:
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
pay_status_cn
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
pay_status_cn
cell
.
arrowImg
.
isHidden
=
true
break
break
default
:
default
:
break
break
...
@@ -465,6 +527,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -465,6 +527,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func
OrderDViewFooterViewBtnClick
()
{
func
OrderDViewFooterViewBtnClick
()
{
print
(
"查看全部商品"
)
print
(
"查看全部商品"
)
let
vc
=
ShowAlGoodsViewController
()
let
vc
=
ShowAlGoodsViewController
()
vc
.
order_goods
=
self
.
dataMdoel
?
.
order_goods
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
...
@@ -478,22 +541,59 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -478,22 +541,59 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
//暂时不刷新数据,只刷新视图
//暂时不刷新数据,只刷新视图
listView
.
reloadData
()
listView
.
reloadData
()
}
}
//MARK:--请求物流公司信息
var
lcModel
:
LogisticsCompanyModel
?
=
nil
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
switch
cell
.
nameLbl
.
text
{
switch
cell
.
nameLbl
.
text
{
case
"物流公司"
:
case
"物流公司"
:
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
if
lcModel
==
nil
{
view
.
tag
=
cell
.
tag
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
view
.
titleLbl
.
text
=
"请选择物流公司"
logisticsCompany
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
view
.
delegate
=
self
let
dataM
=
data
as!
LogisticsCompanyModel
view
.
dataArr
=
wuLiuFSArr
if
dataM
.
code
==
1
{
if
wuLiuSelect
!=
nil
{
self
.
lcModel
=
dataM
view
.
selectNum
=
wuLiuSelect
!
self
.
wuLiuFSArr
.
removeAll
()
view
.
tempNum
=
view
.
selectNum
self
.
lcModel
?
.
data
?
.
forEach
({
(
md
)
in
self
.
wuLiuFSArr
.
append
(
md
.
lc_name
!
)
})
if
self
.
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择物流公司"
view
.
delegate
=
self
view
.
dataArr
=
self
.
wuLiuFSArr
if
self
.
wuLiuSelect
!=
nil
{
view
.
selectNum
=
self
.
wuLiuSelect
!
view
.
tempNum
=
view
.
selectNum
}
self
.
view
.
addSubview
(
view
)
self
.
glSelectView
=
view
}
}
})
{
(
error
)
in
}
}
else
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择物流公司"
view
.
delegate
=
self
view
.
dataArr
=
wuLiuFSArr
if
wuLiuSelect
!=
nil
{
view
.
selectNum
=
wuLiuSelect
!
view
.
tempNum
=
view
.
selectNum
}
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
break
break
case
"关联客户"
:
case
"关联客户"
:
let
vc
=
GuanLianKehuVC
()
let
vc
=
GuanLianKehuVC
()
...
@@ -520,19 +620,20 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -520,19 +620,20 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
}
break
break
case
"支付状态"
:
case
"支付状态"
:
if
glSelectView
==
nil
{
//无法修改支付状态的
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
// if glSelectView == nil {
view
.
tag
=
cell
.
tag
// let view = GLAlertSelectView(frame: self.view.bounds)
view
.
titleLbl
.
text
=
"请选择支付状态"
// view.tag = cell.tag
view
.
delegate
=
self
// view.titleLbl.text = "请选择支付状态"
view
.
dataArr
=
zhiFuStatus
// view.delegate = self
if
zhiFuStatusSelect
!=
nil
{
// view.dataArr = zhiFuStatus
view
.
selectNum
=
zhiFuStatusSelect
!
// if zhiFuStatusSelect != nil {
view
.
tempNum
=
view
.
selectNum
// view.selectNum = zhiFuStatusSelect!
}
// view.tempNum = view.selectNum
self
.
view
.
addSubview
(
view
)
// }
glSelectView
=
view
// self.view.addSubview(view)
}
// glSelectView = view
// }
break
break
default
:
default
:
break
break
...
@@ -540,24 +641,69 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -540,24 +641,69 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
if
view
.
titleLbl
.
text
==
"请选择支付方式"
{
if
view
.
titleLbl
.
text
==
"请选择支付方式"
{
zhiFuSelect
=
selectNum
//MARK:--选择支付方式回调
self
.
dataMdoel
?
.
order_res
?
.
pay_type_cn
=
zhiFuFangShiArr
[
selectNum
]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
is_adsale
=
0
var
amount_type
=
0
if
isYuShou
{
is_adsale
=
1
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
!=
nil
{
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_pay_status
==
0
{
amount_type
=
1
}
else
if
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_pay_status
==
0
{
amount_type
=
2
}
}
}
var
pay_type
=
0
if
selectNum
==
1
{
pay_type
=
7
}
else
if
selectNum
>
1
{
pay_type
=
selectNum
+
7
}
editPayType
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
,
"is_adsale"
:
is_adsale
as
Any
,
"amount_type"
:
amount_type
,
"pay_type"
:
pay_type
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
self
.
zhiFuSelect
=
selectNum
self
.
dataMdoel
?
.
order_res
?
.
pay_type_cn
=
self
.
zhiFuFangShiArr
[
selectNum
]
self
.
listView
.
reloadData
()
}
})
{
(
error
)
in
}
}
else
if
view
.
titleLbl
.
text
==
"请选择物流公司"
{
}
else
if
view
.
titleLbl
.
text
==
"请选择物流公司"
{
wuLiuSelect
=
selectNum
self
.
dataMdoel
?
.
order_res
?
.
lc_name
=
wuLiuFSArr
[
selectNum
]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
secltMd
=
self
.
lcModel
?
.
data
!
[
selectNum
]
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"46"
,
"prval"
:
orderId
as
Any
,
"value"
:
secltMd
!.
lc_id
as
Any
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
self
.
wuLiuSelect
=
selectNum
self
.
dataMdoel
?
.
order_res
?
.
lc_name
=
self
.
wuLiuFSArr
[
selectNum
]
self
.
listView
.
reloadData
()
}
})
{
(
erro
)
in
}
}
else
{
}
else
{
//MARK:--选择支付状态回调
zhiFuStatusSelect
=
selectNum
zhiFuStatusSelect
=
selectNum
self
.
dataMdoel
?
.
order_res
?
.
pay_status_cn
=
zhiFuStatus
[
selectNum
]
self
.
dataMdoel
?
.
order_res
?
.
pay_status_cn
=
zhiFuStatus
[
selectNum
]
listView
.
reloadData
()
}
}
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
listView
.
reloadData
()
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
}
}
//MARK: - section delegate
//MARK: - section delegate
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
if
self
.
dataMdoel
==
nil
{
if
self
.
dataMdoel
==
nil
{
...
@@ -762,3 +908,4 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -762,3 +908,4 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
}
}
}
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