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
e74bf87c
Commit
e74bf87c
authored
Jun 04, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择时间
parent
aeee02bf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
13 deletions
+71
-13
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/WarehouseManageModel/InputInitInfoModel.swift
...tform/Model/WarehouseManageModel/InputInitInfoModel.swift
+4
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.swift
...ssPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.swift
+1
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.xib
...nessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.xib
+1
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
+65
-13
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e74bf87c
No preview for this file type
GeliBusinessPlatform/Model/WarehouseManageModel/InputInitInfoModel.swift
View file @
e74bf87c
...
@@ -123,7 +123,11 @@ class InputInitInfoGoodsInfoModel: Mappable { //商品信息
...
@@ -123,7 +123,11 @@ class InputInitInfoGoodsInfoModel: Mappable { //商品信息
var
RKJG
:
Float
?
var
RKJG
:
Float
?
var
DayType
:
Int
=
1
var
DayType
:
Int
=
1
var
createDay
:
Int
?
var
createDayStr
:
String
?
var
chuKuLiang
:
Int
?
var
chuKuLiang
:
Int
?
required
init
?(
map
:
Map
)
{
required
init
?(
map
:
Map
)
{
}
}
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.swift
View file @
e74bf87c
...
@@ -28,6 +28,7 @@ class NewOnlyRKCell: UITableViewCell,UITextFieldDelegate {
...
@@ -28,6 +28,7 @@ class NewOnlyRKCell: UITableViewCell,UITextFieldDelegate {
@IBOutlet
weak
var
rkCountTf
:
UITextField
!
@IBOutlet
weak
var
rkCountTf
:
UITextField
!
@IBOutlet
weak
var
rkPriceTf
:
UITextField
!
@IBOutlet
weak
var
rkPriceTf
:
UITextField
!
@IBOutlet
weak
var
timeLbl
:
UILabel
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
self
.
selectionStyle
=
.
none
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.xib
View file @
e74bf87c
...
@@ -348,6 +348,7 @@
...
@@ -348,6 +348,7 @@
<outlet
property=
"rightBtn"
destination=
"tZB-Uo-CY9"
id=
"a9w-hG-3da"
/>
<outlet
property=
"rightBtn"
destination=
"tZB-Uo-CY9"
id=
"a9w-hG-3da"
/>
<outlet
property=
"rkCountTf"
destination=
"s2D-dg-gBi"
id=
"HFy-WE-TYS"
/>
<outlet
property=
"rkCountTf"
destination=
"s2D-dg-gBi"
id=
"HFy-WE-TYS"
/>
<outlet
property=
"rkPriceTf"
destination=
"kGM-d5-IE6"
id=
"azO-uu-LsV"
/>
<outlet
property=
"rkPriceTf"
destination=
"kGM-d5-IE6"
id=
"azO-uu-LsV"
/>
<outlet
property=
"timeLbl"
destination=
"yHy-KY-Uxt"
id=
"b0q-mN-cer"
/>
<outlet
property=
"totalPriceTf"
destination=
"DNW-1v-r8x"
id=
"emO-uV-Hk1"
/>
<outlet
property=
"totalPriceTf"
destination=
"DNW-1v-r8x"
id=
"emO-uV-Hk1"
/>
</connections>
</connections>
<point
key=
"canvasLocation"
x=
"155.79710144927537"
y=
"117.1875"
/>
<point
key=
"canvasLocation"
x=
"155.79710144927537"
y=
"117.1875"
/>
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
View file @
e74bf87c
...
@@ -45,8 +45,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -45,8 +45,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
"price"
:
model
.
price
as
Any
,
"price"
:
model
.
price
as
Any
,
"amount"
:
rkjg
as
Any
,
"amount"
:
rkjg
as
Any
,
"subtotal"
:
total
as
Any
,
"subtotal"
:
total
as
Any
,
//MARK: - 时间戳申请
"production_data"
:
model
.
createDay
as
Any
,
"production_data"
:
1591170275
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"report_id"
:
0
as
Any
"report_id"
:
0
as
Any
]
]
...
@@ -99,8 +98,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -99,8 +98,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
"price"
:
model
.
price
as
Any
,
"price"
:
model
.
price
as
Any
,
"amount"
:
rkjg
as
Any
,
"amount"
:
rkjg
as
Any
,
"subtotal"
:
total
as
Any
,
"subtotal"
:
total
as
Any
,
//MARK: - 时间戳直入
"production_data"
:
model
.
createDay
as
Any
,
"production_data"
:
1591170275
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"report_id"
:
0
as
Any
"report_id"
:
0
as
Any
]
]
...
@@ -174,6 +172,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -174,6 +172,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var
selectIdx
:
Int
?
//库位选择
var
selectIdx
:
Int
?
//库位选择
var
authArr
:
Array
<
String
>
=
[]
//权限
var
authArr
:
Array
<
String
>
=
[]
//权限
var
w_id
:
Int
?
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
@@ -189,6 +189,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -189,6 +189,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
listView
.
register
(
UINib
(
nibName
:
"CRKBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CRKBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"CRKBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CRKBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"NewOnlyRKCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"NewOnlyRKCell"
)
listView
.
register
(
UINib
(
nibName
:
"NewOnlyRKCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"NewOnlyRKCell"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
HUD
.
flash
(
.
progress
)
InputInitInfo
([
"user_token"
:
UserToken
as
Any
,
"goods_id"
:
goods_id
as
Any
],
success
:
{
(
data
)
in
InputInitInfo
([
"user_token"
:
UserToken
as
Any
,
"goods_id"
:
goods_id
as
Any
],
success
:
{
(
data
)
in
let
model
=
data
as!
InputInitInfoModel
let
model
=
data
as!
InputInitInfoModel
...
@@ -199,6 +200,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -199,6 +200,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
if
item
.
is_default
==
1
{
if
item
.
is_default
==
1
{
self
.
holderArr
.
insert
(
item
.
w_name
!
,
at
:
0
)
self
.
holderArr
.
insert
(
item
.
w_name
!
,
at
:
0
)
self
.
holderArr
.
remove
(
at
:
1
)
self
.
holderArr
.
remove
(
at
:
1
)
//待另一个请求
self
.
w_id
=
item
.
w_id
item
.
warehouse_position
?
.
forEach
({
(
data
)
in
item
.
warehouse_position
?
.
forEach
({
(
data
)
in
if
data
.
is_default
==
1
{
if
data
.
is_default
==
1
{
self
.
holderArr
.
insert
(
data
.
p_name
!
,
at
:
1
)
self
.
holderArr
.
insert
(
data
.
p_name
!
,
at
:
1
)
...
@@ -231,7 +234,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -231,7 +234,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
self
.
rkDatas
.
append
(
item
)
self
.
rkDatas
.
append
(
item
)
})
})
self
.
listView
.
reloadData
()
self
.
listView
.
reloadData
()
HUD
.
hide
()
})
{
(
error
)
in
})
{
(
error
)
in
}
}
...
@@ -267,6 +270,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -267,6 +270,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
if
indexPath
.
row
==
1
{
if
indexPath
.
row
==
1
{
if
poiArr
.
count
>
0
{
if
poiArr
.
count
>
0
{
if
glSelectView
==
nil
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
...
@@ -287,15 +291,48 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -287,15 +291,48 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
glSelectView
=
view
}
}
}
else
{
//待
if
w_id
!=
nil
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
WarehouseDetail
([
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
],
success
:
{
(
data
)
in
let
model
=
data
as!
ShopWarehouseDetailModel
model
.
data
?
.
position_res
?
.
forEach
({
(
item
)
in
self
.
poiArr
.
append
(
item
)
})
if
self
.
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
if
self
.
selectIdx
!=
nil
{
view
.
selectNum
=
self
.
selectIdx
view
.
tempNum
=
view
.
selectNum
}
view
.
isOnlySelectKuWei
=
true
view
.
delegate
=
self
view
.
titleLbl
.
text
=
"请选择库位"
var
pArr
:
Array
<
String
>
=
[]
for
item
in
self
.
poiArr
{
let
str
=
item
.
p_name
!
+
"(库存数:
\(
item
.
inventory_count
!
)
"
pArr
.
append
(
str
)
}
view
.
dataArr
=
pArr
self
.
view
.
addSubview
(
view
)
self
.
glSelectView
=
view
}
})
{
(
error
)
in
}
}
else
{
}
else
{
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
}
}
}
}
}
}
}
//MARK: - cellForRow
//MARK: - cellForRow
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
==
1
{
if
indexPath
.
section
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"NewOnlyRKCell"
)
as!
NewOnlyRKCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"NewOnlyRKCell"
)
as!
NewOnlyRKCell
cell
.
tag
=
indexPath
.
row
cell
.
delegate
=
self
cell
.
delegate
=
self
let
data
=
rkSelectArr
[
indexPath
.
row
]
let
data
=
rkSelectArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
data
.
goods_name
cell
.
nameLbl
.
text
=
data
.
goods_name
...
@@ -303,7 +340,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -303,7 +340,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
cell
.
rkPriceTf
.
text
=
""
cell
.
rkPriceTf
.
text
=
""
cell
.
rkCountTf
.
text
=
""
cell
.
rkCountTf
.
text
=
""
cell
.
bzqTf
.
text
=
""
cell
.
bzqTf
.
text
=
""
cell
.
timeLbl
.
text
=
"请选择生产日期"
if
data
.
RKJG
!=
nil
{
if
data
.
RKJG
!=
nil
{
cell
.
rkPriceTf
.
text
=
"
\(
data
.
RKJG
!
)
"
cell
.
rkPriceTf
.
text
=
"
\(
data
.
RKJG
!
)
"
}
}
...
@@ -317,6 +354,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -317,6 +354,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
cell
.
rightBtn
.
isSelected
=
true
cell
.
rightBtn
.
isSelected
=
true
cell
.
leftBtn
.
isSelected
=
false
cell
.
leftBtn
.
isSelected
=
false
}
}
if
data
.
createDayStr
!=
nil
{
cell
.
timeLbl
.
text
=
data
.
createDayStr
}
return
cell
return
cell
}
}
...
@@ -341,17 +381,21 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -341,17 +381,21 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
}
//MARK:---跳转日期选择
//MARK:---跳转日期选择
var
tempTag
:
Int
?
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
timeSelectV
.
moreSelection
=
false
tempTag
=
cell
.
tag
let
data
=
rkSelectArr
[
tempTag
!
]
print
(
"date =="
,
data
.
createDayStr
,
data
.
createDay
)
//把默认值传回去
//把默认值传回去
// 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!)
// timeSelectV.BeginDate = Date(timeIntervalSince1970: time!)
// timeSelectV.BeginDate = Date(timeIntervalSince1970: time!)
// time = TimeInterval(exactly: time_end!)
// time = TimeInterval(exactly: time_end!)
// timeSelectV.EndDate = Date(timeIntervalSince1970: time!)
// timeSelectV.EndDate = Date(timeIntervalSince1970: time!)
// }
// }
timeSelectV
.
titleLbl
.
text
=
"请选择生产日期"
timeSelectV
.
titleLbl
.
text
=
"请选择生产日期"
timeSelectV
.
delegate
=
self
timeSelectV
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
timeSelectV
)
self
.
view
.
window
?
.
addSubview
(
timeSelectV
)
...
@@ -359,7 +403,13 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -359,7 +403,13 @@ 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
print
(
timeStr
,
"生产日期"
,
timeInterval
)
print
(
tempTag
,
timeStr
,
"生产日期"
,
timeInterval
)
let
data
=
rkSelectArr
[
tempTag
!
]
data
.
createDay
=
Int
(
timeInterval
)
data
.
createDayStr
=
timeStr
listView
.
reloadData
()
}
}
func
NewOnlyRKCellAddRepord
(
cell
:
NewOnlyRKCell
)
{
func
NewOnlyRKCellAddRepord
(
cell
:
NewOnlyRKCell
)
{
//添加检测报告
//添加检测报告
...
@@ -498,6 +548,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -498,6 +548,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
func
NewSelectWarehouseVCFinish
(
kuWeiArr
:
Array
<
ShopWarehouseDetailDataPositionModel
>
,
data
:
InputInitInfoWareHouseResModel
)
{
func
NewSelectWarehouseVCFinish
(
kuWeiArr
:
Array
<
ShopWarehouseDetailDataPositionModel
>
,
data
:
InputInitInfoWareHouseResModel
)
{
holderArr
.
insert
(
data
.
w_name
!
,
at
:
0
)
holderArr
.
insert
(
data
.
w_name
!
,
at
:
0
)
holderArr
.
remove
(
at
:
1
)
holderArr
.
remove
(
at
:
1
)
holderArr
.
insert
(
"请选择库位"
,
at
:
1
)
holderArr
.
remove
(
at
:
2
)
poiArr
.
removeAll
()
poiArr
.
removeAll
()
kuWeiArr
.
forEach
{
(
item
)
in
kuWeiArr
.
forEach
{
(
item
)
in
poiArr
.
append
(
item
)
poiArr
.
append
(
item
)
...
...
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