Commit 0dfe446a authored by 刘俊宏's avatar 刘俊宏

线下版本-实现订单的发票管理(缺查看发票信息)

parent 19375ae7
...@@ -579,6 +579,7 @@ ...@@ -579,6 +579,7 @@
F9956B22246408A6001A617D /* GoodsClassViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9956B20246408A6001A617D /* GoodsClassViewController.swift */; }; F9956B22246408A6001A617D /* GoodsClassViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9956B20246408A6001A617D /* GoodsClassViewController.swift */; };
F9956B23246408A6001A617D /* GoodsClassViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9956B21246408A6001A617D /* GoodsClassViewController.xib */; }; F9956B23246408A6001A617D /* GoodsClassViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9956B21246408A6001A617D /* GoodsClassViewController.xib */; };
F9956B2524640D34001A617D /* GoodsClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9956B2424640D34001A617D /* GoodsClassModel.swift */; }; 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 */; }; F9A0E1DD246D198B00D7F26F /* CusListAllModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A0E1DC246D198B00D7F26F /* CusListAllModel.swift */; };
F9A0E1DF246D1B1E00D7F26F /* GetGoodsInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */; }; F9A0E1DF246D1B1E00D7F26F /* GetGoodsInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */; };
F9A4AB6E24C927E900094BD1 /* LogisticsCostDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AB6C24C927E900094BD1 /* LogisticsCostDetailViewController.swift */; }; F9A4AB6E24C927E900094BD1 /* LogisticsCostDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AB6C24C927E900094BD1 /* LogisticsCostDetailViewController.swift */; };
...@@ -1266,6 +1267,7 @@ ...@@ -1266,6 +1267,7 @@
F9956B20246408A6001A617D /* GoodsClassViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsClassViewController.swift; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; F9A4AB6C24C927E900094BD1 /* LogisticsCostDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogisticsCostDetailViewController.swift; sourceTree = "<group>"; };
...@@ -2807,6 +2809,7 @@ ...@@ -2807,6 +2809,7 @@
F956D5BF246A3789003FF510 /* OrderDetailModel.swift */, F956D5BF246A3789003FF510 /* OrderDetailModel.swift */,
F93E31F624721C4200524DFC /* EditOGPAdModel.swift */, F93E31F624721C4200524DFC /* EditOGPAdModel.swift */,
F9A0E1DC246D198B00D7F26F /* CusListAllModel.swift */, F9A0E1DC246D198B00D7F26F /* CusListAllModel.swift */,
F995CEA52547CAC000202BA8 /* InvoiceInfoModel.swift */,
F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */, F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */,
F9FF7BA024760DA9006E305E /* LogisticsCompanyModel.swift */, F9FF7BA024760DA9006E305E /* LogisticsCompanyModel.swift */,
E02D586A2477A1480065A9EB /* GetAddrsInfoModel.swift */, E02D586A2477A1480065A9EB /* GetAddrsInfoModel.swift */,
...@@ -3731,6 +3734,7 @@ ...@@ -3731,6 +3734,7 @@
F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */, F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */,
F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */, F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */,
F95A9ED8245520E500867849 /* OrderListVC.swift in Sources */, F95A9ED8245520E500867849 /* OrderListVC.swift in Sources */,
F995CEA62547CAC000202BA8 /* InvoiceInfoModel.swift in Sources */,
E03549A8245820C2008BD021 /* PiCiXuanZeCell.swift in Sources */, E03549A8245820C2008BD021 /* PiCiXuanZeCell.swift in Sources */,
F9217E012485E6E800C4CF67 /* MessageListModel.swift in Sources */, F9217E012485E6E800C4CF67 /* MessageListModel.swift in Sources */,
F956D59E246A2D9C003FF510 /* LMNTextStorage+Export.m in Sources */, F956D59E246A2D9C003FF510 /* LMNTextStorage+Export.m in Sources */,
......
...@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String) ...@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址 //接口地址
//test //test
//let SERVERCE_ImageHost = "https://z.gelifood.com/" let SERVERCE_ImageHost = "https://z.gelifood.com/"
//let SERVERCE_HOST = "https://z.gelifood.com/admin/" let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let SERVERCE_ImageHost = "https://zx.gelifood.com/" //let SERVERCE_ImageHost = "https://zx.gelifood.com/"
let SERVERCE_HOST = "https://zx.gelifood.com/admin/" //let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
////online ////online
//视图常量 //视图常量
......
...@@ -258,5 +258,13 @@ ...@@ -258,5 +258,13 @@
<string>Lalamove/payHllOrder</string> <string>Lalamove/payHllOrder</string>
<key>货拉拉格利支付</key> <key>货拉拉格利支付</key>
<string>Lalamove/payHllDelivery</string> <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> </dict>
</plist> </plist>
...@@ -158,7 +158,10 @@ func saveFile(image: UIImage,_ params:[String:Any],success:@escaping (_ res:Any) ...@@ -158,7 +158,10 @@ func saveFile(image: UIImage,_ params:[String:Any],success:@escaping (_ res:Any)
for (key, value) in params { for (key, value) in params {
if key == "path" && ((value as AnyObject).contains("goods") || (value as AnyObject).contains("banner")) { if key == "path" && ((value as AnyObject).contains("goods") || (value as AnyObject).contains("banner")) {
urlStr = "商品图片上传" urlStr = "商品图片上传"
}else if key == "order_id" {
urlStr = "上传发票"
} }
//else if key == order_id 上传发票
} }
print("上传信息",urlStr,params,image) print("上传信息",urlStr,params,image)
...@@ -199,3 +202,4 @@ func onOff(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@esc ...@@ -199,3 +202,4 @@ func onOff(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@esc
failture(error) failture(error)
} }
} }
...@@ -486,3 +486,33 @@ func confirmReceiving(_ params:[String:Any],success:@escaping (_ res:Any)->(),fa ...@@ -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)
}
}
//
// 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) {
}
}
...@@ -72,7 +72,8 @@ class OrderDetailResModel: Mappable { ...@@ -72,7 +72,8 @@ class OrderDetailResModel: Mappable {
var shipping_status : Int?//商品配送情况;0未发货,1已发货,2已收货,4退货 var shipping_status : Int?//商品配送情况;0未发货,1已发货,2已收货,4退货
var goods_before_pay:Int? var goods_before_pay:Int?
var sale_res : OrderDetailSaleResModel?//订单预售详情(不是预售订单为空数组,无key=>value) var sale_res : OrderDetailSaleResModel?//订单预售详情(不是预售订单为空数组,无key=>value)
var invoice_img : String? //发票图片
var invoice_link : String? //发票链接
required init?( map: Map) { required init?( map: Map) {
} }
...@@ -111,7 +112,8 @@ class OrderDetailResModel: Mappable { ...@@ -111,7 +112,8 @@ class OrderDetailResModel: Mappable {
shipping_type <- map["shipping_type"] shipping_type <- map["shipping_type"]
sale_res <- map["sale_res"] sale_res <- map["sale_res"]
shipping_status <- map["shipping_status"] 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? { func orderStatusStrByInt(statusNumber:Int,status_d:Int,isBfPay:Int,LmIdx:Int) -> String? {
......
...@@ -43,6 +43,7 @@ class OrderListDataModel: Mappable { ...@@ -43,6 +43,7 @@ class OrderListDataModel: Mappable {
var goods_number : String? //订单商量总数 var goods_number : String? //订单商量总数
var order_goods : Array<OrderListGoodsModel>? var order_goods : Array<OrderListGoodsModel>?
required init?( map: Map) { required init?( map: Map) {
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import Foundation import Foundation
import ObjectMapper import ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付 //发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址
class UpDataModel: Mappable { class UpDataModel: Mappable {
......
...@@ -7,8 +7,13 @@ ...@@ -7,8 +7,13 @@
// //
import UIKit 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 selectSegmentV: UISegmentedControl!
@IBOutlet weak var updataBtn: UIButton! @IBOutlet weak var updataBtn: UIButton!
...@@ -20,16 +25,18 @@ class UpBillDataTableViewCell: UITableViewCell { ...@@ -20,16 +25,18 @@ class UpBillDataTableViewCell: UITableViewCell {
//查看发票信息 //查看发票信息
@IBAction func checkBillDetailAction(_ sender: UIButton) { @IBAction func checkBillDetailAction(_ sender: UIButton) {
print("//查看发票信息") print("//查看发票信息")
delegate?.UpBillDataTableViewCellSelectString(selectString: "查看发票信息", inputString: "")
} }
//通知用户 //通知用户
@IBAction func noticUserAction(_ sender: UIButton) { @IBAction func noticUserAction(_ sender: UIButton) {
print("//通知用户") print("//通知用户")
delegate?.UpBillDataTableViewCellSelectString(selectString: "通知用户", inputString: "")
} }
//上传发票 //上传发票
@IBAction func updataAction(_ sender: UIButton) { @IBAction func updataAction(_ sender: UIButton) {
print("//上传发票") print("//上传发票")
delegate?.UpBillDataTableViewCellSelectString(selectString: "上传发票", inputString: "")
} }
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
...@@ -39,6 +46,18 @@ class UpBillDataTableViewCell: UITableViewCell { ...@@ -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] 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.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) { override func setSelected(_ selected: Bool, animated: Bool) {
......
<?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="16097.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="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<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="System colors in document resources" minToolsVersion="11.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"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="379" id="KGk-i7-Jjw" customClass="UpBillDataTableViewCell" customModule="TestClass" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="313" id="KGk-i7-Jjw" customClass="UpBillDataTableViewCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="460" height="379"/> <rect key="frame" x="0.0" y="0.0" width="449" height="270"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <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"> <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="460" height="379"/> <rect key="frame" x="0.0" y="0.0" width="449" height="270"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <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"> <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"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vSW-dv-R01"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vSW-dv-R01">
<rect key="frame" x="366" y="45" width="79" height="31"/> <rect key="frame" x="356" y="9" width="78" height="31"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<state key="normal" title="查看发票信息"> <state key="normal" title="查看发票信息">
<color key="titleColor" name="蓝色字体颜色"/> <color key="titleColor" name="蓝色字体颜色"/>
...@@ -41,14 +36,14 @@ ...@@ -41,14 +36,14 @@
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IKR-cK-omw"> <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="灰色分界线"/> <color key="backgroundColor" name="灰色分界线"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="Fbh-Do-rqA"/> <constraint firstAttribute="height" constant="1" id="Fbh-Do-rqA"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="avQ-Ht-Kh2"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="avQ-Ht-Kh2">
<rect key="frame" x="363" y="334" width="82" height="30"/> <rect key="frame" x="352" y="225" width="82" height="30"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="82" id="O2g-tp-poT"/> <constraint firstAttribute="width" constant="82" id="O2g-tp-poT"/>
<constraint firstAttribute="height" constant="30" id="fuH-Or-tGk"/> <constraint firstAttribute="height" constant="30" id="fuH-Or-tGk"/>
...@@ -73,7 +68,7 @@ ...@@ -73,7 +68,7 @@
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="z2Y-im-0sy"> <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> <constraints>
<constraint firstAttribute="height" constant="90" id="B41-Xv-kap"/> <constraint firstAttribute="height" constant="90" id="B41-Xv-kap"/>
<constraint firstAttribute="width" constant="90" id="dUQ-pQ-c9C"/> <constraint firstAttribute="width" constant="90" id="dUQ-pQ-c9C"/>
...@@ -89,22 +84,22 @@ ...@@ -89,22 +84,22 @@
</connections> </connections>
</button> </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"> <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"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tm2-Rk-h7z"> <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> <subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入或粘贴发票地址" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wP4-ua-jqt"> <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="318" height="30"/> <rect key="frame" x="15" y="0.0" width="307" height="30"/>
<color key="textColor" name="灰色字体颜色"/> <color key="textColor" name="灰色字体颜色"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
</textField> </textField>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="bottom" secondItem="wP4-ua-jqt" secondAttribute="bottom" id="6pS-Dx-vHc"/> <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"/> <constraint firstItem="wP4-ua-jqt" firstAttribute="top" secondItem="tm2-Rk-h7z" secondAttribute="top" id="BYc-DL-lkK"/>
...@@ -125,9 +120,9 @@ ...@@ -125,9 +120,9 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</view> </view>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hd8-Af-qe0"> <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hd8-Af-qe0">
<rect key="frame" x="128" y="107" width="204" height="30"/> <rect key="frame" x="122.5" y="71" width="204" height="30"/>
<subviews> <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"/> <rect key="frame" x="-3" y="-1" width="210" height="32"/>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<constraints> <constraints>
...@@ -149,7 +144,7 @@ ...@@ -149,7 +144,7 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</segmentedControl> </segmentedControl>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="204" id="CUr-7W-2Nf"/> <constraint firstAttribute="width" constant="204" id="CUr-7W-2Nf"/>
<constraint firstAttribute="height" constant="30" id="Hqu-al-Cck"/> <constraint firstAttribute="height" constant="30" id="Hqu-al-Cck"/>
...@@ -170,14 +165,12 @@ ...@@ -170,14 +165,12 @@
<constraint firstItem="vSW-dv-R01" firstAttribute="centerY" secondItem="FsF-Gg-3X1" secondAttribute="centerY" id="6Gn-CY-eUz"/> <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="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="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 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 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 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 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="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="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="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"/> <constraint firstItem="z2Y-im-0sy" firstAttribute="top" secondItem="2Km-B1-KpF" secondAttribute="bottom" constant="10" id="q1q-Pi-4s0"/>
...@@ -195,7 +188,7 @@ ...@@ -195,7 +188,7 @@
<outlet property="upDataTLbl" destination="2Km-B1-KpF" id="5OM-0R-6US"/> <outlet property="upDataTLbl" destination="2Km-B1-KpF" id="5OM-0R-6US"/>
<outlet property="updataBtn" destination="z2Y-im-0sy" id="In7-Bi-s6b"/> <outlet property="updataBtn" destination="z2Y-im-0sy" id="In7-Bi-s6b"/>
</connections> </connections>
<point key="canvasLocation" x="233.33333333333334" y="232.70089285714283"/> <point key="canvasLocation" x="225.36231884057972" y="210.60267857142856"/>
</tableViewCell> </tableViewCell>
</objects> </objects>
<resources> <resources>
...@@ -218,5 +211,8 @@ ...@@ -218,5 +211,8 @@
<namedColor name="蓝色字体颜色"> <namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources> </resources>
</document> </document>
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
// //
import UIKit import UIKit
import Photos
protocol OrderDViewControllerDelegate { protocol OrderDViewControllerDelegate {
func refishingOrderDchange() 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 var lmIdx = 100
func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) { func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) {
...@@ -76,7 +77,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -76,7 +77,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func loadData() { func loadData() {
HUD.flash(.progress) 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) HUD.hide(animated: true)
let dataM = data as! OrderDetailModel let dataM = data as! OrderDetailModel
self.dataMdoel = dataM.data self.dataMdoel = dataM.data
...@@ -87,8 +88,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -87,8 +88,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
self.btmBtnsTitleArr.removeAll() self.btmBtnsTitleArr.removeAll()
self.bottomView.subviews.forEach { (view) in self.bottomView.subviews.forEach { (view) in
view.removeFromSuperview() view.removeFromSuperview()
...@@ -143,7 +142,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -143,7 +142,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self.zhiFuSelect = i 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() self.listView.reloadData()
...@@ -167,208 +176,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -167,208 +176,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
listView.register(UINib(nibName: "PingLunCell", bundle: nil), forCellReuseIdentifier: "PingLunCell") listView.register(UINib(nibName: "PingLunCell", bundle: nil), forCellReuseIdentifier: "PingLunCell")
listView.register(UINib(nibName: "GLKHCell", bundle: nil), forCellReuseIdentifier: "GLKHCell") listView.register(UINib(nibName: "GLKHCell", bundle: nil), forCellReuseIdentifier: "GLKHCell")
listView.register(UINib(nibName: "UpBillDataTableViewCell", bundle: nil), forCellReuseIdentifier: "UpBillDataTableViewCell")
} }
var agreeType = 10086 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:--修改价格(普通商品返回数据) //MARK:--修改价格(普通商品返回数据)
func changeGoodsPriByData(sender: Array<OrderDetailGoodsModel>) { func changeGoodsPriByData(sender: Array<OrderDetailGoodsModel>) {
print("修改价格(普通商品返回数据)\(sender)") print("修改价格(普通商品返回数据)\(sender)")
...@@ -385,29 +201,111 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -385,29 +201,111 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
loadData() loadData()
} }
//MARK:--编辑运单号回调数据
func sureGeliAlertTextFiledAction(sender: String) {
editLwbno(["user_token":UserToken as Any,"order_id":orderId as Any,"lwb_no":sender as Any,], success: { (data) in
let dataM = data as! UpDataModel
if dataM.code == 1 {
self.dataMdoel?.order_res?.lwb_no = sender
self.listView.reloadData()
}
}) { (erro) in
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: //MARK:--编辑订单备注回调数据
let view = OrderDViewSumFooter(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 59)) func sureGeliAlertTextViewAction(sender: String) {
view.priceLbl.text = "¥" + (self.dataMdoel?.order_res!.sum_amount)!
return view editField(["user_token":UserToken as Any,"function_id":"45","prval":orderId as Any,"value":sender as Any,], success: { (data) in
let dataM = data as! UpDataModel
if dataM.code == 1 {
self.dataMdoel?.order_res?.order_postscript = sender
self.listView.reloadData()
}
}) { (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: default:
break break
} }
return view }
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 //MARK: - cell delegate
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if !isCaneditLatsData { if !isCaneditLatsData {
...@@ -423,8 +321,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -423,8 +321,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
//订单信息操作
if indexPath.section == 4 { if indexPath.section == 5 {
if indexPath.row == 5{ if indexPath.row == 5{
print("运单号") print("运单号")
let alterView = GeliAlertTextFiled(frame: self.view.window!.bounds) let alterView = GeliAlertTextFiled(frame: self.view.window!.bounds)
...@@ -432,44 +330,16 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -432,44 +330,16 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self.view.window?.addSubview(alterView) self.view.window?.addSubview(alterView)
} }
var isYushoucount = 0 var isYushoucount = 0
if isYuShou { if isYuShou {
isYushoucount = 2 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) {
editLwbno(["user_token":UserToken as Any,"order_id":orderId as Any,"lwb_no":sender as Any,], success: { (data) in
let dataM = data as! UpDataModel
if dataM.code == 1 {
self.dataMdoel?.order_res?.lwb_no = sender
self.listView.reloadData()
}
}) { (erro) in
}
} }
//MARK:--编辑订单备注回调数据 if indexPath.row == 9 + isYushoucount{
func sureGeliAlertTextViewAction(sender: String) { print("备注")
let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
editField(["user_token":UserToken as Any,"function_id":"45","prval":orderId as Any,"value":sender as Any,], success: { (data) in alterView.delegate = self
let dataM = data as! UpDataModel self.view.window?.addSubview(alterView)
if dataM.code == 1 {
self.dataMdoel?.order_res?.order_postscript = sender
self.listView.reloadData()
} }
}) { (erro) in
} }
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndBtnCell") as! TitleAndBtnCell
...@@ -606,6 +476,27 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -606,6 +476,27 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
return cell return cell
case 4: 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 //MARK:--订单信息cell
var isYushoucount = 0 var isYushoucount = 0
if isYuShou { if isYuShou {
...@@ -1064,7 +955,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1064,7 +955,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if self.dataMdoel == nil { if self.dataMdoel == nil {
return 0 return 0
} }
return 5 return 6//(关联客户,商品展示,费用信息,收货人信息,发票信息,订单信息)
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
...@@ -1072,8 +963,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1072,8 +963,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return 0 return 0
} }
switch section { switch section {
case 0:return 1 case 0:return 1 //关联客服section
case 1: case 1: //商品展示section
if isYuShou{ if isYuShou{
return 1 return 1
}else{ }else{
...@@ -1088,18 +979,20 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1088,18 +979,20 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return num return num
} }
case 2: case 2://费用信息section
if isYuShou{ if isYuShou{
return 5 return 5
}else{ }else{
return 3 return 3
} }
case 3: case 3://收货人信息section
if self.dataMdoel?.order_res?.shipping_type == 1{ if self.dataMdoel?.order_res?.shipping_type == 1{
return 3 return 3
} }
return 0 return 0
case 4: case 4://发票信息section
return 1
case 5://订单信息section
if isYuShou { if isYuShou {
return 12 return 12
}else{ }else{
...@@ -1112,6 +1005,28 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1112,6 +1005,28 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
//MARK: - footer delegate //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 { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
switch section { switch section {
case 1: case 1:
...@@ -1137,8 +1052,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1137,8 +1052,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
switch indexPath.section { switch indexPath.section {
case 1: case 1://商品展示heightrow
return 120 return 120
case 4://发票信息heightrow
if segmentIndex == 0 {
return 180
}
return 260
default: default:
break break
} }
...@@ -1172,6 +1092,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1172,6 +1092,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
return view return view
case 4: 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)) let view1 = HeaderOnlyTitleView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 39))
view1.nameLbl.text = "订单信息" view1.nameLbl.text = "订单信息"
view.addSubview(view1) view.addSubview(view1)
...@@ -1194,7 +1120,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1194,7 +1120,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}else{ }else{
return 0.01 return 0.01
} }
case 4: case 4,5:
return 39 return 39
default: default:
return 10 return 10
...@@ -1320,12 +1246,208 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1320,12 +1246,208 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
return titleArr 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:--确认和取消订单
//MARK:--弹窗代理 --还有其他弹窗,根据tag分类 //MARK:--弹窗代理 --还有其他弹窗,根据tag分类
func sureGeliAlertViewAction(sender: UIButton) { func sureGeliAlertViewAction(sender: UIButton) {
if sender.tag == 1001 { if sender.tag == 1001 {
HUD.flash(.progress) HUD.flash(.progress)
orderConfirm(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any], success: { (data) in orderConfirm(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any], success: { (data) in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment