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
05156e59
Commit
05156e59
authored
May 25, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代客下单
parent
718c3a47
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
157 additions
and
41 deletions
+157
-41
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/AddGuiGeCell.swift
GeliBusinessPlatform/View/Cell/AddGuiGeCell.swift
+5
-0
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
+15
-2
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
+1
-0
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
...iewController/代客下单(购物)/XuanZeShangPinViewController.swift
+52
-11
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+42
-5
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+41
-23
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+1
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
05156e59
No preview for this file type
GeliBusinessPlatform/View/Cell/AddGuiGeCell.swift
View file @
05156e59
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
//
//
import
UIKit
import
UIKit
import
WebKit
@objc
protocol
AddGuiGeCellDelegate
{
@objc
protocol
AddGuiGeCellDelegate
{
@objc
optional
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
@objc
optional
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
}
}
...
@@ -16,6 +18,9 @@ class AddGuiGeCell: UITableViewCell {
...
@@ -16,6 +18,9 @@ class AddGuiGeCell: UITableViewCell {
@IBAction
func
btnClick
(
_
sender
:
Any
)
{
@IBAction
func
btnClick
(
_
sender
:
Any
)
{
delegate
?
.
AddGuiGeCellClick
?(
cell
:
self
)
delegate
?
.
AddGuiGeCellClick
?(
cell
:
self
)
}
}
@IBOutlet
weak
var
webView
:
WKWebView
!
@IBOutlet
weak
var
imgBtn
:
UIButton
!
@IBOutlet
weak
var
imgBtn
:
UIButton
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
...
...
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
View file @
05156e59
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,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=
"AddGuiGeCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"AddGuiGeCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"123.5"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"123.5"
/>
<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"
>
...
@@ -27,9 +27,21 @@
...
@@ -27,9 +27,21 @@
<action
selector=
"btnClick:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"f2z-zc-fd6"
/>
<action
selector=
"btnClick:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"f2z-zc-fd6"
/>
</connections>
</connections>
</button>
</button>
<wkWebView
hidden=
"YES"
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"CAr-OI-1ll"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"123.5"
/>
<color
key=
"backgroundColor"
red=
"0.36078431370000003"
green=
"0.38823529410000002"
blue=
"0.4039215686"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<wkWebViewConfiguration
key=
"configuration"
>
<audiovisualMediaTypes
key=
"mediaTypesRequiringUserActionForPlayback"
none=
"YES"
/>
<wkPreferences
key=
"preferences"
/>
</wkWebViewConfiguration>
</wkWebView>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstItem=
"FpT-RN-ad7"
firstAttribute=
"centerX"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerX"
id=
"CTD-cA-1jp"
/>
<constraint
firstItem=
"FpT-RN-ad7"
firstAttribute=
"centerX"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerX"
id=
"CTD-cA-1jp"
/>
<constraint
firstItem=
"CAr-OI-1ll"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
id=
"ONc-Hx-udy"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"CAr-OI-1ll"
secondAttribute=
"trailing"
id=
"TDz-Oa-TvQ"
/>
<constraint
firstItem=
"CAr-OI-1ll"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"YRm-tl-0No"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"CAr-OI-1ll"
secondAttribute=
"bottom"
id=
"jKB-ok-a3G"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"FpT-RN-ad7"
secondAttribute=
"bottom"
constant=
"50"
id=
"log-wz-xog"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"FpT-RN-ad7"
secondAttribute=
"bottom"
constant=
"50"
id=
"log-wz-xog"
/>
</constraints>
</constraints>
</tableViewCellContentView>
</tableViewCellContentView>
...
@@ -37,8 +49,9 @@
...
@@ -37,8 +49,9 @@
<connections>
<connections>
<outlet
property=
"btmH"
destination=
"log-wz-xog"
id=
"axu-Jf-zWN"
/>
<outlet
property=
"btmH"
destination=
"log-wz-xog"
id=
"axu-Jf-zWN"
/>
<outlet
property=
"imgBtn"
destination=
"FpT-RN-ad7"
id=
"DdI-mW-7wW"
/>
<outlet
property=
"imgBtn"
destination=
"FpT-RN-ad7"
id=
"DdI-mW-7wW"
/>
<outlet
property=
"webView"
destination=
"CAr-OI-1ll"
id=
"L9y-OD-5rY"
/>
</connections>
</connections>
<point
key=
"canvasLocation"
x=
"13
2"
y=
"122
"
/>
<point
key=
"canvasLocation"
x=
"13
1.15942028985509"
y=
"121.875
"
/>
</tableViewCell>
</tableViewCell>
</objects>
</objects>
<resources>
<resources>
...
...
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
View file @
05156e59
...
@@ -14,6 +14,7 @@ import UIKit
...
@@ -14,6 +14,7 @@ import UIKit
class
XuanZeShangPinCell
:
UITableViewCell
{
class
XuanZeShangPinCell
:
UITableViewCell
{
var
imgUrlPath
:
String
?
var
imgUrlPath
:
String
?
var
sku_id
:
Int
?
var
sku_id
:
Int
?
var
model
:
GetGoodsInfoDataModel
?
@IBOutlet
weak
var
iconImg
:
UIImageView
!
@IBOutlet
weak
var
iconImg
:
UIImageView
!
@IBOutlet
weak
var
priceLbl
:
UILabel
!
@IBOutlet
weak
var
priceLbl
:
UILabel
!
@IBOutlet
weak
var
yuShouImg
:
UIImageView
!
@IBOutlet
weak
var
yuShouImg
:
UIImageView
!
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
View file @
05156e59
...
@@ -56,7 +56,21 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -56,7 +56,21 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
if
barTitle
!=
"修改价格"
{
if
barTitle
!=
"修改价格"
{
getGoodsInfo
([
"user_token"
:
UserToken
,
"is_adsale"
:
is_adsale
],
success
:
{
(
data
)
in
getGoodsInfo
([
"user_token"
:
UserToken
,
"is_adsale"
:
is_adsale
],
success
:
{
(
data
)
in
let
model
=
data
as!
GetGoodsInfoModel
let
model
=
data
as!
GetGoodsInfoModel
if
self
.
inputData
.
count
>
0
{
for
item
in
self
.
inputData
{
for
mD
in
model
.
data
!
{
if
mD
.
sku_id
==
item
.
model
?
.
sku_id
{
let
idx
=
model
.
data
?
.
firstIndex
(
where
:
{
(
m
)
->
Bool
in
return
(
m
.
sku_id
==
item
.
model
?
.
sku_id
)
})
model
.
data
?
.
remove
(
at
:
idx
!
)
}
}
}
self
.
datas
=
model
.
data
!
}
else
{
self
.
datas
=
model
.
data
!
self
.
datas
=
model
.
data
!
}
self
.
listView
.
reloadData
()
self
.
listView
.
reloadData
()
})
{
(
error
)
in
})
{
(
error
)
in
...
@@ -93,10 +107,37 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -93,10 +107,37 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
}
}
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
textField
.
resignFirstResponder
()
textField
.
resignFirstResponder
()
if
barTitle
==
"修改价格"
{
let
idx
=
IndexPath
(
row
:
textField
.
tag
,
section
:
0
)
let
idx
=
IndexPath
(
row
:
textField
.
tag
,
section
:
0
)
let
cell
=
listView
.
cellForRow
(
at
:
idx
)
as!
XuanZeShangPinCell
let
cell
=
listView
.
cellForRow
(
at
:
idx
)
as!
XuanZeShangPinCell
let
data
=
inputData
[
textField
.
tag
]
if
data
.
model
?
.
tiered_pri
!
!=
nil
&&
data
.
model
!.
tiered_pri
!.
count
>
0
{
let
dict
=
getDictionaryFromJSONString
(
jsonString
:
(
data
.
model
?
.
tiered_pri
!
)
!
)
let
arr
=
dict
.
allKeys
var
strArr
:
Array
<
Int
>
?
=
[]
for
item
in
arr
{
let
str
=
item
as!
NSString
strArr
?
.
append
(
str
.
integerValue
)
}
let
new
=
strArr
?
.
sorted
(
by
:
{
(
num1
,
num2
)
->
Bool
in
return
num1
>
num2
?
true
:
false
})
let
countStr
=
cell
.
countTF
.
text
as!
NSString
for
i
in
0
..<
new
!.
count
{
if
countStr
.
integerValue
>
new
!
[
i
]{
cell
.
priceTF
.
text
=
dict
[
"
\(
new
!
[
i
]
)
"
]
as!
String
break
}
else
{
cell
.
priceTF
.
text
=
data
.
model
!.
price
}
}
}
}
else
{
let
idx
=
IndexPath
(
row
:
textField
.
tag
,
section
:
0
)
let
cell
=
listView
.
cellForRow
(
at
:
idx
)
as!
XuanZeShangPinCell
let
data
=
datas
[
textField
.
tag
]
if
cell
.
priceTF
.
text
!=
"0"
{
if
cell
.
priceTF
.
text
!=
"0"
{
let
data
=
datas
[
cell
.
tag
]
if
data
.
tiered_pri
!
!=
nil
&&
data
.
tiered_pri
!.
count
>
0
{
if
data
.
tiered_pri
!
!=
nil
&&
data
.
tiered_pri
!.
count
>
0
{
let
dict
=
getDictionaryFromJSONString
(
jsonString
:
data
.
tiered_pri
!
)
let
dict
=
getDictionaryFromJSONString
(
jsonString
:
data
.
tiered_pri
!
)
let
arr
=
dict
.
allKeys
let
arr
=
dict
.
allKeys
...
@@ -119,6 +160,8 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -119,6 +160,8 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
}
}
}
}
}
}
}
return
true
return
true
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
@@ -127,6 +170,10 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -127,6 +170,10 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
cell
.
priceTF
.
delegate
=
self
cell
.
priceTF
.
delegate
=
self
cell
.
countTF
.
delegate
=
self
cell
.
countTF
.
delegate
=
self
cell
.
idx
=
indexPath
cell
.
idx
=
indexPath
cell
.
countTF
.
tag
=
indexPath
.
row
cell
.
priceTF
.
tag
=
indexPath
.
row
cell
.
priceTF
.
keyboardType
=
.
numbersAndPunctuation
cell
.
priceTF
.
returnKeyType
=
.
done
cell
.
countTF
.
returnKeyType
=
.
done
cell
.
countTF
.
returnKeyType
=
.
done
cell
.
countTF
.
tag
=
indexPath
.
row
cell
.
countTF
.
tag
=
indexPath
.
row
if
barTitle
==
"修改价格"
{
if
barTitle
==
"修改价格"
{
...
@@ -139,20 +186,20 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -139,20 +186,20 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
cell
.
imgUrlPath
=
cell1
.
imgUrlPath
cell
.
imgUrlPath
=
cell1
.
imgUrlPath
cell
.
countTF
.
text
=
cell1
.
countTF
.
text
cell
.
countTF
.
text
=
cell1
.
countTF
.
text
cell
.
priceTF
.
text
=
cell1
.
priceTF
.
text
cell
.
priceTF
.
text
=
cell1
.
priceTF
.
text
cell
.
model
=
cell1
.
model
cell
.
selectBtn
.
isHidden
=
true
cell
.
selectBtn
.
isHidden
=
true
cell
.
btmView
.
isHidden
=
false
cell
.
btmView
.
isHidden
=
false
cell
.
btmViewHeight
.
constant
=
89
cell
.
btmViewHeight
.
constant
=
89
}
else
{
}
else
{
cell
.
idx
=
indexPath
cell
.
idx
=
indexPath
let
model
=
datas
[
indexPath
.
row
]
let
model
=
datas
[
indexPath
.
row
]
cell
.
model
=
model
cell
.
nameLbl
.
text
=
model
.
goods_name
cell
.
nameLbl
.
text
=
model
.
goods_name
cell
.
cellModel
=
model
cell
.
cellModel
=
model
cell
.
detailLbl
.
text
=
"
\(
model
.
spec_str
!
)
/
\(
model
.
unit
!
)
"
cell
.
detailLbl
.
text
=
"
\(
model
.
spec_str
!
)
/
\(
model
.
unit
!
)
"
cell
.
detailLbl2
.
text
=
"存储:
\(
model
.
inventory
!
)
"
cell
.
detailLbl2
.
text
=
"存储:
\(
model
.
inventory
!
)
"
cell
.
iconImg
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_img
!
))
cell
.
iconImg
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_img
!
))
cell
.
imgUrlPath
=
SERVERCE_ImageHost
+
model
.
goods_img
!
cell
.
imgUrlPath
=
SERVERCE_ImageHost
+
model
.
goods_img
!
cell
.
countTF
.
returnKeyType
=
.
done
cell
.
countTF
.
tag
=
indexPath
.
row
cell
.
sku_id
=
model
.
sku_id
cell
.
sku_id
=
model
.
sku_id
if
isYuShou
{
//预售
if
isYuShou
{
//预售
if
idx
==
indexPath
{
if
idx
==
indexPath
{
...
@@ -168,7 +215,6 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -168,7 +215,6 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
cell
.
selectBtn
.
isSelected
=
false
cell
.
selectBtn
.
isSelected
=
false
cell
.
btmView
.
isHidden
=
true
cell
.
btmView
.
isHidden
=
true
cell
.
btmViewHeight
.
constant
=
0
cell
.
btmViewHeight
.
constant
=
0
for
idx
in
selectIdxArr
{
for
idx
in
selectIdxArr
{
if
idx
==
indexPath
{
if
idx
==
indexPath
{
cell
.
selectBtn
.
isSelected
=
true
cell
.
selectBtn
.
isSelected
=
true
...
@@ -176,11 +222,6 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -176,11 +222,6 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
cell
.
btmViewHeight
.
constant
=
89
cell
.
btmViewHeight
.
constant
=
89
}
}
}
}
for
item
in
inputData
{
if
item
.
idx
?
.
row
==
indexPath
.
row
{
cell
.
selectBtn
.
isSelected
=
true
}
}
}
}
}
}
return
cell
return
cell
...
@@ -219,11 +260,11 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -219,11 +260,11 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
func
XuanZeShangPinCellBtnClick
(
index
:
IndexPath
)
{
func
XuanZeShangPinCellBtnClick
(
index
:
IndexPath
)
{
let
cell
=
listView
.
cellForRow
(
at
:
index
)
as!
XuanZeShangPinCell
let
cell
=
listView
.
cellForRow
(
at
:
index
)
as!
XuanZeShangPinCell
if
isYuShou
{
if
isYuShou
{
//预售
idx
=
index
idx
=
index
inputData
.
removeAll
()
inputData
.
removeAll
()
inputData
.
append
(
cell
)
inputData
.
append
(
cell
)
}
else
{
}
else
{
//非预售
let
data
=
datas
[
index
.
row
]
let
data
=
datas
[
index
.
row
]
let
idx
=
selectArr
.
firstIndex
{
(
model
)
->
Bool
in
let
idx
=
selectArr
.
firstIndex
{
(
model
)
->
Bool
in
return
(
data
.
sku_id
==
model
.
sku_id
)
return
(
data
.
sku_id
==
model
.
sku_id
)
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
05156e59
...
@@ -628,7 +628,6 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -628,7 +628,6 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
cell
.
imgBtn
.
isUserInteractionEnabled
=
isAllEditing
cell
.
imgBtn
.
isUserInteractionEnabled
=
isAllEditing
cell
.
imgBtn
.
addTarget
(
self
,
action
:
#selector(
addGuiGe
)
,
for
:
.
touchUpInside
)
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"xinzeng"
),
for
:
.
normal
)
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"xinzeng"
),
for
:
.
normal
)
return
cell
return
cell
...
@@ -688,12 +687,17 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -688,12 +687,17 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
default
:
default
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"XiaYunDanViewController"
),
for
:
.
normal
)
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
imgBtn
.
isUserInteractionEnabled
=
isAllEditing
cell
.
imgBtn
.
isUserInteractionEnabled
=
isAllEditing
cell
.
imgBtn
.
tag
=
indexPath
.
row
cell
.
imgBtn
.
tag
=
indexPath
.
row
if
goodsDesc
.
count
>
0
{
cell
.
webView
.
isHidden
=
false
let
request
=
URLRequest
.
init
(
url
:
URL
(
string
:
"https://m.baidu.com/"
)
!
)
cell
.
webView
.
load
(
request
)
}
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"tjxq"
),
for
:
.
normal
)
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"tjxq"
),
for
:
.
normal
)
cell
.
btmH
.
constant
=
25
cell
.
btmH
.
constant
=
25
return
cell
return
cell
}
}
}
}
...
@@ -701,9 +705,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -701,9 +705,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
}
}
//MARK: - 底部广告软文跳转
//MARK: - 底部广告软文跳转 && 编辑
@objc
func
editHtml
(){
print
(
"编辑软文"
)
let
vc
=
LMNoteViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
print
(
"底部广告软文跳转"
)
print
(
"底部广告软文跳转"
)
goodsDesc
=
"1"
listTbv
.
reloadData
()
// let vc = LMNoteViewController()
// self.navigationController?.pushViewController(vc, animated: true)
}
}
//MARK: -- 点击按钮事件,跳转或者展示选择界面
//MARK: -- 点击按钮事件,跳转或者展示选择界面
...
@@ -1106,7 +1119,8 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1106,7 +1119,8 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
//MARK: - 新增规格
//MARK: - 新增规格
@objc
func
addGuiGe
(){
@objc
func
addGuiGe
(
sender
:
UIView
){
print
(
"新增规格"
)
print
(
"新增规格"
)
let
vc
=
CreatNewSpecsViewController
()
let
vc
=
CreatNewSpecsViewController
()
vc
.
barTitle
=
"新增规格"
vc
.
barTitle
=
"新增规格"
...
@@ -1211,6 +1225,22 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1211,6 +1225,22 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
lbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
lbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
lbl
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
15
)
lbl
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
15
)
view
.
addSubview
(
lbl
)
view
.
addSubview
(
lbl
)
if
section
==
5
&&
goodsDesc
.
count
>
0
{
let
btn
=
UIButton
()
btn
.
setTitle
(
"编辑"
,
for
:
.
normal
)
btn
.
isUserInteractionEnabled
=
isAllEditing
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
btn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
view
.
addSubview
(
btn
)
btn
.
sizeToFit
()
btn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerY
.
equalTo
(
lbl
.
snp_centerY
)
make
.
right
.
equalTo
(
-
15
)
make
.
height
.
equalTo
(
btn
.
frame
.
size
.
height
)
make
.
width
.
equalTo
(
btn
.
frame
.
size
.
width
)
}
btn
.
addTarget
(
self
,
action
:
#selector(
editHtml
)
,
for
:
.
touchUpInside
)
}
if
section
==
2
&&
guiGeArr
.
count
>
0
&&
isAllEditing
{
if
section
==
2
&&
guiGeArr
.
count
>
0
&&
isAllEditing
{
let
btn
=
UIButton
()
let
btn
=
UIButton
()
btn
.
setTitle
(
" 新增"
,
for
:
.
normal
)
btn
.
setTitle
(
" 新增"
,
for
:
.
normal
)
...
@@ -1231,7 +1261,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1231,7 +1261,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
make
.
top
.
right
.
bottom
.
equalTo
(
0
)
make
.
top
.
right
.
bottom
.
equalTo
(
0
)
make
.
width
.
equalTo
(
80
)
make
.
width
.
equalTo
(
80
)
}
}
btn2
.
addTarget
(
self
,
action
:
#selector(
addGuiGe
)
,
for
:
.
touchUpInside
)
btn2
.
addTarget
(
self
,
action
:
#selector(
addGuiGe
(sender:)
)
,
for
:
.
touchUpInside
)
if
guiGeArr
.
count
>
1
{
if
guiGeArr
.
count
>
1
{
view
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
80
)
view
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
80
)
let
collectionView
=
UICollectionView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
),
collectionViewLayout
:
layout
)
let
collectionView
=
UICollectionView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
),
collectionViewLayout
:
layout
)
...
@@ -1287,6 +1317,9 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1287,6 +1317,9 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
case
4
:
return
49
case
4
:
return
49
default
:
default
:
if
goodsDesc
.
count
>
0
{
return
250
}
return
98
return
98
}
}
...
@@ -1557,6 +1590,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1557,6 +1590,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
var
goodsDesc
=
""
func
getHTMLByVc
(
_
model
:
String
!
)
{
goodsDesc
=
model
}
}
}
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
05156e59
...
@@ -93,16 +93,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -93,16 +93,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
return
return
}
}
//待补充
if
itemName
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入商品名称"
),
delay
:
1.2
)
return
}
if
itemTypeArr
==
[
99
,
99
,
99
,
99
]
{
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
return
}
if
selectGoodsClassModel
==
nil
{
if
selectGoodsClassModel
==
nil
{
HUD
.
flash
(
.
label
(
"请选择商品分类"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择商品分类"
),
delay
:
1.2
)
return
return
...
@@ -111,10 +101,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -111,10 +101,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择品牌"
),
delay
:
1.2
)
return
return
}
}
if
qiMaiShuLiang
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入起卖数量"
),
delay
:
1.2
)
return
}
if
singleImgArr
.
count
==
0
{
if
singleImgArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择商品封面图"
),
delay
:
1.2
)
...
@@ -136,14 +122,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -136,14 +122,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
return
return
}
}
}
}
if
keyWord
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入关键字"
),
delay
:
1.2
)
return
}
if
wuLiuPrice
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入物流费用"
),
delay
:
1.2
)
return
}
if
countrySelect
==
nil
{
if
countrySelect
==
nil
{
HUD
.
flash
(
.
label
(
"请选择国家"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择国家"
),
delay
:
1.2
)
return
return
...
@@ -463,6 +442,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -463,6 +442,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"XiaYunDanViewController"
),
for
:
.
normal
)
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"XiaYunDanViewController"
),
for
:
.
normal
)
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
imgBtn
.
tag
=
indexPath
.
row
cell
.
imgBtn
.
tag
=
indexPath
.
row
if
goodsDesc
.
count
>
0
{
cell
.
webView
.
isHidden
=
false
let
request
=
URLRequest
.
init
(
url
:
URL
(
string
:
"https://m.baidu.com/"
)
!
)
cell
.
webView
.
load
(
request
)
}
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"tjxq"
),
for
:
.
normal
)
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"tjxq"
),
for
:
.
normal
)
cell
.
btmH
.
constant
=
25
cell
.
btmH
.
constant
=
25
if
goodsDesc
.
count
>
0
{
if
goodsDesc
.
count
>
0
{
...
@@ -472,13 +456,26 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -472,13 +456,26 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
return
cell
return
cell
}
}
}
}
func
loadString
(
str
:
String
){
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
}
}
//MARK: - 底部广告软文跳转
//MARK: - 底部广告软文跳转 && 编辑
@objc
func
editHtml
(){
print
(
"编辑软文"
)
let
vc
=
LMNoteViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
print
(
"底部广告软文跳转"
)
print
(
"底部广告软文跳转"
)
goodsDesc
=
"1"
listTbv
.
reloadData
()
return
let
vc
=
LMNoteViewController
()
let
vc
=
LMNoteViewController
()
vc
.
htmlStr
=
goodsDesc
;
vc
.
htmlStr
=
goodsDesc
;
vc
.
delegatedata
=
self
vc
.
delegatedata
=
self
...
@@ -966,6 +963,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -966,6 +963,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
return
10
return
10
}
}
//MARK: - tableview header
//MARK: - tableview header
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
if
section
==
3
{
if
section
==
3
{
...
@@ -979,6 +977,21 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -979,6 +977,21 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
lbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
lbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
lbl
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
15
)
lbl
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
15
)
view
.
addSubview
(
lbl
)
view
.
addSubview
(
lbl
)
if
section
==
5
&&
goodsDesc
.
count
>
0
{
let
btn
=
UIButton
()
btn
.
setTitle
(
"编辑"
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
btn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
view
.
addSubview
(
btn
)
btn
.
sizeToFit
()
btn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerY
.
equalTo
(
lbl
.
snp_centerY
)
make
.
right
.
equalTo
(
-
15
)
make
.
height
.
equalTo
(
btn
.
frame
.
size
.
height
)
make
.
width
.
equalTo
(
btn
.
frame
.
size
.
width
)
}
btn
.
addTarget
(
self
,
action
:
#selector(
editHtml
)
,
for
:
.
touchUpInside
)
}
if
section
==
2
&&
guiGeArr
.
count
>
0
{
if
section
==
2
&&
guiGeArr
.
count
>
0
{
let
btn
=
UIButton
()
let
btn
=
UIButton
()
btn
.
setTitle
(
" 新增"
,
for
:
.
normal
)
btn
.
setTitle
(
" 新增"
,
for
:
.
normal
)
...
@@ -1055,6 +1068,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1055,6 +1068,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
case
4
:
return
49
case
4
:
return
49
default
:
default
:
if
goodsDesc
.
count
>
0
{
return
250
}
return
98
return
98
}
}
...
@@ -1218,4 +1234,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1218,4 +1234,6 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
func
getHTMLByVc
(
_
model
:
String
!
)
{
func
getHTMLByVc
(
_
model
:
String
!
)
{
goodsDesc
=
model
goodsDesc
=
model
}
}
}
}
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
05156e59
...
@@ -348,6 +348,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -348,6 +348,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"YuShou"
)
as!
YuShouCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"YuShou"
)
as!
YuShouCell
cell
.
inputTF1
.
isUserInteractionEnabled
=
isAllEditing
cell
.
inputTF1
.
isUserInteractionEnabled
=
isAllEditing
cell
.
inputTF2
.
isUserInteractionEnabled
=
isAllEditing
cell
.
inputTF2
.
isUserInteractionEnabled
=
isAllEditing
cell
.
inputTF2
.
keyboardType
=
.
numberPad
cell
.
inputTF3
.
isUserInteractionEnabled
=
isAllEditing
cell
.
inputTF3
.
isUserInteractionEnabled
=
isAllEditing
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
cell
.
infoSw
.
isOn
=
isOpenYSSetting
cell
.
infoSw
.
isOn
=
isOpenYSSetting
...
...
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