Commit 33fe40c8 authored by lujunye's avatar lujunye

优化111

parent f05e75bb
...@@ -447,6 +447,8 @@ ...@@ -447,6 +447,8 @@
E0F1BE4924692379003015B2 /* ItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE4724692379003015B2 /* ItemCell.xib */; }; E0F1BE4924692379003015B2 /* ItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE4724692379003015B2 /* ItemCell.xib */; };
E0F3C2CB24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */; }; E0F3C2CB24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */; };
E0F3C2CC24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */; }; E0F3C2CC24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */; };
E0F83BA925F7085400D31672 /* NewPiCiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F83BA725F7085400D31672 /* NewPiCiCell.swift */; };
E0F83BAA25F7085400D31672 /* NewPiCiCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F83BA825F7085400D31672 /* NewPiCiCell.xib */; };
E0F8E91B248737F100817A08 /* NewOnlyRKCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */; }; E0F8E91B248737F100817A08 /* NewOnlyRKCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */; };
E0F8E91C248737F100817A08 /* NewOnlyRKCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F8E91A248737F100817A08 /* NewOnlyRKCell.xib */; }; E0F8E91C248737F100817A08 /* NewOnlyRKCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F8E91A248737F100817A08 /* NewOnlyRKCell.xib */; };
E0F8E91F248747D200817A08 /* NewCKVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F8E91D248747D200817A08 /* NewCKVc.swift */; }; E0F8E91F248747D200817A08 /* NewCKVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F8E91D248747D200817A08 /* NewCKVc.swift */; };
...@@ -1206,6 +1208,8 @@ ...@@ -1206,6 +1208,8 @@
E0F1BE4724692379003015B2 /* ItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ItemCell.xib; sourceTree = "<group>"; }; E0F1BE4724692379003015B2 /* ItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ItemCell.xib; sourceTree = "<group>"; };
E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XinZengAndBianJiKeHuViewController.swift; sourceTree = "<group>"; }; E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XinZengAndBianJiKeHuViewController.swift; sourceTree = "<group>"; };
E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XinZengAndBianJiKeHuViewController.xib; sourceTree = "<group>"; }; E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XinZengAndBianJiKeHuViewController.xib; sourceTree = "<group>"; };
E0F83BA725F7085400D31672 /* NewPiCiCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewPiCiCell.swift; sourceTree = "<group>"; };
E0F83BA825F7085400D31672 /* NewPiCiCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewPiCiCell.xib; sourceTree = "<group>"; };
E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewOnlyRKCell.swift; sourceTree = "<group>"; }; E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewOnlyRKCell.swift; sourceTree = "<group>"; };
E0F8E91A248737F100817A08 /* NewOnlyRKCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewOnlyRKCell.xib; sourceTree = "<group>"; }; E0F8E91A248737F100817A08 /* NewOnlyRKCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewOnlyRKCell.xib; sourceTree = "<group>"; };
E0F8E91D248747D200817A08 /* NewCKVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewCKVc.swift; sourceTree = "<group>"; }; E0F8E91D248747D200817A08 /* NewCKVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewCKVc.swift; sourceTree = "<group>"; };
...@@ -2258,6 +2262,7 @@ ...@@ -2258,6 +2262,7 @@
E09B03AD2445B0BA00211A51 /* ViewController */ = { E09B03AD2445B0BA00211A51 /* ViewController */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E0F83BA625F7082E00D31672 /* 批次库新Cell */,
E02A3CAC25C3ECCD00A4E369 /* 商品库存 */, E02A3CAC25C3ECCD00A4E369 /* 商品库存 */,
E06FBA9025BFE3B100E9C2BA /* 溯源 */, E06FBA9025BFE3B100E9C2BA /* 溯源 */,
E06B1AE925B52684002F3C65 /* 打印订单 */, E06B1AE925B52684002F3C65 /* 打印订单 */,
...@@ -2825,6 +2830,15 @@ ...@@ -2825,6 +2830,15 @@
path = PurchaseModel; path = PurchaseModel;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
E0F83BA625F7082E00D31672 /* 批次库新Cell */ = {
isa = PBXGroup;
children = (
E0F83BA725F7085400D31672 /* NewPiCiCell.swift */,
E0F83BA825F7085400D31672 /* NewPiCiCell.xib */,
);
path = "批次库新Cell";
sourceTree = "<group>";
};
E0F97B05245161E6001BD600 /* 商品详情 */ = { E0F97B05245161E6001BD600 /* 商品详情 */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -3816,6 +3830,7 @@ ...@@ -3816,6 +3830,7 @@
E00CBA0224820CF000701D9D /* CRKSumCell.xib in Resources */, E00CBA0224820CF000701D9D /* CRKSumCell.xib in Resources */,
E0206335246CE45A007A40C4 /* HeaderOnlyTitleView.xib in Resources */, E0206335246CE45A007A40C4 /* HeaderOnlyTitleView.xib in Resources */,
E0E5605425C1672E0004BA56 /* Print_Gprinter_View.xib in Resources */, E0E5605425C1672E0004BA56 /* Print_Gprinter_View.xib in Resources */,
E0F83BAA25F7085400D31672 /* NewPiCiCell.xib in Resources */,
E0B903CA259B11C20041EF62 /* FXSY_Detail_ViewController.xib in Resources */, E0B903CA259B11C20041EF62 /* FXSY_Detail_ViewController.xib in Resources */,
E0A409D524640B8300CFF109 /* DZGLViewController.xib in Resources */, E0A409D524640B8300CFF109 /* DZGLViewController.xib in Resources */,
F95567A82453DA86009674AB /* WarehoseMangementListVC.xib in Resources */, F95567A82453DA86009674AB /* WarehoseMangementListVC.xib in Resources */,
...@@ -4177,6 +4192,7 @@ ...@@ -4177,6 +4192,7 @@
F950FDA32451438A00C40530 /* AdminInfoModel.swift in Sources */, F950FDA32451438A00C40530 /* AdminInfoModel.swift in Sources */,
E0D197D5244860B1002B080C /* BlueToothCell.swift in Sources */, E0D197D5244860B1002B080C /* BlueToothCell.swift in Sources */,
F961D27724503F51007FBE70 /* OrderSelectMoreView.swift in Sources */, F961D27724503F51007FBE70 /* OrderSelectMoreView.swift in Sources */,
E0F83BA925F7085400D31672 /* NewPiCiCell.swift in Sources */,
E0DA8AAC25E8F3D800425099 /* SVProgressAnimatedView.m in Sources */, E0DA8AAC25E8F3D800425099 /* SVProgressAnimatedView.m in Sources */,
F933F6C62452C68B00189561 /* PKHUDAssets.swift in Sources */, F933F6C62452C68B00189561 /* PKHUDAssets.swift in Sources */,
F976255C2552B392001EC5B0 /* DistributorSettingAlertView.swift in Sources */, F976255C2552B392001EC5B0 /* DistributorSettingAlertView.swift in Sources */,
......
...@@ -11,6 +11,7 @@ protocol DaiKeXiaDanGouWuCellDelegate { ...@@ -11,6 +11,7 @@ protocol DaiKeXiaDanGouWuCellDelegate {
func DaiKeXiaDanGouWuCellDelAction(cell:DaiKeXiaDanGouWuCell) func DaiKeXiaDanGouWuCellDelAction(cell:DaiKeXiaDanGouWuCell)
func DaiKeXiaDanGouWuCellRemarkChange(cell:DaiKeXiaDanGouWuCell) func DaiKeXiaDanGouWuCellRemarkChange(cell:DaiKeXiaDanGouWuCell)
func DaiKeXiaDanGouWuCell_check(cell:DaiKeXiaDanGouWuCell) func DaiKeXiaDanGouWuCell_check(cell:DaiKeXiaDanGouWuCell)
func DaiKeXiaDanGouWuCell_select_pi_ci(cell:DaiKeXiaDanGouWuCell)
} }
class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate { class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
@IBOutlet weak var bottom_margin: NSLayoutConstraint! @IBOutlet weak var bottom_margin: NSLayoutConstraint!
...@@ -41,7 +42,15 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate { ...@@ -41,7 +42,15 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
@IBOutlet weak var ding_jin_lbl: UILabel! @IBOutlet weak var ding_jin_lbl: UILabel!
@IBOutlet weak var wei_kuan_lbl: UILabel! @IBOutlet weak var wei_kuan_lbl: UILabel!
@IBOutlet weak var non_add_icon: UIImageView!
@IBOutlet weak var right_margin: NSLayoutConstraint!
@IBOutlet weak var status_text_lbl: UILabel!
@IBOutlet weak var already_add_icon: UIImageView!
@IBOutlet weak var text_line: UIView!
@IBAction func select_pi_ci_action(_ sender: UIButton) {
delegate?.DaiKeXiaDanGouWuCell_select_pi_ci(cell: self)
}
override func layoutSubviews() { override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
if isFx{ if isFx{
......
...@@ -243,33 +243,82 @@ ...@@ -243,33 +243,82 @@
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</view> </view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="red_search" translatesAutoresizingMaskIntoConstraints="NO" id="2ax-g5-nsE">
<rect key="frame" x="236.5" y="99" width="18" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="6wd-Is-y0c"/>
<constraint firstAttribute="width" constant="18" id="XOu-iU-64v"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jinruDetail" translatesAutoresizingMaskIntoConstraints="NO" id="8zd-iW-KDg">
<rect key="frame" x="355.5" y="102" width="4.5" height="9"/>
<constraints>
<constraint firstAttribute="width" constant="4.5" id="F6Z-j0-3TL"/>
<constraint firstAttribute="height" constant="9" id="a0h-Rz-fch"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择批次号发货" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9q1-sY-v6o">
<rect key="frame" x="259.5" y="97.5" width="91" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="#F57575"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mWq-Qk-4PK">
<rect key="frame" x="259.5" y="113" width="91" height="1"/>
<color key="backgroundColor" name="#F57575"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="otR-be-ZUZ"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ijb-Bx-Pkl">
<rect key="frame" x="236.5" y="91.5" width="123.5" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="6xO-rP-l1e"/>
</constraints>
<connections>
<action selector="select_pi_ci_action:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="NF2-RN-Qtk"/>
</connections>
</button>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="Ijb-Bx-Pkl" firstAttribute="leading" secondItem="2ax-g5-nsE" secondAttribute="leading" id="0lC-HT-L1r"/>
<constraint firstItem="WMj-FN-Sws" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="bottom" constant="15" id="1VP-8b-PTQ"/> <constraint firstItem="WMj-FN-Sws" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="bottom" constant="15" id="1VP-8b-PTQ"/>
<constraint firstItem="2ax-g5-nsE" firstAttribute="centerY" secondItem="9q1-sY-v6o" secondAttribute="centerY" id="2Zq-ax-sCp"/>
<constraint firstItem="oAm-E1-HwQ" firstAttribute="top" secondItem="WMj-FN-Sws" secondAttribute="bottom" constant="15" id="4IR-Qw-Ra4"/> <constraint firstItem="oAm-E1-HwQ" firstAttribute="top" secondItem="WMj-FN-Sws" secondAttribute="bottom" constant="15" id="4IR-Qw-Ra4"/>
<constraint firstItem="Ijb-Bx-Pkl" firstAttribute="centerY" secondItem="9q1-sY-v6o" secondAttribute="centerY" id="4qe-kP-vvD"/>
<constraint firstItem="mWq-Qk-4PK" firstAttribute="top" secondItem="9q1-sY-v6o" secondAttribute="bottom" constant="-3" id="5sM-a4-5Ys"/>
<constraint firstItem="9q1-sY-v6o" firstAttribute="leading" secondItem="2ax-g5-nsE" secondAttribute="trailing" constant="5" id="5wx-ab-jcR"/>
<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="2zV-nI-93U" firstAttribute="trailing" secondItem="AWX-Qu-0ML" secondAttribute="trailing" id="9vT-N9-JOf"/> <constraint firstItem="2zV-nI-93U" firstAttribute="trailing" secondItem="AWX-Qu-0ML" secondAttribute="trailing" id="9vT-N9-JOf"/>
<constraint firstItem="8zd-iW-KDg" firstAttribute="leading" secondItem="9q1-sY-v6o" secondAttribute="trailing" constant="5" id="BfO-GJ-DzW"/>
<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="AWX-Qu-0ML" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="20" id="JoA-Ad-gIn"/> <constraint firstItem="AWX-Qu-0ML" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="20" id="JoA-Ad-gIn"/>
<constraint firstItem="2zV-nI-93U" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="top" id="L68-da-sK0"/> <constraint firstItem="2zV-nI-93U" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="top" id="L68-da-sK0"/>
<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="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="HYf-UQ-mHg" firstAttribute="centerY" secondItem="4lb-rz-I6F" secondAttribute="centerY" id="UmC-Iq-hqN"/> <constraint firstItem="HYf-UQ-mHg" firstAttribute="centerY" secondItem="4lb-rz-I6F" secondAttribute="centerY" id="UmC-Iq-hqN"/>
<constraint firstItem="Ijb-Bx-Pkl" firstAttribute="trailing" secondItem="8zd-iW-KDg" secondAttribute="trailing" id="W5X-N8-IDg"/>
<constraint firstItem="WMj-FN-Sws" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="XgB-ga-d7b"/> <constraint firstItem="WMj-FN-Sws" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="XgB-ga-d7b"/>
<constraint firstAttribute="trailing" secondItem="WMj-FN-Sws" secondAttribute="trailing" constant="15" id="ZdP-Hy-MQF"/> <constraint firstAttribute="trailing" secondItem="WMj-FN-Sws" secondAttribute="trailing" constant="15" id="ZdP-Hy-MQF"/>
<constraint firstItem="WMj-FN-Sws" firstAttribute="top" secondItem="8zd-iW-KDg" secondAttribute="bottom" constant="14" id="ay9-Ak-hvb"/>
<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="HYf-UQ-mHg" firstAttribute="leading" secondItem="ftv-xQ-eXW" secondAttribute="trailing" constant="2.5" id="fET-WC-QtF"/> <constraint firstItem="HYf-UQ-mHg" firstAttribute="leading" secondItem="ftv-xQ-eXW" secondAttribute="trailing" constant="2.5" id="fET-WC-QtF"/>
<constraint firstItem="mWq-Qk-4PK" firstAttribute="leading" secondItem="9q1-sY-v6o" secondAttribute="leading" id="i88-i6-WHv"/>
<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 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="mWq-Qk-4PK" firstAttribute="trailing" secondItem="9q1-sY-v6o" secondAttribute="trailing" id="tYW-YB-D4k"/>
<constraint firstAttribute="trailing" secondItem="HYf-UQ-mHg" secondAttribute="trailing" constant="15" id="uj5-J9-bpT"/> <constraint firstAttribute="trailing" secondItem="HYf-UQ-mHg" secondAttribute="trailing" constant="15" id="uj5-J9-bpT"/>
<constraint firstAttribute="trailing" secondItem="8zd-iW-KDg" secondAttribute="trailing" constant="15" id="vH9-bf-1bN"/>
<constraint firstItem="9q1-sY-v6o" firstAttribute="centerY" secondItem="8zd-iW-KDg" secondAttribute="centerY" id="wUu-Ay-fTJ"/>
<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="already_add_icon" destination="8zd-iW-KDg" id="teT-TH-W7n"/>
<outlet property="arrow_img" destination="2p2-7L-Hi7" id="iJ8-Mg-yL3"/> <outlet property="arrow_img" destination="2p2-7L-Hi7" id="iJ8-Mg-yL3"/>
<outlet property="bottom_margin" destination="0h4-hS-U5y" id="BtA-52-6DM"/> <outlet property="bottom_margin" destination="0h4-hS-U5y" id="BtA-52-6DM"/>
<outlet property="botton_height" destination="5Ig-Ek-Czg" id="2aJ-UD-gPB"/> <outlet property="botton_height" destination="5Ig-Ek-Czg" id="2aJ-UD-gPB"/>
...@@ -291,6 +340,10 @@ ...@@ -291,6 +340,10 @@
<outlet property="edit_img" destination="Dmd-Un-AkZ" id="Wem-3z-XGv"/> <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="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="non_add_icon" destination="2ax-g5-nsE" id="gHG-EI-PWz"/>
<outlet property="right_margin" destination="BfO-GJ-DzW" id="hOI-8D-eix"/>
<outlet property="status_text_lbl" destination="9q1-sY-v6o" id="paD-cR-Nv4"/>
<outlet property="text_line" destination="mWq-Qk-4PK" id="daI-TV-5BJ"/>
<outlet property="titleLbl" destination="HYf-UQ-mHg" id="bMC-Ni-Yjv"/> <outlet property="titleLbl" destination="HYf-UQ-mHg" id="bMC-Ni-Yjv"/>
<outlet property="wei_kuan_lbl" destination="6Xr-MY-QEo" id="hu1-bI-zGd"/> <outlet property="wei_kuan_lbl" destination="6Xr-MY-QEo" id="hu1-bI-zGd"/>
<outlet property="xiao_ji_lbl" destination="Rio-TZ-iyo" id="4Uh-GN-8oj"/> <outlet property="xiao_ji_lbl" destination="Rio-TZ-iyo" id="4Uh-GN-8oj"/>
...@@ -302,7 +355,9 @@ ...@@ -302,7 +355,9 @@
</objects> </objects>
<resources> <resources>
<image name="bianji" width="17" height="16.5"/> <image name="bianji" width="17" height="16.5"/>
<image name="jinruDetail" width="4.5" height="9"/>
<image name="red_arrow" width="4" height="8"/> <image name="red_arrow" width="4" height="8"/>
<image name="red_search" width="17.5" height="15"/>
<image name="shanchuDel" width="15" height="15"/> <image name="shanchuDel" width="15" height="15"/>
<image name="yushou" width="34" height="18"/> <image name="yushou" width="34" height="18"/>
<namedColor name="#F57575"> <namedColor name="#F57575">
......
...@@ -10,6 +10,10 @@ import UIKit ...@@ -10,6 +10,10 @@ 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 DaiKeXiaDanGouWuCell_select_pi_ci(cell: DaiKeXiaDanGouWuCell) {
print("选择批次")
}
func DaiKeXiaDanGouWuCell_check(cell: DaiKeXiaDanGouWuCell) { func DaiKeXiaDanGouWuCell_check(cell: DaiKeXiaDanGouWuCell) {
//此处无用 //此处无用
} }
......
<?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" 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="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>
...@@ -71,7 +72,7 @@ ...@@ -71,7 +72,7 @@
<constraint firstAttribute="width" constant="5" id="zBJ-dg-E4a"/> <constraint firstAttribute="width" constant="5" id="zBJ-dg-E4a"/>
</constraints> </constraints>
</imageView> </imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Q4n-jx-b2i"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Q4n-jx-b2i">
<rect key="frame" x="325" y="0.0" width="50" height="99"/> <rect key="frame" x="325" y="0.0" width="50" height="99"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="50" id="Xmo-fD-fPw"/> <constraint firstAttribute="width" constant="50" id="Xmo-fD-fPw"/>
...@@ -93,7 +94,7 @@ ...@@ -93,7 +94,7 @@
<state key="selected" image="yuxuan"/> <state key="selected" image="yuxuan"/>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="q1A-kf-Vam" secondAttribute="trailing" constant="15" id="7rf-NV-2qJ"/> <constraint firstAttribute="trailing" secondItem="q1A-kf-Vam" secondAttribute="trailing" constant="15" id="7rf-NV-2qJ"/>
<constraint firstItem="q1A-kf-Vam" firstAttribute="centerY" secondItem="yTm-Gk-jr3" secondAttribute="centerY" id="Lfn-Bw-qKb"/> <constraint firstItem="q1A-kf-Vam" firstAttribute="centerY" secondItem="yTm-Gk-jr3" secondAttribute="centerY" id="Lfn-Bw-qKb"/>
...@@ -152,5 +153,8 @@ ...@@ -152,5 +153,8 @@
<namedColor name="灰色字体颜色"> <namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" 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>
<?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" 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>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <deployment identifier="iOS"/>
<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"/>
......
<?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" 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"/>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<constraint firstAttribute="height" constant="1" id="opq-TL-L7q"/> <constraint firstAttribute="height" constant="1" id="opq-TL-L7q"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="I9V-jy-9tk"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="I9V-jy-9tk">
<rect key="frame" x="325" y="0.0" width="50" height="49"/> <rect key="frame" x="325" y="0.0" width="50" height="49"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="50" id="mgm-qv-MsR"/> <constraint firstAttribute="width" constant="50" id="mgm-qv-MsR"/>
......
...@@ -10,8 +10,79 @@ import UIKit ...@@ -10,8 +10,79 @@ import UIKit
protocol PiCiXuanZeViewControllerDelegate { protocol PiCiXuanZeViewControllerDelegate {
func PiCiXuanZeViewControllerPiCiSelect(data:Array<GetGoodBatchDataModel>,p_id:Int) func PiCiXuanZeViewControllerPiCiSelect(data:Array<GetGoodBatchDataModel>,p_id:Int)
} }
class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,PiCiXuanZeCellDelegate{ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource, NewPiCiCellDelegate{
func NewPiCiXuanZeCellBtnTextChange(sender: String, cell: NewPiCiCell) {
let num = sender as NSString
let data = dataArray[cell.tag]
data.chuHuoLiang = num.integerValue
}
func NewPiCiXuanZeCellBtnSelect(cell: NewPiCiCell) {
//已选择cell
if selectArr.contains(cell.tag){
let idx = selectArr.index(of: cell.tag)
selectArr.remove(at: idx!)
}else{
selectArr.append(cell.tag)
}
//数据
let data = dataArray[cell.tag]
let idx = recordArr.firstIndex { (model) -> Bool in
return data.batch_id == model.batch_id
}
if idx != nil {
recordArr.remove(at: idx!)
}else{
recordArr.append(data)
}
totalCount = 0
for item in recordArr{
if item.chuHuoLiang != nil {
totalCount += item.chuHuoLiang!
}
}
count_Lbl.text = StringByInt(number: totalCount)
}
func NewPiCiXuanZeCellRefreshCount(cell: NewPiCiCell) {
if selectArr.contains(cell.tag) == false {
selectArr.append(cell.tag)
}
print(selectArr.count)
let data = dataArray[cell.tag]
let idx = recordArr.firstIndex { (model) -> Bool in
return data.batch_id == model.batch_id
}
if idx == nil {
recordArr.append(data)
}
print(recordArr.count)
totalCount = 0
for item in selectArr{
let data = dataArray[item]
if data.chuHuoLiang != nil {
print(data.chuHuoLiang)
totalCount += data.chuHuoLiang!
}
}
count_Lbl.text = StringByInt(number: totalCount)
listView.reloadData()
}
func NewPiCiCellScrollAction(x: CGFloat) {
let cells = listView.visibleCells
cells.forEach { (item) in
let cell = item as! NewPiCiCell
cell.scroll_view.setContentOffset(CGPoint(x: x, y: 0), animated: false)
}
scroll_view.setContentOffset(CGPoint(x: x, y: 0), animated: false)
}
@IBOutlet weak var top_bg_view: UIView!
var first = true var first = true
var p_id:Int? var p_id:Int?
...@@ -20,13 +91,13 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -20,13 +91,13 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
var totalCount = 0 var totalCount = 0
var selectArr:Array<Int> = [] var selectArr:Array<Int> = []
var recordArr:Array<GetGoodBatchDataModel> = [] var recordArr:Array<GetGoodBatchDataModel> = []
@IBOutlet weak var count_Lbl: UILabel!
var dataArray:Array<GetGoodBatchDataModel> = [] var dataArray:Array<GetGoodBatchDataModel> = []
@IBOutlet weak var topView: UIView! @IBOutlet weak var topView: UIView!
@IBOutlet weak var btmLbl: UILabel! @IBOutlet weak var btmLbl: UILabel!
var delegate:PiCiXuanZeViewControllerDelegate? var delegate:PiCiXuanZeViewControllerDelegate?
@IBAction func submitAction(_ sender: Any) { @IBAction func submitAction(_ sender: Any) {
for item in recordArr { for item in recordArr {
if item.chuHuoLiang == nil { if item.chuHuoLiang == nil {
HUD.flash(.label("请输入数量"), delay: 1.2) HUD.flash(.label("请输入数量"), delay: 1.2)
return return
...@@ -44,6 +115,15 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -44,6 +115,15 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
delegate?.PiCiXuanZeViewControllerPiCiSelect(data: recordArr,p_id: tag!) delegate?.PiCiXuanZeViewControllerPiCiSelect(data: recordArr,p_id: tag!)
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
let scroll_view = UIScrollView()
func setTextFrame(lbl:UILabel){
lbl.textColor = UIColor(named: "标题字颜色")
lbl.font = UIFont.systemFont(ofSize: 13)
lbl.textAlignment = .center
}
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -57,10 +137,48 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -57,10 +137,48 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
make.left.right.equalTo(0) make.left.right.equalTo(0)
make.height.equalTo(44) make.height.equalTo(44)
} }
let dateLbl = UILabel()
let nameLbl = UILabel()
let SLLbl = UILabel()
let inputLbl = UILabel()
let statusLbl = UILabel()
scroll_view.bounces = false
top_bg_view.addSubview(scroll_view)
scroll_view.snp.makeConstraints { (make) in
make.top.left.right.bottom.equalToSuperview()
}
scroll_view.contentSize = CGSize(width: 448, height: 49)
scroll_view.showsHorizontalScrollIndicator = false
scroll_view.showsVerticalScrollIndicator = false
scroll_view.addSubview(nameLbl)
scroll_view.addSubview(dateLbl)
scroll_view.addSubview(SLLbl)
scroll_view.addSubview(inputLbl)
scroll_view.addSubview(statusLbl)
scroll_view.delegate = self
setTextFrame(lbl: nameLbl)
nameLbl.frame = CGRect(x: 0, y: 0, width: 95, height: 49)
nameLbl.text = "格利批次号"
setTextFrame(lbl: SLLbl)
SLLbl.frame = CGRect(x: 95, y: 0, width: 92, height: 49)
SLLbl.text = "现有库存"
setTextFrame(lbl: inputLbl)
inputLbl.frame = CGRect(x: SLLbl.frame.maxX, y: 0, width:100, height: 49)
inputLbl.text = "出库数"
setTextFrame(lbl: statusLbl)
statusLbl.frame = CGRect(x: inputLbl.frame.maxX, y: 0, width: 66, height: 49)
statusLbl.text = "状态"
setTextFrame(lbl: dateLbl)
dateLbl.frame = CGRect(x: statusLbl.frame.maxX , y: 0, width: 95, height: 49)
dateLbl.text = "生产日期"
listView.separatorStyle = .none listView.separatorStyle = .none
listView.register(UINib(nibName: "PiCiXuanZeCell", bundle: nil), forCellReuseIdentifier: "PiCiXuanZeCell") listView.register(UINib(nibName: "NewPiCiCell", bundle: nil), forCellReuseIdentifier: "NewPiCiCell")
listView.register(UINib(nibName: "CRKSumCell", bundle: nil), forCellReuseIdentifier: "CRKSumCell") // listView.register(UINib(nibName: "CRKSumCell", bundle: nil), forCellReuseIdentifier: "CRKSumCell")
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
let dic = ["user_token":UserToken as Any,"sku_id":sku_id as Any] let dic = ["user_token":UserToken as Any,"sku_id":sku_id as Any]
...@@ -106,19 +224,22 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -106,19 +224,22 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
} }
return dataArray.count return dataArray.count
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 1 { // if indexPath.section == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKSumCell") as! CRKSumCell // let cell = tableView.dequeueReusableCell(withIdentifier: "CRKSumCell") as! CRKSumCell
//
cell.countLbl.text = "\(totalCount)" // cell.countLbl.text = "\(totalCount)"
return cell // return cell
} // }
let cell = tableView.dequeueReusableCell(withIdentifier: "PiCiXuanZeCell") as! PiCiXuanZeCell
let cell = tableView.dequeueReusableCell(withIdentifier: "NewPiCiCell") as! NewPiCiCell
cell.tag = indexPath.row cell.tag = indexPath.row
let model = dataArray[indexPath.row] let model = dataArray[indexPath.row]
cell.delegate = self cell.delegate = self
var name = "" var name = ""
cell.statusLbl.textColor = UIColor(named: "标题字颜色")
switch model.status { switch model.status {
case 1: case 1:
name = "正常" name = "正常"
...@@ -127,26 +248,28 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -127,26 +248,28 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
name = "临期" name = "临期"
break break
default: default:
cell.statusLbl.textColor = UIColor(named: "#F57575")
name = "过期" name = "过期"
break break
} }
cell.nameLbl.text = name cell.statusLbl.text = name
cell.SLLbl.text = "\(model.inventory!)" cell.SLLbl.text = "\(model.inventory!)"
cell.dateLbl.text = dayByDouble(sender: model.production_data!) cell.dateLbl.text = dayByDouble(sender: model.production_data!)
if model.production_data == 0 { if model.production_data == 0 {
cell.dateLbl.text = "-" cell.dateLbl.text = "-"
} }
cell.nameLbl.text = model.batch_sn
if recordArr.count > 0 { if recordArr.count > 0 {
for item in recordArr { for item in recordArr {
if model.batch_id == item.batch_id { if model.batch_id == item.batch_id {
if item.chuHuoLiang != nil { if item.chuHuoLiang != nil {
cell.textTF.text = "\(item.chuHuoLiang!)" cell.textTf.text = "\(item.chuHuoLiang!)"
if model.chuHuoLiang != nil{ if model.chuHuoLiang != nil{
cell.textTF.text = "\(model.chuHuoLiang!)" cell.textTf.text = "\(model.chuHuoLiang!)"
} }
} }
cell.iconBtn.isSelected = true cell.select_btn.isSelected = true
if first { if first {
first = false first = false
selectArr.append(cell.tag) selectArr.append(cell.tag)
...@@ -158,74 +281,8 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -158,74 +281,8 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
return cell return cell
} }
func PiCiXuanZeCellBtnTextChange(sender: String, cell: PiCiXuanZeCell) {
let num = sender as NSString
let data = dataArray[cell.tag]
data.chuHuoLiang = num.integerValue
// let item = recordArr[cell.tag]
// item.chuHuoLiang = num.integerValue
}
func PiCiXuanZeCellRefreshCount(cell:PiCiXuanZeCell) {
if selectArr.contains(cell.tag) == false {
selectArr.append(cell.tag)
}
print(selectArr.count)
let data = dataArray[cell.tag]
let idx = recordArr.firstIndex { (model) -> Bool in
return data.batch_id == model.batch_id
}
if idx == nil {
recordArr.append(data)
}
print(recordArr.count)
totalCount = 0
for item in selectArr{
let data = dataArray[item]
if data.chuHuoLiang != nil {
print(data.chuHuoLiang)
totalCount += data.chuHuoLiang!
}
}
listView.reloadData()
}
func PiCiXuanZeCellBtnSelect(cell: PiCiXuanZeCell) {
//已选择cell
if selectArr.contains(cell.tag){
let idx = selectArr.index(of: cell.tag)
selectArr.remove(at: idx!)
}else{
selectArr.append(cell.tag)
}
//数据
let data = dataArray[cell.tag]
let idx = recordArr.firstIndex { (model) -> Bool in
return data.batch_id == model.batch_id
}
if idx != nil {
recordArr.remove(at: idx!)
}else{
recordArr.append(data)
}
totalCount = 0
for item in recordArr{
if item.chuHuoLiang != nil {
totalCount += item.chuHuoLiang!
}
}
let index = IndexPath(row: 0, section: 1)
listView.reloadRows(at: [index], with: .none)
}
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
return 2 return 1
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
......
<?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="15702" 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>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/> <deployment identifier="iOS"/>
<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="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" customClass="PiCiXuanZeViewController" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PiCiXuanZeViewController" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="btmLbl" destination="Qji-1s-fD7" id="JA3-Ch-NgA"/> <outlet property="btmLbl" destination="FDL-5Z-81H" id="K47-Sd-ruu"/>
<outlet property="count_Lbl" destination="l3D-W7-IC2" id="exz-mY-YRo"/>
<outlet property="listView" destination="rmE-ev-Vs6" id="08r-Wx-mFX"/> <outlet property="listView" destination="rmE-ev-Vs6" id="08r-Wx-mFX"/>
<outlet property="topView" destination="aid-5j-rEA" id="SgT-c2-ddM"/> <outlet property="topView" destination="uD0-3s-Lqu" id="ksR-vM-UFX"/>
<outlet property="top_bg_view" destination="lKh-y3-Yv0" id="O1D-GV-nys"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
...@@ -21,9 +25,9 @@ ...@@ -21,9 +25,9 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Hf-Tw-Zb7" customClass="LGButton" customModule="LGButton"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yq0-JD-flF" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/> <rect key="frame" x="267" y="813" width="147" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor"> <userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
<color key="value" name="按钮渐变色上"/> <color key="value" name="按钮渐变色上"/>
...@@ -34,143 +38,149 @@ ...@@ -34,143 +38,149 @@
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/> <userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections> <connections>
<action selector="submitAction:" destination="-1" eventType="touchUpInside" id="9gX-uX-F3x"/> <action selector="submitAction:" destination="-1" eventType="touchUpInside" id="KAw-gW-ouW"/>
</connections> </connections>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="确定" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qji-1s-fD7"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="rmE-ev-Vs6">
<rect key="frame" x="0.0" y="813" width="414" height="49"/> <rect key="frame" x="0.0" y="88" width="414" height="725"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="uCY-mS-nSb"/>
<outlet property="delegate" destination="-1" id="n0W-aI-Uhq"/>
</connections>
</tableView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="确定" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FDL-5Z-81H">
<rect key="frame" x="267" y="813" width="147" height="49"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="49" id="YIu-E2-TJ6"/> <constraint firstAttribute="width" constant="147" id="AOy-tt-Uya"/>
<constraint firstAttribute="height" constant="49" id="XpW-zZ-xz7"/>
</constraints> </constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="17"/> <fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="17"/>
<color key="textColor" name="白色背景色"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aid-5j-rEA"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pAX-4C-18L">
<rect key="frame" x="0.0" y="813" width="267" height="83"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="下单数量:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iBz-df-rhs">
<rect key="frame" x="15" y="15.5" width="65" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<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="l3D-W7-IC2">
<rect key="frame" x="80" y="15.5" width="8" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="#F57575"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="l3D-W7-IC2" firstAttribute="centerY" secondItem="iBz-df-rhs" secondAttribute="centerY" id="eb8-Zc-fT2"/>
<constraint firstItem="l3D-W7-IC2" firstAttribute="leading" secondItem="iBz-df-rhs" secondAttribute="trailing" id="jrs-O6-YCW"/>
<constraint firstItem="iBz-df-rhs" firstAttribute="leading" secondItem="pAX-4C-18L" secondAttribute="leading" constant="15" id="lgZ-RL-VLs"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uD0-3s-Lqu">
<rect key="frame" x="0.0" y="44" width="414" height="44"/> <rect key="frame" x="0.0" y="44" width="414" height="44"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vvp-8e-GwU"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u9P-a1-W9l">
<rect key="frame" x="0.0" y="43" width="414" height="1"/> <rect key="frame" x="364" y="0.0" width="50" height="44"/>
<color key="backgroundColor" name="灰色分界线"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="2Hv-YV-0WH"/> <constraint firstAttribute="width" constant="50" id="Eo0-Zf-Tgy"/>
</constraints> </constraints>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="状态" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JTk-im-Oti"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YBw-9a-kS7">
<rect key="frame" x="0.0" y="0.0" width="43" height="44"/> <rect key="frame" x="363" y="3" width="1" height="38"/>
<constraints> <color key="backgroundColor" name="灰色分界线"/>
<constraint firstAttribute="width" constant="43" id="0N4-hv-mXD">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="多选按钮字体颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现有库存" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="86w-pT-2DE">
<rect key="frame" x="43" y="0.0" width="90" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="90" id="bzm-H5-Xhy"> <constraint firstAttribute="width" constant="1" id="7Lo-Ji-o7O"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/> </view>
<color key="textColor" name="多选按钮字体颜色"/> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lKh-y3-Yv0">
<nil key="highlightedColor"/> <rect key="frame" x="0.0" y="0.0" width="363" height="44"/>
</label> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="出库数" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nRV-bb-zPD"> </view>
<rect key="frame" x="133" y="0.0" width="174" height="43"/> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lju-sf-vrY">
<fontDescription key="fontDescription" type="system" pointSize="11"/> <rect key="frame" x="0.0" y="43" width="414" height="1"/>
<color key="textColor" name="多选按钮字体颜色"/> <color key="backgroundColor" 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="3Xi-3d-1cD">
<rect key="frame" x="307" y="0.0" width="107" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="107" id="hM0-5m-LBq"> <constraint firstAttribute="height" constant="1" id="bsI-Mq-zst"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/> </view>
<color key="textColor" name="多选按钮字体颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstItem="3Xi-3d-1cD" firstAttribute="leading" secondItem="nRV-bb-zPD" secondAttribute="trailing" id="0E5-Ea-kWh"/> <constraint firstAttribute="bottom" secondItem="YBw-9a-kS7" secondAttribute="bottom" constant="3" id="8tH-l2-J7m"/>
<constraint firstItem="86w-pT-2DE" firstAttribute="leading" secondItem="JTk-im-Oti" secondAttribute="trailing" id="2fr-bC-5CZ"/> <constraint firstItem="lKh-y3-Yv0" firstAttribute="leading" secondItem="uD0-3s-Lqu" secondAttribute="leading" id="8za-ub-CLi"/>
<constraint firstAttribute="bottom" secondItem="JTk-im-Oti" secondAttribute="bottom" id="2iN-MG-MKS"/> <constraint firstAttribute="bottom" secondItem="u9P-a1-W9l" secondAttribute="bottom" id="CB4-6A-1FU"/>
<constraint firstAttribute="height" constant="44" id="6Jr-iN-meA"/> <constraint firstAttribute="bottom" secondItem="Lju-sf-vrY" secondAttribute="bottom" id="ND5-sQ-EtA"/>
<constraint firstItem="3Xi-3d-1cD" firstAttribute="top" secondItem="aid-5j-rEA" secondAttribute="top" id="7lo-iJ-4IQ"/> <constraint firstAttribute="trailing" secondItem="u9P-a1-W9l" secondAttribute="trailing" id="Oyb-uL-wND"/>
<constraint firstAttribute="bottom" secondItem="Vvp-8e-GwU" secondAttribute="bottom" id="C9J-LW-Y8h"/> <constraint firstItem="lKh-y3-Yv0" firstAttribute="top" secondItem="uD0-3s-Lqu" secondAttribute="top" id="R2q-bZ-OvR"/>
<constraint firstAttribute="trailing" secondItem="3Xi-3d-1cD" secondAttribute="trailing" id="FAt-3p-Sia"/> <constraint firstAttribute="trailing" secondItem="Lju-sf-vrY" secondAttribute="trailing" id="RRj-tl-Eaw"/>
<constraint firstItem="JTk-im-Oti" firstAttribute="leading" secondItem="aid-5j-rEA" secondAttribute="leading" id="GtM-RM-Fgw"/> <constraint firstItem="u9P-a1-W9l" firstAttribute="leading" secondItem="YBw-9a-kS7" secondAttribute="trailing" id="VdW-B1-Egb"/>
<constraint firstItem="86w-pT-2DE" firstAttribute="top" secondItem="aid-5j-rEA" secondAttribute="top" id="Qow-xS-EYA"/> <constraint firstItem="YBw-9a-kS7" firstAttribute="leading" secondItem="lKh-y3-Yv0" secondAttribute="trailing" id="hMO-FI-Dh7"/>
<constraint firstItem="JTk-im-Oti" firstAttribute="top" secondItem="aid-5j-rEA" secondAttribute="top" id="XPA-nD-z3c"/> <constraint firstItem="Lju-sf-vrY" firstAttribute="leading" secondItem="uD0-3s-Lqu" secondAttribute="leading" id="hSr-aF-fgF"/>
<constraint firstAttribute="bottom" secondItem="86w-pT-2DE" secondAttribute="bottom" id="Xhc-rb-9hF"/> <constraint firstAttribute="bottom" secondItem="lKh-y3-Yv0" secondAttribute="bottom" id="sth-Vw-0Nw"/>
<constraint firstAttribute="bottom" secondItem="3Xi-3d-1cD" secondAttribute="bottom" id="Ygq-p8-XZC"/> <constraint firstItem="u9P-a1-W9l" firstAttribute="top" secondItem="uD0-3s-Lqu" secondAttribute="top" id="xhh-XR-lrb"/>
<constraint firstItem="Vvp-8e-GwU" firstAttribute="top" secondItem="nRV-bb-zPD" secondAttribute="bottom" id="jg6-tC-cJW"/> <constraint firstItem="YBw-9a-kS7" firstAttribute="top" secondItem="uD0-3s-Lqu" secondAttribute="top" constant="3" id="y4N-Vp-XbP"/>
<constraint firstItem="nRV-bb-zPD" firstAttribute="leading" secondItem="86w-pT-2DE" secondAttribute="trailing" id="kmS-rE-bbW"/> <constraint firstAttribute="height" constant="44" id="y9r-gE-e8s"/>
<constraint firstAttribute="trailing" secondItem="Vvp-8e-GwU" secondAttribute="trailing" id="nZ0-9l-woX"/>
<constraint firstItem="Vvp-8e-GwU" firstAttribute="leading" secondItem="aid-5j-rEA" secondAttribute="leading" id="sWd-au-bBp"/>
<constraint firstItem="nRV-bb-zPD" firstAttribute="top" secondItem="aid-5j-rEA" secondAttribute="top" id="u8G-Ro-oyw"/>
</constraints> </constraints>
</view> </view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="rmE-ev-Vs6">
<rect key="frame" x="0.0" y="88" width="414" height="725"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="uCY-mS-nSb"/>
<outlet property="delegate" destination="-1" id="n0W-aI-Uhq"/>
</connections>
</tableView>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<constraints> <constraints>
<constraint firstItem="rmE-ev-Vs6" firstAttribute="top" secondItem="aid-5j-rEA" secondAttribute="bottom" id="4Cp-92-GrY"/> <constraint firstItem="yq0-JD-flF" firstAttribute="leading" secondItem="pAX-4C-18L" secondAttribute="trailing" id="42k-h3-psK"/>
<constraint firstItem="1Hf-Tw-Zb7" firstAttribute="top" secondItem="Qji-1s-fD7" secondAttribute="top" id="5Sq-Op-3oc"/> <constraint firstItem="rmE-ev-Vs6" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="4MP-1G-mfL"/>
<constraint firstItem="1Hf-Tw-Zb7" firstAttribute="top" secondItem="rmE-ev-Vs6" secondAttribute="bottom" id="8bn-jW-2DP"/> <constraint firstItem="uD0-3s-Lqu" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="5Ud-L1-jUO"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="rmE-ev-Vs6" secondAttribute="trailing" id="JUw-6C-fu4"/> <constraint firstAttribute="bottom" secondItem="yq0-JD-flF" secondAttribute="bottom" id="6rC-vV-aeT"/>
<constraint firstItem="Qji-1s-fD7" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="OGO-Fc-NNM"/> <constraint firstItem="uD0-3s-Lqu" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="BB0-dq-8Mt"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="Qji-1s-fD7" secondAttribute="bottom" id="QDA-56-0iN"/> <constraint firstAttribute="trailing" secondItem="yq0-JD-flF" secondAttribute="trailing" id="C81-V9-8dT"/>
<constraint firstAttribute="trailing" secondItem="1Hf-Tw-Zb7" secondAttribute="trailing" id="Ue7-Vd-A4a"/> <constraint firstItem="pAX-4C-18L" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="NlT-E0-uML"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="aid-5j-rEA" secondAttribute="trailing" id="VmA-As-hcl"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="FDL-5Z-81H" secondAttribute="bottom" id="R0R-ae-kSq"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Qji-1s-fD7" secondAttribute="trailing" id="cgf-nI-dGk"/> <constraint firstAttribute="bottom" secondItem="pAX-4C-18L" secondAttribute="bottom" id="Tru-WL-u9I"/>
<constraint firstItem="aid-5j-rEA" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="grd-FG-BfQ"/> <constraint firstItem="yq0-JD-flF" firstAttribute="top" secondItem="FDL-5Z-81H" secondAttribute="top" id="VL5-k7-UzM"/>
<constraint firstItem="1Hf-Tw-Zb7" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="jbI-Ok-u3x"/> <constraint firstItem="yq0-JD-flF" firstAttribute="top" secondItem="rmE-ev-Vs6" secondAttribute="bottom" id="cDi-Hc-dPT"/>
<constraint firstItem="aid-5j-rEA" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="lKg-8N-9gO"/> <constraint firstItem="iBz-df-rhs" firstAttribute="centerY" secondItem="FDL-5Z-81H" secondAttribute="centerY" id="dAP-QP-VJ8"/>
<constraint firstItem="rmE-ev-Vs6" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="qkf-sA-1CP"/> <constraint firstItem="pAX-4C-18L" firstAttribute="height" secondItem="yq0-JD-flF" secondAttribute="height" id="eJI-eg-ggb"/>
<constraint firstAttribute="bottom" secondItem="1Hf-Tw-Zb7" secondAttribute="bottom" id="rDJ-ac-bRf"/> <constraint firstItem="yq0-JD-flF" firstAttribute="width" secondItem="FDL-5Z-81H" secondAttribute="width" id="fJ2-6G-Cry" customClass="I"/>
<constraint firstItem="uD0-3s-Lqu" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="gJ0-Oo-PRE"/>
<constraint firstItem="rmE-ev-Vs6" firstAttribute="top" secondItem="uD0-3s-Lqu" secondAttribute="bottom" id="gPf-Ym-s2v"/>
<constraint firstItem="FDL-5Z-81H" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="l4F-DY-HII"/>
<constraint firstItem="rmE-ev-Vs6" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="zli-8s-yy8"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <point key="canvasLocation" x="128.98550724637681" y="120.53571428571428"/>
<point key="canvasLocation" x="130.40000000000001" y="120.98950524737631"/>
</view> </view>
</objects> </objects>
<designables>
<designable name="yq0-JD-flF">
<size key="intrinsicContentSize" width="10" height="10"/>
</designable>
</designables>
<resources> <resources>
<namedColor name="#F57575">
<color red="0.96100002527236938" green="0.45899999141693115" blue="0.45899999141693115" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="app底色"> <namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="多选按钮字体颜色">
<color red="0.41200000047683716" green="0.41200000047683716" blue="0.41200000047683716" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="按钮渐变色上"> <namedColor name="按钮渐变色上">
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<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>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线"> <namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="白色背景色"> <systemColor name="systemBackgroundColor">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</namedColor> </systemColor>
</resources> </resources>
</document> </document>
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
import UIKit import UIKit
class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate{ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate{
func DaiKeXiaDanGouWuCell_select_pi_ci(cell: DaiKeXiaDanGouWuCell) {
print("选择批次")
}
func S_Y_View_Check_Detail(data: OrderDetailGoodsSourceModel) { func S_Y_View_Check_Detail(data: OrderDetailGoodsSourceModel) {
print("查看溯源") print("查看溯源")
let browser = JXPhotoBrowser() let browser = JXPhotoBrowser()
......
//
// NewPiCiCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/3/9.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
protocol NewPiCiCellDelegate {
func NewPiCiCellScrollAction(x:CGFloat)
func NewPiCiXuanZeCellBtnTextChange(sender:String,cell:NewPiCiCell)
func NewPiCiXuanZeCellBtnSelect(cell:NewPiCiCell)
func NewPiCiXuanZeCellRefreshCount(cell:NewPiCiCell)
}
class NewPiCiCell: UITableViewCell, UIScrollViewDelegate,UITextFieldDelegate{
@IBAction func select_action(_ sender: UIButton) {
select_btn.isSelected = !select_btn.isSelected
if select_btn.isSelected {
textTf.textColor = UIColor(named: "蓝色字体颜色")
textTf.layer.borderColor = UIColor(named: "蓝色字体颜色")?.cgColor
}else{
textTf.textColor = UIColor(named: "9A9A9A")
textTf.layer.borderColor = UIColor(named: "9A9A9A")?.cgColor
}
delegate?.NewPiCiXuanZeCellBtnSelect(cell: self)
}
@IBOutlet weak var select_btn: UIButton!
@IBOutlet weak var bg_view: UIView!
var dateLbl = UILabel()
var nameLbl = UILabel()
var SLLbl = UILabel()
var textTf = UITextField()
var statusLbl = UILabel()
var scroll_view = UIScrollView()
var delegate:NewPiCiCellDelegate?
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
scroll_view.bounces = false
bg_view.addSubview(scroll_view)
scroll_view.snp.makeConstraints { (make) in
make.top.left.right.bottom.equalToSuperview()
}
scroll_view.contentSize = CGSize(width: 448, height: 49)
scroll_view.showsHorizontalScrollIndicator = false
scroll_view.showsVerticalScrollIndicator = false
scroll_view.addSubview(nameLbl)
scroll_view.addSubview(dateLbl)
scroll_view.addSubview(SLLbl)
scroll_view.addSubview(textTf)
scroll_view.addSubview(statusLbl)
scroll_view.delegate = self
setTextFrame(lbl: nameLbl)
nameLbl.frame = CGRect(x: 0, y: 0, width: 95, height: 49)
setTextFrame(lbl: SLLbl)
SLLbl.frame = CGRect(x: 95, y: 0, width: 92, height: 49)
textTf.frame = CGRect(x: SLLbl.frame.maxX + 15, y: 9.5, width: 70, height: 32)
textTf.layer.borderWidth = 1
textTf.textAlignment = .center
textTf.layer.cornerRadius = 3
textTf.layer.masksToBounds = true
textTf.textColor = UIColor(named: "9A9A9A")
textTf.layer.borderColor = UIColor(named: "9A9A9A")?.cgColor
setTextFrame(lbl: statusLbl)
statusLbl.frame = CGRect(x: textTf.frame.maxX + 15, y: 0, width: 66, height: 49)
setTextFrame(lbl: dateLbl)
dateLbl.frame = CGRect(x: statusLbl.frame.maxX , y: 0, width: 95, height: 49)
// Initialization code
textTf.keyboardType = .numberPad
textTf.delegate = self
textTf.addTarget(self, action: #selector(textChange(sender:)), for: .editingChanged)
}
func setTextFrame(lbl:UILabel){
lbl.textColor = UIColor(named: "标题字颜色")
lbl.font = UIFont.systemFont(ofSize: 13)
lbl.textAlignment = .center
lbl.text = "123"
}
func scrollViewDidScroll(_ scrollView: UIScrollView) {
delegate?.NewPiCiCellScrollAction(x: scrollView.contentOffset.x)
}
func textFieldDidEndEditing(_ textField: UITextField) {
if isPurnInt(string: textTf.text!){
delegate?.NewPiCiXuanZeCellRefreshCount(cell:self)
}
}
@objc func textChange(sender:UITextField){
if isPurnInt(string: textTf.text!){
let num1 = textTf.text as! NSString
let num2 = SLLbl.text as! NSString
if num1.integerValue > num2.integerValue {
HUD.flash(.label("超出库存"), delay: 1.2)
textTf.text = SLLbl.text
}
if num1.integerValue == 0{
HUD.flash(.label("出库数量不能为0"), delay: 1.2)
textTf.text = ""
}
delegate?.NewPiCiXuanZeCellBtnTextChange(sender: textTf.text!, cell: self)
}
}
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="17701" 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="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="NewPiCiCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<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="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T4a-gd-2AQ">
<rect key="frame" x="270" y="0.0" width="50" height="44"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5vc-KW-aaq">
<rect key="frame" x="0.0" y="0.0" width="50" height="44"/>
<state key="normal" image="daixuan"/>
<state key="selected" image="yuxuan"/>
<connections>
<action selector="select_action:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="HZY-or-Rou"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="5vc-KW-aaq" secondAttribute="trailing" id="EFC-NO-hyf"/>
<constraint firstItem="5vc-KW-aaq" firstAttribute="leading" secondItem="T4a-gd-2AQ" secondAttribute="leading" id="faM-Ia-MEb"/>
<constraint firstAttribute="bottom" secondItem="5vc-KW-aaq" secondAttribute="bottom" id="g5i-sh-Zt9"/>
<constraint firstItem="5vc-KW-aaq" firstAttribute="top" secondItem="T4a-gd-2AQ" secondAttribute="top" id="pDf-At-TIs"/>
<constraint firstAttribute="width" constant="50" id="zue-ML-y3T"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0g9-tQ-8oz">
<rect key="frame" x="269" y="3" width="1" height="38"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="BLG-Td-uet"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T9q-Q6-Swf">
<rect key="frame" x="15" y="43" width="305" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="x5z-3a-vP3"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p4S-yy-Epi">
<rect key="frame" x="0.0" y="0.0" width="269" height="43"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<constraints>
<constraint firstItem="T9q-Q6-Swf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="1uI-ZO-R75"/>
<constraint firstAttribute="bottom" secondItem="T9q-Q6-Swf" secondAttribute="bottom" id="972-1k-ZJN"/>
<constraint firstItem="T4a-gd-2AQ" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="A4I-RW-oJp"/>
<constraint firstAttribute="bottom" secondItem="0g9-tQ-8oz" secondAttribute="bottom" constant="3" id="AEJ-AH-I1a"/>
<constraint firstItem="p4S-yy-Epi" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="FOM-MG-ls5"/>
<constraint firstAttribute="bottom" secondItem="T4a-gd-2AQ" secondAttribute="bottom" id="Jtq-QI-ihE"/>
<constraint firstItem="0g9-tQ-8oz" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="3" id="OPx-ut-GnL"/>
<constraint firstAttribute="trailing" secondItem="T9q-Q6-Swf" secondAttribute="trailing" id="PES-ot-UVv"/>
<constraint firstItem="0g9-tQ-8oz" firstAttribute="leading" secondItem="p4S-yy-Epi" secondAttribute="trailing" id="Qjq-zi-lSw"/>
<constraint firstAttribute="trailing" secondItem="T4a-gd-2AQ" secondAttribute="trailing" id="dKy-hX-nfS"/>
<constraint firstAttribute="bottom" secondItem="p4S-yy-Epi" secondAttribute="bottom" constant="1" id="gGQ-en-nOs"/>
<constraint firstItem="p4S-yy-Epi" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="hWY-Wy-Ix9"/>
<constraint firstItem="T4a-gd-2AQ" firstAttribute="leading" secondItem="0g9-tQ-8oz" secondAttribute="trailing" id="paO-59-uAc"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="bg_view" destination="p4S-yy-Epi" id="I0W-k2-nJM"/>
<outlet property="select_btn" destination="5vc-KW-aaq" id="c1Y-07-gIM"/>
</connections>
<point key="canvasLocation" x="142" y="71"/>
</tableViewCell>
</objects>
<resources>
<image name="daixuan" width="19" height="19"/>
<image name="yuxuan" width="19" height="19"/>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
...@@ -101,9 +101,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -101,9 +101,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
self.tableV?.mj_header?.endRefreshing() self.tableV?.mj_header?.endRefreshing()
self.page = 2 self.page = 2
self.tableV.performBatchUpdates({ self.tableV.performBatchUpdates({
UIView.animate(views: self.tableV!.visibleCells, UIView.animate(views: self.tableV!.visibleCells,animations: self.animations, completion: {
animations: self.animations, completion: {
}) })
}, completion: nil) }, completion: nil)
if dataM.data?.count == 0 { if dataM.data?.count == 0 {
...@@ -113,16 +111,11 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -113,16 +111,11 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
} }
}) { (error) in }) { (error) in
self.tableV?.mj_header?.endRefreshing() self.tableV?.mj_header?.endRefreshing()
} }
} }
//MARK:--加载更多数据 //MARK:--加载更多数据
@objc func loadMoreData(){ @objc func loadMoreData(){
print("加载更多数据") print("加载更多数据")
var dic = ["user_token":UserToken as Any,"keyword":keyword,"page":page,"order_status":orderStatus,"pay_status":payStatus,"order_source":orderSource,"shipping_status":shippingStatus,"start_time":startTime,"end_time":endTime] var dic = ["user_token":UserToken as Any,"keyword":keyword,"page":page,"order_status":orderStatus,"pay_status":payStatus,"order_source":orderSource,"shipping_status":shippingStatus,"start_time":startTime,"end_time":endTime]
if endTime == 0 { if endTime == 0 {
dic.removeValue(forKey: "end_time") dic.removeValue(forKey: "end_time")
...@@ -139,10 +132,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -139,10 +132,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
self.tableV.reloadData() self.tableV.reloadData()
self.tableV?.mj_footer?.endRefreshing() self.tableV?.mj_footer?.endRefreshing()
} }
}) { (error) in }) { (error) in
self.tableV?.mj_footer?.endRefreshing() self.tableV?.mj_footer?.endRefreshing()
} }
} }
...@@ -176,10 +167,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -176,10 +167,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
footerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadMoreData)) footerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadMoreData))
self.tableV!.mj_footer = footerMJ self.tableV!.mj_footer = footerMJ
self.tableV?.mj_header?.beginRefreshing() self.tableV?.mj_header?.beginRefreshing()
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return dataArr.count return dataArr.count
} }
...@@ -187,7 +176,6 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -187,7 +176,6 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
let cell = tableView.dequeueReusableCell(withIdentifier: "CGDListCell") as! CGDListCell let cell = tableView.dequeueReusableCell(withIdentifier: "CGDListCell") as! CGDListCell
let rowModel = self.dataArr[indexPath.row] let rowModel = self.dataArr[indexPath.row]
cell.orderNumerLbl.text = rowModel.order_sn! cell.orderNumerLbl.text = rowModel.order_sn!
if rowModel.order_status != nil && rowModel.order_status_d != nil && rowModel.goods_before_pay != nil { if rowModel.order_status != nil && rowModel.order_status_d != nil && rowModel.goods_before_pay != nil {
......
...@@ -12,6 +12,10 @@ protocol OrderDViewControllerDelegate { ...@@ -12,6 +12,10 @@ protocol OrderDViewControllerDelegate {
func refishingOrderDchange() func refishingOrderDchange()
} }
class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate,UpBillDataTableViewCellDelegate, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate { class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate,UpBillDataTableViewCellDelegate, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate {
func DaiKeXiaDanGouWuCell_select_pi_ci(cell: DaiKeXiaDanGouWuCell) {
print("选择批次")
}
var sufficient_code = -1 var sufficient_code = -1
var is_pay_own = 0 var is_pay_own = 0
var order_type:Int? { var order_type:Int? {
......
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