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
37fa92ba
Commit
37fa92ba
authored
May 15, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改新增商品
parent
528b32c9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
26 deletions
+46
-26
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/商品分类/GoodsClassViewController.swift
...atform/ViewController/商品分类/GoodsClassViewController.swift
+15
-1
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+11
-1
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.swift
...orm/ViewController/新增、编辑品牌/PinPaiListViewController.swift
+16
-20
GeliBusinessPlatform/ViewController/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.xib
...wController/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.xib
+4
-4
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
37fa92ba
No preview for this file type
GeliBusinessPlatform/ViewController/商品分类/GoodsClassViewController.swift
View file @
37fa92ba
...
...
@@ -74,6 +74,11 @@ class GoodsClassViewController: BaseViewController , UITableViewDelegate, UITabl
model_3
.
level
=
dataModel_3
.
level
model_3
.
cat_id
=
dataModel_3
.
cat_id
if
selectModel
!=
nil
{
if
model_3
.
cat_id
==
selectModel
?
.
cat_id
{
model_3
.
isSelect
=
true
}
}
//添加
model_2
.
modelS
?
.
append
(
model_3
)
}
...
...
@@ -83,7 +88,11 @@ class GoodsClassViewController: BaseViewController , UITableViewDelegate, UITabl
if
!
model_2
.
isCanExpand
!
{
model_2
.
isCanSelect
=
true
}
if
selectModel
!=
nil
{
if
model_2
.
cat_id
==
selectModel
?
.
cat_id
{
model_2
.
isSelect
=
true
}
}
model_1
.
modelS
?
.
append
(
model_2
)
}
...
...
@@ -91,6 +100,11 @@ class GoodsClassViewController: BaseViewController , UITableViewDelegate, UITabl
if
!
model_1
.
isCanExpand
!
{
model_1
.
isCanSelect
=
true
}
if
selectModel
!=
nil
{
if
model_1
.
cat_id
==
selectModel
?
.
cat_id
{
model_1
.
isSelect
=
true
}
}
var
arrs
:
Array
<
Any
>
=
[]
arrs
.
append
(
model_1
)
dataArr
.
append
(
arrs
)
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
37fa92ba
...
...
@@ -285,6 +285,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
if
cell
.
nameLbl
.
text
==
"商品分类"
{
let
vc
=
GoodsClassViewController
()
vc
.
delegate
=
self
vc
.
selectModel
=
selectGoodsClassModel
vc
.
dataModelArray
=
generalInfoModel
?
.
data
?
.
cats
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
@@ -292,6 +293,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
let
vc
=
PinPaiListViewController
()
vc
.
isSelectData
=
true
vc
.
delegate
=
self
vc
.
selectModel
=
selectPinPaiData
vc
.
dataModelArray
=
generalInfoModel
?
.
data
?
.
brand
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
@@ -341,13 +343,21 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
//MARK:---选择商品分类返回数据
var
selectGoodsClassModel
:
GoodsClassModel
?
=
nil
func
blackGoodsClass
(
sender
:
GoodsClassModel
)
{
print
(
"选择商品分类返回数据=
\(
sender
)
"
)
selectGoodsClassModel
=
sender
tishixxArr
.
replaceObject
(
at
:
2
,
with
:
sender
.
cat_name
)
listTbv
.
reloadData
()
}
//MARK:--选择品牌返回的数据
var
selectPinPaiData
:
GeneralInfoBrandModel
?
=
nil
func
blackSelectPinPaiData
(
sender
:
GeneralInfoBrandModel
)
{
print
(
"选择品牌返回的数据=
\(
sender
)
"
)
selectPinPaiData
=
sender
tishixxArr
.
replaceObject
(
at
:
3
,
with
:
sender
.
brand_name
)
listTbv
.
reloadData
()
}
//MARK:--图片选择处理
func
AddImgCellBtnClick
(
cell
:
AddImgCell
)
{
...
...
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.swift
View file @
37fa92ba
...
...
@@ -14,7 +14,6 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
var
dataModelArray
:
Array
<
GeneralInfoBrandModel
>
?
=
[]
var
isSelectData
:
Bool
=
false
var
delegate
:
PinPaiListViewControllerDelegate
?
var
selectIdx
:
Int
?
@IBOutlet
weak
var
sureTop
:
NSLayoutConstraint
!
@IBOutlet
weak
var
tableBottom
:
NSLayoutConstraint
!
@IBOutlet
weak
var
sureLbl
:
UILabel
!
...
...
@@ -72,35 +71,31 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
return
49
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
12
return
dataModelArray
!.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelectCell"
)
as!
TitleAndSelectCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
if
selectIdx
==
indexPath
.
row
{
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
selectBtn
.
isSelected
=
true
}
else
{
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
cell
.
selectBtn
.
isSelected
=
false
let
rowModel
=
dataModelArray
!
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
rowModel
.
brand_name
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
cell
.
selectBtn
.
isSelected
=
false
if
selectModel
!=
nil
{
if
rowModel
.
brand_id
==
selectModel
?
.
brand_id
{
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
selectBtn
.
isSelected
=
true
}
}
// let rowModel = dataModelArray![indexPath.row] as! GeneralInfoBrandModel
// cell.nameLbl.text = rowModel.brand_name
// cell.contentLbl.text = ""
// cell.btn.isUserInteractionEnabled = false
// cell.selectionStyle = .gray
// if isSelectData {
// cell.arrowImg.isHidden = true
// }
return
cell
}
var
selectModel
:
GeneralInfoBrandModel
?
=
nil
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
isSelectData
{
// let rowModel = dataModelArray![indexPath.row] as! GeneralInfoBrandModel
// selectModel = rowModel
selectIdx
=
indexPath
.
row
let
rowModel
=
dataModelArray
!
[
indexPath
.
row
]
as!
GeneralInfoBrandModel
selectModel
=
rowModel
listView
.
reloadData
()
}
else
{
let
vc
=
XinZengPinPaiViewController
()
...
...
@@ -124,7 +119,8 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
//MARK:--自定义celldelegate
func
TitleAndSelectCellClick
(
content
:
UIButton
,
cell
:
TitleAndSelectCell
)
{
print
(
cell
.
tag
)
selectIdx
=
cell
.
tag
let
rowModel
=
dataModelArray
!
[
cell
.
tag
]
as!
GeneralInfoBrandModel
selectModel
=
rowModel
listView
.
reloadData
()
}
...
...
GeliBusinessPlatform/ViewController/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.xib
View file @
37fa92ba
<?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
6096
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<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=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
...
@@ -264,7 +264,7 @@
<color
red=
"0.3880000114440918"
green=
"0.62400001287460327"
blue=
"0.90200001001358032"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"按钮渐变色下,字体颜色"
>
<color
red=
"0.27
450980392156865"
green=
"0.5607843137254902"
blue=
"0.88627450980392153
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.8901960784313725
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
...
...
@@ -273,7 +273,7 @@
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"灰色字体颜色"
>
<color
red=
"0.40000000
596046448"
green=
"0.40000000596046448"
blue=
"0.40000000596046448
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.40000000
000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
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