Commit 7137e7d7 authored by lujunye's avatar lujunye

应收应付UI补充

parent 0e714109
<?xml version="1.0" encoding="UTF-8"?> <?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"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YingFuZhangKuanCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YingFuZhangKuanCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="49"/> <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <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"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
......
...@@ -15,6 +15,7 @@ class YingFuZhangKuanXQCell: UITableViewCell { ...@@ -15,6 +15,7 @@ class YingFuZhangKuanXQCell: UITableViewCell {
@IBAction func submitAction(_ sender: UIButton) { @IBAction func submitAction(_ sender: UIButton) {
delegate?.YingFuZhangKuanXQCellBtnClick?(cell: self,sender:sender) delegate?.YingFuZhangKuanXQCellBtnClick?(cell: self,sender:sender)
} }
var isFirst = false
@IBOutlet weak var p3Title: UILabel! @IBOutlet weak var p3Title: UILabel!
@IBOutlet weak var p2Title: UILabel! @IBOutlet weak var p2Title: UILabel!
@IBOutlet weak var p1Title: UILabel! @IBOutlet weak var p1Title: UILabel!
...@@ -30,10 +31,24 @@ class YingFuZhangKuanXQCell: UITableViewCell { ...@@ -30,10 +31,24 @@ class YingFuZhangKuanXQCell: UITableViewCell {
// Initialization code // Initialization code
} }
override func layoutIfNeeded() {
super.layoutIfNeeded()
submitBtn.layer.cornerRadius = 3
submitBtn.layer.masksToBounds = true
if isFirst {
submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色")
submitBtn.setTitleColor(UIColor.white, for: .normal)
submitBtn.layer.borderWidth = 0
}else{
submitBtn.backgroundColor = UIColor.clear
submitBtn.setTitleColor(UIColor(named: "灰色字体颜色"), for: .normal)
submitBtn.layer.borderWidth = 1
}
}
override func setSelected(_ selected: Bool, animated: Bool) { override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated) super.setSelected(selected, animated: animated)
// Configure the view for the selected state // Configure the view for the selected state
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YingFuZhangKuanXQCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YingFuZhangKuanXQCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="210"/> <rect key="frame" x="0.0" y="0.0" width="375" height="210"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <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"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
...@@ -122,7 +123,7 @@ ...@@ -122,7 +123,7 @@
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="设为未收款"> <state key="normal" title="设为未收款">
<color key="titleColor" name="灰色字体颜色"/> <color key="titleColor" name="白色背景色"/>
</state> </state>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor"> <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
...@@ -132,7 +133,7 @@ ...@@ -132,7 +133,7 @@
<real key="value" value="1"/> <real key="value" value="1"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="2"/> <real key="value" value="3"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections> <connections>
...@@ -215,5 +216,8 @@ ...@@ -215,5 +216,8 @@
<namedColor name="灰色字体颜色"> <namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources> </resources>
</document> </document>
...@@ -8,8 +8,22 @@ ...@@ -8,8 +8,22 @@
import UIKit import UIKit
class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource,YingFuZhangKuanXQCellDelegate{ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource,YingFuZhangKuanXQCellDelegate,GLAlertSelectViewDelegate{
func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) {
typeSelect = selectnum
glSelectView?.removeFromSuperview()
glSelectView = nil
}
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
typeSelect = selectNum
glSelectView?.removeFromSuperview()
glSelectView = nil
}
let typeArr = ["现金","转账(私)","转账(公)","转账(微信)","转账(支付宝)"]
var glSelectView:GLAlertSelectView?
var navTitle:String = "" var navTitle:String = ""
var typeSelect:Int?
var searchV : SearchBarView? = nil var searchV : SearchBarView? = nil
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
@IBOutlet weak var searchBGView: UIView! @IBOutlet weak var searchBGView: UIView!
...@@ -149,28 +163,50 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea ...@@ -149,28 +163,50 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea
let cell = tableView.dequeueReusableCell(withIdentifier: "YingFuZhangKuanXQCell") as! YingFuZhangKuanXQCell let cell = tableView.dequeueReusableCell(withIdentifier: "YingFuZhangKuanXQCell") as! YingFuZhangKuanXQCell
cell.delegate = self cell.delegate = self
cell.submitBtn.tag = indexPath.row cell.submitBtn.tag = indexPath.row
cell.isFirst = false
cell.tag = indexPath.row
if navTitle.contains("应付"){ if navTitle.contains("应付"){
if indexPath.row == 0 { if indexPath.row == 0 {
cell.submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色") cell.isFirst = true
cell.submitBtn.setTitle("付款", for: .normal) cell.submitBtn.setTitle("付款", for: .normal)
cell.submitBtn.setTitleColor(UIColor.white, for: .normal)
cell.submitBtn.layer.borderWidth = 0
} }
}else{ }else{
cell.p1Title.text = "借方金额" cell.p1Title.text = "借方金额"
cell.p2Title.text = "贷方金额" cell.p2Title.text = "贷方金额"
cell.p3Title.text = "已额" cell.p3Title.text = "已额"
cell.submitBtn.setTitle("未收", for: .normal) cell.submitBtn.setTitle("未收", for: .normal)
if indexPath.row == 0 { if indexPath.row == 0 {
cell.submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色") cell.isFirst = true
cell.submitBtn.setTitle("收款", for: .normal) cell.submitBtn.setTitle("收款", for: .normal)
cell.submitBtn.setTitleColor(UIColor.white, for: .normal)
cell.submitBtn.layer.borderWidth = 0
} }
} }
return cell return cell
} }
func YingFuZhangKuanXQCellBtnClick(cell: YingFuZhangKuanXQCell, sender: UIButton) { func YingFuZhangKuanXQCellBtnClick(cell: YingFuZhangKuanXQCell, sender: UIButton) {
print("应收/应付账款 == ",sender.tag) if cell.tag == 0 {
//第一栏
if glSelectView == nil {
let view = GLAlertSelectView(frame: self.view.bounds)
view.delegate = self
if typeSelect != nil && typeSelect != 10086{
view.selectNum = typeSelect
view.tempNum = view.selectNum
}
if navTitle.contains("应收"){
view.titleLbl.text = "请选择收款方式"
}else{
view.titleLbl.text = "请选择付款方式"
}
view.dataArr = typeArr
self.view.addSubview(view)
glSelectView = view
}
}else{
//第二栏
}
} }
} }
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