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
528b32c9
Commit
528b32c9
authored
May 15, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单详情修改新样式
parent
6426cb11
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
249 additions
and
129 deletions
+249
-129
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/View/Cell/PingLunCell.swift
GeliBusinessPlatform/View/Cell/PingLunCell.swift
+28
-0
GeliBusinessPlatform/View/Cell/PingLunCell.xib
GeliBusinessPlatform/View/Cell/PingLunCell.xib
+78
-0
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+135
-129
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
528b32c9
...
...
@@ -257,6 +257,8 @@
E0DDCB19244AE2AC00DF54C7
/* XiuGaiYuShouJiaViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0DDCB17244AE2AC00DF54C7
/* XiuGaiYuShouJiaViewController.xib */
;
};
E0DDCB1D244AE81800DF54C7
/* GuanLianKeHuCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0DDCB1B244AE81800DF54C7
/* GuanLianKeHuCell.swift */
;
};
E0DDCB1E244AE81800DF54C7
/* GuanLianKeHuCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0DDCB1C244AE81800DF54C7
/* GuanLianKeHuCell.xib */
;
};
E0E341EA246E95EE0060AC20
/* PingLunCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0E341E8246E95EE0060AC20
/* PingLunCell.swift */
;
};
E0E341EB246E95EE0060AC20
/* PingLunCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0E341E9246E95EE0060AC20
/* PingLunCell.xib */
;
};
E0E8ABFD246E359700E3BB54
/* GuiGeModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0E8ABFC246E359700E3BB54
/* GuiGeModel.swift */
;
};
E0F1BE382469220D003015B2
/* RongSticker.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0F1BE2A24692208003015B2
/* RongSticker.bundle */
;
};
E0F1BE392469220D003015B2
/* RCColor.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0F1BE2B24692208003015B2
/* RCColor.plist */
;
};
...
...
@@ -738,6 +740,8 @@
E0DDCB17244AE2AC00DF54C7
/* XiuGaiYuShouJiaViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
XiuGaiYuShouJiaViewController.xib
;
sourceTree
=
"<group>"
;
};
E0DDCB1B244AE81800DF54C7
/* GuanLianKeHuCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GuanLianKeHuCell.swift
;
sourceTree
=
"<group>"
;
};
E0DDCB1C244AE81800DF54C7
/* GuanLianKeHuCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GuanLianKeHuCell.xib
;
sourceTree
=
"<group>"
;
};
E0E341E8246E95EE0060AC20
/* PingLunCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PingLunCell.swift
;
sourceTree
=
"<group>"
;
};
E0E341E9246E95EE0060AC20
/* PingLunCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
PingLunCell.xib
;
sourceTree
=
"<group>"
;
};
E0E8ABFC246E359700E3BB54
/* GuiGeModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GuiGeModel.swift
;
sourceTree
=
"<group>"
;
};
E0F1BE2A24692208003015B2
/* RongSticker.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
path
=
RongSticker.bundle
;
sourceTree
=
"<group>"
;
};
E0F1BE2B24692208003015B2
/* RCColor.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
RCColor.plist
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1867,6 +1871,8 @@
E0B9462A2456AABE00FBEC9A
/* YuShouWeiKuanFaHuoCell.xib */
,
E00E48BC2457BAC700F16545
/* XuanZeShangPinCell.swift */
,
E00E48BD2457BAC700F16545
/* XuanZeShangPinCell.xib */
,
E0E341E8246E95EE0060AC20
/* PingLunCell.swift */
,
E0E341E9246E95EE0060AC20
/* PingLunCell.xib */
,
);
path
=
Cell
;
sourceTree
=
"<group>"
;
...
...
@@ -2547,6 +2553,7 @@
F95A9EDE24557CD500867849
/* GuanLianKehuVC.xib in Resources */
,
E07B1E6C245926330055BA3C
/* GYSGLCell.xib in Resources */
,
E0337EEE2464EED000952EF4
/* PinPaiListViewController.xib in Resources */
,
E0E341EB246E95EE0060AC20
/* PingLunCell.xib in Resources */
,
E0273DDE24551D4500B3FCAE
/* OnlyLabelCell.xib in Resources */
,
E00D85E5244561FE00F5F816
/* Assets.xcassets in Resources */
,
E0206331246CE303007A40C4
/* OrderDViewSumFooter.xib in Resources */
,
...
...
@@ -2800,6 +2807,7 @@
F950FDD824518B9500C40530
/* FSCalendarDelegationProxy.m in Sources */
,
E01EA1A0245A5D6B00F019D5
/* YunDanXiangQingViewController.swift in Sources */
,
F956D5A0246A2D9C003FF510
/* LMNImageView.m in Sources */
,
E0E341EA246E95EE0060AC20
/* PingLunCell.swift in Sources */
,
F956D5A2246A2D9C003FF510
/* LMNWebViewController.m in Sources */
,
F950FDDF24518B9500C40530
/* FSCalendarSeparatorDecorationView.m in Sources */
,
F9023F692449A50900DD5A63
/* TitleContentCell.swift in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
528b32c9
No preview for this file type
GeliBusinessPlatform/View/Cell/PingLunCell.swift
0 → 100644
View file @
528b32c9
//
// PingLunCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/15.
// Copyright © 2020 junye lu. All rights reserved.
//
import
UIKit
class
PingLunCell
:
UITableViewCell
{
@IBOutlet
weak
var
contentLbl
:
UILabel
!
@IBOutlet
weak
var
nameLbl
:
UILabel
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
// Initialization code
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
// Configure the view for the selected state
}
}
GeliBusinessPlatform/View/Cell/PingLunCell.xib
0 → 100644
View file @
528b32c9
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"15702"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"15704"
/>
<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"
id=
"KGk-i7-Jjw"
customClass=
"PingLunCell"
customModule=
"GeliBusinessPlatform"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"49"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"49"
/>
<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=
"9hM-p4-cpX"
>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"27"
height=
"48"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"uoz-6f-uUt"
>
<rect
key=
"frame"
x=
"15"
y=
"48"
width=
"360"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"灰色分界线"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"CqM-TL-TQx"
/>
</constraints>
</view>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"bianji"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ai0-qt-tes"
>
<rect
key=
"frame"
x=
"326"
y=
"8"
width=
"34"
height=
"33"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
verticalHuggingPriority=
"251"
text=
"13"
textAlignment=
"right"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"u0y-iz-OFK"
>
<rect
key=
"frame"
x=
"57"
y=
"10"
width=
"254"
height=
"28"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstItem=
"ai0-qt-tes"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"5oH-2t-kQI"
/>
<constraint
firstItem=
"9hM-p4-cpX"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"86r-8N-l4b"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"uoz-6f-uUt"
secondAttribute=
"trailing"
id=
"BdK-06-1qc"
/>
<constraint
firstItem=
"uoz-6f-uUt"
firstAttribute=
"top"
secondItem=
"u0y-iz-OFK"
secondAttribute=
"bottom"
constant=
"10"
id=
"DMM-rT-fU8"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"ai0-qt-tes"
secondAttribute=
"trailing"
constant=
"15"
id=
"DnZ-1u-7hX"
/>
<constraint
firstItem=
"u0y-iz-OFK"
firstAttribute=
"leading"
secondItem=
"9hM-p4-cpX"
secondAttribute=
"trailing"
constant=
"15"
id=
"GCP-he-xgh"
/>
<constraint
firstItem=
"uoz-6f-uUt"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"IWn-od-1KQ"
/>
<constraint
firstItem=
"u0y-iz-OFK"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"10"
id=
"Lmy-tr-bzu"
/>
<constraint
firstItem=
"uoz-6f-uUt"
firstAttribute=
"top"
secondItem=
"9hM-p4-cpX"
secondAttribute=
"bottom"
id=
"iDZ-J7-NXw"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"uoz-6f-uUt"
secondAttribute=
"bottom"
id=
"n0B-iM-v7R"
/>
<constraint
firstItem=
"9hM-p4-cpX"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"q2Q-IK-ynT"
/>
<constraint
firstItem=
"ai0-qt-tes"
firstAttribute=
"leading"
secondItem=
"u0y-iz-OFK"
secondAttribute=
"trailing"
constant=
"15"
id=
"w97-SL-zh2"
/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"contentLbl"
destination=
"u0y-iz-OFK"
id=
"UlA-85-uH9"
/>
<outlet
property=
"nameLbl"
destination=
"9hM-p4-cpX"
id=
"0Pr-Hd-ejy"
/>
</connections>
<point
key=
"canvasLocation"
x=
"131.15942028985509"
y=
"127.56696428571428"
/>
</tableViewCell>
</objects>
<resources>
<image
name=
"bianji"
width=
"17"
height=
"16.5"
/>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"灰色分界线"
>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"灰色字体颜色"
>
<color
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
528b32c9
...
...
@@ -8,11 +8,11 @@
import
UIKit
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
CommendCellDelegate
,
GeliAlertViewDelegate
,
GLAlertSelectViewDelegate
{
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
,
GLAlertSelectViewDelegate
{
var
orderId
:
Int
?
//订单编号
var
isYuShou
:
Bool
=
fals
e
//是否预售
var
isYuShou
:
Bool
=
tru
e
//是否预售
var
dataArr
:
NSArray
=
[
"a"
,
"b"
]
//订单产品数据
var
btmBtnsTitleArr
:
Array
<
String
>
=
[]
//底栏按钮数据
...
...
@@ -29,18 +29,18 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let
zhiFuFangShiArr
=
[
"未支付"
,
"现金"
,
"转账(私)"
,
"转账(公)"
,
"转账(微信)"
,
"转账(支付宝)"
]
var
zhiFuSelect
:
Int
?
//选择支付方式
var
zhiFuStatus
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
let
zhiFuStatus
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
var
zhiFuStatusSelect
:
Int
?
//付款状态
let
wuLiuFSArr
=
[
"京东冷链"
,
"顺丰冷运"
,
"达达速运"
]
var
wuLiuSelect
:
Int
?
//物流选择
@IBOutlet
weak
var
btmViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
bottomView
:
UIView
!
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
bottomBgView
:
UIView
!
var
cell4Height
=
18.5
var
cell5Height
=
18.5
var
cell9Height
=
18.5
var
cellH
:
CGFloat
=
30.5
//MARK:--加载数据
var
dataMdoel
:
OrderDetailDataModel
?
=
nil
...
...
@@ -55,7 +55,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self
.
isYuShou
=
true
}
else
{
self
.
isYuShou
=
false
}
self
.
btmBtnsTitleArr
.
removeAll
()
self
.
bottomView
.
subviews
.
forEach
{
(
view
)
in
...
...
@@ -63,7 +63,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
//MARK:--底部视图,根据数据显示
self
.
btmBtnsTitleArr
=
self
.
getOrderBottomBtnTitleStrByStatus
(
status
:
(
self
.
dataMdoel
?
.
order_res
?
.
order_status
)
!
)
if
self
.
btmBtnsTitleArr
.
count
==
0
{
self
.
btmViewH
.
constant
=
0
self
.
bottomView
.
isHidden
=
true
...
...
@@ -88,7 +88,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
})
{
(
error
)
in
}
}
override
func
viewDidLoad
()
{
...
...
@@ -96,7 +96,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
navbar
.
title
=
"订单详情"
self
.
view
.
addSubview
(
navbar
)
loadData
()
SetTopFrameView
(
view
:
listView
,
btmView
:
bottomView
)
// Do any additional setup after loading the view.
...
...
@@ -104,13 +104,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"XuanZeShangPinCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"XuanZeShangPinCell"
)
listView
.
register
(
UINib
(
nibName
:
"CommendCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CommendCell"
)
listView
.
register
(
UINib
(
nibName
:
"PingLunCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"PingLunCell"
)
}
//MARK: - 底部自定义方法
@objc
func
bottomBtnClick
(
sender
:
UIButton
){
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
switch
sender
.
titleLabel
?
.
text
{
...
...
@@ -119,7 +119,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let
vc
=
XiuGaiYuShouJiaViewController
()
vc
.
dataModel
=
self
.
dataMdoel
vc
.
orderID
=
self
.
orderId
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
let
vc
=
ChangeGoodsPriceVC
()
...
...
@@ -199,7 +199,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
switch
section
{
...
...
@@ -221,8 +221,19 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return
view
}
//MARK: - cell delegate
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
indexPath
.
section
==
4
{
if
indexPath
.
row
==
5
{
print
(
"运单号"
)
}
if
indexPath
.
row
==
9
{
print
(
"备注"
)
}
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
cell
.
delegate
=
self
...
...
@@ -250,13 +261,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell
.
lineView
.
isHidden
=
true
}
//MARK:--暂时不显示CELL图片
// cell.imageView.
// cell.imageView.
let
rowModel
=
self
.
dataMdoel
?
.
order_goods
!
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
rowModel
?
.
goods_name
cell
.
detailLbl
.
text
=
rowModel
?
.
goods_attr
cell
.
priceLbl
.
text
=
"¥"
+
(
rowModel
?
.
goods_price
!
)
!
return
cell
case
2
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
...
...
@@ -266,29 +277,29 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell
.
textTF
.
text
=
yuShouTitleArr
[
indexPath
.
row
]
cell
.
delegate
=
self
//MARK:--预售商品,定金,尾款,合计,物流费用,其他费用 cell
switch
indexPath
.
row
{
case
0
:
print
(
"预售定金"
)
print
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
!
break
case
1
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
)
!
break
case
2
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
goods_amount
)
!
break
case
3
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
logistics_price
)
!
break
case
4
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
other_price
)
!
break
default
:
break
}
case
0
:
print
(
"预售定金"
)
print
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
)
!
break
case
1
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
)
!
break
case
2
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
goods_amount
)
!
break
case
3
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
logistics_price
)
!
break
case
4
:
cell
.
textTF
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
?
.
other_price
)
!
break
default
:
break
}
if
indexPath
.
row
==
yuShouTitleArr
.
count
-
1
{
cell
.
line
.
isHidden
=
true
...
...
@@ -308,7 +319,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break
default
:
break
}
cell
.
delegate
=
self
if
indexPath
.
row
==
nonYuShouTitleArr
.
count
-
1
{
...
...
@@ -321,7 +332,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
textTF
.
isUserInteractionEnabled
=
false
cell
.
nameLbl
.
text
=
nonYuShouPart3Arr
[
indexPath
.
row
]
if
self
.
dataMdoel
?
.
receiving
==
nil
{
cell
.
textTF
.
text
=
"-"
}
else
{
...
...
@@ -342,25 +353,25 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return
cell
case
4
:
//MARK:--订单信息cell
if
indexPath
.
row
==
4
||
indexPath
.
row
==
5
||
indexPath
.
row
==
9
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"
CommendCell"
)
as!
Commend
Cell
cell
.
delegate
=
self
if
indexPath
.
row
==
5
||
indexPath
.
row
==
9
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"
PingLunCell"
)
as!
PingLun
Cell
cell
.
tag
=
indexPath
.
row
cell
.
titl
eLbl
.
text
=
YuShouPart3Arr
[
indexPath
.
row
]
cell
.
nam
eLbl
.
text
=
YuShouPart3Arr
[
indexPath
.
row
]
switch
indexPath
.
row
{
case
5
:
cell
.
place
Lbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lwb_no
if
self
.
dataMdoel
?
.
order_res
?
.
lwb_no
==
nil
{
cell
.
place
Lbl
.
text
=
"-"
}
else
if
cell
.
place
Lbl
.
text
?
.
count
==
0
{
cell
.
place
Lbl
.
text
=
"请输入物流单号"
}
cell
.
content
Lbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lwb_no
if
self
.
dataMdoel
?
.
order_res
?
.
lwb_no
==
nil
{
cell
.
content
Lbl
.
text
=
"-"
}
else
if
cell
.
content
Lbl
.
text
?
.
count
==
0
{
cell
.
content
Lbl
.
text
=
"请输入物流单号"
}
break
case
9
:
cell
.
place
Lbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
if
cell
.
place
Lbl
.
text
?
.
count
==
0
{
cell
.
place
Lbl
.
text
=
"请输入留言信息"
cell
.
content
Lbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
if
cell
.
content
Lbl
.
text
?
.
count
==
0
{
cell
.
content
Lbl
.
text
=
"请输入留言信息"
}
break
default
:
...
...
@@ -368,9 +379,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return
cell
}
if
indexPath
.
row
==
6
||
indexPath
.
row
==
7
{
if
indexPath
.
row
==
4
||
indexPath
.
row
==
6
||
indexPath
.
row
==
7
{
cell
.
nameLbl
.
text
=
YuShouPart3Arr
[
indexPath
.
row
]
switch
indexPath
.
row
{
case
4
:
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lc_name
break
case
6
:
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
pay_type_cn
break
...
...
@@ -405,7 +419,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case
8
:
cell
.
textTF
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
postscript
break
default
:
break
}
...
...
@@ -418,9 +432,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return
cell
}
func
CommendCellSendStr
(
content
:
String
,
cell
:
CommendCell
)
{
print
(
"CommendCellSendStr"
)
}
//MARK:--查看全部商品
func
OrderDViewFooterViewBtnClick
()
{
print
(
"查看全部商品"
)
...
...
@@ -437,9 +449,23 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self
.
dataMdoel
?
.
order_res
?
.
cus_name
=
self
.
selectKeHuData
?
.
cus_name
//暂时不刷新数据,只刷新视图
listView
.
reloadData
()
}
}
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
switch
cell
.
nameLbl
.
text
{
case
"物流公司"
:
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
!
}
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
break
case
"关联客户"
:
let
vc
=
GuanLianKehuVC
()
vc
.
delegate
=
self
...
...
@@ -484,11 +510,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
if
view
.
titleLbl
.
text
==
"请选择支付方式"
{
zhiFuSelect
=
selectNum
self
.
dataMdoel
?
.
order_res
?
.
pay_type_cn
=
zhiFuFangShiArr
[
selectNum
]
}
else
if
view
.
titleLbl
.
text
==
"请选择物流公司"
{
wuLiuSelect
=
selectNum
self
.
dataMdoel
?
.
order_res
?
.
lc_name
=
wuLiuFSArr
[
selectNum
]
}
else
{
zhiFuStatusSelect
=
selectNum
self
.
dataMdoel
?
.
order_res
?
.
pay_status_cn
=
zhiFuStatus
[
selectNum
]
}
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
listView
.
reloadData
()
}
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
{
glSelectView
?
.
removeFromSuperview
()
...
...
@@ -505,7 +537,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return
5
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
self
.
dataMdoel
==
nil
{
return
0
...
...
@@ -519,12 +551,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
var
num
=
0
if
self
.
dataMdoel
!=
nil
{
if
(
self
.
dataMdoel
?
.
order_goods
?
.
count
)
!
<
2
{
num
=
(
self
.
dataMdoel
?
.
order_goods
?
.
count
)
!
}
else
{
num
=
2
}
num
=
(
self
.
dataMdoel
?
.
order_goods
?
.
count
)
!
}
else
{
num
=
2
}
}
return
num
}
case
2
:
...
...
@@ -544,8 +576,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return
0
}
}
//MARK: - footer delegate
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
switch
section
{
...
...
@@ -576,24 +608,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return
120
case
3
:
switch
indexPath
.
row
{
case
4
:
print
(
cell4Height
)
return
CGFloat
(
cell4Height
)
+
cellH
case
5
:
return
CGFloat
(
cell5Height
)
+
cellH
case
9
:
return
CGFloat
(
cell9Height
)
+
cellH
// case 5:
//
// case 9:
default
:
break
}
case
4
:
switch
indexPath
.
row
{
case
4
:
return
CGFloat
(
cell4Height
)
+
cellH
case
5
:
return
CGFloat
(
cell5Height
)
+
cellH
case
9
:
return
CGFloat
(
cell9Height
)
+
cellH
// case 5:
//
// case 9:
default
:
break
}
...
...
@@ -645,58 +670,40 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
}
//MARK: - 自定义 delegate
func
CommendCellSendH
(
height
:
CGFloat
,
cell
:
CommendCell
)
{
switch
cell
.
tag
{
case
4
:
cell4Height
=
Double
(
height
)
break
case
5
:
cell5Height
=
Double
(
height
)
break
case
9
:
cell9Height
=
Double
(
height
)
break
default
:
break
}
listView
.
beginUpdates
()
listView
.
endUpdates
()
}
//MARK:--根据数据获取底部按钮操作
func
getOrderBottomBtnTitleStrByStatus
(
status
:
Int
)
->
Array
<
String
>
{
var
titleArr
:
Array
<
String
>
=
[]
switch
status
{
case
0
,
1
:
// str = "未确定" "待付款"
case
0
,
1
:
// str = "未确定" "待付款"
titleArr
=
[
"修改价格"
,
"打印"
,
"确认订单"
,
"取消订单"
]
break
case
6
:
// str = "待发货"
break
case
6
:
// str = "待发货"
titleArr
=
[
"直接发货"
,
"打印"
,
"退款"
]
break
case
7
:
// str = "待收货"
break
case
7
:
// str = "待收货"
titleArr
=
[
"退货"
,
"打印"
,
"退款"
]
break
//订单完成
case
5
:
// str = "订单完成"
break
//订单完成
case
5
:
// str = "订单完成"
titleArr
=
[
"打印"
,
"退款"
]
break
//订单关闭
case
8
,
2
:
// str = "订单关闭"str = "已取消" //用户取消(预售
break
//订单关闭
case
8
,
2
:
// str = "订单关闭"str = "已取消" //用户取消(预售
titleArr
=
[]
break
default
:
break
}
return
titleArr
break
default
:
break
}
return
titleArr
}
//MARK:--确认和取消订单
...
...
@@ -706,7 +713,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if
isSrueOrder
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
orderConfirm
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"确认成功"
),
delay
:
1.2
)
self
.
loadData
()
...
...
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