Commit 4c9b4728 authored by 刘俊宏's avatar 刘俊宏

处理订单详情ing

parent 6ed9edd9
......@@ -4,6 +4,22 @@
<FileRef
location = "group:GeliBusinessPlatform.xcodeproj">
</FileRef>
<Group
location = "group:GeliBusinessPlatform/Model/../.."
name = "Products">
<FileRef
location = "build:GeliBusinessPlatform.app"
assignedFileDataType = "com.apple.application-bundle">
</FileRef>
<FileRef
location = "build:GeliBusinessPlatformTests.xctest"
assignedFileDataType = "com.apple.xcode.cfbundle">
</FileRef>
<FileRef
location = "build:GeliBusinessPlatformUITests.xctest"
assignedFileDataType = "com.apple.xcode.cfbundle">
</FileRef>
</Group>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
......
......@@ -161,6 +161,12 @@ class OrderDetailSaleResModel: Mappable {
var wk_pay_type : Int?
var wk_pay_status : Int? //尾款支付状态:0未付款; 1已付款 2退款
var dj_pay_status_cn : String? //定金支付状态(中文)
var wk_pay_status_cn : String? //尾款支付状态(中文)
// var wk_amount : String? //尾款金额
// var wk_amount : String? //尾款金额
required init?( map: Map) {
}
......@@ -181,7 +187,8 @@ class OrderDetailSaleResModel: Mappable {
wk_amount <- map["wk_amount"]
wk_pay_type <- map["wk_pay_type"]
wk_pay_status <- map["wk_pay_status"]
dj_pay_status_cn <- map["dj_pay_status_cn"]
wk_pay_status_cn <- map["wk_pay_status_cn"]
}
}
......
......@@ -487,7 +487,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break
case 7:
if isYuShou {
cell.contentLbl.text = StringByInt(number: (self.dataMdoel?.order_res?.sale_res?.dj_pay_status!)!)
cell.contentLbl.text = self.dataMdoel?.order_res?.sale_res?.dj_pay_status_cn
}else{
cell.contentLbl.text = self.dataMdoel?.order_res?.pay_status_cn
......@@ -504,7 +504,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
break
case 9:
cell.contentLbl.text = StringByInt(number: (self.dataMdoel?.order_res?.sale_res?.wk_pay_status!)!)
cell.contentLbl.text = self.dataMdoel?.order_res?.sale_res?.wk_pay_status_cn
cell.arrowImg.isHidden = true
break
default:
......@@ -695,42 +695,71 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
if view.titleLbl.text == "请选择定金支付方式"{
dj_payWay = selectNum
var pay_type = 0
if selectNum == 1 {
pay_type = 7
}else if selectNum > 1 {
pay_type = selectNum + 7
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
editPayType(["user_token":UserToken as Any,"order_id":orderId as Any,"is_adsale":1 as Any,"amount_type":1 as Any,"pay_type":pay_type], success: { (data) in
let dataM = data as! UpDataModel
if dataM.code == 1 {
self.dj_payWay = selectNum
// self.dataMdoel?.order_res?.pay_type_cn = self.zhiFuFangShiArr[selectNum]
self.listView.reloadData()
}
}) { (error) in
}
}
if view.titleLbl.text == "请选择定尾款支付方式"{
wk_payWay = selectNum
var pay_type = 0
if selectNum == 1 {
pay_type = 7
}else if selectNum > 1 {
pay_type = selectNum + 7
}
if view.titleLbl.text == "请选择支付方式" {
//MARK:--选择支付方式回调
let UserToken = UserDefaults.standard.value(forKey: "user_token")
var is_adsale = 0
var amount_type = 0
if isYuShou {
is_adsale = 1
if self.dataMdoel?.order_res?.sale_res != nil {
if self.dataMdoel?.order_res?.sale_res?.dj_pay_status == 0 {
amount_type = 1
editPayType(["user_token":UserToken as Any,"order_id":orderId as Any,"is_adsale":1 as Any,"amount_type":2 as Any,"pay_type":pay_type], success: { (data) in
let dataM = data as! UpDataModel
if dataM.code == 1 {
self.wk_payWay = selectNum
// self.dataMdoel?.order_res?.pay_type_cn = self.zhiFuFangShiArr[selectNum]
self.listView.reloadData()
}else if self.dataMdoel?.order_res?.sale_res?.wk_pay_status == 0 {
amount_type = 2
}
}
}) { (error) in
}
}
if view.titleLbl.text == "请选择支付方式" {
//MARK:--选择支付方式回调
var pay_type = 0
if selectNum == 1 {
pay_type = 7
}else if selectNum > 1 {
pay_type = selectNum + 7
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
editPayType(["user_token":UserToken as Any,"order_id":orderId as Any,"is_adsale":is_adsale as Any,"amount_type":amount_type,"pay_type":pay_type], success: { (data) in
editPayType(["user_token":UserToken as Any,"order_id":orderId as Any,"is_adsale":0 as Any,"amount_type":0 as Any,"pay_type":pay_type], success: { (data) in
let dataM = data as! UpDataModel
if dataM.code == 1 {
self.zhiFuSelect = selectNum
self.dataMdoel?.order_res?.pay_type_cn = self.zhiFuFangShiArr[selectNum]
if selectNum == 0 {
self.dataMdoel?.order_res?.pay_status_cn = "未支付"
}else{
self.dataMdoel?.order_res?.pay_status_cn = "已支付"
}
self.listView.reloadData()
}
......
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