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
cd36d28b
Commit
cd36d28b
authored
Jan 29, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回调标签打印数据
parent
64d51b76
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
35 deletions
+64
-35
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/printOrder_model/printOrderModel.swift
...nessPlatform/Model/printOrder_model/printOrderModel.swift
+2
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
+43
-24
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+2
-3
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+1
-4
GeliBusinessPlatform/ViewController/溯源/Print_Gprinter_View.swift
...inessPlatform/ViewController/溯源/Print_Gprinter_View.swift
+16
-4
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
cd36d28b
No preview for this file type
GeliBusinessPlatform/Model/printOrder_model/printOrderModel.swift
View file @
cd36d28b
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
import
Foundation
import
Foundation
import
ObjectMapper
import
ObjectMapper
//MARK: - 订单打印信息
//MARK: - 订单打印信息
class
printOrder_model
:
Mappable
{
class
printOrder_model
:
Mappable
{
var
code
:
Int
?
var
code
:
Int
?
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
View file @
cd36d28b
...
@@ -9,7 +9,24 @@
...
@@ -9,7 +9,24 @@
import
UIKit
import
UIKit
import
LGButton
import
LGButton
class
NewCKVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CKNonGmCellDelegate
,
CKGmCellDelegate
,
PiCiXuanZeViewControllerDelegate
,
GLAlertSelectViewDelegate
,
NewSelectItemVcDelegate
,
GeliAlertTextViewDelegate
{
class
NewCKVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CKNonGmCellDelegate
,
CKGmCellDelegate
,
PiCiXuanZeViewControllerDelegate
,
GLAlertSelectViewDelegate
,
NewSelectItemVcDelegate
,
GeliAlertTextViewDelegate
,
Print_Gprinter_View_Delegate
{
func
Print_Gprinter_View_Print
(
data
:
Array
<
Dictionary
<
String
,
Any
>>
)
{
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"o_type"
:
typeSelect
!
+
1
as
Any
,
"audit_remark"
:
remark
as
Any
,
"goods_info"
:
dataChangeString
(
sender
:
goodsInfoArr
)
as
Any
]
HUD
.
show
(
.
progress
)
GoodsOutput
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"出库成功"
),
delay
:
1.2
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
}
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
gmNumber
:
Int
?
var
gmNumber
:
Int
?
...
@@ -113,17 +130,17 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
...
@@ -113,17 +130,17 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
data
.
chuKuLiang
=
num
.
integerValue
data
.
chuKuLiang
=
num
.
integerValue
}
}
}
}
var
goodsInfoArr
:
Array
<
Any
>
=
[]
@IBOutlet
weak
var
gm_view
:
UIView
!
@IBOutlet
weak
var
gm_view
:
UIView
!
@IBAction
func
ck_action
(
_
sender
:
UIButton
)
{
@IBAction
func
ck_action
(
_
sender
:
UIButton
)
{
//
if typeSelect == nil {
if
typeSelect
==
nil
{
//
HUD.flash(.label("请选择出库类型"),delay: 1.2)
HUD
.
flash
(
.
label
(
"请选择出库类型"
),
delay
:
1.2
)
//
return
return
//
}
}
//
if remark.count == 0 {
if
remark
.
count
==
0
{
//
HUD.flash(.label("请填写备注"), delay: 1.2)
HUD
.
flash
(
.
label
(
"请填写备注"
),
delay
:
1.2
)
//
return
return
//
}
}
if
rkSelectArr
.
count
==
0
{
if
rkSelectArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择出库商品"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择出库商品"
),
delay
:
1.2
)
return
return
...
@@ -131,7 +148,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
...
@@ -131,7 +148,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
var
goodsInfoArr
:
Array
<
Any
>
=
[]
goodsInfoArr
.
removeAll
()
for
i
in
0
..<
rkSelectArr
.
count
{
for
i
in
0
..<
rkSelectArr
.
count
{
let
item
=
rkSelectArr
[
i
]
let
item
=
rkSelectArr
[
i
]
var
count
=
0
var
count
=
0
...
@@ -141,6 +158,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
...
@@ -141,6 +158,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
HUD
.
flash
(
.
label
(
"请选择出库商品批次"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请选择出库商品批次"
),
delay
:
1.2
)
return
return
}
}
for
data
in
pici
{
for
data
in
pici
{
count
+=
data
.
chuHuoLiang
!
count
+=
data
.
chuHuoLiang
!
}
}
...
@@ -173,29 +191,30 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
...
@@ -173,29 +191,30 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
goodsInfoArr
.
append
(
goods
)
goodsInfoArr
.
append
(
goods
)
}
}
//
let dict = [
let
dict
=
[
//
"user_token":UserToken as Any,
"user_token"
:
UserToken
as
Any
,
//
"o_type":typeSelect! + 1 as Any,
"o_type"
:
typeSelect
!
+
1
as
Any
,
//
"audit_remark":remark as Any,
"audit_remark"
:
remark
as
Any
,
//
"goods_info":dataChangeString(sender: goodsInfoArr) as Any
"goods_info"
:
dataChangeString
(
sender
:
goodsInfoArr
)
as
Any
//
]
]
if
sender
.
tag
==
1
{
//打印
if
sender
.
tag
==
1
{
//打印
print
(
"连接打印机"
)
print
(
"连接打印机"
)
let
vc
=
Print_Gprinter_View
(
frame
:
self
.
view
.
bounds
)
let
vc
=
Print_Gprinter_View
(
frame
:
self
.
view
.
bounds
)
vc
.
delegate
=
self
vc
.
rkSelectArr
=
rkSelectArr
vc
.
rkSelectArr
=
rkSelectArr
vc
.
piCiArr
=
piCiArr
vc
.
piCiArr
=
piCiArr
self
.
view
.
addSubview
(
vc
)
self
.
view
.
addSubview
(
vc
)
return
return
}
}
HUD
.
show
(
.
progress
)
HUD
.
show
(
.
progress
)
//
GoodsOutput(dict, success: { (data) in
GoodsOutput
(
dict
,
success
:
{
(
data
)
in
//
HUD.hide()
HUD
.
hide
()
//
HUD.flash(.labeledSubSuccess(subtitle: "出库成功"), delay: 1.2)
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"出库成功"
),
delay
:
1.2
)
//
self.navigationController?.popViewController(animated: true)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
//
}) { (error) in
})
{
(
error
)
in
//
//
}
}
}
}
@IBOutlet
weak
var
btmBtn
:
LGButton
!
@IBOutlet
weak
var
btmBtn
:
LGButton
!
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
btmLbl
:
UILabel
!
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
cd36d28b
...
@@ -977,9 +977,8 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -977,9 +977,8 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
indexPath
.
row
==
4
{
if
indexPath
.
row
==
4
{
//MARK: - 查看库存详情
//MARK: - 查看库存详情
print
(
"abc"
)
let
vc
=
S_P_K_C_Detail_Vc
()
// let vc = S_P_K_C_Detail_Vc()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
// self.navigationController?.pushViewController(vc, animated: true)
}
}
}
}
//MARK: - 底部广告软文跳转 && 编辑
//MARK: - 底部广告软文跳转 && 编辑
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
cd36d28b
...
@@ -465,10 +465,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
...
@@ -465,10 +465,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
return
case
59
:
//地址管理
case
59
:
//地址管理
// HUD.flash(.label("敬请期待"),delay: 1.2)
let
vc
=
DZGLViewController
()
// return
let
vc
=
S_P_K_C_Detail_Vc
()
// let vc = DZGLViewController()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
return
case
61
:
//库存商品
case
61
:
//库存商品
...
...
GeliBusinessPlatform/ViewController/溯源/Print_Gprinter_View.swift
View file @
cd36d28b
...
@@ -8,13 +8,15 @@
...
@@ -8,13 +8,15 @@
import
UIKit
import
UIKit
import
LGButton
import
LGButton
protocol
Print_Gprinter_View_Delegate
{
func
Print_Gprinter_View_Print
(
data
:
Array
<
Dictionary
<
String
,
Any
>>
)
}
class
Print_Gprinter_View
:
UIView
,
UITableViewDelegate
,
UITableViewDataSource
,
GPrinter_Cell_Delegate
{
class
Print_Gprinter_View
:
UIView
,
UITableViewDelegate
,
UITableViewDataSource
,
GPrinter_Cell_Delegate
{
func
GPrinter_Cell_print_copy
(
num
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
{
func
GPrinter_Cell_print_copy
(
num
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
{
print_num_arr
.
insert
(
num
,
at
:
cell
.
tag
)
print_num_arr
.
insert
(
num
,
at
:
cell
.
tag
)
print_num_arr
.
remove
(
at
:
cell
.
tag
+
1
)
print_num_arr
.
remove
(
at
:
cell
.
tag
+
1
)
}
}
var
delegate
:
Print_Gprinter_View_Delegate
?
func
GPrinter_Cell_select_item
(
selects
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
{
func
GPrinter_Cell_select_item
(
selects
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
{
pi_ci_select
.
insert
(
selects
,
at
:
cell
.
tag
)
pi_ci_select
.
insert
(
selects
,
at
:
cell
.
tag
)
pi_ci_select
.
remove
(
at
:
cell
.
tag
+
1
)
pi_ci_select
.
remove
(
at
:
cell
.
tag
+
1
)
...
@@ -85,16 +87,26 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
...
@@ -85,16 +87,26 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
temp_print_arr
.
append
(
arr2
)
temp_print_arr
.
append
(
arr2
)
}
}
var
print_data
:
Array
<
Dictionary
<
String
,
Any
>>
=
[]
for
item
in
temp_rk_arr
{
for
item
in
temp_rk_arr
{
let
model
=
rkSelectArr
[
item
]
let
model
=
rkSelectArr
[
item
]
print
(
model
.
goods_name
)
let
select_arr
=
temp_print_arr
[
item
]
let
select_arr
=
temp_print_arr
[
item
]
var
dict
:
Dictionary
<
String
,
Any
>
=
Dictionary
()
for
i
in
select_arr
{
for
i
in
select_arr
{
dict
[
"goods_name"
]
=
model
.
goods_name
let
p
=
piCiArr
!
[
item
][
i
]
let
p
=
piCiArr
!
[
item
][
i
]
dict
[
"goods_data"
]
=
p
let
n
=
print_num_arr
[
item
][
i
]
let
n
=
print_num_arr
[
item
][
i
]
print
(
p
.
p_id
,
n
)
dict
[
"print_counts"
]
=
n
print_data
.
append
(
dict
)
}
}
}
for
item
in
print_data
{
let
data
=
item
[
"goods_data"
]
as!
GetGoodBatchDataModel
print
(
"print_target = "
,
item
[
"goods_name"
],
data
.
batch_id
,
item
[
"print_counts"
])
}
}
//连接打印机
delegate
?
.
Print_Gprinter_View_Print
(
data
:
print_data
)
}
}
@IBAction
func
close_action
(
_
sender
:
UIButton
)
{
@IBAction
func
close_action
(
_
sender
:
UIButton
)
{
...
...
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