Commit e2a2c910 authored by lujunye's avatar lujunye

asdfasdfasdfasdfasdf

parent cb6a33cc
...@@ -23,11 +23,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -23,11 +23,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
func PaymentViewPassInputFinish(fullpass: String) { func PaymentViewPassInputFinish(fullpass: String) {
HUD.flash(.progress) HUD.flash(.progress)
pphPayment(["user_token":UserToken as Any,"wb_no":0 as Any,"pwd":fullpass as Any]) { (data) in pphPayment(["user_token":UserToken as Any,"wb_no":pph_wb_no as Any,"pwd":fullpass as Any]) {[self] (data) in
HUD.hide() HUD.hide()
self.navigationController?.popToRootViewController(animated: false)
let vc = PPH_SUC_VC()
// self.navigationController?.pushViewController(<#T##viewController: UIViewController##UIViewController#>, animated: <#T##Bool#>) vc.sendArr = pph_send_arr
vc.receiveArr = pph_receive_arr
self.navigationController?.pushViewController(vc, animated: true)
} failture: { (err) in } failture: { (err) in
} }
...@@ -37,25 +39,83 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -37,25 +39,83 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
var paymentView:PaymentView? var paymentView:PaymentView?
var res = -1 var res = -1
var pph_wb_no = ""
@IBAction func PPH_PayAction(_ sender: Any) { @IBAction func PPH_PayAction(_ sender: Any) {
if totalPrice.count > 0 { if totalPrice.count > 0 {
switch res { switch res {
case 1://未开通格利支付 case 1://未开通格利支付
let view = WXTS_View(frame: self.view.bounds)
self.view.addSubview(view)
break break
case 2://未设置支付密码 case 2://未设置支付密码
HUD.flash(.label("请设置支付密码"), delay: 1.2)
break break
case 3://资金不足额 case 3://资金不足额
let view = WXTS_View(frame: self.view.bounds) HUD.flash(.label("资金余额不足"), delay: 1.2)
self.view.addSubview(view)
break break
case 4://资金足额 case 4://资金足额
if paymentView == nil{
paymentView = PaymentView(frame: view.bounds)
paymentView?.delegate = self var tempArr:Array<addPinPinOrder_adrInfo> = []
paymentView?.price = (totalPrice as NSString).floatValue pph_send_arr.forEach { (item) in
view.addSubview(paymentView!) tempArr.append(item)
}
pph_receive_arr.forEach { (item) in
tempArr.append(item)
} }
tempArr.first?.type = "1"
tempArr.last?.type = "2"
var infos:Array<Any> = []
tempArr.forEach { (item) in
let info = [
"province_name":item.province_name as Any,
"city_name":item.city_name as Any,
"district_name":item.district_name as Any,
"street_name":item.street_name as Any,
"linkman":item.linkman as Any,
"shopName":item.street_name as Any,
"mobile":item.mobile as Any,
"type":item.type as Any,
"lng":item.lng as Any,
"lat":item.lat as Any,
"note":item.note as Any
]
infos.append(info)
}
let infosData = dataChangeString(sender: infos)
let dfmatter = DateFormatter()
dfmatter.dateFormat="yyyy-MM-dd hh:mm:ss"
let date = dfmatter.date(from: pph_time + ":00")
let dateStamp:TimeInterval = date!.timeIntervalSince1970
let dateSt = CLongLong(round(dateStamp*1000))
let dict = ["user_token":UserToken as Any,
"uid":pphCarTypesArr[pph_selectCarType].id as Any,
"price":totalPrice as Any,
"orderType":1 as Any,
"startDate":dateSt as Any,
"demo":"" as Any,
"typeid":pphCarTypesArr[pph_selectCarType].type as Any,
"tailplate":0 as Any,
"addinfos":infosData as Any
]
addPinPinOrder(dict) {[self] (data) in
let model = data as! addPinPinOrder_model
self.pph_wb_no = (model.data?.wb_no)!
if paymentView == nil{
paymentView = PaymentView(frame: view.bounds)
paymentView?.delegate = self
paymentView?.price = (totalPrice as NSString).floatValue
view.addSubview(paymentView!)
}
} failture: { (err) in
}
break break
default: default:
break break
...@@ -146,13 +206,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -146,13 +206,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
var pph_time = "" var pph_time = ""
func P_P_H_Time_Select_View_Time_Select(time: String) { func P_P_H_Time_Select_View_Time_Select(time: String) {
pph_time = time pph_time = time
print("time == ",pph_time)
let dfmatter = DateFormatter()
dfmatter.dateFormat="yyyy-MM-dd hh:mm:ss"
let date = dfmatter.date(from: pph_time + ":00")
let dateStamp:TimeInterval = date!.timeIntervalSince1970
let dateSt = CLongLong(round(dateStamp*1000))
print("时间戳",dateSt)
pph_listView.reloadData() pph_listView.reloadData()
} }
......
...@@ -9,7 +9,16 @@ ...@@ -9,7 +9,16 @@
import UIKit import UIKit
class PPH_SUC_VC: BaseViewController,UITableViewDelegate,UITableViewDataSource { class PPH_SUC_VC: BaseViewController,UITableViewDelegate,UITableViewDataSource {
var sendArr:Array<addPinPinOrder_adrInfo>?
var receiveArr:Array<addPinPinOrder_adrInfo>?
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 1 {
return sendArr!.count
}
if section == 2 {
return receiveArr!.count
}
return 1 return 1
} }
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
...@@ -28,6 +37,8 @@ class PPH_SUC_VC: BaseViewController,UITableViewDelegate,UITableViewDataSource { ...@@ -28,6 +37,8 @@ class PPH_SUC_VC: BaseViewController,UITableViewDelegate,UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: "Suc_LOG_Cell") as! Suc_LOG_Cell let cell = tableView.dequeueReusableCell(withIdentifier: "Suc_LOG_Cell") as! Suc_LOG_Cell
if indexPath.section == 1 { if indexPath.section == 1 {
cell.status_lbl.text = "装"
cell.status_lbl.backgroundColor = UIColor(named: "green")
if indexPath.row == 0 { if indexPath.row == 0 {
cell.top_line.isHidden = true cell.top_line.isHidden = true
} }
...@@ -35,13 +46,17 @@ class PPH_SUC_VC: BaseViewController,UITableViewDelegate,UITableViewDataSource { ...@@ -35,13 +46,17 @@ class PPH_SUC_VC: BaseViewController,UITableViewDelegate,UITableViewDataSource {
if indexPath.section == 2 { if indexPath.section == 2 {
cell.status_lbl.text = "卸" cell.status_lbl.text = "卸"
cell.status_lbl.backgroundColor = UIColor(named: "#FAA376") cell.status_lbl.backgroundColor = UIColor(named: "#FAA376")
if indexPath.row == 0 { if indexPath.row == receiveArr!.count - 1 {
cell.btm_line.isHidden = true cell.btm_line.isHidden = true
} }
} }
return cell return cell
} }
override func backAction() {
self.navigationController?.popToRootViewController(animated: true)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 { if indexPath.section == 0 {
return 201 return 201
......
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