Commit 2e7f7c5b authored by lujunye's avatar lujunye

入库

parent 89cd6f09
......@@ -292,6 +292,8 @@
E0F1BE4924692379003015B2 /* ItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE4724692379003015B2 /* ItemCell.xib */; };
E0F3C2CB24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */; };
E0F3C2CC24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */; };
E0F8E91B248737F100817A08 /* NewOnlyRKCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */; };
E0F8E91C248737F100817A08 /* NewOnlyRKCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F8E91A248737F100817A08 /* NewOnlyRKCell.xib */; };
E0F97B022451228A001BD600 /* GLAlertSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F97B012451228A001BD600 /* GLAlertSelectView.swift */; };
E0F97B0424512299001BD600 /* GLAlertSelectView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F97B0324512299001BD600 /* GLAlertSelectView.xib */; };
E0F97B082451620B001BD600 /* ProductDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F97B062451620B001BD600 /* ProductDetailViewController.swift */; };
......@@ -806,6 +808,8 @@
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>"; };
E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XinZengAndBianJiKeHuViewController.xib; 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>"; };
E0F97B012451228A001BD600 /* GLAlertSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GLAlertSelectView.swift; sourceTree = "<group>"; };
E0F97B0324512299001BD600 /* GLAlertSelectView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GLAlertSelectView.xib; sourceTree = "<group>"; };
E0F97B062451620B001BD600 /* ProductDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailViewController.swift; sourceTree = "<group>"; };
......@@ -1331,6 +1335,8 @@
children = (
E030DF39248651A5002764D3 /* NewRKVc.swift */,
E030DF3A248651A5002764D3 /* NewRKVc.xib */,
E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */,
E0F8E91A248737F100817A08 /* NewOnlyRKCell.xib */,
);
path = "1.1入库&出库";
sourceTree = "<group>";
......@@ -2601,6 +2607,7 @@
F9023F6E2449A9B100DD5A63 /* TitleAndTFCell.xib in Resources */,
F94A315424626D7800FEC38E /* WorkCViewController.xib in Resources */,
E042F7392452766100CDFA12 /* AdressSelectCell.xib in Resources */,
E0F8E91C248737F100817A08 /* NewOnlyRKCell.xib in Resources */,
E013D7892484B1B90092DE46 /* CRKXiangQVC.xib in Resources */,
E0A409C92464010D00CFF109 /* FirstCell.xib in Resources */,
E00E48C32457C0D600F16545 /* XuanZeShangPinViewController.xib in Resources */,
......@@ -2830,6 +2837,7 @@
E09B03C32445BD9500211A51 /* NavViewController.swift in Sources */,
E06524F124580AAC00CA22E2 /* RuKuJiaGeCell.swift in Sources */,
E042F7382452766100CDFA12 /* AdressSelectCell.swift in Sources */,
E0F8E91B248737F100817A08 /* NewOnlyRKCell.swift in Sources */,
F956D5A6246A2D9C003FF510 /* LMNoteViewController.m in Sources */,
E0CC848B24824291009B1FE9 /* CRKListVC.swift in Sources */,
E03549AD24582828008BD021 /* KeHuGuanLiCell.swift in Sources */,
......
//
// NewOnlyRKCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/3.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol NewOnlyRKCellDelegate {
func NewOnlyRKCellDateTypeSelect(sender:Int,cell:NewOnlyRKCell)//选择时间类型
func NewOnlyRKCellDateSelect(cell:NewOnlyRKCell)//选择日期
func NewOnlyRKCellAddRepord(cell:NewOnlyRKCell)//添加检测报告
func NewOnlyRKCellDel(cell:NewOnlyRKCell)//删除
func NewOnlyRKCellTFinput(text:String,inputType:Int,cell:NewOnlyRKCell)
}
class NewOnlyRKCell: UITableViewCell,UITextFieldDelegate {
var delegate:NewOnlyRKCellDelegate?
@IBOutlet weak var rightBtn: UIButton!
@IBOutlet weak var leftBtn: UIButton!
@IBOutlet weak var nameLbl: UILabel!
@IBOutlet weak var detailLbl: UILabel!
@IBOutlet weak var bzqTf: UITextField!
@IBOutlet weak var totalPriceTf: UITextField!
@IBOutlet weak var rkCountTf: UITextField!
@IBOutlet weak var rkPriceTf: UITextField!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
leftBtn.isSelected = true
leftBtn.backgroundColor = UIColor(named: "蓝色字体颜色")
// Initialization code
bzqTf.delegate = self
bzqTf.tag = 100
totalPriceTf.delegate = self
bzqTf.tag = 101
rkCountTf.delegate = self
bzqTf.tag = 102
rkPriceTf.delegate = self
bzqTf.tag = 103
setYuanJiao2(sender: leftBtn)
setYuanJiao(sender: rightBtn)
}
func textFieldDidEndEditing(_ textField: UITextField) {
if isPurnNumber(str: textField.text!) {
delegate?.NewOnlyRKCellTFinput(text: textField.text!, inputType: textField.tag, cell: self)
}else{
HUD.flash(.label("请输入正确的数字"), delay: 1.2)
textField.text = ""
}
}
func setYuanJiao2(sender:UIView){
let maskPath = UIBezierPath(roundedRect: sender.bounds,
byRoundingCorners:[.bottomLeft, .topLeft], cornerRadii:CGSize(width:2, height:2))
let masklayer = CAShapeLayer()
masklayer.frame = sender.bounds
masklayer.path = maskPath.cgPath
sender.layer.mask = masklayer
}
func setYuanJiao(sender:UIView){
let maskPath = UIBezierPath(roundedRect: sender.bounds,
byRoundingCorners:[.bottomRight, .topRight], cornerRadii:CGSize(width:2, height:2))
let masklayer = CAShapeLayer()
masklayer.frame = sender.bounds
masklayer.path = maskPath.cgPath
sender.layer.mask = masklayer
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
@IBAction func dateTypeSelect(_
sender: UIButton) {
if sender.tag == 0{//月
leftBtn.isSelected = false
rightBtn.isSelected = true
leftBtn.backgroundColor = UIColor(named: "app底色")
rightBtn.backgroundColor = UIColor(named: "蓝色字体颜色")
}else{//天
leftBtn.isSelected = true
rightBtn.isSelected = false
leftBtn.backgroundColor = UIColor(named: "蓝色字体颜色")
rightBtn.backgroundColor = UIColor(named: "app底色")
}
delegate?.NewOnlyRKCellDateTypeSelect(sender: sender.tag, cell: self)
}
@IBAction func selectDate(_ sender: UIButton) {
delegate?.NewOnlyRKCellDateSelect(cell: self)
}
@IBAction func addAction(_ sender: UIButton) {
delegate?.NewOnlyRKCellAddRepord(cell: self)
}
@IBAction func delAction(_ sender: UIButton) {
delegate?.NewOnlyRKCellDel(cell: self)
}
}
<?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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="NewOnlyRKCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="370"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="370"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JdU-F8-6ck">
<rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="niY-CK-UCv"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cxO-LI-2Sg">
<rect key="frame" x="319" y="1" width="56" height="56"/>
<constraints>
<constraint firstAttribute="height" constant="56" id="GSA-96-y5P"/>
<constraint firstAttribute="width" constant="56" id="waI-wp-EYb"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="移除">
<color key="titleColor" name="#F57575"/>
</state>
<connections>
<action selector="delAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="U4g-Gk-yT1"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="标题" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="chy-ny-kVr">
<rect key="frame" x="15" y="16" width="294" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="BI9-cg-oZB"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" 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="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fr1-SS-krs">
<rect key="frame" x="15" y="63" width="345" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="uas-Wa-v82"/>
</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="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PST-FC-fG9">
<rect key="frame" x="15" y="100" width="67" height="16"/>
<fontDescription key="fontDescription" type="system" 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="7fF-Od-2O3">
<rect key="frame" x="346.5" y="100" width="13.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="kGM-d5-IE6">
<rect key="frame" x="276.5" y="92" width="65" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="EoK-7u-slA"/>
<constraint firstAttribute="width" constant="65" id="baW-j7-X0z"/>
</constraints>
<color key="textColor" name="蓝色字体颜色"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<textInputTraits key="textInputTraits" keyboardType="decimalPad"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" name="灰色字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Gda-ra-tfi">
<rect key="frame" x="15" y="132" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="11O-28-PNy"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="入库数量:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dXp-Fv-ghH">
<rect key="frame" x="15" y="148.5" width="67" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="s2D-dg-gBi">
<rect key="frame" x="277" y="140.5" width="83" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="Bwg-y9-nd6"/>
<constraint firstAttribute="width" constant="83" id="lTi-jd-pXF"/>
</constraints>
<color key="textColor" name="蓝色字体颜色"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" name="灰色字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eh6-mf-agL">
<rect key="frame" x="15" y="181" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="DSR-1b-lOx"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="入库总价:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D4z-vi-ogp">
<rect key="frame" x="15" y="197" width="67" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入入库总价" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DNW-1v-r8x">
<rect key="frame" x="97" y="189" width="263" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="xhx-Wp-Bnu"/>
</constraints>
<color key="textColor" name="蓝色字体颜色"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<textInputTraits key="textInputTraits" keyboardType="decimalPad"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GM4-XT-zet">
<rect key="frame" x="15" y="228.5" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="sv0-Vq-2JA"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="生产日期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tfu-6M-ZkV">
<rect key="frame" x="15" y="244.5" width="67" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jinruDetail" translatesAutoresizingMaskIntoConstraints="NO" id="4j6-NB-EJe">
<rect key="frame" x="353" y="249" width="7" height="7"/>
<constraints>
<constraint firstAttribute="height" constant="7" id="arg-rE-5Ph"/>
<constraint firstAttribute="width" constant="7" id="wwL-Eu-ppt"/>
</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="yHy-KY-Uxt">
<rect key="frame" x="250" y="244.5" width="93" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="多选按钮字体颜色"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="u0a-wt-8oE">
<rect key="frame" x="97" y="237.5" width="278" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="IyB-by-Zv6"/>
</constraints>
<connections>
<action selector="selectDate:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="za0-Am-J6X"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fwd-sD-T0h">
<rect key="frame" x="15" y="275.5" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="hIf-f1-pJO"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="保质期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fAB-2b-X7A">
<rect key="frame" x="15" y="291.5" width="54" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tZB-Uo-CY9">
<rect key="frame" x="328" y="284.5" width="32" height="32"/>
<color key="backgroundColor" name="app底色"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="W2B-oA-DNZ"/>
<constraint firstAttribute="width" constant="32" id="hk9-LQ-Yd5"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="月">
<color key="titleColor" name="#999999"/>
</state>
<state key="selected" title="月">
<color key="titleColor" name="白色背景色"/>
</state>
<connections>
<action selector="dateTypeSelect:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="fqJ-kq-6Zj"/>
</connections>
</button>
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6MO-V8-sMn">
<rect key="frame" x="296" y="284.5" width="32" height="32"/>
<color key="backgroundColor" name="app底色"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="Rhx-1I-j8d"/>
<constraint firstAttribute="height" constant="32" id="dDv-F8-Z1w"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="天">
<color key="titleColor" name="#999999"/>
</state>
<state key="selected" title="天">
<color key="titleColor" name="白色背景色"/>
</state>
<connections>
<action selector="dateTypeSelect:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="XmY-3S-VPA"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="fLT-jy-0yj">
<rect key="frame" x="213" y="284.5" width="83" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="83" id="Dnk-eA-tTw"/>
<constraint firstAttribute="height" constant="32" id="zZC-ZH-Pwa"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" name="个人中心灰色字体"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="n8K-YE-Cbm">
<rect key="frame" x="15" y="322.5" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="u0m-oK-dhI"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="检测报告:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vDi-yx-ULN">
<rect key="frame" x="15" y="338.5" width="66.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tcI-Te-Foi">
<rect key="frame" x="319" y="323.5" width="56" height="46.5"/>
<constraints>
<constraint firstAttribute="width" constant="56" id="fnT-cU-Mhd"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="添加">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
<connections>
<action selector="addAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="pDb-xc-dXM"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="82n-oH-pbs">
<rect key="frame" x="0.0" y="369" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Zg1-gz-BTV"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="Fr1-SS-krs" firstAttribute="top" secondItem="chy-ny-kVr" secondAttribute="bottom" constant="10" id="1nB-uL-p9g"/>
<constraint firstItem="PST-FC-fG9" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="40B-pG-Ugc"/>
<constraint firstItem="Fwd-sD-T0h" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="4fJ-gn-XwQ"/>
<constraint firstAttribute="trailing" secondItem="Fwd-sD-T0h" secondAttribute="trailing" id="6zh-CT-b61"/>
<constraint firstAttribute="trailing" secondItem="u0a-wt-8oE" secondAttribute="trailing" id="8AL-A4-sOy"/>
<constraint firstItem="JdU-F8-6ck" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="9Jn-No-uaz"/>
<constraint firstItem="dXp-Fv-ghH" firstAttribute="top" secondItem="Gda-ra-tfi" secondAttribute="bottom" constant="15.5" id="9kf-r9-JOP"/>
<constraint firstAttribute="trailing" secondItem="JdU-F8-6ck" secondAttribute="trailing" id="Bjz-sR-F63"/>
<constraint firstAttribute="trailing" secondItem="n8K-YE-Cbm" secondAttribute="trailing" id="Bzj-5J-iQl"/>
<constraint firstItem="7fF-Od-2O3" firstAttribute="leading" secondItem="kGM-d5-IE6" secondAttribute="trailing" constant="5" id="CX9-ha-WqY"/>
<constraint firstAttribute="trailing" secondItem="GM4-XT-zet" secondAttribute="trailing" id="DEd-LU-jVk"/>
<constraint firstItem="GM4-XT-zet" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="DYc-SN-9O2"/>
<constraint firstItem="Gda-ra-tfi" firstAttribute="top" secondItem="kGM-d5-IE6" secondAttribute="bottom" constant="8" id="Evq-Lx-JSj"/>
<constraint firstItem="n8K-YE-Cbm" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Eya-vh-Fta"/>
<constraint firstItem="JdU-F8-6ck" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="FJj-Gf-AnD"/>
<constraint firstItem="eh6-mf-agL" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="G0G-wn-HSD"/>
<constraint firstItem="yHy-KY-Uxt" firstAttribute="centerY" secondItem="tfu-6M-ZkV" secondAttribute="centerY" id="I0s-zF-fej"/>
<constraint firstItem="chy-ny-kVr" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="I2L-HW-UOe"/>
<constraint firstItem="Fr1-SS-krs" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Ixt-AE-ntn"/>
<constraint firstItem="tfu-6M-ZkV" firstAttribute="top" secondItem="GM4-XT-zet" secondAttribute="bottom" constant="15" id="JZ2-S6-mTB"/>
<constraint firstItem="6MO-V8-sMn" firstAttribute="centerY" secondItem="tZB-Uo-CY9" secondAttribute="centerY" id="Lm1-T9-kbq"/>
<constraint firstItem="eh6-mf-agL" firstAttribute="top" secondItem="s2D-dg-gBi" secondAttribute="bottom" constant="8.5" id="MZs-lR-nNo"/>
<constraint firstItem="cxO-LI-2Sg" firstAttribute="leading" secondItem="chy-ny-kVr" secondAttribute="trailing" constant="10" id="MdC-oG-xD6"/>
<constraint firstAttribute="trailing" secondItem="DNW-1v-r8x" secondAttribute="trailing" constant="15" id="OHO-cw-1Ti"/>
<constraint firstAttribute="trailing" secondItem="tZB-Uo-CY9" secondAttribute="trailing" constant="15" id="P7F-oi-qh9"/>
<constraint firstAttribute="trailing" secondItem="82n-oH-pbs" secondAttribute="trailing" id="PKk-AU-ljC"/>
<constraint firstItem="D4z-vi-ogp" firstAttribute="top" secondItem="eh6-mf-agL" secondAttribute="bottom" constant="15" id="Q1Z-wo-KKO"/>
<constraint firstItem="u0a-wt-8oE" firstAttribute="centerY" secondItem="tfu-6M-ZkV" secondAttribute="centerY" id="S40-AN-xTC"/>
<constraint firstItem="fAB-2b-X7A" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="UC9-sJ-tAJ"/>
<constraint firstAttribute="bottom" secondItem="tcI-Te-Foi" secondAttribute="bottom" id="UQC-2X-jit"/>
<constraint firstItem="tZB-Uo-CY9" firstAttribute="top" secondItem="Fwd-sD-T0h" secondAttribute="bottom" constant="8" id="Vev-jI-uXS"/>
<constraint firstItem="82n-oH-pbs" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Vji-Il-sx3"/>
<constraint firstAttribute="trailing" secondItem="cxO-LI-2Sg" secondAttribute="trailing" id="W5f-gk-ahc"/>
<constraint firstItem="u0a-wt-8oE" firstAttribute="leading" secondItem="tfu-6M-ZkV" secondAttribute="trailing" constant="15" id="YQu-4o-wjS"/>
<constraint firstItem="4j6-NB-EJe" firstAttribute="centerY" secondItem="tfu-6M-ZkV" secondAttribute="centerY" id="Ya2-QV-OuS"/>
<constraint firstItem="n8K-YE-Cbm" firstAttribute="top" secondItem="fAB-2b-X7A" secondAttribute="bottom" constant="15" id="aBW-B6-R4D"/>
<constraint firstItem="fAB-2b-X7A" firstAttribute="top" secondItem="Fwd-sD-T0h" secondAttribute="bottom" constant="15" id="aFe-Ap-EVA"/>
<constraint firstItem="fLT-jy-0yj" firstAttribute="centerY" secondItem="fAB-2b-X7A" secondAttribute="centerY" constant="1" id="aKi-v1-0Zc"/>
<constraint firstAttribute="trailing" secondItem="Gda-ra-tfi" secondAttribute="trailing" id="aQG-QL-rd5"/>
<constraint firstItem="DNW-1v-r8x" firstAttribute="centerY" secondItem="D4z-vi-ogp" secondAttribute="centerY" id="arJ-Ni-Rtj"/>
<constraint firstItem="s2D-dg-gBi" firstAttribute="centerY" secondItem="dXp-Fv-ghH" secondAttribute="centerY" id="axS-I9-xLN"/>
<constraint firstItem="Gda-ra-tfi" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="bHO-9G-Jhw"/>
<constraint firstItem="tcI-Te-Foi" firstAttribute="top" secondItem="n8K-YE-Cbm" secondAttribute="bottom" id="bKC-OP-2Kt"/>
<constraint firstItem="Fwd-sD-T0h" firstAttribute="top" secondItem="tfu-6M-ZkV" secondAttribute="bottom" constant="15" id="bsU-gu-YLU"/>
<constraint firstItem="tfu-6M-ZkV" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="dgK-r0-YUm"/>
<constraint firstItem="tZB-Uo-CY9" firstAttribute="leading" secondItem="6MO-V8-sMn" secondAttribute="trailing" id="dgw-bv-QfM"/>
<constraint firstAttribute="trailing" secondItem="7fF-Od-2O3" secondAttribute="trailing" constant="15" id="eRm-W7-r3f"/>
<constraint firstAttribute="trailing" secondItem="s2D-dg-gBi" secondAttribute="trailing" constant="15" id="eWH-sR-ZVd"/>
<constraint firstItem="chy-ny-kVr" firstAttribute="top" secondItem="JdU-F8-6ck" secondAttribute="bottom" constant="15" id="ezY-Db-N2T"/>
<constraint firstItem="cxO-LI-2Sg" firstAttribute="top" secondItem="JdU-F8-6ck" secondAttribute="bottom" id="fOn-pK-ouG"/>
<constraint firstAttribute="trailing" secondItem="eh6-mf-agL" secondAttribute="trailing" id="fsj-lq-pzi"/>
<constraint firstItem="vDi-yx-ULN" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="i6a-z0-kqm"/>
<constraint firstItem="D4z-vi-ogp" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="koc-uk-Wmg"/>
<constraint firstItem="6MO-V8-sMn" firstAttribute="leading" secondItem="fLT-jy-0yj" secondAttribute="trailing" id="l3w-Wi-Wv9"/>
<constraint firstItem="DNW-1v-r8x" firstAttribute="leading" secondItem="D4z-vi-ogp" secondAttribute="trailing" constant="15" id="nsc-Yp-dmq"/>
<constraint firstItem="PST-FC-fG9" firstAttribute="top" secondItem="Fr1-SS-krs" secondAttribute="bottom" constant="22" id="qVK-iA-Oem"/>
<constraint firstAttribute="trailing" secondItem="tcI-Te-Foi" secondAttribute="trailing" id="sLq-DB-Dya"/>
<constraint firstAttribute="trailing" secondItem="Fr1-SS-krs" secondAttribute="trailing" constant="15" id="sbK-G2-P0h"/>
<constraint firstItem="kGM-d5-IE6" firstAttribute="centerY" secondItem="PST-FC-fG9" secondAttribute="centerY" id="t0z-cG-nJ3"/>
<constraint firstItem="dXp-Fv-ghH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="uRV-sZ-67i"/>
<constraint firstItem="vDi-yx-ULN" firstAttribute="top" secondItem="n8K-YE-Cbm" secondAttribute="bottom" constant="15" id="wC9-61-YmI"/>
<constraint firstAttribute="trailing" secondItem="4j6-NB-EJe" secondAttribute="trailing" constant="15" id="wCj-Sr-ffc"/>
<constraint firstItem="4j6-NB-EJe" firstAttribute="leading" secondItem="yHy-KY-Uxt" secondAttribute="trailing" constant="10" id="wja-2I-IyW"/>
<constraint firstItem="GM4-XT-zet" firstAttribute="top" secondItem="D4z-vi-ogp" secondAttribute="bottom" constant="15.5" id="xee-zN-VOT"/>
<constraint firstItem="7fF-Od-2O3" firstAttribute="centerY" secondItem="PST-FC-fG9" secondAttribute="centerY" id="yyZ-7a-pit"/>
<constraint firstAttribute="bottom" secondItem="82n-oH-pbs" secondAttribute="bottom" id="zlz-v0-agc"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="bzqTf" destination="fLT-jy-0yj" id="gg1-pH-dPz"/>
<outlet property="detailLbl" destination="Fr1-SS-krs" id="sBl-qJ-DRF"/>
<outlet property="leftBtn" destination="6MO-V8-sMn" id="nSx-Sf-HFW"/>
<outlet property="nameLbl" destination="chy-ny-kVr" id="nGD-0R-eZB"/>
<outlet property="rightBtn" destination="tZB-Uo-CY9" id="a9w-hG-3da"/>
<outlet property="rkCountTf" destination="s2D-dg-gBi" id="HFy-WE-TYS"/>
<outlet property="rkPriceTf" destination="kGM-d5-IE6" id="azO-uu-LsV"/>
<outlet property="totalPriceTf" destination="DNW-1v-r8x" id="emO-uV-Hk1"/>
</connections>
<point key="canvasLocation" x="131.15942028985509" y="132.58928571428572"/>
</tableViewCell>
</objects>
<resources>
<image name="jinruDetail" width="4.5" height="9"/>
<namedColor name="#999999">
<color red="0.60000002384185791" green="0.60000002384185791" blue="0.60000002384185791" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="#F57575">
<color red="0.96100002527236938" green="0.45899999141693115" blue="0.45899999141693115" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="个人中心灰色字体">
<color red="0.3919999897480011" green="0.3919999897480011" blue="0.3919999897480011" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="多选按钮字体颜色">
<color red="0.41200000047683716" green="0.41200000047683716" blue="0.41200000047683716" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -8,24 +8,165 @@
import UIKit
class NewRKVc: BaseViewController {
class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, NewOnlyRKCellDelegate{
let titleArr = ["仓库:","库位:","入库类型:","入库时间:"]
var holderArr = ["默认仓库","默认库位","请选择入库类型","时间"]
var dataArr:Array<Any>? = []
@IBOutlet weak var btmView: UIView!
@IBOutlet weak var listView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "入库"
self.view.addSubview(navbar)
SetTopFrameView(view: listView, btmView: btmView)
listView.separatorStyle = .none
listView.register(UINib(nibName: "AddImgCell", bundle: nil), forCellReuseIdentifier: "AddImgCell")
listView.register(UINib(nibName: "CRKBtnCell", bundle: nil), forCellReuseIdentifier: "CRKBtnCell")
listView.register(UINib(nibName: "NewOnlyRKCell", bundle: nil), forCellReuseIdentifier: "NewOnlyRKCell")
// Do any additional setup after loading the view.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
//MARK: - 提交任务方法
@IBAction func actionClick(_ sender: UIButton) {
if sender.tag == 0 {//提交并新增
}else{//提交
}
}
//MARK: - cellForRow
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 1{
let cell = tableView.dequeueReusableCell(withIdentifier: "NewOnlyRKCell") as! NewOnlyRKCell
cell.delegate = self
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKBtnCell") as! CRKBtnCell
cell.tag = indexPath.row
cell.nameLbl.text = titleArr[indexPath.row]
cell.contentLbl.text = holderArr[indexPath.row]
cell.mustLbl.isHidden = true
cell.mustWidth.constant = 0
if indexPath.row == 3 {
setCellUI(cell: cell)
}
return cell
}
//MARK: - 入库商品delegate
func NewOnlyRKCellDateTypeSelect(sender: Int, cell: NewOnlyRKCell) {
// 0:月, 1:天
}
func NewOnlyRKCellDateSelect(cell: NewOnlyRKCell) {
//跳转日期选择
}
func NewOnlyRKCellAddRepord(cell: NewOnlyRKCell) {
//添加检测报告
}
func NewOnlyRKCellDel(cell: NewOnlyRKCell) {
//删除
}
func NewOnlyRKCellTFinput(text: String, inputType: Int, cell: NewOnlyRKCell) {
//text:数据 inputType: 100-保质期 101-总价 102-入库数量 103-入库价格
}
//添加商品
@objc func addProduct(){
dataArr?.append("1")
listView.reloadData()
}
//MARK: - cell delegate
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
return 49
}
return 370
}
func setCellUI(cell:CRKBtnCell){
cell.contentLbl.textColor = UIColor(named: "标题字颜色")
cell.arrowImg.isHidden = true
cell.contentRight.constant = -7
cell.nameLeft.constant = 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
if section == 0 {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 10))
view.backgroundColor = UIColor(named: "app底色")
return view
}
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 147.5))
let img = UIImageView()
view.addSubview(img)
img.image = UIImage(named: "tianjiashangpin")
img.snp.makeConstraints { (make) in
make.top.equalTo(30)
make.width.height.equalTo(52)
make.centerX.equalTo(view.snp_centerX)
}
let btn = UIButton()
view.addSubview(btn)
btn.snp.makeConstraints { (make) in
make.top.left.right.bottom.equalTo(0)
}
btn.addTarget(self, action: #selector(addProduct), for: .touchUpInside)
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
if section == 0 {
return 10
}
return 147.5
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 1 {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 39))
let lbl = UILabel(frame: CGRect(x: 15, y: 15, width: fullScreenWidth, height: 21))
lbl.text = "选择商品"
lbl.textColor = UIColor(named: "标题字颜色")
lbl.font = UIFont.boldSystemFont(ofSize: 15)
lbl.sizeToFit()
view.addSubview(lbl)
if dataArr!.count > 0 {
let lbl2 = UILabel(frame: CGRect(x: lbl.frame.maxX + 5, y: 16, width: fullScreenWidth, height: 18.5))
lbl2.text = "(共\(dataArr!.count)件)"
lbl2.textColor = UIColor(named: "标题字颜色")
lbl2.font = UIFont.boldSystemFont(ofSize: 13)
view.addSubview(lbl2)
}
return view
}
return UIView()
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if section == 1 {
if dataArr!.count > 0 {
return 49
}
return 39
}
return 0.001
}
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 4
}
return dataArr!.count
}
*/
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<?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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NewRKVc" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NewRKVc" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="btmView" destination="Y16-6N-pRK" id="Fya-Fg-X5A"/>
<outlet property="listView" destination="XJ1-MD-tGD" id="482-x4-9hR"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="laH-6h-Yuu">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Y16-6N-pRK">
<rect key="frame" x="0.0" y="813" width="414" height="49"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DkD-m0-Phd">
<rect key="frame" x="0.0" y="0.0" width="414" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="pRO-oN-e8Y"/>
</constraints>
</view>
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oHy-P4-Poe">
<rect key="frame" x="0.0" y="1" width="207" height="48"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
<state key="normal" title="提交申请">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
<connections>
<action selector="actionClick:" destination="-1" eventType="touchUpInside" id="VCY-4t-Xz2"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qYI-4J-K6X">
<rect key="frame" x="207" y="1" width="207" height="48"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
<state key="normal" title="提交并新增">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
<connections>
<action selector="actionClick:" destination="-1" eventType="touchUpInside" id="WTX-Mi-bUB"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="qYI-4J-K6X" secondAttribute="trailing" id="13h-lO-ll4"/>
<constraint firstAttribute="trailing" secondItem="DkD-m0-Phd" secondAttribute="trailing" id="1tG-DS-xoV"/>
<constraint firstAttribute="height" constant="49" id="7Lt-cf-RU3"/>
<constraint firstItem="oHy-P4-Poe" firstAttribute="leading" secondItem="Y16-6N-pRK" secondAttribute="leading" id="Hyr-ao-doU"/>
<constraint firstAttribute="bottom" secondItem="oHy-P4-Poe" secondAttribute="bottom" id="XnL-AE-bSZ"/>
<constraint firstItem="qYI-4J-K6X" firstAttribute="leading" secondItem="oHy-P4-Poe" secondAttribute="trailing" id="Zva-cB-LOU"/>
<constraint firstItem="qYI-4J-K6X" firstAttribute="width" secondItem="oHy-P4-Poe" secondAttribute="width" id="hpH-t2-Qkh"/>
<constraint firstItem="DkD-m0-Phd" firstAttribute="leading" secondItem="Y16-6N-pRK" secondAttribute="leading" id="m8Z-Eo-I2M"/>
<constraint firstItem="DkD-m0-Phd" firstAttribute="top" secondItem="Y16-6N-pRK" secondAttribute="top" id="mvo-jY-7Rk"/>
<constraint firstItem="qYI-4J-K6X" firstAttribute="top" secondItem="DkD-m0-Phd" secondAttribute="bottom" id="qnJ-xi-iDA"/>
<constraint firstAttribute="bottom" secondItem="qYI-4J-K6X" secondAttribute="bottom" id="wWf-v2-0Jf"/>
<constraint firstItem="oHy-P4-Poe" firstAttribute="top" secondItem="DkD-m0-Phd" secondAttribute="bottom" id="z06-Y0-qev"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="XJ1-MD-tGD">
<rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<connections>
<outlet property="dataSource" destination="-1" id="vbZ-uv-141"/>
<outlet property="delegate" destination="-1" id="qQp-u4-XGg"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="laH-6h-Yuu" firstAttribute="top" secondItem="XJ1-MD-tGD" secondAttribute="bottom" id="1UQ-Cc-vub"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="XJ1-MD-tGD" secondAttribute="trailing" id="8Of-tj-5UJ"/>
<constraint firstAttribute="bottom" secondItem="laH-6h-Yuu" secondAttribute="bottom" id="Fh9-z8-x5Z"/>
<constraint firstItem="XJ1-MD-tGD" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="HSx-yh-syw"/>
<constraint firstItem="XJ1-MD-tGD" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="W1K-t6-EvY"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="Y16-6N-pRK" secondAttribute="bottom" id="eTV-0U-0BC"/>
<constraint firstItem="Y16-6N-pRK" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="efm-Dg-1AO"/>
<constraint firstItem="Y16-6N-pRK" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="ezs-hj-Cvt"/>
<constraint firstAttribute="trailing" secondItem="laH-6h-Yuu" secondAttribute="trailing" id="me2-3U-Qfy"/>
<constraint firstItem="laH-6h-Yuu" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="rfR-K6-okN"/>
<constraint firstItem="laH-6h-Yuu" firstAttribute="top" secondItem="Y16-6N-pRK" secondAttribute="top" id="u2F-5H-8I2"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="131.8840579710145" y="132.58928571428572"/>
</view>
</objects>
<resources>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment