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
85266fcb
Commit
85266fcb
authored
Jun 18, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
备注修改完成
parent
114609f9
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
130 additions
and
38 deletions
+130
-38
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/Contents.json
...Platform/Assets.xcassets/订单管理/delS.imageset/Contents.json
+23
-0
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/delS@1x.png
...ssPlatform/Assets.xcassets/订单管理/delS.imageset/delS@1x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/delS@2x.png
...ssPlatform/Assets.xcassets/订单管理/delS.imageset/delS@2x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/delS@3x.png
...ssPlatform/Assets.xcassets/订单管理/delS.imageset/delS@3x.png
+0
-0
GeliBusinessPlatform/View/Cell/OnlyLabelCell.xib
GeliBusinessPlatform/View/Cell/OnlyLabelCell.xib
+4
-3
GeliBusinessPlatform/View/Cell/TitleAndLblCell.swift
GeliBusinessPlatform/View/Cell/TitleAndLblCell.swift
+4
-0
GeliBusinessPlatform/View/Cell/TitleAndLblCell.xib
GeliBusinessPlatform/View/Cell/TitleAndLblCell.xib
+34
-16
GeliBusinessPlatform/View/Cell/TitleAndTFCell.xib
GeliBusinessPlatform/View/Cell/TitleAndTFCell.xib
+2
-2
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
...atform/ViewController/新增采购单/XinCaiGouViewController.swift
+63
-17
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
85266fcb
No preview for this file type
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/Contents.json
0 → 100644
View file @
85266fcb
{
"images"
:
[
{
"filename"
:
"delS@1x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"delS@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"delS@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/delS@1x.png
0 → 100644
View file @
85266fcb
850 Bytes
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/delS@2x.png
0 → 100644
View file @
85266fcb
1.58 KB
GeliBusinessPlatform/Assets.xcassets/订单管理/delS.imageset/delS@3x.png
0 → 100644
View file @
85266fcb
2.42 KB
GeliBusinessPlatform/View/Cell/OnlyLabelCell.xib
View file @
85266fcb
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
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"
/>
<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"
/>
...
...
@@ -10,7 +11,7 @@
<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=
"OnlyLabelCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"OnlyLabelCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"44"
/>
<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"
>
...
...
GeliBusinessPlatform/View/Cell/TitleAndLblCell.swift
View file @
85266fcb
...
...
@@ -10,6 +10,10 @@ import UIKit
class
TitleAndLblCell
:
UITableViewCell
{
@IBOutlet
weak
var
imgRight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
btmLine
:
UIView
!
@IBOutlet
weak
var
btmW
:
NSLayoutConstraint
!
@IBOutlet
weak
var
contentRight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
contentLbl
:
UILabel
!
@IBOutlet
weak
var
nameLbl
:
UILabel
!
override
func
awakeFromNib
()
{
...
...
GeliBusinessPlatform/View/Cell/TitleAndLblCell.xib
View file @
85266fcb
...
...
@@ -2,6 +2,7 @@
<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"
>
<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"
/>
...
...
@@ -21,43 +22,60 @@
<rect
key=
"frame"
x=
"15"
y=
"43"
width=
"305"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"灰色分界线"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"
cj0-kf-8SN
"
/>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"
7hZ-vt-9DW
"
/>
</constraints>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"标题"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"yit-1Y-dYH"
>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"27"
height=
"43"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"252"
verticalHuggingPriority=
"251"
text=
"标题"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"yit-1Y-dYH"
>
<rect
key=
"frame"
x=
"15"
y=
"13"
width=
"27"
height=
"18.5"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"18.5"
id=
"U31-tG-pjN"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"内容"
textAlignment=
"right"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"qgN-Hz-wKY"
>
<rect
key=
"frame"
x=
"278"
y=
"0.0"
width=
"27"
height=
"43"
/>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"delS"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"pmc-vU-Uf4"
>
<rect
key=
"frame"
x=
"305"
y=
"14.5"
width=
"0.0"
height=
"15"
/>
<constraints>
<constraint
firstAttribute=
"width"
id=
"HMa-Pi-Faw"
/>
<constraint
firstAttribute=
"height"
constant=
"15"
id=
"veV-Pg-H0Y"
/>
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"View.tishiLbl.text = ""View.tishiLbl.text = ""View.tishiLbl.text = """
textAlignment=
"right"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"zee-Po-sID"
>
<rect
key=
"frame"
x=
"57"
y=
"15"
width=
"248"
height=
"13"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"FhC-zl-Pqx"
secondAttribute=
"trailing"
id=
"0dP-lG-tJk"
/>
<constraint
firstItem=
"qgN-Hz-wKY"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"BLy-iS-f2e"
/>
<constraint
firstItem=
"FhC-zl-Pqx"
firstAttribute=
"top"
secondItem=
"yit-1Y-dYH"
secondAttribute=
"bottom"
id=
"H9s-B7-yLY"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"qgN-Hz-wKY"
secondAttribute=
"trailing"
constant=
"15"
id=
"HjE-gb-zaY"
/>
<constraint
firstItem=
"yit-1Y-dYH"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"Ijc-8r-P72"
/>
<constraint
firstItem=
"FhC-zl-Pqx"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"Pva-mW-eJ5"
/>
<constraint
firstItem=
"FhC-zl-Pqx"
firstAttribute=
"top"
secondItem=
"qgN-Hz-wKY"
secondAttribute=
"bottom"
id=
"YmO-Ya-ofg"
/>
<constraint
firstItem=
"yit-1Y-dYH"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"ZDx-ia-byC"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"FhC-zl-Pqx"
secondAttribute=
"bottom"
id=
"q5c-dX-dmo"
/>
<constraint
firstItem=
"pmc-vU-Uf4"
firstAttribute=
"leading"
secondItem=
"zee-Po-sID"
secondAttribute=
"trailing"
id=
"3x0-4l-7Mq"
/>
<constraint
firstItem=
"zee-Po-sID"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"15"
id=
"GwD-l1-HuW"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"FhC-zl-Pqx"
secondAttribute=
"trailing"
id=
"If6-Gs-gZd"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"FhC-zl-Pqx"
secondAttribute=
"bottom"
id=
"LYe-vI-oas"
/>
<constraint
firstItem=
"zee-Po-sID"
firstAttribute=
"leading"
secondItem=
"yit-1Y-dYH"
secondAttribute=
"trailing"
constant=
"15"
id=
"Pj9-aB-1Dx"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"pmc-vU-Uf4"
secondAttribute=
"trailing"
constant=
"15"
id=
"Qok-R2-hO0"
/>
<constraint
firstItem=
"pmc-vU-Uf4"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"VxE-7o-zqj"
/>
<constraint
firstItem=
"yit-1Y-dYH"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"g9y-AH-qVF"
/>
<constraint
firstItem=
"FhC-zl-Pqx"
firstAttribute=
"top"
secondItem=
"zee-Po-sID"
secondAttribute=
"bottom"
constant=
"15"
id=
"gMg-Md-ISS"
/>
<constraint
firstItem=
"FhC-zl-Pqx"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"jug-3M-ccD"
/>
<constraint
firstItem=
"yit-1Y-dYH"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"te9-wX-58V"
/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"contentLbl"
destination=
"qgN-Hz-wKY"
id=
"sZW-4d-RVO"
/>
<outlet
property=
"btmLine"
destination=
"FhC-zl-Pqx"
id=
"q0E-2a-h3I"
/>
<outlet
property=
"btmW"
destination=
"HMa-Pi-Faw"
id=
"htd-Lp-MF8"
/>
<outlet
property=
"contentLbl"
destination=
"zee-Po-sID"
id=
"GmM-kp-g5c"
/>
<outlet
property=
"contentRight"
destination=
"3x0-4l-7Mq"
id=
"MWO-ix-mMP"
/>
<outlet
property=
"imgRight"
destination=
"Qok-R2-hO0"
id=
"aeV-7Q-HFP"
/>
<outlet
property=
"nameLbl"
destination=
"yit-1Y-dYH"
id=
"S4K-8f-ncw"
/>
</connections>
<point
key=
"canvasLocation"
x=
"13
2"
y=
"106
"
/>
<point
key=
"canvasLocation"
x=
"13
1.8840579710145"
y=
"105.80357142857143
"
/>
</tableViewCell>
</objects>
<resources>
<image
name=
"delS"
width=
"30"
height=
"30"
/>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
...
...
GeliBusinessPlatform/View/Cell/TitleAndTFCell.xib
View file @
85266fcb
...
...
@@ -31,8 +31,8 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入内容"
textAlignment=
"right"
minimumFontSize=
"17"
clearButtonMode=
"
always
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Q6V-I9-aNd"
>
<rect
key=
"frame"
x=
"2
66.5"
y=
"15.5"
width=
"93
.5"
height=
"19"
/>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入内容"
textAlignment=
"right"
minimumFontSize=
"17"
clearButtonMode=
"
whileEditing
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Q6V-I9-aNd"
>
<rect
key=
"frame"
x=
"2
93.5"
y=
"15.5"
width=
"66
.5"
height=
"19"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
/>
...
...
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
View file @
85266fcb
...
...
@@ -11,7 +11,12 @@ import UIKit
protocol
XinCaiGouViewControllerDelegate
{
func
XinCaiGouViewControllerFinish
()
}
class
XinCaiGouViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CGDCellDelegate
,
XuanZeShangPinViewControllerDelegate
,
ShowTimeSelectViewDelegate
,
GLAlertSelectViewDelegate
,
GYSListViewControllerDelegate
,
UITextFieldDelegate
,
GeliAlertViewDelegate
{
class
XinCaiGouViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CGDCellDelegate
,
XuanZeShangPinViewControllerDelegate
,
ShowTimeSelectViewDelegate
,
GLAlertSelectViewDelegate
,
GYSListViewControllerDelegate
,
UITextFieldDelegate
,
GeliAlertViewDelegate
,
GeliAlertTextViewDelegate
{
func
sureGeliAlertTextViewAction
(
sender
:
String
)
{
contentStr
=
sender
listView
.
reloadData
()
}
var
delegate
:
XinCaiGouViewControllerDelegate
?
...
...
@@ -65,9 +70,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
if
textField
.
tag
==
3
{
cgName
=
textField
.
text
}
if
textField
.
tag
==
5
{
contentStr
=
textField
.
text
}
listView
.
reloadData
()
}
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
...
...
@@ -77,7 +80,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
typeSelect
=
selectNum
if
typeSelect
!=
nil
&&
typeSelect
!=
10086
{
if
typeSelect
!=
10086
{
holderArr
.
insert
(
typeArr
[
typeSelect
],
at
:
4
)
holderArr
.
remove
(
at
:
5
)
listView
.
reloadData
()
...
...
@@ -113,7 +116,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
var
glSelectView
:
GLAlertSelectView
?
var
typeSelect
=
1
var
cgName
:
String
?
var
contentStr
:
String
?
var
contentStr
=
""
//MARK: - 提交审核
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
print
(
"submit"
)
...
...
@@ -183,8 +186,9 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"CGDDayCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CGDDayCell"
)
listView
.
register
(
UINib
(
nibName
:
"CGDCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CGDCell"
)
listView
.
estimatedRowHeight
=
49
listView
.
rowHeight
=
UITableView
.
automaticDimension
listView
.
register
(
UINib
(
nibName
:
"TitleAndLblCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndLblCell"
)
}
//MARK: - cell delegate
...
...
@@ -231,6 +235,19 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
glSelectView
=
view
}
break
case
5
:
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
alterView
.
titleLbl
.
text
=
"请填写备注(选填)"
alterView
.
placerLbl
.
text
=
"请填写备注..."
if
contentStr
.
count
==
0
{
alterView
.
placerLbl
.
isHidden
=
false
}
else
{
alterView
.
textview
.
text
=
contentStr
alterView
.
placerLbl
.
isHidden
=
true
}
self
.
view
.
window
?
.
addSubview
(
alterView
)
break
default
:
break
}
...
...
@@ -273,6 +290,26 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
}
return
cell
}
else
{
if
indexPath
.
row
==
5
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndLblCell"
)
as!
TitleAndLblCell
cell
.
nameLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
btmLine
.
isHidden
=
true
if
contentStr
.
count
!=
0
{
cell
.
contentLbl
.
text
=
contentStr
cell
.
btmW
.
constant
=
15
cell
.
contentRight
.
constant
=
5
cell
.
imgRight
.
constant
=
22
cell
.
contentLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
}
else
{
cell
.
contentLbl
.
text
=
holderArr
[
indexPath
.
row
]
cell
.
btmW
.
constant
=
0
cell
.
contentRight
.
constant
=
0
cell
.
imgRight
.
constant
=
15
cell
.
contentLbl
.
textColor
=
UIColor
(
named
:
"#999999"
)
}
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
if
orderNum
!=
nil
{
cell
.
textTF
.
clearButtonMode
=
.
always
...
...
@@ -289,7 +326,6 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
cell
.
textTF
.
clearButtonMode
=
.
never
}
}
cell
.
nameLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
holderArr
[
indexPath
.
row
]
cell
.
textTF
.
delegate
=
self
...
...
@@ -297,10 +333,6 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
if
indexPath
.
row
==
3
{
cell
.
textTF
.
text
=
cgName
}
if
indexPath
.
row
==
5
{
cell
.
textTF
.
text
=
contentStr
}
return
cell
}
...
...
@@ -320,21 +352,35 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
1
{
return
174
}
if
indexPath
.
section
==
0
{
if
indexPath
.
row
==
0
{
if
orderNum
==
nil
{
return
0.01
}
else
{
return
49
}
}
if
indexPath
.
row
==
5
{
return
tableView
.
rowHeight
if
getStrHeight
(
str
:
contentStr
)
+
30
>
49
{
return
getStrHeight
(
str
:
contentStr
)
+
30
}
}
}
return
49
}
return
174
func
getStrHeight
(
str
:
String
)
->
CGFloat
{
let
lbl
=
UILabel
()
lbl
.
text
=
titleArr
.
last
lbl
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
lbl
.
sizeToFit
()
let
margin
=
lbl
.
bounds
.
size
.
width
+
77
let
viewSize
=
CGSize
(
width
:
fullScreenWidth
-
margin
,
height
:
CGFloat
(
MAXFLOAT
))
let
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
return
(
str
as
NSString
)
.
boundingRect
(
with
:
viewSize
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
[
NSAttributedString
.
Key
.
font
:
font
],
context
:
nil
)
.
height
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
if
section
==
0
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
15
))
...
...
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