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
4bc32ab5
Commit
4bc32ab5
authored
May 20, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4
parent
61a214c7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
89 deletions
+89
-89
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
...sPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
+87
-88
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+2
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
4bc32ab5
No preview for this file type
GeliBusinessPlatform/ViewController/分销商品管理/FX_Product_GuanLiVC.swift
View file @
4bc32ab5
...
@@ -9,8 +9,23 @@
...
@@ -9,8 +9,23 @@
import
UIKit
import
UIKit
class
FX_Product_GuanLiVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
SelectContentViewDelegate
,
HeaderSelectViewDelegate
,
New_Fx_Cell_Delegate
,
FXSZ_View_Delegate
{
class
FX_Product_GuanLiVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GYS_FX_ProductCellDelegate
,
SelectContentViewDelegate
,
HeaderSelectViewDelegate
,
DistributorSettingAlertViewDelegate
{
func
FXSZ_View_submitAction
(
tag
:
Int
,
price
:
String
,
commission
:
String
,
view
:
FXSZ_View
)
{
@IBOutlet
weak
var
all_select_btn
:
UIButton
!
@IBAction
func
select_mode_Action
(
_
sender
:
UIButton
)
{
if
selectItem
.
count
==
0
{
return
}
let
vc
=
DistributorSettingAlertView
(
frame
:
self
.
view
.
bounds
)
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
)
HUD
.
flash
(
.
progress
,
delay
:
1.2
)
if
is_Edit
{
if
is_Edit
{
var
sku_id
=
""
var
sku_id
=
""
...
@@ -24,12 +39,12 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -24,12 +39,12 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
}
}
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"operation_type"
:
1
as
Any
,
"operation_type"
:
operation_type
as
Any
,
"sku_id"
:
sku_id
as
Any
,
"sku_id"
:
sku_id
as
Any
,
"dbt_price"
:
price
as
Any
,
"dbt_price"
:
dbt_
price
as
Any
,
"commission_type"
:
1
as
Any
,
"commission_type"
:
1
as
Any
,
"commission_per"
:
0
as
Any
,
"commission_per"
:
commission_per
as
Any
,
"commission_val"
:
commission
as
Any
]
"commission_val"
:
commission
_val
as
Any
]
supSetCommodity
(
dic
)
{
(
data
)
in
supSetCommodity
(
dic
)
{
(
data
)
in
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
view
.
removeFromSuperview
()
view
.
removeFromSuperview
()
...
@@ -45,12 +60,12 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -45,12 +60,12 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
let
model
=
datas
[
tag
]
let
model
=
datas
[
tag
]
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"operation_type"
:
1
as
Any
,
"operation_type"
:
operation_type
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"dbt_price"
:
price
as
Any
,
"dbt_price"
:
dbt_
price
as
Any
,
"commission_type"
:
1
as
Any
,
"commission_type"
:
commission_type
as
Any
,
"commission_per"
:
0
as
Any
,
"commission_per"
:
commission_per
as
Any
,
"commission_val"
:
commission
as
Any
]
"commission_val"
:
commission
_val
as
Any
]
supSetCommodity
(
dic
)
{
(
data
)
in
supSetCommodity
(
dic
)
{
(
data
)
in
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"设置成功~"
),
delay
:
1.2
)
view
.
removeFromSuperview
()
view
.
removeFromSuperview
()
...
@@ -59,66 +74,14 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -59,66 +74,14 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
}
failture
:
{
(
err
)
in
}
}
failture
:
{
(
err
)
in
}
}
}
func
New_Fx_Cell_btnSelect
(
idx
:
Int
,
cell
:
New_Fx_Cell
)
{
func
GYS_FX_ProductCellTableViewCellBtnAction
(
idx
:
Int
)
{
let
model
=
datas
[
idx
]
let
vc
=
DistributorSettingAlertView
(
frame
:
self
.
view
.
bounds
)
if
selectItem
.
contains
(
model
.
sku_id
!
){
vc
.
tag
=
idx
let
index
=
selectItem
.
firstIndex
(
of
:
model
.
sku_id
!
)
vc
.
data
=
datas
[
idx
]
selectItem
.
remove
(
at
:
index
!
)
}
else
{
selectItem
.
append
(
model
.
sku_id
!
)
}
all_select_btn
.
isSelected
=
false
all_select_btn
.
setTitle
(
" 全选(已选 "
+
StringByInt
(
number
:
selectItem
.
count
)
+
" 件商品)"
,
for
:
.
normal
)
home_list_tbv
.
reloadData
()
}
func
New_Fx_Cell_btnClick
(
idx
:
Int
,
cell
:
New_Fx_Cell
)
{
switch
idx
{
case
0
:
break
case
1
:
break
default
:
let
view
=
XY_FX_Setting_View
(
frame
:
self
.
view
.
bounds
)
self
.
view
.
addSubview
(
view
)
//分销设置
// 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
}
}
@IBOutlet
weak
var
all_select_btn
:
UIButton
!
@IBAction
func
select_mode_Action
(
_
sender
:
UIButton
)
{
if
selectItem
.
count
==
0
{
return
}
let
vc
=
FXSZ_View
(
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
)
self
.
view
.
addSubview
(
vc
)
}
}
// func new_GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) {
// let vc = DistributorSettingAlertView(frame: self.view.bounds)
// vc.tag = idx
// vc.data = datas[idx]
// vc.delegate = self
// self.view.addSubview(vc)
// }
var
datas
:
Array
<
supGoodsListResDataModel
>
=
[]
var
datas
:
Array
<
supGoodsListResDataModel
>
=
[]
var
selectIndexArr
=
[
0
,
0
]
var
selectIndexArr
=
[
0
,
0
]
var
showSelectvIndex
=
0
var
showSelectvIndex
=
0
...
@@ -335,7 +298,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -335,7 +298,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
initHeaderSelectView
()
initHeaderSelectView
()
home_list_tbv
.
register
(
UINib
(
nibName
:
"
New_Fx_Cell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"New_Fx_
Cell"
)
home_list_tbv
.
register
(
UINib
(
nibName
:
"
GYS_FX_ProductCellTableViewCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GYS_FX_ProductCellTableView
Cell"
)
home_list_tbv
.
separatorStyle
=
.
none
home_list_tbv
.
separatorStyle
=
.
none
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
//下拉刷新相关设置
//下拉刷新相关设置
...
@@ -354,52 +317,88 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -354,52 +317,88 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
model
=
datas
[
indexPath
.
row
]
let
model
=
datas
[
indexPath
.
row
]
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"New_Fx_Cell"
)
as!
New_Fx_Cell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GYS_FX_ProductCellTableViewCell"
)
as!
GYS_FX_ProductCellTableViewCell
cell
.
submitBtn
.
setTitle
(
"设置"
,
for
:
.
normal
)
cell
.
submitBtn
.
setTitleColor
(
UIColor
(
named
:
"按钮背景颜色"
),
for
:
.
normal
)
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
cell
.
delegate
=
self
cell
.
delegate
=
self
if
is_Edit
{
if
is_Edit
{
cell
.
leftValue
.
constant
=
45
cell
.
leftValue
.
constant
=
45
cell
.
leftBtn
.
isUserInteractionEnabled
=
true
cell
.
submit_Btn_W
.
constant
=
10
cell
.
select_img
.
isHidden
=
false
cell
.
submitBtn
.
isHidden
=
true
cell
.
select_img
.
image
=
UIImage
(
named
:
"daixuan"
)
cell
.
left_btn
.
isUserInteractionEnabled
=
true
cell
.
select_Img
.
isHidden
=
false
cell
.
select_Img
.
image
=
UIImage
(
named
:
"daixuan"
)
selectItem
.
forEach
{
(
idx
)
in
selectItem
.
forEach
{
(
idx
)
in
if
idx
==
model
.
sku_id
{
if
idx
==
model
.
sku_id
{
cell
.
select_
i
mg
.
image
=
UIImage
(
named
:
"yuxuan"
)
cell
.
select_
I
mg
.
image
=
UIImage
(
named
:
"yuxuan"
)
}
}
}
}
}
else
{
}
else
{
cell
.
leftValue
.
constant
=
0
cell
.
leftValue
.
constant
=
0
cell
.
leftBtn
.
isUserInteractionEnabled
=
false
cell
.
submit_Btn_W
.
constant
=
50
cell
.
select_img
.
isHidden
=
true
cell
.
submitBtn
.
isHidden
=
false
cell
.
left_btn
.
isUserInteractionEnabled
=
false
cell
.
select_Img
.
isHidden
=
true
}
}
if
model
.
dbt_price
==
nil
&&
model
.
commission_val
==
nil
{
cell
.
price
.
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
=
""
}
else
{
}
else
{
cell
.
price
.
isHidden
=
false
cell
.
new_price_Lbl
.
text
=
"¥"
+
model
.
dbt_price
!
cell
.
price
.
text
=
"分销价: ¥
\(
model
.
dbt_price
!
)
(固定提成:
\(
model
.
commission_val
!
)
)"
}
}
cell
.
spec
.
text
=
"单价: ¥"
+
model
.
price
!
cell
.
old_price_Lbl
.
text
=
"¥"
+
model
.
price
!
if
model
.
commission_type
==
1
{
cell
.
FX_Percent_Lbl
.
isHidden
=
false
cell
.
name
.
text
=
model
.
goods_name
cell
.
FX_Percent_Lbl
.
text
=
"分销("
+
StringByInt
(
number
:
model
.
commission_per
!
)
+
"%)"
if
model
.
inventory
!=
nil
{
}
else
if
model
.
commission_type
==
2
{
cell
.
spec
.
text
!
+=
" "
+
"库存:
\(
model
.
inventory
!
)
"
cell
.
FX_Percent_Lbl
.
isHidden
=
false
cell
.
FX_Percent_Lbl
.
text
=
"分销("
+
model
.
commission_val
!
+
"元)"
}
else
{
}
else
{
cell
.
spec
.
text
!
+=
" "
+
"库存: -"
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
=
"库存:-"
if
model
.
inventory
!=
nil
{
cell
.
store_lbl
.
text
=
"库存:"
+
StringByInt
(
number
:
model
.
inventory
!
)
}
}
if
model
.
goods_thumb
!=
nil
{
if
model
.
goods_thumb
!=
nil
{
cell
.
icon
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_thumb
!
),
placeholderImage
:
nil
,
options
:
.
allowInvalidSSLCertificates
)
cell
.
item_Icon_Img
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_thumb
!
))
}
}
cell
.
color_lbl
.
isHidden
=
cell
.
FX_Percent_Lbl
.
isHidden
cell
.
color_lbl
.
text
=
cell
.
FX_Percent_Lbl
.
text
return
cell
return
cell
}
}
var
selectItem
:
Array
<
Int
>
=
[]
var
selectItem
:
Array
<
Int
>
=
[]
func
GYS_FX_ProductCellTableViewCellSelect
(
idx
:
Int
)
{
let
model
=
datas
[
idx
]
if
selectItem
.
contains
(
model
.
sku_id
!
){
let
index
=
selectItem
.
firstIndex
(
of
:
model
.
sku_id
!
)
selectItem
.
remove
(
at
:
index
!
)
}
else
{
selectItem
.
append
(
model
.
sku_id
!
)
}
all_select_btn
.
isSelected
=
false
all_select_btn
.
setTitle
(
" 全选(已选 "
+
StringByInt
(
number
:
selectItem
.
count
)
+
" 件商品)"
,
for
:
.
normal
)
home_list_tbv
.
reloadData
()
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
1
4
5
return
1
2
5
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
4bc32ab5
...
@@ -755,7 +755,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
...
@@ -755,7 +755,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
return
case
164
:
//上游供应商管理
case
164
:
//上游供应商管理
let
vc
=
SY_GYS_GL_VC
()
let
vc
=
GYS_HZ_Vc
()
vc
.
title_str
=
"上游供应商管理"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
return
case
165
:
//上游代理商管理
case
165
:
//上游代理商管理
...
...
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