Commit 0f143499 authored by lujunye's avatar lujunye

供应商管理

parent 14033b12
......@@ -85,6 +85,14 @@
E06524FA24581A7900CA22E2 /* ChuKuCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E06524F824581A7900CA22E2 /* ChuKuCell.xib */; };
E06524FD24581BD900CA22E2 /* PiCiXuanZeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E06524FB24581BD900CA22E2 /* PiCiXuanZeViewController.swift */; };
E06524FE24581BD900CA22E2 /* PiCiXuanZeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E06524FC24581BD900CA22E2 /* PiCiXuanZeViewController.xib */; };
E07B1E5E24591AA50055BA3C /* KeHuXQViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E07B1E5C24591AA50055BA3C /* KeHuXQViewController.swift */; };
E07B1E5F24591AA50055BA3C /* KeHuXQViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E07B1E5D24591AA50055BA3C /* KeHuXQViewController.xib */; };
E07B1E62245921A60055BA3C /* KeHuXQCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E07B1E60245921A60055BA3C /* KeHuXQCell.swift */; };
E07B1E63245921A60055BA3C /* KeHuXQCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E07B1E61245921A60055BA3C /* KeHuXQCell.xib */; };
E07B1E6B245926330055BA3C /* GYSGLCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E07B1E69245926330055BA3C /* GYSGLCell.swift */; };
E07B1E6C245926330055BA3C /* GYSGLCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E07B1E6A245926330055BA3C /* GYSGLCell.xib */; };
E07B1E6F245929060055BA3C /* GYSGLViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E07B1E6D245929060055BA3C /* GYSGLViewController.swift */; };
E07B1E70245929060055BA3C /* GYSGLViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E07B1E6E245929060055BA3C /* GYSGLViewController.xib */; };
E088CC8D24470BF0000DAA8A /* CodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E088CC8C24470BF0000DAA8A /* CodeView.swift */; };
E088CC932447124D000DAA8A /* BindViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E088CC912447124D000DAA8A /* BindViewController.swift */; };
E088CC942447124D000DAA8A /* BindViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E088CC922447124D000DAA8A /* BindViewController.xib */; };
......@@ -374,6 +382,14 @@
E06524F824581A7900CA22E2 /* ChuKuCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ChuKuCell.xib; sourceTree = "<group>"; };
E06524FB24581BD900CA22E2 /* PiCiXuanZeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiCiXuanZeViewController.swift; sourceTree = "<group>"; };
E06524FC24581BD900CA22E2 /* PiCiXuanZeViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PiCiXuanZeViewController.xib; sourceTree = "<group>"; };
E07B1E5C24591AA50055BA3C /* KeHuXQViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeHuXQViewController.swift; sourceTree = "<group>"; };
E07B1E5D24591AA50055BA3C /* KeHuXQViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KeHuXQViewController.xib; sourceTree = "<group>"; };
E07B1E60245921A60055BA3C /* KeHuXQCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeHuXQCell.swift; sourceTree = "<group>"; };
E07B1E61245921A60055BA3C /* KeHuXQCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KeHuXQCell.xib; sourceTree = "<group>"; };
E07B1E69245926330055BA3C /* GYSGLCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GYSGLCell.swift; sourceTree = "<group>"; };
E07B1E6A245926330055BA3C /* GYSGLCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GYSGLCell.xib; sourceTree = "<group>"; };
E07B1E6D245929060055BA3C /* GYSGLViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GYSGLViewController.swift; sourceTree = "<group>"; };
E07B1E6E245929060055BA3C /* GYSGLViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GYSGLViewController.xib; sourceTree = "<group>"; };
E088CC8C24470BF0000DAA8A /* CodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeView.swift; sourceTree = "<group>"; };
E088CC912447124D000DAA8A /* BindViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BindViewController.swift; sourceTree = "<group>"; };
E088CC922447124D000DAA8A /* BindViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BindViewController.xib; sourceTree = "<group>"; };
......@@ -798,6 +814,10 @@
E03549AC24582828008BD021 /* KeHuGuanLiCell.xib */,
E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */,
E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */,
E07B1E5C24591AA50055BA3C /* KeHuXQViewController.swift */,
E07B1E5D24591AA50055BA3C /* KeHuXQViewController.xib */,
E07B1E60245921A60055BA3C /* KeHuXQCell.swift */,
E07B1E61245921A60055BA3C /* KeHuXQCell.xib */,
);
path = "客户管理";
sourceTree = "<group>";
......@@ -860,6 +880,17 @@
path = "入库";
sourceTree = "<group>";
};
E07B1E64245925F30055BA3C /* 供应商管理 */ = {
isa = PBXGroup;
children = (
E07B1E69245926330055BA3C /* GYSGLCell.swift */,
E07B1E6A245926330055BA3C /* GYSGLCell.xib */,
E07B1E6D245929060055BA3C /* GYSGLViewController.swift */,
E07B1E6E245929060055BA3C /* GYSGLViewController.xib */,
);
path = "供应商管理";
sourceTree = "<group>";
};
E088CC882446FFA1000DAA8A /* Other */ = {
isa = PBXGroup;
children = (
......@@ -955,6 +986,7 @@
E09B03AD2445B0BA00211A51 /* ViewController */ = {
isa = PBXGroup;
children = (
E07B1E64245925F30055BA3C /* 供应商管理 */,
E03549AA24582806008BD021 /* 客户管理 */,
E06524EA2458006600CA22E2 /* 入库 */,
E02C88232456B23400925766 /* 物流跟踪 */,
......@@ -1605,6 +1637,7 @@
E06524EE2458008900CA22E2 /* RuKuViewController.xib in Resources */,
E06524F624580BB600CA22E2 /* BaoZhiQiCell.xib in Resources */,
E0D197C7244845FD002B080C /* PersonCenterViewController.xib in Resources */,
E07B1E5F24591AA50055BA3C /* KeHuXQViewController.xib in Resources */,
E02DDD83244FD15B00ABB707 /* TitleAndSwitchHeaderView.xib in Resources */,
E00E48CB2457D96100F16545 /* ChuRuKuJiLuXQViewController.xib in Resources */,
E03549AE24582828008BD021 /* KeHuGuanLiCell.xib in Resources */,
......@@ -1645,6 +1678,7 @@
E0F97B1524517A31001BD600 /* CommendCell.xib in Resources */,
E042F735245274F200CDFA12 /* YunDanLieBiaoCell.xib in Resources */,
E0D197CB24484D90002B080C /* PersonCenterCell.xib in Resources */,
E07B1E63245921A60055BA3C /* KeHuXQCell.xib in Resources */,
E00D85EB244561FE00F5F816 /* LaunchScreen.storyboard in Resources */,
E02FD9FB24557E8600E10E27 /* XinZengDiZhiViewController.xib in Resources */,
E0B94624245671E100FBEC9A /* DaiKeXiaDanGouWuViewController.xib in Resources */,
......@@ -1682,9 +1716,11 @@
E0C4F4A8244EC82A00CC7E2F /* TitleAndBtnCell.xib in Resources */,
E02FD9F72455790800E10E27 /* DiZhiGuanLiCell.xib in Resources */,
E0F97B1B2451951D001BD600 /* ShangPinGguiGeCell.xib in Resources */,
E07B1E70245929060055BA3C /* GYSGLViewController.xib in Resources */,
E0336DD6244EC40000380BE9 /* CreatNewSpecsViewController.xib in Resources */,
E0C4F4B6244EE9EE00CC7E2F /* YuShouCell.xib in Resources */,
F95A9EDE24557CD500867849 /* GuanLianKehuVC.xib in Resources */,
E07B1E6C245926330055BA3C /* GYSGLCell.xib in Resources */,
E0273DDE24551D4500B3FCAE /* OnlyLabelCell.xib in Resources */,
E00D85E5244561FE00F5F816 /* Assets.xcassets in Resources */,
E0A320C72456D01D00AF321C /* DaiKeXiaDanFooterView.xib in Resources */,
......@@ -1823,8 +1859,10 @@
F933F6C62452C68B00189561 /* PKHUDAssets.swift in Sources */,
F95D9B522448530E0080D6E3 /* GeliAlertView.swift in Sources */,
E02FD9EC2455627300E10E27 /* ChuKuViewController.swift in Sources */,
E07B1E6F245929060055BA3C /* GYSGLViewController.swift in Sources */,
E0D197BB2448431C002B080C /* BabyCallback.m in Sources */,
F950FDDD24518B9500C40530 /* FSCalendarCollectionViewLayout.m in Sources */,
E07B1E5E24591AA50055BA3C /* KeHuXQViewController.swift in Sources */,
F9DDBE962457D3EC00A32CB2 /* WebViewController.swift in Sources */,
E06524F924581A7900CA22E2 /* ChuKuCell.swift in Sources */,
F961D26B24500FF6007FBE70 /* HeaderSelectView.swift in Sources */,
......@@ -1863,6 +1901,7 @@
E02FD9F12455705F00E10E27 /* ChuRuKuJiLuCell.swift in Sources */,
E0A2E82724555B4400D6DB34 /* KuCunShangPinCell.swift in Sources */,
F950FDA72451494500C40530 /* GeliPayInfoModel.swift in Sources */,
E07B1E6B245926330055BA3C /* GYSGLCell.swift in Sources */,
E09B03C02445B96500211A51 /* FgPassViewController.swift in Sources */,
F950FDAB2451634B00C40530 /* LocationGeliPayModel.swift in Sources */,
E0D197C6244845FD002B080C /* PersonCenterViewController.swift in Sources */,
......@@ -1878,6 +1917,7 @@
E03549A8245820C2008BD021 /* PiCiXuanZeCell.swift in Sources */,
F933F6CE2452C68B00189561 /* PKHUDSquareBaseView.swift in Sources */,
E06524F524580BB600CA22E2 /* BaoZhiQiCell.swift in Sources */,
E07B1E62245921A60055BA3C /* KeHuXQCell.swift in Sources */,
E0DDCB1D244AE81800DF54C7 /* GuanLianKeHuCell.swift in Sources */,
E0D197BF2448431C002B080C /* BabyBluetooth.m in Sources */,
E0F97B1424517A31001BD600 /* CommendCell.swift in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "编组@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "编组@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -47,8 +47,20 @@ let NavCGRect = CGRect(x: 0, y: 0, width: Int(UIScreen.main.bounds.size.width),
let LoopHeight = UIScreen.main.bounds.size.width / 1.25
func SetTopFrameView(view:UIView,btmView:UIView){
view.snp.makeConstraints { (make) in
make.top.equalTo(NavCGRect.height)
make.right.left.equalTo(0)
make.bottom.equalTo(btmView.snp_top)
}
}
func SetTopFrame(view:UIView,height:CGFloat){
view.snp.makeConstraints { (make) in
make.top.equalTo(NavCGRect.height)
make.right.left.equalTo(0)
make.height.equalTo(height)
}
}
func IsOldIos() ->Bool{
if #available(iOS 11.0, *){
return false
......
......@@ -41,8 +41,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
// vc.delegate = self
// let contentView = vc
let vc = XinZengAndBianJiKeHuViewController()
vc.titleStr = "新增"
let vc = GYSGLViewController()
let contentView = vc
if let windowScene = sceneC as? UIWindowScene {
......
......@@ -10,6 +10,10 @@ import UIKit
class TitleAndOnlyBtnCell: UITableViewCell {
@IBAction func selectImgAction(_ sender: Any) {
}
@IBOutlet weak var imgBgView: UIView!
@IBOutlet weak var imgView: UIImageView!
@IBOutlet weak var button: UIButton!
@IBAction func editAction(_ sender: Any) {
......
//
// GYSGLCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/29.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class GYSGLCell: UITableViewCell {
@IBAction func btnClickAction(_ sender: Any) {
}
@IBOutlet weak var Lbl3: UILabel!
@IBOutlet weak var Lbl2: UILabel!
@IBOutlet weak var Lbl1: UILabel!
@IBOutlet weak var iconImg: UIImageView!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
//
// GYSGLViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/29.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
import LGButton
class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource{
var gysName:String = ""
var dzStr:String = ""
var detailDzStr:String = ""
var nameStr:String = ""
var phoneNum:String = ""
var telNum:String = ""
var img1:UIImage? = nil
var img2:UIImage? = nil
@IBOutlet weak var listView: UITableView!
@IBOutlet weak var btmBtn: LGButton!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "供应商信息"
self.view.addSubview(navbar)
listView.separatorStyle = .none
SetTopFrameView(view: listView, btmView: btmBtn)
listView.register(UINib(nibName: "TitleAndTFCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFCell")
listView.register(UINib(nibName: "TitleAndOnlyBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndOnlyBtnCell")
listView.register(UINib(nibName: "TitleAndTFAndBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFAndBtnCell")
if img1 == nil || img2 == nil || gysName == "" || phoneNum == "" || telNum == "" || nameStr == "" || dzStr == "" || detailDzStr == ""{
btmBtn.alpha = 0.5
btmBtn.isUserInteractionEnabled = false
}
//测试
img1 = UIImage()
}
let titleArr = ["基本信息","联系人信息","其它信息"]
//MARK: - cell delegate
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 10
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 10))
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 36
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 36))
view.backgroundColor = UIColor.white
let title = UILabel()
title.text = titleArr[section]
title.textColor = UIColor(named: "标题字颜色")
title.font = UIFont.boldSystemFont(ofSize: 15)
view.addSubview(title)
title.snp.makeConstraints { (make) in
make.top.left.right.equalTo(15)
make.height.equalTo(21)
}
return view
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 2 {
if img1 != nil {
if indexPath.row == 0 {
return 100
}
}
if img2 != nil {
if indexPath.row == 1 {
return 100
}
}
}
return 49
}
func numberOfSections(in tableView: UITableView) -> Int {
return 3
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 0:return 3
case 1:return 3
default:return 2
}
}
let sec1Arr = ["供应商名称:","地址:","详细地址:"]
let hold1Arr = ["请输入供应商名称","请选择供应商地址","请输入供应商详细地址"]
let sec2Arr = ["姓名:","手机:","电话:"]
let hold2Arr = ["请输入联系人姓名","请输入联系人手机号码","请输入联系电话"]
let sec3Arr = ["营业资格证:","食品流通许可证:"]
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch indexPath.section {
case 0:
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFAndBtnCell") as! TitleAndTFAndBtnCell
cell.titleLbl.text = sec1Arr[indexPath.row]
cell.textTF.placeholder = hold1Arr[indexPath.row]
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.nameLbl.text = sec1Arr[indexPath.row]
cell.textTF.placeholder = hold1Arr[indexPath.row]
return cell
case 1:
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.nameLbl.text = sec2Arr[indexPath.row]
cell.textTF.placeholder = hold2Arr[indexPath.row]
return cell
default:
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndOnlyBtnCell") as! TitleAndOnlyBtnCell
cell.titleLbl.text = sec3Arr[indexPath.row]
cell.button.setTitle("上传", for: .normal)
if img1 != nil {
if indexPath.row == 0 {
cell.imgBgView.isHidden = false
cell.imgView.image = img1
}
}
if img2 != nil {
if indexPath.row == 1 {
cell.imgBgView.isHidden = false
cell.imgView.image = img2
}
}
return cell
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<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="GYSGLViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<connections>
<outlet property="btmBtn" destination="UDG-2C-6uA" id="B0W-e7-mba"/>
<outlet property="listView" destination="dCx-Vv-3aF" id="OCD-Y1-cx8"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UDG-2C-6uA" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="618" width="375" height="49"/>
<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>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wSI-pD-gTn">
<rect key="frame" x="0.0" y="618" width="375" height="49"/>
<constraints>
<constraint firstAttribute="height" constant="49" id="cHg-Wc-ASt"/>
</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" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="dCx-Vv-3aF">
<rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="nYE-dw-N0b"/>
<outlet property="delegate" destination="-1" id="des-uk-puS"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="dCx-Vv-3aF" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="3sX-Fi-7Kl"/>
<constraint firstAttribute="trailing" secondItem="UDG-2C-6uA" secondAttribute="trailing" id="8An-kY-q4E"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="wSI-pD-gTn" secondAttribute="bottom" id="8lc-Lu-j80"/>
<constraint firstItem="UDG-2C-6uA" firstAttribute="top" secondItem="wSI-pD-gTn" secondAttribute="top" id="90b-67-XOG"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="wSI-pD-gTn" secondAttribute="trailing" id="Bld-If-VTK"/>
<constraint firstItem="UDG-2C-6uA" firstAttribute="top" secondItem="dCx-Vv-3aF" secondAttribute="bottom" id="Sf5-Ih-FI4"/>
<constraint firstItem="wSI-pD-gTn" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="Z80-QO-SMq"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="dCx-Vv-3aF" secondAttribute="trailing" id="gU4-p9-qEQ"/>
<constraint firstAttribute="bottom" secondItem="UDG-2C-6uA" secondAttribute="bottom" id="kvx-cp-nTw"/>
<constraint firstItem="UDG-2C-6uA" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="tRC-p9-8bY"/>
<constraint firstItem="dCx-Vv-3aF" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="xje-UF-YA9"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="131.8840579710145" y="121.875"/>
</view>
</objects>
<resources>
<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.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>
......@@ -93,7 +93,7 @@
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="按钮渐变色下,字体颜色">
<color red="0.27450980392156865" green="0.5607843137254902" blue="0.88627450980392153" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<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"/>
......
......@@ -15,6 +15,7 @@ class KeHuGuanLiCell: UITableViewCell {
@IBOutlet weak var nameLbl: UILabel!
@IBOutlet weak var btnWidth: NSLayoutConstraint!
@IBOutlet weak var statusLbl1: UILabel!
@IBOutlet weak var statusLbl2: UILabel!
@IBOutlet weak var statusLbl3: UILabel!
......
//
// KeHuXQCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/29.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class KeHuXQCell: UITableViewCell {
@IBOutlet weak var priceLbl: UILabel!
@IBOutlet weak var shuLiangLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
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="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<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="KeHuXQCell" customModule="GeliBusinessPlatform" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
<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="49"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F44-AL-jYd">
<rect key="frame" x="15" y="48" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="kRz-kh-WGq"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vDE-G2-znI">
<rect key="frame" x="291" y="0.0" width="84" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="84" id="iyB-ts-IVM"/>
</constraints>
<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="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Uv-2Z-34c">
<rect key="frame" x="197" y="0.0" width="84" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="84" id="O7N-EW-QgT"/>
</constraints>
<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="Label" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jfr-QD-hPs">
<rect key="frame" x="15" y="15" width="142" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="vDE-G2-znI" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="0gc-55-FOz"/>
<constraint firstItem="jfr-QD-hPs" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="CJQ-Kk-Ump"/>
<constraint firstItem="F44-AL-jYd" firstAttribute="top" secondItem="jfr-QD-hPs" secondAttribute="bottom" constant="15" id="DBL-qy-bMk"/>
<constraint firstAttribute="trailing" secondItem="F44-AL-jYd" secondAttribute="trailing" id="GvT-IZ-dGe"/>
<constraint firstAttribute="bottom" secondItem="F44-AL-jYd" secondAttribute="bottom" id="dHp-uN-gjf"/>
<constraint firstItem="7Uv-2Z-34c" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="oIg-G8-fee"/>
<constraint firstAttribute="trailing" secondItem="vDE-G2-znI" secondAttribute="trailing" id="pyd-bv-dL0"/>
<constraint firstItem="jfr-QD-hPs" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="qXg-jf-gSh"/>
<constraint firstItem="7Uv-2Z-34c" firstAttribute="leading" secondItem="jfr-QD-hPs" secondAttribute="trailing" constant="40" id="u0R-Lx-Cqf"/>
<constraint firstItem="F44-AL-jYd" firstAttribute="top" secondItem="vDE-G2-znI" secondAttribute="bottom" id="w8O-EB-4Sa"/>
<constraint firstItem="F44-AL-jYd" firstAttribute="top" secondItem="7Uv-2Z-34c" secondAttribute="bottom" id="xye-PJ-IcA"/>
<constraint firstItem="vDE-G2-znI" firstAttribute="leading" secondItem="7Uv-2Z-34c" secondAttribute="trailing" constant="10" id="xzi-wu-6D5"/>
<constraint firstItem="F44-AL-jYd" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="ygh-FS-frG"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="nameLbl" destination="jfr-QD-hPs" id="SQZ-5a-95g"/>
<outlet property="priceLbl" destination="vDE-G2-znI" id="YjC-ad-dIy"/>
<outlet property="shuLiangLbl" destination="7Uv-2Z-34c" id="geo-hK-0CF"/>
</connections>
<point key="canvasLocation" x="132" y="122"/>
</tableViewCell>
</objects>
<resources>
<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>
</resources>
</document>
//
// KeHuXQViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/29.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class KeHuXQViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource {
var dataArr = ["1","2"]
@IBOutlet weak var btmListView: UITableView!
@IBOutlet weak var topListView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "客户详情"
self.view.addSubview(navbar)
topListView.separatorStyle = .none
btmListView.separatorStyle = .none
SetTopFrame(view: topListView, height: 101)
topListView.register(UINib(nibName: "KeHuGuanLiCell", bundle: nil), forCellReuseIdentifier: "KeHuGuanLiCell")
btmListView.register(UINib(nibName: "KeHuXQCell", bundle: nil), forCellReuseIdentifier: "KeHuXQCell")
//
}
//MARK: - CELL DELEGATE
//header
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if tableView == btmListView {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 73.5))
let rightLbl = UILabel()
rightLbl.text = "商品金额"
rightLbl.textColor = UIColor(named: "灰色字体颜色")
rightLbl.font = UIFont.systemFont(ofSize: 11)
rightLbl.textAlignment = .center
view.addSubview(rightLbl)
rightLbl.snp.makeConstraints { (make) in
make.top.equalTo(40.5)
make.right.bottom.equalTo(0)
make.width.equalTo(84)
}
let rightLbl1 = UILabel()
rightLbl1.text = "商品数量"
rightLbl1.textColor = UIColor(named: "灰色字体颜色")
rightLbl1.font = UIFont.systemFont(ofSize: 11)
rightLbl1.textAlignment = .center
view.addSubview(rightLbl1)
rightLbl1.snp.makeConstraints { (make) in
make.top.equalTo(40.5)
make.right.equalTo(rightLbl.snp_left).offset(-10)
make.bottom.equalTo(0)
make.width.equalTo(84)
}
let rightLbl2 = UILabel()
rightLbl2.text = "商品名称"
rightLbl2.textColor = UIColor(named: "灰色字体颜色")
rightLbl2.font = UIFont.systemFont(ofSize: 11)
view.addSubview(rightLbl2)
rightLbl2.snp.makeConstraints { (make) in
make.left.right.equalTo(15)
make.centerY.equalTo(rightLbl.snp_centerY)
make.bottom.equalTo(0)
}
let title = UILabel()
title.text = "销售统计"
title.textColor = UIColor(named: "标题字颜色")
title.font = UIFont.boldSystemFont(ofSize: 15)
view.addSubview(title)
title.snp.makeConstraints { (make) in
make.top.left.right.equalTo(15)
make.height.equalTo(21)
}
return view
}
return UIView()
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if tableView == btmListView {
return 73.5
}
return 0.001
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if tableView == topListView {
return 1
}
return dataArr.count
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if tableView == topListView {
return 101
}
return 49
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if tableView == topListView {
let cell = tableView.dequeueReusableCell(withIdentifier: "KeHuGuanLiCell") as! KeHuGuanLiCell
cell.btnWidth.constant = 0
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "KeHuXQCell") as! KeHuXQCell
return cell
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<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="KeHuXQViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<connections>
<outlet property="btmListView" destination="OGw-Ju-5EX" id="2s6-Il-n9h"/>
<outlet property="topListView" destination="fuN-nI-NyW" id="Kly-Ux-GWM"/>
<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>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="fuN-nI-NyW">
<rect key="frame" x="0.0" y="44" width="414" height="101"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="height" constant="101" id="1zq-LP-uRh"/>
</constraints>
<connections>
<outlet property="dataSource" destination="-1" id="cSb-Me-gGf"/>
<outlet property="delegate" destination="-1" id="QuH-FP-mq7"/>
</connections>
</tableView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="OGw-Ju-5EX">
<rect key="frame" x="0.0" y="145" width="414" height="717"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<connections>
<outlet property="dataSource" destination="-1" id="476-V5-Vjz"/>
<outlet property="delegate" destination="-1" id="DOj-YY-vmR"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="OGw-Ju-5EX" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="89R-B9-weT"/>
<constraint firstItem="fuN-nI-NyW" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="DyT-ks-y1p"/>
<constraint firstItem="OGw-Ju-5EX" firstAttribute="top" secondItem="fuN-nI-NyW" secondAttribute="bottom" id="OYk-DU-db3"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="fuN-nI-NyW" secondAttribute="trailing" id="Of3-Vv-lo2"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="OGw-Ju-5EX" secondAttribute="bottom" id="UWu-0N-wAb"/>
<constraint firstItem="fuN-nI-NyW" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="XvK-1b-wJP"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="OGw-Ju-5EX" secondAttribute="trailing" id="jtk-z2-Z9L"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="132" y="122"/>
</view>
</objects>
</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