Commit 20e6b0bd authored by 刘俊宏's avatar 刘俊宏

订单详情修改

parent c2f0b580
......@@ -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>
......
......@@ -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 = 1
let contentView = tabBarController
......
......@@ -37,6 +37,7 @@ class GoodsCollectionViewCell: UICollectionViewCell {
@IBAction func leftAction(_ sender: UIButton) {
print("点击左边按钮\(sender.tag)")
self.delegate?.changeGoodsIsShow(isTrue: false, byIndex: sender.tag)
}
......
......@@ -101,34 +101,34 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
}else if indexPath.row == 2{
//权限设置-弹窗
_ = self.presentHGImagePicker(maxSelected:2) { (assets) in
//结果处理
print("共选择了\(assets.count)张图片,分别如下:")
for asset in assets {
print(asset)
let option = PHImageRequestOptions()
option.isSynchronous = true
option.isNetworkAccessAllowed = true
PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (imge, _: [AnyHashable : Any]?) in
print("上传图片==\(imge)")
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let upLoadImg = imge as! UIImage
saveFile(image: upLoadImg, ["user_token":UserToken as Any], success: { (data) in
let dataM = data as! SaveFileModel
if dataM.code == 1 {
print("图片上传成功\(dataM.data?.url)")
}
}) { (error) in
print("图片上传失败\(error)")
}
})
}
}
// _ = self.presentHGImagePicker(maxSelected:2) { (assets) in
// //结果处理
// print("共选择了\(assets.count)张图片,分别如下:")
// for asset in assets {
// print(asset)
// let option = PHImageRequestOptions()
// option.isSynchronous = true
// option.isNetworkAccessAllowed = true
// PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (imge, _: [AnyHashable : Any]?) in
//
// print("上传图片==\(imge)")
//
// let UserToken = UserDefaults.standard.value(forKey: "user_token")
// let upLoadImg = imge as! UIImage
//
// saveFile(image: upLoadImg, ["user_token":UserToken as Any], success: { (data) in
// let dataM = data as! SaveFileModel
// if dataM.code == 1 {
// print("图片上传成功\(dataM.data?.url)")
// }
// }) { (error) in
// print("图片上传失败\(error)")
//
// }
//
// })
// }
// }
}
}
......
......@@ -378,12 +378,13 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
cell.priceLbl.text = "¥" + rowModel.price!
// cell.goodsImgV.kf.setImage(with: URL.init(string:SERVERCE_ImageHost + rowModel.goods_thumb!)!, placeholder: nil, options: nil, progressBlock: nil, completionHandler: nil)
if rowModel.is_show == 0 {
if rowModel.is_show == 1 {
cell.leftBtn.setTitle("下架", for: .normal)
cell.rightBtn.setTitle("入库", for: .normal)
}else if rowModel.is_show == 1{
}else if rowModel.is_show == 0{
cell.leftBtn.setTitle("入库", for: .normal)
cell.rightBtn.setTitle("上架", for: .normal)
}
cell.lgBtn.tag = indexPath.row
cell.leftBtn.tag = indexPath.row
......@@ -431,25 +432,28 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
func changeGoodsIsShow(isTrue: Bool, byIndex: Int) {
//左按钮为false 右按钮为true
let rowModel = self.items[byIndex]
if rowModel.is_show == 0 {
if rowModel.is_show == 1 {
if isTrue {
//"下架"
print("下架下架下架")
}else{
//"入库"
print("入库--入库")
print("入库哦哦")
let vc = RuKuViewController()
vc.barTitle = "入库"
self.navigationController?.pushViewController(vc, animated: true)
}else{
print("下架啦")
}
}else if rowModel.is_show == 1{
}else{
if isTrue {
//"入库"
print("入库===入库")
print("赶紧上架")
}else{
//"上架"
print("上架上架上架上架")
print("入库哦哦")
let vc = RuKuViewController()
vc.barTitle = "入库"
self.navigationController?.pushViewController(vc, animated: true)
}
}
}
func upDataByGoodsId(goodsId:String) {
......
......@@ -175,7 +175,6 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
if rowModel.from == 3 {
cell.formLbl.isHidden = false
cell.typeLbl.isHidden = true
}else{
cell.formLbl.isHidden = true
}
......
......@@ -39,6 +39,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let nonYuShouTitleArr = ["商品合计:","物流费用:","其它费用:"]
let YuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","支付方式","支付状态","买家留言","订单备注"]
let isYuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","定金支付方式","定金支付状态","尾款支付方式","尾款支付状态","买家留言","订单备注"]
let nonYuShouPart3Arr = ["收货人","联系电话","地址"]
......@@ -415,31 +418,42 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell.textTF.isUserInteractionEnabled = false
cell.nameLbl.text = nonYuShouPart3Arr[indexPath.row]
if self.dataMdoel?.receiving == nil {
// if self.dataMdoel?.receiving == nil {
cell.textTF.text = "-"
}else{
switch indexPath.row {
case 0:
cell.textTF.text = (self.dataMdoel?.receiving?.consignee)!
break
case 1:
cell.textTF.text = (self.dataMdoel?.receiving?.mobile)!
break
case 2:
cell.textTF.text = (self.dataMdoel?.receiving?.addr_str)!
break
default:
break
}
}
// }else{
// switch indexPath.row {
// case 0:
// cell.textTF.text = (self.dataMdoel?.receiving?.consignee)!
// break
// case 1:
// cell.textTF.text = (self.dataMdoel?.receiving?.mobile)!
// break
// case 2:
// cell.textTF.text = (self.dataMdoel?.receiving?.addr_str)!
// break
// default:
// break
// }
// }
return cell
case 4:
//MARK:--订单信息cell
if indexPath.row == 5 || indexPath.row == 9 {
var isYushoucount = 0
if isYuShou {
isYushoucount = 2
}
if indexPath.row == 5 || indexPath.row == (9 + isYushoucount){
let cell = tableView.dequeueReusableCell(withIdentifier: "PingLunCell") as! PingLunCell
cell.tag = indexPath.row
cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
if isYuShou {
cell.nameLbl.text = isYuShouPart3Arr[indexPath.row]
}else{
cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
}
switch indexPath.row {
case 5:
cell.contentLbl.text = self.dataMdoel?.order_res?.lwb_no
......@@ -466,8 +480,14 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return cell
}
if indexPath.row == 4 || indexPath.row == 6 || indexPath.row == 7 {
cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
if indexPath.row == 4 || indexPath.row == 6 || indexPath.row == 7 || indexPath.row == (6 + isYushoucount) || indexPath.row == (7 + isYushoucount){
if isYuShou {
cell.nameLbl.text = isYuShouPart3Arr[indexPath.row]
}else{
cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
}
cell.arrowImg.isHidden = false
switch indexPath.row {
......@@ -475,10 +495,29 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell.contentLbl.text = self.dataMdoel?.order_res?.lc_name
break
case 6:
cell.contentLbl.text = self.dataMdoel?.order_res?.pay_type_cn
if isYuShou {
cell.contentLbl.text = StringByInt(number: (self.dataMdoel?.order_res?.sale_res?.dj_pay_type!)!)
}else{
cell.contentLbl.text = self.dataMdoel?.order_res?.pay_type_cn
}
break
case 7:
cell.contentLbl.text = self.dataMdoel?.order_res?.pay_status_cn
if isYuShou {
cell.contentLbl.text = StringByInt(number: (self.dataMdoel?.order_res?.sale_res?.dj_pay_status!)!)
}else{
cell.contentLbl.text = self.dataMdoel?.order_res?.pay_status_cn
}
cell.arrowImg.isHidden = true
break
case 8:
cell.contentLbl.text = StringByInt(number: (self.dataMdoel?.order_res?.sale_res?.wk_pay_type!)!)
break
case 9:
cell.contentLbl.text = StringByInt(number: (self.dataMdoel?.order_res?.sale_res?.wk_pay_status!)!)
cell.arrowImg.isHidden = true
break
default:
......@@ -488,7 +527,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.textTF.isUserInteractionEnabled = false
cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
if isYuShou {
cell.nameLbl.text = isYuShouPart3Arr[indexPath.row]
}else{
cell.nameLbl.text = YuShouPart3Arr[indexPath.row]
}
switch indexPath.row {
case 0:
cell.textTF.text = self.dataMdoel?.order_res?.order_sn
......@@ -506,7 +551,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell.textTF.text = "自提"
}
break
case 8:
case (8 + isYushoucount):
cell.textTF.text = self.dataMdoel?.order_res?.postscript
break
......@@ -620,21 +665,16 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
break
case "支付状态":
//无法修改支付状态的
// if glSelectView == nil {
// let view = GLAlertSelectView(frame: self.view.bounds)
// view.tag = cell.tag
// view.titleLbl.text = "请选择支付状态"
// view.delegate = self
// view.dataArr = zhiFuStatus
// if zhiFuStatusSelect != nil {
// view.selectNum = zhiFuStatusSelect!
// view.tempNum = view.selectNum
// }
// self.view.addSubview(view)
// glSelectView = view
// }
//无需处理:根据网络变更
break
case "定金支付方式":
print("定金支付方式")
break
case "尾款支付方式":
print("尾款支付方式")
break
default:
break
}
......@@ -745,7 +785,11 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
return 0
case 4:
return 10
if isYuShou {
return 12
}else{
return 10
}
default:
return 0
}
......
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