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
a55b3ec7
Commit
a55b3ec7
authored
May 15, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消选图弹簧效果
parent
9f3a4b1f
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
203 additions
and
117 deletions
+203
-117
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/SceneDelegate.swift
GeliBusinessPlatform/SceneDelegate.swift
+23
-13
GeliBusinessPlatform/View/Cell/AddImgCell.swift
GeliBusinessPlatform/View/Cell/AddImgCell.swift
+2
-1
GeliBusinessPlatform/ViewController/增值服务/ZengZhiServicesViewController.swift
...m/ViewController/增值服务/ZengZhiServicesViewController.swift
+54
-35
GeliBusinessPlatform/ViewController/寄派方式/JiPaiFangShiViewController.swift
...form/ViewController/寄派方式/JiPaiFangShiViewController.swift
+13
-9
GeliBusinessPlatform/ViewController/寄派方式/SendTimeSelectView.xib
...sinessPlatform/ViewController/寄派方式/SendTimeSelectView.xib
+26
-21
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.xib
...tform/ViewController/新增、编辑品牌/PinPaiListViewController.xib
+2
-2
GeliBusinessPlatform/ViewController/新增、编辑品牌/XinZengPinPaiViewController.swift
.../ViewController/新增、编辑品牌/XinZengPinPaiViewController.swift
+76
-23
GeliBusinessPlatform/ViewController/新增、编辑品牌/XinZengPinPaiViewController.xib
...rm/ViewController/新增、编辑品牌/XinZengPinPaiViewController.xib
+5
-11
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+2
-2
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
a55b3ec7
No preview for this file type
GeliBusinessPlatform/SceneDelegate.swift
View file @
a55b3ec7
...
...
@@ -10,13 +10,18 @@ import UIKit
import
SwiftUI
import
ESTabBarController_swift
class
SceneDelegate
:
UIResponder
,
UIWindowSceneDelegate
,
UITabBarControllerDelegate
,
loginDelegate
{
var
window
:
UIWindow
?
var
sceneC
:
UIScene
?
func
scene
(
_
scene
:
UIScene
,
willConnectTo
session
:
UISceneSession
,
options
connectionOptions
:
UIScene
.
ConnectionOptions
)
{
sceneC
=
scene
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
...
@@ -37,12 +42,16 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
}
//MARK:--loginVC
func
addLoginVc
(
isAgain
:
Bool
){
let
vc
=
LoginViewController
()
vc
.
delegate
=
self
// let vc = LoginViewController()
// vc.delegate = self
// let contentView = vc
let
vc
=
ProductDetailViewController
()
let
contentView
=
vc
//
// let vc = YingFuZhangKuanXQViewController()
// let contentView = vc
if
let
windowScene
=
sceneC
as?
UIWindowScene
{
if
isAgain
{
...
...
@@ -90,6 +99,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
tabBarController
.
selectedIndex
=
1
let
contentView
=
tabBarController
if
let
windowScene
=
sceneC
as?
UIWindowScene
{
...
...
@@ -111,11 +121,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
}
//测试代码
// if let tabBarItem = v2.tabBarItem as? ESTabBarItem {
// DispatchQueue.main.asyncAfter(deadline: .now() + 2 ) {
// tabBarItem.badgeValue = "1"
// }
// }
// if let tabBarItem = v2.tabBarItem as? ESTabBarItem {
// DispatchQueue.main.asyncAfter(deadline: .now() + 2 ) {
// tabBarItem.badgeValue = "1"
// }
// }
}
func
tabBarController
(
_
tabBarController
:
UITabBarController
,
didSelect
viewController
:
UIViewController
)
{
//添加通知,才加载数据
...
...
GeliBusinessPlatform/View/Cell/AddImgCell.swift
View file @
a55b3ec7
...
...
@@ -64,6 +64,7 @@ class AddImgCell: UITableViewCell {
if
isSingle
==
false
{
addBtn
.
isHidden
=
false
scrollView
?
.
isHidden
=
false
scrollView
?
.
bounces
=
false
if
arr
.
count
<
3
{
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
CGFloat
(
arr
.
count
)
*
105
,
height
:
h
)
...
...
@@ -71,7 +72,7 @@ class AddImgCell: UITableViewCell {
}
else
if
arr
.
count
==
5
{
addBtn
.
isHidden
=
true
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
,
height
:
h
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
30
,
height
:
h
)
}
else
{
scrollView
?
.
contentSize
=
CGSize
(
width
:
arr
.
count
*
105
,
height
:
0
)
scrollView
?
.
frame
=
CGRect
(
x
:
15
,
y
:
CGFloat
(
y
),
width
:
fullScreenWidth
-
130
,
height
:
h
)
...
...
GeliBusinessPlatform/ViewController/增值服务/ZengZhiServicesViewController.swift
View file @
a55b3ec7
...
...
@@ -9,40 +9,16 @@
import
UIKit
class
ZengZhiServicesViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndSelectCellDelegate
,
UITextViewDelegate
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
3
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
50
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelect"
)
as!
TitleAndSelectCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
titleLbl
.
text
=
titleArr
[
indexPath
.
row
]
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
(
named
:
"灰色分界线"
)
cell
.
contentView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
(
make
)
in
make
.
bottom
.
right
.
equalTo
(
0
)
make
.
left
.
equalTo
(
15
)
make
.
height
.
equalTo
(
1
)
}
return
cell
}
func
TitleAndSelectCellClick
(
content
:
UIButton
,
cell
:
TitleAndSelectCell
)
{
print
(
cell
.
tag
)
for
item
in
listView
.
visibleCells
{
let
cel
=
item
as!
TitleAndSelectCell
cel
.
selectBtn
.
isSelected
=
false
if
cel
==
cell
{
cel
.
selectBtn
.
isSelected
=
true
}
}
}
//MARK: - 数据汇总提交
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
print
(
"submit"
)
print
(
selectIdx
)
//0 送货 1 清真 2 污染
print
(
fanHuanIdx
)
//0 无签单 1 纸质 2 电子
print
(
price
)
//报价金额
print
(
commend
)
//评论
}
var
titleArr
=
[
"送货入仓"
,
"清真"
,
"易污染"
]
...
...
@@ -59,6 +35,10 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
@IBOutlet
weak
var
holderLbl
:
UILabel
!
@IBOutlet
weak
var
listView
:
UITableView
!
var
selectIdx
:
Int
?
var
fanHuanIdx
:
Int
?
var
price
:
String
=
""
var
commend
:
String
=
""
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"增值服务"
...
...
@@ -73,15 +53,39 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
listView
.
separatorStyle
=
.
none
listView
.
register
(
UINib
(
nibName
:
"TitleAndSelectCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndSelect"
)
textView
.
delegate
=
self
textView
.
text
=
commend
inputTF
.
addTarget
(
self
,
action
:
#selector(
textViewEdit(sender:)
)
,
for
:
.
allEditingEvents
)
inputTF
.
text
=
price
nBtn
.
isSelected
=
true
nBtn
.
backgroundColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
nBtn
.
layer
.
borderWidth
=
0
// Do any additional setup after loading the view.
}
//MARK: - CELL DELEGATE
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSelect"
)
as!
TitleAndSelectCell
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
titleLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
selectBtn
.
isSelected
=
false
cell
.
selectBtn
.
isUserInteractionEnabled
=
false
if
indexPath
.
row
==
selectIdx
{
cell
.
selectBtn
.
isSelected
=
true
}
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
(
named
:
"灰色分界线"
)
cell
.
contentView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
(
make
)
in
make
.
bottom
.
right
.
equalTo
(
0
)
make
.
left
.
equalTo
(
15
)
make
.
height
.
equalTo
(
1
)
}
return
cell
}
func
textViewDidChange
(
_
textView
:
UITextView
)
{
commend
=
textView
.
text
if
textView
.
text
.
count
!=
0
{
textViewHolderLbl
.
isHidden
=
true
}
else
{
...
...
@@ -97,15 +101,16 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
return
true
}
@objc
func
textViewEdit
(
sender
:
UITextView
){
if
sender
.
text
.
count
>
0
{
@objc
func
textViewEdit
(
sender
:
UITextField
){
price
=
sender
.
text
!
if
price
.
count
>
0
{
holderLbl
.
isHidden
=
true
}
else
{
holderLbl
.
isHidden
=
false
}
}
@IBAction
func
selectAction
(
_
sender
:
UIButton
)
{
fanHuanIdx
=
sender
.
tag
if
sender
==
nBtn
{
if
nBtn
.
isSelected
==
true
{
nBtn
.
isSelected
=
false
...
...
@@ -160,6 +165,20 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
eBtn
.
layer
.
borderWidth
=
0
}
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
3
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
50
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
indexPath
.
section
==
0
{
if
indexPath
.
row
<
3
{
selectIdx
=
indexPath
.
row
listView
.
reloadData
()
}
}
}
}
GeliBusinessPlatform/ViewController/寄派方式/JiPaiFangShiViewController.swift
View file @
a55b3ec7
...
...
@@ -9,15 +9,7 @@
import
UIKit
class
JiPaiFangShiViewController
:
BaseViewController
,
SendTimeSelectViewDeleagte
{
func
SendTimeSelectViewSubmit
(
date
:
String
)
{
print
(
date
)
sendTimeView
?
.
removeFromSuperview
()
sendTimeView
=
nil
}
func
SendTimeSelectViewClose
()
{
sendTimeView
?
.
removeFromSuperview
()
sendTimeView
=
nil
}
var
sendTimeView
:
SendTimeSelectView
?
@IBAction
func
selectTimeAction
(
_
sender
:
UIButton
)
{
if
sendTimeView
==
nil
{
...
...
@@ -69,6 +61,18 @@ class JiPaiFangShiViewController: BaseViewController ,SendTimeSelectViewDeleagte
masklayer
.
path
=
maskPath
.
cgPath
sender
.
layer
.
mask
=
masklayer
}
func
SendTimeSelectViewSubmit
(
date
:
String
)
{
timeLbl
.
text
=
date
sendTimeView
?
.
removeFromSuperview
()
sendTimeView
=
nil
}
func
SendTimeSelectViewClose
()
{
sendTimeView
?
.
removeFromSuperview
()
sendTimeView
=
nil
}
@IBAction
func
sendAction
(
_
sender
:
UIButton
)
{
if
sender
==
PLeftBtn
{
...
...
GeliBusinessPlatform/ViewController/寄派方式/SendTimeSelectView.xib
View file @
a55b3ec7
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"15702"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_
1
"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_
5
"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"15704"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
...
...
@@ -34,6 +34,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"50"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"579-R7-5y6"
/>
<constraint
firstAttribute=
"height"
relation=
"greaterThanOrEqual"
constant=
"50"
id=
"P5J-yc-NWK"
/>
</constraints>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"15"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
...
...
@@ -43,6 +44,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"50"
width=
"414"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"灰色分界线"
/>
<constraints>
<constraint
firstAttribute=
"height"
relation=
"greaterThanOrEqual"
constant=
"1"
id=
"4KY-Tb-OSY"
/>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"atF-8h-2ur"
/>
</constraints>
</view>
...
...
@@ -50,6 +52,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"51"
width=
"120"
height=
"260"
/>
<color
key=
"backgroundColor"
name=
"搜索框背景色"
/>
<constraints>
<constraint
firstAttribute=
"width"
relation=
"greaterThanOrEqual"
constant=
"120"
id=
"2Gn-Sa-GdX"
/>
<constraint
firstAttribute=
"width"
constant=
"120"
id=
"5Zm-SS-f0u"
/>
</constraints>
<connections>
...
...
@@ -68,28 +71,29 @@
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"JWY-Hf-Cvn"
secondAttribute=
"trailing"
id=
"0Vp-EF-sd0"
/>
<constraint
firstItem=
"Qul-rX-gAx"
firstAttribute=
"leading"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"leading"
id=
"1fY-uR-k7D"
/>
<constraint
firstItem=
"YFX-9l-JIo"
firstAttribute=
"leading"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"leading"
id=
"1yL-EO-dGc"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"QvL-x6-Nh2"
secondAttribute=
"bottom"
id=
"5ZZ-Pc-nyE"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"JWY-Hf-Cvn"
secondAttribute=
"bottom"
id=
"1um-sf-Mwx"
/>
<constraint
firstItem=
"JWY-Hf-Cvn"
firstAttribute=
"top"
secondItem=
"Qul-rX-gAx"
secondAttribute=
"bottom"
id=
"5gI-ef-LeK"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"YFX-9l-JIo"
secondAttribute=
"trailing"
id=
"6Ed-CX-uFg"
/>
<constraint
firstItem=
"JWY-Hf-Cvn"
firstAttribute=
"leading"
secondItem=
"QvL-x6-Nh2"
secondAttribute=
"trailing"
id=
"7SA-Dd-xeC"
/>
<constraint
firstItem=
"YFX-9l-JIo"
firstAttribute=
"top"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"top"
id=
"BYR-3j-sGK"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"QvL-x6-Nh2"
secondAttribute=
"bottom"
id=
"DQI-BM-FVh"
/>
<constraint
firstItem=
"Qul-rX-gAx"
firstAttribute=
"top"
secondItem=
"YFX-9l-JIo"
secondAttribute=
"bottom"
id=
"Jlg-y7-K0j"
/>
<constraint
firstItem=
"YFX-9l-JIo"
firstAttribute=
"
top"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"top"
id=
"OG5-Zp-0Z5
"
/>
<constraint
firstAttribute=
"
trailing"
secondItem=
"YFX-9l-JIo"
secondAttribute=
"trailing"
id=
"PXm-8u-5eA
"
/>
<constraint
firstAttribute=
"
height"
constant=
"311"
id=
"ekl-CL-hHJ
"
/>
<constraint
firstItem=
"YFX-9l-JIo"
firstAttribute=
"
leading"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"leading"
id=
"QJY-Fr-iuw
"
/>
<constraint
firstAttribute=
"
height"
constant=
"311"
id=
"VB8-iU-Ezo
"
/>
<constraint
firstAttribute=
"
trailing"
secondItem=
"JWY-Hf-Cvn"
secondAttribute=
"trailing"
id=
"YM2-du-wBf
"
/>
<constraint
firstItem=
"JWY-Hf-Cvn"
firstAttribute=
"top"
secondItem=
"Qul-rX-gAx"
secondAttribute=
"bottom"
id=
"elT-0f-lRU"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"JWY-Hf-Cvn"
secondAttribute=
"bottom"
id=
"gOn-Sv-tbI"
/>
<constraint
firstItem=
"QvL-x6-Nh2"
firstAttribute=
"leading"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"leading"
id=
"jCH-zG-kuW"
/>
<constraint
firstItem=
"Qul-rX-gAx"
firstAttribute=
"top"
secondItem=
"YFX-9l-JIo"
secondAttribute=
"bottom"
id=
"jnj-FA-BQZ"
/>
<constraint
firstItem=
"QvL-x6-Nh2"
firstAttribute=
"top"
secondItem=
"Qul-rX-gAx"
secondAttribute=
"bottom"
id=
"lqy-ZZ-FHd"
/>
<constraint
firstItem=
"JWY-Hf-Cvn"
firstAttribute=
"leading"
secondItem=
"QvL-x6-Nh2"
secondAttribute=
"trailing"
id=
"mqL-fT-aH2"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Qul-rX-gAx"
secondAttribute=
"trailing"
id=
"nbS-UW-E2K"
/>
<constraint
firstItem=
"QvL-x6-Nh2"
firstAttribute=
"leading"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"leading"
id=
"s7H-WP-h4P"
/>
<constraint
firstItem=
"QvL-x6-Nh2"
firstAttribute=
"top"
secondItem=
"Qul-rX-gAx"
secondAttribute=
"bottom"
id=
"qSv-5V-CBy"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Qul-rX-gAx"
secondAttribute=
"trailing"
id=
"sGq-mB-nZ0"
/>
<constraint
firstItem=
"Qul-rX-gAx"
firstAttribute=
"leading"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"leading"
id=
"vHb-om-CPV"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"QPf-cc-IOc"
customClass=
"LGButton"
customModule=
"LGButton"
>
<rect
key=
"frame"
x=
"0.0"
y=
"813"
width=
"414"
height=
"83"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"83"
id=
"QVy-lU-nMy"
/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute
type=
"color"
keyPath=
"gradientStartColor"
>
<color
key=
"value"
name=
"按钮渐变色上"
/>
...
...
@@ -100,7 +104,7 @@
<userDefinedRuntimeAttribute
type=
"boolean"
keyPath=
"gradientHorizontal"
value=
"YES"
/>
</userDefinedRuntimeAttributes>
<connections>
<action
selector=
"submitAction:"
destination=
"-1"
eventType=
"
valueChanged"
id=
"paV-fh-4L7
"
/>
<action
selector=
"submitAction:"
destination=
"-1"
eventType=
"
touchUpInside"
id=
"CHn-1k-uRE
"
/>
</connections>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
usesAttributedText=
"YES"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Dmy-0B-RQj"
>
...
...
@@ -122,19 +126,20 @@
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstItem=
"QPf-cc-IOc"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"3J2-Fj-V8Q"
/>
<constraint
firstItem=
"Pzj-OB-7vE"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
constant=
"-60"
id=
"6RX-jF-T34"
/>
<constraint
firstItem=
"Dmy-0B-RQj"
firstAttribute=
"bottom"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"bottom"
id=
"BTL-Ju-jwq"
/>
<constraint
firstItem=
"QPf-cc-IOc"
firstAttribute=
"top"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"bottom"
id=
"E3f-Jz-7zg"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Pzj-OB-7vE"
secondAttribute=
"bottom"
constant=
"-60"
id=
"FOI-0h-ESL"
/>
<constraint
firstItem=
"NDY-nX-rrQ"
firstAttribute=
"trailing"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"trailing"
id=
"Guv-tx-SDN"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"QPf-cc-IOc"
secondAttribute=
"bottom"
id=
"JHo-EP-scP"
/>
<constraint
firstItem=
"Pzj-OB-7vE"
firstAttribute=
"trailing"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"trailing"
id=
"Pai-yb-WCE"
/>
<constraint
firstItem=
"Dmy-0B-RQj"
firstAttribute=
"trailing"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"trailing"
id=
"UdG-mf-RzW"
/>
<constraint
firstItem=
"NDY-nX-rrQ"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"Vqx-6f-jh6"
/>
<constraint
firstItem=
"Pzj-OB-7vE"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"Yxv-2q-Qip"
/>
<constraint
first
Item=
"NDY-nX-rrQ"
firstAttribute=
"trailing"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"trailing"
id=
"fXf-NH-dbm
"
/>
<constraint
first
Attribute=
"trailing"
secondItem=
"QPf-cc-IOc"
secondAttribute=
"trailing"
id=
"d2c-5I-oRh
"
/>
<constraint
firstItem=
"Dmy-0B-RQj"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"mfD-mV-IdW"
/>
<constraint
firstItem=
"QPf-cc-IOc"
firstAttribute=
"trailing"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"trailing"
id=
"qgh-vO-5VB"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"QPf-cc-IOc"
secondAttribute=
"bottom"
id=
"sCY-pY-Dcu"
/>
<constraint
firstItem=
"QPf-cc-IOc"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"uMi-Hd-vIt"
/>
<constraint
firstItem=
"NDY-nX-rrQ"
firstAttribute=
"leading"
secondItem=
"vUN-kp-3ea"
secondAttribute=
"leading"
id=
"wUR-i3-vDQ"
/>
<constraint
firstItem=
"QPf-cc-IOc"
firstAttribute=
"top"
secondItem=
"NDY-nX-rrQ"
secondAttribute=
"bottom"
id=
"rd0-MU-stN"
/>
<constraint
firstItem=
"QPf-cc-IOc"
firstAttribute=
"top"
secondItem=
"Dmy-0B-RQj"
secondAttribute=
"top"
id=
"wNf-pW-PJd"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"vUN-kp-3ea"
/>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"121.875"
/>
...
...
GeliBusinessPlatform/ViewController/新增、编辑品牌/PinPaiListViewController.xib
View file @
a55b3ec7
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6096
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6086
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
...
GeliBusinessPlatform/ViewController/新增、编辑品牌/XinZengPinPaiViewController.swift
View file @
a55b3ec7
...
...
@@ -8,13 +8,20 @@
import
UIKit
import
LGButton
import
Photos
class
XinZengPinPaiViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
TitleAndBtnCellDelegate
{
class
XinZengPinPaiViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
TitleAndBtnCellDelegate
,
TitleAndTFCellDelegate
,
TilteAndTextViewCellDelegate
{
let
titleArr
=
[
"品牌名称"
,
"品牌图标"
,
"站点地址"
,
"品牌描述"
]
let
holderArr
=
[
"请输入品牌名称"
,
"0"
,
"请输入站点地址如:www.gelifood.com"
,
"0"
]
@IBOutlet
weak
var
btnTitleLbl
:
UILabel
!
@IBOutlet
weak
var
listView
:
UITableView
!
var
logoIcon
:
UIImage
?
//图片
var
pinPaiName
:
String
?
//品牌名字
var
pinPaiUrl
:
String
?
//品牌连接
var
commend
:
String
?
//品牌描述
var
navTitle
:
String
?
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -23,60 +30,106 @@ class XinZengPinPaiViewController: BaseViewController,UITableViewDataSource,UITa
navbar
.
rightTitle
=
"删除"
}
self
.
view
.
addSubview
(
navbar
)
listView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
NavCGRect
.
height
)
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
323.5
*
glscale
)
}
SetTopFrameView
(
view
:
listView
,
btmView
:
btnTitleLbl
)
listView
.
separatorStyle
=
.
none
listView
.
isScrollEnabled
=
false
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTF"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtn"
)
listView
.
register
(
UINib
(
nibName
:
"TilteAndTextViewCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TilteAndTextView"
)
// Do any additional setup after loading the view.
}
//MARK: - 删除
func
rightBtnClick
()
{
}
//MARK: - 提交
@IBAction
func
btnAction
(
_
sender
:
Any
)
{
print
(
"提交"
)
print
(
pinPaiName
)
//名字
print
(
pinPaiUrl
)
//链接
print
(
commend
)
//描述
print
(
logoIcon
)
//图片
}
//MARK: - cell delegate
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
row
==
3
{
return
173.5
*
glscale
}
return
49*
glscale
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
titleArr
.
count
}
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
print
(
content
)
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
switch
indexPath
.
row
{
case
0
,
2
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTF"
)
as!
TitleAndTFCell
cell
.
nameLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
holderArr
[
indexPath
.
row
]
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
switch
indexPath
.
row
{
case
0
:
cell
.
textTF
.
text
=
pinPaiName
break
case
2
:
cell
.
textTF
.
text
=
pinPaiUrl
break
default
:
break
}
return
cell
case
1
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtn"
)
as!
TitleAndBtnCell
cell
.
nameLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
"上传图片"
cell
.
delegate
=
self
if
logoIcon
!=
nil
{
cell
.
imgView
.
image
=
logoIcon
cell
.
imgView
.
isHidden
=
false
cell
.
contentLbl
.
isHidden
=
true
}
return
cell
default
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TilteAndTextView"
)
as!
TilteAndTextViewCell
cell
.
titleLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
holderLbl
.
text
=
"简述品牌体征。"
cell
.
textView
.
text
=
commend
cell
.
delegate
=
self
return
cell
}
}
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
if
cell
.
tag
==
0
{
pinPaiName
=
content
}
pinPaiUrl
=
content
}
func
TilteAndTextViewCellResponseStr
(
str
:
String
,
cell
:
TilteAndTextViewCell
)
{
commend
=
str
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
row
==
3
{
return
173.5
*
glscale
}
if
indexPath
.
row
==
1
{
if
logoIcon
!=
nil
{
return
100
}
}
return
49*
glscale
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
titleArr
.
count
}
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
_
=
self
.
presentHGImagePicker
(
maxSelected
:
1
)
{
(
assets
)
in
//结果处理
print
(
"共选择了
\(
assets
.
count
)
张图片,分别如下:"
)
let
option
=
PHImageRequestOptions
()
option
.
isSynchronous
=
true
option
.
isNetworkAccessAllowed
=
true
for
asset
in
assets
{
PHImageManager
.
default
()
.
requestImage
(
for
:
asset
,
targetSize
:
PHImageManagerMaximumSize
,
contentMode
:
.
default
,
options
:
option
,
resultHandler
:
{
(
image
,
_
:
[
AnyHashable
:
Any
]?)
in
// print("上传图片==\(image)")
self
.
logoIcon
=
image
})
}
self
.
listView
.
reloadData
()
}
}
}
GeliBusinessPlatform/ViewController/新增、编辑品牌/XinZengPinPaiViewController.xib
View file @
a55b3ec7
...
...
@@ -21,15 +21,8 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"plain"
separatorStyle=
"default"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"rtS-FJ-o0e"
>
<rect
key=
"frame"
x=
"0.0"
y=
"44"
width=
"414"
height=
"
323.5
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"44"
width=
"414"
height=
"
769
"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"323.5"
id=
"Iz2-Nb-wK2"
>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute
type=
"boolean"
keyPath=
"isAdaptateScreen"
value=
"YES"
/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
<connections>
<outlet
property=
"dataSource"
destination=
"-1"
id=
"fvT-jc-s0a"
/>
<outlet
property=
"delegate"
destination=
"-1"
id=
"vyl-Yl-QqR"
/>
...
...
@@ -66,13 +59,14 @@
<constraint
firstAttribute=
"bottom"
secondItem=
"bjw-OI-1k0"
secondAttribute=
"bottom"
id=
"4Tc-15-KAu"
/>
<constraint
firstItem=
"bjw-OI-1k0"
firstAttribute=
"top"
secondItem=
"Hmi-sA-ntB"
secondAttribute=
"top"
id=
"Hrg-kQ-aXC"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"bjw-OI-1k0"
secondAttribute=
"trailing"
id=
"JOQ-es-5OE"
/>
<constraint
firstItem=
"rtS-FJ-o0e"
firstAttribute=
"t
op"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"top"
id=
"Mdp-wM-HJg
"
/>
<constraint
firstItem=
"
fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"rtS-FJ-o0e"
secondAttribute=
"trailing"
id=
"QSH-9B-9Y9
"
/>
<constraint
firstItem=
"rtS-FJ-o0e"
firstAttribute=
"t
railing"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"trailing"
id=
"PEH-9j-tXD
"
/>
<constraint
firstItem=
"
rtS-FJ-o0e"
firstAttribute=
"top"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"top"
id=
"Rkf-LH-f3e
"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"Hmi-sA-ntB"
secondAttribute=
"trailing"
id=
"UaX-7R-TsW"
/>
<constraint
firstItem=
"rtS-FJ-o0e"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"crK-Dr-MCm"
/>
<constraint
firstItem=
"bjw-OI-1k0"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
id=
"eZX-P8-KwQ"
/>
<constraint
firstItem=
"Hmi-sA-ntB"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"qdx-UJ-DtF"
/>
<constraint
firstItem=
"rtS-FJ-o0e"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"tg2-Os-l99"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"bottom"
secondItem=
"Hmi-sA-ntB"
secondAttribute=
"bottom"
id=
"yeB-lK-67v"
/>
<constraint
firstItem=
"bjw-OI-1k0"
firstAttribute=
"top"
secondItem=
"rtS-FJ-o0e"
secondAttribute=
"bottom"
id=
"zj7-F2-9E2"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"fnl-2z-Ty3"
/>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"121.875"
/>
...
...
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
a55b3ec7
...
...
@@ -12,8 +12,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
var
orderId
:
Int
?
//订单编号
var
isYuShou
:
Bool
=
false
//是否预售
var
dataArr
:
NSArray
=
[
"a"
,
"b"
]
//订单产品数据
var
btmBtnsTitleArr
:
NSArray
=
[
"修改价格"
,
"打印"
,
"确认订单"
]
//底栏按钮数据
var
dataArr
:
Array
<
Any
>
=
[
"a"
,
"b"
]
//订单产品数据
var
btmBtnsTitleArr
:
Array
<
Any
>
=
[
"修改价格"
,
"打印"
,
"确认订单"
]
//底栏按钮数据
let
yuShouTitleArr
=
[
"定金:"
,
"尾款:"
,
"商品合计:"
,
"物流费用:"
,
"其它费用:"
]
let
nonYuShouTitleArr
=
[
"商品合计:"
,
"物流费用:"
,
"其它费用:"
]
...
...
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