Commit 08380a7b authored by lujunye's avatar lujunye

阿斯顿发了静安寺了;断水;两地分居

parent 1badabca
......@@ -15,8 +15,27 @@ import SDWebImage
import IQKeyboardManagerSwift
class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,JiTuoWuXinXiViewDelegate,JiPaiFangShiViewControllerDelegate,ZengZhiServicesViewControllerDelegate,AdressSelectCellDelegate,DZGLViewControllerDelegate,XinZengDiZhiViewControllerDelegate,TitleAndTFBtnCellDelegate,WenDuCellDelegate,LogisticalSelectViewDelegate, UIPickerViewDataSource, UIPickerViewDelegate, GLAlertSelectViewDelegate,CLLocationManagerDelegate, CityListViewControllerDelegate,ToAndFormSelectViewControllerDelegate,WayBillAddressCanDelItemCellDelegate,HLLTopCellDelegate,OtherDemandViewControllerDelegate,OnlyViewCellDelegate, XiaDanUserInfoViewControllerDelegate, P_P_H_Time_Select_View_Delegate{
class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,JiTuoWuXinXiViewDelegate,JiPaiFangShiViewControllerDelegate,ZengZhiServicesViewControllerDelegate,AdressSelectCellDelegate,DZGLViewControllerDelegate,XinZengDiZhiViewControllerDelegate,TitleAndTFBtnCellDelegate,WenDuCellDelegate,LogisticalSelectViewDelegate, UIPickerViewDataSource, UIPickerViewDelegate, GLAlertSelectViewDelegate,CLLocationManagerDelegate, CityListViewControllerDelegate,ToAndFormSelectViewControllerDelegate,WayBillAddressCanDelItemCellDelegate,HLLTopCellDelegate,OtherDemandViewControllerDelegate,OnlyViewCellDelegate, XiaDanUserInfoViewControllerDelegate, P_P_H_Time_Select_View_Delegate,P_P_H_Adr_VC_Delegate{
func P_P_H_Adr_VC_Data(adrData: addPinPinOrder_adrInfo, isSend: Bool, idx: Int) {
if isSend {
if pph_send_arr.count == 0 {
pph_send_arr.append(adrData)
}else{
pph_send_arr.insert(adrData, at: idx)
pph_send_arr.remove(at: idx + 1)
}
// pph_listView.reloadSections([1], with: .none)
}else{
if pph_receive_arr.count == 0 {
pph_receive_arr.append(adrData)
}else{
pph_receive_arr.insert(adrData, at: idx)
pph_receive_arr.remove(at: idx + 1)
}
// pph_listView.reloadSections([2], with: .none)
}
pph_listView.reloadData()
}
var isPPH = false
//MARK: - 拼拼货
var pph_send_arr:Array<addPinPinOrder_adrInfo> = []
......@@ -1709,11 +1728,15 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
if indexPath.section == 1 && pph_send_arr.count == 0 {
let vc = P_P_H_Adr_VC()
vc.isSend = true
vc.delegate = self
vc.idx = indexPath.row
self.navigationController?.pushViewController(vc, animated: true)
}
if indexPath.section == 2 && pph_receive_arr.count == 0 {
let vc = P_P_H_Adr_VC()
vc.delegate = self
vc.idx = indexPath.row
self.navigationController?.pushViewController(vc, animated: true)
}
return
}
......@@ -2233,10 +2256,18 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.top_line.isHidden = true
}
if pph_send_arr.count == 0 {
cell.name_lbl.text = "添加装货点"
cell.name_lbl.textColor = UIColor(named: "多选按钮字体颜色")
cell.commend_lbl.removeFromSuperview()
cell.adr_lbl.removeFromSuperview()
cell.name_lbl.text = ""
cell.commend_lbl.text = ""
cell.adr_lbl.text = ""
}else{
cell.holder_lbl.isHidden = true
let model = pph_send_arr[indexPath.row]
cell.name_lbl.text = model.shopName
cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)"
cell.commend_lbl.text = model.note
if indexPath.row == pph_send_arr.count - 1 {
cell.add_btn.isHidden = false
}
}
return cell
}
......@@ -2248,10 +2279,19 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.btm_line.isHidden = true
}
if pph_receive_arr.count == 0 {
cell.name_lbl.text = "添加卸货点"
cell.name_lbl.textColor = UIColor(named: "多选按钮字体颜色")
cell.commend_lbl.removeFromSuperview()
cell.adr_lbl.removeFromSuperview()
cell.name_lbl.text = ""
cell.commend_lbl.text = ""
cell.adr_lbl.text = ""
cell.holder_lbl.text = "添加卸货点"
}else{
cell.holder_lbl.isHidden = true
let model = pph_receive_arr[indexPath.row]
cell.name_lbl.text = model.shopName
cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)"
cell.commend_lbl.text = model.note
if indexPath.row == pph_receive_arr.count - 1 {
cell.add_btn.isHidden = false
}
}
return cell
}
......
......@@ -11,10 +11,11 @@ import SwiftyJSON
protocol P_P_H_Adr_VC_Delegate {
func P_P_H_Adr_VC_Data(adrData:addPinPinOrder_adrInfo)
func P_P_H_Adr_VC_Data(adrData:addPinPinOrder_adrInfo,isSend:Bool,idx:Int)
}
class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerViewDataSource, UIPickerViewDelegate,UITextViewDelegate {
var isSend = false
var idx = 0
var delegate:P_P_H_Adr_VC_Delegate?
var adrInfo:addPinPinOrder_adrInfo?
@IBOutlet weak var count_lbl: UILabel!
......@@ -86,8 +87,8 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
"note":textTV.text as Any
]
adrInfo = addPinPinOrder_adrInfo(JSON: dict)
delegate?.P_P_H_Adr_VC_Data(adrData: adrInfo!)
delegate?.P_P_H_Adr_VC_Data(adrData: adrInfo!,isSend: isSend,idx: idx)
self.navigationController?.popViewController(animated: true)
}
@IBAction func map_select_loc(_ sender: Any) {
nameTf.resignFirstResponder()
......
......@@ -11,6 +11,7 @@ protocol Suc_LOG_Cell_Delegate {
func Suc_LOG_Cell_Add_Action(cell:Suc_LOG_Cell)
}
class Suc_LOG_Cell: UITableViewCell {
@IBOutlet weak var holder_lbl: UILabel!
var delegate:Suc_LOG_Cell_Delegate?
@IBAction func add_action(_ sender: UIButton) {
if add_btn.isHidden == false {
......
......@@ -49,7 +49,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="htU-bv-LVR">
<rect key="frame" x="47" y="35.5" width="326" height="36"/>
<rect key="frame" x="47" y="33.5" width="326" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="Yx9-dc-yUR"/>
</constraints>
......@@ -72,7 +72,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tIb-8c-DIc">
<rect key="frame" x="47" y="76.5" width="326" height="78.5"/>
<rect key="frame" x="47" y="72.5" width="326" height="82.5"/>
<attributedString key="attributedText">
<fragment content="备注:-">
<attributes>
......@@ -85,7 +85,7 @@
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="新增" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ymi-Cs-n6W">
<rect key="frame" x="403" y="35.5" width="40" height="20"/>
<rect key="frame" x="403" y="33.5" width="40" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="iW5-ya-SND"/>
<constraint firstAttribute="height" constant="20" id="yje-H8-B77"/>
......@@ -112,7 +112,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ulV-iw-bED">
<rect key="frame" x="398" y="20.5" width="50" height="50"/>
<rect key="frame" x="398" y="18.5" width="50" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="WZ8-uW-9CH"/>
<constraint firstAttribute="width" constant="50" id="ikZ-lf-GTW"/>
......@@ -121,9 +121,16 @@
<action selector="add_action:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="hVE-1F-eLF"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="添加装货点" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pyx-jS-ztN">
<rect key="frame" x="47" y="12" width="65" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="AAn-aO-nFM" secondAttribute="bottom" id="4jk-Ha-udl"/>
<constraint firstItem="pyx-jS-ztN" firstAttribute="leading" secondItem="ZYP-Oa-jcS" secondAttribute="trailing" constant="10" id="6uP-xR-y2L"/>
<constraint firstItem="Irg-02-L3a" firstAttribute="centerY" secondItem="ZYP-Oa-jcS" secondAttribute="centerY" id="8t9-4b-JtR"/>
<constraint firstAttribute="trailing" secondItem="htU-bv-LVR" secondAttribute="trailing" constant="85" id="96I-s0-3LU"/>
<constraint firstItem="ulV-iw-bED" firstAttribute="centerX" secondItem="ymi-Cs-n6W" secondAttribute="centerX" id="E8f-Zm-uoA"/>
......@@ -134,13 +141,14 @@
<constraint firstAttribute="trailing" secondItem="UzE-pS-esW" secondAttribute="trailing" id="QPU-TC-GGz"/>
<constraint firstItem="iGa-XE-p4p" firstAttribute="centerX" secondItem="ZYP-Oa-jcS" secondAttribute="centerX" id="YJe-et-CNc"/>
<constraint firstItem="ZYP-Oa-jcS" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="bBh-9M-X5r"/>
<constraint firstItem="pyx-jS-ztN" firstAttribute="centerY" secondItem="ZYP-Oa-jcS" secondAttribute="centerY" id="cl8-mm-0y0"/>
<constraint firstItem="Irg-02-L3a" firstAttribute="leading" secondItem="ZYP-Oa-jcS" secondAttribute="trailing" constant="10" id="dVV-dx-wbl"/>
<constraint firstItem="AAn-aO-nFM" firstAttribute="top" secondItem="ZYP-Oa-jcS" secondAttribute="bottom" id="dVv-uQ-60l"/>
<constraint firstItem="tIb-8c-DIc" firstAttribute="top" secondItem="htU-bv-LVR" secondAttribute="bottom" constant="5" id="fEk-iJ-Pbj"/>
<constraint firstItem="tIb-8c-DIc" firstAttribute="top" secondItem="htU-bv-LVR" secondAttribute="bottom" constant="3" id="fEk-iJ-Pbj"/>
<constraint firstAttribute="trailing" secondItem="ymi-Cs-n6W" secondAttribute="trailing" constant="15" id="glA-bw-n7d"/>
<constraint firstItem="tIb-8c-DIc" firstAttribute="width" secondItem="htU-bv-LVR" secondAttribute="width" id="hY9-LV-DPT"/>
<constraint firstItem="ZYP-Oa-jcS" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="hwW-mK-R4F"/>
<constraint firstItem="htU-bv-LVR" firstAttribute="top" secondItem="Irg-02-L3a" secondAttribute="bottom" constant="5" id="iq3-yz-Pa6"/>
<constraint firstItem="htU-bv-LVR" firstAttribute="top" secondItem="Irg-02-L3a" secondAttribute="bottom" constant="3" id="iq3-yz-Pa6"/>
<constraint firstItem="tIb-8c-DIc" firstAttribute="leading" secondItem="htU-bv-LVR" secondAttribute="leading" id="jIP-Sm-oiG"/>
<constraint firstAttribute="bottom" secondItem="UzE-pS-esW" secondAttribute="bottom" id="p7a-fw-Aj9"/>
<constraint firstItem="ymi-Cs-n6W" firstAttribute="top" secondItem="htU-bv-LVR" secondAttribute="top" id="rHW-7f-zhX"/>
......@@ -155,6 +163,7 @@
<outlet property="adr_lbl" destination="htU-bv-LVR" id="zlq-3w-Y7H"/>
<outlet property="btm_line" destination="AAn-aO-nFM" id="CWs-Su-zWN"/>
<outlet property="commend_lbl" destination="tIb-8c-DIc" id="sp4-pO-uhO"/>
<outlet property="holder_lbl" destination="pyx-jS-ztN" id="0wg-zG-wR4"/>
<outlet property="name_lbl" destination="Irg-02-L3a" id="0tX-bY-XaX"/>
<outlet property="status_lbl" destination="ZYP-Oa-jcS" id="9T0-8D-9Se"/>
<outlet property="top_line" destination="iGa-XE-p4p" id="hwo-Tt-Efg"/>
......@@ -172,6 +181,9 @@
<namedColor name="green">
<color red="0.23499999940395355" green="0.67799997329711914" blue="0.54100000858306885" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="个人中心灰色字体">
<color red="0.38823529411764707" green="0.38823529411764707" blue="0.38823529411764707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......
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