Commit 3b3f13ef authored by lujunye's avatar lujunye

预售详情价格限制解除。图片显示

parent 4c7d506f
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" 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"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
......@@ -10,7 +10,7 @@
<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="GuanLianKeHuCell" customModule="GeliBusinessPlatform" customModuleProvider="target">
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="GuanLianKeHuCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<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">
......
......@@ -97,25 +97,19 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥260.00*12" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X1B-vl-mvy">
<rect key="frame" x="115" y="87" width="225" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="QaD-aA-NKf"/>
</constraints>
<rect key="frame" x="115" y="87" width="61.5" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥51153.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rio-TZ-iyo">
<rect key="frame" x="120" y="83.5" width="235" height="18.5"/>
<constraints>
<constraint firstAttribute="height" constant="18.5" id="TMJ-sw-oCU"/>
</constraints>
<rect key="frame" x="291.5" y="86" width="63.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥51153.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JyG-Tf-6Jd">
<rect key="frame" x="291.5" y="60" width="63.5" height="18.5"/>
<rect key="frame" x="291.5" y="65.5" width="63.5" height="18.5"/>
<constraints>
<constraint firstAttribute="height" constant="18.5" id="11o-H0-KIf"/>
</constraints>
......@@ -127,23 +121,21 @@
<constraints>
<constraint firstAttribute="trailing" secondItem="HYf-UQ-mHg" secondAttribute="trailing" constant="17" id="1et-A0-Mm7"/>
<constraint firstItem="4lb-rz-I6F" firstAttribute="centerY" secondItem="AWX-Qu-0ML" secondAttribute="centerY" id="6mE-8H-dPD"/>
<constraint firstAttribute="trailingMargin" secondItem="Rio-TZ-iyo" secondAttribute="trailing" id="Bgy-0b-yb6"/>
<constraint firstItem="4lb-rz-I6F" firstAttribute="centerX" secondItem="AWX-Qu-0ML" secondAttribute="centerX" id="DtW-X9-NRk"/>
<constraint firstItem="Rio-TZ-iyo" firstAttribute="top" secondItem="JyG-Tf-6Jd" secondAttribute="bottom" constant="5" id="H2a-ha-CdE"/>
<constraint firstItem="Rio-TZ-iyo" firstAttribute="bottom" secondItem="X1B-vl-mvy" secondAttribute="bottom" id="JcG-ly-QUv"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="top" secondItem="LBB-wB-bMd" secondAttribute="bottom" constant="5" id="LHs-KQ-EQ3"/>
<constraint firstItem="AWX-Qu-0ML" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="PkW-SQ-lMP"/>
<constraint firstItem="AWX-Qu-0ML" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="QkU-Fn-YVB"/>
<constraint firstItem="ftv-xQ-eXW" firstAttribute="trailing" secondItem="AWX-Qu-0ML" secondAttribute="trailing" constant="7.5" id="R1R-mm-RvM"/>
<constraint firstItem="JyG-Tf-6Jd" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="SVb-FW-34b"/>
<constraint firstAttribute="trailingMargin" secondItem="LBB-wB-bMd" secondAttribute="trailing" constant="15" id="U69-j9-gAo"/>
<constraint firstItem="HYf-UQ-mHg" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="top" id="UBt-NG-mg3"/>
<constraint firstAttribute="trailingMargin" secondItem="X1B-vl-mvy" secondAttribute="trailing" constant="15" id="ZfW-BJ-Tbo"/>
<constraint firstItem="JyG-Tf-6Jd" firstAttribute="centerY" secondItem="LBB-wB-bMd" secondAttribute="centerY" id="VRZ-vw-R2N"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="leading" secondItem="AWX-Qu-0ML" secondAttribute="trailing" constant="10" id="WdY-8o-EY3"/>
<constraint firstItem="Rio-TZ-iyo" firstAttribute="centerY" secondItem="X1B-vl-mvy" secondAttribute="centerY" id="cI2-3e-S0C"/>
<constraint firstItem="ftv-xQ-eXW" firstAttribute="top" secondItem="AWX-Qu-0ML" secondAttribute="top" constant="-7.5" id="cI7-D0-svp"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="leading" secondItem="LBB-wB-bMd" secondAttribute="leading" id="e85-Lu-Hze"/>
<constraint firstItem="Rio-TZ-iyo" firstAttribute="trailing" secondItem="JyG-Tf-6Jd" secondAttribute="trailing" id="gQN-11-nsF"/>
<constraint firstItem="LBB-wB-bMd" firstAttribute="top" secondItem="HYf-UQ-mHg" secondAttribute="bottom" constant="15" id="hvm-bz-LS0"/>
<constraint firstItem="eKc-LO-OD0" firstAttribute="centerX" secondItem="ftv-xQ-eXW" secondAttribute="centerX" id="igK-BR-aYW"/>
<constraint firstItem="Rio-TZ-iyo" firstAttribute="leading" secondItem="AWX-Qu-0ML" secondAttribute="trailing" constant="15" id="mNa-xR-0Gn"/>
<constraint firstItem="X1B-vl-mvy" firstAttribute="top" secondItem="LBB-wB-bMd" secondAttribute="bottom" constant="5" id="oPf-g5-F2k"/>
<constraint firstAttribute="bottom" secondItem="oAm-E1-HwQ" secondAttribute="bottom" id="p0n-TC-Jkb"/>
<constraint firstItem="eKc-LO-OD0" firstAttribute="centerY" secondItem="ftv-xQ-eXW" secondAttribute="centerY" id="p3f-uk-i51"/>
<constraint firstItem="oAm-E1-HwQ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="qMJ-nI-cSg"/>
......
<?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"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<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="ProductDetailViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ProductDetailViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="lgBtnLbl" destination="oKy-CJ-Gra" id="S78-zK-4bF"/>
<outlet property="listTbv" destination="IHM-ED-ttx" id="eEK-bu-GOf"/>
......
......@@ -140,7 +140,13 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
let rowModel = self.dataArr[indexPath.row]
cell.senderLbl.text = rowModel.cus_name
if rowModel.user_name == nil {
cell.arrowImg.isHidden = true
cell.receiverLbl.text = ""
}else{
cell.arrowImg.isHidden = false
cell.receiverLbl.text = rowModel.user_name
}
if rowModel.cus_type == 1 {
cell.personLbl.isHidden = false
cell.companyLbl.isHidden = true
......
......@@ -29,6 +29,7 @@ class XiuGaiYuShouJiaViewController: BaseViewController, UITextFieldDelegate {
@IBOutlet weak var detailLbl: UILabel!
@IBOutlet weak var titleLbl: UILabel!
@IBOutlet weak var submitBtn: LGButton!
var imgUrlstr = ""
override func viewDidLoad() {
super.viewDidLoad()
......@@ -50,7 +51,7 @@ class XiuGaiYuShouJiaViewController: BaseViewController, UITextFieldDelegate {
dingJinTF.text = dataModel?.order_res?.sale_res?.dj_amount
weiKuanTF.text = dataModel?.order_res?.sale_res?.wk_amount
countLbl.text = "¥" + (dataModel?.order_res?.goods_amount)!
icomImg.sd_setImage(with: URL(string:imgUrlstr))
}
}else{
//MARK:--代客下单流程
......@@ -77,7 +78,7 @@ class XiuGaiYuShouJiaViewController: BaseViewController, UITextFieldDelegate {
}
func textFieldDidEndEditing(_ textField: UITextField) {
if textField.tag == 1001 {
print(dingJinTF.text)
// print(dingJinTF.text)
let dingj = dingJinTF.text! as NSString
if isPurnNumber(str: dingJinTF.text!) {
if dingj.floatValue > (totalPrice! * 0.2) {
......@@ -86,29 +87,28 @@ class XiuGaiYuShouJiaViewController: BaseViewController, UITextFieldDelegate {
}else{
dingJinTF.text = String(format: "%.2f", dingj.floatValue)
}
let lastDj = dingJinTF.text! as NSString
let weiku = totalPrice! - lastDj.floatValue
weiKuanTF.text = String(format: "%.2f",weiku)
// let lastDj = dingJinTF.text! as NSString
// let weiku = totalPrice! - lastDj.floatValue
// weiKuanTF.text = String(format: "%.2f",weiku)
}else{
HUD.flash(.label("请填写正确的定金数值"),delay: 1.2)
dingJinTF.text = ""
}
}else if textField.tag == 1002{
print(weiKuanTF.text)
let weiku = weiKuanTF.text! as NSString
if isPurnNumber(str: weiKuanTF.text!) {
if weiku.floatValue > totalPrice! {
HUD.flash(.label("尾款不得高于总价"),delay: 1.2)
weiKuanTF.text = String(format: "%.2f", totalPrice!)
}else if weiku.floatValue < (totalPrice! * 0.8){
HUD.flash(.label("尾款不得低于总价的80%"),delay: 1.2)
weiKuanTF.text = String(format: "%.2f", (totalPrice! * 0.8))
}else{
// if weiku.floatValue > totalPrice! {
// HUD.flash(.label("尾款不得高于总价"),delay: 1.2)
// weiKuanTF.text = String(format: "%.2f", totalPrice!)
// }else if weiku.floatValue < (totalPrice! * 0.8){
// HUD.flash(.label("尾款不得低于总价的80%"),delay: 1.2)
// weiKuanTF.text = String(format: "%.2f", (totalPrice! * 0.8))
// }else{
weiKuanTF.text = String(format: "%.2f", weiku.floatValue)
}
let lastWeiku = weiKuanTF.text! as NSString
let dingj = totalPrice! - lastWeiku.floatValue
dingJinTF.text = String(format: "%.2f",dingj)
// }
// let lastWeiku = weiKuanTF.text! as NSString
// let dingj = totalPrice! - lastWeiku.floatValue
// dingJinTF.text = String(format: "%.2f",dingj)
}else{
HUD.flash(.label("请填写正确的尾款数值"),delay: 1.2)
weiKuanTF.text = ""
......@@ -120,15 +120,15 @@ class XiuGaiYuShouJiaViewController: BaseViewController, UITextFieldDelegate {
@IBAction func submitACTION(_ sender: Any) {
print("预售返回上一级且提交了数据")
let weiku = weiKuanTF.text! as NSString
let dingj = dingJinTF.text! as NSString
// let weiku = weiKuanTF.text! as NSString
// let dingj = dingJinTF.text! as NSString
// if (weiku.floatValue + dingj.floatValue)
// != totalPrice {
// let total = String(format: "%.2f", totalPrice!)
// HUD.flash(.label("填写的定金和尾款总价应为" + total),delay: 1.2)
// return;
// }
if (weiku.floatValue + dingj.floatValue)
!= totalPrice {
let total = String(format: "%.2f", totalPrice!)
HUD.flash(.label("填写的定金和尾款总价应为" + total),delay: 1.2)
return;
}
if orderID != 0 {
//MARK:--需要对输入是否为金额判断
let UserToken = UserDefaults.standard.value(forKey: "user_token")
......
......@@ -150,6 +150,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
vc.delegate = self
vc.dataModel = self.dataMdoel
vc.orderID = self.orderId
let rowModel = self.dataMdoel?.order_goods!.first
vc.imgUrlstr = SERVERCE_ImageHost + (rowModel?.goods_thumb)!
let goodsAmount = (self.dataMdoel?.order_res?.goods_amount!)! as NSString
vc.totalPrice = goodsAmount.floatValue
self.navigationController?.pushViewController(vc, animated: true)
......
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