Commit 3a6c0b47 authored by lujunye's avatar lujunye

出库界面

parent 6f7ca71f
......@@ -170,6 +170,10 @@
E08A7AE124652E2C00F934F2 /* BingDingKeHuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E08A7ADF24652E2C00F934F2 /* BingDingKeHuViewController.xib */; };
E08B0674244A98B2001D2E01 /* WareHouseSpCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E08B0672244A98B2001D2E01 /* WareHouseSpCell.swift */; };
E08B0675244A98B2001D2E01 /* WareHouseSpCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E08B0673244A98B2001D2E01 /* WareHouseSpCell.xib */; };
E095C42624874BDA00922571 /* CKNonGmCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E095C42424874BDA00922571 /* CKNonGmCell.swift */; };
E095C42724874BDA00922571 /* CKNonGmCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E095C42524874BDA00922571 /* CKNonGmCell.xib */; };
E095C42A24874E6100922571 /* CKGmCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E095C42824874E6100922571 /* CKGmCell.swift */; };
E095C42B24874E6100922571 /* CKGmCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E095C42924874E6100922571 /* CKGmCell.xib */; };
E099B588246BF8FA009F587F /* OrderDViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E099B586246BF8FA009F587F /* OrderDViewController.swift */; };
E099B589246BF8FA009F587F /* OrderDViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E099B587246BF8FA009F587F /* OrderDViewController.xib */; };
E09B03A12445AF7100211A51 /* Define.swift in Sources */ = {isa = PBXBuildFile; fileRef = E09B03A02445AF7100211A51 /* Define.swift */; };
......@@ -294,6 +298,8 @@
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 */; };
E0F8E91F248747D200817A08 /* NewCKVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F8E91D248747D200817A08 /* NewCKVc.swift */; };
E0F8E920248747D200817A08 /* NewCKVc.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F8E91E248747D200817A08 /* NewCKVc.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 */; };
......@@ -677,6 +683,10 @@
E08A7ADF24652E2C00F934F2 /* BingDingKeHuViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BingDingKeHuViewController.xib; sourceTree = "<group>"; };
E08B0672244A98B2001D2E01 /* WareHouseSpCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WareHouseSpCell.swift; sourceTree = "<group>"; };
E08B0673244A98B2001D2E01 /* WareHouseSpCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WareHouseSpCell.xib; sourceTree = "<group>"; };
E095C42424874BDA00922571 /* CKNonGmCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CKNonGmCell.swift; sourceTree = "<group>"; };
E095C42524874BDA00922571 /* CKNonGmCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CKNonGmCell.xib; sourceTree = "<group>"; };
E095C42824874E6100922571 /* CKGmCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CKGmCell.swift; sourceTree = "<group>"; };
E095C42924874E6100922571 /* CKGmCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CKGmCell.xib; sourceTree = "<group>"; };
E099B586246BF8FA009F587F /* OrderDViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderDViewController.swift; sourceTree = "<group>"; };
E099B587246BF8FA009F587F /* OrderDViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OrderDViewController.xib; sourceTree = "<group>"; };
E09B03A02445AF7100211A51 /* Define.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Define.swift; sourceTree = "<group>"; };
......@@ -810,6 +820,8 @@
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>"; };
E0F8E91D248747D200817A08 /* NewCKVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewCKVc.swift; sourceTree = "<group>"; };
E0F8E91E248747D200817A08 /* NewCKVc.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewCKVc.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>"; };
......@@ -1337,6 +1349,12 @@
E030DF3A248651A5002764D3 /* NewRKVc.xib */,
E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */,
E0F8E91A248737F100817A08 /* NewOnlyRKCell.xib */,
E0F8E91D248747D200817A08 /* NewCKVc.swift */,
E0F8E91E248747D200817A08 /* NewCKVc.xib */,
E095C42824874E6100922571 /* CKGmCell.swift */,
E095C42924874E6100922571 /* CKGmCell.xib */,
E095C42424874BDA00922571 /* CKNonGmCell.swift */,
E095C42524874BDA00922571 /* CKNonGmCell.xib */,
);
path = "1.1入库&出库";
sourceTree = "<group>";
......@@ -2591,6 +2609,7 @@
E0D197C7244845FD002B080C /* PersonCenterViewController.xib in Resources */,
F93E320B2473D83D00524DFC /* GeliAlertTextFiled.xib in Resources */,
E07B1E5F24591AA50055BA3C /* KeHuXQViewController.xib in Resources */,
E095C42724874BDA00922571 /* CKNonGmCell.xib in Resources */,
E0707DD624624B5200E039A8 /* AMap.bundle in Resources */,
E02DDD83244FD15B00ABB707 /* TitleAndSwitchHeaderView.xib in Resources */,
E03549AE24582828008BD021 /* KeHuGuanLiCell.xib in Resources */,
......@@ -2602,6 +2621,7 @@
E0F1BE4924692379003015B2 /* ItemCell.xib in Resources */,
E01C26B72446AF3100ADCC70 /* DemoViewController.xib in Resources */,
F9DDBE972457D3EC00A32CB2 /* WebViewController.xib in Resources */,
E0F8E920248747D200817A08 /* NewCKVc.xib in Resources */,
E030DF372485DD3E002764D3 /* NewRKCell.xib in Resources */,
E0F97B0424512299001BD600 /* GLAlertSelectView.xib in Resources */,
F9023F6E2449A9B100DD5A63 /* TitleAndTFCell.xib in Resources */,
......@@ -2710,6 +2730,7 @@
F95A9EDE24557CD500867849 /* GuanLianKehuVC.xib in Resources */,
E07B1E6C245926330055BA3C /* GYSGLCell.xib in Resources */,
E0337EEE2464EED000952EF4 /* PinPaiListViewController.xib in Resources */,
E095C42B24874E6100922571 /* CKGmCell.xib in Resources */,
E0E341EB246E95EE0060AC20 /* PingLunCell.xib in Resources */,
E0273DDE24551D4500B3FCAE /* OnlyLabelCell.xib in Resources */,
E00D85E5244561FE00F5F816 /* Assets.xcassets in Resources */,
......@@ -2905,6 +2926,7 @@
F95D9B522448530E0080D6E3 /* GeliAlertView.swift in Sources */,
E0B5308624728FB600FFCC15 /* WarehouseInterface.swift in Sources */,
E02FD9EC2455627300E10E27 /* ChuKuViewController.swift in Sources */,
E095C42A24874E6100922571 /* CKGmCell.swift in Sources */,
E07B1E6F245929060055BA3C /* GYSGLViewController.swift in Sources */,
F96A585124790E300070A057 /* TFHppleElement.m in Sources */,
E0D197BB2448431C002B080C /* BabyCallback.m in Sources */,
......@@ -3006,6 +3028,7 @@
F9531F3A2465108800724BEE /* JXPhotoBrowserNoneAnimator.swift in Sources */,
E07B1E62245921A60055BA3C /* KeHuXQCell.swift in Sources */,
E0CC847C24823087009B1FE9 /* GetGoodBatchModel.swift in Sources */,
E0F8E91F248747D200817A08 /* NewCKVc.swift in Sources */,
F956D5C0246A3789003FF510 /* OrderDetailModel.swift in Sources */,
E0DDCB1D244AE81800DF54C7 /* GuanLianKeHuCell.swift in Sources */,
E0D197BF2448431C002B080C /* BabyBluetooth.m in Sources */,
......@@ -3028,6 +3051,7 @@
F9023F62244999F500DD5A63 /* WarehoseMangementCell.swift in Sources */,
F956D5B1246A2D9C003FF510 /* LMNFolder.m in Sources */,
E0A409D424640B8300CFF109 /* DZGLViewController.swift in Sources */,
E095C42624874BDA00922571 /* CKNonGmCell.swift in Sources */,
E0516F772448003D00E373CE /* PayViewController.swift in Sources */,
E02DDD952450106C00ABB707 /* PuTongJieTiCell.swift in Sources */,
E0BE8A8B245A7D3300E80134 /* BtmBtnCell.swift in Sources */,
......
......@@ -241,22 +241,24 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
tabBarC = tabBarController
let v1 = OrderListViewController()
let v2 = GoodsManageListVC()
let v3 = WorkCViewController()
let v4 = WarehoseMangementListVC()
let v5 = PersonCenterViewController()
v1.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "订单管理", image: UIImage(named: "tab_btn_dingdao_nor"), selectedImage: UIImage(named: "tab_btn_dingdan_hig"))
v2.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "商品管理", image: UIImage(named: "tab_btn_shangpin_nor"), selectedImage: UIImage(named: "tab_btn_shangpin_hig"))
v3.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "工作中心", image: UIImage(named: "tab_btn_gongzuo_nor"), selectedImage: UIImage(named: "tab_btn_gongzuo_hig"))
// v3.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "工作中心", image: UIImage(named: "tab_btn_gongzuo_nor"), selectedImage: UIImage(named: "tab_btn_gongzuo_hig"))
v4.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "仓库管理", image: UIImage(named: "tab_btn_cangku_nor"), selectedImage: UIImage(named: "tab_btn_cangku_hig"))
v5.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "个人中心", image: UIImage(named: "tab_btn_geren_nor"), selectedImage: UIImage(named: "tab_btn_geren_hig"))
// Create the SwiftUI view that provides the window contents.
tabBarController.viewControllers = [v1, v2, v3, v4, v5]
tabBarController.viewControllers = [v1, v2, v4, v5]
tabBarController.selectedIndex = 2
tabBarController.selectedIndex = 1
......
//
// CKGmCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/3.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol CKGmCellDelegate {
func CKGmCellDelAction(cell:CKGmCell)
func CKGmCellSelectAction(cell:CKGmCell)
}
class CKGmCell: UITableViewCell {
var dataArr:Array<GetGoodBatchDataModel>? = []
@IBOutlet weak var listBg: UIView!
@IBOutlet weak var titleViewH: NSLayoutConstraint!
@IBOutlet weak var titleView: UIView!
var delegate:CKGmCellDelegate?
@IBAction func selectAction(_ sender: Any) {
delegate?.CKGmCellSelectAction(cell: self)
}
@IBAction func delAction(_ sender: Any) {
delegate?.CKGmCellDelAction(cell: self)
}
@IBOutlet weak var nameLbl: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func layoutIfNeeded() {
super.layoutIfNeeded()
if dataArr!.count > 0 {
titleView.isHidden = false
titleViewH.constant = 35
for i in 0 ..< dataArr!.count {
let view = UIView()
listBg.addSubview(view)
view.snp.makeConstraints { (make) in
make.top.equalTo(i * 30)
make.height.equalTo(30)
make.left.right.equalTo(0)
}
let leftL = UILabel()
view.addSubview(leftL)
leftL.textColor = UIColor(named: "个人中心灰色字体")
leftL.font = UIFont.systemFont(ofSize: 13)
leftL.snp.makeConstraints { (make) in
make.left.equalTo(30)
make.top.bottom.right.equalTo(0)
}
let rightL = UILabel()
view.addSubview(rightL)
rightL.textColor = UIColor(named: "个人中心灰色字体")
rightL.textAlignment = .right
rightL.font = UIFont.systemFont(ofSize: 13)
rightL.snp.makeConstraints { (make) in
make.right.equalTo(-30)
make.top.bottom.left.equalTo(0)
}
}
}else{
titleView.isHidden = true
titleViewH.constant = 0
}
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="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" rowHeight="158" id="KGk-i7-Jjw" customClass="CKGmCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="377" height="125"/>
<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="377" height="125"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ktk-mw-IGw">
<rect key="frame" x="0.0" y="0.0" width="377" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="f3H-se-xBH"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="von-qo-7FQ">
<rect key="frame" x="0.0" y="124" width="377" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="QX9-6A-DHR"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BNG-HE-P3H">
<rect key="frame" x="321" y="1" width="56" height="56"/>
<constraints>
<constraint firstAttribute="height" constant="56" id="bQj-z0-Phy"/>
<constraint firstAttribute="width" constant="56" id="xxr-RY-wMd"/>
</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="mcG-TK-du2"/>
</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="d4N-n8-5II">
<rect key="frame" x="15" y="16" width="296" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="Xps-Kh-91n"/>
</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="oxJ-qd-UEI">
<rect key="frame" x="15" y="63" width="29" height="14"/>
<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="yRi-If-85q">
<rect key="frame" x="15" y="92" width="53.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="E5j-Un-JlW">
<rect key="frame" x="322" y="86" width="40" height="28"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="请选择">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
<connections>
<action selector="selectAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="0pU-7y-TF0"/>
</connections>
</button>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fta-n1-NF1">
<rect key="frame" x="15" y="123" width="347" height="0.0"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="批次ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xMo-gh-5Ix">
<rect key="frame" x="30" y="-8" width="40" 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="yz0-KW-fga">
<rect key="frame" x="263.5" y="-8" width="53.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="app底色"/>
<constraints>
<constraint firstItem="xMo-gh-5Ix" firstAttribute="leading" secondItem="fta-n1-NF1" secondAttribute="leading" constant="30" id="XOR-sM-Mda"/>
<constraint firstAttribute="height" id="Ypb-A9-PH0"/>
<constraint firstItem="xMo-gh-5Ix" firstAttribute="centerY" secondItem="fta-n1-NF1" secondAttribute="centerY" id="kjl-mk-yOR"/>
<constraint firstItem="yz0-KW-fga" firstAttribute="centerY" secondItem="fta-n1-NF1" secondAttribute="centerY" id="nrb-ei-i1T"/>
<constraint firstAttribute="trailing" secondItem="yz0-KW-fga" secondAttribute="trailing" constant="30" id="y1E-zY-swx"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d5T-uL-vW9">
<rect key="frame" x="15" y="123" width="347" height="2"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
</subviews>
<constraints>
<constraint firstItem="BNG-HE-P3H" firstAttribute="leading" secondItem="d4N-n8-5II" secondAttribute="trailing" constant="10" id="6MZ-eG-moD"/>
<constraint firstItem="oxJ-qd-UEI" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="6WB-pr-z7I"/>
<constraint firstItem="fta-n1-NF1" firstAttribute="top" secondItem="yRi-If-85q" secondAttribute="bottom" constant="15" id="75n-1R-fUs"/>
<constraint firstItem="BNG-HE-P3H" firstAttribute="top" secondItem="Ktk-mw-IGw" secondAttribute="bottom" id="8Ck-iv-OHW"/>
<constraint firstItem="d5T-uL-vW9" firstAttribute="top" secondItem="fta-n1-NF1" secondAttribute="bottom" id="FET-1k-bxh"/>
<constraint firstAttribute="trailing" secondItem="von-qo-7FQ" secondAttribute="trailing" id="Fj9-k6-hac"/>
<constraint firstItem="E5j-Un-JlW" firstAttribute="centerY" secondItem="yRi-If-85q" secondAttribute="centerY" id="H2q-jn-3Jd"/>
<constraint firstAttribute="trailing" secondItem="d5T-uL-vW9" secondAttribute="trailing" constant="15" id="Is6-y0-xAc"/>
<constraint firstItem="d5T-uL-vW9" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Keb-sj-UQl"/>
<constraint firstItem="fta-n1-NF1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="OsL-Qm-k86"/>
<constraint firstItem="oxJ-qd-UEI" firstAttribute="top" secondItem="d4N-n8-5II" secondAttribute="bottom" constant="10" id="Pvl-5J-evd"/>
<constraint firstItem="Ktk-mw-IGw" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="QbH-Ht-wqs"/>
<constraint firstAttribute="trailing" secondItem="BNG-HE-P3H" secondAttribute="trailing" id="SUm-fR-5DQ"/>
<constraint firstItem="yRi-If-85q" firstAttribute="top" secondItem="oxJ-qd-UEI" secondAttribute="bottom" constant="15" id="WqA-B6-dIS"/>
<constraint firstAttribute="trailing" secondItem="Ktk-mw-IGw" secondAttribute="trailing" id="aC5-Gw-175"/>
<constraint firstItem="d4N-n8-5II" firstAttribute="top" secondItem="Ktk-mw-IGw" secondAttribute="bottom" constant="15" id="dbz-Fp-BLr"/>
<constraint firstAttribute="bottom" secondItem="von-qo-7FQ" secondAttribute="bottom" id="g1K-YL-6d0"/>
<constraint firstItem="d4N-n8-5II" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="hgZ-SX-UvV"/>
<constraint firstItem="yRi-If-85q" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="qoW-2W-wiu"/>
<constraint firstAttribute="trailing" secondItem="E5j-Un-JlW" secondAttribute="trailing" constant="15" id="rod-s1-Uwg"/>
<constraint firstItem="von-qo-7FQ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="vPg-Y9-SFA"/>
<constraint firstAttribute="bottom" secondItem="d5T-uL-vW9" secondAttribute="bottom" id="wRa-xU-kGG"/>
<constraint firstAttribute="trailing" secondItem="fta-n1-NF1" secondAttribute="trailing" constant="15" id="xO6-sw-KjM"/>
<constraint firstItem="Ktk-mw-IGw" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="ykG-vR-rtE"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="listBg" destination="d5T-uL-vW9" id="SVo-od-Th4"/>
<outlet property="nameLbl" destination="d4N-n8-5II" id="bI7-ba-Voz"/>
<outlet property="titleView" destination="fta-n1-NF1" id="JJL-vJ-1vN"/>
<outlet property="titleViewH" destination="Ypb-A9-PH0" id="naw-VZ-a6f"/>
</connections>
<point key="canvasLocation" x="134.05797101449275" y="143.30357142857142"/>
</tableViewCell>
</objects>
<resources>
<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.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.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
//
// CKNonGmCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/3.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol CKNonGmCellDelegate {
func CKNonGmCellDelAction(cell:CKNonGmCell)
func CKNonGmCellInputCount(sender:String,cell:CKNonGmCell)
}
class CKNonGmCell: UITableViewCell,UITextFieldDelegate {
var delegate:CKNonGmCellDelegate?
@IBAction func delAction(_ sender: UIButton) {
delegate?.CKNonGmCellDelAction(cell: self)
}
@IBOutlet weak var ckCountTf: UITextField!
@IBOutlet weak var detailLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
ckCountTf.delegate = self
// Initialization code
}
func textFieldDidEndEditing(_ textField: UITextField) {
delegate?.CKNonGmCellInputCount(sender: textField.text!, cell: self)
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="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="CKNonGmCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="139"/>
<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="139"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bir-MR-Brg">
<rect key="frame" x="319" y="0.0" width="56" height="56"/>
<constraints>
<constraint firstAttribute="height" constant="56" id="qvT-ex-FV2"/>
<constraint firstAttribute="width" constant="56" id="zLb-CK-uqg"/>
</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="px0-aa-hIu"/>
</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="Ark-FV-V8x">
<rect key="frame" x="15" y="15" width="294" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="yGb-1t-4dN"/>
</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="UYa-Xw-0sN">
<rect key="frame" x="15" y="62" width="29" height="14"/>
<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="GvN-N9-kDZ">
<rect key="frame" x="15" y="101.5" width="53.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vXg-sy-RjA">
<rect key="frame" x="0.0" y="138" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="L7s-cV-Dar"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="sMh-bS-LI1">
<rect key="frame" x="295" y="93.5" width="65" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="65" id="N7e-sM-yAu"/>
<constraint firstAttribute="height" constant="32" id="QBe-G5-Kd7"/>
</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="mQz-Ik-H6K">
<rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="LOK-21-C2q"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="GvN-N9-kDZ" secondAttribute="bottom" constant="21.5" id="73Q-wk-haZ"/>
<constraint firstItem="mQz-Ik-H6K" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="Dym-Zl-gpc"/>
<constraint firstItem="GvN-N9-kDZ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="HwP-XF-JgT"/>
<constraint firstItem="vXg-sy-RjA" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="KB1-Rc-w8q"/>
<constraint firstAttribute="bottom" secondItem="vXg-sy-RjA" secondAttribute="bottom" id="NYX-uF-E53"/>
<constraint firstAttribute="trailing" secondItem="sMh-bS-LI1" secondAttribute="trailing" constant="15" id="Trx-Qu-Qiu"/>
<constraint firstAttribute="trailing" secondItem="Bir-MR-Brg" secondAttribute="trailing" id="Vxd-ed-q0Q"/>
<constraint firstItem="UYa-Xw-0sN" firstAttribute="top" secondItem="Ark-FV-V8x" secondAttribute="bottom" constant="10" id="Yfh-f1-pnI"/>
<constraint firstItem="Ark-FV-V8x" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="bSV-vD-wc3"/>
<constraint firstAttribute="trailing" secondItem="vXg-sy-RjA" secondAttribute="trailing" id="eNk-DM-Oj9"/>
<constraint firstItem="mQz-Ik-H6K" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="ejQ-Fx-G7Z"/>
<constraint firstAttribute="trailing" secondItem="mQz-Ik-H6K" secondAttribute="trailing" id="eoe-HU-PiE"/>
<constraint firstItem="Ark-FV-V8x" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="hKS-K6-Von"/>
<constraint firstItem="UYa-Xw-0sN" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="kLR-G4-fOD"/>
<constraint firstItem="sMh-bS-LI1" firstAttribute="centerY" secondItem="GvN-N9-kDZ" secondAttribute="centerY" id="nOC-bQ-dqW"/>
<constraint firstItem="Bir-MR-Brg" firstAttribute="leading" secondItem="Ark-FV-V8x" secondAttribute="trailing" constant="10" id="p46-pZ-liZ"/>
<constraint firstItem="Bir-MR-Brg" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="wuf-jS-npF"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="ckCountTf" destination="sMh-bS-LI1" id="dQg-rb-Jfx"/>
<outlet property="detailLbl" destination="UYa-Xw-0sN" id="J3u-y2-x2V"/>
<outlet property="nameLbl" destination="Ark-FV-V8x" id="mhd-hR-LZG"/>
</connections>
<point key="canvasLocation" x="131.15942028985509" y="132.92410714285714"/>
</tableViewCell>
</objects>
<resources>
<namedColor name="#F57575">
<color red="0.96100002527236938" green="0.45899999141693115" blue="0.45899999141693115" 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.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.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
//
// NewCKVc.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/3.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNonGmCellDelegate,CKGmCellDelegate, PiCiXuanZeViewControllerDelegate{
func PiCiXuanZeViewControllerPiCiSelect(data: Array<GetGoodBatchDataModel>, p_id: Int) {
}
//MARK: - 普通流程
func CKNonGmCellDelAction(cell: CKNonGmCell) {
//删除
}
func CKNonGmCellInputCount(sender: String, cell: CKNonGmCell) {
//输入数据
}
//MARK: - 权限操作
func CKGmCellDelAction(cell: CKGmCell) {
//删除
}
var piCiArr:Array<Array<GetGoodBatchDataModel>>? = []
func CKGmCellSelectAction(cell: CKGmCell) {
//跳转选择批次
// let data = outGoodsModels![cell.tag]
let vc = PiCiXuanZeViewController()
// vc.sku_id = sku_id
vc.delegate = self
vc.tag = cell.tag
let arr = piCiArr![cell.tag]
vc.recordArr = arr
self.navigationController?.pushViewController(vc, animated: true)
}
let titleArr = ["出库类型:","出库时间:"]
var holderArr = ["请选择出库类型","时间"]
var dataArr:Array<Any>? = []
var isGm = true
@IBAction func submitAction(_ sender: Any) {
if isGm {//直接出库
}else{//提交申请
}
}
@IBOutlet weak var btmLbl: UILabel!
@IBOutlet weak var listView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "出库"
self.view.addSubview(navbar)
SetTopFrameView(view: listView, btmView: btmLbl)
listView.separatorStyle = .none
listView.register(UINib(nibName: "CKNonGmCell", bundle: nil), forCellReuseIdentifier: "CKNonGmCell")
listView.register(UINib(nibName: "CRKBtnCell", bundle: nil), forCellReuseIdentifier: "CRKBtnCell")
listView.register(UINib(nibName: "CKGmCell", bundle: nil), forCellReuseIdentifier: "CKGmCell")
// Do any additional setup after loading the view.
}
//添加商品
@objc func addProduct(){
dataArr?.append("1")
listView.reloadData()
}
//MARK: - cell delegate
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 1 {
if isGm {
let cell = tableView.dequeueReusableCell(withIdentifier: "CKGmCell") as! CKGmCell
cell.tag = indexPath.row
cell.delegate = self
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "CKNonGmCell") as! CKNonGmCell
cell.tag = indexPath.row
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
cell.nameLeft.constant = 0
if indexPath.row == 1 {
setCellUI(cell: cell)
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
return 49
}
if isGm {
let arr = piCiArr![indexPath.row]
return CGFloat(125 + arr.count * 30)
}
return 139
}
func setCellUI(cell:CRKBtnCell){
cell.contentLbl.textColor = UIColor(named: "标题字颜色")
cell.arrowImg.isHidden = true
cell.contentRight.constant = -7
}
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 2
}
return dataArr!.count
}
}
<?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" customClass="NewCKVc" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="btmLbl" destination="GKS-4B-MyY" id="X7n-F5-1a4"/>
<outlet property="listView" destination="Myt-AK-Ady" id="UCq-v8-4KC"/>
<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="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yfg-Ft-JzP" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
<color key="value" name="按钮渐变色上"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
<color key="value" name="按钮渐变色下,字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="submitAction:" destination="-1" eventType="touchUpInside" id="gNf-Bx-aLw"/>
</connections>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GKS-4B-MyY">
<rect key="frame" x="0.0" y="813" width="414" height="49"/>
<constraints>
<constraint firstAttribute="height" constant="49" id="Xrl-yf-7u9"/>
</constraints>
<attributedString key="attributedText">
<fragment content="提交申请">
<attributes>
<color key="NSColor" name="白色背景色"/>
<font key="NSFont" size="17" name="PingFangSC-Medium"/>
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
<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="Myt-AK-Ady">
<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="dQi-xw-tCS"/>
<outlet property="delegate" destination="-1" id="DZf-hu-aOI"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="yfg-Ft-JzP" secondAttribute="bottom" id="3Rw-4z-1xg"/>
<constraint firstItem="yfg-Ft-JzP" firstAttribute="top" secondItem="Myt-AK-Ady" secondAttribute="bottom" id="5ea-VU-PCh"/>
<constraint firstItem="Myt-AK-Ady" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="8Nd-zZ-e6Y"/>
<constraint firstAttribute="trailing" secondItem="yfg-Ft-JzP" secondAttribute="trailing" id="FFL-8x-j2C"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="GKS-4B-MyY" secondAttribute="bottom" id="P1B-m5-LJq"/>
<constraint firstItem="Myt-AK-Ady" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="YpP-Yr-9qc"/>
<constraint firstItem="yfg-Ft-JzP" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="ba8-mE-xDO"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="GKS-4B-MyY" secondAttribute="trailing" id="bwq-Hv-TBP"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Myt-AK-Ady" secondAttribute="trailing" id="iVq-AJ-4wY"/>
<constraint firstItem="GKS-4B-MyY" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="oey-x7-Tpm"/>
<constraint firstItem="yfg-Ft-JzP" firstAttribute="top" secondItem="GKS-4B-MyY" secondAttribute="top" id="tvf-1M-dMb"/>
</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.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" 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>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -39,13 +39,20 @@
<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">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" 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="标题字颜色"/>
<attributedString key="attributedText">
<fragment content="标题">
<attributes>
<color key="NSColor" name="标题字颜色"/>
<font key="NSFont" size="13" name="PingFangSC-Medium"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<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">
......@@ -389,6 +396,9 @@
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" 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>
......
......@@ -7,11 +7,17 @@
//
import UIKit
import LGButton
class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, NewOnlyRKCellDelegate{
@IBAction func gmAction(_ sender: Any) {
}
@IBOutlet weak var lgBtnTitLbl: UILabel!
@IBOutlet weak var lgBtn: LGButton!
var isGm = false
let titleArr = ["仓库:","库位:","入库类型:","入库时间:"]
var holderArr = ["默认仓库","默认库位","请选择入库类型","时间"]
var dataArr:Array<Any>? = []
......@@ -19,13 +25,17 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
@IBOutlet weak var listView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
lgBtn.isHidden = !isGm
lgBtnTitLbl.isHidden = !isGm
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: "CRKBtnCell", bundle: nil), forCellReuseIdentifier: "CRKBtnCell")
listView.register(UINib(nibName: "NewOnlyRKCell", bundle: nil), forCellReuseIdentifier: "NewOnlyRKCell")
// Do any additional setup after loading the view.
}
......@@ -41,7 +51,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
//MARK: - cellForRow
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 1{
let cell = tableView.dequeueReusableCell(withIdentifier: "NewOnlyRKCell") as! NewOnlyRKCell
let cell = tableView.dequeueReusableCell(withIdentifier: "NewOnlyRKCell") as! NewOnlyRKCell
cell.delegate = self
return cell
}
......@@ -51,6 +61,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
cell.nameLbl.text = titleArr[indexPath.row]
cell.contentLbl.text = holderArr[indexPath.row]
cell.mustLbl.isHidden = true
cell.nameLeft.constant = 0
cell.mustWidth.constant = 0
if indexPath.row == 3 {
setCellUI(cell: cell)
......@@ -60,24 +71,24 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
//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-入库价格
}
// 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(){
......@@ -95,7 +106,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
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 {
......
......@@ -12,6 +12,8 @@
<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="lgBtn" destination="7Zg-yA-Y0g" id="A4J-Mr-QLa"/>
<outlet property="lgBtnTitLbl" destination="OXL-LJ-d3p" id="65d-Rq-EEQ"/>
<outlet property="listView" destination="XJ1-MD-tGD" id="482-x4-9hR"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
......@@ -80,19 +82,51 @@
<outlet property="delegate" destination="-1" id="qQp-u4-XGg"/>
</connections>
</tableView>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Zg-yA-Y0g" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
<color key="value" name="按钮渐变色上"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
<color key="value" name="按钮渐变色下,字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="gmAction:" destination="-1" eventType="touchUpInside" id="G4f-wv-AcH"/>
</connections>
</view>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="直接入库" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OXL-LJ-d3p">
<rect key="frame" x="0.0" y="813" width="414" height="49"/>
<constraints>
<constraint firstAttribute="height" constant="49" id="tvW-rk-iXN"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="白色背景色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="7Zg-yA-Y0g" firstAttribute="top" secondItem="OXL-LJ-d3p" secondAttribute="top" id="09o-Hf-lj3"/>
<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="7Zg-yA-Y0g" secondAttribute="bottom" id="BlX-bD-Kkl"/>
<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="fnl-2z-Ty3" firstAttribute="trailing" secondItem="OXL-LJ-d3p" secondAttribute="trailing" id="IV6-wI-ymn"/>
<constraint firstItem="laH-6h-Yuu" firstAttribute="top" secondItem="OXL-LJ-d3p" secondAttribute="top" id="OY1-0P-6C6"/>
<constraint firstItem="XJ1-MD-tGD" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="W1K-t6-EvY"/>
<constraint firstAttribute="trailing" secondItem="7Zg-yA-Y0g" secondAttribute="trailing" id="dhn-xO-C0U"/>
<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="7Zg-yA-Y0g" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="qYt-NJ-nTa"/>
<constraint firstItem="laH-6h-Yuu" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="rfR-K6-okN"/>
<constraint firstItem="OXL-LJ-d3p" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="sy5-vh-IYH"/>
<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"/>
......@@ -100,9 +134,18 @@
</view>
</objects>
<resources>
<namedColor name="按钮渐变色上">
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" 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>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" 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>
......
<?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" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......
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