Commit 0dfe446a authored by 刘俊宏's avatar 刘俊宏

线下版本-实现订单的发票管理(缺查看发票信息)

parent 19375ae7
......@@ -579,6 +579,7 @@
F9956B22246408A6001A617D /* GoodsClassViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9956B20246408A6001A617D /* GoodsClassViewController.swift */; };
F9956B23246408A6001A617D /* GoodsClassViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9956B21246408A6001A617D /* GoodsClassViewController.xib */; };
F9956B2524640D34001A617D /* GoodsClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9956B2424640D34001A617D /* GoodsClassModel.swift */; };
F995CEA62547CAC000202BA8 /* InvoiceInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F995CEA52547CAC000202BA8 /* InvoiceInfoModel.swift */; };
F9A0E1DD246D198B00D7F26F /* CusListAllModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A0E1DC246D198B00D7F26F /* CusListAllModel.swift */; };
F9A0E1DF246D1B1E00D7F26F /* GetGoodsInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */; };
F9A4AB6E24C927E900094BD1 /* LogisticsCostDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AB6C24C927E900094BD1 /* LogisticsCostDetailViewController.swift */; };
......@@ -1266,6 +1267,7 @@
F9956B20246408A6001A617D /* GoodsClassViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsClassViewController.swift; sourceTree = "<group>"; };
F9956B21246408A6001A617D /* GoodsClassViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GoodsClassViewController.xib; sourceTree = "<group>"; };
F9956B2424640D34001A617D /* GoodsClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsClassModel.swift; sourceTree = "<group>"; };
F995CEA52547CAC000202BA8 /* InvoiceInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvoiceInfoModel.swift; sourceTree = "<group>"; };
F9A0E1DC246D198B00D7F26F /* CusListAllModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CusListAllModel.swift; sourceTree = "<group>"; };
F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetGoodsInfoModel.swift; sourceTree = "<group>"; };
F9A4AB6C24C927E900094BD1 /* LogisticsCostDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogisticsCostDetailViewController.swift; sourceTree = "<group>"; };
......@@ -2807,6 +2809,7 @@
F956D5BF246A3789003FF510 /* OrderDetailModel.swift */,
F93E31F624721C4200524DFC /* EditOGPAdModel.swift */,
F9A0E1DC246D198B00D7F26F /* CusListAllModel.swift */,
F995CEA52547CAC000202BA8 /* InvoiceInfoModel.swift */,
F9A0E1DE246D1B1E00D7F26F /* GetGoodsInfoModel.swift */,
F9FF7BA024760DA9006E305E /* LogisticsCompanyModel.swift */,
E02D586A2477A1480065A9EB /* GetAddrsInfoModel.swift */,
......@@ -3731,6 +3734,7 @@
F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */,
F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */,
F95A9ED8245520E500867849 /* OrderListVC.swift in Sources */,
F995CEA62547CAC000202BA8 /* InvoiceInfoModel.swift in Sources */,
E03549A8245820C2008BD021 /* PiCiXuanZeCell.swift in Sources */,
F9217E012485E6E800C4CF67 /* MessageListModel.swift in Sources */,
F956D59E246A2D9C003FF510 /* LMNTextStorage+Export.m in Sources */,
......
......@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址
//test
//let SERVERCE_ImageHost = "https://z.gelifood.com/"
//let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let SERVERCE_ImageHost = "https://zx.gelifood.com/"
let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
let SERVERCE_ImageHost = "https://z.gelifood.com/"
let SERVERCE_HOST = "https://z.gelifood.com/admin/"
//let SERVERCE_ImageHost = "https://zx.gelifood.com/"
//let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
////online
//视图常量
......
......@@ -258,5 +258,13 @@
<string>Lalamove/payHllOrder</string>
<key>货拉拉格利支付</key>
<string>Lalamove/payHllDelivery</string>
<key>获取发票信息</key>
<string>Order/getInvoiceInfo</string>
<key>发票信息通知</key>
<string>Order/invoiceNotice</string>
<key>上传发票</key>
<string>Order/uploadInvoice</string>
<key>修改电子发票链接地址</key>
<string>Order/editInvoiceImg</string>
</dict>
</plist>
......@@ -158,7 +158,10 @@ func saveFile(image: UIImage,_ params:[String:Any],success:@escaping (_ res:Any)
for (key, value) in params {
if key == "path" && ((value as AnyObject).contains("goods") || (value as AnyObject).contains("banner")) {
urlStr = "商品图片上传"
}else if key == "order_id" {
urlStr = "上传发票"
}
//else if key == order_id 上传发票
}
print("上传信息",urlStr,params,image)
......@@ -199,3 +202,4 @@ func onOff(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@esc
failture(error)
}
}
......@@ -486,3 +486,33 @@ func confirmReceiving(_ params:[String:Any],success:@escaping (_ res:Any)->(),fa
}
}
//MARK:--发票信息通知
//params-key(user_token,order_id))
func invoiceNotice(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("发票信息通知", params, { (rep:DataResponse<UpDataModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//MARK:--修改电子发票链接地址
//params-key(user_token,order_id))
func editInvoiceImg(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("修改电子发票链接地址", params, { (rep:DataResponse<UpDataModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//MARK:--获取发票信息
//params-key(user_token,order_id))
func getInvoiceInfo(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("获取发票信息", params, { (rep:DataResponse<InvoiceInfoModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//
// InvoiceInfoModel.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/10/27.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
//获取发票信息
class InvoiceInfoModel: Mappable {
var code:Int?
var message : String?
var data : InvoiceInfoDataModel?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class InvoiceInfoDataModel: Mappable {
required init?( map: Map) {
}
func mapping(map: Map) {
}
}
......@@ -72,7 +72,8 @@ class OrderDetailResModel: Mappable {
var shipping_status : Int?//商品配送情况;0未发货,1已发货,2已收货,4退货
var goods_before_pay:Int?
var sale_res : OrderDetailSaleResModel?//订单预售详情(不是预售订单为空数组,无key=>value)
var invoice_img : String? //发票图片
var invoice_link : String? //发票链接
required init?( map: Map) {
}
......@@ -111,7 +112,8 @@ class OrderDetailResModel: Mappable {
shipping_type <- map["shipping_type"]
sale_res <- map["sale_res"]
shipping_status <- map["shipping_status"]
invoice_img <- map["invoice_img"]
invoice_link <- map["invoice_link"]
}
}
func orderStatusStrByInt(statusNumber:Int,status_d:Int,isBfPay:Int,LmIdx:Int) -> String? {
......
......@@ -43,6 +43,7 @@ class OrderListDataModel: Mappable {
var goods_number : String? //订单商量总数
var order_goods : Array<OrderListGoodsModel>?
required init?( map: Map) {
}
......
......@@ -8,7 +8,7 @@
import Foundation
import ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址
class UpDataModel: Mappable {
......
......@@ -7,8 +7,13 @@
//
import UIKit
protocol UpBillDataTableViewCellDelegate {
func segmentChangeIndex(index:Int)
func UpBillDataTableViewCellSelectString(selectString:String,inputString:String)
}
class UpBillDataTableViewCell: UITableViewCell, UITextFieldDelegate {
var delegate:UpBillDataTableViewCellDelegate?
class UpBillDataTableViewCell: UITableViewCell {
@IBOutlet weak var selectSegmentV: UISegmentedControl!
@IBOutlet weak var updataBtn: UIButton!
......@@ -20,16 +25,18 @@ class UpBillDataTableViewCell: UITableViewCell {
//查看发票信息
@IBAction func checkBillDetailAction(_ sender: UIButton) {
print("//查看发票信息")
delegate?.UpBillDataTableViewCellSelectString(selectString: "查看发票信息", inputString: "")
}
//通知用户
@IBAction func noticUserAction(_ sender: UIButton) {
print("//通知用户")
delegate?.UpBillDataTableViewCellSelectString(selectString: "通知用户", inputString: "")
}
//上传发票
@IBAction func updataAction(_ sender: UIButton) {
print("//上传发票")
delegate?.UpBillDataTableViewCellSelectString(selectString: "上传发票", inputString: "")
}
override func awakeFromNib() {
super.awakeFromNib()
......@@ -39,6 +46,18 @@ class UpBillDataTableViewCell: UITableViewCell {
let redAttribute1 = [NSAttributedString.Key.foregroundColor: UIColor.init(named: "灰色字体颜色") as Any,NSAttributedString.Key.font: UIFont.systemFont(ofSize: 13)] as [NSAttributedString.Key : Any]
selectSegmentV.setTitleTextAttributes(redAttribute1, for: .normal)
selectSegmentV.addTarget(self, action: #selector(sementedControlClick), for: .valueChanged)
inputInfoTF.delegate = self
}
@objc func sementedControlClick() {
print("selectindex",selectSegmentV.selectedSegmentIndex)
delegate?.segmentChangeIndex(index: selectSegmentV.selectedSegmentIndex)
}
func textFieldDidEndEditing(_ textField: UITextField) {
print("end input",textField.text!)
delegate?.UpBillDataTableViewCellSelectString(selectString: "上传链接地址", inputString: textField.text!)
}
override func setSelected(_ selected: Bool, animated: Bool) {
......
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