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
74678434
Commit
74678434
authored
Nov 10, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分销分账设置查询+分销分账设置
parent
07e40e98
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
3 deletions
+58
-3
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
...ssPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
+1
-1
GeliBusinessPlatform/ViewController/分销商分账设置/DistributorSettingViewController.swift
...Controller/分销商分账设置/DistributorSettingViewController.swift
+39
-1
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+18
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
74678434
No preview for this file type
GeliBusinessPlatform/Model/get_dbt_rule_model/getDbtRuleModel.swift
View file @
74678434
...
...
@@ -12,7 +12,7 @@ import ObjectMapper
class
getDbtRuleModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
Array
<
getDbtRuleDataModel
>
?
var
data
:
getDbtRuleDataModel
?
required
init
?(
map
:
Map
)
{
...
...
GeliBusinessPlatform/ViewController/分销商分账设置/DistributorSettingViewController.swift
View file @
74678434
...
...
@@ -10,7 +10,9 @@ import UIKit
class
DistributorSettingViewController
:
BaseViewController
{
@IBOutlet
weak
var
topLbl
:
UILabel
!
var
dataM
:
getDbtRuleDataModel
?
=
nil
var
dbt_type
=
"2"
var
share_type
=
"2"
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"分销商分账设置"
...
...
@@ -21,6 +23,28 @@ class DistributorSettingViewController: BaseViewController {
make
.
top
.
equalTo
(
NavCGRect
.
height
+
20
)
make
.
left
.
equalTo
(
15
)
}
if
dataM
!=
nil
{
if
dataM
?
.
dbt_type
==
1
{
typeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
typeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
dbt_type
=
"1"
}
else
if
dataM
?
.
dbt_type
==
2
{
typeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
typeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
dbt_type
=
"2"
}
if
dataM
?
.
share_type
==
1
{
sharetypeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
sharetypeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
share_type
=
"1"
}
else
if
dataM
?
.
share_type
==
2
{
sharetypeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
sharetypeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
share_type
=
"2"
}
}
}
@IBOutlet
weak
var
typeBtn1
:
UIButton
!
...
...
@@ -30,10 +54,12 @@ class DistributorSettingViewController: BaseViewController {
if
typeBtn1
==
sender
{
typeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
typeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
dbt_type
=
"1"
}
else
if
typeBtn2
==
sender
{
typeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
typeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
dbt_type
=
"2"
}
}
...
...
@@ -44,15 +70,27 @@ class DistributorSettingViewController: BaseViewController {
if
sharetypeBtn1
==
sender
{
sharetypeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
sharetypeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
share_type
=
"1"
}
else
if
sharetypeBtn2
==
sender
{
sharetypeBtn1
.
setImage
(
UIImage
.
init
(
named
:
"daixuan"
),
for
:
.
normal
)
sharetypeBtn2
.
setImage
(
UIImage
.
init
(
named
:
"yuxuan"
),
for
:
.
normal
)
share_type
=
"2"
}
}
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
//保存
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
//分账方式 1人工结算 2自动结算 分享方式 1(1对1结算)2(1对多结算)
setDbtRule
([
"user_token"
:
UserToken
as
Any
,
"dbt_type"
:
dbt_type
as
Any
,
"commission_time"
:
"1"
as
Any
,
"share_type"
:
share_type
as
Any
])
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
}
failture
:
{
(
error
)
in
}
}
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
74678434
...
...
@@ -636,7 +636,24 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
return
case
139
:
//分销分账设置
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
//只有当其为供应商才可以进入
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
getDbtRule
([
"user_token"
:
UserToken
as
Any
])
{
(
data
)
in
let
dataM
=
data
as!
getDbtRuleModel
if
dataM
.
data
?
.
is_sup
==
1
{
HUD
.
hide
()
let
vc
=
DistributorSettingViewController
()
vc
.
dataM
=
dataM
.
data
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
HUD
.
flash
(
.
label
(
"仅供应商可使用该功能"
),
delay
:
2.0
)
}
}
failture
:
{
(
error
)
in
}
return
case
140
:
//分销订单管理
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
...
...
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