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
f40eb3e8
Commit
f40eb3e8
authored
May 23, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成销售下单流程
parent
81bb2a0a
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
318 additions
and
20 deletions
+318
-20
GeliBusinessPlatform.xcworkspace/contents.xcworkspacedata
GeliBusinessPlatform.xcworkspace/contents.xcworkspacedata
+16
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+13
-2
GeliBusinessPlatform/Model/OrderManageModel/GetGoodsInfoModel.swift
...ssPlatform/Model/OrderManageModel/GetGoodsInfoModel.swift
+3
-0
GeliBusinessPlatform/SceneDelegate.swift
GeliBusinessPlatform/SceneDelegate.swift
+1
-1
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
+2
-0
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.xib
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.xib
+3
-3
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.swift
...atform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.swift
+1
-0
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.xib
...Platform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.xib
+14
-2
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+217
-5
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
...iewController/代客下单(购物)/XuanZeShangPinViewController.swift
+1
-0
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
...nessPlatform/ViewController/地址管理/DZGLViewController.swift
+2
-0
GeliBusinessPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
...essPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
+11
-0
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
...orm/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
+1
-0
GeliBusinessPlatform/ViewController/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.swift
...ontroller/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.swift
+28
-2
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+5
-5
No files found.
GeliBusinessPlatform.xcworkspace/contents.xcworkspacedata
View file @
f40eb3e8
...
@@ -4,6 +4,22 @@
...
@@ -4,6 +4,22 @@
<FileRef
<FileRef
location =
"group:GeliBusinessPlatform.xcodeproj"
>
location =
"group:GeliBusinessPlatform.xcodeproj"
>
</FileRef>
</FileRef>
<Group
location =
"group:GeliBusinessPlatform/Model/../.."
name =
"Products"
>
<FileRef
location =
"build:GeliBusinessPlatform.app"
assignedFileDataType =
"com.apple.application-bundle"
>
</FileRef>
<FileRef
location =
"build:GeliBusinessPlatformTests.xctest"
assignedFileDataType =
"com.apple.xcode.cfbundle"
>
</FileRef>
<FileRef
location =
"build:GeliBusinessPlatformUITests.xctest"
assignedFileDataType =
"com.apple.xcode.cfbundle"
>
</FileRef>
</Group>
<FileRef
<FileRef
location =
"group:Pods/Pods.xcodeproj"
>
location =
"group:Pods/Pods.xcodeproj"
>
</FileRef>
</FileRef>
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f40eb3e8
No preview for this file type
GeliBusinessPlatform/Define/Define.swift
View file @
f40eb3e8
...
@@ -256,9 +256,20 @@ func getDictionaryFromJSONString(jsonString:String) ->NSDictionary{
...
@@ -256,9 +256,20 @@ func getDictionaryFromJSONString(jsonString:String) ->NSDictionary{
return
dict
as!
NSDictionary
return
dict
as!
NSDictionary
}
}
return
NSDictionary
()
return
NSDictionary
()
}
//MARK:--字符串转字典
func
getDicFromJSONString
(
jsonString
:
String
)
->
Dictionary
<
String
,
Any
>
{
let
jsonData
:
Data
=
jsonString
.
data
(
using
:
.
utf8
)
!
let
dict
=
try
?
JSONSerialization
.
jsonObject
(
with
:
jsonData
,
options
:
.
mutableContainers
)
if
dict
!=
nil
{
return
dict
as!
Dictionary
}
}
return
Dictionary
()
}
//MARK:--字典转字符串
//MARK:--字典转字符串
func
dictChangeString
(
sender
:
Dictionary
<
String
,
String
>
)
->
String
{
func
dictChangeString
(
sender
:
Dictionary
<
String
,
Any
>
)
->
String
{
var
str
=
""
var
str
=
""
do
{
do
{
let
json
=
JSON
(
sender
)
let
json
=
JSON
(
sender
)
...
...
GeliBusinessPlatform/Model/OrderManageModel/GetGoodsInfoModel.swift
View file @
f40eb3e8
...
@@ -26,6 +26,8 @@ class GetGoodsInfoModel: Mappable {
...
@@ -26,6 +26,8 @@ class GetGoodsInfoModel: Mappable {
class
GetGoodsInfoDataModel
:
Mappable
{
class
GetGoodsInfoDataModel
:
Mappable
{
var
sku_id
:
Int
?
//sku_id
var
sku_id
:
Int
?
//sku_id
var
goods_id
:
Int
?
//goods_id
var
goods_img
:
String
?
//商品缩略图
var
goods_img
:
String
?
//商品缩略图
var
goods_name
:
String
?
//商品名
var
goods_name
:
String
?
//商品名
var
origin_number
:
Int
?
//起订量
var
origin_number
:
Int
?
//起订量
...
@@ -45,6 +47,7 @@ class GetGoodsInfoDataModel: Mappable {
...
@@ -45,6 +47,7 @@ class GetGoodsInfoDataModel: Mappable {
}
}
func
mapping
(
map
:
Map
)
{
func
mapping
(
map
:
Map
)
{
sku_id
<-
map
[
"sku_id"
]
sku_id
<-
map
[
"sku_id"
]
goods_id
<-
map
[
"goods_id"
]
goods_img
<-
map
[
"goods_img"
]
goods_img
<-
map
[
"goods_img"
]
goods_name
<-
map
[
"goods_name"
]
goods_name
<-
map
[
"goods_name"
]
origin_number
<-
map
[
"origin_number"
]
origin_number
<-
map
[
"origin_number"
]
...
...
GeliBusinessPlatform/SceneDelegate.swift
View file @
f40eb3e8
...
@@ -94,7 +94,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
...
@@ -94,7 +94,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
// Create the SwiftUI view that provides the window contents.
// Create the SwiftUI view that provides the window contents.
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
//
tabBarController.selectedIndex = 2
tabBarController
.
selectedIndex
=
2
let
contentView
=
tabBarController
let
contentView
=
tabBarController
...
...
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
View file @
f40eb3e8
...
@@ -42,6 +42,8 @@ class XuanZeShangPinCell: UITableViewCell {
...
@@ -42,6 +42,8 @@ class XuanZeShangPinCell: UITableViewCell {
@IBOutlet
weak
var
selectBtn
:
UIButton
!
@IBOutlet
weak
var
selectBtn
:
UIButton
!
@IBOutlet
weak
var
btmView
:
UIView
!
@IBOutlet
weak
var
btmView
:
UIView
!
@IBOutlet
weak
var
btmViewHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
btmViewHeight
:
NSLayoutConstraint
!
var
cellModel
:
GetGoodsInfoDataModel
?
=
nil
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
self
.
selectionStyle
=
.
none
...
...
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.xib
View file @
f40eb3e8
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<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"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<imageView
hidden=
"YES"
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"yushou"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Rub-Pk-cR7"
>
<imageView
hidden=
"YES"
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"yushou"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Rub-Pk-cR7"
>
<rect
key=
"frame"
x=
"
37"
y=
"15"
width=
"68"
height=
"36
"
/>
<rect
key=
"frame"
x=
"
71"
y=
"15"
width=
"34"
height=
"18
"
/>
</imageView>
</imageView>
</subviews>
</subviews>
<constraints>
<constraints>
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.swift
View file @
f40eb3e8
...
@@ -21,6 +21,7 @@ class DaiKeXiaDanGouWuCell: UITableViewCell {
...
@@ -21,6 +21,7 @@ class DaiKeXiaDanGouWuCell: UITableViewCell {
@IBOutlet
weak
var
priceLbl
:
UILabel
!
@IBOutlet
weak
var
priceLbl
:
UILabel
!
@IBOutlet
weak
var
detailLbl
:
UILabel
!
@IBOutlet
weak
var
detailLbl
:
UILabel
!
@IBOutlet
weak
var
titleLbl
:
UILabel
!
@IBOutlet
weak
var
titleLbl
:
UILabel
!
@IBOutlet
weak
var
diLbl
:
UILabel
!
@IBAction
func
delAction
(
_
sender
:
Any
)
{
@IBAction
func
delAction
(
_
sender
:
Any
)
{
delegate
?
.
DaiKeXiaDanGouWuCellDelAction
(
cell
:
self
)
delegate
?
.
DaiKeXiaDanGouWuCellDelAction
(
cell
:
self
)
}
}
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.xib
View file @
f40eb3e8
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<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"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
@@ -114,16 +114,27 @@
...
@@ -114,16 +114,27 @@
<nil
key=
"textColor"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥51153.00"
textAlignment=
"right"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"JyG-Tf-6Jd"
>
<rect
key=
"frame"
x=
"291.5"
y=
"60"
width=
"63.5"
height=
"18.5"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"18.5"
id=
"11o-H0-KIf"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"HYf-UQ-mHg"
secondAttribute=
"trailing"
constant=
"17"
id=
"1et-A0-Mm7"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"HYf-UQ-mHg"
secondAttribute=
"trailing"
constant=
"17"
id=
"1et-A0-Mm7"
/>
<constraint
firstItem=
"4lb-rz-I6F"
firstAttribute=
"centerY"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"centerY"
id=
"6mE-8H-dPD"
/>
<constraint
firstItem=
"4lb-rz-I6F"
firstAttribute=
"centerY"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"centerY"
id=
"6mE-8H-dPD"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"Rio-TZ-iyo"
secondAttribute=
"trailing"
id=
"Bgy-0b-yb6"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"Rio-TZ-iyo"
secondAttribute=
"trailing"
id=
"Bgy-0b-yb6"
/>
<constraint
firstItem=
"4lb-rz-I6F"
firstAttribute=
"centerX"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"centerX"
id=
"DtW-X9-NRk"
/>
<constraint
firstItem=
"4lb-rz-I6F"
firstAttribute=
"centerX"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"centerX"
id=
"DtW-X9-NRk"
/>
<constraint
firstItem=
"Rio-TZ-iyo"
firstAttribute=
"top"
secondItem=
"JyG-Tf-6Jd"
secondAttribute=
"bottom"
constant=
"5"
id=
"H2a-ha-CdE"
/>
<constraint
firstItem=
"Rio-TZ-iyo"
firstAttribute=
"bottom"
secondItem=
"X1B-vl-mvy"
secondAttribute=
"bottom"
id=
"JcG-ly-QUv"
/>
<constraint
firstItem=
"Rio-TZ-iyo"
firstAttribute=
"bottom"
secondItem=
"X1B-vl-mvy"
secondAttribute=
"bottom"
id=
"JcG-ly-QUv"
/>
<constraint
firstItem=
"AWX-Qu-0ML"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"PkW-SQ-lMP"
/>
<constraint
firstItem=
"AWX-Qu-0ML"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"PkW-SQ-lMP"
/>
<constraint
firstItem=
"AWX-Qu-0ML"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"QkU-Fn-YVB"
/>
<constraint
firstItem=
"AWX-Qu-0ML"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"QkU-Fn-YVB"
/>
<constraint
firstItem=
"ftv-xQ-eXW"
firstAttribute=
"trailing"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"trailing"
constant=
"7.5"
id=
"R1R-mm-RvM"
/>
<constraint
firstItem=
"ftv-xQ-eXW"
firstAttribute=
"trailing"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"trailing"
constant=
"7.5"
id=
"R1R-mm-RvM"
/>
<constraint
firstItem=
"JyG-Tf-6Jd"
firstAttribute=
"trailing"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"trailingMargin"
id=
"SVb-FW-34b"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"LBB-wB-bMd"
secondAttribute=
"trailing"
constant=
"15"
id=
"U69-j9-gAo"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"LBB-wB-bMd"
secondAttribute=
"trailing"
constant=
"15"
id=
"U69-j9-gAo"
/>
<constraint
firstItem=
"HYf-UQ-mHg"
firstAttribute=
"top"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"top"
id=
"UBt-NG-mg3"
/>
<constraint
firstItem=
"HYf-UQ-mHg"
firstAttribute=
"top"
secondItem=
"AWX-Qu-0ML"
secondAttribute=
"top"
id=
"UBt-NG-mg3"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"X1B-vl-mvy"
secondAttribute=
"trailing"
constant=
"15"
id=
"ZfW-BJ-Tbo"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"X1B-vl-mvy"
secondAttribute=
"trailing"
constant=
"15"
id=
"ZfW-BJ-Tbo"
/>
...
@@ -149,6 +160,7 @@
...
@@ -149,6 +160,7 @@
<outlet
property=
"delImg"
destination=
"ftv-xQ-eXW"
id=
"CON-aC-p5Y"
/>
<outlet
property=
"delImg"
destination=
"ftv-xQ-eXW"
id=
"CON-aC-p5Y"
/>
<outlet
property=
"detailLbl"
destination=
"LBB-wB-bMd"
id=
"Z5L-Om-fG8"
/>
<outlet
property=
"detailLbl"
destination=
"LBB-wB-bMd"
id=
"Z5L-Om-fG8"
/>
<outlet
property=
"detailLbl2"
destination=
"X1B-vl-mvy"
id=
"h0s-3d-jnl"
/>
<outlet
property=
"detailLbl2"
destination=
"X1B-vl-mvy"
id=
"h0s-3d-jnl"
/>
<outlet
property=
"diLbl"
destination=
"JyG-Tf-6Jd"
id=
"loL-0t-j6w"
/>
<outlet
property=
"imgView"
destination=
"AWX-Qu-0ML"
id=
"BQH-fG-eL9"
/>
<outlet
property=
"imgView"
destination=
"AWX-Qu-0ML"
id=
"BQH-fG-eL9"
/>
<outlet
property=
"priceLbl"
destination=
"Rio-TZ-iyo"
id=
"Ivg-2f-C6y"
/>
<outlet
property=
"priceLbl"
destination=
"Rio-TZ-iyo"
id=
"Ivg-2f-C6y"
/>
<outlet
property=
"titleLbl"
destination=
"HYf-UQ-mHg"
id=
"bMC-Ni-Yjv"
/>
<outlet
property=
"titleLbl"
destination=
"HYf-UQ-mHg"
id=
"bMC-Ni-Yjv"
/>
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
f40eb3e8
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
import
UIKit
import
UIKit
import
IQKeyboardManagerSwift
import
IQKeyboardManagerSwift
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
DZGLViewControllerDelegate
,
XuanZeShangPinViewControllerDelegate
,
DaiKeXiaDanGouWuCellDelegate
,
GuanLianKehuVCDelegate
{
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
DZGLViewControllerDelegate
,
XuanZeShangPinViewControllerDelegate
,
DaiKeXiaDanGouWuCellDelegate
,
GuanLianKehuVCDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
TitleAndTFCellDelegate
{
let
ddTypeArr
=
[
"普通订单"
,
"预售下单"
]
let
ddTypeArr
=
[
"普通订单"
,
"预售下单"
]
let
zfTypeArr
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
let
zfTypeArr
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
...
@@ -29,6 +29,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -29,6 +29,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
var
cellDataArr
:
Array
<
XuanZeShangPinCell
>
=
[]
//回调选择记录
var
cellDataArr
:
Array
<
XuanZeShangPinCell
>
=
[]
//回调选择记录
var
dj_payStatus
=
0
//定金支付状态
var
dj_payStatus
=
0
//定金支付状态
var
dj_payWay
=
0
//定金支付方式
var
dj_payWay
=
0
//定金支付方式
var
logistics_price
=
""
//运费
var
other_price
=
""
//其他费用
var
orderType
:
Int
?
//订单类型
var
orderType
:
Int
?
//订单类型
var
adrData
:
GetAddrsInfoDataModel
?
//地址数据
var
adrData
:
GetAddrsInfoDataModel
?
//地址数据
...
@@ -38,9 +40,51 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -38,9 +40,51 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
btmView
:
UILabel
!
@IBOutlet
weak
var
btmView
:
UILabel
!
//MARK: - 提交订单
//MARK: - 提交订单
-立即下单
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
@IBAction
func
submitAction
(
_
sender
:
Any
)
{
print
(
"提交订单"
)
print
(
"提交订单"
)
//暂时不做判断处理
//待补充
if
cusModel
==
nil
{
HUD
.
flash
(
.
label
(
"请选择关联客户"
),
delay
:
1.2
)
return
}
if
orderType
==
nil
{
HUD
.
flash
(
.
label
(
"请选择订单类型"
),
delay
:
1.2
)
return
}
if
cellDataArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请添加商品"
),
delay
:
1.2
)
return
}
if
tiHuoWay
==
1
&&
adrData
==
nil
{
HUD
.
flash
(
.
label
(
"请选择地址"
),
delay
:
1.2
)
return
}
let
goods_info
=
getGoodsInfo
()
let
order_info
=
getOrderInfo
()
var
is_adsale
=
0
if
orderType
==
1
{
is_adsale
=
1
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
order
=
[
"user_token"
:
UserToken
as
Any
,
"is_adsale"
:
is_adsale
as
Any
,
"goods_info"
:
goods_info
as
Any
,
"order_info"
:
order_info
as
Any
]
as
[
String
:
Any
]
print
(
order
)
HUD
.
flash
(
.
progress
)
addOrder
(
order
,
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
}
else
{
HUD
.
hide
()
}
})
{
(
error
)
in
}
}
}
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
...
@@ -96,7 +140,17 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -96,7 +140,17 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
print
(
cellData
.
countTF
)
print
(
cellData
.
countTF
)
let
countStr
=
cellData
.
countTF
.
text
!
as!
NSString
let
countStr
=
cellData
.
countTF
.
text
!
as!
NSString
cell
.
detailLbl2
.
text
=
"¥
\(
priceStr
.
floatValue
)
x
\(
countStr
.
integerValue
)
"
cell
.
detailLbl2
.
text
=
"¥
\(
priceStr
.
floatValue
)
x
\(
countStr
.
integerValue
)
"
if
orderType
==
1
{
cell
.
diLbl
.
isHidden
=
false
cell
.
diLbl
.
text
=
"定金:¥"
+
djTFstr
cell
.
totalPriceLbl
.
text
=
"尾款:¥"
+
wkTFstr
}
else
{
cell
.
totalPriceLbl
.
text
=
"¥
\(
priceStr
.
floatValue
*
countStr
.
floatValue
)
"
cell
.
totalPriceLbl
.
text
=
"¥
\(
priceStr
.
floatValue
*
countStr
.
floatValue
)
"
cell
.
diLbl
.
isHidden
=
true
}
return
cell
return
cell
case
2
:
case
2
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
...
@@ -138,7 +192,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -138,7 +192,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
if
indexPath
.
row
==
3
{
if
indexPath
.
row
==
3
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DKXDAdrCell"
)
as!
DKXDAdrCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DKXDAdrCell"
)
as!
DKXDAdrCell
cell
.
nameLbl
.
text
=
p3Arr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
p3Arr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
"
\(
adrData
?
.
consignee
)
\(
adrData
?
.
mobile
)
"
cell
.
contentLbl
.
text
=
(
adrData
?
.
consignee
)
!
+
" "
+
(
adrData
?
.
mobile
)
!
cell
.
adrLbl
.
text
=
adrData
?
.
addr_cn
cell
.
adrLbl
.
text
=
adrData
?
.
addr_cn
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
return
cell
return
cell
...
@@ -159,13 +214,14 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -159,13 +214,14 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
cell
.
textTF
.
layer
.
borderWidth
=
1
cell
.
textTF
.
layer
.
borderWidth
=
1
cell
.
textTF
.
returnKeyType
=
.
done
cell
.
textTF
.
returnKeyType
=
.
done
cell
.
textTF
.
layer
.
borderColor
=
UIColor
(
named
:
"灰色字体颜色"
)?
.
cgColor
cell
.
textTF
.
layer
.
borderColor
=
UIColor
(
named
:
"灰色字体颜色"
)?
.
cgColor
cell
.
textTF
.
placeholder
=
"请输入
运费
"
cell
.
textTF
.
placeholder
=
"请输入
费用
"
cell
.
textTF
.
keyboardType
=
.
numbersAndPunctuation
cell
.
textTF
.
keyboardType
=
.
numbersAndPunctuation
cell
.
textTF
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
textTF
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
if
indexPath
.
row
==
5
{
if
indexPath
.
row
==
5
{
cell
.
textTF
.
placeholder
=
"请输入
费用
"
cell
.
textTF
.
placeholder
=
"请输入
运费
"
}
}
cell
.
textTF
.
textAlignment
=
.
center
cell
.
textTF
.
textAlignment
=
.
center
cell
.
delegate
=
self
return
cell
return
cell
}
}
}
}
...
@@ -290,9 +346,16 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -290,9 +346,16 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
}
}
//MARK: - 跳转修改价格
//MARK: - 跳转修改价格
var
djTFstr
:
String
=
""
;
var
wkTFstr
:
String
=
""
;
@objc
func
jumpToEditPrice
(){
@objc
func
jumpToEditPrice
(){
if
orderType
==
1
{
//预售
if
orderType
==
1
{
//预售
let
vc
=
XiuGaiYuShouJiaViewController
()
let
vc
=
XiuGaiYuShouJiaViewController
()
vc
.
inputData
=
cellDataArr
vc
.
djTFstr
=
djTFstr
vc
.
wkTFstr
=
wkTFstr
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
//普通
}
else
{
//普通
let
vc
=
XuanZeShangPinViewController
()
let
vc
=
XuanZeShangPinViewController
()
...
@@ -319,6 +382,12 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -319,6 +382,12 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
cellDataArr
=
inputData
cellDataArr
=
inputData
listView
.
reloadData
()
listView
.
reloadData
()
}
}
//MARK:-- 修改价格(预售)回调
func
changeYuShouGoodsByData
(
sender
:
EditOGPAdDataModel
?,
djText
:
String
,
wkText
:
String
)
{
djTFstr
=
djText
wkTFstr
=
wkText
listView
.
reloadData
()
}
//MARK: - glalertSelectViewSelect
//MARK: - glalertSelectViewSelect
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
...
@@ -391,6 +460,10 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -391,6 +460,10 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
}
}
//MARK: - 删除已选商品
//MARK: - 删除已选商品
func
DaiKeXiaDanGouWuCellDelAction
(
cell
:
DaiKeXiaDanGouWuCell
)
{
func
DaiKeXiaDanGouWuCellDelAction
(
cell
:
DaiKeXiaDanGouWuCell
)
{
if
orderType
==
1
{
djTFstr
=
""
wkTFstr
=
""
}
cellDataArr
.
remove
(
at
:
cell
.
tag
)
cellDataArr
.
remove
(
at
:
cell
.
tag
)
listView
.
reloadData
()
listView
.
reloadData
()
}
}
...
@@ -572,4 +645,143 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -572,4 +645,143 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
glSelectView
=
nil
glSelectView
=
nil
}
}
//MARK:--处理提交数据GoodsInfo
func
getGoodsInfo
()
->
String
{
var
goodsInfo
:
String
=
""
var
goodsArr
:
Array
<
Any
>
=
[]
if
orderType
==
1
{
cellDataArr
.
forEach
{
(
cell
)
in
let
priceStr
=
cell
.
priceTF
.
text
!
as
NSString
let
countStr
=
cell
.
countTF
.
text
!
as
NSString
let
subtoal
=
priceStr
.
floatValue
*
countStr
.
floatValue
let
goods
=
[
"goods_name"
:
cell
.
cellModel
?
.
goods_name
as
Any
,
//商品名称
"dj_amount"
:
djTFstr
as
Any
,
// 定金金额【预售订单才传
"wk_amount"
:
wkTFstr
as
Any
,
//尾款金额【预售订单才传】
"sku_attr"
:
cell
.
cellModel
?
.
sku_attr
as
Any
,
//规格
"adsale_inventory"
:
cell
.
cellModel
?
.
adsale_inventory
as
Any
,
//库存【预售订单才传】
"number"
:
cell
.
countTF
.
text
as
Any
,
//购买数量
"unit"
:
cell
.
cellModel
?
.
unit
as
Any
,
//单位
"price"
:
cell
.
cellModel
?
.
price
as
Any
,
//价格
"r_price"
:
cell
.
priceTF
.
text
as
Any
,
//售价
"is_gift"
:
0
,
//是否搭赠,1是0非,现版本固定0
"subtotal"
:
subtoal
,
//总价
"goods_id"
:
cell
.
cellModel
?
.
goods_id
as
Any
,
//商品ID
"sku_id"
:
cell
.
cellModel
?
.
sku_id
as
Any
]
as
[
String
:
Any
]
goodsArr
.
append
(
goods
)
}
}
else
{
cellDataArr
.
forEach
{
(
cell
)
in
let
priceStr
=
cell
.
priceTF
.
text
!
as
NSString
let
countStr
=
cell
.
countTF
.
text
!
as
NSString
let
subtoal
=
priceStr
.
floatValue
*
countStr
.
floatValue
let
goods
=
[
"goods_name"
:
cell
.
cellModel
?
.
goods_name
as
Any
,
"sku_attr"
:
cell
.
cellModel
?
.
sku_attr
as
Any
,
"inventory"
:
cell
.
cellModel
?
.
inventory
as
Any
,
//库存【普通订单才传】
"number"
:
cell
.
countTF
.
text
as
Any
,
"unit"
:
cell
.
cellModel
?
.
unit
as
Any
,
"price"
:
cell
.
cellModel
?
.
price
as
Any
,
"r_price"
:
cell
.
priceTF
.
text
as
Any
,
"is_gift"
:
0
,
"subtotal"
:
subtoal
,
"goods_id"
:
cell
.
cellModel
?
.
goods_id
as
Any
,
"sku_id"
:
cell
.
cellModel
?
.
sku_id
as
Any
]
as
[
String
:
Any
]
goodsArr
.
append
(
goods
)
}
}
goodsInfo
=
dataChangeString
(
sender
:
goodsArr
)
return
goodsInfo
}
//MARK:--处理提交数据OrderInfo
func
getOrderInfo
()
->
String
{
var
orderInfo
:
String
=
""
var
payType
=
0
if
zhiFuWay
==
0
{
payType
=
zhiFuWay
}
else
if
zhiFuWay
==
1
{
payType
=
7
}
else
{
payType
=
zhiFuWay
+
7
}
var
payStatus
=
0
if
zhiFuStatus
==
2
{
payStatus
=
10
//月结
}
else
if
zhiFuStatus
==
3
{
payStatus
=
2
//已付款
}
else
{
payStatus
=
zhiFuStatus
}
var
shipping_type
=
0
if
tiHuoWay
==
0
{
shipping_type
=
2
}
else
if
tiHuoWay
==
1
{
shipping_type
=
1
}
var
caddrId
=
0
if
shipping_type
==
1
{
if
adrData
!=
nil
{
caddrId
=
adrData
?
.
caddr_id
!
as!
Int
}
}
if
orderType
==
1
{
var
djpayType
=
0
if
dj_payWay
==
0
{
djpayType
=
dj_payWay
}
else
if
dj_payWay
==
1
{
djpayType
=
7
}
else
{
djpayType
=
dj_payWay
+
7
}
var
djpayStatus
=
0
if
dj_payStatus
==
2
{
djpayStatus
=
10
//月结
}
else
if
dj_payStatus
==
3
{
djpayStatus
=
2
//已付款
}
else
{
djpayStatus
=
dj_payStatus
}
let
dic
=
[
"cus_id"
:
cusModel
?
.
cus_id
as
Any
,
//客户ID
"dj_pay_type"
:
djpayType
as
Any
,
//支付类型,0未支付7现金9转账(私)10转账(公)11转账(微信)12转账(支付宝)
"dj_pay_status"
:
djpayStatus
as
Any
,
//支付状态,0未付款;1欠款;2已付款10月结
"wk_pay_type"
:
payType
as
Any
,
"wk_pay_status"
:
payStatus
as
Any
,
"need_check"
:
0
,
//付款是否需要审核 1是 0否
"s_status"
:(
chuHuoWay
+
1
)
as
Any
,
//是否出库 1 暂不出库 2直接出库
"shipping_type"
:
shipping_type
as
Any
,
//提货方式 1派送 2自提
"caddr_id"
:
caddrId
as
Any
,
//客户地址id,无地址填0,一定要根据客户获取这个地址ID
"logistics_price"
:
logistics_price
as
Any
,
//运费
"other_price"
:
other_price
as
Any
]
as
[
String
:
Any
]
orderInfo
=
dictChangeString
(
sender
:
dic
)
}
else
{
let
dic
=
[
"cus_id"
:
cusModel
?
.
cus_id
as
Any
,
"pay_type"
:
payType
as
Any
,
"pay_status"
:
payStatus
as
Any
,
"need_check"
:
0
,
"s_status"
:(
chuHuoWay
+
1
)
as
Any
,
"shipping_type"
:
shipping_type
as
Any
,
"caddr_id"
:
caddrId
as
Any
,
"logistics_price"
:
logistics_price
as
Any
,
"other_price"
:
other_price
as
Any
]
as
[
String
:
Any
]
orderInfo
=
dictChangeString
(
sender
:
dic
)
}
return
orderInfo
}
//MARK:--运费 & 其他费用
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
if
cell
.
nameLbl
.
text
==
"运费"
{
logistics_price
=
content
print
(
logistics_price
)
}
else
if
cell
.
nameLbl
.
text
==
"其他费用"
{
other_price
=
content
print
(
other_price
)
}
}
}
}
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
View file @
f40eb3e8
...
@@ -146,6 +146,7 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
...
@@ -146,6 +146,7 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
cell
.
idx
=
indexPath
cell
.
idx
=
indexPath
let
model
=
datas
[
indexPath
.
row
]
let
model
=
datas
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
model
.
goods_name
cell
.
nameLbl
.
text
=
model
.
goods_name
cell
.
cellModel
=
model
cell
.
detailLbl
.
text
=
"
\(
model
.
spec_str
!
)
/
\(
model
.
unit
!
)
"
cell
.
detailLbl
.
text
=
"
\(
model
.
spec_str
!
)
/
\(
model
.
unit
!
)
"
cell
.
detailLbl2
.
text
=
"存储:
\(
model
.
inventory
!
)
"
cell
.
detailLbl2
.
text
=
"存储:
\(
model
.
inventory
!
)
"
cell
.
iconImg
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_img
!
))
cell
.
iconImg
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_img
!
))
...
...
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
View file @
f40eb3e8
...
@@ -32,10 +32,12 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
...
@@ -32,10 +32,12 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
navbar
.
rightTitle
=
"新增"
navbar
.
rightTitle
=
"新增"
self
.
view
.
addSubview
(
navbar
)
self
.
view
.
addSubview
(
navbar
)
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
getAddrsInfo
([
"user_token"
:
UserToken
,
"cus_id"
:
cus_id
],
success
:
{
(
data
)
in
getAddrsInfo
([
"user_token"
:
UserToken
,
"cus_id"
:
cus_id
],
success
:
{
(
data
)
in
self
.
adrInfo
=
data
as!
GetAddrsInfoModel
self
.
adrInfo
=
data
as!
GetAddrsInfoModel
self
.
listView
.
reloadData
()
self
.
listView
.
reloadData
()
HUD
.
hide
()
})
{
(
error
)
in
})
{
(
error
)
in
}
}
...
...
GeliBusinessPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
View file @
f40eb3e8
...
@@ -22,14 +22,25 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
...
@@ -22,14 +22,25 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
@IBAction
func
submitAction
(
_
sender
:
LGButton
)
{
@IBAction
func
submitAction
(
_
sender
:
LGButton
)
{
print
(
"确定"
)
print
(
"确定"
)
if
order_id
==
0
{
//MARK:--代客下单流程的关联客服
self
.
delegate
?
.
GuanLianKehuSelect
(
keHuData
:
self
.
dataArr
[
self
.
selectIdx
!
])
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
return
}
if
selectIdx
!=
nil
{
if
selectIdx
!=
nil
{
HUD
.
flash
(
.
progress
)
HUD
.
flash
(
.
progress
)
let
model
=
self
.
dataArr
[
self
.
selectIdx
!
]
let
model
=
self
.
dataArr
[
self
.
selectIdx
!
]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
bindCus
([
"cus_id"
:
model
.
cus_id
as
Any
,
"user_token"
:
UserToken
as
Any
,
"order_id"
:
order_id
as
Any
],
success
:
{
(
data
)
in
bindCus
([
"cus_id"
:
model
.
cus_id
as
Any
,
"user_token"
:
UserToken
as
Any
,
"order_id"
:
order_id
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
self
.
delegate
?
.
GuanLianKehuSelect
(
keHuData
:
self
.
dataArr
[
self
.
selectIdx
!
])
self
.
delegate
?
.
GuanLianKehuSelect
(
keHuData
:
self
.
dataArr
[
self
.
selectIdx
!
])
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
})
{
(
error
)
in
})
{
(
error
)
in
}
}
...
...
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
View file @
f40eb3e8
...
@@ -32,6 +32,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
...
@@ -32,6 +32,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
//MARK:--确认修改价格
//MARK:--确认修改价格
@IBAction
func
sureAction
(
_
sender
:
LGButton
)
{
@IBAction
func
sureAction
(
_
sender
:
LGButton
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
order_goodsArr
:
Array
<
Any
>
?
=
[]
var
order_goodsArr
:
Array
<
Any
>
?
=
[]
...
...
GeliBusinessPlatform/ViewController/订单管理/预售价格修改/XiuGaiYuShouJiaViewController.swift
View file @
f40eb3e8
...
@@ -9,13 +9,16 @@
...
@@ -9,13 +9,16 @@
import
UIKit
import
UIKit
import
LGButton
import
LGButton
protocol
XiuGaiYuShouJiaViewControllerDelegate
{
protocol
XiuGaiYuShouJiaViewControllerDelegate
{
func
changeYuShouGoodsByData
(
sender
:
EditOGPAdDataModel
)
func
changeYuShouGoodsByData
(
sender
:
EditOGPAdDataModel
?,
djText
:
String
,
wkText
:
String
)
}
}
class
XiuGaiYuShouJiaViewController
:
BaseViewController
{
class
XiuGaiYuShouJiaViewController
:
BaseViewController
{
var
dataModel
:
OrderDetailDataModel
?
var
dataModel
:
OrderDetailDataModel
?
var
orderID
:
Int
?
=
0
var
orderID
:
Int
?
=
0
var
delegate
:
XiuGaiYuShouJiaViewControllerDelegate
?
var
delegate
:
XiuGaiYuShouJiaViewControllerDelegate
?
var
inputData
:
Array
<
XuanZeShangPinCell
>
=
[]
var
djTFstr
:
String
=
""
;
var
wkTFstr
:
String
=
""
;
@IBOutlet
weak
var
firstView
:
UIView
!
@IBOutlet
weak
var
firstView
:
UIView
!
@IBOutlet
weak
var
weiKuanTF
:
UITextField
!
@IBOutlet
weak
var
weiKuanTF
:
UITextField
!
...
@@ -39,6 +42,7 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
...
@@ -39,6 +42,7 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
make
.
left
.
right
.
equalTo
(
0
)
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
120*
glscale
)
make
.
height
.
equalTo
(
120*
glscale
)
}
}
if
orderID
!=
0
{
if
(
dataModel
?
.
order_goods
!.
count
)
!
>
0
{
if
(
dataModel
?
.
order_goods
!.
count
)
!
>
0
{
let
rowModel
=
dataModel
?
.
order_goods
!
[
0
]
let
rowModel
=
dataModel
?
.
order_goods
!
[
0
]
titleLbl
.
text
=
rowModel
!.
goods_name
titleLbl
.
text
=
rowModel
!.
goods_name
...
@@ -47,12 +51,28 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
...
@@ -47,12 +51,28 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
dingJinTF
.
text
=
dataModel
?
.
order_res
?
.
sale_res
?
.
dj_amount
dingJinTF
.
text
=
dataModel
?
.
order_res
?
.
sale_res
?
.
dj_amount
weiKuanTF
.
text
=
dataModel
?
.
order_res
?
.
sale_res
?
.
wk_amount
weiKuanTF
.
text
=
dataModel
?
.
order_res
?
.
sale_res
?
.
wk_amount
}
}
}
else
{
//MARK:--代客下单流程
if
inputData
.
count
>
0
{
let
cell1
=
inputData
[
0
]
titleLbl
.
text
=
cell1
.
nameLbl
.
text
detailLbl
.
text
=
cell1
.
detailLbl
.
text
icomImg
.
sd_setImage
(
with
:
URL
(
string
:
cell1
.
imgUrlPath
!
))
countLbl
.
isHidden
=
true
dingJinTF
.
text
=
djTFstr
weiKuanTF
.
text
=
wkTFstr
}
}
}
}
@IBAction
func
submitACTION
(
_
sender
:
Any
)
{
@IBAction
func
submitACTION
(
_
sender
:
Any
)
{
print
(
"预售返回上一级且提交了数据"
)
print
(
"预售返回上一级且提交了数据"
)
if
orderID
!=
0
{
//MARK:--需要对输入是否为金额判断
//MARK:--需要对输入是否为金额判断
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
rowModel
=
dataModel
?
.
order_goods
!
[
0
]
let
rowModel
=
dataModel
?
.
order_goods
!
[
0
]
...
@@ -60,13 +80,19 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
...
@@ -60,13 +80,19 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
editOrderGoodsPriceAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderID
as
Any
,
"og_id"
:
rowModel
?
.
og_id
as
Any
,
"dj_amount"
:
dingJinTF
.
text
as
Any
,
"wk_amount"
:
weiKuanTF
.
text
as
Any
],
success
:
{
(
data
)
in
editOrderGoodsPriceAd
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderID
as
Any
,
"og_id"
:
rowModel
?
.
og_id
as
Any
,
"dj_amount"
:
dingJinTF
.
text
as
Any
,
"wk_amount"
:
weiKuanTF
.
text
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
EditOGPAdModel
let
dataM
=
data
as!
EditOGPAdModel
if
dataM
.
code
==
1
{
if
dataM
.
code
==
1
{
self
.
delegate
?
.
changeYuShouGoodsByData
(
sender
:
dataM
.
data
!
)
self
.
delegate
?
.
changeYuShouGoodsByData
(
sender
:
dataM
.
data
!
,
djText
:
self
.
dingJinTF
.
text
!
,
wkText
:
self
.
weiKuanTF
.
text
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
})
{
(
error
)
in
})
{
(
error
)
in
}
}
}
else
{
//MARK:--代客下单流程
self
.
delegate
?
.
changeYuShouGoodsByData
(
sender
:
nil
,
djText
:
dingJinTF
.
text
!
,
wkText
:
weiKuanTF
.
text
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
}
...
...
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
f40eb3e8
...
@@ -235,15 +235,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
...
@@ -235,15 +235,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
}
//MARK:--修改价格(预售返回数据)
//MARK:--修改价格(预售返回数据)
func
changeYuShouGoodsByData
(
sender
:
EditOGPAdDataModel
)
{
func
changeYuShouGoodsByData
(
sender
:
EditOGPAdDataModel
?,
djText
:
String
,
wkText
:
String
)
{
print
(
"修改价格(预售返回数据)--只更新datamodel,不请求网络
\(
sender
)
"
)
print
(
"修改价格(预售返回数据)--只更新datamodel,不请求网络
\(
sender
)
"
)
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
=
sender
.
dj_amount
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
dj_amount
=
sender
!
.
dj_amount
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
=
sender
.
wk_amount
self
.
dataMdoel
?
.
order_res
?
.
sale_res
?
.
wk_amount
=
sender
!
.
wk_amount
// listView.reloadData()
// listView.reloadData()
loadData
()
loadData
()
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
let
view
=
UIView
()
switch
section
{
switch
section
{
...
...
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