Commit 1746c0dc authored by 刘俊宏's avatar 刘俊宏

完善订单详情修改(待测试完善)

parent 728e2eae
......@@ -466,6 +466,7 @@
F9DDBE922457BFEC00A32CB2 /* HUDEXT.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9DDBE912457BFEC00A32CB2 /* HUDEXT.swift */; };
F9DDBE962457D3EC00A32CB2 /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9DDBE942457D3EC00A32CB2 /* WebViewController.swift */; };
F9DDBE972457D3EC00A32CB2 /* WebViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9DDBE952457D3EC00A32CB2 /* WebViewController.xib */; };
F9FF7BA124760DA9006E305E /* LogisticsCompanyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9FF7BA024760DA9006E305E /* LogisticsCompanyModel.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -1008,6 +1009,7 @@
F9DDBE912457BFEC00A32CB2 /* HUDEXT.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HUDEXT.swift; sourceTree = "<group>"; };
F9DDBE942457D3EC00A32CB2 /* WebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewController.swift; sourceTree = "<group>"; };
F9DDBE952457D3EC00A32CB2 /* WebViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WebViewController.xib; sourceTree = "<group>"; };
F9FF7BA024760DA9006E305E /* LogisticsCompanyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogisticsCompanyModel.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -2219,6 +2221,7 @@
F93E31F624721C4200524DFC /* EditOGPAdModel.swift */,
F9A0E1DC246D198B00D7F26F /* CusListAllModel.swift */,
F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */,
F9FF7BA024760DA9006E305E /* LogisticsCompanyModel.swift */,
);
path = OrderManageModel;
sourceTree = "<group>";
......@@ -2888,6 +2891,7 @@
E0D197C22448431C002B080C /* BabyRhythm.m in Sources */,
F956D5A1246A2D9C003FF510 /* LMNToolBar.m in Sources */,
F950FDDC24518B9500C40530 /* FSCalendar.m in Sources */,
F9FF7BA124760DA9006E305E /* LogisticsCompanyModel.swift in Sources */,
E0206327246CD84A007A40C4 /* TitleAndLblView.swift in Sources */,
F942A7FD247500C300FDFC47 /* TestClass.swift in Sources */,
F950FDD824518B9500C40530 /* FSCalendarDelegationProxy.m in Sources */,
......
......@@ -68,6 +68,8 @@
<string>Order/orderReturnedGoodsAd</string>
<key>修改订单支付方式(状态)</key>
<string>Order/editPayType</string>
<key>获取物流公司信息</key>
<string>Order/logisticsCompany</string>
<key>获取客户信息</key>
<string>Customer/cusListAll</string>
<key>获取商品信息</key>
......
......@@ -254,3 +254,18 @@ func cusListAll(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture
failture(error)
}
}
//MARK:--获取物流公司信息
/**
params-key:
user_token(验证token)
*/
func logisticsCompany(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("获取物流公司信息", params, { (rep:DataResponse<LogisticsCompanyModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//
// LogisticsCompanyModel.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/5/21.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
//获取物流公司信息
class LogisticsCompanyModel: Mappable {
var code:Int?
var message : String?
var data : Array<LogisticsCompanyDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class LogisticsCompanyDataModel: Mappable {
var lc_id : Int? //物流公司id
var lc_name : String? //物流公司名
required init?( map: Map) {
}
func mapping(map: Map) {
lc_id <- map["lc_id"]
lc_name <- map["lc_name"]
}
}
......@@ -216,6 +216,9 @@
{
[self.textView exportHTML:^(BOOL succeed, NSString *html) {
NSLog(@"html:\n%@", [NSString stringWithFormat:@"<html>%@</html>",html]);
LMNWebViewController *vc = [[LMNWebViewController alloc]init];
vc.html = [NSString stringWithFormat:@"<html>%@</html>",html];
[self.navigationController pushViewController:vc animated:YES];
}];
}
......
......@@ -42,16 +42,16 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
}
//MARK:--loginVC
func addLoginVc (isAgain:Bool){
//
// let vc = LoginViewController()
// vc.delegate = self
// let contentView = vc
let vc = LoginViewController()
vc.delegate = self
let contentView = vc
let vc = LMNoteViewController()
//
let contentView = vc
// let vc = LMNoteViewController()
// //
// let contentView = vc
if let windowScene = sceneC as? UIWindowScene {
......@@ -98,7 +98,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 = 1
let contentView = tabBarController
......
......@@ -429,12 +429,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
if isTrue {
//"下架"
print("下架下架下架")
// editField(["user_token":"","function_id":"15","prval":"goods_id","value":"0",], success: { (data) in
// self.loadData()
// }) { (erro) in
//
// }
}else{
}else{
//"入库"
print("入库--入库")
......@@ -446,12 +441,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}else{
//"上架"
print("上架上架上架上架")
// editField(["user_token":"","function_id":"15","prval":rowModel.goods_id,"value":"1",], success: { (data) in
// self.loadData()
// }) { (erro) in
//
// }
}
}
}
......
......@@ -46,10 +46,12 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
let order_goods = dataChangeString(sender: order_goodsArr!)
editOrderGoodsPrice(["user_token":UserToken as Any,"order_id":orderID as Any,"order_goods":order_goods], success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "修改成功"), delay: 1.2)
self.delegate?.changeGoodsPriByData(sender: self.dataArr!)
self.navigationController?.popViewController(animated: true)
let dataM = data as! UpDataModel
if dataM.code == 1 {
self.delegate?.changeGoodsPriByData(sender: self.dataArr!)
self.navigationController?.popViewController(animated: true)
}
}) { (error) in
......
......@@ -10,6 +10,7 @@ import UIKit
import ViewAnimator
class ShowAlGoodsViewController: BaseViewController , UITableViewDelegate, UITableViewDataSource{
var order_goods:Array<OrderDetailGoodsModel>? = []
override func viewDidLoad() {
super.viewDidLoad()
......@@ -33,20 +34,23 @@ class ShowAlGoodsViewController: BaseViewController , UITableViewDelegate, UITa
tableV.dataSource = self
tableV.separatorStyle = .none
//不是这个cell-是跟订单详情里面的商品 一样
// tableV?.register(UINib(nibName: "ChangePriceNormalCell", bundle: nil), forCellReuseIdentifier: "ChangePriceNormalCell")
tableV?.register(UINib(nibName: "XuanZeShangPinCell", bundle: nil), forCellReuseIdentifier: "XuanZeShangPinCell")
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
return order_goods!.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "XuanZeShangPinCell") as! XuanZeShangPinCell
cell.selectBtn.isHidden = true
cell.detailLbl2.isHidden = true
let rowModel = order_goods![indexPath.row]
cell.nameLbl.text = rowModel.goods_name
cell.detailLbl.text = rowModel.goods_attr
cell.priceLbl.text = "¥" + (rowModel.goods_price!)
return cell
}
......
......@@ -58,12 +58,12 @@ class XiuGaiYuShouJiaViewController: BaseViewController {
let rowModel = dataModel?.order_goods![0]
editOrderGoodsPriceAd(["user_token":UserToken as Any,"order_id":orderID as Any,"og_id":rowModel?.og_id as Any,"dj_amount":dingJinTF.text as Any,"wk_amount":weiKuanTF.text as Any], success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "修改成功"), delay: 1.2)
//MARK:--需要更改订单详情的对应数据(不做网络请求,减少加载)
let dataM = data as! EditOGPAdModel
self.delegate?.changeYuShouGoodsByData(sender: dataM.data!)
self.navigationController?.popViewController(animated: true)
if dataM.code == 1 {
self.delegate?.changeYuShouGoodsByData(sender: dataM.data!)
self.navigationController?.popViewController(animated: true)
}
}) { (error) in
}
......
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