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
46d4fe31
Commit
46d4fe31
authored
Jun 04, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复提交入库
parent
ba2dc226
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
13 deletions
+42
-13
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
+35
-8
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
+1
-1
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
+6
-4
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
46d4fe31
No preview for this file type
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
View file @
46d4fe31
...
@@ -21,12 +21,16 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -21,12 +21,16 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
HUD
.
show
(
.
progress
)
HUD
.
show
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
warehouse
=
poiArr
[
selectIdx
!
]
if
lgBtnTitLbl
.
text
==
"提交申请"
{
if
lgBtnTitLbl
.
text
==
"提交申请"
{
var
goodsInfoArr
:
Array
<
Any
>
?
=
[]
var
goodsInfoArr
:
Array
<
Any
>
?
=
[]
rkSelectArr
.
forEach
{
(
model
)
in
rkSelectArr
.
forEach
{
(
model
)
in
var
rkjg
:
Float
=
0
var
rkjg
:
Float
=
0
var
total
:
Float
=
0
var
total
:
Float
=
0
var
number
=
0
if
model
.
RKSL
!=
nil
{
number
=
model
.
RKSL
!
}
if
model
.
RKJG
!=
nil
{
if
model
.
RKJG
!=
nil
{
rkjg
=
model
.
RKJG
!
rkjg
=
model
.
RKJG
!
total
=
rkjg
*
Float
(
model
.
RKSL
!
)
total
=
rkjg
*
Float
(
model
.
RKSL
!
)
...
@@ -36,12 +40,14 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -36,12 +40,14 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
if
model
.
DayType
==
0
{
if
model
.
DayType
==
0
{
shelf_life
=
model
.
BZQ
!
*
30
shelf_life
=
model
.
BZQ
!
*
30
}
}
let
goods
=
[
let
goods
=
[
"goods_id"
:
model
.
goods_id
as
Any
,
"goods_id"
:
model
.
goods_id
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"goods_name"
:
model
.
goods_name
as
Any
,
"goods_name"
:
model
.
goods_name
as
Any
,
"goods_spec"
:
model
.
spec_str
as
Any
,
"goods_spec"
:
model
.
spec_str
as
Any
,
"number"
:
model
.
RKSL
as
Any
,
"number"
:
number
as
Any
,
"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
,
...
@@ -106,11 +112,11 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -106,11 +112,11 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
}
let
goods_info
=
dataChangeString
(
sender
:
goodsInfoArr
!
)
let
goods_info
=
dataChangeString
(
sender
:
goodsInfoArr
!
)
//直接入库
//直接入库
let
p
=
poiArr
[
selectIdx
!
]
let
dict
=
[
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w
arehouse
.
w
_id
as
Any
,
"w_id"
:
w_id
as
Any
,
"p_id"
:
p
.
p
_id
as
Any
,
"p_id"
:
p_id
as
Any
,
"i_type"
:
typeSelect
!
+
1
as
Any
,
"i_type"
:
typeSelect
!
+
1
as
Any
,
"apply_remark"
:
sender
as
Any
,
"apply_remark"
:
sender
as
Any
,
"goods_info"
:
goods_info
as
Any
,
"goods_info"
:
goods_info
as
Any
,
...
@@ -138,7 +144,17 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -138,7 +144,17 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
HUD
.
flash
(
.
label
(
"请选择入库类型"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择入库类型"
),
delay
:
1.2
)
return
return
}
}
if
rkSelectArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品"
),
delay
:
1.2
)
return
}
for
item
in
rkSelectArr
{
if
item
.
createDay
==
nil
||
item
.
BZQ
==
nil
||
item
.
RKSL
==
nil
{
HUD
.
flash
(
.
label
(
"请完整填写数据"
),
delay
:
1.2
)
return
}
}
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
alterView
.
delegate
=
self
alterView
.
titleLbl
.
text
=
"请填写入库备注"
alterView
.
titleLbl
.
text
=
"请填写入库备注"
...
@@ -174,6 +190,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -174,6 +190,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var
authArr
:
Array
<
String
>
=
[]
//权限
var
authArr
:
Array
<
String
>
=
[]
//权限
var
w_id
:
Int
?
var
w_id
:
Int
?
var
p_id
:
Int
?
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
@@ -200,10 +217,12 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -200,10 +217,12 @@ 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
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
.
p_id
=
data
.
p_id
self
.
holderArr
.
insert
(
data
.
p_name
!
,
at
:
1
)
self
.
holderArr
.
insert
(
data
.
p_name
!
,
at
:
1
)
self
.
holderArr
.
remove
(
at
:
2
)
self
.
holderArr
.
remove
(
at
:
2
)
}
}
...
@@ -430,13 +449,19 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -430,13 +449,19 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
switch
inputType
{
switch
inputType
{
case
100
:
case
100
:
data
.
BZQ
=
num
.
integerValue
data
.
BZQ
=
num
.
integerValue
break
break
case
101
:
case
101
:
data
.
ZJ
=
num
.
floatValue
data
.
ZJ
=
num
.
floatValue
break
break
case
102
:
case
102
:
data
.
RKSL
=
num
.
integerValue
if
num
.
integerValue
==
0
{
HUD
.
flash
(
.
label
(
"入库数量不小于1"
),
delay
:
1.2
)
data
.
RKSL
=
1
let
idx
=
IndexPath
(
row
:
cell
.
tag
,
section
:
1
)
listView
.
reloadRows
(
at
:
[
idx
],
with
:
.
none
)
}
else
{
data
.
RKSL
=
num
.
integerValue
}
if
data
.
RKJG
!=
nil
&&
data
.
RKSL
!=
nil
{
if
data
.
RKJG
!=
nil
&&
data
.
RKSL
!=
nil
{
data
.
ZJ
=
data
.
RKJG
!
*
Float
(
data
.
RKSL
!
)
data
.
ZJ
=
data
.
RKJG
!
*
Float
(
data
.
RKSL
!
)
cell
.
totalPriceTf
.
text
=
"
\(
data
.
ZJ
!
)
"
cell
.
totalPriceTf
.
text
=
"
\(
data
.
ZJ
!
)
"
...
@@ -552,6 +577,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -552,6 +577,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
holderArr
.
remove
(
at
:
1
)
holderArr
.
remove
(
at
:
1
)
holderArr
.
insert
(
"请选择库位"
,
at
:
1
)
holderArr
.
insert
(
"请选择库位"
,
at
:
1
)
holderArr
.
remove
(
at
:
2
)
holderArr
.
remove
(
at
:
2
)
w_id
=
data
.
w_id
poiArr
.
removeAll
()
poiArr
.
removeAll
()
kuWeiArr
.
forEach
{
(
item
)
in
kuWeiArr
.
forEach
{
(
item
)
in
poiArr
.
append
(
item
)
poiArr
.
append
(
item
)
...
@@ -584,6 +610,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
...
@@ -584,6 +610,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
else
{
}
else
{
selectIdx
=
selectNum
selectIdx
=
selectNum
let
data
=
poiArr
[
selectIdx
!
]
let
data
=
poiArr
[
selectIdx
!
]
p_id
=
data
.
p_id
holderArr
.
insert
(
data
.
p_name
!
,
at
:
1
)
holderArr
.
insert
(
data
.
p_name
!
,
at
:
1
)
holderArr
.
remove
(
at
:
2
)
holderArr
.
remove
(
at
:
2
)
}
}
...
...
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
View file @
46d4fe31
...
@@ -430,7 +430,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
...
@@ -430,7 +430,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
let
model
=
datas
!
[
indexPath
.
row
]
let
model
=
datas
!
[
indexPath
.
row
]
let
vc
=
CRKXiangQVC
()
let
vc
=
CRKXiangQVC
()
vc
.
delegate
=
self
vc
.
delegate
=
self
if
model
.
io_type
==
1
&&
auth
.
contains
(
"122"
){
if
model
.
io_type
==
1
&&
auth
.
contains
(
"122"
){
//入库
vc
.
isGm
=
true
vc
.
isGm
=
true
}
}
if
model
.
io_type
==
2
&&
auth
.
contains
(
"121"
){
if
model
.
io_type
==
2
&&
auth
.
contains
(
"121"
){
...
...
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
View file @
46d4fe31
...
@@ -143,7 +143,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
...
@@ -143,7 +143,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
model
.
data
?
.
goods_res
?
.
forEach
({
(
item
)
in
model
.
data
?
.
goods_res
?
.
forEach
({
(
item
)
in
self
.
ioGoodsModels
?
.
append
(
item
)
self
.
ioGoodsModels
?
.
append
(
item
)
})
})
if
self
.
model
?
.
io_type
==
1
{
if
self
.
model
?
.
io_type
==
1
{
self
.
titleArr
=
[
"入库类型"
,
"审核人"
,
"备注"
,
"未通过原因"
]
self
.
titleArr
=
[
"入库类型"
,
"审核人"
,
"备注"
,
"未通过原因"
]
var
remark
=
"-"
var
remark
=
"-"
...
@@ -176,9 +176,10 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
...
@@ -176,9 +176,10 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
}
}
}
else
{
}
else
{
//MARK: - 入库详情
if
model
?
.
io_type
==
1
{
if
model
?
.
io_type
==
1
{
titleArr
=
[
"仓库"
,
"库位"
,
"入库类型"
]
titleArr
=
[
"仓库"
,
"库位"
,
"入库类型"
]
holderArr
=
[
"
默认仓库"
,
"默认
库位"
,
str
]
holderArr
=
[
"
请选择仓库"
,
"请选择
库位"
,
str
]
navbar
.
title
=
"商品入库详情"
navbar
.
title
=
"商品入库详情"
...
@@ -186,6 +187,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
...
@@ -186,6 +187,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
let
model
=
data
as!
InGoodsDetailModel
let
model
=
data
as!
InGoodsDetailModel
model
.
data
?
.
goods_res
?
.
forEach
({
(
item
)
in
model
.
data
?
.
goods_res
?
.
forEach
({
(
item
)
in
self
.
inGoodsModels
?
.
append
(
item
)
self
.
inGoodsModels
?
.
append
(
item
)
})
})
if
self
.
isGm
==
false
{
if
self
.
isGm
==
false
{
self
.
titleArr
=
[
"入库类型"
,
"备注"
]
self
.
titleArr
=
[
"入库类型"
,
"备注"
]
...
@@ -238,13 +240,13 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
...
@@ -238,13 +240,13 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
if
sender
.
tag
==
0
{
//通过
if
sender
.
tag
==
0
{
//通过
if
model
?
.
io_type
==
1
{
if
model
?
.
io_type
==
1
{
let
str
=
holderArr
!
[
0
]
let
str
=
holderArr
!
[
0
]
if
str
==
"
默认
仓库"
{
if
str
==
"
请选择
仓库"
{
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
return
return
}
}
let
str1
=
holderArr
!
[
1
]
let
str1
=
holderArr
!
[
1
]
if
str1
==
"
默认
库位"
{
if
str1
==
"
请选择
库位"
{
HUD
.
flash
(
.
label
(
"请选择库位"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择库位"
),
delay
:
1.2
)
return
return
}
}
...
...
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