Commit 375fc9d6 authored by lujunye's avatar lujunye

库存商品详情

parent b6a0d9fb
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
E00E48BF2457BAC700F16545 /* XuanZeShangPinCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48BD2457BAC700F16545 /* XuanZeShangPinCell.xib */; }; E00E48BF2457BAC700F16545 /* XuanZeShangPinCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48BD2457BAC700F16545 /* XuanZeShangPinCell.xib */; };
E00E48C22457C0D600F16545 /* XuanZeShangPinViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00E48C02457C0D600F16545 /* XuanZeShangPinViewController.swift */; }; E00E48C22457C0D600F16545 /* XuanZeShangPinViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00E48C02457C0D600F16545 /* XuanZeShangPinViewController.swift */; };
E00E48C32457C0D600F16545 /* XuanZeShangPinViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */; }; E00E48C32457C0D600F16545 /* XuanZeShangPinViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */; };
E00E48C62457C99900F16545 /* KuCunShangPinXQViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00E48C42457C99900F16545 /* KuCunShangPinXQViewController.swift */; };
E00E48C72457C99900F16545 /* KuCunShangPinXQViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E00E48C52457C99900F16545 /* KuCunShangPinXQViewController.xib */; };
E01C26B12446989700ADCC70 /* Interface_Z.plist in Resources */ = {isa = PBXBuildFile; fileRef = E01C26B02446989700ADCC70 /* Interface_Z.plist */; }; E01C26B12446989700ADCC70 /* Interface_Z.plist in Resources */ = {isa = PBXBuildFile; fileRef = E01C26B02446989700ADCC70 /* Interface_Z.plist */; };
E01C26B62446AF3100ADCC70 /* DemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E01C26B42446AF3100ADCC70 /* DemoViewController.swift */; }; E01C26B62446AF3100ADCC70 /* DemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E01C26B42446AF3100ADCC70 /* DemoViewController.swift */; };
E01C26B72446AF3100ADCC70 /* DemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E01C26B52446AF3100ADCC70 /* DemoViewController.xib */; }; E01C26B72446AF3100ADCC70 /* DemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E01C26B52446AF3100ADCC70 /* DemoViewController.xib */; };
...@@ -287,6 +289,8 @@ ...@@ -287,6 +289,8 @@
E00E48BD2457BAC700F16545 /* XuanZeShangPinCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanZeShangPinCell.xib; sourceTree = "<group>"; }; E00E48BD2457BAC700F16545 /* XuanZeShangPinCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanZeShangPinCell.xib; sourceTree = "<group>"; };
E00E48C02457C0D600F16545 /* XuanZeShangPinViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XuanZeShangPinViewController.swift; sourceTree = "<group>"; }; E00E48C02457C0D600F16545 /* XuanZeShangPinViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XuanZeShangPinViewController.swift; sourceTree = "<group>"; };
E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanZeShangPinViewController.xib; sourceTree = "<group>"; }; E00E48C12457C0D600F16545 /* XuanZeShangPinViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanZeShangPinViewController.xib; sourceTree = "<group>"; };
E00E48C42457C99900F16545 /* KuCunShangPinXQViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KuCunShangPinXQViewController.swift; sourceTree = "<group>"; };
E00E48C52457C99900F16545 /* KuCunShangPinXQViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KuCunShangPinXQViewController.xib; sourceTree = "<group>"; };
E01C26B02446989700ADCC70 /* Interface_Z.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Interface_Z.plist; sourceTree = "<group>"; }; E01C26B02446989700ADCC70 /* Interface_Z.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Interface_Z.plist; sourceTree = "<group>"; };
E01C26B42446AF3100ADCC70 /* DemoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoViewController.swift; sourceTree = "<group>"; }; E01C26B42446AF3100ADCC70 /* DemoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoViewController.swift; sourceTree = "<group>"; };
E01C26B52446AF3100ADCC70 /* DemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DemoViewController.xib; sourceTree = "<group>"; }; E01C26B52446AF3100ADCC70 /* DemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DemoViewController.xib; sourceTree = "<group>"; };
...@@ -996,6 +1000,8 @@ ...@@ -996,6 +1000,8 @@
E0A2E82A24555D8600D6DB34 /* KuCunXiangQingCell.xib */, E0A2E82A24555D8600D6DB34 /* KuCunXiangQingCell.xib */,
E02FD9EA2455627300E10E27 /* ChuKuViewController.swift */, E02FD9EA2455627300E10E27 /* ChuKuViewController.swift */,
E02FD9EB2455627300E10E27 /* ChuKuViewController.xib */, E02FD9EB2455627300E10E27 /* ChuKuViewController.xib */,
E00E48C42457C99900F16545 /* KuCunShangPinXQViewController.swift */,
E00E48C52457C99900F16545 /* KuCunShangPinXQViewController.xib */,
); );
path = "库存商品"; path = "库存商品";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1539,6 +1545,7 @@ ...@@ -1539,6 +1545,7 @@
E0F97B112451728D001BD600 /* AddGuiGeCell.xib in Resources */, E0F97B112451728D001BD600 /* AddGuiGeCell.xib in Resources */,
E0C9EF13244E922200277435 /* OrderDViewController.xib in Resources */, E0C9EF13244E922200277435 /* OrderDViewController.xib in Resources */,
F95567AC2453E40B009674AB /* OrderListViewController.xib in Resources */, F95567AC2453E40B009674AB /* OrderListViewController.xib in Resources */,
E00E48C72457C99900F16545 /* KuCunShangPinXQViewController.xib in Resources */,
E02FD9F22455705F00E10E27 /* ChuRuKuJiLuCell.xib in Resources */, E02FD9F22455705F00E10E27 /* ChuRuKuJiLuCell.xib in Resources */,
F961D26924500550007FBE70 /* HeaderSelectView.xib in Resources */, F961D26924500550007FBE70 /* HeaderSelectView.xib in Resources */,
E088CC942447124D000DAA8A /* BindViewController.xib in Resources */, E088CC942447124D000DAA8A /* BindViewController.xib in Resources */,
...@@ -1704,6 +1711,7 @@ ...@@ -1704,6 +1711,7 @@
F950FDD924518B9500C40530 /* FSCalendarDelegationFactory.m in Sources */, F950FDD924518B9500C40530 /* FSCalendarDelegationFactory.m in Sources */,
E0A2E82B24555D8600D6DB34 /* KuCunXiangQingCell.swift in Sources */, E0A2E82B24555D8600D6DB34 /* KuCunXiangQingCell.swift in Sources */,
F933F6C22452C68B00189561 /* PKHUDAnimating.swift in Sources */, F933F6C22452C68B00189561 /* PKHUDAnimating.swift in Sources */,
E00E48C62457C99900F16545 /* KuCunShangPinXQViewController.swift in Sources */,
E02C882A2456B4BA00925766 /* WLGZCell.swift in Sources */, E02C882A2456B4BA00925766 /* WLGZCell.swift in Sources */,
F950FDE824518CD800C40530 /* TimeSelectView.swift in Sources */, F950FDE824518CD800C40530 /* TimeSelectView.swift in Sources */,
F933F6C72452C68B00189561 /* PKHUDWideBaseView.swift in Sources */, F933F6C72452C68B00189561 /* PKHUDWideBaseView.swift in Sources */,
......
...@@ -35,12 +35,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg ...@@ -35,12 +35,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
} }
//MARK:--loginVC //MARK:--loginVC
func addLoginVc (isAgain:Bool){ func addLoginVc (isAgain:Bool){
// let vc = LoginViewController() let vc = LoginViewController()
// vc.delegate = self vc.delegate = self
// let contentView = vc let contentView = vc
let vc = XuanZeShangPinViewController() // let vc = KuCunShangPinXQViewController()
let contentView = vc // let contentView = vc
if let windowScene = sceneC as? UIWindowScene { if let windowScene = sceneC as? UIWindowScene {
if isAgain { if isAgain {
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="按钮渐变色下,字体颜色"> <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>
</resources> </resources>
</document> </document>
//
// KuCunShangPinXQViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/28.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class KuCunShangPinXQViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource{
@IBOutlet weak var topView: UIView!
@IBOutlet weak var listView: UITableView!
@IBOutlet weak var detailLbl2: UILabel!
@IBOutlet weak var detailLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel!
@IBOutlet weak var imgView: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "商品-xxxx"
self.view.addSubview(navbar)
topView.snp.makeConstraints { (make) in
make.top.equalTo(NavCGRect.height)
make.right.left.equalTo(0)
make.height.equalTo(120)
}
listView.separatorStyle = .none
listView.register(UINib(nibName: "KuCunXiangQingCell", bundle: nil), forCellReuseIdentifier: "KuCunXiangQingCell")
}
//MARK: - CELL DELEGATE
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 70))
view.backgroundColor = UIColor(named: "app底色")
let t1 = UILabel()
t1.text = "商品可售库存:"
t1.font = UIFont.systemFont(ofSize: 13)
t1.textColor = UIColor(named: "标题字颜色")
t1.sizeToFit()
view.addSubview(t1)
t1.snp.makeConstraints { (make) in
make.top.left.equalTo(15)
make.width.equalTo(t1.bounds.size.width)
make.height.equalTo(18.5)
}
let kcL = UILabel()//可售库存
kcL.text = "1010"
kcL.font = UIFont.systemFont(ofSize: 13)
kcL.textColor = UIColor(named: "蓝色字体颜色")
view.addSubview(kcL)
kcL.snp.makeConstraints { (make) in
make.centerY.equalTo(t1.snp_centerY)
make.left.equalTo(t1.snp_right)
make.height.equalTo(18.5)
}
let zkcL = UILabel()//总库存
zkcL.text = "10111110"
zkcL.font = UIFont.systemFont(ofSize: 13)
zkcL.textColor = UIColor(named: "蓝色字体颜色")
zkcL.sizeToFit()
view.addSubview(zkcL)
zkcL.snp.makeConstraints { (make) in
make.centerY.equalTo(t1.snp_centerY)
make.right.equalTo(-15)
make.width.equalTo(zkcL.bounds.size.width)
make.height.equalTo(18.5)
}
let t2 = UILabel()
t2.text = "商品总库存:"
t2.font = UIFont.systemFont(ofSize: 13)
t2.textColor = UIColor(named: "标题字颜色")
view.addSubview(t2)
t2.snp.makeConstraints { (make) in
make.centerY.equalTo(t1.snp_centerY)
make.height.equalTo(18.5)
make.right.equalTo(zkcL.snp_left)
}
let title = UILabel()
title.text = "库存详情"
title.font = UIFont.boldSystemFont(ofSize: 17)
title.textColor = UIColor(named: "标题字颜色")
view.addSubview(title)
title.snp.makeConstraints { (make) in
make.top.equalTo(t1.snp_bottom).offset(15)
make.left.right.equalTo(15)
make.height.equalTo(21)
}
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 70
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 280
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "KuCunXiangQingCell") as! KuCunXiangQingCell
cell.shengChanLbl.attributedText = self.setStrLine(lbl: cell.shengChanLbl)
cell.guoQiLbl.attributedText = self.setStrLine(lbl: cell.guoQiLbl)
cell.ruKuLbl.attributedText = self.setStrLine(lbl: cell.ruKuLbl)
cell.baoZhiQiLbl.attributedText = self.setStrLine(lbl: cell.baoZhiQiLbl)
return cell
}
func setStrLine(lbl:UILabel)->NSAttributedString{
let attributedString = NSMutableAttributedString(string: lbl.text!)
let arr = lbl.text?.components(separatedBy: ":")
let string = arr?.first
let str = arr?.last
attributedString.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: NSRange(location: string!.count+1, length: str!.count))
return attributedString
}
}
...@@ -9,11 +9,20 @@ ...@@ -9,11 +9,20 @@
import UIKit import UIKit
class KuCunXiangQingCell: UITableViewCell { class KuCunXiangQingCell: UITableViewCell {
@IBAction func checkAction(_ sender: Any) {
}
@IBAction func chuKuAction(_ sender: Any) {
}
///库存
@IBOutlet weak var kcLbl: UILabel!
@IBOutlet weak var statusLbl: UILabel!
@IBOutlet weak var shengChanLbl: UILabel!
@IBOutlet weak var guoQiLbl: UILabel!
@IBOutlet weak var ruKuLbl: UILabel!
@IBOutlet weak var baoZhiQiLbl: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
// Initialization code // Initialization code
} }
......
...@@ -123,6 +123,9 @@ ...@@ -123,6 +123,9 @@
<state key="normal" title="检测报告"> <state key="normal" title="检测报告">
<color key="titleColor" name="蓝色字体颜色"/> <color key="titleColor" name="蓝色字体颜色"/>
</state> </state>
<connections>
<action selector="checkAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="gap-SI-pht"/>
</connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="43E-oa-0YQ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="43E-oa-0YQ">
<rect key="frame" x="15" y="155" width="320" height="1"/> <rect key="frame" x="15" y="155" width="320" height="1"/>
...@@ -160,6 +163,9 @@ ...@@ -160,6 +163,9 @@
<real key="value" value="3"/> <real key="value" value="3"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections>
<action selector="chuKuAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="vWV-DJ-KLL"/>
</connections>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
...@@ -203,7 +209,7 @@ ...@@ -203,7 +209,7 @@
</constraints> </constraints>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="5"/> <real key="value" value="10"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</view> </view>
...@@ -219,6 +225,14 @@ ...@@ -219,6 +225,14 @@
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="baoZhiQiLbl" destination="R3Z-yf-g4C" id="9Fn-59-S5C"/>
<outlet property="guoQiLbl" destination="hE7-KG-Utr" id="C1e-Ap-swZ"/>
<outlet property="kcLbl" destination="Jh6-QP-5kO" id="TKB-DJ-ja0"/>
<outlet property="ruKuLbl" destination="56r-c5-tbq" id="c43-9l-zpJ"/>
<outlet property="shengChanLbl" destination="COk-aR-ifm" id="36z-0h-84Z"/>
<outlet property="statusLbl" destination="rRd-rR-m14" id="GsB-z3-y1m"/>
</connections>
<point key="canvasLocation" x="157.24637681159422" y="127.90178571428571"/> <point key="canvasLocation" x="157.24637681159422" y="127.90178571428571"/>
</tableViewCell> </tableViewCell>
</objects> </objects>
......
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