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
0f0862f1
Commit
0f0862f1
authored
Nov 13, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增供应商
parent
ec2f98eb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
163 additions
and
25 deletions
+163
-25
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Interface/Interface_Z.plist
GeliBusinessPlatform/Interface/Interface_Z.plist
+4
-0
GeliBusinessPlatform/Model/UpDataModel.swift
GeliBusinessPlatform/Model/UpDataModel.swift
+1
-1
GeliBusinessPlatform/Model/getDbtRuleInterface.swift
GeliBusinessPlatform/Model/getDbtRuleInterface.swift
+27
-0
GeliBusinessPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
...ssPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
+28
-0
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
+92
-17
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.xib
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.xib
+1
-0
GeliBusinessPlatform/View/AlertView/GLAlertTbAddViewCell.swift
...usinessPlatform/View/AlertView/GLAlertTbAddViewCell.swift
+1
-0
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
+9
-7
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0f0862f1
No preview for this file type
GeliBusinessPlatform/Interface/Interface_Z.plist
View file @
0f0862f1
...
...
@@ -276,6 +276,10 @@
<string>
Distribution/getAllShop
</string>
<key>
供应商新增店铺
</key>
<string>
Distribution/supAddContract
</string>
<key>
分销商新增供应商
</key>
<string>
Distribution/dbtAddContract
</string>
<key>
获取供应商商店
</key>
<string>
Distribution/getSupShop
</string>
<key>
分销订单管理
</key>
<string>
Distribution/dbtOrderLis
</string>
<key>
标记已人工结算
</key>
...
...
GeliBusinessPlatform/Model/UpDataModel.swift
View file @
0f0862f1
...
...
@@ -8,7 +8,7 @@
import
Foundation
import
ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理
,分销商新增供应商
class
UpDataModel
:
Mappable
{
...
...
GeliBusinessPlatform/Model/getDbtRuleInterface.swift
View file @
0f0862f1
...
...
@@ -220,3 +220,30 @@ func supSetCommodity(_ params:[String:Any],success:@escaping (_ res:Any)->(),fai
failture
(
error
)
}
}
//MARK:-- 分销商新增供应商
/*
//params-key:user_token
shop_id
*/
func
dbtAddContract
(
_
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:-- 获取供应商商店
/*
//params-key:user_token
*/
func
getSupShop
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"获取供应商商店"
,
params
,
{
(
rep
:
DataResponse
<
getSupShopModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
GeliBusinessPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
View file @
0f0862f1
...
...
@@ -344,3 +344,31 @@ class supGoodsListResDataModel: Mappable {
is_dbt
<-
map
[
"is_dbt"
]
}
}
//MARK: - 获取供应商商店
class
getSupShopModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
Array
<
getSupShopDataModel
>
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
getSupShopDataModel
:
Mappable
{
var
shop_id
:
Int
?
var
shop_name
:
String
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
shop_id
<-
map
[
"shop_id"
]
shop_name
<-
map
[
"shop_name"
]
}
}
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.swift
View file @
0f0862f1
...
...
@@ -11,7 +11,14 @@ import UIKit
class
GLAlertTbAddView
:
UIView
,
UITableViewDelegate
,
UITableViewDataSource
,
GLAlertTbAddViewCellDelegate
,
TitleAndSelectCellDelegate
{
var
is_gys
=
false
{
didSet
{
if
is_gys
{
title_lbl
.
text
=
"新增供应商"
loadData
()
}
}
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
func
GLAlertTbAddViewCellBtnAction
(
target
:
String
,
tag
:
Int
)
{
...
...
@@ -31,21 +38,41 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
func
loadData
(){
print
(
"1"
)
HUD
.
flash
(
.
progress
)
if
centers
.
count
==
0
{
getDbtShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getDbtShopModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
centers
.
append
(
item
)
})
self
.
bottom_tableview
.
reloadData
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
if
title_lbl
.
text
==
"新增供应商"
{
print
(
"2"
)
if
gys_centers
.
count
==
0
{
getSupShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getSupShopModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
gys_centers
.
append
(
item
)
})
self
.
bottom_tableview
.
reloadData
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
}
}
else
{
print
(
"3"
)
if
centers
.
count
==
0
{
getDbtShop
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
model
=
data
as!
getDbtShopModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
centers
.
append
(
item
)
})
self
.
bottom_tableview
.
reloadData
()
HUD
.
hide
()
}
failture
:
{
(
err
)
in
}
}
}
}
var
centers
:
Array
<
getDbtShopDataModel
>
=
[]
var
gys_centers
:
Array
<
getSupShopDataModel
>
=
[]
var
datas
:
Array
<
String
>
=
[
""
]
@IBOutlet
weak
var
center_view_height
:
NSLayoutConstraint
!
...
...
@@ -53,6 +80,9 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
if
tableView
==
list_tableview
{
return
datas
.
count
}
else
{
if
title_lbl
.
text
==
"新增供应商"
{
return
gys_centers
.
count
}
return
centers
.
count
}
}
...
...
@@ -79,6 +109,24 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
return
cell
}
else
{
if
title_lbl
.
text
==
"新增供应商"
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelectCell"
)
!
as!
TitleAndSelectCell
cell
.
is_center_select
=
true
cell
.
delegate
=
self
let
model
=
gys_centers
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
model
.
shop_name
let
str
=
datas
[
idx
]
as!
String
if
str
.
count
>
0
{
if
cell
.
titleLbl
.
text
==
str
{
cell
.
selectBtn
.
isSelected
=
true
}
else
{
cell
.
selectBtn
.
isSelected
=
false
}
}
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelectCell"
)
!
as!
TitleAndSelectCell
cell
.
is_center_select
=
true
cell
.
delegate
=
self
...
...
@@ -99,7 +147,9 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
if
scrollView
!=
bottom_tableview
{
bottom_tableview
.
isHidden
=
true
}
}
var
idx
:
Int
=
0
...
...
@@ -112,19 +162,21 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
tableView
==
bottom_tableview
{
let
str
=
datas
[
idx
]
as!
String
tableView
.
visibleCells
.
forEach
{
(
item
)
in
let
cell
=
item
as!
TitleAndSelectCell
cell
.
selectBtn
.
isSelected
=
false
}
bottom_tableview
.
isHidden
=
true
let
model
=
centers
[
indexPath
.
row
]
datas
.
insert
(
model
.
shop_name
!
,
at
:
idx
)
if
title_lbl
.
text
==
"新增供应商"
{
let
model
=
gys_centers
[
indexPath
.
row
]
datas
.
insert
(
model
.
shop_name
!
,
at
:
idx
)
}
else
{
let
model
=
centers
[
indexPath
.
row
]
datas
.
insert
(
model
.
shop_name
!
,
at
:
idx
)
}
datas
.
remove
(
at
:
idx
+
1
)
list_tableview
.
reloadData
()
bottom_tableview
.
isHidden
=
true
}
}
...
...
@@ -136,6 +188,26 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
@IBAction
func
btnAction
(
_
sender
:
UIButton
)
{
if
sender
.
tag
==
0
{
var
shop_id
=
""
if
title_lbl
.
text
==
"新增供应商"
{
for
i
in
0
..<
datas
.
count
{
let
str
=
datas
[
i
]
gys_centers
.
forEach
{
(
item
)
in
if
item
.
shop_name
==
str
{
if
i
<
datas
.
count
-
1
{
shop_id
+=
StringByInt
(
number
:
item
.
shop_id
!
)
+
","
}
else
{
shop_id
+=
StringByInt
(
number
:
item
.
shop_id
!
)
}
}
}
}
dbtAddContract
([
"user_token"
:
UserToken
as
Any
,
"shop_id"
:
shop_id
as
Any
])
{
(
data
)
in
self
.
removeFromSuperview
()
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"haveAdd"
),
object
:
"fxsAdd"
)
}
failture
:
{
(
err
)
in
}
return
}
for
i
in
0
..<
datas
.
count
{
let
str
=
datas
[
i
]
centers
.
forEach
{
(
item
)
in
...
...
@@ -166,11 +238,13 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
}
@IBOutlet
weak
var
title_lbl
:
UILabel
!
@IBOutlet
weak
var
bottom_tableview
:
UITableView
!
@IBOutlet
weak
var
list_tableview
:
UITableView
!
//初始化时将xib中的view添加进来
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
contentView
=
loadViewFromNib
()
addSubview
(
contentView
)
contentView
.
snp
.
makeConstraints
{
(
make
)
in
...
...
@@ -186,6 +260,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
// /初始化时将xib中的view添加进来
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
contentView
=
loadViewFromNib
()
addSubview
(
contentView
)
contentView
.
snp
.
makeConstraints
{
(
make
)
in
...
...
GeliBusinessPlatform/View/AlertView/GLAlertTbAddView.xib
View file @
0f0862f1
...
...
@@ -15,6 +15,7 @@
<outlet
property=
"bottom_tableview"
destination=
"0V2-BU-sF9"
id=
"iJ3-vo-ZiD"
/>
<outlet
property=
"center_view_height"
destination=
"9E4-JF-1gj"
id=
"UwA-pb-rXY"
/>
<outlet
property=
"list_tableview"
destination=
"ai3-h9-DLi"
id=
"3Wi-eZ-2xQ"
/>
<outlet
property=
"title_lbl"
destination=
"oAF-vL-09z"
id=
"Ovp-hk-HH6"
/>
</connections>
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
...
...
GeliBusinessPlatform/View/AlertView/GLAlertTbAddViewCell.swift
View file @
0f0862f1
...
...
@@ -24,6 +24,7 @@ class GLAlertTbAddViewCell: UITableViewCell {
@IBOutlet
weak
var
actionBtn
:
UIButton
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
// Initialization code
}
...
...
GeliBusinessPlatform/ViewController/供应商合作管理/GYS_HZ_Vc.swift
View file @
0f0862f1
...
...
@@ -44,9 +44,12 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
}
func
rightBtnClick
()
{
print
(
"新增店铺"
)
//GLAlertTbAddView
print
(
"新增店铺"
)
//GLAlertTbAddView
let
alertView
=
GLAlertTbAddView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
bottom_tableview
.
isHidden
=
true
if
title_str
!=
"分销商管理"
{
alertView
.
is_gys
=
true
}
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
...
...
@@ -62,12 +65,12 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
//MARK:--取消搜索代理
func
clearSearchAction
()
{
print
(
"取消搜索代理了--"
)
// keyword = ""
// self.home_list_tbv.mj_header?.beginRefreshing()
// keyword = ""
// self.home_list_tbv.mj_header?.beginRefreshing()
}
func
searchBarTextDidEndEditing
(
_
searchBar
:
UISearchBar
)
{
print
(
"编辑即将结束了--"
)
if
keyword
.
count
>
0
{
keyword
=
searchBar
.
text
!
if
keyword
.
count
==
0
{
...
...
@@ -104,7 +107,7 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// title_str = "分销商管理"
// title_str = "分销商管理"
SetTopFrame
(
view
:
search_view
,
height
:
44
)
...
...
@@ -115,8 +118,8 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
searchV
=
searchBr
var
holder_str
=
"请输入供应商名称"
navbar
.
rightTitle
=
"新增店铺"
if
title_str
==
"分销商管理"
{
navbar
.
rightTitle
=
"新增店铺"
holder_str
=
"请输入分销商名称"
}
...
...
@@ -221,7 +224,6 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
}
}
cell
.
tag
=
indexPath
.
row
return
cell
}
...
...
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