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
0dfe446a
Commit
0dfe446a
authored
Oct 27, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线下版本-实现订单的发票管理(缺查看发票信息)
parent
19375ae7
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
538 additions
and
314 deletions
+538
-314
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+4
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+4
-4
GeliBusinessPlatform/Interface/Interface_Z.plist
GeliBusinessPlatform/Interface/Interface_Z.plist
+8
-0
GeliBusinessPlatform/Model/Interface.swift
GeliBusinessPlatform/Model/Interface.swift
+4
-0
GeliBusinessPlatform/Model/OrderInterface.swift
GeliBusinessPlatform/Model/OrderInterface.swift
+30
-0
GeliBusinessPlatform/Model/OrderManageModel/InvoiceInfoModel.swift
...essPlatform/Model/OrderManageModel/InvoiceInfoModel.swift
+38
-0
GeliBusinessPlatform/Model/OrderManageModel/OrderDetailModel.swift
...essPlatform/Model/OrderManageModel/OrderDetailModel.swift
+4
-2
GeliBusinessPlatform/Model/OrderManageModel/OrderListModel.swift
...inessPlatform/Model/OrderManageModel/OrderListModel.swift
+1
-0
GeliBusinessPlatform/Model/UpDataModel.swift
GeliBusinessPlatform/Model/UpDataModel.swift
+1
-1
GeliBusinessPlatform/View/Cell/UpBillDataTableViewCell.swift
GeliBusinessPlatform/View/Cell/UpBillDataTableViewCell.swift
+21
-2
GeliBusinessPlatform/View/Cell/UpBillDataTableViewCell.xib
GeliBusinessPlatform/View/Cell/UpBillDataTableViewCell.xib
+25
-29
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+398
-276
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
0dfe446a
...
...
@@ -579,6 +579,7 @@
F9956B22246408A6001A617D
/* GoodsClassViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9956B20246408A6001A617D
/* GoodsClassViewController.swift */
;
};
F9956B23246408A6001A617D
/* GoodsClassViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9956B21246408A6001A617D
/* GoodsClassViewController.xib */
;
};
F9956B2524640D34001A617D
/* GoodsClassModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9956B2424640D34001A617D
/* GoodsClassModel.swift */
;
};
F995CEA62547CAC000202BA8
/* InvoiceInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F995CEA52547CAC000202BA8
/* InvoiceInfoModel.swift */
;
};
F9A0E1DD246D198B00D7F26F
/* CusListAllModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9A0E1DC246D198B00D7F26F
/* CusListAllModel.swift */
;
};
F9A0E1DF246D1B1E00D7F26F
/* GetGoodsInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9A0E1DE246D1B1E00D7F26F
/* GetGoodsInfoModel.swift */
;
};
F9A4AB6E24C927E900094BD1
/* LogisticsCostDetailViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9A4AB6C24C927E900094BD1
/* LogisticsCostDetailViewController.swift */
;
};
...
...
@@ -1266,6 +1267,7 @@
F9956B20246408A6001A617D
/* GoodsClassViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GoodsClassViewController.swift
;
sourceTree
=
"<group>"
;
};
F9956B21246408A6001A617D
/* GoodsClassViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
GoodsClassViewController.xib
;
sourceTree
=
"<group>"
;
};
F9956B2424640D34001A617D
/* GoodsClassModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GoodsClassModel.swift
;
sourceTree
=
"<group>"
;
};
F995CEA52547CAC000202BA8
/* InvoiceInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
InvoiceInfoModel.swift
;
sourceTree
=
"<group>"
;
};
F9A0E1DC246D198B00D7F26F
/* CusListAllModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CusListAllModel.swift
;
sourceTree
=
"<group>"
;
};
F9A0E1DE246D1B1E00D7F26F
/* GetGoodsInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GetGoodsInfoModel.swift
;
sourceTree
=
"<group>"
;
};
F9A4AB6C24C927E900094BD1
/* LogisticsCostDetailViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LogisticsCostDetailViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2807,6 +2809,7 @@
F956D5BF246A3789003FF510
/* OrderDetailModel.swift */
,
F93E31F624721C4200524DFC
/* EditOGPAdModel.swift */
,
F9A0E1DC246D198B00D7F26F
/* CusListAllModel.swift */
,
F995CEA52547CAC000202BA8
/* InvoiceInfoModel.swift */
,
F9A0E1DE246D1B1E00D7F26F
/* GetGoodsInfoModel.swift */
,
F9FF7BA024760DA9006E305E
/* LogisticsCompanyModel.swift */
,
E02D586A2477A1480065A9EB
/* GetAddrsInfoModel.swift */
,
...
...
@@ -3731,6 +3734,7 @@
F950FDDF24518B9500C40530
/* FSCalendarSeparatorDecorationView.m in Sources */
,
F9023F692449A50900DD5A63
/* TitleContentCell.swift in Sources */
,
F95A9ED8245520E500867849
/* OrderListVC.swift in Sources */
,
F995CEA62547CAC000202BA8
/* InvoiceInfoModel.swift in Sources */
,
E03549A8245820C2008BD021
/* PiCiXuanZeCell.swift in Sources */
,
F9217E012485E6E800C4CF67
/* MessageListModel.swift in Sources */
,
F956D59E246A2D9C003FF510
/* LMNTextStorage+Export.m in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0dfe446a
No preview for this file type
GeliBusinessPlatform/Define/Define.swift
View file @
0dfe446a
...
...
@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址
//test
//
let SERVERCE_ImageHost = "https://z.gelifood.com/"
//
let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://zx.gelifood.com/"
let
SERVERCE_HOST
=
"https://zx.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://z.gelifood.com/"
let
SERVERCE_HOST
=
"https://z.gelifood.com/admin/"
//
let SERVERCE_ImageHost = "https://zx.gelifood.com/"
//
let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
////online
//视图常量
...
...
GeliBusinessPlatform/Interface/Interface_Z.plist
View file @
0dfe446a
...
...
@@ -258,5 +258,13 @@
<string>
Lalamove/payHllOrder
</string>
<key>
货拉拉格利支付
</key>
<string>
Lalamove/payHllDelivery
</string>
<key>
获取发票信息
</key>
<string>
Order/getInvoiceInfo
</string>
<key>
发票信息通知
</key>
<string>
Order/invoiceNotice
</string>
<key>
上传发票
</key>
<string>
Order/uploadInvoice
</string>
<key>
修改电子发票链接地址
</key>
<string>
Order/editInvoiceImg
</string>
</dict>
</plist>
GeliBusinessPlatform/Model/Interface.swift
View file @
0dfe446a
...
...
@@ -158,7 +158,10 @@ func saveFile(image: UIImage,_ params:[String:Any],success:@escaping (_ res:Any)
for
(
key
,
value
)
in
params
{
if
key
==
"path"
&&
((
value
as
AnyObject
)
.
contains
(
"goods"
)
||
(
value
as
AnyObject
)
.
contains
(
"banner"
))
{
urlStr
=
"商品图片上传"
}
else
if
key
==
"order_id"
{
urlStr
=
"上传发票"
}
//else if key == order_id 上传发票
}
print
(
"上传信息"
,
urlStr
,
params
,
image
)
...
...
@@ -199,3 +202,4 @@ func onOff(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@esc
failture
(
error
)
}
}
GeliBusinessPlatform/Model/OrderInterface.swift
View file @
0dfe446a
...
...
@@ -486,3 +486,33 @@ func confirmReceiving(_ params:[String:Any],success:@escaping (_ res:Any)->(),fa
}
}
//MARK:--发票信息通知
//params-key(user_token,order_id))
func
invoiceNotice
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"发票信息通知"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
//MARK:--修改电子发票链接地址
//params-key(user_token,order_id))
func
editInvoiceImg
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"修改电子发票链接地址"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
//MARK:--获取发票信息
//params-key(user_token,order_id))
func
getInvoiceInfo
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"获取发票信息"
,
params
,
{
(
rep
:
DataResponse
<
InvoiceInfoModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
GeliBusinessPlatform/Model/OrderManageModel/InvoiceInfoModel.swift
0 → 100644
View file @
0dfe446a
//
// InvoiceInfoModel.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/10/27.
// Copyright © 2020 junye lu. All rights reserved.
//
import
Foundation
import
ObjectMapper
//获取发票信息
class
InvoiceInfoModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
InvoiceInfoDataModel
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
InvoiceInfoDataModel
:
Mappable
{
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
}
}
GeliBusinessPlatform/Model/OrderManageModel/OrderDetailModel.swift
View file @
0dfe446a
...
...
@@ -72,7 +72,8 @@ class OrderDetailResModel: Mappable {
var
shipping_status
:
Int
?
//商品配送情况;0未发货,1已发货,2已收货,4退货
var
goods_before_pay
:
Int
?
var
sale_res
:
OrderDetailSaleResModel
?
//订单预售详情(不是预售订单为空数组,无key=>value)
var
invoice_img
:
String
?
//发票图片
var
invoice_link
:
String
?
//发票链接
required
init
?(
map
:
Map
)
{
}
...
...
@@ -111,7 +112,8 @@ class OrderDetailResModel: Mappable {
shipping_type
<-
map
[
"shipping_type"
]
sale_res
<-
map
[
"sale_res"
]
shipping_status
<-
map
[
"shipping_status"
]
invoice_img
<-
map
[
"invoice_img"
]
invoice_link
<-
map
[
"invoice_link"
]
}
}
func
orderStatusStrByInt
(
statusNumber
:
Int
,
status_d
:
Int
,
isBfPay
:
Int
,
LmIdx
:
Int
)
->
String
?
{
...
...
GeliBusinessPlatform/Model/OrderManageModel/OrderListModel.swift
View file @
0dfe446a
...
...
@@ -42,6 +42,7 @@ class OrderListDataModel: Mappable {
var
cus_name
:
String
?
//购买客户
var
goods_number
:
String
?
//订单商量总数
var
order_goods
:
Array
<
OrderListGoodsModel
>
?
required
init
?(
map
:
Map
)
{
}
...
...
GeliBusinessPlatform/Model/UpDataModel.swift
View file @
0dfe446a
...
...
@@ -8,7 +8,7 @@
import
Foundation
import
ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付
,发票消息短信通知,修改电子发票链接地址
class
UpDataModel
:
Mappable
{
...
...
GeliBusinessPlatform/View/Cell/UpBillDataTableViewCell.swift
View file @
0dfe446a
...
...
@@ -7,8 +7,13 @@
//
import
UIKit
protocol
UpBillDataTableViewCellDelegate
{
func
segmentChangeIndex
(
index
:
Int
)
func
UpBillDataTableViewCellSelectString
(
selectString
:
String
,
inputString
:
String
)
}
class
UpBillDataTableViewCell
:
UITableViewCell
,
UITextFieldDelegate
{
var
delegate
:
UpBillDataTableViewCellDelegate
?
class
UpBillDataTableViewCell
:
UITableViewCell
{
@IBOutlet
weak
var
selectSegmentV
:
UISegmentedControl
!
@IBOutlet
weak
var
updataBtn
:
UIButton
!
...
...
@@ -20,16 +25,18 @@ class UpBillDataTableViewCell: UITableViewCell {
//查看发票信息
@IBAction
func
checkBillDetailAction
(
_
sender
:
UIButton
)
{
print
(
"//查看发票信息"
)
delegate
?
.
UpBillDataTableViewCellSelectString
(
selectString
:
"查看发票信息"
,
inputString
:
""
)
}
//通知用户
@IBAction
func
noticUserAction
(
_
sender
:
UIButton
)
{
print
(
"//通知用户"
)
delegate
?
.
UpBillDataTableViewCellSelectString
(
selectString
:
"通知用户"
,
inputString
:
""
)
}
//上传发票
@IBAction
func
updataAction
(
_
sender
:
UIButton
)
{
print
(
"//上传发票"
)
delegate
?
.
UpBillDataTableViewCellSelectString
(
selectString
:
"上传发票"
,
inputString
:
""
)
}
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
...
...
@@ -39,6 +46,18 @@ class UpBillDataTableViewCell: UITableViewCell {
let
redAttribute1
=
[
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
.
init
(
named
:
"灰色字体颜色"
)
as
Any
,
NSAttributedString
.
Key
.
font
:
UIFont
.
systemFont
(
ofSize
:
13
)]
as
[
NSAttributedString
.
Key
:
Any
]
selectSegmentV
.
setTitleTextAttributes
(
redAttribute1
,
for
:
.
normal
)
selectSegmentV
.
addTarget
(
self
,
action
:
#selector(
sementedControlClick
)
,
for
:
.
valueChanged
)
inputInfoTF
.
delegate
=
self
}
@objc
func
sementedControlClick
()
{
print
(
"selectindex"
,
selectSegmentV
.
selectedSegmentIndex
)
delegate
?
.
segmentChangeIndex
(
index
:
selectSegmentV
.
selectedSegmentIndex
)
}
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
print
(
"end input"
,
textField
.
text
!
)
delegate
?
.
UpBillDataTableViewCellSelectString
(
selectString
:
"上传链接地址"
,
inputString
:
textField
.
text
!
)
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
...
...
GeliBusinessPlatform/View/Cell/UpBillDataTableViewCell.xib
View file @
0dfe446a
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097.2
"
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
7156
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
7126
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
rowHeight=
"3
79
"
id=
"KGk-i7-Jjw"
customClass=
"UpBillDataTableViewCell"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"4
60"
height=
"379
"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
rowHeight=
"3
13
"
id=
"KGk-i7-Jjw"
customClass=
"UpBillDataTableViewCell"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"4
49"
height=
"270
"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"4
60"
height=
"379
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"4
49"
height=
"270
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"发票信息"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vfq-yj-257"
>
<rect
key=
"frame"
x=
"15"
y=
"15"
width=
"60"
height=
"21"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"15"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"发票抬头"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"FsF-Gg-3X1"
>
<rect
key=
"frame"
x=
"15"
y=
"
51"
width=
"53
"
height=
"19"
/>
<rect
key=
"frame"
x=
"15"
y=
"
15"
width=
"52
"
height=
"19"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"
roundedRect
"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vSW-dv-R01"
>
<rect
key=
"frame"
x=
"3
66"
y=
"45"
width=
"79
"
height=
"31"
/>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"
system
"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vSW-dv-R01"
>
<rect
key=
"frame"
x=
"3
56"
y=
"9"
width=
"78
"
height=
"31"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<state
key=
"normal"
title=
"查看发票信息"
>
<color
key=
"titleColor"
name=
"蓝色字体颜色"
/>
...
...
@@ -41,14 +36,14 @@
</connections>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"IKR-cK-omw"
>
<rect
key=
"frame"
x=
"15"
y=
"
91"
width=
"430
"
height=
"1"
/>
<rect
key=
"frame"
x=
"15"
y=
"
55"
width=
"419
"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"灰色分界线"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"Fbh-Do-rqA"
/>
</constraints>
</view>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"
roundedRect
"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"avQ-Ht-Kh2"
>
<rect
key=
"frame"
x=
"3
63"
y=
"334
"
width=
"82"
height=
"30"
/>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"
system
"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"avQ-Ht-Kh2"
>
<rect
key=
"frame"
x=
"3
52"
y=
"225
"
width=
"82"
height=
"30"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"82"
id=
"O2g-tp-poT"
/>
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"fuH-Or-tGk"
/>
...
...
@@ -73,7 +68,7 @@
</connections>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"z2Y-im-0sy"
>
<rect
key=
"frame"
x=
"15"
y=
"
274
"
width=
"90"
height=
"90"
/>
<rect
key=
"frame"
x=
"15"
y=
"
165
"
width=
"90"
height=
"90"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"90"
id=
"B41-Xv-kap"
/>
<constraint
firstAttribute=
"width"
constant=
"90"
id=
"dUQ-pQ-c9C"
/>
...
...
@@ -89,22 +84,22 @@
</connections>
</button>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"上传发票"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2Km-B1-KpF"
>
<rect
key=
"frame"
x=
"15"
y=
"
245"
width=
"53
"
height=
"19"
/>
<rect
key=
"frame"
x=
"15"
y=
"
136"
width=
"52
"
height=
"19"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"tm2-Rk-h7z"
>
<rect
key=
"frame"
x=
"15"
y=
"
334"
width=
"338
"
height=
"30"
/>
<rect
key=
"frame"
x=
"15"
y=
"
225"
width=
"327
"
height=
"30"
/>
<subviews>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入或粘贴发票地址"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"wP4-ua-jqt"
>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"3
18
"
height=
"30"
/>
<rect
key=
"frame"
x=
"15"
y=
"0.0"
width=
"3
07
"
height=
"30"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
/>
</textField>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"wP4-ua-jqt"
secondAttribute=
"bottom"
id=
"6pS-Dx-vHc"
/>
<constraint
firstItem=
"wP4-ua-jqt"
firstAttribute=
"top"
secondItem=
"tm2-Rk-h7z"
secondAttribute=
"top"
id=
"BYc-DL-lkK"
/>
...
...
@@ -125,9 +120,9 @@
</userDefinedRuntimeAttributes>
</view>
<view
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hd8-Af-qe0"
>
<rect
key=
"frame"
x=
"12
8"
y=
"107
"
width=
"204"
height=
"30"
/>
<rect
key=
"frame"
x=
"12
2.5"
y=
"71
"
width=
"204"
height=
"30"
/>
<subviews>
<segmentedControl
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"top"
segmentControlStyle=
"plain"
selectedSegmentIndex=
"
0
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"eNf-Tz-SDG"
>
<segmentedControl
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"top"
segmentControlStyle=
"plain"
selectedSegmentIndex=
"
1
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"eNf-Tz-SDG"
>
<rect
key=
"frame"
x=
"-3"
y=
"-1"
width=
"210"
height=
"32"
/>
<color
key=
"backgroundColor"
name=
"app底色"
/>
<constraints>
...
...
@@ -149,7 +144,7 @@
</userDefinedRuntimeAttributes>
</segmentedControl>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"204"
id=
"CUr-7W-2Nf"
/>
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"Hqu-al-Cck"
/>
...
...
@@ -170,14 +165,12 @@
<constraint
firstItem=
"vSW-dv-R01"
firstAttribute=
"centerY"
secondItem=
"FsF-Gg-3X1"
secondAttribute=
"centerY"
id=
"6Gn-CY-eUz"
/>
<constraint
firstItem=
"2Km-B1-KpF"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"A1w-Y7-97z"
/>
<constraint
firstItem=
"z2Y-im-0sy"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"GgI-cR-pZh"
/>
<constraint
firstItem=
"vfq-yj-257"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"15"
id=
"Hco-vd-1X8"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"avQ-Ht-Kh2"
secondAttribute=
"bottom"
constant=
"15"
id=
"NwP-jz-fJg"
/>
<constraint
firstItem=
"FsF-Gg-3X1"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"15"
id=
"QwM-Py-QaN"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"tm2-Rk-h7z"
secondAttribute=
"bottom"
constant=
"15"
id=
"SeF-0s-oUx"
/>
<constraint
firstItem=
"vfq-yj-257"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"VS2-wj-eHB"
/>
<constraint
firstItem=
"IKR-cK-omw"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"dnF-Ym-dUV"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"IKR-cK-omw"
secondAttribute=
"trailing"
constant=
"15"
id=
"gUS-DK-KwM"
/>
<constraint
firstItem=
"hd8-Af-qe0"
firstAttribute=
"top"
secondItem=
"IKR-cK-omw"
secondAttribute=
"bottom"
constant=
"15"
id=
"j9X-OD-4mu"
/>
<constraint
firstItem=
"FsF-Gg-3X1"
firstAttribute=
"top"
secondItem=
"vfq-yj-257"
secondAttribute=
"bottom"
constant=
"15"
id=
"kUn-NG-VhK"
/>
<constraint
firstItem=
"hd8-Af-qe0"
firstAttribute=
"centerX"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerX"
id=
"m92-Sj-BWz"
/>
<constraint
firstItem=
"tm2-Rk-h7z"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"pEL-q1-Wuj"
/>
<constraint
firstItem=
"z2Y-im-0sy"
firstAttribute=
"top"
secondItem=
"2Km-B1-KpF"
secondAttribute=
"bottom"
constant=
"10"
id=
"q1q-Pi-4s0"
/>
...
...
@@ -195,7 +188,7 @@
<outlet
property=
"upDataTLbl"
destination=
"2Km-B1-KpF"
id=
"5OM-0R-6US"
/>
<outlet
property=
"updataBtn"
destination=
"z2Y-im-0sy"
id=
"In7-Bi-s6b"
/>
</connections>
<point
key=
"canvasLocation"
x=
"2
33.33333333333334"
y=
"232.70089285714283
"
/>
<point
key=
"canvasLocation"
x=
"2
25.36231884057972"
y=
"210.60267857142856
"
/>
</tableViewCell>
</objects>
<resources>
...
...
@@ -218,5 +211,8 @@
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27843137254901962"
green=
"0.5607843137254902"
blue=
"0.8901960784313725"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<systemColor
name=
"systemBackgroundColor"
>
<color
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
</systemColor>
</resources>
</document>
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
0dfe446a
...
...
@@ -7,10 +7,11 @@
//
import
UIKit
import
Photos
protocol
OrderDViewControllerDelegate
{
func
refishingOrderDchange
()
}
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
,
GLAlertSelectViewDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
ChangeGoodsPriceVCDelegate
,
GeliAlertTextFiledDelegate
,
GeliAlertTextViewDelegate
{
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
,
GLAlertSelectViewDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
ChangeGoodsPriceVCDelegate
,
GeliAlertTextFiledDelegate
,
GeliAlertTextViewDelegate
,
UpBillDataTableViewCellDelegate
{
var
lmIdx
=
100
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
...
...
@@ -76,7 +77,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func
loadData
()
{
HUD
.
flash
(
.
progress
)
orderDetail
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
],
success
:
{
(
data
)
in
orderDetail
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
],
success
:
{
[
self
]
(
data
)
in
HUD
.
hide
(
animated
:
true
)
let
dataM
=
data
as!
OrderDetailModel
self
.
dataMdoel
=
dataM
.
data
...
...
@@ -86,9 +87,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self
.
isYuShou
=
false
}
self
.
btmBtnsTitleArr
.
removeAll
()
self
.
bottomView
.
subviews
.
forEach
{
(
view
)
in
view
.
removeFromSuperview
()
...
...
@@ -143,7 +142,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self
.
zhiFuSelect
=
i
}
}
if
self
.
dataMdoel
?
.
order_res
?
.
invoice_img
!=
nil
{
self
.
UpBillDataUploadImgiconUrl
=
(
self
.
dataMdoel
?
.
order_res
?
.
invoice_img
!
)
!
}
else
{
if
(
self
.
dataMdoel
?
.
order_res
?
.
invoice_link
!.
count
)
!
>
0
{
self
.
segmentIndex
=
0
}
}
if
self
.
dataMdoel
?
.
order_res
?
.
invoice_link
!=
nil
{
self
.
inputInfoTFString
=
(
self
.
dataMdoel
?
.
order_res
?
.
invoice_link
)
!
}
self
.
listView
.
reloadData
()
...
...
@@ -167,208 +176,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
listView
.
register
(
UINib
(
nibName
:
"PingLunCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"PingLunCell"
)
listView
.
register
(
UINib
(
nibName
:
"GLKHCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GLKHCell"
)
listView
.
register
(
UINib
(
nibName
:
"UpBillDataTableViewCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"UpBillDataTableViewCell"
)
}
var
agreeType
=
10086
//MARK: - 底部自定义方法
@objc
func
bottomBtnClick
(
sender
:
UIButton
){
switch
sender
.
titleLabel
?
.
text
{
case
"先货后款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否先货后款?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1010
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"修改价格"
:
if
isYuShou
{
let
vc
=
XiuGaiYuShouJiaViewController
()
vc
.
delegate
=
self
vc
.
dataModel
=
self
.
dataMdoel
vc
.
orderID
=
self
.
orderId
let
rowModel
=
self
.
dataMdoel
?
.
order_goods
!.
first
vc
.
imgUrlstr
=
SERVERCE_ImageHost
+
(
rowModel
?
.
goods_thumb
)
!
let
goodsAmount
=
(
self
.
dataMdoel
?
.
order_res
?
.
goods_amount
!
)
!
as
NSString
vc
.
totalPrice
=
goodsAmount
.
floatValue
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
let
vc
=
ChangeGoodsPriceVC
()
vc
.
dataArr
=
self
.
dataMdoel
?
.
order_goods
vc
.
orderID
=
self
.
orderId
vc
.
delegate
=
self
vc
.
wlPrice
=
self
.
dataMdoel
?
.
order_res
?
.
logistics_price
as!
String
vc
.
qtPrice
=
self
.
dataMdoel
?
.
order_res
?
.
other_price
!
as!
String
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
break
case
"打印"
:
//暂无
print
(
"暂无"
)
HUD
.
flash
(
.
label
(
"打印功能开发中"
),
delay
:
1.2
)
break
case
"确认订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"取消订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认取消订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1002
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"发货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否发货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1003
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退款"
,
"取消订单并退款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"暂不支持原路退款,请注意使用其他渠道退还金额"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"继续退款"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1004
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否退货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1005
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"同意取消订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否同意取消订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1006
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"拒绝取消订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否拒绝取消订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1007
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"同意接单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否同意接单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1008
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"拒绝接单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否拒绝接单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1009
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收款?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1099
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"同意退款"
,
"同意退款退货"
,
"同意退货"
:
if
sender
.
titleLabel
!.
text
==
"同意退款"
{
agreeType
=
1
}
if
sender
.
titleLabel
!.
text
==
"同意退货"
{
agreeType
=
2
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否
\(
sender
.
titleLabel
!.
text
!
)
?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1100
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"拒绝退款"
,
"拒绝退款退货"
,
"拒绝退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否
\(
sender
.
titleLabel
!.
text
!
)
?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1111
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收到退款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收到退款?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1011
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收到退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收到退货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1012
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1020
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退款退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否退款退货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1021
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"付款码"
:
let
alertView
=
GeliAltetCodeView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
saveImgID
=
orderId
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
default
:
break
}
}
//MARK:--修改价格(普通商品返回数据)
func
changeGoodsPriByData
(
sender
:
Array
<
OrderDetailGoodsModel
>
)
{
print
(
"修改价格(普通商品返回数据)
\(
sender
)
"
)
...
...
@@ -384,65 +200,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
loadData
()
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
switch
section
{
case
1
:
if
isYuShou
==
false
{
if
(
self
.
dataMdoel
?
.
order_goods
?
.
count
)
!
>
2
{
let
view
=
OrderDViewFooterView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
33.5
))
view
.
delegate
=
self
view
.
nameLbl
.
text
=
"查看全部(共"
+
StringByInt
(
number
:
(
self
.
dataMdoel
?
.
order_goods
!.
count
)
!
)
+
"个商品)"
return
view
}
}
case
2
:
let
view
=
OrderDViewSumFooter
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
59
))
view
.
priceLbl
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
!.
sum_amount
)
!
return
view
default
:
break
}
return
view
}
//MARK: - cell delegate
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
!
isCaneditLatsData
{
return
}
if
indexPath
.
section
==
0
{
let
vc
=
GuanLianKehuVC
()
vc
.
delegate
=
self
vc
.
order_id
=
self
.
orderId
if
self
.
dataMdoel
?
.
order_res
?
.
cus_id
!=
0
{
vc
.
cus_id
=
self
.
dataMdoel
?
.
order_res
?
.
cus_id
}
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
if
indexPath
.
section
==
4
{
if
indexPath
.
row
==
5
{
print
(
"运单号"
)
let
alterView
=
GeliAlertTextFiled
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
var
isYushoucount
=
0
if
isYuShou
{
isYushoucount
=
2
}
if
indexPath
.
row
==
9
+
isYushoucount
{
print
(
"备注"
)
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
}
}
//MARK:--编辑运单号回调数据
func
sureGeliAlertTextFiledAction
(
sender
:
String
)
{
...
...
@@ -466,10 +224,122 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
=
sender
self
.
listView
.
reloadData
()
}
})
{
(
erro
)
in
})
{
(
erro
)
in
}
}
//MARK:--发票信息栏目代理
var
segmentIndex
=
1
func
segmentChangeIndex
(
index
:
Int
)
{
segmentIndex
=
index
listView
.
reloadData
()
}
var
inputInfoTFString
=
""
func
UpBillDataTableViewCellSelectString
(
selectString
:
String
,
inputString
:
String
)
{
switch
selectString
{
case
"查看发票信息"
:
HUD
.
show
(
.
progress
)
getInvoiceInfo
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
StringByInt
(
number
:
self
.
orderId
!
)
as
Any
])
{
(
data
)
in
HUD
.
hide
()
}
failture
:
{
(
error
)
in
}
break
case
"通知用户"
:
HUD
.
show
(
.
progress
)
invoiceNotice
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
StringByInt
(
number
:
self
.
orderId
!
)
as
Any
])
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"通知成功"
),
delay
:
1.2
)
}
failture
:
{
(
err
)
in
}
break
case
"上传发票"
:
_
=
self
.
presentHGImagePicker
(
maxSelected
:
1
)
{
(
assets
)
in
//结果处理
print
(
"共选择了
\(
assets
.
count
)
张图片,分别如下:"
)
let
option
=
PHImageRequestOptions
()
option
.
isSynchronous
=
true
option
.
isNetworkAccessAllowed
=
true
for
asset
in
assets
{
PHImageManager
.
default
()
.
requestImage
(
for
:
asset
,
targetSize
:
PHImageManagerMaximumSize
,
contentMode
:
.
default
,
options
:
option
,
resultHandler
:
{
(
image
,
_
:
[
AnyHashable
:
Any
]?)
in
print
(
"上传图片==
\(
image
)
"
)
self
.
UpBillDataUploadImg
(
imge
:
image
!
)
})
}
self
.
listView
.
reloadData
()
}
break
case
"上传链接地址"
:
HUD
.
show
(
.
progress
)
editInvoiceImg
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
StringByInt
(
number
:
self
.
orderId
!
)
as
Any
,
"invoice_link"
:
inputString
as
Any
])
{
(
data
)
in
self
.
inputInfoTFString
=
inputString
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"修改成功"
),
delay
:
1.2
)
self
.
listView
.
reloadData
()
}
failture
:
{
(
err
)
in
}
break
default
:
break
}
}
var
UpBillDataUploadImgiconUrl
=
""
func
UpBillDataUploadImg
(
imge
:
UIImage
){
let
upLoadImg
=
imge
HUD
.
show
(
.
progress
)
saveFile
(
image
:
upLoadImg
,
[
"user_token"
:
UserToken
as
Any
,
"order_id"
:
StringByInt
(
number
:
self
.
orderId
!
)
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
SaveFileModel
print
(
"图片上传"
,
dataM
.
message
)
if
dataM
.
code
==
1
{
HUD
.
hide
()
self
.
loadData
()
}
})
{
(
error
)
in
print
(
"图片上传失败
\(
error
)
"
)
}
}
//MARK: - cell delegate
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
!
isCaneditLatsData
{
return
}
if
indexPath
.
section
==
0
{
let
vc
=
GuanLianKehuVC
()
vc
.
delegate
=
self
vc
.
order_id
=
self
.
orderId
if
self
.
dataMdoel
?
.
order_res
?
.
cus_id
!=
0
{
vc
.
cus_id
=
self
.
dataMdoel
?
.
order_res
?
.
cus_id
}
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
//订单信息操作
if
indexPath
.
section
==
5
{
if
indexPath
.
row
==
5
{
print
(
"运单号"
)
let
alterView
=
GeliAlertTextFiled
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
var
isYushoucount
=
0
if
isYuShou
{
isYushoucount
=
2
}
if
indexPath
.
row
==
9
+
isYushoucount
{
print
(
"备注"
)
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
...
...
@@ -606,6 +476,27 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return
cell
case
4
:
//MARK:--发票信息cell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"UpBillDataTableViewCell"
)
as!
UpBillDataTableViewCell
cell
.
delegate
=
self
cell
.
inputInfoTF
.
isHidden
=
true
cell
.
inputInfoTfBgV
.
isHidden
=
true
cell
.
updataBtn
.
isHidden
=
false
cell
.
upDataTLbl
.
isHidden
=
false
cell
.
inputInfoTF
.
text
=
inputInfoTFString
if
segmentIndex
==
0
{
cell
.
inputInfoTF
.
isHidden
=
false
cell
.
inputInfoTfBgV
.
isHidden
=
false
cell
.
updataBtn
.
isHidden
=
true
cell
.
upDataTLbl
.
isHidden
=
true
}
if
UpBillDataUploadImgiconUrl
.
count
>
0
{
cell
.
updataBtn
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
UpBillDataUploadImgiconUrl
),
for
:
.
normal
,
completed
:
nil
)
}
cell
.
selectSegmentV
.
selectedSegmentIndex
=
segmentIndex
return
cell
case
5
:
//MARK:--订单信息cell
var
isYushoucount
=
0
if
isYuShou
{
...
...
@@ -1064,7 +955,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if
self
.
dataMdoel
==
nil
{
return
0
}
return
5
return
6
//(关联客户,商品展示,费用信息,收货人信息,发票信息,订单信息)
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
...
...
@@ -1072,8 +963,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return
0
}
switch
section
{
case
0
:
return
1
case
1
:
case
0
:
return
1
//关联客服section
case
1
:
//商品展示section
if
isYuShou
{
return
1
}
else
{
...
...
@@ -1088,18 +979,20 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return
num
}
case
2
:
case
2
:
//费用信息section
if
isYuShou
{
return
5
}
else
{
return
3
}
case
3
:
case
3
:
//收货人信息section
if
self
.
dataMdoel
?
.
order_res
?
.
shipping_type
==
1
{
return
3
}
return
0
case
4
:
case
4
:
//发票信息section
return
1
case
5
:
//订单信息section
if
isYuShou
{
return
12
}
else
{
...
...
@@ -1112,6 +1005,28 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
//MARK: - footer delegate
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
switch
section
{
case
1
:
if
isYuShou
==
false
{
if
(
self
.
dataMdoel
?
.
order_goods
?
.
count
)
!
>
2
{
let
view
=
OrderDViewFooterView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
33.5
))
view
.
delegate
=
self
view
.
nameLbl
.
text
=
"查看全部(共"
+
StringByInt
(
number
:
(
self
.
dataMdoel
?
.
order_goods
!.
count
)
!
)
+
"个商品)"
return
view
}
}
case
2
:
let
view
=
OrderDViewSumFooter
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
59
))
view
.
priceLbl
.
text
=
"¥"
+
(
self
.
dataMdoel
?
.
order_res
!.
sum_amount
)
!
return
view
default
:
break
}
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
switch
section
{
case
1
:
...
...
@@ -1137,8 +1052,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
switch
indexPath
.
section
{
case
1
:
case
1
:
//商品展示heightrow
return
120
case
4
:
//发票信息heightrow
if
segmentIndex
==
0
{
return
180
}
return
260
default
:
break
}
...
...
@@ -1172,6 +1092,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return
view
case
4
:
let
view1
=
HeaderOnlyTitleView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
39
))
view1
.
nameLbl
.
text
=
"发票信息"
view
.
addSubview
(
view1
)
return
view
case
5
:
let
view1
=
HeaderOnlyTitleView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
fullScreenWidth
,
height
:
39
))
view1
.
nameLbl
.
text
=
"订单信息"
view
.
addSubview
(
view1
)
...
...
@@ -1194,7 +1120,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
else
{
return
0.01
}
case
4
:
case
4
,
5
:
return
39
default
:
return
10
...
...
@@ -1320,12 +1246,208 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return
titleArr
}
//MARK: - 底部自定义方法
@objc
func
bottomBtnClick
(
sender
:
UIButton
){
switch
sender
.
titleLabel
?
.
text
{
case
"先货后款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否先货后款?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1010
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"修改价格"
:
if
isYuShou
{
let
vc
=
XiuGaiYuShouJiaViewController
()
vc
.
delegate
=
self
vc
.
dataModel
=
self
.
dataMdoel
vc
.
orderID
=
self
.
orderId
let
rowModel
=
self
.
dataMdoel
?
.
order_goods
!.
first
vc
.
imgUrlstr
=
SERVERCE_ImageHost
+
(
rowModel
?
.
goods_thumb
)
!
let
goodsAmount
=
(
self
.
dataMdoel
?
.
order_res
?
.
goods_amount
!
)
!
as
NSString
vc
.
totalPrice
=
goodsAmount
.
floatValue
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
{
let
vc
=
ChangeGoodsPriceVC
()
vc
.
dataArr
=
self
.
dataMdoel
?
.
order_goods
vc
.
orderID
=
self
.
orderId
vc
.
delegate
=
self
vc
.
wlPrice
=
self
.
dataMdoel
?
.
order_res
?
.
logistics_price
as!
String
vc
.
qtPrice
=
self
.
dataMdoel
?
.
order_res
?
.
other_price
!
as!
String
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
break
case
"打印"
:
//暂无
print
(
"暂无"
)
HUD
.
flash
(
.
label
(
"打印功能开发中"
),
delay
:
1.2
)
break
case
"确认订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1001
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"取消订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认取消订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1002
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"发货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否发货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1003
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退款"
,
"取消订单并退款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"暂不支持原路退款,请注意使用其他渠道退还金额"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"继续退款"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1004
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否退货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1005
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"同意取消订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否同意取消订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1006
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"拒绝取消订单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否拒绝取消订单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1007
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"同意接单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否同意接单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1008
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"拒绝接单"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否拒绝接单?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1009
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收款?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1099
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"同意退款"
,
"同意退款退货"
,
"同意退货"
:
if
sender
.
titleLabel
!.
text
==
"同意退款"
{
agreeType
=
1
}
if
sender
.
titleLabel
!.
text
==
"同意退货"
{
agreeType
=
2
}
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否
\(
sender
.
titleLabel
!.
text
!
)
?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1100
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"拒绝退款"
,
"拒绝退款退货"
,
"拒绝退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否
\(
sender
.
titleLabel
!.
text
!
)
?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1111
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收到退款"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收到退款?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1011
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收到退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收到退货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1012
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"确认收货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否确认收货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1020
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"退款退货"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否退款退货?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确认"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
1021
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"付款码"
:
let
alertView
=
GeliAltetCodeView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
saveImgID
=
orderId
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
default
:
break
}
}
//MARK:--确认和取消订单
//MARK:--弹窗代理 --还有其他弹窗,根据tag分类
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
HUD
.
flash
(
.
progress
)
orderConfirm
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
self
.
dataMdoel
?
.
order_res
?
.
order_id
as
Any
],
success
:
{
(
data
)
in
...
...
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