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
ca5b8bb8
Commit
ca5b8bb8
authored
Jun 15, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
供应商列表系列完成
parent
eaec96f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
5 deletions
+53
-5
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/供应商管理/GYSGLViewController.swift
...ssPlatform/ViewController/供应商管理/GYSGLViewController.swift
+53
-5
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
ca5b8bb8
No preview for this file type
GeliBusinessPlatform/ViewController/供应商管理/GYSGLViewController.swift
View file @
ca5b8bb8
...
...
@@ -13,14 +13,25 @@ import Photos
protocol
GYSGLViewControllerDelegate
{
func
GYSGLViewControllerFinish
()
}
class
GYSGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
,
TitleAndOnlyBtnCellDelegate
,
SJMapViewControllerDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
,
GeliAlertViewDelegate
{
class
GYSGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
,
TitleAndOnlyBtnCellDelegate
,
SJMapViewControllerDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
,
GeliAlertViewDelegate
,
UITextFieldDelegate
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
HUD
.
flash
(
.
progress
)
let
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
var
cityDict
:
Dictionary
<
String
,
Any
>
=
Dictionary
()
var
areaDict
:
Dictionary
<
String
,
Any
>
=
Dictionary
()
cityDict
[
"area_id"
]
=
""
areaDict
[
"area_id"
]
=
""
if
(
proDict
[
"city_list"
]
as!
NSArray
)
.
count
>
0
{
cityDict
=
(
proDict
[
"city_list"
]
as!
NSArray
)[
cityIndex
]
as!
Dictionary
<
String
,
Any
>
if
(
cityDict
[
"district_list"
]
as!
NSArray
)
.
count
>
0
{
areaDict
=
(
cityDict
[
"district_list"
]
as!
NSArray
)[
areaIndex
]
as!
Dictionary
<
String
,
Any
>
}
}
var
dict
=
[
"user_token"
:
UserToken
as
Any
,
"ven_name"
:
gysName
as
Any
,
"province"
:
pro
vinceIndex
as
Any
,
"city"
:
city
Index
as
Any
,
"district"
:
area
Index
as
Any
,
"province"
:
pro
Dict
[
"area_id"
]
as
Any
,
"city"
:
city
Dict
[
"area_id"
]
as
Any
,
"district"
:
area
Dict
[
"area_id"
]
as
Any
,
"address"
:
detailDzStr
as
Any
,
"contacts_name"
:
nameStr
as
Any
,
"contacts_phone"
:
telNum
as
Any
,
...
...
@@ -121,7 +132,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndOnlyBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndOnlyBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFAndBtnCell"
)
}
let
titleArr
=
[
"基本信息"
,
"联系人信息"
,
"其它信息"
]
//MARK: - cell delegate
...
...
@@ -186,6 +197,8 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFAndBtnCell"
)
as!
TitleAndTFAndBtnCell
cell
.
titleLbl
.
text
=
sec1Arr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
hold1Arr
[
indexPath
.
row
]
cell
.
textTF
.
delegate
=
self
cell
.
textTF
.
tag
=
2
if
barT
.
contains
(
"编辑"
){
cell
.
textTF
.
clearButtonMode
=
.
always
}
else
{
...
...
@@ -200,6 +213,8 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
nameLbl
.
text
=
sec1Arr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
hold1Arr
[
indexPath
.
row
]
cell
.
textTF
.
delegate
=
self
cell
.
textTF
.
tag
=
indexPath
.
row
if
indexPath
.
row
==
0
{
if
barT
.
contains
(
"编辑"
){
cell
.
textTF
.
clearButtonMode
=
.
always
...
...
@@ -225,6 +240,8 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
}
else
{
cell
.
textTF
.
clearButtonMode
=
.
whileEditing
}
cell
.
textTF
.
delegate
=
self
cell
.
textTF
.
tag
=
indexPath
.
row
+
100
switch
indexPath
.
row
{
case
0
:
if
nameStr
.
count
>
0
{
...
...
@@ -636,6 +653,10 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
HUD
.
flash
(
.
label
(
"请填写手机号码"
),
delay
:
1.2
)
return
}
if
isTelNumber
(
num
:
phoneNum
as
NSString
)
==
false
{
HUD
.
flash
(
.
label
(
"请填写正确的手机号码"
),
delay
:
1.2
)
return
}
if
zhizhao
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请上传营业资格证"
),
delay
:
1.2
)
return
...
...
@@ -657,4 +678,31 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
}
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
if
textField
.
text
!.
containsEmoji
{
HUD
.
flash
(
.
label
(
"输入不可包含表情符号"
),
delay
:
1.2
)
return
}
switch
textField
.
tag
{
case
0
:
gysName
=
textField
.
text
!
break
case
2
:
detailDzStr
=
textField
.
text
!
break
case
100
:
nameStr
=
textField
.
text
!
break
case
101
:
phoneNum
=
textField
.
text
!
break
case
102
:
telNum
=
textField
.
text
!
break
default
:
break
}
}
}
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