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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
22 deletions
+80
-22
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
+74
-22
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 { //商品信息
var
RKJG
:
Float
?
var
DayType
:
Int
=
1
var
createDay
:
Int
?
var
createDayStr
:
String
?
var
chuKuLiang
:
Int
?
required
init
?(
map
:
Map
)
{
}
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.swift
View file @
e74bf87c
...
...
@@ -28,6 +28,7 @@ class NewOnlyRKCell: UITableViewCell,UITextFieldDelegate {
@IBOutlet
weak
var
rkCountTf
:
UITextField
!
@IBOutlet
weak
var
rkPriceTf
:
UITextField
!
@IBOutlet
weak
var
timeLbl
:
UILabel
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.xib
View file @
e74bf87c
...
...
@@ -348,6 +348,7 @@
<outlet
property=
"rightBtn"
destination=
"tZB-Uo-CY9"
id=
"a9w-hG-3da"
/>
<outlet
property=
"rkCountTf"
destination=
"s2D-dg-gBi"
id=
"HFy-WE-TYS"
/>
<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"
/>
</connections>
<point
key=
"canvasLocation"
x=
"155.79710144927537"
y=
"117.1875"
/>
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
View file @
e74bf87c
...
...
@@ -15,9 +15,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
func
sureGeliAlertTextViewAction
(
sender
:
String
)
{
if
sender
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写备注"
),
delay
:
1.2
)
return
}
HUD
.
flash
(
.
label
(
"请填写备注"
),
delay
:
1.2
)
return
}
HUD
.
show
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
...
@@ -45,8 +45,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
"price"
:
model
.
price
as
Any
,
"amount"
:
rkjg
as
Any
,
"subtotal"
:
total
as
Any
,
//MARK: - 时间戳申请
"production_data"
:
1591170275
as
Any
,
"production_data"
:
model
.
createDay
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"report_id"
:
0
as
Any
]
...
...
@@ -99,8 +98,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
"price"
:
model
.
price
as
Any
,
"amount"
:
rkjg
as
Any
,
"subtotal"
:
total
as
Any
,
//MARK: - 时间戳直入
"production_data"
:
1591170275
as
Any
,
"production_data"
:
model
.
createDay
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"report_id"
:
0
as
Any
]
...
...
@@ -140,7 +138,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
HUD
.
flash
(
.
label
(
"请选择入库类型"
),
delay
:
1.2
)
return
}
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
alterView
.
titleLbl
.
text
=
"请填写入库备注"
...
...
@@ -174,6 +172,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var
selectIdx
:
Int
?
//库位选择
var
authArr
:
Array
<
String
>
=
[]
//权限
var
w_id
:
Int
?
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -189,6 +189,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
listView
.
register
(
UINib
(
nibName
:
"CRKBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CRKBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"NewOnlyRKCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"NewOnlyRKCell"
)
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
let
model
=
data
as!
InputInitInfoModel
...
...
@@ -199,6 +200,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
if
item
.
is_default
==
1
{
self
.
holderArr
.
insert
(
item
.
w_name
!
,
at
:
0
)
self
.
holderArr
.
remove
(
at
:
1
)
//待另一个请求
self
.
w_id
=
item
.
w_id
item
.
warehouse_position
?
.
forEach
({
(
data
)
in
if
data
.
is_default
==
1
{
self
.
holderArr
.
insert
(
data
.
p_name
!
,
at
:
1
)
...
...
@@ -231,7 +234,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
self
.
rkDatas
.
append
(
item
)
})
self
.
listView
.
reloadData
()
HUD
.
hide
()
})
{
(
error
)
in
}
...
...
@@ -267,6 +270,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
if
indexPath
.
row
==
1
{
if
poiArr
.
count
>
0
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
...
...
@@ -287,8 +291,40 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
else
{
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
}
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
{
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
}
}
}
}
...
...
@@ -296,6 +332,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"NewOnlyRKCell"
)
as!
NewOnlyRKCell
cell
.
tag
=
indexPath
.
row
cell
.
delegate
=
self
let
data
=
rkSelectArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
data
.
goods_name
...
...
@@ -303,7 +340,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
cell
.
rkPriceTf
.
text
=
""
cell
.
rkCountTf
.
text
=
""
cell
.
bzqTf
.
text
=
""
cell
.
timeLbl
.
text
=
"请选择生产日期"
if
data
.
RKJG
!=
nil
{
cell
.
rkPriceTf
.
text
=
"
\(
data
.
RKJG
!
)
"
}
...
...
@@ -317,6 +354,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
cell
.
rightBtn
.
isSelected
=
true
cell
.
leftBtn
.
isSelected
=
false
}
if
data
.
createDayStr
!=
nil
{
cell
.
timeLbl
.
text
=
data
.
createDayStr
}
return
cell
}
...
...
@@ -341,25 +381,35 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
//MARK:---跳转日期选择
var
tempTag
:
Int
?
func
NewOnlyRKCellDateSelect
(
cell
:
NewOnlyRKCell
)
{
print
(
"跳转日期选择"
)
let
timeSelectV
=
ShowTimeSelectView
(
frame
:
self
.
view
.
window
!.
bounds
)
timeSelectV
.
moreSelection
=
false
tempTag
=
cell
.
tag
let
data
=
rkSelectArr
[
tempTag
!
]
print
(
"date =="
,
data
.
createDayStr
,
data
.
createDay
)
//把默认值传回去
// if time_start != 0 && time_end != 0{
// var time = TimeInterval(exactly: time_start!)
// timeSelectV.BeginDate = Date(timeIntervalSince1970: time!)
// time = TimeInterval(exactly: time_end!)
// timeSelectV.EndDate = Date(timeIntervalSince1970: time!)
// }
timeSelectV
.
titleLbl
.
text
=
"请选择生产日期"
timeSelectV
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
timeSelectV
)
// if time_start != 0 && time_end != 0{
// var time = TimeInterval(exactly: time_start!)
// timeSelectV.BeginDate = Date(timeIntervalSince1970: time!)
// time = TimeInterval(exactly: time_end!)
// timeSelectV.EndDate = Date(timeIntervalSince1970: time!)
// }
timeSelectV
.
titleLbl
.
text
=
"请选择生产日期"
timeSelectV
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
timeSelectV
)
}
//MARK:--选择时间回调数据
func
showTimeSelectByData
(
timeStr
:
String
,
beginDate
:
Date
,
endginDate
:
Date
)
{
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
)
{
//添加检测报告
...
...
@@ -498,6 +548,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
func
NewSelectWarehouseVCFinish
(
kuWeiArr
:
Array
<
ShopWarehouseDetailDataPositionModel
>
,
data
:
InputInitInfoWareHouseResModel
)
{
holderArr
.
insert
(
data
.
w_name
!
,
at
:
0
)
holderArr
.
remove
(
at
:
1
)
holderArr
.
insert
(
"请选择库位"
,
at
:
1
)
holderArr
.
remove
(
at
:
2
)
poiArr
.
removeAll
()
kuWeiArr
.
forEach
{
(
item
)
in
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