Commit 8785e523 authored by lujunye's avatar lujunye

阿斯顿发送到发斯蒂芬2323

parent d5201b65
...@@ -282,8 +282,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate,UITabBarCont ...@@ -282,8 +282,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate,UITabBarCont
let v2 = GoodsManageListVC() let v2 = GoodsManageListVC()
let v3 = WorkCViewController() // let v3 = WorkCViewController()
// let v3 = SY_DLS_GL_VC() let v3 = FX_Product_GuanLiVC()
let v4 = WarehoseMangementListVC() let v4 = WarehoseMangementListVC()
......
{
"images" : [
{
"filename" : "下拉.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "下拉@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "下拉@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "收回.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "收回@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "收回@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="分销价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N0T-3l-rU8"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="分销价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N0T-3l-rU8">
<rect key="frame" x="115" y="92" width="39.5" height="13"/> <rect key="frame" x="115" y="92" width="39" height="13"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="13" id="gG9-lj-bd4"/> <constraint firstAttribute="height" constant="13" id="gG9-lj-bd4"/>
</constraints> </constraints>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="原价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bjz-wA-QCI"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="原价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bjz-wA-QCI">
<rect key="frame" x="159.5" y="91" width="22.5" height="15"/> <rect key="frame" x="159" y="91" width="22.5" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="QHA-N0-RpE"/> <constraint firstAttribute="height" constant="15" id="QHA-N0-RpE"/>
</constraints> </constraints>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tnU-5r-Jfg"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tnU-5r-Jfg">
<rect key="frame" x="159.5" y="98" width="22.5" height="1"/> <rect key="frame" x="159" y="98" width="22.5" height="1"/>
<color key="backgroundColor" name="标题字颜色"/> <color key="backgroundColor" name="标题字颜色"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="9xG-aS-jTC"/> <constraint firstAttribute="height" constant="1" id="9xG-aS-jTC"/>
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
<resources> <resources>
<image name="daixuan" width="19" height="19"/> <image name="daixuan" width="19" height="19"/>
<namedColor name="#FAA376"> <namedColor name="#FAA376">
<color red="0.98000001907348633" green="0.63899999856948853" blue="0.46299999952316284" alpha="0.68999999761581421" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.98000001907348633" green="0.63899999856948853" blue="0.46299999952316284" alpha="0.80000001192092896" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="app底色"> <namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......
...@@ -23,10 +23,10 @@ class HeaderSelectView: UIView { ...@@ -23,10 +23,10 @@ class HeaderSelectView: UIView {
@IBOutlet weak var thereBtn: UIButton! @IBOutlet weak var thereBtn: UIButton!
var contentView:UIView! var contentView:UIView!
let upImg = UIImage.init(named: "shangla") let upImg = UIImage.init(named: "收回111")
let dowImg = UIImage.init(named: "xiala") let dowImg = UIImage.init(named: "下拉11")
let upColor = UIColor.init(named: "蓝色字体颜色") let upColor = UIColor.init(named: "标题字颜色")
let dowColor = UIColor.init(named: "标题字颜色") let dowColor = UIColor.init(named: "#999999")
@IBAction func fristBtnAction(_ sender: UIButton) { @IBAction func fristBtnAction(_ sender: UIButton) {
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NPE-os-75s"> <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NPE-os-75s">
<rect key="frame" x="0.0" y="0.0" width="134.5" height="166"/> <rect key="frame" x="0.0" y="0.0" width="134.5" height="166"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="全部商品 " image="xiala"> <state key="normal" title="全部商品 " image="下拉11">
<color key="titleColor" name="标题字颜色"/> <color key="titleColor" name="#999999"/>
</state> </state>
<connections> <connections>
<action selector="fristBtnAction:" destination="-1" eventType="touchUpInside" id="6g3-xa-mrO"/> <action selector="fristBtnAction:" destination="-1" eventType="touchUpInside" id="6g3-xa-mrO"/>
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fJG-vM-HVA"> <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fJG-vM-HVA">
<rect key="frame" x="134.5" y="0.0" width="135" height="166"/> <rect key="frame" x="134.5" y="0.0" width="135" height="166"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="全部 " image="xiala"> <state key="normal" title="全部 " image="下拉11">
<color key="titleColor" name="标题字颜色"/> <color key="titleColor" name="#999999"/>
</state> </state>
<connections> <connections>
<action selector="secBtnAction:" destination="-1" eventType="touchUpInside" id="Ixk-Ze-f1L"/> <action selector="secBtnAction:" destination="-1" eventType="touchUpInside" id="Ixk-Ze-f1L"/>
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qBG-jC-B4y" userLabel="排序"> <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qBG-jC-B4y" userLabel="排序">
<rect key="frame" x="269.5" y="0.0" width="134.5" height="166"/> <rect key="frame" x="269.5" y="0.0" width="134.5" height="166"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="排序 " image="xiala"> <state key="normal" title="排序 " image="下拉11">
<color key="titleColor" name="标题字颜色"/> <color key="titleColor" name="#999999"/>
</state> </state>
<connections> <connections>
<action selector="thereBtnAction:" destination="-1" eventType="touchUpInside" id="oCp-ME-OZP"/> <action selector="thereBtnAction:" destination="-1" eventType="touchUpInside" id="oCp-ME-OZP"/>
...@@ -72,9 +72,9 @@ ...@@ -72,9 +72,9 @@
</view> </view>
</objects> </objects>
<resources> <resources>
<image name="xiala" width="9" height="4.5"/> <image name="下拉11" width="14" height="14"/>
<namedColor name="标题字颜色"> <namedColor name="#999999">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.60000002384185791" green="0.60000002384185791" blue="0.60000002384185791" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<systemColor name="systemBackgroundColor"> <systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......
...@@ -68,9 +68,9 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource { ...@@ -68,9 +68,9 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource {
cell.contentLbl.text = "" cell.contentLbl.text = ""
cell.titleLbl.text = titleStr cell.titleLbl.text = titleStr
if selectIndx == indexPath.row { if selectIndx == indexPath.row {
cell.titleLbl.textColor = UIColor.init(named: "蓝色字体颜色")
}else{
cell.titleLbl.textColor = UIColor.init(named: "标题字颜色") cell.titleLbl.textColor = UIColor.init(named: "标题字颜色")
}else{
cell.titleLbl.textColor = UIColor.init(named: "#999999")
} }
return cell return cell
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......
//
// FXSZ_View.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/11.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
class FXSZ_View: UIView {
@IBAction func close_alt_action(_ sender: Any) {
self.removeFromSuperview()
}
var contentView:UIView!
var is_all_select_mode = false
//初始化时将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()
}
}
// /初始化时将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()
}
}
//加载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
}
}
//
// New_Fx_Cell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/11.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
protocol New_Fx_Cell_Delegate {
func New_Fx_Cell_btnClick(idx:Int,cell:New_Fx_Cell)
func New_Fx_Cell_btnSelect(idx:Int,cell:New_Fx_Cell)
}
class New_Fx_Cell: UITableViewCell {
@IBAction func btn_select_action(_ sender: UIButton) {
delegate?.New_Fx_Cell_btnSelect(idx: self.tag, cell: self)
}
var delegate:New_Fx_Cell_Delegate?
@IBAction func btn_click_action(_ sender: UIButton) {
print(sender.tag,self.tag)
delegate?.New_Fx_Cell_btnClick(idx: sender.tag, cell: self)
}
@IBOutlet weak var btn1: UIButton!
@IBOutlet weak var btn2: UIButton!
@IBOutlet weak var btn3: UIButton!
@IBOutlet weak var price: UILabel!
@IBOutlet weak var spec: UILabel!
@IBOutlet weak var name: UILabel!
@IBOutlet weak var icon: UIImageView!
@IBOutlet weak var select_img: UIImageView!
@IBOutlet weak var leftBtn: UIButton!
@IBOutlet weak var leftValue: NSLayoutConstraint!
override func awakeFromNib() {
super.awakeFromNib()
btn1.tag = 0
btn2.tag = 1
btn3.tag = 2
self.selectionStyle = .none
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
...@@ -8,16 +8,46 @@ ...@@ -8,16 +8,46 @@
import UIKit import UIKit
class SY_DLS_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelegate { class SY_DLS_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource {
let UserToken = UserDefaults.standard.value(forKey: "user_token")
var keyword = ""
//MARK: - TABLEVIEWDELEGATE
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 165
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "SY_SLS_GL_VC_Cell") as! SY_SLS_GL_VC_Cell
return cell
}
var gys_centers:Array<getSupShopDataModel> = []
func rightBtnClick() { func rightBtnClick() {
print("新增代理商") print("新增代理商")
getSupShop(["user_token":UserToken as Any]) { (data) in
let model = data as! getSupShopModel
model.data?.forEach({ (item) in
self.gys_centers.append(item)
})
HUD.hide()
let alertView = GLAlertTbAddView(frame: self.view.bounds)
alertView.is_gys = true
alertView.bottom_tableview.isHidden = true
alertView.gys_centers = self.gys_centers
self.view.addSubview(alertView)
} failture: { (err) in
}
} }
@IBOutlet weak var list_view: UITableView! @IBOutlet weak var list_view: UITableView!
@IBOutlet weak var contentV: UIView! @IBOutlet weak var contentV: UIView!
var keyword = ""
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -39,7 +69,9 @@ class SY_DLS_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelega ...@@ -39,7 +69,9 @@ class SY_DLS_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelega
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.height.equalTo(35) make.height.equalTo(35)
} }
list_view.separatorStyle = .none
list_view.register(UINib(nibName: "SY_SLS_GL_VC_Cell", bundle: nil), forCellReuseIdentifier: "SY_SLS_GL_VC_Cell")
headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData)) headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
list_view.mj_header = self.headerMJ list_view.mj_header = self.headerMJ
......
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="JGX-pe-Vih"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="JGX-pe-Vih">
<rect key="frame" x="0.0" y="89" width="414" height="807"/> <rect key="frame" x="0.0" y="89" width="414" height="807"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="-1" id="1Gq-6Z-TxE"/>
<outlet property="delegate" destination="-1" id="7Rz-4b-yjr"/>
</connections>
</tableView> </tableView>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
......
//
// SY_SLS_GL_VC_Cell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/11.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
class SY_SLS_GL_VC_Cell: UITableViewCell {
@IBOutlet weak var icon: UIImageView!
@IBOutlet weak var name: UILabel!
@IBOutlet weak var income: UILabel!
@IBOutlet weak var status: UILabel!
@IBOutlet weak var time: UILabel!
@IBOutlet weak var adress: UILabel!
@IBOutlet weak var btn: UIButton!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
...@@ -9,16 +9,46 @@ ...@@ -9,16 +9,46 @@
import UIKit import UIKit
class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, UISearchBarDelegate, SearchBarViewDelegate,GYS_FX_ProductCellDelegate ,SelectContentViewDelegate,HeaderSelectViewDelegate,DistributorSettingAlertViewDelegate{ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, UISearchBarDelegate, SearchBarViewDelegate,SelectContentViewDelegate,HeaderSelectViewDelegate,DistributorSettingAlertViewDelegate, New_Fx_Cell_Delegate{
func New_Fx_Cell_btnSelect(idx: Int, cell: New_Fx_Cell) {
let model = datas[idx]
if selectItem.contains(model.sku_id!){
let index = selectItem.firstIndex(of: model.sku_id!)
selectItem.remove(at: index!)
}else{
selectItem.append(model.sku_id!)
}
all_select_btn.isSelected = false
all_select_btn.setTitle(" 全选(已选 " + StringByInt(number: selectItem.count) + " 件商品)", for: .normal)
home_list_tbv.reloadData()
}
func New_Fx_Cell_btnClick(idx: Int, cell: New_Fx_Cell) {
switch idx {
case 0:
break
case 1:
break
default:
//分销设置
let view = FXSZ_View(frame: self.view.bounds)
self.view.addSubview(view)
break
}
}
@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 {
return return
} }
let vc = DistributorSettingAlertView(frame: self.view.bounds) let vc = FXSZ_View(frame: self.view.bounds)
vc.delegate = self // let vc = DistributorSettingAlertView(frame: self.view.bounds)
// vc.delegate = self
//
if selectItem.count > 1 { if selectItem.count > 1 {
vc.is_all_select_mode = is_Edit vc.is_all_select_mode = is_Edit
} }
...@@ -77,13 +107,13 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -77,13 +107,13 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
} failture: { (err) in} } failture: { (err) in}
} }
func GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) { // func new_GYS_FX_ProductCellTableViewCellBtnAction(idx: Int) {
let vc = DistributorSettingAlertView(frame: self.view.bounds) // let vc = DistributorSettingAlertView(frame: self.view.bounds)
vc.tag = idx // vc.tag = idx
vc.data = datas[idx] // vc.data = datas[idx]
vc.delegate = self // vc.delegate = self
self.view.addSubview(vc) // self.view.addSubview(vc)
} // }
var datas:Array<supGoodsListResDataModel> = [] var datas:Array<supGoodsListResDataModel> = []
var selectIndexArr = [0,0] var selectIndexArr = [0,0]
...@@ -301,7 +331,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -301,7 +331,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
initHeaderSelectView() initHeaderSelectView()
home_list_tbv.register(UINib(nibName: "GYS_FX_ProductCellTableViewCell", bundle: nil), forCellReuseIdentifier: "GYS_FX_ProductCellTableViewCell") home_list_tbv.register(UINib(nibName: "New_Fx_Cell", bundle: nil), forCellReuseIdentifier: "New_Fx_Cell")
home_list_tbv.separatorStyle = .none home_list_tbv.separatorStyle = .none
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
//下拉刷新相关设置 //下拉刷新相关设置
...@@ -320,88 +350,69 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat ...@@ -320,88 +350,69 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let model = datas[indexPath.row] let model = datas[indexPath.row]
let cell = tableView.dequeueReusableCell(withIdentifier: "GYS_FX_ProductCellTableViewCell") as! GYS_FX_ProductCellTableViewCell let cell = tableView.dequeueReusableCell(withIdentifier: "New_Fx_Cell") as! New_Fx_Cell
cell.submitBtn.setTitle("设置", for: .normal)
cell.submitBtn.setTitleColor(UIColor(named: "按钮背景颜色"), for: .normal)
cell.tag = indexPath.row cell.tag = indexPath.row
cell.delegate = self cell.delegate = self
if is_Edit{ if is_Edit{
cell.leftValue.constant = 45 cell.leftValue.constant = 45
cell.submit_Btn_W.constant = 10 cell.leftBtn.isUserInteractionEnabled = true
cell.submitBtn.isHidden = true cell.select_img.isHidden = false
cell.left_btn.isUserInteractionEnabled = true cell.select_img.image = UIImage(named: "daixuan")
cell.select_Img.isHidden = false
cell.select_Img.image = UIImage(named: "daixuan")
selectItem.forEach { (idx) in selectItem.forEach { (idx) in
if idx == model.sku_id{ if idx == model.sku_id{
cell.select_Img.image = UIImage(named: "yuxuan") cell.select_img.image = UIImage(named: "yuxuan")
} }
} }
}else{ }else{
cell.leftValue.constant = 0 cell.leftValue.constant = 0
cell.submit_Btn_W.constant = 50 cell.leftBtn.isUserInteractionEnabled = false
cell.submitBtn.isHidden = false cell.select_img.isHidden = true
cell.left_btn.isUserInteractionEnabled = false
cell.select_Img.isHidden = true
} }
cell.old_price_line.isHidden = false // cell.old_price_line.isHidden = false
cell.new_price_Lbl.isHidden = false // cell.new_price_Lbl.isHidden = false
if model.dbt_price == nil { if model.dbt_price == nil {
cell.old_price_line.isHidden = true // cell.old_price_line.isHidden = true
cell.new_price_Lbl.text = "" // cell.new_price_Lbl.text = ""
}else{ }else{
cell.new_price_Lbl.text = "¥" + model.dbt_price! // cell.new_price_Lbl.text = "¥" + model.dbt_price!
} }
cell.old_price_Lbl.text = "¥" + model.price! // cell.old_price_Lbl.text = "¥" + model.price!
if model.commission_type == 1{ if model.commission_type == 1{
cell.FX_Percent_Lbl.isHidden = false // cell.FX_Percent_Lbl.isHidden = false
cell.FX_Percent_Lbl.text = "分销(" + StringByInt(number: model.commission_per!) + "%)" // cell.FX_Percent_Lbl.text = "分销(" + StringByInt(number: model.commission_per!) + "%)"
}else if model.commission_type == 2{ }else if model.commission_type == 2{
cell.FX_Percent_Lbl.isHidden = false // cell.FX_Percent_Lbl.isHidden = false
cell.FX_Percent_Lbl.text = "分销(" + model.commission_val! + "元)" // cell.FX_Percent_Lbl.text = "分销(" + model.commission_val! + "元)"
}else{ }else{
cell.FX_Percent_Lbl.isHidden = true // cell.FX_Percent_Lbl.isHidden = true
} }
cell.title_Lbl.text = model.goods_name // cell.title_Lbl.text = model.goods_name
cell.sell_total_Lbl.text = "销量:-" // cell.sell_total_Lbl.text = "销量:-"
if model.dbt_sale != nil { if model.dbt_sale != nil {
cell.sell_total_Lbl.text = "销量:" + StringByInt(number: model.dbt_sale!) // cell.sell_total_Lbl.text = "销量:" + StringByInt(number: model.dbt_sale!)
} }
cell.store_lbl.text = "库存:-" // cell.store_lbl.text = "库存:-"
if model.inventory != nil { if model.inventory != nil {
cell.store_lbl.text = "库存:" + StringByInt(number: model.inventory!) // cell.store_lbl.text = "库存:" + StringByInt(number: model.inventory!)
} }
if model.goods_thumb != nil { if model.goods_thumb != nil {
cell.item_Icon_Img.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)
} }
cell.color_lbl.isHidden = cell.FX_Percent_Lbl.isHidden
cell.color_lbl.text = cell.FX_Percent_Lbl.text
return cell return cell
} }
var selectItem:Array<Int> = [] var selectItem:Array<Int> = []
func GYS_FX_ProductCellTableViewCellSelect(idx: Int) {
let model = datas[idx]
if selectItem.contains(model.sku_id!){
let index = selectItem.firstIndex(of: model.sku_id!)
selectItem.remove(at: index!)
}else{
selectItem.append(model.sku_id!)
}
all_select_btn.isSelected = false
all_select_btn.setTitle(" 全选(已选 " + StringByInt(number: selectItem.count) + " 件商品)", for: .normal)
home_list_tbv.reloadData()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 125 return 145
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
...@@ -55,11 +55,11 @@ ...@@ -55,11 +55,11 @@
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="down_black" translatesAutoresizingMaskIntoConstraints="NO" id="vA6-ms-fq4"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="下拉11" translatesAutoresizingMaskIntoConstraints="NO" id="vA6-ms-fq4">
<rect key="frame" x="125.5" y="18" width="9.5" height="4"/> <rect key="frame" x="125.5" y="13" width="14" height="14"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="9.5" id="8Hv-7Z-Jgw"/> <constraint firstAttribute="width" constant="14" id="8Hv-7Z-Jgw"/>
<constraint firstAttribute="height" constant="4" id="XAk-3r-Fte"/> <constraint firstAttribute="height" constant="14" id="XAk-3r-Fte"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上架" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qvp-uj-CDO"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上架" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qvp-uj-CDO">
...@@ -71,11 +71,11 @@ ...@@ -71,11 +71,11 @@
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="down_black" translatesAutoresizingMaskIntoConstraints="NO" id="lKN-gq-uKz"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="下拉11" translatesAutoresizingMaskIntoConstraints="NO" id="lKN-gq-uKz">
<rect key="frame" x="319" y="18" width="9.5" height="4"/> <rect key="frame" x="319" y="13" width="14" height="14"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="4" id="HDk-Uf-VaE"/> <constraint firstAttribute="height" constant="14" id="HDk-Uf-VaE"/>
<constraint firstAttribute="width" constant="9.5" id="WVn-ZN-4L8"/> <constraint firstAttribute="width" constant="14" id="WVn-ZN-4L8"/>
</constraints> </constraints>
</imageView> </imageView>
</subviews> </subviews>
...@@ -226,8 +226,8 @@ ...@@ -226,8 +226,8 @@
</objects> </objects>
<resources> <resources>
<image name="daixuan" width="19" height="19"/> <image name="daixuan" width="19" height="19"/>
<image name="down_black" width="11.5" height="6"/>
<image name="yuxuan" width="19" height="19"/> <image name="yuxuan" width="19" height="19"/>
<image name="下拉11" width="14" height="14"/>
<namedColor name="#F57575"> <namedColor name="#F57575">
<color red="0.96100002527236938" green="0.45899999141693115" blue="0.45899999141693115" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.96100002527236938" green="0.45899999141693115" blue="0.45899999141693115" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
......
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