|
@@ -52,6 +52,7 @@ class OrderViewController: BaseViewController {
|
|
}
|
|
}
|
|
|
|
|
|
override func setupLayouts() {
|
|
override func setupLayouts() {
|
|
|
|
+
|
|
segmentedView.snp.makeConstraints { (make) in
|
|
segmentedView.snp.makeConstraints { (make) in
|
|
make.left.right.equalToSuperview()
|
|
make.left.right.equalToSuperview()
|
|
make.height.equalTo(44)
|
|
make.height.equalTo(44)
|
|
@@ -69,7 +70,6 @@ class OrderViewController: BaseViewController {
|
|
[weak self] (notification) in
|
|
[weak self] (notification) in
|
|
self?.orderListViewController?.orderPurchaseOrderListApi(page: 1)
|
|
self?.orderListViewController?.orderPurchaseOrderListApi(page: 1)
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
//1.初始化JXSegmentedView
|
|
//1.初始化JXSegmentedView
|
|
@@ -209,12 +209,14 @@ extension OrderViewController :JXSegmentedListContainerViewDataSource {
|
|
let vc = OrderRefunddetailsViewController()
|
|
let vc = OrderRefunddetailsViewController()
|
|
vc.refundNo = orderModel.refundNo
|
|
vc.refundNo = orderModel.refundNo
|
|
vc.orderRefunddetailsVCType = .order
|
|
vc.orderRefunddetailsVCType = .order
|
|
|
|
+ vc.orderStatus = orderModel.status
|
|
self.navigationController?.pushViewController(vc, animated: true)
|
|
self.navigationController?.pushViewController(vc, animated: true)
|
|
}
|
|
}
|
|
if button.titleLabel?.text == "去评价" {
|
|
if button.titleLabel?.text == "去评价" {
|
|
let vc1 = OrderCommentController()
|
|
let vc1 = OrderCommentController()
|
|
vc1.orderDetailModel = orderModel
|
|
vc1.orderDetailModel = orderModel
|
|
vc1.commentSuccessedBlock = {
|
|
vc1.commentSuccessedBlock = {
|
|
|
|
+ kOrderVCTypeAlliSRefresh = true
|
|
vc.orderPurchaseOrderListApi(page: 1)
|
|
vc.orderPurchaseOrderListApi(page: 1)
|
|
}
|
|
}
|
|
self.navigationController?.pushViewController(vc1, animated: true)
|
|
self.navigationController?.pushViewController(vc1, animated: true)
|
|
@@ -233,15 +235,23 @@ extension OrderViewController :JXSegmentedListContainerViewDataSource {
|
|
|
|
|
|
/// 取消订单
|
|
/// 取消订单
|
|
func orderPurchaseCloseApi(orderModel:OrderModel,vc: OrderListViewController) {
|
|
func orderPurchaseCloseApi(orderModel:OrderModel,vc: OrderListViewController) {
|
|
- SwiftMoyaNetWorkServiceOrder.shared().orderPurchaseCloseApi(patchNum: orderModel.patchNum ?? "") { (data) -> (Void) in
|
|
|
|
- vc.orderPurchaseOrderListApi(page: 1)
|
|
|
|
|
|
+
|
|
|
|
+ AlertSheetView.alert(title: "是否取消订单", cancelTitle: "取消", sureTitle: "确定", cancelBlock: nil) { (popupView, index, str) in
|
|
|
|
+ SwiftMoyaNetWorkServiceOrder.shared().orderPurchaseCloseApi(patchNum: orderModel.patchNum ?? "") { (data) -> (Void) in
|
|
|
|
+ kOrderVCTypeAlliSRefresh = true
|
|
|
|
+ vc.orderPurchaseOrderListApi(page: 1)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/// 确认收货
|
|
/// 确认收货
|
|
func orderPurchaseConfirmApi(orderModel:OrderModel,vc: OrderListViewController) {
|
|
func orderPurchaseConfirmApi(orderModel:OrderModel,vc: OrderListViewController) {
|
|
- SwiftMoyaNetWorkServiceOrder.shared().orderPurchaseConfirmApi(purchaseId: orderModel.id ?? 0) { (data) -> (Void) in
|
|
|
|
- vc.orderPurchaseOrderListApi(page: 1)
|
|
|
|
|
|
+ AlertSheetView.alert(title: "是否确认收货", cancelTitle: "取消", sureTitle: "确定", cancelBlock: nil) { (popupView, index, str) in
|
|
|
|
+ SwiftMoyaNetWorkServiceOrder.shared().orderPurchaseConfirmApi(purchaseId: orderModel.id ?? 0) { (data) -> (Void) in
|
|
|
|
+ kOrderVCTypeAlliSRefresh = true
|
|
|
|
+ vc.orderPurchaseOrderListApi(page: 1)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|