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
04aa9143
Commit
04aa9143
authored
Aug 11, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
货拉拉下单调试
parent
a59e414b
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
354 additions
and
82 deletions
+354
-82
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+8
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/Contents.json
...Platform/Assets.xcassets/地址管理/edit.imageset/Contents.json
+23
-0
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/edit.png
...inessPlatform/Assets.xcassets/地址管理/edit.imageset/edit.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/edit@2x.png
...ssPlatform/Assets.xcassets/地址管理/edit.imageset/edit@2x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/edit@3x.png
...ssPlatform/Assets.xcassets/地址管理/edit.imageset/edit@3x.png
+0
-0
GeliBusinessPlatform/Model/LalamoveInterface/LalamoveModel.swift
...inessPlatform/Model/LalamoveInterface/LalamoveModel.swift
+6
-2
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.swift
...form/ViewController/个人中心/PersonCenterViewController.swift
+20
-10
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.xib
...atform/ViewController/个人中心/PersonCenterViewController.xib
+0
-0
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
...ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
+0
-0
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.xib
...m/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.xib
+6
-2
GeliBusinessPlatform/ViewController/货拉拉/下单联系人信息/XiaDanUserInfoViewController.swift
...Controller/货拉拉/下单联系人信息/XiaDanUserInfoViewController.swift
+20
-4
GeliBusinessPlatform/ViewController/货拉拉/下单联系人信息/XiaDanUserInfoViewController.xib
...ewController/货拉拉/下单联系人信息/XiaDanUserInfoViewController.xib
+10
-1
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
...wController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
+17
-7
GeliBusinessPlatform/ViewController/货拉拉/费用明细/LogisticsCostDetailViewController.swift
...ntroller/货拉拉/费用明细/LogisticsCostDetailViewController.swift
+46
-3
GeliBusinessPlatform/ViewController/货拉拉/费用明细/LogisticsCostDetailViewController.xib
...Controller/货拉拉/费用明细/LogisticsCostDetailViewController.xib
+7
-5
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.swift
...essPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.swift
+9
-2
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.xib
...inessPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.xib
+2
-2
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/OnlyViewCell.swift
...sPlatform/ViewController/货拉拉/运单详情/cell/OnlyViewCell.swift
+72
-0
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/OnlyViewCell.xib
...essPlatform/ViewController/货拉拉/运单详情/cell/OnlyViewCell.xib
+61
-0
GeliBusinessPlatform/ViewController/货拉拉/额外需求/OtherDemandViewController.swift
...m/ViewController/货拉拉/额外需求/OtherDemandViewController.swift
+47
-44
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
04aa9143
...
...
@@ -90,6 +90,8 @@
E02FD9F72455790800E10E27
/* DiZhiGuanLiCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E02FD9F52455790800E10E27
/* DiZhiGuanLiCell.xib */
;
};
E02FD9FA24557E8600E10E27
/* XinZengDiZhiViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E02FD9F824557E8600E10E27
/* XinZengDiZhiViewController.swift */
;
};
E02FD9FB24557E8600E10E27
/* XinZengDiZhiViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E02FD9F924557E8600E10E27
/* XinZengDiZhiViewController.xib */
;
};
E030515324E2304600AFB9E9
/* OnlyViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E030515124E2304600AFB9E9
/* OnlyViewCell.swift */
;
};
E030515424E2304600AFB9E9
/* OnlyViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E030515224E2304600AFB9E9
/* OnlyViewCell.xib */
;
};
E030DF362485DD3E002764D3
/* NewRKCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E030DF342485DD3E002764D3
/* NewRKCell.swift */
;
};
E030DF372485DD3E002764D3
/* NewRKCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E030DF352485DD3E002764D3
/* NewRKCell.xib */
;
};
E030DF3B248651A5002764D3
/* NewRKVc.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E030DF39248651A5002764D3
/* NewRKVc.swift */
;
};
...
...
@@ -716,6 +718,8 @@
E02FD9F52455790800E10E27
/* DiZhiGuanLiCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
DiZhiGuanLiCell.xib
;
sourceTree
=
"<group>"
;
};
E02FD9F824557E8600E10E27
/* XinZengDiZhiViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
XinZengDiZhiViewController.swift
;
sourceTree
=
"<group>"
;
};
E02FD9F924557E8600E10E27
/* XinZengDiZhiViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
XinZengDiZhiViewController.xib
;
sourceTree
=
"<group>"
;
};
E030515124E2304600AFB9E9
/* OnlyViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
OnlyViewCell.swift
;
sourceTree
=
"<group>"
;
};
E030515224E2304600AFB9E9
/* OnlyViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
OnlyViewCell.xib
;
sourceTree
=
"<group>"
;
};
E030DF342485DD3E002764D3
/* NewRKCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
NewRKCell.swift
;
sourceTree
=
"<group>"
;
};
E030DF352485DD3E002764D3
/* NewRKCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
NewRKCell.xib
;
sourceTree
=
"<group>"
;
};
E030DF39248651A5002764D3
/* NewRKVc.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
NewRKVc.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -3053,6 +3057,8 @@
F96E48A924CA9559000AB8D4
/* TitleTimeHeaderFooterView.xib */
,
F993C66C24CADE2400493CC7
/* WayBillStautsTableViewCell.swift */
,
F993C66D24CADE2400493CC7
/* WayBillStautsTableViewCell.xib */
,
E030515124E2304600AFB9E9
/* OnlyViewCell.swift */
,
E030515224E2304600AFB9E9
/* OnlyViewCell.xib */
,
);
path
=
cell
;
sourceTree
=
"<group>"
;
...
...
@@ -3289,6 +3295,7 @@
E09B3AD724B2FCAF00E3B238
/* ShareSDKConfigFile.bundle in Resources */
,
E06524FA24581A7900CA22E2
/* ChuKuCell.xib in Resources */
,
E0CC848824823EC1009B1FE9
/* CRKCell.xib in Resources */
,
E030515424E2304600AFB9E9
/* OnlyViewCell.xib in Resources */
,
E0337EF62464FCFC00952EF4
/* GYSListViewController.xib in Resources */
,
F96E48AA24CA9559000AB8D4
/* TitleTimeHeaderFooterView.xib in Resources */
,
E0706EF524B40BE800D8251C
/* TitleAndTfYuanCell.xib in Resources */
,
...
...
@@ -3708,6 +3715,7 @@
F9011C1024CE6FB200AAF4F5
/* LogisticalSelectView.swift in Sources */
,
F950FDDC24518B9500C40530
/* FSCalendar.m in Sources */
,
F9FF7BA124760DA9006E305E
/* LogisticsCompanyModel.swift in Sources */
,
E030515324E2304600AFB9E9
/* OnlyViewCell.swift in Sources */
,
E0206327246CD84A007A40C4
/* TitleAndLblView.swift in Sources */
,
E007B1D4248F6880004D14CC
/* CGDDayCell.swift in Sources */
,
F942A7FD247500C300FDFC47
/* TestClass.swift in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
04aa9143
No preview for this file type
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/Contents.json
0 → 100644
View file @
04aa9143
{
"images"
:
[
{
"filename"
:
"edit.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"edit@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"edit@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/edit.png
0 → 100644
View file @
04aa9143
327 Bytes
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/edit@2x.png
0 → 100644
View file @
04aa9143
666 Bytes
GeliBusinessPlatform/Assets.xcassets/地址管理/edit.imageset/edit@3x.png
0 → 100644
View file @
04aa9143
1.09 KB
GeliBusinessPlatform/Model/LalamoveInterface/LalamoveModel.swift
View file @
04aa9143
...
...
@@ -223,7 +223,10 @@ class orderPriceCalculateDataModel: Mappable {
var
total_price_fen
:
Float
?
//订单预估总价
var
order_vehicle_name
:
String
?
var
exceed_distance
:
Int
?
var
spec_req_price_arr
:
Array
<
orderPriceCalculateSpecReqDataModel
>
?
//增值(额外)服务项已经价格
var
order_price_arr
:
Array
<
orderPriceCalculateOrderPriceDataModel
>
?
// var vehicle_std_price_arr:Array<>
required
init
?(
map
:
Map
)
{
}
...
...
@@ -234,7 +237,8 @@ class orderPriceCalculateDataModel: Mappable {
total_price_fen
<-
map
[
"total_price_fen"
]
order_vehicle_name
<-
map
[
"order_vehicle_name"
]
exceed_distance
<-
map
[
"exceed_distance"
]
spec_req_price_arr
<-
map
[
"spec_req_price_arr"
]
order_price_arr
<-
map
[
"order_price_arr"
]
}
}
class
orderPriceCalculateSpecReqDataModel
:
Mappable
{
...
...
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.swift
View file @
04aa9143
...
...
@@ -11,6 +11,7 @@ import Photos
import
Alamofire
import
SwiftDate
class
PersonCenterViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
@IBOutlet
weak
var
editBtn
:
UIButton
!
@IBOutlet
weak
var
shopNameLbl
:
UILabel
!
@IBOutlet
weak
var
iconImg
:
UIImageView
!
...
...
@@ -21,31 +22,31 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
var
dataModel
:
AdminInfoModel
?
=
nil
let
listArray
=
[
"格利支付"
,
"蓝牙打印设置"
,
"权限设置"
]
//MARK:--加载数据
func
loadData
(){
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
HUD
.
flash
(
.
progress
)
adminInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
HUD
.
hide
()
self
.
dataModel
=
(
data
as!
AdminInfoModel
)
self
.
iconImg
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
(
self
.
dataModel
?
.
data
?
.
shop_img
)
!
),
placeholderImage
:
UIImage
.
init
(
named
:
"个人设置头像"
))
//
// self.iconImg.sd_setImage(with: URL(string: SERVERCE_ImageHost + (self.dataModel?.data?.shop_img)!), placeholderImage: UIImage.init(named: "个人设置头像"))
self
.
shopNameLbl
.
text
=
self
.
dataModel
?
.
data
?
.
stall_name
self
.
nameLbl
.
text
=
self
.
nowDateStr
()
})
{
(
error
)
in
}
self
.
nameLbl
.
text
=
self
.
nowDateStr
()
}
func
nowDateStr
()
->
String
{
let
date
=
Date
()
+
8
.
hours
if
date
.
compare
(
.
isMorning
)
{
return
"Hi~早上好!"
return
"Hi~早上好!"
+
(
dataModel
?
.
data
?
.
shop_name
!
)
!
}
else
if
date
.
compare
(
.
isAfternoon
)
{
return
"Hi~下午好!"
return
"Hi~下午好!"
+
(
dataModel
?
.
data
?
.
shop_name
!
)
!
}
else
if
date
.
compare
(
.
isEvening
)
{
return
"Hi~傍晚好!"
return
"Hi~傍晚好!"
+
(
dataModel
?
.
data
?
.
shop_name
!
)
!
}
else
if
date
.
compare
(
.
isNight
)
{
return
"Hi~深夜了!"
return
"Hi~深夜了!"
+
(
dataModel
?
.
data
?
.
shop_name
!
)
!
}
return
""
}
...
...
@@ -78,6 +79,15 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
listView
?
.
register
(
UINib
(
nibName
:
"PersonCenterCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"listCell"
)
// Do any additional setup after loading the view.
let
btn
=
UIButton
()
self
.
view
.
addSubview
(
btn
)
btn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerY
.
equalTo
(
editBtn
.
snp
.
centerY
)
make
.
left
.
equalTo
(
15
)
make
.
height
.
width
.
equalTo
(
17
)
}
btn
.
setImage
(
UIImage
(
named
:
"xiaoxi"
),
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
toMsgCenterAction(_:)
)
,
for
:
.
touchUpInside
)
/*
自适应字体大小后重新编辑背景框
shopNameLbl.text = "123"
...
...
@@ -111,7 +121,7 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
}
//MARK:--跳转消息中心
@
IBAction
func
toMsgCenterAction
(
_
sender
:
Any
)
{
@
objc
func
toMsgCenterAction
(
_
sender
:
Any
)
{
print
(
"跳转消息中心"
)
let
vc
=
MsgCenterViewController
()
...
...
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.xib
View file @
04aa9143
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
View file @
04aa9143
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.xib
View file @
04aa9143
...
...
@@ -11,6 +11,7 @@
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"XiaYunDanViewController"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"YuGuPriceLbl"
destination=
"b3u-F0-etc"
id=
"F8r-lf-53O"
/>
<outlet
property=
"bottomView"
destination=
"BXb-QP-ceT"
id=
"mix-bc-FvQ"
/>
<outlet
property=
"hBtnViewH"
destination=
"udi-Jp-eUF"
id=
"lD6-tv-X0U"
/>
<outlet
property=
"hListView"
destination=
"IhS-vZ-6YK"
id=
"8cK-6U-GmQ"
/>
...
...
@@ -262,8 +263,8 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
6050.30
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"b3u-F0-etc"
>
<rect
key=
"frame"
x=
"86.666666666666671"
y=
"769.66666666666663"
width=
"
66.000000000000014
"
height=
"24"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
--
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"b3u-F0-etc"
>
<rect
key=
"frame"
x=
"86.666666666666671"
y=
"769.66666666666663"
width=
"
20.666666666666671
"
height=
"24"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"17"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -302,6 +303,9 @@
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute
type=
"boolean"
keyPath=
"gradientHorizontal"
value=
"YES"
/>
</userDefinedRuntimeAttributes>
<connections>
<action
selector=
"setHllOrder:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"xEH-rI-yma"
/>
</connections>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"下运单"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"WGD-xV-qZB"
>
<rect
key=
"frame"
x=
"333.66666666666669"
y=
"771.66666666666663"
width=
"51"
height=
"24"
/>
...
...
GeliBusinessPlatform/ViewController/货拉拉/下单联系人信息/XiaDanUserInfoViewController.swift
View file @
04aa9143
...
...
@@ -9,9 +9,11 @@
import
UIKit
import
LGButton
import
ContactsUI
protocol
XiaDanUserInfoViewControllerDelegate
{
func
XiaDanUserInfoViewControllerData
(
str
:
NSString
)
}
class
XiaDanUserInfoViewController
:
BaseViewController
,
CNContactPickerDelegate
,
UITextViewDelegate
{
var
delegate
:
XiaDanUserInfoViewControllerDelegate
?
@IBOutlet
weak
var
messageCountLbl
:
UILabel
!
@IBOutlet
weak
var
messageTV
:
UITextView
!
@IBOutlet
weak
var
userPhoneTF
:
UITextField
!
...
...
@@ -24,9 +26,14 @@ class XiaDanUserInfoViewController: BaseViewController , CNContactPickerDelegate
self
.
view
.
addSubview
(
navbar
)
SetTopFrame
(
view
:
contentV
,
height
:
370
)
messageTV
.
delegate
=
self
}
orderTimeLbl
.
text
=
getTimeNow
()
}
@IBAction
func
gotoPhoneAccoutAction
(
_
sender
:
UIButton
)
{
print
(
"gotoPhoneAccoutAction-获取通讯录"
)
//联系人选择控制器
...
...
@@ -36,6 +43,9 @@ class XiaDanUserInfoViewController: BaseViewController , CNContactPickerDelegate
//弹出控制器
self
.
present
(
contactPicker
,
animated
:
true
,
completion
:
nil
)
}
//单选联系人
func
contactPicker
(
_
picker
:
CNContactPickerViewController
,
didSelect
contact
:
CNContact
)
{
...
...
@@ -60,8 +70,13 @@ class XiaDanUserInfoViewController: BaseViewController , CNContactPickerDelegate
}
@IBAction
func
sureUserInfoAction
(
_
sender
:
LGButton
)
{
if
userPhoneTF
.
text
!.
count
==
0
||
userPhoneTF
.
text
!.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写联系人及联系电话"
),
delay
:
1.2
)
return
}
print
(
"sureUserInfoAction-确定"
)
delegate
?
.
XiaDanUserInfoViewControllerData
(
str
:
"
\(
userNameTF
!.
text
!
)
_
\(
userPhoneTF
!.
text
!
)
_
\(
messageTV
!.
text
!
)
"
as
NSString
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
messageCountLbl
.
text
=
"(
\(
textView
.
text
.
count
)
/200)"
...
...
@@ -79,5 +94,6 @@ class XiaDanUserInfoViewController: BaseViewController , CNContactPickerDelegate
}
}
}
}
GeliBusinessPlatform/ViewController/货拉拉/下单联系人信息/XiaDanUserInfoViewController.xib
View file @
04aa9143
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097
.2
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
...
...
@@ -99,6 +99,9 @@
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
/>
<connections>
<outlet
property=
"delegate"
destination=
"-1"
id=
"5Ta-pi-xhC"
/>
</connections>
</textField>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入联系电话"
textAlignment=
"right"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"tmU-Qx-tY7"
>
<rect
key=
"frame"
x=
"83"
y=
"140.5"
width=
"217"
height=
"40"
/>
...
...
@@ -108,6 +111,9 @@
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
/>
<connections>
<outlet
property=
"delegate"
destination=
"-1"
id=
"791-qA-fh2"
/>
</connections>
</textField>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"rDc-7c-CwA"
>
<rect
key=
"frame"
x=
"0.0"
y=
"180.5"
width=
"414"
height=
"5"
/>
...
...
@@ -133,6 +139,9 @@
<real
key=
"value"
value=
"5"
/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<outlet
property=
"delegate"
destination=
"-1"
id=
"JPC-08-MGX"
/>
</connections>
</textView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"(0/200)"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Tht-t1-aXt"
>
<rect
key=
"frame"
x=
"80"
y=
"206"
width=
"39.5"
height=
"15.5"
/>
...
...
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
View file @
04aa9143
...
...
@@ -23,7 +23,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
var
tempLat
:
CLLocationDegrees
=
0
var
tempLng
:
CLLocationDegrees
=
0
var
tempCityName
=
""
var
detailAdrStr
=
""
@objc
func
backToCurrentLoc
(
_
sender
:
Any
)
{
print
(
"返回当前位置"
)
...
...
@@ -76,7 +76,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
return
historyArr
.
count
}
var
delegate
:
ToAndFormSelectViewControllerDelegate
?
var
dict
:
Dictionary
<
String
,
Any
>
=
Dictionary
()
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
loc
:
cityListDataModel
!
var
nameStr
=
""
...
...
@@ -316,15 +316,18 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
print
(
"sureSelectAddressAction"
)
if
adrDatas
!.
count
>
0
{
for
item
in
adrDatas
!
{
if
cityName
.
contains
(
item
.
name
!
)
{
print
(
"cityNmae = "
,
cityName
,
item
.
name
)
if
specRecord
.
contains
(
item
.
name
!
)
{
adrData
=
item
print
(
"test result == "
,
adrData
?
.
city_id
)
}
}
var
dict
:
Dictionary
<
String
,
Any
>
=
Dictionary
()
dict
[
"menPai"
]
=
addressDetailTF
.
text
dict
[
"shouHuoRen"
]
=
nameTF
.
text
dict
[
"phoneNum"
]
=
phoneTF
.
text
dict
[
"adr"
]
=
adrData
dict
[
"detailAdr"
]
=
detailAdrStr
if
locName
.
count
>
0
{
dict
[
"locName"
]
=
titleLbl
!.
text
var
sr_type
=
1
...
...
@@ -357,9 +360,10 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
"contact_phone_no"
:
phoneTF
.
text
as
Any
,
"sr_type"
:
sr_type
as
Any
]
print
(
"dic == "
,
dict
)
HUD
.
flash
(
.
progress
)
setSearchLog
(
dic
,
success
:
{
(
data
)
in
self
.
delegate
?
.
ToAndFormSelectViewControllerSelectAdr
(
dict
:
self
.
dict
,
idx
:
self
.
idx
!
)
HUD
.
hide
()
self
.
delegate
?
.
ToAndFormSelectViewControllerSelectAdr
(
dict
:
dict
,
idx
:
self
.
idx
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
err
)
in
...
...
@@ -381,6 +385,10 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
var
detailAdr
:
String
=
""
var
moveAdrName
=
""
var
isMove
=
false
var
specRecord
=
""
func
onPOISearchDone
(
_
request
:
AMapPOISearchBaseRequest
!
,
response
:
AMapPOISearchResponse
!
)
{
if
response
.
count
==
0
{
...
...
@@ -423,6 +431,8 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
if
loc
==
nil
{
citySelectBtn
.
setTitle
(
cityName
as
String
,
for
:
.
normal
)
}
specRecord
=
cityName
as
String
+
(
response
.
pois
.
first
?
.
district
)
!
//通过富文本来设置行间距
let
paraph
=
NSMutableParagraphStyle
()
//将行间距设置为28
...
...
@@ -433,7 +443,6 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
city
=
response
.
pois
.
first
!.
city
ad
=
response
.
pois
.
first
?
.
address
as!
String
districet
=
response
.
pois
.
first
?
.
district
as!
String
moveAdrName
=
response
.
pois
.
first
?
.
name
as!
String
if
adrName
.
count
>
0
{
...
...
@@ -442,6 +451,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
titleLbl
!.
text
=
adrName
str
=
detailAdr
}
detailAdrStr
=
"
\(
city
)
_
\(
districet
)
_
\(
ad
)
_
\(
titleLbl
!.
text
)
"
let
attributes
=
[
NSAttributedString
.
Key
.
font
:
UIFont
.
systemFont
(
ofSize
:
11
),
NSAttributedString
.
Key
.
paragraphStyle
:
paraph
]
...
...
GeliBusinessPlatform/ViewController/货拉拉/费用明细/LogisticsCostDetailViewController.swift
View file @
04aa9143
...
...
@@ -9,15 +9,24 @@
import
UIKit
class
LogisticsCostDetailViewController
:
BaseViewController
{
var
model
:
orderPriceCalculateModel
?
// var carModel:vehicle_arr_data?
@IBOutlet
weak
var
lineView
:
UIView
!
@IBOutlet
weak
var
contentV
:
UIView
!
@IBOutlet
weak
var
priceLbl
:
UILabel
!
@IBOutlet
weak
var
roadKM
:
UILabel
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"费用明细"
self
.
view
.
addSubview
(
navbar
)
priceLbl
.
text
=
"
\(
model
!.
data
!.
total_price_fen
!/
100
)
"
roadKM
.
text
=
"(总里程
\(
model
!.
data
!.
distance_total
!
)
公里)"
SetTopFrameView
(
view
:
contentV
,
btmView
:
self
.
view
)
setCostDetailView
()
...
...
@@ -47,8 +56,42 @@ class LogisticsCostDetailViewController: BaseViewController {
make
.
top
.
equalTo
(
lineView
.
snp_bottom
)
.
offset
(
30
)
}
leftLbl
.
text
=
"起步价(小面包车)"
rightLbl
.
text
=
"¥4548.8"
leftLbl
.
text
=
"起步价(
\(
model
!.
data
!.
order_vehicle_name
!
)
)"
for
item
in
model
!.
data
!.
order_price_arr
!
{
if
item
.
type
==
1
{
rightLbl
.
text
=
"¥
\(
String
(
describing
:
item
.
price_fen
!/
100
)
)
"
}
}
for
i
in
0
..<
model
!.
data
!.
spec_req_price_arr
!.
count
{
let
leftL
=
UILabel
()
leftL
.
textAlignment
=
.
left
leftL
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
leftL
.
font
=
UIFont
.
init
(
name
:
"PingFang SC"
,
size
:
13
)
contentV
.
addSubview
(
leftL
)
let
rightL
=
UILabel
()
rightL
.
textAlignment
=
.
right
rightL
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
rightL
.
font
=
UIFont
.
init
(
name
:
"PingFang SC"
,
size
:
13
)
contentV
.
addSubview
(
rightL
)
let
y
=
5
+
CGFloat
(
25
)
*
CGFloat
(
i
)
leftL
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
45
)
make
.
top
.
equalTo
(
leftLbl
.
snp_bottom
)
.
offset
(
y
)
}
rightL
.
snp
.
makeConstraints
{
(
make
)
in
make
.
right
.
equalTo
(
-
45
)
make
.
centerY
.
equalTo
(
leftL
.
snp_centerY
)
}
let
mo
=
model
?
.
data
?
.
spec_req_price_arr
!
[
i
]
leftL
.
text
=
mo
?
.
name
!
let
price
=
mo
!.
price_fen
!/
100
rightL
.
text
=
"
\(
price
)
"
}
}
...
...
GeliBusinessPlatform/ViewController/货拉拉/费用明细/LogisticsCostDetailViewController.xib
View file @
04aa9143
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097
.2
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
...
...
@@ -13,6 +13,8 @@
<connections>
<outlet
property=
"contentV"
destination=
"e3L-UF-DVw"
id=
"1NT-my-Rg0"
/>
<outlet
property=
"lineView"
destination=
"cYG-RP-3Ac"
id=
"rkw-i7-b7g"
/>
<outlet
property=
"priceLbl"
destination=
"4zD-0t-aeW"
id=
"IdF-6T-P3f"
/>
<outlet
property=
"roadKM"
destination=
"mah-gJ-VGh"
id=
"Yqm-EJ-6hu"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</placeholder>
...
...
@@ -24,19 +26,19 @@
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"e3L-UF-DVw"
>
<rect
key=
"frame"
x=
"0.0"
y=
"44"
width=
"414"
height=
"852"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
5262.2
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"4zD-0t-aeW"
>
<rect
key=
"frame"
x=
"1
08.5"
y=
"52"
width=
"98
.5"
height=
"42"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
--
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"4zD-0t-aeW"
>
<rect
key=
"frame"
x=
"1
70.5"
y=
"52"
width=
"36
.5"
height=
"42"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"30"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"wQA-CT-1Xv"
>
<rect
key=
"frame"
x=
"
90
.5"
y=
"66"
width=
"15"
height=
"21"
/>
<rect
key=
"frame"
x=
"
152
.5"
y=
"66"
width=
"15"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"15"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"(总里程
328.5
公里)"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"mah-gJ-VGh"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"(总里程
--
公里)"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"mah-gJ-VGh"
>
<rect
key=
"frame"
x=
"210"
y=
"66"
width=
"184"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"15"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
...
...
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.swift
View file @
04aa9143
...
...
@@ -12,10 +12,12 @@ import SDWebImage
protocol
HLLTopCellDelegate
{
func
HLLTopCellBtnClick
(
idx
:
Int
)
func
HLLTopCellScrollIdx
(
idx
:
Int
)
// func HLLTopCellOtherClick(isSelect:Bool)
}
class
HLLTopCell
:
UITableViewCell
,
UIScrollViewDelegate
{
var
idx
=
0
var
delegate
:
HLLTopCellDelegate
?
@IBAction
func
btnClick
(
_
sender
:
UIButton
)
{
leftBtn
.
isHidden
=
false
rightBtn
.
isHidden
=
false
...
...
@@ -53,6 +55,12 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate {
}
}
@IBOutlet
weak
var
btnView
:
UIView
!
@objc
func
otherClick
(
_
sender
:
UIButton
)
{
print
(
"abc"
)
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
leftBtn
.
isHidden
=
false
rightBtn
.
isHidden
=
false
...
...
@@ -110,10 +118,9 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate {
self
.
selectionStyle
=
.
none
}
override
func
layoutIfNeeded
()
{
super
.
layoutIfNeeded
()
if
scrollView
==
nil
{
scrollView
=
UIScrollView
(
frame
:
scViewBg
.
bounds
)
scViewBg
.
addSubview
(
scrollView
!
)
...
...
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.xib
View file @
04aa9143
...
...
@@ -19,7 +19,7 @@
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"6H1-9e-5gM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"1
26"
width=
"375"
height=
"55
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"1
30"
width=
"375"
height=
"51
"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"长宽高"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AsL-1h-Y7c"
>
<rect
key=
"frame"
x=
"167.5"
y=
"0.0"
width=
"40"
height=
"18.5"
/>
...
...
@@ -73,7 +73,7 @@
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstItem=
"AsL-1h-Y7c"
firstAttribute=
"top"
secondItem=
"6H1-9e-5gM"
secondAttribute=
"top"
id=
"4Dh-9v-gYg"
/>
<constraint
firstAttribute=
"height"
constant=
"5
5
"
id=
"7Is-x1-1hq"
/>
<constraint
firstAttribute=
"height"
constant=
"5
1
"
id=
"7Is-x1-1hq"
/>
<constraint
firstItem=
"wLi-w7-vL4"
firstAttribute=
"top"
secondItem=
"6H1-9e-5gM"
secondAttribute=
"top"
id=
"EzS-pi-dWY"
/>
<constraint
firstItem=
"Yit-BG-pxY"
firstAttribute=
"centerY"
secondItem=
"aC7-Bu-5oE"
secondAttribute=
"centerY"
id=
"FEL-Zp-Y4G"
/>
<constraint
firstItem=
"Yit-BG-pxY"
firstAttribute=
"leading"
secondItem=
"dcU-lR-ZVX"
secondAttribute=
"leading"
id=
"GgP-zY-J9k"
/>
...
...
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/OnlyViewCell.swift
0 → 100644
View file @
04aa9143
//
// OnlyViewCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/8/11.
// Copyright © 2020 junye lu. All rights reserved.
//
import
UIKit
protocol
OnlyViewCellDelegate
{
func
OnlyViewCellSelect
(
idx
:
String
)
}
class
OnlyViewCell
:
UITableViewCell
{
var
delegate
:
OnlyViewCellDelegate
?
@IBOutlet
weak
var
btnViewH
:
NSLayoutConstraint
!
var
datas
:
Array
<
vehicle_std_arr_data
>
?
@IBOutlet
weak
var
btnView
:
UIView
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
// Initialization code
}
var
isNotReady
:
Bool
=
true
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
if
isNotReady
{
for
index
in
0
..<
datas
!.
count
{
let
item
=
datas
!
[
index
]
let
width
=
fullScreenWidth
-
30
let
w
=
width
/
3
let
cols
=
3
let
col
=
index
%
cols
let
row
=
index
/
cols
let
shopX
=
CGFloat
(
col
)
*
(
w
+
10
)
let
shopY
=
CGFloat
(
row
)
*
(
20
+
5
)
let
btn
=
UIButton
(
frame
:
CGRect
(
x
:
shopX
,
y
:
shopY
,
width
:
w
,
height
:
20
))
btn
.
setImage
(
UIImage
(
named
:
"daixuan"
),
for
:
.
normal
)
btn
.
setImage
(
UIImage
(
named
:
"yuxuan"
),
for
:
.
selected
)
btn
.
addTarget
(
self
,
action
:
#selector(
carSelect(sender:)
)
,
for
:
.
touchUpInside
)
btn
.
tag
=
index
btn
.
setTitle
(
" "
+
item
.
name
!
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
11
)
btn
.
setTitleColor
(
UIColor
(
named
:
"灰色字体颜色"
),
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
btnView
.
addSubview
(
btn
)
if
index
==
datas
!.
count
-
1
{
btnViewH
.
constant
=
shopY
+
20
isNotReady
=
false
}
}
}
}
@objc
func
carSelect
(
sender
:
UIButton
){
if
sender
.
isSelected
{
sender
.
isSelected
=
false
}
else
{
sender
.
isSelected
=
true
}
delegate
?
.
OnlyViewCellSelect
(
idx
:
datas
!
[
sender
.
tag
]
.
name
!
)
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
// Configure the view for the selected state
}
}
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/OnlyViewCell.xib
0 → 100644
View file @
04aa9143
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097.2"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<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"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
rowHeight=
"120"
id=
"KGk-i7-Jjw"
customClass=
"OnlyViewCell"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"358"
height=
"70"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
ambiguous=
"YES"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"358"
height=
"70"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"车型要求(选填)"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nxw-mB-tIY"
>
<rect
key=
"frame"
x=
"15"
y=
"15"
width=
"343"
height=
"15"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"15"
id=
"SwB-bC-emJ"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"提示语字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"iu3-IV-bvt"
>
<rect
key=
"frame"
x=
"15"
y=
"35"
width=
"328"
height=
"20"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"20"
id=
"Em9-Te-Ur4"
/>
</constraints>
</view>
</subviews>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"iu3-IV-bvt"
secondAttribute=
"bottom"
constant=
"5"
id=
"4Vy-jc-B8s"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"nxw-mB-tIY"
secondAttribute=
"trailing"
id=
"J0o-lx-7Qv"
/>
<constraint
firstItem=
"iu3-IV-bvt"
firstAttribute=
"top"
secondItem=
"nxw-mB-tIY"
secondAttribute=
"bottom"
constant=
"5"
id=
"ZEM-Bc-0bm"
/>
<constraint
firstItem=
"nxw-mB-tIY"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"kyu-lW-jyd"
/>
<constraint
firstItem=
"nxw-mB-tIY"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"15"
id=
"lCG-YP-UeP"
/>
<constraint
firstItem=
"iu3-IV-bvt"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"ty5-cS-pOb"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"iu3-IV-bvt"
secondAttribute=
"trailing"
constant=
"15"
id=
"zHv-gn-NaB"
/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"btnView"
destination=
"iu3-IV-bvt"
id=
"7yu-Zh-1ee"
/>
<outlet
property=
"btnViewH"
destination=
"Em9-Te-Ur4"
id=
"PgY-Yr-rgk"
/>
</connections>
<point
key=
"canvasLocation"
x=
"89.855072463768124"
y=
"111.16071428571428"
/>
</tableViewCell>
</objects>
<resources>
<namedColor
name=
"提示语字体颜色"
>
<color
red=
"0.70588235294117652"
green=
"0.70588235294117652"
blue=
"0.70588235294117652"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
GeliBusinessPlatform/ViewController/货拉拉/额外需求/OtherDemandViewController.swift
View file @
04aa9143
...
...
@@ -8,41 +8,75 @@
import
UIKit
import
LGButton
protocol
OtherDemandViewControllerDelegate
{
func
OtherDemandViewControllerResult
(
strs
:
Array
<
spec_req_arr_data
>
,
selectArr
:
Array
<
Int
>
)
}
class
OtherDemandViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
var
delegate
:
OtherDemandViewControllerDelegate
?
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
carModel
!=
nil
&&
((
carModel
?
.
spec_req_arr
!.
count
)
!
)
>
0
{
return
(
carModel
?
.
spec_req_arr
!.
count
)
!
}
return
0
}
@IBOutlet
weak
var
sureBtn
:
LGButton
!
@IBOutlet
weak
var
listView
:
UITableView
!
var
carModel
:
cityCartDataModel
?
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
if
selectArr
.
count
==
0
{
if
carModel
!=
nil
&&
carModel
!.
spec_req_arr
!.
count
>
0
{
for
_
in
carModel
!.
spec_req_arr
!
{
selectArr
.
append
((
carModel
?
.
spec_req_arr
!.
count
)
!
)
}
}
}
navbar
.
title
=
"额外需求"
self
.
view
.
addSubview
(
navbar
)
SetTopFrameView
(
view
:
listView
,
btmView
:
sureBtn
)
listView
.
separatorStyle
=
.
none
listView
.
register
(
UINib
(
nibName
:
"TitleAndSelectCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndSelectCell"
)
}
var
selectArr
:
Array
<
Int
>
=
[]
@IBAction
func
sureDemandAction
(
_
sender
:
LGButton
)
{
print
(
"sureDemandAction"
)
var
tempArr
:
Array
<
spec_req_arr_data
>
=
[]
for
item
in
selectArr
{
if
item
!=
selectArr
.
count
{
tempArr
.
append
((
carModel
?
.
spec_req_arr
!
[
item
])
as!
spec_req_arr_data
)
}
}
delegate
?
.
OtherDemandViewControllerResult
(
strs
:
tempArr
,
selectArr
:
selectArr
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
print
(
indexPath
)
let
item
=
selectArr
[
indexPath
.
row
]
if
item
==
indexPath
.
row
{
selectArr
.
insert
(
selectArr
.
count
,
at
:
indexPath
.
row
)
}
else
{
selectArr
.
insert
(
indexPath
.
row
,
at
:
indexPath
.
row
)
}
selectArr
.
remove
(
at
:
indexPath
.
row
+
1
)
tableView
.
reloadData
()
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
50
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
2
}
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
2
;
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelectCell"
)
as!
TitleAndSelectCell
if
indexPath
.
row
==
0
{
cell
.
line
.
isHidden
=
true
let
data
=
(
carModel
?
.
spec_req_arr
!
[
indexPath
.
row
])
cell
.
titleLbl
.
text
=
data
?
.
name
cell
.
tag
=
indexPath
.
row
if
cell
.
tag
==
selectArr
[
indexPath
.
row
]
{
cell
.
selectBtn
.
isSelected
=
true
}
else
{
cell
.
line
.
isHidden
=
false
cell
.
selectBtn
.
isSelected
=
false
}
return
cell
...
...
@@ -76,41 +110,10 @@ class OtherDemandViewController: BaseViewController ,UITableViewDelegate,UITable
make
.
bottom
.
equalTo
(
-
5
)
}
lbl
.
text
=
"其它服务"
lblFU
.
text
=
"(多选)"
if
section
==
0
{
lbl
.
text
=
"搬运服务"
lblFU
.
text
=
""
}
else
{
lbl
.
text
=
"其它服务"
lblFU
.
text
=
"(多选)"
}
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
{
return
40
}
return
0.01
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
for
suv
in
view
.
subviews
{
suv
.
removeFromSuperview
()
}
if
section
==
0
{
let
lbl
=
UILabel
()
lbl
.
text
=
"以上两种搬运服务二选一,无需求可不选"
lbl
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
lbl
.
font
=
UIFont
.
init
(
name
:
"PingFang SC"
,
size
:
11
)
view
.
addSubview
(
lbl
)
lbl
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
15
)
make
.
top
.
equalTo
(
5
)
}
}
return
view
}
}
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