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
692d3661
Commit
692d3661
authored
Aug 05, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成运单列表
parent
3874bb4e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
18 deletions
+116
-18
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/Logistics/LogisticsModel.swift
GeliBusinessPlatform/Model/Logistics/LogisticsModel.swift
+10
-2
GeliBusinessPlatform/View/Cell/YunDanLieBiaoCell.swift
GeliBusinessPlatform/View/Cell/YunDanLieBiaoCell.swift
+8
-0
GeliBusinessPlatform/View/Cell/YunDanLieBiaoCell.xib
GeliBusinessPlatform/View/Cell/YunDanLieBiaoCell.xib
+3
-0
GeliBusinessPlatform/ViewController/代客下单(货运)/运单详情/YunDanXiangQingViewController.swift
...troller/代客下单(货运)/运单详情/YunDanXiangQingViewController.swift
+0
-1
GeliBusinessPlatform/ViewController/运单列表/YDLBVc.swift
GeliBusinessPlatform/ViewController/运单列表/YDLBVc.swift
+95
-15
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
692d3661
No preview for this file type
GeliBusinessPlatform/Model/Logistics/LogisticsModel.swift
View file @
692d3661
...
...
@@ -27,7 +27,7 @@ class LogisticsModel: Mappable {
class
LogisticsDataModel
:
Mappable
{
var
id
:
Int
?
var
lwb_no
:
String
?
//运单号
var
delivery_status
:
String
?
//运单状态:1下单完成 2揽收成功 3运输中 4已签收 5已取消 6拒收 7再投
var
delivery_status
:
Int
?
//运单状态:1下单完成 2揽收成功 3运输中 4已签收 5已取消 6拒收 7再投
var
express_item_name
:
String
?
//托寄物名称
var
sale_plat
:
String
?
//所属平台
...
...
@@ -39,6 +39,9 @@ class LogisticsDataModel: Mappable {
var
lc_name
:
String
?
//物流公司
var
delivery_status_cn
:
String
?
//运单状态(中文)
var
wb_no
:
String
?
var
pay_status
:
Int
?
var
freight
:
Float
?
required
init
?(
map
:
Map
)
{
...
...
@@ -59,6 +62,11 @@ class LogisticsDataModel: Mappable {
lc_name
<-
map
[
"lc_name"
]
delivery_status_cn
<-
map
[
"delivery_status_cn"
]
wb_no
<-
map
[
"wb_no"
]
pay_status
<-
map
[
"pay_status"
]
freight
<-
map
[
"freight"
]
}
}
...
...
GeliBusinessPlatform/View/Cell/YunDanLieBiaoCell.swift
View file @
692d3661
...
...
@@ -8,7 +8,12 @@
import
UIKit
protocol
YunDanLieBiaoCellDelegate
{
func
YunDanLieBiaoCellAction
(
sender
:
UIButton
)
}
class
YunDanLieBiaoCell
:
UITableViewCell
{
var
delegate
:
YunDanLieBiaoCellDelegate
?
/// 订单号
@IBOutlet
weak
var
orderNumLbl
:
UILabel
!
/// 时间
...
...
@@ -38,6 +43,9 @@ class YunDanLieBiaoCell: UITableViewCell {
// Initialization code
}
@IBAction
func
acTion
(
_
sender
:
UIButton
)
{
delegate
?
.
YunDanLieBiaoCellAction
(
sender
:
sender
)
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
...
...
GeliBusinessPlatform/View/Cell/YunDanLieBiaoCell.xib
View file @
692d3661
...
...
@@ -156,6 +156,9 @@
<color
key=
"value"
name=
"蓝色字体颜色"
/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action
selector=
"acTion:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"nKQ-4e-vs1"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
...
...
GeliBusinessPlatform/ViewController/代客下单(货运)/运单详情/YunDanXiangQingViewController.swift
View file @
692d3661
...
...
@@ -158,7 +158,6 @@ class YunDanXiangQingViewController: BaseViewController,UITableViewDelegate,UITa
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否取消运单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确定"
),
for
:
.
normal
)
// alertView.rightBtn.tag = model.po_id!
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
default
:
...
...
GeliBusinessPlatform/ViewController/运单列表/YDLBVc.swift
View file @
692d3661
...
...
@@ -8,8 +8,39 @@
import
UIKit
class
YDLBVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
UITextFieldDelegate
,
TimeSelectViewDelgate
{
class
YDLBVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
UITextFieldDelegate
,
TimeSelectViewDelgate
,
YunDanLieBiaoCellDelegate
,
PaymentViewDelegate
,
GeliAlertViewDelegate
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
print
(
"取消订单"
)
let
rowModel
=
datas
[
sender
.
tag
]
HUD
.
flash
(
.
progress
)
cancelLogisticsOrder
([
"wb_no"
:
rowModel
.
wb_no
as
Any
,
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
//通知刷新
HUD
.
hide
()
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"logistDetail"
),
object
:
nil
,
userInfo
:
nil
)
})
{
(
err
)
in
}
}
func
PaymentViewClose
()
{
paymentView
?
.
removeFromSuperview
()
paymentView
=
nil
}
func
PaymentViewPassInputFinish
(
fullpass
:
String
)
{
HUD
.
flash
(
.
progress
)
let
rowModel
=
datas
[
selectIndex
!
]
payDelivery
([
"wb_no"
:
rowModel
.
wb_no
as
Any
,
"user_token"
:
UserToken
as
Any
,
"pwd"
:
fullpass
as
Any
],
success
:
{
(
data
)
in
//通知刷新
HUD
.
hide
()
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"logistDetail"
),
object
:
nil
,
userInfo
:
nil
)
})
{
(
err
)
in
}
paymentView
?
.
removeFromSuperview
()
paymentView
=
nil
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
@IBOutlet
weak
var
timeBgH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
scvContentH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
contentView
:
UIView
!
...
...
@@ -112,12 +143,12 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
}
}
// @objc func closeTimeSelect(){
// timeBgH.constant = 0
// scvContentH.constant = 680
// calendarV.removeFromSuperview()
//
// }
// @objc func closeTimeSelect(){
// timeBgH.constant = 0
// scvContentH.constant = 680
// calendarV.removeFromSuperview()
//
// }
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
...
...
@@ -130,8 +161,8 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
refreshList
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"logistDetail"
),
object
:
nil
)
// let tap = UITapGestureRecognizer(target: self, action: #selector(closeTimeSelect))
// contentView.addGestureRecognizer(tap)
// let tap = UITapGestureRecognizer(target: self, action: #selector(closeTimeSelect))
// contentView.addGestureRecognizer(tap)
timeBgH
.
constant
=
0
scvContentH
.
constant
=
680
...
...
@@ -184,9 +215,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
@IBAction
func
btnClick
(
_
sender
:
UIButton
)
{
// if sender.titleLabel!.text != "重置" && sender.titleLabel!.text != "确定"{
// btnUISet(btn: sender)
// }
// if sender.titleLabel!.text != "重置" && sender.titleLabel!.text != "确定"{
// btnUISet(btn: sender)
// }
switch
sender
.
titleLabel
?
.
text
{
case
"顺丰"
:
for
item
in
wlgsArr
{
...
...
@@ -677,9 +708,17 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
row
==
0
{
let
rowModel
=
datas
[
indexPath
.
row
]
if
rowModel
.
delivery_status
==
1
{
return
257
}
if
((
rowModel
.
freight
)
!
>
0
)
&&
rowModel
.
pay_status
==
1
{
return
257
}
return
227
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
...
...
@@ -688,11 +727,24 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"YunDanLieBiaoCell"
)
as!
YunDanLieBiaoCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
if
cell
.
tag
==
0
{
cell
.
acButton
.
isHidden
=
true
let
rowModel
=
datas
[
indexPath
.
row
]
if
rowModel
.
delivery_status
==
1
{
cell
.
acButton
.
isHidden
=
false
cell
.
acButton
.
setTitle
(
"取消运单"
,
for
:
.
normal
)
}
let
rowModel
=
datas
[
indexPath
.
row
]
if
((
rowModel
.
freight
)
!
>
0
)
&&
rowModel
.
pay_status
==
1
{
cell
.
acButton
.
isHidden
=
false
cell
.
acButton
.
setTitle
(
"支付运费"
,
for
:
.
normal
)
}
cell
.
acButton
.
tag
=
indexPath
.
row
cell
.
title1
.
text
=
"运单号:"
+
rowModel
.
lwb_no
!
cell
.
title2
.
text
=
rowModel
.
lc_name
!
cell
.
senderLbl
.
text
=
rowModel
.
s_city_name
!
...
...
@@ -716,6 +768,34 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
}
return
cell
}
//MARK:--cell 按钮方法
var
paymentView
:
PaymentView
?
var
selectIndex
:
Int
?
func
YunDanLieBiaoCellAction
(
sender
:
UIButton
)
{
let
rowModel
=
datas
[
sender
.
tag
]
selectIndex
=
sender
.
tag
switch
sender
.
titleLabel
?
.
text
{
case
"支付运费"
:
if
paymentView
==
nil
{
paymentView
=
PaymentView
(
frame
:
view
.
bounds
)
paymentView
?
.
delegate
=
self
paymentView
?
.
price
=
rowModel
.
freight
view
.
addSubview
(
paymentView
!
)
}
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
=
sender
.
tag
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
default
:
break
}
}
func
textFieldDidBeginEditing
(
_
textField
:
UITextField
)
{
if
(
orderNumTF
==
textField
)
{
order_sn
=
orderNumTF
.
text
!
...
...
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