Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
97410ffa
Commit
97410ffa
authored
Jan 26, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增cell样式
parent
368094c8
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1285 additions
and
37 deletions
+1285
-37
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+44
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/Contents.json
...rm/Assets.xcassets/分销商管理/red_arrow.imageset/Contents.json
+23
-0
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/路径.png
...sPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/路径.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/路径@2x.png
...atform/Assets.xcassets/分销商管理/red_arrow.imageset/路径@2x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/路径@3x.png
...atform/Assets.xcassets/分销商管理/red_arrow.imageset/路径@3x.png
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+4
-4
GeliBusinessPlatform/Other/SDK/GPrinter/include/BLKWrite.h
GeliBusinessPlatform/Other/SDK/GPrinter/include/BLKWrite.h
+50
-0
GeliBusinessPlatform/Other/SDK/GPrinter/include/CBController.h
...usinessPlatform/Other/SDK/GPrinter/include/CBController.h
+67
-0
GeliBusinessPlatform/Other/SDK/GPrinter/include/DeviceInfo.h
GeliBusinessPlatform/Other/SDK/GPrinter/include/DeviceInfo.h
+17
-0
GeliBusinessPlatform/Other/SDK/GPrinter/include/EscCommand.h
GeliBusinessPlatform/Other/SDK/GPrinter/include/EscCommand.h
+384
-0
GeliBusinessPlatform/Other/SDK/GPrinter/include/MyPeripheral.h
...usinessPlatform/Other/SDK/GPrinter/include/MyPeripheral.h
+175
-0
GeliBusinessPlatform/Other/SDK/GPrinter/include/ReliableBurstData.h
...ssPlatform/Other/SDK/GPrinter/include/ReliableBurstData.h
+148
-0
GeliBusinessPlatform/Other/SDK/GPrinter/include/TscCommand.h
GeliBusinessPlatform/Other/SDK/GPrinter/include/TscCommand.h
+263
-0
GeliBusinessPlatform/Other/SDK/GPrinter/libGSDK.a
GeliBusinessPlatform/Other/SDK/GPrinter/libGSDK.a
+0
-0
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.swift
...atform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.swift
+25
-1
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.xib
...Platform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.xib
+40
-13
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+5
-1
GeliBusinessPlatform/ViewController/分销订单管理/RetailManageDetailViewController.swift
...wController/分销订单管理/RetailManageDetailViewController.swift
+35
-15
GeliBusinessPlatform/ViewController/订单详情/GLKHCell.swift
GeliBusinessPlatform/ViewController/订单详情/GLKHCell.swift
+1
-0
GeliBusinessPlatform/ViewController/订单详情/GLKHCell.xib
GeliBusinessPlatform/ViewController/订单详情/GLKHCell.xib
+3
-2
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+1
-1
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
97410ffa
...
...
@@ -187,6 +187,7 @@
E06B1AED25B52725002F3C65
/* PrintViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E06B1AEB25B52725002F3C65
/* PrintViewController.xib */
;
};
E06B1AF625B52AD3002F3C65
/* PrintListMgVc.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E06B1AF425B52AD3002F3C65
/* PrintListMgVc.swift */
;
};
E06B1AF725B52AD3002F3C65
/* PrintListMgVc.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E06B1AF525B52AD3002F3C65
/* PrintListMgVc.xib */
;
};
E06FBA9E25BFE3DA00E9C2BA
/* libGSDK.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E06FBA9D25BFE3DA00E9C2BA
/* libGSDK.a */
;
};
E0706EF424B40BE800D8251C
/* TitleAndTfYuanCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0706EF224B40BE800D8251C
/* TitleAndTfYuanCell.swift */
;
};
E0706EF524B40BE800D8251C
/* TitleAndTfYuanCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0706EF324B40BE800D8251C
/* TitleAndTfYuanCell.xib */
;
};
E0706EF824B4796400D8251C
/* CGDListCell2.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0706EF624B4796400D8251C
/* CGDListCell2.swift */
;
};
...
...
@@ -884,6 +885,14 @@
E06B1AEB25B52725002F3C65
/* PrintViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
PrintViewController.xib
;
sourceTree
=
"<group>"
;
};
E06B1AF425B52AD3002F3C65
/* PrintListMgVc.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PrintListMgVc.swift
;
sourceTree
=
"<group>"
;
};
E06B1AF525B52AD3002F3C65
/* PrintListMgVc.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
PrintListMgVc.xib
;
sourceTree
=
"<group>"
;
};
E06FBA9625BFE3DA00E9C2BA
/* ReliableBurstData.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ReliableBurstData.h
;
sourceTree
=
"<group>"
;
};
E06FBA9725BFE3DA00E9C2BA
/* DeviceInfo.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DeviceInfo.h
;
sourceTree
=
"<group>"
;
};
E06FBA9825BFE3DA00E9C2BA
/* EscCommand.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
EscCommand.h
;
sourceTree
=
"<group>"
;
};
E06FBA9925BFE3DA00E9C2BA
/* CBController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CBController.h
;
sourceTree
=
"<group>"
;
};
E06FBA9A25BFE3DA00E9C2BA
/* MyPeripheral.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MyPeripheral.h
;
sourceTree
=
"<group>"
;
};
E06FBA9B25BFE3DA00E9C2BA
/* TscCommand.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TscCommand.h
;
sourceTree
=
"<group>"
;
};
E06FBA9C25BFE3DA00E9C2BA
/* BLKWrite.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BLKWrite.h
;
sourceTree
=
"<group>"
;
};
E06FBA9D25BFE3DA00E9C2BA
/* libGSDK.a */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
archive.ar
;
path
=
libGSDK.a
;
sourceTree
=
"<group>"
;
};
E0706EF124B4088500D8251C
/* Bridge_Header.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Bridge_Header.h
;
sourceTree
=
"<group>"
;
};
E0706EF224B40BE800D8251C
/* TitleAndTfYuanCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TitleAndTfYuanCell.swift
;
sourceTree
=
"<group>"
;
};
E0706EF324B40BE800D8251C
/* TitleAndTfYuanCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
TitleAndTfYuanCell.xib
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1447,6 +1456,7 @@
E09B3AE324B3011B00E3B238
/* libz.1.2.5.tbd in Frameworks */
,
E0707DC72462457200E039A8
/* libz.tbd in Frameworks */
,
E09B3AE024B2FE0200E3B238
/* libicucore.tbd in Frameworks */
,
E06FBA9E25BFE3DA00E9C2BA
/* libGSDK.a in Frameworks */
,
E039848C2468F27800DFA56F
/* libsqlite3.tbd in Frameworks */
,
E09B3ADE24B2FDC600E3B238
/* JavaScriptCore.framework in Frameworks */
,
E0AA7F362589A8AA0099193F
/* jpush-ios-3.4.0.a in Frameworks */
,
...
...
@@ -1959,6 +1969,36 @@
path
=
"打印订单"
;
sourceTree
=
"<group>"
;
};
E06FBA9025BFE3B100E9C2BA
/* 溯源 */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
"溯源"
;
sourceTree
=
"<group>"
;
};
E06FBA9425BFE3C600E9C2BA
/* GPrinter */
=
{
isa
=
PBXGroup
;
children
=
(
E06FBA9525BFE3DA00E9C2BA
/* include */
,
E06FBA9D25BFE3DA00E9C2BA
/* libGSDK.a */
,
);
path
=
GPrinter
;
sourceTree
=
"<group>"
;
};
E06FBA9525BFE3DA00E9C2BA
/* include */
=
{
isa
=
PBXGroup
;
children
=
(
E06FBA9625BFE3DA00E9C2BA
/* ReliableBurstData.h */
,
E06FBA9725BFE3DA00E9C2BA
/* DeviceInfo.h */
,
E06FBA9825BFE3DA00E9C2BA
/* EscCommand.h */
,
E06FBA9925BFE3DA00E9C2BA
/* CBController.h */
,
E06FBA9A25BFE3DA00E9C2BA
/* MyPeripheral.h */
,
E06FBA9B25BFE3DA00E9C2BA
/* TscCommand.h */
,
E06FBA9C25BFE3DA00E9C2BA
/* BLKWrite.h */
,
);
path
=
include
;
sourceTree
=
"<group>"
;
};
E0707DC82462475700E039A8
/* 地图 */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -2149,6 +2189,7 @@
E09B03AD2445B0BA00211A51
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
E06FBA9025BFE3B100E9C2BA
/* 溯源 */
,
E06B1AE925B52684002F3C65
/* 打印订单 */
,
E0272A82259C2506008142BB
/* 分销员管理 */
,
E04025F8259C13FE00EDF182
/* 客户详情 */
,
...
...
@@ -2243,6 +2284,7 @@
E09B3AB624B2FCAF00E3B238
/* SDK */
=
{
isa
=
PBXGroup
;
children
=
(
E06FBA9425BFE3C600E9C2BA
/* GPrinter */
,
E09B3AB724B2FCAF00E3B238
/* ShareSDK */
,
E09B3ACD24B2FCAF00E3B238
/* Required */
,
);
...
...
@@ -4422,6 +4464,7 @@
"$(PROJECT_DIR)/GeliBusinessPlatform/Define/融云"
,
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/JPush/Lib"
,
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/SDK/ShareSDK/Support/PlatformSDK/WeChatSDK"
,
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/SDK/GPrinter"
,
);
MARKETING_VERSION
=
1.7.1
;
OTHER_LDFLAGS
=
(
...
...
@@ -4553,6 +4596,7 @@
"$(PROJECT_DIR)/GeliBusinessPlatform/Define/融云"
,
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/JPush/Lib"
,
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/SDK/ShareSDK/Support/PlatformSDK/WeChatSDK"
,
"$(PROJECT_DIR)/GeliBusinessPlatform/Other/SDK/GPrinter"
,
);
MARKETING_VERSION
=
1.7.1
;
OTHER_LDFLAGS
=
(
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
97410ffa
No preview for this file type
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/Contents.json
0 → 100644
View file @
97410ffa
{
"images"
:
[
{
"filename"
:
"路径.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"路径@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"路径@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/路径.png
0 → 100644
View file @
97410ffa
136 Bytes
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/路径@2x.png
0 → 100644
View file @
97410ffa
275 Bytes
GeliBusinessPlatform/Assets.xcassets/分销商管理/red_arrow.imageset/路径@3x.png
0 → 100644
View file @
97410ffa
420 Bytes
GeliBusinessPlatform/Define/Define.swift
View file @
97410ffa
...
...
@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址
//test
//
let SERVERCE_ImageHost = "https://z.gelifood.com/"
//
let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://zx.gelifood.com/"
let
SERVERCE_HOST
=
"https://zx.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://z.gelifood.com/"
let
SERVERCE_HOST
=
"https://z.gelifood.com/admin/"
//
let SERVERCE_ImageHost = "https://zx.gelifood.com/"
//
let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
////online
//视图常量
...
...
GeliBusinessPlatform/Other/SDK/GPrinter/include/BLKWrite.h
0 → 100644
View file @
97410ffa
//
// BLKWrite.h
// Gprinter
//
// Created by Wind on 14/12/20.
// Copyright (c) 2014年 JiaBo. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MyPeripheral.h"
/*
调用Wi-Fi模式
1 [BLKWrite Instance].bWiFiMode = YES
2 [BLKWrite Instance] 设置ServerIP、port
3 [[BLKWrite Instance] initWiFiClient];
4 TSC:-(void) writeTscData:(NSData*) data withResponse;
5 ESC:-(void) writeEscData:(NSData*) data withResponse;
获取打印机纸张宽度
1 校验后
2[[BLKWrite Instance] PrintWidth];
*/
@interface
BLKWrite
:
NSObject
<
MyPeripheralDelegate
>
@property
(
nonatomic
,
strong
)
MyPeripheral
*
connectedPeripheral
;
@property
(
nonatomic
,
assign
)
BOOL
bWiFiMode
;
//YES: Wi-Fi模式;NO:蓝牙模式
@property
(
nonatomic
,
strong
)
NSString
*
serverIP
;
@property
(
nonatomic
,
assign
)
int
port
;
+
(
BLKWrite
*
)
Instance
;
-
(
void
)
writeTscData
:(
NSData
*
)
data
withResponse
:
(
BOOL
)
flag
;
-
(
void
)
writeEscData
:(
NSData
*
)
data
withResponse
:
(
BOOL
)
flag
;
-
(
BOOL
)
isConnecting
;
-
(
void
)
setPeripheral
:(
MyPeripheral
*
)
peripheral
;
#pragma mark-Wi-Fi Mode
-
(
void
)
initWiFiClient
;
#pragma mark-
-
(
int
)
PrintWidth
;
@end
GeliBusinessPlatform/Other/SDK/GPrinter/include/CBController.h
0 → 100644
View file @
97410ffa
//
// CBController.h
// BLETR
//
// Created by user D500 on 12/2/15.
// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import "MyPeripheral.h"
enum {
LE_STATUS_IDLE = 0,
LE_STATUS_SCANNING,
LE_STATUS_CONNECTING,
LE_STATUS_CONNECTED
};
@interface MultiDevice : NSObject
@property(nonatomic, assign) NSInteger index;//0:ISSC;1:红果
@property(nonatomic, assign) BOOL connected;//是否已经连接
@end
@protocol CBControllerDelegate;
@interface CBController : UIViewController<CBCentralManagerDelegate, CBPeripheralDelegate,ReliableBurstDataDelegate>
{
CBCentralManager *manager;
NSMutableArray *devicesList;
BOOL notifyState;
NSMutableArray *_connectedPeripheralList;
CBUUID *_transServiceUUID;
CBUUID *_transTxUUID;
CBUUID *_transRxUUID;
CBUUID *_disUUID1;
CBUUID *_disUUID2;
BOOL isISSCPeripheral;
}
@property(assign) id<CBControllerDelegate> delegate;
@property (retain) NSMutableArray *devicesList;
- (void) startScan;
- (void) stopScan;
- (void)connectDevice:(MyPeripheral *) myPeripheral;
- (void)disconnectDevice:(MyPeripheral *) aPeripheral;
- (NSMutableData *) hexStrToData: (NSString *)hexStr;
- (BOOL) isLECapableHardware;
- (void)addDiscoverPeripheral:(CBPeripheral *)aPeripheral advName:(NSString *)advName;
- (void)updateDiscoverPeripherals;
- (void)updateMyPeripheralForDisconnect:(MyPeripheral *)myPeripheral;
- (void)updateMyPeripheralForNewConnected:(MyPeripheral *)myPeripheral;
- (void)storeMyPeripheral: (CBPeripheral *)aPeripheral;
- (MyPeripheral *)retrieveMyPeripheral: (CBPeripheral *)aPeripheral;
- (void)removeMyPeripheral: (CBPeripheral *) aPeripheral;
- (void)configureTransparentServiceUUID: (NSString *)serviceUUID txUUID:(NSString *)txUUID rxUUID:(NSString *)rxUUID;
- (void)configureDeviceInformationServiceUUID: (NSString *)UUID1 UUID2:(NSString *)UUID2;
@end
@protocol CBControllerDelegate
@required
- (void)didUpdatePeripheralList:(NSArray *)peripherals;
- (void)didConnectPeripheral:(MyPeripheral *)peripheral;
- (void)didDisconnectPeripheral:(MyPeripheral *)peripheral;
@end
\ No newline at end of file
GeliBusinessPlatform/Other/SDK/GPrinter/include/DeviceInfo.h
0 → 100644
View file @
97410ffa
//
// DeviceInfo.h
// BLETR
//
// Created by d500_MacMini on 13/6/19.
// Copyright (c) 2013年 ISSC. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CBController.h"
@interface
DeviceInfo
:
NSObject
@property
(
retain
)
MyPeripheral
*
myPeripheral
;
//@property(retain) ViewController *mainViewController;
@end
GeliBusinessPlatform/Other/SDK/GPrinter/include/EscCommand.h
0 → 100644
View file @
97410ffa
//
// EscCommand.h
// Gprinter
//
// Created by Wind on 14/12/22.
// Copyright (c) 2014年 JiaBo. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
EscCommand
:
NSObject
@property
(
nonatomic
,
assign
)
BOOL
hasResponse
;
/**
* 方法说明:打印UPCA条码
* @param content 数据范围0-9,长度为11位
*/
-
(
void
)
addUPCAtest
:(
NSString
*
)
content
;
/**
* 方法说明:插入文字
* @param text
*/
-
(
void
)
addText
:(
NSString
*
)
text
;
/**
* 方法说明:获得打印命令
* @return NSData*
*/
-
(
NSData
*
)
getCommand
;
/**
* 方法说明:将字符串转成十六进制码
* @param str 命令字符串
* @return void
*/
-
(
void
)
addStrToCommand
:(
NSString
*
)
str
;
/**
* 方法说明:打印机初始化,必须是第一个打印命令0x1b,0x40
*/
-
(
void
)
addInitializePrinter
;
/**
* 方法说明:打印并且走纸多少行,默认为8行,打印完内容后发送
* @param n 行数
*/
-
(
void
)
addPrintAndFeedLines
:(
int
)
n
;
/**
* 方法说明:设置打印模式,0x1B 0x21 n(0-255),根据n的值设置字符打印模式
* @param font 选择FONTA or FONTB
* @param emphasized 是否加粗
* @param doubleheight 是否倍高,当倍宽和倍高模式同时选择时,字符同时在横向和纵向放大两倍。
* @param doublewidth 是否倍宽
* @param underline 是否下划线
*参数n二进制默认为00000000(0X0),10001000(0X88)表示下划线和加粗,00001000(0X08)表示加粗,10000000(0X80)表示下划线
*/
-
(
void
)
addPrintMode
:(
int
)
n
;
/**
* 方法说明:设置国际字符集,默认为美国0
* @param set 字符集编号
*/
-
(
void
)
addSetInternationalCharacterSet
:(
int
)
n
;
/**
* 方法说明:设置字符是否旋转90°,默认为0
* @param enabel 是否旋转
*/
-
(
void
)
addSet90ClockWiseRotatin
:(
int
)
n
;
/**
* 方法说明:设置对齐方式
* @param n 左 中 右对齐,0左对齐,1中间对齐,2右对齐
*/
-
(
void
)
addSetJustification
:(
int
)
n
;
/**
* 方法说明:开钱箱
* @param m 钱箱引脚号
* @param t1 高电平时间
* @param t2 低电平时间
*/
-
(
void
)
addOpenCashDawer
:(
int
)
m
:
(
int
)
t1
:
(
int
)
t2
;
/**
* 方法说明:蜂鸣器
* @param m 报警灯和鸣叫次数
* @param t 时间
* @param n 方式
*/
-
(
void
)
addSound
:(
int
)
m
:
(
int
)
t
:
(
int
)
n
;
/**
* 方法说明:设置行间距,不用设置,打印机默认为30
* @param n 行间距高度,包含文字
*/
-
(
void
)
addLineSpacing
:(
int
)
n
;
/**
* 方法说明:设置倒置模式 选择/取消倒置打印模式。
* @param enable 是否倒置,默认为0, 0 ≤n ≤255 当n的最低位为0时,取消倒置打印模式。当n的最低位为1时,选择倒置打印模式。只有n的最低位有效;
*/
-
(
void
)
addSetUpsideDownMode
:(
int
)
n
;
/**
* 方法说明:设置字符放大,限制为不放大和放大2倍,n=0x11
* @param n= width | height 宽度放大倍数,0 ≤n ≤255 (1 ≤ 纵向放大倍数 ≤8,1 ≤ 横向放达倍数 ≤8)[描述] 用0 到2 位选择字符高度,4 到7 位选择字符宽度
*/
-
(
void
)
addSetCharcterSize
:(
int
)
n
;
/**
* 方法说明:设置反白模式,黑白反显打印模式
* @param enable 是否反白,当n的最低位为0时,取消反显打印模式。当n的最低位为1时,选择反显打印模式。只有n的最低位有效;
*/
-
(
void
)
addSetReverseMode
:(
int
)
n
;
/**
* 方法说明:打印机实时状态请求
* @param status PRINTER_STATUS 打印机状态 1 ≤n ≤4
* PRINTER_OFFLINE 脱机状态
* PRINTER_ERROR 错误状态
* PRINTER_PAPER 纸张状态
*/
-
(
void
)
queryRealtimeStatus
:(
int
)
n
;
/**
* 方法说明:设置切纸后走纸
* @param length 走纸距离
*/
-
(
void
)
addCutPaperAndFeed
:(
int
)
n
;
/**
* 方法说明:切纸 0全切纸,1是半切
*/
-
(
void
)
addCutPaper
:(
int
)
m
;
/**
* 方法说明:设置条码可识别字符,选择HRI字符的打印位置
* @param n 可识别字符位置,0, 48 不打印 1, 49 条码上方 2, 50 条码下方 3, 51 条码上、下方都打印
*/
-
(
void
)
addSetBarcodeHRPosition
:(
int
)
n
;
/**
* 方法说明:设置条码字符种类,选择HRI使用字体
* @param n 固定为0 0,48 标准ASCII码字符 (12 × 24) 1,49 压缩ASCII码字符 (9 × 17)
*/
-
(
void
)
addSetBarcodeHRIFont
;
/**
* 方法说明:设置条码高度
* @param n 高度 条码高度为n点,默认为40
*/
-
(
void
)
addSetBarcodeHeight
:(
int
)
n
;
/**
* 方法说明:设置条码单元宽度,不用设置,使用打印机内部默认值
* @param n 条码宽度 2 ≤n ≤6
*/
-
(
void
)
addSetBarcodeWidth
:(
int
)
n
;
/**
* 方法说明:打印EAN13码
* @param content 数据范围0-9,长度为12位
*/
-
(
void
)
addEAN13
:(
NSString
*
)
content
;
/**
* 方法说明:打印EAN8码
* @param content 数据范围0-9,长度为7位
*/
-
(
void
)
addEAN8
:(
NSString
*
)
content
;
/**
* 方法说明:打印UPCA条码
* @param content 数据范围0-9,长度为11位
*/
-
(
void
)
addUPCA
:(
NSString
*
)
content
;
/**
* 方法说明:打印ITF14条码
* @param content 数据范围 0-9 数据长度 偶数个
*/
-
(
void
)
addITF
:(
NSString
*
)
content
;
/**
* 方法说明:打印CODE39条码
* @param content 数据范围0-9 A-Z SP $ % + - . / ,*为 (开始/结束字符)
*/
-
(
void
)
addCODE39
:(
NSString
*
)
content
;
/**
* 方法说明:打印CODE128码
* 采用的是1D 6B 49 n的命令格式,n为后面所有打印字符串的长度,包括了字符集的声明。默认使用CODEB字符集: {B , 0x7B, 0x42
* @param charset ,CODEB字符集有 {A {B {C,charset默认值用B ,实际上,字符集可以插入到content中,一个content可以有多个字符集定义。
* @param content 数据范围0x00-0x7f
*/
-
(
void
)
addCODE128
:(
char
)
charset
:
(
NSString
*
)
content
;
/**
* 方法说明:打印CODE128码支持混合{A {B {C打印,支持58mm纸打印超过14位的奇数数字,例如15位 17位 19位的数字串
* 采用的是1D 6B 49 n的命令格式,n为后面所有打印字符串的长度,包括了字符集的声明。默认使用CODEB字符集: {B , 0x7B, 0x42
* CODEB字符集有 {A {B {C,默认值用B ,实际上,字符集可以插入到data中,一个data可以有多个字符集定义。
* @param height 条码高度
* @param width 条码宽度
* @param data 数据范围0x00-0x7f,全部为16进制
*/
-
(
void
)
addCODE128ABC
:(
int
)
height
:
(
int
)
width
:
(
NSData
*
)
data
;
/**
* 方法说明:addNVLOGO
* @param n为序号,1<=n<=20 m默认为0
*/
-
(
void
)
addNVLOGO
:(
int
)
n
:
(
int
)
m
;
/*
十六进制码 1D 76 30 m xL xH yL yH d1...dk
0 ≤ m ≤ 3, 48 ≤ m ≤ 51
0 ≤ xL ≤ 255
0 ≤ xH ≤ 255
0 ≤ yL ≤ 255
0 ≤ yH ≤ 255
0 ≤ d ≤ 255
k = ( xL + xH × 256) × ( yL + yH × 256) ( k ≠ 0)
参 数 说 明
m 模式
0, 48 正常
1, 49 倍宽
2, 50 倍高
3, 51 倍宽、倍高
xL、 xH表示水平方向位图字节数( xL+ xH × 256)
yL、 yH表示垂直方向位图点数( yL+ yH × 256)
data 影像数据
*/
-
(
void
)
addESCBitmapwithM
:(
int
)
m
withxL
:
(
int
)
xL
withxH
:
(
int
)
xH
withyL
:
(
int
)
yL
withyH
:
(
int
)
yH
withData
:
(
NSData
*
)
data
;
/*
正确的ESC指令下QRCode打印流程为四步:
1、设定QRCode大小;(可以省略)
2、设定纠错等级;(一般无需设定,忽略)
3、将QRCode对应的文字信息存入打印机缓存中;(必须要有)
4、发送打印QRCode命令。
一共有四个命令对应上述四步。
*/
/*
1、设定QRCode大小;(可以省略)
[格式] ASCII码 GS ( K pL pH cn fn n
十六进制码 1D 28 6B 03 00 31 43 n
[范围] (pL+pH×256)=3 (pL=3,pH=0)
cn=49
fn=67
1 ≤n≤16
[默认值] n=3
*/
-
(
void
)
addQRCodeSizewithpL
:(
int
)
pL
withpH
:
(
int
)
pH
withcn
:
(
int
)
cn
withyfn
:
(
int
)
fn
withn
:
(
int
)
n
;
/*
2、设定纠错等级;(一般无需设定,忽略)
[格式] ASCII码 GS ( K pL pH cn fn m d1...dk
十六进制码 1D 28 6B 03 00 31 45 n
[范围] (pL+pH×256)=3 (pL=3,pH=0)
cn=49
fn=69
48≤n≤51
[默认值] n=48
*/
-
(
void
)
addQRCodeLevelwithpL
:(
int
)
pL
withpH
:
(
int
)
pH
withcn
:
(
int
)
cn
withyfn
:
(
int
)
fn
withn
:
(
int
)
n
;
/*
3、将QRCode对应的文字信息存入打印机缓存中;(必须要有)
[格式] ASCII码 GS ( K pL pH cn fn m d1...dk
十六进制码 1D 28 6B pL pH 31 50 30 d1...dk
[范围] 4≤(pL+pH×256)≤7092 (0≤pL≤255,0≤pH≤27)
cn=49
fn=80
m=48
k=(pL+pH×256)-3
[描述] 存储QR CODE数据(d1...dk)到符号存储区
[注释] • 将QRCode的数据存储到打印机中
• 执行esc @或打印机掉电后,恢复默认值
*/
-
(
void
)
addQRCodeSavewithpL
:(
int
)
pL
withpH
:
(
int
)
pH
withcn
:
(
int
)
cn
withyfn
:
(
int
)
fn
withm
:
(
int
)
m
withData
:
(
NSData
*
)
data
;
/*
4、发送打印QRCode命令。
[格式] ASCII码 GS ( K pL pH cn fn m
十六进制码 1D 28 6B 03 00 31 51 m
[范围] (pL+pH×256)=3 (pL=3,pH=0)
cn=49
fn=81
m=48
[描述] 打印QRCode条码,在发送此命令之前,需通过( K< Function 180)命令将QRCode数据存储在打印机中。
*/
-
(
void
)
addQRCodePrintwithpL
:(
int
)
pL
withpH
:
(
int
)
pH
withcn
:
(
int
)
cn
withyfn
:
(
int
)
fn
withm
:
(
int
)
m
;
/**
* 方法说明:设置是否汉字字体
* @param n 是否倍宽 是否倍高 是否下划线
*/
-
(
void
)
addSetKanjiFontMode
:(
int
)
n
;
/**
* 方法说明:设置汉字有效
*/
-
(
void
)
addSelectKanjiMode
;
/**
* 方法说明:设置汉字下划线
* @param n 根据 n 的值,选择或取消汉字的下划线:
* n 功能
* 0, 48 取消汉字下划线
* 1, 49 选择汉字下划线(1 点宽)
* 2, 50 选择汉字下划线(2点宽)
*/
-
(
void
)
addSetKanjiUnderLine
:(
int
)
n
;
/**
* 方法说明:设置汉字无效
*/
-
(
void
)
addCancelKanjiMode
;
/**
* 方法说明:设置字符右间距
* @param n 间距长度
* 0 ≤ n≤255
* [描述] 设置字符的右间距为[n×横向移动单位或纵向移动单位]英寸。
* [注释] • 当字符放大时,右间距随之放大相同的倍数。
* • 此命令设置的值在页模式和标准模式下是相互独立的。
* • 横向或纵向移动单位由GS P指定。改变横向或纵向移动单位不改变当前右间距。
* • GS P 命令可改变水平(和垂直)运动单位。但是该值不得小于最小水平移动量,
* 并且必须为最小水平移动量的偶数单位。
* • 标准模式下,使用横向移动单位。
* • 最大右间距是31 .91 毫米(255/203 英寸) 。 任何超过这个值的设置都自动转换为最
* 大右间距。
* [默认值] n = 0
*/
-
(
void
)
addSetCharacterRightSpace
:(
int
)
n
;
/**
* 方法说明:设置汉字左右间距
* @param n1 左间距 0 ≤ n1 ≤ 255
* @param n2 右间距 0 ≤ n2 ≤ 255
*/
-
(
void
)
addSetKanjiLefttandRightSpace
:(
int
)
n1
:
(
int
)
n2
;
/**
* 方法说明:设置加粗模式
* @param n 是否加粗
* 0 ≤ n ≤ 255
* [描述] 选择或取消加粗模式
* 当n的最低位为0时,取消加粗模式。
* 当n的最低位为1 时,选择加粗模式。
* [注释] • n只有最低位有效。
* • ESC ! 同样可以选择/取消加粗模式,最后接收的命令有效。
* [默认值] n = 0
*/
-
(
void
)
addTurnEmphasizedModeOnOrOff
:(
int
)
n
;
/**
* 方法说明:设置加重模式
* @param n 是否加重
* 0 ≤ n ≤ 255
* [描述] 选择/取消双重打印模式。
* • 当n的最低位为0时,取消双重打印模式。
* • 当n的最低位为1 时,选择双重打印模式。
* [注释] • n只有最低位有效。
* • 该命令与加粗打印效果相同。
* [默认值] n = 0
*/
-
(
void
)
addTurnDoubleStrikeOnOrOff
:(
int
)
n
;
/**
* 方法说明:发送16进制数据,例如data=0x0A或data=0x0D
*/
-
(
void
)
addNSDataToCommand
:(
NSData
*
)
data
;
@end
\ No newline at end of file
GeliBusinessPlatform/Other/SDK/GPrinter/include/MyPeripheral.h
0 → 100644
View file @
97410ffa
//
// MyPeripheral.h
// BLETR
//
// Created by D500 user on 13/5/30.
// Copyright (c) 2013年 ISSC. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import "ReliableBurstData.h"
#define AIR_PATCH_COMMAND_VENDOR_MP_ENABLE 0x03
#define AIR_PATCH_COMMAND_XMEMOTY_READ 0x08
#define AIR_PATCH_COMMAND_XMEMOTY_WRITE 0x09
#define AIR_PATCH_COMMAND_E2PROM_READ 0x0a
#define AIR_PATCH_COMMAND_E2PROM_WRITE 0x0b
#define AIR_PATCH_COMMAND_READ 0x24
#define AIR_PATCH_SUCCESS 0x00
#define AIR_PATCH_ACTION_CHANGE_DEVICE_NAME 0X01
#define AIR_PATCH_ACTION_READ_ADVERTISE_DATA1 0X02
#define AIR_PATCH_ACTION_READ_ADVERTISE_DATA2 0X03
#define AIR_PATCH_ACTION_UPDATE_ADVERTISE_DATA 0X04
#define AIR_PATCH_ACTION_CHANGE_DEVICE_NAME_MEMORY 0X05
#define AIR_PATCH_ACTION_READ 0X24
#define ADVERTISE_DATA_TYPE_COMPLETE_DEVICE_NAME 0X09
#define ADVERTISE_DATA_TYPE_SHORTEN_DEVICE_NAME 0X08
enum
{
MYPERIPHERAL_CONNECT_STATUS_IDLE
=
0
,
MYPERIPHERAL_CONNECT_STATUS_CONNECTING
,
MYPERIPHERAL_CONNECT_STATUS_CONNECTED
,
};
enum
{
UPDATE_PARAMETERS_STEP_PREPARE
=
0
,
UPDATE_PARAMETERS_STEP_CHECK_RESULT
,
};
typedef
struct
_AIR_PATCH_COMMAND_FORMAT
{
unsigned
char
commandID
;
char
parameters
[
19
];
}
__attribute__
((
packed
))
AIR_PATCH_COMMAND_FORMAT
;
typedef
struct
_AIR_PATCH_EVENT_FORMAT
{
char
status
;
unsigned
char
commandID
;
char
parameters
[
16
];
}
__attribute__
((
packed
))
AIR_PATCH_EVENT_FORMAT
;
typedef
struct
_WRITE_EEPROM_COMMAND_FORMAT
{
unsigned
char
addr
[
2
];
unsigned
char
length
;
char
data
[
16
];
}
__attribute__
((
packed
))
WRITE_EEPROM_COMMAND_FORMAT
;
typedef
struct
_CONNECTION_PARAMETER_FORMAT
{
unsigned
char
status
;
unsigned
short
minInterval
;
unsigned
short
maxInterval
;
unsigned
short
latency
;
unsigned
short
connectionTimeout
;
}
__attribute__
((
packed
))
CONNECTION_PARAMETER_FORMAT
;
@protocol
MyPeripheralDelegate
;
@interface
MyPeripheral
:
NSObject
{
@private
char
advData
[
25
];
char
deviceName
[
16
];
NSMutableArray
*
queuedTask
;
}
@property
(
assign
)
id
<
MyPeripheralDelegate
>
transDataDelegate
;
@property
(
assign
)
id
<
MyPeripheralDelegate
>
proprietaryDelegate
;
@property
(
assign
)
id
<
MyPeripheralDelegate
>
deviceInfoDelegate
;
@property
(
retain
)
CBPeripheral
*
peripheral
;
@property
(
copy
)
NSString
*
advName
;
@property
(
assign
)
uint8_t
connectStaus
;
@property
(
assign
)
BOOL
canSendData
;
//DIS
@property
(
retain
)
CBCharacteristic
*
manufactureNameChar
;
@property
(
retain
)
CBCharacteristic
*
modelNumberChar
;
@property
(
retain
)
CBCharacteristic
*
serialNumberChar
;
@property
(
retain
)
CBCharacteristic
*
hardwareRevisionChar
;
@property
(
retain
)
CBCharacteristic
*
firmwareRevisionChar
;
@property
(
retain
)
CBCharacteristic
*
softwareRevisionChar
;
@property
(
retain
)
CBCharacteristic
*
systemIDChar
;
@property
(
retain
)
CBCharacteristic
*
certDataListChar
;
@property
(
retain
)
CBCharacteristic
*
specificChar1
;
@property
(
retain
)
CBCharacteristic
*
specificChar2
;
//Proprietary
@property
(
retain
)
CBCharacteristic
*
airPatchChar
;
@property
(
retain
)
CBCharacteristic
*
transparentDataWriteChar
;
@property
(
retain
)
CBCharacteristic
*
transparentDataReadChar
;
@property
(
retain
)
CBCharacteristic
*
connectionParameterChar
;
@property
(
assign
)
uint8_t
updateConnectionParameterStep
;
@property
(
readonly
)
ReliableBurstData
*
transmit
;
@property
(
assign
)
CONNECTION_PARAMETER_FORMAT
connectionParameter
;
@property
(
assign
)
CONNECTION_PARAMETER_FORMAT
backupConnectionParameter
;
@property
(
assign
)
BOOL
vendorMPEnable
;
@property
(
assign
)
short
airPatchAction
;
@property
(
assign
)
BOOL
isNotifying
;
-
(
CONNECTION_PARAMETER_FORMAT
*
)
retrieveBackupConnectionParameter
;
-
(
void
)
updateBackupConnectionParameter
:(
CONNECTION_PARAMETER_FORMAT
*
)
parameter
;
-
(
BOOL
)
compareBackupConnectionParameter
:(
CONNECTION_PARAMETER_FORMAT
*
)
parameter
;
-
(
void
)
checkConnectionParameterStatus
;
-
(
void
)
sendVendorMPEnable
;
-
(
void
)
updateAirPatchEvent
:
(
NSData
*
)
returnEvent
;
-
(
void
)
writeE2promValue
:
(
short
)
address
length
:(
short
)
length
data
:(
char
*
)
data
;
-
(
void
)
readE2promValue
:
(
short
)
address
length
:(
short
)
length
;
-
(
void
)
writeMemoryValue
:
(
short
)
address
length
:(
short
)
length
data
:(
char
*
)
data
;
-
(
void
)
readMemoryValue
:
(
short
)
address
length
:(
short
)
length
;
-
(
CBCharacteristicWriteType
)
sendTransparentData
:(
NSData
*
)
data
type
:(
CBCharacteristicWriteType
)
type
;
-
(
void
)
setTransDataNotification
:(
BOOL
)
notify
;
-
(
NSError
*
)
setMaxConnectionInterval
:(
unsigned
short
)
maxInterval
connectionTimeout
:(
unsigned
short
)
connectionTimeout
connectionLatency
:(
unsigned
short
)
connectionLatency
;
-
(
void
)
checkIsAllowUpdateConnectionParameter
;
-
(
void
)
changePeripheralName
:
(
NSString
*
)
name
;
-
(
void
)
readManufactureName
;
-
(
void
)
readModelNumber
;
-
(
void
)
readSerialNumber
;
-
(
void
)
readHardwareRevision
;
-
(
void
)
readFirmwareRevision
;
-
(
void
)
readSoftwareRevison
;
-
(
void
)
readSystemID
;
-
(
void
)
readCertificationData
;
-
(
void
)
readSpecificUUID1
;
-
(
void
)
readSpecificUUID2
;
@end
@protocol
MyPeripheralDelegate
<
NSObject
>
@optional
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateConnectionParameterAllowStatus
:(
BOOL
)
status
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateConnectionParameterStatus
:(
BOOL
)
status
interval
:(
unsigned
short
)
interval
timeout
:(
unsigned
short
)
timeout
latency
:(
unsigned
short
)
latency
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didChangePeripheralName
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didReceiveTransparentData
:(
NSData
*
)
data
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didReceiveMemoryAddress
:(
NSData
*
)
address
length
:(
short
)
length
data
:(
NSData
*
)
data
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didWriteMemoryAddress
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didSendTransparentDataStatus
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateTransDataNotifyStatus
:(
BOOL
)
notify
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateManufactureName
:(
NSString
*
)
name
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateModelNumber
:(
NSString
*
)
modelNumber
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateSerialNumber
:(
NSString
*
)
serialNumber
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateHardwareRevision
:(
NSString
*
)
hardwareRevision
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateFirmwareRevision
:(
NSString
*
)
firmwareRevision
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateSoftwareRevision
:(
NSString
*
)
softwareRevision
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateSystemId
:(
NSData
*
)
systemId
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateIEEE_11073_20601
:(
NSData
*
)
IEEE_11073_20601
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateSpecificUUID1
:(
NSData
*
)
value
error
:(
NSError
*
)
error
;
-
(
void
)
MyPeripheral
:(
MyPeripheral
*
)
peripheral
didUpdateSpecificUUID2
:(
NSData
*
)
value
error
:(
NSError
*
)
error
;
@end
GeliBusinessPlatform/Other/SDK/GPrinter/include/ReliableBurstData.h
0 → 100644
View file @
97410ffa
//
// ReliableBurstData.h
// ReliableBurstData
//
// Created by Rick on 14/2/19.
// Copyright (c) 2014 ISSC Technologies Corporation. All rights reserved.
//
/*!
* @file ReliableBurstData.h
* @framework ReliableBurstData
*
* @discussion Entry point to the ReliableBurstTransmit.
*
* @copyright 2014 ISSC Technologies Corporation. All rights reserved.
*/
#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>
@protocol
ReliableBurstDataDelegate
;
@interface
ReliableBurstData
:
NSObject
/*!
* @method transmitSize
*
* @return Max package size to transmit
*/
-
(
NSUInteger
)
transmitSize
;
/*!
* @method reliableBurstTransmit:withTransparentCharacteristic:
*
* @discussion Send reliableBurstTransmit with special characteristic
*
* @param data Data to transmit
* @param transparentDataWriteChar Characteristic to transmit
*/
-
(
void
)
reliableBurstTransmit
:(
NSData
*
)
data
withTransparentCharacteristic
:(
CBCharacteristic
*
)
transparentDataWriteChar
;
/*!
* @method canSendReliableBurstTransmit
*
* @return YES if the data can be sent, or NO if the transmission queue is full. If NO was returned,
* wait for it return YES to send new data.
*/
-
(
BOOL
)
canSendReliableBurstTransmit
;
/*!
*
*
* @return YES if the accessory can disconnect now, or NO if the transmission is busy.
* If NO was returned, wait for it return YES to disconnect.
* @discussion
* For example:
* int count = 0;
while (![reliableBurstData canDisconnect]) {
sleep(1);
count++;
if (count >= 10) {
break;
}
}
dispatch_async(dispatch_get_main_queue(), ^{
[manager cancelPeripheralConnection:peripheral];
});
*/
-
(
BOOL
)
canDisconnect
;
/*!
* @method decodeReliableBurstTransmitEvent:
*
* @param eventData The eventData need to decode for reliableBurstTransmit
*
* @discussion This method decodes the events of reliable burst transmition, it should parse all the values
* of air patch characteristic first when receiving notifications.
* For example:
* - (void)updateAirPatchEvent: (NSData *)returnEvent {
[reliableBurstData decodeReliableBurstTransmitEvent:returnEvent];
...
}
*/
-
(
void
)
decodeReliableBurstTransmitEvent
:(
NSData
*
)
eventData
;
/*!
* @method enableReliableBurstTransmit:andAirPatchCharacteristic:
*
* @param peripheral CBPeripheral to enable ReliableBurstTransmit
* @param airPatchCharacteristic CBCharacteristic with airPatch characteristic
*
* @discussion Ues this method to enable ReliableBurstTransmit.
* This method have to be called before sending data.
*
* For example:
* - (void) peripheral:(CBPeripheral *)aPeripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error {
if ([service.UUID isEqual:[CBUUID UUIDWithString:UUIDSTR_ISSC_PROPRIETARY_SERVICE]])
for (aChar in service.characteristics)
{
if ([aChar.UUID isEqual:[CBUUID UUIDWithString:UUIDSTR_AIR_PATCH_CHAR]]) {
[reliableBurstData enableReliableBurstTransmit:aPeripheral andAirPatchCharacteristic:aChar];
}
}
}
*/
-
(
void
)
enableReliableBurstTransmit
:(
CBPeripheral
*
)
peripheral
andAirPatchCharacteristic
:(
CBCharacteristic
*
)
airPatchCharacteristic
;
/*!
* @method isReliableBurstTransmit:
*
* @param transparentDataWriteChar The parameter should input the CBCharacteristic object of didWriteValueForCharacteristic: delegate
*
* @return YES if writeValue:forCharacteristic:type: with CBCharacteristicWriteWithResponse type is call by ReliableBurstTransmit.
*
* @discussion This library will use CBCharacteristicWriteWithResponse type when accessory doesn't
* support ReliableBurstTransmit feature. This method informs library the data have been sent.
*
* For example:
* - (void) peripheral:(CBPeripheral *)aPeripheral didWriteValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
{
if ([reliableBurstData isReliableBurstTransmit:characteristic]) {
return;
}
// Other code
}
*
*/
-
(
BOOL
)
isReliableBurstTransmit
:(
CBCharacteristic
*
)
transparentDataWriteChar
;
/*!
* @method version
*
* @return Version number with major.minor format.
*/
-
(
NSString
*
)
version
;
@property
(
nonatomic
,
weak
)
id
<
ReliableBurstDataDelegate
>
delegate
;
@end
@protocol
ReliableBurstDataDelegate
<
NSObject
>
/*!
* @method reliableBurstData:didSendDataWithCharacteristic:
*
* @discussion This method is invoked when the data has been sent.
*
*/
-
(
void
)
reliableBurstData
:(
ReliableBurstData
*
)
reliableBurstData
didSendDataWithCharacteristic
:(
CBCharacteristic
*
)
transparentDataWriteChar
;
@end
GeliBusinessPlatform/Other/SDK/GPrinter/include/TscCommand.h
0 → 100644
View file @
97410ffa
//
// TscCommand.h
// Gprinter
//
// Created by Wind on 14/12/22.
// Copyright (c) 2014年 JiaBo. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
TscCommand
:
NSObject
@property
(
nonatomic
,
assign
)
BOOL
hasResponse
;
/**
* 方法说明:设置标签尺寸的宽和高
* @param width 标签宽度
* @param height 标签高度
* @return void
*/
-
(
void
)
addSize
:(
int
)
width
:
(
int
)
height
;
/**
* 方法说明:设置标签间隙尺寸 单位mm
* @param m 间隙长度
* @param n 间隙偏移
* @return void
*/
-
(
void
)
addGapWithM
:(
int
)
m
withN
:
(
int
)
n
;
/**
* 方法说明:设置标签原点坐标
* @param x 横坐标
* @param y 纵坐标
* @return void
*/
-
(
void
)
addReference
:(
int
)
x
:
(
int
)
y
;
/**
* 方法说明:设置打印速度
* @param speed 打印速度
* @return void
*/
-
(
void
)
addSpeed
:(
int
)
speed
;
/**
* 方法说明:设置打印浓度
* @param density 浓度
* @return void
*/
-
(
void
)
addDensity
:(
int
)
density
;
/**
* 方法说明:设置打印方向
* @param direction 方向
* @return void
*/
-
(
void
)
addDirection
:(
int
)
direction
;
/**
* 方法说明:清除打印缓冲区
* @return void
*/
-
(
void
)
addCls
;
/**
* 方法说明:在标签上绘制文字
* @param x 横坐标
* @param y 纵坐标
* @param font 字体类型
* @param rotation 旋转角度
* @param Xscal 横向放大
* @param Yscal 纵向放大
* @param text 文字字符串
* @return void
*/
-
(
void
)
addTextwithX
:(
int
)
x
withY
:(
int
)
y
withFont
:
(
NSString
*
)
font
withRotation
:
(
int
)
rotation
withXscal
:
(
int
)
Xscal
withYscal
:
(
int
)
Yscal
withText
:
(
NSString
*
)
text
;
/*
BITMAP X, Y, width, height, mode, bitmap data
参 数 说 明
x 点阵影像的水平启始位置
y 点阵影像的垂直启始位置
width 影像的宽度,以 byte 表示
height 影像的高度,以点(dot)表示
mode 影像绘制模式
0 OVERWRITE
1 OR
2 XOR
bitmap data 影像数据
*/
-
(
void
)
addBitmapwithX
:(
int
)
x
withY
:(
int
)
y
withWidth
:
(
int
)
width
withHeight
:
(
int
)
height
withMode
:
(
int
)
mode
withData
:
(
NSData
*
)
data
;
/**
* 方法说明:在标签上绘制一维条码
* @param x 横坐标
* @param y 纵坐标
* @param barcodetype 条码类型
* @param height 条码高度,默认为40
* @param readable 是否可识别,0: 人眼不可识,1: 人眼可识
* @param rotation 旋转角度,条形码旋转角度,顺时钟方向,0不旋转,90顺时钟方向旋转90度,180顺时钟方向旋转180度,270顺时钟方向旋转270度
* @param Narrow 默认值2,窄 bar 宽度,以点(dot)表示
* @param Wide 默认值4,宽 bar 宽度,以点(dot)表示
* @param content 条码内容
* @return void
BARCODE X,Y,"code type",height,human readable,rotation,narrow,wide,"code"
BARCODE 100,100,"39",40,1,0,2,4,"1000"
BARCODE 10,10,"128",40,1,0,2,2,"124096ABCDEFZ$%+-./*"
"code type":
EAN13("EAN13"),
EAN8("EAN8"),
UPCA("UPCA"),
ITF14("ITF14"),
CODE39("39"),
CODE128("128"),
*/
-
(
void
)
add1DBarcode
:(
int
)
x
:
(
int
)
y
:
(
NSString
*
)
barcodetype
:
(
int
)
height
:
(
int
)
readable
:
(
int
)
rotation
:
(
int
)
Narrow
:
(
int
)
Wide
:
(
NSString
*
)
content
;
/**
* 方法说明:在标签上绘制QRCode二维码
* @param x 横坐标
* @param y 纵坐标
* @param ecclever 选择QRCODE纠错等级,L为7%,M为15%,Q为25%,H为30%
* @param cellwidth 二维码宽度1~10,默认为4
* @param mode 默认为A,A为Auto,M为Manual
* @param rotation 旋转角度,QRCode二维旋转角度,顺时钟方向,0不旋转,90顺时钟方向旋转90度,180顺时钟方向旋转180度,270顺时钟方向旋转270度
* @param content 条码内容
* @return void
* QRCODE X,Y ,ECC LEVER ,cell width,mode,rotation, "data string"
* QRCODE 20,24,L,4,A,0,"佳博集团网站www.Gprinter.com.cn"
*/
-
(
void
)
addQRCode
:(
int
)
x
:
(
int
)
y
:
(
NSString
*
)
ecclever
:
(
int
)
cellwidth
:
(
NSString
*
)
mode
:
(
int
)
rotation
:
(
NSString
*
)
content
;
/**
* 方法说明:执行打印
* @param m
* @param n
* @return void
*/
-
(
void
)
addPrint
:(
int
)
m
:
(
int
)
n
;
/**
* 方法说明:获得打印命令
* @return NSData*
*/
-
(
NSData
*
)
getCommand
;
/**
* 方法说明:将字符串转成十六进制码
* @param str 命令字符串
* @return void
*/
-
(
void
)
addStrToCommand
:(
NSString
*
)
str
;
-
(
void
)
addNSDataToCommand
:(
NSData
*
)
data
;
/**
* 方法说明:发送一些TSC的固定命令,在cls命令之前发送
* @return void
*/
-
(
void
)
addComonCommand
;
/**
* 方法说明:打印自检页,打印测试页
* @return void
*/
-
(
void
)
addSelfTest
;
/**
* 方法说明 :查询打印机型号
* @return void
*/
-
(
void
)
queryPrinterType
;
/**
* 方法说明:设置打印机剥离模式
* @param ON/OFF 是否开启
* @return void
*/
-
(
void
)
addPeel
:(
NSString
*
)
strpar
;
/**
* 方法说明:设置打印机撕离模式
* @param ON/OFF 是否开启
* @return void
*/
-
(
void
)
addTear
:(
NSString
*
)
strpar
;
/**
* 方法说明:设置切刀是否有效
* @param 是否开启 OFF/pieces (0<=pieces<=127)设定几张标签切一次
* @return void
*/
-
(
void
)
addCutter
:(
NSString
*
)
strpar
;
/**
* 方法说明:设置切刀半切是否有效
* @param enable 是否开启
* @return void
*/
-
(
void
)
addPartialCutter
:(
NSString
*
)
strpar
;
/**
* 方法说明:设置蜂鸣器
* @param level 频率
* @param interval 时间ms
* @return void
*/
-
(
void
)
addSound
:(
int
)
level
:
(
int
)
interval
;
/**
* 方法说明:打开钱箱命令,CASHDRAWER m,t1,t2
* @param m 钱箱号 m 0,48 钱箱插座的引脚2 1,49 钱箱插座的引脚5
* @param t1 高电平时间0 ≤ t1 ≤ 255输出由t1和t2设定的钱箱开启脉冲到由m指定的引脚
* @param t2 低电平时间0 ≤ t2 ≤ 255输出由t1和t2设定的钱箱开启脉冲到由m指定的引脚
* @return void
*/
-
(
void
)
addCashdrawer
:(
int
)
m
:
(
int
)
t1
:
(
int
)
t2
;
/**
* 方法说明:在标签上绘制黑块,画线
* @param x 起始横坐标
* @param y 起始纵坐标
* @param width 线宽,以点(dot)表示
* @param height 线高,以点(dot)表示
* @return void
*/
-
(
void
)
addBar
:(
int
)
x
:
(
int
)
y
:
(
int
)
width
:
(
int
)
height
;
/**
* 方法说明:在标签上绘制矩形
* @param xstart 起始横坐标
* @param ystart 起始纵坐标
* @param xend 终点横坐标
* @param yend 终点纵坐标
* @param linethickness 矩形框线厚度或宽度,以点(dot)表示
* @return void
*/
-
(
void
)
addBox
:(
int
)
xstart
:
(
int
)
ystart
:
(
int
)
xend
:
(
int
)
yend
:
(
int
)
linethickness
;
/**
* 方法说明:查询打印机状态<ESC>!?
*询问打印机状态指令为立即响应型指令,该指令控制字符是以<ESC> (ASCII 27=0x1B, escape字符)为控制字符.!(ASCII 33=0x21),?(ASCII 63=0x3F)
*即使打印机在错误状态中仍能透过 RS-232 回传一个 byte 资料来表示打印机状态,若回传值为 0 则表示打印
*机处于正常的状态
* @return void
*/
-
(
void
)
queryPrinterStatus
;
/**
* 方法说明:将指定的区域反向打印(黑色变成白色,白色变成黑色)
* @param xstart 起始横坐标
* @param ystart 起始横坐标
* @param xwidth X坐标方向宽度,dot为单位
* @param yheight Y坐标方向高度,dot为单位
*/
-
(
void
)
addReverse
:(
int
)
xstart
:
(
int
)
ystart
:
(
int
)
xwidth
:
(
int
)
yheight
;
@end
GeliBusinessPlatform/Other/SDK/GPrinter/libGSDK.a
0 → 100644
View file @
97410ffa
File added
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.swift
View file @
97410ffa
...
...
@@ -10,8 +10,13 @@ import UIKit
protocol
DaiKeXiaDanGouWuCellDelegate
{
func
DaiKeXiaDanGouWuCellDelAction
(
cell
:
DaiKeXiaDanGouWuCell
)
func
DaiKeXiaDanGouWuCellRemarkChange
(
cell
:
DaiKeXiaDanGouWuCell
)
func
DaiKeXiaDanGouWuCell_check
(
cell
:
DaiKeXiaDanGouWuCell
)
}
class
DaiKeXiaDanGouWuCell
:
UITableViewCell
,
UITextViewDelegate
{
@IBOutlet
weak
var
arrow_img
:
UIImageView
!
@IBOutlet
weak
var
check_button
:
UIButton
!
var
isFx
=
false
var
delegate
:
DaiKeXiaDanGouWuCellDelegate
?
@IBOutlet
weak
var
bz_lbl
:
UILabel
!
@IBOutlet
weak
var
changeBtn
:
UIButton
!
...
...
@@ -25,7 +30,21 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
@IBOutlet
weak
var
detailLbl
:
UILabel
!
@IBOutlet
weak
var
titleLbl
:
UILabel
!
@IBOutlet
weak
var
diLbl
:
UILabel
!
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
if
isFx
{
check_button
.
isHidden
=
false
arrow_img
.
isHidden
=
false
bz_lbl
.
isHidden
=
true
holder_lbl
.
isHidden
=
true
content_tv
.
isHidden
=
true
edit_img
.
isHidden
=
true
delImg
.
isHidden
=
true
delBtn
.
isHidden
=
true
diLbl
.
isHidden
=
false
priceLbl
.
isHidden
=
false
}
}
@IBOutlet
weak
var
yu_shou_img
:
UIImageView
!
var
isDetail
=
false
{
didSet
{
...
...
@@ -52,6 +71,11 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
content_tv
.
delegate
=
self
// Initialization code
}
@IBAction
func
check_action
(
_
sender
:
UIButton
)
{
delegate
?
.
DaiKeXiaDanGouWuCell_check
(
cell
:
self
)
}
func
textViewDidChange
(
_
textView
:
UITextView
)
{
if
textView
.
text
.
count
>
0
{
holder_lbl
.
isHidden
=
true
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuCell.xib
View file @
97410ffa
...
...
@@ -12,14 +12,14 @@
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"DaiKeXiaDanGouWuCell"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"2
6
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"2
5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"2
6
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"2
5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"oAm-E1-HwQ"
>
<rect
key=
"frame"
x=
"15"
y=
"2
5
9"
width=
"360"
height=
"1"
/>
<rect
key=
"frame"
x=
"15"
y=
"2
4
9"
width=
"360"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"灰色分界线"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"END-QU-37t"
/>
...
...
@@ -93,7 +93,7 @@
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"WMj-FN-Sws"
>
<rect
key=
"frame"
x=
"15"
y=
"125"
width=
"345"
height=
"1
1
9"
/>
<rect
key=
"frame"
x=
"15"
y=
"125"
width=
"345"
height=
"1
0
9"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"5kg/箱/袋"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"LBB-wB-bMd"
>
<rect
key=
"frame"
x=
"10"
y=
"10"
width=
"49"
height=
"13.5"
/>
...
...
@@ -102,26 +102,26 @@
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥260.00*12"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"X1B-vl-mvy"
>
<rect
key=
"frame"
x=
"10"
y=
"
5
9"
width=
"61.5"
height=
"13.5"
/>
<rect
key=
"frame"
x=
"10"
y=
"
4
9"
width=
"61.5"
height=
"13.5"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"点击填写备注"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"WVL-NG-HsK"
>
<rect
key=
"frame"
x=
"38.5"
y=
"
8
1.5"
width=
"78"
height=
"18.5"
/>
<rect
key=
"frame"
x=
"38.5"
y=
"
7
1.5"
width=
"78"
height=
"18.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"蓝色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"bianji"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Dmd-Un-AkZ"
>
<rect
key=
"frame"
x=
"10"
y=
"
8
2.5"
width=
"16"
height=
"16"
/>
<rect
key=
"frame"
x=
"10"
y=
"
7
2.5"
width=
"16"
height=
"16"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"16"
id=
"MMn-yf-xWV"
/>
<constraint
firstAttribute=
"height"
constant=
"16"
id=
"muF-aA-q6u"
/>
</constraints>
</imageView>
<textView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
textAlignment=
"natural"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"CW3-oD-5Hm"
>
<rect
key=
"frame"
x=
"36"
y=
"
7
5"
width=
"299"
height=
"36"
/>
<rect
key=
"frame"
x=
"36"
y=
"
6
5"
width=
"299"
height=
"36"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"36"
id=
"sxT-0i-iXD"
/>
...
...
@@ -131,13 +131,13 @@
<textInputTraits
key=
"textInputTraits"
autocapitalizationType=
"sentences"
/>
</textView>
<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=
"ykh-Oc-5e6"
>
<rect
key=
"frame"
x=
"10"
y=
"
8
3"
width=
"33"
height=
"15.5"
/>
<rect
key=
"frame"
x=
"10"
y=
"
7
3"
width=
"33"
height=
"15.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥51153.00"
textAlignment=
"right"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Rio-TZ-iyo"
>
<rect
key=
"frame"
x=
"283.5"
y=
"
33
.5"
width=
"51.5"
height=
"15.5"
/>
<rect
key=
"frame"
x=
"283.5"
y=
"
28
.5"
width=
"51.5"
height=
"15.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -149,11 +149,28 @@
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"数量"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"3f3-RV-d16"
>
<rect
key=
"frame"
x=
"10"
y=
"
33
.5"
width=
"22"
height=
"15.5"
/>
<rect
key=
"frame"
x=
"10"
y=
"
28
.5"
width=
"22"
height=
"15.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
hidden=
"YES"
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"DvI-Hk-ZNE"
>
<rect
key=
"frame"
x=
"244"
y=
"40.5"
width=
"78"
height=
"31"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<state
key=
"normal"
title=
"查看溯源信息"
>
<color
key=
"titleColor"
name=
"#F57575"
/>
</state>
<connections>
<action
selector=
"check_action:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"WR3-RW-mnT"
/>
</connections>
</button>
<imageView
hidden=
"YES"
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"red_arrow"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2p2-7L-Hi7"
>
<rect
key=
"frame"
x=
"327"
y=
"52.5"
width=
"3"
height=
"7"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"3"
id=
"Dwj-HF-JHh"
/>
<constraint
firstAttribute=
"height"
constant=
"7"
id=
"IWn-Vh-ajY"
/>
</constraints>
</imageView>
</subviews>
<color
key=
"backgroundColor"
name=
"app底色"
/>
<constraints>
...
...
@@ -161,14 +178,18 @@
<constraint
firstAttribute=
"trailing"
secondItem=
"CW3-oD-5Hm"
secondAttribute=
"trailing"
constant=
"10"
id=
"6vz-aS-Foq"
/>
<constraint
firstItem=
"CW3-oD-5Hm"
firstAttribute=
"leading"
secondItem=
"Dmd-Un-AkZ"
secondAttribute=
"trailing"
constant=
"10"
id=
"7n2-Vb-3XY"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"JyG-Tf-6Jd"
secondAttribute=
"trailing"
constant=
"10"
id=
"9AX-WF-nFt"
/>
<constraint
firstItem=
"X1B-vl-mvy"
firstAttribute=
"top"
secondItem=
"3f3-RV-d16"
secondAttribute=
"bottom"
constant=
"10"
id=
"G0k-U9-DVo"
/>
<constraint
firstItem=
"DvI-Hk-ZNE"
firstAttribute=
"centerY"
secondItem=
"X1B-vl-mvy"
secondAttribute=
"centerY"
id=
"C4k-rd-zb7"
/>
<constraint
firstItem=
"X1B-vl-mvy"
firstAttribute=
"top"
secondItem=
"3f3-RV-d16"
secondAttribute=
"bottom"
constant=
"5"
id=
"G0k-U9-DVo"
/>
<constraint
firstItem=
"LBB-wB-bMd"
firstAttribute=
"leading"
secondItem=
"WMj-FN-Sws"
secondAttribute=
"leading"
constant=
"10"
id=
"L6M-kd-Qvr"
/>
<constraint
firstItem=
"Rio-TZ-iyo"
firstAttribute=
"centerY"
secondItem=
"3f3-RV-d16"
secondAttribute=
"centerY"
id=
"MHT-Tf-HPF"
/>
<constraint
firstItem=
"3f3-RV-d16"
firstAttribute=
"top"
secondItem=
"LBB-wB-bMd"
secondAttribute=
"bottom"
constant=
"10"
id=
"RhT-R5-aDU"
/>
<constraint
firstItem=
"3f3-RV-d16"
firstAttribute=
"top"
secondItem=
"LBB-wB-bMd"
secondAttribute=
"bottom"
constant=
"5"
id=
"RhT-R5-aDU"
/>
<constraint
firstItem=
"2p2-7L-Hi7"
firstAttribute=
"leading"
secondItem=
"DvI-Hk-ZNE"
secondAttribute=
"trailing"
constant=
"5"
id=
"T3l-7I-23e"
/>
<constraint
firstItem=
"WVL-NG-HsK"
firstAttribute=
"centerY"
secondItem=
"Dmd-Un-AkZ"
secondAttribute=
"centerY"
id=
"VEI-Ck-HWY"
/>
<constraint
firstItem=
"2p2-7L-Hi7"
firstAttribute=
"centerY"
secondItem=
"DvI-Hk-ZNE"
secondAttribute=
"centerY"
id=
"XFT-vs-Mev"
/>
<constraint
firstItem=
"LBB-wB-bMd"
firstAttribute=
"top"
secondItem=
"WMj-FN-Sws"
secondAttribute=
"top"
constant=
"10"
id=
"Xri-zi-cci"
/>
<constraint
firstItem=
"CW3-oD-5Hm"
firstAttribute=
"centerY"
secondItem=
"Dmd-Un-AkZ"
secondAttribute=
"centerY"
constant=
"2.5"
id=
"ZiM-2r-dAw"
/>
<constraint
firstItem=
"Dmd-Un-AkZ"
firstAttribute=
"leading"
secondItem=
"WMj-FN-Sws"
secondAttribute=
"leading"
constant=
"10"
id=
"a7j-vt-r1P"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"2p2-7L-Hi7"
secondAttribute=
"trailing"
constant=
"15"
id=
"bVc-mK-6cd"
/>
<constraint
firstItem=
"ykh-Oc-5e6"
firstAttribute=
"centerY"
secondItem=
"Dmd-Un-AkZ"
secondAttribute=
"centerY"
id=
"cCR-3w-9NS"
/>
<constraint
firstItem=
"ykh-Oc-5e6"
firstAttribute=
"leading"
secondItem=
"WMj-FN-Sws"
secondAttribute=
"leading"
constant=
"10"
id=
"das-yY-Rxy"
/>
<constraint
firstItem=
"JyG-Tf-6Jd"
firstAttribute=
"centerY"
secondItem=
"LBB-wB-bMd"
secondAttribute=
"centerY"
id=
"lKC-hA-bwp"
/>
...
...
@@ -210,9 +231,11 @@
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"arrow_img"
destination=
"2p2-7L-Hi7"
id=
"iJ8-Mg-yL3"
/>
<outlet
property=
"btmLIneWidth"
destination=
"qMJ-nI-cSg"
id=
"dsM-yO-8bv"
/>
<outlet
property=
"bz_lbl"
destination=
"ykh-Oc-5e6"
id=
"1JL-Gh-kqG"
/>
<outlet
property=
"changeBtn"
destination=
"4lb-rz-I6F"
id=
"OEf-1Q-OVb"
/>
<outlet
property=
"check_button"
destination=
"DvI-Hk-ZNE"
id=
"egI-io-mdA"
/>
<outlet
property=
"content_tv"
destination=
"CW3-oD-5Hm"
id=
"FqB-Cg-d4n"
/>
<outlet
property=
"count_lbl"
destination=
"3f3-RV-d16"
id=
"mVi-eZ-CLv"
/>
<outlet
property=
"delBtn"
destination=
"eKc-LO-OD0"
id=
"sTb-4h-fLY"
/>
...
...
@@ -233,8 +256,12 @@
</objects>
<resources>
<image
name=
"bianji"
width=
"17"
height=
"16.5"
/>
<image
name=
"red_arrow"
width=
"4"
height=
"8"
/>
<image
name=
"shanchuDel"
width=
"15"
height=
"15"
/>
<image
name=
"yushou"
width=
"34"
height=
"18"
/>
<namedColor
name=
"#F57575"
>
<color
red=
"0.96100002527236938"
green=
"0.45899999141693115"
blue=
"0.45899999141693115"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"app底色"
>
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
97410ffa
...
...
@@ -10,6 +10,10 @@ import UIKit
import
IQKeyboardManagerSwift
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
DZGLViewControllerDelegate
,
XuanZeShangPinViewControllerDelegate
,
DaiKeXiaDanGouWuCellDelegate
,
GuanLianKehuVCDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
,
UITextFieldDelegate
{
func
DaiKeXiaDanGouWuCell_check
(
cell
:
DaiKeXiaDanGouWuCell
)
{
//此处无用
}
func
DaiKeXiaDanGouWuCellRemarkChange
(
cell
:
DaiKeXiaDanGouWuCell
)
{
let
data
=
cellDataArr
[
cell
.
tag
]
data
.
remark
=
cell
.
content_tv
.
text
...
...
@@ -685,7 +689,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
1
{
return
2
6
0
return
2
5
0
}
if
indexPath
.
section
==
2
{
//新增预售
if
orderType
==
1
{
...
...
GeliBusinessPlatform/ViewController/分销订单管理/RetailManageDetailViewController.swift
View file @
97410ffa
...
...
@@ -8,7 +8,20 @@
import
UIKit
class
RetailManageDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
class
RetailManageDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
DaiKeXiaDanGouWuCellDelegate
{
func
DaiKeXiaDanGouWuCellDelAction
(
cell
:
DaiKeXiaDanGouWuCell
)
{
//此处无用
}
func
DaiKeXiaDanGouWuCellRemarkChange
(
cell
:
DaiKeXiaDanGouWuCell
)
{
//此处无用
}
func
DaiKeXiaDanGouWuCell_check
(
cell
:
DaiKeXiaDanGouWuCell
)
{
//查溯源
print
(
"check S_Y"
)
}
let
goodsTitleArr
=
[
"商品合计"
]
let
fenxiaoTitleArr
=
[
"分销角色"
,
"结算方式"
,
"佣金方式"
,
"佣金结算时间"
,
"佣金分销结算"
]
...
...
@@ -24,7 +37,7 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
listView
.
separatorStyle
=
.
none
listView
.
register
(
UINib
(
nibName
:
"GLKHCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"GLKHCell"
)
listView
.
register
(
UINib
(
nibName
:
"
XuanZeShangPinCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"XuanZeShangPin
Cell"
)
listView
.
register
(
UINib
(
nibName
:
"
DaiKeXiaDanGouWuCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"DaiKeXiaDanGouWu
Cell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
loadData
()
...
...
@@ -91,26 +104,33 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
case
0
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GLKHCell"
)
as!
GLKHCell
cell
.
nameLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
user_name
cell
.
contentLbl
.
text
=
""
cell
.
contentLbl
.
text
=
self
.
dataMdoel
?
.
order_res
!.
pay_status_cn
cell
.
contentLbl
.
textColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
cell
.
contentLbl_right
.
constant
=
-
12
cell
.
gotoImgV
.
isHidden
=
true
return
cell
case
1
:
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"
XuanZeShangPinCell"
)
as!
XuanZeShangPin
Cell
cell
.
priceLbl
.
isHidden
=
fals
e
cell
.
selectBtn
.
isHidden
=
true
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"
DaiKeXiaDanGouWuCell"
)
as!
DaiKeXiaDanGouWu
Cell
cell
.
isFx
=
tru
e
let
rowModel
=
self
.
dataMdoel
?
.
order_goods
!
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
rowModel
?
.
goods_name
cell
.
iconImg
?
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
(
rowModel
?
.
goods_thumb
)
!
))
cell
.
titleLbl
.
text
=
rowModel
?
.
goods_name
cell
.
imgView
?
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
(
rowModel
?
.
goods_thumb
)
!
))
if
rowModel
?
.
goods_attr
!=
nil
{
cell
.
detailLbl
.
text
=
(
rowModel
?
.
goods_attr
)
!
cell
.
detailLbl
.
text
=
"规格:"
+
(
rowModel
?
.
goods_attr
)
!
}
else
{
cell
.
detailLbl
.
text
=
"-"
cell
.
detailLbl
.
text
=
"
规格:
-"
}
cell
.
detailLbl2
.
text
=
"x"
+
StringByInt
(
number
:
(
rowModel
?
.
cart_number
!
)
!
)
cell
.
priceLbl
.
text
=
"¥"
+
(
rowModel
?
.
goods_price
)
!
+
" "
+
"佣金"
+
(
rowModel
?
.
commission_val
)
!
+
"元"
cell
.
count_lbl
.
text
=
"单价:"
+
(
rowModel
?
.
goods_price
)
!
cell
.
priceLbl
.
text
=
"数量:"
+
StringByInt
(
number
:
(
rowModel
?
.
cart_number
!
)
!
)
cell
.
diLbl
.
text
=
"佣金:¥"
+
(
rowModel
?
.
commission_val
)
!
let
s_p
=
rowModel
?
.
goods_price
as!
NSString
let
p_count
=
Float
((
rowModel
?
.
cart_number
)
!
)
*
s_p
.
floatValue
cell
.
detailLbl2
.
text
=
"小计:"
+
String
(
format
:
"%.2f"
,
p_count
)
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
return
cell
case
2
:
cell
.
nameLbl
.
text
=
goodsTitleArr
[
indexPath
.
row
]
...
...
@@ -206,7 +226,7 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
1
{
return
12
0
return
21
0
}
return
49
}
...
...
GeliBusinessPlatform/ViewController/订单详情/GLKHCell.swift
View file @
97410ffa
...
...
@@ -10,6 +10,7 @@ import UIKit
class
GLKHCell
:
UITableViewCell
{
@IBOutlet
weak
var
gotoImgV
:
UIImageView
!
@IBOutlet
weak
var
contentLbl_right
:
NSLayoutConstraint
!
@IBOutlet
weak
var
titleIconImgV
:
UIImageView
!
@IBOutlet
weak
var
contentLbl
:
UILabel
!
...
...
GeliBusinessPlatform/ViewController/订单详情/GLKHCell.xib
View file @
97410ffa
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"17
156
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"17
701
"
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=
"17
126
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"17
703
"
/>
<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"
/>
...
...
@@ -55,6 +55,7 @@
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"contentLbl"
destination=
"Kh6-Hv-73X"
id=
"QlA-TV-Gyo"
/>
<outlet
property=
"contentLbl_right"
destination=
"XE7-sQ-ZSj"
id=
"6p7-g0-9Yb"
/>
<outlet
property=
"gotoImgV"
destination=
"mzP-Q2-sl2"
id=
"aJ4-Pq-Cpm"
/>
<outlet
property=
"nameLbl"
destination=
"xEs-UK-3s6"
id=
"li2-bd-2cg"
/>
<outlet
property=
"titleIconImgV"
destination=
"fBF-NP-iMf"
id=
"S9A-BB-mKF"
/>
...
...
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
97410ffa
...
...
@@ -1139,7 +1139,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
switch
indexPath
.
section
{
case
1
:
//商品展示heightrow
return
2
6
0
return
2
5
0
case
4
:
//发票信息heightrow
if
segmentIndex
==
0
{
return
180
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment