Commit b0e5ff98 authored by lujunye's avatar lujunye

24

parent f828e852
......@@ -188,6 +188,8 @@
E042F74124528CD500CDFA12 /* TitleAndOnlyBtnCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E042F73F24528CD500CDFA12 /* TitleAndOnlyBtnCell.xib */; };
E042F74324529B7B00CDFA12 /* JiTuoWuXinXiView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E042F74224529B7B00CDFA12 /* JiTuoWuXinXiView.swift */; };
E042F74524529B8500CDFA12 /* JiTuoWuXinXiView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E042F74424529B8500CDFA12 /* JiTuoWuXinXiView.xib */; };
E047DADC266E1BE100D0E011 /* ageSetDbtGoods_View.swift in Sources */ = {isa = PBXBuildFile; fileRef = E047DADB266E1BE100D0E011 /* ageSetDbtGoods_View.swift */; };
E047DAE1266E1BEB00D0E011 /* ageSetDbtGoods_View.xib in Resources */ = {isa = PBXBuildFile; fileRef = E047DAE0266E1BEB00D0E011 /* ageSetDbtGoods_View.xib */; };
E04BA7F225F74E3B00B62F37 /* PiCiXuanZeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E04BA7F025F74E3A00B62F37 /* PiCiXuanZeViewController.xib */; };
E04BA7F325F74E3B00B62F37 /* PiCiXuanZeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E04BA7F125F74E3B00B62F37 /* PiCiXuanZeViewController.swift */; };
E0516F772448003D00E373CE /* PayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0516F752448003D00E373CE /* PayViewController.swift */; };
......@@ -1009,6 +1011,8 @@
E042F73F24528CD500CDFA12 /* TitleAndOnlyBtnCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TitleAndOnlyBtnCell.xib; sourceTree = "<group>"; };
E042F74224529B7B00CDFA12 /* JiTuoWuXinXiView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JiTuoWuXinXiView.swift; sourceTree = "<group>"; };
E042F74424529B8500CDFA12 /* JiTuoWuXinXiView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = JiTuoWuXinXiView.xib; sourceTree = "<group>"; };
E047DADB266E1BE100D0E011 /* ageSetDbtGoods_View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ageSetDbtGoods_View.swift; sourceTree = "<group>"; };
E047DAE0266E1BEB00D0E011 /* ageSetDbtGoods_View.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ageSetDbtGoods_View.xib; sourceTree = "<group>"; };
E04BA7F025F74E3A00B62F37 /* PiCiXuanZeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PiCiXuanZeViewController.xib; sourceTree = "<group>"; };
E04BA7F125F74E3B00B62F37 /* PiCiXuanZeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PiCiXuanZeViewController.swift; sourceTree = "<group>"; };
E0516F752448003D00E373CE /* PayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayViewController.swift; sourceTree = "<group>"; };
......@@ -2924,6 +2928,8 @@
E07337F72579E8660039767A /* GYS_FX_Product_ListVc.xib */,
E0404A87264E5D0100CA16EA /* GYS_FX_Product_VC_Cell.swift */,
E0404A88264E5D0100CA16EA /* GYS_FX_Product_VC_Cell.xib */,
E047DADB266E1BE100D0E011 /* ageSetDbtGoods_View.swift */,
E047DAE0266E1BEB00D0E011 /* ageSetDbtGoods_View.xib */,
);
path = "供应商分销商品管理";
sourceTree = "<group>";
......@@ -4356,6 +4362,7 @@
E0E6A5A325FC6B0A00C9BCD6 /* DZSHViewController.xib in Resources */,
E0C4F4A8244EC82A00CC7E2F /* TitleAndBtnCell.xib in Resources */,
E0974D5F25C12E8D00E3C86B /* two_title_cell.xib in Resources */,
E047DAE1266E1BEB00D0E011 /* ageSetDbtGoods_View.xib in Resources */,
F97E73322552A22000A11F98 /* DistributorSettingAlertView.xib in Resources */,
E02FD9F72455790800E10E27 /* DiZhiGuanLiCell.xib in Resources */,
E09A7374261EED7C00CB2D70 /* PPH_XQ_Cell.xib in Resources */,
......@@ -4861,6 +4868,7 @@
F96E9D5C246656A700B5B94A /* HGImagePickerCell.swift in Sources */,
E02A3CAF25C3ED0400A4E369 /* S_P_K_C_Detail_Vc.swift in Sources */,
E06B3FD52601AB750004C05C /* DZSH_Two_Btn_Cell.swift in Sources */,
E047DADC266E1BE100D0E011 /* ageSetDbtGoods_View.swift in Sources */,
F95567AB2453E40B009674AB /* OrderListViewController.swift in Sources */,
E0018096264CB5D200DDB42A /* XY_FX_Setting_View.swift in Sources */,
E06B1AF625B52AD3002F3C65 /* PrintListMgVc.swift in Sources */,
......
......@@ -361,7 +361,7 @@ class selAgeDbtGoodsList_Data_D_model: Mappable {
var dbt_price:String? //分销价
var commission_val : String? //佣金
var commission_val_agent:String?
var is_show:Int?
required init?( map: Map) {
......@@ -382,6 +382,7 @@ class selAgeDbtGoodsList_Data_D_model: Mappable {
dbt_price <- map["dbt_price"]
commission_val <- map["commission_val"]
commission_val_agent <- map["commission_val_agent"]
is_show <- map["is_show"]
}
......
......@@ -13,9 +13,7 @@ class XY_DZ_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelegat
let model = dataArr[sender.tag]
delDbtContract(["user_token":UserToken as Any,"dbt_id":model.dbt_id as Any]) { (data) in
self.list_view.mj_header?.beginRefreshing()
} failture: { (err) in
}
} failture: { (err) in}
}
func XY_DZ_GL_VC_Cell_Del(cell: XY_DZ_GL_VC_Cell) {
......
......@@ -4,6 +4,7 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -30,7 +31,7 @@
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="o1x-LO-BcH">
<rect key="frame" x="0.0" y="89" width="414" height="807"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="w8d-cY-Bz3"/>
<outlet property="delegate" destination="-1" id="Xic-LS-l48"/>
......@@ -52,6 +53,9 @@
</view>
</objects>
<resources>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
......
......@@ -11,6 +11,8 @@ protocol GYS_FX_Product_VC_Cell_Delegate {
func GYS_FX_Product_VC_Cell_Action(cell:GYS_FX_Product_VC_Cell,action:Int)
}
class GYS_FX_Product_VC_Cell: UITableViewCell {
@IBOutlet weak var margin: NSLayoutConstraint!
@IBOutlet weak var store_w: NSLayoutConstraint!
var delegate:GYS_FX_Product_VC_Cell_Delegate?
@IBAction func btn_action(_ sender: UIButton) {
//sender.tag 0取消分销 1上下架 2分销设置
......
......@@ -115,6 +115,9 @@
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="分销价:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WfU-38-9an">
<rect key="frame" x="90" y="63" width="39.5" height="17"/>
<constraints>
<constraint firstAttribute="width" constant="39.5" id="aCj-21-5M1"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<color key="textColor" name="#999999"/>
<nil key="highlightedColor"/>
......@@ -168,11 +171,13 @@
<outlet property="fx_price" destination="eub-Q6-ZHe" id="SNs-ln-bfs"/>
<outlet property="icon" destination="Jr7-Sh-Ibo" id="TDk-Bx-v3m"/>
<outlet property="inventory" destination="5Jw-lG-uGm" id="XQb-ec-Zpf"/>
<outlet property="margin" destination="omo-kF-hDk" id="2bz-YX-pgB"/>
<outlet property="name" destination="YVQ-wf-px1" id="iif-nb-5Dq"/>
<outlet property="price" destination="VAc-v3-XeF" id="zLY-1R-tg2"/>
<outlet property="set_btn" destination="R7g-62-YKx" id="Kyq-1u-jUM"/>
<outlet property="set_btn_w" destination="tL7-9J-xXT" id="hxP-fV-5z1"/>
<outlet property="store" destination="WfU-38-9an" id="VNk-Vy-FPH"/>
<outlet property="store_w" destination="aCj-21-5M1" id="Q80-Sc-jkS"/>
<outlet property="up_down_btn" destination="5mn-3H-9iX" id="JJH-6i-KkT"/>
<outlet property="up_down_btn_w" destination="lXM-ZI-G6e" id="sFW-vl-K7P"/>
</connections>
......
//
// ageSetDbtGoods_View.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/6/7.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
protocol ageSetDbtGoods_View_Delegate {
func ageSetDbtGoods_View_submit_action(view:ageSetDbtGoods_View,sell_price:String?,commission:String)
}
class ageSetDbtGoods_View: UIView {
@IBOutlet weak var comission_lbl: UILabel!
var delegate:ageSetDbtGoods_View_Delegate?
var model:selAgeDbtGoodsList_Data_D_model?{
didSet{
if model?.price_type == 0 {
sell_bg_view.isHidden = true
sell_bg_view_h.constant = 0
bg_view_h.constant = 213
intro_lbl.text = "店长提成是从代理商分销提成中扣取"
first_line_lbl.text = "商品分销价:\(model!.dbt_price!)元 (佣金:\(model!.commission_val_agent!)元)"
}else{
first_line_lbl.text = "商品供货价:\(model!.supply_price!)元"
comission_lbl.text = "(提成 - 元)"
if model!.supply_price != nil && sell_price_tf.text!.count > 0 {
let num1 = Float(sell_price_tf.text!)
let num2 = Float(model!.supply_price!)
comission_lbl.text = String(format: "(提成%.2f元)",num1! - num2!)
}
}
}
}
@IBOutlet weak var sell_bg_view: UIView!
@IBOutlet weak var sell_bg_view_h: NSLayoutConstraint!
@IBAction func submit_action(_ sender: UIButton) {
let num1 = Float(sell_price_tf.text!)
let num2 = Float((model?.supply_price!)!)
if num1! < num2! {
HUD.flash(.label("商品售价不得低于供货价~"), delay: 1.2)
return
}
delegate?.ageSetDbtGoods_View_submit_action(view: self ,sell_price: sell_price_tf.text,commission: comission_tf.text!)
close_action(sender)
}
@IBOutlet weak var bg_view_h: NSLayoutConstraint!
@IBAction func close_action(_ sender: UIButton) {
self.removeFromSuperview()
}
@IBOutlet weak var comission_tf: UITextField!
@IBOutlet weak var sell_price_tf: UITextField!
@IBOutlet weak var first_line_lbl: UILabel!
@IBOutlet weak var intro_lbl: UILabel!
var contentView:UIView!
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
sell_price_tf.addTarget(self, action: #selector(textChange(text:)), for: .allEditingEvents)
}
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
sell_price_tf.addTarget(self, action: #selector(textChange(text:)), for: .allEditingEvents)
}
@objc func textChange(text:UITextField){
if text.text!.count > 0 {
let num1 = Float(text.text!)
let num2 = Float(model!.supply_price!)
if num1! > num2! {
comission_lbl.text = String(format: "(提成%.2f元)",num1! - num2!)
}
}
}
//加载xib
func loadViewFromNib() -> UIView {
let className = type(of: self)
let bundle = Bundle(for: className)
let name = NSStringFromClass(className).components(separatedBy: ".").last
let nib = UINib(nibName: name!, bundle: bundle)
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
return view
}
}
......@@ -252,7 +252,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
"original_img_edit":original_img_edit as Any,//商品封面图是否有修改,1是0非
"goods_banner":goods_bannerStr as Any, //商品副图,多张,最多5张,使用一维数组转json格式
"sku_info":sku_info as Any]
print(sku_info)
//MARK:--修改商品接口
goodsEdit(dic, success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "提交修改成功"), delay: 1.2)
......
......@@ -662,6 +662,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
// HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = FX_Product_GuanLiVC()
vc.titleStr = "设置分销商品"
vc.vcType = 136
self.navigationController?.pushViewController(vc, animated: true)
return
// case 137: //分销分账设置
......@@ -725,14 +726,16 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
vc.titleStr = "分销员管理"
self.navigationController?.pushViewController(vc, animated: true)
return
case 153://设置分销商品
case 153://设置下游代理商品 queryagentgoods
let vc = FX_Product_GuanLiVC()
vc.titleStr = "设置分销商品"
vc.titleStr = "设置下游代理商品"
vc.vcType = 153
self.navigationController?.pushViewController(vc, animated: true)
return
case 154://设置代理商品
let vc = FX_Product_GuanLiVC()
vc.titleStr = "设置代理商品"
vc.vcType = 154
self.navigationController?.pushViewController(vc, animated: true)
return
case 155://分销分账管理
......
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