Commit c97a320e authored by lujunye's avatar lujunye

物流流程

parent 1bd7971d
<?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="AdressSelectCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="AdressSelectCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="70"/> <rect key="frame" x="0.0" y="0.0" width="375" height="70"/>
<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">
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="蓝色字体颜色"> <namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" 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>
...@@ -7,15 +7,19 @@ ...@@ -7,15 +7,19 @@
// //
import UIKit import UIKit
@objc protocol JiTuoWuXinXiViewDelegate { protocol JiTuoWuXinXiViewDelegate {
func JiTuoWuXinXiViewClose()
func JiTuoWuXinXiViewSubmit(itemName:String,tiJi:Float,weight:Float,count:Int,isCheck:Bool)
} }
class JiTuoWuXinXiView: UIView { class JiTuoWuXinXiView: UIView,UITextFieldDelegate{
var contentView:UIView! var contentView:UIView!
var delegate:JiTuoWuXinXiViewDelegate? var delegate:JiTuoWuXinXiViewDelegate?
@IBOutlet weak var infoSw: UISwitch! @IBOutlet weak var infoSw: UISwitch!
@IBOutlet weak var bottomView: UIView! @IBOutlet weak var bottomView: UIView!
@IBAction func closeAction(_ sender: Any) {
delegate?.JiTuoWuXinXiViewClose()
}
@IBOutlet weak var countTf: UITextField! @IBOutlet weak var countTf: UITextField!
@IBOutlet weak var weightTf: UITextField! @IBOutlet weak var weightTf: UITextField!
@IBOutlet weak var gaoTf: UITextField! @IBOutlet weak var gaoTf: UITextField!
...@@ -23,13 +27,69 @@ class JiTuoWuXinXiView: UIView { ...@@ -23,13 +27,69 @@ class JiTuoWuXinXiView: UIView {
@IBOutlet weak var changTf: UITextField! @IBOutlet weak var changTf: UITextField!
@IBAction func jiaJianMethod(_ sender: UIButton) { @IBAction func jiaJianMethod(_ sender: UIButton) {
switch sender.tag {
case 0:
changTf.text = ""
kuanTf.text = ""
gaoTf.text = ""
var str = tiJiTF.text as! NSString
str = "\(str.integerValue + 1)" as NSString
tiJiTF.text = str as String
break
case 1:
changTf.text = ""
kuanTf.text = ""
gaoTf.text = ""
var str = tiJiTF.text as! NSString
if str.integerValue > 1 {
str = "\(str.integerValue - 1)" as NSString
tiJiTF.text = str as String
}
break
case 2:
var str = countTf.text as! NSString
str = "\(str.integerValue + 1)" as NSString
countTf.text = str as String
break
default:
var str = countTf.text as! NSString
if str.integerValue > 1 {
str = "\(str.integerValue - 1)" as NSString
countTf.text = str as String
}
break
} }
@IBAction func submitAction(_ sender: Any) {
} }
@IBAction func submitAction(_ sender: Any) {
// delegate?.JiTuoWuXinXiViewSubmit()
if itemNameTF.text!.count == 0 {
HUD.flash(.label("请输入寄托物名称"), delay: 1.2)
return
}
if tiJiTF.text!.count == 0 {
HUD.flash(.label("请输入体积"), delay: 1.2)
return
}
if weightTf.text!.count == 0 {
HUD.flash(.label("请输入重量"), delay: 1.2)
return
}
if countTf.text!.count == 0 {
HUD.flash(.label("请输入数量"), delay: 1.2)
return
}
let tiji = tiJiTF.text as! NSString
let weight = weightTf.text as! NSString
let count = countTf.text as! NSString
delegate?.JiTuoWuXinXiViewSubmit(itemName: itemNameTF.text!, tiJi: tiji.floatValue, weight: weight.floatValue, count: count.integerValue, isCheck: infoSw.isOn)
}
@IBOutlet weak var tiJiTF: UITextField! @IBOutlet weak var tiJiTF: UITextField!
@IBOutlet weak var itemNameTF: UITextField! @IBOutlet weak var itemNameTF: UITextField!
func setUI(){ func setUI(){
weightTf.keyboardType = .decimalPad
countTf.keyboardType = .numberPad
tiJiTF.keyboardType = .decimalPad
infoSw.transform = CGAffineTransform(scaleX: 0.8, y: 0.8) infoSw.transform = CGAffineTransform(scaleX: 0.8, y: 0.8)
let maskPath = UIBezierPath(roundedRect: bottomView.bounds, let maskPath = UIBezierPath(roundedRect: bottomView.bounds,
byRoundingCorners:[.topLeft, .topRight], cornerRadii:CGSize(width:3, height:3)) byRoundingCorners:[.topLeft, .topRight], cornerRadii:CGSize(width:3, height:3))
...@@ -37,7 +97,33 @@ class JiTuoWuXinXiView: UIView { ...@@ -37,7 +97,33 @@ class JiTuoWuXinXiView: UIView {
masklayer.frame = bottomView.bounds masklayer.frame = bottomView.bounds
masklayer.path = maskPath.cgPath masklayer.path = maskPath.cgPath
bottomView.layer.mask = masklayer bottomView.layer.mask = masklayer
changTf.delegate = self
kuanTf.delegate = self
gaoTf.delegate = self
tiJiTF.delegate = self
changTf.keyboardType = .numberPad
kuanTf.keyboardType = .numberPad
gaoTf.keyboardType = .numberPad
}
func textFieldDidEndEditing(_ textField: UITextField) {
if textField == tiJiTF {
changTf.text = ""
kuanTf.text = ""
gaoTf.text = ""
}
if changTf.text!.count > 0 && kuanTf.text!.count > 0 && gaoTf.text!.count > 0 {
let chang = changTf.text as! NSString
let kuan = kuanTf.text as! NSString
let gao = gaoTf.text as! NSString
let c = chang.floatValue / 100
let k = kuan.floatValue / 100
let g = gao.floatValue / 100
tiJiTF.text = String(format: "%.2f", c * k * g)
} }
}
//初始化时将xib中的view添加进来 //初始化时将xib中的view添加进来
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
......
<?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"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="JiTuoWuXinXiView" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="JiTuoWuXinXiView" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="bottomView" destination="rW2-Ka-gAx" id="QZC-w2-eDD"/> <outlet property="bottomView" destination="rW2-Ka-gAx" id="QZC-w2-eDD"/>
<outlet property="changTf" destination="5E2-xz-YWP" id="PZv-hI-SaR"/> <outlet property="changTf" destination="5E2-xz-YWP" id="PZv-hI-SaR"/>
...@@ -29,6 +30,9 @@ ...@@ -29,6 +30,9 @@
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Sh-qF-UK5"> <button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Sh-qF-UK5">
<rect key="frame" x="0.0" y="-92" width="414" height="1108"/> <rect key="frame" x="0.0" y="-92" width="414" height="1108"/>
<color key="backgroundColor" name="标题字颜色"/> <color key="backgroundColor" name="标题字颜色"/>
<connections>
<action selector="closeAction:" destination="-1" eventType="touchUpInside" id="ki1-Cn-gjP"/>
</connections>
</button> </button>
<view alpha="0.5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tDf-Te-gP3"> <view alpha="0.5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tDf-Te-gP3">
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/> <rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
...@@ -130,7 +134,7 @@ ...@@ -130,7 +134,7 @@
<constraint firstAttribute="width" constant="20" id="mRp-L3-0ok"/> <constraint firstAttribute="width" constant="20" id="mRp-L3-0ok"/>
</constraints> </constraints>
</imageView> </imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="oYB-7R-ZKc"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="0" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="oYB-7R-ZKc">
<rect key="frame" x="284" y="15" width="80" height="30"/> <rect key="frame" x="284" y="15" width="80" height="30"/>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<constraints> <constraints>
...@@ -342,7 +346,7 @@ ...@@ -342,7 +346,7 @@
<constraint firstAttribute="height" constant="20" id="VQb-9i-u8A"/> <constraint firstAttribute="height" constant="20" id="VQb-9i-u8A"/>
</constraints> </constraints>
</imageView> </imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="0.01" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="xT3-6M-vtU"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="1" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="xT3-6M-vtU">
<rect key="frame" x="284" y="15" width="80" height="30"/> <rect key="frame" x="284" y="15" width="80" height="30"/>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<constraints> <constraints>
...@@ -375,21 +379,27 @@ ...@@ -375,21 +379,27 @@
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OY2-Kj-DtJ"> <button opaque="NO" alpha="0.5" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OY2-Kj-DtJ">
<rect key="frame" x="374" y="15" width="30" height="30"/> <rect key="frame" x="374" y="15" width="30" height="30"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="30" id="6qt-S2-Th8"/> <constraint firstAttribute="width" constant="30" id="6qt-S2-Th8"/>
<constraint firstAttribute="height" constant="30" id="lGM-HW-82S"/> <constraint firstAttribute="height" constant="30" id="lGM-HW-82S"/>
</constraints> </constraints>
<connections>
<action selector="jiaJianMethod:" destination="-1" eventType="touchUpInside" id="rsg-7J-8Jx"/>
</connections>
</button> </button>
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3OQ-Ur-PSr"> <button opaque="NO" alpha="0.5" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3OQ-Ur-PSr">
<rect key="frame" x="244" y="15" width="30" height="30"/> <rect key="frame" x="244" y="15" width="30" height="30"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="30" id="eI4-bS-mqu"/> <constraint firstAttribute="width" constant="30" id="eI4-bS-mqu"/>
<constraint firstAttribute="height" constant="30" id="sqJ-Ed-vN2"/> <constraint firstAttribute="height" constant="30" id="sqJ-Ed-vN2"/>
</constraints> </constraints>
<connections>
<action selector="jiaJianMethod:" destination="-1" eventType="touchUpInside" id="sPM-tE-WWE"/>
</connections>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" name="白色背景色"/> <color key="backgroundColor" name="白色背景色"/>
...@@ -472,7 +482,7 @@ ...@@ -472,7 +482,7 @@
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/> <userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections> <connections>
<action selector="submitAction:" destination="-1" eventType="valueChanged" id="bci-rS-ceQ"/> <action selector="submitAction:" destination="-1" eventType="touchUpInside" id="pHA-Ms-I2k"/>
</connections> </connections>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i2O-Lc-NwB"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i2O-Lc-NwB">
...@@ -548,7 +558,7 @@ ...@@ -548,7 +558,7 @@
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="蓝色字体颜色"> <namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" 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>
...@@ -8,13 +8,56 @@ ...@@ -8,13 +8,56 @@
import UIKit import UIKit
class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource { class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,JiTuoWuXinXiViewDelegate,JiPaiFangShiViewControllerDelegate,ZengZhiServicesViewControllerDelegate{
var price:Float?
var commend = ""
func ZengZhiServicesViewControllerFinish(price: Float, content: String) {
self.price = price
commend = content
listView.reloadData()
}
var send:Int?
var receive:Int?
func JiPaiFangShiViewControllerDelegateFinish(send: Int, receive: Int, time: Double) {
self.send = send
self.receive = receive
listView.reloadData()
}
var itemName = ""
var tiJi:Float?
var weight:Float?
var count:Int?
var isCheck:Bool?
func JiTuoWuXinXiViewSubmit(itemName: String, tiJi: Float, weight: Float, count: Int, isCheck: Bool) {
self.itemName = itemName
self.tiJi = tiJi
self.weight = weight
self.count = count
self.isCheck = isCheck
jtwxxView?.removeFromSuperview()
jtwxxView = nil
listView.reloadData()
}
func JiTuoWuXinXiViewClose() {
jtwxxView?.removeFromSuperview()
jtwxxView = nil
}
var jtwxxView:JiTuoWuXinXiView? var jtwxxView:JiTuoWuXinXiView?
var selectBtn:UIButton? var selectBtn:UIButton?
let titleArr = ["物品寄托","寄派方式","增值服务","温控范围"] let titleArr = ["物品寄托","寄派方式","增值服务","温控范围"]
let title2Arr = ["关联订单号","关联平台"] let title2Arr = ["关联订单号","关联平台"]
@IBOutlet weak var priceLbl: UILabel! @IBOutlet weak var priceLbl: UILabel!
@IBAction func orderAction(_ sender: Any) { @IBAction func orderAction(_ sender: Any) {
} }
@IBOutlet weak var bottomView: UIView! @IBOutlet weak var bottomView: UIView!
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
...@@ -127,13 +170,21 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -127,13 +170,21 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
case 0: case 0:
if jtwxxView == nil { if jtwxxView == nil {
let view = JiTuoWuXinXiView(frame: self.view.bounds) let view = JiTuoWuXinXiView(frame: self.view.bounds)
view.delegate = self
self.view.addSubview(view) self.view.addSubview(view)
jtwxxView = view jtwxxView = view
} }
break break
case 1:break case 1:
default:break let vc = JiPaiFangShiViewController()
vc.delegate = self
self.navigationController?.pushViewController(vc, animated: true)
break
default:
let vc = ZengZhiServicesViewController()
vc.delegate = self
self.navigationController?.pushViewController(vc, animated: true)
break
} }
} }
} }
...@@ -167,9 +218,28 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -167,9 +218,28 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.introLbl.text = "(必填)" cell.introLbl.text = "(必填)"
cell.introLbl.textColor = UIColor(named: "蓝色字体颜色") cell.introLbl.textColor = UIColor(named: "蓝色字体颜色")
cell.introLbl.isHidden = false cell.introLbl.isHidden = false
if isCheck != nil {
cell.contentStr = itemName + "; \(count!)箱; \(weight!)kg"
}
}
if indexPath.row == 1 {
if send != nil {
var sendStr = "上门提货"
if send != 0 {
sendStr = "自送到库"
}
var receiveStr = "送货上门"
if receive != 0 {
receiveStr = "到库自取"
}
cell.contentStr = sendStr + "; " + receiveStr
}
} }
if indexPath.row == 2 { if indexPath.row == 2 {
cell.introLbl.isHidden = false cell.introLbl.isHidden = false
if price != nil {
cell.contentStr = "报价金额:\(price!)"
}
} }
if indexPath.row == 3 { if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withIdentifier: "WenDu") as! WenDuCell let cell = tableView.dequeueReusableCell(withIdentifier: "WenDu") as! WenDuCell
...@@ -177,7 +247,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -177,7 +247,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
return cell return cell
} }
cell.contentStr = "1"
return cell return cell
default: default:
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndOnlyBtn") as! TitleAndOnlyBtnCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndOnlyBtn") as! TitleAndOnlyBtnCell
......
...@@ -13,7 +13,6 @@ class YunDanXiangQingViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -13,7 +13,6 @@ class YunDanXiangQingViewController: BaseViewController,UITableViewDelegate,UITa
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
@IBOutlet weak var btmView: UIView! @IBOutlet weak var btmView: UIView!
let btnTitleArr = ["1","2","3"] let btnTitleArr = ["1","2","3"]
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
......
...@@ -7,18 +7,25 @@ ...@@ -7,18 +7,25 @@
// //
import UIKit import UIKit
protocol ZengZhiServicesViewControllerDelegate {
func ZengZhiServicesViewControllerFinish(price:Float,content:String)
}
class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndSelectCellDelegate,UITextViewDelegate{ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndSelectCellDelegate,UITextViewDelegate{
var delegate:ZengZhiServicesViewControllerDelegate?
//MARK: - 数据汇总提交 //MARK: - 数据汇总提交
@IBAction func submitAction(_ sender: Any) { @IBAction func submitAction(_ sender: Any) {
print("submit") print("submit")
print(selectIdx)//0 送货 1 清真 2 污染 if price.count == 0 {
print(fanHuanIdx)//0 无签单 1 纸质 2 电子 HUD.flash(.label("请输入报价金额"), delay: 1.2)
print(price)//报价金额 return
print(commend)//评论 }
let str = price as NSString
delegate?.ZengZhiServicesViewControllerFinish(price:str.floatValue, content: commend)
self.navigationController?.popViewController(animated: true)
} }
var titleArr = ["送货入仓","清真","易污染"] var titleArr = ["送货入仓","清真","易污染"]
...@@ -36,7 +43,7 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -36,7 +43,7 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
var selectIdx:Int? var selectIdx:Int?
var fanHuanIdx:Int? var fanHuanIdx = 0
var price:String = "" var price:String = ""
var commend:String = "" var commend:String = ""
override func viewDidLoad() { override func viewDidLoad() {
...@@ -56,10 +63,17 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -56,10 +63,17 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
textView.text = commend textView.text = commend
inputTF.addTarget(self, action: #selector(textViewEdit(sender:)), for: .allEditingEvents) inputTF.addTarget(self, action: #selector(textViewEdit(sender:)), for: .allEditingEvents)
inputTF.text = price inputTF.text = price
nBtn.isSelected = true switch fanHuanIdx {
nBtn.backgroundColor = UIColor(named: "蓝色字体颜色") case 0:
nBtn.layer.borderWidth = 0 nSet()
break
case 1:
pSet()
break
default:
eSet()
break
}
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
...@@ -109,14 +123,8 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -109,14 +123,8 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
holderLbl.isHidden = false holderLbl.isHidden = false
} }
} }
@IBAction func selectAction(_ sender: UIButton) {
fanHuanIdx = sender.tag func nSet(){
if sender == nBtn{
if nBtn.isSelected == true {
nBtn.isSelected = false
nBtn.backgroundColor = UIColor.clear
nBtn.layer.borderWidth = 1
}else{
pBtn.backgroundColor = UIColor.clear pBtn.backgroundColor = UIColor.clear
pBtn.isSelected = false pBtn.isSelected = false
pBtn.layer.borderWidth = 1 pBtn.layer.borderWidth = 1
...@@ -128,13 +136,7 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -128,13 +136,7 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
nBtn.backgroundColor = UIColor(named: "蓝色字体颜色") nBtn.backgroundColor = UIColor(named: "蓝色字体颜色")
nBtn.layer.borderWidth = 0 nBtn.layer.borderWidth = 0
} }
} func pSet(){
if sender == pBtn {
if pBtn.isSelected == true {
pBtn.isSelected = false
pBtn.backgroundColor = UIColor.clear
pBtn.layer.borderWidth = 1
}else{
nBtn.backgroundColor = UIColor.clear nBtn.backgroundColor = UIColor.clear
nBtn.isSelected = false nBtn.isSelected = false
nBtn.layer.borderWidth = 1 nBtn.layer.borderWidth = 1
...@@ -146,13 +148,7 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -146,13 +148,7 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
pBtn.backgroundColor = UIColor(named: "蓝色字体颜色") pBtn.backgroundColor = UIColor(named: "蓝色字体颜色")
pBtn.layer.borderWidth = 0 pBtn.layer.borderWidth = 0
} }
} func eSet(){
if sender == eBtn{
if eBtn.isSelected == true {
eBtn.isSelected = false
eBtn.backgroundColor = UIColor.clear
eBtn.layer.borderWidth = 1
}else{
nBtn.backgroundColor = UIColor.clear nBtn.backgroundColor = UIColor.clear
nBtn.isSelected = false nBtn.isSelected = false
nBtn.layer.borderWidth = 1 nBtn.layer.borderWidth = 1
...@@ -164,6 +160,34 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa ...@@ -164,6 +160,34 @@ class ZengZhiServicesViewController: BaseViewController,UITableViewDelegate,UITa
eBtn.backgroundColor = UIColor(named: "蓝色字体颜色") eBtn.backgroundColor = UIColor(named: "蓝色字体颜色")
eBtn.layer.borderWidth = 0 eBtn.layer.borderWidth = 0
} }
@IBAction func selectAction(_ sender: UIButton) {
fanHuanIdx = sender.tag
if sender == nBtn{
if nBtn.isSelected == true {
nBtn.isSelected = false
nBtn.backgroundColor = UIColor.clear
nBtn.layer.borderWidth = 1
}else{
nSet()
}
}
if sender == pBtn {
if pBtn.isSelected == true {
pBtn.isSelected = false
pBtn.backgroundColor = UIColor.clear
pBtn.layer.borderWidth = 1
}else{
pSet()
}
}
if sender == eBtn{
if eBtn.isSelected == true {
eBtn.isSelected = false
eBtn.backgroundColor = UIColor.clear
eBtn.layer.borderWidth = 1
}else{
eSet()
}
} }
} }
......
...@@ -7,9 +7,11 @@ ...@@ -7,9 +7,11 @@
// //
import UIKit import UIKit
protocol JiPaiFangShiViewControllerDelegate {
func JiPaiFangShiViewControllerDelegateFinish(send:Int,receive:Int,time:Double)
}
class JiPaiFangShiViewController: BaseViewController ,SendTimeSelectViewDeleagte{ class JiPaiFangShiViewController: BaseViewController ,SendTimeSelectViewDeleagte{
var delegate:JiPaiFangShiViewControllerDelegate?
var sendTimeView:SendTimeSelectView? var sendTimeView:SendTimeSelectView?
@IBAction func selectTimeAction(_ sender: UIButton) { @IBAction func selectTimeAction(_ sender: UIButton) {
if sendTimeView == nil { if sendTimeView == nil {
...@@ -19,6 +21,18 @@ class JiPaiFangShiViewController: BaseViewController ,SendTimeSelectViewDeleagte ...@@ -19,6 +21,18 @@ class JiPaiFangShiViewController: BaseViewController ,SendTimeSelectViewDeleagte
sendTimeView = view sendTimeView = view
} }
} }
@IBAction func submitAction(_ sender: Any) {
var send = 0
var receive = 0
if JLeftBtn.isSelected == false {
send = 1
}
if PLeftBtn.isSelected == false {
receive = 1
}
delegate?.JiPaiFangShiViewControllerDelegateFinish(send: send, receive: receive, time: 2)
self.navigationController?.popViewController(animated: true)
}
@IBOutlet weak var topView: UIView! @IBOutlet weak var topView: UIView!
@IBOutlet weak var PLBL: UILabel! @IBOutlet weak var PLBL: UILabel!
@IBOutlet weak var JLBL: UILabel! @IBOutlet weak var JLBL: UILabel!
......
<?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"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="JiPaiFangShiViewController" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="JiPaiFangShiViewController" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="JLBL" destination="aQt-1Y-nhZ" id="pve-cQ-ViP"/> <outlet property="JLBL" destination="aQt-1Y-nhZ" id="pve-cQ-ViP"/>
<outlet property="JLeftBtn" destination="HSp-eJ-pG9" id="suW-JW-uqO"/> <outlet property="JLeftBtn" destination="HSp-eJ-pG9" id="suW-JW-uqO"/>
...@@ -203,7 +204,7 @@ ...@@ -203,7 +204,7 @@
<color key="textColor" name="白色背景色"/> <color key="textColor" name="白色背景色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="件方式" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gcr-eI-ae4"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="件方式" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gcr-eI-ae4">
<rect key="frame" x="30" y="18" width="60" height="21"/> <rect key="frame" x="30" y="18" width="60" height="21"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="60" id="HuD-a9-gbb"/> <constraint firstAttribute="width" constant="60" id="HuD-a9-gbb"/>
...@@ -250,7 +251,7 @@ ...@@ -250,7 +251,7 @@
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="上门提货"> <state key="normal" title="送货上门">
<color key="titleColor" name="灰色字体颜色"/> <color key="titleColor" name="灰色字体颜色"/>
</state> </state>
<state key="selected" title="上门提货"> <state key="selected" title="上门提货">
...@@ -299,12 +300,15 @@ ...@@ -299,12 +300,15 @@
<color key="value" name="按钮渐变色下,字体颜色"/> <color key="value" name="按钮渐变色下,字体颜色"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/> <userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
<userDefinedRuntimeAttribute type="string" keyPath="titleString" value="保存"/> <userDefinedRuntimeAttribute type="string" keyPath="titleString" value="确定"/>
<userDefinedRuntimeAttribute type="number" keyPath="titleFontSize"> <userDefinedRuntimeAttribute type="number" keyPath="titleFontSize">
<real key="value" value="17"/> <real key="value" value="17"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="titleFontName" value="PingFangSC"/> <userDefinedRuntimeAttribute type="string" keyPath="titleFontName" value="PingFangSC"/>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections>
<action selector="submitAction:" destination="-1" eventType="touchUpInside" id="oie-pN-E9a"/>
</connections>
</view> </view>
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WUe-Rh-Z7p" customClass="LGButton" customModule="LGButton"> <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WUe-Rh-Z7p" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="862" width="414" height="60"/> <rect key="frame" x="0.0" y="862" width="414" height="60"/>
...@@ -354,7 +358,7 @@ ...@@ -354,7 +358,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>
<namedColor name="标题字颜色"> <namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
...@@ -366,7 +370,7 @@ ...@@ -366,7 +370,7 @@
<color red="1" green="0.68999999761581421" blue="0.47099998593330383" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="0.68999999761581421" blue="0.47099998593330383" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="灰色字体颜色"> <namedColor name="灰色字体颜色">
<color red="0.40000000596046448" green="0.40000000596046448" blue="0.40000000596046448" 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="白色背景色"> <namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......
...@@ -403,10 +403,9 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -403,10 +403,9 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changgeTabItem"), object: nil, userInfo: ["tag":1]) NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changgeTabItem"), object: nil, userInfo: ["tag":1])
return return
case 51: //品牌列表 case 51: //品牌列表
HUD.flash(.label("敬请期待"),delay: 1.2) // HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = PinPaiListViewController()
// let vc = PinPaiListViewController() self.navigationController?.pushViewController(vc, animated: true)
// self.navigationController?.pushViewController(vc, animated: true)
return return
case 53: //销售下单-代客下单 case 53: //销售下单-代客下单
let vc = DaiKeXiaDanGouWuViewController() let vc = DaiKeXiaDanGouWuViewController()
...@@ -523,7 +522,9 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -523,7 +522,9 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 89: //物流公司列表 case 89: //物流公司列表
HUD.flash(.label("敬请期待"),delay: 1.2) // HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = YDLBVc()
self.navigationController?.pushViewController(vc, animated: true)
return return
case 90: //下运单 case 90: //下运单
HUD.flash(.label("敬请期待"),delay: 1.2) HUD.flash(.label("敬请期待"),delay: 1.2)
......
...@@ -31,8 +31,8 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -31,8 +31,8 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
@IBOutlet weak var blackBtn: UIButton! @IBOutlet weak var blackBtn: UIButton!
@IBAction func closeAction(_ sender: UIButton) { @IBAction func closeAction(_ sender: UIButton) {
sender.isHidden = true preView.isHidden = !preView.isHidden
preView.isHidden = true blackBtn.isHidden = !blackBtn.isHidden
} }
var searchV : SearchBarView? = nil var searchV : SearchBarView? = nil
var datas:Array<Any> = [1,2] var datas:Array<Any> = [1,2]
...@@ -137,13 +137,17 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -137,13 +137,17 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
break break
case "确定": case "确定":
preView.isHidden = true preView.isHidden = true
blackBtn.isHidden = true
listView.mj_header?.beginRefreshing() listView.mj_header?.beginRefreshing()
break break
default: default:
break break
} }
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = XiaYunDanViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
@IBAction func timeSelectAction(_ sender: Any) { @IBAction func timeSelectAction(_ sender: Any) {
print("选择时间") print("选择时间")
...@@ -151,6 +155,7 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -151,6 +155,7 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
//MARK: - 加载数据 //MARK: - 加载数据
@objc func loadData(){ @objc func loadData(){
print("加载数据") print("加载数据")
removeBlackBtnView()
self.listView.mj_header?.endRefreshing() self.listView.mj_header?.endRefreshing()
} }
//MARK:--搜索模块 //MARK:--搜索模块
......
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