Commit 4cb68f55 authored by 刘俊宏's avatar 刘俊宏

订单的分销字段增加完成

parent 5430f699
......@@ -203,16 +203,24 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
cell.beforeOrderLbl.isHidden = true
if rowModel.order_type == 4 {
//预售
cell.yuShouStatus.isHidden = false
cell.yuShouStatus.text = "预售"
}else{
cell.yuShouStatus.isHidden = true
if rowModel.order_type == 5 {
//分销
cell.yuShouStatus.isHidden = false
cell.yuShouStatus.text = "分销"
}else{
cell.yuShouStatus.isHidden = true
}
}
if rowModel.from == 3 {
cell.formLbl.isHidden = false
if cell.yuShouStatus.isHidden {
cell.formNSlayout.constant = 8
}else{
cell.formNSlayout.constant = 8 + 18 + 8
cell.formNSlayout.constant = 8 + 30 + 8
}
}else{
cell.formLbl.isHidden = true
......@@ -222,11 +230,11 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
if cell.yuShouStatus.isHidden && cell.formLbl.isHidden {
cell.beforeNSLayout.constant = 8
}else if cell.yuShouStatus.isHidden && !cell.formLbl.isHidden {
cell.beforeNSLayout.constant = 8 + 18 + 8
cell.beforeNSLayout.constant = 8 + 30 + 8
}else if !cell.yuShouStatus.isHidden && cell.formLbl.isHidden {
cell.beforeNSLayout.constant = 8 + 18 + 8
cell.beforeNSLayout.constant = 8 + 30 + 8
}else{
cell.beforeNSLayout.constant = 8 + 18 + 8 + 18 + 8
cell.beforeNSLayout.constant = 8 + 30 + 8 + 18 + 8
}
}else{
cell.beforeOrderLbl.isHidden = true
......
......@@ -39,9 +39,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
var dataArr:NSArray = [] //订单产品数据
var btmBtnsTitleArr:Array<String> = []//底栏按钮数据
let yuShouTitleArr = ["定金:","尾款:","商品合计:","物流费用:","其它费用:"]
let nonYuShouTitleArr = ["商品合计:","物流费用:","其它费用:"]
var yuShouTitleArr = ["定金:","尾款:","商品合计:","物流费用:","其它费用:"]
var nonYuShouTitleArr = ["商品合计:","物流费用:","其它费用:"]
let YuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","支付方式","支付状态","买家留言","订单备注"]
let isYuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","定金支付方式","定金支付状态","尾款支付方式","尾款支付状态","买家留言","订单备注"]
......@@ -152,6 +152,17 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if self.dataMdoel?.order_res?.invoice_link != nil {
self.inputInfoTFString = (self.dataMdoel?.order_res?.invoice_link)!
}
//是否是分销订单
if self.dataMdoel?.order_res?.order_type == 5 {
if self.dataMdoel?.order_res?.dbt_target == 2 {
yuShouTitleArr.append("分销商")
nonYuShouTitleArr.append("分销商")
}else if self.dataMdoel?.order_res?.dbt_target == 3 {
yuShouTitleArr.append("分销员")
nonYuShouTitleArr.append("分销员")
}
}
self.listView.reloadData()
......@@ -450,6 +461,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
if isYuShou {
cell.nameLbl.text = yuShouTitleArr[indexPath.row]
cell.textTF.text = yuShouTitleArr[indexPath.row]
cell.delegate = self
//MARK:--预售商品,定金,尾款,合计,物流费用,其他费用 cell
......@@ -481,6 +493,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case 4:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.other_price)!
break
case 5:
//分销才有
cell.textTF.text = (self.dataMdoel?.order_res?.target_name)!
break
default:
break
......@@ -492,6 +508,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}else{
//MARK:--普通商品合计,物流费用,其他费用 cell
cell.nameLbl.text = nonYuShouTitleArr[indexPath.row]
switch indexPath.row {
case 0:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.goods_amount)!
......@@ -502,6 +519,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case 2:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res?.other_price)!
break
case 3:
//分销才有
cell.textTF.text = (self.dataMdoel?.order_res?.target_name)!
break
default:
break
......@@ -1037,8 +1058,14 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
case 2://费用信息section
if isYuShou{
if self.dataMdoel?.order_res?.order_type == 5 { //分销
return yuShouTitleArr.count
}
return 5
}else{
if self.dataMdoel?.order_res?.order_type == 5 {//分销
return nonYuShouTitleArr.count
}
return 3
}
case 3://收货人信息section
......@@ -1075,7 +1102,12 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
case 2:
let view = OrderDViewSumFooter(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 59))
view.priceLbl.text = "¥" + (self.dataMdoel?.order_res!.sum_amount)!
if self.dataMdoel?.order_res?.order_type == 5 {
//分销的话
view.priceLbl.text = "¥" + (self.dataMdoel?.order_res!.sum_amount)! + "(佣金" + (self.dataMdoel?.order_res!.sum_commission_val)! + ")"
}else{
view.priceLbl.text = "¥" + (self.dataMdoel?.order_res!.sum_amount)!
}
return view
default:
break
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" 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"/>
<dependencies>
<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="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -76,13 +77,13 @@
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KO3-dv-aSL">
<rect key="frame" x="15" y="49.5" width="317" height="30"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="MiX-0n-brC"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="aXp-oN-Cl6" firstAttribute="leading" secondItem="J1p-oh-7KC" secondAttribute="trailing" constant="10" id="2ki-px-UcJ"/>
<constraint firstItem="Fv7-Qm-wPF" firstAttribute="centerY" secondItem="J1p-oh-7KC" secondAttribute="centerY" id="3db-dH-3ub"/>
......@@ -103,7 +104,7 @@
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZEQ-bR-jNZ">
<rect key="frame" x="0.0" y="48.5" width="347" height="37.5"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="4323434234r234242424" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UuD-5H-NJZ">
<rect key="frame" x="15" y="15" width="158" height="16"/>
......@@ -117,10 +118,10 @@
<color key="textColor" name="#F57575"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="预" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EDV-Hx-uUd">
<rect key="frame" x="181" y="14" width="18" height="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="预" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EDV-Hx-uUd">
<rect key="frame" x="181" y="14" width="30" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="18" id="nwB-FA-cEV"/>
<constraint firstAttribute="width" constant="30" id="nwB-FA-cEV"/>
<constraint firstAttribute="height" constant="18" id="spk-OB-7Gy"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
......@@ -138,10 +139,10 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="销" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EYa-rE-5f1">
<rect key="frame" x="181" y="14" width="18" height="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="销" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EYa-rE-5f1">
<rect key="frame" x="181" y="14" width="30" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="18" id="4h9-IX-zzQ"/>
<constraint firstAttribute="width" constant="30" id="4h9-IX-zzQ"/>
<constraint firstAttribute="height" constant="18" id="sRH-DP-xAG"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
......@@ -159,10 +160,10 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="货" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ra8-fK-01B">
<rect key="frame" x="181" y="14" width="18" height="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="货" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ra8-fK-01B">
<rect key="frame" x="181" y="14" width="30" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="18" id="TpF-98-8qi"/>
<constraint firstAttribute="width" constant="30" id="TpF-98-8qi"/>
<constraint firstAttribute="height" constant="18" id="jDH-y0-6Uf"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
......@@ -181,7 +182,7 @@
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="EDV-Hx-uUd" firstAttribute="leading" secondItem="UuD-5H-NJZ" secondAttribute="trailing" constant="8" id="2Ob-KX-6kc"/>
<constraint firstItem="ZEQ-bR-jNZ" firstAttribute="leading" secondItem="xNb-6a-mWT" secondAttribute="leading" id="3H6-Mf-efn"/>
......@@ -221,8 +222,8 @@
<constraint firstItem="xNb-6a-mWT" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="hMZ-Hc-nFG"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" name="app底色"/>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="beforeNSLayout" destination="pqA-LR-toh" id="htj-oB-rhX"/>
<outlet property="beforeOrderLbl" destination="ra8-fK-01B" id="GYr-4Z-5cD"/>
......@@ -237,7 +238,7 @@
<outlet property="timeLbl" destination="3yk-m6-Ebz" id="vn8-8A-1YE"/>
<outlet property="yuShouStatus" destination="EDV-Hx-uUd" id="9Ne-Bm-ibc"/>
</connections>
<point key="canvasLocation" x="-40" y="-57"/>
<point key="canvasLocation" x="-712" y="-62"/>
</tableViewCell>
</objects>
<resources>
......@@ -248,10 +249,10 @@
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="个人中心灰色字体">
<color red="0.3919999897480011" green="0.3919999897480011" blue="0.3919999897480011" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.38823529411764707" green="0.38823529411764707" blue="0.38823529411764707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="企业、预售字体">
<color red="1" green="0.68999999761581421" blue="0.47099998593330383" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="1" green="0.68627450980392157" blue="0.47058823529411764" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="密码错误字体颜色">
<color red="0.88999998569488525" green="0.27799999713897705" blue="0.27799999713897705" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......@@ -265,5 +266,8 @@
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
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