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
d2bce164
Commit
d2bce164
authored
May 27, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仓库管理列表完善
parent
8c71329b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
29 deletions
+39
-29
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Assets.xcassets/字体色/蓝色字体颜色.colorset/Contents.json
...latform/Assets.xcassets/字体色/蓝色字体颜色.colorset/Contents.json
+9
-9
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementCell.xib
...essPlatform/ViewController/仓库管理/WarehoseMangementCell.xib
+3
-3
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
...latform/ViewController/仓库管理/WarehoseMangementListVC.swift
+27
-17
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d2bce164
No preview for this file type
GeliBusinessPlatform/Assets.xcassets/字体色/蓝色字体颜色.colorset/Contents.json
View file @
d2bce164
{
{
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
},
"colors"
:
[
"colors"
:
[
{
{
"idiom"
:
"universal"
,
"color"
:
{
"color"
:
{
"color-space"
:
"srgb"
,
"color-space"
:
"srgb"
,
"components"
:
{
"components"
:
{
"red"
:
"0.278"
,
"alpha"
:
"1.000"
,
"alpha"
:
"1.000"
,
"blue"
:
"0.890"
,
"blue"
:
"0xE3"
,
"green"
:
"0.561"
"green"
:
"0x8F"
,
"red"
:
"0x47"
}
}
},
"idiom"
:
"universal"
}
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
]
}
}
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementCell.xib
View file @
d2bce164
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<objects>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"WarehoseMangementCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"WarehoseMangementCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"94"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"94"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
...
...
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
View file @
d2bce164
...
@@ -97,19 +97,12 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -97,19 +97,12 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
func
searchBarSearchButtonClicked
(
_
searchBar
:
UISearchBar
)
{
func
searchBarSearchButtonClicked
(
_
searchBar
:
UISearchBar
)
{
print
(
"点击搜索进行--"
)
print
(
"点击搜索进行--"
)
searchBar
.
resignFirstResponder
()
searchBar
.
resignFirstResponder
()
keyWord
=
searchBar
.
text
!
tableSearchV
=
UITableView
()
contentView
.
addSubview
(
tableSearchV
);
tableSearchV
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
left
.
right
.
bottom
.
equalToSuperview
()
}
tableSearchV
.
delegate
=
self
tableSearchV
.
dataSource
=
self
tableSearchV
.
separatorStyle
=
.
none
tableSearchV
?
.
register
(
UINib
(
nibName
:
"WarehoseMangementCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"WarehoseMangementCell"
)
if
blackBtnView
!=
nil
{
if
blackBtnView
!=
nil
{
blackBtnView
.
removeFromSuperview
()
blackBtnView
.
removeFromSuperview
()
}
}
self
.
tableV
.
mj_header
?
.
beginRefreshing
()
}
}
//MAKR:--调起搜索后添加个蒙版本
//MAKR:--调起搜索后添加个蒙版本
var
blackBtnView
:
UIButton
!
=
nil
var
blackBtnView
:
UIButton
!
=
nil
...
@@ -132,9 +125,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -132,9 +125,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
}
}
//MARK:--清除搜索代理
//MARK:--清除搜索代理
func
clearSearchAction
()
{
func
clearSearchAction
()
{
if
tableSearchV
!=
nil
{
keyWord
=
""
tableSearchV
.
removeFromSuperview
()
self
.
loadData
()
}
}
}
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
print
(
"编辑即将结束了--"
)
print
(
"编辑即将结束了--"
)
...
@@ -157,7 +149,6 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -157,7 +149,6 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
var
warehourseArr
:
Array
<
ShopWarehouseListDataModel
>
=
[]
//仓库数组
var
warehourseArr
:
Array
<
ShopWarehouseListDataModel
>
=
[]
//仓库数组
var
tableV
:
UITableView
!
var
tableV
:
UITableView
!
var
tableSearchV
:
UITableView
!
=
nil
private
let
animations
=
[
AnimationType
.
from
(
direction
:
.
bottom
,
offset
:
150*
glscale
)]
private
let
animations
=
[
AnimationType
.
from
(
direction
:
.
bottom
,
offset
:
150*
glscale
)]
...
@@ -179,15 +170,36 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -179,15 +170,36 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
},
completion
:
nil
)
},
completion
:
nil
)
}
}
let
typeArr
=
[
"常温"
,
"冷藏"
,
"冷冻"
]
let
typeArr
=
[
"
"
,
"
常温"
,
"冷藏"
,
"冷冻"
]
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"WarehoseMangementCell"
)
as!
WarehoseMangementCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"WarehoseMangementCell"
)
as!
WarehoseMangementCell
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
!
]
cell
.
statusLbl
.
text
=
typeArr
[
model
.
w_type
!
]
cell
.
statusLbl
.
isHidden
=
false
cell
.
adrLbl
.
text
=
model
.
w_address
!
cell
.
adrLbl
.
text
=
model
.
w_address
!
cell
.
kuCunLbl
.
text
=
"
\(
model
.
inventory_count
!
)
"
cell
.
kuCunLbl
.
text
=
"
\(
model
.
inventory_count
!
)
"
switch
model
.
w_type
{
case
0
:
//异常
cell
.
statusLbl
.
isHidden
=
true
break
case
1
:
cell
.
statusLbl
.
backgroundColor
=
UIColor
(
named
:
"标题背景色"
)
cell
.
statusLbl
.
alpha
=
1
break
case
2
:
cell
.
statusLbl
.
backgroundColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
statusLbl
.
alpha
=
0.5
break
case
3
:
cell
.
statusLbl
.
backgroundColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
statusLbl
.
alpha
=
1
break
default
:
break
}
return
cell
return
cell
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
...
@@ -237,9 +249,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
...
@@ -237,9 +249,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
return
[
deleteAction
,]
return
[
deleteAction
,]
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
tableView
==
tableSearchV
{
return
3
}
return
warehourseArr
.
count
return
warehourseArr
.
count
}
}
}
}
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