Commit b881c2e8 authored by 刘俊宏's avatar 刘俊宏

工作中心(缺编辑完善)

parent 9e82d123
...@@ -306,6 +306,7 @@ ...@@ -306,6 +306,7 @@
F905A7D8246CF82400E3A74D /* SwipeCellKit in Frameworks */ = {isa = PBXBuildFile; productRef = F905A7D7246CF82400E3A74D /* SwipeCellKit */; }; F905A7D8246CF82400E3A74D /* SwipeCellKit in Frameworks */ = {isa = PBXBuildFile; productRef = F905A7D7246CF82400E3A74D /* SwipeCellKit */; };
F9171EFC245128B200359C2B /* Interface.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9171EFB245128B200359C2B /* Interface.swift */; }; F9171EFC245128B200359C2B /* Interface.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9171EFB245128B200359C2B /* Interface.swift */; };
F9171F0224513C5B00359C2B /* UpDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9171F0124513C5B00359C2B /* UpDataModel.swift */; }; F9171F0224513C5B00359C2B /* UpDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9171F0124513C5B00359C2B /* UpDataModel.swift */; };
F933C42E2484A66C0058940C /* WorkTestModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933C42D2484A66C0058940C /* WorkTestModel.swift */; };
F933F6C02452C68B00189561 /* PKHUDSystemActivityIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6AF2452C68B00189561 /* PKHUDSystemActivityIndicatorView.swift */; }; F933F6C02452C68B00189561 /* PKHUDSystemActivityIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6AF2452C68B00189561 /* PKHUDSystemActivityIndicatorView.swift */; };
F933F6C12452C68B00189561 /* PKHUDAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6B02452C68B00189561 /* PKHUDAnimation.swift */; }; F933F6C12452C68B00189561 /* PKHUDAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6B02452C68B00189561 /* PKHUDAnimation.swift */; };
F933F6C22452C68B00189561 /* PKHUDAnimating.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6B12452C68B00189561 /* PKHUDAnimating.swift */; }; F933F6C22452C68B00189561 /* PKHUDAnimating.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6B12452C68B00189561 /* PKHUDAnimating.swift */; };
...@@ -323,6 +324,8 @@ ...@@ -323,6 +324,8 @@
F933F6CE2452C68B00189561 /* PKHUDSquareBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6BD2452C68B00189561 /* PKHUDSquareBaseView.swift */; }; F933F6CE2452C68B00189561 /* PKHUDSquareBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6BD2452C68B00189561 /* PKHUDSquareBaseView.swift */; };
F933F6CF2452C68B00189561 /* PKHUDErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6BE2452C68B00189561 /* PKHUDErrorView.swift */; }; F933F6CF2452C68B00189561 /* PKHUDErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6BE2452C68B00189561 /* PKHUDErrorView.swift */; };
F933F6D22452DAE100189561 /* TabBarContentClassView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6D12452DAE000189561 /* TabBarContentClassView.swift */; }; F933F6D22452DAE100189561 /* TabBarContentClassView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F933F6D12452DAE000189561 /* TabBarContentClassView.swift */; };
F93615DB2480B421004187F9 /* WorkInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93615DA2480B421004187F9 /* WorkInterface.swift */; };
F93615DD2480B693004187F9 /* WorkcenterIndexModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93615DC2480B693004187F9 /* WorkcenterIndexModel.swift */; };
F93E31F724721C4200524DFC /* EditOGPAdModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93E31F624721C4200524DFC /* EditOGPAdModel.swift */; }; F93E31F724721C4200524DFC /* EditOGPAdModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93E31F624721C4200524DFC /* EditOGPAdModel.swift */; };
F93E31FD24727A2D00524DFC /* ShowTimeSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93E31FC24727A2D00524DFC /* ShowTimeSelectView.swift */; }; F93E31FD24727A2D00524DFC /* ShowTimeSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93E31FC24727A2D00524DFC /* ShowTimeSelectView.swift */; };
F93E32052473C9C200524DFC /* jpush-extension-ios-1.1.2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F93E32002473C9C200524DFC /* jpush-extension-ios-1.1.2.a */; }; F93E32052473C9C200524DFC /* jpush-extension-ios-1.1.2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F93E32002473C9C200524DFC /* jpush-extension-ios-1.1.2.a */; };
...@@ -805,6 +808,7 @@ ...@@ -805,6 +808,7 @@
F9023F702449ACA800DD5A63 /* TitleAndSwitchCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TitleAndSwitchCell.xib; sourceTree = "<group>"; }; F9023F702449ACA800DD5A63 /* TitleAndSwitchCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TitleAndSwitchCell.xib; sourceTree = "<group>"; };
F9171EFB245128B200359C2B /* Interface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Interface.swift; sourceTree = "<group>"; }; F9171EFB245128B200359C2B /* Interface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Interface.swift; sourceTree = "<group>"; };
F9171F0124513C5B00359C2B /* UpDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpDataModel.swift; sourceTree = "<group>"; }; F9171F0124513C5B00359C2B /* UpDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpDataModel.swift; sourceTree = "<group>"; };
F933C42D2484A66C0058940C /* WorkTestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkTestModel.swift; sourceTree = "<group>"; };
F933F6AF2452C68B00189561 /* PKHUDSystemActivityIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDSystemActivityIndicatorView.swift; sourceTree = "<group>"; }; F933F6AF2452C68B00189561 /* PKHUDSystemActivityIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDSystemActivityIndicatorView.swift; sourceTree = "<group>"; };
F933F6B02452C68B00189561 /* PKHUDAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDAnimation.swift; sourceTree = "<group>"; }; F933F6B02452C68B00189561 /* PKHUDAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDAnimation.swift; sourceTree = "<group>"; };
F933F6B12452C68B00189561 /* PKHUDAnimating.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDAnimating.swift; sourceTree = "<group>"; }; F933F6B12452C68B00189561 /* PKHUDAnimating.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDAnimating.swift; sourceTree = "<group>"; };
...@@ -823,6 +827,8 @@ ...@@ -823,6 +827,8 @@
F933F6BE2452C68B00189561 /* PKHUDErrorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDErrorView.swift; sourceTree = "<group>"; }; F933F6BE2452C68B00189561 /* PKHUDErrorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PKHUDErrorView.swift; sourceTree = "<group>"; };
F933F6BF2452C68B00189561 /* PKHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PKHUD.h; sourceTree = "<group>"; }; F933F6BF2452C68B00189561 /* PKHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PKHUD.h; sourceTree = "<group>"; };
F933F6D12452DAE000189561 /* TabBarContentClassView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarContentClassView.swift; sourceTree = "<group>"; }; F933F6D12452DAE000189561 /* TabBarContentClassView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarContentClassView.swift; sourceTree = "<group>"; };
F93615DA2480B421004187F9 /* WorkInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkInterface.swift; sourceTree = "<group>"; };
F93615DC2480B693004187F9 /* WorkcenterIndexModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkcenterIndexModel.swift; sourceTree = "<group>"; };
F93E31F624721C4200524DFC /* EditOGPAdModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditOGPAdModel.swift; sourceTree = "<group>"; }; F93E31F624721C4200524DFC /* EditOGPAdModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditOGPAdModel.swift; sourceTree = "<group>"; };
F93E31FC24727A2D00524DFC /* ShowTimeSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowTimeSelectView.swift; sourceTree = "<group>"; }; F93E31FC24727A2D00524DFC /* ShowTimeSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowTimeSelectView.swift; sourceTree = "<group>"; };
F93E32002473C9C200524DFC /* jpush-extension-ios-1.1.2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "jpush-extension-ios-1.1.2.a"; sourceTree = "<group>"; }; F93E32002473C9C200524DFC /* jpush-extension-ios-1.1.2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "jpush-extension-ios-1.1.2.a"; sourceTree = "<group>"; };
...@@ -1506,14 +1512,15 @@ ...@@ -1506,14 +1512,15 @@
E09B03A92445B09200211A51 /* Model */ = { E09B03A92445B09200211A51 /* Model */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F95B8533247F47D800790719 /* Work */,
E00D85DC244561FD00F5F816 /* Products */, E00D85DC244561FD00F5F816 /* Products */,
F95B8533247F47D800790719 /* Work */,
E0B5308224728D5600FFCC15 /* WarehouseManageModel */, E0B5308224728D5600FFCC15 /* WarehouseManageModel */,
F956D5BE246A3649003FF510 /* OrderManageModel */, F956D5BE246A3649003FF510 /* OrderManageModel */,
F956D5BD246A3629003FF510 /* PersonCenterModel */, F956D5BD246A3629003FF510 /* PersonCenterModel */,
F956D5BC246A35DB003FF510 /* GoodsManageMoel */, F956D5BC246A35DB003FF510 /* GoodsManageMoel */,
F9171EFB245128B200359C2B /* Interface.swift */, F9171EFB245128B200359C2B /* Interface.swift */,
E0B5308524728FB600FFCC15 /* WarehouseInterface.swift */, E0B5308524728FB600FFCC15 /* WarehouseInterface.swift */,
F93615DA2480B421004187F9 /* WorkInterface.swift */,
F956D5BA246A359C003FF510 /* GoodsInterface.swift */, F956D5BA246A359C003FF510 /* GoodsInterface.swift */,
F956D5B8246A33E2003FF510 /* OrderInterface.swift */, F956D5B8246A33E2003FF510 /* OrderInterface.swift */,
E09B03AA2445B0A300211A51 /* LoginModel.swift */, E09B03AA2445B0A300211A51 /* LoginModel.swift */,
...@@ -1998,6 +2005,7 @@ ...@@ -1998,6 +2005,7 @@
F94A315A24628C7E00FEC38E /* WorkItemTableViewCell.xib */, F94A315A24628C7E00FEC38E /* WorkItemTableViewCell.xib */,
F94A315D24629DDD00FEC38E /* WorkBannerTableViewCell.swift */, F94A315D24629DDD00FEC38E /* WorkBannerTableViewCell.swift */,
F94A315E24629DDD00FEC38E /* WorkBannerTableViewCell.xib */, F94A315E24629DDD00FEC38E /* WorkBannerTableViewCell.xib */,
F933C42D2484A66C0058940C /* WorkTestModel.swift */,
); );
path = "工作中心"; path = "工作中心";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2261,6 +2269,7 @@ ...@@ -2261,6 +2269,7 @@
F95B8533247F47D800790719 /* Work */ = { F95B8533247F47D800790719 /* Work */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F93615DC2480B693004187F9 /* WorkcenterIndexModel.swift */,
); );
path = Work; path = Work;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2780,8 +2789,10 @@ ...@@ -2780,8 +2789,10 @@
F956D5A6246A2D9C003FF510 /* LMNoteViewController.m in Sources */, F956D5A6246A2D9C003FF510 /* LMNoteViewController.m in Sources */,
E0CC848B24824291009B1FE9 /* CRKListVC.swift in Sources */, E0CC848B24824291009B1FE9 /* CRKListVC.swift in Sources */,
E03549AD24582828008BD021 /* KeHuGuanLiCell.swift in Sources */, E03549AD24582828008BD021 /* KeHuGuanLiCell.swift in Sources */,
F93615DD2480B693004187F9 /* WorkcenterIndexModel.swift in Sources */,
F95567A72453DA86009674AB /* WarehoseMangementListVC.swift in Sources */, F95567A72453DA86009674AB /* WarehoseMangementListVC.swift in Sources */,
F933F6CF2452C68B00189561 /* PKHUDErrorView.swift in Sources */, F933F6CF2452C68B00189561 /* PKHUDErrorView.swift in Sources */,
F933C42E2484A66C0058940C /* WorkTestModel.swift in Sources */,
E07B1E78245966E60055BA3C /* XinCaiGouViewController.swift in Sources */, E07B1E78245966E60055BA3C /* XinCaiGouViewController.swift in Sources */,
F933F6C42452C68B00189561 /* PKHUD.swift in Sources */, F933F6C42452C68B00189561 /* PKHUD.swift in Sources */,
E0F97B102451728D001BD600 /* AddGuiGeCell.swift in Sources */, E0F97B102451728D001BD600 /* AddGuiGeCell.swift in Sources */,
...@@ -2921,6 +2932,7 @@ ...@@ -2921,6 +2932,7 @@
F942A7FD247500C300FDFC47 /* TestClass.swift in Sources */, F942A7FD247500C300FDFC47 /* TestClass.swift in Sources */,
F950FDD824518B9500C40530 /* FSCalendarDelegationProxy.m in Sources */, F950FDD824518B9500C40530 /* FSCalendarDelegationProxy.m in Sources */,
E01EA1A0245A5D6B00F019D5 /* YunDanXiangQingViewController.swift in Sources */, E01EA1A0245A5D6B00F019D5 /* YunDanXiangQingViewController.swift in Sources */,
F93615DB2480B421004187F9 /* WorkInterface.swift in Sources */,
F956D5A0246A2D9C003FF510 /* LMNImageView.m in Sources */, F956D5A0246A2D9C003FF510 /* LMNImageView.m in Sources */,
E0E341EA246E95EE0060AC20 /* PingLunCell.swift in Sources */, E0E341EA246E95EE0060AC20 /* PingLunCell.swift in Sources */,
F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */, F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */,
......
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "work入库申请.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "work入库申请@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "work入库申请@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "work出库申请.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "work出库申请@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "work出库申请@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "work待确认订单.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "work待确认订单@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "work待确认订单@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "work未发货订单.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "work未发货订单@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "work未发货订单@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "work采购入库.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "work采购入库@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "work采购入库@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String) ...@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址 //接口地址
//test //test
//let SERVERCE_ImageHost = "https://z.gelifood.com/" let SERVERCE_ImageHost = "https://z.gelifood.com/"
//let SERVERCE_HOST = "https://z.gelifood.com/admin/" let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let SERVERCE_ImageHost = "https://zx.gelifood.com/" //let SERVERCE_ImageHost = "https://zx.gelifood.com/"
let SERVERCE_HOST = "https://zx.gelifood.com/admin/" //let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
//online //online
//let SERVERCE_ImageHost = "https://api.laigewan.com/upload/images/" //let SERVERCE_ImageHost = "https://api.laigewan.com/upload/images/"
//let SERVERCE_HOST = "http://a.gelifood.com/apia" //let SERVERCE_HOST = "http://a.gelifood.com/apia"
......
...@@ -94,6 +94,8 @@ ...@@ -94,6 +94,8 @@
<string>Workcenter/statistics</string> <string>Workcenter/statistics</string>
<key>获取权限</key> <key>获取权限</key>
<string>Workcenter/auths</string> <string>Workcenter/auths</string>
<key>获取统计+权限</key>
<string>Workcenter/index</string>
<key>填写/修改订单物流单号</key> <key>填写/修改订单物流单号</key>
<string>Order/editLwbno</string> <string>Order/editLwbno</string>
<key>获取入库的基本信息</key> <key>获取入库的基本信息</key>
......
//
// WorkManageModel.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/5/29.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
//获取统计+权限
class WorkcenterIndexModel: Mappable {
var code:Int?
var message : String?
var data : WorkcenterIndexDataModel?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class WorkcenterIndexDataModel: Mappable {
var order_count : Int? //订单数量
var paid : Float? //已收款
var npaid : Float? //待付款
var qr_code : String? //商家小程序二维码
var shipping : Int? //未发货订单数
var confirm : Int? //待确认订单数
var apply_in : Int? //入库申请数
var apply_out : Int? //出库申请数
var auth_res : Array<WorkcenterIndexAuthResModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
order_count <- map["order_count"]
paid <- map["paid"]
npaid <- map["npaid"]
qr_code <- map["qr_code"]
shipping <- map["shipping"]
confirm <- map["confirm"]
apply_in <- map["apply_in"]
apply_out <- map["apply_out"]
auth_res <- map["auth_res"]
}
}
class WorkcenterIndexAuthResModel: Mappable {
var auth_id : Int? ////权限id
var auth_name : String? //权限名
var is_often : Int? //是否常用功能
var auth_controller_app : String?
var auth_action_app : String?
var ranges : Int?
var platforms : Int?
var auth_pid : Int? ////权限id父
var app_icon : String? //item缩略图
required init?( map: Map) {
}
func mapping(map: Map) {
auth_id <- map["auth_id"]
auth_name <- map["auth_name"]
is_often <- map["is_often"]
auth_controller_app <- map["auth_controller_app"]
auth_action_app <- map["auth_action_app"]
ranges <- map["ranges"]
platforms <- map["platforms"]
auth_pid <- map["auth_pid"]
}
}
//获取 权限
class WorkcenterAuthsModel: Mappable {
var code:Int?
var message : String?
var data : Array<WorkcenterIndexAuthResModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
//获取统计、店铺二维码、待办事项信息
class WorkcenterStatisticsModel: Mappable {
var code:Int?
var message : String?
var data : WorkcenterIndexDataModel?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
//
// WorkInterface.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/5/29.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import Alamofire
import SwiftyJSON
import ObjectMapper
//MARK: --获取统计+权限
/**
params-key:
user_token(验证token)
star_time(开始时间,时间戳)
end_time(当前时间戳)
*/
func WorkcenterIndex(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) { NetworkRequest.sharedInstance.postRequest("获取统计+权限", params, { (rep:DataResponse<WorkcenterIndexModel>) in
}, success: { (data) in
success(data)
}) { (error) in
}
}
//MARK: --获取 权限
/**
params-key:
user_token(验证token)
*/
func WorkcenterAuths(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) { NetworkRequest.sharedInstance.postRequest("获取权限", params, { (rep:DataResponse<WorkcenterAuthsModel>) in
}, success: { (data) in
success(data)
}) { (error) in
}
}
//MARK: --获取统计、店铺二维码、待办事项信息
/**
params-key:
user_token(验证token)
star_time(开始时间,时间戳)
end_time(当前时间戳)
*/
func WorkcenterStatistics(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) { NetworkRequest.sharedInstance.postRequest("获取统计、店铺二维码、待办事项信息", params, { (rep:DataResponse<WorkcenterStatisticsModel>) in
}, success: { (data) in
success(data)
}) { (error) in
}
}
...@@ -317,8 +317,8 @@ ...@@ -317,8 +317,8 @@
[self.imgIndexArr addObject:index]; [self.imgIndexArr addObject:index];
} }
// NSString *imgSrc = @"https://c.gelifood.com/"; NSString *imgSrc = @"https://c.gelifood.com/";
NSString *imgSrc = @"https://cms.gelifood.com/"; // NSString *imgSrc = @"https://cms.gelifood.com/";
NSString *imgurl = [src stringByReplacingOccurrencesOfString:imgSrc withString:@""]; NSString *imgurl = [src stringByReplacingOccurrencesOfString:imgSrc withString:@""];
[self.imgUrlArr addObject:imgurl]; [self.imgUrlArr addObject:imgurl];
} }
......
...@@ -81,8 +81,8 @@ static CGFloat const kVerticalMargin = kVerticalInset + kMargin; ...@@ -81,8 +81,8 @@ static CGFloat const kVerticalMargin = kVerticalInset + kMargin;
} }
- (void)setImageUrl:(NSString *)imageUrl { - (void)setImageUrl:(NSString *)imageUrl {
_imageUrl = imageUrl; _imageUrl = imageUrl;
// NSString *imgSrc = @"https://c.gelifood.com/"; NSString *imgSrc = @"https://c.gelifood.com/";
NSString *imgSrc = @"https://cms.gelifood.com/"; // NSString *imgSrc = @"https://cms.gelifood.com/";
[self.imageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",imgSrc,imageUrl]] [self.imageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",imgSrc,imageUrl]]
placeholderImage:[UIImage imageNamed:@"lmn_tool_image"] options:(SDWebImageRetryFailed) completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { placeholderImage:[UIImage imageNamed:@"lmn_tool_image"] options:(SDWebImageRetryFailed) completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
if ([line isKindOfMode:LMNLineModeModeImage]) { if ([line isKindOfMode:LMNLineModeModeImage]) {
// TODO: 图片部分逻辑未处理。 // TODO: 图片部分逻辑未处理。
// NSString *imgSrc = @"https://c.gelifood.com/"; NSString *imgSrc = @"https://c.gelifood.com/";
NSString *imgSrc = @"https://cms.gelifood.com/"; // NSString *imgSrc = @"https://cms.gelifood.com/";
NSString *imgUrl = self.imgArr[i]; NSString *imgUrl = self.imgArr[i];
i += 1; i += 1;
......
...@@ -69,6 +69,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg ...@@ -69,6 +69,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
} }
} }
//MARK:--tabbarVCs //MARK:--tabbarVCs
weak var tabBarC:ESTabBarController? = nil
func addTabBarVcs (isAgain:Bool) { func addTabBarVcs (isAgain:Bool) {
let tabBarController = ESTabBarController() let tabBarController = ESTabBarController()
tabBarController.delegate = self tabBarController.delegate = self
...@@ -77,26 +78,26 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg ...@@ -77,26 +78,26 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
let img = imageWithColor(UIColor.white) let img = imageWithColor(UIColor.white)
tabBarController.tabBar.backgroundImage = img tabBarController.tabBar.backgroundImage = img
NotificationCenter.default.addObserver(self, selector: #selector(popLogout), name: NSNotification.Name(rawValue: "logout"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(popLogout), name: NSNotification.Name(rawValue: "logout"), object: nil)
tabBarC = tabBarController
let v1 = OrderListViewController() let v1 = OrderListViewController()
let v2 = CRKListVC() let v2 = CRKListVC()
// let v3 = WorkCViewController() let v3 = WorkCViewController()
let v4 = WarehoseMangementListVC() let v4 = WarehoseMangementListVC()
let v5 = PersonCenterViewController() let v5 = PersonCenterViewController()
v1.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "订单管理", image: UIImage(named: "tab_btn_dingdao_nor"), selectedImage: UIImage(named: "tab_btn_dingdan_hig")) v1.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "订单管理", image: UIImage(named: "tab_btn_dingdao_nor"), selectedImage: UIImage(named: "tab_btn_dingdan_hig"))
v2.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "商品管理", image: UIImage(named: "tab_btn_shangpin_nor"), selectedImage: UIImage(named: "tab_btn_shangpin_hig")) v2.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "商品管理", image: UIImage(named: "tab_btn_shangpin_nor"), selectedImage: UIImage(named: "tab_btn_shangpin_hig"))
// v3.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "工作中心", image: UIImage(named: "tab_btn_gongzuo_nor"), selectedImage: UIImage(named: "tab_btn_gongzuo_hig")) v3.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "工作中心", image: UIImage(named: "tab_btn_gongzuo_nor"), selectedImage: UIImage(named: "tab_btn_gongzuo_hig"))
v4.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "仓库管理", image: UIImage(named: "tab_btn_cangku_nor"), selectedImage: UIImage(named: "tab_btn_cangku_hig")) v4.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "仓库管理", image: UIImage(named: "tab_btn_cangku_nor"), selectedImage: UIImage(named: "tab_btn_cangku_hig"))
v5.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "个人中心", image: UIImage(named: "tab_btn_geren_nor"), selectedImage: UIImage(named: "tab_btn_geren_hig")) v5.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "个人中心", image: UIImage(named: "tab_btn_geren_nor"), selectedImage: UIImage(named: "tab_btn_geren_hig"))
// Create the SwiftUI view that provides the window contents. // Create the SwiftUI view that provides the window contents.
// tabBarController.viewControllers = [v1, v2, v3, v4, v5] tabBarController.viewControllers = [v1, v2, v3, v4, v5]
tabBarController.viewControllers = [v1, v2, v4, v5] // tabBarController.viewControllers = [v1, v2, v4, v5]
// tabBarController.selectedIndex = 2 tabBarController.selectedIndex = 2
...@@ -120,6 +121,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg ...@@ -120,6 +121,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
} }
NotificationCenter.default.addObserver(self, selector: #selector(changgeTabItem(notion:)), name: NSNotification.Name(rawValue: "changgeTabItem"), object: nil)
//测试代码 //测试代码
// if let tabBarItem = v2.tabBarItem as? ESTabBarItem { // if let tabBarItem = v2.tabBarItem as? ESTabBarItem {
// DispatchQueue.main.asyncAfter(deadline: .now() + 2 ) { // DispatchQueue.main.asyncAfter(deadline: .now() + 2 ) {
...@@ -127,6 +130,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg ...@@ -127,6 +130,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
// } // }
// } // }
} }
//MARK:--切换tab
@objc func changgeTabItem(notion:Notification) {
let dic = notion.userInfo
tabBarC?.selectedIndex = dic!["tag"] as Any as! Int
}
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) { func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
//添加通知,才加载数据 //添加通知,才加载数据
print(viewController) print(viewController)
......
...@@ -49,7 +49,7 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -49,7 +49,7 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
make.left.right.equalTo(0) make.left.right.equalTo(0)
make.height.equalTo(60) make.height.equalTo(60)
} }
listView.delegate = self listView.delegate = self
listView.dataSource = self listView.dataSource = self
listView.isScrollEnabled = false listView.isScrollEnabled = false
......
...@@ -10,6 +10,10 @@ import UIKit ...@@ -10,6 +10,10 @@ import UIKit
class WorkBannerTableViewCell: UITableViewCell { class WorkBannerTableViewCell: UITableViewCell {
@IBOutlet weak var totalPriceLbl: UILabel!
@IBOutlet weak var npaidLbl: UILabel!
@IBOutlet weak var paidLbl: UILabel!
@IBOutlet weak var orderCountLbl: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="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="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WorkCViewController" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WorkCViewController" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="contentView" destination="Ljz-8E-4Zf" id="KmD-fN-LkV"/> <outlet property="contentView" destination="Ljz-8E-4Zf" id="KmD-fN-LkV"/>
<outlet property="topNavBtn" destination="1ie-Ew-Tp5" id="xH1-fJ-48Y"/> <outlet property="topNavBtn" destination="1ie-Ew-Tp5" id="xH1-fJ-48Y"/>
......
...@@ -10,6 +10,7 @@ import UIKit ...@@ -10,6 +10,7 @@ import UIKit
class WorkItemCollectionViewCell: UICollectionViewCell { class WorkItemCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var countLbl: UILabel!
@IBOutlet weak var itemNameLbl: UILabel! @IBOutlet weak var itemNameLbl: UILabel!
@IBOutlet weak var itemImgV: UIImageView! @IBOutlet weak var itemImgV: UIImageView!
@IBOutlet weak var bgImV: UIImageView! @IBOutlet weak var bgImV: UIImageView!
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="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"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="WorkItemCollectionViewCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="WorkItemCollectionViewCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="100" height="69"/> <rect key="frame" x="0.0" y="0.0" width="100" height="69"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="pg3-lh-kp9"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="pg3-lh-kp9">
<rect key="frame" x="0.0" y="0.0" width="100" height="69"/> <rect key="frame" x="0.0" y="0.0" width="100" height="69"/>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="item名称" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nZJ-9s-cJg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="item名称" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nZJ-9s-cJg">
<rect key="frame" x="3" y="48" width="94" height="14"/> <rect key="frame" x="0.0" y="48.5" width="100" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -29,17 +29,35 @@ ...@@ -29,17 +29,35 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bianji" translatesAutoresizingMaskIntoConstraints="NO" id="qfI-0k-kQG"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bianji" translatesAutoresizingMaskIntoConstraints="NO" id="qfI-0k-kQG">
<rect key="frame" x="41.5" y="18" width="17" height="16.5"/> <rect key="frame" x="41.5" y="18" width="17" height="16.5"/>
</imageView> </imageView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ajc-oX-hvc">
<rect key="frame" x="74" y="0.0" width="16" height="16"/>
<color key="backgroundColor" name="密码错误字体颜色"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="02u-H7-wuT"/>
<constraint firstAttribute="height" constant="16" id="GmL-IM-B6e"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="白色背景色"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="7.5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</label>
</subviews> </subviews>
</view> </view>
<gestureRecognizers/> <gestureRecognizers/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="pg3-lh-kp9" secondAttribute="trailing" id="74N-EK-MFS"/> <constraint firstAttribute="trailing" secondItem="pg3-lh-kp9" secondAttribute="trailing" id="74N-EK-MFS"/>
<constraint firstItem="nZJ-9s-cJg" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="3" id="8vJ-pB-TcE"/> <constraint firstItem="nZJ-9s-cJg" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="8vJ-pB-TcE"/>
<constraint firstAttribute="trailing" secondItem="nZJ-9s-cJg" secondAttribute="trailing" constant="3" id="Adg-76-avT"/> <constraint firstAttribute="trailing" secondItem="nZJ-9s-cJg" secondAttribute="trailing" id="Adg-76-avT"/>
<constraint firstItem="qfI-0k-kQG" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="GAg-aT-ARc"/> <constraint firstItem="qfI-0k-kQG" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="GAg-aT-ARc"/>
<constraint firstItem="pg3-lh-kp9" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="KBD-1B-1gJ"/> <constraint firstItem="pg3-lh-kp9" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="KBD-1B-1gJ"/>
<constraint firstItem="qfI-0k-kQG" firstAttribute="bottom" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="Lpw-Mk-cR4"/> <constraint firstItem="qfI-0k-kQG" firstAttribute="bottom" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="Lpw-Mk-cR4"/>
<constraint firstAttribute="bottom" secondItem="pg3-lh-kp9" secondAttribute="bottom" id="eFM-R9-BJo"/> <constraint firstAttribute="bottom" secondItem="pg3-lh-kp9" secondAttribute="bottom" id="eFM-R9-BJo"/>
<constraint firstAttribute="trailing" secondItem="Ajc-oX-hvc" secondAttribute="trailing" constant="10" id="gtC-oh-x4F"/>
<constraint firstItem="Ajc-oX-hvc" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="mj6-Gx-BZH"/>
<constraint firstItem="pg3-lh-kp9" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="skh-sW-fEO"/> <constraint firstItem="pg3-lh-kp9" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="skh-sW-fEO"/>
<constraint firstAttribute="bottom" secondItem="nZJ-9s-cJg" secondAttribute="bottom" constant="7" id="v6j-Yr-2wF"/> <constraint firstAttribute="bottom" secondItem="nZJ-9s-cJg" secondAttribute="bottom" constant="7" id="v6j-Yr-2wF"/>
</constraints> </constraints>
...@@ -47,6 +65,7 @@ ...@@ -47,6 +65,7 @@
<size key="customSize" width="100" height="69"/> <size key="customSize" width="100" height="69"/>
<connections> <connections>
<outlet property="bgImV" destination="pg3-lh-kp9" id="usC-7f-KnW"/> <outlet property="bgImV" destination="pg3-lh-kp9" id="usC-7f-KnW"/>
<outlet property="countLbl" destination="Ajc-oX-hvc" id="yUr-Ey-VHj"/>
<outlet property="itemImgV" destination="qfI-0k-kQG" id="qLI-Cx-MSh"/> <outlet property="itemImgV" destination="qfI-0k-kQG" id="qLI-Cx-MSh"/>
<outlet property="itemNameLbl" destination="nZJ-9s-cJg" id="D5k-6q-pu9"/> <outlet property="itemNameLbl" destination="nZJ-9s-cJg" id="D5k-6q-pu9"/>
</connections> </connections>
...@@ -55,8 +74,14 @@ ...@@ -55,8 +74,14 @@
</objects> </objects>
<resources> <resources>
<image name="bianji" width="17" height="16.5"/> <image name="bianji" width="17" height="16.5"/>
<namedColor name="密码错误字体颜色">
<color red="0.88999998569488525" green="0.27799999713897705" blue="0.27799999713897705" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色"> <namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources> </resources>
</document> </document>
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
import UIKit import UIKit
@objc protocol WorkItemTableViewCellDelegate { @objc protocol WorkItemTableViewCellDelegate {
@objc optional func WorkItemTableViewCellBtnClick(sender:WorkItemTableViewCell,idx:IndexPath) @objc optional func WorkItemTableViewCellBtnClick(sender:WorkItemTableViewCell,idx:IndexPath)
@objc optional func WorkItemTableViewCellAuthId(sender:WorkItemTableViewCell,auth_id:Int)
} }
class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UICollectionViewDataSource { class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UICollectionViewDataSource {
var delegate:WorkItemTableViewCellDelegate? var delegate:WorkItemTableViewCellDelegate?
...@@ -16,10 +18,11 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle ...@@ -16,10 +18,11 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
@IBOutlet weak var collectionView: UICollectionView! @IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var titleLbl: UILabel! @IBOutlet weak var titleLbl: UILabel!
@IBOutlet weak var gotoImgV: UIImageView! @IBOutlet weak var gotoImgV: UIImageView!
var dataIndexSection = 0
//数据 //数据
var itemArrs:[String] = [] var itemArrs:[String] = []
var itemDataArrs:[WorkcenterIndexAuthResModel] = []
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
...@@ -32,7 +35,6 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle ...@@ -32,7 +35,6 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
forCellWithReuseIdentifier: "WorkItemCollectionViewCell") forCellWithReuseIdentifier: "WorkItemCollectionViewCell")
} }
//加载数据 //加载数据
...@@ -56,7 +58,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle ...@@ -56,7 +58,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
func collectionView(_ collectionView: UICollectionView, func collectionView(_ collectionView: UICollectionView,
numberOfItemsInSection section: Int) -> Int { numberOfItemsInSection section: Int) -> Int {
return 10 return itemArrs.count
} }
//返回对应的单元格 //返回对应的单元格
...@@ -64,32 +66,46 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle ...@@ -64,32 +66,46 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WorkItemCollectionViewCell", let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WorkItemCollectionViewCell",
for: indexPath) as! WorkItemCollectionViewCell for: indexPath) as! WorkItemCollectionViewCell
cell.itemImgV.image = UIImage.init(named: "worktest1")
// if indexPath.row % 2 == 0 {
// cell.bgImV.image = UIImage.init(named: "workjia")
// }else{
// cell.bgImV.image = UIImage.init(named: "workjian")
//
// }
// if indexPath.row == 10 {
// cell.bgImV.image = UIImage.init(named: "workkuang")
// cell.itemImgV.isHidden = true
// cell.itemNameLbl.isHidden = true
// }
cell.itemNameLbl.text = "itemN\(indexPath.row)"
if indexPath.row % 2 == 0 {
cell.itemImgV.image = UIImage.init(named: "worktest1")
}else{
cell.itemImgV.image = UIImage.init(named: "worktest2")
if dataIndexSection == 2 {
cell.countLbl.isHidden = false
cell.itemImgV.image = UIImage.init(named: ("work" + itemArrs[indexPath.row]))
cell.countLbl.text = StringByInt(number: indexPath.row)
if indexPath.row == 0 {
cell.countLbl.text = "100"
}
}else{
cell.countLbl.isHidden = true
} }
cell.itemNameLbl.text = itemArrs[indexPath.row]
//加减图——用于编辑工作中心用
// if indexPath.row % 2 == 0 {
// cell.bgImV.image = UIImage.init(named: "workjia")
// }else{
// cell.bgImV.image = UIImage.init(named: "workjian")
//
// }
//边框图——用于编辑工作中心用
// if indexPath.row == 10 {
// cell.bgImV.image = UIImage.init(named: "workkuang")
// cell.itemImgV.isHidden = true
// cell.itemNameLbl.isHidden = true
// }
return cell return cell
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
// print("1选中item=\(indexPath.section)=\(indexPath.row)") if dataIndexSection == 2 {
delegate?.WorkItemTableViewCellBtnClick?(sender: self, idx: indexPath) delegate?.WorkItemTableViewCellBtnClick?(sender: self, idx: indexPath)
}else{
let rowModel = self.itemDataArrs[indexPath.row]
//真实数据要穿 auth_id
delegate?.WorkItemTableViewCellAuthId?(sender: self, auth_id: rowModel.auth_id!)
}
} }
......
//
// WorkTestModel.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/6/1.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import RealmSwift
//工作中心
class WorkDataModel:Object {
//类型名
@objc dynamic var dataModelStr = ""
@objc dynamic var star_time = 0
@objc dynamic var end_time = Date()
@objc dynamic var oftenArrStr = ""
}
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