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
718794e3
Commit
718794e3
authored
May 11, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sadfasfdasdfsdfd
parent
8785e523
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
87 deletions
+87
-87
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/HeaderSelectView/SelectContentView.swift
...essPlatform/View/HeaderSelectView/SelectContentView.swift
+0
-1
GeliBusinessPlatform/ViewController/New分销商品/FXSZ_View.swift
GeliBusinessPlatform/ViewController/New分销商品/FXSZ_View.swift
+10
-2
GeliBusinessPlatform/ViewController/New分销商品/FXSZ_View.xib
GeliBusinessPlatform/ViewController/New分销商品/FXSZ_View.xib
+9
-1
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
...sPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
+68
-83
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
718794e3
No preview for this file type
GeliBusinessPlatform/View/HeaderSelectView/SelectContentView.swift
View file @
718794e3
...
...
@@ -71,7 +71,6 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource {
cell
.
titleLbl
.
textColor
=
UIColor
.
init
(
named
:
"标题字颜色"
)
}
else
{
cell
.
titleLbl
.
textColor
=
UIColor
.
init
(
named
:
"#999999"
)
}
return
cell
}
...
...
GeliBusinessPlatform/ViewController/New分销商品/FXSZ_View.swift
View file @
718794e3
...
...
@@ -7,9 +7,17 @@
//
import
UIKit
protocol
FXSZ_View_Delegate
{
func
FXSZ_View_submitAction
(
tag
:
Int
,
price
:
String
,
commission
:
String
,
view
:
FXSZ_View
)
}
class
FXSZ_View
:
UIView
{
var
delegate
:
FXSZ_View_Delegate
?
@IBAction
func
submit_action
(
_
sender
:
UIButton
)
{
delegate
?
.
FXSZ_View_submitAction
(
tag
:
self
.
tag
,
price
:
FX_Price_Tf
.
text
!
,
commission
:
commission_tf
.
text
!
,
view
:
self
)
self
.
close_alt_action
(
UIButton
())
}
@IBOutlet
weak
var
commission_tf
:
UITextField
!
@IBOutlet
weak
var
FX_Price_Tf
:
UITextField
!
@IBAction
func
close_alt_action
(
_
sender
:
Any
)
{
self
.
removeFromSuperview
()
}
...
...
GeliBusinessPlatform/ViewController/New分销商品/FXSZ_View.xib
View file @
718794e3
...
...
@@ -10,7 +10,12 @@
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"FXSZ_View"
customModule=
"TestClass"
customModuleProvider=
"target"
/>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"FXSZ_View"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"FX_Price_Tf"
destination=
"hMS-x0-bGV"
id=
"grI-SA-s4n"
/>
<outlet
property=
"commission_tf"
destination=
"GVh-yF-SJ3"
id=
"Lui-Ia-ZQs"
/>
</connections>
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"896"
/>
...
...
@@ -127,6 +132,9 @@
<state
key=
"normal"
title=
"确定"
>
<color
key=
"titleColor"
red=
"0.2784313725"
green=
"0.56078431370000004"
blue=
"0.89019607840000003"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</state>
<connections>
<action
selector=
"submit_action:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"emU-8o-ZO5"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
...
...
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
View file @
718794e3
...
...
@@ -9,7 +9,56 @@
import
UIKit
class
FX_Product_GuanLiVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
SelectContentViewDelegate
,
HeaderSelectViewDelegate
,
DistributorSettingAlertViewDelegate
,
New_Fx_Cell_Delegate
{
class
FX_Product_GuanLiVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
SelectContentViewDelegate
,
HeaderSelectViewDelegate
,
New_Fx_Cell_Delegate
,
FXSZ_View_Delegate
{
func
FXSZ_View_submitAction
(
tag
:
Int
,
price
:
String
,
commission
:
String
,
view
:
FXSZ_View
)
{
HUD
.
flash
(
.
progress
,
delay
:
1.2
)
if
is_Edit
{
var
sku_id
=
""
for
i
in
0
..<
selectItem
.
count
{
let
model
=
selectItem
[
i
]
if
i
<
selectItem
.
count
-
1
{
sku_id
+=
StringByInt
(
number
:
model
)
+
","
}
else
{
sku_id
+=
StringByInt
(
number
:
model
)
}
}
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"operation_type"
:
1
as
Any
,
"sku_id"
:
sku_id
as
Any
,
"dbt_price"
:
price
as
Any
,
"commission_type"
:
1
as
Any
,
"commission_per"
:
0
as
Any
,
"commission_val"
:
commission
as
Any
]
supSetCommodity
(
dic
)
{
(
data
)
in
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
view
.
removeFromSuperview
()
self
.
navbar
.
rightTitle
=
"编辑商品"
self
.
is_Edit
=
false
self
.
edit_bottom_view_H
.
constant
=
0
self
.
selectItem
.
removeAll
()
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
return
}
let
model
=
datas
[
tag
]
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"operation_type"
:
1
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"dbt_price"
:
price
as
Any
,
"commission_type"
:
1
as
Any
,
"commission_per"
:
0
as
Any
,
"commission_val"
:
commission
as
Any
]
supSetCommodity
(
dic
)
{
(
data
)
in
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
view
.
removeFromSuperview
()
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
}
func
New_Fx_Cell_btnSelect
(
idx
:
Int
,
cell
:
New_Fx_Cell
)
{
let
model
=
datas
[
idx
]
if
selectItem
.
contains
(
model
.
sku_id
!
){
...
...
@@ -32,7 +81,11 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
break
default
:
//分销设置
let
data
=
datas
[
cell
.
tag
]
let
view
=
FXSZ_View
(
frame
:
self
.
view
.
bounds
)
view
.
delegate
=
self
view
.
FX_Price_Tf
.
text
=
data
.
dbt_price
view
.
commission_tf
.
text
=
data
.
commission_val
self
.
view
.
addSubview
(
view
)
break
}
...
...
@@ -46,66 +99,15 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
return
}
let
vc
=
FXSZ_View
(
frame
:
self
.
view
.
bounds
)
// let vc = DistributorSettingAlertView(frame: self.view.bounds)
// vc.delegate = self
//
vc
.
delegate
=
self
if
selectItem
.
count
>
1
{
vc
.
is_all_select_mode
=
is_Edit
}
self
.
view
.
addSubview
(
vc
)
}
func
DistributorSettingAlertViewSubmitAction
(
tag
:
Int
,
operation_type
:
Int
,
dbt_price
:
String
,
commission_type
:
Int
,
commission_per
:
String
,
commission_val
:
String
,
view
:
DistributorSettingAlertView
)
{
HUD
.
flash
(
.
progress
,
delay
:
1.2
)
if
is_Edit
{
var
sku_id
=
""
for
i
in
0
..<
selectItem
.
count
{
let
model
=
selectItem
[
i
]
if
i
<
selectItem
.
count
-
1
{
sku_id
+=
StringByInt
(
number
:
model
)
+
","
}
else
{
sku_id
+=
StringByInt
(
number
:
model
)
}
}
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"operation_type"
:
operation_type
as
Any
,
"sku_id"
:
sku_id
as
Any
,
"dbt_price"
:
dbt_price
as
Any
,
"commission_type"
:
1
as
Any
,
"commission_per"
:
commission_per
as
Any
,
"commission_val"
:
commission_val
as
Any
]
supSetCommodity
(
dic
)
{
(
data
)
in
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
view
.
removeFromSuperview
()
self
.
navbar
.
rightTitle
=
"编辑商品"
self
.
is_Edit
=
false
self
.
edit_bottom_view_H
.
constant
=
0
self
.
selectItem
.
removeAll
()
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
return
}
let
model
=
datas
[
tag
]
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"operation_type"
:
operation_type
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"dbt_price"
:
dbt_price
as
Any
,
"commission_type"
:
commission_type
as
Any
,
"commission_per"
:
commission_per
as
Any
,
"commission_val"
:
commission_val
as
Any
]
supSetCommodity
(
dic
)
{
(
data
)
in
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
view
.
removeFromSuperview
()
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
}
// func new_GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) {
// let vc = DistributorSettingAlertView(frame: self.view.bounds)
...
...
@@ -371,46 +373,29 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
cell
.
select_img
.
isHidden
=
true
}
// cell.old_price_line.isHidden = false
// cell.new_price_Lbl.isHidden = false
if
model
.
dbt_price
==
nil
{
// cell.old_price_line.isHidden = true
// cell.new_price_Lbl.text = ""
if
model
.
dbt_price
==
nil
&&
model
.
commission_val
==
nil
{
cell
.
price
.
isHidden
=
true
}
else
{
// cell.new_price_Lbl.text = "¥" + model.dbt_price!
cell
.
price
.
isHidden
=
false
cell
.
price
.
text
=
"分销价: ¥
\(
model
.
dbt_price
!
)
(固定提成:
\(
model
.
commission_val
!
)
)"
}
// cell.old_price_Lbl.text = "¥" + model.price!
if
model
.
commission_type
==
1
{
// cell.FX_Percent_Lbl.isHidden = false
// cell.FX_Percent_Lbl.text = "分销(" + StringByInt(number: model.commission_per!) + "%)"
}
else
if
model
.
commission_type
==
2
{
// cell.FX_Percent_Lbl.isHidden = false
// cell.FX_Percent_Lbl.text = "分销(" + model.commission_val! + "元)"
}
else
{
// cell.FX_Percent_Lbl.isHidden = true
}
// cell.title_Lbl.text = model.goods_name
// cell.sell_total_Lbl.text = "销量:-"
if
model
.
dbt_sale
!=
nil
{
// cell.sell_total_Lbl.text = "销量:" + StringByInt(number: model.dbt_sale!)
}
// cell.store_lbl.text = "库存:-"
cell
.
spec
.
text
=
"单价: ¥"
+
model
.
price
!
cell
.
name
.
text
=
model
.
goods_name
if
model
.
inventory
!=
nil
{
// cell.store_lbl.text = "库存:" + StringByInt(number: model.inventory!)
cell
.
spec
.
text
!
+=
" "
+
"库存:
\(
model
.
inventory
!
)
"
}
else
{
cell
.
spec
.
text
!
+=
" "
+
"库存: -"
}
if
model
.
goods_thumb
!=
nil
{
cell
.
icon
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_thumb
!
),
placeholderImage
:
nil
,
options
:
.
allowInvalidSSLCertificates
)
}
return
cell
}
var
selectItem
:
Array
<
Int
>
=
[]
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
145
}
...
...
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