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
8875f252
Commit
8875f252
authored
5 years ago
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待调试融云
parent
7522d8a9
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
641 additions
and
116 deletions
+641
-116
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+7
-1
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/AppDelegate.swift
GeliBusinessPlatform/AppDelegate.swift
+77
-10
GeliBusinessPlatform/GeliBusinessPlatform.entitlements
GeliBusinessPlatform/GeliBusinessPlatform.entitlements
+8
-0
GeliBusinessPlatform/Info.plist
GeliBusinessPlatform/Info.plist
+1
-0
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
+15
-15
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
+2
-2
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.swift
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.swift
+13
-2
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.xib
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.xib
+10
-0
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.swift
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.swift
+1
-0
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+15
-5
GeliBusinessPlatform/ViewController/商品详情/EditProductViewController.swift
...tform/ViewController/商品详情/EditProductViewController.swift
+4
-4
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+152
-9
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+284
-48
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.xib
...tform/ViewController/新增规格/CreatNewSpecsViewController.xib
+21
-6
GeliBusinessPlatform/ViewController/新增规格/DelGuiGeCell.swift
GeliBusinessPlatform/ViewController/新增规格/DelGuiGeCell.swift
+2
-0
GeliBusinessPlatform/ViewController/新增规格/PuTongJieTiCell.swift
...usinessPlatform/ViewController/新增规格/PuTongJieTiCell.swift
+12
-2
GeliBusinessPlatform/ViewController/新增规格/PuTongJieTiCell.xib
GeliBusinessPlatform/ViewController/新增规格/PuTongJieTiCell.xib
+1
-1
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
+4
-0
GeliBusinessPlatform/ViewController/新增规格/footer/NewCreateFooter.xib
...ssPlatform/ViewController/新增规格/footer/NewCreateFooter.xib
+3
-3
GeliBusinessPlatform/ViewController/新增规格/仅新增规格header/NewCreateHeader.xib
...tform/ViewController/新增规格/仅新增规格header/NewCreateHeader.xib
+2
-2
GeliBusinessPlatform/ViewController/新增规格/普通+预售header/TitleAndSwitchHeaderView.xib
...wController/新增规格/普通+预售header/TitleAndSwitchHeaderView.xib
+3
-3
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
...atform/ViewController/新增采购单/XinCaiGouViewController.swift
+4
-3
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
8875f252
...
@@ -512,6 +512,7 @@
...
@@ -512,6 +512,7 @@
E02DDD942450106C00ABB707
/* PuTongJieTiCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
PuTongJieTiCell.xib
;
sourceTree
=
"<group>"
;
};
E02DDD942450106C00ABB707
/* PuTongJieTiCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
PuTongJieTiCell.xib
;
sourceTree
=
"<group>"
;
};
E02DDD9724501A5B00ABB707
/* DelGuiGeCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DelGuiGeCell.swift
;
sourceTree
=
"<group>"
;
};
E02DDD9724501A5B00ABB707
/* DelGuiGeCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DelGuiGeCell.swift
;
sourceTree
=
"<group>"
;
};
E02DDD9824501A5B00ABB707
/* DelGuiGeCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
DelGuiGeCell.xib
;
sourceTree
=
"<group>"
;
};
E02DDD9824501A5B00ABB707
/* DelGuiGeCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
DelGuiGeCell.xib
;
sourceTree
=
"<group>"
;
};
E02F43C1246A91C1000ECFB1
/* GeliBusinessPlatform.entitlements */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.entitlements
;
path
=
GeliBusinessPlatform.entitlements
;
sourceTree
=
"<group>"
;
};
E02FD9EA2455627300E10E27
/* ChuKuViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChuKuViewController.swift
;
sourceTree
=
"<group>"
;
};
E02FD9EA2455627300E10E27
/* ChuKuViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChuKuViewController.swift
;
sourceTree
=
"<group>"
;
};
E02FD9EB2455627300E10E27
/* ChuKuViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
ChuKuViewController.xib
;
sourceTree
=
"<group>"
;
};
E02FD9EB2455627300E10E27
/* ChuKuViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
ChuKuViewController.xib
;
sourceTree
=
"<group>"
;
};
E02FD9EF2455705F00E10E27
/* ChuRuKuJiLuCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChuRuKuJiLuCell.swift
;
sourceTree
=
"<group>"
;
};
E02FD9EF2455705F00E10E27
/* ChuRuKuJiLuCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChuRuKuJiLuCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -1086,6 +1087,7 @@
...
@@ -1086,6 +1087,7 @@
E00D85DD244561FD00F5F816
/* GeliBusinessPlatform */
=
{
E00D85DD244561FD00F5F816
/* GeliBusinessPlatform */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
E02F43C1246A91C1000ECFB1
/* GeliBusinessPlatform.entitlements */
,
E088CC882446FFA1000DAA8A
/* Other */
,
E088CC882446FFA1000DAA8A
/* Other */
,
E01C26B32446AEF800ADCC70
/* DEMO */
,
E01C26B32446AEF800ADCC70
/* DEMO */
,
E09B03B32445B19400211A51
/* Interface */
,
E09B03B32445B19400211A51
/* Interface */
,
...
@@ -1765,9 +1767,9 @@
...
@@ -1765,9 +1767,9 @@
E0F97B062451620B001BD600
/* ProductDetailViewController.swift */
,
E0F97B062451620B001BD600
/* ProductDetailViewController.swift */
,
E0F97B072451620B001BD600
/* ProductDetailViewController.xib */
,
E0F97B072451620B001BD600
/* ProductDetailViewController.xib */
,
E0647ABF2468E30B008C5A34
/* EditProductViewController.swift */
,
E0647ABF2468E30B008C5A34
/* EditProductViewController.swift */
,
E0647AC02468E30B008C5A34
/* EditProductViewController.xib */
,
E0F1BE4A24692F07003015B2
/* EditProductImgCell.swift */
,
E0F1BE4A24692F07003015B2
/* EditProductImgCell.swift */
,
E0F1BE4B24692F07003015B2
/* EditProductImgCell.xib */
,
E0F1BE4B24692F07003015B2
/* EditProductImgCell.xib */
,
E0647AC02468E30B008C5A34
/* EditProductViewController.xib */
,
E0F1BE4624692379003015B2
/* ItemCell.swift */
,
E0F1BE4624692379003015B2
/* ItemCell.swift */
,
E0F1BE4724692379003015B2
/* ItemCell.xib */
,
E0F1BE4724692379003015B2
/* ItemCell.xib */
,
);
);
...
@@ -3002,6 +3004,7 @@
...
@@ -3002,6 +3004,7 @@
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
GeliBusinessPlatform/GeliBusinessPlatform.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_ASSET_PATHS
=
"\"GeliBusinessPlatform/Preview Content\""
;
DEVELOPMENT_ASSET_PATHS
=
"\"GeliBusinessPlatform/Preview Content\""
;
DEVELOPMENT_TEAM
=
K48346UACH
;
DEVELOPMENT_TEAM
=
K48346UACH
;
...
@@ -3022,6 +3025,7 @@
...
@@ -3022,6 +3025,7 @@
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
GeliBusinessPlatform.GeliBusinessPlatform
;
PRODUCT_BUNDLE_IDENTIFIER
=
GeliBusinessPlatform.GeliBusinessPlatform
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
"SWIFT_OBJC_BRIDGING_HEADER[arch=*]"
=
"$(SRCROOT)/GeliBusinessPlatform/Define/Bridge_Header.h"
;
"SWIFT_OBJC_BRIDGING_HEADER[arch=*]"
=
"$(SRCROOT)/GeliBusinessPlatform/Define/Bridge_Header.h"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_VERSION
=
5.0
;
SWIFT_VERSION
=
5.0
;
...
@@ -3035,6 +3039,7 @@
...
@@ -3035,6 +3039,7 @@
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
GeliBusinessPlatform/GeliBusinessPlatform.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_ASSET_PATHS
=
"\"GeliBusinessPlatform/Preview Content\""
;
DEVELOPMENT_ASSET_PATHS
=
"\"GeliBusinessPlatform/Preview Content\""
;
DEVELOPMENT_TEAM
=
K48346UACH
;
DEVELOPMENT_TEAM
=
K48346UACH
;
...
@@ -3055,6 +3060,7 @@
...
@@ -3055,6 +3060,7 @@
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
GeliBusinessPlatform.GeliBusinessPlatform
;
PRODUCT_BUNDLE_IDENTIFIER
=
GeliBusinessPlatform.GeliBusinessPlatform
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
SWIFT_VERSION
=
5.0
;
SWIFT_VERSION
=
5.0
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
};
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
8875f252
No preview for this file type
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/AppDelegate.swift
View file @
8875f252
...
@@ -7,16 +7,63 @@
...
@@ -7,16 +7,63 @@
//
//
import
UIKit
import
UIKit
import
RongIMKit
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
RCConnectionStatusChangeDelegate
,
RCIMClientReceiveMessageDelegate
,
UNUserNotificationCenterDelegate
{
func
onReceived
(
_
message
:
RCMessage
!
,
left
nLeft
:
Int32
,
object
:
Any
!
)
{
print
(
"message == "
,
message
.
content
)
}
func
onConnectionStatusChanged
(
_
status
:
RCConnectionStatus
)
{
print
(
"changed == "
,
status
.
rawValue
)
}
func
onReceived
(
_
message
:
RCMessage
!
,
left
nLeft
:
Int32
,
object
:
Any
!
,
offline
:
Bool
,
hasPackage
:
Bool
)
{
print
(
"onReceived == "
,
message
.
content
)
}
var
RY_App_Key
=
"3argexb63sxae"
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
// Override point for customization after application launch.
RCIM
.
shared
()?
.
initWithAppKey
(
RY_App_Key
)
registerNotification
(
application
)
RCIMClient
.
shared
()?
.
connect
(
withToken
:
"SMJo9B9AUTIHHcHCuZq8soPnFqzfPZJIh7xoVOlRtu8=@ta3m.cn.rongnav.com;ta3m.cn.rongcfg.com"
,
success
:
{
(
userId
)
in
print
(
"userid =
\(
userId
)
"
)
},
error
:
{
(
status
)
in
print
(
"status =
\(
status
)
"
)
},
tokenIncorrect
:
{
print
(
"错误"
)
})
RCIMClient
.
shared
()?
.
setRCConnectionStatusChangeDelegate
(
self
)
RCIMClient
.
shared
()?
.
setReceiveMessageDelegate
(
self
,
object
:
nil
)
return
true
return
true
}
}
func
application
(
_
application
:
UIApplication
,
didRegister
notificationSettings
:
UIUserNotificationSettings
)
{
application
.
registerForRemoteNotifications
()
}
func
application
(
_
application
:
UIApplication
,
didRegisterForRemoteNotificationsWithDeviceToken
deviceToken
:
Data
)
{
let
nsdataStr
=
NSData
(
data
:
deviceToken
)
let
datastr
=
nsdataStr
.
description
.
replacingOccurrences
(
of
:
"<"
,
with
:
""
)
.
replacingOccurrences
(
of
:
">"
,
with
:
""
)
.
replacingOccurrences
(
of
:
" "
,
with
:
""
)
print
(
"deviceToken:
\(
datastr
)
"
)
RCIMClient
.
shared
()?
.
setDeviceToken
(
datastr
)
}
func
application
(
_
application
:
UIApplication
,
didFailToRegisterForRemoteNotificationsWithError
error
:
Error
)
{
//TODO: 注册失败后的结果, 可以在这里记录失败结果, 以后再伺机弹框给用户打开通知
print
(
"错误=== "
,
error
)
}
// MARK: UISceneSession Lifecycle
// MARK: UISceneSession Lifecycle
...
@@ -26,12 +73,32 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -26,12 +73,32 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return
UISceneConfiguration
(
name
:
"Default Configuration"
,
sessionRole
:
connectingSceneSession
.
role
)
return
UISceneConfiguration
(
name
:
"Default Configuration"
,
sessionRole
:
connectingSceneSession
.
role
)
}
}
func
application
(
_
application
:
UIApplication
,
didDiscardSceneSessions
sceneSessions
:
Set
<
UISceneSession
>
)
{
func
application
(
_
application
:
UIApplication
,
didDiscardSceneSessions
sceneSessions
:
Set
<
UISceneSession
>
)
{
// Called when the user discards a scene session.
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
}
extension
AppDelegate
{
func
registerNotification
(
_
application
:
UIApplication
)
{
if
#available(iOS 10.0, *)
{
let
center
=
UNUserNotificationCenter
.
current
()
center
.
delegate
=
self
center
.
requestAuthorization
(
options
:
[
.
alert
,
.
sound
,
.
badge
])
{
(
granted
:
Bool
,
error
:
Error
?)
in
DispatchQueue
.
main
.
async
{
if
granted
{
application
.
registerForRemoteNotifications
()
}
}
}
}
else
{
let
settings
=
UIUserNotificationSettings
(
types
:
[
.
alert
,
.
sound
,
.
badge
],
categories
:
nil
)
application
.
registerForRemoteNotifications
()
application
.
registerUserNotificationSettings
(
settings
)
}
}
}
}
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/GeliBusinessPlatform.entitlements
0 → 100644
View file @
8875f252
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
aps-environment
</key>
<string>
development
</string>
</dict>
</plist>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Info.plist
View file @
8875f252
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
<key>
UIBackgroundModes
</key>
<key>
UIBackgroundModes
</key>
<array>
<array>
<string>
location
</string>
<string>
location
</string>
<string>
remote-notification
</string>
</array>
</array>
<key>
UILaunchStoryboardName
</key>
<key>
UILaunchStoryboardName
</key>
<string>
LaunchScreen
</string>
<string>
LaunchScreen
</string>
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/AlertView/GLAlertSelectView.swift
View file @
8875f252
...
@@ -10,7 +10,7 @@ import UIKit
...
@@ -10,7 +10,7 @@ import UIKit
import
IQKeyboardManagerSwift
import
IQKeyboardManagerSwift
@objc
protocol
GLAlertSelectViewDelegate
{
@objc
protocol
GLAlertSelectViewDelegate
{
@objc
optional
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
UIView
)
@objc
optional
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UIView
)
@objc
optional
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
@objc
optional
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
@objc
optional
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
@objc
optional
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
...
@@ -23,17 +23,10 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -23,17 +23,10 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
var
contentView
:
UIView
!
var
contentView
:
UIView
!
var
delegate
:
GLAlertSelectViewDelegate
?
var
delegate
:
GLAlertSelectViewDelegate
?
var
inputTextTF
:
UITextField
?
var
inputTextTF
:
UITextField
?
var
isMultipleSelect
:
Bool
?
var
selectArray
:
NSMutableArray
?
var
selectArray
:
NSMutableArray
?
var
selectNum
:
Int
=
99
var
selectNum
:
String
?
=
""
var
dataArr
=
Array
<
String
>
(){
var
dataArr
=
Array
<
String
>
(){
didSet
{
didSet
{
if
isMultipleSelect
==
true
{
selectArray
=
NSMutableArray
(
capacity
:
10
)
for
_
in
0
..<
dataArr
.
count
{
selectArray
?
.
add
(
"99"
)
}
}
var
tbvH
=
CGFloat
(
dataArr
.
count
*
49
)
var
tbvH
=
CGFloat
(
dataArr
.
count
*
49
)
if
tbvH
>
fullScreenHeight
*
0.6
{
if
tbvH
>
fullScreenHeight
*
0.6
{
tbvH
=
fullScreenHeight
*
0.6
tbvH
=
fullScreenHeight
*
0.6
...
@@ -142,21 +135,30 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -142,21 +135,30 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
cell
.
nameLbl
.
text
=
dataArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
dataArr
[
indexPath
.
row
]
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"selectTbvCell"
)
as!
TitleAndSelectCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"selectTbvCell"
)
as!
TitleAndSelectCell
cell
.
titleLbl
.
text
=
dataArr
[
indexPath
.
row
]
cell
.
titleLbl
.
text
=
dataArr
[
indexPath
.
row
]
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
for
item
in
selectArray
!
{
let
row
=
"
\(
item
)
"
as!
NSString
if
row
.
integerValue
==
indexPath
.
row
{
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
selectBtn
.
isSelected
=
true
}
}
return
cell
return
cell
}
}
@IBAction
func
submitClick
(
_
sender
:
Any
)
{
@IBAction
func
submitClick
(
_
sender
:
Any
)
{
if
(
titleLbl
.
text
?
.
contains
(
"库位"
))
!
{
if
(
titleLbl
.
text
?
.
contains
(
"库位"
))
!
{
}
else
{
}
else
{
if
isMultipleSelect
==
false
{
if
selectNum
!.
count
>
0
{
delegate
?
.
GLAlertSelectViewClick
?(
selectNum
:
selectNum
,
view
:
self
)
delegate
?
.
GLAlertSelectViewClick
?(
selectNum
:
selectNum
as!
NSString
,
view
:
self
)
}
else
{
}
else
{
delegate
?
.
GLAlertMoreSelectViewClick
?(
sender
:
selectArray
!
,
view
:
self
)
delegate
?
.
GLAlertMoreSelectViewClick
?(
sender
:
selectArray
!
,
view
:
self
)
}
}
}
}
...
@@ -164,17 +166,16 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -164,17 +166,16 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
//MARK: - 自定义CELL DELEGATE
//MARK: - 自定义CELL DELEGATE
//普通
//普通
func
TitleAndSelectCellClick
(
content
:
UIButton
,
cell
:
TitleAndSelectCell
)
{
func
TitleAndSelectCellClick
(
content
:
UIButton
,
cell
:
TitleAndSelectCell
)
{
if
isMultipleSelect
==
false
{
if
selectNum
!.
count
>
0
{
for
item
in
selectTbv
.
visibleCells
{
for
item
in
selectTbv
.
visibleCells
{
let
cel
=
item
as!
TitleAndSelectCell
let
cel
=
item
as!
TitleAndSelectCell
cel
.
selectBtn
.
isSelected
=
false
cel
.
selectBtn
.
isSelected
=
false
if
cell
==
cel
{
if
cell
==
cel
{
cell
.
selectBtn
.
isSelected
=
true
cell
.
selectBtn
.
isSelected
=
true
selectNum
=
cell
.
tag
selectNum
=
"
\(
cell
.
tag
)
"
}
}
}
}
}
else
{
}
else
{
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
""
)
cell
.
titleLbl
.
textColor
=
UIColor
(
named
:
""
)
if
cell
.
selectBtn
.
isSelected
==
true
{
if
cell
.
selectBtn
.
isSelected
==
true
{
cell
.
selectBtn
.
isSelected
=
false
cell
.
selectBtn
.
isSelected
=
false
...
@@ -185,7 +186,6 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
...
@@ -185,7 +186,6 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
cell
.
selectBtn
.
isSelected
=
true
cell
.
selectBtn
.
isSelected
=
true
selectArray
!.
replaceObject
(
at
:
cell
.
tag
,
with
:
cell
.
tag
)
selectArray
!.
replaceObject
(
at
:
cell
.
tag
,
with
:
cell
.
tag
)
}
}
// delegate?.GLAlertMoreSelectViewClick?(sender: selectArray!, cell: cell)
}
}
}
}
//库位
//库位
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
View file @
8875f252
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<constraint
firstAttribute=
"height"
constant=
"52"
id=
"jMA-bb-CP8"
/>
<constraint
firstAttribute=
"height"
constant=
"52"
id=
"jMA-bb-CP8"
/>
<constraint
firstAttribute=
"width"
constant=
"78"
id=
"zxB-d3-CDh"
/>
<constraint
firstAttribute=
"width"
constant=
"78"
id=
"zxB-d3-CDh"
/>
</constraints>
</constraints>
<state
key=
"normal"
image=
"xinzeng
"
/>
<state
key=
"normal"
image=
"xinzeng"
/>
<connections>
<connections>
<action
selector=
"btnClick:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"f2z-zc-fd6"
/>
<action
selector=
"btnClick:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"f2z-zc-fd6"
/>
</connections>
</connections>
...
@@ -41,6 +41,6 @@
...
@@ -41,6 +41,6 @@
</tableViewCell>
</tableViewCell>
</objects>
</objects>
<resources>
<resources>
<image
name=
"xinzeng
"
width=
"78"
height=
"51.5"
/>
<image
name=
"xinzeng"
width=
"78"
height=
"51.5"
/>
</resources>
</resources>
</document>
</document>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.swift
View file @
8875f252
...
@@ -7,9 +7,20 @@
...
@@ -7,9 +7,20 @@
//
//
import
UIKit
import
UIKit
@objc
protocol
ShangPinGguiGeCellDelegate
{
@objc
optional
func
ShangPinGguiGeCellEditAction
(
cell
:
ShangPinGguiGeCell
)
}
class
ShangPinGguiGeCell
:
UITableViewCell
{
class
ShangPinGguiGeCell
:
UITableViewCell
{
var
delegate
:
ShangPinGguiGeCellDelegate
?
@IBAction
func
editAction
(
_
sender
:
Any
)
{
delegate
?
.
ShangPinGguiGeCellEditAction
?(
cell
:
self
)
}
// var itemIdx:Int?
@IBOutlet
weak
var
tempLbl
:
UILabel
!
@IBOutlet
weak
var
weightLbl
:
UILabel
!
@IBOutlet
weak
var
guiGeLbl
:
UILabel
!
@IBOutlet
weak
var
danWeiLbl
:
UILabel
!
@IBOutlet
weak
var
sellPriceLbl
:
UILabel
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
selectionStyle
=
.
none
selectionStyle
=
.
none
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.xib
View file @
8875f252
...
@@ -85,6 +85,9 @@
...
@@ -85,6 +85,9 @@
<state
key=
"normal"
title=
"编辑规格"
>
<state
key=
"normal"
title=
"编辑规格"
>
<color
key=
"titleColor"
name=
"蓝色字体颜色"
/>
<color
key=
"titleColor"
name=
"蓝色字体颜色"
/>
</state>
</state>
<connections>
<action
selector=
"editAction:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"NUZ-aA-T5Q"
/>
</connections>
</button>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"K2a-dA-ghw"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"K2a-dA-ghw"
>
<rect
key=
"frame"
x=
"187"
y=
"14.5"
width=
"1"
height=
"20"
/>
<rect
key=
"frame"
x=
"187"
y=
"14.5"
width=
"1"
height=
"20"
/>
...
@@ -145,6 +148,13 @@
...
@@ -145,6 +148,13 @@
</constraints>
</constraints>
</tableViewCellContentView>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"danWeiLbl"
destination=
"oOy-dE-JIB"
id=
"Dw6-Zt-80o"
/>
<outlet
property=
"guiGeLbl"
destination=
"GPm-DS-HCD"
id=
"ePF-lx-scy"
/>
<outlet
property=
"sellPriceLbl"
destination=
"Mw0-dB-6KQ"
id=
"ofk-s2-w0v"
/>
<outlet
property=
"tempLbl"
destination=
"bIm-PK-kvk"
id=
"QrY-UP-WZk"
/>
<outlet
property=
"weightLbl"
destination=
"EeX-7S-sb3"
id=
"bkH-WA-6Wt"
/>
</connections>
<point
key=
"canvasLocation"
x=
"131.15942028985509"
y=
"121.875"
/>
<point
key=
"canvasLocation"
x=
"131.15942028985509"
y=
"121.875"
/>
</tableViewCell>
</tableViewCell>
</objects>
</objects>
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/Cell/TitleAndSwitchCell.swift
View file @
8875f252
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
import
UIKit
import
UIKit
@objc
protocol
TitleAndSwitchCellDelegate
{
@objc
protocol
TitleAndSwitchCellDelegate
{
@objc
optional
func
switchClick
(
content
:
UISwitch
,
cell
:
TitleAndSwitchCell
)
@objc
optional
func
switchClick
(
content
:
UISwitch
,
cell
:
TitleAndSwitchCell
)
}
}
class
TitleAndSwitchCell
:
UITableViewCell
{
class
TitleAndSwitchCell
:
UITableViewCell
{
var
delegate
:
TitleAndSwitchCellDelegate
?
var
delegate
:
TitleAndSwitchCellDelegate
?
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
8875f252
...
@@ -10,6 +10,8 @@ import UIKit
...
@@ -10,6 +10,8 @@ import UIKit
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
{
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
{
var
orderType
=
"99"
//订单类型
var
glSelectView
:
GLAlertSelectView
?
=
nil
var
glSelectView
:
GLAlertSelectView
?
=
nil
var
holderArr
=
[
"未支付"
,
"未付款"
,
"自提"
,
"暂不出库"
,
"0"
,
"0"
]
var
holderArr
=
[
"未支付"
,
"未付款"
,
"自提"
,
"暂不出库"
,
"0"
,
"0"
]
let
p3Arr
=
[
"支付状态"
,
"支付方式"
,
"提货方式"
,
"出货状态"
,
"运费"
,
"其他费用"
]
let
p3Arr
=
[
"支付状态"
,
"支付方式"
,
"提货方式"
,
"出货状态"
,
"运费"
,
"其他费用"
]
...
@@ -114,6 +116,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -114,6 +116,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
}
}
return
49
return
49
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
switch
indexPath
.
section
{
switch
indexPath
.
section
{
case
0
:
case
0
:
...
@@ -123,7 +126,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -123,7 +126,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
}
else
{
}
else
{
if
glSelectView
==
nil
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
isMultipleSelect
=
false
//是否多选
// view.isMultipleSelect = false//是否多选
view
.
selectNum
=
orderType
view
.
delegate
=
self
view
.
delegate
=
self
view
.
titleLbl
.
text
=
"请选择订单类型"
view
.
titleLbl
.
text
=
"请选择订单类型"
view
.
dataArr
=
[
"普通订单"
,
"预售下单"
]
view
.
dataArr
=
[
"普通订单"
,
"预售下单"
]
...
@@ -138,27 +142,33 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -138,27 +142,33 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
break
break
}
}
}
}
var
zhiFuType
=
"99"
var
zhiFuWay
=
"99"
var
tiHuoWay
=
"99"
var
chuHuoWay
=
"99"
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
if
glSelectView
==
nil
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
isMultipleSelect
=
false
//是否多选
//
view.isMultipleSelect = false//是否多选
view
.
delegate
=
self
view
.
delegate
=
self
switch
cell
.
tag
{
switch
cell
.
tag
{
case
0
:
//支付状态
case
0
:
//支付状态
view
.
selectNum
=
zhiFuType
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
break
break
case
1
:
//支付方式
case
1
:
//支付方式
view
.
selectNum
=
zhiFuWay
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
break
break
case
2
:
//提货方式
case
2
:
//提货方式
view
.
selectNum
=
tiHuoWay
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
break
break
default
:
//出货状态
default
:
//出货状态
view
.
selectNum
=
chuHuoWay
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
titleLbl
.
text
=
"请选择
\(
p3Arr
[
cell
.
tag
]
)
"
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
break
break
...
@@ -168,7 +178,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -168,7 +178,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
glSelectView
=
view
glSelectView
=
view
}
}
}
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
UIView
)
{
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UIView
)
{
print
(
"单选"
,
selectNum
)
print
(
"单选"
,
selectNum
)
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/商品详情/EditProductViewController.swift
View file @
8875f252
...
@@ -11,10 +11,10 @@ import UIKit
...
@@ -11,10 +11,10 @@ import UIKit
class
EditProductViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
class
EditProductViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
var
layout
=
UICollectionViewFlowLayout
()
var
isEdit
:
Bool
=
false
var
isEdit
:
Bool
=
false
var
selectIdx
:
IndexPath
=
IndexPath
(
item
:
0
,
section
:
0
)
var
selectIdx
:
IndexPath
=
IndexPath
(
item
:
0
,
section
:
0
)
var
layout
=
UICollectionViewFlowLayout
()
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
btmView
:
UIView
!
@IBOutlet
weak
var
btmView
:
UIView
!
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
...
@@ -136,7 +136,7 @@ class EditProductViewController: BaseViewController,UITableViewDelegate,UITableV
...
@@ -136,7 +136,7 @@ class EditProductViewController: BaseViewController,UITableViewDelegate,UITableV
}
}
let
collectionView
=
UICollectionView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
),
collectionViewLayout
:
layout
)
let
collectionView
=
UICollectionView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
),
collectionViewLayout
:
layout
)
collectionView
.
backgroundColor
=
UIColor
.
red
collectionView
.
backgroundColor
=
UIColor
.
white
collectionView
.
delegate
=
self
collectionView
.
delegate
=
self
collectionView
.
dataSource
=
self
collectionView
.
dataSource
=
self
view
.
addSubview
(
collectionView
)
view
.
addSubview
(
collectionView
)
...
@@ -174,7 +174,7 @@ class EditProductViewController: BaseViewController,UITableViewDelegate,UITableV
...
@@ -174,7 +174,7 @@ class EditProductViewController: BaseViewController,UITableViewDelegate,UITableV
return
0
return
0
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
4
return
3
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
8875f252
...
@@ -10,8 +10,10 @@ import UIKit
...
@@ -10,8 +10,10 @@ import UIKit
import
LGButton
import
LGButton
import
Photos
import
Photos
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CommendCellDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
{
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CommendCellDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
{
var
selectIdx
:
IndexPath
?
var
layout
=
UICollectionViewFlowLayout
()
var
glSelectView
:
GLAlertSelectView
?
var
glSelectView
:
GLAlertSelectView
?
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
let
titleArr
=
[
"商品信息"
,
"商品图片"
,
"商品规格"
,
"预售设置"
,
"其它信息"
,
"商品详情"
]
let
spxxArr
=
[
"商品名称"
,
"商品类型"
,
"商品分类"
,
"品牌"
,
"起卖数量"
,
"是否清真"
,
"是否询价"
]
let
spxxArr
=
[
"商品名称"
,
"商品类型"
,
"商品分类"
,
"品牌"
,
"起卖数量"
,
"是否清真"
,
"是否询价"
]
...
@@ -32,7 +34,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -32,7 +34,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var
cellHeight
=
18.5
var
cellHeight
=
18.5
var
contentStr
:
String
=
""
var
contentStr
:
String
=
""
var
guiGeArr
:
Array
<
Any
>
=
[]
//根据规格资料数量控制右上角新增按钮是否显示
var
guiGeArr
:
NSMutableArray
=
[]
//根据规格资料数量控制右上角新增按钮是否显示
//
//
@IBOutlet
weak
var
lgBtnLbl
:
UILabel
!
@IBOutlet
weak
var
lgBtnLbl
:
UILabel
!
@IBOutlet
weak
var
btmView
:
UIView
!
@IBOutlet
weak
var
btmView
:
UIView
!
...
@@ -74,6 +76,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -74,6 +76,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
listTbv
.
register
(
UINib
(
nibName
:
"AddGuiGeCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"AddGuiGe"
)
listTbv
.
register
(
UINib
(
nibName
:
"AddGuiGeCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"AddGuiGe"
)
listTbv
.
register
(
UINib
(
nibName
:
"CommendCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"Commend"
)
listTbv
.
register
(
UINib
(
nibName
:
"CommendCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"Commend"
)
listTbv
.
register
(
UINib
(
nibName
:
"YuShouWeiKuanFaHuoCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"YuShouWeiKuanFaHuoCell"
)
listTbv
.
register
(
UINib
(
nibName
:
"YuShouWeiKuanFaHuoCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"YuShouWeiKuanFaHuoCell"
)
listTbv
.
register
(
UINib
(
nibName
:
"ShangPinGguiGeCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"ShangPinGguiGeCell"
)
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
}
}
//MARK: - cell delegate
//MARK: - cell delegate
...
@@ -104,6 +107,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -104,6 +107,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
if
indexPath
.
row
>
4
{
if
indexPath
.
row
>
4
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSwitch"
)
as!
TitleAndSwitchCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSwitch"
)
as!
TitleAndSwitchCell
cell
.
delegate
=
self
cell
.
namelbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
namelbl
.
text
=
spxxArr
[
indexPath
.
row
]
return
cell
return
cell
}
}
...
@@ -129,14 +133,35 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -129,14 +133,35 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
addBtn
.
tag
=
indexPath
.
row
cell
.
addBtn
.
tag
=
indexPath
.
row
return
cell
return
cell
case
2
:
case
2
:
if
guiGeArr
.
count
>
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"ShangPinGguiGeCell"
)
as!
ShangPinGguiGeCell
cell
.
delegate
=
self
var
dict
:
NSDictionary
!
if
selectIdx
!=
nil
{
dict
=
guiGeArr
[
selectIdx
!.
item
]
as!
NSDictionary
}
else
{
dict
=
guiGeArr
.
firstObject
as!
NSDictionary
}
print
(
selectIdx
?
.
item
)
cell
.
tempLbl
.
text
=
"冷藏:
\(
String
(
describing
:
dict
[
"wenDu"
]
!
)
)
℃"
cell
.
weightLbl
.
text
=
"重量(kg):
\(
String
(
describing
:
dict
[
"weight"
]
!
)
)
kg"
cell
.
guiGeLbl
.
text
=
"规格:
\(
String
(
describing
:
dict
[
"guiGe"
]
!
)
)
kg/件"
cell
.
danWeiLbl
.
text
=
"单位:
\(
String
(
describing
:
dict
[
"danWei"
]
!
)
)
"
cell
.
sellPriceLbl
.
text
=
"售价:¥
\(
dict
[
"price"
]
!
)
"
// cell.itemIdx = dict["itemIdx"] as! Int
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"AddGuiGe"
)
as!
AddGuiGeCell
cell
.
imgBtn
.
addTarget
(
self
,
action
:
#selector(
addGuiGe
)
,
for
:
.
touchUpInside
)
cell
.
imgBtn
.
addTarget
(
self
,
action
:
#selector(
addGuiGe
)
,
for
:
.
touchUpInside
)
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"xinzeng"
),
for
:
.
normal
)
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"xinzeng"
),
for
:
.
normal
)
return
cell
return
cell
case
3
:
case
3
:
if
indexPath
.
row
==
0
{
if
indexPath
.
row
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSwitch"
)
as!
TitleAndSwitchCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndSwitch"
)
as!
TitleAndSwitchCell
cell
.
namelbl
.
text
=
ysszArr
[
indexPath
.
row
]
cell
.
namelbl
.
text
=
ysszArr
[
indexPath
.
row
]
cell
.
delegate
=
self
return
cell
return
cell
}
}
if
indexPath
.
row
==
3
{
if
indexPath
.
row
==
3
{
...
@@ -190,7 +215,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -190,7 +215,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
switch
indexPath
.
section
{
switch
indexPath
.
section
{
case
0
:
return
49
case
0
:
return
49
case
1
:
return
148.5
case
1
:
return
148.5
case
2
:
return
123.5
case
2
:
if
guiGeArr
.
count
>
0
{
return
146
}
return
123.5
case
3
:
case
3
:
if
isYuShouShangPin
==
false
{
if
isYuShouShangPin
==
false
{
return
0.01
return
0.01
...
@@ -224,7 +253,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -224,7 +253,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
btn
.
setTitle
(
" 新增"
,
for
:
.
normal
)
btn
.
setTitle
(
" 新增"
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
btn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
btn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
btn
.
setImage
(
UIImage
(
named
:
"
编组
"
),
for
:
.
normal
)
btn
.
setImage
(
UIImage
(
named
:
"
jiahaoXG
"
),
for
:
.
normal
)
view
.
addSubview
(
btn
)
view
.
addSubview
(
btn
)
btn
.
sizeToFit
()
btn
.
sizeToFit
()
btn
.
snp
.
makeConstraints
{
(
make
)
in
btn
.
snp
.
makeConstraints
{
(
make
)
in
...
@@ -234,12 +263,31 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -234,12 +263,31 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
make
.
width
.
equalTo
(
btn
.
frame
.
size
.
width
)
make
.
width
.
equalTo
(
btn
.
frame
.
size
.
width
)
}
}
let
btn2
=
UIButton
()
let
btn2
=
UIButton
()
btn2
.
backgroundColor
=
UIColor
.
black
view
.
addSubview
(
btn2
)
view
.
addSubview
(
btn2
)
btn2
.
snp
.
makeConstraints
{
(
make
)
in
btn2
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
right
.
bottom
.
equalTo
(
0
)
make
.
top
.
right
.
bottom
.
equalTo
(
0
)
make
.
width
.
equalTo
(
80
)
make
.
width
.
equalTo
(
80
)
}
}
btn2
.
addTarget
(
self
,
action
:
#selector(
addGuiGe
)
,
for
:
.
touchUpInside
)
if
guiGeArr
.
count
>
1
{
view
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
80
)
let
collectionView
=
UICollectionView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
),
collectionViewLayout
:
layout
)
collectionView
.
backgroundColor
=
UIColor
.
white
collectionView
.
delegate
=
self
collectionView
.
dataSource
=
self
view
.
addSubview
(
collectionView
)
collectionView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
bottom
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
41
)
}
collectionView
.
showsHorizontalScrollIndicator
=
false
collectionView
.
isPagingEnabled
=
true
layout
.
itemSize
=
CGSize
(
width
:
fullScreenWidth
*
0.5
,
height
:
41
)
layout
.
scrollDirection
=
.
horizontal
collectionView
.
collectionViewLayout
=
layout
collectionView
.
register
(
UINib
(
nibName
:
"ItemCell"
,
bundle
:
nil
),
forCellWithReuseIdentifier
:
"ItemCell"
)
collectionView
.
selectItem
(
at
:
selectIdx
,
animated
:
false
,
scrollPosition
:
.
left
)
}
}
}
return
view
return
view
}
}
...
@@ -249,6 +297,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -249,6 +297,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
return
0.001
return
0.001
}
}
}
}
if
section
==
2
{
if
guiGeArr
.
count
>
1
{
return
80
}
}
return
39
return
39
}
}
//footer
//footer
...
@@ -277,14 +330,21 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -277,14 +330,21 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
override
func
backAction
()
{
override
func
backAction
()
{
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
var
itemTypeArr
=
NSMutableArray
()
//MARK: -- 选择填或跳转
//MARK: -- 选择填或跳转
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
if
cell
.
nameLbl
.
text
==
"商品类型"
{
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
if
cell
.
nameLbl
.
text
==
"商品类型"
{
if
glSelectView
==
nil
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
isMultipleSelect
=
true
view
.
titleLbl
.
text
=
"请选择商品类型"
view
.
titleLbl
.
text
=
"请选择商品类型"
view
.
delegate
=
self
view
.
delegate
=
self
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
,
"预售"
,
"普通"
,
"期货"
,
"团购"
,
"预售"
,
"普通"
,
"期货"
,
"团购"
,
"预售"
,
"普通"
,
"期货"
,
"团购"
]
view
.
dataArr
=
[
"预售"
,
"普通"
,
"期货"
,
"团购"
]
if
itemTypeArr
.
count
==
0
{
for
_
in
view
.
dataArr
{
itemTypeArr
.
add
(
"99"
)
}
}
view
.
selectArray
=
itemTypeArr
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
glSelectView
=
view
}
}
...
@@ -329,16 +389,24 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -329,16 +389,24 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
UIView
)
{
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UIView
)
{
print
(
"单选"
,
selectNum
)
print
(
"单选"
,
selectNum
)
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
}
}
var
isYuShou
:
Bool
=
false
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
{
func
GLAlertMoreSelectViewClick
(
sender
:
NSArray
,
view
:
UIView
)
{
print
(
"多选"
,
sender
)
print
(
"多选"
,
sender
)
itemTypeArr
=
sender
as!
NSMutableArray
let
str
=
"
\(
sender
.
firstObject
)
"
as!
NSString
if
str
.
integerValue
!=
99
{
isYuShou
=
true
}
else
{
isYuShou
=
false
}
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
listTbv
.
reloadData
()
}
}
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
{
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
{
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
...
@@ -389,7 +457,40 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -389,7 +457,40 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
}
}
}
}
func
ShangPinGguiGeCellEditAction
(
cell
:
ShangPinGguiGeCell
)
{
let
vc
=
CreatNewSpecsViewController
()
vc
.
barTitle
=
"编辑规格"
vc
.
datasArr
=
guiGeArr
vc
.
isYuShouSetting
=
isYuShou
let
dataDict
:
NSDictionary
!
if
selectIdx
?
.
item
!=
nil
{
dataDict
=
guiGeArr
[
selectIdx
!.
item
]
as!
NSDictionary
}
else
{
dataDict
=
guiGeArr
.
firstObject
as!
NSDictionary
}
vc
.
price
=
dataDict
[
"price"
]
as!
String
vc
.
guiGe
=
dataDict
[
"guiGe"
]
as!
String
vc
.
weight
=
dataDict
[
"weight"
]
as!
String
vc
.
wenDu
=
dataDict
[
"wenDu"
]
as!
String
vc
.
danWei
=
dataDict
[
"danWei"
]
as!
String
let
arr
=
dataDict
[
"jieTiArr"
]
as!
NSMutableArray
let
arr2
=
dataDict
[
"specalArr"
]
as!
NSMutableArray
vc
.
specalArr
=
arr2
vc
.
jieTiArr
=
arr
if
selectIdx
==
nil
{
vc
.
selectIdx
=
IndexPath
(
item
:
0
,
section
:
0
)
}
else
{
vc
.
selectIdx
=
selectIdx
}
print
(
vc
.
selectIdx
?
.
item
)
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
CreatNewSpecsViewControllerDeleteAction
()
{
print
(
"删除数据"
)
}
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
func
AddGuiGeCellClick
(
cell
:
AddGuiGeCell
)
{
//
//
print
(
"商品详情添加图片"
)
print
(
"商品详情添加图片"
)
...
@@ -397,9 +498,51 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -397,9 +498,51 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
@objc
func
addGuiGe
(){
@objc
func
addGuiGe
(){
print
(
"新增规格"
)
print
(
"新增规格"
)
let
vc
=
CreatNewSpecsViewController
()
let
vc
=
CreatNewSpecsViewController
()
vc
.
barTitle
=
"新增规格"
vc
.
delegate
=
self
vc
.
isYuShouSetting
=
isYuShou
vc
.
datasArr
=
guiGeArr
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
@objc
func
addImageAction
(
sender
:
UIButton
){
@objc
func
addImageAction
(
sender
:
UIButton
){
print
(
sender
.
tag
)
print
(
sender
.
tag
)
}
}
func
CreatNewSpecsViewControllerSaveAction
(
datas
:
NSMutableArray
)
{
guiGeArr
=
datas
listTbv
.
reloadData
()
}
//MARK: - COLLECTIONVIEW DELEGATE
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
minimumLineSpacingForSectionAt
section
:
Int
)
->
CGFloat
{
return
0
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
guiGeArr
.
count
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
"ItemCell"
,
for
:
indexPath
)
as!
ItemCell
cell
.
tag
=
indexPath
.
row
if
selectIdx
==
nil
{
selectIdx
=
IndexPath
(
item
:
0
,
section
:
0
)
}
if
indexPath
==
selectIdx
{
cell
.
nameLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
lineView
.
isHidden
=
false
}
else
{
cell
.
nameLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
cell
.
lineView
.
isHidden
=
true
}
return
cell
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
selectIdx
=
indexPath
//刷新cell
print
(
"selectItem"
,
selectIdx
?
.
item
)
listTbv
.
reloadData
()
collectionView
.
reloadData
()
}
}
}
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
8875f252
...
@@ -8,42 +8,122 @@
...
@@ -8,42 +8,122 @@
import
UIKit
import
UIKit
import
LGButton
import
LGButton
@objc
protocol
CreatNewSpecsViewControllerDelegate
{
@objc
optional
func
CreatNewSpecsViewControllerSaveAction
(
datas
:
NSMutableArray
)
@objc
optional
func
CreatNewSpecsViewControllerDeleteAction
()
}
class
CreatNewSpecsViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFCellDelegate
,
TitleAndBtnCellDelegate
,
TitleAndSwitchCellDelegate
,
TitleAndSwitchHeaderViewDelegate
,
NewCreateHeaderDelegate
,
NewCreateFooterDelegate
,
YuShouCellDelegate
,
GLAlertSelectViewDelegate
,
PuTongJieTiCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
var
layout
=
UICollectionViewFlowLayout
()
class
CreatNewSpecsViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFCellDelegate
,
TitleAndBtnCellDelegate
,
TitleAndSwitchCellDelegate
,
TitleAndSwitchHeaderViewDelegate
,
NewCreateHeaderDelegate
,
NewCreateFooterDelegate
,
YuShouCellDelegate
,
GLAlertSelectViewDelegate
{
var
delegate
:
CreatNewSpecsViewControllerDelegate
?
var
collectView
:
UICollectionView
?
var
datasArr
:
NSMutableArray
=
[]
var
dataDict
:
NSDictionary
?
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量:"
,
"温藏:"
,
"单位:"
]
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量:"
,
"温藏:"
,
"单位:"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"请选择商品温藏"
,
"请选择商品单位"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"请选择商品温藏"
,
"请选择商品单位"
]
@IBOutlet
weak
var
bottomBtn
:
LGButton
!
@IBOutlet
weak
var
bottomBtn
:
LGButton
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
var
selectIdx
:
IndexPath
?
var
isYuShouSetting
:
Bool
=
false
var
isYuShouSetting
:
Bool
=
false
{
willSet
{
isYuShouSetting
=
newValue
}
}
//打开预售
var
isJieTiJiaSetting
:
Bool
=
false
var
isJieTiJiaSetting
:
Bool
=
false
var
selectYuShou
:
Bool
=
false
//是否选择设置预售价格
var
selectYuShou
:
Bool
=
false
//是否选择设置预售价格
var
isSelectNonYuShou
:
Bool
=
true
//跳转前确定是否能选择预售
//规格
var
normalArr
:
NSArray
=
[]
//普通
var
specalArr
:
NSArray
=
[]
//预售
//选择页面
//选择页面
var
selectView
:
GLAlertSelectView
?
=
nil
var
selectView
:
GLAlertSelectView
?
=
nil
var
selectListArr
:
Array
<
String
>
=
[
"a"
,
"b"
,
"c"
]
var
selectListArr
:
Array
<
String
>
=
[
"a"
,
"b"
,
"c"
]
//测试数据
var
addNormal
=
0
var
addSpecal
=
0
var
price
=
""
{
willSet
{
price
=
newValue
}
}
var
guiGe
=
""
{
willSet
{
guiGe
=
newValue
}
}
var
weight
=
""
{
willSet
{
weight
=
newValue
}
}
var
wenDu
=
""
{
willSet
{
wenDu
=
newValue
}
}
var
danWei
=
""
{
willSet
{
danWei
=
newValue
}
}
//规格
var
specalArr
:
NSMutableArray
=
[]{
willSet
{
specalArr
.
removeAllObjects
()
specalArr
=
newValue
}
}
//预售
var
jieTiArr
:
NSMutableArray
=
[]{
willSet
{
jieTiArr
.
removeAllObjects
()
jieTiArr
=
newValue
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
print
(
"item == "
,
selectIdx
?
.
item
)
collectView
?
.
selectItem
(
at
:
selectIdx
,
animated
:
false
,
scrollPosition
:
.
bottom
)
}
@IBOutlet
weak
var
topBarView
:
UIView
!
@IBOutlet
weak
var
topBarViewH
:
NSLayoutConstraint
!
var
barTitle
:
String
?
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
navbar
.
title
=
"新增规格"
navbar
.
title
=
barTitle
self
.
view
.
addSubview
(
navbar
)
self
.
view
.
addSubview
(
navbar
)
if
datasArr
.
count
>
1
&&
barTitle
!.
contains
(
"编辑"
)
==
true
{
//展示topbar
listTbv
.
snp
.
makeConstraints
{
(
make
)
in
SetTopFrame
(
view
:
topBarView
,
height
:
41
)
make
.
top
.
equalTo
(
NavCGRect
.
height
)
if
collectView
==
nil
{
make
.
left
.
right
.
equalTo
(
0
)
let
collectionView
=
UICollectionView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
),
collectionViewLayout
:
layout
)
make
.
bottom
.
equalTo
(
bottomBtn
.
snp_top
)
collectionView
.
backgroundColor
=
UIColor
.
white
collectionView
.
delegate
=
self
collectionView
.
dataSource
=
self
topBarView
.
addSubview
(
collectionView
)
collectionView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
bottom
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
41
)
}
collectionView
.
showsHorizontalScrollIndicator
=
false
collectionView
.
isPagingEnabled
=
true
var
w
:
CGFloat
=
0
if
datasArr
.
count
<
5
{
w
=
fullScreenWidth
/
CGFloat
(
datasArr
.
count
)
}
else
{
w
=
fullScreenWidth
*
0.2
}
layout
.
itemSize
=
CGSize
(
width
:
w
,
height
:
41
)
layout
.
scrollDirection
=
.
horizontal
collectionView
.
collectionViewLayout
=
layout
collectionView
.
register
(
UINib
(
nibName
:
"ItemCell"
,
bundle
:
nil
),
forCellWithReuseIdentifier
:
"ItemCell"
)
collectView
=
collectionView
}
}
else
{
SetTopFrame
(
view
:
topBarView
,
height
:
0
)
topBarViewH
.
constant
=
0
}
}
listTbv
?
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTF"
)
listTbv
?
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTF"
)
listTbv
?
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtn"
)
listTbv
?
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtn"
)
...
@@ -54,15 +134,53 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -54,15 +134,53 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
@IBAction
func
saveAction
(
_
sender
:
Any
)
{
@IBAction
func
saveAction
(
_
sender
:
Any
)
{
print
(
"save"
)
print
(
"save"
)
// if price.count == 0 {
// return
// }
// if guiGe.count == 0 {
// return
// }
// if weight.count == 0 {
// return
// }
// if wenDu.count == 0 {
// return
// }
// if danWei.count == 0 {
// return
// }
// for item in jieTiArr {
// let str = item as! String
// let arr = str.components(separatedBy: "_")
// for letter in arr {
// if letter.count == 0 {//提示阶梯数据未完整
// return
// }
// }
// }
let
dict
=
NSMutableDictionary
()
dict
[
"price"
]
=
price
dict
[
"guiGe"
]
=
guiGe
dict
[
"weight"
]
=
weight
dict
[
"wenDu"
]
=
wenDu
dict
[
"danWei"
]
=
danWei
dict
[
"jieTiArr"
]
=
jieTiArr
dict
[
"specalArr"
]
=
specalArr
dict
[
"itemIdx"
]
=
datasArr
.
count
if
barTitle
?
.
contains
(
"编辑"
)
==
true
{
print
(
"abc == "
,
selectIdx
?
.
item
)
datasArr
.
replaceObject
(
at
:
selectIdx
!.
item
,
with
:
dict
)
}
else
{
datasArr
.
add
(
dict
)
}
delegate
?
.
CreatNewSpecsViewControllerSaveAction
?(
datas
:
datasArr
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
//MARK: - cell delegate
//MARK: - cell delegate
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
if
(
navbar
.
title
?
.
contains
(
"编辑"
))
!
{
if
(
navbar
.
title
?
.
contains
(
"编辑"
))
!
{
return
4
return
4
}
else
{
}
else
{
...
@@ -76,17 +194,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -76,17 +194,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
if
section
==
2
{
if
section
==
2
{
if
selectYuShou
{
//预售
if
selectYuShou
{
//预售
if
normalArr
.
count
==
0
{
return
addNormal
}
else
{
return
normalArr
.
count
}
}
else
{
//非预售
if
specalArr
.
count
==
0
{
return
addSpecal
}
else
{
return
specalArr
.
count
return
specalArr
.
count
}
}
else
{
//非预售
return
jieTiArr
.
count
}
}
}
}
return
1
return
1
...
@@ -101,6 +213,20 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -101,6 +213,20 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
let
str
=
NSAttributedString
(
string
:
pliceHolderArr
[
indexPath
.
row
],
attributes
:
[
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
named
:
"灰色字体颜色"
)])
let
str
=
NSAttributedString
(
string
:
pliceHolderArr
[
indexPath
.
row
],
attributes
:
[
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
named
:
"灰色字体颜色"
)])
cell
.
textTF
.
attributedPlaceholder
=
str
cell
.
textTF
.
attributedPlaceholder
=
str
if
datasArr
.
count
>
0
{
switch
indexPath
.
row
{
case
0
:
cell
.
textTF
.
text
=
price
break
case
1
:
cell
.
textTF
.
text
=
guiGe
break
default
:
cell
.
textTF
.
text
=
weight
break
}
}
cell
.
delegate
=
self
cell
.
delegate
=
self
return
cell
return
cell
}
else
{
}
else
{
...
@@ -109,6 +235,29 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -109,6 +235,29 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
nameLbl
.
text
=
titleArray
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
titleArray
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
pliceHolderArr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
pliceHolderArr
[
indexPath
.
row
]
if
indexPath
.
row
==
3
{
if
tempSelect
!=
"99"
{
cell
.
contentLbl
.
text
=
selectListArr
[
tempSelect
.
integerValue
]
}
}
if
indexPath
.
row
==
4
{
if
itemDanWeiSelect
!=
"99"
{
cell
.
contentLbl
.
text
=
selectListArr
[
itemDanWeiSelect
.
integerValue
]
}
}
if
datasArr
.
count
>
0
{
switch
indexPath
.
row
{
case
3
:
cell
.
contentLbl
.
text
=
wenDu
break
case
4
:
cell
.
contentLbl
.
text
=
danWei
break
default
:
break
}
}
return
cell
return
cell
}
}
}
}
...
@@ -122,14 +271,14 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -122,14 +271,14 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
namelbl
.
text
=
"预售设置"
cell
.
namelbl
.
text
=
"预售设置"
cell
.
infoSw
.
isOn
=
isYuShouSetting
cell
.
infoSw
.
isOn
=
isYuShouSetting
cell
.
tag
=
5
cell
.
tag
=
5
if
is
SelectNonYuShou
{
if
is
YuShouSetting
==
false
{
cell
.
namelbl
.
alpha
=
0.45
cell
.
namelbl
.
alpha
=
0.45
cell
.
isUserInteractionEnabled
=
false
cell
.
isUserInteractionEnabled
=
false
}
}
}
}
if
indexPath
.
section
==
1
{
if
indexPath
.
section
==
1
{
if
isYuShouSetting
{
if
isYuShouSetting
==
true
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"YuShou"
)
as!
YuShouCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"YuShou"
)
as!
YuShouCell
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
cell
.
infoSw
.
isOn
=
isYuShouSetting
cell
.
infoSw
.
isOn
=
isYuShouSetting
...
@@ -137,9 +286,26 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -137,9 +286,26 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
return
cell
return
cell
}
}
}
}
if
indexPath
.
section
==
2
{
if
indexPath
.
section
==
2
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"PuTongJieTi"
)
as!
PuTongJieTiCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"PuTongJieTi"
)
as!
PuTongJieTiCell
cell
.
delegate
=
self
cell
.
titleLbl
.
text
=
"
\(
indexPath
.
row
+
1
)
.数量≥"
cell
.
titleLbl
.
text
=
"
\(
indexPath
.
row
+
1
)
.数量≥"
cell
.
tag
=
indexPath
.
row
cell
.
countTF
.
text
=
""
cell
.
priceTF
.
text
=
""
var
item
:
NSString
=
""
if
selectYuShou
{
item
=
specalArr
[
indexPath
.
row
]
as!
NSString
}
else
{
item
=
jieTiArr
[
indexPath
.
row
]
as!
NSString
}
if
item
!=
""
{
let
arr
=
item
.
components
(
separatedBy
:
"_"
)
cell
.
priceTF
.
text
=
arr
[
0
]
cell
.
countTF
.
text
=
arr
[
1
]
}
return
cell
return
cell
}
}
if
indexPath
.
section
==
3
{
if
indexPath
.
section
==
3
{
...
@@ -149,6 +315,12 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -149,6 +315,12 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
return
cell
return
cell
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
indexPath
.
section
==
3
{
delegate
?
.
CreatNewSpecsViewControllerDeleteAction
?()
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
1
{
if
indexPath
.
section
==
1
{
if
isYuShouSetting
{
if
isYuShouSetting
{
...
@@ -176,11 +348,13 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -176,11 +348,13 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
if
isJieTiJiaSetting
==
false
{
if
isJieTiJiaSetting
==
false
{
return
view
return
view
}
}
if
isYuShouSetting
{
if
isYuShouSetting
{
let
view
=
TitleAndSwitchHeaderView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
90
))
let
view
=
TitleAndSwitchHeaderView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
90
))
view
.
delegate
=
self
view
.
delegate
=
self
view
.
selectYuShou
=
selectYuShou
view
.
selectYuShou
=
selectYuShou
view
.
infoSW
.
isOn
=
is
JieTiJia
Setting
view
.
infoSW
.
isOn
=
is
YuShou
Setting
return
view
return
view
}
}
return
view
return
view
...
@@ -221,35 +395,60 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -221,35 +395,60 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
//MARK: - NEW CELL DELEGATE
//MARK: - NEW CELL DELEGATE
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
switch
cell
.
tag
{
case
0
:
price
=
content
break
case
1
:
guiGe
=
content
break
default
:
weight
=
content
break
}
}
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UIView
)
{
if
view
.
tag
==
3
{
tempSelect
=
selectNum
wenDu
=
selectListArr
[
selectNum
.
integerValue
]
}
else
{
itemDanWeiSelect
=
selectNum
danWei
=
selectListArr
[
selectNum
.
integerValue
]
}
}
let
cell
=
listTbv
.
cellForRow
(
at
:
IndexPath
(
row
:
view
.
tag
,
section
:
0
))
as!
TitleAndBtnCell
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
{
cell
.
contentLbl
.
text
=
selectListArr
[
selectNum
.
integerValue
]
print
(
"关闭"
)
selectView
?
.
removeFromSuperview
()
selectView
?
.
removeFromSuperview
()
selectView
=
nil
selectView
=
nil
}
}
func
GLAlertSelectViewCl
ick
(
sender
:
Int
,
view
:
UIView
)
{
func
GLAlertSelectViewCl
ose
(
sender
:
UIButton
)
{
print
(
sender
)
print
(
"关闭"
)
selectView
?
.
removeFromSuperview
()
selectView
?
.
removeFromSuperview
()
selectView
=
nil
selectView
=
nil
}
}
// var tempSelectArr = NSMutableArray()
var
tempSelect
:
NSString
=
"99"
var
itemDanWeiSelect
:
NSString
=
"99"
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
func
btnClick
(
content
:
String
,
cell
:
TitleAndBtnCell
)
{
if
cell
.
tag
==
3
{
if
cell
.
tag
==
3
{
if
selectView
==
nil
{
if
selectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择商品温藏"
view
.
titleLbl
.
text
=
"请选择商品温藏"
view
.
delegate
=
self
view
.
delegate
=
self
view
.
dataArr
=
selectListArr
view
.
dataArr
=
selectListArr
view
.
selectNum
=
tempSelect
as
String
//单选
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
selectView
=
view
selectView
=
view
}
}
}
else
{
}
else
{
if
selectView
==
nil
{
if
selectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择商品单位"
view
.
titleLbl
.
text
=
"请选择商品单位"
view
.
delegate
=
self
view
.
delegate
=
self
view
.
selectNum
=
itemDanWeiSelect
as
String
view
.
dataArr
=
selectListArr
view
.
dataArr
=
selectListArr
self
.
view
.
addSubview
(
view
)
self
.
view
.
addSubview
(
view
)
selectView
=
view
selectView
=
view
...
@@ -257,15 +456,19 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -257,15 +456,19 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
}
}
func
switchStatus
(
sender
:
UISwitch
)
{
func
switchStatus
(
sender
:
UISwitch
)
{
isJieTiJiaSetting
=
sender
.
isOn
isJieTiJiaSetting
=
sender
.
isOn
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
func
switchClick
(
content
:
UISwitch
,
cell
:
TitleAndSwitchCell
)
{
func
switchClick
(
content
:
UISwitch
,
cell
:
TitleAndSwitchCell
)
{
if
cell
.
tag
==
5
{
if
cell
.
tag
==
5
{
isYuShouSetting
=
content
.
isOn
isYuShouSetting
=
content
.
isOn
let
idxPath
=
IndexPath
(
row
:
0
,
section
:
1
)
let
idxPath
=
IndexPath
(
row
:
0
,
section
:
1
)
if
isYuShouSetting
&&
isJieTiJiaSetting
{
if
isYuShouSetting
&&
isJieTiJiaSetting
{
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
else
{
}
else
{
listTbv
.
reloadRows
(
at
:
[
idxPath
],
with
:
.
none
)
listTbv
.
reloadRows
(
at
:
[
idxPath
],
with
:
.
none
)
...
@@ -274,15 +477,16 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -274,15 +477,16 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
func
newCreateSwitchStatus
(
sender
:
UISwitch
)
{
func
newCreateSwitchStatus
(
sender
:
UISwitch
)
{
//打开switch
isJieTiJiaSetting
=
sender
.
isOn
isJieTiJiaSetting
=
sender
.
isOn
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
func
footerClickAction
()
{
func
footerClickAction
()
{
if
selectYuShou
{
//预售
if
selectYuShou
{
//预售
addNormal
+=
1
specalArr
.
add
(
""
)
}
else
{
//非预售
}
else
{
//非预售
addSpecal
+=
1
jieTiArr
.
add
(
""
)
}
}
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
...
@@ -290,21 +494,53 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -290,21 +494,53 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
isYuShouSetting
=
sender
.
isOn
isYuShouSetting
=
sender
.
isOn
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
func
PuTongJieTiDelAction
(
sender
:
UIButton
)
{
jieTiArr
.
removeObject
(
at
:
sender
.
tag
)
print
(
jieTiArr
)
listTbv
.
reloadData
()
}
func
PuTongJieTiContent
(
price
:
String
,
count
:
String
,
cell
:
PuTongJieTiCell
)
{
if
selectYuShou
{
specalArr
.
replaceObject
(
at
:
cell
.
tag
,
with
:
"
\(
price
)
_
\(
count
)
"
)
}
else
{
jieTiArr
.
replaceObject
(
at
:
cell
.
tag
,
with
:
"
\(
price
)
_
\(
count
)
"
)
}
}
func
selectYuShou
(
sender
:
UIButton
)
{
func
selectYuShou
(
sender
:
UIButton
)
{
if
sender
.
tag
==
0
{
if
sender
.
tag
==
0
{
selectYuShou
=
false
selectYuShou
=
false
addNormal
=
normalArr
.
count
}
else
{
}
else
{
selectYuShou
=
true
selectYuShou
=
true
addSpecal
=
specalArr
.
count
}
}
listTbv
.
reloadData
()
listTbv
.
reloadData
()
}
}
//MARK: - COLLECTIONVIEW DELEGATE
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
minimumLineSpacingForSectionAt
section
:
Int
)
->
CGFloat
{
return
0
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
datasArr
.
count
}
//MARK: - 选择页面
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
"ItemCell"
,
for
:
indexPath
)
as!
ItemCell
cell
.
tag
=
indexPath
.
row
if
indexPath
==
selectIdx
{
cell
.
nameLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
lineView
.
isHidden
=
false
}
else
{
cell
.
nameLbl
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
cell
.
lineView
.
isHidden
=
true
}
return
cell
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
selectIdx
=
indexPath
//刷新cell
collectionView
.
reloadData
()
}
}
}
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.xib
View file @
8875f252
...
@@ -12,6 +12,8 @@
...
@@ -12,6 +12,8 @@
<connections>
<connections>
<outlet
property=
"bottomBtn"
destination=
"dGJ-ea-Bx5"
id=
"VIT-dc-ndT"
/>
<outlet
property=
"bottomBtn"
destination=
"dGJ-ea-Bx5"
id=
"VIT-dc-ndT"
/>
<outlet
property=
"listTbv"
destination=
"bSh-mx-Kzg"
id=
"xwd-1s-qv3"
/>
<outlet
property=
"listTbv"
destination=
"bSh-mx-Kzg"
id=
"xwd-1s-qv3"
/>
<outlet
property=
"topBarView"
destination=
"58G-5f-0zb"
id=
"HDH-SB-fbX"
/>
<outlet
property=
"topBarViewH"
destination=
"Ye0-LU-7fR"
id=
"twP-bS-cfD"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</connections>
</placeholder>
</placeholder>
...
@@ -64,32 +66,45 @@
...
@@ -64,32 +66,45 @@
</userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes>
</view>
</view>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"grouped"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"18"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bSh-mx-Kzg"
>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"grouped"
separatorStyle=
"none"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"18"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bSh-mx-Kzg"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
44"
width=
"414"
height=
"769
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
85"
width=
"414"
height=
"728
"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor
"
/>
<color
key=
"backgroundColor"
name=
"app底色
"
/>
<connections>
<connections>
<outlet
property=
"dataSource"
destination=
"-1"
id=
"Qbd-QF-oNN"
/>
<outlet
property=
"dataSource"
destination=
"-1"
id=
"Qbd-QF-oNN"
/>
<outlet
property=
"delegate"
destination=
"-1"
id=
"Ogi-cZ-Pq2"
/>
<outlet
property=
"delegate"
destination=
"-1"
id=
"Ogi-cZ-Pq2"
/>
</connections>
</connections>
</tableView>
</tableView>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"58G-5f-0zb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"44"
width=
"414"
height=
"41"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"41"
id=
"Ye0-LU-7fR"
/>
</constraints>
</view>
</subviews>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraints>
<constraint
firstItem=
"bSh-mx-Kzg"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"0fJ-Bh-Hih"
/>
<constraint
firstItem=
"bSh-mx-Kzg"
firstAttribute=
"top"
secondItem=
"58G-5f-0zb"
secondAttribute=
"bottom"
id=
"0nZ-9Z-pB5"
/>
<constraint
firstItem=
"bSh-mx-Kzg"
firstAttribute=
"top"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"top"
id=
"1sc-Tr-aDe"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"8JZ-TM-4Gj"
secondAttribute=
"trailing"
id=
"5nJ-hq-GzC"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"8JZ-TM-4Gj"
secondAttribute=
"trailing"
id=
"5nJ-hq-GzC"
/>
<constraint
firstItem=
"
dGJ-ea-Bx5"
firstAttribute=
"top"
secondItem=
"bSh-mx-Kzg"
secondAttribute=
"bottom"
id=
"Ijr-6F-Wc6
"
/>
<constraint
firstItem=
"
58G-5f-0zb"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"Ugd-D3-SaD
"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"dGJ-ea-Bx5"
secondAttribute=
"trailing"
id=
"UjZ-PD-0IP"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"dGJ-ea-Bx5"
secondAttribute=
"trailing"
id=
"UjZ-PD-0IP"
/>
<constraint
firstItem=
"8JZ-TM-4Gj"
firstAttribute=
"top"
secondItem=
"dGJ-ea-Bx5"
secondAttribute=
"bottom"
id=
"Wcn-RI-W8x"
/>
<constraint
firstItem=
"8JZ-TM-4Gj"
firstAttribute=
"top"
secondItem=
"dGJ-ea-Bx5"
secondAttribute=
"bottom"
id=
"Wcn-RI-W8x"
/>
<constraint
firstItem=
"bSh-mx-Kzg"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"cMo-sP-4qP"
/>
<constraint
firstItem=
"58G-5f-0zb"
firstAttribute=
"top"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"top"
id=
"gRq-Fw-2ah"
/>
<constraint
firstItem=
"dGJ-ea-Bx5"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"jYa-O4-JEm"
/>
<constraint
firstItem=
"dGJ-ea-Bx5"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"jYa-O4-JEm"
/>
<constraint
firstItem=
"dGJ-ea-Bx5"
firstAttribute=
"top"
secondItem=
"bSh-mx-Kzg"
secondAttribute=
"bottom"
id=
"mTs-nP-5KO"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"58G-5f-0zb"
secondAttribute=
"trailing"
id=
"mzN-8N-ZCY"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"bottom"
secondItem=
"dGJ-ea-Bx5"
secondAttribute=
"bottom"
id=
"oYF-GV-YdD"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"bottom"
secondItem=
"dGJ-ea-Bx5"
secondAttribute=
"bottom"
id=
"oYF-GV-YdD"
/>
<constraint
firstItem=
"8JZ-TM-4Gj"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
id=
"vF1-xh-KYL"
/>
<constraint
firstItem=
"8JZ-TM-4Gj"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
id=
"vF1-xh-KYL"
/>
<constraint
firstItem=
"
fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"bSh-mx-Kzg"
secondAttribute=
"trailing"
id=
"zb7-xi-DTh
"
/>
<constraint
firstItem=
"
bSh-mx-Kzg"
firstAttribute=
"trailing"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"trailing"
id=
"zF5-sH-eFq
"
/>
</constraints>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"fnl-2z-Ty3"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"fnl-2z-Ty3"
/>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"129.91071428571428"
/>
<point
key=
"canvasLocation"
x=
"131.8840579710145"
y=
"129.91071428571428"
/>
</view>
</view>
</objects>
</objects>
<resources>
<resources>
<namedColor
name=
"app底色"
>
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"按钮渐变色上"
>
<namedColor
name=
"按钮渐变色上"
>
<color
red=
"0.3880000114440918"
green=
"0.62400001287460327"
blue=
"0.90200001001358032"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.3880000114440918"
green=
"0.62400001287460327"
blue=
"0.90200001001358032"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/DelGuiGeCell.swift
View file @
8875f252
...
@@ -12,6 +12,8 @@ class DelGuiGeCell: UITableViewCell {
...
@@ -12,6 +12,8 @@ class DelGuiGeCell: UITableViewCell {
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
// Initialization code
// Initialization code
}
}
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/PuTongJieTiCell.swift
View file @
8875f252
...
@@ -9,22 +9,32 @@
...
@@ -9,22 +9,32 @@
import
UIKit
import
UIKit
@objc
protocol
PuTongJieTiCellDelegate
{
@objc
protocol
PuTongJieTiCellDelegate
{
@objc
optional
func
PuTongJieTiDelAction
(
sender
:
UIButton
)
@objc
optional
func
PuTongJieTiDelAction
(
sender
:
UIButton
)
@objc
optional
func
PuTongJieTiContent
(
price
:
String
,
count
:
String
,
cell
:
PuTongJieTiCell
)
}
}
class
PuTongJieTiCell
:
UITableViewCell
{
class
PuTongJieTiCell
:
UITableViewCell
{
var
delegate
:
PuTongJieTiCellDelegate
?
var
delegate
:
PuTongJieTiCellDelegate
?
@IBAction
func
delAction
(
_
sender
:
UIButton
)
{
@IBAction
func
delAction
(
_
sender
:
UIButton
)
{
delegate
?
.
PuTongJieTiDelAction
?(
sender
:
sender
)
delegate
?
.
PuTongJieTiDelAction
?(
sender
:
sender
)
}
}
@IBOutlet
weak
var
priceTF
:
NSLayoutConstraint
!
@IBOutlet
weak
var
priceTF
:
UITextField
!
@IBOutlet
weak
var
countTF
:
UITextField
!
@IBOutlet
weak
var
countTF
:
UITextField
!
@IBOutlet
weak
var
titleLbl
:
UILabel
!
@IBOutlet
weak
var
titleLbl
:
UILabel
!
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
selectionStyle
=
.
none
selectionStyle
=
.
none
priceTF
.
addTarget
(
self
,
action
:
#selector(
textChange(textF:)
)
,
for
:
.
editingChanged
)
countTF
.
addTarget
(
self
,
action
:
#selector(
textChange(textF:)
)
,
for
:
.
editingChanged
)
priceTF
.
tag
=
0
countTF
.
tag
=
1
// Initialization code
// Initialization code
}
}
@objc
func
textChange
(
textF
:
UITextField
){
delegate
?
.
PuTongJieTiContent
?(
price
:
priceTF
.
text
!
,
count
:
countTF
.
text
!
,
cell
:
self
)
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
super
.
setSelected
(
selected
,
animated
:
animated
)
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/PuTongJieTiCell.xib
View file @
8875f252
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<connections>
<outlet
property=
"countTF"
destination=
"DMW-oR-f6E"
id=
"SSR-pc-LuB"
/>
<outlet
property=
"countTF"
destination=
"DMW-oR-f6E"
id=
"SSR-pc-LuB"
/>
<outlet
property=
"priceTF"
destination=
"
jiQ-Wh-UYo"
id=
"mL5-Wd-vuG
"
/>
<outlet
property=
"priceTF"
destination=
"
GZ7-X2-hIF"
id=
"oZI-xp-ed5
"
/>
<outlet
property=
"titleLbl"
destination=
"dEb-Pr-hmY"
id=
"B1t-aG-1n8"
/>
<outlet
property=
"titleLbl"
destination=
"dEb-Pr-hmY"
id=
"B1t-aG-1n8"
/>
</connections>
</connections>
<point
key=
"canvasLocation"
x=
"131.15942028985509"
y=
"112.5"
/>
<point
key=
"canvasLocation"
x=
"131.15942028985509"
y=
"112.5"
/>
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
View file @
8875f252
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
<constraint
firstAttribute=
"width"
constant=
"47"
id=
"XbV-B6-6sH"
/>
<constraint
firstAttribute=
"width"
constant=
"47"
id=
"XbV-B6-6sH"
/>
<constraint
firstAttribute=
"height"
constant=
"31"
id=
"xe0-nb-ftK"
/>
<constraint
firstAttribute=
"height"
constant=
"31"
id=
"xe0-nb-ftK"
/>
</constraints>
</constraints>
<color
key=
"onTintColor"
name=
"蓝色字体颜色"
/>
</switch>
</switch>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"预售价:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gDh-Mx-qdQ"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"预售价:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gDh-Mx-qdQ"
>
<rect
key=
"frame"
x=
"16"
y=
"55"
width=
"54"
height=
"16"
/>
<rect
key=
"frame"
x=
"16"
y=
"55"
width=
"54"
height=
"16"
/>
...
@@ -160,5 +161,8 @@
...
@@ -160,5 +161,8 @@
<namedColor
name=
"灰色分界线"
>
<namedColor
name=
"灰色分界线"
>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27799999713897705"
green=
"0.56099998950958252"
blue=
"0.88999998569488525"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</resources>
</document>
</document>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/footer/NewCreateFooter.xib
View file @
8875f252
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<color
key=
"textColor"
name=
"蓝色字体颜色"
/>
<color
key=
"textColor"
name=
"蓝色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"
编组
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Iq6-om-UWg"
>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"
jiahaoXG
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Iq6-om-UWg"
>
<rect
key=
"frame"
x=
"139"
y=
"19.5"
width=
"10"
height=
"10"
/>
<rect
key=
"frame"
x=
"139"
y=
"19.5"
width=
"10"
height=
"10"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"10"
id=
"AuL-mP-jHY"
/>
<constraint
firstAttribute=
"width"
constant=
"10"
id=
"AuL-mP-jHY"
/>
...
@@ -53,9 +53,9 @@
...
@@ -53,9 +53,9 @@
</view>
</view>
</objects>
</objects>
<resources>
<resources>
<image
name=
"
编组"
width=
"10"
height=
"10
.5"
/>
<image
name=
"
jiahaoXG"
width=
"12.5"
height=
"12
.5"
/>
<namedColor
name=
"蓝色字体颜色"
>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.89019607843137
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
799999713897705"
green=
"0.56099998950958252"
blue=
"0.889999985694885
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
</resources>
</resources>
</document>
</document>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/仅新增规格header/NewCreateHeader.xib
View file @
8875f252
...
@@ -72,13 +72,13 @@
...
@@ -72,13 +72,13 @@
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"标题字颜色"
>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.180
3921568627451"
green=
"0.1803921568627451"
blue=
"0.1803921568627451
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.180
00000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"灰色分界线"
>
<namedColor
name=
"灰色分界线"
>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.89019607843137
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
799999713897705"
green=
"0.56099998950958252"
blue=
"0.889999985694885
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
</resources>
</resources>
</document>
</document>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/普通+预售header/TitleAndSwitchHeaderView.xib
View file @
8875f252
...
@@ -108,16 +108,16 @@
...
@@ -108,16 +108,16 @@
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"按钮渐变色下,字体颜色"
>
<namedColor
name=
"按钮渐变色下,字体颜色"
>
<color
red=
"0.27
450980392156865"
green=
"0.5607843137254902"
blue=
"0.88627450980392153
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.8901960784313725
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"标题字颜色"
>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.1803921568627451"
green=
"0.1803921568627451"
blue=
"0.1803921568627451"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.1803921568627451"
green=
"0.1803921568627451"
blue=
"0.1803921568627451"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"灰色字体颜色"
>
<namedColor
name=
"灰色字体颜色"
>
<color
red=
"0.
59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.
40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.89019607843137
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
799999713897705"
green=
"0.56099998950958252"
blue=
"0.889999985694885
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
</resources>
</resources>
</document>
</document>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
View file @
8875f252
...
@@ -22,7 +22,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -22,7 +22,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
var
isEdit
:
Bool
?
var
isEdit
:
Bool
?
//测试数据
//测试数据
var
data
:
NSDictionary
?
=
nil
var
data
:
NSDictionary
?
=
nil
var
gouWuType
=
"99"
//购物类型
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
@@ -194,7 +194,8 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -194,7 +194,8 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
if
indexPath
.
row
==
5
{
if
indexPath
.
row
==
5
{
if
glSelectView
==
nil
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
isMultipleSelect
=
false
//是否多选
// view.isMultipleSelect = false//是否多选
view
.
selectNum
=
gouWuType
view
.
delegate
=
self
view
.
delegate
=
self
view
.
titleLbl
.
text
=
"请选择购物类型"
view
.
titleLbl
.
text
=
"请选择购物类型"
view
.
dataArr
=
[
"普通订单"
,
"预售下单"
]
view
.
dataArr
=
[
"普通订单"
,
"预售下单"
]
...
@@ -250,7 +251,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -250,7 +251,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
print
(
"AddGuiGeCellClick"
)
print
(
"AddGuiGeCellClick"
)
}
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
UIView
)
{
func
GLAlertSelectViewClick
(
selectNum
:
NSString
,
view
:
UIView
)
{
print
(
"单选"
,
selectNum
)
print
(
"单选"
,
selectNum
)
glSelectView
?
.
removeFromSuperview
()
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
...
...
This diff is collapsed.
Click to expand it.
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