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
cd1bdede
Commit
cd1bdede
authored
Jun 05, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复已知bug
parent
b1b8dbd2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
85 additions
and
75 deletions
+85
-75
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/AppDelegate.swift
GeliBusinessPlatform/AppDelegate.swift
+13
-22
GeliBusinessPlatform/View/Cell/AddImgCell.swift
GeliBusinessPlatform/View/Cell/AddImgCell.swift
+8
-11
GeliBusinessPlatform/View/Cell/GuanLianKeHuCell.swift
GeliBusinessPlatform/View/Cell/GuanLianKeHuCell.swift
+6
-6
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+3
-3
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
...iewController/代客下单(购物)/XuanZeShangPinViewController.swift
+20
-6
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+6
-3
GeliBusinessPlatform/ViewController/商品详情/EPViewController.xib
...BusinessPlatform/ViewController/商品详情/EPViewController.xib
+2
-0
GeliBusinessPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
...essPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
+27
-24
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
cd1bdede
No preview for this file type
GeliBusinessPlatform/AppDelegate.swift
View file @
cd1bdede
...
@@ -6,6 +6,17 @@
...
@@ -6,6 +6,17 @@
// Created by geli on 2018/6/22.
// Created by geli on 2018/6/22.
// Copyright © 2018年 geli. All rights reserved.
// Copyright © 2018年 geli. All rights reserved.
//
//
////融云账号&融云密码
////18924107259
////81338860geLI
////
////苹果账号&密码
////notice@gelifood.com
////81338860^geLi
////极光密码
////GeliFood
////81338860geLI
////
import
UIKit
import
UIKit
import
ESTabBarController_swift
import
ESTabBarController_swift
...
@@ -253,17 +264,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
...
@@ -253,17 +264,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
v3
.
tabBarItem
=
ESTabBarItem
.
init
(
ExampleBouncesContentView
(),
title
:
"工作中心"
,
image
:
UIImage
(
named
:
"tab_btn_gongzuo_nor"
),
selectedImage
:
UIImage
(
named
:
"tab_btn_gongzuo_hig"
))
v3
.
tabBarItem
=
ESTabBarItem
.
init
(
ExampleBouncesContentView
(),
title
:
"工作中心"
,
image
:
UIImage
(
named
:
"tab_btn_gongzuo_nor"
),
selectedImage
:
UIImage
(
named
:
"tab_btn_gongzuo_hig"
))
v4
.
tabBarItem
=
ESTabBarItem
.
init
(
ExampleBouncesContentView
(),
title
:
"仓库管理"
,
image
:
UIImage
(
named
:
"tab_btn_cangku_nor"
),
selectedImage
:
UIImage
(
named
:
"tab_btn_cangku_hig"
))
v4
.
tabBarItem
=
ESTabBarItem
.
init
(
ExampleBouncesContentView
(),
title
:
"仓库管理"
,
image
:
UIImage
(
named
:
"tab_btn_cangku_nor"
),
selectedImage
:
UIImage
(
named
:
"tab_btn_cangku_hig"
))
v5
.
tabBarItem
=
ESTabBarItem
.
init
(
ExampleBouncesContentView
(),
title
:
"个人中心"
,
image
:
UIImage
(
named
:
"tab_btn_geren_nor"
),
selectedImage
:
UIImage
(
named
:
"tab_btn_geren_hig"
))
v5
.
tabBarItem
=
ESTabBarItem
.
init
(
ExampleBouncesContentView
(),
title
:
"个人中心"
,
image
:
UIImage
(
named
:
"tab_btn_geren_nor"
),
selectedImage
:
UIImage
(
named
:
"tab_btn_geren_hig"
))
// Create the SwiftUI view that provides the window contents.
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
tabBarController
.
selectedIndex
=
2
tabBarController
.
selectedIndex
=
2
let
contentView
=
tabBarController
let
contentView
=
tabBarController
// if let windowScene = sceneC as? UIWindowScene {
if
isAgain
{
if
isAgain
{
let
transtition
=
CATransition
()
let
transtition
=
CATransition
()
...
@@ -293,14 +299,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
...
@@ -293,14 +299,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
//添加通知,才加载数据
//添加通知,才加载数据
print
(
viewController
)
print
(
viewController
)
}
}
}
}
////
////
//// AppDelegate.swift
//// AppDelegate.swift
//// GeliBusinessPlatform
//// GeliBusinessPlatform
...
@@ -308,17 +309,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
...
@@ -308,17 +309,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
//// Created by junye lu on 2020/4/14.
//// Created by junye lu on 2020/4/14.
//// Copyright © 2020 junye lu. All rights reserved.
//// Copyright © 2020 junye lu. All rights reserved.
////
////
////融云账号&融云密码
////18924107259
////81338860geLI
////
////苹果账号&密码
////notice@gelifood.com
////81338860^geLi
////极光密码
////GeliFood
////81338860geLI
////
//import UIKit
//import UIKit
////import RongIMKit
////import RongIMKit
//
//
...
...
GeliBusinessPlatform/View/Cell/AddImgCell.swift
View file @
cd1bdede
...
@@ -83,28 +83,25 @@ class AddImgCell: UITableViewCell {
...
@@ -83,28 +83,25 @@ class AddImgCell: UITableViewCell {
addBtn
.
isHidden
=
true
addBtn
.
isHidden
=
true
}
}
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
if
isAllEditing
{
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
CGFloat
(
arr
.
count
)
*
105
,
height
:
h
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
CGFloat
(
arr
.
count
)
*
105
,
height
:
h
)
addBtnX
.
constant
=
(
scrollView
?
.
frame
.
maxX
)
!
addBtnX
.
constant
=
(
scrollView
?
.
frame
.
maxX
)
!
}
else
{
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
30
,
height
:
h
)
}
}
else
if
arr
.
count
==
5
{
}
else
if
arr
.
count
==
5
{
addBtn
.
isHidden
=
true
addBtn
.
isHidden
=
true
if
isAllEditing
{
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
30
,
height
:
h
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
30
,
height
:
h
)
}
else
{
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
30
,
height
:
h
)
}
}
else
{
}
else
{
if
isAllEditing
{
if
isAllEditing
{
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
130
,
height
:
h
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
130
,
height
:
h
)
addBtnX
.
constant
=
fullScreenWidth
-
105
addBtnX
.
constant
=
fullScreenWidth
-
105
}
else
{
}
else
{
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
30
,
height
:
h
)
let
w
=
90
*
CGFloat
(
arr
.
count
)
+
(
CGFloat
(
arr
.
count
-
1
))
*
15
var
sw
=
w
if
w
>
(
fullScreenWidth
-
30
){
sw
=
fullScreenWidth
-
30
}
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
sw
,
height
:
h
)
}
}
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
}
}
...
...
GeliBusinessPlatform/View/Cell/GuanLianKeHuCell.swift
View file @
cd1bdede
...
@@ -7,16 +7,16 @@
...
@@ -7,16 +7,16 @@
//
//
import
UIKit
import
UIKit
@objc
protocol
GuanLianKeHuCellDelegate
{
//
@objc protocol GuanLianKeHuCellDelegate {
@objc
optional
func
btnSelect
(
sender
:
UIButton
,
cell
:
GuanLianKeHuCell
)
//
@objc optional func btnSelect(sender:UIButton,cell:GuanLianKeHuCell)
}
//
}
class
GuanLianKeHuCell
:
UITableViewCell
{
class
GuanLianKeHuCell
:
UITableViewCell
{
@IBAction
func
btnClick
(
_
sender
:
UIButton
)
{
@IBAction
func
btnClick
(
_
sender
:
UIButton
)
{
delegate
?
.
btnSelect
?(
sender
:
sender
,
cell
:
self
)
//
delegate?.btnSelect?(sender: sender,cell:self)
}
}
@IBOutlet
weak
var
imgBtn
:
UIButton
!
@IBOutlet
weak
var
imgBtn
:
UIButton
!
var
delegate
:
GuanLianKeHuCellDelegate
?
//
var delegate:GuanLianKeHuCellDelegate?
@IBOutlet
weak
var
detailLbl
:
UILabel
!
@IBOutlet
weak
var
detailLbl
:
UILabel
!
@IBOutlet
weak
var
companyLbl
:
UILabel
!
@IBOutlet
weak
var
companyLbl
:
UILabel
!
@IBOutlet
weak
var
personLbl
:
UILabel
!
@IBOutlet
weak
var
personLbl
:
UILabel
!
...
@@ -31,7 +31,7 @@ class GuanLianKeHuCell: UITableViewCell {
...
@@ -31,7 +31,7 @@ class GuanLianKeHuCell: UITableViewCell {
}
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
//
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
// Configure the view for the selected state
}
}
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
cd1bdede
...
@@ -177,7 +177,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -177,7 +177,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
cell
.
titleLbl
.
text
=
cellData
.
goods_name
cell
.
titleLbl
.
text
=
cellData
.
goods_name
cell
.
detailLbl
.
text
=
"
\(
cellData
.
spec_str
!
)
/
\(
cellData
.
unit
!
)
"
cell
.
detailLbl
.
text
=
"
\(
cellData
.
spec_str
!
)
/
\(
cellData
.
unit
!
)
"
cell
.
detailLbl2
.
text
=
"¥"
+
cellData
.
target_Price
!
+
"x
\(
cellData
.
target_Count
!
)
"
cell
.
detailLbl2
.
text
=
"¥"
+
cellData
.
target_Price
!
+
"x
\(
cellData
.
target_Count
!
)
"
let
priceStr
=
cellData
.
target_Price
as!
NSString
let
priceStr
=
cellData
.
target_Price
?
.
replacingOccurrences
(
of
:
""
,
with
:
","
)
as!
NSString
let
totalP
=
priceStr
.
floatValue
*
Float
(
cellData
.
target_Count
!
)
let
totalP
=
priceStr
.
floatValue
*
Float
(
cellData
.
target_Count
!
)
cell
.
totalPriceLbl
.
text
=
"
\(
totalP
)
"
cell
.
totalPriceLbl
.
text
=
"
\(
totalP
)
"
...
@@ -421,7 +421,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -421,7 +421,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
vc
.
djTFstr
=
djTFstr
vc
.
djTFstr
=
djTFstr
vc
.
wkTFstr
=
wkTFstr
vc
.
wkTFstr
=
wkTFstr
let
item
=
cellDataArr
[
0
];
let
item
=
cellDataArr
[
0
];
let
price
=
item
.
target_Price
as!
NSString
let
price
=
item
.
target_Price
?
.
replacingOccurrences
(
of
:
""
,
with
:
","
)
as!
NSString
let
tp
=
price
.
floatValue
*
Float
(
item
.
target_Count
!
)
let
tp
=
price
.
floatValue
*
Float
(
item
.
target_Count
!
)
vc
.
totalPrice
=
tp
vc
.
totalPrice
=
tp
vc
.
delegate
=
self
vc
.
delegate
=
self
...
@@ -578,7 +578,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -578,7 +578,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
var
pArr
:
Array
<
CGFloat
>
=
[]
var
pArr
:
Array
<
CGFloat
>
=
[]
var
totalC
:
Int
=
0
var
totalC
:
Int
=
0
for
item
in
cellDataArr
{
for
item
in
cellDataArr
{
let
price
=
item
.
target_Price
as!
NSString
let
price
=
item
.
target_Price
?
.
replacingOccurrences
(
of
:
""
,
with
:
","
)
as!
NSString
let
tp
=
price
.
floatValue
*
Float
(
item
.
target_Count
!
)
let
tp
=
price
.
floatValue
*
Float
(
item
.
target_Count
!
)
pArr
.
append
(
CGFloat
(
tp
))
pArr
.
append
(
CGFloat
(
tp
))
totalC
=
totalC
+
item
.
target_Count
!
totalC
=
totalC
+
item
.
target_Count
!
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
View file @
cd1bdede
...
@@ -30,15 +30,29 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -30,15 +30,29 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
// }
// }
// }
// }
if
barTitle
==
"修改价格"
{
if
barTitle
==
"修改价格"
let
item
=
selectArr
.
first
{
print
(
item
?
.
target_Count
)
if
selectArr
.
count
!=
0
{
delegate
?
.
XuanZeShangPinViewControllerEdit
(
selectArr
:
selectArr
)
delegate
?
.
XuanZeShangPinViewControllerEdit
(
selectArr
:
selectArr
)
}
else
{
HUD
.
flash
(
.
label
(
"请选择商品"
),
delay
:
1.2
)
return
}
}
else
{
}
else
{
if
isYuShou
{
if
isYuShou
{
delegate
?
.
XuanZeShangPinViewControllerYuShou
(
YuShouData
:
selectArr
)
if
selectArr
.
count
!=
0
{
delegate
?
.
XuanZeShangPinViewControllerYuShou
(
YuShouData
:
selectArr
)
}
else
{
HUD
.
flash
(
.
label
(
"请选择商品"
),
delay
:
1.2
)
return
}
}
else
{
}
else
{
delegate
?
.
XuanZeShangPinViewControllerSubmitAction
(
selectArr
:
selectArr
)
if
selectArr
.
count
!=
0
{
delegate
?
.
XuanZeShangPinViewControllerSubmitAction
(
selectArr
:
selectArr
)
}
else
{
HUD
.
flash
(
.
label
(
"请选择商品"
),
delay
:
1.2
)
return
}
}
}
}
}
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
cd1bdede
...
@@ -20,6 +20,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -20,6 +20,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var
delegate
:
EPViewControllerDelegate
?
var
delegate
:
EPViewControllerDelegate
?
@IBOutlet
weak
var
btmColor
:
UIView
!
@IBOutlet
weak
var
btmBtnViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
btmBtnViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
...
@@ -124,10 +125,12 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -124,10 +125,12 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
let
btn
=
UIButton
(
frame
:
CGRect
(
x
:
0
,
y
:
1
,
width
:
fullScreenWidth
,
height
:
49
))
let
btn
=
UIButton
(
frame
:
CGRect
(
x
:
0
,
y
:
1
,
width
:
fullScreenWidth
,
height
:
49
))
self
.
btmBtnBGView
.
addSubview
(
btn
)
self
.
btmBtnBGView
.
addSubview
(
btn
)
btn
.
setTitle
(
self
.
editActionArr
[
i
],
for
:
.
normal
)
btn
.
setTitle
(
self
.
editActionArr
[
i
],
for
:
.
normal
)
btn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
btn
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
13
)
btn
.
backgroundColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
btn
.
titleLabel
?
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
17
)
btn
.
addTarget
(
self
,
action
:
#selector(
self.btmBtnClick(sender:)
)
,
for
:
.
touchUpInside
)
btn
.
addTarget
(
self
,
action
:
#selector(
self.btmBtnClick(sender:)
)
,
for
:
.
touchUpInside
)
}
}
self
.
btmColor
.
backgroundColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
})
{
(
error
)
in
})
{
(
error
)
in
}
}
...
@@ -235,7 +238,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -235,7 +238,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
view
.
removeFromSuperview
()
view
.
removeFromSuperview
()
}
}
self
.
setBtmBtnUi
()
self
.
setBtmBtnUi
()
self
.
btmColor
.
backgroundColor
=
UIColor
.
white
self
.
isAllEditing
=
false
self
.
isAllEditing
=
false
self
.
listTbv
.
reloadData
()
self
.
listTbv
.
reloadData
()
self
.
delegate
?
.
EPViewControllerFinishEdit
()
self
.
delegate
?
.
EPViewControllerFinishEdit
()
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.xib
View file @
cd1bdede
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
...
@@ -12,6 +13,7 @@
...
@@ -12,6 +13,7 @@
<connections>
<connections>
<outlet
property=
"btmBtnBGView"
destination=
"H2x-8q-Enj"
id=
"zfZ-07-szf"
/>
<outlet
property=
"btmBtnBGView"
destination=
"H2x-8q-Enj"
id=
"zfZ-07-szf"
/>
<outlet
property=
"btmBtnViewH"
destination=
"zvU-A1-Wlq"
id=
"gZn-F8-1hh"
/>
<outlet
property=
"btmBtnViewH"
destination=
"zvU-A1-Wlq"
id=
"gZn-F8-1hh"
/>
<outlet
property=
"btmColor"
destination=
"8BW-ln-Nxl"
id=
"NaS-vQ-Loi"
/>
<outlet
property=
"listTbv"
destination=
"pjO-Zv-8Xp"
id=
"K9d-qK-6Qg"
/>
<outlet
property=
"listTbv"
destination=
"pjO-Zv-8Xp"
id=
"K9d-qK-6Qg"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</connections>
...
...
GeliBusinessPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
View file @
cd1bdede
...
@@ -13,11 +13,11 @@ import LGButton
...
@@ -13,11 +13,11 @@ import LGButton
protocol
GuanLianKehuVCDelegate
{
protocol
GuanLianKehuVCDelegate
{
func
GuanLianKehuSelect
(
keHuData
:
CusListAllDataModel
)
func
GuanLianKehuSelect
(
keHuData
:
CusListAllDataModel
)
}
}
class
GuanLianKehuVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
G
uanLianKeHuCellDelegate
,
G
eliAlertViewDelegate
{
class
GuanLianKehuVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GeliAlertViewDelegate
{
var
delegate
:
GuanLianKehuVCDelegate
?
var
delegate
:
GuanLianKehuVCDelegate
?
@IBOutlet
weak
var
btnLblH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
btnLblH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
btn
:
LGButton
!
@IBOutlet
weak
var
btn
:
LGButton
!
var
selectIdx
:
Int
?
=
nil
//暂代关联客户数据
var
selectIdx
:
Int
?
=
nil
//暂代关联客户数据
...
@@ -25,30 +25,36 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
...
@@ -25,30 +25,36 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
@IBAction
func
submitAction
(
_
sender
:
LGButton
)
{
@IBAction
func
submitAction
(
_
sender
:
LGButton
)
{
print
(
"确定"
)
print
(
"确定"
)
if
order_id
==
0
{
if
order_id
==
0
{
//MARK:--代客下单流程的关联客服
//MARK:--代客下单流程的关联客服
if
selectIdx
!=
nil
{
self
.
delegate
?
.
GuanLianKehuSelect
(
keHuData
:
self
.
dataArr
[
self
.
selectIdx
!
])
self
.
delegate
?
.
GuanLianKehuSelect
(
keHuData
:
self
.
dataArr
[
self
.
selectIdx
!
])
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
HUD
.
flash
(
.
label
(
"请选择关联客户"
),
delay
:
1.2
)
}
return
return
}
}
if
selectIdx
!=
nil
{
if
selectIdx
!=
nil
{
HUD
.
flash
(
.
progress
)
HUD
.
flash
(
.
progress
)
let
model
=
self
.
dataArr
[
self
.
selectIdx
!
]
let
model
=
self
.
dataArr
[
self
.
selectIdx
!
]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
bindCus
([
"cus_id"
:
model
.
cus_id
as
Any
,
"user_token"
:
UserToken
as
Any
,
"order_id"
:
order_id
as
Any
],
success
:
{
(
data
)
in
bindCus
([
"cus_id"
:
model
.
cus_id
as
Any
,
"user_token"
:
UserToken
as
Any
,
"order_id"
:
order_id
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
if
dataM
.
code
==
1
{
self
.
delegate
?
.
GuanLianKehuSelect
(
keHuData
:
self
.
dataArr
[
self
.
selectIdx
!
])
self
.
delegate
?
.
GuanLianKehuSelect
(
keHuData
:
self
.
dataArr
[
self
.
selectIdx
!
])
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
})
{
(
error
)
in
})
{
(
error
)
in
}
}
}
else
{
}
else
{
HUD
.
flash
(
.
label
(
"请选择关联客户"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择关联客户"
),
delay
:
1.2
)
}
}
...
@@ -79,7 +85,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
...
@@ -79,7 +85,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
if
self
.
dataArr
.
count
==
0
{
if
self
.
dataArr
.
count
==
0
{
self
.
btn
.
isHidden
=
true
self
.
btn
.
isHidden
=
true
self
.
btnLblH
.
constant
=
0
self
.
btnLblH
.
constant
=
0
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
tishiLbl
.
text
=
""
...
@@ -100,7 +106,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
...
@@ -100,7 +106,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
//MARK: - alertView delegate
//MARK: - alertView delegate
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
url
:
URL
?
=
URL
.
init
(
string
:
"https://cms.gelifood.com/market/"
)
let
url
:
URL
?
=
URL
.
init
(
string
:
"https://cms.gelifood.com/market/"
)
UIApplication
.
shared
.
open
(
url
!
,
options
:
[:],
completionHandler
:
nil
)
UIApplication
.
shared
.
open
(
url
!
,
options
:
[:],
completionHandler
:
nil
)
}
}
var
tableV
:
UITableView
!
var
tableV
:
UITableView
!
...
@@ -135,8 +141,11 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
...
@@ -135,8 +141,11 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GuanLianKeHuCell"
)
as!
GuanLianKeHuCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GuanLianKeHuCell"
)
as!
GuanLianKeHuCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
cell
.
imgBtn
.
isSelected
=
false
let
rowModel
=
self
.
dataArr
[
indexPath
.
row
]
let
rowModel
=
self
.
dataArr
[
indexPath
.
row
]
cell
.
senderLbl
.
text
=
rowModel
.
cus_name
cell
.
senderLbl
.
text
=
rowModel
.
cus_name
...
@@ -161,28 +170,22 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
...
@@ -161,28 +170,22 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
cell
.
imgBtn
.
isSelected
=
true
cell
.
imgBtn
.
isSelected
=
true
selectIdx
=
indexPath
.
row
selectIdx
=
indexPath
.
row
}
}
}
else
{
if
selectIdx
==
indexPath
.
row
{
cell
.
imgBtn
.
isSelected
=
true
}
}
}
return
cell
return
cell
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
print
(
indexPath
)
print
(
indexPath
)
selectIdx
=
indexPath
.
row
tableV
.
reloadData
()
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
100*
glscale
return
100*
glscale
}
}
//MARK: - GuanLianKeHuCell delegate
func
btnSelect
(
sender
:
UIButton
,
cell
:
GuanLianKeHuCell
)
{
let
cells
=
tableV
.
visibleCells
for
cel
in
cells
{
let
c
=
cel
as!
GuanLianKeHuCell
c
.
imgBtn
.
isSelected
=
false
if
c
==
cell
{
c
.
imgBtn
.
isSelected
=
true
selectIdx
=
c
.
tag
}
}
}
}
}
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