Commit 538d5d51 authored by 刘俊宏's avatar 刘俊宏

完成工作中心选择时间UI

parent ed333573
......@@ -323,6 +323,8 @@
F969BF08244EC38000C79953 /* GoodsCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F969BF06244EC38000C79953 /* GoodsCollectionViewCell.xib */; };
F969BF1E244EE67900C79953 /* GoodsManageListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F969BF1C244EE67900C79953 /* GoodsManageListVC.swift */; };
F969BF1F244EE67900C79953 /* GoodsManageListVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = F969BF1D244EE67900C79953 /* GoodsManageListVC.xib */; };
F9956B1C2463D941001A617D /* WorkSelectTimeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9956B1B2463D941001A617D /* WorkSelectTimeView.xib */; };
F9956B1E2463D94E001A617D /* WorkSelectTimeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9956B1D2463D94E001A617D /* WorkSelectTimeView.swift */; };
F9DDBE922457BFEC00A32CB2 /* HUDEXT.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9DDBE912457BFEC00A32CB2 /* HUDEXT.swift */; };
F9DDBE962457D3EC00A32CB2 /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9DDBE942457D3EC00A32CB2 /* WebViewController.swift */; };
F9DDBE972457D3EC00A32CB2 /* WebViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9DDBE952457D3EC00A32CB2 /* WebViewController.xib */; };
......@@ -696,6 +698,8 @@
F969BF06244EC38000C79953 /* GoodsCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GoodsCollectionViewCell.xib; sourceTree = "<group>"; };
F969BF1C244EE67900C79953 /* GoodsManageListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsManageListVC.swift; sourceTree = "<group>"; };
F969BF1D244EE67900C79953 /* GoodsManageListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GoodsManageListVC.xib; sourceTree = "<group>"; };
F9956B1B2463D941001A617D /* WorkSelectTimeView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WorkSelectTimeView.xib; sourceTree = "<group>"; };
F9956B1D2463D94E001A617D /* WorkSelectTimeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkSelectTimeView.swift; sourceTree = "<group>"; };
F9DDBE912457BFEC00A32CB2 /* HUDEXT.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HUDEXT.swift; sourceTree = "<group>"; };
F9DDBE942457D3EC00A32CB2 /* WebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewController.swift; sourceTree = "<group>"; };
F9DDBE952457D3EC00A32CB2 /* WebViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WebViewController.xib; sourceTree = "<group>"; };
......@@ -1558,6 +1562,8 @@
children = (
F950FDE724518CD800C40530 /* TimeSelectView.swift */,
F950FDE92451920200C40530 /* DIYCalendarCell.swift */,
F9956B1B2463D941001A617D /* WorkSelectTimeView.xib */,
F9956B1D2463D94E001A617D /* WorkSelectTimeView.swift */,
);
path = TimeSelectView;
sourceTree = "<group>";
......@@ -1856,6 +1862,7 @@
E0A2E82824555B4400D6DB34 /* KuCunShangPinCell.xib in Resources */,
E042F73D245288F800CDFA12 /* WenDuCell.xib in Resources */,
E02DDD92244FE55400ABB707 /* NewCreateHeader.xib in Resources */,
F9956B1C2463D941001A617D /* WorkSelectTimeView.xib in Resources */,
E09B03B72445B85A00211A51 /* LoginViewController.xib in Resources */,
E09F4C9E2452BEBB00BE033D /* JiPaiFangShiViewController.xib in Resources */,
E09B03C12445B96500211A51 /* FgPassViewController.xib in Resources */,
......@@ -2190,6 +2197,7 @@
E0516F772448003D00E373CE /* PayViewController.swift in Sources */,
E02DDD952450106C00ABB707 /* PuTongJieTiCell.swift in Sources */,
E0BE8A8B245A7D3300E80134 /* BtmBtnCell.swift in Sources */,
F9956B1E2463D94E001A617D /* WorkSelectTimeView.swift in Sources */,
F950FDE024518B9500C40530 /* FSCalendarExtensions.m in Sources */,
E09B03A32445AF9500211A51 /* NetworkRequest.swift in Sources */,
E0D46C5624503EC50087B564 /* TitleAndSelectCell.swift in Sources */,
......
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.400",
"alpha" : "1.000",
"blue" : "0.400",
"green" : "0.400"
"blue" : "0x66",
"green" : "0x66",
"red" : "0x66"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
]
}
{
"images" : [
{
"filename" : "workTimeDel.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "workTimeDel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "workTimeDel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
//
// WorkSelectTimeView.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/5/7.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
protocol WorkSelectTimeViewDelegate {
func selectWorkIndx(sender:Int)
}
class WorkSelectTimeView: UIView ,TimeSelectViewDelgate{
var delegate:WorkSelectTimeViewDelegate?
var contentView:UIView!
@IBAction func tapBlackAction(_ sender: UITapGestureRecognizer) {
if selectIndex != 1004 {
timeView.removeFromSuperview()
wContentHeight.constant = 73
}
self.delegate?.selectWorkIndx(sender: selectIndex)
self.removeFromSuperview()
}
@IBOutlet weak var wContentView: UIView!
@IBOutlet weak var wContentHeight: NSLayoutConstraint!
@IBOutlet weak var fBtn: UIButton!
@IBOutlet weak var sBtn: UIButton!
@IBOutlet weak var tbtn: UIButton!
@IBOutlet weak var lBtn: UIButton!
var selectIndex = 0 {
didSet {
fBtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
fBtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
sBtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
sBtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
tbtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
tbtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
lBtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
lBtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
if selectIndex == 1001 {
fBtn.setTitleColor(UIColor.init(named: "白色背景色"), for: .normal)
fBtn.backgroundColor = UIColor.init(named: "蓝色字体颜色")
}else if selectIndex == 1002 {
sBtn.setTitleColor(UIColor.init(named: "白色背景色"), for: .normal)
sBtn.backgroundColor = UIColor.init(named: "蓝色字体颜色")
}else if selectIndex == 1003 {
tbtn.setTitleColor(UIColor.init(named: "白色背景色"), for: .normal)
tbtn.backgroundColor = UIColor.init(named: "蓝色字体颜色")
}else if selectIndex == 1004 {
lBtn.setTitleColor(UIColor.init(named: "白色背景色"), for: .normal)
lBtn.backgroundColor = UIColor.init(named: "蓝色字体颜色")
}
}
}
@IBAction func btnAction(_ sender: UIButton) {
fBtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
fBtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
sBtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
sBtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
tbtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
tbtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
lBtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
lBtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
sender.setTitleColor(UIColor.init(named: "白色背景色"), for: .normal)
sender.backgroundColor = UIColor.init(named: "蓝色字体颜色")
timeView.removeFromSuperview()
if sender.tag == 1004 {
wContentHeight.constant = 73 + 300*glscale
wContentView.addSubview(timeView)
timeView.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(lBtn.snp_bottom).offset(20*glscale)
}
addTimeView()
}else{
wContentHeight.constant = 73
//还需要传文字出去
self.delegate?.selectWorkIndx(sender: sender.tag)
self.removeFromSuperview()
}
}
let timeView = UIView()
func addTimeView() {
let line = UIView()
line.backgroundColor = UIColor.init(named: "灰色分界线")
timeView.addSubview(line)
line.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.right.equalTo(-15*glscale)
make.top.equalToSuperview()
make.height.equalTo(1)
}
let calendarV = TimeSelectView(frame: CGRect(x: 0, y: 1, width: fullScreenWidth, height: 235*glscale))
calendarV.moreSelection = true
timeView.addSubview(calendarV)
calendarV.delegate = self
let line2 = UIView()
line2.backgroundColor = UIColor.init(named: "灰色分界线")
timeView.addSubview(line2)
line2.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.right.equalTo(-15*glscale)
make.top.equalTo(calendarV.snp_bottom)
make.height.equalTo(1)
}
let sureBtn = UIButton(type: .custom)
sureBtn.setTitleColor(UIColor.init(named: "白色背景色"), for: .normal)
sureBtn.titleLabel?.font = UIFont.systemFont(ofSize: 13)
sureBtn.backgroundColor = UIColor.init(named: "蓝色字体颜色")
sureBtn.setTitle("确定", for: .normal)
sureBtn.layer.cornerRadius = 3
sureBtn.addTarget(self, action: #selector(sureBtnAction(sender:)), for: .touchUpInside)
timeView.addSubview(sureBtn)
sureBtn.snp.makeConstraints { (make) in
make.right.bottom.equalTo(-15*glscale)
make.width.equalTo(70*glscale)
make.height.equalTo(30*glscale)
}
let kuangV = UIView()
kuangV.layer.borderColor = UIColor.init(named: "灰色字体颜色")?.cgColor
kuangV.layer.borderWidth = 1
kuangV.layer.cornerRadius = 3
timeView.addSubview(kuangV)
kuangV.snp.makeConstraints { (make) in
make.height.equalTo(sureBtn)
make.right.equalTo(sureBtn.snp_left).offset(-15*glscale)
make.width.equalTo(180*glscale)
make.centerY.equalTo(sureBtn)
}
let clearBtn = UIButton(type: .custom)
clearBtn.setImage(UIImage.init(named: "workTimeDel"), for: .normal)
clearBtn.addTarget(self, action: #selector(clearBtnAction(sender:)), for: .touchUpInside)
timeView.addSubview(clearBtn)
clearBtn.snp.makeConstraints { (make) in
make.right.equalTo(kuangV.snp_right).offset(-7*glscale)
make.centerY.equalTo(sureBtn)
}
let timeLbl = UILabel()
timeLbl.text = "2020.4.15-2020.4.23"
timeLbl.font = UIFont.systemFont(ofSize: 13)
timeLbl.textColor = UIColor.init(named: "蓝色字体颜色")
timeView.addSubview(timeLbl)
timeLbl.snp.makeConstraints { (make) in
make.centerY.equalTo(kuangV)
make.left.equalTo(kuangV.snp_left).offset(10*glscale)
}
}
func selectMoreDate(beginDate: Date, endginDate: Date) {
print("选择日期·····")
}
@objc func clearBtnAction(sender:UIButton){
print("清除日期·····")
}
@objc func sureBtnAction(sender:UIButton){
//还要传日期文本出去
self.delegate?.selectWorkIndx(sender: 1004)
self.removeFromSuperview()
}
//初始化时将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
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="Named colors" 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="WorkSelectTimeView" customModule="GeliBusinessPlatform" customModuleProvider="target">
<connections>
<outlet property="fBtn" destination="dQT-gl-rh7" id="giD-mj-Qaw"/>
<outlet property="lBtn" destination="sEd-Ix-rtO" id="ING-79-wTh"/>
<outlet property="sBtn" destination="g1a-gU-FJq" id="O5L-oY-a3k"/>
<outlet property="tbtn" destination="lth-JM-jPE" id="taN-a7-f9O"/>
<outlet property="wContentHeight" destination="xiS-wt-3sG" id="mst-PJ-1lo"/>
<outlet property="wContentView" destination="rJ9-UL-KOL" id="fX5-83-qHm"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clipsSubviews="YES" contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zuU-ML-ZQb">
<rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
<color key="backgroundColor" name="提示视图背景色"/>
<gestureRecognizers/>
<connections>
<outletCollection property="gestureRecognizers" destination="pkp-di-c5W" appends="YES" id="K2I-Po-meg"/>
</connections>
</view>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rJ9-UL-KOL">
<rect key="frame" x="0.0" y="-5" width="375" height="73"/>
<subviews>
<button opaque="NO" tag="1001" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dQT-gl-rh7">
<rect key="frame" x="15" y="20" width="60" height="30"/>
<color key="backgroundColor" name="多选按钮背景颜色"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="NTV-ET-fJE">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstAttribute="width" constant="60" id="nRs-Lj-8VY">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/>
<state key="normal" title="本日">
<color key="titleColor" name="多选按钮字体颜色"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="btnAction:" destination="-1" eventType="touchUpInside" id="qMw-gd-wQp"/>
</connections>
</button>
<button opaque="NO" tag="1002" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g1a-gU-FJq">
<rect key="frame" x="95" y="20" width="60" height="30"/>
<color key="backgroundColor" name="多选按钮背景颜色"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="Zeu-fj-lcC">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstAttribute="height" constant="30" id="qcA-jN-5fB">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/>
<state key="normal" title="本周">
<color key="titleColor" name="多选按钮字体颜色"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="btnAction:" destination="-1" eventType="touchUpInside" id="XAk-jM-DDa"/>
</connections>
</button>
<button opaque="NO" tag="1003" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lth-JM-jPE">
<rect key="frame" x="175" y="20" width="60" height="30"/>
<color key="backgroundColor" name="多选按钮背景颜色"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="2Yw-e0-p1f">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstAttribute="height" constant="30" id="mqh-Mv-fNI">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/>
<state key="normal" title="本月">
<color key="titleColor" name="多选按钮字体颜色"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="btnAction:" destination="-1" eventType="touchUpInside" id="XgD-KH-Fnm"/>
</connections>
</button>
<button opaque="NO" tag="1004" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sEd-Ix-rtO">
<rect key="frame" x="255" y="20" width="100" height="30"/>
<color key="backgroundColor" name="多选按钮背景颜色"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="NpP-sN-hsc">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/>
<state key="normal" title="自定义时间">
<color key="titleColor" name="多选按钮字体颜色"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="btnAction:" destination="-1" eventType="touchUpInside" id="5qL-Gy-yga"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="sEd-Ix-rtO" firstAttribute="leading" secondItem="lth-JM-jPE" secondAttribute="trailing" constant="20" id="8lP-QO-lcu"/>
<constraint firstItem="lth-JM-jPE" firstAttribute="leading" secondItem="g1a-gU-FJq" secondAttribute="trailing" constant="20" id="GNw-wR-SPs"/>
<constraint firstItem="sEd-Ix-rtO" firstAttribute="top" secondItem="rJ9-UL-KOL" secondAttribute="top" constant="20" id="LdA-n5-Jg0"/>
<constraint firstItem="lth-JM-jPE" firstAttribute="top" secondItem="rJ9-UL-KOL" secondAttribute="top" constant="20" id="Oyv-dL-4pr"/>
<constraint firstItem="dQT-gl-rh7" firstAttribute="top" secondItem="rJ9-UL-KOL" secondAttribute="top" constant="20" id="Pjq-kB-z91"/>
<constraint firstAttribute="trailing" secondItem="sEd-Ix-rtO" secondAttribute="trailing" constant="20" id="WuU-fC-jFM"/>
<constraint firstItem="g1a-gU-FJq" firstAttribute="top" secondItem="rJ9-UL-KOL" secondAttribute="top" constant="20" id="drK-6Z-Gzl"/>
<constraint firstItem="dQT-gl-rh7" firstAttribute="leading" secondItem="rJ9-UL-KOL" secondAttribute="leading" constant="15" id="nEt-8U-HIk"/>
<constraint firstAttribute="height" constant="73" id="xiS-wt-3sG"/>
<constraint firstItem="g1a-gU-FJq" firstAttribute="leading" secondItem="dQT-gl-rh7" secondAttribute="trailing" constant="20" id="zw1-qW-Kk1"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="zuU-ML-ZQb" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Aky-FB-9Bp"/>
<constraint firstItem="zuU-ML-ZQb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Ufn-Zs-7od"/>
<constraint firstItem="rJ9-UL-KOL" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="k2m-KQ-E9w"/>
<constraint firstAttribute="trailing" secondItem="rJ9-UL-KOL" secondAttribute="trailing" id="ndh-ou-iRN"/>
<constraint firstItem="rJ9-UL-KOL" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="-5" id="qtU-7h-ACa"/>
<constraint firstAttribute="trailing" secondItem="zuU-ML-ZQb" secondAttribute="trailing" id="tpL-k4-fju"/>
<constraint firstAttribute="bottom" secondItem="zuU-ML-ZQb" secondAttribute="bottom" id="vBZ-7H-XGu"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="-58" y="-56"/>
</view>
<tapGestureRecognizer id="pkp-di-c5W">
<connections>
<action selector="tapBlackAction:" destination="-1" id="S45-gU-G0c"/>
<outlet property="delegate" destination="-1" id="Sgp-Xw-Opd"/>
</connections>
</tapGestureRecognizer>
</objects>
<resources>
<namedColor name="多选按钮字体颜色">
<color red="0.41200000047683716" green="0.41200000047683716" blue="0.41200000047683716" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="多选按钮背景颜色">
<color red="0.83899998664855957" green="0.875" blue="0.9179999828338623" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="提示视图背景色">
<color red="0.1803921568627451" green="0.1803921568627451" blue="0.1803921568627451" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -23,7 +23,7 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
let UserToken = UserDefaults.standard.value(forKey: "user_token")
adminInfo(["user_token":UserToken as Any], success: { (data) in
self.dataModel = (data as! AdminInfoModel)
self.iconImg.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.shop_img)!))
// self.iconImg.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.shop_img)!))
self.shopNameLbl.text = self.dataModel?.data?.stall_name
self.nameLbl.text = self.dataModel?.data?.admin_name
}) { (error) in
......
......@@ -369,7 +369,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
let rowModel = self.items[indexPath.row]
cell.goodsName.text = rowModel.goods_name
cell.priceLbl.text = "¥" + rowModel.price!
cell.goodsImgV.kf.setImage(with: URL.init(string:SERVERCE_HOST + rowModel.goods_thumb!)!, placeholder: nil, options: nil, progressBlock: nil, completionHandler: nil)
// cell.goodsImgV.kf.setImage(with: URL.init(string:SERVERCE_HOST + rowModel.goods_thumb!)!, placeholder: nil, options: nil, progressBlock: nil, completionHandler: nil)
if rowModel.is_show == 0 {
cell.leftBtn.setTitle("下架", for: .normal)
......
......@@ -28,7 +28,7 @@ class ShopInfoViewController: BaseViewController {
shopInfo(["user_token":UserToken as Any], success: { (data) in
self.dataModel = (data as! ShopInfoModel)
self.shopImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.shop_img)!))
// self.shopImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.shop_img)!))
self.shopNameLbl.text = self.dataModel?.data?.shop_name
self.compAddressLbl.text = self.dataModel?.data?.addr_str
self.addressDetLbl.text = self.dataModel?.data?.address
......@@ -43,7 +43,7 @@ class ShopInfoViewController: BaseViewController {
self.emailLbl.text = self.dataModel?.data?.shop_email
self.businessNumLbl.text = self.dataModel?.data?.business_licence_number
self.businessSphereLbl.text = self.dataModel?.data?.business_sphere
self.idCardImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.identity_card_front)!))
// self.idCardImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.identity_card_front)!))
}) { (error) in
//缺省数据,隐藏滚动视图,展示错误视图
......@@ -51,12 +51,12 @@ class ShopInfoViewController: BaseViewController {
}
@IBAction func previousAction(_ sender: UIButton) {
self.idCardImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.identity_card_front)!))
// self.idCardImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.identity_card_front)!))
rightChangeImgBtn.setImage(UIImage.init(named: "idCard2"), for: .normal)
leftChangeImgBtn.setImage(UIImage.init(named: "idCard1"), for: .normal)
}
@IBAction func nextAction(_ sender: UIButton) {
self.idCardImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.identity_card_back)!))
// self.idCardImgV.kf.setImage(with: URL(string: SERVERCE_HOST + (self.dataModel?.data?.identity_card_back)!))
rightChangeImgBtn.setImage(UIImage.init(named: "idCard4"), for: .normal)
leftChangeImgBtn.setImage(UIImage.init(named: "idCard3"), for: .normal)
}
......
......@@ -8,7 +8,7 @@
import UIKit
class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewDataSource {
class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewDataSource ,WorkSelectTimeViewDelegate{
@IBOutlet weak var topNavBtn: UIButton!
@IBOutlet weak var contentView: UIView!
......@@ -16,10 +16,36 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
super.viewDidLoad()
setTabv()
}
//MARK:--二维码方法
@IBAction func codeAction(_ sender: UIButton) {
print("二维码方法")
}
//MARK:--头部按钮方法
let selectV = WorkSelectTimeView()
var selelctIndex = 1001
@IBAction func topNavBtnAction(_ sender: UIButton) {
sender.isSelected = !sender.isSelected
if sender.isSelected {
selectV.delegate = self
selectV.selectIndex = selelctIndex
self.view.window?.addSubview(selectV)
selectV.snp.makeConstraints { (make) in
make.top.equalTo(contentView)
make.left.right.bottom.equalToSuperview()
}
topNavBtn.setImage(UIImage.init(named: "workzhankai"), for: .normal)
}else{
selectV.removeFromSuperview()
topNavBtn.setImage(UIImage.init(named: "workxiala"), for: .normal)
}
}
//MARK:--时间选择视图反馈
func selectWorkIndx(sender: Int) {
selelctIndex = sender;
topNavBtn.setImage(UIImage.init(named: "workxiala"), for: .normal)
topNavBtn.isSelected = false
}
//MARK:--列表视图
var tableV :UITableView!
func setTabv() {
......
......@@ -36,6 +36,9 @@
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YIb-m5-MdC">
<rect key="frame" x="343" y="11" width="17" height="22"/>
<state key="normal" image="workerweima"/>
<connections>
<action selector="codeAction:" destination="-1" eventType="touchUpInside" id="q4J-lo-HKl"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ljz-8E-4Zf">
<rect key="frame" x="0.0" y="44" width="375" height="623"/>
......
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