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
70d2a3f3
Commit
70d2a3f3
authored
Sep 11, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善鑫源物流下单和预估运费
parent
6050dcbe
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
345 additions
and
240 deletions
+345
-240
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+4
-4
GeliBusinessPlatform/Model/Logistics/LogisticsModel.swift
GeliBusinessPlatform/Model/Logistics/LogisticsModel.swift
+19
-0
GeliBusinessPlatform/View/Cell/WenDuCell.swift
GeliBusinessPlatform/View/Cell/WenDuCell.swift
+7
-6
GeliBusinessPlatform/View/Cell/WenDuCell.xib
GeliBusinessPlatform/View/Cell/WenDuCell.xib
+2
-2
GeliBusinessPlatform/View/LogisticalSelectView/LogisticalSelectView.swift
...form/View/LogisticalSelectView/LogisticalSelectView.swift
+75
-23
GeliBusinessPlatform/View/LogisticalSelectView/LogisticalSelectView.xib
...atform/View/LogisticalSelectView/LogisticalSelectView.xib
+179
-162
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
...ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
+50
-40
GeliBusinessPlatform/ViewController/增值服务/ZengZhiServicesViewController.swift
...m/ViewController/增值服务/ZengZhiServicesViewController.swift
+9
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
70d2a3f3
No preview for this file type
GeliBusinessPlatform/Define/Define.swift
View file @
70d2a3f3
...
...
@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址
//test
//
let SERVERCE_ImageHost = "https://z.gelifood.com/"
//
let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://zx.gelifood.com/"
let
SERVERCE_HOST
=
"https://zx.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://z.gelifood.com/"
let
SERVERCE_HOST
=
"https://z.gelifood.com/admin/"
//
let SERVERCE_ImageHost = "https://zx.gelifood.com/"
//
let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
////online
//视图常量
...
...
GeliBusinessPlatform/Model/Logistics/LogisticsModel.swift
View file @
70d2a3f3
...
...
@@ -149,6 +149,11 @@ class registerDataModel: Mappable {
var
kjxy_sf
:
String
?
var
kjxy_jd
:
String
?
var
xy_data
:
Array
<
registerXYDataDataModel
>
?
var
kjxy_xy
:
String
?
var
price_xy
:
Float
?
required
init
?(
map
:
Map
)
{
}
...
...
@@ -159,6 +164,9 @@ class registerDataModel: Mappable {
kjxy_sf
<-
map
[
"kjxy_sf"
]
kjxy_jd
<-
map
[
"kjxy_jd"
]
xy_data
<-
map
[
"xy_data"
]
kjxy_xy
<-
map
[
"kjxy_xy"
]
price_xy
<-
map
[
"price_xy"
]
}
}
class
registerSfDataDataModel
:
Mappable
{
...
...
@@ -172,6 +180,17 @@ class registerSfDataDataModel: Mappable {
number
<-
map
[
"number"
]
}
}
class
registerXYDataDataModel
:
Mappable
{
var
cn
:
String
?
var
number
:
Float
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
cn
<-
map
[
"cn"
]
number
<-
map
[
"number"
]
}
}
//MARK: - 运单详情
class
addLogisticsOrderModel
:
Mappable
{
var
code
:
Int
?
...
...
GeliBusinessPlatform/View/Cell/WenDuCell.swift
View file @
70d2a3f3
...
...
@@ -18,17 +18,18 @@ class WenDuCell: UITableViewCell {
@IBAction
func
selectAction
(
_
sender
:
UIButton
)
{
switch
sender
.
tag
{
case
0
:
setBtnUI
(
btn
:
leftBtn
,
tag
:
sender
.
tag
)
rightBtn
.
isSelected
=
true
LeftBtn2
.
isSelected
=
true
setBtnUI
(
btn
:
rightBtn
,
tag
:
sender
.
tag
)
leftBtn
.
isSelected
=
true
LeftBtn2
.
isSelected
=
true
setBtnUI
(
btn
:
leftBtn
,
tag
:
sender
.
tag
)
setBtnUI
(
btn
:
LeftBtn2
,
tag
:
sender
.
tag
)
break
case
1
:
setBtnUI
(
btn
:
rightBtn
,
tag
:
sender
.
tag
)
leftBtn
.
isSelected
=
true
LeftBtn2
.
isSelected
=
true
setBtnUI
(
btn
:
leftBtn
,
tag
:
sender
.
tag
)
rightBtn
.
isSelected
=
true
LeftBtn2
.
isSelected
=
true
setBtnUI
(
btn
:
rightBtn
,
tag
:
sender
.
tag
)
setBtnUI
(
btn
:
LeftBtn2
,
tag
:
sender
.
tag
)
break
default
:
...
...
GeliBusinessPlatform/View/Cell/WenDuCell.xib
View file @
70d2a3f3
...
...
@@ -27,7 +27,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"h2T-BN-NH0"
>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"h2T-BN-NH0"
>
<rect
key=
"frame"
x=
"255"
y=
"48.5"
width=
"105"
height=
"30"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"2f5-gX-JVf"
/>
...
...
@@ -55,7 +55,7 @@
<action
selector=
"selectAction:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"ASu-Rq-WvM"
/>
</connections>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"tF5-tz-dRM"
>
<button
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"tF5-tz-dRM"
>
<rect
key=
"frame"
x=
"135"
y=
"48.5"
width=
"105"
height=
"30"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"QFO-8D-fT6"
/>
...
...
GeliBusinessPlatform/View/LogisticalSelectView/LogisticalSelectView.swift
View file @
70d2a3f3
...
...
@@ -20,6 +20,10 @@ class LogisticalSelectView: UIView {
@IBOutlet
weak
var
jdBgViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
jdSelectBtn
:
UIButton
!
@IBOutlet
weak
var
sfSelectBtn
:
UIButton
!
@IBOutlet
weak
var
xySelectBtn
:
UIButton
!
@IBOutlet
weak
var
sfBgViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
sfBgView
:
UIView
!
@IBAction
func
blackAction
(
_
sender
:
Any
)
{
self
.
removeFromSuperview
()
}
...
...
@@ -29,24 +33,28 @@ class LogisticalSelectView: UIView {
@IBOutlet
weak
var
xingYuanBgV
:
UIView
!
@IBOutlet
weak
var
xingYuanBgHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
xyPriceLbl
:
UILabel
!
@IBOutlet
weak
var
sflineBottom
:
NSLayoutConstraint
!
@IBOutlet
weak
var
xyTop
:
NSLayoutConstraint
!
@IBOutlet
weak
var
xyAgreeLbl
:
UILabel
!
@IBOutlet
weak
var
sfPriceLbl
:
UILabel
!
@IBOutlet
weak
var
jdPriceLbl
:
UILabel
!
var
tempArr
:
Array
<
UILabel
>
=
[]
var
fuTitleArr
:
Array
<
String
>
=
[]
{
var
SF
tempArr
:
Array
<
UILabel
>
=
[]
var
SF
fuTitleArr
:
Array
<
String
>
=
[]
{
didSet
{
if
fuTitleArr
.
count
==
0
{
tempArr
.
forEach
{
(
item
)
in
if
SF
fuTitleArr
.
count
==
0
{
SF
tempArr
.
forEach
{
(
item
)
in
item
.
removeFromSuperview
()
}
// 有京东
// selectBgHeight.constant = CGFloat(265
)
//没京东
selectBgHeight
.
constant
=
CGFloat
(
265
-
68
)
selectBgHeight
.
constant
=
CGFloat
(
270
)
xyTop
.
constant
=
CGFloat
(
0
)
sflineBottom
.
constant
=
CGFloat
(
0
)
return
}
for
i
in
0
..<
fuTitleArr
.
count
{
for
i
in
0
..<
SF
fuTitleArr
.
count
{
let
lbl
=
UILabel
()
lbl
.
text
=
fuTitleArr
[
i
]
lbl
.
text
=
SF
fuTitleArr
[
i
]
lbl
.
textColor
=
UIColor
.
init
(
named
:
"提示语字体颜色"
)
lbl
.
font
=
UIFont
.
systemFont
(
ofSize
:
11
)
selectBgView
.
addSubview
(
lbl
)
...
...
@@ -54,26 +62,55 @@ class LogisticalSelectView: UIView {
make
.
left
.
equalTo
(
sfAgreeLbl
)
make
.
top
.
equalTo
(
sfAgreeLbl
.
snp_bottom
)
.
offset
((
5
+
15
)
*
i
+
5
)
}
tempArr
.
append
(
lbl
)
SFtempArr
.
append
(
lbl
)
}
xyTop
.
constant
=
CGFloat
(
SFfuTitleArr
.
count
*
19
)
sflineBottom
.
constant
=
CGFloat
(
-
(
SFfuTitleArr
.
count
*
19
))
selectBgHeight
.
constant
=
CGFloat
(
270
+
SFfuTitleArr
.
count
*
19
)
}
}
var
XYtempArr
:
Array
<
UILabel
>
=
[]
var
XYfuTitleArr
:
Array
<
String
>
=
[]
{
didSet
{
if
XYfuTitleArr
.
count
==
0
{
XYtempArr
.
forEach
{
(
item
)
in
item
.
removeFromSuperview
()
}
selectBgHeight
.
constant
=
CGFloat
(
270
)
return
}
for
i
in
0
..<
XYfuTitleArr
.
count
{
let
lbl
=
UILabel
()
lbl
.
text
=
XYfuTitleArr
[
i
]
lbl
.
textColor
=
UIColor
.
init
(
named
:
"提示语字体颜色"
)
lbl
.
font
=
UIFont
.
systemFont
(
ofSize
:
11
)
selectBgView
.
addSubview
(
lbl
)
lbl
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
xyAgreeLbl
)
make
.
top
.
equalTo
(
xyAgreeLbl
.
snp_bottom
)
.
offset
((
5
+
15
)
*
i
+
5
)
}
XYtempArr
.
append
(
lbl
)
}
// 有京东
// selectBgHeight.constant = CGFloat(265 + fuTitleArr.count * 19)
//没京东
selectBgHeight
.
constant
=
CGFloat
(
265
+
fuTitleArr
.
count
*
19
-
68
)
selectBgHeight
.
constant
=
CGFloat
(
270
+
XYfuTitleArr
.
count
*
19
)
}
}
@IBAction
func
xiadanAction
(
_
sender
:
Any
)
{
if
jdSelectBtn
.
isSelected
||
sfSelectBtn
.
isSelected
{
if
jdSelectBtn
.
isSelected
||
sfSelectBtn
.
isSelected
||
xySelectBtn
.
isSelected
{
if
jdSelectBtn
.
isSelected
{
delegate
?
.
LogisticalSelectViewSure
(
index
:
1
)
}
else
if
sfSelectBtn
.
isSelected
{
delegate
?
.
LogisticalSelectViewSure
(
index
:
2
)
}
else
if
xySelectBtn
.
isSelected
{
delegate
?
.
LogisticalSelectViewSure
(
index
:
12
)
}
self
.
removeFromSuperview
()
print
(
"xiadanAction"
)
}
else
{
HUD
.
flash
(
.
label
(
"请选择下单物流"
),
delay
:
1.2
)
}
...
...
@@ -85,6 +122,8 @@ class LogisticalSelectView: UIView {
print
(
"京东快件服务协议"
)
}
else
if
sender
.
tag
==
1
{
print
(
"顺丰快件服务协议"
)
}
else
if
sender
.
tag
==
12
{
print
(
"鑫源物流服务协议"
)
}
delegate
?
.
LogisticalSelectViewWebBy
(
index
:
sender
.
tag
)
...
...
@@ -94,18 +133,30 @@ class LogisticalSelectView: UIView {
if
sender
==
jdSelectBtn
{
jdSelectBtn
.
isSelected
=
!
jdSelectBtn
.
isSelected
sfSelectBtn
.
isSelected
=
false
xySelectBtn
.
isSelected
=
false
delegate
?
.
LogisticalSelectViewBtnclick
(
idx
:
0
)
}
else
if
sender
==
sfSelectBtn
{
sfSelectBtn
.
isSelected
=
!
sfSelectBtn
.
isSelected
jdSelectBtn
.
isSelected
=
false
xySelectBtn
.
isSelected
=
false
if
sfSelectBtn
.
isSelected
{
delegate
?
.
LogisticalSelectViewBtnclick
(
idx
:
1
)
}
else
{
delegate
?
.
LogisticalSelectViewBtnclick
(
idx
:
2
)
delegate
?
.
LogisticalSelectViewBtnclick
(
idx
:
0
)
}
}
else
if
sender
==
xySelectBtn
{
xySelectBtn
.
isSelected
=
!
xySelectBtn
.
isSelected
jdSelectBtn
.
isSelected
=
false
sfSelectBtn
.
isSelected
=
false
if
xySelectBtn
.
isSelected
{
delegate
?
.
LogisticalSelectViewBtnclick
(
idx
:
3
)
}
else
{
delegate
?
.
LogisticalSelectViewBtnclick
(
idx
:
0
)
}
}
}
@IBOutlet
weak
var
jdBgView
:
UIView
!
var
contentView
:
UIView
!
...
...
@@ -116,8 +167,13 @@ class LogisticalSelectView: UIView {
func
setJD
(){
jdBgViewH
.
constant
=
0
jdBgView
.
isHidden
=
true
}
selectBgHeight
.
constant
=
CGFloat
(
270
)
}
func
setSF
(){
sfBgViewH
.
constant
=
0
sfBgView
.
isHidden
=
true
}
//初始化时将xib中的view添加进来
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
...
...
@@ -126,8 +182,6 @@ class LogisticalSelectView: UIView {
contentView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
top
.
right
.
bottom
.
equalToSuperview
()
}
setJD
()
setXingYuan
()
}
// /初始化时将xib中的view添加进来
required
init
?(
coder
aDecoder
:
NSCoder
)
{
...
...
@@ -137,8 +191,6 @@ class LogisticalSelectView: UIView {
contentView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
top
.
right
.
bottom
.
equalToSuperview
()
}
setJD
()
setXingYuan
()
}
//加载xib
func
loadViewFromNib
()
->
UIView
{
...
...
GeliBusinessPlatform/View/LogisticalSelectView/LogisticalSelectView.xib
View file @
70d2a3f3
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
View file @
70d2a3f3
...
...
@@ -614,12 +614,20 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
//MARK:--增值信息
var
price
:
Float
?
=
0
var
commend
=
""
func
ZengZhiServicesViewControllerFinish
(
price
:
Float
,
content
:
String
)
{
var
zcservice
=
0
var
xcservice
=
0
func
ZengZhiServicesViewControllerFinish
(
price
:
Float
,
content
:
String
,
ZhuangCheN
:
Int
,
XieCheN
:
Int
)
{
self
.
price
=
price
commend
=
content
zcservice
=
ZhuangCheN
xcservice
=
XieCheN
listView
.
reloadData
()
getLogPayPrice
()
}
var
wenduIndex
:
Int
=
0
//0为未选 2冷冻 1冷藏 3常温
//MARK:--控温范围
func
WenDuCellSelect
(
index
:
Int
)
{
...
...
@@ -659,45 +667,36 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
let
alertView
=
LogisticalSelectView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
alertView
.
jdPriceLbl
.
text
=
"京东冷运(预估运费"
+
(
logPayPriceModel
?
.
price_jd
)
!
+
"元)"
if
logPayPriceModel
?
.
price_sf
!=
nil
{
alertView
.
sfPriceLbl
.
text
=
"顺丰冷运(预估运费"
+
String
(
format
:
"%.2f"
,
(
logPayPriceModel
?
.
price_sf
)
!
)
+
"元)"
self
.
view
.
window
?
.
addSubview
(
alertView
)
//暂无京东
// if logPayPriceModel?.price_jd != "-" {
alertView
.
jdSelectBtn
.
isSelected
=
false
alertView
.
sfSelectBtn
.
isSelected
=
true
// let num1 = logPayPriceModel?.price_sf
// let num2 = logPayPriceModel?.price_jd as! NSString
// if num1! > num2.floatValue {
// alertView.jdSelectBtn.isSelected = true
// alertView.sfSelectBtn.isSelected = false
// }
// }
var
futitleArr
:
Array
<
String
>
=
[]
logPayPriceModel
?
.
sf_data
?
.
forEach
({
(
model
)
in
let
str
=
model
.
cn
!
+
":¥"
+
(
model
.
number
)
!
futitleArr
.
append
(
str
)
})
if
alertView
.
sfSelectBtn
.
isSelected
{
alertView
.
fuTitleArr
=
futitleArr
}
alertView
.
xyPriceLbl
.
text
=
"鑫源物流(预估运费"
+
String
(
format
:
"%.2f"
,
(
logPayPriceModel
?
.
price_xy
)
!
)
+
"元)"
self
.
view
.
window
?
.
addSubview
(
alertView
)
alertView
.
setJD
()
weak_alertView
=
alertView
}
func
LogisticalSelectViewBtnclick
(
idx
:
Int
){
if
idx
==
0
{
weak_alertView
?
.
fuTitleArr
=
[]
}
else
if
idx
==
1
{
weak_alertView
?
.
SFfuTitleArr
=
[]
weak_alertView
?
.
XY
fuTitleArr
=
[]
if
idx
==
1
{
var
futitleArr
:
Array
<
String
>
=
[]
logPayPriceModel
?
.
sf_data
?
.
forEach
({
(
model
)
in
let
str
=
model
.
cn
!
+
":¥"
+
(
model
.
number
)
!
futitleArr
.
append
(
str
)
})
weak_alertView
?
.
fuTitleArr
=
futitleArr
}
else
{
weak_alertView
?
.
fuTitleArr
=
[]
weak_alertView
?
.
SFfuTitleArr
=
futitleArr
}
else
if
idx
==
3
{
var
futitleArr
:
Array
<
String
>
=
[]
logPayPriceModel
?
.
xy_data
?
.
forEach
({
(
model
)
in
let
str
=
model
.
cn
!
+
":¥"
+
String
(
format
:
"%.2f"
,
(
model
.
number
)
!
)
futitleArr
.
append
(
str
)
})
weak_alertView
?
.
XYfuTitleArr
=
futitleArr
}
}
...
...
@@ -733,6 +732,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
else
if
index
==
1
{
print
(
"顺丰快件服务协议"
)
vc
.
urlStr
=
logPayPriceModel
!.
kjxy_sf
}
else
if
index
==
12
{
print
(
"顺丰快件服务协议"
)
vc
.
urlStr
=
logPayPriceModel
!.
kjxy_xy
}
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
@@ -1493,6 +1495,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc
.
commend
=
commend
}
vc
.
ZhuangChe
=
zcservice
vc
.
XieChe
=
xcservice
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
}
...
...
@@ -2187,7 +2192,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
return
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
addr
=
[
"s_city"
:
s_city
as
Any
,
"r_city"
:
r_city
as
Any
,
"s_province_name"
:
s_province_name
as
Any
,
"r_province_name"
:
r_province_name
as
Any
,
"s_city_name"
:
s_city_name
as
Any
,
"r_city_name"
:
r_city_name
as
Any
,
"s_district_name"
:
s_district_name
as
Any
,
"r_district_name"
:
r_district_name
as
Any
]
let
addr
=
[
"s_city"
:
s_city
as
Any
,
"r_city"
:
r_city
as
Any
,
"s_province_name"
:
s_province_name
as
Any
,
"r_province_name"
:
r_province_name
as
Any
,
"s_city_name"
:
s_city_name
as
Any
,
"r_city_name"
:
r_city_name
as
Any
,
"s_district_name"
:
s_district_name
as
Any
,
"r_district_name"
:
r_district_name
as
Any
,
"s_address"
:
sendAdr
as
Any
,
"r_address"
:
receiveAdr
as
Any
]
var
home_delivery_on
=
"false"
if
send
==
0
{
...
...
@@ -2197,7 +2202,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
if
receive
==
0
{
site_delivery
=
"true"
}
let
info
=
[
"weight"
:
weight
as
Any
,
"volume"
:
tiJi
as
Any
,
"home_delivery_on"
:
home_delivery_on
as
Any
,
"site_delivery"
:
site_delivery
as
Any
]
let
info
=
[
"weight"
:
weight
as
Any
,
"volume"
:
tiJi
as
Any
,
"home_delivery_on"
:
home_delivery_on
as
Any
,
"site_delivery"
:
site_delivery
as
Any
,
"zcservice"
:
zcservice
as
Any
,
"xcservice"
:
xcservice
as
Any
,
"guarantee_value"
:
price
as
Any
]
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"addr"
:
addr
as
Any
,
"info"
:
info
as
Any
]
...
...
@@ -2205,15 +2210,15 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let
dataModel
=
data
as!
registerModel
self
.
logPayPriceModel
=
dataModel
.
data
self
.
priceLbl
.
text
=
"¥"
+
String
(
format
:
"%.2f"
,
(
dataModel
.
data
?
.
price_jd
)
!
)
if
dataModel
.
data
?
.
price_jd
!=
"-"
{
self
.
priceLbl
.
text
=
"¥"
+
String
(
format
:
"%.2f"
,
(
dataModel
.
data
?
.
price_jd
)
!
)
let
num1
=
dataModel
.
data
?
.
price_sf
let
num2
=
dataModel
.
data
?
.
price_jd
as!
NSString
if
num1
!
>
num2
.
floatValue
{
self
.
priceLbl
.
text
=
"¥"
+
(
dataModel
.
data
?
.
price_jd
)
!
}
}
//
self.priceLbl.text = "¥" + String(format: "%.2f", (dataModel.data?.price_jd)!)
//
if dataModel.data?.price_jd != "-" {
//
self.priceLbl.text = "¥" + String(format: "%.2f", (dataModel.data?.price_jd)!)
//
let num1 = dataModel.data?.price_sf
//
let num2 = dataModel.data?.price_jd as! NSString
//
if num1! > num2.floatValue {
//
self.priceLbl.text = "¥" + (dataModel.data?.price_jd)!
//
}
//
}
})
{
(
error
)
in
}
...
...
@@ -2232,10 +2237,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
site_delivery
=
0
}
if
wenduIndex
==
3
{
wenduIndex
=
4
//(常温)
}
let
infodic
=
[
"order_sn"
:
guanlianDingStr
as
Any
,
"sale_plat"
:
guanlianPingStr
as
Any
,
"express_item_name"
:
itemName
as
Any
,
"package"
:
itemBaoName
as
Any
,
"weight"
:
weight
as
Any
,
"volume"
:
tiJi
as
Any
,
"express_item_qty"
:
count
as
Any
,
...
...
@@ -2260,6 +2268,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
"s_district_name"
:
s_district_name
as
Any
,
"s_address"
:
sendAdr
as
Any
,
"s_mobile"
:
sendPhone
as
Any
,
"s_street_name"
:
""
as
Any
,
"r_consignee"
:
receiver
as
Any
,
"r_country"
:
1
as
Any
,
"r_province"
:
r_province
as
Any
,
...
...
@@ -2269,7 +2278,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
"r_city_name"
:
r_city_name
as
Any
,
"r_district_name"
:
r_district_name
as
Any
,
"r_address"
:
receiveAdr
as
Any
,
"r_mobile"
:
receivePhone
as
Any
]
"r_mobile"
:
receivePhone
as
Any
,
"r_street_name"
:
""
as
Any
]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
...
GeliBusinessPlatform/ViewController/增值服务/ZengZhiServicesViewController.swift
View file @
70d2a3f3
...
...
@@ -8,7 +8,7 @@
import
UIKit
protocol
ZengZhiServicesViewControllerDelegate
{
func
ZengZhiServicesViewControllerFinish
(
price
:
Float
,
content
:
String
)
func
ZengZhiServicesViewControllerFinish
(
price
:
Float
,
content
:
String
,
ZhuangCheN
:
Int
,
XieCheN
:
Int
)
}
class
ZengZhiServicesViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndSelectCellDelegate
,
UITextViewDelegate
,
UITextFieldDelegate
{
...
...
@@ -28,8 +28,7 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
HUD
.
flash
(
.
label
(
"保价金额超出范围"
),
delay
:
1.2
)
return
}
delegate
?
.
ZengZhiServicesViewControllerFinish
(
price
:
str
.
floatValue
,
content
:
commend
)
delegate
?
.
ZengZhiServicesViewControllerFinish
(
price
:
str
.
floatValue
,
content
:
commend
,
ZhuangCheN
:
ZhuangChe
,
XieCheN
:
XieChe
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
...
...
@@ -127,6 +126,13 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
}
inputTF
.
delegate
=
self
// Do any additional setup after loading the view.
if
ZhuangChe
==
1
{
leftB
.
isSelected
=
true
}
if
XieChe
==
1
{
rightB
.
isSelected
=
true
}
}
//MARK: - CELL DELEGATE
...
...
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