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
14f598fa
Commit
14f598fa
authored
Jun 10, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善采购单详情cell适用含预售标识的cell
parent
c370e356
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
3 deletions
+117
-3
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/采购单详情/CGDListCell.swift
GeliBusinessPlatform/ViewController/采购单详情/CGDListCell.swift
+86
-3
GeliBusinessPlatform/ViewController/采购单详情/CGDListCell.xib
GeliBusinessPlatform/ViewController/采购单详情/CGDListCell.xib
+29
-0
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
+2
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
14f598fa
No preview for this file type
GeliBusinessPlatform/ViewController/采购单详情/CGDListCell.swift
View file @
14f598fa
...
@@ -9,22 +9,105 @@
...
@@ -9,22 +9,105 @@
import
UIKit
import
UIKit
class
CGDListCell
:
UITableViewCell
{
class
CGDListCell
:
UITableViewCell
{
///预售图标
@IBOutlet
weak
var
yuShouStatus
:
UILabel
!
///标题左间距
@IBOutlet
weak
var
nameLblLeft
:
NSLayoutConstraint
!
///图标
@IBOutlet
weak
var
leftIcon
:
UIImageView
!
///列表底图
@IBOutlet
weak
var
listBgView
:
UIView
!
@IBOutlet
weak
var
listBgView
:
UIView
!
///按钮底图
@IBOutlet
weak
var
btnBgView
:
UIView
!
@IBOutlet
weak
var
btnBgView
:
UIView
!
///数量
@IBOutlet
weak
var
countLbl
:
UILabel
!
@IBOutlet
weak
var
countLbl
:
UILabel
!
///价格
@IBOutlet
weak
var
priceLbl
:
UILabel
!
@IBOutlet
weak
var
priceLbl
:
UILabel
!
///状态
@IBOutlet
weak
var
statusLbl
:
UILabel
!
@IBOutlet
weak
var
statusLbl
:
UILabel
!
///标题
@IBOutlet
weak
var
nameLbl
:
UILabel
!
@IBOutlet
weak
var
nameLbl
:
UILabel
!
var
dataArr
:
Array
<
Any
>
?
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
self
.
selectionStyle
=
.
none
// Initialization code
// Initialization code
}
}
override
func
layoutIfNeeded
()
{
if
dataArr
!=
nil
{
setListView
(
arr
:
dataArr
!
)
}
super
.
layoutIfNeeded
()
}
func
setBtnView
(
arr
:
Array
<
Any
>
){
//按钮
btnBgView
.
subviews
.
forEach
{
(
view
)
in
view
.
removeFromSuperview
()
}
}
func
setListView
(
arr
:
Array
<
Any
>
){
//列表
listBgView
.
subviews
.
forEach
{
(
view
)
in
view
.
removeFromSuperview
()
}
if
arr
.
count
>
0
{
var
num
=
0
if
arr
.
count
>
4
{
num
=
4
}
else
{
num
=
arr
.
count
}
for
i
in
0
..<
num
{
// let model = dataArr![i]
let
view
=
UIView
()
listBgView
.
addSubview
(
view
)
view
.
backgroundColor
=
UIColor
.
white
view
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
i
*
49
)
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
49
)
}
if
i
!=
num
-
1
{
let
dotLine
=
UIImageView
()
view
.
addSubview
(
dotLine
)
dotLine
.
image
=
UIImage
(
named
:
"dotLine"
)
dotLine
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
15
)
make
.
bottom
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
1
)
}
}
let
lbl
=
UILabel
()
lbl
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
lbl
.
textColor
=
UIColor
(
named
:
"灰色字体颜色"
)
// lbl.text = model.goods_name
view
.
addSubview
(
lbl
)
lbl
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
15
)
make
.
bottom
.
top
.
right
.
equalTo
(
0
)
}
let
lbl2
=
UILabel
()
lbl2
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
lbl2
.
textColor
=
UIColor
(
named
:
"灰色字体颜色"
)
// lbl2.text = "x" + "\(model.number!)"
lbl2
.
textAlignment
=
.
right
view
.
addSubview
(
lbl2
)
lbl2
.
snp
.
makeConstraints
{
(
make
)
in
make
.
right
.
equalTo
(
-
15
)
make
.
bottom
.
left
.
top
.
equalTo
(
0
)
}
}
}
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
super
.
setSelected
(
selected
,
animated
:
animated
)
// Configure the view for the selected state
// Configure the view for the selected state
}
}
...
...
GeliBusinessPlatform/ViewController/采购单详情/CGDListCell.xib
View file @
14f598fa
...
@@ -124,12 +124,35 @@
...
@@ -124,12 +124,35 @@
<rect
key=
"frame"
x=
"0.0"
y=
"48.5"
width=
"345"
height=
"0.0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"48.5"
width=
"345"
height=
"0.0"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
</view>
</view>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"预售"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ekx-rs-uaM"
>
<rect
key=
"frame"
x=
"67"
y=
"15"
width=
"32"
height=
"18"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"32"
id=
"LHh-n4-Z7e"
/>
<constraint
firstAttribute=
"height"
constant=
"18"
id=
"aij-u3-5HC"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"企业、预售字体"
/>
<nil
key=
"highlightedColor"
/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute
type=
"color"
keyPath=
"borderColor"
>
<color
key=
"value"
name=
"企业、预售字体"
/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute
type=
"number"
keyPath=
"borderWidth"
>
<real
key=
"value"
value=
"1"
/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute
type=
"number"
keyPath=
"cornerRadius"
>
<real
key=
"value"
value=
"2"
/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</label>
</subviews>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraints>
<constraint
firstItem=
"ZEQ-bR-jNZ"
firstAttribute=
"leading"
secondItem=
"xNb-6a-mWT"
secondAttribute=
"leading"
id=
"3H6-Mf-efn"
/>
<constraint
firstItem=
"ZEQ-bR-jNZ"
firstAttribute=
"leading"
secondItem=
"xNb-6a-mWT"
secondAttribute=
"leading"
id=
"3H6-Mf-efn"
/>
<constraint
firstItem=
"HVh-eU-WcT"
firstAttribute=
"top"
secondItem=
"xNb-6a-mWT"
secondAttribute=
"top"
constant=
"15"
id=
"3vl-Na-tUS"
/>
<constraint
firstItem=
"HVh-eU-WcT"
firstAttribute=
"top"
secondItem=
"xNb-6a-mWT"
secondAttribute=
"top"
constant=
"15"
id=
"3vl-Na-tUS"
/>
<constraint
firstItem=
"wn2-a8-osu"
firstAttribute=
"top"
secondItem=
"ZEQ-bR-jNZ"
secondAttribute=
"bottom"
id=
"4nM-v6-4eY"
/>
<constraint
firstItem=
"wn2-a8-osu"
firstAttribute=
"top"
secondItem=
"ZEQ-bR-jNZ"
secondAttribute=
"bottom"
id=
"4nM-v6-4eY"
/>
<constraint
firstItem=
"ekx-rs-uaM"
firstAttribute=
"leading"
secondItem=
"CPQ-JB-dO9"
secondAttribute=
"trailing"
constant=
"5"
id=
"5O5-f0-Pp7"
/>
<constraint
firstItem=
"ekx-rs-uaM"
firstAttribute=
"centerY"
secondItem=
"CPQ-JB-dO9"
secondAttribute=
"centerY"
id=
"66g-c2-yre"
/>
<constraint
firstItem=
"CPQ-JB-dO9"
firstAttribute=
"centerY"
secondItem=
"HVh-eU-WcT"
secondAttribute=
"centerY"
id=
"6qc-GO-WUG"
/>
<constraint
firstItem=
"CPQ-JB-dO9"
firstAttribute=
"centerY"
secondItem=
"HVh-eU-WcT"
secondAttribute=
"centerY"
id=
"6qc-GO-WUG"
/>
<constraint
firstItem=
"CPQ-JB-dO9"
firstAttribute=
"leading"
secondItem=
"HVh-eU-WcT"
secondAttribute=
"trailing"
constant=
"5"
id=
"F2c-jm-aNc"
/>
<constraint
firstItem=
"CPQ-JB-dO9"
firstAttribute=
"leading"
secondItem=
"HVh-eU-WcT"
secondAttribute=
"trailing"
constant=
"5"
id=
"F2c-jm-aNc"
/>
<constraint
firstItem=
"HVh-eU-WcT"
firstAttribute=
"leading"
secondItem=
"xNb-6a-mWT"
secondAttribute=
"leading"
constant=
"15"
id=
"I5S-Pm-VYW"
/>
<constraint
firstItem=
"HVh-eU-WcT"
firstAttribute=
"leading"
secondItem=
"xNb-6a-mWT"
secondAttribute=
"leading"
constant=
"15"
id=
"I5S-Pm-VYW"
/>
...
@@ -166,10 +189,13 @@
...
@@ -166,10 +189,13 @@
<connections>
<connections>
<outlet
property=
"btnBgView"
destination=
"KO3-dv-aSL"
id=
"FKG-4d-9rD"
/>
<outlet
property=
"btnBgView"
destination=
"KO3-dv-aSL"
id=
"FKG-4d-9rD"
/>
<outlet
property=
"countLbl"
destination=
"J1p-oh-7KC"
id=
"brI-AH-qUH"
/>
<outlet
property=
"countLbl"
destination=
"J1p-oh-7KC"
id=
"brI-AH-qUH"
/>
<outlet
property=
"leftIcon"
destination=
"HVh-eU-WcT"
id=
"dMO-qL-wPe"
/>
<outlet
property=
"listBgView"
destination=
"ZEQ-bR-jNZ"
id=
"tlg-VJ-Qsv"
/>
<outlet
property=
"listBgView"
destination=
"ZEQ-bR-jNZ"
id=
"tlg-VJ-Qsv"
/>
<outlet
property=
"nameLbl"
destination=
"CPQ-JB-dO9"
id=
"iu0-NX-a71"
/>
<outlet
property=
"nameLbl"
destination=
"CPQ-JB-dO9"
id=
"iu0-NX-a71"
/>
<outlet
property=
"nameLblLeft"
destination=
"F2c-jm-aNc"
id=
"HWs-sw-XVh"
/>
<outlet
property=
"priceLbl"
destination=
"gXv-WF-NRU"
id=
"VRb-af-Nta"
/>
<outlet
property=
"priceLbl"
destination=
"gXv-WF-NRU"
id=
"VRb-af-Nta"
/>
<outlet
property=
"statusLbl"
destination=
"2ga-12-xdH"
id=
"rf1-RB-YLe"
/>
<outlet
property=
"statusLbl"
destination=
"2ga-12-xdH"
id=
"rf1-RB-YLe"
/>
<outlet
property=
"yuShouStatus"
destination=
"ekx-rs-uaM"
id=
"O20-FR-ggQ"
/>
</connections>
</connections>
<point
key=
"canvasLocation"
x=
"131.15942028985509"
y=
"96.428571428571431"
/>
<point
key=
"canvasLocation"
x=
"131.15942028985509"
y=
"96.428571428571431"
/>
</tableViewCell>
</tableViewCell>
...
@@ -185,6 +211,9 @@
...
@@ -185,6 +211,9 @@
<namedColor
name=
"个人中心灰色字体"
>
<namedColor
name=
"个人中心灰色字体"
>
<color
red=
"0.3919999897480011"
green=
"0.3919999897480011"
blue=
"0.3919999897480011"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.3919999897480011"
green=
"0.3919999897480011"
blue=
"0.3919999897480011"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"企业、预售字体"
>
<color
red=
"1"
green=
"0.68999999761581421"
blue=
"0.47099998593330383"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"标题字颜色"
>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
...
...
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
View file @
14f598fa
...
@@ -37,6 +37,8 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
...
@@ -37,6 +37,8 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"CGDCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CGDCell"
)
listView
.
register
(
UINib
(
nibName
:
"CGDCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CGDCell"
)
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
...
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