Commit b8d42b88 authored by lujunye's avatar lujunye

分销员功能完成

parent 14257e89
{
"images" : [
{
"filename" : "up_black.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "up_black@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "up_black@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "icon_rili.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_rili@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_rili@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.929",
"green" : "0.906",
"red" : "0.914"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.929",
"green" : "0.906",
"red" : "0.914"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"localizable" : true
}
}
......@@ -304,5 +304,21 @@
<string>Distribution/dbtIncomeInfo</string>
<key>收益详情界面信息</key>
<string>Distribution/incomeDetails</string>
<key>待审核分销员界面信息查询</key>
<string>Distribution/examineDbtInfo</string>
<key>审核操作(通过和不通过)</key>
<string>Distribution/examineOperation</string>
<key>客户详情信息界面查询</key>
<string>Distribution/dbtCustomerInfo</string>
<key>删除客户</key>
<string>Distribution/deleteDbtCustomer</string>
<key>分销员管理界面信息查询</key>
<string>Distribution/dbtManageQuery</string>
<key>手机号检索信息</key>
<string>Distribution/phoneRetrievalInfo</string>
<key>新增分销员</key>
<string>Distribution/addDistributor</string>
<key>删除分销员</key>
<string>Distribution/stopDbtCooperation</string>
</dict>
</plist>
......@@ -8,7 +8,7 @@
import Foundation
import ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员
class UpDataModel: Mappable {
......
......@@ -44,3 +44,128 @@ func incomeDetails(_ params:[String:Any],success:@escaping (_ res:Any)->(),failt
failture(error)
}
}
//MARK:--待审核分销员界面信息查询
/*
user_token 用户token
keyword 模糊搜素(分销员名称)
start_time 开始时间
end_time 结束时间
from 来源:0:PC后台,1:小程序,2:PC官网,3:商户端app,不传为全部
*/
func examineDbtInfo(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("待审核分销员界面信息查询", params, { (rep:DataResponse<examineDbtInfoModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//MARK:--审核操作(通过和不通过)
/*
user_token 用户token
keyword 模糊搜素(分销员名称)
start_time 开始时间
end_time 结束时间
from 来源:0:PC后台,1:小程序,2:PC官网,3:商户端app,不传为全部
*/
func examineOperation(_ 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:--客户详情信息界面查询
/*
user_token 用户token
keyword 模糊搜素(分销员名称)
start_time 开始时间
end_time 结束时间
page
*/
func dbtCustomerInfo(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("客户详情信息界面查询", params, { (rep:DataResponse<dbtCustomerInfoModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//MARK:--删除客户
/*
user_token 用户token
user_id 客户id
type_id 邀请人id
*/
func deleteDbtCustomer(_ 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:--分销员管理界面信息查询
/*
user_token 用户token
keyword 模糊搜索(分销员名称)
page 分页查询
*/
func dbtManageQuery(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("分销员管理界面信息查询", params, { (rep:DataResponse<dbtManageQueryModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//MARK:--手机号检索信息
/*
user_token 用户token
phone 手机号
*/
func phoneRetrievalInfo(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("手机号检索信息", params, { (rep:DataResponse<phoneRetrievalInfoModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//MARK:--新增分销员
/*
user_token 用户token
user_id 客户id
type_id 邀请人id
*/
func addDistributor(_ 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:--删除分销员
/*
user_token 用户token
user_id 客户id
type_id 邀请人id
*/
func stopDbtCooperation(_ 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)
}
}
......@@ -25,10 +25,10 @@ class dbtIncomeInfoModel: Mappable {
}
class dbtIncomeInfoDataModel: Mappable {
var is_sup:Int?///是否是供应商(1是0否)
var is_dbt : Int? ///是否是分销商(1是0否)
var inc :Float?///收入
var exp:Float?///支出
var is_sup:Int?//是否是供应商(1是0否)
var is_dbt : Int? //是否是分销商(1是0否)
var inc :Float?//收入
var exp:Float?//支出
var res : Array<dbtIncomeInfoDatasModel>?
required init?( map: Map) {
}
......@@ -41,12 +41,12 @@ class dbtIncomeInfoDataModel: Mappable {
}
}
class dbtIncomeInfoDatasModel: Mappable {
var add_time:String?///时间
var add_time:String?//时间
var record_sn : String? ///流水号
var remark :String?///分账类型
var remark :String?//分账类型
var order_sn:String?///订单编号
var in_amount :String?///收益金额
var order_sn:String?//订单编号
var in_amount :String?//收益金额
required init?( map: Map) {
}
func mapping(map: Map) {
......@@ -108,3 +108,165 @@ class incomeDetailsDataModel: Mappable {
refund_cycle <- map["refund_cycle"]
}
}
class examineDbtInfoModel: Mappable {
var code:Int?
var message : String?
var data :Array<examineDbtInfoDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class examineDbtInfoDataModel: Mappable {
var user_name:String?//用户名
var phone : String?//手机号
var create_time :String?//申请时间
var from : Int?//来源:1:小程序,2:食品网,4:全部
var user_id :Int? //用户id
var type:Int?//类型:0内部员工 1外部员工
required init?( map: Map) {
}
func mapping(map: Map) {
user_name <- map["user_name"]
phone <- map["phone"]
create_time <- map["create_time"]
from <- map["from"]
user_id <- map["user_id"]
type <- map["type"]
}
}
class dbtCustomerInfoModel: Mappable {
var code:Int?
var message : String?
var data :Array<dbtCustomerInfoDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class dbtCustomerInfoDataModel: Mappable {
var user_id : Int?//客户的id
var type_id :Int? //邀请人id
var create_time:String?//加入时间
var customer_name : String?//客户名称
var customer_phone :String?//客户手机号码
var distributor_name:String?//邀请人名称
var order_number : String?//下单数量
var sum_order_money :String?//成交金额
var latest_order_time :String?//最近下单时间
required init?( map: Map) {
}
func mapping(map: Map) {
user_id <- map["user_id"]
type_id <- map["type_id"]
create_time <- map["create_time"]
customer_name <- map["customer_name"]
customer_phone <- map["customer_phone"]
distributor_name <- map["distributor_name"]
order_number <- map["order_number"]
sum_order_money <- map["sum_order_money"]
latest_order_time <- map["latest_order_time"]
}
}
class dbtManageQueryModel: Mappable {
var code:Int?
var message : String?
var data :dbtManageQueryDataModel?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class dbtManageQueryDataModel: Mappable {
var count : Int?//总人数
var res :Array<dbtManageQueryDatasModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
count <- map["count"]
res <- map["res"]
}
}
class dbtManageQueryDatasModel: Mappable {
var user_name : String? //用户名
var type :Int? //类型:0内部员工 1外部员工
var update_time : String? //合作时间
var user_id :Int? //用户id
var sum_in_amount : Float?//累计佣金收益
var count_customers :Int?//累计客户人数
required init?( map: Map) {
}
func mapping(map: Map) {
user_name <- map["user_name"]
type <- map["type"]
update_time <- map["update_time"]
user_id <- map["user_id"]
sum_in_amount <- map["sum_in_amount"]
count_customers <- map["count_customers"]
}
}
class phoneRetrievalInfoModel: Mappable {
var code : Int?
var message :String?
var data:phoneRetrievalInfoDataModel?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class phoneRetrievalInfoDataModel: Mappable {
var user_name :String?
required init?( map: Map) {
}
func mapping(map: Map) {
user_name <- map["user_name"]
}
}
<?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"/>
<dependencies>
<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="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
......@@ -341,9 +341,6 @@
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......
......@@ -466,7 +466,7 @@ class GLAlertSelectView: UIView,UITableViewDelegate,UITableViewDataSource,TitleA
}
let inputTF = UITextField()
inputTF.addTarget(self, action: #selector(textChange(TF:)), for: .allEditingEvents)
inputTF.addTarget(self, action: #selector(textChange(TF:)), for: .editingChanged)
inputTF.placeholder = "请输入库位名称"
inputTF.textAlignment = .center
inputTF.font = UIFont.systemFont(ofSize: 13)
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" 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_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<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"/>
</dependencies>
<objects>
......@@ -24,7 +25,7 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F3A-eQ-U1t">
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F3A-eQ-U1t">
<rect key="frame" x="0.0" y="-60" width="414" height="1016"/>
<color key="backgroundColor" name="标题字颜色"/>
<state key="normal">
......@@ -36,7 +37,7 @@
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yGj-x3-YL4" 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="按钮渐变色上"/>
......@@ -90,13 +91,13 @@
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vcr-wd-MNy">
<rect key="frame" x="0.0" y="52.000000000000007" width="414" height="95.666666666666686"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="95.5" id="GWf-OE-tbg"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Obf-xN-br1" firstAttribute="top" secondItem="Y0m-9G-DsZ" secondAttribute="top" id="3uO-4M-WHX"/>
<constraint firstAttribute="height" constant="250" id="HPp-z3-Qzc"/>
......@@ -115,6 +116,7 @@
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="F3A-eQ-U1t" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="-60" id="3h8-Iy-I3T"/>
......@@ -132,10 +134,14 @@
<constraint firstItem="yGj-x3-YL4" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="xKf-sb-Q5b"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="qFB-1i-CWM" secondAttribute="bottom" id="xMm-ka-fIT"/>
</constraints>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<point key="canvasLocation" x="128.98550724637681" y="120.53571428571428"/>
</view>
</objects>
<designables>
<designable name="yGj-x3-YL4">
<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"/>
......@@ -152,5 +158,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>
<?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"/>
<dependencies>
<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="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
......@@ -199,9 +199,6 @@
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......
<?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"/>
<dependencies>
<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="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" 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="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<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"/>
</dependencies>
<objects>
......@@ -53,7 +54,7 @@
<constraint firstAttribute="width" constant="1" id="Hda-pW-vCm"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jjl-au-58t">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jjl-au-58t">
<rect key="frame" x="0.0" y="125" width="137" height="49"/>
<color key="tintColor" name="灰色字体颜色"/>
<state key="normal">
......@@ -69,7 +70,7 @@
<action selector="leftAction:" destination="-1" eventType="touchUpInside" id="LsY-OO-91v"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LNC-Jz-ETd">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LNC-Jz-ETd">
<rect key="frame" x="138" y="125" width="137" height="49"/>
<state key="normal">
<attributedString key="attributedTitle">
......@@ -108,7 +109,7 @@
</userDefinedRuntimeAttributes>
</textField>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="B2W-zJ-284" firstAttribute="leading" secondItem="jjl-au-58t" secondAttribute="trailing" id="305-TD-iiF"/>
<constraint firstItem="LNC-Jz-ETd" firstAttribute="top" secondItem="CtT-4q-BsP" secondAttribute="bottom" id="9Z5-0e-qrb"/>
......@@ -146,6 +147,7 @@
</userDefinedRuntimeAttributes>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="ffS-dx-p3e"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="jqY-C3-bYZ" firstAttribute="leading" secondItem="Opm-YW-4MN" secondAttribute="leading" id="20N-X3-mf3"/>
......@@ -155,7 +157,6 @@
<constraint firstAttribute="bottom" secondItem="jqY-C3-bYZ" secondAttribute="bottom" id="xQl-pJ-MzL"/>
<constraint firstItem="jqY-C3-bYZ" firstAttribute="top" secondItem="Opm-YW-4MN" secondAttribute="top" id="zuG-ET-91R"/>
</constraints>
<viewLayoutGuide key="safeArea" id="ffS-dx-p3e"/>
<point key="canvasLocation" x="-155" y="111"/>
</view>
</objects>
......@@ -178,5 +179,8 @@
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" 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="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<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"/>
</dependencies>
<objects>
......@@ -70,7 +71,7 @@
<constraint firstAttribute="width" constant="1" id="Mbt-D4-gC5"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uxE-uw-0md">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uxE-uw-0md">
<rect key="frame" x="0.0" y="197" width="137" height="49"/>
<color key="tintColor" name="灰色字体颜色"/>
<state key="normal">
......@@ -86,7 +87,7 @@
<action selector="leftAction:" destination="-1" eventType="touchUpInside" id="IdL-ds-TFl"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ePO-y1-BiN">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ePO-y1-BiN">
<rect key="frame" x="138" y="197" width="137" height="49"/>
<state key="normal">
<attributedString key="attributedTitle">
......@@ -114,7 +115,7 @@
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="ort-a6-At0" firstAttribute="top" secondItem="wXk-Gr-x6B" secondAttribute="bottom" constant="15" id="20E-op-sJJ"/>
<constraint firstAttribute="trailing" secondItem="wXk-Gr-x6B" secondAttribute="trailing" constant="15" id="3Gk-Bd-LmH"/>
......@@ -154,6 +155,7 @@
</userDefinedRuntimeAttributes>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="zbe-pF-tHJ"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="y7W-CL-kpT" firstAttribute="leading" secondItem="G1J-il-RBv" secondAttribute="leading" id="74s-kQ-L3r"/>
......@@ -163,7 +165,6 @@
<constraint firstAttribute="trailing" secondItem="y7W-CL-kpT" secondAttribute="trailing" id="h7o-OK-7v1"/>
<constraint firstItem="edy-Uj-qaX" firstAttribute="centerX" secondItem="G1J-il-RBv" secondAttribute="centerX" id="mob-gs-x4q"/>
</constraints>
<viewLayoutGuide key="safeArea" id="zbe-pF-tHJ"/>
<point key="canvasLocation" x="-155.07246376811597" y="110.86956521739131"/>
</view>
</objects>
......@@ -180,9 +181,6 @@
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......@@ -192,5 +190,8 @@
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -28,6 +28,7 @@ class GeliAlertView: UIView {
//选择了该版本取消更新后不再提示
// UserDefaults.standard.setValue(appStoreVersion, forKey: "appStoreVersion")
}
self.removeFromSuperview()
}
@IBAction func rightAction(_ sender: UIButton) {
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" 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="retina6_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" 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>
......@@ -70,7 +71,7 @@
</attributedString>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Dyd-7e-8BO">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Dyd-7e-8BO">
<rect key="frame" x="0.0" y="109" width="124" height="49"/>
<color key="tintColor" name="灰色字体颜色"/>
<state key="normal">
......@@ -86,7 +87,7 @@
<action selector="leftAction:" destination="-1" eventType="touchUpInside" id="AFp-VK-m6e"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PtZ-E6-HsS">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PtZ-E6-HsS">
<rect key="frame" x="125" y="109" width="124" height="49"/>
<state key="normal">
<attributedString key="attributedTitle">
......@@ -102,7 +103,7 @@
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="xhi-ml-JFj" firstAttribute="top" secondItem="iMI-qP-BVc" secondAttribute="bottom" constant="10" id="1aG-41-dKY"/>
<constraint firstAttribute="trailing" secondItem="PtZ-E6-HsS" secondAttribute="trailing" id="2hY-Ev-agW"/>
......@@ -195,5 +196,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>
......@@ -18,7 +18,7 @@ class TitleAndTFCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
textTF.addTarget(self, action: #selector(textChange(textField:)), for: .allEditingEvents)
textTF.addTarget(self, action: #selector(textChange(textField:)), for: .editingChanged)
}
......
......@@ -28,7 +28,7 @@ class WareHouseSpCell: UITableViewCell {
self.selectionStyle = .none
whSwitch.addTarget(self, action: #selector(swValueChange(sender:)), for: .valueChanged)
whSwitch.transform = CGAffineTransform( scaleX: 0.8, y: 0.8)
detailTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
detailTF.addTarget(self, action: #selector(textChange(sender:)), for: .editingChanged)
// Initialization code
}
@objc func swValueChange(sender:UISwitch){
......
......@@ -77,8 +77,8 @@ class XuanZeShangPinCell: UITableViewCell{
super.awakeFromNib()
self.selectionStyle = .none
selectBtn.isUserInteractionEnabled = false
priceTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
countTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
priceTF.addTarget(self, action: #selector(textChange(sender:)), for: .editingChanged)
countTF.addTarget(self, action: #selector(textChange(sender:)), for: .editingChanged)
// Initialization code
......
......@@ -31,7 +31,7 @@ class PiCiXuanZeCell: UITableViewCell,UITextFieldDelegate {
self.selectionStyle = .none
textTF.keyboardType = .numberPad
textTF.delegate = self
textTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
textTF.addTarget(self, action: #selector(textChange(sender:)), for: .editingChanged)
// Initialization code
}
......
//
// ADD_FXY_View.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/12/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol ADD_FXY_ViewDelegate {
func ADD_FXY_ViewTextInput(txt:String,type:Int,view:ADD_FXY_View)
func ADD_FXY_ViewTypeSelect(type:Int)
func ADD_FXY_ViewFinish(name:String)
}
class ADD_FXY_View: UIView {
var delegate:ADD_FXY_ViewDelegate?
func setUI(){
phoneTf.addTarget(self, action: #selector(textChange(tf:)), for: .editingChanged)
nameTf.addTarget(self, action: #selector(textChange(tf:)), for: .editingChanged)
nameTf.isUserInteractionEnabled = false
}
var temp = ""
@objc func textChange(tf:UITextField){
if tf == phoneTf {
if tf.text!.count <= 11 {
temp = tf.text!
}
phoneTf.text = temp
delegate?.ADD_FXY_ViewTextInput(txt: temp, type: 1, view: self)
}else{
if phoneTf.text!.count < 11 {
HUD.flash(.label("请输入手机号码添加分销员"), delay: 1.2)
nameTf.text = ""
nameTf.isUserInteractionEnabled = false
}
delegate?.ADD_FXY_ViewTextInput(txt: tf.text!, type: 2,view:self)
}
}
@IBAction func finish_action(_ sender: UIButton) {
if sender.titleLabel?.text == "确定"{
if phoneTf.text?.count == 0 {
HUD.flash(.label("请输入手机号码添加分销员"), delay: 1.2)
return
}
if nameTf.text?.count == 0 {
HUD.flash(.label("请输入分销员名称"), delay: 1.2)
return
}
delegate?.ADD_FXY_ViewFinish(name: nameTf.text!)
}else{
self.removeFromSuperview()
}
}
@IBAction func select_action(_ sender: UIButton) {
var type = 1
if sender == left_btn {
left_btn.isSelected = true
right_btn.isSelected = false
type = 1
}else{
left_btn.isSelected = false
right_btn.isSelected = true
type = 2
}
delegate?.ADD_FXY_ViewTypeSelect(type: type)
}
@IBOutlet weak var right_btn: UIButton!
@IBOutlet weak var left_btn: UIButton!
@IBAction func close_action(_ sender: Any) {
self.removeFromSuperview()
}
@IBOutlet weak var phoneTf: UITextField!
@IBOutlet weak var nameTf: UITextField!
var contentView:UIView!
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.top.left.right.bottom.equalToSuperview()
}
setUI()
}
// /初始化时将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()
}
setUI()
}
//加载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
}
}
//
// FXYGL_Cell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/12/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol FXYGL_CellDelegate {
func FXYGL_CellCancel_Contract(num:Int)
}
class FXYGL_Cell: UITableViewCell {
var delegate:FXYGL_CellDelegate?
@IBAction func cancel_contract_action(_ sender: UIButton) {
delegate?.FXYGL_CellCancel_Contract(num: self.tag)
}
@IBOutlet weak var count_lbl: UILabel!
@IBOutlet weak var time_lbl: UILabel!
@IBOutlet weak var money_lbl: UILabel!
@IBOutlet weak var name_lbl: UILabel!
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
}
}
//
// FXYGL_ViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/12/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class FXYGL_ViewController: BaseViewController, UISearchBarDelegate, SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource,FXYGL_CellDelegate, ADD_FXY_ViewDelegate, GeliAlertViewDelegate {
func ADD_FXY_ViewFinish(name: String) {
isAdd = true
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self;
alertView.tishiLbl.text = ""
alertView.titileLbl.text = "是否确定新增“" + name + "”为分销员?"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确定"), for: .normal)
self.view.window?.addSubview(alertView)
}
func sureGeliAlertViewAction(sender: UIButton) {
if isAdd {
let dic = [
"user_token":UserToken as Any,
"user_name":user_name as Any,
"phone":phoneNum as Any,
"type":select_type as Any
]
addDistributor(dic) { (data) in
self.add_fxy_view?.removeFromSuperview()
self.add_fxy_view = nil
self.tableView.mj_header?.beginRefreshing()
} failture: { (err) in
}
}else{
let model = dataArr[sender.tag]
let dic = [
"user_token":UserToken as Any,
"user_id":model.user_id as Any,
]
stopDbtCooperation(dic) { (data) in
self.tableView.mj_header?.beginRefreshing()
} failture: { (err) in
}
}
}
var select_type = 0
var phoneNum = ""
var user_name = ""
var add_fxy_view:ADD_FXY_View?
func ADD_FXY_ViewTextInput(txt: String, type: Int, view: ADD_FXY_View) {
if type == 1 {
phoneNum = txt
if phoneNum.count == 11 {
phoneRetrievalInfo(["user_token":UserToken as Any,"phone":phoneNum as Any]) { (data) in
let model = data as! phoneRetrievalInfoModel
view.phoneTf.resignFirstResponder()
if model.data?.user_name != nil {
view.nameTf.text = model.data?.user_name
view.nameTf.isUserInteractionEnabled = false
self.user_name = (model.data?.user_name)!
}else{
HUD.flash(.label("请输入分销员名称"), delay: 1.2)
view.nameTf.isUserInteractionEnabled = true
}
} failture: { (err) in
}
}
}else{
user_name = txt
}
}
func ADD_FXY_ViewTypeSelect(type: Int) {
select_type = type
}
var isAdd = true
func FXYGL_CellCancel_Contract(num: Int) {
isAdd = false
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self;
alertView.tishiLbl.text = ""
let model = dataArr[num]
alertView.titileLbl.text = "是否删除“" + model.user_name! + "”分销员?"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确定"), for: .normal)
alertView.rightBtn.tag = num
self.view.window?.addSubview(alertView)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return dataArr.count
}
func rightBtnClick() {
add_fxy_view = ADD_FXY_View(frame: self.view.bounds)
add_fxy_view!.delegate = self
self.view.addSubview(add_fxy_view!)
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "FXYGL_Cell") as! FXYGL_Cell
cell.tag = indexPath.row
let model = dataArr[indexPath.row]
cell.name_lbl.text = model.user_name
cell.count_lbl.text = StringByInt(number: model.count_customers!)
cell.money_lbl.text = String(format: "%.02f", model.sum_in_amount!)
cell.time_lbl.text = model.update_time
cell.delegate = self
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 145
}
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var search_view: UIView!
//MARK: - search
var blackBtnView:UIButton! = nil
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder()
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
blackBtnView = UIButton ()
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
self.view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.top.equalTo(search_view!.snp_bottom)
make.left.right.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
blackBtnView.isUserInteractionEnabled = false
return true
}
weak var searchV: SearchBarView? = nil
var keyword = ""
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
keyword = searchBar.text!
removeBlackBtnView()
if keyword.count > 0 {
tableView.mj_header?.beginRefreshing()
}
}
//MARK:--取消搜索代理
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
tableView.mj_header?.beginRefreshing()
}
}
}
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "分销员管理"
navbar.rightTitle = "新增"
self.view.addSubview(navbar)
SetTopFrame(view: search_view, height: 46)
let searchBr = SearchBarView.init()
searchV = searchBr
self.search_view.addSubview(searchBr)
searchV?.changecornerRadius(cornerRadius: 35*0.5)
searchBr.placeholderStr = "请输入分销商名称/手机号码"
searchBr.delegate = self
searchBr.delegateL = self
searchBr.snp.makeConstraints { (make) in
make.left.equalTo(0)
make.right.equalTo(0)
make.centerY.equalToSuperview()
make.height.equalTo(35)
}
tableView.separatorStyle = .none
tableView.showsVerticalScrollIndicator = false
tableView.register(UINib(nibName: "FXYGL_Cell", bundle: nil), forCellReuseIdentifier: "FXYGL_Cell")
headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
tableView.mj_header = self.headerMJ
tableView.mj_header?.beginRefreshing()
self.footerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadMoreData))
tableView.mj_footer = self.footerMJ
// Do any additional setup after loading the view.
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
var page : Int = 0
var isUpData = false
var dataArr:Array<dbtManageQueryDatasModel> = []
@objc func loadData(){
page = 1
isUpData = true
let dic = ["user_token":UserToken as Any,
"keyword":keyword as Any,
"page":page as Any
]
dbtManageQuery(dic) { (data) in
self.dataArr.removeAll()
let model = data as! dbtManageQueryModel
model.data?.res?.forEach({ (item) in
self.dataArr.append(item)
})
self.tableView.reloadData()
self.tableView?.mj_header?.endRefreshing()
self.page = 2
if model.data?.res?.count == 0 {
self.tableView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.tableView?.mj_footer?.endRefreshing()
}
} failture: { (err) in
self.tableView?.mj_header?.endRefreshing()
}
}
//MARK:--加载更多数据
@objc func loadMoreData(){
print("加载更多数据")
let dic = ["user_token":UserToken as Any,
"keyword":keyword as Any,
"page":page as Any
]
dbtManageQuery(dic, success: { (data) in
let model = data as! dbtManageQueryModel
if model.data?.res?.count == 0 {
self.tableView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.page += 1
model.data?.res?.forEach({ (item) in
self.dataArr.append(item)
})
self.tableView.reloadData()
self.tableView?.mj_footer?.endRefreshing()
}
}) { (error) in
self.tableView?.mj_footer?.endRefreshing()
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<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"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<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="FXYGL_ViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="search_view" destination="okb-zH-841" id="I2X-KI-aFK"/>
<outlet property="tableView" destination="Jhe-4B-bxJ" id="Jkd-VM-sli"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="okb-zH-841">
<rect key="frame" x="0.0" y="44" width="414" height="46"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="wj9-QF-kGl"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Jhe-4B-bxJ">
<rect key="frame" x="0.0" y="90" width="414" height="806"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="-1" id="jJQ-q1-7fB"/>
<outlet property="delegate" destination="-1" id="lkv-x2-m7H"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="okb-zH-841" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="Ijy-OU-jKB"/>
<constraint firstItem="Jhe-4B-bxJ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="Ta7-eb-mnw"/>
<constraint firstItem="Jhe-4B-bxJ" firstAttribute="top" secondItem="okb-zH-841" secondAttribute="bottom" id="aJm-9c-ZQf"/>
<constraint firstItem="okb-zH-841" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="c9u-Xf-nar"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Jhe-4B-bxJ" secondAttribute="trailing" id="nmM-Uc-wG6"/>
<constraint firstAttribute="bottom" secondItem="Jhe-4B-bxJ" secondAttribute="bottom" id="txW-bF-WUO"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="okb-zH-841" secondAttribute="trailing" id="x6S-8H-1Fe"/>
</constraints>
<point key="canvasLocation" x="142" y="85"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -84,7 +84,7 @@ class FXSY_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
navbar.title = "收益详情"
self.view.addSubview(navbar)
SetTopFrame(view: top_view, height: 106)
list_view.isScrollEnabled = false
list_view.separatorStyle = .none
list_view.register(UINib(nibName: "TitleAndLblCell", bundle: nil), forCellReuseIdentifier: "TitleAndLblCell")
incomeDetails(["user_token":UserToken as Any,"record_sn":record_sn as Any]) { (data) in
......
......@@ -16,7 +16,8 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
inc_exp_type = selectNum
getData()
// getData()
gys_list.mj_header?.beginRefreshing()
view.removeFromSuperview()
glSelectView = nil
}
......@@ -68,7 +69,8 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
date_lbl.text = arr.first! + "年" + arr[1] + "月" + arr.last! + "日"
}
strNowTime = date
getData()
// getData()
gys_list.mj_header?.beginRefreshing()
}
......@@ -104,35 +106,11 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
}
}
getData()
// getData()
gys_list.mj_header?.beginRefreshing()
}
func getData(){
var year = "0"
var month = "0"
var day = "0"
if strNowTime.count == 4 {
year = strNowTime
}else if strNowTime.count > 4 && strNowTime.count <= 7 {
let arr = strNowTime.components(separatedBy: "-")
year = arr.first!
month = arr.last!
}else{
let arr = strNowTime.components(separatedBy: "-")
year = arr.first!
month = arr[1]
day = arr.last!
}
let dic = ["user_token":UserToken as Any,
"role_type":role_type as Any,
"inc_exp_type":inc_exp_type as Any,
"keyword":keyword as Any,
"year":year as Any,
"month":month as Any,
"day":day as Any
]
loadData(dic: dic)
}
var glSelectView:GLAlertSelectView?
@IBOutlet weak var right_btn: UIButton!
......@@ -158,34 +136,12 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
@IBOutlet weak var date_lbl: UILabel!
@IBOutlet weak var search_view: UIView!
@IBOutlet weak var gys_list: UITableView!
// @IBOutlet weak var fxs_list: UITableView!
// @IBOutlet weak var fxs_list: UITableView!
weak var searchV: SearchBarView? = nil
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
keyword = searchBar.text!
removeBlackBtnView()
if keyword.count > 0 {
getData()
}
}
//MARK:--取消搜索代理
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
getData()
}
}
}
@IBOutlet weak var time_select_btn: UIButton!
var blackBtnView:UIButton! = nil
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
......@@ -193,8 +149,6 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
time_select_btn.isUserInteractionEnabled = true
}
}
@IBOutlet weak var time_select_btn: UIButton!
var blackBtnView:UIButton! = nil
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
blackBtnView = UIButton ()
......@@ -210,7 +164,32 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
return true
}
weak var searchV: SearchBarView? = nil
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
keyword = searchBar.text!
removeBlackBtnView()
if keyword.count > 0 {
gys_list.mj_header?.beginRefreshing()
}
}
//MARK:--取消搜索代理
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
gys_list.mj_header?.beginRefreshing()
}
}
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
......@@ -259,7 +238,48 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
let arr = getDate()
date_lbl.text = "\(arr.first!)\(arr[1])\(arr.last!)日"
let dic = ["user_token":UserToken as Any,
// loadData(dic: dic)
headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
gys_list.mj_header = self.headerMJ
gys_list.mj_header?.beginRefreshing()
}
var isFirstTime = true
var isNonFirst = false
@objc func loadData(){
var dic:Dictionary<String,Any>!
if isNonFirst {
var year = "0"
var month = "0"
var day = "0"
if strNowTime.count == 4 {
year = strNowTime
}else if strNowTime.count > 4 && strNowTime.count <= 7 {
let arr = strNowTime.components(separatedBy: "-")
year = arr.first!
month = arr.last!
}else{
let arr = strNowTime.components(separatedBy: "-")
year = arr.first!
month = arr[1]
day = arr.last!
}
dic = ["user_token":UserToken as Any,
"role_type":role_type as Any,
"inc_exp_type":inc_exp_type as Any,
"keyword":keyword as Any,
"year":year as Any,
"month":month as Any,
"day":day as Any
]
}else{
isNonFirst = true
dic = ["user_token":UserToken as Any,
"role_type":"" as Any,
"inc_exp_type":inc_exp_type as Any,
"keyword":keyword as Any,
......@@ -267,15 +287,7 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
"month":"" as Any,
"day":"" as Any
]
loadData(dic: dic)
}
var isFirstTime = true
func loadData(dic:Dictionary<String,Any>){
dbtIncomeInfo(dic) { (data) in
let dateModel = data as! dbtIncomeInfoModel
self.model = dateModel.data
......@@ -317,8 +329,9 @@ class FXSY_ViewController: BaseViewController,GLTimeSelectViewDelegate,UITableVi
SetTopFrame(view: self.top_view, height: 0.00001)
}
}
self.gys_list.mj_header?.endRefreshing()
} failture: { (err) in
self.gys_list.mj_header?.endRefreshing()
}
}
}
//
// KHXQ_Cell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/12/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol KHXQ_CellDelegate {
func KHXQ_Cell_Cancel_Contract(num:Int)
}
class KHXQ_Cell: UITableViewCell {
var delegate:KHXQ_CellDelegate?
@IBAction func cancel_contract_action(_ sender: UIButton) {
delegate?.KHXQ_Cell_Cancel_Contract(num: self.tag)
}
@IBOutlet weak var order_time_lbl: UILabel!
@IBOutlet weak var orders_lbl: UILabel!
@IBOutlet weak var invite_time_lbl: UILabel!
@IBOutlet weak var invite_peron_lbl: UILabel!
@IBOutlet weak var name_lbl: UILabel!
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
}
}
This diff is collapsed.
//
// KHXQ_ViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/12/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class KHXQ_ViewController: BaseViewController, TimeShowDownViewDeleagte, UISearchBarDelegate, SearchBarViewDelegate ,UITableViewDelegate,UITableViewDataSource,KHXQ_CellDelegate, GeliAlertViewDelegate{
func sureGeliAlertViewAction(sender: UIButton) {
let model = dataArr[sender.tag]
let dic = [
"user_token":UserToken as Any,
"user_id":model.user_id as Any,
"type_id":model.type_id as Any
]
deleteDbtCustomer(dic) { (data) in
HUD.flash(.label("客户删除成功"), delay: 1.2)
self.tableView.mj_header?.beginRefreshing()
} failture: { (err) in
}
}
func KHXQ_Cell_Cancel_Contract(num: Int) {
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self;
alertView.tishiLbl.text = ""
let model = dataArr[num]
alertView.titileLbl.text = "是否确定删除该“" + model.customer_name! + "”客户,删除后该客户信息无法找回。"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确定"), for: .normal)
alertView.rightBtn.tag = num
self.view.window?.addSubview(alertView)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return dataArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "KHXQ_Cell") as! KHXQ_Cell
cell.tag = indexPath.row
let model = dataArr[indexPath.row]
cell.name_lbl.text = model.customer_name
cell.invite_peron_lbl.text = model.distributor_name
cell.invite_time_lbl.text = model.create_time
if model.order_number != nil && model.sum_order_money != nil {
cell.orders_lbl.text = model.order_number! + "(累计成交金额" + model.sum_order_money! + "元)"
}
cell.order_time_lbl.text = model.latest_order_time
cell.delegate = self
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 188
}
//MARK: - time select
func TimeShowDownViewSelectMoreDate(beginDate: Date?, endginDate: Date?) {
if beginDate == nil {
startTime = 0
endTime = 0
}else{
let timeInterval:TimeInterval = beginDate!.timeIntervalSince1970
let timeIntervalEnd:TimeInterval = endginDate!.timeIntervalSince1970
startTime = Int(timeInterval)
endTime = Int(timeIntervalEnd)
}
//刷新
tableView.mj_header?.beginRefreshing()
}
func TimeShowDownViewRemoveForSup() {
}
weak var timeShowDView: TimeShowDownView! = nil
var startTime :Int? = 0
var endTime :Int? = 0
//MARK: - search
var blackBtnView:UIButton! = nil
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder()
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
if timeShowDView != nil {
timeShowDView.removeFromSuperview()
}
blackBtnView = UIButton ()
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
self.view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.top.equalTo(search_view!.snp_bottom)
make.left.right.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
blackBtnView.isUserInteractionEnabled = false
return true
}
weak var searchV: SearchBarView? = nil
var keyword = ""
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
keyword = searchBar.text!
removeBlackBtnView()
if keyword.count > 0 {
tableView.mj_header?.beginRefreshing()
}
}
//MARK:--取消搜索代理
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
tableView.mj_header?.beginRefreshing()
}
}
}
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var top_view: UIView!
@IBAction func date_select_action(_ sender: Any) {
removeBlackBtnView()
let timeShowDownView = TimeShowDownView()
self.view.addSubview(timeShowDownView)
timeShowDownView.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(top_view.snp_bottom)
}
timeShowDView = timeShowDownView
timeShowDownView.delegate = self
if startTime != 0 {
var time = TimeInterval(exactly: startTime!)
timeShowDownView.BeginDate = Date(timeIntervalSince1970: time!)
time = TimeInterval(exactly: endTime!)
timeShowDownView.EndDate = Date(timeIntervalSince1970: time!)
timeShowDownView.setOld()
}
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
@IBOutlet weak var search_view: UIView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "客户详情"
self.view.addSubview(navbar)
SetTopFrame(view: top_view, height: 46)
// Do any additional setup after loading the view.
let searchBr = SearchBarView.init()
searchV = searchBr
self.search_view.addSubview(searchBr)
searchV?.changecornerRadius(cornerRadius: 35*0.5)
searchBr.placeholderStr = "请输入分销员名称/客户名称/手机号码"
searchBr.delegate = self
searchBr.delegateL = self
searchBr.snp.makeConstraints { (make) in
make.left.equalTo(0)
make.right.equalTo(0)
make.centerY.equalToSuperview()
make.height.equalTo(35)
}
tableView.separatorStyle = .none
tableView.showsVerticalScrollIndicator = false
headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
tableView.mj_header = self.headerMJ
tableView.mj_header?.beginRefreshing()
self.footerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadMoreData))
tableView.mj_footer = self.footerMJ
tableView.register(UINib(nibName: "KHXQ_Cell", bundle: nil), forCellReuseIdentifier: "KHXQ_Cell")
}
var page : Int = 0
var isUpData = false
var dataArr:Array<dbtCustomerInfoDataModel> = []
@objc func loadData(){
page = 1
isUpData = true
let dic = ["user_token":UserToken as Any,
"keyword":keyword as Any,
"start_time":startTime as Any,
"end_time":endTime as Any,
"page":page as Any
]
dbtCustomerInfo(dic) { (data) in
self.dataArr.removeAll()
let model = data as! dbtCustomerInfoModel
model.data?.forEach({ (item) in
self.dataArr.append(item)
})
self.tableView.reloadData()
self.tableView?.mj_header?.endRefreshing()
self.page = 2
if model.data?.count == 0 {
self.tableView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.tableView?.mj_footer?.endRefreshing()
}
} failture: { (err) in
self.tableView?.mj_header?.endRefreshing()
}
}
//MARK:--加载更多数据
@objc func loadMoreData(){
print("加载更多数据")
let dic = ["user_token":UserToken as Any,
"keyword":keyword as Any,
"start_time":startTime as Any,
"end_time":endTime as Any,
"page":page as Any
]
dbtCustomerInfo(dic, success: { (data) in
let model = data as! dbtCustomerInfoModel
if model.data?.count == 0 {
self.tableView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.page += 1
model.data?.forEach({ (item) in
self.dataArr.append(item)
})
self.tableView.reloadData()
self.tableView?.mj_footer?.endRefreshing()
}
}) { (error) in
self.tableView?.mj_footer?.endRefreshing()
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<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"/>
<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"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KHXQ_ViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="search_view" destination="Kvv-pv-Bgx" id="TSb-dj-r1S"/>
<outlet property="tableView" destination="fBD-oN-C0s" id="AFa-1G-0Vz"/>
<outlet property="top_view" destination="p3w-Ks-hIC" id="ep3-cW-z5z"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p3w-Ks-hIC">
<rect key="frame" x="0.0" y="44" width="414" height="46"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_rili" translatesAutoresizingMaskIntoConstraints="NO" id="tbr-cp-Ra9">
<rect key="frame" x="379" y="13.5" width="20" height="19"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="XaQ-Yw-nRl"/>
<constraint firstAttribute="height" constant="19" id="hn8-Ie-QaN"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sba-tO-C5x">
<rect key="frame" x="362" y="0.0" width="52" height="46"/>
<constraints>
<constraint firstAttribute="width" constant="52" id="2qp-ks-2ec"/>
</constraints>
<connections>
<action selector="date_select_action:" destination="-1" eventType="touchUpInside" id="FnO-Xg-ksU"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kvv-pv-Bgx">
<rect key="frame" x="15" y="0.0" width="347" height="46"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="2pN-vf-QXp"/>
<constraint firstItem="tbr-cp-Ra9" firstAttribute="centerY" secondItem="p3w-Ks-hIC" secondAttribute="centerY" id="4gI-JZ-pnu"/>
<constraint firstAttribute="trailing" secondItem="tbr-cp-Ra9" secondAttribute="trailing" constant="15" id="5QZ-jS-PyJ"/>
<constraint firstAttribute="bottom" secondItem="Kvv-pv-Bgx" secondAttribute="bottom" id="Ddz-C6-0dG"/>
<constraint firstItem="sba-tO-C5x" firstAttribute="top" secondItem="p3w-Ks-hIC" secondAttribute="top" id="KQP-wA-diV"/>
<constraint firstAttribute="bottom" secondItem="sba-tO-C5x" secondAttribute="bottom" id="MaY-eg-UV4"/>
<constraint firstItem="Kvv-pv-Bgx" firstAttribute="leading" secondItem="p3w-Ks-hIC" secondAttribute="leading" constant="15" id="XwI-te-cKf"/>
<constraint firstItem="sba-tO-C5x" firstAttribute="leading" secondItem="Kvv-pv-Bgx" secondAttribute="trailing" id="ndh-Jq-JYw"/>
<constraint firstAttribute="trailing" secondItem="sba-tO-C5x" secondAttribute="trailing" id="r3Q-RS-x75"/>
<constraint firstItem="Kvv-pv-Bgx" firstAttribute="top" secondItem="p3w-Ks-hIC" secondAttribute="top" id="ycd-Ui-KDH"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="fBD-oN-C0s">
<rect key="frame" x="0.0" y="90" width="414" height="806"/>
<color key="backgroundColor" name="app底色"/>
<color key="sectionIndexBackgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="vNd-0D-Bg1"/>
<outlet property="delegate" destination="-1" id="SUu-oX-R4J"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="p3w-Ks-hIC" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="Kir-Vu-IVk"/>
<constraint firstItem="p3w-Ks-hIC" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="dx2-qd-5eh"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="p3w-Ks-hIC" secondAttribute="trailing" id="eSZ-NG-2Dj"/>
<constraint firstAttribute="bottom" secondItem="fBD-oN-C0s" secondAttribute="bottom" id="odk-rY-O3D"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="fBD-oN-C0s" secondAttribute="trailing" id="pGY-Tp-SGe"/>
<constraint firstItem="fBD-oN-C0s" firstAttribute="top" secondItem="p3w-Ks-hIC" secondAttribute="bottom" id="sRq-EU-bNN"/>
<constraint firstItem="fBD-oN-C0s" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="ylb-d4-edL"/>
</constraints>
<point key="canvasLocation" x="141" y="83"/>
</view>
</objects>
<resources>
<image name="icon_rili" width="20" height="19"/>
<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>
</resources>
</document>
......@@ -632,13 +632,19 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self.navigationController?.pushViewController(vc, animated: true)
return
case 139: //分销员管理
HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = FXYGL_ViewController()
self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
return
case 140://待审核分销员管理
HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = DSHFXY_ViewController()
self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
return
case 141://分销客户管理
HUD.flash(.label("敬请期待"),delay: 1.2)
let vc = KHXQ_ViewController()
self.navigationController?.pushViewController(vc, animated: true)
// HUD.flash(.label("敬请期待"),delay: 1.2)
return
case 142://分销收益管理
let vc = FXSY_ViewController()
......
//
// DSHFXY_Cell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/12/29.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol DSHFXY_CellDelegate {
func DSHFXY_Cell_Choice(num:Int,cell:DSHFXY_Cell)
}
class DSHFXY_Cell: UITableViewCell {
var delegate:DSHFXY_CellDelegate?
@IBAction func cellAction(_ sender: UIButton) {
delegate?.DSHFXY_Cell_Choice(num: sender.tag,cell:self)
}
@IBOutlet weak var way_lbl: UILabel!
@IBOutlet weak var time_lbl: UILabel!
@IBOutlet weak var name_lbl: UILabel!
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
}
}
<?xml version="1.0" encoding="UTF-8"?>
<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"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<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="DSHFXY_ViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="search_view" destination="oZK-Oh-YCm" id="OGw-KL-GyM"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oZK-Oh-YCm">
<rect key="frame" x="0.0" y="44" width="414" height="46"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="lfm-vW-aiE"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="oZK-Oh-YCm" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="3Je-OD-tOw"/>
<constraint firstItem="oZK-Oh-YCm" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="C7R-Fa-inu"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="oZK-Oh-YCm" secondAttribute="trailing" id="UwT-AA-mxp"/>
</constraints>
<point key="canvasLocation" x="140.57971014492756" y="69.642857142857139"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
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