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
93f8bc21
Commit
93f8bc21
authored
5 years ago
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待补充时间选择
parent
f8abf555
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
309 additions
and
36 deletions
+309
-36
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/VendorModel/VendorListModel.swift
GeliBusinessPlatform/Model/VendorModel/VendorListModel.swift
+2
-0
GeliBusinessPlatform/ViewController/供应商管理/GYSGLCell.swift
GeliBusinessPlatform/ViewController/供应商管理/GYSGLCell.swift
+1
-3
GeliBusinessPlatform/ViewController/供应商管理/GYSGLCell.xib
GeliBusinessPlatform/ViewController/供应商管理/GYSGLCell.xib
+4
-13
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.swift
...Platform/ViewController/供应商管理/GYSListViewController.swift
+92
-4
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
...nessPlatform/ViewController/地址管理/DZGLViewController.swift
+7
-1
GeliBusinessPlatform/ViewController/新增采购单/CGDCell.swift
GeliBusinessPlatform/ViewController/新增采购单/CGDCell.swift
+13
-2
GeliBusinessPlatform/ViewController/新增采购单/CGDCell.xib
GeliBusinessPlatform/ViewController/新增采购单/CGDCell.xib
+148
-6
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
...atform/ViewController/新增采购单/XinCaiGouViewController.swift
+42
-7
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
93f8bc21
No preview for this file type
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Model/VendorModel/VendorListModel.swift
View file @
93f8bc21
...
...
@@ -33,6 +33,7 @@ class VendorListDataModel: Mappable {
var
city
:
Int
?
//市id
var
district
:
Int
?
//区id
var
address
:
String
?
//详细地址
var
contacts_name
:
String
?
//联系人
var
contacts_phone
:
String
?
//联系人电话
var
contacts_mobile
:
String
?
//联系人手机号
var
zhizhao
:
String
?
//营业执照
...
...
@@ -52,6 +53,7 @@ class VendorListDataModel: Mappable {
ven_name
<-
map
[
"ven_name"
]
province
<-
map
[
"province"
]
city
<-
map
[
"city"
]
contacts_name
<-
map
[
"contacts_name"
]
district
<-
map
[
"district"
]
address
<-
map
[
"address"
]
contacts_phone
<-
map
[
"contacts_phone"
]
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/供应商管理/GYSGLCell.swift
View file @
93f8bc21
...
...
@@ -15,9 +15,7 @@ class GYSGLCell: UITableViewCell {
@IBOutlet
weak
var
selectTypeBtn
:
UIButton
!
@IBOutlet
weak
var
selectTypeView
:
UIView
!
@IBAction
func
selectAction
(
_
sender
:
Any
)
{
selectTypeBtn
.
isSelected
=
!
selectTypeBtn
.
isSelected
}
@IBOutlet
weak
var
Lbl3
:
UILabel
!
@IBOutlet
weak
var
Lbl2
:
UILabel
!
@IBOutlet
weak
var
Lbl1
:
UILabel
!
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/供应商管理/GYSGLCell.xib
View file @
93f8bc21
<?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=
"GYSGLCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"GYSGLCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"100"
/>
<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"
>
...
...
@@ -91,22 +92,12 @@
<state
key=
"normal"
image=
"daixuan"
/>
<state
key=
"selected"
image=
"yuxuan"
/>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Hl5-nJ-ltZ"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"60"
height=
"100"
/>
<connections>
<action
selector=
"selectAction:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"gos-H7-iRU"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"q1A-kf-Vam"
secondAttribute=
"trailing"
constant=
"15"
id=
"7rf-NV-2qJ"
/>
<constraint
firstItem=
"Hl5-nJ-ltZ"
firstAttribute=
"leading"
secondItem=
"yTm-Gk-jr3"
secondAttribute=
"leading"
id=
"JZ8-4t-68d"
/>
<constraint
firstItem=
"q1A-kf-Vam"
firstAttribute=
"centerY"
secondItem=
"yTm-Gk-jr3"
secondAttribute=
"centerY"
id=
"Lfn-Bw-qKb"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Hl5-nJ-ltZ"
secondAttribute=
"trailing"
id=
"WTh-w4-hQk"
/>
<constraint
firstAttribute=
"width"
constant=
"60"
id=
"XEz-wR-bpA"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Hl5-nJ-ltZ"
secondAttribute=
"bottom"
id=
"cYf-p4-glJ"
/>
<constraint
firstItem=
"Hl5-nJ-ltZ"
firstAttribute=
"top"
secondItem=
"yTm-Gk-jr3"
secondAttribute=
"top"
id=
"lWD-4j-dMX"
/>
</constraints>
</view>
</subviews>
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.swift
View file @
93f8bc21
...
...
@@ -11,11 +11,68 @@ import UIKit
class
GYSListViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
{
var
searchV
:
SearchBarView
?
=
nil
var
selectTarget
:
VendorListDataModel
?
@IBOutlet
weak
var
topView
:
UIView
!
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
listView
:
UITableView
!
var
barTitle
:
String
?
var
keyWord
=
""
var
page
=
0
var
datas
:
Array
<
VendorListDataModel
>
=
[]
@objc
func
loadData
(){
print
(
"加载数据"
)
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
as
Any
,
"page"
:
page
as
Any
]
vendorList
(
dict
,
success
:
{
(
data
)
in
self
.
datas
.
removeAll
()
let
model
=
data
as!
VendorListModel
self
.
listView
.
mj_header
?
.
endRefreshing
()
self
.
page
=
2
model
.
data
?
.
forEach
({
(
item
)
in
self
.
datas
.
append
(
item
)
})
self
.
listView
.
reloadData
()
if
model
.
data
?
.
count
==
0
{
self
.
listView
?
.
mj_footer
?
.
endRefreshingWithNoMoreData
()
}
else
{
self
.
listView
?
.
mj_footer
?
.
endRefreshing
()
}
})
{
(
error
)
in
}
}
//MARK:--加载更多数据
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
as
Any
,
"page"
:
page
as
Any
]
vendorList
(
dict
,
success
:
{
(
data
)
in
let
dataM
=
data
as!
VendorListModel
if
dataM
.
data
?
.
count
==
0
{
self
.
listView
?
.
mj_footer
?
.
endRefreshingWithNoMoreData
()
}
else
{
self
.
page
+=
1
dataM
.
data
?
.
forEach
({
(
model
)
in
self
.
datas
.
append
(
model
)
})
self
.
listView
.
reloadData
()
self
.
listView
?
.
mj_footer
?
.
endRefreshing
()
}
})
{
(
error
)
in
self
.
listView
?
.
mj_footer
?
.
endRefreshing
()
}
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
barTitle
...
...
@@ -42,6 +99,14 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
listView
.
separatorStyle
=
.
none
listView
.
register
(
UINib
(
nibName
:
"GYSGLCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GYSGLCell"
)
// Do any additional setup after loading the view.
//下拉刷新相关设置
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadData
)
)
self
.
listView
!.
mj_header
=
headerMJ
//上拉加载相关设置
footerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadMoreData
)
)
self
.
listView
!.
mj_footer
=
footerMJ
self
.
listView
?
.
mj_header
?
.
beginRefreshing
()
}
@IBAction
func
addAction
(
_
sender
:
Any
)
{
...
...
@@ -58,23 +123,46 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
}
//MARK: - CELL DELEGATE
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
vc
=
GYSGLViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
if
barTitle
==
"供应商管理"
{
let
vc
=
GYSGLViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
selectTarget
=
datas
[
indexPath
.
row
]
listView
.
reloadData
()
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
105.5
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
3
return
datas
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GYSGLCell"
)
as!
GYSGLCell
let
model
=
datas
[
indexPath
.
row
]
if
barTitle
!=
"供应商管理"
{
cell
.
selectTypeBtn
.
isSelected
=
false
cell
.
selectTypeView
.
isHidden
=
false
if
selectTarget
?
.
ven_id
==
model
.
ven_id
{
cell
.
selectTypeBtn
.
isSelected
=
true
}
}
else
{
cell
.
selectTypeView
.
isHidden
=
true
}
cell
.
Lbl1
.
text
=
model
.
ven_name
!
cell
.
Lbl2
.
text
=
model
.
contacts_name
!
+
" "
+
model
.
contacts_phone
!
cell
.
Lbl3
.
text
=
model
.
p_cn
!
+
model
.
address
!
if
model
.
c_cn
!=
nil
{
cell
.
Lbl3
.
text
=
model
.
p_cn
!
+
model
.
c_cn
!
+
model
.
address
!
if
model
.
d_cn
!=
nil
{
cell
.
Lbl3
.
text
=
model
.
p_cn
!
+
model
.
c_cn
!
+
model
.
d_cn
!
+
model
.
address
!
}
}
return
cell
}
}
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
View file @
93f8bc21
...
...
@@ -206,7 +206,13 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
let
model
=
adrArrs
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
model
.
consignee
cell
.
phoneLbl
.
text
=
model
.
mobile
cell
.
adrLbl
.
text
=
model
.
address
cell
.
adrLbl
.
text
=
model
.
province_cn
!
+
model
.
address
!
if
model
.
city_cn
!=
nil
{
cell
.
adrLbl
.
text
=
model
.
province_cn
!
+
model
.
city_cn
!
+
model
.
address
!
if
model
.
district_cn
!=
nil
{
cell
.
adrLbl
.
text
=
model
.
province_cn
!
+
model
.
city_cn
!
+
model
.
district_cn
!
+
model
.
address
!
}
}
cell
.
btnH
.
constant
=
0
cell
.
xValue
.
constant
=
0
cell
.
blueLbl
.
isHidden
=
true
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增采购单/CGDCell.swift
View file @
93f8bc21
...
...
@@ -7,9 +7,20 @@
//
import
UIKit
protocol
CGDCellDelegate
{
func
CGDCellDelAction
(
cell
:
CGDCell
)
}
class
CGDCell
:
UITableViewCell
{
var
delegate
:
CGDCellDelegate
?
@IBAction
func
delAction
(
_
sender
:
UIButton
)
{
delegate
?
.
CGDCellDelAction
(
cell
:
self
)
}
@IBOutlet
weak
var
cgTotalPrice
:
UILabel
!
@IBOutlet
weak
var
cgPrice
:
UILabel
!
@IBOutlet
weak
var
cgCount
:
UILabel
!
@IBOutlet
weak
var
detailLbl
:
UILabel
!
@IBOutlet
weak
var
nameLbl
:
UILabel
!
@IBOutlet
weak
var
btnWidth
:
NSLayoutConstraint
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增采购单/CGDCell.xib
View file @
93f8bc21
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"13142"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<?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"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"12042"
/>
<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"
id=
"KGk-i7-Jjw"
customClass=
"CGDCell"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"3
20"
height=
"4
4"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"CGDCell"
customModule
=
"TestClass"
customModule
Provider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"3
75"
height=
"17
4"
/>
<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=
"3
20"
height=
"43
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"3
75"
height=
"174
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"c2P-6b-lpC"
>
<rect
key=
"frame"
x=
"15"
y=
"173"
width=
"360"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"灰色分界线"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"tYk-77-cq1"
/>
</constraints>
</view>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"zUM-gk-TDF"
>
<rect
key=
"frame"
x=
"326.5"
y=
"0.0"
width=
"48.5"
height=
"48.5"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"48.5"
id=
"5oN-gR-Ld8"
/>
<constraint
firstAttribute=
"width"
constant=
"48.5"
id=
"IJP-pf-u5R"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<state
key=
"normal"
title=
"移除"
>
<color
key=
"titleColor"
name=
"#F57575"
/>
</state>
<connections>
<action
selector=
"delAction:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"VeY-uG-gFs"
/>
</connections>
</button>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"53n-Ij-aLj"
>
<rect
key=
"frame"
x=
"15"
y=
"15"
width=
"296.5"
height=
"37"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"37"
id=
"Cdm-G9-7ol"
/>
</constraints>
<string
key=
"text"
>
六和川香鸡柳2.5kg/六和川香鸡柳2.六和川香鸡柳2
kg/六和川香鸡六和川香鸡柳2.5kg/六和川香鸡六…
</string>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"13"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"uED-Ck-HCh"
>
<rect
key=
"frame"
x=
"15"
y=
"57"
width=
"345"
height=
"15"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"15"
id=
"Omj-i4-Ql2"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"个人中心灰色字体"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"kBE-rT-dOt"
>
<rect
key=
"frame"
x=
"15"
y=
"82"
width=
"345"
height=
"38.5"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"采购数量"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"0cf-lx-CTb"
>
<rect
key=
"frame"
x=
"25"
y=
"11.5"
width=
"54"
height=
"16"
/>
<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=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"46J-ih-76e"
>
<rect
key=
"frame"
x=
"146"
y=
"11.5"
width=
"53.5"
height=
"16"
/>
<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=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"mJ8-AR-jCS"
>
<rect
key=
"frame"
x=
"270"
y=
"11.5"
width=
"50"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"个人中心灰色字体"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
name=
"app底色"
/>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"mJ8-AR-jCS"
secondAttribute=
"trailing"
constant=
"25"
id=
"A8g-im-XAy"
/>
<constraint
firstItem=
"mJ8-AR-jCS"
firstAttribute=
"centerY"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"centerY"
id=
"AX2-Cs-Llw"
/>
<constraint
firstItem=
"0cf-lx-CTb"
firstAttribute=
"leading"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"leading"
constant=
"25"
id=
"H3G-IO-8JD"
/>
<constraint
firstItem=
"46J-ih-76e"
firstAttribute=
"centerY"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"centerY"
id=
"Nca-EX-ZA8"
/>
<constraint
firstItem=
"0cf-lx-CTb"
firstAttribute=
"centerY"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"centerY"
id=
"i2c-Pg-dFF"
/>
<constraint
firstItem=
"46J-ih-76e"
firstAttribute=
"centerX"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"centerX"
id=
"mv6-TA-BuJ"
/>
<constraint
firstAttribute=
"height"
constant=
"38.5"
id=
"psI-Xx-5yI"
/>
</constraints>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"HF8-ja-1Mp"
>
<rect
key=
"frame"
x=
"50.5"
y=
"135.5"
width=
"33"
height=
"16"
/>
<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=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"m0Z-19-yG6"
>
<rect
key=
"frame"
x=
"171"
y=
"135.5"
width=
"33"
height=
"16"
/>
<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=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"xMe-fM-o6d"
>
<rect
key=
"frame"
x=
"293.5"
y=
"135.5"
width=
"33"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"个人中心灰色字体"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstItem=
"xMe-fM-o6d"
firstAttribute=
"top"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"bottom"
constant=
"15"
id=
"1qd-FP-LcT"
/>
<constraint
firstItem=
"kBE-rT-dOt"
firstAttribute=
"top"
secondItem=
"uED-Ck-HCh"
secondAttribute=
"bottom"
constant=
"10"
id=
"DXT-Nj-hCW"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"uED-Ck-HCh"
secondAttribute=
"trailing"
constant=
"15"
id=
"Dzn-qc-0aj"
/>
<constraint
firstItem=
"xMe-fM-o6d"
firstAttribute=
"centerX"
secondItem=
"mJ8-AR-jCS"
secondAttribute=
"centerX"
id=
"E49-7P-0vg"
/>
<constraint
firstItem=
"53n-Ij-aLj"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"15"
id=
"F36-ij-Hn0"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"zUM-gk-TDF"
secondAttribute=
"trailing"
id=
"GYX-Pp-TVw"
/>
<constraint
firstItem=
"zUM-gk-TDF"
firstAttribute=
"leading"
secondItem=
"53n-Ij-aLj"
secondAttribute=
"trailing"
constant=
"15"
id=
"JH7-Ox-vgW"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"trailing"
constant=
"15"
id=
"Kjn-Yq-ekR"
/>
<constraint
firstItem=
"c2P-6b-lpC"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"LQH-t0-OEw"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"c2P-6b-lpC"
secondAttribute=
"trailing"
id=
"Nfl-mv-J8f"
/>
<constraint
firstItem=
"uED-Ck-HCh"
firstAttribute=
"top"
secondItem=
"53n-Ij-aLj"
secondAttribute=
"bottom"
constant=
"5"
id=
"OWh-uG-IlA"
/>
<constraint
firstItem=
"kBE-rT-dOt"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"ZH2-ul-Rc5"
/>
<constraint
firstItem=
"m0Z-19-yG6"
firstAttribute=
"top"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"bottom"
constant=
"15"
id=
"Zv2-hp-Kwg"
/>
<constraint
firstItem=
"zUM-gk-TDF"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"gwz-w4-HaY"
/>
<constraint
firstItem=
"53n-Ij-aLj"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"i0z-WF-P7a"
/>
<constraint
firstItem=
"HF8-ja-1Mp"
firstAttribute=
"top"
secondItem=
"kBE-rT-dOt"
secondAttribute=
"bottom"
constant=
"15"
id=
"j4F-Nl-GY1"
/>
<constraint
firstItem=
"m0Z-19-yG6"
firstAttribute=
"centerX"
secondItem=
"46J-ih-76e"
secondAttribute=
"centerX"
id=
"sq5-BU-PcI"
/>
<constraint
firstItem=
"uED-Ck-HCh"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"vb1-1w-P6S"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"c2P-6b-lpC"
secondAttribute=
"bottom"
id=
"xqy-z2-fqO"
/>
<constraint
firstItem=
"HF8-ja-1Mp"
firstAttribute=
"centerX"
secondItem=
"0cf-lx-CTb"
secondAttribute=
"centerX"
id=
"zy8-Zj-6iF"
/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"btnWidth"
destination=
"IJP-pf-u5R"
id=
"64D-9I-XmJ"
/>
<outlet
property=
"cgCount"
destination=
"HF8-ja-1Mp"
id=
"GRT-MI-GPA"
/>
<outlet
property=
"cgPrice"
destination=
"m0Z-19-yG6"
id=
"zQy-Cc-uZQ"
/>
<outlet
property=
"cgTotalPrice"
destination=
"xMe-fM-o6d"
id=
"baZ-ZX-rbr"
/>
<outlet
property=
"detailLbl"
destination=
"uED-Ck-HCh"
id=
"zoK-Xu-ytf"
/>
<outlet
property=
"nameLbl"
destination=
"53n-Ij-aLj"
id=
"aPc-sG-d9k"
/>
</connections>
<point
key=
"canvasLocation"
x=
"132.60869565217394"
y=
"132.58928571428572"
/>
</tableViewCell>
</objects>
<resources>
<namedColor
name=
"#F57575"
>
<color
red=
"0.96100002527236938"
green=
"0.45899999141693115"
blue=
"0.45899999141693115"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"app底色"
>
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"个人中心灰色字体"
>
<color
red=
"0.3919999897480011"
green=
"0.3919999897480011"
blue=
"0.3919999897480011"
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>
</resources>
</document>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
View file @
93f8bc21
...
...
@@ -8,7 +8,27 @@
import
UIKit
class
XinCaiGouViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
class
XinCaiGouViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CGDCellDelegate
,
XuanZeShangPinViewControllerDelegate
{
func
XuanZeShangPinViewControllerSubmitAction
(
selectArr
:
Array
<
GetGoodsInfoDataModel
>
)
{
for
item
in
selectArr
{
datas
.
append
(
item
)
}
listView
.
reloadData
()
}
func
XuanZeShangPinViewControllerYuShou
(
YuShouData
:
Array
<
GetGoodsInfoDataModel
>
)
{
}
func
XuanZeShangPinViewControllerEdit
(
selectArr
:
Array
<
GetGoodsInfoDataModel
>
)
{
}
//MARK: - 删除
func
CGDCellDelAction
(
cell
:
CGDCell
)
{
}
//MARK: - 提交审核
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
...
...
@@ -16,8 +36,8 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
}
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
btmLine
:
UIView
!
var
datas
:
Array
<
Any
>
=
[]
let
titleArr
=
[
"采购日期"
,
"供应商"
,
"采购人"
,
"
制单人"
,
"
采购类型"
]
var
datas
:
Array
<
GetGoodsInfoDataModel
>
=
[]
let
titleArr
=
[
"采购日期"
,
"供应商"
,
"采购人"
,
"采购类型"
]
let
holderArr
=
[
""
,
"请选择供应商"
,
"请输入采购人姓名"
,
""
,
"请选择采购类型"
]
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -29,6 +49,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtnCell"
)
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"
)
}
//MARK: - cell delegate
...
...
@@ -39,6 +60,9 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
case
0
:
//时间
break
case
1
:
//供应商
let
vc
=
GYSListViewController
()
vc
.
barTitle
=
"选择供应商"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
4
:
//采购类型
break
...
...
@@ -50,9 +74,11 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
//MARK: - 添加商品
@objc
func
addItemAction
(){
print
(
"add product"
)
datas
.
append
(
"1"
)
listView
.
reloadData
()
let
vc
=
XuanZeShangPinViewController
()
vc
.
delegate
=
self
vc
.
barTitle
=
"选择商品"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
==
0
{
...
...
@@ -76,7 +102,16 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"CGDCell"
)
as!
CGDCell
cell
.
tag
=
indexPath
.
row
cell
.
delegate
=
self
let
model
=
datas
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
model
.
goods_name
!
cell
.
detailLbl
.
text
=
model
.
spec_str
!
+
" ¥"
+
model
.
target_Price
!
+
"x
\(
model
.
target_Count
!
)
"
+
model
.
unit
!
cell
.
cgCount
.
text
=
"
\(
model
.
target_Count
!
)
"
cell
.
cgPrice
.
text
=
model
.
target_Price
!
let
price
=
model
.
target_Price
!
as
NSString
cell
.
cgTotalPrice
.
text
=
"
\(
Float
(
model
.
target_Count
!
)
*
price
.
floatValue
)
"
return
cell
}
...
...
This diff is collapsed.
Click to expand it.
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