Commit 0d926d74 authored by lujunye's avatar lujunye

添加检测报告

parent 81fde3f4
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
E00E48C32457C0D600F16545 /* XuanZeShangPinViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */; }; E00E48C32457C0D600F16545 /* XuanZeShangPinViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */; };
E00E48C62457C99900F16545 /* KuCunShangPinXQViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00E48C42457C99900F16545 /* KuCunShangPinXQViewController.swift */; }; E00E48C62457C99900F16545 /* KuCunShangPinXQViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00E48C42457C99900F16545 /* KuCunShangPinXQViewController.swift */; };
E00E48C72457C99900F16545 /* KuCunShangPinXQViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48C52457C99900F16545 /* KuCunShangPinXQViewController.xib */; }; E00E48C72457C99900F16545 /* KuCunShangPinXQViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48C52457C99900F16545 /* KuCunShangPinXQViewController.xib */; };
E01313DB25C0048C006CFA5D /* Add_Report_View.swift in Sources */ = {isa = PBXBuildFile; fileRef = E01313DA25C0048C006CFA5D /* Add_Report_View.swift */; };
E01313E025C00496006CFA5D /* Add_Report_View.xib in Resources */ = {isa = PBXBuildFile; fileRef = E01313DF25C00496006CFA5D /* Add_Report_View.xib */; };
E013D7882484B1B90092DE46 /* CRKXiangQVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E013D7862484B1B90092DE46 /* CRKXiangQVC.swift */; }; E013D7882484B1B90092DE46 /* CRKXiangQVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E013D7862484B1B90092DE46 /* CRKXiangQVC.swift */; };
E013D7892484B1B90092DE46 /* CRKXiangQVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E013D7872484B1B90092DE46 /* CRKXiangQVC.xib */; }; E013D7892484B1B90092DE46 /* CRKXiangQVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E013D7872484B1B90092DE46 /* CRKXiangQVC.xib */; };
E013D78C2484CAFC0092DE46 /* CRKBtnCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E013D78A2484CAFC0092DE46 /* CRKBtnCell.swift */; }; E013D78C2484CAFC0092DE46 /* CRKBtnCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E013D78A2484CAFC0092DE46 /* CRKBtnCell.swift */; };
...@@ -732,6 +734,8 @@ ...@@ -732,6 +734,8 @@
E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanZeShangPinViewController.xib; sourceTree = "<group>"; }; E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanZeShangPinViewController.xib; sourceTree = "<group>"; };
E00E48C42457C99900F16545 /* KuCunShangPinXQViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KuCunShangPinXQViewController.swift; sourceTree = "<group>"; }; E00E48C42457C99900F16545 /* KuCunShangPinXQViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KuCunShangPinXQViewController.swift; sourceTree = "<group>"; };
E00E48C52457C99900F16545 /* KuCunShangPinXQViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KuCunShangPinXQViewController.xib; sourceTree = "<group>"; }; E00E48C52457C99900F16545 /* KuCunShangPinXQViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KuCunShangPinXQViewController.xib; sourceTree = "<group>"; };
E01313DA25C0048C006CFA5D /* Add_Report_View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Add_Report_View.swift; sourceTree = "<group>"; };
E01313DF25C00496006CFA5D /* Add_Report_View.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Add_Report_View.xib; sourceTree = "<group>"; };
E013D7862484B1B90092DE46 /* CRKXiangQVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CRKXiangQVC.swift; sourceTree = "<group>"; }; E013D7862484B1B90092DE46 /* CRKXiangQVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CRKXiangQVC.swift; sourceTree = "<group>"; };
E013D7872484B1B90092DE46 /* CRKXiangQVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CRKXiangQVC.xib; sourceTree = "<group>"; }; E013D7872484B1B90092DE46 /* CRKXiangQVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CRKXiangQVC.xib; sourceTree = "<group>"; };
E013D78A2484CAFC0092DE46 /* CRKBtnCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CRKBtnCell.swift; sourceTree = "<group>"; }; E013D78A2484CAFC0092DE46 /* CRKBtnCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CRKBtnCell.swift; sourceTree = "<group>"; };
...@@ -1972,6 +1976,8 @@ ...@@ -1972,6 +1976,8 @@
children = ( children = (
E06FBAA225BFEFB200E9C2BA /* S_Y_View.swift */, E06FBAA225BFEFB200E9C2BA /* S_Y_View.swift */,
E06FBAA725BFEFBC00E9C2BA /* S_Y_View.xib */, E06FBAA725BFEFBC00E9C2BA /* S_Y_View.xib */,
E01313DA25C0048C006CFA5D /* Add_Report_View.swift */,
E01313DF25C00496006CFA5D /* Add_Report_View.xib */,
); );
path = "溯源"; path = "溯源";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3781,6 +3787,7 @@ ...@@ -3781,6 +3787,7 @@
E07B1E6C245926330055BA3C /* GYSGLCell.xib in Resources */, E07B1E6C245926330055BA3C /* GYSGLCell.xib in Resources */,
E0337EEE2464EED000952EF4 /* PinPaiListViewController.xib in Resources */, E0337EEE2464EED000952EF4 /* PinPaiListViewController.xib in Resources */,
E095C42B24874E6100922571 /* CKGmCell.xib in Resources */, E095C42B24874E6100922571 /* CKGmCell.xib in Resources */,
E01313E025C00496006CFA5D /* Add_Report_View.xib in Resources */,
E0E341EB246E95EE0060AC20 /* PingLunCell.xib in Resources */, E0E341EB246E95EE0060AC20 /* PingLunCell.xib in Resources */,
E0273DDE24551D4500B3FCAE /* OnlyLabelCell.xib in Resources */, E0273DDE24551D4500B3FCAE /* OnlyLabelCell.xib in Resources */,
E00D85E5244561FE00F5F816 /* Assets.xcassets in Resources */, E00D85E5244561FE00F5F816 /* Assets.xcassets in Resources */,
...@@ -4199,6 +4206,7 @@ ...@@ -4199,6 +4206,7 @@
F956D5A3246A2D9C003FF510 /* LMNImageInputViewController.m in Sources */, F956D5A3246A2D9C003FF510 /* LMNImageInputViewController.m in Sources */,
E01E5484254FD34C00A2620C /* GYS_GuanLi_Cell.swift in Sources */, E01E5484254FD34C00A2620C /* GYS_GuanLi_Cell.swift in Sources */,
F9956B1E2463D94E001A617D /* WorkSelectTimeView.swift in Sources */, F9956B1E2463D94E001A617D /* WorkSelectTimeView.swift in Sources */,
E01313DB25C0048C006CFA5D /* Add_Report_View.swift in Sources */,
F9531F3B2465108800724BEE /* JXPhotoBrowserZoomSupportedCell.swift in Sources */, F9531F3B2465108800724BEE /* JXPhotoBrowserZoomSupportedCell.swift in Sources */,
F950FDE024518B9500C40530 /* FSCalendarExtensions.m in Sources */, F950FDE024518B9500C40530 /* FSCalendarExtensions.m in Sources */,
E09B03A32445AF9500211A51 /* NetworkRequest.swift in Sources */, E09B03A32445AF9500211A51 /* NetworkRequest.swift in Sources */,
......
{
"images" : [
{
"filename" : "编组 6.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "编组 6@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "编组 6@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -11,6 +11,7 @@ import UIKit ...@@ -11,6 +11,7 @@ import UIKit
@objc optional func textFieldContent(content:String,cell:TitleAndTFCell) @objc optional func textFieldContent(content:String,cell:TitleAndTFCell)
} }
class TitleAndTFCell: UITableViewCell { class TitleAndTFCell: UITableViewCell {
@IBOutlet weak var star_lbl: UILabel!
@IBOutlet weak var line: UIView! @IBOutlet weak var line: UIView!
var delegate:TitleAndTFCellDelegate? var delegate:TitleAndTFCellDelegate?
@IBOutlet weak var textTF: UITextField! @IBOutlet weak var textTF: UITextField!
......
<?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="17156" 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="17126"/> <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"/>
...@@ -40,6 +40,12 @@ ...@@ -40,6 +40,12 @@
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
</textField> </textField>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9LH-Vg-GzM">
<rect key="frame" x="7" y="14.5" width="8" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="按钮背景颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="Q6V-I9-aNd" secondAttribute="trailing" constant="15" id="91e-XA-Iqf"/> <constraint firstAttribute="trailing" secondItem="Q6V-I9-aNd" secondAttribute="trailing" constant="15" id="91e-XA-Iqf"/>
...@@ -48,6 +54,8 @@ ...@@ -48,6 +54,8 @@
<constraint firstItem="zvz-cN-gmt" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Mua-VI-kn3"/> <constraint firstItem="zvz-cN-gmt" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Mua-VI-kn3"/>
<constraint firstItem="6wI-Bk-Hnz" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="NXV-5U-lIO"/> <constraint firstItem="6wI-Bk-Hnz" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="NXV-5U-lIO"/>
<constraint firstItem="6wI-Bk-Hnz" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="aLi-6W-mr9"/> <constraint firstItem="6wI-Bk-Hnz" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="aLi-6W-mr9"/>
<constraint firstItem="6wI-Bk-Hnz" firstAttribute="leading" secondItem="9LH-Vg-GzM" secondAttribute="trailing" id="cUC-Bb-Rt1"/>
<constraint firstItem="9LH-Vg-GzM" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="edP-uo-gUL"/>
<constraint firstItem="Q6V-I9-aNd" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="lmF-E2-VqK"/> <constraint firstItem="Q6V-I9-aNd" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="lmF-E2-VqK"/>
<constraint firstAttribute="bottom" secondItem="zvz-cN-gmt" secondAttribute="bottom" id="oe1-RM-1UU"/> <constraint firstAttribute="bottom" secondItem="zvz-cN-gmt" secondAttribute="bottom" id="oe1-RM-1UU"/>
</constraints> </constraints>
...@@ -56,12 +64,16 @@ ...@@ -56,12 +64,16 @@
<connections> <connections>
<outlet property="line" destination="zvz-cN-gmt" id="zWg-kq-cW7"/> <outlet property="line" destination="zvz-cN-gmt" id="zWg-kq-cW7"/>
<outlet property="nameLbl" destination="6wI-Bk-Hnz" id="W9P-gn-wOa"/> <outlet property="nameLbl" destination="6wI-Bk-Hnz" id="W9P-gn-wOa"/>
<outlet property="star_lbl" destination="9LH-Vg-GzM" id="2ex-gJ-Umt"/>
<outlet property="textTF" destination="Q6V-I9-aNd" id="Qep-Os-9qk"/> <outlet property="textTF" destination="Q6V-I9-aNd" id="Qep-Os-9qk"/>
</connections> </connections>
<point key="canvasLocation" x="132.60869565217394" y="103.79464285714285"/> <point key="canvasLocation" x="132.60869565217394" y="103.79464285714285"/>
</tableViewCell> </tableViewCell>
</objects> </objects>
<resources> <resources>
<namedColor name="按钮背景颜色">
<color red="0.2199999988079071" green="0.45500001311302185" blue="0.82700002193450928" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色"> <namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
......
...@@ -17,6 +17,9 @@ protocol NewOnlyRKCellDelegate { ...@@ -17,6 +17,9 @@ protocol NewOnlyRKCellDelegate {
class NewOnlyRKCell: UITableViewCell,UITextFieldDelegate { class NewOnlyRKCell: UITableViewCell,UITextFieldDelegate {
var delegate:NewOnlyRKCellDelegate? var delegate:NewOnlyRKCellDelegate?
@IBAction func add_report_action(_ sender: UIButton) {
delegate?.NewOnlyRKCellAddRepord(cell: self)
}
@IBOutlet weak var titLbl: UILabel! @IBOutlet weak var titLbl: UILabel!
@IBOutlet weak var delBtn: UIButton! @IBOutlet weak var delBtn: UIButton!
@IBOutlet weak var rightBtn: UIButton! @IBOutlet weak var rightBtn: UIButton!
......
<?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="17156" 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="17125"/> <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"/>
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="326" id="KGk-i7-Jjw" customClass="NewOnlyRKCell" customModule="TestClass" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="326" id="KGk-i7-Jjw" customClass="NewOnlyRKCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="411" height="326"/> <rect key="frame" x="0.0" y="0.0" width="411" height="375"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="411" height="326"/> <rect key="frame" x="0.0" y="0.0" width="411" height="375"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JdU-F8-6ck"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JdU-F8-6ck">
...@@ -261,12 +261,39 @@ ...@@ -261,12 +261,39 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</textField> </textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="82n-oH-pbs"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="82n-oH-pbs">
<rect key="frame" x="0.0" y="325" width="411" height="1"/> <rect key="frame" x="0.0" y="374" width="411" height="1"/>
<color key="backgroundColor" name="灰色分界线"/> <color key="backgroundColor" name="灰色分界线"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="Zg1-gz-BTV"/> <constraint firstAttribute="height" constant="1" id="Zg1-gz-BTV"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ThE-Le-aUU">
<rect key="frame" x="15" y="325.5" width="396" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="cIP-cg-G0y"/>
</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="PdO-Zj-Dft">
<rect key="frame" x="15" y="341.5" width="65" height="15.5"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zbb-dP-OOv">
<rect key="frame" x="356" y="325" width="55" height="49"/>
<constraints>
<constraint firstAttribute="width" constant="55" id="0sS-wq-6l2"/>
<constraint firstAttribute="height" constant="49" id="3kt-ou-1OQ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="添加">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
<connections>
<action selector="add_report_action:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="i3k-0d-CCB"/>
</connections>
</button>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="Fr1-SS-krs" firstAttribute="top" secondItem="chy-ny-kVr" secondAttribute="bottom" constant="10" id="1nB-uL-p9g"/> <constraint firstItem="Fr1-SS-krs" firstAttribute="top" secondItem="chy-ny-kVr" secondAttribute="bottom" constant="10" id="1nB-uL-p9g"/>
...@@ -317,15 +344,22 @@ ...@@ -317,15 +344,22 @@
<constraint firstAttribute="trailing" secondItem="eh6-mf-agL" secondAttribute="trailing" id="fsj-lq-pzi"/> <constraint firstAttribute="trailing" secondItem="eh6-mf-agL" secondAttribute="trailing" id="fsj-lq-pzi"/>
<constraint firstItem="D4z-vi-ogp" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="koc-uk-Wmg"/> <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="6MO-V8-sMn" firstAttribute="leading" secondItem="fLT-jy-0yj" secondAttribute="trailing" id="l3w-Wi-Wv9"/>
<constraint firstAttribute="trailing" secondItem="Zbb-dP-OOv" secondAttribute="trailing" id="mTz-Vg-lTL"/>
<constraint firstItem="ThE-Le-aUU" firstAttribute="top" secondItem="Fwd-sD-T0h" secondAttribute="bottom" constant="49" id="mbX-cc-Lxw"/>
<constraint firstItem="DNW-1v-r8x" firstAttribute="leading" secondItem="D4z-vi-ogp" secondAttribute="trailing" constant="15" id="nsc-Yp-dmq"/> <constraint firstItem="DNW-1v-r8x" firstAttribute="leading" secondItem="D4z-vi-ogp" secondAttribute="trailing" constant="15" id="nsc-Yp-dmq"/>
<constraint firstItem="PdO-Zj-Dft" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="p1x-ze-2Lr"/>
<constraint firstItem="PST-FC-fG9" firstAttribute="top" secondItem="Fr1-SS-krs" secondAttribute="bottom" constant="22" id="qVK-iA-Oem"/> <constraint firstItem="PST-FC-fG9" firstAttribute="top" secondItem="Fr1-SS-krs" secondAttribute="bottom" constant="22" id="qVK-iA-Oem"/>
<constraint firstAttribute="trailing" secondItem="Fr1-SS-krs" secondAttribute="trailing" constant="15" id="sbK-G2-P0h"/> <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="kGM-d5-IE6" firstAttribute="centerY" secondItem="PST-FC-fG9" secondAttribute="centerY" id="t0z-cG-nJ3"/>
<constraint firstAttribute="trailing" secondItem="ThE-Le-aUU" secondAttribute="trailing" id="twC-NR-EUN"/>
<constraint firstItem="dXp-Fv-ghH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="uRV-sZ-67i"/> <constraint firstItem="dXp-Fv-ghH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="uRV-sZ-67i"/>
<constraint firstAttribute="trailing" secondItem="4j6-NB-EJe" secondAttribute="trailing" constant="15" id="wCj-Sr-ffc"/> <constraint firstAttribute="trailing" secondItem="4j6-NB-EJe" secondAttribute="trailing" constant="15" id="wCj-Sr-ffc"/>
<constraint firstItem="82n-oH-pbs" firstAttribute="top" secondItem="Zbb-dP-OOv" secondAttribute="bottom" id="wWc-5W-rV9"/>
<constraint firstItem="4j6-NB-EJe" firstAttribute="leading" secondItem="yHy-KY-Uxt" secondAttribute="trailing" constant="10" id="wja-2I-IyW"/> <constraint firstItem="4j6-NB-EJe" firstAttribute="leading" secondItem="yHy-KY-Uxt" secondAttribute="trailing" constant="10" id="wja-2I-IyW"/>
<constraint firstItem="ThE-Le-aUU" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="xR2-34-4SX"/>
<constraint firstItem="GM4-XT-zet" firstAttribute="top" secondItem="D4z-vi-ogp" secondAttribute="bottom" constant="15.5" id="xee-zN-VOT"/> <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 firstItem="7fF-Od-2O3" firstAttribute="centerY" secondItem="PST-FC-fG9" secondAttribute="centerY" id="yyZ-7a-pit"/>
<constraint firstItem="PdO-Zj-Dft" firstAttribute="top" secondItem="ThE-Le-aUU" secondAttribute="bottom" constant="15" id="zOW-Lo-3jK"/>
<constraint firstAttribute="bottom" secondItem="82n-oH-pbs" secondAttribute="bottom" id="zlz-v0-agc"/> <constraint firstAttribute="bottom" secondItem="82n-oH-pbs" secondAttribute="bottom" id="zlz-v0-agc"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
...@@ -343,7 +377,7 @@ ...@@ -343,7 +377,7 @@
<outlet property="titLbl" destination="dXp-Fv-ghH" id="yQ6-ua-y2u"/> <outlet property="titLbl" destination="dXp-Fv-ghH" id="yQ6-ua-y2u"/>
<outlet property="totalPriceTf" destination="DNW-1v-r8x" id="emO-uV-Hk1"/> <outlet property="totalPriceTf" destination="DNW-1v-r8x" id="emO-uV-Hk1"/>
</connections> </connections>
<point key="canvasLocation" x="155.79710144927537" y="117.1875"/> <point key="canvasLocation" x="155.79710144927537" y="116.85267857142857"/>
</tableViewCell> </tableViewCell>
</objects> </objects>
<resources> <resources>
...@@ -366,9 +400,6 @@ ...@@ -366,9 +400,6 @@
<namedColor name="标题字颜色"> <namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<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>
......
...@@ -8,10 +8,50 @@ ...@@ -8,10 +8,50 @@
import UIKit import UIKit
import LGButton import LGButton
import Photos
protocol NewRKVcDelegate { protocol NewRKVcDelegate {
func NewRKVcFinish() func NewRKVcFinish()
} }
class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, NewOnlyRKCellDelegate,NewSelectItemVcDelegate,NewSelectWarehouseVCDelegate,GLAlertSelectViewDelegate,GeliAlertTextViewDelegate, ShowTimeSelectViewDelegate{ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, NewOnlyRKCellDelegate,NewSelectItemVcDelegate,NewSelectWarehouseVCDelegate,GLAlertSelectViewDelegate,GeliAlertTextViewDelegate, ShowTimeSelectViewDelegate, GYSListViewControllerDelegate, GYSGLViewControllerDelegate, Add_Report_View_Delegate{
var maxFiveImgsArr:Array<String> = []//多图
func Add_Report_View_Select_Img(view: Add_Report_View) {
print("选择")
let num = 5 - maxFiveImgsArr.count
_ = self.presentHGImagePicker(maxSelected:num) { (assets) in
//结果处理
print("共选择了\(assets.count)张图片,分别如下:")
let option = PHImageRequestOptions()
option.isSynchronous = true
option.isNetworkAccessAllowed = true
for asset in assets {
PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// print("上传图片==\(image)")
// self.maxFiveImgsArr.append(image!)
// let index = Dollar.indexOf(self.maxFiveImgsArr, value: image!)
self.maxFiveImgsArr.append("insert")
//调用上传图片
// self.uploadImg(imge: image!, isOriginal: false, tag: self.maxFiveImgsArr.count-1)
})
}
self.listView.reloadData()
}
}
func GYSGLViewControllerFinish() {
//此处无用
}
func GYSListViewControllerGetGYS(sender: VendorListDataModel) {
holderArr.insert(sender.ven_name!, at: 3)
holderArr.remove(at: 4)
listView.reloadData()
}
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
var delegate:NewRKVcDelegate? var delegate:NewRKVcDelegate?
var po_id = 0 var po_id = 0
...@@ -174,8 +214,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -174,8 +214,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
@IBOutlet weak var lgBtnTitLbl: UILabel! @IBOutlet weak var lgBtnTitLbl: UILabel!
@IBOutlet weak var lgBtn: LGButton! @IBOutlet weak var lgBtn: LGButton!
var isGm = false var isGm = false
var titleArr = ["仓库:","库位:","入库类型:","入库时间:","备注:"] var titleArr = ["仓库:","库位:","入库类型:","选择供应商:","备注:"]
var holderArr = ["请选择仓库","请选择库位","请选择入库类型","时间","请输入备注"] var holderArr = ["请选择仓库","请选择库位","请选择入库类型","请选择供应商","请输入备注"]
//入库类型 //入库类型
var rkTypeArr = ["采购","调入","退货","生产","调出被拒绝","外采","其他","固定采购","临时采购"] var rkTypeArr = ["采购","调入","退货","生产","调出被拒绝","外采","其他","固定采购","临时采购"]
var typeSelect:Int? var typeSelect:Int?
...@@ -197,6 +237,13 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -197,6 +237,13 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var w_id:Int? var w_id:Int?
var p_id:Int? var p_id:Int?
func rightBtnClick() {
print("新增供应商")
let vc = GYSGLViewController()
vc.delegate = self
vc.barT = "新增供应商信息"
self.navigationController?.pushViewController(vc, animated: true)
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -211,13 +258,14 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -211,13 +258,14 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
holderArr.remove(at: 3) holderArr.remove(at: 3)
} }
let strNowTime = getTimeNow() // let strNowTime = getTimeNow()
holderArr.insert(strNowTime, at: 3) // holderArr.insert(strNowTime, at: 3)
holderArr.remove(at: 4) // holderArr.remove(at: 4)
navbar.title = "入库" navbar.title = "入库"
self.view.addSubview(navbar) self.view.addSubview(navbar)
SetTopFrameView(view: listView, btmView: btmView) SetTopFrameView(view: listView, btmView: btmView)
navbar.rightTitle = "新增供应商"
listView.separatorStyle = .none listView.separatorStyle = .none
listView.register(UINib(nibName: "CRKBtnCell", bundle: nil), forCellReuseIdentifier: "CRKBtnCell") listView.register(UINib(nibName: "CRKBtnCell", bundle: nil), forCellReuseIdentifier: "CRKBtnCell")
...@@ -316,6 +364,13 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -316,6 +364,13 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
if indexPath.section == 1 { if indexPath.section == 1 {
return return
} }
if indexPath.row == 3 {
print("选择供应商")
let vc = GYSListViewController()
vc.barTitle = "选择供应商"
vc.delegate = self
self.navigationController?.pushViewController(vc, animated: true)
}
if indexPath.row == 4 { if indexPath.row == 4 {
let alterView = GeliAlertTextView(frame: self.view.window!.bounds) let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
alterView.delegate = self alterView.delegate = self
...@@ -491,7 +546,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -491,7 +546,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
cell.mustLbl.isHidden = true cell.mustLbl.isHidden = true
cell.nameLeft.constant = 0 cell.nameLeft.constant = 0
cell.mustWidth.constant = 0 cell.mustWidth.constant = 0
if indexPath.row > 2 { if indexPath.row > 3 {
setCellUI(cell: cell) setCellUI(cell: cell)
} }
return cell return cell
...@@ -512,7 +567,6 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -512,7 +567,6 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
timeSelectV.moreSelection = false timeSelectV.moreSelection = false
tempTag = cell.tag tempTag = cell.tag
let data = rkSelectArr[tempTag!] let data = rkSelectArr[tempTag!]
print("date ==",data.createDayStr,data.createDay)
//把默认值传回去 //把默认值传回去
if data.createDay != nil { if data.createDay != nil {
let time = TimeInterval(exactly: data.createDay!) let time = TimeInterval(exactly: data.createDay!)
...@@ -529,7 +583,6 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -529,7 +583,6 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
//MARK:--选择时间回调数据 //MARK:--选择时间回调数据
func showTimeSelectByData(timeStr: String, beginDate: Date, endginDate: Date) { func showTimeSelectByData(timeStr: String, beginDate: Date, endginDate: Date) {
let timeInterval:TimeInterval = beginDate.timeIntervalSince1970 let timeInterval:TimeInterval = beginDate.timeIntervalSince1970
print(tempTag,timeStr,"生产日期",timeInterval)
let data = rkSelectArr[tempTag!] let data = rkSelectArr[tempTag!]
data.createDay = Int(timeInterval) data.createDay = Int(timeInterval)
...@@ -539,6 +592,10 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -539,6 +592,10 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
} }
func NewOnlyRKCellAddRepord(cell: NewOnlyRKCell) { func NewOnlyRKCellAddRepord(cell: NewOnlyRKCell) {
//添加检测报告 //添加检测报告
print("添加检测报告")
let vc = Add_Report_View(frame: self.view.bounds)
vc.delegate = self
self.view.addSubview(vc)
} }
func NewOnlyRKCellDel(cell: NewOnlyRKCell) { func NewOnlyRKCellDel(cell: NewOnlyRKCell) {
...@@ -620,7 +677,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -620,7 +677,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
return 49 return 49
} }
return 326 return 375
} }
func setCellUI(cell:CRKBtnCell){ func setCellUI(cell:CRKBtnCell){
cell.contentLbl.textColor = UIColor(named: "标题字颜色") cell.contentLbl.textColor = UIColor(named: "标题字颜色")
......
...@@ -87,6 +87,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -87,6 +87,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
var cityIndex = 0 var cityIndex = 0
//选择的区(县)索引 //选择的区(县)索引
var areaIndex = 0 var areaIndex = 0
var create_number = ""
var gysName:String = "" var gysName:String = ""
var dzStr:String = "" var dzStr:String = ""
var detailDzStr:String = "" var detailDzStr:String = ""
...@@ -163,11 +164,11 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -163,11 +164,11 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 2 { if indexPath.section == 2 {
if zhizhao.count > 0 { if zhizhao.count > 0 {
if indexPath.row == 0 { if indexPath.row == 1 {
return 100 return 100
} }
} }
if food_production_license.count > 0 { if food_production_license.count > 2 {
if indexPath.row == 1 { if indexPath.row == 1 {
return 100 return 100
} }
...@@ -182,14 +183,14 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -182,14 +183,14 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
switch section { switch section {
case 0:return 3 case 0:return 3
case 1:return 3 case 1:return 3
default:return 2 default:return 3
} }
} }
let sec1Arr = ["供应商名称:","地址:","详细地址:"] let sec1Arr = ["供应商名称:","地址:","详细地址:"]
let hold1Arr = ["请输入供应商名称","请选择供应商地址","请输入供应商详细地址"] let hold1Arr = ["请输入供应商名称","请选择供应商地址","请输入供应商详细地址"]
let sec2Arr = ["姓名:","手机:","电话:"] let sec2Arr = ["姓名:","手机:","电话:"]
let hold2Arr = ["请输入联系人姓名","请输入联系人手机号码","请输入联系电话"] let hold2Arr = ["请输入联系人姓名","请输入联系人手机号码","请输入联系电话"]
let sec3Arr = ["营业资格证:","食品流通许可证:"] let sec3Arr = ["单位统一社会信用代码:","营业资格证:","食品流通许可证:"]
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch indexPath.section { switch indexPath.section {
case 0: case 0:
...@@ -261,6 +262,21 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -261,6 +262,21 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
} }
return cell return cell
default: default:
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.nameLbl.text = sec3Arr[indexPath.row]
cell.star_lbl.isHidden = false
cell.textTF.placeholder = "请输入"
if barT.contains("编辑"){
cell.textTF.clearButtonMode = .always
}else{
cell.textTF.clearButtonMode = .whileEditing
}
cell.textTF.delegate = self
cell.tag = 99
cell.textTF.text = create_number
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndOnlyBtnCell") as! TitleAndOnlyBtnCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndOnlyBtnCell") as! TitleAndOnlyBtnCell
cell.titleLbl.text = sec3Arr[indexPath.row] cell.titleLbl.text = sec3Arr[indexPath.row]
cell.button.setTitle("上传", for: .normal) cell.button.setTitle("上传", for: .normal)
...@@ -690,6 +706,9 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -690,6 +706,9 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
case 2: case 2:
detailDzStr = textField.text! detailDzStr = textField.text!
break break
case 99:
create_number = textField.text!
break
case 100: case 100:
nameStr = textField.text! nameStr = textField.text!
break break
......
<?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="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" 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>
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UDG-2C-6uA" customClass="LGButton" customModule="LGButton"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UDG-2C-6uA" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="618" width="375" height="49"/> <rect key="frame" x="0.0" y="618" width="375" height="49"/>
<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="按钮渐变色上"/>
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
</connections> </connections>
</tableView> </tableView>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="dCx-Vv-3aF" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="3sX-Fi-7Kl"/> <constraint firstItem="dCx-Vv-3aF" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="3sX-Fi-7Kl"/>
...@@ -76,10 +78,14 @@ ...@@ -76,10 +78,14 @@
<constraint firstItem="UDG-2C-6uA" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="tRC-p9-8bY"/> <constraint firstItem="UDG-2C-6uA" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="tRC-p9-8bY"/>
<constraint firstItem="dCx-Vv-3aF" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="xje-UF-YA9"/> <constraint firstItem="dCx-Vv-3aF" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="xje-UF-YA9"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="131.8840579710145" y="121.875"/> <point key="canvasLocation" x="131.8840579710145" y="121.875"/>
</view> </view>
</objects> </objects>
<designables>
<designable name="UDG-2C-6uA">
<size key="intrinsicContentSize" width="10" height="10"/>
</designable>
</designables>
<resources> <resources>
<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"/>
...@@ -93,5 +99,8 @@ ...@@ -93,5 +99,8 @@
<namedColor name="白色背景色"> <namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<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.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......
<?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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="SJMapCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="SJMapCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="73.5"/> <rect key="frame" x="0.0" y="0.0" width="375" height="73.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
......
//
// Add_Report_View.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/1/26.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
import LGButton
protocol Add_Report_View_Delegate {
func Add_Report_View_Select_Img(view:Add_Report_View)
}
class Add_Report_View: UIView {
var delegate:Add_Report_View_Delegate?
@IBOutlet weak var select_view: UIView!
var select_idx:Int?{
didSet{
if select_idx != nil {
select_img.isHidden = false
}
}
}
@IBOutlet weak var bg_view_width: NSLayoutConstraint!
@IBAction func add_img_action(_ sender: UIButton) {
delegate?.Add_Report_View_Select_Img(view: self)
}
@IBOutlet weak var add_img_btn: UIButton!
@IBAction func submit_action(_ sender: UIButton) {
close_action(sender)
}
@IBOutlet weak var img_y: NSLayoutConstraint!
@IBAction func type_select(_ sender: UIButton) {
select_view.isHidden = true
select_idx = sender.tag
let whitespace = NSCharacterSet.whitespacesAndNewlines
type_lbl.text = sender.titleLabel?.text!.trimmingCharacters(in: whitespace)
img_y.constant = sender.frame.origin.y
}
@IBOutlet weak var select_img: UIImageView!
@IBAction func select_type_action(_ sender: UIButton) {
select_view.isHidden = false
}
@IBAction func close_action(_ sender: UIButton) {
self.removeFromSuperview()
}
@IBOutlet weak var type_lbl: UILabel!
var contentView:UIView!
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
//加载xib
func loadViewFromNib() -> UIView {
let className = type(of: self)
let bundle = Bundle(for: className)
let name = NSStringFromClass(className).components(separatedBy: ".").last
let nib = UINib(nibName: name!, bundle: bundle)
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
return view
}
}
This diff is collapsed.
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