Commit b41a68f4 authored by lujunye's avatar lujunye

asdsafdsafd332

parent 241bdb3f
......@@ -320,6 +320,8 @@
E0A7548B244A8F0F00A84B67 /* CheckWareHourseViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0A75489244A8F0F00A84B67 /* CheckWareHourseViewController.xib */; };
E0A804B325B81A000082F56B /* printOrderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0A804B225B81A000082F56B /* printOrderModel.swift */; };
E0A804BB25B81B790082F56B /* printOrderInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0A804BA25B81B790082F56B /* printOrderInterface.swift */; };
E0A930142603387A00287E4A /* OnlyTimeSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0A930132603387A00287E4A /* OnlyTimeSelectView.swift */; };
E0A930192603388500287E4A /* OnlyTimeSelectView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0A930182603388500287E4A /* OnlyTimeSelectView.xib */; };
E0AA3A87248F3C5E00CBFC27 /* StatisticsModel.swif.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0AA3A86248F3C5E00CBFC27 /* StatisticsModel.swif.swift */; };
E0AA3A89248F3E1400CBFC27 /* StatisticsInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0AA3A88248F3E1400CBFC27 /* StatisticsInterface.swift */; };
E0AA3A91248F626400CBFC27 /* XinCaiGouViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0AA3A8F248F626400CBFC27 /* XinCaiGouViewController.swift */; };
......@@ -1081,6 +1083,8 @@
E0A75489244A8F0F00A84B67 /* CheckWareHourseViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CheckWareHourseViewController.xib; sourceTree = "<group>"; };
E0A804B225B81A000082F56B /* printOrderModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = printOrderModel.swift; sourceTree = "<group>"; };
E0A804BA25B81B790082F56B /* printOrderInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = printOrderInterface.swift; sourceTree = "<group>"; };
E0A930132603387A00287E4A /* OnlyTimeSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnlyTimeSelectView.swift; sourceTree = "<group>"; };
E0A930182603388500287E4A /* OnlyTimeSelectView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OnlyTimeSelectView.xib; sourceTree = "<group>"; };
E0AA3A86248F3C5E00CBFC27 /* StatisticsModel.swif.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatisticsModel.swif.swift; sourceTree = "<group>"; };
E0AA3A88248F3E1400CBFC27 /* StatisticsInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatisticsInterface.swift; sourceTree = "<group>"; };
E0AA3A8F248F626400CBFC27 /* XinCaiGouViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XinCaiGouViewController.swift; sourceTree = "<group>"; };
......@@ -2887,6 +2891,8 @@
E01613DC2601B47700E55497 /* Location_Cell.xib */,
E01614042601E78B00E55497 /* DZSH_Date_Cell.swift */,
E01614052601E78B00E55497 /* DZSH_Date_Cell.xib */,
E0A930132603387A00287E4A /* OnlyTimeSelectView.swift */,
E0A930182603388500287E4A /* OnlyTimeSelectView.xib */,
);
path = "店长审核";
sourceTree = "<group>";
......@@ -3977,6 +3983,7 @@
E0402603259C186800EDF182 /* KHXQ_Cell.xib in Resources */,
F971D7B3248B6432007F1619 /* address_new.json in Resources */,
E00D85E8244561FE00F5F816 /* Preview Assets.xcassets in Resources */,
E0A930192603388500287E4A /* OnlyTimeSelectView.xib in Resources */,
E0D11BD625C12C540066DB21 /* img_title_cell.xib in Resources */,
E02DDD962450106C00ABB707 /* PuTongJieTiCell.xib in Resources */,
E0BE8A88245A7A1500E80134 /* JiBenXinXiCell.xib in Resources */,
......@@ -4442,6 +4449,7 @@
E0BE8AA4245AA31400E80134 /* YingFuZhangKuanXQViewController.swift in Sources */,
F94A315324626D7800FEC38E /* WorkCViewController.swift in Sources */,
F9531F3A2465108800724BEE /* JXPhotoBrowserNoneAnimator.swift in Sources */,
E0A930142603387A00287E4A /* OnlyTimeSelectView.swift in Sources */,
E07B1E62245921A60055BA3C /* KeHuXQCell.swift in Sources */,
E0CC847C24823087009B1FE9 /* GetGoodBatchModel.swift in Sources */,
F9FA9C5A255B8772004034B3 /* RetailManageFooterView.swift in Sources */,
......
......@@ -13,6 +13,7 @@ protocol DZSH_Date_Cell_Delegate {
class DZSH_Date_Cell: UITableViewCell {
var delegate:DZSH_Date_Cell_Delegate?
@IBAction func select_Action(_ sender: UIButton) {
sender.titleLabel?.text = timeLbl.text
delegate?.DZSH_Date_Cell_SelectAction(sender: sender, cell: self)
}
......
......@@ -85,8 +85,8 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l45-ay-mKC">
<rect key="frame" x="247.5" y="43" width="110" height="37"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="9:00~18:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vCZ-bO-MXw">
<rect key="frame" x="22.5" y="9.5" width="65.5" height="18.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="09:00~18:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vCZ-bO-MXw">
<rect key="frame" x="18.5" y="9.5" width="73.5" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
......
//
// OnlyTimeSelectView.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/3/18.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
import LGButton
protocol OnlyTimeSelectView_Delegate {
func OnlyTimeSelectView_submitAction(view:OnlyTimeSelectView,sh:Int,sm:Int,eh:Int,em:Int)
}
class OnlyTimeSelectView: UIView,UIPickerViewDelegate,UIPickerViewDataSource {
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 2
}
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
if component == 0 {
return hourArr.count
}
return minArr.count
}
//设置选择框各选项的内容,继承于UIPickerViewDelegate协议
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int,
forComponent component: Int) -> String? {
if component == 0 {
return hourArr[row]
}
return minArr[row]
}
var titleStr = "" {
didSet{
let arr = titleStr.components(separatedBy: "~")
let startArr = arr.first?.components(separatedBy: ":") as! Array<NSString>
start_hour = startArr.first!.integerValue
start_min = startArr.last!.integerValue
temp_s_h = start_hour
temp_s_m = start_min
let endArr = arr.last?.components(separatedBy: ":") as! Array<NSString>
end_hour = endArr.first!.integerValue
end_min = endArr.last!.integerValue
temp_e_h = end_hour
temp_e_m = end_min
lieft_pick.selectRow(start_hour, inComponent: 0, animated: false)
lieft_pick.selectRow(start_min, inComponent: 1, animated: false)
right_pick.selectRow(end_hour, inComponent: 0, animated: false)
right_pick.selectRow(end_min, inComponent: 1, animated: false)
}
}
var start_hour = 0
var start_min = 0
var end_hour = 0
var end_min = 0
var temp_s_h = 0
var temp_s_m = 0
var temp_e_h = 0
var temp_e_m = 0
//选中项改变事件(将在滑动停止后触发)
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int,
inComponent component: Int) {
if component == 0 {
if pickerView == lieft_pick {
start_hour = row
}else{
end_hour = row
}
}else{
if pickerView == lieft_pick {
start_min = row
}else{
end_min = row
}
}
}
//自定义UIPickerView
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
let genderLbl = UILabel()
genderLbl.textAlignment = .center
genderLbl.font = UIFont.systemFont(ofSize: 15)
genderLbl.textColor = UIColor.init(named: "标题字颜色")
if component == 0 {
genderLbl.text = hourArr[row]
}else{
genderLbl.text = minArr[row]
}
return genderLbl
}
var contentView:UIView!
@IBOutlet weak var lieft_pick: UIPickerView!
@IBOutlet weak var right_pick: UIPickerView!
var delegate:OnlyTimeSelectView_Delegate?
@IBAction func closet_action(_ sender: Any) {
delegate?.OnlyTimeSelectView_submitAction(view: self, sh: temp_s_h, sm: temp_s_m, eh: temp_e_h, em: temp_e_m)
}
@IBAction func submit_action(_ sender: Any) {
delegate?.OnlyTimeSelectView_submitAction(view: self, sh: start_hour, sm: start_min, eh: end_hour, em: end_min)
}
var hourArr:Array<String> = []
var minArr:Array<String> = []
func setUI(){
for i in 0 ..< 24 {
hourArr.append(StringByInt(number: i))
}
for i in 0 ..< 60 {
minArr.append(StringByInt(number: i))
}
}
//初始化时将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()
}
setUI()
}
// /初始化时将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()
}
setUI()
}
//加载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
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="TimeSelectV" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="btmBg" destination="SMg-XB-Jbv" id="eyz-Wv-uZY"/>
<outlet property="topBg" destination="ziE-D1-pPK" id="YUx-hb-Trs"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="414" height="200"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ziE-D1-pPK">
<rect key="frame" x="0.0" y="0.0" width="414" height="40"/>
<color key="backgroundColor" name="#EDF2F7"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="aW6-2f-bi4"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SMg-XB-Jbv">
<rect key="frame" x="0.0" y="160" width="414" height="40"/>
<color key="backgroundColor" name="#EDF2F7"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Hvq-JH-rsm"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ud5-OA-dRJ">
<rect key="frame" x="0.0" y="44" width="414" height="116"/>
<color key="backgroundColor" name="#EDF2F7"/>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="ud5-OA-dRJ" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="9bo-ta-LXy"/>
<constraint firstItem="ud5-OA-dRJ" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="IoL-T3-mlm"/>
<constraint firstItem="ziE-D1-pPK" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="MQy-nv-Fgx"/>
<constraint firstAttribute="trailing" secondItem="ziE-D1-pPK" secondAttribute="trailing" id="N53-Fb-PTP"/>
<constraint firstItem="SMg-XB-Jbv" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="Vmc-yy-eSc"/>
<constraint firstItem="ud5-OA-dRJ" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="X4j-gt-kws"/>
<constraint firstItem="SMg-XB-Jbv" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" id="a9G-jL-FZk"/>
<constraint firstItem="SMg-XB-Jbv" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="dh9-oS-qhs"/>
<constraint firstItem="ziE-D1-pPK" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="lad-ad-POq"/>
<constraint firstItem="SMg-XB-Jbv" firstAttribute="top" secondItem="ud5-OA-dRJ" secondAttribute="bottom" id="tzg-Ud-qvn"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="-197.10144927536234" y="99.776785714285708"/>
</view>
</objects>
<resources>
<namedColor name="#EDF2F7">
<color red="0.92900002002716064" green="0.94900000095367432" blue="0.96899998188018799" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment