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
2160b655
Commit
2160b655
authored
May 26, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复已知bug
parent
c39d63de
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
32 deletions
+60
-32
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+16
-3
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+25
-2
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+3
-4
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.xib
...tform/ViewController/新增规格/CreatNewSpecsViewController.xib
+1
-1
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.swift
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.swift
+14
-18
GeliBusinessPlatform/ViewController/新增规格/普通+预售header/TitleAndSwitchHeaderView.xib
...wController/新增规格/普通+预售header/TitleAndSwitchHeaderView.xib
+1
-4
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
2160b655
No preview for this file type
GeliBusinessPlatform/Define/Define.swift
View file @
2160b655
...
...
@@ -126,10 +126,23 @@ func isPurnInt(string: String) -> Bool {
}
//MARK:--是否是正确的数值
func
isPurnNumber
(
str
:
String
)
->
Bool
{
if
isPurnInt
(
string
:
str
)
||
isPurnFloat
(
string
:
str
){
return
true
let
arr
=
str
.
components
(
separatedBy
:
","
)
if
arr
.
count
>
0
{
var
num
=
""
for
item
in
arr
{
num
+=
item
}
if
isPurnInt
(
string
:
num
)
||
isPurnFloat
(
string
:
num
){
return
true
}
else
{
return
false
}
}
else
{
return
false
if
isPurnInt
(
string
:
str
)
||
isPurnFloat
(
string
:
str
){
return
true
}
else
{
return
false
}
}
}
//RGB
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
2160b655
...
...
@@ -97,6 +97,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var
isAllEditing
=
false
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
10086
{
//正在编辑,询问是否离开
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
return
}
if
sender
.
tag
==
1001
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
GeneralInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
...
...
@@ -755,6 +759,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
if
indexPath
.
row
==
3
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"YuShouWeiKuanFaHuoCell"
)
as!
YuShouWeiKuanFaHuoCell
cell
.
textTF
.
isUserInteractionEnabled
=
isAllEditing
cell
.
nameLbl
.
text
=
ysszArr
[
indexPath
.
row
]
cell
.
textTF
.
keyboardType
=
.
numberPad
cell
.
delegate
=
self
...
...
@@ -766,6 +771,13 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
cell
.
delegate
=
self
cell
.
btn
.
isUserInteractionEnabled
=
isAllEditing
cell
.
contentLbl
.
text
=
ysszHolder
[
indexPath
.
row
]
if
isAllEditing
{
cell
.
contentRight
.
constant
=
32
cell
.
arrowImg
.
isHidden
=
false
}
else
{
cell
.
contentRight
.
constant
=
15
cell
.
arrowImg
.
isHidden
=
true
}
return
cell
case
4
:
if
indexPath
.
row
<
2
{
...
...
@@ -1375,7 +1387,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
lbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
lbl
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
15
)
view
.
addSubview
(
lbl
)
if
section
==
5
&&
goodsDesc
.
count
>
0
{
if
section
==
5
&&
goodsDesc
.
count
>
0
&&
isAllEditing
{
let
btn
=
UIButton
()
btn
.
setTitle
(
"编辑"
,
for
:
.
normal
)
btn
.
isUserInteractionEnabled
=
isAllEditing
...
...
@@ -1489,7 +1501,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
override
func
backAction
()
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
if
editBtn
?
.
titleLabel
!.
text
==
"保存"
{
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"编辑尚未保存,是否离开?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
10086
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
else
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
//MARK:--处理规格数据
...
...
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
2160b655
...
...
@@ -235,13 +235,13 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
//MARK: - TEXTFIELD DELEGATE
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
switch
textField
.
tag
{
case
0
:
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
price
=
textField
.
text
!
break
case
2
:
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
weight
=
textField
.
text
!
break
default
:
...
...
@@ -256,7 +256,6 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
default
:
break
}
// delegate?.ChangeGoodsPriceVCKeyboardDone(str: textField.text!)
return
true
}
func
PuTongJieTiClickDone
()
{
...
...
@@ -465,8 +464,8 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
if
isYuShouSetting
{
//预售阶梯价
let
view
=
TitleAndSwitchHeaderView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
90
))
view
.
infoSW
.
isUserInteractionEnabled
=
isAllEditing
view
.
ysInfoSw
.
isUserInteractionEnabled
=
isAllEditing
view
.
delegate
=
self
print
(
"selectYuShou == "
,
selectYuShou
)
view
.
selectYuShou
=
selectYuShou
view
.
infoSW
.
isOn
=
isJieTiOpen
//普通
view
.
ysInfoSw
.
isOn
=
isYsJieTiOpen
//预售
...
...
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.xib
View file @
2160b655
...
...
@@ -24,7 +24,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"grouped"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"18"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bSh-mx-Kzg"
>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
s
howsHorizontalScrollIndicator=
"NO"
showsVerticalScrollIndicator=
"NO"
s
tyle=
"grouped"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"18"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bSh-mx-Kzg"
>
<rect
key=
"frame"
x=
"0.0"
y=
"85"
width=
"414"
height=
"728"
/>
<color
key=
"backgroundColor"
name=
"app底色"
/>
<connections>
...
...
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.swift
View file @
2160b655
...
...
@@ -12,7 +12,7 @@ import UIKit
@objc
optional
func
YuShouCellTFContent
(
Price
:
NSString
)
}
class
YuShouCell
:
UITableViewCell
,
UITextFieldDelegate
{
var
delegate
:
YuShouCellDelegate
?
var
delegate
:
YuShouCellDelegate
?
@IBOutlet
weak
var
inputTF3
:
UITextField
!
@IBOutlet
weak
var
inputTF2
:
UITextField
!
@IBOutlet
weak
var
inputTF1
:
UITextField
!
...
...
@@ -27,38 +27,34 @@ var delegate:YuShouCellDelegate?
inputTF1
.
returnKeyType
=
.
done
inputTF3
.
keyboardType
=
.
decimalPad
inputTF1
.
keyboardType
=
.
decimalPad
inputTF1
.
delegate
=
self
inputTF1
.
delegate
=
self
inputTF3
.
delegate
=
self
inputTF2
.
keyboardType
=
.
numberPad
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
}
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
textField
.
resignFirstResponder
()
inputTF1
.
delegate
=
self
inputTF2
.
delegate
=
self
inputTF3
.
delegate
=
self
}
@objc
func
textTfValueChange
(
sender
:
UITextField
){
sender
.
text
=
formatShowNumber
(
value
:
sender
.
text
!
)
if
sender
==
inputTF3
{
let
str
=
sender
.
text
as!
NSString
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
if
textField
==
inputTF3
{
let
str
=
textField
.
text
as!
NSString
if
str
.
floatValue
>
20
{
HUD
.
flash
(
.
label
(
"预售定金比例不高于20%"
),
delay
:
1.2
)
inputTF3
.
text
=
"20"
}
}
delegate
?
.
YuShouCellTFContent
?(
Price
:
"
\(
inputTF1
.
text
!
)
_
\(
inputTF2
.
text
!
)
_
\(
inputTF3
.
text
!
)
"
as
NSString
)
}
@objc
func
switchChange
(
sender
:
UISwitch
){
delegate
?
.
YuShouCellSwitchStatus
?(
sender
:
sender
)
}
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
// Configure the view for the selected state
}
...
...
GeliBusinessPlatform/ViewController/新增规格/普通+预售header/TitleAndSwitchHeaderView.xib
View file @
2160b655
...
...
@@ -7,7 +7,7 @@
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"TitleAndSwitchHeaderView"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"TitleAndSwitchHeaderView"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"bottomLine"
destination=
"iUg-fe-DMN"
id=
"yjY-Th-O9n"
/>
<outlet
property=
"infoSW"
destination=
"CB7-5d-TkX"
id=
"NR3-4A-D6i"
/>
...
...
@@ -150,9 +150,6 @@
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.1803921568627451"
green=
"0.1803921568627451"
blue=
"0.1803921568627451"
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"
/>
</namedColor>
<namedColor
name=
"灰色字体颜色"
>
<color
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
...
...
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