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
c9c486a2
Commit
c9c486a2
authored
May 13, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品详情串联
parent
8875f252
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
216 additions
and
74 deletions
+216
-74
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
+19
-6
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+1
-1
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+93
-33
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.swift
...orm/ViewController/新增、编辑品牌/PinPaiListViewController.swift
+9
-9
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+81
-20
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.swift
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.swift
+9
-1
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
+3
-3
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
...atform/ViewController/新增采购单/XinCaiGouViewController.swift
+1
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
c9c486a2
No preview for this file type
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
View file @
c9c486a2
...
@@ -10,7 +10,7 @@ import UIKit
...
@@ -10,7 +10,7 @@ import UIKit
import
IQKeyboardManagerSwift
import
IQKeyboardManagerSwift
@objc
protocol
GLAlertSelectViewDelegate
{
@objc
protocol
GLAlertSelectViewDelegate
{
@objc
optional
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UI
View
)
@objc
optional
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
GLAlertSelect
View
)
@objc
optional
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
@objc
optional
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
@objc
optional
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
@objc
optional
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
...
@@ -20,11 +20,14 @@ import IQKeyboardManagerSwift
...
@@ -20,11 +20,14 @@ 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
{
var
isMultipleS
:
Bool
=
false
var
contentView
:
UIView
!
var
contentView
:
UIView
!
var
delegate
:
GLAlertSelectViewDelegate
?
var
delegate
:
GLAlertSelectViewDelegate
?
var
inputTextTF
:
UITextField
?
var
inputTextTF
:
UITextField
?
var
selectArray
:
NSMutableArray
?
var
selectArray
:
NSMutableArray
?
var
selectNum
:
String
?
=
""
var
selectNum
:
String
?
=
""
var
selectLblText
:
String
?
=
""
var
dataArr
=
Array
<
String
>
(){
var
dataArr
=
Array
<
String
>
(){
didSet
{
didSet
{
var
tbvH
=
CGFloat
(
dataArr
.
count
*
49
)
var
tbvH
=
CGFloat
(
dataArr
.
count
*
49
)
...
@@ -142,9 +145,17 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -142,9 +145,17 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
cell
.
titleLbl
.
text
=
dataArr
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
dataArr
[
indexPath
.
row
]
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
for
item
in
selectArray
!
{
if
isMultipleS
==
true
{
let
row
=
"
\(
item
)
"
as!
NSString
for
item
in
selectArray
!
{
if
row
.
integerValue
==
indexPath
.
row
{
let
row
=
"
\(
item
)
"
as!
NSString
if
row
.
integerValue
==
indexPath
.
row
{
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
selectBtn
.
isSelected
=
true
}
}
}
else
{
let
str
=
selectNum
as!
NSString
if
str
.
integerValue
==
indexPath
.
row
{
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
selectBtn
.
isSelected
=
true
cell
.
selectBtn
.
isSelected
=
true
}
}
...
@@ -169,10 +180,12 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -169,10 +180,12 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
if
selectNum
!.
count
>
0
{
if
selectNum
!.
count
>
0
{
for
item
in
selectTbv
.
visibleCells
{
for
item
in
selectTbv
.
visibleCells
{
let
cel
=
item
as!
TitleAndSelectCell
let
cel
=
item
as!
TitleAndSelectCell
cel
.
titleLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
cel
.
selectBtn
.
isSelected
=
false
cel
.
selectBtn
.
isSelected
=
false
if
cell
==
cel
{
if
cell
==
cel
{
cell
.
selectBtn
.
isSelected
=
true
cel
.
selectBtn
.
isSelected
=
true
selectNum
=
"
\(
cell
.
tag
)
"
cel
.
titleLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
selectNum
=
"
\(
cel
.
tag
)
"
}
}
}
}
}
else
{
}
else
{
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
c9c486a2
...
@@ -178,7 +178,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -178,7 +178,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
glSelectView
=
view
glSelectView
=
view
}
}
}
}
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UI
View
)
{
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
GLAlertSelect
View
)
{
print
(
"单选"
,
selectNum
)
print
(
"单选"
,
selectNum
)
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
c9c486a2
...
@@ -18,13 +18,22 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -18,13 +18,22 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
let
spxxArr
=
[
"商品名称"
,
"商品类型"
,
"商品分类"
,
"品牌"
,
"起卖数量"
,
"是否清真"
,
"是否询价"
]
let
spxxArr
=
[
"商品名称"
,
"商品类型"
,
"商品分类"
,
"品牌"
,
"起卖数量"
,
"是否清真"
,
"是否询价"
]
let
tishixxArr
=
[
"请输入商品名称"
,
"请选择商品类型"
,
"请选择商品分类"
,
"请选择品牌"
,
"请输入起卖数量"
]
let
tishixxArr
:
NSMutableArray
=
[
"请输入商品名称"
,
"请选择商品类型"
,
"请选择商品分类"
,
"请选择品牌"
,
"请输入起卖数量"
]
let
tishixxArr1
=
[
"请输入关键字"
,
"请输入物流费用"
,
"请选择国家"
,
"请选择商品状态"
,
"请选择运输方式"
]
let
tishixxArr1
:
NSMutableArray
=
[
"请输入关键字"
,
"请输入物流费用"
,
"请选择国家"
,
"请选择商品状态"
,
"请选择运输方式"
]
let
sptpArr
=
[
"商品封面图(限一张)"
,
"商品主图(限五张)"
]
let
sptpArr
=
[
"商品封面图(限一张)"
,
"商品主图(限五张)"
]
let
qtxxArr
=
[
"关键字"
,
"物流费用"
,
"国家"
,
"商品状态"
,
"运输方式"
]
let
qtxxArr
=
[
"关键字"
,
"物流费用"
,
"国家"
,
"商品状态"
,
"运输方式"
]
let
ysszArr
=
[
"用户付款是否需要审核"
,
"预设预付定金时间段"
,
"预设预付尾款时间段"
,
"预设预付尾款发货时间"
]
let
ysszArr
=
[
"用户付款是否需要审核"
,
"预设预付定金时间段"
,
"预设预付尾款时间段"
,
"预设预付尾款发货时间"
]
let
ysszHolder
=
[
"0"
,
"请选择时段"
,
"请选择时段"
,
"0"
]
var
itemTypeArr
=
NSMutableArray
()
var
shangPinStatus
=
"99"
var
shangPinStatusArr
=
[
"热销"
,
"爆款"
,
"新品"
,
"促销"
,
"外采"
,
"团购"
]
var
yunShuType
=
"99"
var
yunShuTypeArr
=
[
"冷链"
,
"常温"
,
"热链"
]
//MARK:--保存按钮
//MARK:--保存按钮
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
print
(
"保存按钮submitAction"
)
print
(
"保存按钮submitAction"
)
...
@@ -101,7 +110,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -101,7 +110,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTF"
)
as!
TitleAndTFCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTF"
)
as!
TitleAndTFCell
cell
.
nameLbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
tishixxArr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
tishixxArr
[
indexPath
.
row
]
as!
String
return
cell
return
cell
}
}
...
@@ -114,8 +123,8 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -114,8 +123,8 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtn"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtn"
)
as!
TitleAndBtnCell
cell
.
nameLbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
tishixxArr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
tishixxArr
[
indexPath
.
row
]
as!
String
cell
.
tag
=
indexPath
.
row
cell
.
delegate
=
self
cell
.
delegate
=
self
return
cell
return
cell
...
@@ -148,7 +157,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -148,7 +157,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
guiGeLbl
.
text
=
"规格:
\(
String
(
describing
:
dict
[
"guiGe"
]
!
)
)
kg/件"
cell
.
guiGeLbl
.
text
=
"规格:
\(
String
(
describing
:
dict
[
"guiGe"
]
!
)
)
kg/件"
cell
.
danWeiLbl
.
text
=
"单位:
\(
String
(
describing
:
dict
[
"danWei"
]
!
)
)
"
cell
.
danWeiLbl
.
text
=
"单位:
\(
String
(
describing
:
dict
[
"danWei"
]
!
)
)
"
cell
.
sellPriceLbl
.
text
=
"售价:¥
\(
dict
[
"price"
]
!
)
"
cell
.
sellPriceLbl
.
text
=
"售价:¥
\(
dict
[
"price"
]
!
)
"
// cell.itemIdx = dict["itemIdx"] as! Int
// cell.itemIdx = dict["itemIdx"] as! Int
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
...
@@ -173,21 +182,20 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -173,21 +182,20 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtn"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtn"
)
as!
TitleAndBtnCell
cell
.
nameLbl
.
text
=
ysszArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
ysszArr
[
indexPath
.
row
]
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
contentLbl
.
text
=
ysszHolder
[
indexPath
.
row
]
return
cell
return
cell
case
4
:
case
4
:
if
indexPath
.
row
<
2
{
if
indexPath
.
row
<
2
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTF"
)
as!
TitleAndTFCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTF"
)
as!
TitleAndTFCell
cell
.
nameLbl
.
text
=
qtxxArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
qtxxArr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
tishixxArr1
[
indexPath
.
row
]
as!
String
cell
.
textTF
.
placeholder
=
tishixxArr1
[
indexPath
.
row
]
cell
.
tag
=
indexPath
.
row
return
cell
return
cell
}
else
{
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtn"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtn"
)
as!
TitleAndBtnCell
cell
.
nameLbl
.
text
=
qtxxArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
qtxxArr
[
indexPath
.
row
]
cell
.
tag
=
indexPath
.
row
cell
.
contentLbl
.
text
=
tishixxArr1
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
tishixxArr1
[
indexPath
.
row
]
as!
String
cell
.
delegate
=
self
cell
.
delegate
=
self
...
@@ -330,24 +338,28 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -330,24 +338,28 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
override
func
backAction
()
{
override
func
backAction
()
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
var
itemTypeArr
=
NSMutableArray
()
//MARK: -- 选择填或跳转
//MARK: -- 选择填或跳转
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
if
cell
.
nameLbl
.
text
==
"商品类型"
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
view
.
titleLbl
.
text
=
"请选择商品类型"
if
cell
.
nameLbl
.
text
==
"商品类型"
{
view
.
delegate
=
self
if
glSelectView
==
nil
{
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
if
itemTypeArr
.
count
==
0
{
view
.
tag
=
cell
.
tag
for
_
in
view
.
dataArr
{
view
.
isMultipleS
=
true
itemTypeArr
.
add
(
"99"
)
view
.
titleLbl
.
text
=
"请选择商品类型"
view
.
delegate
=
self
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
if
itemTypeArr
.
count
==
0
{
for
_
in
view
.
dataArr
{
itemTypeArr
.
add
(
"99"
)
}
}
}
view
.
selectArray
=
itemTypeArr
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
view
.
selectArray
=
itemTypeArr
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
}
if
cell
.
nameLbl
.
text
==
"商品分类"
{
if
cell
.
nameLbl
.
text
==
"商品分类"
{
let
vc
=
GoodsClassViewController
()
let
vc
=
GoodsClassViewController
()
...
@@ -366,10 +378,24 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -366,10 +378,24 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
if
cell
.
nameLbl
.
text
==
"商品状态"
{
if
cell
.
nameLbl
.
text
==
"商品状态"
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择商品类型"
view
.
delegate
=
self
view
.
dataArr
=
shangPinStatusArr
view
.
selectNum
=
shangPinStatus
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
if
cell
.
nameLbl
.
text
==
"运输方式"
{
if
cell
.
nameLbl
.
text
==
"运输方式"
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择运输方式"
view
.
delegate
=
self
view
.
dataArr
=
yunShuTypeArr
view
.
selectNum
=
yunShuType
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
}
if
cell
.
nameLbl
.
text
==
"预设预付定金时间段"
{
if
cell
.
nameLbl
.
text
==
"预设预付定金时间段"
{
...
@@ -389,21 +415,51 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -389,21 +415,51 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UI
View
)
{
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
GLAlertSelect
View
)
{
print
(
"单选"
,
selectNum
)
print
(
"单选"
,
selectNum
)
print
(
view
.
titleLbl
.
text
)
switch
view
.
titleLbl
.
text
{
case
"请选择商品类型"
:
shangPinStatus
=
selectNum
as
String
tishixxArr1
.
replaceObject
(
at
:
view
.
tag
,
with
:
shangPinStatusArr
[
selectNum
.
integerValue
])
break
case
"请选择运输方式"
:
yunShuType
=
selectNum
as
String
tishixxArr1
.
replaceObject
(
at
:
view
.
tag
,
with
:
yunShuTypeArr
[
selectNum
.
integerValue
])
break
default
:
break
}
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
listTbv
.
reloadData
()
}
}
var
isYuShou
:
Bool
=
false
var
isYuShou
:
Bool
=
false
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
{
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
{
print
(
"多选"
,
sender
)
print
(
"多选"
,
sender
)
itemTypeArr
=
sender
as!
NSMutableArray
itemTypeArr
=
sender
as!
NSMutableArray
let
str
=
"
\(
sender
.
firstObject
)
"
as!
NSString
let
str
=
"
\(
sender
.
firstObject
!
)
"
as!
NSString
if
str
.
integerValue
!=
99
{
if
str
!=
"99"
{
isYuShou
=
true
isYuShou
=
true
}
else
{
}
else
{
isYuShou
=
false
isYuShou
=
false
}
}
let
contentArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
let
titles
=
NSMutableArray
()
titles
.
removeAllObjects
()
for
num
in
itemTypeArr
{
let
str
=
"
\(
num
)
"
as!
NSString
if
str
!=
"99"
{
titles
.
add
(
contentArr
[
str
.
integerValue
])
}
}
tishixxArr
.
replaceObject
(
at
:
view
.
tag
,
with
:
titles
.
componentsJoined
(
by
:
","
))
if
itemTypeArr
.
componentsJoined
(
by
:
"_"
)
==
"99_99_99_99"
{
tishixxArr
.
replaceObject
(
at
:
view
.
tag
,
with
:
"请选择商品类型"
)
}
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
listTbv
.
reloadData
()
listTbv
.
reloadData
()
...
@@ -461,7 +517,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -461,7 +517,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
vc
=
CreatNewSpecsViewController
()
let
vc
=
CreatNewSpecsViewController
()
vc
.
barTitle
=
"编辑规格"
vc
.
barTitle
=
"编辑规格"
vc
.
datasArr
=
guiGeArr
vc
.
datasArr
=
guiGeArr
vc
.
isYuShouSetting
=
isYuShou
let
dataDict
:
NSDictionary
!
let
dataDict
:
NSDictionary
!
if
selectIdx
?
.
item
!=
nil
{
if
selectIdx
?
.
item
!=
nil
{
dataDict
=
guiGeArr
[
selectIdx
!.
item
]
as!
NSDictionary
dataDict
=
guiGeArr
[
selectIdx
!.
item
]
as!
NSDictionary
...
@@ -476,6 +531,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -476,6 +531,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
vc
.
danWei
=
dataDict
[
"danWei"
]
as!
String
vc
.
danWei
=
dataDict
[
"danWei"
]
as!
String
let
arr
=
dataDict
[
"jieTiArr"
]
as!
NSMutableArray
let
arr
=
dataDict
[
"jieTiArr"
]
as!
NSMutableArray
let
arr2
=
dataDict
[
"specalArr"
]
as!
NSMutableArray
let
arr2
=
dataDict
[
"specalArr"
]
as!
NSMutableArray
vc
.
isNonYuShou
=
dataDict
[
"isNonYuShou"
]
as!
Bool
vc
.
isYuShouSetting
=
dataDict
[
"isYuShouSetting"
]
as!
Bool
vc
.
yuShouPrice
=
dataDict
[
"yuShouPrice"
]
as!
String
vc
.
specalArr
=
arr2
vc
.
specalArr
=
arr2
vc
.
jieTiArr
=
arr
vc
.
jieTiArr
=
arr
if
selectIdx
==
nil
{
if
selectIdx
==
nil
{
...
@@ -500,7 +558,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -500,7 +558,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
vc
=
CreatNewSpecsViewController
()
let
vc
=
CreatNewSpecsViewController
()
vc
.
barTitle
=
"新增规格"
vc
.
barTitle
=
"新增规格"
vc
.
delegate
=
self
vc
.
delegate
=
self
print
(
"abc == "
,
isYuShou
)
vc
.
isYuShouSetting
=
isYuShou
vc
.
isYuShouSetting
=
isYuShou
vc
.
isNonYuShou
=
isYuShou
vc
.
datasArr
=
guiGeArr
vc
.
datasArr
=
guiGeArr
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
...
...
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.swift
View file @
c9c486a2
...
@@ -72,19 +72,19 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
...
@@ -72,19 +72,19 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
return
49
return
49
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
dataModelArray
!.
count
return
12
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
let
rowModel
=
dataModelArray
!
[
indexPath
.
row
]
as!
GeneralInfoBrandModel
//
let rowModel = dataModelArray![indexPath.row] as! GeneralInfoBrandModel
cell
.
nameLbl
.
text
=
rowModel
.
brand_name
//
cell.nameLbl.text = rowModel.brand_name
cell
.
contentLbl
.
text
=
""
//
cell.contentLbl.text = ""
cell
.
btn
.
isUserInteractionEnabled
=
false
//
cell.btn.isUserInteractionEnabled = false
cell
.
selectionStyle
=
.
gray
//
cell.selectionStyle = .gray
if
isSelectData
{
//
if isSelectData {
cell
.
arrowImg
.
isHidden
=
true
//
cell.arrowImg.isHidden = true
}
//
}
return
cell
return
cell
}
}
var
selectModel
:
GeneralInfoBrandModel
?
=
nil
var
selectModel
:
GeneralInfoBrandModel
?
=
nil
...
...
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
c9c486a2
...
@@ -36,13 +36,14 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -36,13 +36,14 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var
isJieTiJiaSetting
:
Bool
=
false
var
isJieTiJiaSetting
:
Bool
=
false
var
selectYuShou
:
Bool
=
false
//是否选择设置预售价格
var
selectYuShou
:
Bool
=
false
//是否选择设置预售价格
var
isNonYuShou
:
Bool
=
false
//是否选择预售价格
var
yuShouPrice
:
String
=
""
//预售设置数据记录
//选择页面
//选择页面
var
selectView
:
GLAlertSelectView
?
=
nil
var
selectView
:
GLAlertSelectView
?
=
nil
var
selectListArr
:
Array
<
String
>
=
[
"
a"
,
"b"
,
"c
"
]
var
selectListArr
:
Array
<
String
>
=
[
"
冷冻"
,
"冷藏"
,
"常温
"
]
var
selectListArr1
:
Array
<
String
>
=
[
"吨"
,
"件"
,
"箱"
,
"包"
,
"桶"
,
"瓶"
]
var
price
=
""
{
var
price
=
""
{
willSet
{
willSet
{
price
=
newValue
price
=
newValue
...
@@ -137,30 +138,56 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -137,30 +138,56 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
@IBAction
func
saveAction
(
_
sender
:
Any
)
{
@IBAction
func
saveAction
(
_
sender
:
Any
)
{
print
(
"save"
)
print
(
"save"
)
// if price.count == 0 {
// if price.count == 0 {
// HUD.flash(.label("请输入售价"), delay: 1.2)
// return
// return
// }
// }
// if guiGe.count == 0 {
// if guiGe.count == 0 {
// HUD.flash(.label("请输入规格"), delay: 1.2)
// return
// return
// }
// }
// if weight.count == 0 {
// if weight.count == 0 {
// HUD.flash(.label("请输入重量"), delay: 1.2)
// return
// return
// }
// }
// if wenDu.count == 0 {
// if wenDu.count == 0 {
// HUD.flash(.label("请选择温藏"), delay: 1.2)
// return
// return
// }
// }
// if danWei.count == 0 {
// if danWei.count == 0 {
// HUD.flash(.label("请选择单位"), delay: 1.2)
// return
// return
// }
// }
//
// for item in jieTiArr {
// for item in jieTiArr {
// let str = item as! String
// let str = item as! String
// let arr = str.components(separatedBy: "_")
// let arr = str.components(separatedBy: "_")
// for letter in arr {
// for letter in arr {
// if letter.count == 0 {//提示阶梯数据未完整
// if letter.count == 0 {//提示阶梯数据未完整
// HUD.flash(.label("请完整填写数据"), delay: 1.2)
// return
// }
// }
// }
//
// for item in specalArr {
// let str = item as! String
// let arr = str.components(separatedBy: "_")
// for letter in arr {
// if letter.count == 0 {//提示预售阶梯数据未完整
// HUD.flash(.label("请完整填写数据"), delay: 1.2)
// return
// return
// }
// }
// }
// }
// }
// }
//
// let letters = yuShouPrice.components(separatedBy: "_")
// for letter in letters {
// if letter.count == 0 {//提示预售阶梯数据未完整
// HUD.flash(.label("请完整填写数据"), delay: 1.2)
// return
// }
// }
let
dict
=
NSMutableDictionary
()
let
dict
=
NSMutableDictionary
()
dict
[
"price"
]
=
price
dict
[
"price"
]
=
price
dict
[
"guiGe"
]
=
guiGe
dict
[
"guiGe"
]
=
guiGe
...
@@ -170,6 +197,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -170,6 +197,9 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
dict
[
"jieTiArr"
]
=
jieTiArr
dict
[
"jieTiArr"
]
=
jieTiArr
dict
[
"specalArr"
]
=
specalArr
dict
[
"specalArr"
]
=
specalArr
dict
[
"itemIdx"
]
=
datasArr
.
count
dict
[
"itemIdx"
]
=
datasArr
.
count
dict
[
"isNonYuShou"
]
=
isNonYuShou
dict
[
"isYuShouSetting"
]
=
isYuShouSetting
dict
[
"yuShouPrice"
]
=
yuShouPrice
if
barTitle
?
.
contains
(
"编辑"
)
==
true
{
if
barTitle
?
.
contains
(
"编辑"
)
==
true
{
print
(
"abc == "
,
selectIdx
?
.
item
)
print
(
"abc == "
,
selectIdx
?
.
item
)
datasArr
.
replaceObject
(
at
:
selectIdx
!.
item
,
with
:
dict
)
datasArr
.
replaceObject
(
at
:
selectIdx
!.
item
,
with
:
dict
)
...
@@ -271,7 +301,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -271,7 +301,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
namelbl
.
text
=
"预售设置"
cell
.
namelbl
.
text
=
"预售设置"
cell
.
infoSw
.
isOn
=
isYuShouSetting
cell
.
infoSw
.
isOn
=
isYuShouSetting
cell
.
tag
=
5
cell
.
tag
=
5
if
is
YuShouSetting
==
false
{
if
is
NonYuShou
==
false
{
cell
.
namelbl
.
alpha
=
0.45
cell
.
namelbl
.
alpha
=
0.45
cell
.
isUserInteractionEnabled
=
false
cell
.
isUserInteractionEnabled
=
false
}
}
...
@@ -283,6 +313,12 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -283,6 +313,12 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
cell
.
infoSw
.
isOn
=
isYuShouSetting
cell
.
infoSw
.
isOn
=
isYuShouSetting
cell
.
delegate
=
self
cell
.
delegate
=
self
if
yuShouPrice
.
count
>
0
{
let
arr
=
yuShouPrice
.
components
(
separatedBy
:
"_"
)
cell
.
inputTF1
.
text
=
arr
[
0
]
cell
.
inputTF2
.
text
=
arr
[
1
]
cell
.
inputTF3
.
text
=
arr
[
2
]
}
return
cell
return
cell
}
}
}
}
...
@@ -340,17 +376,16 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -340,17 +376,16 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
//header
//header
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
let
view
=
UIView
()
if
section
==
2
{
if
section
==
2
{
//阶梯价设置
let
view
=
NewCreateHeader
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
49
))
let
view
=
NewCreateHeader
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
49
))
view
.
delegate
=
self
view
.
delegate
=
self
view
.
infoSw
.
isOn
=
isJieTiJiaSetting
view
.
infoSw
.
isOn
=
isJieTiJiaSetting
if
isJieTiJiaSetting
==
false
{
if
isJieTiJiaSetting
==
false
{
return
view
return
view
}
}
if
isYuShouSetting
{
if
isYuShouSetting
{
//阶梯价
let
view
=
TitleAndSwitchHeaderView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
90
))
let
view
=
TitleAndSwitchHeaderView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
90
))
view
.
delegate
=
self
view
.
delegate
=
self
view
.
selectYuShou
=
selectYuShou
view
.
selectYuShou
=
selectYuShou
...
@@ -394,6 +429,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -394,6 +429,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
return
0.01
return
0.01
}
}
//MARK: - NEW CELL DELEGATE
//MARK: - NEW CELL DELEGATE
func
YuShouCellTFContent
(
Price
:
NSString
)
{
yuShouPrice
=
Price
as
String
}
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
switch
cell
.
tag
{
switch
cell
.
tag
{
case
0
:
case
0
:
...
@@ -407,16 +447,19 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -407,16 +447,19 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
break
break
}
}
}
}
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UIView
)
{
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
GLAlertSelectView
)
{
let
cell
=
listTbv
.
cellForRow
(
at
:
IndexPath
(
row
:
view
.
tag
,
section
:
0
))
as!
TitleAndBtnCell
if
view
.
tag
==
3
{
if
view
.
tag
==
3
{
tempSelect
=
selectNum
tempSelect
=
selectNum
wenDu
=
selectListArr
[
selectNum
.
integerValue
]
wenDu
=
selectListArr
[
selectNum
.
integerValue
]
cell
.
contentLbl
.
text
=
selectListArr
[
selectNum
.
integerValue
]
}
else
{
}
else
{
itemDanWeiSelect
=
selectNum
itemDanWeiSelect
=
selectNum
danWei
=
selectListArr
[
selectNum
.
integerValue
]
cell
.
contentLbl
.
text
=
selectListArr1
[
selectNum
.
integerValue
]
danWei
=
selectListArr1
[
selectNum
.
integerValue
]
}
}
let
cell
=
listTbv
.
cellForRow
(
at
:
IndexPath
(
row
:
view
.
tag
,
section
:
0
))
as!
TitleAndBtnCell
cell
.
contentLbl
.
text
=
selectListArr
[
selectNum
.
integerValue
]
selectView
?
.
removeFromSuperview
()
selectView
?
.
removeFromSuperview
()
selectView
=
nil
selectView
=
nil
}
}
...
@@ -430,6 +473,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -430,6 +473,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
// var tempSelectArr = NSMutableArray()
// var tempSelectArr = NSMutableArray()
var
tempSelect
:
NSString
=
"99"
var
tempSelect
:
NSString
=
"99"
var
itemDanWeiSelect
:
NSString
=
"99"
var
itemDanWeiSelect
:
NSString
=
"99"
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
if
cell
.
tag
==
3
{
if
cell
.
tag
==
3
{
if
selectView
==
nil
{
if
selectView
==
nil
{
...
@@ -449,7 +493,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -449,7 +493,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
view
.
titleLbl
.
text
=
"请选择商品单位"
view
.
titleLbl
.
text
=
"请选择商品单位"
view
.
delegate
=
self
view
.
delegate
=
self
view
.
selectNum
=
itemDanWeiSelect
as
String
view
.
selectNum
=
itemDanWeiSelect
as
String
view
.
dataArr
=
selectListArr
view
.
dataArr
=
selectListArr
1
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
selectView
=
view
selectView
=
view
}
}
...
@@ -457,27 +501,28 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -457,27 +501,28 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
func
switchStatus
(
sender
:
UISwitch
)
{
func
switchStatus
(
sender
:
UISwitch
)
{
//阶梯价设置
isJieTiJiaSetting
=
sender
.
isOn
isJieTiJiaSetting
=
sender
.
isOn
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
func
switchClick
(
content
:
UISwitch
,
cell
:
TitleAndSwitchCell
)
{
func
switchClick
(
content
:
UISwitch
,
cell
:
TitleAndSwitchCell
)
{
//控制
print
(
"status2 =
\(
isYuShouSetting
)
,
\(
isJieTiJiaSetting
)
"
)
if
cell
.
tag
==
5
{
if
cell
.
tag
==
5
{
isYuShouSetting
=
content
.
isOn
isYuShouSetting
=
content
.
isOn
let
idxPath
=
IndexPath
(
row
:
0
,
section
:
1
)
let
idxPath
=
IndexPath
(
row
:
0
,
section
:
1
)
if
isYuShouSetting
&&
isJieTiJiaSetting
{
if
isYuShouSetting
&&
isJieTiJiaSetting
{
//单独点击预售设置
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
else
{
}
else
{
//单独打开预售设置
listTbv
.
reloadRows
(
at
:
[
idxPath
],
with
:
.
none
)
listTbv
.
reloadRows
(
at
:
[
idxPath
],
with
:
.
none
)
}
}
}
}
}
}
func
newCreateSwitchStatus
(
sender
:
UISwitch
)
{
func
newCreateSwitchStatus
(
sender
:
UISwitch
)
{
//打开switch
//打开switch
阶梯价设置
isJieTiJiaSetting
=
sender
.
isOn
isJieTiJiaSetting
=
sender
.
isOn
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
...
@@ -491,6 +536,8 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -491,6 +536,8 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
func
YuShouCellSwitchStatus
(
sender
:
UISwitch
)
{
func
YuShouCellSwitchStatus
(
sender
:
UISwitch
)
{
//控制
print
(
"status3 =
\(
isYuShouSetting
)
,
\(
isJieTiJiaSetting
)
"
)
isYuShouSetting
=
sender
.
isOn
isYuShouSetting
=
sender
.
isOn
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
...
@@ -506,6 +553,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -506,6 +553,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
jieTiArr
.
replaceObject
(
at
:
cell
.
tag
,
with
:
"
\(
price
)
_
\(
count
)
"
)
jieTiArr
.
replaceObject
(
at
:
cell
.
tag
,
with
:
"
\(
price
)
_
\(
count
)
"
)
}
}
}
}
func
selectYuShou
(
sender
:
UIButton
)
{
func
selectYuShou
(
sender
:
UIButton
)
{
if
sender
.
tag
==
0
{
if
sender
.
tag
==
0
{
selectYuShou
=
false
selectYuShou
=
false
...
@@ -540,7 +588,20 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -540,7 +588,20 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
selectIdx
=
indexPath
selectIdx
=
indexPath
//刷新cell
//刷新cell
let
dataDict
=
datasArr
[
selectIdx
!.
item
]
as!
NSDictionary
price
=
dataDict
[
"price"
]
as!
String
guiGe
=
dataDict
[
"guiGe"
]
as!
String
weight
=
dataDict
[
"weight"
]
as!
String
wenDu
=
dataDict
[
"wenDu"
]
as!
String
danWei
=
dataDict
[
"danWei"
]
as!
String
let
arr
=
dataDict
[
"jieTiArr"
]
as!
NSMutableArray
let
arr2
=
dataDict
[
"specalArr"
]
as!
NSMutableArray
isNonYuShou
=
dataDict
[
"isNonYuShou"
]
as!
Bool
isYuShouSetting
=
dataDict
[
"isYuShouSetting"
]
as!
Bool
yuShouPrice
=
dataDict
[
"yuShouPrice"
]
as!
String
specalArr
=
arr2
jieTiArr
=
arr
listTbv
.
reloadData
()
collectionView
.
reloadData
()
collectionView
.
reloadData
()
}
}
}
}
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.swift
View file @
c9c486a2
...
@@ -9,11 +9,12 @@
...
@@ -9,11 +9,12 @@
import
UIKit
import
UIKit
@objc
protocol
YuShouCellDelegate
{
@objc
protocol
YuShouCellDelegate
{
@objc
optional
func
YuShouCellSwitchStatus
(
sender
:
UISwitch
)
@objc
optional
func
YuShouCellSwitchStatus
(
sender
:
UISwitch
)
@objc
optional
func
YuShouCellTFContent
(
Price
:
NSString
)
}
}
class
YuShouCell
:
UITableViewCell
{
class
YuShouCell
:
UITableViewCell
{
var
delegate
:
YuShouCellDelegate
?
var
delegate
:
YuShouCellDelegate
?
@IBOutlet
weak
var
inputTF3
:
UITextField
!
@IBOutlet
weak
var
inputTF3
:
UITextField
!
@IBOutlet
weak
var
inputTF2
:
NSLayoutConstraint
!
@IBOutlet
weak
var
inputTF2
:
UITextField
!
@IBOutlet
weak
var
inputTF1
:
UITextField
!
@IBOutlet
weak
var
inputTF1
:
UITextField
!
@IBOutlet
weak
var
infoSw
:
UISwitch
!
@IBOutlet
weak
var
infoSw
:
UISwitch
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
...
@@ -22,8 +23,15 @@ var delegate:YuShouCellDelegate?
...
@@ -22,8 +23,15 @@ var delegate:YuShouCellDelegate?
infoSw
.
transform
=
CGAffineTransform
(
scaleX
:
0.8
,
y
:
0.8
)
infoSw
.
transform
=
CGAffineTransform
(
scaleX
:
0.8
,
y
:
0.8
)
infoSw
.
addTarget
(
self
,
action
:
#selector(
switchChange(sender:)
)
,
for
:
.
valueChanged
)
infoSw
.
addTarget
(
self
,
action
:
#selector(
switchChange(sender:)
)
,
for
:
.
valueChanged
)
inputTF1
.
addTarget
(
self
,
action
:
#selector(
textTfValueChange(sender:)
)
,
for
:
.
editingChanged
)
inputTF2
.
addTarget
(
self
,
action
:
#selector(
textTfValueChange(sender:)
)
,
for
:
.
editingChanged
)
inputTF3
.
addTarget
(
self
,
action
:
#selector(
textTfValueChange(sender:)
)
,
for
:
.
editingChanged
)
// Initialization code
// Initialization code
}
}
@objc
func
textTfValueChange
(
sender
:
UITextField
){
delegate
?
.
YuShouCellTFContent
?(
Price
:
"
\(
inputTF1
.
text
!
)
_
\(
inputTF2
.
text
!
)
_
\(
inputTF3
.
text
!
)
"
as
NSString
)
}
@objc
func
switchChange
(
sender
:
UISwitch
){
@objc
func
switchChange
(
sender
:
UISwitch
){
delegate
?
.
YuShouCellSwitchStatus
?(
sender
:
sender
)
delegate
?
.
YuShouCellSwitchStatus
?(
sender
:
sender
)
}
}
...
...
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
View file @
c9c486a2
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
<connections>
<connections>
<outlet
property=
"infoSw"
destination=
"05q-1N-wvO"
id=
"HtL-79-Qch"
/>
<outlet
property=
"infoSw"
destination=
"05q-1N-wvO"
id=
"HtL-79-Qch"
/>
<outlet
property=
"inputTF1"
destination=
"COH-zY-OUo"
id=
"hNT-E8-8k9"
/>
<outlet
property=
"inputTF1"
destination=
"COH-zY-OUo"
id=
"hNT-E8-8k9"
/>
<outlet
property=
"inputTF2"
destination=
"
b8D-hX-Yk3"
id=
"YpH-fW-FaR
"
/>
<outlet
property=
"inputTF2"
destination=
"
Qb7-aM-usa"
id=
"svg-gl-51Y
"
/>
<outlet
property=
"inputTF3"
destination=
"mht-f5-qwh"
id=
"lPo-lt-ttH"
/>
<outlet
property=
"inputTF3"
destination=
"mht-f5-qwh"
id=
"lPo-lt-ttH"
/>
</connections>
</connections>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"112.83482142857142"
/>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"112.83482142857142"
/>
...
@@ -153,10 +153,10 @@
...
@@ -153,10 +153,10 @@
</objects>
</objects>
<resources>
<resources>
<namedColor
name=
"标题字颜色"
>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.180
3921568627451"
green=
"0.1803921568627451"
blue=
"0.1803921568627451
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.180
00000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"标题字颜色"
>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.180
00000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.180
3921568627451"
green=
"0.1803921568627451"
blue=
"0.1803921568627451
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"灰色分界线"
>
<namedColor
name=
"灰色分界线"
>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
...
...
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
View file @
c9c486a2
...
@@ -251,7 +251,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -251,7 +251,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
print
(
"AddGuiGeCellClick"
)
print
(
"AddGuiGeCellClick"
)
}
}
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UI
View
)
{
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
GLAlertSelect
View
)
{
print
(
"单选"
,
selectNum
)
print
(
"单选"
,
selectNum
)
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