Commit fab58ede authored by lujunye's avatar lujunye

1.3版本上架版

parent 92396de3
......@@ -311,6 +311,11 @@
E0E8ABFD246E359700E3BB54 /* GuiGeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0E8ABFC246E359700E3BB54 /* GuiGeModel.swift */; };
E0EABAE72487748500F6CA8D /* NewSelectWarehouseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0EABAE52487748500F6CA8D /* NewSelectWarehouseVC.swift */; };
E0EABAE82487748500F6CA8D /* NewSelectWarehouseVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0EABAE62487748500F6CA8D /* NewSelectWarehouseVC.xib */; };
E0EFB9C624930C0D005FB0CD /* CGDListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0EFB9C424930C0D005FB0CD /* CGDListViewController.swift */; };
E0EFB9C724930C0D005FB0CD /* CGDListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0EFB9C524930C0D005FB0CD /* CGDListViewController.xib */; };
E0EFB9CA24930DD5005FB0CD /* CGDListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0EFB9C824930DD5005FB0CD /* CGDListVC.swift */; };
E0EFB9CB24930DD5005FB0CD /* CGDListVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0EFB9C924930DD5005FB0CD /* CGDListVC.xib */; };
E0EFB9CE2493189D005FB0CD /* PurchaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0EFB9CD2493189D005FB0CD /* PurchaseModel.swift */; };
E0F1BE4824692379003015B2 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F1BE4624692379003015B2 /* ItemCell.swift */; };
E0F1BE4924692379003015B2 /* ItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F1BE4724692379003015B2 /* ItemCell.xib */; };
E0F3C2CB24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */; };
......@@ -857,6 +862,11 @@
E0E8ABFC246E359700E3BB54 /* GuiGeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuiGeModel.swift; sourceTree = "<group>"; };
E0EABAE52487748500F6CA8D /* NewSelectWarehouseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewSelectWarehouseVC.swift; sourceTree = "<group>"; };
E0EABAE62487748500F6CA8D /* NewSelectWarehouseVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewSelectWarehouseVC.xib; sourceTree = "<group>"; };
E0EFB9C424930C0D005FB0CD /* CGDListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGDListViewController.swift; sourceTree = "<group>"; };
E0EFB9C524930C0D005FB0CD /* CGDListViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CGDListViewController.xib; sourceTree = "<group>"; };
E0EFB9C824930DD5005FB0CD /* CGDListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGDListVC.swift; sourceTree = "<group>"; };
E0EFB9C924930DD5005FB0CD /* CGDListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CGDListVC.xib; sourceTree = "<group>"; };
E0EFB9CD2493189D005FB0CD /* PurchaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchaseModel.swift; sourceTree = "<group>"; };
E0F1BE4624692379003015B2 /* ItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; };
E0F1BE4724692379003015B2 /* ItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ItemCell.xib; sourceTree = "<group>"; };
E0F3C2C924590C86006F0D1F /* XinZengAndBianJiKeHuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XinZengAndBianJiKeHuViewController.swift; sourceTree = "<group>"; };
......@@ -1671,6 +1681,7 @@
E09B03A92445B09200211A51 /* Model */ = {
isa = PBXGroup;
children = (
E0EFB9CC24931877005FB0CD /* PurchaseModel */,
F9697240248F6F550010D39B /* VendorModel */,
E0AA3A85248F3C1B00CBFC27 /* StatisticsModel */,
E0571C68248DC5CD00E85711 /* AdrModel */,
......@@ -1736,6 +1747,7 @@
E09F4C9A2452BEA000BE033D /* 寄派方式 */,
E0B94620245671AD00FBEC9A /* 代客下单(购物) */,
E042F72B245272AC00CDFA12 /* 代客下单(货运) */,
E0EFB9C324930BEE005FB0CD /* 采购单列表 */,
F961D2722450373B007FBE70 /* 订单列表 */,
E0F97B05245161E6001BD600 /* 商品详情 */,
F969BF17244EE42700C79953 /* 商品管理 */,
......@@ -2020,6 +2032,25 @@
path = "预售价格修改";
sourceTree = "<group>";
};
E0EFB9C324930BEE005FB0CD /* 采购单列表 */ = {
isa = PBXGroup;
children = (
E0EFB9C424930C0D005FB0CD /* CGDListViewController.swift */,
E0EFB9C524930C0D005FB0CD /* CGDListViewController.xib */,
E0EFB9C824930DD5005FB0CD /* CGDListVC.swift */,
E0EFB9C924930DD5005FB0CD /* CGDListVC.xib */,
);
path = "采购单列表";
sourceTree = "<group>";
};
E0EFB9CC24931877005FB0CD /* PurchaseModel */ = {
isa = PBXGroup;
children = (
E0EFB9CD2493189D005FB0CD /* PurchaseModel.swift */,
);
path = PurchaseModel;
sourceTree = "<group>";
};
E0F97B05245161E6001BD600 /* 商品详情 */ = {
isa = PBXGroup;
children = (
......@@ -2760,6 +2791,7 @@
E013D7892484B1B90092DE46 /* CRKXiangQVC.xib in Resources */,
E0A409C92464010D00CFF109 /* FirstCell.xib in Resources */,
E0EABAE82487748500F6CA8D /* NewSelectWarehouseVC.xib in Resources */,
E0EFB9CB24930DD5005FB0CD /* CGDListVC.xib in Resources */,
E00E48C32457C0D600F16545 /* XuanZeShangPinViewController.xib in Resources */,
F9023F6A2449A50900DD5A63 /* TitleContentCell.xib in Resources */,
F956D5A5246A2D9C003FF510 /* Feature in Resources */,
......@@ -2826,6 +2858,7 @@
F95A9ED9245520E500867849 /* OrderListVC.xib in Resources */,
E099B589246BF8FA009F587F /* OrderDViewController.xib in Resources */,
E0BE8A91245A9B9600E80134 /* YingFuZhangKuanCell.xib in Resources */,
E0EFB9C724930C0D005FB0CD /* CGDListViewController.xib in Resources */,
E02DDD9A24501A5B00ABB707 /* DelGuiGeCell.xib in Resources */,
F971D7B3248B6432007F1619 /* address_new.json in Resources */,
E00D85E8244561FE00F5F816 /* Preview Assets.xcassets in Resources */,
......@@ -3004,6 +3037,7 @@
F93615DD2480B693004187F9 /* WorkcenterIndexModel.swift in Sources */,
F95567A72453DA86009674AB /* WarehoseMangementListVC.swift in Sources */,
F933F6CF2452C68B00189561 /* PKHUDErrorView.swift in Sources */,
E0EFB9CE2493189D005FB0CD /* PurchaseModel.swift in Sources */,
F933C42E2484A66C0058940C /* WorkTestModel.swift in Sources */,
F933F6C42452C68B00189561 /* PKHUD.swift in Sources */,
E0F97B102451728D001BD600 /* AddGuiGeCell.swift in Sources */,
......@@ -3039,6 +3073,7 @@
F9531F412465108800724BEE /* JXPhotoBrowserView.swift in Sources */,
F956D5AB246A2D9C003FF510 /* LMNNumberingLine.m in Sources */,
F96E9D5B246656A700B5B94A /* HGImageCollectionViewCell.swift in Sources */,
E0EFB9C624930C0D005FB0CD /* CGDListViewController.swift in Sources */,
E0D197C02448431C002B080C /* BabyCentralManager.m in Sources */,
F956D5A9246A2D9C003FF510 /* LMNLineChain.m in Sources */,
E030DF362485DD3E002764D3 /* NewRKCell.swift in Sources */,
......@@ -3224,6 +3259,7 @@
E02DDD9924501A5B00ABB707 /* DelGuiGeCell.swift in Sources */,
E0CC847E24823602009B1FE9 /* WarehouseIoListModel.swift in Sources */,
E088CC932447124D000DAA8A /* BindViewController.swift in Sources */,
E0EFB9CA24930DD5005FB0CD /* CGDListVC.swift in Sources */,
E007B1D8248F7276004D14CC /* CGDCell.swift in Sources */,
E0B9461E24566B3100FBEC9A /* TitleAndTFAndBtnCell.swift in Sources */,
E042F74324529B7B00CDFA12 /* JiTuoWuXinXiView.swift in Sources */,
......@@ -3415,7 +3451,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = GeliBusinessPlatform/GeliBusinessPlatform.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.21;
CURRENT_PROJECT_VERSION = 1.22;
DEFINES_MODULE = NO;
DEVELOPMENT_ASSET_PATHS = "\"GeliBusinessPlatform/Preview Content\"";
DEVELOPMENT_TEAM = K48346UACH;
......@@ -3460,7 +3496,7 @@
"$(PROJECT_DIR)/GeliBusinessPlatform/Define/融云",
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/JPush/Lib",
);
MARKETING_VERSION = 1.2.1;
MARKETING_VERSION = 1.3;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -3547,7 +3583,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = GeliBusinessPlatform/GeliBusinessPlatform.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.21;
CURRENT_PROJECT_VERSION = 1.22;
DEFINES_MODULE = NO;
DEVELOPMENT_ASSET_PATHS = "\"GeliBusinessPlatform/Preview Content\"";
DEVELOPMENT_TEAM = K48346UACH;
......@@ -3592,7 +3628,7 @@
"$(PROJECT_DIR)/GeliBusinessPlatform/Define/融云",
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/JPush/Lib",
);
MARKETING_VERSION = 1.2.1;
MARKETING_VERSION = 1.3;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......
......@@ -24,7 +24,7 @@ import ESTabBarController_swift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarControllerDelegate, JPUSHRegisterDelegate{
......@@ -40,7 +40,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
}
setting_Jpush(application: application, launchOptions: launchOptions)
UIApplication.shared.applicationIconBadgeNumber = 0
return true
}
func setting_Jpush(application:UIApplication,launchOptions:[UIApplication.LaunchOptionsKey: Any]?) {
......@@ -82,7 +82,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
//IOS 12
func jpushNotificationCenter(_ center: UNUserNotificationCenter!, openSettingsFor notification: UNNotification!) {
if notification != nil && (notification.request.trigger?.isKind(of: UNPushNotificationTrigger.self))! {
//从通知界面直接进入应用
let userInfo = notification?.request.content.userInfo
......@@ -91,8 +91,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
//从通知设置界面进入应用
let userInfo = notification?.request.content.userInfo
print("1-11-",userInfo as Any)
}
}
}
//IOS 10
func jpushNotificationCenter(_ center: UNUserNotificationCenter!, willPresent notification: UNNotification!, withCompletionHandler completionHandler: ((Int) -> Void)!) {
......@@ -111,71 +111,72 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
JPUSHService.handleRemoteNotification(userInfo)
//点击都走这
print("3--",userInfo as Any)
switch tabBarC.selectedIndex {
case 0:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification0"), object: nil, userInfo: userInfo)
break
case 1:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification1"), object: nil, userInfo: userInfo)
break
case 2:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification2"), object: nil, userInfo: userInfo)
break
case 3:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification3"), object: nil, userInfo: userInfo)
break
case 4:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification4"), object: nil, userInfo: userInfo)
break
default:
break
let dict = userInfo as NSDictionary
let num = dict["type"] as! NSString
if num.integerValue == 1 {
tabBarC.selectedIndex = 0
}else{
switch tabBarC.selectedIndex {
case 0:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification0"), object: nil, userInfo: userInfo)
break
case 1:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification1"), object: nil, userInfo: userInfo)
break
case 2:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification2"), object: nil, userInfo: userInfo)
break
case 3:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification3"), object: nil, userInfo: userInfo)
break
case 4:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "jpushServiceNotification4"), object: nil, userInfo: userInfo)
break
default:
break
}
}
}
}
completionHandler()
}
//监测通知授权状态返回的结果
//监测通知授权状态返回的结果
func jpushNotificationAuthorization(_ status: JPAuthorizationStatus, withInfo info: [AnyHashable : Any]!) {
}
//MARK:--成功登录并反馈
func successLogin() {
addTabBarVcs(isAgain: true)
}
//MARK:--退出登录并反馈
@objc func popLogout() {
addLoginVc(isAgain: true)
}
//MARK:--loginVC
func addLoginVc (isAgain:Bool){
let vc = LoginViewController()
vc.delegate = self
let contentView = vc
//
// let vc = PersonCenterViewController()
// let contentView = vc
//MARK:--成功登录并反馈
func successLogin() {
addTabBarVcs(isAgain: true)
}
//MARK:--退出登录并反馈
@objc func popLogout() {
addLoginVc(isAgain: true)
}
//MARK:--loginVC
func addLoginVc (isAgain:Bool){
let vc = LoginViewController()
vc.delegate = self
let contentView = vc
if isAgain {
let transtition = CATransition()
transtition.duration = 0.5
transtition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
UIApplication.shared.keyWindow?.layer.add(transtition, forKey: "animation")
let rootV = NavViewController(rootViewController: contentView)
UIApplication.shared.keyWindow?.rootViewController = rootV
}else{
let window = UIWindow.init(frame: UIScreen.main.bounds)
self.window = window
let rootV = NavViewController(rootViewController: contentView)
self.window!.rootViewController = rootV;
if isAgain {
let transtition = CATransition()
transtition.duration = 0.5
transtition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
UIApplication.shared.keyWindow?.layer.add(transtition, forKey: "animation")
let rootV = NavViewController(rootViewController: contentView)
UIApplication.shared.keyWindow?.rootViewController = rootV
}else{
let window = UIWindow.init(frame: UIScreen.main.bounds)
self.window = window
let rootV = NavViewController(rootViewController: contentView)
self.window!.rootViewController = rootV;
self.window!.makeKeyAndVisible()
}
self.window!.makeKeyAndVisible()
}
}
func application(_ application: UIApplication, handleOpen url: URL) -> Bool {
......@@ -216,7 +217,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
UIApplication.shared.applicationIconBadgeNumber = 0
}
func applicationDidEnterBackground(_ application: UIApplication) {
......@@ -237,7 +238,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
// Saves changes in the application's managed object context before the application terminates.
}
//MARK:--tabbarVCs
weak var tabBarC:ESTabBarController!
func addTabBarVcs (isAgain:Bool) {
......@@ -252,10 +253,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
tabBarC = tabBarController
let v1 = OrderListViewController()
let v2 = GoodsManageListVC()
let v3 = WorkCViewController()
let v4 = WarehoseMangementListVC()
let v5 = PersonCenterViewController()
......@@ -264,7 +265,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
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"))
v5.tabBarItem = ESTabBarItem.init(ExampleBouncesContentView(), title: "个人中心", image: UIImage(named: "tab_btn_geren_nor"), selectedImage: UIImage(named: "tab_btn_geren_hig"))
tabBarController.viewControllers = [v1, v2, v3, v4, v5]
tabBarController.selectedIndex = 2
......@@ -284,11 +285,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
window.rootViewController = rootV;
self.window = window
window.makeKeyAndVisible()
}
NotificationCenter.default.addObserver(self, selector: #selector(changgeTabItem(notion:)), name: NSNotification.Name(rawValue: "changgeTabItem"), object: nil)
}
//MARK:--切换tab
@objc func changgeTabItem(notion:Notification) {
......@@ -300,179 +300,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
print(viewController)
}
}
////
//// AppDelegate.swift
//// GeliBusinessPlatform
////
//// Created by junye lu on 2020/4/14.
//// Copyright © 2020 junye lu. All rights reserved.
////
//import UIKit
////import RongIMKit
//
//
//@UIApplicationMain
//class AppDelegate: UIResponder,UIApplicationDelegate,UNUserNotificationCenterDelegate{
//
//
//
// func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// // Override point for customization after application launch.
// setting_Jpush(application: application, launchOptions: launchOptions)
//
//
// return true
// }
// func setting_Jpush(application:UIApplication,launchOptions:[UIApplication.LaunchOptionsKey: Any]?) {
//
// if #available(iOS 10.0, *){
// let entiity = JPUSHRegisterEntity()
// entiity.types = Int(UNAuthorizationOptions.alert.rawValue |
// UNAuthorizationOptions.badge.rawValue |
// UNAuthorizationOptions.sound.rawValue)
//// JPUSHService.register(forRemoteNotificationConfig: entiity, delegate: self)
// } else if #available(iOS 8.0, *) {
// let types = UIUserNotificationType.badge.rawValue |
// UIUserNotificationType.sound.rawValue |
// UIUserNotificationType.alert.rawValue
// JPUSHService.register(forRemoteNotificationTypes: types, categories: nil)
// }else {
// let type = UIRemoteNotificationType.badge.rawValue |
// UIRemoteNotificationType.sound.rawValue |
// UIRemoteNotificationType.alert.rawValue
// JPUSHService.register(forRemoteNotificationTypes: type, categories: nil)
// }
//
// // 根据环境的不同,设置不同的apsForProduction值,具体看下面参数说明
// JPUSHService.setup(withOption: launchOptions,
// appKey: "3ecbdeacab51eb48e1219a96",
// channel: "App Store",
// apsForProduction: true)
//
// //注册别名
//
//
// }
// func jpushNotificationCenter(_ center: UNUserNotificationCenter!, openSettingsFor notification: UNNotification?) {
// _ = notification?.request.content.userInfo
// }
//
// func jpushNotificationCenter(_ center: UNUserNotificationCenter!, willPresent notification: UNNotification!, withCompletionHandler completionHandler: ((Int) -> Void)!) {
// let userInfo = notification.request.content.userInfo
// if (notification.request.trigger?.isKind(of: UNPushNotificationTrigger.self))!{
// JPUSHService.handleRemoteNotification(userInfo)
// }
// 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
// if (response.notification.request.trigger?.isKind(of: UNPushNotificationTrigger.self))!{
// JPUSHService.handleRemoteNotification(userInfo)
// jpushLocationNotic(userInfo: userInfo as NSDictionary)
// }
// completionHandler()
// }
// func jpushLocationNotic(userInfo: NSDictionary) {
//
//
// }
// //监测通知授权状态返回的结果
// func jpushNotificationAuthorization(_ status: JPAuthorizationStatus, withInfo info: [AnyHashable : Any]!) {
// }
//
//
// func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
// //TODO: 注册失败后的结果, 可以在这里记录失败结果, 以后再伺机弹框给用户打开通知
// }
// // 注册deviceToken
//
// func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
//// JPUSHService.registerDeviceToken(deviceToken)
//
// }
// // 接受数据
// func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
// print("1",userInfo)
//// JPUSHService.handleRemoteNotification(userInfo)
// completionHandler(.newData)
//
// }
//
// // 接受数据
// func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {
// print("2",userInfo)
//// JPUSHService.handleRemoteNotification(userInfo)
// }
//
//
// // 进入前台的时候,清空角标
// func applicationWillEnterForeground(_ application: UIApplication) {
// UIApplication.shared.applicationIconBadgeNumber = 0
// }
// func applicationDidBecomeActive(_ application: UIApplication) {
// // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
// UIApplication.shared.applicationIconBadgeNumber = 0
//// JPUSHService.setBadge(0)
//
// }
// // MARK: UISceneSession Lifecycle
//
// func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// // Called when a new scene session is being created.
// // Use this method to select a configuration to create the new scene with.
// return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
// }
//
// func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// // Called when the user discards a scene session.
// // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
// }
//
// // var RY_App_Key = "3argexb63sxae"
//
// func RCINMC (){
// // RCIM.shared()?.initWithAppKey(RY_App_Key)
// //
// // registerNotification(application)
// // RCIMClient.shared()?.connect(withToken: "SMJo9B9AUTIHHcHCuZq8soPnFqzfPZJIh7xoVOlRtu8=@ta3m.cn.rongnav.com;ta3m.cn.rongcfg.com", success: { (userId) in
// // print("userid = \(userId)")
// // }, error: { (status) in
// // print("status = \(status)")
// // }, tokenIncorrect: {
// // print("错误")
// // })
//
// //didRegisterForRemoteNotificationsWithDeviceToken
// //// RCIMClient.shared()?.setDeviceTokenData(deviceToken)
//
// }
//}
//
//extension AppDelegate{
//
//
// func registerNotification(_ application: UIApplication) {
// if #available(iOS 10.0, *) {
// let center = UNUserNotificationCenter.current()
// center.delegate = self
// center.requestAuthorization(options: [.alert, .sound, .badge]) { (granted: Bool, error: Error?) in
// DispatchQueue.main.async {
// if granted { application.registerForRemoteNotifications() }
// }
// }
// } else {
// let settings = UIUserNotificationSettings(types: [.alert, .sound, .badge], categories: nil)
// application.registerForRemoteNotifications()
// application.registerUserNotificationSettings(settings)
// }
//
// }
//}
//
//
{
"images" : [
{
"filename" : "upapptop.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "upapptop@2x.png",
"filename" : "top@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "upapptop@3x.png",
"filename" : "top@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -27,13 +27,12 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址
//test
let SERVERCE_ImageHost = "https://z.gelifood.com/"
let SERVERCE_HOST = "https://z.gelifood.com/admin/"
//let SERVERCE_ImageHost = "https://zx.gelifood.com/"
//let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
//let SERVERCE_ImageHost = "https://z.gelifood.com/"
//let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let SERVERCE_ImageHost = "https://zx.gelifood.com/"
let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
//online
//let SERVERCE_ImageHost = "https://api.laigewan.com/upload/images/"
//let SERVERCE_HOST = "http://a.gelifood.com/apia"
//视图常量
let IS_IPHONE_X = __CGSizeEqualToSize(CGSize(width: 375.0, height: 812.0),UIScreen.main.bounds.size ) || __CGSizeEqualToSize(CGSize(width: 812.0, height: 375.0),UIScreen.main.bounds.size)||__CGSizeEqualToSize(CGSize(width: 414.0, height: 896.0),UIScreen.main.bounds.size ) || __CGSizeEqualToSize(CGSize(width: 896.0, height: 414.0),UIScreen.main.bounds.size)
......@@ -295,6 +294,16 @@ func dayAndTimeByDouble (sender : Double ) -> String {
dformatter.dateFormat = "yyyy.MM.dd HH:mm"
return dformatter.string(from: data)
}
func dateConvertString(date:Date, dateFormat:String="yyyy-MM-dd") -> String {
let timeZone = TimeZone.init(identifier: "UTC")
let formatter = DateFormatter()
formatter.timeZone = timeZone
formatter.locale = Locale.init(identifier: "zh_CN")
formatter.dateFormat = dateFormat
let date = formatter.string(from: date)
return date.components(separatedBy: " ").first!
}
//MARK: -- 格式化数字
func formatShowNumber(value:String) -> String {
if value.isEmpty {
......@@ -349,6 +358,14 @@ func getDicFromJSONString(jsonString:String) ->Dictionary<String,Any>{
//MARK: - 获取系统当前时间
func getTimeDayNow()->String{
let date = Date()
let timeFormatter = DateFormatter()
timeFormatter.dateFormat = "yyyy-MM-dd"
return timeFormatter.string(from: date) as String
}
func getTimeNow()->String{
let date = Date()
......
......@@ -146,5 +146,9 @@
<string>Vender/vendorList</string>
<key>新增采购单</key>
<string>Purchase/purchaseOrderAdd</string>
<key>采购单列表</key>
<string>Purchase/purchaseOrderList</string>
<key>采购单详情</key>
<string>Purchase/purchaseOrderDetail</string>
</dict>
</plist>
......@@ -12,10 +12,10 @@ import SwiftyJSON
import ObjectMapper
//MARK:--供应商列表 +详情
/* 说明:供应商信息在列表中已经全部列出,详情功能拿列表数据即可
//params-key(
//user_token(验证token)
//ven_id 供应商id
//purchase_time 采购时间,时间戳格式
//params-key(
//user_token(验证token)
//ven_id 供应商id
//purchase_time 采购时间,时间戳格式
purchaser 采购人
type 采购单类型:1临时采购,2固定采购
remarks 采购订单备注
......@@ -29,7 +29,7 @@ import ObjectMapper
unit 单位
price 价格(售价)
amount 采购价
*/
*/
func purchaseOrderAdd(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("新增采购单", params, { (rep:DataResponse<UpDataModel>) in
}, success: { (data) in
......@@ -38,3 +38,36 @@ func purchaseOrderAdd(_ params:[String:Any],success:@escaping (_ res:Any)->(),fa
failture(error)
}
}
//MARK:--采购单列表
/* 说明:供应商信息在列表中已经全部列出,详情功能拿列表数据即可
//params-key(
//user_token(验证token)
page 分页
keyword 搜索关键词
order_status 订单状态(1未审核,2审核通过,3审核不通过,4已完成)
*/
func purchaseOrderList(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("采购单列表", params, { (rep:DataResponse<PurchaseOrderListModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//MARK:--采购单详情
/* 说明:供应商信息在列表中已经全部列出,详情功能拿列表数据即可
//params-key(
//user_token(验证token)
po_id 采购单id
*/
func purchaseOrderDetail(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("采购单详情", params, { (rep:DataResponse<PurchaseOrderDetailModel>) in
}, success: { (data) in
success(data)
}) { (error) in
failture(error)
}
}
//
// PurchaseModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/12.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
import ObjectMapper
//获取统计+权限
class PurchaseOrderListModel: Mappable {
var code:Int?
var message : String?
var data :Array<PurchaseOrderListDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class PurchaseOrderListDataModel: Mappable {
var po_id:Int? //采购单id
var po_no : String? //采购单号
var ven_id :Int? //供应商id
var total_num:Int? //采购总数量
var purchaser : String? //采购人
var total_amount :String? //采购总金额
var pay_status:Int? //付款状态(1未付款,2已付款,3月结,4欠款)
var pay_type : Int? //支付类型(0未支付,1现金,2转账(私),3转账(公),4转账(微信),5转账(支付宝))
var order_status :Int? //订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
var old_order_status:Int?//订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
var push_status : Int? //入库状态(1未入库,2部分入库,3已入库)
var user_name :String?//制单人
var type:Int?//采购单类型(1临时采购,2固定采购)
var ven_name : String? //供应商名
var goods_res :Array<PurchaseOrderListDataItemsModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
po_id <- map["po_id"]
po_no <- map["po_no"]
ven_id <- map["ven_id"]
total_num <- map["total_num"]
purchaser <- map["purchaser"]
total_amount <- map["total_amount"]
pay_status <- map["pay_status"]
pay_type <- map["pay_type"]
order_status <- map["order_status"]
old_order_status <- map["old_order_status"]
push_status <- map["push_status"]
user_name <- map["user_name"]
type <- map["type"]
ven_name <- map["ven_name"]
goods_res <- map["goods_res"]
}
}
class PurchaseOrderListDataItemsModel: Mappable {
var pog_id:Int? //订单商品id
var po_id : Int?
var goods_id :Int?//商品id
var goods_name:String? //商品名
var sku_id : Int?
var sku_name :String? //规格值
var num:Int?//数量
var no_push_num : String? //未入库数量
var frozen_num :Int?
var amount:String? //采购单价
var price : String? //销售单价
var unit :String?//单位名称
var subtotal :String? //采购价小计
required init?( map: Map) {
}
func mapping(map: Map) {
pog_id <- map["pog_id"]
po_id <- map["po_id"]
goods_id <- map["goods_id"]
goods_name <- map["goods_name"]
sku_id <- map["sku_id"]
sku_name <- map["sku_name"]
num <- map["num"]
no_push_num <- map["no_push_num"]
frozen_num <- map["frozen_num"]
amount <- map["amount"]
price <- map["price"]
unit <- map["unit"]
subtotal <- map["subtotal"]
}
}
class PurchaseOrderDetailModel: Mappable {
var code:Int?
var message : String?
var data :PurchaseOrderDetailDataModel?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class PurchaseOrderDetailDataModel: Mappable {
var po_id:Int? //采购单id
var po_no : String?//采购单号
var type :Int?//采购单类型(1临时采购,2固定采购)
var remarks:String?//备注
var reason : String?//审核不通过原因
var ven_id :Int?
var purchase_time:Int? //采购时间
var user_name : String? //制单人
var pay_status :Int? //付款状态(1未付款,2已付款,3月结,4欠款)
var pay_type:Int? //支付类型(0未支付,1现金,2转账(私),3转账(公),4转账(微信),5转账(支付宝))
var purchaser : String? //采购人
var push_status :Int? //入库状态(1未入库,2部分入库,3已入库)
var order_status:Int? //订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
var ven_name : String?//供应商名
var pay_status_cn :String?
var pay_type_cn :String?
var order_status_cn :String?
var goods_res:Array<PurchaseOrderDetailDataResModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
po_id <- map["po_id"]
po_no <- map["po_no"]
type <- map["type"]
remarks <- map["remarks"]
reason <- map["reason"]
ven_id <- map["ven_id"]
purchase_time <- map["purchase_time"]
user_name <- map["user_name"]
pay_status <- map["pay_status"]
pay_type <- map["pay_type"]
purchaser <- map["purchaser"]
push_status <- map["push_status"]
order_status <- map["order_status"]
ven_name <- map["ven_name"]
pay_status_cn <- map["pay_status_cn"]
pay_type_cn <- map["pay_type_cn"]
order_status_cn <- map["order_status_cn"]
goods_res <- map["goods_res"]
}
}
class PurchaseOrderDetailDataResModel: Mappable {
var pog_id:Int?//采购订单商品id
var po_id : Int?
var goods_id :Int?//商品id
var goods_name:String?//商品名
var sku_id : Int?//规格id
var sku_name :String?//规格名
var num:Int?//采购数量
var no_push_num : Int? //未入库数量
var frozen_num :Int?
var amount:String? //采购单价
var price : String? //销售单价
var unit :String?//单位名称
var subtotal:String?//采购价小计
required init?( map: Map) {
}
func mapping(map: Map) {
pog_id <- map["pog_id"]
po_id <- map["po_id"]
goods_id <- map["goods_id"]
goods_name <- map["goods_name"]
sku_id <- map["sku_id"]
sku_name <- map["sku_name"]
num <- map["num"]
no_push_num <- map["no_push_num"]
frozen_num <- map["frozen_num"]
amount <- map["amount"]
price <- map["price"]
unit <- map["unit"]
subtotal <- map["subtotal"]
}
}
......@@ -11,6 +11,7 @@ protocol GeliAlertViewDelegate {
func sureGeliAlertViewAction(sender:UIButton)
}
class GeliAlertView: UIView {
@IBOutlet weak var tLbl: UILabel!
@IBOutlet weak var versionLbl: UILabel!
@IBOutlet weak var upAppIconV: UIImageView!
var contentView:UIView!
......@@ -25,7 +26,7 @@ class GeliAlertView: UIView {
print("左←边按钮响应")
if appStoreVersion.count != 0 {
//选择了该版本取消更新后不再提示
UserDefaults.standard.setValue(appStoreVersion, forKey: "appStoreVersion")
// UserDefaults.standard.setValue(appStoreVersion, forKey: "appStoreVersion")
}
self.removeFromSuperview()
}
......
......@@ -12,6 +12,7 @@
<connections>
<outlet property="leftBtn" destination="Dyd-7e-8BO" id="zeE-Lz-ROb"/>
<outlet property="rightBtn" destination="PtZ-E6-HsS" id="Emz-2g-FU4"/>
<outlet property="tLbl" destination="1Mm-My-nFR" id="23h-UJ-gOS"/>
<outlet property="tishiLbl" destination="iMI-qP-BVc" id="zAu-zu-3me"/>
<outlet property="titileLbl" destination="7p8-wL-wRa" id="Qvs-im-IUC"/>
<outlet property="upAppIconV" destination="iga-CE-Dxv" id="fMS-Eb-qv2"/>
......@@ -28,10 +29,10 @@
<color key="backgroundColor" name="提示视图背景色"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ac-ng-NSx" userLabel="tishiView">
<rect key="frame" x="72" y="369" width="270" height="158"/>
<rect key="frame" x="82.666666666666686" y="369" width="249" height="158"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7p8-wL-wRa">
<rect key="frame" x="15" y="25" width="240" height="42"/>
<rect key="frame" x="15" y="25" width="219" height="42"/>
<attributedString key="attributedText">
<fragment content="如忘记密码,请联系后台人员修改密码,请联系:">
<attributes>
......@@ -44,21 +45,21 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xhi-ml-JFj">
<rect key="frame" x="1" y="108" width="268" height="1"/>
<rect key="frame" x="1" y="108" width="247" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="xKu-GJ-32y"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="96c-u2-CE4">
<rect key="frame" x="134.66666666666666" y="109" width="1" height="48"/>
<rect key="frame" x="123.99999999999999" y="109" width="1" height="48"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="4IU-gD-Hxc"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iMI-qP-BVc">
<rect key="frame" x="82" y="77" width="106" height="21"/>
<rect key="frame" x="71.333333333333329" y="77" width="105.99999999999999" height="21"/>
<attributedString key="attributedText">
<fragment content="020-81338860">
<attributes>
......@@ -70,7 +71,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Dyd-7e-8BO">
<rect key="frame" x="0.0" y="109" width="134.66666666666666" height="49"/>
<rect key="frame" x="0.0" y="109" width="124" height="49"/>
<color key="tintColor" name="灰色字体颜色"/>
<state key="normal">
<attributedString key="attributedTitle">
......@@ -86,7 +87,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PtZ-E6-HsS">
<rect key="frame" x="135.66666666666663" y="109" width="134.33333333333337" height="49"/>
<rect key="frame" x="125" y="109" width="124" height="49"/>
<state key="normal">
<attributedString key="attributedTitle">
<fragment content="拨打">
......@@ -124,7 +125,7 @@
<constraint firstItem="96c-u2-CE4" firstAttribute="top" secondItem="xhi-ml-JFj" secondAttribute="bottom" id="ivg-2E-diS"/>
<constraint firstAttribute="trailing" secondItem="xhi-ml-JFj" secondAttribute="trailing" constant="1" id="kY1-00-Uv1"/>
<constraint firstItem="7p8-wL-wRa" firstAttribute="top" secondItem="4ac-ng-NSx" secondAttribute="top" constant="25" id="qu8-45-Xoy"/>
<constraint firstAttribute="width" constant="270" id="saF-rE-yPg">
<constraint firstAttribute="width" constant="249" id="saF-rE-yPg">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
......@@ -137,17 +138,23 @@
</userDefinedRuntimeAttributes>
</view>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="upapptop" translatesAutoresizingMaskIntoConstraints="NO" id="iga-CE-Dxv">
<rect key="frame" x="72" y="237" width="270" height="140"/>
<rect key="frame" x="82.333333333333329" y="237" width="249.33333333333337" height="140"/>
<constraints>
<constraint firstAttribute="height" constant="140" id="5oE-WZ-blx"/>
</constraints>
</imageView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="V1.0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Ht-ZM-hXV">
<rect key="frame" x="102" y="302" width="29.333333333333343" height="18"/>
<rect key="frame" x="112.33333333333333" y="302" width="29.333333333333329" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="发现新版本" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Mm-My-nFR">
<rect key="frame" x="106" y="277" width="92" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" name="白色背景色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
......@@ -156,8 +163,10 @@
<constraint firstItem="a7R-IF-Z00" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="PTB-f2-Mnu"/>
<constraint firstItem="4ac-ng-NSx" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="QP4-ne-Lh1"/>
<constraint firstAttribute="bottom" secondItem="a7R-IF-Z00" secondAttribute="bottom" id="XEP-Jo-d39"/>
<constraint firstItem="1Mm-My-nFR" firstAttribute="leading" secondItem="iga-CE-Dxv" secondAttribute="leading" constant="23.5" id="YXb-85-Y1c"/>
<constraint firstItem="6Ht-ZM-hXV" firstAttribute="top" secondItem="iga-CE-Dxv" secondAttribute="top" constant="65" id="ajH-AE-crc"/>
<constraint firstItem="4ac-ng-NSx" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="hTm-KA-r61"/>
<constraint firstItem="1Mm-My-nFR" firstAttribute="top" secondItem="iga-CE-Dxv" secondAttribute="top" constant="40" id="hlR-fi-Viu"/>
<constraint firstItem="iga-CE-Dxv" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="mnk-HB-1uY"/>
<constraint firstItem="4ac-ng-NSx" firstAttribute="top" secondItem="iga-CE-Dxv" secondAttribute="bottom" constant="-8" id="mxC-Jc-XxI"/>
<constraint firstItem="a7R-IF-Z00" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="t7C-DT-AP2"/>
......@@ -183,5 +192,8 @@
<namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -2,6 +2,7 @@
<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>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
......@@ -84,7 +85,7 @@
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F70-8y-cQB">
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F70-8y-cQB">
<rect key="frame" x="340" y="40" width="20" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="1ok-jH-s1a"/>
......@@ -93,15 +94,6 @@
<state key="normal" image="daixuan"/>
<state key="selected" image="yuxuan"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ljV-Gc-YnI">
<rect key="frame" x="315" y="0.0" width="60" height="100"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="Tf0-Ai-D5X"/>
</constraints>
<connections>
<action selector="btnClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="KpV-b1-9i2"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ec0-pY-RFD">
<rect key="frame" x="15" y="99" width="360" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
......@@ -139,16 +131,13 @@
<constraint firstAttribute="bottom" secondItem="ec0-pY-RFD" secondAttribute="bottom" id="ARP-s3-aXE"/>
<constraint firstAttribute="trailing" secondItem="ec0-pY-RFD" secondAttribute="trailing" id="AbD-K6-l9Y"/>
<constraint firstItem="ec0-pY-RFD" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="DPE-Fy-OaG"/>
<constraint firstItem="ljV-Gc-YnI" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="GCg-gX-SYB"/>
<constraint firstItem="k7A-Qs-Puc" firstAttribute="leading" secondItem="WR0-yV-WjT" secondAttribute="trailing" constant="10" id="Jdc-Ll-m3r"/>
<constraint firstAttribute="trailingMargin" secondItem="vLg-1W-z2S" secondAttribute="trailing" constant="15" id="KOW-Bj-cOn"/>
<constraint firstItem="YvY-yP-Zr7" firstAttribute="leading" secondItem="WR0-yV-WjT" secondAttribute="trailing" constant="10" id="PZD-FR-vo1"/>
<constraint firstItem="5Vq-Jz-GTW" firstAttribute="centerY" secondItem="YvY-yP-Zr7" secondAttribute="centerY" id="WUM-7S-6Tq"/>
<constraint firstAttribute="bottom" secondItem="ljV-Gc-YnI" secondAttribute="bottom" id="WeE-ry-Kge"/>
<constraint firstItem="QI3-nS-9hL" firstAttribute="leading" secondItem="llc-wu-Qjo" secondAttribute="trailing" constant="4" id="aOI-Jy-yEO"/>
<constraint firstItem="WR0-yV-WjT" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="bCO-YL-X4d"/>
<constraint firstItem="vLg-1W-z2S" firstAttribute="leading" secondItem="WR0-yV-WjT" secondAttribute="trailing" constant="10" id="fR7-J1-A4f"/>
<constraint firstAttribute="trailing" secondItem="ljV-Gc-YnI" secondAttribute="trailing" id="gvq-yK-M0h"/>
<constraint firstItem="llc-wu-Qjo" firstAttribute="centerY" secondItem="k7A-Qs-Puc" secondAttribute="centerY" id="kfs-Cj-xiI"/>
<constraint firstItem="WR0-yV-WjT" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="kra-Qt-lhu"/>
<constraint firstItem="F70-8y-cQB" firstAttribute="centerY" secondItem="WR0-yV-WjT" secondAttribute="centerY" id="p4k-Zt-rJK"/>
......
......@@ -94,6 +94,8 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
}
//MARK:--jpushServiceNotification
@objc func jpushServiceNotification(notion:Notification) {
let dict = notion.userInfo! as NSDictionary
print("123123 ==",dict.allKeys)
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
......@@ -111,6 +113,7 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
//MARK:--跳转消息中心
@IBAction func toMsgCenterAction(_ sender: Any) {
print("跳转消息中心")
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
......
......@@ -62,6 +62,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
}
//MARK:--jpushServiceNotification
@objc func jpushServiceNotification(notion:Notification) {
let dict = notion.userInfo! as NSDictionary
print("123123 ==",dict.allKeys)
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
......
......@@ -16,6 +16,7 @@ protocol XuanZeShangPinViewControllerDelegate {
class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,XuanZeShangPinCellDelegate,UISearchBarDelegate,SearchBarViewDelegate,UITextFieldDelegate{
var isCG = false
var searchV : SearchBarView? = nil
var delegate:XuanZeShangPinViewControllerDelegate?
var is_adsale:Int?
......@@ -373,21 +374,23 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
func XuanZeShangPinCellBtnClick(index:IndexPath) {
let model = datas[index.row]
if isYuShou{//预售
if model.adsale_inventory == 0 {
HUD.flash(.label("库存为0,无法下单"),delay: 1.2)
return
if isCG == false {
if model.adsale_inventory == 0 {
HUD.flash(.label("库存为0,无法下单"),delay: 1.2)
return
}
}
idx = index
selectArr.removeAll()
selectArr.append(model)
}else{//非预售
let data = datas[index.row]
if data.inventory == 0 {
HUD.flash(.label("库存为0,无法下单"),delay: 1.2)
return
if isCG == false {
if data.inventory == 0 {
HUD.flash(.label("库存为0,无法下单"),delay: 1.2)
return
}
}
let idx = selectArr.firstIndex { (model) -> Bool in
return (data.sku_id == model.sku_id)
}
......
......@@ -81,10 +81,10 @@
</connections>
</button>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yTm-Gk-jr3">
<rect key="frame" x="315" y="0.0" width="60" height="100"/>
<rect key="frame" x="315" y="0.0" width="60" height="99"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q1A-kf-Vam">
<rect key="frame" x="25" y="40" width="20" height="20"/>
<rect key="frame" x="25" y="39.5" width="20" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="AeE-UX-Ikx"/>
<constraint firstAttribute="width" constant="20" id="Brp-ot-2Vd"/>
......@@ -121,7 +121,7 @@
<constraint firstItem="W6d-cJ-9O2" firstAttribute="leading" secondItem="obp-L0-Hyo" secondAttribute="trailing" constant="10" id="hbe-0C-ipP"/>
<constraint firstAttribute="trailing" secondItem="W6d-cJ-9O2" secondAttribute="trailing" constant="15" id="hrs-VD-yxZ"/>
<constraint firstItem="yTm-Gk-jr3" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="oYu-bO-2AH"/>
<constraint firstAttribute="bottom" secondItem="yTm-Gk-jr3" secondAttribute="bottom" id="tsf-sQ-CMj"/>
<constraint firstAttribute="bottom" secondItem="yTm-Gk-jr3" secondAttribute="bottom" constant="1" id="tsf-sQ-CMj"/>
<constraint firstItem="gCZ-v5-18O" firstAttribute="leading" secondItem="obp-L0-Hyo" secondAttribute="trailing" constant="10" id="vJb-Xu-Cf6"/>
<constraint firstAttribute="bottom" secondItem="PwA-w2-l4g" secondAttribute="bottom" id="xUg-Hr-ZwM"/>
</constraints>
......
......@@ -89,6 +89,8 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
//MARK:--jpushServiceNotification
@objc func jpushServiceNotification(notion:Notification) {
let dict = notion.userInfo! as NSDictionary
print("123123 ==",dict.allKeys)
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
......
......@@ -70,7 +70,8 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
self.navigationController?.popViewController(animated: true)
}
@objc func submitAction(){
if adrStr!.count > 0 {
if adrStr != nil {
delegate?.SJMapViewControllerSelectArd(adr: adrStr!)
self.navigationController?.popViewController(animated: true)
}else{
......@@ -165,6 +166,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
cell.imgView.isHidden = true
if indexPath == idx {
cell.imgView.isHidden = false
adrStr = poi.name
}
return cell
......@@ -212,8 +214,8 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
let btn2 = UIButton()
btn2.setTitle("取消", for: .normal)
btn2.backgroundColor = UIColor.clear
btn2.setTitleColor(UIColor.white, for: .normal)
btn2.backgroundColor = UIColor(named: "灰色分界线")
btn2.setTitleColor(UIColor(named: "个人中心灰色字体"), for: .normal)
btn2.titleLabel?.font = UIFont.systemFont(ofSize: 13)
btn2.addTarget(self, action: #selector(backAction), for: .touchUpInside)
self.view.addSubview(btn2)
......
......@@ -45,6 +45,9 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
}
//MARK:--jpushServiceNotification
@objc func jpushServiceNotification(notion:Notification) {
let dict = notion.userInfo! as NSDictionary
print("123123 ==",dict.allKeys)
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
......@@ -516,6 +519,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
return
case 92: //采购订单管理
HUD.flash(.label("敬请期待"),delay: 1.2)
// let vc = CGDListViewController()
// self.navigationController?.pushViewController(vc, animated: true)
return
case 93: //供应商管理
// HUD.flash(.label("敬请期待"),delay: 1.2)
......@@ -614,6 +619,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.upAppIconV.isHidden = false
alertView.versionLbl.isHidden = false
alertView.tLbl.isHidden = false
alertView.versionLbl.text = "V" + json["results"][0]["version"].string!
alertView.delegate = self;
alertView.tishiLbl.text = ""
......@@ -631,6 +637,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.upAppIconV.isHidden = false
alertView.versionLbl.isHidden = false
alertView.tLbl.isHidden = false
alertView.versionLbl.text = "V" + json["results"][0]["version"].string!
alertView.delegate = self;
alertView.tishiLbl.text = ""
......
......@@ -2,6 +2,7 @@
<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>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
......
......@@ -11,6 +11,7 @@ import SwiftDate
class ShouZhiTongJiViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource, WorkSelectTimeViewDelegate {
@IBOutlet weak var dayLbl: UILabel!
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var bottomListView: UITableView!
@IBOutlet weak var topListView: UITableView!
......@@ -25,7 +26,7 @@ class ShouZhiTongJiViewController: BaseViewController,UITableViewDelegate,UITabl
navbar.title = "收支统计"
navbar.rightImg = UIImage.init(named: "ShouZhiTongJiDayEdit")
self.view.addSubview(navbar)
SetTopFrame(view: scrollView, height: fullScreenHeight - NavCGRect.height)
SetTopFrame(view: dayLbl, height:20)
loadData()
......@@ -43,6 +44,14 @@ class ShouZhiTongJiViewController: BaseViewController,UITableViewDelegate,UITabl
var topHolder = ["-","-"]
var bottomHolder = ["-","-","-","-","-","-","-","-"]
func loadData(){
print("abc == ",starTime)
let start = dateConvertString(date: starTime + 8.hours, dateFormat: "yyyy年MM月dd日")
let end = dateConvertString(date: endTime + 8.hours, dateFormat: "yyyy年MM月dd日")
if start == end {
dayLbl.text = " 日期统计区间: " + start
}else{
dayLbl.text = " 日期统计区间: " + start + " 至 " + end
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let star_time = Int(starTime.timeIntervalSince1970)
let end_time = Int(endTime.timeIntervalSince1970)
......
......@@ -12,6 +12,7 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ShouZhiTongJiViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="bottomListView" destination="8vs-I4-ukF" id="bKM-yV-LyJ"/>
<outlet property="dayLbl" destination="p0d-NN-J8P" id="Zju-1o-ieO"/>
<outlet property="scrollView" destination="E3n-cW-Crm" id="Qi6-93-OYR"/>
<outlet property="shouRuBigLbl" destination="iEY-JV-Blw" id="fVc-9a-Fpt"/>
<outlet property="shouRuSmallLbl" destination="L9v-9Q-LeQ" id="6A9-oU-qhD"/>
......@@ -27,7 +28,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E3n-cW-Crm">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8gf-fN-gOY">
<rect key="frame" x="0.0" y="0.0" width="375" height="733.5"/>
......@@ -61,7 +62,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=".00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L9v-9Q-LeQ">
<rect key="frame" x="109" y="57.5" width="25.5" height="21"/>
<rect key="frame" x="31" y="56.5" width="25.5" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="Y4E-zn-JUY"/>
</constraints>
......@@ -69,38 +70,26 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iEY-JV-Blw">
<rect key="frame" x="15" y="48.5" width="94" height="30"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iEY-JV-Blw">
<rect key="frame" x="15" y="48.5" width="16" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="z7D-wY-CHL"/>
</constraints>
<attributedString key="attributedText">
<fragment content="¥26260">
<attributes>
<color key="NSColor" name="标题字颜色"/>
<font key="NSFont" size="26" name="PingFangSC-Medium"/>
</attributes>
</fragment>
</attributedString>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="26"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JjA-y8-UvM">
<rect key="frame" x="203" y="48.5" width="94" height="30"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JjA-y8-UvM">
<rect key="frame" x="203" y="48.5" width="16" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="YZj-9p-Ddc"/>
</constraints>
<attributedString key="attributedText">
<fragment content="¥26260">
<attributes>
<color key="NSColor" name="标题字颜色"/>
<font key="NSFont" size="26" name="PingFangSC-Medium"/>
</attributes>
</fragment>
</attributedString>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="26"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=".00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2PW-1f-Ksw">
<rect key="frame" x="297" y="57.5" width="25.5" height="21"/>
<rect key="frame" x="219" y="56.5" width="25.5" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="WKE-q4-nIA"/>
</constraints>
......@@ -108,6 +97,13 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Rh-Lf-t1O">
<rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="c1R-4C-I9O"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
......@@ -116,22 +112,25 @@
<constraint firstItem="2PW-1f-Ksw" firstAttribute="centerY" secondItem="L9v-9Q-LeQ" secondAttribute="centerY" id="IfP-I7-Yxy"/>
<constraint firstItem="aMI-fA-zkI" firstAttribute="leading" secondItem="5tn-tg-Ex6" secondAttribute="trailing" constant="15" id="NMa-ef-mxR"/>
<constraint firstAttribute="bottom" secondItem="FZf-zb-vds" secondAttribute="bottom" id="ODk-9T-y52"/>
<constraint firstAttribute="trailing" secondItem="6Rh-Lf-t1O" secondAttribute="trailing" id="QlO-1B-FrE"/>
<constraint firstItem="2PW-1f-Ksw" firstAttribute="leading" secondItem="JjA-y8-UvM" secondAttribute="trailing" id="Tjb-B1-h1n"/>
<constraint firstItem="iEY-JV-Blw" firstAttribute="top" secondItem="5tn-tg-Ex6" secondAttribute="bottom" constant="15" id="UGp-TH-aGe"/>
<constraint firstItem="L9v-9Q-LeQ" firstAttribute="leading" secondItem="iEY-JV-Blw" secondAttribute="trailing" id="UO0-mn-KJU"/>
<constraint firstItem="aMI-fA-zkI" firstAttribute="centerY" secondItem="5tn-tg-Ex6" secondAttribute="centerY" id="VRz-uF-Zuu"/>
<constraint firstItem="5tn-tg-Ex6" firstAttribute="top" secondItem="04m-UH-iZ6" secondAttribute="top" constant="15" id="Vni-EF-dqd"/>
<constraint firstItem="iEY-JV-Blw" firstAttribute="leading" secondItem="04m-UH-iZ6" secondAttribute="leading" constant="15" id="Zaa-18-ZKk"/>
<constraint firstItem="6Rh-Lf-t1O" firstAttribute="leading" secondItem="04m-UH-iZ6" secondAttribute="leading" id="aFi-Ch-UEW"/>
<constraint firstItem="aMI-fA-zkI" firstAttribute="leading" secondItem="FZf-zb-vds" secondAttribute="trailing" constant="15" id="aal-uH-WWZ"/>
<constraint firstItem="JjA-y8-UvM" firstAttribute="leading" secondItem="FZf-zb-vds" secondAttribute="trailing" constant="15" id="cdA-Om-4h9"/>
<constraint firstItem="L9v-9Q-LeQ" firstAttribute="bottom" secondItem="iEY-JV-Blw" secondAttribute="bottom" id="lqJ-wd-7Xx"/>
<constraint firstItem="L9v-9Q-LeQ" firstAttribute="bottom" secondItem="iEY-JV-Blw" secondAttribute="bottom" constant="-1" id="lqJ-wd-7Xx"/>
<constraint firstItem="FZf-zb-vds" firstAttribute="top" secondItem="04m-UH-iZ6" secondAttribute="top" id="pFY-bf-ddU"/>
<constraint firstItem="6Rh-Lf-t1O" firstAttribute="top" secondItem="04m-UH-iZ6" secondAttribute="top" id="tZd-Cs-ut6"/>
<constraint firstItem="5tn-tg-Ex6" firstAttribute="leading" secondItem="04m-UH-iZ6" secondAttribute="leading" constant="15" id="tjk-LT-guW"/>
<constraint firstItem="FZf-zb-vds" firstAttribute="centerX" secondItem="04m-UH-iZ6" secondAttribute="centerX" id="xel-vF-p6E"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="更多收支明细详情请登陆新批发/新工厂系统后台查询" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ipV-0Q-5Iq">
<rect key="frame" x="15" y="108.5" width="262.5" height="15"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="更多收支详情请登录PC格利卖家工作台cms.gelifood.com/market查询" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ipV-0Q-5Iq">
<rect key="frame" x="15" y="108.5" width="350.5" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="zOh-zA-8ab"/>
</constraints>
......@@ -199,13 +198,26 @@
<viewLayoutGuide key="contentLayoutGuide" id="ceM-iS-PMd"/>
<viewLayoutGuide key="frameLayoutGuide" id="6NB-YZ-oFf"/>
</scrollView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p0d-NN-J8P">
<rect key="frame" x="0.0" y="0.0" width="375" height="20"/>
<color key="backgroundColor" name="白色背景色"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="yDv-s2-2jM"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="app底色"/>
<constraints>
<constraint firstItem="E3n-cW-Crm" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="4Ii-Cm-mIk"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="E3n-cW-Crm" secondAttribute="trailing" id="E3v-bW-Ciw"/>
<constraint firstItem="E3n-cW-Crm" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="GDB-DS-o3N"/>
<constraint firstItem="E3n-cW-Crm" firstAttribute="top" secondItem="p0d-NN-J8P" secondAttribute="bottom" id="GDB-DS-o3N"/>
<constraint firstItem="p0d-NN-J8P" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="MjH-nU-WzG"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="E3n-cW-Crm" secondAttribute="bottom" id="Xg6-0f-Oq0"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="p0d-NN-J8P" secondAttribute="trailing" id="xG3-xp-zg2"/>
<constraint firstItem="p0d-NN-J8P" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="z2l-Px-fve"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="130.40000000000001" y="131.78410794602701"/>
......@@ -218,15 +230,15 @@
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" 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>
......
......@@ -35,7 +35,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
"ven_id":vendor?.ven_id as Any,
"purchase_time":dayTime as Any,
"purchaser":cgName as Any,
"type":typeSelect! + 1 as Any,
"type":typeSelect + 1 as Any,
"remarks":"" as Any,
"is_apply":1 as Any,
"goods_info":goods_info as Any
......@@ -67,7 +67,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
typeSelect = selectNum
if typeSelect != nil && typeSelect != 10086 {
holderArr.insert(typeArr[typeSelect!], at: 3)
holderArr.insert(typeArr[typeSelect], at: 3)
holderArr.remove(at: 4)
listView.reloadData()
}
......@@ -98,7 +98,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
var dayTime:Int?
var vendor:VendorListDataModel?
var glSelectView:GLAlertSelectView?
var typeSelect:Int?
var typeSelect = 1
var cgName:String?
//MARK: - 提交审核
@IBAction func submitAction(_ sender: Any) {
......@@ -169,7 +169,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
}
timeSelectV.endDateByWork = Date()
timeSelectV.titleLbl.text = "请选择采购日期"
timeSelectV.delegate = self
self.view.window?.addSubview(timeSelectV)
......@@ -208,6 +208,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
print(timeStr,"采购日期",timeInterval)
dayTimeStr = timeStr
dayTime = Int(timeInterval)
listView.reloadData()
}
//MARK: - 添加商品
......@@ -216,6 +217,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
let vc = XuanZeShangPinViewController()
vc.delegate = self
vc.barTitle = "选择商品"
vc.isCG = true
self.navigationController?.pushViewController(vc, animated: true)
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......@@ -230,6 +232,9 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
let cell = tableView.dequeueReusableCell(withIdentifier: "CGDDayCell") as! CGDDayCell
if dayTimeStr.count > 0 {
cell.dayLbl.text = dayTimeStr
}else{
cell.dayLbl.text = getTimeDayNow()
dayTime = Date().timeStamp
}
return cell
}else{
......@@ -328,4 +333,13 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
listView.reloadData()
}
}
extension Date {
/// 获取当前 秒级 时间戳 - 10位
var timeStamp : Int {
let timeInterval: TimeInterval = self.timeIntervalSince1970
let timeStamp = Int(timeInterval)
return timeStamp
}
}
......@@ -305,6 +305,9 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let rowModel = self.dataArr[indexPath.row]
if rowModel.order_goods!.count > 4 {
return CGFloat(172 + (49 * 4))
}
return CGFloat(172 + (49 * rowModel.order_goods!.count))
}
......
......@@ -84,6 +84,8 @@ class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBa
}
//MARK:--jpushServiceNotification
@objc func jpushServiceNotification(notion:Notification) {
let dict = notion.userInfo! as NSDictionary
print("123123 ==",dict.allKeys)
let vc = MsgCenterViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
......@@ -271,6 +273,8 @@ class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBa
func colseAction() {
selectV = nil
}
//筛选
//MAKR:--调起搜索后添加个蒙版本
var blackBtnView:UIButton! = nil
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
......
//
// CGDListVC.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/12.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
import ViewAnimator //cell动效
class CGDListVC: BaseViewController , UITableViewDelegate, UITableViewDataSource, GeliAlertViewDelegate,CGDListCellDelegate{
var page : Int = 0
var isUpData = false
var keyword = ""
var orderStatus = 1
var datas:Array<PurchaseOrderListDataModel> = []
override func viewDidLoad() {
super.viewDidLoad()
switch self.title {
case "待审核":
orderStatus = 1
break
case "已通过":
orderStatus = 2
break
case "未通过":
orderStatus = 3
break
case "已完成":
orderStatus = 5
break
default:
break
}
setTabv()
// Do any additional setup after loading the view.
}
//MARK:--VC 初始化
convenience init(title: String) {
self.init(title: title, content: "")
}
init(title: String, content: String) {
super.init(nibName: nil, bundle: nil)
self.title = title
print("ttit===\(title)")
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//MARK: - CELL DELEGATE
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "CGDListCell") as! CGDListCell
let model = datas[indexPath.row]
cell.cgDataArr = model.goods_res
cell.nameLbl.text = model.purchaser!
cell.statusLbl.isHidden = true
var status = ""
if orderStatus == 2 {
cell.statusLbl.isHidden = false
switch model.push_status {
case 1:
status = "未付款"
break
case 2:
status = "已付款"
break
case 3:
status = "月结"
break
default:
status = "欠款"
break
}
cell.statusLbl.text = status
}
var count = 0
var amount:Float = 0
model.goods_res?.forEach({ (item) in
count += item.num!
let str = item.subtotal! as NSString
amount += str.floatValue
})
cell.countLbl.text = "\(count)"
cell.priceLbl.text = "\(amount)"
var btnStr:Array<String> = []
switch model.order_status {
//订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
case 1:
btnStr = ["修改信息","取消"]
break
case 2://入库状态(1未入库,2部分入库,3已入库)
switch model.push_status {
case 1:
btnStr = ["查看详情","入库",]
break
case 2:
btnStr = ["查看详情","撤销入库","补录入库"]
break
default:
btnStr = ["查看详情","撤销入库"]
break
}
break
case 3:
btnStr = ["查看详情"]
break
default:
btnStr = ["查看详情"]
break
}
cell.delegate = self
cell.setCGDBtnUI(arr: btnStr, index: indexPath.row)
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = datas[indexPath.row]
let vc = CGDXQVc()
vc.po_id = model.po_id
self.navigationController?.pushViewController(vc, animated: true)
}
//MARK: - 点击cell 按钮
func allBtnSubmit(sender: UIButton) {
print("cgd == ",sender.titleLabel!.text,sender.tag)
}
//MARK: - alertView delegate
func sureGeliAlertViewAction(sender: UIButton) {
}
//MARK:-- tablev 处理
var listView :UITableView!
var tableSearchV :UITableView! = nil
private let animations = [AnimationType.from(direction: .bottom, offset: 300*glscale)]
func setTabv() {
listView = UITableView()
view.addSubview(listView);
listView.snp.makeConstraints { (make) in
make.top.left.right.bottom.equalToSuperview()
}
listView.backgroundColor = UIColor.init(named: "app底色")
listView.delegate = self
listView.dataSource = self
listView.separatorStyle = .none
listView?.register(UINib(nibName: "CGDListCell", bundle: nil), forCellReuseIdentifier: "CGDListCell")
let footerTbV = UIView(frame: CGRect(x: 0, y: 0, width: view.frame.size.width, height: 15*glscale))
footerTbV.backgroundColor = UIColor.init(named: "app底色")
listView.tableFooterView = footerTbV
//下拉刷新相关设置
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()
}
//MARK:--加载数据
@objc func loadData(){
print("加载数据")
isUpData = true
page = 1
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let dic = ["user_token":UserToken as Any,"keyword":keyword as Any,"page":page as Any,"order_status":orderStatus as Any]
purchaseOrderList(dic, success: { (data) in
self.datas.removeAll()
let model = data as! PurchaseOrderListModel
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: {
})
if model.data?.count == 0 {
self.listView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.listView?.mj_footer?.endRefreshing()
}
}, completion: nil)
}) { (error) in
self.listView?.mj_header?.endRefreshing()
}
}
//MARK:--加载更多数据
@objc func loadMoreData(){
print("加载更多数据")
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let dic = ["user_token":UserToken as Any,"keyword":keyword as Any,"page":page as Any,"order_status":orderStatus as Any]
purchaseOrderList(dic, success: { (data) in
let model = data as! PurchaseOrderListModel
if model.data?.count == 0 {
self.listView?.mj_footer?.endRefreshingWithNoMoreData()
}else{
self.page += 1
model.data?.forEach({ (model) in
self.datas.append(model)
})
self.listView.reloadData()
self.listView?.mj_footer?.endRefreshing()
}
}) { (error) in
self.listView?.mj_header?.endRefreshing()
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let model = self.datas[indexPath.row]
if model.goods_res!.count > 4 {
return CGFloat(172 + (49 * 4))
}
return CGFloat(172 + (49 * model.goods_res!.count))
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
<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="CGDListVC" 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="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
</view>
</objects>
</document>
//
// CGDListViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/12.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
import Parchment
class CGDListViewController: BaseViewController ,UISearchBarDelegate, SearchBarViewDelegate, PagingViewControllerDelegate {
@IBOutlet weak var contentView: UIView!
@IBOutlet weak var searchBg: UIView!
func clearSearchAction() {
}
//头部滚动视图
weak var pagingVC : PagingViewController?
fileprivate let cities = [
"待审核",
"已通过",
"未通过",
"已完成"
]
let viewControllers = [
CGDListVC(title: "待审核"),
CGDListVC(title: "已通过"),
CGDListVC(title: "未通过"),
CGDListVC(title: "已完成"),
]
var searchV : SearchBarView? = nil
func rightBtnClick() {
let vc = XinCaiGouViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "采购列表"
navbar.rightTitle = "新增"
self.view.addSubview(navbar)
SetTopFrame(view: searchBg, height: 52)
//searchbar
let searchBr = SearchBarView.init()
self.searchBg.addSubview(searchBr)
searchBr.snp.makeConstraints { (make) in
make.left.right.equalTo(0)
make.centerY.equalToSuperview()
make.height.equalTo(35)
}
searchV = searchBr
searchBr.placeholderStr = "输入订单编号/制单人名称"
searchBr.cornerRadius = 35/2.0
searchBr.delegate = self
searchBr.delegateL = self
let pagingViewController = PagingViewController(viewControllers: viewControllers)
pagingViewController.indicatorColor = UIColor.init(named: "蓝色字体颜色")!
pagingViewController.menuItemSize = .fixed(width: 0, height: 44*glscale)
pagingViewController.menuHorizontalAlignment = .center
pagingViewController.font = UIFont.systemFont(ofSize: 13)
pagingViewController.selectedFont = UIFont.systemFont(ofSize: 13)
pagingViewController.textColor = UIColor.init(named: "灰色字体颜色")!
pagingViewController.selectedTextColor = UIColor.init(named: "蓝色字体颜色")!
pagingViewController.delegate = self
pagingViewController.dataSource = self
pagingViewController.sizeDelegate = self
addChild(pagingViewController)
contentView.addSubview(pagingViewController.view)
contentView.constrainToEdges(pagingViewController.view)
pagingViewController.didMove(toParent: self)
pagingVC = pagingViewController
// //MARK:--添加个刷新通知
// NotificationCenter.default.addObserver(self, selector: #selector(refreshingByCGDHavChange), name: NSNotification.Name(rawValue: "cgdChange"), object: nil)
//
// //跳转对应的头部视图
// NotificationCenter.default.addObserver(self, selector: #selector(CgdNavChange), name: NSNotification.Name(rawValue: "cgdNavChange"), object: nil)
}
// @objc func CgdNavChange(notion:Notification){
// let dic = notion.userInfo
// pagingVC!.select(index: dic!["tag"] as Any as! Int, animated: true)
// }
//
// @objc func refreshingByCGDHavChange(){
// viewControllers.forEach { (vc) in
// vc.isUpData = false
// }
// }
//MAKR:--调起搜索后添加个蒙版本
var blackBtnView:UIButton! = nil
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
blackBtnView = UIButton ()
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
contentView.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.left.right.top.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
return true
}
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder()
}
}
//MARK:---滚动选择
var selectIndex = 0
func pagingViewController(_ pagingViewController: PagingViewController, didScrollToItem pagingItem: PagingItem, startingViewController: UIViewController?, destinationViewController: UIViewController, transitionSuccessful: Bool) {
guard let item = pagingItem as? PagingIndexItem else { return}
print("滚动至vc\(item.index)")
if selectIndex != item.index {
selectIndex = item.index
let vc = viewControllers[selectIndex]
if !vc.isUpData {
vc.listView.mj_header?.beginRefreshing()
}
}
}
}
extension CGDListViewController: PagingViewControllerDataSource {
func pagingViewController(_: PagingViewController, pagingItemAt index: Int) -> PagingItem {
return PagingIndexItem(index: index, title: cities[index])
}
func pagingViewController(_: PagingViewController, viewControllerAt index: Int) -> UIViewController {
return viewControllers[index]
}
func numberOfViewControllers(in pagingViewController: PagingViewController) -> Int {
return cities.count
}
}
extension CGDListViewController: PagingViewControllerSizeDelegate {
func pagingViewController(_ pagingViewController: PagingViewController, widthForPagingItem pagingItem: PagingItem, isSelected: Bool) -> CGFloat {
guard let item = pagingItem as? PagingIndexItem else { return 0 }
let insets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
let size = CGSize(width: CGFloat.greatestFiniteMagnitude, height: pagingViewController.options.menuItemSize.height)
let attributes = [NSAttributedString.Key.font: pagingViewController.options.font]
let rect = item.title.boundingRect(with: size,
options: .usesLineFragmentOrigin,
attributes: attributes,
context: nil)
let width = ceil(rect.width) + insets.left + insets.right
if isSelected {
return width * 1.5
} else {
return width
}
}
}
<?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>
<deployment identifier="iOS"/>
<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="CGDListViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="contentView" destination="gQz-Dx-IST" id="Enj-nX-kKS"/>
<outlet property="searchBg" destination="b0W-tr-nHd" id="yrF-5k-VBs"/>
<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="b0W-tr-nHd">
<rect key="frame" x="0.0" y="44" width="414" height="52"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oO1-6m-ZfC">
<rect key="frame" x="0.0" y="51" width="414" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="fvf-qz-hSk"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="oO1-6m-ZfC" firstAttribute="leading" secondItem="b0W-tr-nHd" secondAttribute="leading" id="4S1-nz-dIL"/>
<constraint firstAttribute="height" constant="52" id="70Q-z0-bAE"/>
<constraint firstAttribute="bottom" secondItem="oO1-6m-ZfC" secondAttribute="bottom" id="RBR-Al-Xw9"/>
<constraint firstAttribute="trailing" secondItem="oO1-6m-ZfC" secondAttribute="trailing" id="fZE-dY-ErJ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gQz-Dx-IST">
<rect key="frame" x="0.0" y="96" width="414" height="766"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="gQz-Dx-IST" secondAttribute="bottom" id="53s-mA-xag"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="b0W-tr-nHd" secondAttribute="trailing" id="LaJ-OU-8Ly"/>
<constraint firstItem="gQz-Dx-IST" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="SrM-ic-1sE"/>
<constraint firstItem="b0W-tr-nHd" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="Zea-23-dH2"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="gQz-Dx-IST" secondAttribute="trailing" id="fVM-da-qyS"/>
<constraint firstItem="b0W-tr-nHd" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="kE8-IW-FaJ"/>
<constraint firstItem="gQz-Dx-IST" firstAttribute="top" secondItem="b0W-tr-nHd" secondAttribute="bottom" id="qu2-m8-L1i"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="133" y="139"/>
</view>
</objects>
<resources>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -38,6 +38,8 @@ class CGDListCell: UITableViewCell {
//订单列表数据
var dataArr:Array<OrderListGoodsModel>?
//采购列表数据
var cgDataArr:Array<PurchaseOrderListDataItemsModel>?
override func awakeFromNib() {
super.awakeFromNib()
......@@ -48,12 +50,71 @@ class CGDListCell: UITableViewCell {
if dataArr != nil {
setListView(arr: dataArr!)
}
if cgDataArr != nil {
setCGDListView(arr: cgDataArr!)
}
super.layoutIfNeeded()
}
func setCGDBtnUI(arr:Array<String>,index:Int){
//按钮
btnBgView.subviews.forEach { (view) in
view.removeFromSuperview()
}
var tempBtn:UIButton? = nil
arr.forEach { (str) in
let rightBtn = UIButton(type: .custom)
rightBtn.layer.borderWidth = 1
rightBtn.tag = index
rightBtn.backgroundColor = UIColor.white
rightBtn.layer.borderColor = UIColor.init(named: "按钮渐变色上")?.cgColor
rightBtn.setTitleColor(UIColor.init(named: "按钮渐变色上"), for: .normal)
rightBtn.titleLabel?.font = UIFont.systemFont(ofSize: 13)
rightBtn.layer.cornerRadius = 2
if str as! String == "查看详情"{
rightBtn.setTitle(str, for: .normal)
}else if str as! String == "修改信息"{
rightBtn.setTitle(str, for: .normal)
rightBtn.setTitleColor(UIColor.white, for: .normal)
rightBtn.backgroundColor = UIColor.init(named: "按钮渐变色上")
rightBtn.layer.borderColor = UIColor.init(named: "按钮渐变色上")?.cgColor
}else if str as! String == "取消"{
rightBtn.setTitle(str, for: .normal)
}else if str as! String == "撤销入库"{
rightBtn.setTitle(str, for: .normal)
}else if str as! String == "入库"{
rightBtn.setTitle(str, for: .normal)
}else if str as! String == "补录入库"{
rightBtn.setTitle(str, for: .normal)
}
btnBgView.addSubview(rightBtn)
if tempBtn == nil {
rightBtn.snp.makeConstraints { (make) in
make.width.equalTo(82*glscale)
make.height.equalTo(30)
make.right.equalTo(0)
make.top.equalTo(0)
}
}else{
rightBtn.snp.makeConstraints { (make) in
make.width.equalTo(82*glscale)
make.height.equalTo(30)
make.right.equalTo(tempBtn!.snp_left).offset(-15)
make.top.equalTo(0)
}
}
rightBtn.addTarget(self, action: #selector(btnAction(sender:)), for: .touchUpInside)
tempBtn = rightBtn
}
}
//订单列表设置底部按钮
func setBtnView(arr:Array<Any>,index:Int){
func setBtnView(arr:Array<String>,index:Int){
//按钮
btnBgView.subviews.forEach { (view) in
view.removeFromSuperview()
......@@ -66,8 +127,8 @@ class CGDListCell: UITableViewCell {
rightBtn.layer.borderWidth = 1
rightBtn.tag = index
rightBtn.backgroundColor = UIColor.white
rightBtn.layer.borderColor = UIColor.init(named: "按钮背景颜色")?.cgColor
rightBtn.setTitleColor(UIColor.init(named: "按钮背景颜色"), for: .normal)
rightBtn.layer.borderColor = UIColor.init(named: "按钮渐变色上")?.cgColor
rightBtn.setTitleColor(UIColor.init(named: "按钮渐变色上"), for: .normal)
rightBtn.titleLabel?.font = UIFont.systemFont(ofSize: 13)
rightBtn.layer.cornerRadius = 2
if str as! String == "查看详情"{
......@@ -75,8 +136,8 @@ class CGDListCell: UITableViewCell {
}else if str as! String == "确认订单"{
rightBtn.setTitle("确认订单", for: .normal)
rightBtn.setTitleColor(UIColor.white, for: .normal)
rightBtn.backgroundColor = UIColor.init(named: "按钮背景颜色")
rightBtn.layer.borderColor = UIColor.init(named: "按钮背景颜色")?.cgColor
rightBtn.backgroundColor = UIColor.init(named: "按钮渐变色上")
rightBtn.layer.borderColor = UIColor.init(named: "按钮渐变色上")?.cgColor
}else if str as! String == "取消订单"{
rightBtn.setTitle("取消订单", for: .normal)
}else if str as! String == "付款码"{
......@@ -106,6 +167,66 @@ class CGDListCell: UITableViewCell {
@objc func btnAction(sender:UIButton){
self.delegate?.allBtnSubmit(sender: sender)
}
//订单列表设置数据
func setCGDListView(arr:Array<PurchaseOrderListDataItemsModel>){
//列表
listBgView.subviews.forEach { (view) in
view.removeFromSuperview()
}
if arr.count > 0 {
var num = 0
if arr.count > 4 {
num = 4
}else{
num = arr.count
}
for i in 0 ..< num {
let model = arr[i]
let view = UIView()
listBgView.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 = model.goods_name
view.addSubview(lbl)
lbl.snp.makeConstraints { (make) in
make.left.equalTo(15)
make.bottom.top.equalTo(0)
make.right.equalTo(-80*glscale)
}
let lbl2 = UILabel()
lbl2.font = UIFont.systemFont(ofSize: 13)
lbl2.textColor = UIColor(named: "灰色字体颜色")
lbl2.text = "x" + "\(model.num!)"
lbl2.textAlignment = .right
view.addSubview(lbl2)
lbl2.snp.makeConstraints { (make) in
make.right.equalTo(-15)
make.bottom.left.top.equalTo(0)
}
}
}
}
//订单列表设置数据
func setListView(arr:Array<OrderListGoodsModel>){
//列表
......@@ -120,7 +241,7 @@ class CGDListCell: UITableViewCell {
num = arr.count
}
for i in 0 ..< num {
let model = dataArr![i]
let model = arr[i]
let view = UIView()
listBgView.addSubview(view)
view.backgroundColor = UIColor.white
......
......@@ -12,6 +12,8 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
@IBOutlet weak var btmView: UIView!
@IBOutlet weak var listView: UITableView!
var po_id:Int?
let tArr = ["制单信息","商品信息"]
var glSelectView:GLAlertSelectView?
......@@ -38,7 +40,12 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
listView.register(UINib(nibName: "TitleAndBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndBtnCell")
listView.register(UINib(nibName: "CGDCell", bundle: nil), forCellReuseIdentifier: "CGDCell")
loadData()
}
func loadData(){
// purchaseOrderDetail(<#T##params: [String : Any]##[String : Any]#>, success: <#T##(Any) -> ()#>, failture: <#T##(Error) -> ()#>)
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......
......@@ -46,7 +46,7 @@
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="xUS-ih-bIA">
<rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="gjW-9u-BlI"/>
<outlet property="delegate" destination="-1" id="408-BM-NmJ"/>
......@@ -72,6 +72,9 @@
</view>
</objects>
<resources>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......
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