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
aeee02bf
Commit
aeee02bf
authored
Jun 04, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加单选的生产时间
parent
8ad1e0f2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
12 deletions
+47
-12
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/TimeSelectView/ShowTimeSelectView.swift
...nessPlatform/View/TimeSelectView/ShowTimeSelectView.swift
+33
-10
GeliBusinessPlatform/View/TimeSelectView/TimeSelectView.swift
...BusinessPlatform/View/TimeSelectView/TimeSelectView.swift
+12
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
+2
-2
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
aeee02bf
No preview for this file type
GeliBusinessPlatform/View/TimeSelectView/ShowTimeSelectView.swift
View file @
aeee02bf
...
@@ -92,12 +92,17 @@ class ShowTimeSelectView: UIView ,TimeSelectViewDelgate{
...
@@ -92,12 +92,17 @@ class ShowTimeSelectView: UIView ,TimeSelectViewDelgate{
make
.
centerY
.
equalTo
(
kuangV
)
make
.
centerY
.
equalTo
(
kuangV
)
make
.
left
.
equalTo
(
kuangV
.
snp_left
)
.
offset
(
10*
glscale
)
make
.
left
.
equalTo
(
kuangV
.
snp_left
)
.
offset
(
10*
glscale
)
}
}
calendarV
.
moreSelection
=
moreSelection
calendarV
.
moreSelection
=
true
contetV
.
addSubview
(
calendarV
)
contetV
.
addSubview
(
calendarV
)
calendarV
.
delegate
=
self
calendarV
.
delegate
=
self
}
}
var
moreSelection
:
Bool
=
true
{
didSet
{
calendarV
.
moreSelection
=
moreSelection
}
}
let
blackView
=
UIButton
(
type
:
.
custom
)
let
blackView
=
UIButton
(
type
:
.
custom
)
let
sureBtn
=
UIButton
(
type
:
.
custom
)
let
sureBtn
=
UIButton
(
type
:
.
custom
)
let
contetV
=
UIView
()
let
contetV
=
UIView
()
...
@@ -123,18 +128,36 @@ class ShowTimeSelectView: UIView ,TimeSelectViewDelgate{
...
@@ -123,18 +128,36 @@ class ShowTimeSelectView: UIView ,TimeSelectViewDelgate{
var
EndDate
:
Date
!
=
nil
var
EndDate
:
Date
!
=
nil
func
selectMoreDate
(
beginDate
:
Date
,
endginDate
:
Date
)
{
func
selectMoreDate
(
beginDate
:
Date
,
endginDate
:
Date
)
{
print
(
"选择日期·····"
)
print
(
"选择日期·····"
)
if
moreSelection
{
let
timeInterval
:
TimeInterval
=
beginDate
.
timeIntervalSince1970
let
timeInterval
:
TimeInterval
=
beginDate
.
timeIntervalSince1970
let
timeIntervalEnd
:
TimeInterval
=
endginDate
.
timeIntervalSince1970
let
timeIntervalEnd
:
TimeInterval
=
endginDate
.
timeIntervalSince1970
timeLbl
.
text
=
dayByDouble
(
sender
:
timeInterval
)
+
"-"
+
dayByDouble
(
sender
:
timeIntervalEnd
)
timeLbl
.
text
=
dayByDouble
(
sender
:
timeInterval
)
+
"-"
+
dayByDouble
(
sender
:
timeIntervalEnd
)
EndDate
=
endginDate
EndDate
=
endginDate
BeginDate
=
beginDate
BeginDate
=
beginDate
}
else
{
//单选
let
timeInterval
:
TimeInterval
=
beginDate
.
timeIntervalSince1970
timeLbl
.
text
=
dayByDouble
(
sender
:
timeInterval
)
EndDate
=
endginDate
BeginDate
=
beginDate
}
}
}
@objc
func
sureAction
(
sender
:
UIButton
)
{
@objc
func
sureAction
(
sender
:
UIButton
)
{
print
(
"确定日期·····"
)
print
(
"确定日期·····"
)
if
moreSelection
{
if
EndDate
==
nil
{
if
EndDate
==
nil
{
HUD
.
flash
(
.
label
(
"请选择时间段"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择时间段"
),
delay
:
1.2
)
return
return
}
}
}
else
{
//单选
if
BeginDate
==
nil
{
HUD
.
flash
(
.
label
(
"请选择时间"
),
delay
:
1.2
)
return
}
}
self
.
delegate
?
.
showTimeSelectByData
(
timeStr
:
timeLbl
.
text
!
,
beginDate
:
BeginDate
,
endginDate
:
EndDate
)
self
.
delegate
?
.
showTimeSelectByData
(
timeStr
:
timeLbl
.
text
!
,
beginDate
:
BeginDate
,
endginDate
:
EndDate
)
self
.
removeFromSuperview
()
self
.
removeFromSuperview
()
...
...
GeliBusinessPlatform/View/TimeSelectView/TimeSelectView.swift
View file @
aeee02bf
...
@@ -210,6 +210,12 @@ class TimeSelectView: UIView, FSCalendarDataSource, FSCalendarDelegate {
...
@@ -210,6 +210,12 @@ class TimeSelectView: UIView, FSCalendarDataSource, FSCalendarDelegate {
}
}
}
}
}
else
{
//单选
BeginDate
=
date
EndDate
=
nil
let
dateEnd
=
BeginDate
.
addingTimeInterval
(
TimeInterval
(
60*60*
24
-
1
))
//无用处
self
.
delegate
?
.
selectMoreDate
(
beginDate
:
BeginDate
,
endginDate
:
dateEnd
)
}
}
self
.
configureVisibleCells
()
self
.
configureVisibleCells
()
...
@@ -229,6 +235,12 @@ class TimeSelectView: UIView, FSCalendarDataSource, FSCalendarDelegate {
...
@@ -229,6 +235,12 @@ class TimeSelectView: UIView, FSCalendarDataSource, FSCalendarDelegate {
EndDate
=
nil
EndDate
=
nil
let
dateEnd
=
BeginDate
.
addingTimeInterval
(
TimeInterval
(
60*60*
24
-
1
))
let
dateEnd
=
BeginDate
.
addingTimeInterval
(
TimeInterval
(
60*60*
24
-
1
))
self
.
delegate
?
.
selectMoreDate
(
beginDate
:
BeginDate
,
endginDate
:
dateEnd
)
self
.
delegate
?
.
selectMoreDate
(
beginDate
:
BeginDate
,
endginDate
:
dateEnd
)
}
else
{
//单选
BeginDate
=
date
EndDate
=
nil
let
dateEnd
=
BeginDate
.
addingTimeInterval
(
TimeInterval
(
60*60*
24
-
1
))
//无用处
self
.
delegate
?
.
selectMoreDate
(
beginDate
:
BeginDate
,
endginDate
:
dateEnd
)
}
}
self
.
configureVisibleCells
()
self
.
configureVisibleCells
()
}
}
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
View file @
aeee02bf
...
@@ -344,6 +344,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -344,6 +344,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
func
NewOnlyRKCellDateSelect
(
cell
:
NewOnlyRKCell
)
{
func
NewOnlyRKCellDateSelect
(
cell
:
NewOnlyRKCell
)
{
print
(
"跳转日期选择"
)
print
(
"跳转日期选择"
)
let
timeSelectV
=
ShowTimeSelectView
(
frame
:
self
.
view
.
window
!.
bounds
)
let
timeSelectV
=
ShowTimeSelectView
(
frame
:
self
.
view
.
window
!.
bounds
)
timeSelectV
.
moreSelection
=
false
//把默认值传回去
//把默认值传回去
// if time_start != 0 && time_end != 0{
// if time_start != 0 && time_end != 0{
// var time = TimeInterval(exactly: time_start!)
// var time = TimeInterval(exactly: time_start!)
...
@@ -358,8 +359,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -358,8 +359,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
//MARK:--选择时间回调数据
//MARK:--选择时间回调数据
func
showTimeSelectByData
(
timeStr
:
String
,
beginDate
:
Date
,
endginDate
:
Date
)
{
func
showTimeSelectByData
(
timeStr
:
String
,
beginDate
:
Date
,
endginDate
:
Date
)
{
let
timeInterval
:
TimeInterval
=
beginDate
.
timeIntervalSince1970
let
timeInterval
:
TimeInterval
=
beginDate
.
timeIntervalSince1970
let
timeIntervalEnd
:
TimeInterval
=
endginDate
.
timeIntervalSince1970
print
(
timeStr
,
"生产日期"
,
timeInterval
)
print
(
"开始时间"
,
timeInterval
,
"结束时间"
,
timeIntervalEnd
)
}
}
func
NewOnlyRKCellAddRepord
(
cell
:
NewOnlyRKCell
)
{
func
NewOnlyRKCellAddRepord
(
cell
:
NewOnlyRKCell
)
{
//添加检测报告
//添加检测报告
...
...
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