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
b6e10e1a
Commit
b6e10e1a
authored
Jan 29, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印界面基本完成
parent
5cf657cd
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
304 additions
and
33 deletions
+304
-33
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
.../junyelu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+9
-9
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/Contents.json
...orm/Assets.xcassets/print/blue_add.imageset/Contents.json
+23
-0
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/jia .png
...Platform/Assets.xcassets/print/blue_add.imageset/jia .png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/jia @2x.png
...tform/Assets.xcassets/print/blue_add.imageset/jia @2x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/jia @3x.png
...tform/Assets.xcassets/print/blue_add.imageset/jia @3x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/Contents.json
...orm/Assets.xcassets/print/blue_del.imageset/Contents.json
+23
-0
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/jian.png
...Platform/Assets.xcassets/print/blue_del.imageset/jian.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/jian@2x.png
...tform/Assets.xcassets/print/blue_del.imageset/jian@2x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/jian@3x.png
...tform/Assets.xcassets/print/blue_del.imageset/jian@3x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/Contents.json
...orm/Assets.xcassets/print/gray_del.imageset/Contents.json
+23
-0
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/jian.png
...Platform/Assets.xcassets/print/gray_del.imageset/jian.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/jian@2x.png
...tform/Assets.xcassets/print/gray_del.imageset/jian@2x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/jian@3x.png
...tform/Assets.xcassets/print/gray_del.imageset/jian@3x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/字体色/#EDF2F7.colorset/Contents.json
...atform/Assets.xcassets/字体色/#EDF2F7.colorset/Contents.json
+38
-0
GeliBusinessPlatform/Assets.xcassets/字体色/Contents.json
GeliBusinessPlatform/Assets.xcassets/字体色/Contents.json
+2
-2
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
+21
-21
GeliBusinessPlatform/ViewController/溯源/GPrinter_Cell.swift
GeliBusinessPlatform/ViewController/溯源/GPrinter_Cell.swift
+124
-1
GeliBusinessPlatform/ViewController/溯源/Print_Gprinter_View.swift
...inessPlatform/ViewController/溯源/Print_Gprinter_View.swift
+41
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b6e10e1a
No preview for this file type
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
b6e10e1a
...
...
@@ -5,24 +5,24 @@
version =
"2.0"
>
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.
SwiftError
Breakpoint"
>
BreakpointExtensionID =
"Xcode.Breakpoint.
Exception
Breakpoint"
>
<BreakpointContent
uuid =
"F
9AAF047-CA09-4A11-834A-7F1E40C91A0A
"
uuid =
"F
57B6C22-5DC5-4E6C-A19E-9F74C6513913
"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
>
continueAfterRunningActions =
"No"
breakpointStackSelectionBehavior =
"1"
scope =
"1"
stopOnStyle =
"0"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.
Exception
Breakpoint"
>
BreakpointExtensionID =
"Xcode.Breakpoint.
SwiftError
Breakpoint"
>
<BreakpointContent
uuid =
"
AA5AC940-8A53-441B-9107-A47EED6E312E
"
uuid =
"
5FC375B9-E594-4117-AFDE-BCF4C6532183
"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
breakpointStackSelectionBehavior =
"1"
scope =
"1"
stopOnStyle =
"0"
>
continueAfterRunningActions =
"No"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
...
...
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/Contents.json
0 → 100644
View file @
b6e10e1a
{
"images"
:
[
{
"filename"
:
"jia .png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"jia @2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"jia @3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/jia .png
0 → 100644
View file @
b6e10e1a
504 Bytes
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/jia @2x.png
0 → 100644
View file @
b6e10e1a
1.01 KB
GeliBusinessPlatform/Assets.xcassets/print/blue_add.imageset/jia @3x.png
0 → 100644
View file @
b6e10e1a
1.91 KB
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/Contents.json
0 → 100644
View file @
b6e10e1a
{
"images"
:
[
{
"filename"
:
"jian.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"jian@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"jian@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/jian.png
0 → 100644
View file @
b6e10e1a
473 Bytes
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/jian@2x.png
0 → 100644
View file @
b6e10e1a
996 Bytes
GeliBusinessPlatform/Assets.xcassets/print/blue_del.imageset/jian@3x.png
0 → 100644
View file @
b6e10e1a
1.85 KB
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/Contents.json
0 → 100644
View file @
b6e10e1a
{
"images"
:
[
{
"filename"
:
"jian.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"jian@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"jian@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/jian.png
0 → 100644
View file @
b6e10e1a
450 Bytes
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/jian@2x.png
0 → 100644
View file @
b6e10e1a
988 Bytes
GeliBusinessPlatform/Assets.xcassets/print/gray_del.imageset/jian@3x.png
0 → 100644
View file @
b6e10e1a
1.81 KB
GeliBusinessPlatform/Assets.xcassets/字体色/#EDF2F7.colorset/Contents.json
0 → 100644
View file @
b6e10e1a
{
"colors"
:
[
{
"color"
:
{
"color-space"
:
"srgb"
,
"components"
:
{
"alpha"
:
"1.000"
,
"blue"
:
"0.969"
,
"green"
:
"0.949"
,
"red"
:
"0.929"
}
},
"idiom"
:
"universal"
},
{
"appearances"
:
[
{
"appearance"
:
"luminosity"
,
"value"
:
"dark"
}
],
"color"
:
{
"color-space"
:
"srgb"
,
"components"
:
{
"alpha"
:
"1.000"
,
"blue"
:
"0.969"
,
"green"
:
"0.949"
,
"red"
:
"0.929"
}
},
"idiom"
:
"universal"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
GeliBusinessPlatform/Assets.xcassets/字体色/Contents.json
View file @
b6e10e1a
{
"info"
:
{
"
version"
:
1
,
"
author"
:
"xcode"
"
author"
:
"xcode"
,
"
version"
:
1
}
}
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
View file @
b6e10e1a
...
...
@@ -116,14 +116,14 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
@IBOutlet
weak
var
gm_view
:
UIView
!
@IBAction
func
ck_action
(
_
sender
:
UIButton
)
{
if
typeSelect
==
nil
{
HUD
.
flash
(
.
label
(
"请选择出库类型"
),
delay
:
1.2
)
return
}
if
remark
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写备注"
),
delay
:
1.2
)
return
}
//
if typeSelect == nil {
//
HUD.flash(.label("请选择出库类型"),delay: 1.2)
//
return
//
}
//
if remark.count == 0 {
//
HUD.flash(.label("请填写备注"), delay: 1.2)
//
return
//
}
if
rkSelectArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择出库商品"
),
delay
:
1.2
)
return
...
...
@@ -173,12 +173,12 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
goodsInfoArr
.
append
(
goods
)
}
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
]
//
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
//
]
if
sender
.
tag
==
1
{
//打印
print
(
"连接打印机"
)
...
...
@@ -189,13 +189,13 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
return
}
HUD
.
show
(
.
progress
)
GoodsOutput
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"出库成功"
),
delay
:
1.2
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
}
//
GoodsOutput(dict, success: { (data) in
//
HUD.hide()
//
HUD.flash(.labeledSubSuccess(subtitle: "出库成功"), delay: 1.2)
//
self.navigationController?.popViewController(animated: true)
//
}) { (error) in
//
//
}
}
@IBOutlet
weak
var
btmBtn
:
LGButton
!
@IBOutlet
weak
var
btmLbl
:
UILabel
!
...
...
GeliBusinessPlatform/ViewController/溯源/GPrinter_Cell.swift
View file @
b6e10e1a
...
...
@@ -9,6 +9,7 @@
import
UIKit
protocol
GPrinter_Cell_Delegate
{
func
GPrinter_Cell_select_item
(
selects
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
func
GPrinter_Cell_print_copy
(
num
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
}
class
GPrinter_Cell
:
UITableViewCell
{
var
delegate
:
GPrinter_Cell_Delegate
?
...
...
@@ -29,6 +30,7 @@ class GPrinter_Cell: UITableViewCell {
}
}
delegate
?
.
GPrinter_Cell_select_item
(
selects
:
select_arr
,
cell
:
self
)
delegate
?
.
GPrinter_Cell_print_copy
(
num
:
print_copy_arr
,
cell
:
self
)
}
@IBOutlet
weak
var
bg_view
:
UIView
!
@IBOutlet
weak
var
all_select_btn
:
UIButton
!
...
...
@@ -39,6 +41,7 @@ class GPrinter_Cell: UITableViewCell {
self
.
selectionStyle
=
.
none
}
func
setUI
(){
if
bg_view
.
subviews
.
count
>
0
{
bg_view
.
subviews
.
forEach
{
(
item
)
in
...
...
@@ -50,6 +53,7 @@ class GPrinter_Cell: UITableViewCell {
if
select_arr
.
count
!=
piciArr
.
count
{
select_arr
.
append
(
999999
)
print_copy_arr
.
append
(
1
)
}
let
view
=
UIView
()
view
.
tag
=
i
...
...
@@ -89,14 +93,133 @@ class GPrinter_Cell: UITableViewCell {
make
.
centerY
.
equalTo
(
btn
.
snp_centerY
)
make
.
centerX
.
equalTo
(
title_lbl_2
.
snp_centerX
)
}
let
textTf
=
UITextField
()
textTf
.
tag
=
i
+
90000
textTf
.
addTarget
(
self
,
action
:
#selector(
textChange(textF:)
)
,
for
:
.
allEditingEvents
)
view
.
addSubview
(
textTf
)
textTf
.
borderStyle
=
.
none
textTf
.
keyboardType
=
.
numberPad
textTf
.
layer
.
borderWidth
=
0.5
textTf
.
layer
.
borderColor
=
UIColor
(
named
:
"灰色分界线"
)?
.
cgColor
textTf
.
backgroundColor
=
UIColor
(
named
:
"#EDF2F7"
)
textTf
.
textColor
=
UIColor
(
named
:
"标题字颜色"
)
textTf
.
text
=
"1"
textTf
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
textTf
.
textAlignment
=
.
center
textTf
.
layer
.
cornerRadius
=
3
textTf
.
layer
.
masksToBounds
=
true
textTf
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerX
.
equalTo
(
title_lbl_3
.
snp_centerX
)
make
.
centerY
.
equalTo
(
btn
.
snp_centerY
)
make
.
width
.
equalTo
(
65
)
make
.
height
.
equalTo
(
37
)
}
let
leftImg
=
UIImageView
()
leftImg
.
tag
=
1000
+
i
leftImg
.
image
=
UIImage
(
named
:
"gray_del"
)
view
.
addSubview
(
leftImg
)
leftImg
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerY
.
equalTo
(
btn
.
snp_centerY
)
make
.
right
.
equalTo
(
textTf
.
snp_left
)
.
offset
(
-
8
)
make
.
width
.
height
.
equalTo
(
20
)
}
let
leftBtn
=
UIButton
()
leftBtn
.
isUserInteractionEnabled
=
false
leftBtn
.
tag
=
20000
+
i
leftBtn
.
addTarget
(
self
,
action
:
#selector(
edit_count(btn:)
)
,
for
:
.
touchUpInside
)
view
.
addSubview
(
leftBtn
)
leftBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
center
.
equalTo
(
leftImg
.
snp_center
)
make
.
width
.
height
.
equalTo
(
28
)
}
let
rightImg
=
UIImageView
()
rightImg
.
tag
=
3000
+
i
rightImg
.
image
=
UIImage
(
named
:
"blue_add"
)
view
.
addSubview
(
rightImg
)
rightImg
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerY
.
equalTo
(
btn
.
snp_centerY
)
make
.
left
.
equalTo
(
textTf
.
snp_right
)
.
offset
(
8
)
make
.
width
.
height
.
equalTo
(
20
)
}
let
rightBtn
=
UIButton
()
rightBtn
.
tag
=
40000
+
i
rightBtn
.
addTarget
(
self
,
action
:
#selector(
edit_count(btn:)
)
,
for
:
.
touchUpInside
)
view
.
addSubview
(
rightBtn
)
rightBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
center
.
equalTo
(
rightImg
.
snp_center
)
make
.
width
.
height
.
equalTo
(
28
)
}
}
}
var
select_arr
:
Array
<
Int
>
=
[]
var
print_copy_arr
:
Array
<
Int
>
=
[]
@objc
func
edit_count
(
btn
:
UIButton
){
if
btn
.
tag
>=
20000
&&
btn
.
tag
<
40000
{
let
tf
=
viewWithTag
(
90000
+
btn
.
tag
-
20000
)
as!
UITextField
var
num
=
Int
(
tf
.
text
!
)
num
!
-=
1
if
num
==
1
{
let
leftBtn
=
viewWithTag
(
btn
.
tag
)
as!
UIButton
leftBtn
.
isUserInteractionEnabled
=
false
let
leftImg
=
viewWithTag
(
1000
+
btn
.
tag
-
20000
)
as!
UIImageView
leftImg
.
image
=
UIImage
(
named
:
"gray_del"
)
}
tf
.
text
=
StringByInt
(
number
:
num
!
)
print_copy_arr
.
insert
(
Int
(
tf
.
text
!
)
!
,
at
:
tf
.
tag
-
90000
)
print_copy_arr
.
remove
(
at
:
tf
.
tag
-
90000
+
1
)
}
if
btn
.
tag
>=
40000
{
let
tf
=
viewWithTag
(
90000
+
btn
.
tag
-
40000
)
as!
UITextField
var
num
=
Int
(
tf
.
text
!
)
num
!
+=
1
tf
.
text
=
StringByInt
(
number
:
num
!
)
let
leftBtn
=
viewWithTag
(
20000
+
btn
.
tag
-
40000
)
as!
UIButton
leftBtn
.
isUserInteractionEnabled
=
true
let
leftImg
=
viewWithTag
(
1000
+
btn
.
tag
-
40000
)
as!
UIImageView
leftImg
.
image
=
UIImage
(
named
:
"blue_del"
)
print_copy_arr
.
insert
(
Int
(
tf
.
text
!
)
!
,
at
:
tf
.
tag
-
90000
)
print_copy_arr
.
remove
(
at
:
tf
.
tag
-
90000
+
1
)
}
delegate
?
.
GPrinter_Cell_print_copy
(
num
:
print_copy_arr
,
cell
:
self
)
}
@objc
func
textChange
(
textF
:
UITextField
){
if
textF
.
text
==
"0"
{
textF
.
text
=
"1"
}
if
textF
.
text
?
.
count
!=
nil
{
print_copy_arr
.
insert
(
Int
(
textF
.
text
!
)
!
,
at
:
textF
.
tag
-
90000
)
print_copy_arr
.
remove
(
at
:
textF
.
tag
-
90000
+
1
)
}
delegate
?
.
GPrinter_Cell_print_copy
(
num
:
print_copy_arr
,
cell
:
self
)
}
override
func
layoutIfNeeded
()
{
super
.
layoutIfNeeded
()
for
i
in
0
..<
bg_view
.
subviews
.
count
{
let
view
=
bg_view
.
subviews
[
i
]
if
print_copy_arr
[
i
]
>
1
{
let
tf
=
viewWithTag
(
90000
+
i
)
as!
UITextField
tf
.
text
=
StringByInt
(
number
:
print_copy_arr
[
i
])
let
leftBtn
=
viewWithTag
(
20000
+
i
)
as!
UIButton
leftBtn
.
isUserInteractionEnabled
=
true
let
leftImg
=
viewWithTag
(
1000
+
i
)
as!
UIImageView
leftImg
.
image
=
UIImage
(
named
:
"blue_del"
)
}
else
{
let
tf
=
viewWithTag
(
90000
+
i
)
as!
UITextField
let
leftBtn
=
viewWithTag
(
20000
+
i
)
as!
UIButton
leftBtn
.
isUserInteractionEnabled
=
false
let
leftImg
=
viewWithTag
(
1000
+
i
)
as!
UIImageView
leftImg
.
image
=
UIImage
(
named
:
"gray_del"
)
tf
.
text
=
StringByInt
(
number
:
print_copy_arr
[
i
])
}
if
view
.
tag
==
select_arr
[
i
]
{
view
.
subviews
.
forEach
{
(
item
)
in
if
item
.
isMember
(
of
:
UIButton
.
classForCoder
()){
...
...
@@ -131,11 +254,11 @@ class GPrinter_Cell: UITableViewCell {
all_select_btn
.
isSelected
=
true
}
delegate
?
.
GPrinter_Cell_select_item
(
selects
:
select_arr
,
cell
:
self
)
delegate
?
.
GPrinter_Cell_print_copy
(
num
:
print_copy_arr
,
cell
:
self
)
}
var
piciArr
:
Array
<
GetGoodBatchDataModel
>
=
[]{
didSet
{
setUI
()
}
}
...
...
GeliBusinessPlatform/ViewController/溯源/Print_Gprinter_View.swift
View file @
b6e10e1a
...
...
@@ -10,6 +10,11 @@ import UIKit
import
LGButton
class
Print_Gprinter_View
:
UIView
,
UITableViewDelegate
,
UITableViewDataSource
,
GPrinter_Cell_Delegate
{
func
GPrinter_Cell_print_copy
(
num
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
{
print_num_arr
.
insert
(
num
,
at
:
cell
.
tag
)
print_num_arr
.
remove
(
at
:
cell
.
tag
+
1
)
}
func
GPrinter_Cell_select_item
(
selects
:
Array
<
Int
>
,
cell
:
GPrinter_Cell
)
{
pi_ci_select
.
insert
(
selects
,
at
:
cell
.
tag
)
pi_ci_select
.
remove
(
at
:
cell
.
tag
+
1
)
...
...
@@ -17,6 +22,8 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
list_view
.
reloadData
()
}
var
print_num_arr
:
Array
<
Array
<
Int
>>
=
[]
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
...
...
@@ -27,6 +34,7 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"GPrinter_Cell"
)
as!
GPrinter_Cell
cell
.
delegate
=
self
cell
.
select_arr
=
pi_ci_select
[
indexPath
.
row
]
cell
.
print_copy_arr
=
print_num_arr
[
indexPath
.
row
]
cell
.
tag
=
indexPath
.
row
let
model
=
rkSelectArr
[
indexPath
.
row
]
cell
.
name_lbl
.
text
=
model
.
goods_name
...
...
@@ -46,6 +54,7 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
didSet
{
for
i
in
0
..<
rkSelectArr
.
count
{
pi_ci_select
.
append
([])
print_num_arr
.
append
([])
}
}
}
//产品选择
...
...
@@ -54,6 +63,38 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
var
pi_ci_select
:
Array
<
Array
<
Int
>>
=
[]
@IBOutlet
weak
var
list_view
:
UITableView
!
@IBAction
func
print_action
(
_
sender
:
LGButton
)
{
var
temp_rk_arr
:
Array
<
Int
>
=
[]
for
i
in
0
..<
rkSelectArr
.
count
{
let
arr
=
pi_ci_select
[
i
]
for
item
in
arr
{
if
item
!=
999999
{
temp_rk_arr
.
append
(
i
)
break
}
}
}
var
temp_print_arr
:
Array
<
Array
<
Int
>>
=
[]
for
item
in
temp_rk_arr
{
let
arr
=
pi_ci_select
[
item
]
var
arr2
:
Array
<
Int
>
=
[]
for
i
in
arr
{
if
i
!=
999999
{
arr2
.
append
(
i
)
}
}
temp_print_arr
.
append
(
arr2
)
}
for
item
in
temp_rk_arr
{
let
model
=
rkSelectArr
[
item
]
print
(
model
.
goods_name
)
let
select_arr
=
temp_print_arr
[
item
]
for
i
in
select_arr
{
let
p
=
piCiArr
!
[
item
][
i
]
let
n
=
print_num_arr
[
item
][
i
]
print
(
p
.
p_id
,
n
)
}
}
}
@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