diff --git a/GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate b/GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate index c370a60172fc783c5ab12a037f7400895a3c6d30..58572726b3a18fe393f8da1ba91f19565f756202 100644 Binary files a/GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate and b/GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/GeliBusinessPlatform/SceneDelegate.swift b/GeliBusinessPlatform/SceneDelegate.swift index cfceae2c6e884231e50d48f586cf3709786b91d5..b36b34c279d1fa2a56b33d7927e89e2c968d5a79 100644 --- a/GeliBusinessPlatform/SceneDelegate.swift +++ b/GeliBusinessPlatform/SceneDelegate.swift @@ -46,7 +46,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg let vc = LoginViewController() vc.delegate = self let contentView = vc - +// // let vc = DaiKeXiaDanGouWuViewController() // let contentView = vc @@ -94,7 +94,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg // Create the SwiftUI view that provides the window contents. tabBarController.viewControllers = [v1, v2, v3, v4, v5] -// tabBarController.selectedIndex = 1 +// tabBarController.selectedIndex = 2 let contentView = tabBarController diff --git a/GeliBusinessPlatform/View/Cell/DKXDAdrCell.xib b/GeliBusinessPlatform/View/Cell/DKXDAdrCell.xib index c0ed6ab4f7413568b5b22101ad95b6ce62ce4607..66b81dd3d2eba6bb446de25b73c884607edeea4f 100644 --- a/GeliBusinessPlatform/View/Cell/DKXDAdrCell.xib +++ b/GeliBusinessPlatform/View/Cell/DKXDAdrCell.xib @@ -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="DKXDAdrCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> + <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="DKXDAdrCell" customModule="TestClass" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="375" height="70"/> <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"> diff --git "a/GeliBusinessPlatform/ViewController/\344\273\243\345\256\242\344\270\213\345\215\225\357\274\210\350\264\255\347\211\251\357\274\211/DaiKeXiaDanGouWuViewController.swift" "b/GeliBusinessPlatform/ViewController/\344\273\243\345\256\242\344\270\213\345\215\225\357\274\210\350\264\255\347\211\251\357\274\211/DaiKeXiaDanGouWuViewController.swift" index 73453608b03bc9503369b3b8ddfce910fa76e77c..e2dc0e59fcad558d40e265bf41d5fe4f46db6c77 100644 --- "a/GeliBusinessPlatform/ViewController/\344\273\243\345\256\242\344\270\213\345\215\225\357\274\210\350\264\255\347\211\251\357\274\211/DaiKeXiaDanGouWuViewController.swift" +++ "b/GeliBusinessPlatform/ViewController/\344\273\243\345\256\242\344\270\213\345\215\225\357\274\210\350\264\255\347\211\251\357\274\211/DaiKeXiaDanGouWuViewController.swift" @@ -10,7 +10,7 @@ import UIKit import IQKeyboardManagerSwift class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,UITableViewDelegate,DaiKeXiaDanFooterViewDelegate,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,DZGLViewControllerDelegate,XuanZeShangPinViewControllerDelegate,DaiKeXiaDanGouWuCellDelegate,GuanLianKehuVCDelegate{ - + let ddTypeArr = ["普通订å•","预售下å•"] let zfTypeArr = ["未付款","æ¬ æ¬¾","月结","已付款"] let zfWayArr = ["未支付","现金","转账(ç§ï¼‰","转账(公)","转账(微信)","转账(支付å®ï¼‰"] @@ -31,7 +31,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U var dj_payWay = 0//å®šé‡‘æ”¯ä»˜æ–¹å¼ var orderType:Int? //订å•类型 - var adrData:String?//åœ°å€æ•°æ® + var adrData:GetAddrsInfoDataModel?//åœ°å€æ•°æ® var glSelectView:GLAlertSelectView? = nil var footerView:DaiKeXiaDanFooterView? @@ -138,7 +138,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U if indexPath.row == 3 { let cell = tableView.dequeueReusableCell(withIdentifier: "DKXDAdrCell") as! DKXDAdrCell cell.nameLbl.text = p3Arr[indexPath.row] - cell.contentLbl.text = adrData + cell.contentLbl.text = "\(adrData?.consignee) \(adrData?.mobile)" + cell.adrLbl.text = adrData?.addr_cn cell.tag = indexPath.row return cell } @@ -229,6 +230,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U if indexPath.row == 3 || indexPath.row > 4{ if indexPath.row == 3 { let vc = DZGLViewController() + vc.cus_id = cusModel?.cus_id vc.isSelectMotion = true vc.delegate = self self.navigationController?.pushViewController(vc, animated: true) @@ -401,7 +403,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U } //MARK: - é€‰æ‹©åœ°å€ - func DZGLViewControllerSelect(data: String) { + func DZGLViewControllerSelect(data: GetAddrsInfoDataModel) { adrData = data listView.reloadData() } diff --git "a/GeliBusinessPlatform/ViewController/\345\234\260\345\235\200\347\256\241\347\220\206/DZGLViewController.swift" "b/GeliBusinessPlatform/ViewController/\345\234\260\345\235\200\347\256\241\347\220\206/DZGLViewController.swift" index 4bee1414a87202337097362b9a28a1ca1d487048..52a5275c1a59f00cab0e46da14739aa421e40bf1 100644 --- "a/GeliBusinessPlatform/ViewController/\345\234\260\345\235\200\347\256\241\347\220\206/DZGLViewController.swift" +++ "b/GeliBusinessPlatform/ViewController/\345\234\260\345\235\200\347\256\241\347\220\206/DZGLViewController.swift" @@ -10,17 +10,19 @@ import UIKit import SwipeCellKit import LGButton protocol DZGLViewControllerDelegate { - func DZGLViewControllerSelect(data:String) + func DZGLViewControllerSelect(data:GetAddrsInfoDataModel) } class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,SwipeTableViewCellDelegate{ var delegate:DZGLViewControllerDelegate? + var cus_id:Int? var isSelectMotion = false var selectIdx:IndexPath? + var adrInfo:GetAddrsInfoModel? @IBOutlet weak var btmLbl: UILabel! @IBOutlet weak var listView: UITableView! @IBOutlet weak var btmBtn: LGButton! @IBAction func btmClick(_ sender: Any) { - delegate?.DZGLViewControllerSelect(data: "abc") + delegate?.DZGLViewControllerSelect(data: (adrInfo?.data![selectIdx!.row])!) self.navigationController?.popViewController(animated: true) } @IBOutlet weak var btmLblHeight: NSLayoutConstraint! @@ -29,6 +31,15 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData navbar.title = "地å€ç®¡ç†" navbar.rightTitle = "新增" self.view.addSubview(navbar) + + let UserToken = UserDefaults.standard.value(forKey: "user_token") + getAddrsInfo(["user_token":UserToken,"cus_id":cus_id], success: { (data) in + self.adrInfo = data as! GetAddrsInfoModel + self.listView.reloadData() + }) { (error) in + + } + listView.separatorStyle = .none SetTopFrameView(view: listView, btmView: btmLbl) listView.register(UINib(nibName: "DiZhiGuanLiCell", bundle: nil), forCellReuseIdentifier: "DiZhiGuanLiCell") @@ -51,7 +62,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData self.navigationController?.pushViewController(vc, animated: true) } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 3 + if adrInfo != nil { + return (adrInfo?.data!.count)! + } + return 1 } func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 79 @@ -59,6 +73,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "DiZhiGuanLiCell") as! DiZhiGuanLiCell cell.delegate = self + let model = adrInfo?.data![indexPath.row] + cell.nameLbl.text = model?.consignee + cell.phoneLbl.text = model?.mobile + cell.adrLbl.text = model?.addr_cn if isSelectMotion == false { cell.btnH.constant = 0 cell.xValue.constant = 0