Commit 68006167 authored by lujunye's avatar lujunye

81,83,84,85

parent 08ddb586
......@@ -4,7 +4,7 @@
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"alpha" : "0.690",
"blue" : "0.463",
"green" : "0.639",
"red" : "0.980"
......@@ -22,7 +22,7 @@
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"alpha" : "0.690",
"blue" : "0.463",
"green" : "0.639",
"red" : "0.980"
......
......@@ -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
//视图常量
......
......@@ -26,6 +26,7 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource {
}
}
var dataArr : [String] = []{
didSet{
if dataArr.count > 3 {
......@@ -35,6 +36,8 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource {
}else{
tabContentHeight.constant = CGFloat((50 * Int(glscale)) * dataArr.count + 5)
}
}else if dataArr.count == 2{
tabContentHeight.constant = 100 * glscale + 5
}else{
tabContentHeight.constant = 150 * glscale + 5
}
......@@ -43,6 +46,7 @@ class SelectContentView: UIView, UITableViewDelegate, UITableViewDataSource {
}
func setTabv() {
tableV = UITableView()
tabContentV.addSubview(tableV);
tableV.snp.makeConstraints { (make) in
......
......@@ -31,7 +31,7 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
} failture: { (err) in
}
}
@IBOutlet weak var center_select_btn: UIButton!
......@@ -141,26 +141,28 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
model.data?.forEach({ (item) in
self.centersArr.append(item)
})
//MARK: - 限制中心选择高度
var select_list_tbv_height = self.centersArr.count * 49
if select_list_tbv_height > 350 {
select_list_tbv_height = 350
}
self.select_list_tbv.snp.updateConstraints{ (make) in
make.top.equalTo(self.center_select_btn.snp_bottom)
make.left.right.equalTo(0)
make.height.equalTo(select_list_tbv_height)
}
self.center_Name_Lbl.text = self.centersArr.first?.shop_name
self.arrow_Img.image = UIImage(named: "down_blue")
self.shop_id = (self.centersArr.first?.shop_id)!
self.select_list_tbv.reloadData()
if model.code == 1 {
HUD.hide()
if self.centersArr.count != 0 {
//MARK: - 限制中心选择高度
var select_list_tbv_height = self.centersArr.count * 49
if select_list_tbv_height > 350 {
select_list_tbv_height = 350
}
self.select_list_tbv.snp.updateConstraints{ (make) in
make.top.equalTo(self.center_select_btn.snp_bottom)
make.left.right.equalTo(0)
make.height.equalTo(select_list_tbv_height)
}
self.center_Name_Lbl.text = self.centersArr.first?.shop_name
self.arrow_Img.image = UIImage(named: "down_blue")
self.shop_id = (self.centersArr.first?.shop_id)!
self.select_list_tbv.reloadData()
if model.code == 1 {
HUD.hide()
}
self.shop_id = (model.data?.first?.shop_id)!
}
self.shop_id = (model.data?.first?.shop_id)!
//下拉刷新相关设置
self.headerMJ.setRefreshingTarget(self, refreshingAction: #selector(self.loadData))
self.home_list_tbv.mj_header = self.headerMJ
......@@ -211,7 +213,7 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
self.home_list_tbv?.mj_header?.endRefreshing()
self.page = 2
self.count_lbl.text = "0"
if model.data?.sum_goods != nil {
self.count_lbl.text = StringByInt(number: (model.data?.sum_goods!)!)
}
......@@ -287,8 +289,8 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
}else{
cell.FX_Percent_Lbl.isHidden = true
}
cell.old_price_line.isHidden = false
cell.new_price_Lbl.isHidden = false
if model.dbt_price == nil {
......
......@@ -53,14 +53,13 @@ class GYS_FX_SearchViewController: BaseViewController,UITableViewDelegate,UITabl
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
if searchBar.text?.count == 0 && keyword.count != 0{
keyword = searchBar.text!
}
print("key - ",searchBar.text!)
removeBlackBtnView()
if keyword.count > 0 {
self.home_list_tbv.mj_header?.beginRefreshing()
keyword = searchBar.text!
if keyword.count == 0 {
loadData()
}
}
}
@objc func removeBlackBtnView(){
......@@ -76,7 +75,7 @@ class GYS_FX_SearchViewController: BaseViewController,UITableViewDelegate,UITabl
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
self.view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.top.equalTo(searchV!.snp_bottom)
make.top.equalTo(searchView!.snp_bottom)
make.left.right.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
......
......@@ -67,11 +67,13 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
if searchBar.text?.count == 0 && keyword.count != 0{
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
loadData()
}
}
print("key - ",searchBar.text!)
home_list_tbv.mj_header?.beginRefreshing()
removeBlackBtnView()
}
@objc func removeBlackBtnView(){
......@@ -87,7 +89,7 @@ class GYS_HZ_Vc: BaseViewController,UITableViewDelegate,UITableViewDataSource, U
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
self.view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.top.equalTo(searchV!.snp_bottom)
make.top.equalTo(search_view!.snp_bottom)
make.left.right.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<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"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GYSListViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GYSListViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="btmLbl" destination="z9e-bT-lDi" id="BcP-Rc-hrF"/>
<outlet property="listView" destination="Qqa-3M-ZQN" id="jPb-Zb-3ct"/>
......@@ -23,7 +25,7 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9kx-tK-PfB" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
<color key="value" name="按钮渐变色上"/>
......@@ -48,7 +50,7 @@
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Qqa-3M-ZQN">
<rect key="frame" x="0.0" y="88" width="414" height="725"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="-1" id="TVJ-KE-qtq"/>
<outlet property="delegate" destination="-1" id="QYO-PN-ejg"/>
......@@ -56,12 +58,13 @@
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WnZ-DY-vHR">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="w6B-Wh-pPi"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="9kx-tK-PfB" firstAttribute="top" secondItem="z9e-bT-lDi" secondAttribute="top" id="0NX-2N-3lZ"/>
......@@ -79,10 +82,14 @@
<constraint firstAttribute="bottom" secondItem="9kx-tK-PfB" secondAttribute="bottom" id="il2-ke-p14"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="WnZ-DY-vHR" secondAttribute="trailing" id="ooy-cD-b4B"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="131.8840579710145" y="131.91964285714286"/>
</view>
</objects>
<designables>
<designable name="9kx-tK-PfB">
<size key="intrinsicContentSize" width="10" height="10"/>
</designable>
</designables>
<resources>
<namedColor name="按钮渐变色上">
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......@@ -93,5 +100,8 @@
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -91,7 +91,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
let arr1 = ["全部商品", "不参与分销商品", "参与分销商品", "佣金比例商品", "绝对额比例商品"]
arr.append(arr1[sender])
}else if showSelectvIndex == 1{
let arr2 = ["全部","上架", "下架"]
let arr2 = ["上架", "下架"]
arr.append(arr2[sender])
}
selectV.colseBytitleArr(arr: arr, index:showSelectvIndex)
......@@ -129,7 +129,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
make.top.equalTo(top_btn_bg_view.snp_bottom)
}
showSelectV = showSelectView
showSelectView.dataArr = ["全部","上架", "下架"]
showSelectView.dataArr = ["上架", "下架"]
showSelectView.selectIndx = selectIndexArr[1]
}
......@@ -169,12 +169,13 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
if searchBar.text?.count == 0 && keyword.count != 0{
removeBlackBtnView()
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
loadData()
}
}
print("key - ",searchBar.text!)
removeBlackBtnView()
home_list_tbv.mj_header?.beginRefreshing()
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
......@@ -182,7 +183,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
self.view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.top.equalTo(searchV!.snp_bottom)
make.top.equalTo(search_view!.snp_bottom)
make.left.right.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
......@@ -235,7 +236,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
func initHeaderSelectView() {
let selectView = HeaderSelectView()
selectView.firstBtn.setTitle("全部商品", for: .normal)
selectView.secBtn.setTitle("全部", for: .normal)
selectView.secBtn.setTitle("上架", for: .normal)
selectView.thereBtn.removeFromSuperview()
selectView.firstBtn.snp_makeConstraints { (make) in
make.left.top.bottom.equalTo(0)
......@@ -332,13 +333,15 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
cell.new_price_Lbl.text = "¥" + model.dbt_price!
}
cell.old_price_Lbl.text = "¥" + model.price!
if model.commission_type == 1{
cell.FX_Percent_Lbl.isHidden = false
cell.FX_Percent_Lbl.text = StringByInt(number: model.commission_per!) + "%"
}else{
cell.FX_Percent_Lbl.isHidden = true
}
if model.commission_type == 1{
cell.FX_Percent_Lbl.isHidden = false
cell.FX_Percent_Lbl.text = "分销(" + StringByInt(number: model.commission_per!) + "%)"
}else if model.commission_type == 2{
cell.FX_Percent_Lbl.isHidden = false
cell.FX_Percent_Lbl.text = "分销(" + model.commission_val! + "元)"
}else{
cell.FX_Percent_Lbl.isHidden = true
}
cell.title_Lbl.text = model.goods_name
if model.dbt_sale != nil {
cell.sell_total_Lbl.text = StringByInt(number: model.dbt_sale!)
......@@ -367,7 +370,7 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
}
var is_show = 2
var is_show = 1
var goods_type = 1
//MARK:--加载数据
@objc func loadData(){
......@@ -376,9 +379,6 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
isUpData = true
goods_type = selectIndexArr.first! + 1
switch selectIndexArr.last {
case 0:
is_show = 2
break
case 1:
is_show = 1
break
......
......@@ -76,10 +76,11 @@ class BingDingKeHuViewController: BaseViewController,UITableViewDelegate,UITable
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if searchBar.text?.count == 0 && keyword.count != 0{
if keyword.count > 0 {
keyword = searchBar.text!
listView.mj_header?.beginRefreshing()
if keyword.count == 0 {
loadData()
}
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
......
......@@ -98,10 +98,11 @@ class KeHuListViewController: BaseViewController,UITableViewDelegate,UITableView
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if searchBar.text?.count == 0 && keyword.count != 0{
if keyword.count > 0 {
keyword = searchBar.text!
listView.mj_header?.beginRefreshing()
if keyword.count == 0 {
loadData()
}
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
......
......@@ -624,24 +624,24 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
HUD.flash(.label("敬请期待"),delay: 1.2)
return
case 133: //分销店铺管理
HUD.flash(.label("敬请期待"),delay: 1.2)
// let vc = GYS_HZ_Vc()
// vc.title_str = "分销商管理"
// self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = GYS_HZ_Vc()
vc.title_str = "分销商管理"
self.navigationController?.pushViewController(vc, animated: true)
return
case 135: //供应商管理
HUD.flash(.label("敬请期待"),delay: 1.2)
// let vc = GYS_HZ_Vc()
// vc.title_str = "供应商管理"
// self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = GYS_HZ_Vc()
vc.title_str = "供应商管理"
self.navigationController?.pushViewController(vc, animated: true)
return
case 136: //分销员管理
HUD.flash(.label("敬请期待"),delay: 1.2)
return
case 137: //分销商品管理
HUD.flash(.label("敬请期待"),delay: 1.2)
// let vc = FX_Product_GuanLiVC()
// self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = FX_Product_GuanLiVC()
self.navigationController?.pushViewController(vc, animated: true)
return
case 139: //分销分账设置
//只有当其为供应商才可以进入
......@@ -665,14 +665,14 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
return
case 140: //分销订单管理
HUD.flash(.label("敬请期待"),delay: 1.2)
// let vc = RetailManageViewController()
// self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = RetailManageViewController()
self.navigationController?.pushViewController(vc, animated: true)
return
case 142: //供应商商品管理
HUD.flash(.label("敬请期待"),delay: 1.2)
// let vc = GYS_FX_Product_VC()
// self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = GYS_FX_Product_VC()
self.navigationController?.pushViewController(vc, animated: true)
return
default:
break;
......
......@@ -248,10 +248,11 @@ class YingFuZKListViewController: BaseViewController,UISearchBarDelegate,SearchB
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if searchBar.text?.count == 0 && keyword.count != 0{
if keyword.count > 0 {
keyword = searchBar.text!
listView.mj_header?.beginRefreshing()
if keyword.count == 0 {
loadData()
}
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
......
......@@ -424,10 +424,11 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if searchBar.text?.count == 0 && keyword.count != 0{
if keyword.count > 0 {
keyword = searchBar.text!
listView.mj_header?.beginRefreshing()
if keyword.count == 0 {
loadData()
}
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
......
......@@ -231,9 +231,11 @@ class PinPaiListViewController: BaseViewController,UISearchBarDelegate,SearchBar
}
removeBlackBtnView()
if searchBar.text?.count == 0 && keyWord.count != 0{
if keyWord.count > 0 {
keyWord = searchBar.text!
listView.mj_header?.beginRefreshing()
if keyWord.count == 0 {
loadData()
}
}
......
......@@ -133,6 +133,9 @@ class CGDListViewController: BaseViewController ,UISearchBarDelegate, SearchBar
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if searchBar.text?.count == 0 && keyword.count != 0{
keyword = searchBar.text!
viewControllers.forEach { (vc) in
......
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