Commit 9e82d123 authored by lujunye's avatar lujunye

1.1版本,登录界面,出入库列表界面

parent e3993eea
......@@ -74,6 +74,7 @@ class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDel
completionHandler(Int(UNAuthorizationOptions.alert.rawValue))// 需要执行这个方法,选择是否提醒用户,有Badge、Sound、Alert三种类型可以选择设置
}
//ios 10 以上接受数据
func jpushNotificationCenter(_ center: UNUserNotificationCenter!, didReceive response: UNNotificationResponse!, withCompletionHandler completionHandler: (() -> Void)!) {
let userInfo = response.notification.request.content.userInfo
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dotLine@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dotLine@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -96,5 +96,31 @@
<string>Workcenter/auths</string>
<key>填写/修改订单物流单号</key>
<string>Order/editLwbno</string>
<key>获取入库的基本信息</key>
<string>Warehouse/inputInitInfo</string>
<key>获取出库的基本信息</key>
<string>Warehouse/OutputInitInfo</string>
<key>商品入库审核</key>
<string>Warehouse/goodsInputAudit</string>
<key>商品入库</key>
<string>Warehouse/goodsInput</string>
<key>商品入库申请</key>
<string>Warehouse/goodsInputApply</string>
<key>添加检测报告</key>
<string>Warehouse/goodsReportAdd</string>
<key>获取商品批次</key>
<string>Warehouse/getGoodBatch</string>
<key>商品出库</key>
<string>Warehouse/goodsOutput</string>
<key>商品申请出库</key>
<string>Warehouse/goodsOutputApply</string>
<key>商品审核出库</key>
<string>Warehouse/goodsOutputAudit</string>
<key>出入库记录</key>
<string>Warehouse/warehouseIoList</string>
<key>查看出入库单详情(已审核)</key>
<string>Warehouse/IoGoodsDetail</string>
<key>商品出库审核详情(未审核状态)</key>
<string>Warehouse/OutGoodsDetail</string>
</dict>
</plist>
......@@ -8,7 +8,7 @@
import Foundation
import ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库
class UpDataModel: Mappable {
var code:Int?
......
//
// GetGoodBatchModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
class GetGoodBatchModel: Mappable {
var code:Int?
var message : String?
var data : Array<GetGoodBatchDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class GetGoodBatchDataModel: Mappable {
var batch_id:Int?//批次id
var batch_sn : Int? //批次号
var w_id : Int? //仓储id
var p_id:Int? //库位id
var inventory : String? //现有库存
var production_data : Double?//生产日期
var valid_date:Double? //过期时间
var shelf_life : Int? //保质期
var status : Int?//状态:1正常,2临期,3过期
var report_id : Int?//批次报告
required init?( map: Map) {
}
func mapping(map: Map) {
batch_id <- map["batch_id"]
batch_sn <- map["batch_sn"]
w_id <- map["w_id"]
p_id <- map["p_id"]
inventory <- map["inventory"]
production_data <- map["production_data"]
valid_date <- map["valid_date"]
shelf_life <- map["shelf_life"]
status <- map["status"]
report_id <- map["report_id"]
}
}
//
// OutGoodsDetailModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
class InGoodsDetailModel: Mappable {
var code:Int?
var message : String?
var data : Array<InGoodsDetailDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class InGoodsDetailDataModel: Mappable {
var io_res : InGoodsDetailDataIoResModel?
var goods_res : Array<InGoodsDetailDataGoodsResModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
io_res <- map["io_res"]
goods_res <- map["goods_res"]
}
}
class InGoodsDetailDataIoResModel: Mappable {
var apply_remark : String?//申请备注
var audit_remark : String?// 审核备注
required init?( map: Map) {
}
func mapping(map: Map) {
apply_remark <- map["apply_remark"]
audit_remark <- map["audit_remark"]
}
}
class InGoodsDetailDataGoodsResModel: Mappable {
var iog_id : Int?
var sku_id : Int? //商品sku_id
var goods_name : String? //商品名
var goods_spec : String?//商品规格
var number : Int? //数量
var production_data : Double?
var valid_date : Double?
var shelf_life : Int?
var report_id : Int?
var amount:String?
var subtotal:String?
var inventory : Int?
var report_sn : String?
var file_url : String?
required init?( map: Map) {
}
func mapping(map: Map) {
iog_id <- map["iog_id"]
sku_id <- map["sku_id"]
goods_name <- map["goods_name"]
goods_spec <- map["goods_spec"]
number <- map["number"]
production_data <- map["production_data"]
valid_date <- map["valid_date"]
shelf_life <- map["shelf_life"]
report_id <- map["report_id"]
amount <- map["amount"]
subtotal <- map["subtotal"]
inventory <- map["inventory"]
report_sn <- map["report_sn"]
file_url <- map["file_url"]
}
}
//
// inputInitInfoModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
//仓库列表
class InputInitInfoModel: Mappable {
var code:Int?
var message : String?
var data : Array<InputInitInfoDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class InputInitInfoDataModel: Mappable {
var warehouse_res : Array<InputInitInfoWareHouseResModel>?
var goods_info : Array<InputInitInfoGoodsInfoModel>?
var auth : Array<String>?
/*
"auth": [ //出库、入库权限,值固定为以下4个,缺少哪个值则说明无对应权限
"63", //入库
"64", //出库
"65", //申请入库
"66" //申请出库
]
*/
required init?( map: Map) {
}
func mapping(map: Map) {
warehouse_res <- map["warehouse_res"]
goods_info <- map["goods_info"]
auth <- map["auth"]
}
}
class InputInitInfoWareHouseResModel: Mappable {//仓库数据
var w_id:Int? //仓库id
var shop_id : Int?
var w_name : String? //仓库名
var w_type : Int? //仓库类型,1常温、2冷藏、3冷冻
var w_address:String? //仓库地址
var volume : Int? //容积,单位立方米
var area : Int?//面积,单位平方米
var contact : String? //联系人
var contact_number:String? //联系电话
var mail : String? //电子邮箱
var position_count : Int?//库位数量(统计用)
var is_default : Int? //是否为默认
var inventory_count : Int? //库存总数
var warehouse_position : Array<InputInitInfoWareHouseResPositionModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
w_id <- map["w_id"]
shop_id <- map["shop_id"]
w_name <- map["w_name"]
w_type <- map["w_type"]
w_address <- map["w_address"]
volume <- map["volume"]
area <- map["area"]
contact <- map["contact"]
contact_number <- map["contact_number"]
mail <- map["mail"]
position_count <- map["position_count"]
is_default <- map["is_default"]
inventory_count <- map["inventory_count"]
warehouse_position <- map["warehouse_position"]
}
}
class InputInitInfoWareHouseResPositionModel: Mappable {
var p_id :Int? //库位id
var w_id : Int?//仓库id
var p_name : String?//库位名
var is_default :Int?//是否为默认
var inventory_count : Int? //库存总数
required init?( map: Map) {
}
func mapping(map: Map) {
p_id <- map["p_id"]
w_id <- map["w_id"]
p_name <- map["p_name"]
is_default <- map["is_default"]
inventory_count <- map["inventory_count"]
}
}
class InputInitInfoGoodsInfoModel: Mappable { //商品信息
var sku_id : Int?//sku_id
var goods_id :Int?//商品id
var goods_name : String?//商品名
var goods_thumb : String?//商品缩略图
var spec_str :String? //商品规格
var price : String? //商品价格
var inventory : Int?//可售库存
var warehouse_inventory :Int?//仓储库存
required init?( map: Map) {
}
func mapping(map: Map) {
sku_id <- map["sku_id"]
goods_id <- map["goods_id"]
goods_name <- map["goods_name"]
goods_thumb <- map["goods_thumb"]
spec_str <- map["spec_str"]
price <- map["price"]
inventory <- map["inventory"]
warehouse_inventory <- map["warehouse_inventory"]
}
}
class GoodsReportAddModel: Mappable {
var code:Int?
var message : String?
var data : GoodsReportAddDataModel?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class GoodsReportAddDataModel: Mappable {
var report_id:Int?
required init?( map: Map) {
}
func mapping(map: Map) {
report_id <- map["report_id"]
}
}
//
// IoGoodsDetailModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
class IoGoodsDetailModel: Mappable {
var code:Int?
var message : String?
var data : Array<IoGoodsDetailDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class IoGoodsDetailDataModel: Mappable {
var io_res:IoGoodsDetailDataIoResModel?
var goods_res : Array<IoGoodsDetailDataGoodsResModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
io_res <- map["io_res"]
goods_res <- map["goods_res"]
}
}
class IoGoodsDetailDataIoResModel: Mappable {
//申请备注
var apply_remark:String?
//审核备注
var audit_remark : String?
required init?( map: Map) {
}
func mapping(map: Map) {
apply_remark <- map["apply_remark"]
audit_remark <- map["audit_remark"]
}
}
class IoGoodsDetailDataGoodsResModel: Mappable {
var iog_id:Int?
var sku_id : String?//商品sku_id
var goods_name:Int? //商品名
var goods_spec : String?//商品规格
var number:Int?//数量
var production_data : String? //生产日期
var valid_date:Int? //过期时间
var shelf_life : String? //保质期(单位:天)
var report_id:Int? //商品报告id
var amount : String?
var subtotal:Int?
var report_sn : String? //商品报告sn
var file_url:String?//商品报告文件
var w_name : String?//仓库
var p_name:Int?//仓库
required init?( map: Map) {
}
func mapping(map: Map) {
iog_id <- map["iog_id"]
sku_id <- map["sku_id"]
goods_name <- map["goods_name"]
goods_spec <- map["goods_spec"]
number <- map["number"]
production_data <- map["production_data"]
valid_date <- map["valid_date"]
shelf_life <- map["shelf_life"]
report_id <- map["report_id"]
amount <- map["amount"]
subtotal <- map["subtotal"]
report_sn <- map["report_sn"]
file_url <- map["file_url"]
w_name <- map["w_name"]
p_name <- map["p_name"]
}
}
//
// OutGoodsDetailModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
class OutGoodsDetailModel: Mappable {
var code:Int?
var message : String?
var data : Array<OutGoodsDetailDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class OutGoodsDetailDataModel: Mappable {
var io_res : OutGoodsDetailDataIoResModel?
var goods_res : Array<OutGoodsDetailDataGoodsResModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
io_res <- map["io_res"]
goods_res <- map["goods_res"]
}
}
class OutGoodsDetailDataIoResModel: Mappable {
var apply_remark : String?//申请备注
var audit_remark : String?// 审核备注
required init?( map: Map) {
}
func mapping(map: Map) {
apply_remark <- map["apply_remark"]
audit_remark <- map["audit_remark"]
}
}
class OutGoodsDetailDataGoodsResModel: Mappable {
var iog_id : Int?
var goods_id : Int? //商品id
var sku_id : Int? //商品sku_id
var goods_name : String? //商品名
var goods_spec : String?//商品规格
var number : Int? //数量
var production_data : Double?
var valid_date : Double?
var shelf_life : Int?
var report_id : Int?
var batch_id : Int?
var inventory : Int?
required init?( map: Map) {
}
func mapping(map: Map) {
iog_id <- map["iog_id"]
goods_id <- map["goods_id"]
sku_id <- map["sku_id"]
goods_name <- map["goods_name"]
goods_spec <- map["goods_spec"]
number <- map["number"]
production_data <- map["production_data"]
valid_date <- map["valid_date"]
shelf_life <- map["shelf_life"]
report_id <- map["report_id"]
batch_id <- map["batch_id"]
inventory <- map["inventory"]
}
}
//
// WarehouseIoListModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
class WarehouseIoListModel: Mappable {
var code:Int?
var message : String?
var data : Array<WarehouseIoListDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class WarehouseIoListDataModel: Mappable {
var io_id:Int?//出入库id
var oi_sn : String?//出入库sn
var applicant : String? //申请人
var io_type:Int? //类型(出/入库),1入库,2出库,3撤销入库
var status : Int?//出入库(审核)状态,1审核中,2通过,3不通过
var auditor : String?//审核人
var add_time:Double?//下单时间
var audit_time : Double?//审核时间
var i_type : Int?
var o_type:Int?
var goods_res : WarehouseIoListDataResModel? //商品信息
var io_type_cn : String? //出/入库详细类型(已中文处理
required init?( map: Map) {
}
func mapping(map: Map) {
io_id <- map["io_id"]
oi_sn <- map["oi_sn"]
applicant <- map["applicant"]
io_type <- map["io_type"]
status <- map["status"]
auditor <- map["auditor"]
add_time <- map["add_time"]
audit_time <- map["audit_time"]
i_type <- map["i_type"]
o_type <- map["o_type"]
goods_res <- map["goods_res"]
io_type_cn <- map["io_type_cn"]
}
}
class WarehouseIoListDataResModel: Mappable {
//商品名
var goods_name:String?
//规格
var goods_spec : String?
//数量
var number : Int?
//缩略图
var goods_thumb : String?
required init?( map: Map) {
}
func mapping(map: Map) {
goods_name <- map["goods_name"]
goods_spec <- map["goods_spec"]
number <- map["number"]
goods_thumb <- map["goods_thumb"]
}
}
......@@ -47,7 +47,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
vc.delegate = self
let contentView = vc
//
// let vc = PersonCenterViewController()
// let vc = CRKListVC()
// let contentView = vc
if let windowScene = sceneC as? UIWindowScene {
......@@ -80,7 +80,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
let v1 = OrderListViewController()
let v2 = GoodsManageListVC()
let v2 = CRKListVC()
// let v3 = WorkCViewController()
let v4 = WarehoseMangementListVC()
let v5 = PersonCenterViewController()
......
//
// CRKCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
protocol CRKCellDelegate {
func CRKCellBtnClick(sender:UIButton,cell:CRKCell)
}
class CRKCell: UITableViewCell {
var delegate:CRKCellDelegate?
@IBOutlet weak var detialView: UIView!//详情底图
@IBAction func btnClick(_ sender: UIButton) {
delegate?.CRKCellBtnClick(sender: sender,cell:self)
}
@IBOutlet weak var countLbl: UILabel!
@IBOutlet weak var statusNameLbl: UILabel!
@IBOutlet weak var statusLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel!
var dataArr:Array<Any>? = []
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func layoutIfNeeded() {
super.layoutIfNeeded()
var num = 0
if dataArr!.count > 4 {
num = 4
}else{
num = dataArr!.count
}
for i in 0 ..< num {
let view = UIView()
detialView.addSubview(view)
view.backgroundColor = UIColor.white
view.snp.makeConstraints { (make) in
make.top.equalTo(i * 49)
make.left.right.equalTo(0)
make.height.equalTo(49)
}
if i != num - 1 {
let dotLine = UIImageView()
view.addSubview(dotLine)
dotLine.image = UIImage(named: "dotLine")
dotLine.snp.makeConstraints { (make) in
make.left.equalTo(15)
make.bottom.right.equalTo(0)
make.height.equalTo(1)
}
}
let lbl = UILabel()
lbl.font = UIFont.systemFont(ofSize: 13)
lbl.textColor = UIColor(named: "灰色字体颜色")
lbl.text = "\(dataArr![i])"
view.addSubview(lbl)
lbl.snp.makeConstraints { (make) in
make.left.equalTo(15)
make.bottom.top.right.equalTo(0)
}
let lbl2 = UILabel()
lbl2.font = UIFont.systemFont(ofSize: 13)
lbl2.textColor = UIColor(named: "灰色字体颜色")
lbl2.textAlignment = .right
view.addSubview(lbl2)
lbl2.snp.makeConstraints { (make) in
make.right.equalTo(-15)
make.bottom.left.top.equalTo(0)
}
}
}
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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
......@@ -10,7 +10,7 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="ChangePriceNormalCell" customModule="GeliBusinessPlatform" customModuleProvider="target">
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="ChangePriceNormalCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="120"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
......
<?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="16097" 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"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -134,7 +134,7 @@
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
<?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="16097" 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"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......
<?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="16097" 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"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -10,7 +10,7 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="WenDuCell" customModule="GeliBusinessPlatform" customModuleProvider="target">
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="WenDuCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="96"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
......
<?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="16097" 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"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -10,7 +10,7 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YunDanLieBiaoCell" customModule="GeliBusinessPlatform" customModuleProvider="target">
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YunDanLieBiaoCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="212"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
......@@ -215,7 +215,7 @@
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
<?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="16097" 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"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -10,7 +10,7 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="BtmBtnCell" customModule="GeliBusinessPlatform" customModuleProvider="target">
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="BtmBtnCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="108.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
......@@ -97,7 +97,7 @@
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
<?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="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.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="ChangePassViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChangePassViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="fisrtView" destination="6Yq-Qa-XRQ" id="zKW-xf-qqn"/>
<outlet property="newPBtn" destination="006-9S-e0S" id="FuL-Gr-SJo"/>
......@@ -50,7 +50,7 @@
<constraint firstAttribute="height" constant="10" id="vZV-bu-e5U"/>
</constraints>
<state key="normal" image="guanbi"/>
<state key="selected" image="xianshi "/>
<state key="selected" image="xianshi"/>
<connections>
<action selector="oldPassAction:" destination="-1" eventType="touchUpInside" id="Mzs-XF-S1i"/>
</connections>
......@@ -119,7 +119,7 @@
<constraint firstAttribute="width" constant="17" id="y1f-4z-IQI"/>
</constraints>
<state key="normal" image="guanbi"/>
<state key="selected" image="xianshi "/>
<state key="selected" image="xianshi"/>
<connections>
<action selector="newPassAction:" destination="-1" eventType="touchUpInside" id="bfg-kt-Abu"/>
</connections>
......@@ -207,12 +207,12 @@
</objects>
<resources>
<image name="guanbi" width="37" height="18"/>
<image name="xianshi " width="37" height="24"/>
<image name="xianshi" width="37" height="24"/>
<namedColor name="按钮渐变色上">
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="按钮渐变色下,字体颜色">
<color red="0.27450980392156865" green="0.5607843137254902" blue="0.88627450980392153" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" 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"/>
......
//
// ChuRuKuJiLuCell.swift
// CRKSumCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/26.
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class ChuRuKuJiLuCell: UITableViewCell {
class CRKSumCell: UITableViewCell {
@IBOutlet weak var countLbl: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
......
<?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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="CRKSumCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="数量" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15g-hc-bWH">
<rect key="frame" x="278" y="14" width="27" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="#F57575"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="出库商品数量:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="G3w-rZ-aM6">
<rect key="frame" x="185" y="14" width="93" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="15g-hc-bWH" firstAttribute="leading" secondItem="G3w-rZ-aM6" secondAttribute="trailing" id="4va-tQ-Wgj"/>
<constraint firstAttribute="trailing" secondItem="15g-hc-bWH" secondAttribute="trailing" constant="15" id="h13-mK-9qm"/>
<constraint firstItem="15g-hc-bWH" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="l43-P3-bIr"/>
<constraint firstItem="G3w-rZ-aM6" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="n02-Ab-vPc"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="countLbl" destination="15g-hc-bWH" id="f2b-W0-6LU"/>
</connections>
<point key="canvasLocation" x="132" y="129"/>
</tableViewCell>
</objects>
<resources>
<namedColor name="#F57575">
<color red="0.96100002527236938" green="0.45899999141693115" blue="0.45899999141693115" 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>
</resources>
</document>
......@@ -7,12 +7,18 @@
//
import UIKit
protocol PiCiXuanZeCellDelegate {
func PiCiXuanZeCellBtnSelect(sender:String,cell:PiCiXuanZeCell)
}
class PiCiXuanZeCell: UITableViewCell {
var delegate:PiCiXuanZeCellDelegate?
@IBAction func btnClickAction(_ sender: UIButton) {
iconBtn.isSelected = !iconBtn.isSelected
if isPurnInt(string: textTF.text!){
delegate?.PiCiXuanZeCellBtnSelect(sender: textTF.text!, cell: self)
}
}
@IBOutlet weak var iconBtn: UIButton!
@IBOutlet weak var dateLbl: UILabel!
......
......@@ -8,12 +8,17 @@
import UIKit
class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource{
class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,PiCiXuanZeCellDelegate{
var countArr:Array<String> = []
var dataArray:Array<Any> = []
@IBOutlet weak var topView: UIView!
@IBOutlet weak var btmLbl: UILabel!
@IBAction func submitAction(_ sender: Any) {
}
@IBOutlet weak var listView: UITableView!
override func viewDidLoad() {
......@@ -28,22 +33,47 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
listView.separatorStyle = .none
listView.register(UINib(nibName: "PiCiXuanZeCell", bundle: nil), forCellReuseIdentifier: "PiCiXuanZeCell")
listView.register(UINib(nibName: "CRKSumCell", bundle: nil), forCellReuseIdentifier: "CRKSumCell")
// Do any additional setup after loading the view.
}
//MARK: - CELL DELEGATE
func PiCiXuanZeCellBtnSelect(sender: String, cell: PiCiXuanZeCell) {
countArr.insert(sender, at: cell.tag)
countArr.remove(at: cell.tag+1)
let idx = IndexPath(row: 0, section: 1)
listView.reloadRows(at: [idx], with: .none)
}
//MARK: - CELL DELEGATE
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 49
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "PiCiXuanZeCell") as! PiCiXuanZeCell
return cell
}
if section == 1 {
return 1
}
return dataArray.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKSumCell") as! CRKSumCell
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "PiCiXuanZeCell") as! PiCiXuanZeCell
cell.tag = indexPath.row
cell.delegate = self
return cell
}
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 10
}
}
//
// CRKListVC.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
import ViewAnimator //cell动效
class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CRKCellDelegate,UISearchBarDelegate, SearchBarViewDelegate {
var page = 0
private let animations = [AnimationType.from(direction: .bottom, offset: 300*glscale)]
@IBOutlet weak var topBtn: UIButton!
@IBAction func openViewAction(_ sender: Any) {
}
@IBOutlet weak var searchBG: UIView!
var datas:Array<WarehouseIoListDataModel>? = []
@IBOutlet weak var listView: UITableView!
@IBOutlet weak var searchBgView: UIView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "出入库记录"
self.view.addSubview(navbar)
//searchbar
let searchBr = SearchBarView.init()
self.searchBgView.addSubview(searchBr)
searchBr.snp.makeConstraints { (make) in
make.left.equalTo(0)
make.right.equalTo(topBtn.snp_left)
make.centerY.equalToSuperview()
make.height.equalTo(35)
}
searchBG = searchBr
searchBr.placeholderStr = "请输入单号"
searchBr.cornerRadius = 35/2.0
searchBr.delegate = self
searchBr.delegateL = self
SetTopFrame(view: searchBgView, height: 44)
listView.separatorStyle = .none
listView.register(UINib(nibName: "CRKCell", bundle: nil), forCellReuseIdentifier: "CRKCell")
//下拉刷新相关设置
headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
self.listView!.mj_header = headerMJ
//上拉加载相关设置
footerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadMoreData))
self.listView!.mj_footer = footerMJ
self.listView?.mj_header?.beginRefreshing()
}
@objc func loadData(){
page = 1
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let dic = ["user_token":UserToken as Any,"status":0 as Any,"page":page as Any]
WarehouseIoList(dic , success: { (data) in
self.datas?.removeAll()
let model = data as! WarehouseIoListModel
model.data?.forEach({ (item) in
self.datas?.append(item)
})
self.listView.reloadData()
self.listView.mj_header?.endRefreshing()
self.page = 2
self.listView.performBatchUpdates({
UIView.animate(views: self.listView!.visibleCells,
animations: self.animations, completion: {
})
}, completion: nil)
if model.data?.count == 0 {
self.listView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.listView?.mj_footer?.endRefreshing()
}
}) { (error) in
self.listView?.mj_header?.endRefreshing()
}
}
//MARK:--加载更多数据
@objc func loadMoreData(){
print("加载更多数据")
print("page = ",page)
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let dic = ["user_token":UserToken as Any,"status":"0" as Any,"page":page as Any]
WarehouseIoList(dic, success: { (data) in
let dataM = data as! WarehouseIoListModel
if dataM.data?.count == 0 {
self.listView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.page += 1
dataM.data?.forEach({ (model) in
self.datas?.append(model)
})
self.listView.reloadData()
self.listView?.mj_footer?.endRefreshing()
}
}) { (error) in
self.listView?.mj_footer?.endRefreshing()
}
}
//MARK: - 通过,不通过方法
func CRKCellBtnClick(sender: UIButton, cell: CRKCell) {
if sender.tag == 0 {//通过
print("1",cell.tag)
}else{//不通过
print("2",cell.tag)
}
}
//MARK: - CELL DELEGATE
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath.row)
//跳转详情
let model = datas![indexPath.row]
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datas!.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKCell") as! CRKCell
// cell.dataArr = arr[indexPath.row]
cell.delegate = self
cell.tag = indexPath.row
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// let ar = datas![indexPath.row]
var num = 0
// num = ar.count
// if ar.count > 4 {
// num = 4
// }
return 174.5 + CGFloat(num * 49)
}
//MARK: - searchView delegate
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
}
}
<?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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.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="CRKListVC" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="listView" destination="BU7-XP-2pP" id="DMx-fN-6Bz"/>
<outlet property="searchBG" destination="LxK-xK-rbt" id="rWi-aQ-iPm"/>
<outlet property="searchBgView" destination="av5-5Z-klb" id="As9-zW-xIX"/>
<outlet property="topBtn" destination="ilf-N2-kXi" id="IVi-ni-5F9"/>
<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="av5-5Z-klb">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ilf-N2-kXi">
<rect key="frame" x="374" y="11" width="40" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="ORo-4p-fw8"/>
<constraint firstAttribute="width" constant="40" id="bPo-Gp-HQN"/>
</constraints>
<state key="normal" image="shaixuan"/>
<connections>
<action selector="openViewAction:" destination="-1" eventType="touchUpInside" id="HKh-NI-ztm"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LxK-xK-rbt">
<rect key="frame" x="0.0" y="0.0" width="374" height="44"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="LxK-xK-rbt" firstAttribute="leading" secondItem="av5-5Z-klb" secondAttribute="leading" id="GpW-SI-hii"/>
<constraint firstItem="LxK-xK-rbt" firstAttribute="top" secondItem="av5-5Z-klb" secondAttribute="top" id="HSt-0S-KSA"/>
<constraint firstItem="ilf-N2-kXi" firstAttribute="leading" secondItem="LxK-xK-rbt" secondAttribute="trailing" id="d32-gk-lFU"/>
<constraint firstAttribute="trailing" secondItem="ilf-N2-kXi" secondAttribute="trailing" id="gGz-tl-fbP"/>
<constraint firstAttribute="bottom" secondItem="LxK-xK-rbt" secondAttribute="bottom" id="hDc-p2-IvT"/>
<constraint firstAttribute="height" constant="44" id="pTS-wJ-mwq"/>
<constraint firstItem="ilf-N2-kXi" firstAttribute="centerY" secondItem="av5-5Z-klb" secondAttribute="centerY" id="ytM-gD-3ic"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="BU7-XP-2pP">
<rect key="frame" x="0.0" y="88" width="414" height="774"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="0wO-3Z-G1E"/>
<outlet property="delegate" destination="-1" id="B0a-Uo-fWl"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="BU7-XP-2pP" firstAttribute="top" secondItem="av5-5Z-klb" secondAttribute="bottom" id="1wU-EB-aTe"/>
<constraint firstItem="BU7-XP-2pP" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="7YS-Hb-OyJ"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="av5-5Z-klb" secondAttribute="trailing" id="A7i-GN-17Z"/>
<constraint firstItem="av5-5Z-klb" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="CrV-3n-qwc"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="BU7-XP-2pP" secondAttribute="bottom" id="VVk-uE-m7R"/>
<constraint firstItem="av5-5Z-klb" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="XVM-dV-raw"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="BU7-XP-2pP" secondAttribute="trailing" id="nuT-Ha-cUn"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="132" y="129"/>
</view>
</objects>
<resources>
<image name="shaixuan" width="17" height="15"/>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
//
// CRKXQVC.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/5/30.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class CRKXQVC: BaseViewController {
var model:WarehouseIoListDataModel?
override func viewDidLoad() {
super.viewDidLoad()
if model?.io_type == 1 {
navbar.title = "商品入库详情"
}else{
navbar.title = "商品出库详情"
}
self.view.addSubview(navbar)
}
}
<?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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.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="CRKXQVC" customModule="TestClass" customModuleProvider="target">
<connections>
<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="nlM-gF-F9f">
<rect key="frame" x="0.0" y="813" width="414" height="49"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="S9g-Qd-TxR">
<rect key="frame" x="0.0" y="0.0" width="207" height="49"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="不通过">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fxi-7K-5uG">
<rect key="frame" x="207" y="0.0" width="207" height="49"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="通过">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pEh-pB-SCR">
<rect key="frame" x="0.0" y="0.0" width="414" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="dLA-9h-RHR"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="Fxi-7K-5uG" firstAttribute="width" secondItem="S9g-Qd-TxR" secondAttribute="width" id="DQy-9n-Zv9"/>
<constraint firstItem="S9g-Qd-TxR" firstAttribute="top" secondItem="nlM-gF-F9f" secondAttribute="top" id="GTH-4b-MgP"/>
<constraint firstAttribute="height" constant="49" id="ITf-Au-lz5"/>
<constraint firstAttribute="trailing" secondItem="Fxi-7K-5uG" secondAttribute="trailing" id="LPl-iz-9xD"/>
<constraint firstAttribute="trailing" secondItem="pEh-pB-SCR" secondAttribute="trailing" id="TNP-7W-qdy"/>
<constraint firstItem="S9g-Qd-TxR" firstAttribute="leading" secondItem="nlM-gF-F9f" secondAttribute="leading" id="WMM-RS-uxh"/>
<constraint firstItem="pEh-pB-SCR" firstAttribute="top" secondItem="nlM-gF-F9f" secondAttribute="top" id="Y60-0h-F2c"/>
<constraint firstItem="pEh-pB-SCR" firstAttribute="leading" secondItem="nlM-gF-F9f" secondAttribute="leading" id="f5C-sw-HZi"/>
<constraint firstItem="Fxi-7K-5uG" firstAttribute="leading" secondItem="S9g-Qd-TxR" secondAttribute="trailing" id="j44-hu-J7q"/>
<constraint firstItem="Fxi-7K-5uG" firstAttribute="top" secondItem="nlM-gF-F9f" secondAttribute="top" id="jm7-d9-SXH"/>
<constraint firstAttribute="bottom" secondItem="Fxi-7K-5uG" secondAttribute="bottom" id="vbY-8K-HWp"/>
<constraint firstAttribute="bottom" secondItem="S9g-Qd-TxR" secondAttribute="bottom" id="xkZ-cz-bL6"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="MJ8-d0-vWl">
<rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sGM-fP-c5C">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="sGM-fP-c5C" secondAttribute="trailing" id="GhF-g4-MPW"/>
<constraint firstAttribute="bottom" secondItem="sGM-fP-c5C" secondAttribute="bottom" id="IT9-6a-Mvq"/>
<constraint firstItem="MJ8-d0-vWl" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="NMU-nl-n70"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="nlM-gF-F9f" secondAttribute="trailing" id="Rzc-Ii-3pH"/>
<constraint firstItem="sGM-fP-c5C" firstAttribute="top" secondItem="MJ8-d0-vWl" secondAttribute="bottom" id="aB8-Dh-7Gs"/>
<constraint firstItem="nlM-gF-F9f" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="dMo-B8-IqG"/>
<constraint firstItem="sGM-fP-c5C" firstAttribute="top" secondItem="nlM-gF-F9f" secondAttribute="top" id="dVe-32-F8A"/>
<constraint firstItem="MJ8-d0-vWl" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="lhj-cC-XQn"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="nlM-gF-F9f" secondAttribute="bottom" id="ssT-ie-g3f"/>
<constraint firstItem="sGM-fP-c5C" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="ueo-YA-TVM"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="MJ8-d0-vWl" secondAttribute="trailing" id="wY6-vG-vDH"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="131.8840579710145" y="128.57142857142856"/>
</view>
</objects>
<resources>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
//
// ChuRuKuJiLuXQViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/4/28.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class ChuRuKuJiLuXQViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource{
@IBAction func btmAction(_ sender: UIButton) {
print(sender.titleLabel?.text)
}
var barTitle:String? = ""
let wsh = "完成"//未审核
let wtgReson = ""//未通过原因
@IBOutlet weak var bottomH: NSLayoutConstraint!
@IBOutlet weak var btmView: UIView!
var firstArr = ["0","审核人","申请时间","入库价格","入库总价","入库数量"]
let firstArrChu = ["0","审核人","审核时间","申请时间","出库数量"]
var lastArr = ["生产日期","有效日期","保质期","检测报告","商品库存","仓库","库位","备注","不通过原因"]
// let lastArrChu = ["生产日期","有效日期","保质期","检测报告","商品库存","仓库","库位","批次","备注","不通过原因"]
@IBOutlet weak var listView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = barTitle
self.view.addSubview(navbar)
//MARK: - 根据状态显示或者隐藏
// if 通过/未通过 {
// bottomH.constant = 0
// btmView.isHidden = true
// }
if wsh == "完成"{
firstArr.insert("审核时间", at: 2)
firstArr.remove(at: 3)
}
if (barTitle?.contains("出库"))!{
lastArr.insert("批次", at: 7)
}
listView.separatorStyle = .none
listView.snp.makeConstraints { (make) in
make.top.equalTo(NavCGRect.height)
make.left.right.equalTo(0)
make.bottom.equalTo(btmView.snp_top)
}
listView.register(UINib(nibName: "TitleAndLblCell", bundle: nil), forCellReuseIdentifier: "TitleAndLblCell")
listView.register(UINib(nibName: "DaiKeXiaDanGouWuCell", bundle: nil), forCellReuseIdentifier: "DaiKeXiaDanGouWuCell")
listView.register(UINib(nibName: "TitleAndOnlyBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndOnlyBtnCell")
// Do any additional setup after loading the view.
}
//MARK: - cell delegate
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 1 {
if indexPath.row == 3 {
print("查看")
}
}
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "DaiKeXiaDanGouWuCell") as! DaiKeXiaDanGouWuCell
cell.delImg.isHidden = true
cell.delBtn.isHidden = true
cell.detailLbl2.isHidden = true
cell.btmLIneWidth.constant = 0
return cell
}
}
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndLblCell") as! TitleAndLblCell
if indexPath.section == 0 {
switch indexPath.row {
case 1:
cell.contentLbl.text = "审核人"
break
case 2:
cell.contentLbl.text = "审核时间"
break
case 3:
if (barTitle?.contains("出库"))! {
cell.contentLbl.text = "申请时间"
}else{
cell.contentLbl.text = "入库价格"
}
break
case 4:
if (barTitle?.contains("出库"))! {
cell.contentLbl.text = "出库数量"
}else{
cell.contentLbl.text = "入库总价"
}
break
case 5:
cell.contentLbl.text = "入库数量"
break
default:
break
}
if (barTitle?.contains("入库"))!{
cell.nameLbl.text = firstArr[indexPath.row]
}else{
cell.nameLbl.text = firstArrChu[indexPath.row]
}
}else{
switch indexPath.row {
case 0:
cell.contentLbl.text = "生产日期"
break
case 1:
cell.contentLbl.text = "生产日期"
break
case 2:
cell.contentLbl.text = "保质期"
break
case 4:
cell.contentLbl.text = "商品库存"
break
case 5:
cell.contentLbl.text = "仓库"
break
case 6:
cell.contentLbl.text = "库位"
break
case 7:
if (barTitle?.contains("出库"))! {
cell.contentLbl.text = "批次"
}else{
cell.contentLbl.text = "备注"
}
break
case 8:
if (barTitle?.contains("出库"))! {
cell.contentLbl.text = "备注"
}else{
cell.contentLbl.text = "不通过原因"
}
break
case 9:
cell.contentLbl.text = "不通过原因"
break
default:
break
}
if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndOnlyBtnCell")
as! TitleAndOnlyBtnCell
cell.button.setTitle("查看", for: .normal)
cell.button.isUserInteractionEnabled = false
cell.titleLbl.text = lastArr[indexPath.row]
return cell
}
cell.nameLbl.text = lastArr[indexPath.row]
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
//MARK: - 没有未通过原因
if wtgReson.count == 0 {//没有未通过原因
if indexPath.section == 1{
if indexPath.row == lastArr.count-1 {
return 0.001
}
}
}
//***************************
if indexPath.section == 0 {
if indexPath.row == 0 {
return 120
}
if (barTitle?.contains("入库"))!{//入库未审核
if wsh == "未审核" {
if indexPath.row == 1 || indexPath.row == 2{
return 0.001
}
}
if wsh == "已审核"{
if indexPath.row == 1 {
return 0.001
}
}
}else{//出库未审核
if wsh == "未审核"{
if indexPath.row == 1 || indexPath.row == 2 || indexPath.row == 3{
return 0.001
}
}
if wsh == "已审核"{
if indexPath.row == 1 || indexPath.row == 2{
return 0.001
}
}
}
return 49
}
return 49
}
//MARK: - footer
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 10))
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 10
}
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
if (barTitle?.contains("入库"))!{
return firstArr.count
}else{
return firstArrChu.count
}
}
return lastArr.count
}
func TitleAndOnlyBtnCellEditBtnClick(cell: TitleAndOnlyBtnCell) {
}
}
......@@ -51,7 +51,7 @@
<constraint firstAttribute="height" constant="1" id="1X3-y7-EtA"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xianshi " translatesAutoresizingMaskIntoConstraints="NO" id="7hF-Wd-wdk" userLabel="shopICON">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xianshi" translatesAutoresizingMaskIntoConstraints="NO" id="7hF-Wd-wdk" userLabel="shopICON">
<rect key="frame" x="15" y="19" width="65" height="62"/>
<constraints>
<constraint firstAttribute="width" constant="65" id="q5g-vG-u3t">
......@@ -980,7 +980,7 @@
<resources>
<image name="idCard1" width="14" height="26"/>
<image name="idCard2" width="14" height="26"/>
<image name="xianshi " width="37" height="24"/>
<image name="xianshi" width="37" height="24"/>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......
......@@ -15,17 +15,33 @@ protocol loginDelegate {
func successLogin()
}
class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDelegate {
@IBOutlet weak var phoneLoginBG: UIView!
@IBOutlet weak var passLoginBg: UIView!
var delegate :loginDelegate?
@IBOutlet weak var bannerImg: UIImageView!
@IBOutlet weak var topImg: UIImageView!
//MARK: - 输入账号、密码、验证码
@IBOutlet weak var loginBtn: LGButton!
@IBOutlet weak var codeView: UIView!
@IBOutlet weak var forgetPassBtn: UIButton!
@IBOutlet weak var phoneTF: UITextField!
@IBOutlet weak var passTF: UITextField!
@IBOutlet weak var codeView: UIView!
@IBOutlet weak var codeTF: UITextField!
@IBOutlet weak var bannerImg: UIImageView!
@IBOutlet weak var topImg: UIImageView!
@IBOutlet weak var shBtn: UIButton!
@IBOutlet weak var rightBtn: UIButton!
@IBOutlet weak var leftBtn: UIButton!
@IBOutlet weak var selectLineView: UIView!
@IBOutlet weak var btnLayoutConstraint: NSLayoutConstraint!
@IBOutlet weak var shImg: UIImageView!
//MARK: - 验证码登录
@IBOutlet weak var phoneLogInputTF: UITextField!
@IBOutlet weak var phoneLogCodeTF: UITextField!
@IBOutlet weak var lineView: UIView!
var codeNum: String = ""
//MARK: - viewWillAppear
override func viewWillAppear(_ animated: Bool) {
......@@ -34,11 +50,40 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
}
@IBAction func selectLoginAction(_ sender: UIButton) {
if sender.tag == 0 {//验证码登录
leftBtn.isSelected = true
rightBtn.isSelected = false
selectLineView.snp.updateConstraints { (make) in
make.left.equalTo(0)
make.bottom.equalTo(lineView.snp_bottom)
make.width.equalTo(fullScreenWidth*0.5)
make.height.equalTo(3)
}
phoneLoginBG.isHidden = false
passLoginBg.isHidden = true
forgetPassBtn.isHidden = true
btnLayoutConstraint.constant = 8
}else{//密码登录
leftBtn.isSelected = false
rightBtn.isSelected = true
selectLineView.snp.updateConstraints { (make) in
make.left.equalTo(fullScreenWidth*0.5)
make.bottom.equalTo(lineView.snp_bottom)
make.width.equalTo(fullScreenWidth*0.5)
make.height.equalTo(3)
}
phoneLoginBG.isHidden = true
passLoginBg.isHidden = false
forgetPassBtn.isHidden = false
btnLayoutConstraint.constant = 54.5
}
}
override func viewDidLoad() {
super.viewDidLoad()
passTF.isSecureTextEntry = true
shBtn.isSelected = false
bannerImg.snp.makeConstraints { (make) in
make.top.left.right.equalTo(0)
......@@ -53,6 +98,7 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
codeV.delegate = self
codeView.addSubview(codeV);
codeV.changeCaptcha()
leftBtn.isSelected = true
passTF.keyboardType = .default
codeTF.keyboardType = .default
......@@ -65,9 +111,12 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
phoneTF.autocapitalizationType = .none
passTF.isSecureTextEntry = true
shBtn.isSelected = false
}
//MARK: - 手机登录,获取验证码方法
@IBAction func getLoginCodeAction(_ sender: Any) {
print("get phone login Code")
}
//MARK: -跳转忘记密码,登录
@IBAction func forgetPasswordAction(_ sender: Any) {
let alertView = GeliAlertView(frame: self.view.window!.bounds)
......@@ -78,14 +127,15 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
}
func sureGeliAlertViewAction(sender: UIButton) {
UIApplication.shared.openURL(NSURL.init(string: "tel://020-81338860")! as URL)
}
@IBAction func shPassAction(_ sender: UIButton) {
shBtn.isSelected = !shBtn.isSelected
if shBtn.isSelected {
sender.isSelected = !sender.isSelected
if sender.isSelected {
passTF.isSecureTextEntry = false
shImg.image = UIImage(named: "xianshi")
}else{
shImg.image = UIImage(named: "guanbi")
passTF.isSecureTextEntry = true
}
}
......@@ -93,40 +143,51 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
codeNum = num
}
@IBAction func loginAction(_ sender: Any) {
//MARK:--登录接口样式
print("\(codeNum) == \(codeTF.text)")
// zxpf
// 123456
if phoneTF.text?.count == 0 {
HUD.flash(.label("请填写用户名"), delay: 1.2)
return
}
if passTF.text?.count == 0 {
HUD.flash(.label("请填写密码"), delay: 1.2)
return
}
if codeTF.text?.count == 0 {
HUD.flash(.label("请填写验证码"), delay: 1.2)
return
}
if codeNum == codeTF.text {
//登录中状态
loginBtn.isLoading = true
login(["user_name":phoneTF.text as Any,"pwd":passTF.text as Any], success: { (data) in
let dataM = data as! LoginModel
UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token")
UserDefaults.standard.synchronize()
self.loginBtn.isLoading = false
self.delegate?.successLogin()
// JPUSHService.setAlias(self.phoneTF.text, completion: { (resCode, alias, num) in
//
// }, seq: 1433223)
}) { (error) in
self.loginBtn.isLoading = false
if rightBtn.isSelected {//MARK:- 密码登录
//MARK:--登录接口样式
print("\(codeNum) == \(codeTF.text)")
// zxpf
// 123456
if phoneTF.text?.count == 0 {
HUD.flash(.label("请填写用户名"), delay: 1.2)
return
}
if passTF.text?.count == 0 {
HUD.flash(.label("请填写密码"), delay: 1.2)
return
}
if codeTF.text?.count == 0 {
HUD.flash(.label("请填写验证码"), delay: 1.2)
return
}
if codeNum == codeTF.text {
//登录中状态
loginBtn.isLoading = true
login(["user_name":phoneTF.text as Any,"pwd":passTF.text as Any], success: { (data) in
let dataM = data as! LoginModel
UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token")
UserDefaults.standard.synchronize()
self.loginBtn.isLoading = false
self.delegate?.successLogin()
// JPUSHService.setAlias(self.phoneTF.text, completion: { (resCode, alias, num) in
//
// }, seq: 1433223)
}) { (error) in
self.loginBtn.isLoading = false
}
}else{
HUD.flash(.label("请填写正确的验证码"), delay: 1.2)
}
}else{
HUD.flash(.label("请填写正确的验证码"), delay: 1.2)
//MARK:- 手机验证码登录
}
}
......
......@@ -108,7 +108,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
//MARK:--加载更多数据
@objc func loadMoreData(){
print("加载更多数据")
let UserToken = UserDefaults.standard.value(forKey: "user_token")
var dic = ["user_token":UserToken as Any,"keyword":keyword,"page":page,"order_status":orderStatus,"pay_status":payStatus,"order_source":orderSource,"shipping_status":shippingStatus,"start_time":startTime,"end_time":endTime]
if endTime == 0 {
......
<?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="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.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="OrderListViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="OrderListViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="contentView" destination="gk3-xb-88Q" id="Mmc-gK-QV8"/>
<outlet property="searchBgView" destination="f4t-Fn-Swl" id="yJO-4i-XHP"/>
......@@ -28,7 +28,7 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oFn-kE-fo4">
<rect key="frame" x="320" y="7.5" width="55" height="30"/>
<rect key="frame" x="320" y="11.5" width="55" height="22"/>
<state key="normal" image="shaixuan"/>
<connections>
<action selector="SelectOtherAction:" destination="-1" eventType="touchUpInside" id="Q40-3H-hF7"/>
......
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