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
8553b67a
Commit
8553b67a
authored
Jun 05, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20
parent
1c8a0529
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
330 additions
and
99 deletions
+330
-99
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Interface/Interface_Z.plist
GeliBusinessPlatform/Interface/Interface_Z.plist
+2
-0
GeliBusinessPlatform/Model/UpDataModel.swift
GeliBusinessPlatform/Model/UpDataModel.swift
+1
-1
GeliBusinessPlatform/Model/agentList_interface.swift
GeliBusinessPlatform/Model/agentList_interface.swift
+15
-0
GeliBusinessPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
...ssPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
+6
-0
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_ListVc.swift
...form/ViewController/供应商分销商品管理/GYS_FX_Product_ListVc.swift
+112
-44
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC.swift
...Platform/ViewController/供应商分销商品管理/GYS_FX_Product_VC.swift
+136
-49
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC_Cell.swift
...orm/ViewController/供应商分销商品管理/GYS_FX_Product_VC_Cell.swift
+21
-2
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC_Cell.xib
...tform/ViewController/供应商分销商品管理/GYS_FX_Product_VC_Cell.xib
+34
-2
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+3
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
8553b67a
No preview for this file type
GeliBusinessPlatform/Interface/Interface_Z.plist
View file @
8553b67a
...
...
@@ -408,5 +408,7 @@
<string>
Distribution/addDbtShops
</string>
<key>
下拉框分销商商信息(未与代理商合作着的分销商信息)
</key>
<string>
Distribution/getDbtList
</string>
<key>
上下架
</key>
<string>
Distribution/setSupGoodsAttr
</string>
</dict>
</plist>
GeliBusinessPlatform/Model/UpDataModel.swift
View file @
8553b67a
...
...
@@ -8,7 +8,7 @@
import
Foundation
import
ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,供应商新增代理商(批量和单个新增代理商),终止与代理商合作,给代理商设置分销商品,商品上下架,供应商取消商品分销,上下架(设置分销商品给分销商),代理商终止与供应商合作,代理商的铺货或分销设置,取消分销,代理商设置分销商品上下架商品,代理商终止合作,分销商新增代理商,删除下游店长,新增店铺,
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,供应商新增代理商(批量和单个新增代理商),终止与代理商合作,给代理商设置分销商品,商品上下架,供应商取消商品分销,上下架(设置分销商品给分销商),代理商终止与供应商合作,代理商的铺货或分销设置,取消分销,代理商设置分销商品上下架商品,代理商终止合作,分销商新增代理商,删除下游店长,新增店铺,
上下架,
class
UpDataModel
:
Mappable
{
...
...
GeliBusinessPlatform/Model/agentList_interface.swift
View file @
8553b67a
...
...
@@ -165,6 +165,21 @@ func setDbtGoodsAttr(_ params:[String:Any],success:@escaping (_ res:Any)->(),fai
failture
(
error
)
}
}
//MARK:-- 上下架
/*
user_token : 验证token
sku_id : 商品sku_id
action : 操作,1为上架2为下架
*/
func
setSupGoodsAttr
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"上下架"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
//MARK:-- 上游供应商信息页面查询
/*
user_token : 验证token
...
...
GeliBusinessPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
View file @
8553b67a
...
...
@@ -176,6 +176,9 @@ class supSpreadGoodsDataModel: Mappable {
var
commission_type
:
Int
?
//提成类型 1百分比 2固定值
var
commission_per
:
Int
?
//提成百分比(0为初始值)
var
sku_id
:
Int
?
//sku_id
var
commission_val
:
String
?
//固定佣金
var
is_show
:
Int
?
//1为上架,0为下架
var
shop_id
:
Int
?
required
init
?(
map
:
Map
)
{
}
...
...
@@ -189,6 +192,9 @@ class supSpreadGoodsDataModel: Mappable {
inventory
<-
map
[
"inventory"
]
price
<-
map
[
"shop_price"
]
dbt_price
<-
map
[
"dbt_price"
]
commission_val
<-
map
[
"commission_val"
]
is_show
<-
map
[
"is_show"
]
shop_id
<-
map
[
"shop_id"
]
}
}
...
...
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_ListVc.swift
View file @
8553b67a
...
...
@@ -14,18 +14,31 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
var
titleStr
=
""
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
vcType
!=
180
{
return
dls_centersArr
.
count
}
return
centersArr
.
count
}
var
selectIndex
=
0
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelectCell"
)
as!
TitleAndSelectCell
cell
.
is_center_select
=
true
let
model
=
centersArr
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
model
.
shop_name
cell
.
selectBtn
.
isSelected
=
false
if
shop_id
==
model
.
shop_id
{
cell
.
selectBtn
.
isSelected
=
true
if
vcType
!=
180
{
let
model
=
dls_centersArr
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
model
.
shop_name
cell
.
selectBtn
.
isSelected
=
false
if
shop_id
==
model
.
sup_id
{
cell
.
selectBtn
.
isSelected
=
true
}
}
else
{
let
model
=
centersArr
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
model
.
shop_name
cell
.
selectBtn
.
isSelected
=
false
if
shop_id
==
model
.
shop_id
{
cell
.
selectBtn
.
isSelected
=
true
}
}
return
cell
}
...
...
@@ -64,7 +77,7 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
titleStr
// navbar.rightImg = UIImage(named: "ss_dark")
// navbar.rightImg = UIImage(named: "ss_dark")
self
.
view
.
addSubview
(
navbar
)
SetTopFrameView
(
view
:
contentV
,
btmView
:
self
.
view
)
...
...
@@ -95,8 +108,11 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
getNoti(noti:)
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"fx_action"
),
object
:
nil
)
}
@objc
func
getNoti2
(
noti
:
Notification
){
let
sum_goods
=
String
(
describing
:
noti
.
userInfo
!
[
"sum_goods"
]
!
)
...
...
@@ -130,42 +146,74 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
let
bg_view
=
UIView
()
var
select_list_tbv_height
=
0
func
setSelectCenterView
(){
HUD
.
flash
(
.
progress
)
if
centersArr
.
count
==
0
{
getDbtShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getDbtShopModel
self
.
centersArr
.
removeAll
()
model
.
data
?
.
forEach
({
(
item
)
in
self
.
centersArr
.
append
(
item
)
})
if
self
.
centersArr
.
count
!=
0
{
//MARK: - 限制中心选择高度
self
.
select_list_tbv_height
=
self
.
centersArr
.
count
*
49
if
self
.
select_list_tbv_height
>
350
{
self
.
select_list_tbv_height
=
350
if
vcType
!=
180
{
if
dls_centersArr
.
count
==
0
{
getsupList
([
"user_token"
:
UserToken
as
Any
])
{[
self
]
(
data
)
in
let
model
=
data
as!
getsupList_model
dls_centersArr
.
removeAll
()
model
.
data
?
.
forEach
({
(
item
)
in
dls_centersArr
.
append
(
item
)
})
if
dls_centersArr
.
count
!=
0
{
//MARK: - 限制中心选择高度
self
.
select_list_tbv_height
=
self
.
dls_centersArr
.
count
*
49
if
self
.
select_list_tbv_height
>
350
{
self
.
select_list_tbv_height
=
350
}
self
.
center_title_lbl
.
text
=
self
.
dls_centersArr
.
first
?
.
shop_name
self
.
arrow_img
.
image
=
UIImage
(
named
:
"down_blue"
)
if
model
.
code
==
1
{
HUD
.
hide
()
}
self
.
shop_id
=
(
model
.
data
?
.
first
?
.
sup_id
)
!
self
.
viewControllers
.
forEach
{
(
vc
)
in
vc
.
shop_id
=
self
.
shop_id
vc
.
isUpData
=
false
}
let
vc
=
self
.
viewControllers
[
self
.
selectIndex
]
vc
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
}
failture
:
{
(
err
)
in
self
.
center_title_lbl
.
text
=
self
.
centersArr
.
first
?
.
shop_name
self
.
arrow_img
.
image
=
UIImage
(
named
:
"down_blue"
)
if
model
.
code
==
1
{
HUD
.
hide
()
}
self
.
shop_id
=
(
model
.
data
?
.
first
?
.
shop_id
)
!
self
.
viewControllers
.
forEach
{
(
vc
)
in
vc
.
shop_id
=
self
.
shop_id
vc
.
isUpData
=
false
}
}
}
else
{
if
centersArr
.
count
==
0
{
getDbtShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getDbtShopModel
self
.
centersArr
.
removeAll
()
model
.
data
?
.
forEach
({
(
item
)
in
self
.
centersArr
.
append
(
item
)
})
if
self
.
centersArr
.
count
!=
0
{
//MARK: - 限制中心选择高度
self
.
select_list_tbv_height
=
self
.
centersArr
.
count
*
49
if
self
.
select_list_tbv_height
>
350
{
self
.
select_list_tbv_height
=
350
}
self
.
center_title_lbl
.
text
=
self
.
centersArr
.
first
?
.
shop_name
self
.
arrow_img
.
image
=
UIImage
(
named
:
"down_blue"
)
if
model
.
code
==
1
{
HUD
.
hide
()
}
self
.
shop_id
=
(
model
.
data
?
.
first
?
.
shop_id
)
!
self
.
viewControllers
.
forEach
{
(
vc
)
in
vc
.
shop_id
=
self
.
shop_id
vc
.
isUpData
=
false
}
let
vc
=
self
.
viewControllers
[
self
.
selectIndex
]
vc
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
let
vc
=
self
.
viewControllers
[
self
.
selectIndex
]
vc
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
}
failture
:
{
(
err
)
in
}
}
failture
:
{
(
err
)
in
}
}
contentV
.
addSubview
(
bg_view
)
bg_view
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
50
)
...
...
@@ -223,6 +271,10 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
}
}
var
centersArr
:
Array
<
getDbtShopDataModel
>
=
[]
var
dls_centersArr
:
Array
<
getsupList_Data_model
>
=
[]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
cover_btn
:
UIButton
?
...
...
@@ -236,8 +288,14 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
}
@objc
func
btnAction
(){
if
centersArr
.
count
==
0
{
return
if
vcType
!=
180
{
if
dls_centersArr
.
count
==
0
{
return
}
}
else
{
if
centersArr
.
count
==
0
{
return
}
}
arrow_img
.
image
=
UIImage
(
named
:
"up_blue"
)
if
cover_btn
==
nil
{
...
...
@@ -283,14 +341,24 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
cell
.
selectBtn
.
isSelected
=
true
closeAction
()
let
model
=
centersArr
[
indexPath
.
row
]
center_title_lbl
.
text
=
model
.
shop_name
self
.
shop_id
=
model
.
shop_id
!
self
.
viewControllers
.
forEach
{
(
vc
)
in
vc
.
shop_id
=
self
.
shop_id
vc
.
isUpData
=
false
if
vcType
!=
180
{
let
model
=
dls_centersArr
[
indexPath
.
row
]
center_title_lbl
.
text
=
model
.
shop_name
self
.
shop_id
=
model
.
sup_id
!
self
.
viewControllers
.
forEach
{
(
vc
)
in
vc
.
shop_id
=
self
.
shop_id
vc
.
isUpData
=
false
}
}
else
{
let
model
=
centersArr
[
indexPath
.
row
]
center_title_lbl
.
text
=
model
.
shop_name
self
.
shop_id
=
model
.
shop_id
!
self
.
viewControllers
.
forEach
{
(
vc
)
in
vc
.
shop_id
=
self
.
shop_id
vc
.
isUpData
=
false
}
}
let
vc
=
self
.
viewControllers
[
self
.
selectIndex
]
vc
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
...
...
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC.swift
View file @
8553b67a
...
...
@@ -8,7 +8,83 @@
import
UIKit
class
GYS_FX_Product_VC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GYS_FX_ProductCellDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
{
class
GYS_FX_Product_VC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GYS_FX_ProductCellDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GYS_FX_Product_VC_Cell_Delegate
,
GeliAlertViewDelegate
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
vcType
!=
180
{
}
else
{
let
model
=
datas
[
cellTag
]
if
sender
.
tag
==
1
{
let
cell
=
home_list_tbv
.
cellForRow
(
at
:
IndexPath
(
row
:
cellTag
,
section
:
0
))
as!
GYS_FX_Product_VC_Cell
var
action
=
1
if
cell
.
up_down_btn
.
titleLabel
!.
text
!.
contains
(
"下架"
)
{
action
=
2
}
setSupGoodsAttr
([
"user_token"
:
UserToken
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"action"
:
action
as
Any
])
{
(
data
)
in
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"haveChange"
),
object
:
"setting"
)
}
failture
:
{
(
err
)
in
}
return
}
var
action
=
1
if
sender
.
tag
==
0
{
action
=
2
}
spreadGoods
([
"user_token"
:
UserToken
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"shop_id"
:
model
.
shop_id
as
Any
,
"action"
:
action
as
Any
])
{
(
data
)
in
self
.
home_list_tbv
.
mj_header
?
.
beginRefreshing
()
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"haveChange"
),
object
:
"setting"
)
}
failture
:
{
(
err
)
in
}
}
}
var
cellTag
=
-
1
func
GYS_FX_Product_VC_Cell_Action
(
cell
:
GYS_FX_Product_VC_Cell
,
action
:
Int
)
{
if
vcType
!=
180
{
}
else
{
cellTag
=
cell
.
tag
switch
action
{
case
0
:
//取消分销
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
=
action
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
1
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
if
cell
.
up_down_btn
.
titleLabel
!.
text
!.
contains
(
"下架"
)
{
//下架
alertView
.
titileLbl
.
text
=
"是否下架?"
}
else
{
//上架
alertView
.
titileLbl
.
text
=
"是否上架?"
}
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
action
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
default
:
//设置分销
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
=
action
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
}
}
}
@IBOutlet
weak
var
contentV
:
UIView
!
var
keyword
=
""
var
blackBtnView
:
UIButton
!
=
nil
...
...
@@ -101,7 +177,7 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
var
shop_id
:
Int
=
0
var
datas
:
Array
<
supSpreadGoodsDataModel
>
=
[]
var
dls_datas
:
Array
<
selAgeDbtGoodsList_Data_model
>
=
[]
@IBOutlet
weak
var
home_list_tbv
:
UITableView
!//
主视图列表
...
...
@@ -171,7 +247,36 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
print
(
"加载数据"
)
page
=
1
isUpData
=
true
if
vcType
!=
180
{
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"tab_type"
:
look_type
as
Any
,
"keyword"
:
keyword
as
Any
,
"sup_id"
:
shop_id
as
Any
,
"page"
:
page
as
Any
]
selAgeDbtGoodsList
(
dict
)
{[
self
]
(
data
)
in
let
model
=
data
as!
selAgeDbtGoodsList_model
dls_datas
.
removeAll
()
model
.
data
?
.
forEach
({
(
item
)
in
dls_datas
.
append
(
item
)
})
self
.
home_list_tbv
.
reloadData
()
self
.
home_list_tbv
?
.
mj_header
?
.
endRefreshing
()
self
.
page
=
2
// if model.data?.sum_goods2 != nil && model.data?.sum_goods != nil{
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: "sum_goods_count"), object: nil, userInfo: ["sum_goods":model.data!.sum_goods!,"sum_goods2":model.data!.sum_goods2!] )
// }
// if model.data?.res?.count == 0 {
// self.home_list_tbv?.mj_footer?.endRefreshingWithNoMoreData()
// }else{
// self.home_list_tbv?.mj_footer?.endRefreshing()
// }
}
failture
:
{
(
err
)
in
self
.
home_list_tbv
?
.
mj_header
?
.
endRefreshing
()
}
return
}
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"retrieval"
:
""
as
Any
,
"page"
:
page
as
Any
,
"look_type"
:
look_type
as
Any
,
"shop_id"
:
shop_id
as
Any
]
supSpreadGoods
(
dic
)
{
(
data
)
in
...
...
@@ -202,7 +307,10 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
//MARK:--加载更多数据
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
if
vcType
!=
180
{
return
}
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"retrieval"
:
""
as
Any
,
"page"
:
page
as
Any
,
"look_type"
:
look_type
as
Any
,
"shop_id"
:
shop_id
as
Any
]
supSpreadGoods
(
dic
,
success
:
{
(
data
)
in
let
model
=
data
as!
supSpreadGoodsModel
...
...
@@ -232,57 +340,36 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GYS_FX_Product_VC_Cell"
)
as!
GYS_FX_Product_VC_Cell
cell
.
tag
=
indexPath
.
row
if
vcType
!=
180
{
let
model
=
datas
[
indexPath
.
row
]
cell
.
delegate
=
self
if
self
.
title
!.
contains
(
"已铺货"
)
{
cell
.
set_btn_w
.
constant
=
0
cell
.
cancel_btn_w
.
constant
=
77
cell
.
up_down_btn_w
.
constant
=
77
}
else
{
cell
.
set_btn_w
.
constant
=
77
cell
.
cancel_btn_w
.
constant
=
0
cell
.
up_down_btn_w
.
constant
=
0
}
if
vcType
!=
180
{
//代理商品管理
if
self
.
title
!.
contains
(
"已铺货"
)
{
// cell.submitBtn.setTitle("取消铺货", for: .normal)
}
else
{
// cell.submitBtn.setTitle("铺货", for: .normal)
}
}
else
{
}
else
{
//180 上游供应商品管理
let
model
=
datas
[
indexPath
.
row
]
if
self
.
title
!.
contains
(
"已铺货"
)
{
// cell.submitBtn.setTitle("取消铺货", for: .normal)
}
else
{
// cell.submitBtn.setTitle("铺货", for: .normal)
cell
.
icon
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_thumb
!
),
placeholderImage
:
nil
,
options
:
.
allowInvalidSSLCertificates
)
cell
.
name
.
text
=
model
.
goods_name
cell
.
price
.
text
=
"分销价:"
cell
.
comission
.
text
=
"¥
\(
model
.
dbt_price
!
)
(固定提成:
\(
model
.
commission_val
!
)
)"
cell
.
inventory
.
isHidden
=
true
cell
.
store
.
text
=
"库存:
\(
model
.
inventory
!
)
"
cell
.
up_down_btn
.
setTitle
(
"商品上架"
,
for
:
.
normal
)
if
model
.
is_show
==
1
{
cell
.
up_down_btn
.
setTitle
(
"商品下架"
,
for
:
.
normal
)
}
cell
.
fx_price
.
isHidden
=
true
}
// cell.tag = indexPath.row
// cell.delegate = self
// let model = datas[indexPath.row]
// cell.title_Lbl.text = model.goods_name
// if model.dbt_sale != nil {
// cell.sell_total_Lbl.text = "销量: " + StringByInt(number: model.dbt_sale!)
// }else{
// cell.sell_total_Lbl.text = "销量: -"
// }
// if model.inventory != nil {
// cell.store_lbl.text = "库存: " + StringByInt(number: model.inventory!)
// }else{
// cell.store_lbl.text = "库存: -"
// }
// if model.commission_type == 1 {
// cell.FX_Percent_Lbl.text = StringByInt(number: model.commission_per!) + "%"
// cell.FX_Percent_Lbl.isHidden = false
// }else{
// cell.FX_Percent_Lbl.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{
// cell.new_price_Lbl.text = "¥" + model.dbt_price!
// }
// cell.old_price_Lbl.text = model.price
//
return
cell
}
...
...
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC_Cell.swift
View file @
8553b67a
...
...
@@ -7,9 +7,28 @@
//
import
UIKit
protocol
GYS_FX_Product_VC_Cell_Delegate
{
func
GYS_FX_Product_VC_Cell_Action
(
cell
:
GYS_FX_Product_VC_Cell
,
action
:
Int
)
}
class
GYS_FX_Product_VC_Cell
:
UITableViewCell
{
var
delegate
:
GYS_FX_Product_VC_Cell_Delegate
?
@IBAction
func
btn_action
(
_
sender
:
UIButton
)
{
//sender.tag 0取消分销 1上下架 2分销设置
delegate
?
.
GYS_FX_Product_VC_Cell_Action
(
cell
:
self
,
action
:
sender
.
tag
)
}
@IBOutlet
weak
var
store
:
UILabel
!
@IBOutlet
weak
var
cancel_btn_w
:
NSLayoutConstraint
!
@IBOutlet
weak
var
up_down_btn_w
:
NSLayoutConstraint
!
@IBOutlet
weak
var
set_btn_w
:
NSLayoutConstraint
!
@IBOutlet
weak
var
cancel_btn
:
UIButton
!
@IBOutlet
weak
var
up_down_btn
:
UIButton
!
@IBOutlet
weak
var
set_btn
:
UIButton
!
@IBOutlet
weak
var
fx_price
:
UILabel
!
@IBOutlet
weak
var
inventory
:
UILabel
!
@IBOutlet
weak
var
comission
:
UILabel
!
@IBOutlet
weak
var
price
:
UILabel
!
@IBOutlet
weak
var
name
:
UILabel
!
@IBOutlet
weak
var
icon
:
UIImageView
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
...
...
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_VC_Cell.xib
View file @
8553b67a
...
...
@@ -62,7 +62,7 @@
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"eub-Q6-ZHe"
>
<rect
key=
"frame"
x=
"
90
"
y=
"63"
width=
"30.5"
height=
"17"
/>
<rect
key=
"frame"
x=
"
134.5
"
y=
"63"
width=
"30.5"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"12"
/>
<color
key=
"textColor"
name=
"#F57575"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -83,6 +83,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=
"btn_action:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"S1k-Ax-rZJ"
/>
</connections>
</button>
<button
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5mn-3H-9iX"
>
<rect
key=
"frame"
x=
"221"
y=
"96"
width=
"77"
height=
"41"
/>
...
...
@@ -93,6 +96,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=
"btn_action:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"9om-ig-qo4"
/>
</connections>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"mDS-bi-2m5"
>
<rect
key=
"frame"
x=
"144"
y=
"96"
width=
"77"
height=
"41"
/>
...
...
@@ -103,7 +109,16 @@
<state
key=
"normal"
title=
"取消分销"
>
<color
key=
"titleColor"
red=
"0.2784313725"
green=
"0.56078431370000004"
blue=
"0.89019607840000003"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</state>
<connections>
<action
selector=
"btn_action:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"pZF-oC-oSR"
/>
</connections>
</button>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"分销价:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"WfU-38-9an"
>
<rect
key=
"frame"
x=
"90"
y=
"63"
width=
"39.5"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"12"
/>
<color
key=
"textColor"
name=
"#999999"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
...
...
@@ -123,10 +138,12 @@
<constraint
firstItem=
"Jr7-Sh-Ibo"
firstAttribute=
"leading"
secondItem=
"f5k-Og-jYC"
secondAttribute=
"leading"
constant=
"15"
id=
"dP8-cz-9lC"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"YVQ-wf-px1"
secondAttribute=
"trailing"
constant=
"15"
id=
"eB8-kh-k0t"
/>
<constraint
firstItem=
"5mn-3H-9iX"
firstAttribute=
"top"
secondItem=
"MZh-k2-dRq"
secondAttribute=
"bottom"
id=
"fhb-03-BUO"
/>
<constraint
firstItem=
"WfU-38-9an"
firstAttribute=
"centerY"
secondItem=
"eub-Q6-ZHe"
secondAttribute=
"centerY"
id=
"hQh-TC-eMg"
/>
<constraint
firstItem=
"R7g-62-YKx"
firstAttribute=
"top"
secondItem=
"MZh-k2-dRq"
secondAttribute=
"bottom"
id=
"hZz-Fp-JNf"
/>
<constraint
firstItem=
"WfU-38-9an"
firstAttribute=
"leading"
secondItem=
"VAc-v3-XeF"
secondAttribute=
"leading"
id=
"jdF-br-wvj"
/>
<constraint
firstItem=
"eub-Q6-ZHe"
firstAttribute=
"top"
secondItem=
"VAc-v3-XeF"
secondAttribute=
"bottom"
constant=
"5"
id=
"k16-wD-kQG"
/>
<constraint
firstItem=
"5Jw-lG-uGm"
firstAttribute=
"centerY"
secondItem=
"1ZM-PY-030"
secondAttribute=
"centerY"
id=
"krR-9j-yzY"
/>
<constraint
firstItem=
"eub-Q6-ZHe"
firstAttribute=
"leading"
secondItem=
"
Jr7-Sh-Ibo"
secondAttribute=
"trailing"
constant=
"10
"
id=
"omo-kF-hDk"
/>
<constraint
firstItem=
"eub-Q6-ZHe"
firstAttribute=
"leading"
secondItem=
"
WfU-38-9an"
secondAttribute=
"trailing"
constant=
"5
"
id=
"omo-kF-hDk"
/>
<constraint
firstItem=
"VAc-v3-XeF"
firstAttribute=
"top"
secondItem=
"YVQ-wf-px1"
secondAttribute=
"bottom"
constant=
"5"
id=
"qQz-lw-eeO"
/>
<constraint
firstItem=
"VAc-v3-XeF"
firstAttribute=
"leading"
secondItem=
"Jr7-Sh-Ibo"
secondAttribute=
"trailing"
constant=
"10"
id=
"rWi-1V-jgi"
/>
<constraint
firstItem=
"YVQ-wf-px1"
firstAttribute=
"leading"
secondItem=
"Jr7-Sh-Ibo"
secondAttribute=
"trailing"
constant=
"10"
id=
"uKU-Zf-PwD"
/>
...
...
@@ -144,6 +161,21 @@
</constraints>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"cancel_btn"
destination=
"mDS-bi-2m5"
id=
"ard-Kz-TJO"
/>
<outlet
property=
"cancel_btn_w"
destination=
"nCS-CE-1Bu"
id=
"UMK-uS-yI0"
/>
<outlet
property=
"comission"
destination=
"1ZM-PY-030"
id=
"TjK-zW-VRv"
/>
<outlet
property=
"fx_price"
destination=
"eub-Q6-ZHe"
id=
"SNs-ln-bfs"
/>
<outlet
property=
"icon"
destination=
"Jr7-Sh-Ibo"
id=
"TDk-Bx-v3m"
/>
<outlet
property=
"inventory"
destination=
"5Jw-lG-uGm"
id=
"XQb-ec-Zpf"
/>
<outlet
property=
"name"
destination=
"YVQ-wf-px1"
id=
"iif-nb-5Dq"
/>
<outlet
property=
"price"
destination=
"VAc-v3-XeF"
id=
"zLY-1R-tg2"
/>
<outlet
property=
"set_btn"
destination=
"R7g-62-YKx"
id=
"Kyq-1u-jUM"
/>
<outlet
property=
"set_btn_w"
destination=
"tL7-9J-xXT"
id=
"hxP-fV-5z1"
/>
<outlet
property=
"store"
destination=
"WfU-38-9an"
id=
"VNk-Vy-FPH"
/>
<outlet
property=
"up_down_btn"
destination=
"5mn-3H-9iX"
id=
"JJH-6i-KkT"
/>
<outlet
property=
"up_down_btn_w"
destination=
"lXM-ZI-G6e"
id=
"sFW-vl-K7P"
/>
</connections>
<point
key=
"canvasLocation"
x=
"141.30434782608697"
y=
"87.723214285714278"
/>
</tableViewCell>
</objects>
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
8553b67a
...
...
@@ -809,7 +809,9 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
179
:
//上游供应商管理
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
let
vc
=
GYS_HZ_Vc
()
vc
.
title_str
=
"上游供应商管理"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
180
:
//上游供应商商品
let
vc
=
GYS_FX_Product_ListVc
()
...
...
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