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
5d4da860
Commit
5d4da860
authored
Mar 19, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l;i;lj;lh;h;
parent
a35fa39b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
216 additions
and
162 deletions
+216
-162
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/店长审核/DZSH_Detail_ViewController.swift
...form/ViewController/店长审核/DZSH_Detail_ViewController.swift
+198
-158
GeliBusinessPlatform/ViewController/店长审核/DZSH_UPLOAD_IMG_CELL.swift
...ssPlatform/ViewController/店长审核/DZSH_UPLOAD_IMG_CELL.swift
+6
-0
GeliBusinessPlatform/ViewController/店长审核/DZSH_UPLOAD_IMG_CELL.xib
...nessPlatform/ViewController/店长审核/DZSH_UPLOAD_IMG_CELL.xib
+1
-1
GeliBusinessPlatform/ViewController/店长审核/DZSH_Upload_Cer_Cell.swift
...ssPlatform/ViewController/店长审核/DZSH_Upload_Cer_Cell.swift
+10
-2
GeliBusinessPlatform/ViewController/店长审核/DZSH_Upload_Cer_Cell.xib
...nessPlatform/ViewController/店长审核/DZSH_Upload_Cer_Cell.xib
+1
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
5d4da860
No preview for this file type
GeliBusinessPlatform/ViewController/店长审核/DZSH_Detail_ViewController.swift
View file @
5d4da860
...
@@ -10,35 +10,46 @@ import UIKit
...
@@ -10,35 +10,46 @@ import UIKit
import
Photos
import
Photos
import
SwiftyJSON
import
SwiftyJSON
class
DZSH_Detail_ViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GeliAlertTextViewDelegate
,
DZSH_Two_Btn_Cell_Delegate
,
Location_Cell_Delegate
,
DZSH_UPLOAD_IMG_CELL_Delegate
,
UIPickerViewDataSource
,
UIPickerViewDelegate
,
DZSH_Date_Cell_Delegate
,
GLAlertSelectViewDelegate
,
OnlyTimeSelectView_Delegate
{
class
DZSH_Detail_ViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GeliAlertTextViewDelegate
,
DZSH_Two_Btn_Cell_Delegate
,
Location_Cell_Delegate
,
DZSH_UPLOAD_IMG_CELL_Delegate
,
UIPickerViewDataSource
,
UIPickerViewDelegate
,
DZSH_Date_Cell_Delegate
,
GLAlertSelectViewDelegate
,
OnlyTimeSelectView_Delegate
,
DZSH_Upload_Cer_Cell_Delegate
,
TitleAndTFCellDelegate
,
CLLocationManagerDelegate
{
var
manger
:
CLLocationManager
=
CLLocationManager
()
func
locationManager
(
_
manager
:
CLLocationManager
,
didUpdateLocations
locations
:
[
CLLocation
])
{
manger
.
stopUpdatingLocation
()
let
location
=
locations
.
last
let
coo
=
JZLocationConverter
.
wgs84
(
toGcj02
:
CLLocationCoordinate2D
(
latitude
:
(
location
?
.
coordinate
.
latitude
)
!
,
longitude
:
(
location
?
.
coordinate
.
longitude
)
!
))
lat
=
"
\(
coo
.
latitude
)
"
lng
=
"
\(
coo
.
longitude
)
"
list_view
.
reloadData
()
}
var
work_time_str
=
"09:00~18:00"
var
work_time_str
=
"09:00~18:00"
var
get_time_str
=
"09:00~18:00"
var
get_time_str
=
"09:00~18:00"
func
OnlyTimeSelectView_submitAction
(
view
:
OnlyTimeSelectView
,
sh
:
Int
,
sm
:
Int
,
eh
:
Int
,
em
:
Int
)
{
func
OnlyTimeSelectView_submitAction
(
view
:
OnlyTimeSelectView
,
sh
:
Int
,
sm
:
Int
,
eh
:
Int
,
em
:
Int
)
{
timeSelect_view
!.
removeFromSuperview
()
timeSelect_view
!.
removeFromSuperview
()
timeSelect_view
=
nil
timeSelect_view
=
nil
var
s1
=
StringByInt
(
number
:
sh
)
if
s1
.
count
==
1
{
s1
=
"0"
+
StringByInt
(
number
:
sh
)
}
var
s2
=
StringByInt
(
number
:
sm
)
if
s2
.
count
==
1
{
s2
=
"0"
+
StringByInt
(
number
:
sm
)
}
var
s3
=
StringByInt
(
number
:
eh
)
if
s3
.
count
==
1
{
s3
=
"0"
+
StringByInt
(
number
:
eh
)
}
var
s4
=
StringByInt
(
number
:
em
)
if
s4
.
count
==
1
{
s4
=
"0"
+
StringByInt
(
number
:
em
)
}
if
view
.
tag
==
99
{
//营业时间
if
view
.
tag
==
99
{
//营业时间
var
s1
=
StringByInt
(
number
:
sh
)
if
s1
.
count
==
1
{
s1
=
"0"
+
StringByInt
(
number
:
sh
)
}
var
s2
=
StringByInt
(
number
:
sm
)
if
s2
.
count
==
1
{
s2
=
"0"
+
StringByInt
(
number
:
sm
)
}
var
s3
=
StringByInt
(
number
:
eh
)
if
s3
.
count
==
1
{
s3
=
"0"
+
StringByInt
(
number
:
eh
)
}
var
s4
=
StringByInt
(
number
:
em
)
if
s4
.
count
==
1
{
s4
=
"0"
+
StringByInt
(
number
:
em
)
}
work_time_str
=
s1
+
":"
+
s2
+
"~"
+
s3
+
":"
+
s4
work_time_str
=
s1
+
":"
+
s2
+
"~"
+
s3
+
":"
+
s4
}
else
{
}
else
{
get_time_str
=
s1
+
":"
+
s2
+
"~"
+
s3
+
":"
+
s4
}
}
list_view
.
reloadData
()
list_view
.
reloadData
()
...
@@ -50,13 +61,24 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -50,13 +61,24 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
}
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
print
(
view
.
tag
)
switch
view
.
tag
{
switch
view
.
tag
{
case
99
:
case
0
:
type_num
=
selectNum
break
case
22
:
startDayIdx
=
selectNum
startDayIdx
=
selectNum
break
break
default
:
case
23
:
endDayIdx
=
selectNum
endDayIdx
=
selectNum
break
break
case
30
:
getProdutStart
=
selectNum
break
case
31
:
getProductEnd
=
selectNum
default
:
break
}
}
list_view
.
reloadData
()
list_view
.
reloadData
()
view
.
removeFromSuperview
()
view
.
removeFromSuperview
()
...
@@ -68,20 +90,26 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -68,20 +90,26 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
var
startDayIdx
=
1
var
startDayIdx
=
1
var
endDayIdx
=
5
var
endDayIdx
=
5
var
getProdutStart
=
1
var
getProductEnd
=
5
var
timeSelect_view
:
OnlyTimeSelectView
?
var
timeSelect_view
:
OnlyTimeSelectView
?
func
DZSH_Date_Cell_SelectAction
(
sender
:
UIButton
,
cell
:
DZSH_Date_Cell
)
{
func
DZSH_Date_Cell_SelectAction
(
sender
:
UIButton
,
cell
:
DZSH_Date_Cell
)
{
print
(
sender
.
tag
)
switch
sender
.
tag
{
switch
sender
.
tag
{
case
0
:
case
0
:
if
glSelectView
==
nil
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
99
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择日期"
view
.
titleLbl
.
text
=
"请选择日期"
view
.
delegate
=
self
view
.
delegate
=
self
view
.
dataArr
=
date_arr
view
.
dataArr
=
date_arr
view
.
is_center_select
=
true
view
.
is_center_select
=
true
view
.
selectNum
=
startDayIdx
if
cell
.
tag
<
30
{
view
.
selectNum
=
startDayIdx
}
else
{
view
.
selectNum
=
getProdutStart
}
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
glSelectView
=
view
}
}
...
@@ -89,12 +117,16 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -89,12 +117,16 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
case
1
:
case
1
:
if
glSelectView
==
nil
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
100
view
.
tag
=
cell
.
tag
+
1
view
.
titleLbl
.
text
=
"请选择日期"
view
.
titleLbl
.
text
=
"请选择日期"
view
.
delegate
=
self
view
.
delegate
=
self
view
.
dataArr
=
date_arr
view
.
dataArr
=
date_arr
view
.
is_center_select
=
true
view
.
is_center_select
=
true
view
.
selectNum
=
endDayIdx
if
cell
.
tag
<
30
{
view
.
selectNum
=
endDayIdx
}
else
{
view
.
selectNum
=
getProductEnd
}
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
glSelectView
=
view
}
}
...
@@ -103,6 +135,9 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -103,6 +135,9 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
if
timeSelect_view
==
nil
{
if
timeSelect_view
==
nil
{
let
view
=
OnlyTimeSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
OnlyTimeSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
99
view
.
tag
=
99
if
cell
.
tag
==
30
{
view
.
tag
=
100
}
view
.
delegate
=
self
view
.
delegate
=
self
view
.
titleStr
=
(
sender
.
titleLabel
?
.
text
)
!
view
.
titleStr
=
(
sender
.
titleLabel
?
.
text
)
!
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
...
@@ -111,11 +146,18 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -111,11 +146,18 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
break
break
}
}
}
}
func
DZSH_UPLOAD_IMG_CELL_SelectImg
(
cell
:
DZSH_UPLOAD_IMG_CELL
)
{
print
(
cell
.
tag
)
selectUpLoadImg
(
tag
:
cell
.
tag
)
}
func
DZSH_UPLOAD_IMG_CELL_Input
(
str
:
String
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
{
func
DZSH_UPLOAD_IMG_CELL_Input
(
str
:
String
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
{
if
cell
.
tag
==
11
{
if
cell
.
tag
==
11
{
short_name
=
str
short_name
=
str
}
}
if
cell
.
tag
==
21
{
//公司简称/logo
short_name
=
str
}
}
}
func
DZSH_UPLOAD_IMG_CELL_Btn_Action
(
select
:
Int
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
{
func
DZSH_UPLOAD_IMG_CELL_Btn_Action
(
select
:
Int
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
{
...
@@ -126,7 +168,7 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -126,7 +168,7 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
}
}
}
}
if
cell
.
tag
==
21
{
if
cell
.
tag
==
21
{
//公司简称/logo
show_logo
=
true
show_logo
=
true
if
select
==
0
{
if
select
==
0
{
show_logo
=
false
show_logo
=
false
...
@@ -137,6 +179,7 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -137,6 +179,7 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
func
Location_Cell_action
()
{
func
Location_Cell_action
()
{
print
(
"获取lat,lng"
)
print
(
"获取lat,lng"
)
manger
.
startUpdatingLocation
()
}
}
func
Location_Cell_input_tf
(
idx
:
Int
,
str
:
String
)
{
func
Location_Cell_input_tf
(
idx
:
Int
,
str
:
String
)
{
...
@@ -254,6 +297,11 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -254,6 +297,11 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
super
.
viewDidLoad
()
super
.
viewDidLoad
()
// navbar.title = "信息审核"
// navbar.title = "信息审核"
manger
.
delegate
=
self
manger
.
requestAlwaysAuthorization
()
manger
.
requestWhenInUseAuthorization
()
hourArr
.
removeAll
()
hourArr
.
removeAll
()
minArr
.
removeAll
()
minArr
.
removeAll
()
...
@@ -451,6 +499,7 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -451,6 +499,7 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
cell
.
nameLbl
.
text
=
part0
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
part0
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
type_arr
[
type_num
]
cell
.
contentLbl
.
text
=
type_arr
[
type_num
]
cell
.
btn
.
isUserInteractionEnabled
=
false
return
cell
return
cell
default
:
default
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"Location_Cell"
)
as!
Location_Cell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"Location_Cell"
)
as!
Location_Cell
...
@@ -461,11 +510,6 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -461,11 +510,6 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
}
}
case
1
:
case
1
:
switch
indexPath
.
row
{
switch
indexPath
.
row
{
case
0
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
textTF
.
text
=
name
return
cell
case
1
:
case
1
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DZSH_UPLOAD_IMG_CELL"
)
as!
DZSH_UPLOAD_IMG_CELL
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DZSH_UPLOAD_IMG_CELL"
)
as!
DZSH_UPLOAD_IMG_CELL
cell
.
tag
=
11
cell
.
tag
=
11
...
@@ -495,16 +539,23 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -495,16 +539,23 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
break
break
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
+
10
cell
.
nameLbl
.
text
=
part1
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
part1
[
indexPath
.
row
]
cell
.
textTF
.
isUserInteractionEnabled
=
true
cell
.
textTF
.
isUserInteractionEnabled
=
true
if
indexPath
.
row
==
3
{
if
indexPath
.
row
==
3
{
cell
.
textTF
.
isUserInteractionEnabled
=
false
cell
.
textTF
.
isUserInteractionEnabled
=
false
cell
.
textTF
.
placeholder
=
"请选择城市"
cell
.
textTF
.
placeholder
=
"请选择城市"
cell
.
textTF
.
text
=
dzStr
cell
.
textTF
.
text
=
dzStr
}
else
{
}
else
{
cell
.
textTF
.
placeholder
=
"等待填写"
if
indexPath
.
row
==
0
{
cell
.
textTF
.
text
=
adr_str
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
textTF
.
text
=
name
}
else
{
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
textTF
.
text
=
adr_str
}
}
}
return
cell
return
cell
case
2
:
case
2
:
...
@@ -553,16 +604,19 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -553,16 +604,19 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
if
indexPath
.
row
==
0
{
if
indexPath
.
row
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DZSH_Date_Cell"
)
as!
DZSH_Date_Cell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DZSH_Date_Cell"
)
as!
DZSH_Date_Cell
cell
.
nameLbl
.
text
=
part2
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
part2
[
indexPath
.
row
]
cell
.
tag
=
3
2
cell
.
tag
=
3
0
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
indexPath
=
indexPath
cell
.
indexPath
=
indexPath
cell
.
startDateLbl
.
text
=
date_arr
[
startDayIdx
]
cell
.
startDateLbl
.
text
=
date_arr
[
getProdutStart
]
cell
.
endDateLbl
.
text
=
date_arr
[
endDayIdx
]
cell
.
endDateLbl
.
text
=
date_arr
[
getProductEnd
]
cell
.
timeLbl
.
text
=
get_time_str
cell
.
timeLbl
.
text
=
get_time_str
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
tag
=
indexPath
.
row
+
30
cell
.
delegate
=
self
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
textTF
.
isUserInteractionEnabled
=
true
cell
.
nameLbl
.
text
=
part2
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
part2
[
indexPath
.
row
]
switch
indexPath
.
row
{
switch
indexPath
.
row
{
case
1
:
case
1
:
...
@@ -590,6 +644,9 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -590,6 +644,9 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
+
40
cell
.
textTF
.
isUserInteractionEnabled
=
true
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
nameLbl
.
text
=
part3
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
part3
[
indexPath
.
row
]
switch
indexPath
.
row
{
switch
indexPath
.
row
{
...
@@ -612,6 +669,8 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -612,6 +669,8 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
case
5
:
case
5
:
if
indexPath
.
row
>
1
{
if
indexPath
.
row
>
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DZSH_Upload_Cer_Cell"
)
as!
DZSH_Upload_Cer_Cell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DZSH_Upload_Cer_Cell"
)
as!
DZSH_Upload_Cer_Cell
cell
.
tag
=
indexPath
.
row
+
50
cell
.
delegate
=
self
cell
.
nameLbl
.
text
=
part4
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
part4
[
indexPath
.
row
]
switch
indexPath
.
row
{
switch
indexPath
.
row
{
...
@@ -646,35 +705,52 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -646,35 +705,52 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
}
}
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
+
50
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
textTF
.
isUserInteractionEnabled
=
true
cell
.
nameLbl
.
text
=
part4
[
indexPath
.
row
]
if
indexPath
.
row
==
0
{
cell
.
textTF
.
text
=
zhizhao_str
}
else
{
cell
.
textTF
.
text
=
jing_ying_fan_wei_str
}
return
cell
default
:
default
:
break
break
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
textTF
.
placeholder
=
"等待填写"
cell
.
nameLbl
.
text
=
part4
[
indexPath
.
row
]
if
indexPath
.
row
==
0
{
cell
.
textTF
.
text
=
zhizhao_str
}
else
{
cell
.
textTF
.
text
=
jing_ying_fan_wei_str
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
return
cell
return
cell
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
switch
indexPath
.
section
{
switch
indexPath
.
section
{
case
0
:
if
indexPath
.
row
==
2
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
0
view
.
titleLbl
.
text
=
"请选择店铺类型"
view
.
delegate
=
self
view
.
dataArr
=
type_arr
view
.
is_center_select
=
true
view
.
selectNum
=
type_num
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
break
case
1
:
case
1
:
if
indexPath
.
row
==
3
{
if
indexPath
.
row
==
3
{
print_bottom_cell_select_place_action
()
print_bottom_cell_select_place_action
()
}
}
break
break
case
2
:
if
indexPath
.
row
==
1
{
}
break
case
4
:
case
4
:
if
indexPath
.
row
==
2
{
if
indexPath
.
row
==
2
{
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
...
@@ -688,107 +764,24 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -688,107 +764,24 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
default
:
default
:
break
break
}
}
// switch indexPath.section {
// case 0:
// if indexPath.row == 4 {
// let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
// alterView.tag = 4
// alterView.delegate = self
// alterView.titleLbl.text = "请填写公司简介"
// alterView.placerLbl.text = "请填写公司简介..."
// alterView.content = intro_str
// self.view.window?.addSubview(alterView)
// }
//
// if indexPath.row == 6 {
// _ = self.presentHGImagePicker(maxSelected:1) { (assets) in
// //结果处理
// print("共选择了\(assets.count)张图片,分别如下:")
// let option = PHImageRequestOptions()
// option.isSynchronous = true
// option.isNetworkAccessAllowed = true
// for asset in assets {
// PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// // print("上传图片==\(image)")
// self.uploadImg(imge: image!, isOriginal: true, tag: 6)
// })
// }
// self.list_view.reloadData()
// }
// }
//
// break
// case 1:
// if indexPath.row == 2 {
// _ = self.presentHGImagePicker(maxSelected:1) { (assets) in
// //结果处理
// print("共选择了\(assets.count)张图片,分别如下:")
// let option = PHImageRequestOptions()
// option.isSynchronous = true
// option.isNetworkAccessAllowed = true
// for asset in assets {
// PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// // print("上传图片==\(image)")
// self.uploadImg(imge: image!, isOriginal: true, tag: 12)
// })
// }
// self.list_view.reloadData()
// }
// }
// break
// case 2 :
// if indexPath.row == 2 {
// _ = self.presentHGImagePicker(maxSelected:1) { (assets) in
// //结果处理
// print("共选择了\(assets.count)张图片,分别如下:")
// let option = PHImageRequestOptions()
// option.isSynchronous = true
// option.isNetworkAccessAllowed = true
// for asset in assets {
// PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// // print("上传图片==\(image)")
// self.uploadImg(imge: image!, isOriginal: true, tag: 22)
// })
// }
// self.list_view.reloadData()
// }
// }
// if indexPath.row == 3 {
// _ = self.presentHGImagePicker(maxSelected:1) { (assets) in
// //结果处理
// print("共选择了\(assets.count)张图片,分别如下:")
// let option = PHImageRequestOptions()
// option.isSynchronous = true
// option.isNetworkAccessAllowed = true
// for asset in assets {
// PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// // print("上传图片==\(image)")
// self.uploadImg(imge: image!, isOriginal: true, tag: 23)
// })
// }
// self.list_view.reloadData()
// }
// }
// break
// default:
// _ = self.presentHGImagePicker(maxSelected:1) { (assets) in
// //结果处理
// print("共选择了\(assets.count)张图片,分别如下:")
// let option = PHImageRequestOptions()
// option.isSynchronous = true
// option.isNetworkAccessAllowed = true
// for asset in assets {
// PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// // print("上传图片==\(image)")
// self.uploadImg(imge: image!, isOriginal: true, tag: 0)
// })
// }
// self.list_view.reloadData()
// }
// break
// }
}
}
func
selectUpLoadImg
(
tag
:
Int
){
_
=
self
.
presentHGImagePicker
(
maxSelected
:
1
)
{
(
assets
)
in
//结果处理
print
(
"共选择了
\(
assets
.
count
)
张图片,分别如下:"
)
let
option
=
PHImageRequestOptions
()
option
.
isSynchronous
=
true
option
.
isNetworkAccessAllowed
=
true
for
asset
in
assets
{
PHImageManager
.
default
()
.
requestImage
(
for
:
asset
,
targetSize
:
PHImageManagerMaximumSize
,
contentMode
:
.
default
,
options
:
option
,
resultHandler
:
{
(
image
,
_
:
[
AnyHashable
:
Any
]?)
in
// print("上传图片==\(image)")
self
.
uploadImg
(
imge
:
image
!
,
isOriginal
:
true
,
tag
:
tag
)
})
}
self
.
list_view
.
reloadData
()
}
}
//MARK: - 不通过原因
//MARK: - 不通过原因
func
sureGeliAlertTextViewAction
(
sender
:
String
,
view
:
GeliAlertTextView
)
{
func
sureGeliAlertTextViewAction
(
sender
:
String
,
view
:
GeliAlertTextView
)
{
...
@@ -854,20 +847,22 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -854,20 +847,22 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
print
(
"图片上传成功
\(
dataM
.
data
?
.
url
)
"
)
print
(
"图片上传成功
\(
dataM
.
data
?
.
url
)
"
)
switch
tag
{
switch
tag
{
case
6
:
case
21
:
self
.
logo_url_str
=
(
dataM
.
data
?
.
url
)
!
self
.
logo_url_str
=
(
dataM
.
data
?
.
url
)
!
break
break
case
1
2
:
case
5
2
:
self
.
conect_id_url_str
=
(
dataM
.
data
?
.
url
)
!
self
.
conect_id_url_str
=
(
dataM
.
data
?
.
url
)
!
break
break
case
22
:
case
53
:
self
.
ruzhu_url_str
=
(
dataM
.
data
?
.
url
)
!
break
case
54
:
self
.
zhizhao_url_str
=
(
dataM
.
data
?
.
url
)
!
self
.
zhizhao_url_str
=
(
dataM
.
data
?
.
url
)
!
break
break
case
23
:
case
55
:
self
.
xuke_url_str
=
(
dataM
.
data
?
.
url
)
!
self
.
xuke_url_str
=
(
dataM
.
data
?
.
url
)
!
break
break
default
:
default
:
self
.
ruzhu_url_str
=
(
dataM
.
data
?
.
url
)
!
break
break
}
}
self
.
list_view
.
reloadData
()
self
.
list_view
.
reloadData
()
...
@@ -1220,4 +1215,49 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -1220,4 +1215,49 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
var
tempProvince_select
=
-
1
//临时省id
var
tempProvince_select
=
-
1
//临时省id
var
tempCity_select
=
-
1
//临时市id
var
tempCity_select
=
-
1
//临时市id
var
tempArea_select
=
-
1
//临时区id
var
tempArea_select
=
-
1
//临时区id
//MARK: - 上传图片
func
DZSH_Upload_Cer_Cell_UpLoadImg
(
cell
:
DZSH_Upload_Cer_Cell
)
{
print
(
cell
.
tag
)
selectUpLoadImg
(
tag
:
cell
.
tag
)
}
//MARK: - 填写内容
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
switch
cell
.
tag
{
case
10
:
name
=
content
break
case
14
:
adr_str
=
content
break
case
31
:
connect_number
=
content
break
case
32
:
get_product_adr
=
content
break
case
33
:
phone_str
=
content
break
case
40
:
company_phone
=
content
break
case
41
:
size_str
=
content
break
case
43
:
connect_name
=
content
break
case
44
:
mail_str
=
content
break
case
50
:
zhizhao_str
=
content
break
case
51
:
jing_ying_fan_wei_str
=
content
break
default
:
break
}
}
}
}
GeliBusinessPlatform/ViewController/店长审核/DZSH_UPLOAD_IMG_CELL.swift
View file @
5d4da860
...
@@ -10,6 +10,7 @@ import UIKit
...
@@ -10,6 +10,7 @@ import UIKit
protocol
DZSH_UPLOAD_IMG_CELL_Delegate
{
protocol
DZSH_UPLOAD_IMG_CELL_Delegate
{
func
DZSH_UPLOAD_IMG_CELL_Btn_Action
(
select
:
Int
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
func
DZSH_UPLOAD_IMG_CELL_Btn_Action
(
select
:
Int
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
func
DZSH_UPLOAD_IMG_CELL_Input
(
str
:
String
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
func
DZSH_UPLOAD_IMG_CELL_Input
(
str
:
String
,
cell
:
DZSH_UPLOAD_IMG_CELL
)
func
DZSH_UPLOAD_IMG_CELL_SelectImg
(
cell
:
DZSH_UPLOAD_IMG_CELL
)
}
}
class
DZSH_UPLOAD_IMG_CELL
:
UITableViewCell
{
class
DZSH_UPLOAD_IMG_CELL
:
UITableViewCell
{
@IBAction
func
btn_click
(
_
sender
:
UIButton
)
{
@IBAction
func
btn_click
(
_
sender
:
UIButton
)
{
...
@@ -29,8 +30,13 @@ class DZSH_UPLOAD_IMG_CELL: UITableViewCell {
...
@@ -29,8 +30,13 @@ class DZSH_UPLOAD_IMG_CELL: UITableViewCell {
super
.
awakeFromNib
()
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
self
.
selectionStyle
=
.
none
input_tf
.
addTarget
(
self
,
action
:
#selector(
textChange(tf:)
)
,
for
:
.
allEditingEvents
)
input_tf
.
addTarget
(
self
,
action
:
#selector(
textChange(tf:)
)
,
for
:
.
allEditingEvents
)
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
tapAction
)
)
img_view
.
addGestureRecognizer
(
tap
)
// Initialization code
// Initialization code
}
}
@objc
func
tapAction
(){
delegate
?
.
DZSH_UPLOAD_IMG_CELL_SelectImg
(
cell
:
self
)
}
@objc
func
textChange
(
tf
:
UITextField
){
@objc
func
textChange
(
tf
:
UITextField
){
delegate
?
.
DZSH_UPLOAD_IMG_CELL_Input
(
str
:
tf
.
text
!
,
cell
:
self
)
delegate
?
.
DZSH_UPLOAD_IMG_CELL_Input
(
str
:
tf
.
text
!
,
cell
:
self
)
}
}
...
...
GeliBusinessPlatform/ViewController/店长审核/DZSH_UPLOAD_IMG_CELL.xib
View file @
5d4da860
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"shangchuantupian"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"8TI-5w-kaC"
>
<imageView
clipsSubviews=
"YES"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"shangchuantupian"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"8TI-5w-kaC"
>
<rect
key=
"frame"
x=
"132.5"
y=
"85.5"
width=
"110"
height=
"110"
/>
<rect
key=
"frame"
x=
"132.5"
y=
"85.5"
width=
"110"
height=
"110"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"110"
id=
"Rk4-Ab-dYv"
/>
<constraint
firstAttribute=
"height"
constant=
"110"
id=
"Rk4-Ab-dYv"
/>
...
...
GeliBusinessPlatform/ViewController/店长审核/DZSH_Upload_Cer_Cell.swift
View file @
5d4da860
...
@@ -7,9 +7,11 @@
...
@@ -7,9 +7,11 @@
//
//
import
UIKit
import
UIKit
protocol
DZSH_Upload_Cer_Cell_Delegate
{
func
DZSH_Upload_Cer_Cell_UpLoadImg
(
cell
:
DZSH_Upload_Cer_Cell
)
}
class
DZSH_Upload_Cer_Cell
:
UITableViewCell
{
class
DZSH_Upload_Cer_Cell
:
UITableViewCell
{
var
delegate
:
DZSH_Upload_Cer_Cell_Delegate
?
@IBOutlet
weak
var
img_view
:
UIImageView
!
@IBOutlet
weak
var
img_view
:
UIImageView
!
@IBOutlet
weak
var
nameLbl
:
UILabel
!
@IBOutlet
weak
var
nameLbl
:
UILabel
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
...
@@ -17,6 +19,12 @@ class DZSH_Upload_Cer_Cell: UITableViewCell {
...
@@ -17,6 +19,12 @@ class DZSH_Upload_Cer_Cell: UITableViewCell {
self
.
selectionStyle
=
.
none
self
.
selectionStyle
=
.
none
// Initialization code
// Initialization code
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
tapAction
)
)
img_view
.
addGestureRecognizer
(
tap
)
// Initialization code
}
@objc
func
tapAction
(){
delegate
?
.
DZSH_Upload_Cer_Cell_UpLoadImg
(
cell
:
self
)
}
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
...
...
GeliBusinessPlatform/ViewController/店长审核/DZSH_Upload_Cer_Cell.xib
View file @
5d4da860
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"upload_1"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"HUt-8u-7iR"
>
<imageView
clipsSubviews=
"YES"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"upload_1"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"HUt-8u-7iR"
>
<rect
key=
"frame"
x=
"75"
y=
"43.5"
width=
"225"
height=
"125"
/>
<rect
key=
"frame"
x=
"75"
y=
"43.5"
width=
"225"
height=
"125"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"225"
id=
"azg-mK-lWG"
/>
<constraint
firstAttribute=
"width"
constant=
"225"
id=
"azg-mK-lWG"
/>
...
...
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