Commit abd517a0 authored by lujunye's avatar lujunye

代客下单cell更新

parent a6760a9e
...@@ -47,6 +47,7 @@ class GetGoodsInfoDataModel: Mappable { ...@@ -47,6 +47,7 @@ class GetGoodsInfoDataModel: Mappable {
var target_Count:Int?//目标数量 var target_Count:Int?//目标数量
var target_Price:String?//目标价格 var target_Price:String?//目标价格
var remark = ""//备注
var pog_id = 0 var pog_id = 0
var edit_status = 1 var edit_status = 1
...@@ -76,6 +77,7 @@ class GetGoodsInfoDataModel: Mappable { ...@@ -76,6 +77,7 @@ class GetGoodsInfoDataModel: Mappable {
target_Price <- map["target_Price"] target_Price <- map["target_Price"]
pog_id <- map["pog_id"] pog_id <- map["pog_id"]
edit_status <- map["edit_status"] edit_status <- map["edit_status"]
remark <- map["remark"]
} }
} }
<?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="17701" 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="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......
...@@ -9,10 +9,13 @@ ...@@ -9,10 +9,13 @@
import UIKit import UIKit
protocol DaiKeXiaDanGouWuCellDelegate { protocol DaiKeXiaDanGouWuCellDelegate {
func DaiKeXiaDanGouWuCellDelAction(cell:DaiKeXiaDanGouWuCell) func DaiKeXiaDanGouWuCellDelAction(cell:DaiKeXiaDanGouWuCell)
func DaiKeXiaDanGouWuCellRemarkChange(cell:DaiKeXiaDanGouWuCell)
} }
class DaiKeXiaDanGouWuCell: UITableViewCell { class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
var delegate:DaiKeXiaDanGouWuCellDelegate? var delegate:DaiKeXiaDanGouWuCellDelegate?
@IBOutlet weak var bz_lbl: UILabel!
@IBOutlet weak var changeBtn: UIButton! @IBOutlet weak var changeBtn: UIButton!
@IBOutlet weak var count_lbl: UILabel!
@IBOutlet weak var btmLIneWidth: NSLayoutConstraint! @IBOutlet weak var btmLIneWidth: NSLayoutConstraint!
@IBOutlet weak var detailLbl2: UILabel! @IBOutlet weak var detailLbl2: UILabel!
@IBOutlet weak var delBtn: UIButton! @IBOutlet weak var delBtn: UIButton!
...@@ -22,17 +25,37 @@ class DaiKeXiaDanGouWuCell: UITableViewCell { ...@@ -22,17 +25,37 @@ class DaiKeXiaDanGouWuCell: UITableViewCell {
@IBOutlet weak var detailLbl: UILabel! @IBOutlet weak var detailLbl: UILabel!
@IBOutlet weak var titleLbl: UILabel! @IBOutlet weak var titleLbl: UILabel!
@IBOutlet weak var diLbl: UILabel! @IBOutlet weak var diLbl: UILabel!
var isDetail = false{
didSet{
if isDetail {
bz_lbl.isHidden = false
content_tv.isUserInteractionEnabled = false
edit_img.isHidden = true
}
}
}
@IBAction func delAction(_ sender: Any) { @IBAction func delAction(_ sender: Any) {
delegate?.DaiKeXiaDanGouWuCellDelAction(cell: self) delegate?.DaiKeXiaDanGouWuCellDelAction(cell: self)
} }
@IBOutlet weak var content_tv: UITextView!
@IBOutlet weak var edit_img: UIImageView!
@IBOutlet weak var holder_lbl: UILabel!
@IBOutlet weak var imgView: UIImageView! @IBOutlet weak var imgView: UIImageView!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
content_tv.delegate = self
// Initialization code // Initialization code
} }
func textViewDidChange(_ textView: UITextView) {
if textView.text.count > 0 {
holder_lbl.isHidden = true
}else{
holder_lbl.isHidden = false
}
delegate?.DaiKeXiaDanGouWuCellRemarkChange(cell: self)
}
override func setSelected(_ selected: Bool, animated: Bool) { override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated) super.setSelected(selected, animated: animated)
......
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
<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" id="KGk-i7-Jjw" customClass="DaiKeXiaDanGouWuCell" customModule="TestClass" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="DaiKeXiaDanGouWuCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="120"/> <rect key="frame" x="0.0" y="0.0" width="375" height="243"/>
<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="375" height="120"/> <rect key="frame" x="0.0" y="0.0" width="375" height="243"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oAm-E1-HwQ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oAm-E1-HwQ">
<rect key="frame" x="15" y="119" width="360" height="1"/> <rect key="frame" x="15" y="242" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/> <color key="backgroundColor" name="灰色分界线"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="END-QU-37t"/> <constraint firstAttribute="height" constant="1" id="END-QU-37t"/>
</constraints> </constraints>
</view> </view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="AWX-Qu-0ML"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="AWX-Qu-0ML">
<rect key="frame" x="15" y="15" width="90" height="90"/> <rect key="frame" x="15" y="20" width="90" height="90"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="90" id="ECa-gV-6Hb"/> <constraint firstAttribute="width" constant="90" id="ECa-gV-6Hb"/>
<constraint firstAttribute="height" constant="90" id="VQx-k5-HpD"/> <constraint firstAttribute="height" constant="90" id="VQx-k5-HpD"/>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</imageView> </imageView>
<button hidden="YES" opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4lb-rz-I6F"> <button hidden="YES" opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4lb-rz-I6F">
<rect key="frame" x="15" y="15" width="90" height="90"/> <rect key="frame" x="15" y="20" width="90" height="90"/>
<color key="backgroundColor" name="标题字颜色"/> <color key="backgroundColor" name="标题字颜色"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="90" id="UQL-IV-mXE"/> <constraint firstAttribute="width" constant="90" id="UQL-IV-mXE"/>
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
</state> </state>
</button> </button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="shanchuDel" translatesAutoresizingMaskIntoConstraints="NO" id="ftv-xQ-eXW"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="shanchuDel" translatesAutoresizingMaskIntoConstraints="NO" id="ftv-xQ-eXW">
<rect key="frame" x="97.5" y="7.5" width="15" height="15"/> <rect key="frame" x="97.5" y="12.5" width="15" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="15" id="cr6-nL-Ydi"/> <constraint firstAttribute="width" constant="15" id="cr6-nL-Ydi"/>
<constraint firstAttribute="height" constant="15" id="g7a-W4-Sdg"/> <constraint firstAttribute="height" constant="15" id="g7a-W4-Sdg"/>
</constraints> </constraints>
</imageView> </imageView>
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eKc-LO-OD0"> <button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eKc-LO-OD0">
<rect key="frame" x="85" y="-5" width="40" height="40"/> <rect key="frame" x="85" y="0.0" width="40" height="40"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="Qu8-tq-Vzl"/> <constraint firstAttribute="height" constant="40" id="Qu8-tq-Vzl"/>
...@@ -73,10 +73,7 @@ ...@@ -73,10 +73,7 @@
</connections> </connections>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HYf-UQ-mHg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HYf-UQ-mHg">
<rect key="frame" x="115" y="15" width="243" height="37"/> <rect key="frame" x="115" y="48.5" width="245" height="33.5"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="XGJ-zg-D1O"/>
</constraints>
<attributedString key="attributedText"> <attributedString key="attributedText">
<fragment content="六和川香鸡柳2.5kg/六和川香鸡柳2六和川香鸡柳2."> <fragment content="六和川香鸡柳2.5kg/六和川香鸡柳2六和川香鸡柳2.">
<attributes> <attributes>
...@@ -88,82 +85,146 @@ ...@@ -88,82 +85,146 @@
</attributedString> </attributedString>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="¥51153.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rio-TZ-iyo">
<rect key="frame" x="291.5" y="91" width="63.5" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="¥51153.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JyG-Tf-6Jd">
<rect key="frame" x="291.5" y="70.5" width="63.5" height="18.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WMj-FN-Sws">
<rect key="frame" x="15" y="125" width="345" height="102"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5kg/箱/袋" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LBB-wB-bMd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5kg/箱/袋" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LBB-wB-bMd">
<rect key="frame" x="115" y="67" width="225" height="15"/> <rect key="frame" x="10" y="10" width="49" height="13.5"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="fQ5-5e-VaT"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="灰色字体颜色"/> <color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥260.00*12" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X1B-vl-mvy"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥260.00*12" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X1B-vl-mvy">
<rect key="frame" x="115" y="87" width="61.5" height="13.5"/> <rect key="frame" x="10" y="33.5" width="61.5" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="灰色字体颜色"/> <color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥51153.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rio-TZ-iyo"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="点击填写备注" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WVL-NG-HsK">
<rect key="frame" x="291.5" y="86" width="63.5" height="16"/> <rect key="frame" x="38.5" y="62" width="78" height="18.5"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<nil key="textColor"/> <color key="textColor" name="蓝色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥51153.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JyG-Tf-6Jd"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bianji" translatesAutoresizingMaskIntoConstraints="NO" id="Dmd-Un-AkZ">
<rect key="frame" x="291.5" y="65.5" width="63.5" height="18.5"/> <rect key="frame" x="10" y="63" width="16" height="16"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="18.5" id="11o-H0-KIf"/> <constraint firstAttribute="width" constant="16" id="MMn-yf-xWV"/>
<constraint firstAttribute="height" constant="16" id="muF-aA-q6u"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/> </imageView>
<nil key="textColor"/> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="CW3-oD-5Hm">
<rect key="frame" x="36" y="54" width="299" height="42"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="sxT-0i-iXD"/>
</constraints>
<color key="textColor" name="灰色字体颜色"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="11"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="数量" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3f3-RV-d16">
<rect key="frame" x="313" y="9" width="22" height="15.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="11"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="备注:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ykh-Oc-5e6">
<rect key="frame" x="10" y="63.5" width="33" height="15.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="11"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<color key="backgroundColor" name="app底色"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="HYf-UQ-mHg" secondAttribute="trailing" constant="17" id="1et-A0-Mm7"/> <constraint firstItem="Dmd-Un-AkZ" firstAttribute="top" secondItem="X1B-vl-mvy" secondAttribute="bottom" constant="16" id="5Ig-Ek-Czg"/>
<constraint firstAttribute="trailing" secondItem="CW3-oD-5Hm" secondAttribute="trailing" constant="10" id="6vz-aS-Foq"/>
<constraint firstItem="CW3-oD-5Hm" firstAttribute="leading" secondItem="Dmd-Un-AkZ" secondAttribute="trailing" constant="10" id="7n2-Vb-3XY"/>
<constraint firstItem="3f3-RV-d16" firstAttribute="centerY" secondItem="LBB-wB-bMd" secondAttribute="centerY" id="CPt-xo-1dx"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="top" secondItem="LBB-wB-bMd" secondAttribute="bottom" constant="10" id="G0k-U9-DVo"/>
<constraint firstItem="LBB-wB-bMd" firstAttribute="leading" secondItem="WMj-FN-Sws" secondAttribute="leading" constant="10" id="L6M-kd-Qvr"/>
<constraint firstItem="WVL-NG-HsK" firstAttribute="centerY" secondItem="Dmd-Un-AkZ" secondAttribute="centerY" id="VEI-Ck-HWY"/>
<constraint firstAttribute="trailing" secondItem="3f3-RV-d16" secondAttribute="trailing" constant="10" id="W3g-Fe-Gtf"/>
<constraint firstItem="LBB-wB-bMd" firstAttribute="top" secondItem="WMj-FN-Sws" secondAttribute="top" constant="10" id="Xri-zi-cci"/>
<constraint firstItem="CW3-oD-5Hm" firstAttribute="centerY" secondItem="Dmd-Un-AkZ" secondAttribute="centerY" constant="4" id="ZiM-2r-dAw"/>
<constraint firstItem="Dmd-Un-AkZ" firstAttribute="leading" secondItem="WMj-FN-Sws" secondAttribute="leading" constant="10" id="a7j-vt-r1P"/>
<constraint firstItem="ykh-Oc-5e6" firstAttribute="centerY" secondItem="Dmd-Un-AkZ" secondAttribute="centerY" id="cCR-3w-9NS"/>
<constraint firstItem="ykh-Oc-5e6" firstAttribute="leading" secondItem="WMj-FN-Sws" secondAttribute="leading" constant="10" id="das-yY-Rxy"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="leading" secondItem="WMj-FN-Sws" secondAttribute="leading" constant="10" id="rJS-l5-dkz"/>
<constraint firstItem="WVL-NG-HsK" firstAttribute="leading" secondItem="Dmd-Un-AkZ" secondAttribute="trailing" constant="12.5" id="zlW-a1-QVz"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="WMj-FN-Sws" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="bottom" constant="15" id="1VP-8b-PTQ"/>
<constraint firstItem="oAm-E1-HwQ" firstAttribute="top" secondItem="WMj-FN-Sws" secondAttribute="bottom" constant="15" id="4IR-Qw-Ra4"/>
<constraint firstItem="4lb-rz-I6F" firstAttribute="centerY" secondItem="AWX-Qu-0ML" secondAttribute="centerY" id="6mE-8H-dPD"/> <constraint firstItem="4lb-rz-I6F" firstAttribute="centerY" secondItem="AWX-Qu-0ML" secondAttribute="centerY" id="6mE-8H-dPD"/>
<constraint firstItem="4lb-rz-I6F" firstAttribute="centerX" secondItem="AWX-Qu-0ML" secondAttribute="centerX" id="DtW-X9-NRk"/> <constraint firstItem="4lb-rz-I6F" firstAttribute="centerX" secondItem="AWX-Qu-0ML" secondAttribute="centerX" id="DtW-X9-NRk"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="top" secondItem="LBB-wB-bMd" secondAttribute="bottom" constant="5" id="LHs-KQ-EQ3"/> <constraint firstItem="AWX-Qu-0ML" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="20" id="JoA-Ad-gIn"/>
<constraint firstItem="AWX-Qu-0ML" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="PkW-SQ-lMP"/> <constraint firstItem="AWX-Qu-0ML" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="PkW-SQ-lMP"/>
<constraint firstItem="AWX-Qu-0ML" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="QkU-Fn-YVB"/>
<constraint firstItem="ftv-xQ-eXW" firstAttribute="trailing" secondItem="AWX-Qu-0ML" secondAttribute="trailing" constant="7.5" id="R1R-mm-RvM"/> <constraint firstItem="ftv-xQ-eXW" firstAttribute="trailing" secondItem="AWX-Qu-0ML" secondAttribute="trailing" constant="7.5" id="R1R-mm-RvM"/>
<constraint firstItem="JyG-Tf-6Jd" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="SVb-FW-34b"/> <constraint firstItem="HYf-UQ-mHg" firstAttribute="centerY" secondItem="4lb-rz-I6F" secondAttribute="centerY" id="UmC-Iq-hqN"/>
<constraint firstAttribute="trailingMargin" secondItem="LBB-wB-bMd" secondAttribute="trailing" constant="15" id="U69-j9-gAo"/> <constraint firstItem="WMj-FN-Sws" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="XgB-ga-d7b"/>
<constraint firstItem="HYf-UQ-mHg" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="top" id="UBt-NG-mg3"/> <constraint firstAttribute="trailing" secondItem="WMj-FN-Sws" secondAttribute="trailing" constant="15" id="ZdP-Hy-MQF"/>
<constraint firstItem="JyG-Tf-6Jd" firstAttribute="centerY" secondItem="LBB-wB-bMd" secondAttribute="centerY" id="VRZ-vw-R2N"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="leading" secondItem="AWX-Qu-0ML" secondAttribute="trailing" constant="10" id="WdY-8o-EY3"/>
<constraint firstItem="Rio-TZ-iyo" firstAttribute="centerY" secondItem="X1B-vl-mvy" secondAttribute="centerY" id="cI2-3e-S0C"/>
<constraint firstItem="ftv-xQ-eXW" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="top" constant="-7.5" id="cI7-D0-svp"/> <constraint firstItem="ftv-xQ-eXW" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="top" constant="-7.5" id="cI7-D0-svp"/>
<constraint firstItem="Rio-TZ-iyo" firstAttribute="trailing" secondItem="JyG-Tf-6Jd" secondAttribute="trailing" id="gQN-11-nsF"/> <constraint firstItem="HYf-UQ-mHg" firstAttribute="leading" secondItem="ftv-xQ-eXW" secondAttribute="trailing" constant="2.5" id="fET-WC-QtF"/>
<constraint firstItem="LBB-wB-bMd" firstAttribute="top" secondItem="HYf-UQ-mHg" secondAttribute="bottom" constant="15" id="hvm-bz-LS0"/>
<constraint firstItem="eKc-LO-OD0" firstAttribute="centerX" secondItem="ftv-xQ-eXW" secondAttribute="centerX" id="igK-BR-aYW"/> <constraint firstItem="eKc-LO-OD0" firstAttribute="centerX" secondItem="ftv-xQ-eXW" secondAttribute="centerX" id="igK-BR-aYW"/>
<constraint firstItem="HYf-UQ-mHg" firstAttribute="leading" secondItem="ftv-xQ-eXW" secondAttribute="trailing" constant="2.5" id="l1Y-U1-OUR"/>
<constraint firstAttribute="bottom" secondItem="oAm-E1-HwQ" secondAttribute="bottom" id="p0n-TC-Jkb"/> <constraint firstAttribute="bottom" secondItem="oAm-E1-HwQ" secondAttribute="bottom" id="p0n-TC-Jkb"/>
<constraint firstItem="eKc-LO-OD0" firstAttribute="centerY" secondItem="ftv-xQ-eXW" secondAttribute="centerY" id="p3f-uk-i51"/> <constraint firstItem="eKc-LO-OD0" firstAttribute="centerY" secondItem="ftv-xQ-eXW" secondAttribute="centerY" id="p3f-uk-i51"/>
<constraint firstItem="oAm-E1-HwQ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="qMJ-nI-cSg"/> <constraint firstItem="oAm-E1-HwQ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="qMJ-nI-cSg"/>
<constraint firstItem="LBB-wB-bMd" firstAttribute="leading" secondItem="HYf-UQ-mHg" secondAttribute="leading" id="ue5-UX-MkI"/> <constraint firstAttribute="trailing" secondItem="HYf-UQ-mHg" secondAttribute="trailing" constant="15" id="uj5-J9-bpT"/>
<constraint firstItem="HYf-UQ-mHg" firstAttribute="leading" secondItem="AWX-Qu-0ML" secondAttribute="trailing" constant="10" id="vdt-Oa-nCE"/>
<constraint firstAttribute="trailing" secondItem="oAm-E1-HwQ" secondAttribute="trailing" id="wno-dO-LhO"/> <constraint firstAttribute="trailing" secondItem="oAm-E1-HwQ" secondAttribute="trailing" id="wno-dO-LhO"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections> <connections>
<outlet property="btmLIneWidth" destination="qMJ-nI-cSg" id="dsM-yO-8bv"/> <outlet property="btmLIneWidth" destination="qMJ-nI-cSg" id="dsM-yO-8bv"/>
<outlet property="bz_lbl" destination="ykh-Oc-5e6" id="1JL-Gh-kqG"/>
<outlet property="changeBtn" destination="4lb-rz-I6F" id="OEf-1Q-OVb"/> <outlet property="changeBtn" destination="4lb-rz-I6F" id="OEf-1Q-OVb"/>
<outlet property="content_tv" destination="CW3-oD-5Hm" id="FqB-Cg-d4n"/>
<outlet property="count_lbl" destination="3f3-RV-d16" id="mVi-eZ-CLv"/>
<outlet property="delBtn" destination="eKc-LO-OD0" id="sTb-4h-fLY"/> <outlet property="delBtn" destination="eKc-LO-OD0" id="sTb-4h-fLY"/>
<outlet property="delImg" destination="ftv-xQ-eXW" id="CON-aC-p5Y"/> <outlet property="delImg" destination="ftv-xQ-eXW" id="CON-aC-p5Y"/>
<outlet property="detailLbl" destination="LBB-wB-bMd" id="Z5L-Om-fG8"/> <outlet property="detailLbl" destination="LBB-wB-bMd" id="Z5L-Om-fG8"/>
<outlet property="detailLbl2" destination="X1B-vl-mvy" id="h0s-3d-jnl"/> <outlet property="detailLbl2" destination="X1B-vl-mvy" id="h0s-3d-jnl"/>
<outlet property="diLbl" destination="JyG-Tf-6Jd" id="loL-0t-j6w"/> <outlet property="diLbl" destination="JyG-Tf-6Jd" id="loL-0t-j6w"/>
<outlet property="edit_img" destination="Dmd-Un-AkZ" id="Wem-3z-XGv"/>
<outlet property="holder_lbl" destination="WVL-NG-HsK" id="mrt-aR-lOQ"/>
<outlet property="imgView" destination="AWX-Qu-0ML" id="BQH-fG-eL9"/> <outlet property="imgView" destination="AWX-Qu-0ML" id="BQH-fG-eL9"/>
<outlet property="priceLbl" destination="Rio-TZ-iyo" id="Ivg-2f-C6y"/> <outlet property="priceLbl" destination="Rio-TZ-iyo" id="Ivg-2f-C6y"/>
<outlet property="titleLbl" destination="HYf-UQ-mHg" id="bMC-Ni-Yjv"/> <outlet property="titleLbl" destination="HYf-UQ-mHg" id="bMC-Ni-Yjv"/>
<outlet property="totalPriceLbl" destination="Rio-TZ-iyo" id="l5M-Ih-fxa"/> <outlet property="totalPriceLbl" destination="Rio-TZ-iyo" id="l5M-Ih-fxa"/>
</connections> </connections>
<point key="canvasLocation" x="131.15942028985509" y="121.875"/> <point key="canvasLocation" x="131.15942028985509" y="121.54017857142857"/>
</tableViewCell> </tableViewCell>
</objects> </objects>
<resources> <resources>
<image name="bianji" width="17" height="16.5"/>
<image name="shanchuDel" width="15" height="15"/> <image name="shanchuDel" width="15" height="15"/>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色"> <namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
...@@ -176,5 +237,8 @@ ...@@ -176,5 +237,8 @@
<namedColor name="白色背景色"> <namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources> </resources>
</document> </document>
...@@ -10,6 +10,12 @@ import UIKit ...@@ -10,6 +10,12 @@ import UIKit
import IQKeyboardManagerSwift import IQKeyboardManagerSwift
class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,UITableViewDelegate,DaiKeXiaDanFooterViewDelegate,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,DZGLViewControllerDelegate,XuanZeShangPinViewControllerDelegate,DaiKeXiaDanGouWuCellDelegate,GuanLianKehuVCDelegate,XiuGaiYuShouJiaViewControllerDelegate,TitleAndTFCellDelegate, GeliAlertViewDelegate,UITextFieldDelegate{ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,UITableViewDelegate,DaiKeXiaDanFooterViewDelegate,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,DZGLViewControllerDelegate,XuanZeShangPinViewControllerDelegate,DaiKeXiaDanGouWuCellDelegate,GuanLianKehuVCDelegate,XiuGaiYuShouJiaViewControllerDelegate,TitleAndTFCellDelegate, GeliAlertViewDelegate,UITextFieldDelegate{
func DaiKeXiaDanGouWuCellRemarkChange(cell: DaiKeXiaDanGouWuCell) {
let data = cellDataArr[cell.tag]
data.remark = cell.content_tv.text
print(data.remark)
}
let ddTypeArr = ["普通订单","预售下单"] let ddTypeArr = ["普通订单","预售下单"]
let zfTypeArr = ["未付款","欠款","月结","已付款"] let zfTypeArr = ["未付款","欠款","月结","已付款"]
...@@ -175,8 +181,11 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U ...@@ -175,8 +181,11 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
let cellData = cellDataArr[indexPath.row] let cellData = cellDataArr[indexPath.row]
cell.imgView.sd_setImage(with: URL(string:SERVERCE_ImageHost + cellData.goods_img!)) cell.imgView.sd_setImage(with: URL(string:SERVERCE_ImageHost + cellData.goods_img!))
cell.titleLbl.text = cellData.goods_name cell.titleLbl.text = cellData.goods_name
cell.count_lbl.text = "数量:\(cellData.target_Count!)件"
cell.detailLbl.text = "\(cellData.spec_str!)/\(cellData.unit!)" cell.detailLbl.text = "\(cellData.spec_str!)/\(cellData.unit!)"
cell.detailLbl2.text = "¥" + cellData.target_Price! + "x\(cellData.target_Count!)" let pStr = cellData.target_Price as! NSString
let p = pStr.floatValue * Float(cellData.target_Count!)
cell.detailLbl2.text = "小计:¥" + String(format: "%.2f", p)
let priceStr = cellData.target_Price?.replacingOccurrences(of: "", with: ",") as! NSString let priceStr = cellData.target_Price?.replacingOccurrences(of: "", with: ",") as! NSString
let totalP = priceStr.floatValue * Float(cellData.target_Count!) let totalP = priceStr.floatValue * Float(cellData.target_Count!)
cell.totalPriceLbl.text = "\(totalP)" cell.totalPriceLbl.text = "\(totalP)"
...@@ -674,7 +683,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U ...@@ -674,7 +683,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 1 { if indexPath.section == 1 {
return 120 return 243
} }
if indexPath.section == 2 {//新增预售 if indexPath.section == 2 {//新增预售
if orderType == 1 { if orderType == 1 {
...@@ -750,6 +759,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U ...@@ -750,6 +759,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
if orderType == 1{ if orderType == 1{
cellDataArr.forEach { (item) in cellDataArr.forEach { (item) in
print(item.remark)
let priceStr = item.target_Price! as NSString let priceStr = item.target_Price! as NSString
let subtoal = priceStr.floatValue * Float(item.target_Count!) let subtoal = priceStr.floatValue * Float(item.target_Count!)
let goods = ["goods_name":item.goods_name as Any, //商品名称 let goods = ["goods_name":item.goods_name as Any, //商品名称
...@@ -764,12 +774,16 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U ...@@ -764,12 +774,16 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
"is_gift":0,//是否搭赠,1是0非,现版本固定0 "is_gift":0,//是否搭赠,1是0非,现版本固定0
"subtotal":subtoal,//总价 "subtotal":subtoal,//总价
"goods_id":item.goods_id as Any,//商品ID "goods_id":item.goods_id as Any,//商品ID
"remark":item.remark as Any,
"sku_id":item.sku_id as Any] as [String : Any] "sku_id":item.sku_id as Any] as [String : Any]
goodsArr.append(goods) goodsArr.append(goods)
} }
}else{ }else{
cellDataArr.forEach { (item) in cellDataArr.forEach { (item) in
print(item.remark)
let priceStr = item.target_Price! as NSString let priceStr = item.target_Price! as NSString
let subtoal = priceStr.floatValue * Float(item.target_Count!) let subtoal = priceStr.floatValue * Float(item.target_Count!)
let goods = ["goods_name":item.goods_name as Any, let goods = ["goods_name":item.goods_name as Any,
...@@ -782,6 +796,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U ...@@ -782,6 +796,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
"is_gift":0, "is_gift":0,
"subtotal":subtoal, "subtotal":subtoal,
"goods_id":item.goods_id as Any, "goods_id":item.goods_id as Any,
"remark":item.remark as Any,
"sku_id":item.sku_id as Any] as [String : Any] "sku_id":item.sku_id as Any] as [String : Any]
goodsArr.append(goods) goodsArr.append(goods)
......
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