Commit e8b9225b authored by lujunye's avatar lujunye

12

parent 7925a18f
...@@ -374,5 +374,7 @@ ...@@ -374,5 +374,7 @@
<string>Distribution/delDbtInfo</string> <string>Distribution/delDbtInfo</string>
<key>供应商分销订单管理</key> <key>供应商分销订单管理</key>
<string>Distribution/supDbtOrderLis</string> <string>Distribution/supDbtOrderLis</string>
<key>上下架(设置分销商品给分销商)</key>
<string>Distribution/setDbtGoodsAttr</string>
</dict> </dict>
</plist> </plist>
...@@ -13,16 +13,14 @@ class OrderDetailModel: Mappable { ...@@ -13,16 +13,14 @@ class OrderDetailModel: Mappable {
var code:Int? var code:Int?
var message : String? var message : String?
var data : OrderDetailDataModel? var data : OrderDetailDataModel?
required init?( map: Map) {}
required init?( map: Map) {
}
func mapping(map: Map) { func mapping(map: Map) {
code <- map["code"] code <- map["code"]
message <- map["message"] message <- map["message"]
data <- map["data"] data <- map["data"]
} }
} }
class OrderDetailDataModel: Mappable { class OrderDetailDataModel: Mappable {
var order_res : OrderDetailResModel? //订单信息 var order_res : OrderDetailResModel? //订单信息
var order_goods : Array<OrderDetailGoodsModel>? //订单商品 var order_goods : Array<OrderDetailGoodsModel>? //订单商品
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import Foundation import Foundation
import ObjectMapper import ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,供应商新增代理商(批量和单个新增代理商),终止与代理商合作,给代理商设置分销商品,商品上下架,供应商取消商品分销, //发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,供应商新增代理商(批量和单个新增代理商),终止与代理商合作,给代理商设置分销商品,商品上下架,供应商取消商品分销,上下架(设置分销商品给分销商),
class UpDataModel: Mappable { class UpDataModel: Mappable {
......
...@@ -140,7 +140,7 @@ func delDbtInfo(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture ...@@ -140,7 +140,7 @@ func delDbtInfo(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture
keyword : 模糊搜索订单编号、商品名称 keyword : 模糊搜索订单编号、商品名称
start_time 开始时间(时间戳) 非必填 start_time 开始时间(时间戳) 非必填
end_time 结束时间(时间戳) 非必填 end_time 结束时间(时间戳) 非必填
dbt_type 0全部 1人工结算 2自动结算(3待自动结算、4已自动结算)(5待人工结算6已人工结算) 非必填 dbt_type 0全部 1人工已结算、2人工未结算、3自动已结算、4自动未结算、5人工结算失败、6人工结算中、7自动结算失败、8自动结算中、9人工已退还、10自动已退还
page 分页 非必填 page 分页 非必填
*/ */
func supDbtOrderLis(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) { func supDbtOrderLis(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
...@@ -151,3 +151,17 @@ func supDbtOrderLis(_ params:[String:Any],success:@escaping (_ res:Any)->(),fail ...@@ -151,3 +151,17 @@ func supDbtOrderLis(_ params:[String:Any],success:@escaping (_ res:Any)->(),fail
failture(error) failture(error)
} }
} }
//MARK:-- 上下架(设置分销商品给分销商)
/*
user_token : 验证token
sku_id : 商品sku_id
action : 操作,1为上架2为下架
*/
func setDbtGoodsAttr(_ 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)
}
}
...@@ -333,9 +333,9 @@ class supGoodsListResDataModel: Mappable { ...@@ -333,9 +333,9 @@ class supGoodsListResDataModel: Mappable {
var dbt_sale:Int? //销售量 var dbt_sale:Int? //销售量
var commission_per :Int?//提成百分比 var commission_per :Int?//提成百分比
var commission_type:Int?//提成类型 1百分比 2固定值 var commission_type:Int?//提成类型 1百分比 2固定值
var commission_val :String?//提成 var commission_val :String?//佣金/固定提成
var is_dbt:Int?//分销商品的id,为0的话说明未设置分销 var is_dbt:Int?//分销商品的id,为0的话说明未设置分销
var is_show : Int?
required init?( map: Map) { required init?( map: Map) {
...@@ -353,6 +353,7 @@ class supGoodsListResDataModel: Mappable { ...@@ -353,6 +353,7 @@ class supGoodsListResDataModel: Mappable {
commission_type <- map["commission_type"] commission_type <- map["commission_type"]
commission_val <- map["commission_val"] commission_val <- map["commission_val"]
is_dbt <- map["is_dbt"] is_dbt <- map["is_dbt"]
is_show <- map["is_show"]
} }
} }
//MARK: - 获取供应商商店 //MARK: - 获取供应商商店
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<constraint firstAttribute="width" constant="80" id="s1M-0D-mhe"/> <constraint firstAttribute="width" constant="80" id="s1M-0D-mhe"/>
</constraints> </constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<state key="normal" title="取消分"> <state key="normal" title="取消分">
<color key="titleColor" red="0.2784313725" green="0.56078431370000004" blue="0.89019607840000003" alpha="1" colorSpace="calibratedRGB"/> <color key="titleColor" red="0.2784313725" green="0.56078431370000004" blue="0.89019607840000003" alpha="1" colorSpace="calibratedRGB"/>
</state> </state>
<connections> <connections>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<constraint firstAttribute="width" constant="77" id="nCS-CE-1Bu"/> <constraint firstAttribute="width" constant="77" id="nCS-CE-1Bu"/>
</constraints> </constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<state key="normal" title="取消分"> <state key="normal" title="取消分">
<color key="titleColor" red="0.2784313725" green="0.56078431370000004" blue="0.89019607840000003" alpha="1" colorSpace="calibratedRGB"/> <color key="titleColor" red="0.2784313725" green="0.56078431370000004" blue="0.89019607840000003" alpha="1" colorSpace="calibratedRGB"/>
</state> </state>
</button> </button>
......
...@@ -175,7 +175,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -175,7 +175,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
} }
let dic = ["user_token":UserToken as Any, let dic = ["user_token":UserToken as Any,
"operation_type":0 as Any, "operation_type":2 as Any,
"sku_id":sku_id as Any, "sku_id":sku_id as Any,
"dbt_price":"" as Any, "dbt_price":"" as Any,
"commission_type":1 as Any, "commission_type":1 as Any,
...@@ -195,7 +195,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -195,7 +195,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
let model = datas[cell.tag] let model = datas[cell.tag]
let dic = ["user_token":UserToken as Any, let dic = ["user_token":UserToken as Any,
"operation_type":0 as Any, "operation_type":2 as Any,
"sku_id":model.sku_id as Any, "sku_id":model.sku_id as Any,
"dbt_price":"" as Any, "dbt_price":"" as Any,
"commission_type":1 as Any, "commission_type":1 as Any,
...@@ -208,6 +208,19 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -208,6 +208,19 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
} failture: { (err) in} } failture: { (err) in}
break break
case 1: case 1:
var action = 2
if cell.btn2.titleLabel?.text?.contains("上") == true {
action = 1
}
let model = datas[cell.tag]
let dict = ["user_token":UserToken as Any,
"action":action as Any,
"sku_id":model.sku_id as Any,
]
setDbtGoodsAttr(dict) { (data) in
HUD.flash(.label("设置成功~"), delay: 1.2)
self.home_list_tbv.mj_header?.beginRefreshing()
} failture: { (err) in}
break break
default: default:
let data = datas[cell.tag] let data = datas[cell.tag]
...@@ -221,8 +234,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -221,8 +234,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
} }
} }
@IBOutlet weak var all_select_btn: UIButton! @IBOutlet weak var all_select_btn: UIButton!
@IBAction func select_mode_Action(_ sender: UIButton) { @IBAction func select_mode_Action(_ sender: UIButton) {
if selectItem.count == 0 { if selectItem.count == 0 {
...@@ -237,16 +248,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -237,16 +248,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
self.view.addSubview(vc) self.view.addSubview(vc)
} }
// func new_GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) {
// let vc = DistributorSettingAlertView(frame: self.view.bounds)
// vc.tag = idx
// vc.data = datas[idx]
// vc.delegate = self
// self.view.addSubview(vc)
// }
var datas:Array<supGoodsListResDataModel> = [] var datas:Array<supGoodsListResDataModel> = []
var dbt_datas:Array<queryAgentGoods_data_model> = [] var dbt_datas:Array<queryAgentGoods_data_model> = []
var selectIndexArr = [0,0] var selectIndexArr = [0,0]
...@@ -562,8 +563,10 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -562,8 +563,10 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
cell.price.isHidden = false cell.price.isHidden = false
cell.price.text = "分销价: ¥\(model.dbt_price!) (固定提成: \(model.commission_val!))" cell.price.text = "分销价: ¥\(model.dbt_price!) (固定提成: \(model.commission_val!))"
} }
if model.is_show != nil {
cell.is_show = model.is_show!
}
cell.is_dbt = model.is_dbt! cell.is_dbt = model.is_dbt!
// cell.is_show = model.
cell.spec.text = "单价: ¥" + model.price! cell.spec.text = "单价: ¥" + model.price!
cell.name.text = model.goods_name cell.name.text = model.goods_name
if model.inventory != nil { if model.inventory != nil {
...@@ -575,7 +578,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -575,7 +578,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
cell.icon.sd_setImage(with:URL(string:SERVERCE_ImageHost + model.goods_thumb!), placeholderImage: nil,options:.allowInvalidSSLCertificates) cell.icon.sd_setImage(with:URL(string:SERVERCE_ImageHost + model.goods_thumb!), placeholderImage: nil,options:.allowInvalidSSLCertificates)
} }
} }
return cell return cell
} }
...@@ -734,7 +736,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -734,7 +736,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
} }
self.all_select_btn.setTitle(" 全选(已选 " + StringByInt(number: self.selectItem.count) + " 件商品)", for: .selected) self.all_select_btn.setTitle(" 全选(已选 " + StringByInt(number: self.selectItem.count) + " 件商品)", for: .selected)
} }
self.home_list_tbv.reloadData() self.home_list_tbv.reloadData()
self.home_list_tbv?.mj_footer?.endRefreshing() self.home_list_tbv?.mj_footer?.endRefreshing()
} }
......
...@@ -330,7 +330,7 @@ class RetailListMgVC: BaseViewController,PagingViewControllerDelegate, UISearchB ...@@ -330,7 +330,7 @@ class RetailListMgVC: BaseViewController,PagingViewControllerDelegate, UISearchB
make.top.equalTo(changeBgView.snp_bottom) make.top.equalTo(changeBgView.snp_bottom)
} }
showSelectV = showSelectView showSelectV = showSelectView
showSelectView.dataArr = ["全部", "人工结算", "自动结算", "待自动结算", "已自动结算", "待人工结算", "已人工结算"] showSelectView.dataArr = ["全部", "人工已结算","人工未结算", "自动已结算", "自动未结算", "人工结算失败", "人工结算中", "自动结算失败", "自动结算中", "人工已退还", "自动已退还"]
showSelectView.selectIndx = selectIndexArr[0] showSelectView.selectIndx = selectIndexArr[0]
} }
...@@ -461,34 +461,34 @@ class RetailListMgVC: BaseViewController,PagingViewControllerDelegate, UISearchB ...@@ -461,34 +461,34 @@ class RetailListMgVC: BaseViewController,PagingViewControllerDelegate, UISearchB
return cell return cell
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if self.title == "代销订单" { // if self.title == "代销订单" {
// let vc = RetailManageDetailViewController()
// let goodArrModel = self.dataArr[indexPath.section]
// vc.orderId = goodArrModel.order_id
// vc.dbt_shop_id = goodArrModel.shop_id
// self.navigationController?.pushViewController(vc, animated: true)
// }else{
let vc = RetailManageDetailViewController() let vc = RetailManageDetailViewController()
let goodArrModel = self.dataArr[indexPath.section] let goodArrModel = self.dataArr[indexPath.section]
vc.orderId = goodArrModel.order_id vc.orderId = goodArrModel.order_id
vc.dbt_shop_id = goodArrModel.shop_id
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
}else{ // }
let vc = RetailManageDetailViewController()
let goodArrModel = self.dataArr[indexPath.section]
vc.orderId = goodArrModel.order_id
self.navigationController?.pushViewController(vc, animated: true)
}
} }
@objc func didselectCellHorF(sender:UITapGestureRecognizer){ @objc func didselectCellHorF(sender:UITapGestureRecognizer){
if self.title == "代销订单" { // if self.title == "代销订单" {
// let vc = RetailManageDetailViewController()
// let goodArrModel = self.dataArr[sender.view!.tag]
// vc.orderId = goodArrModel.order_id
// vc.dbt_shop_id = goodArrModel.shop_id
// self.navigationController?.pushViewController(vc, animated: true)
// }else{
let vc = RetailManageDetailViewController() let vc = RetailManageDetailViewController()
let goodArrModel = self.dataArr[sender.view!.tag] let goodArrModel = self.dataArr[sender.view!.tag]
vc.orderId = goodArrModel.order_id vc.orderId = goodArrModel.order_id
vc.dbt_shop_id = goodArrModel.shop_id
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
}else{ // }
let vc = RetailManageDetailViewController()
let goodArrModel = self.dataArr[sender.view!.tag]
vc.orderId = goodArrModel.order_id
self.navigationController?.pushViewController(vc, animated: true)
}
} }
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
......
...@@ -204,6 +204,7 @@ class RetailManageViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -204,6 +204,7 @@ class RetailManageViewController: BaseViewController,UITableViewDelegate,UITable
} }
let model = self.dataArr[section] let model = self.dataArr[section]
contentV.snNumLbl.text = model.order_sn contentV.snNumLbl.text = model.order_sn
var dbt_typeStr = "人工结算" var dbt_typeStr = "人工结算"
if model.dbt_type == 2 { if model.dbt_type == 2 {
dbt_typeStr = "自动结算" dbt_typeStr = "自动结算"
......
...@@ -746,7 +746,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -746,7 +746,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
return return
case 159://上游供应商管理 case 159://上游供应商管理
let vc = SY_GYS_GL_VC() let vc = SY_GYS_GL_VC()
vc.titleStr = "下游代理商管理" vc.titleStr = "上游供应商管理"
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 160://下游店长管理 case 160://下游店长管理
......
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