Commit 08f71982 authored by lujunye's avatar lujunye

运单列表cell,添加按钮(有按钮高度257,没按钮高度227)按钮acButton,默认隐藏

parent 7d39bfca
......@@ -29,6 +29,8 @@ class YunDanLieBiaoCell: UITableViewCell {
@IBOutlet weak var productNameLbl: UILabel!
/// 签收状态
@IBOutlet weak var signLbl: UILabel!
/// 根据状态给标题
@IBOutlet weak var acButton: UIButton!
override func awakeFromNib() {
super.awakeFromNib()
selectionStyle = .none
......
......@@ -12,14 +12,14 @@
<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="YunDanLieBiaoCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="212"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="272"/>
<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="212"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="272"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="naO-D9-yP8">
<rect key="frame" x="15" y="15" width="345" height="197"/>
<rect key="frame" x="15" y="15" width="345" height="257"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="标题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lzG-zA-SOj">
<rect key="frame" x="10" y="10" width="335" height="15"/>
......@@ -134,6 +134,29 @@
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gc6-oj-wSU">
<rect key="frame" x="250" y="212" width="80" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Kss-y0-K0x"/>
<constraint firstAttribute="width" constant="80" id="fNi-M7-jbf"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="title">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" name="蓝色字体颜色"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
......@@ -146,6 +169,8 @@
<constraint firstItem="q1h-8u-ej2" firstAttribute="top" secondItem="lzG-zA-SOj" secondAttribute="bottom" constant="26" id="9gh-Or-VWo"/>
<constraint firstItem="lzG-zA-SOj" firstAttribute="leading" secondItem="naO-D9-yP8" secondAttribute="leading" constant="10" id="A3W-QU-KVZ"/>
<constraint firstAttribute="trailing" secondItem="lzG-zA-SOj" secondAttribute="trailing" id="A76-17-yka"/>
<constraint firstAttribute="trailing" secondItem="gc6-oj-wSU" secondAttribute="trailing" constant="15" id="CYF-Ih-Kfh"/>
<constraint firstAttribute="bottom" secondItem="gc6-oj-wSU" secondAttribute="bottom" constant="15" id="IY1-VT-7ad"/>
<constraint firstItem="aOy-Ef-DsK" firstAttribute="top" secondItem="q1h-8u-ej2" secondAttribute="bottom" constant="20" id="J2G-Z6-4oG"/>
<constraint firstAttribute="trailing" secondItem="Tvb-s6-5wR" secondAttribute="trailing" constant="10" id="OFj-DC-kAx"/>
<constraint firstItem="lzG-zA-SOj" firstAttribute="top" secondItem="naO-D9-yP8" secondAttribute="top" constant="10" id="PT0-J5-xcL"/>
......@@ -187,6 +212,7 @@
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="acButton" destination="gc6-oj-wSU" id="kNJ-10-zkL"/>
<outlet property="orderNumLbl" destination="8BK-xs-SBV" id="W4o-gt-gov"/>
<outlet property="productNameLbl" destination="aOy-Ef-DsK" id="B00-w4-ZG4"/>
<outlet property="receiverLbl" destination="0f7-bf-rJa" id="d2a-uD-7Ks"/>
......
......@@ -487,8 +487,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
case 75: //收支统计
// HUD.flash(.label("敬请期待"),delay: 1.2)
// return
// let vc = XiaYunDanViewController()
// let vc = ToAndFormSelectViewController()
let vc = ShouZhiTongJiViewController()
self.navigationController?.pushViewController(vc, animated: true)
return
......
......@@ -38,14 +38,14 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
var datas:Array<Any> = [1,2]
var keyWord = ""
override func viewDidLoad() {
super.viewDidLoad()
orderNumTF.tag = 1
orderNumTF.delegate = self
standerTF.delegate = self
navbar.title = "运单列表"
self.view.addSubview(navbar)
SetTopFrame(view: topView, height: 51)
......@@ -76,7 +76,7 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
btn.isSelected = !btn.isSelected
if btn.isSelected {
btn.setTitleColor(UIColor.white, for: .normal)
btn.backgroundColor = UIColor(named: "按钮背景颜色")
btn.backgroundColor = UIColor(named: "按钮渐变色上")
}else{
btn.setTitleColor(UIColor(named: "个人中心灰色字体"), for: .normal)
btn.backgroundColor = UIColor(named: "多选按钮背景颜色")
......@@ -87,6 +87,12 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
btnUISet(btn: sender)
}
switch sender.titleLabel?.text {
case "顺丰":
break
case "货拉拉":
break
case "全部":
break
case "京东":
break
case "已付款":
......@@ -209,6 +215,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 257
}
return 227
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
......@@ -218,6 +227,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "YunDanLieBiaoCell") as! YunDanLieBiaoCell
cell.tag = indexPath.row
if cell.tag == 0 {
cell.acButton.isHidden = false
}
return cell
}
func textFieldDidBeginEditing(_ textField: UITextField) {
......
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