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
965aa5b4
Commit
965aa5b4
authored
Dec 08, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分销商品设置bug修复
parent
1e2626ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
20 deletions
+50
-20
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/AlertView/DistributorSettingAlertView.swift
...Platform/View/AlertView/DistributorSettingAlertView.swift
+49
-19
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
...sPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
+1
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
965aa5b4
No preview for this file type
GeliBusinessPlatform/View/AlertView/DistributorSettingAlertView.swift
View file @
965aa5b4
...
...
@@ -15,6 +15,7 @@ class DistributorSettingAlertView: UIView {
@IBOutlet
weak
var
percent_price_lbl
:
UILabel
!
var
temp_commission_per
=
""
var
temp_commission_val
=
""
var
temp_commission_price
=
""
var
temp_commission_type
=
1
var
is_all_select_mode
=
false
var
data
:
supGoodsListResDataModel
?{
...
...
@@ -46,11 +47,14 @@ class DistributorSettingAlertView: UIView {
payNumTypelbl
.
text
=
"%"
payTF
.
text
=
StringByInt
(
number
:
(
data
?
.
commission_per
)
!
)
temp_commission_per
=
StringByInt
(
number
:
(
data
?
.
commission_per
)
!
)
let
price
=
data
?
.
dbt_price
as!
NSString
let
percent
=
temp_commission_per
as!
NSString
let
c_price
=
price
.
floatValue
*
0.01
*
percent
.
floatValue
percent_price_lbl
.
text
=
"("
+
String
(
format
:
"%.2f"
,
c_price
)
+
"元)"
percent_price_lbl
.
isHidden
=
false
if
data
?
.
dbt_price
!=
nil
{
temp_commission_price
=
(
data
?
.
dbt_price
)
!
let
price
=
Float
(
temp_commission_price
)
let
percent
=
Float
(
temp_commission_per
)
let
c_price
=
price
!
*
0.01
*
percent
!
percent_price_lbl
.
text
=
"("
+
String
(
format
:
"%.2f"
,
c_price
)
+
"元)"
percent_price_lbl
.
isHidden
=
false
}
}
else
{
payBiBtn
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
payJueBtn
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
...
...
@@ -131,20 +135,44 @@ class DistributorSettingAlertView: UIView {
@objc
func
textChange
(
textField
:
UITextField
){
if
textField
==
moneyTx
{
let
price
=
textField
.
text
as!
NSString
let
percent
=
temp_commission_per
as!
NSString
let
c_price
=
price
.
floatValue
*
0.01
*
percent
.
floatValue
percent_price_lbl
.
text
=
"("
+
String
(
format
:
"%.2f"
,
c_price
)
+
"元)"
}
else
{
if
temp_commission_type
==
1
{
temp_commission_per
=
textField
.
text
!
let
price
=
data
?
.
dbt_price
as!
NSString
let
percent
=
temp_commission_per
as!
NSString
let
c_price
=
price
.
floatValue
*
0.01
*
percent
.
floatValue
if
temp_commission_per
!=
""
{
let
price
=
Float
(
textField
.
text
!
)
!
let
percent
=
Float
(
temp_commission_per
)
!
let
c_price
=
price
*
0.01
*
percent
percent_price_lbl
.
text
=
"("
+
String
(
format
:
"%.2f"
,
c_price
)
+
"元)"
}
temp_commission_price
=
moneyTx
.
text
!
}
else
{
if
temp_commission_price
!=
""
{
let
fx_price
=
Float
(
temp_commission_price
)
let
input_value
=
Float
(
textField
.
text
!
)
if
temp_commission_type
==
1
{
//比例
if
textField
.
text
==
""
{
return
}
if
input_value
!
>
100
{
HUD
.
flash
(
.
label
(
"佣金不大于100%~"
),
delay
:
1.2
)
textField
.
text
!
=
""
return
}
else
{
let
c_price
=
input_value
!
*
0.01
*
fx_price
!
percent_price_lbl
.
text
=
"("
+
String
(
format
:
"%.2f"
,
c_price
)
+
"元)"
temp_commission_per
=
textField
.
text
!
}
}
else
{
if
textField
.
text
==
""
{
return
}
if
input_value
!
>
fx_price
!
{
HUD
.
flash
(
.
label
(
"佣金大于分销价~"
),
delay
:
1.2
)
textField
.
text
!
=
""
return
}
temp_commission_val
=
textField
.
text
!
}
}
else
{
temp_commission_val
=
textField
.
text
!
HUD
.
flash
(
.
label
(
"请输入分销价"
),
delay
:
1.2
)
textField
.
text
=
""
}
}
}
...
...
@@ -183,17 +211,19 @@ class DistributorSettingAlertView: UIView {
var
commission_type
=
1
var
commission_per
=
""
var
commission_val
=
""
let
fx_price
=
moneyTx
.
text
if
payJueBtn
.
isSelected
{
commission_type
=
2
commission_val
=
payTF
.
text
!
if
(
commission_val
as!
NSString
)
.
floatValue
>
(
moneyTx
.
text
as!
NSString
)
.
floatValue
{
if
Float
(
commission_val
)
!
>
Float
(
fx_price
!
)
!
{
HUD
.
flash
(
.
label
(
"佣金大于分销价~"
),
delay
:
1.2
)
payTF
.
text
!
=
""
return
}
}
else
{
commission_per
=
payTF
.
text
!
if
(
commission_per
as!
NSString
)
.
floatValue
>
100
{
if
Float
(
commission_per
)
!
>
100
{
HUD
.
flash
(
.
label
(
"佣金不大于100%~"
),
delay
:
1.2
)
payTF
.
text
!
=
""
return
...
...
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
View file @
965aa5b4
...
...
@@ -444,7 +444,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
if
self
.
selectItem
.
count
>
0
{
self
.
selectItem
.
removeAll
()
self
.
all_select_btn
.
isSelected
=
false
self
.
all_select_btn
.
isSelected
=
false
self
.
all_select_btn
.
setTitle
(
" 全选(已选 "
+
StringByInt
(
number
:
self
.
selectItem
.
count
)
+
" 件商品)"
,
for
:
.
normal
)
}
if
model
.
data
?
.
res
?
.
count
==
0
{
...
...
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