Commit 528b32c9 authored by lujunye's avatar lujunye

订单详情修改新样式

parent 6426cb11
...@@ -257,6 +257,8 @@ ...@@ -257,6 +257,8 @@
E0DDCB19244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0DDCB17244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib */; }; E0DDCB19244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0DDCB17244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib */; };
E0DDCB1D244AE81800DF54C7 /* GuanLianKeHuCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0DDCB1B244AE81800DF54C7 /* GuanLianKeHuCell.swift */; }; E0DDCB1D244AE81800DF54C7 /* GuanLianKeHuCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0DDCB1B244AE81800DF54C7 /* GuanLianKeHuCell.swift */; };
E0DDCB1E244AE81800DF54C7 /* GuanLianKeHuCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0DDCB1C244AE81800DF54C7 /* GuanLianKeHuCell.xib */; }; E0DDCB1E244AE81800DF54C7 /* GuanLianKeHuCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0DDCB1C244AE81800DF54C7 /* GuanLianKeHuCell.xib */; };
E0E341EA246E95EE0060AC20 /* PingLunCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0E341E8246E95EE0060AC20 /* PingLunCell.swift */; };
E0E341EB246E95EE0060AC20 /* PingLunCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0E341E9246E95EE0060AC20 /* PingLunCell.xib */; };
E0E8ABFD246E359700E3BB54 /* GuiGeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0E8ABFC246E359700E3BB54 /* GuiGeModel.swift */; }; E0E8ABFD246E359700E3BB54 /* GuiGeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0E8ABFC246E359700E3BB54 /* GuiGeModel.swift */; };
E0F1BE382469220D003015B2 /* RongSticker.bundle in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE2A24692208003015B2 /* RongSticker.bundle */; }; E0F1BE382469220D003015B2 /* RongSticker.bundle in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE2A24692208003015B2 /* RongSticker.bundle */; };
E0F1BE392469220D003015B2 /* RCColor.plist in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE2B24692208003015B2 /* RCColor.plist */; }; E0F1BE392469220D003015B2 /* RCColor.plist in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE2B24692208003015B2 /* RCColor.plist */; };
...@@ -738,6 +740,8 @@ ...@@ -738,6 +740,8 @@
E0DDCB17244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XiuGaiYuShouJiaViewController.xib; sourceTree = "<group>"; }; E0DDCB17244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XiuGaiYuShouJiaViewController.xib; sourceTree = "<group>"; };
E0DDCB1B244AE81800DF54C7 /* GuanLianKeHuCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuanLianKeHuCell.swift; sourceTree = "<group>"; }; E0DDCB1B244AE81800DF54C7 /* GuanLianKeHuCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuanLianKeHuCell.swift; sourceTree = "<group>"; };
E0DDCB1C244AE81800DF54C7 /* GuanLianKeHuCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuanLianKeHuCell.xib; sourceTree = "<group>"; }; E0DDCB1C244AE81800DF54C7 /* GuanLianKeHuCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuanLianKeHuCell.xib; sourceTree = "<group>"; };
E0E341E8246E95EE0060AC20 /* PingLunCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PingLunCell.swift; sourceTree = "<group>"; };
E0E341E9246E95EE0060AC20 /* PingLunCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PingLunCell.xib; sourceTree = "<group>"; };
E0E8ABFC246E359700E3BB54 /* GuiGeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuiGeModel.swift; sourceTree = "<group>"; }; E0E8ABFC246E359700E3BB54 /* GuiGeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuiGeModel.swift; sourceTree = "<group>"; };
E0F1BE2A24692208003015B2 /* RongSticker.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = RongSticker.bundle; sourceTree = "<group>"; }; E0F1BE2A24692208003015B2 /* RongSticker.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = RongSticker.bundle; sourceTree = "<group>"; };
E0F1BE2B24692208003015B2 /* RCColor.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = RCColor.plist; sourceTree = "<group>"; }; E0F1BE2B24692208003015B2 /* RCColor.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = RCColor.plist; sourceTree = "<group>"; };
...@@ -1867,6 +1871,8 @@ ...@@ -1867,6 +1871,8 @@
E0B9462A2456AABE00FBEC9A /* YuShouWeiKuanFaHuoCell.xib */, E0B9462A2456AABE00FBEC9A /* YuShouWeiKuanFaHuoCell.xib */,
E00E48BC2457BAC700F16545 /* XuanZeShangPinCell.swift */, E00E48BC2457BAC700F16545 /* XuanZeShangPinCell.swift */,
E00E48BD2457BAC700F16545 /* XuanZeShangPinCell.xib */, E00E48BD2457BAC700F16545 /* XuanZeShangPinCell.xib */,
E0E341E8246E95EE0060AC20 /* PingLunCell.swift */,
E0E341E9246E95EE0060AC20 /* PingLunCell.xib */,
); );
path = Cell; path = Cell;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2547,6 +2553,7 @@ ...@@ -2547,6 +2553,7 @@
F95A9EDE24557CD500867849 /* GuanLianKehuVC.xib in Resources */, F95A9EDE24557CD500867849 /* GuanLianKehuVC.xib in Resources */,
E07B1E6C245926330055BA3C /* GYSGLCell.xib in Resources */, E07B1E6C245926330055BA3C /* GYSGLCell.xib in Resources */,
E0337EEE2464EED000952EF4 /* PinPaiListViewController.xib in Resources */, E0337EEE2464EED000952EF4 /* PinPaiListViewController.xib in Resources */,
E0E341EB246E95EE0060AC20 /* PingLunCell.xib in Resources */,
E0273DDE24551D4500B3FCAE /* OnlyLabelCell.xib in Resources */, E0273DDE24551D4500B3FCAE /* OnlyLabelCell.xib in Resources */,
E00D85E5244561FE00F5F816 /* Assets.xcassets in Resources */, E00D85E5244561FE00F5F816 /* Assets.xcassets in Resources */,
E0206331246CE303007A40C4 /* OrderDViewSumFooter.xib in Resources */, E0206331246CE303007A40C4 /* OrderDViewSumFooter.xib in Resources */,
...@@ -2800,6 +2807,7 @@ ...@@ -2800,6 +2807,7 @@
F950FDD824518B9500C40530 /* FSCalendarDelegationProxy.m in Sources */, F950FDD824518B9500C40530 /* FSCalendarDelegationProxy.m in Sources */,
E01EA1A0245A5D6B00F019D5 /* YunDanXiangQingViewController.swift in Sources */, E01EA1A0245A5D6B00F019D5 /* YunDanXiangQingViewController.swift in Sources */,
F956D5A0246A2D9C003FF510 /* LMNImageView.m in Sources */, F956D5A0246A2D9C003FF510 /* LMNImageView.m in Sources */,
E0E341EA246E95EE0060AC20 /* PingLunCell.swift in Sources */,
F956D5A2246A2D9C003FF510 /* LMNWebViewController.m in Sources */, F956D5A2246A2D9C003FF510 /* LMNWebViewController.m in Sources */,
F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */, F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */,
F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */, F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */,
......
//
// PingLunCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/15.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class PingLunCell: UITableViewCell {
@IBOutlet weak var contentLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</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" id="KGk-i7-Jjw" customClass="PingLunCell" customModule="GeliBusinessPlatform" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
<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="375" height="49"/>
<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="9hM-p4-cpX">
<rect key="frame" x="15" y="0.0" width="27" height="48"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uoz-6f-uUt">
<rect key="frame" x="15" y="48" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="CqM-TL-TQx"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bianji" translatesAutoresizingMaskIntoConstraints="NO" id="ai0-qt-tes">
<rect key="frame" x="326" y="8" width="34" height="33"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="13" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u0y-iz-OFK">
<rect key="frame" x="57" y="10" width="254" height="28"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="ai0-qt-tes" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="5oH-2t-kQI"/>
<constraint firstItem="9hM-p4-cpX" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="86r-8N-l4b"/>
<constraint firstAttribute="trailing" secondItem="uoz-6f-uUt" secondAttribute="trailing" id="BdK-06-1qc"/>
<constraint firstItem="uoz-6f-uUt" firstAttribute="top" secondItem="u0y-iz-OFK" secondAttribute="bottom" constant="10" id="DMM-rT-fU8"/>
<constraint firstAttribute="trailing" secondItem="ai0-qt-tes" secondAttribute="trailing" constant="15" id="DnZ-1u-7hX"/>
<constraint firstItem="u0y-iz-OFK" firstAttribute="leading" secondItem="9hM-p4-cpX" secondAttribute="trailing" constant="15" id="GCP-he-xgh"/>
<constraint firstItem="uoz-6f-uUt" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="IWn-od-1KQ"/>
<constraint firstItem="u0y-iz-OFK" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="Lmy-tr-bzu"/>
<constraint firstItem="uoz-6f-uUt" firstAttribute="top" secondItem="9hM-p4-cpX" secondAttribute="bottom" id="iDZ-J7-NXw"/>
<constraint firstAttribute="bottom" secondItem="uoz-6f-uUt" secondAttribute="bottom" id="n0B-iM-v7R"/>
<constraint firstItem="9hM-p4-cpX" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="q2Q-IK-ynT"/>
<constraint firstItem="ai0-qt-tes" firstAttribute="leading" secondItem="u0y-iz-OFK" secondAttribute="trailing" constant="15" id="w97-SL-zh2"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="contentLbl" destination="u0y-iz-OFK" id="UlA-85-uH9"/>
<outlet property="nameLbl" destination="9hM-p4-cpX" id="0Pr-Hd-ejy"/>
</connections>
<point key="canvasLocation" x="131.15942028985509" y="127.56696428571428"/>
</tableViewCell>
</objects>
<resources>
<image name="bianji" width="17" height="16.5"/>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
import UIKit import UIKit
class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,CommendCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate{ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate{
var orderId:Int? //订单编号 var orderId:Int? //订单编号
var isYuShou:Bool = false //是否预售 var isYuShou:Bool = true //是否预售
var dataArr:NSArray = ["a","b"] //订单产品数据 var dataArr:NSArray = ["a","b"] //订单产品数据
var btmBtnsTitleArr:Array<String> = []//底栏按钮数据 var btmBtnsTitleArr:Array<String> = []//底栏按钮数据
...@@ -29,18 +29,18 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -29,18 +29,18 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let zhiFuFangShiArr = ["未支付","现金","转账(私)","转账(公)","转账(微信)","转账(支付宝)"] let zhiFuFangShiArr = ["未支付","现金","转账(私)","转账(公)","转账(微信)","转账(支付宝)"]
var zhiFuSelect:Int?//选择支付方式 var zhiFuSelect:Int?//选择支付方式
var zhiFuStatus = ["未付款","欠款","月结","已付款"] let zhiFuStatus = ["未付款","欠款","月结","已付款"]
var zhiFuStatusSelect:Int?//付款状态 var zhiFuStatusSelect:Int?//付款状态
let wuLiuFSArr = ["京东冷链","顺丰冷运","达达速运"]
var wuLiuSelect:Int?//物流选择
@IBOutlet weak var btmViewH: NSLayoutConstraint! @IBOutlet weak var btmViewH: NSLayoutConstraint!
@IBOutlet weak var bottomView: UIView! @IBOutlet weak var bottomView: UIView!
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
@IBOutlet weak var bottomBgView: UIView! @IBOutlet weak var bottomBgView: UIView!
var cell4Height = 18.5
var cell5Height = 18.5
var cell9Height = 18.5
var cellH:CGFloat = 30.5
//MARK:--加载数据 //MARK:--加载数据
var dataMdoel: OrderDetailDataModel? = nil var dataMdoel: OrderDetailDataModel? = nil
...@@ -55,7 +55,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -55,7 +55,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self.isYuShou = true self.isYuShou = true
}else{ }else{
self.isYuShou = false self.isYuShou = false
} }
self.btmBtnsTitleArr.removeAll() self.btmBtnsTitleArr.removeAll()
self.bottomView.subviews.forEach { (view) in self.bottomView.subviews.forEach { (view) in
...@@ -63,7 +63,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -63,7 +63,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
//MARK:--底部视图,根据数据显示 //MARK:--底部视图,根据数据显示
self.btmBtnsTitleArr = self.getOrderBottomBtnTitleStrByStatus(status: (self.dataMdoel?.order_res?.order_status)!) self.btmBtnsTitleArr = self.getOrderBottomBtnTitleStrByStatus(status: (self.dataMdoel?.order_res?.order_status)!)
if self.btmBtnsTitleArr.count == 0 { if self.btmBtnsTitleArr.count == 0 {
self.btmViewH.constant = 0 self.btmViewH.constant = 0
self.bottomView.isHidden = true self.bottomView.isHidden = true
...@@ -88,7 +88,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -88,7 +88,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}) { (error) in }) { (error) in
} }
} }
override func viewDidLoad() { override func viewDidLoad() {
...@@ -96,7 +96,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -96,7 +96,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
navbar.title = "订单详情" navbar.title = "订单详情"
self.view.addSubview(navbar) self.view.addSubview(navbar)
loadData() loadData()
SetTopFrameView(view: listView, btmView: bottomView) SetTopFrameView(view: listView, btmView: bottomView)
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
...@@ -104,13 +104,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -104,13 +104,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
listView.register(UINib(nibName: "TitleAndBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndBtnCell") listView.register(UINib(nibName: "TitleAndBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndBtnCell")
listView.register(UINib(nibName: "TitleAndTFCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFCell") listView.register(UINib(nibName: "TitleAndTFCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFCell")
listView.register(UINib(nibName: "XuanZeShangPinCell", bundle: nil), forCellReuseIdentifier: "XuanZeShangPinCell") listView.register(UINib(nibName: "XuanZeShangPinCell", bundle: nil), forCellReuseIdentifier: "XuanZeShangPinCell")
listView.register(UINib(nibName: "CommendCell", bundle: nil), forCellReuseIdentifier: "CommendCell") listView.register(UINib(nibName: "PingLunCell", bundle: nil), forCellReuseIdentifier: "PingLunCell")
} }
//MARK: - 底部自定义方法 //MARK: - 底部自定义方法
@objc func bottomBtnClick(sender:UIButton){ @objc func bottomBtnClick(sender:UIButton){
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
switch sender.titleLabel?.text { switch sender.titleLabel?.text {
...@@ -119,7 +119,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -119,7 +119,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let vc = XiuGaiYuShouJiaViewController() let vc = XiuGaiYuShouJiaViewController()
vc.dataModel = self.dataMdoel vc.dataModel = self.dataMdoel
vc.orderID = self.orderId vc.orderID = self.orderId
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
}else{ }else{
let vc = ChangeGoodsPriceVC() let vc = ChangeGoodsPriceVC()
...@@ -199,7 +199,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -199,7 +199,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break break
} }
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView() let view = UIView()
switch section { switch section {
...@@ -221,8 +221,19 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -221,8 +221,19 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
return view return view
} }
//MARK: - cell delegate //MARK: - cell delegate
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 4 {
if indexPath.row == 5{
print("运单号")
}
if indexPath.row == 9{
print("备注")
}
}
}
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
cell.delegate = self cell.delegate = self
...@@ -250,13 +261,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -250,13 +261,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell.lineView.isHidden = true cell.lineView.isHidden = true
} }
//MARK:--暂时不显示CELL图片 //MARK:--暂时不显示CELL图片
// cell.imageView. // cell.imageView.
let rowModel = self.dataMdoel?.order_goods![indexPath.row] let rowModel = self.dataMdoel?.order_goods![indexPath.row]
cell.nameLbl.text = rowModel?.goods_name cell.nameLbl.text = rowModel?.goods_name
cell.detailLbl.text = rowModel?.goods_attr cell.detailLbl.text = rowModel?.goods_attr
cell.priceLbl.text = "¥" + (rowModel?.goods_price!)! cell.priceLbl.text = "¥" + (rowModel?.goods_price!)!
return cell return cell
case 2: case 2:
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
...@@ -266,29 +277,29 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -266,29 +277,29 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell.textTF.text = yuShouTitleArr[indexPath.row] cell.textTF.text = yuShouTitleArr[indexPath.row]
cell.delegate = self cell.delegate = self
//MARK:--预售商品,定金,尾款,合计,物流费用,其他费用 cell //MARK:--预售商品,定金,尾款,合计,物流费用,其他费用 cell
switch indexPath.row { switch indexPath.row {
case 0: case 0:
print("预售定金") print("预售定金")
print(self.dataMdoel?.order_res?.sale_res?.dj_amount) print(self.dataMdoel?.order_res?.sale_res?.dj_amount)
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.sale_res?.dj_amount)! cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.sale_res?.dj_amount)!
break break
case 1: case 1:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.sale_res?.wk_amount)! cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.sale_res?.wk_amount)!
break break
case 2: case 2:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.goods_amount)! cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.goods_amount)!
break break
case 3: case 3:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.logistics_price)! cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.logistics_price)!
break break
case 4: case 4:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.other_price)! cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.other_price)!
break break
default: default:
break break
} }
if indexPath.row == yuShouTitleArr.count - 1 { if indexPath.row == yuShouTitleArr.count - 1 {
cell.line.isHidden = true cell.line.isHidden = true
...@@ -308,7 +319,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -308,7 +319,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break break
default: default:
break break
} }
cell.delegate = self cell.delegate = self
if indexPath.row == nonYuShouTitleArr.count - 1 { if indexPath.row == nonYuShouTitleArr.count - 1 {
...@@ -321,7 +332,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -321,7 +332,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.textTF.isUserInteractionEnabled = false cell.textTF.isUserInteractionEnabled = false
cell.nameLbl.text = nonYuShouPart3Arr[indexPath.row] cell.nameLbl.text = nonYuShouPart3Arr[indexPath.row]
if self.dataMdoel?.receiving == nil { if self.dataMdoel?.receiving == nil {
cell.textTF.text = "-" cell.textTF.text = "-"
}else{ }else{
...@@ -342,25 +353,25 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -342,25 +353,25 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return cell return cell
case 4: case 4:
//MARK:--订单信息cell //MARK:--订单信息cell
if indexPath.row == 4 || indexPath.row == 5 || indexPath.row == 9 { if indexPath.row == 5 || indexPath.row == 9 {
let cell = tableView.dequeueReusableCell(withIdentifier: "CommendCell") as! CommendCell let cell = tableView.dequeueReusableCell(withIdentifier: "PingLunCell") as! PingLunCell
cell.delegate = self
cell.tag = indexPath.row cell.tag = indexPath.row
cell.titleLbl.text = YuShouPart3Arr[indexPath.row] cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
switch indexPath.row { switch indexPath.row {
case 5: case 5:
cell.placeLbl.text = self.dataMdoel?.order_res?.lwb_no cell.contentLbl.text = self.dataMdoel?.order_res?.lwb_no
if self.dataMdoel?.order_res?.lwb_no == nil { if self.dataMdoel?.order_res?.lwb_no == nil {
cell.placeLbl.text = "-" cell.contentLbl.text = "-"
}else if cell.placeLbl.text?.count == 0 { }else if cell.contentLbl.text?.count == 0 {
cell.placeLbl.text = "请输入物流单号" cell.contentLbl.text = "请输入物流单号"
} }
break break
case 9: case 9:
cell.placeLbl.text = self.dataMdoel?.order_res?.order_postscript cell.contentLbl.text = self.dataMdoel?.order_res?.order_postscript
if cell.placeLbl.text?.count == 0 { if cell.contentLbl.text?.count == 0 {
cell.placeLbl.text = "请输入留言信息" cell.contentLbl.text = "请输入留言信息"
} }
break break
default: default:
...@@ -368,9 +379,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -368,9 +379,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
return cell return cell
} }
if indexPath.row == 6 || indexPath.row == 7 { if indexPath.row == 4 || indexPath.row == 6 || indexPath.row == 7 {
cell.nameLbl.text = YuShouPart3Arr[indexPath.row] cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
switch indexPath.row { switch indexPath.row {
case 4:
cell.contentLbl.text = self.dataMdoel?.order_res?.lc_name
break
case 6: case 6:
cell.contentLbl.text = self.dataMdoel?.order_res?.pay_type_cn cell.contentLbl.text = self.dataMdoel?.order_res?.pay_type_cn
break break
...@@ -405,7 +419,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -405,7 +419,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case 8: case 8:
cell.textTF.text = self.dataMdoel?.order_res?.postscript cell.textTF.text = self.dataMdoel?.order_res?.postscript
break break
default: default:
break break
} }
...@@ -418,9 +432,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -418,9 +432,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
return cell return cell
} }
func CommendCellSendStr(content: String,cell:CommendCell) {
print("CommendCellSendStr")
}
//MARK:--查看全部商品 //MARK:--查看全部商品
func OrderDViewFooterViewBtnClick() { func OrderDViewFooterViewBtnClick() {
print("查看全部商品") print("查看全部商品")
...@@ -437,9 +449,23 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -437,9 +449,23 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self.dataMdoel?.order_res?.cus_name = self.selectKeHuData?.cus_name self.dataMdoel?.order_res?.cus_name = self.selectKeHuData?.cus_name
//暂时不刷新数据,只刷新视图 //暂时不刷新数据,只刷新视图
listView.reloadData() listView.reloadData()
} }
func btnClick(content: String, cell: TitleAndBtnCell) { func btnClick(content: String, cell: TitleAndBtnCell) {
switch cell.nameLbl.text { switch cell.nameLbl.text {
case "物流公司":
if glSelectView == nil {
let view = GLAlertSelectView(frame: self.view.bounds)
view.tag = cell.tag
view.titleLbl.text = "请选择物流公司"
view.delegate = self
view.dataArr = wuLiuFSArr
if wuLiuSelect != nil {
view.selectNum = wuLiuSelect!
}
self.view.addSubview(view)
glSelectView = view
}
break
case "关联客户": case "关联客户":
let vc = GuanLianKehuVC() let vc = GuanLianKehuVC()
vc.delegate = self vc.delegate = self
...@@ -484,11 +510,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -484,11 +510,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) { func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
if view.titleLbl.text == "请选择支付方式" { if view.titleLbl.text == "请选择支付方式" {
zhiFuSelect = selectNum zhiFuSelect = selectNum
self.dataMdoel?.order_res?.pay_type_cn = zhiFuFangShiArr[selectNum]
}else if view.titleLbl.text == "请选择物流公司"{
wuLiuSelect = selectNum
self.dataMdoel?.order_res?.lc_name = wuLiuFSArr[selectNum]
}else{ }else{
zhiFuStatusSelect = selectNum zhiFuStatusSelect = selectNum
self.dataMdoel?.order_res?.pay_status_cn = zhiFuStatus[selectNum]
} }
glSelectView?.removeFromSuperview() glSelectView?.removeFromSuperview()
glSelectView = nil glSelectView = nil
listView.reloadData()
} }
func GLAlertSelectViewClose(sender: UIButton) { func GLAlertSelectViewClose(sender: UIButton) {
glSelectView?.removeFromSuperview() glSelectView?.removeFromSuperview()
...@@ -505,7 +537,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -505,7 +537,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
return 5 return 5
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if self.dataMdoel == nil { if self.dataMdoel == nil {
return 0 return 0
...@@ -519,12 +551,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -519,12 +551,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
var num = 0 var num = 0
if self.dataMdoel != nil { if self.dataMdoel != nil {
if (self.dataMdoel?.order_goods?.count)! < 2 { if (self.dataMdoel?.order_goods?.count)! < 2 {
num = (self.dataMdoel?.order_goods?.count)! num = (self.dataMdoel?.order_goods?.count)!
}else{ }else{
num = 2 num = 2
} }
} }
return num return num
} }
case 2: case 2:
...@@ -544,8 +576,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -544,8 +576,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return 0 return 0
} }
} }
//MARK: - footer delegate //MARK: - footer delegate
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
switch section { switch section {
...@@ -576,24 +608,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -576,24 +608,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return 120 return 120
case 3: case 3:
switch indexPath.row { switch indexPath.row {
case 4: // case 5:
print(cell4Height) //
return CGFloat(cell4Height)+cellH // case 9:
case 5:
return CGFloat(cell5Height)+cellH
case 9:
return CGFloat(cell9Height)+cellH
default: default:
break break
} }
case 4: case 4:
switch indexPath.row { switch indexPath.row {
case 4: // case 5:
return CGFloat(cell4Height)+cellH //
case 5: // case 9:
return CGFloat(cell5Height)+cellH
case 9:
return CGFloat(cell9Height)+cellH
default: default:
break break
} }
...@@ -645,58 +670,40 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -645,58 +670,40 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
} }
//MARK: - 自定义 delegate
func CommendCellSendH(height: CGFloat,cell:CommendCell) {
switch cell.tag {
case 4:
cell4Height = Double(height)
break
case 5:
cell5Height = Double(height)
break
case 9:
cell9Height = Double(height)
break
default:
break
}
listView.beginUpdates()
listView.endUpdates()
}
//MARK:--根据数据获取底部按钮操作 //MARK:--根据数据获取底部按钮操作
func getOrderBottomBtnTitleStrByStatus(status:Int) -> Array<String> { func getOrderBottomBtnTitleStrByStatus(status:Int) -> Array<String> {
var titleArr: Array<String> = [] var titleArr: Array<String> = []
switch status { switch status {
case 0,1: case 0,1:
// str = "未确定" "待付款" // str = "未确定" "待付款"
titleArr = ["修改价格","打印","确认订单","取消订单"] titleArr = ["修改价格","打印","确认订单","取消订单"]
break break
case 6: case 6:
// str = "待发货" // str = "待发货"
titleArr = ["直接发货","打印","退款"] titleArr = ["直接发货","打印","退款"]
break break
case 7: case 7:
// str = "待收货" // str = "待收货"
titleArr = ["退货","打印","退款"] titleArr = ["退货","打印","退款"]
break break
//订单完成 //订单完成
case 5: case 5:
// str = "订单完成" // str = "订单完成"
titleArr = ["打印","退款"] titleArr = ["打印","退款"]
break break
//订单关闭 //订单关闭
case 8,2: case 8,2:
// str = "订单关闭"str = "已取消" //用户取消(预售 // str = "订单关闭"str = "已取消" //用户取消(预售
titleArr = [] titleArr = []
break break
default: default:
break break
} }
return titleArr return titleArr
} }
//MARK:--确认和取消订单 //MARK:--确认和取消订单
...@@ -706,7 +713,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -706,7 +713,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if isSrueOrder { if isSrueOrder {
HUD.flash(.progress) HUD.flash(.progress)
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
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
HUD.flash(.labeledSubSuccess(subtitle: "确认成功"),delay: 1.2) HUD.flash(.labeledSubSuccess(subtitle: "确认成功"),delay: 1.2)
self.loadData() self.loadData()
......
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