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
0bb33a17
Commit
0bb33a17
authored
May 20, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仓库接口完成
parent
8615453b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
163 additions
and
55 deletions
+163
-55
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/WarehouseInterface.swift
GeliBusinessPlatform/Model/WarehouseInterface.swift
+3
-2
GeliBusinessPlatform/Model/WarehouseManageModel/ShopWarehouseDetailModel.swift
...Model/WarehouseManageModel/ShopWarehouseDetailModel.swift
+2
-1
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
+49
-20
GeliBusinessPlatform/View/Cell/KuWeiCell.swift
GeliBusinessPlatform/View/Cell/KuWeiCell.swift
+7
-3
GeliBusinessPlatform/View/Cell/KuWeiCell.xib
GeliBusinessPlatform/View/Cell/KuWeiCell.xib
+12
-1
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
...latform/ViewController/仓库管理/WarehoseMangementListVC.swift
+24
-6
GeliBusinessPlatform/ViewController/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
...ontroller/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
+66
-22
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0bb33a17
No preview for this file type
GeliBusinessPlatform/Model/WarehouseInterface.swift
View file @
0bb33a17
...
@@ -70,6 +70,7 @@ func ShopWarehouseAdd(_ params:[String:Any],success:@escaping (_ res:Any)->(),fa
...
@@ -70,6 +70,7 @@ func ShopWarehouseAdd(_ params:[String:Any],success:@escaping (_ res:Any)->(),fa
/*
/*
user_token
user_token
w_name 仓库名称
w_name 仓库名称
w_id 仓库id
w_type 仓库类型,1常温、2冷藏、3冷冻
w_type 仓库类型,1常温、2冷藏、3冷冻
position_str 库位名,多库位用逗号拼接
position_str 库位名,多库位用逗号拼接
w_address 仓库地址
w_address 仓库地址
...
@@ -82,7 +83,7 @@ is_default 是否默认,1是0非
...
@@ -82,7 +83,7 @@ is_default 是否默认,1是0非
warehouse_position 仓库库位信息,必须要有一个库位json字符串,字段见下表
warehouse_position 仓库库位信息,必须要有一个库位json字符串,字段见下表
*/
*/
func
ShopWarehouseEdit
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
func
ShopWarehouseEdit
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"商家仓库
删除
"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
NetworkRequest
.
sharedInstance
.
postRequest
(
"商家仓库
修改
"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
},
success
:
{
(
data
)
in
success
(
data
)
success
(
data
)
})
{
(
error
)
in
})
{
(
error
)
in
...
@@ -97,7 +98,7 @@ user_token
...
@@ -97,7 +98,7 @@ user_token
w_id 仓库id,仓库中有库存则不可删除
w_id 仓库id,仓库中有库存则不可删除
*/
*/
func
ShopWarehouseDel
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
func
ShopWarehouseDel
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"商家仓库
修改
"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
NetworkRequest
.
sharedInstance
.
postRequest
(
"商家仓库
删除
"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
},
success
:
{
(
data
)
in
success
(
data
)
success
(
data
)
})
{
(
error
)
in
})
{
(
error
)
in
...
...
GeliBusinessPlatform/Model/WarehouseManageModel/ShopWarehouseDetailModel.swift
View file @
0bb33a17
...
@@ -81,7 +81,7 @@ class ShopWarehouseDetailDataPositionModel: Mappable {
...
@@ -81,7 +81,7 @@ class ShopWarehouseDetailDataPositionModel: Mappable {
var
p_name
:
String
?
//库位名
var
p_name
:
String
?
//库位名
var
is_default
:
Int
?
//是否默认
var
is_default
:
Int
?
//是否默认
var
inventory_count
:
Int
?
//库存数
var
inventory_count
:
Int
?
//库存数
var
status
:
Int
=
1
required
init
?(
map
:
Map
)
{
required
init
?(
map
:
Map
)
{
}
}
...
@@ -91,6 +91,7 @@ class ShopWarehouseDetailDataPositionModel: Mappable {
...
@@ -91,6 +91,7 @@ class ShopWarehouseDetailDataPositionModel: Mappable {
p_name
<-
map
[
"p_name"
]
p_name
<-
map
[
"p_name"
]
is_default
<-
map
[
"is_default"
]
is_default
<-
map
[
"is_default"
]
inventory_count
<-
map
[
"inventory_count"
]
inventory_count
<-
map
[
"inventory_count"
]
status
<-
map
[
"status"
]
}
}
}
}
...
...
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
View file @
0bb33a17
...
@@ -24,7 +24,7 @@ import IQKeyboardManagerSwift
...
@@ -24,7 +24,7 @@ import IQKeyboardManagerSwift
@objc
optional
func
KuWeiDataArr
(
sender
:
Array
<
Any
>
)
@objc
optional
func
KuWeiDataArr
(
sender
:
Array
<
Any
>
)
}
}
class
GLAlertSelectView
:
UIView
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndSelectCellDelegate
,
KuWeiCellCellDelegate
{
class
GLAlertSelectView
:
UIView
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndSelectCellDelegate
,
KuWeiCellCellDelegate
,
UITextFieldDelegate
{
var
isMultipleS
:
Bool
=
false
var
isMultipleS
:
Bool
=
false
var
contentView
:
UIView
!
var
contentView
:
UIView
!
var
delegate
:
GLAlertSelectViewDelegate
?
var
delegate
:
GLAlertSelectViewDelegate
?
...
@@ -138,9 +138,11 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -138,9 +138,11 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
selectTbv
.
isScrollEnabled
=
false
selectTbv
.
isScrollEnabled
=
false
ipdVHeight
.
constant
=
0.001
ipdVHeight
.
constant
=
0.001
}
}
func
setKuWeiView
(){
func
setKuWeiView
(){
IQKeyboardManager
.
shared
.
resignFirstResponder
()
IQKeyboardManager
.
shared
.
resignFirstResponder
()
selectTbv
.
register
(
UINib
(
nibName
:
"KuWeiCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"KuWei"
)
selectTbv
.
register
(
UINib
(
nibName
:
"KuWeiCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"KuWei"
)
btmVHeight
.
constant
=
0
btmVHeight
.
constant
=
0
selectTbv
.
isScrollEnabled
=
true
selectTbv
.
isScrollEnabled
=
true
...
@@ -172,13 +174,11 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -172,13 +174,11 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"KuWei"
)
as!
KuWeiCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"KuWei"
)
as!
KuWeiCell
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
cell
.
nameLbl
.
text
=
kuWeiArr
[
indexPath
.
row
]
as!
String
let
model
=
kuWeiArr
[
indexPath
.
row
]
as!
ShopWarehouseDetailDataPositionModel
cell
.
nameLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
print
(
"3"
,
model
.
p_name
)
cell
.
countLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
cell
.
nameTF
.
text
=
model
.
p_name
if
selectNum
==
indexPath
.
row
{
cell
.
nameTF
.
delegate
=
self
cell
.
nameLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
nameTF
.
isUserInteractionEnabled
=
false
cell
.
countLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
}
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"selectTbvCell"
)
as!
TitleAndSelectCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"selectTbvCell"
)
as!
TitleAndSelectCell
...
@@ -258,21 +258,49 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -258,21 +258,49 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
}
}
}
}
}
}
print
(
"sele"
,
selectArray
,
cell
.
tag
)
selectTbv
.
reloadData
()
selectTbv
.
reloadData
()
}
}
var
cellIdx
:
Int
?
var
tempName
:
String
=
""
//库位
//库位
func
editClickAction
(
sender
:
Int
)
{
func
editClickAction
(
sender
:
Int
,
cell
:
KuWeiCell
)
{
print
(
sender
)
cell
.
nameTF
.
isUserInteractionEnabled
=
!
cell
.
nameTF
.
isUserInteractionEnabled
cell
.
isEditing
=
cell
.
nameTF
.
isUserInteractionEnabled
// delegate?.GLAlertSelectEditAction?(sender: sender)
cellIdx
=
cell
.
tag
tempName
=
cell
.
nameTF
.
text
!
}
var
isDoneClick
=
false
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
let
item
=
kuWeiArr
[
cellIdx
!
]
as!
ShopWarehouseDetailDataPositionModel
item
.
p_name
=
textField
.
text
item
.
status
=
2
isDoneClick
=
true
selectTbv
.
reloadData
()
return
true
}
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
let
item
=
kuWeiArr
[
cellIdx
!
]
as!
ShopWarehouseDetailDataPositionModel
if
isDoneClick
==
false
{
item
.
p_name
=
tempName
item
.
status
=
1
tempName
=
""
selectTbv
.
reloadData
()
}
isDoneClick
=
false
}
}
func
deleClickAction
(
sender
:
Int
)
{
func
deleClickAction
(
sender
:
Int
)
{
print
(
sender
)
print
(
"sender == "
,
sender
)
if
(
titleLbl
.
text
?
.
contains
(
"库位"
))
!
{
kuWeiArr
.
remove
(
at
:
sender
)
delegate
?
.
GLAlertSelectDelAction
?(
sender
:
kuWeiArr
)
}
else
{
dataArr
.
remove
(
at
:
sender
)
dataArr
.
remove
(
at
:
sender
)
print
(
dataArr
)
delegate
?
.
GLAlertSelectDelAction
?(
sender
:
dataArr
)
delegate
?
.
GLAlertSelectDelAction
?(
sender
:
dataArr
)
}
}
selectTbv
.
reloadData
()
}
//MARK: - 库位输入界面
//MARK: - 库位输入界面
func
getInputView
()
->
UIView
{
func
getInputView
()
->
UIView
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
95.5
))
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
95.5
))
...
@@ -375,7 +403,8 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -375,7 +403,8 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
@objc
func
addKuWei
(){
@objc
func
addKuWei
(){
IQKeyboardManager
.
shared
.
resignFirstResponder
()
IQKeyboardManager
.
shared
.
resignFirstResponder
()
if
(
inputTextTF
?
.
text
!.
count
)
!
>
0
{
if
(
inputTextTF
?
.
text
!.
count
)
!
>
0
{
kuWeiArr
.
append
(
inputTextTF
!.
text
!
)
let
kuWei
=
ShopWarehouseDetailDataPositionModel
(
JSON
:
[
"p_name"
:
inputTextTF
!.
text
!
,
"p_id"
:
0
,
"status"
:
4
])
kuWeiArr
.
append
(
kuWei
!
)
let
tbvH
=
CGFloat
(
kuWeiArr
.
count
)
*
49.0
let
tbvH
=
CGFloat
(
kuWeiArr
.
count
)
*
49.0
self
.
btmVHeight
.
constant
=
146.5
+
tbvH
self
.
btmVHeight
.
constant
=
146.5
+
tbvH
if
self
.
btmVHeight
.
constant
>
fullScreenHeight
*
0.75
{
if
self
.
btmVHeight
.
constant
>
fullScreenHeight
*
0.75
{
...
...
GeliBusinessPlatform/View/Cell/KuWeiCell.swift
View file @
0bb33a17
...
@@ -8,16 +8,17 @@
...
@@ -8,16 +8,17 @@
import
UIKit
import
UIKit
@objc
protocol
KuWeiCellCellDelegate
{
@objc
protocol
KuWeiCellCellDelegate
{
@objc
optional
func
editClickAction
(
sender
:
Int
)
@objc
optional
func
editClickAction
(
sender
:
Int
,
cell
:
KuWeiCell
)
@objc
optional
func
deleClickAction
(
sender
:
Int
)
@objc
optional
func
deleClickAction
(
sender
:
Int
)
}
}
class
KuWeiCell
:
UITableViewCell
{
class
KuWeiCell
:
UITableViewCell
{
@IBOutlet
weak
var
nameTF
:
UITextField
!
var
delegate
:
KuWeiCellCellDelegate
?
var
delegate
:
KuWeiCellCellDelegate
?
@IBOutlet
weak
var
nameLbl
:
UILabel
!
@IBOutlet
weak
var
nameLbl
:
UILabel
!
@IBOutlet
weak
var
countLbl
:
UILabel
!
@IBOutlet
weak
var
countLbl
:
UILabel
!
@IBAction
func
editClick
(
_
sender
:
Int
)
{
@IBAction
func
editClick
(
_
sender
:
Int
)
{
delegate
?
.
editClickAction
?(
sender
:
Int
(
self
.
tag
))
delegate
?
.
editClickAction
?(
sender
:
Int
(
self
.
tag
)
,
cell
:
self
)
}
}
@IBAction
func
deleClick
(
_
sender
:
Int
)
{
@IBAction
func
deleClick
(
_
sender
:
Int
)
{
...
@@ -27,9 +28,12 @@ class KuWeiCell: UITableViewCell {
...
@@ -27,9 +28,12 @@ class KuWeiCell: UITableViewCell {
super
.
awakeFromNib
()
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
self
.
selectionStyle
=
.
none
nameTF
.
returnKeyType
=
.
done
// Initialization code
// Initialization code
}
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
super
.
setSelected
(
selected
,
animated
:
animated
)
...
...
GeliBusinessPlatform/View/Cell/KuWeiCell.xib
View file @
0bb33a17
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"库位
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dMX-NM-Bar"
>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dMX-NM-Bar"
>
<rect
key=
"frame"
x=
"20"
y=
"0.0"
width=
"95"
height=
"44"
/>
<rect
key=
"frame"
x=
"20"
y=
"0.0"
width=
"95"
height=
"44"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
...
@@ -73,8 +73,15 @@
...
@@ -73,8 +73,15 @@
<action
selector=
"editClick:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"c1C-hM-kig"
/>
<action
selector=
"editClick:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"c1C-hM-kig"
/>
</connections>
</connections>
</button>
</button>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"tl8-dB-OUj"
>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"110"
height=
"43"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
/>
</textField>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstItem=
"nNe-LK-eKR"
firstAttribute=
"leading"
secondItem=
"tl8-dB-OUj"
secondAttribute=
"trailing"
id=
"1Sm-eg-zAW"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"rU2-NE-ybF"
secondAttribute=
"bottom"
id=
"8dH-3M-2TB"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"rU2-NE-ybF"
secondAttribute=
"bottom"
id=
"8dH-3M-2TB"
/>
<constraint
firstItem=
"nNe-LK-eKR"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"E12-W6-amI"
/>
<constraint
firstItem=
"nNe-LK-eKR"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"E12-W6-amI"
/>
<constraint
firstItem=
"HOv-8K-UgR"
firstAttribute=
"centerX"
secondItem=
"GVg-rI-poz"
secondAttribute=
"centerX"
id=
"FUI-Rz-1nR"
/>
<constraint
firstItem=
"HOv-8K-UgR"
firstAttribute=
"centerX"
secondItem=
"GVg-rI-poz"
secondAttribute=
"centerX"
id=
"FUI-Rz-1nR"
/>
...
@@ -82,10 +89,12 @@
...
@@ -82,10 +89,12 @@
<constraint
firstItem=
"HOv-8K-UgR"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"Nmw-gT-RVZ"
/>
<constraint
firstItem=
"HOv-8K-UgR"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"Nmw-gT-RVZ"
/>
<constraint
firstItem=
"sXc-jH-lU6"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"Qqs-p9-vbh"
/>
<constraint
firstItem=
"sXc-jH-lU6"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"Qqs-p9-vbh"
/>
<constraint
firstItem=
"GVg-rI-poz"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"Qyd-g3-MEK"
/>
<constraint
firstItem=
"GVg-rI-poz"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"Qyd-g3-MEK"
/>
<constraint
firstItem=
"rU2-NE-ybF"
firstAttribute=
"top"
secondItem=
"tl8-dB-OUj"
secondAttribute=
"bottom"
id=
"RWl-So-7x4"
/>
<constraint
firstItem=
"nNe-LK-eKR"
firstAttribute=
"leading"
secondItem=
"dMX-NM-Bar"
secondAttribute=
"trailing"
constant=
"10"
id=
"Rgg-mN-E4u"
/>
<constraint
firstItem=
"nNe-LK-eKR"
firstAttribute=
"leading"
secondItem=
"dMX-NM-Bar"
secondAttribute=
"trailing"
constant=
"10"
id=
"Rgg-mN-E4u"
/>
<constraint
firstItem=
"rU2-NE-ybF"
firstAttribute=
"top"
secondItem=
"sXc-jH-lU6"
secondAttribute=
"bottom"
id=
"TAW-eu-eZ6"
/>
<constraint
firstItem=
"rU2-NE-ybF"
firstAttribute=
"top"
secondItem=
"sXc-jH-lU6"
secondAttribute=
"bottom"
id=
"TAW-eu-eZ6"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"nNe-LK-eKR"
secondAttribute=
"bottom"
id=
"VpX-UQ-pX4"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"nNe-LK-eKR"
secondAttribute=
"bottom"
id=
"VpX-UQ-pX4"
/>
<constraint
firstItem=
"dMX-NM-Bar"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"20"
id=
"WcJ-f8-2w9"
/>
<constraint
firstItem=
"dMX-NM-Bar"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"20"
id=
"WcJ-f8-2w9"
/>
<constraint
firstItem=
"tl8-dB-OUj"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"ZR1-mn-7O1"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"dMX-NM-Bar"
secondAttribute=
"bottom"
id=
"ZTa-MJ-3OP"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"dMX-NM-Bar"
secondAttribute=
"bottom"
id=
"ZTa-MJ-3OP"
/>
<constraint
firstItem=
"sXc-jH-lU6"
firstAttribute=
"centerX"
secondItem=
"0ef-kc-EYn"
secondAttribute=
"centerX"
id=
"eId-dd-z5X"
/>
<constraint
firstItem=
"sXc-jH-lU6"
firstAttribute=
"centerX"
secondItem=
"0ef-kc-EYn"
secondAttribute=
"centerX"
id=
"eId-dd-z5X"
/>
<constraint
firstItem=
"0ef-kc-EYn"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"i8O-Rr-rP6"
/>
<constraint
firstItem=
"0ef-kc-EYn"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"i8O-Rr-rP6"
/>
...
@@ -93,6 +102,7 @@
...
@@ -93,6 +102,7 @@
<constraint
firstAttribute=
"trailing"
secondItem=
"GVg-rI-poz"
secondAttribute=
"trailing"
constant=
"37.5"
id=
"nwM-pw-OdK"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"GVg-rI-poz"
secondAttribute=
"trailing"
constant=
"37.5"
id=
"nwM-pw-OdK"
/>
<constraint
firstItem=
"rU2-NE-ybF"
firstAttribute=
"top"
secondItem=
"HOv-8K-UgR"
secondAttribute=
"bottom"
id=
"prA-cF-kvC"
/>
<constraint
firstItem=
"rU2-NE-ybF"
firstAttribute=
"top"
secondItem=
"HOv-8K-UgR"
secondAttribute=
"bottom"
id=
"prA-cF-kvC"
/>
<constraint
firstItem=
"GVg-rI-poz"
firstAttribute=
"leading"
secondItem=
"0ef-kc-EYn"
secondAttribute=
"trailing"
constant=
"23"
id=
"r91-aY-NAQ"
/>
<constraint
firstItem=
"GVg-rI-poz"
firstAttribute=
"leading"
secondItem=
"0ef-kc-EYn"
secondAttribute=
"trailing"
constant=
"23"
id=
"r91-aY-NAQ"
/>
<constraint
firstItem=
"tl8-dB-OUj"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"s2M-i4-tc4"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"rU2-NE-ybF"
secondAttribute=
"trailing"
id=
"tC8-DB-Znm"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"rU2-NE-ybF"
secondAttribute=
"trailing"
id=
"tC8-DB-Znm"
/>
<constraint
firstItem=
"rU2-NE-ybF"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"vyy-4j-gnH"
/>
<constraint
firstItem=
"rU2-NE-ybF"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"vyy-4j-gnH"
/>
</constraints>
</constraints>
...
@@ -101,6 +111,7 @@
...
@@ -101,6 +111,7 @@
<connections>
<connections>
<outlet
property=
"countLbl"
destination=
"nNe-LK-eKR"
id=
"5zc-sz-Z3z"
/>
<outlet
property=
"countLbl"
destination=
"nNe-LK-eKR"
id=
"5zc-sz-Z3z"
/>
<outlet
property=
"nameLbl"
destination=
"dMX-NM-Bar"
id=
"D10-2X-OyL"
/>
<outlet
property=
"nameLbl"
destination=
"dMX-NM-Bar"
id=
"D10-2X-OyL"
/>
<outlet
property=
"nameTF"
destination=
"tl8-dB-OUj"
id=
"1ho-nO-yh6"
/>
</connections>
</connections>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"122.54464285714285"
/>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"122.54464285714285"
/>
</tableViewCell>
</tableViewCell>
...
...
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
View file @
0bb33a17
...
@@ -10,8 +10,10 @@ import UIKit
...
@@ -10,8 +10,10 @@ import UIKit
import
ViewAnimator
import
ViewAnimator
import
SwipeCellKit
import
SwipeCellKit
class
WarehoseMangementListVC
:
BaseViewController
,
UISearchBarDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
SearchBarViewDelegate
,
SwipeTableViewCellDelegate
{
class
WarehoseMangementListVC
:
BaseViewController
,
UISearchBarDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
SearchBarViewDelegate
,
SwipeTableViewCellDelegate
,
CheckWareHourseViewControllerDelegate
{
func
CheckWareHourseViewControllerRefresh
()
{
tableV
.
mj_header
?
.
beginRefreshing
()
}
weak
var
searchV
:
SearchBarView
?
=
nil
weak
var
searchV
:
SearchBarView
?
=
nil
@IBOutlet
weak
var
contentView
:
UIView
!
@IBOutlet
weak
var
contentView
:
UIView
!
@IBOutlet
weak
var
searchView
:
UIView
!
@IBOutlet
weak
var
searchView
:
UIView
!
...
@@ -70,20 +72,25 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -70,20 +72,25 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
}
}
}
}
@objc
func
loadMoreData
(){
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
print
(
"加载更多数据"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
,
"page"
:
page
]
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
,
"page"
:
page
]
warehouseList
(
dict
,
success
:
{
(
data
)
in
warehouseList
(
dict
,
success
:
{
(
data
)
in
self
.
page
+=
1
let
dataModel
=
data
as!
ShopWarehouseListModel
let
dataModel
=
data
as!
ShopWarehouseListModel
if
dataModel
.
data
!.
count
>
0
{
self
.
page
+=
1
dataModel
.
data
?
.
forEach
({
(
model
)
in
dataModel
.
data
?
.
forEach
({
(
model
)
in
self
.
warehourseArr
.
append
(
model
)
self
.
warehourseArr
.
append
(
model
)
})
})
self
.
tableV
.
reloadData
()
self
.
tableV
.
reloadData
()
self
.
tableV
?
.
mj_header
?
.
endRefreshing
()
}
self
.
tableV
?
.
mj_footer
?
.
endRefreshing
()
})
{
(
error
)
in
})
{
(
error
)
in
self
.
tableV
?
.
mj_
head
er
?
.
endRefreshing
()
self
.
tableV
?
.
mj_
foot
er
?
.
endRefreshing
()
}
}
}
}
//MARK:--搜索按钮代理
//MARK:--搜索按钮代理
...
@@ -142,6 +149,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -142,6 +149,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
}
}
let
vc
=
CheckWareHourseViewController
()
let
vc
=
CheckWareHourseViewController
()
vc
.
titleStr
=
"新增仓库"
vc
.
titleStr
=
"新增仓库"
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
false
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
false
)
}
}
...
@@ -176,7 +185,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -176,7 +185,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
cell
.
delegate
=
self
cell
.
delegate
=
self
let
model
=
warehourseArr
[
indexPath
.
row
]
let
model
=
warehourseArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
model
.
w_name
cell
.
nameLbl
.
text
=
model
.
w_name
cell
.
statusLbl
.
text
=
typeArr
[
model
.
w_type
!
-
1
]
cell
.
statusLbl
.
text
=
typeArr
[
model
.
w_type
!
]
cell
.
adrLbl
.
text
=
model
.
w_address
!
cell
.
adrLbl
.
text
=
model
.
w_address
!
cell
.
kuCunLbl
.
text
=
"
\(
model
.
inventory_count
!
)
"
cell
.
kuCunLbl
.
text
=
"
\(
model
.
inventory_count
!
)
"
return
cell
return
cell
...
@@ -188,6 +197,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -188,6 +197,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
let
model
=
warehourseArr
[
indexPath
.
row
]
let
model
=
warehourseArr
[
indexPath
.
row
]
vc
.
w_id
=
model
.
w_id
vc
.
w_id
=
model
.
w_id
vc
.
editIdx
=
indexPath
.
row
vc
.
editIdx
=
indexPath
.
row
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
false
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
false
)
}
}
...
@@ -211,7 +221,15 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -211,7 +221,15 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
let
deleteAction
=
SwipeAction
(
style
:
.
destructive
,
title
:
nil
)
{
let
deleteAction
=
SwipeAction
(
style
:
.
destructive
,
title
:
nil
)
{
action
,
indexPath
in
action
,
indexPath
in
//将对应条目的数据删除
//将对应条目的数据删除
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
model
=
self
.
warehourseArr
[
indexPath
.
row
]
ShopWarehouseDel
([
"user_token"
:
UserToken
,
"w_id"
:
model
.
w_id
],
success
:
{
(
data
)
in
self
.
warehourseArr
.
remove
(
at
:
indexPath
.
row
)
tableView
.
reloadData
()
tableView
.
reloadData
()
})
{
(
error
)
in
}
}
}
deleteAction
.
image
=
UIImage
(
named
:
"shanchuWhite"
)
deleteAction
.
image
=
UIImage
(
named
:
"shanchuWhite"
)
deleteAction
.
backgroundColor
=
UIColor
(
named
:
"#F57575"
)
deleteAction
.
backgroundColor
=
UIColor
(
named
:
"#F57575"
)
...
...
GeliBusinessPlatform/ViewController/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
View file @
0bb33a17
...
@@ -10,10 +10,12 @@ import UIKit
...
@@ -10,10 +10,12 @@ import UIKit
import
LGButton
import
LGButton
import
IQKeyboardManagerSwift
import
IQKeyboardManagerSwift
protocol
CheckWareHourseViewControllerDelegate
{
func
CheckWareHourseViewControllerRefresh
()
}
class
CheckWareHourseViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
WareHouseSpCellDelegate
,
GLAlertSelectViewDelegate
,
UITextFieldDelegate
,
GeliAlertViewDelegate
{
class
CheckWareHourseViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
WareHouseSpCellDelegate
,
GLAlertSelectViewDelegate
,
UITextFieldDelegate
,
GeliAlertViewDelegate
{
var
delegate
:
CheckWareHourseViewControllerDelegate
?
var
dataModel
:
ShopWarehouseDetailModel
?
var
dataModel
:
ShopWarehouseDetailModel
?
var
w_id
:
Int
?
//仓库id
var
w_id
:
Int
?
//仓库id
var
editIdx
:
Int
?
var
editIdx
:
Int
?
...
@@ -23,7 +25,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -23,7 +25,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
let
titleArr
=
[
"仓库名称:"
,
"仓库类型:"
,
"包含库位:"
,
"仓库地址:"
,
"仓库容积:"
,
"仓库面积:"
,
"联系人:"
,
"联系人电话:"
]
let
titleArr
=
[
"仓库名称:"
,
"仓库类型:"
,
"包含库位:"
,
"仓库地址:"
,
"仓库容积:"
,
"仓库面积:"
,
"联系人:"
,
"联系人电话:"
]
let
placeHArr
=
[
"请输入仓库名称"
,
"请选择仓库类型"
,
"请输入库位名"
,
"请输入仓库地址"
,
"请输入仓库容积"
,
"请输入仓库面积"
,
"请输入联系人"
,
"请输入联系人电话"
]
let
placeHArr
=
[
"请输入仓库名称"
,
"请选择仓库类型"
,
"请输入库位名"
,
"请输入仓库地址"
,
"请输入仓库容积"
,
"请输入仓库面积"
,
"请输入联系人"
,
"请输入联系人电话"
]
var
kuWeiArr
:
Array
<
Any
>
?
=
[]
var
kuWeiArr
:
Array
<
ShopWarehouseDetailDataPositionModel
>
?
=
[]
var
listArray
=
[
"常温"
,
"冷藏"
,
"冷冻"
]
var
listArray
=
[
"常温"
,
"冷藏"
,
"冷冻"
]
var
glSelectView
:
GLAlertSelectView
?
var
glSelectView
:
GLAlertSelectView
?
...
@@ -61,9 +63,11 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -61,9 +63,11 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
make
.
bottom
.
equalTo
(
btnTitleLbl
.
snp_top
)
make
.
bottom
.
equalTo
(
btnTitleLbl
.
snp_top
)
}
}
loadData
()
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
// Do any additional setup after loading the view.
loadData
()
}
}
func
loadData
(){
func
loadData
(){
//加载数据
//加载数据
...
@@ -71,7 +75,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -71,7 +75,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
WarehouseDetail
([
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
],
success
:
{
(
data
)
in
WarehouseDetail
([
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
],
success
:
{
(
data
)
in
let
dataModel
=
data
as!
ShopWarehouseDetailModel
let
dataModel
=
data
as!
ShopWarehouseDetailModel
// self.dataModel = dataModel
self
.
shiFouMoRen
=
false
self
.
shiFouMoRen
=
false
if
dataModel
.
data
!.
warehouse_res
!.
is_default
!
==
1
{
if
dataModel
.
data
!.
warehouse_res
!.
is_default
!
==
1
{
self
.
shiFouMoRen
=
true
self
.
shiFouMoRen
=
true
...
@@ -88,6 +92,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -88,6 +92,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
self
.
cangKuAdr
=
dataModel
.
data
!.
warehouse_res
!.
w_address
!
self
.
cangKuAdr
=
dataModel
.
data
!.
warehouse_res
!.
w_address
!
self
.
cangKuName
=
dataModel
.
data
!.
warehouse_res
!.
w_name
!
self
.
cangKuName
=
dataModel
.
data
!.
warehouse_res
!.
w_name
!
self
.
warehourseType
=
dataModel
.
data
!.
warehouse_res
!.
w_type
!
self
.
warehourseType
=
dataModel
.
data
!.
warehouse_res
!.
w_type
!
self
.
kuWeiArr
=
dataModel
.
data
?
.
position_res
self
.
listView
.
reloadData
()
self
.
listView
.
reloadData
()
})
{
(
error
)
in
})
{
(
error
)
in
...
@@ -111,7 +116,6 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -111,7 +116,6 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
switch
indexPath
.
row
{
switch
indexPath
.
row
{
case
0
:
case
0
:
cell
.
detailTF
.
text
=
cangKuName
cell
.
detailTF
.
text
=
cangKuName
break
break
case
1
:
case
1
:
cell
.
hiddenBtn
.
isHidden
=
false
cell
.
hiddenBtn
.
isHidden
=
false
...
@@ -120,6 +124,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -120,6 +124,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
}
}
break
break
case
2
:
case
2
:
cell
.
detailTF
.
isUserInteractionEnabled
=
false
cell
.
detailTF
.
text
=
kuWeiName
cell
.
detailTF
.
text
=
kuWeiName
break
break
case
3
:
case
3
:
...
@@ -214,26 +219,44 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -214,26 +219,44 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
}
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
titleStr
==
"新增仓库"
{
if
titleStr
==
"新增仓库"
{
let
dict
=
[
"user_token"
:
UserToken
,
"w_name"
:
cangKuName
,
"w_type"
:
warehourseType
,
"position_str"
:
kuWeiName
,
"w_address"
:
cangKuAdr
,
"volume"
:
rj
.
floatValue
,
"area"
:
mj
.
floatValue
,
"contact"
:
lianXiRen
,
"contact_number"
:
phone
,
"mail"
:
""
,
"is_default"
:
num
]
ShopWarehouseAdd
(
dict
,
success
:
{
(
data
)
in
self
.
delegate
!.
CheckWareHourseViewControllerRefresh
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
}
}
else
{
}
else
{
if
btnTitleLbl
.
text
==
"保存"
{
if
btnTitleLbl
.
text
==
"保存"
{
//
var
dataArr
:
Array
<
Any
>
=
[]
// ShopWarehouseEdit(["user_token":UserToken,"w_name":cangKuName,"w_type":warehourseType,"position_str":kuWeiName,"w_address":cangKuAdr,"volume":rj.floatValue,"area":mj.floatValue,"contact":lianXiRen,"contact_number":phone,"mail":"","is_default":num,"warehouse_position":""], success: { (data) in
kuWeiArr
?
.
forEach
({
(
md
)
in
//
var
data
:
Dictionary
<
String
,
Any
>
=
[:]
// }) { (error) in
data
.
updateValue
(
md
.
p_name
,
forKey
:
"p_name"
)
//
data
.
updateValue
(
md
.
p_id
,
forKey
:
"p_id"
)
// }
data
.
updateValue
(
md
.
status
,
forKey
:
"status"
)
// self.navigationController?.popViewController(animated: true)
dataArr
.
append
(
data
)
})
var
jsonStr
=
""
if
dataArr
.
count
>
0
{
jsonStr
=
dataChangeString
(
sender
:
dataArr
)
}
ShopWarehouseEdit
([
"user_token"
:
UserToken
,
"w_name"
:
cangKuName
,
"w_type"
:
warehourseType
,
"position_str"
:
kuWeiName
,
"w_id"
:
w_id
,
"w_address"
:
cangKuAdr
,
"volume"
:
rj
.
floatValue
,
"area"
:
mj
.
floatValue
,
"contact"
:
lianXiRen
,
"contact_number"
:
phone
,
"mail"
:
""
,
"is_default"
:
num
,
"warehouse_position"
:
jsonStr
],
success
:
{
(
data
)
in
self
.
delegate
?
.
CheckWareHourseViewControllerRefresh
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
}
}
else
{
}
else
{
btnTitleLbl
.
text
=
"保存"
btnTitleLbl
.
text
=
"保存"
statusStr
=
btnTitleLbl
.
text
!
statusStr
=
btnTitleLbl
.
text
!
}
listView
.
reloadData
()
listView
.
reloadData
()
}
}
}
}
}
//库位
//库位
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
){
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
){
warehourseType
=
selectNum
warehourseType
=
selectNum
...
@@ -262,16 +285,27 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -262,16 +285,27 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
self
.
view
.
window
?
.
addSubview
(
alertView
)
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
}
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
ShopWarehouseDel
([
"user_token"
:
UserToken
,
"w_id"
:
w_id
],
success
:
{
(
data
)
in
self
.
delegate
?
.
CheckWareHourseViewControllerRefresh
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
Error
)
in
}
}
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
func
sureAction
(
sender
:
UIButton
)
{
print
(
"sureAction"
)
}
@objc
func
removeActin
(
sender
:
UIButton
){
@objc
func
removeActin
(
sender
:
UIButton
){
sender
.
superview
?
.
removeFromSuperview
()
sender
.
superview
?
.
removeFromSuperview
()
}
}
func
clickAction
(
sender
:
UIButton
)
{
func
clickAction
(
sender
:
UIButton
)
{
IQKeyboardManager
.
shared
.
resignFirstResponder
()
IQKeyboardManager
.
shared
.
resignFirstResponder
()
if
sender
.
tag
==
1
{
if
sender
.
tag
==
1
{
...
@@ -406,15 +440,25 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
...
@@ -406,15 +440,25 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
IQKeyboardManager
.
shared
.
resignFirstResponder
()
IQKeyboardManager
.
shared
.
resignFirstResponder
()
}
}
func
KuWeiDataArr
(
sender
:
Array
<
Any
>
)
{
func
KuWeiDataArr
(
sender
:
Array
<
Any
>
)
{
kuWeiArr
=
sender
print
(
sender
)
if
kuWeiArr
!.
count
>
0
{
if
(
titleStr
?
.
contains
(
"新增"
))
!
{
if
(
titleStr
?
.
contains
(
"新增"
))
!
{
kuWeiArr
=
sender
as!
Array
<
ShopWarehouseDetailDataPositionModel
>
let
arr
=
NSMutableArray
()
for
item
in
kuWeiArr
!
{
arr
.
add
(
item
.
p_name
)
}
kuWeiName
=
arr
.
componentsJoined
(
by
:
","
)
listView
.
reloadData
()
}
else
{
//编辑
}
else
{
//编辑
kuWeiArr
=
sender
as!
Array
<
ShopWarehouseDetailDataPositionModel
>
let
arr
=
NSMutableArray
()
for
item
in
kuWeiArr
!
{
print
(
"item == "
,
item
.
status
)
arr
.
add
(
item
.
p_name
)
}
}
kuWeiName
=
arr
.
componentsJoined
(
by
:
","
)
listView
.
reloadData
()
}
}
glSelectView
!.
removeFromSuperview
()
glSelectView
!.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
}
}
...
...
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