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
5ef87967
Commit
5ef87967
authored
Jun 12, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.3上架版本
parent
fab58ede
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
20 deletions
+31
-20
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+2
-2
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Info.plist
GeliBusinessPlatform/Info.plist
+2
-0
GeliBusinessPlatform/View/AlertView/GeliAltetCodeView.swift
GeliBusinessPlatform/View/AlertView/GeliAltetCodeView.swift
+26
-17
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
...atform/ViewController/新增采购单/XinCaiGouViewController.swift
+1
-1
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
5ef87967
...
...
@@ -3451,7 +3451,7 @@
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
GeliBusinessPlatform/GeliBusinessPlatform.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
1.2
2
;
CURRENT_PROJECT_VERSION
=
1.2
3
;
DEFINES_MODULE
=
NO
;
DEVELOPMENT_ASSET_PATHS
=
"\"GeliBusinessPlatform/Preview Content\""
;
DEVELOPMENT_TEAM
=
K48346UACH
;
...
...
@@ -3583,7 +3583,7 @@
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
GeliBusinessPlatform/GeliBusinessPlatform.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
1.2
2
;
CURRENT_PROJECT_VERSION
=
1.2
3
;
DEFINES_MODULE
=
NO
;
DEVELOPMENT_ASSET_PATHS
=
"\"GeliBusinessPlatform/Preview Content\""
;
DEVELOPMENT_TEAM
=
K48346UACH
;
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
5ef87967
No preview for this file type
GeliBusinessPlatform/Info.plist
View file @
5ef87967
...
...
@@ -45,6 +45,8 @@
<string>
我们需要通过您同意使用麦克风,才能与你进行语音交流
</string>
<key>
NSPhotoLibraryUsageDescription
</key>
<string>
我们需要通过您同意使用相册,才能获取相关数据
</string>
<key>
NSPhotoLibraryAddUsageDescription
</key>
<string>
我们需要通过您同意使用相册,才能添加相关数据
</string>
<key>
UIBackgroundModes
</key>
<array/>
<key>
UILaunchImageFile
</key>
...
...
GeliBusinessPlatform/View/AlertView/GeliAltetCodeView.swift
View file @
5ef87967
...
...
@@ -13,7 +13,7 @@ class GeliAltetCodeView: UIView {
var
saveImgID
:
Int
?
=
nil
{
didSet
{
saveImg
=
createQRForString
(
qrString
:
"https://cms.gelifood.com/market/src/views/Order/codeDetail.html?order_id="
+
StringByInt
(
number
:
saveImgID
!
),
qrImageName
:
""
)
qrImageName
:
""
)
iconImgV
.
image
=
saveImg
}
}
...
...
@@ -28,28 +28,28 @@ class GeliAltetCodeView: UIView {
qrFilter
.
setValue
(
stringData
,
forKey
:
"inputMessage"
)
qrFilter
.
setValue
(
"H"
,
forKey
:
"inputCorrectionLevel"
)
let
qrCIImage
=
qrFilter
.
outputImage
// 创建一个颜色滤镜,黑白色
let
colorFilter
=
CIFilter
(
name
:
"CIFalseColor"
)
!
colorFilter
.
setDefaults
()
colorFilter
.
setValue
(
qrCIImage
,
forKey
:
"inputImage"
)
colorFilter
.
setValue
(
CIColor
(
red
:
0
,
green
:
0
,
blue
:
0
),
forKey
:
"inputColor0"
)
colorFilter
.
setValue
(
CIColor
(
red
:
1
,
green
:
1
,
blue
:
1
),
forKey
:
"inputColor1"
)
// 返回二维码image
let
ciimage
=
colorFilter
.
outputImage
!
.
transformed
(
by
:
CGAffineTransform
(
scaleX
:
5
,
y
:
5
))
.
transformed
(
by
:
CGAffineTransform
(
scaleX
:
5
,
y
:
5
))
let
context
=
CIContext
()
let
imageRef
=
context
.
createCGImage
(
ciimage
,
from
:
ciimage
.
extent
)
let
codeImage
=
UIImage
(
cgImage
:
imageRef
!
)
// 经过一番测试,发现方法[UIImage imageWithCIImage:codeImage];生产的UIImage并不算是实际意义上的图片UIImage.CGImage为nil,而相册保存方法UIImageWriteToSavedPhotosAlbum所保存的就是UIImage.CGImage
// 经过一番测试,发现方法[UIImage imageWithCIImage:codeImage];生产的UIImage并不算是实际意义上的图片UIImage.CGImage为nil,而相册保存方法UIImageWriteToSavedPhotosAlbum所保存的就是UIImage.CGImage
// 通常,二维码都是定制的,中间都会放想要表达意思的图片
if
let
iconImage
=
UIImage
(
named
:
qrImageName
!
)
{
let
rect
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
codeImage
.
size
.
width
,
height
:
codeImage
.
size
.
height
)
UIGraphicsBeginImageContext
(
rect
.
size
)
codeImage
.
draw
(
in
:
rect
)
let
avatarSize
=
CGSize
(
width
:
rect
.
size
.
width
*
0.25
,
height
:
rect
.
size
.
height
*
0.25
)
...
...
@@ -58,17 +58,17 @@ class GeliAltetCodeView: UIView {
iconImage
.
draw
(
in
:
CGRect
(
x
:
x
,
y
:
y
,
width
:
avatarSize
.
width
,
height
:
avatarSize
.
height
))
let
resultImage
=
UIGraphicsGetImageFromCurrentImageContext
()
UIGraphicsEndImageContext
()
return
resultImage
}
return
codeImage
}
return
nil
}
@IBOutlet
weak
var
titleLbl
:
UILabel
!
@IBOutlet
weak
var
outBtn
:
UIButton
!
@IBAction
func
outAction
(
_
sender
:
UIButton
)
{
...
...
@@ -82,17 +82,26 @@ class GeliAltetCodeView: UIView {
}
else
{
let
image
=
self
.
iconImgV
.
image
!
print
(
image
)
UIImageWriteToSavedPhotosAlbum
(
image
,
nil
,
nil
,
nil
)
HUD
.
flash
(
.
label
(
"保存成功"
),
delay
:
1.2
)
UIImageWriteToSavedPhotosAlbum
(
image
,
self
,
#selector(
saveImage(image:didFinishSavingWithError:contextInfo:)
)
,
nil
)
}
self
.
removeFromSuperview
()
}
@objc
private
func
saveImage
(
image
:
UIImage
,
didFinishSavingWithError
error
:
NSError
?,
contextInfo
:
AnyObject
)
{
if
error
!=
nil
{
HUD
.
flash
(
.
label
(
"保存失败"
),
delay
:
1.2
)
}
else
{
HUD
.
flash
(
.
label
(
"保存成功"
),
delay
:
1.2
)
}
}
//初始化时将xib中的view添加进来
var
contentView
:
UIView
!
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
contentView
=
loadViewFromNib
()
...
...
@@ -119,5 +128,5 @@ class GeliAltetCodeView: UIView {
let
view
=
nib
.
instantiate
(
withOwner
:
self
,
options
:
nil
)
.
first
as!
UIView
return
view
}
}
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
View file @
5ef87967
...
...
@@ -136,7 +136,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
var
datas
:
Array
<
GetGoodsInfoDataModel
>
=
[]
let
typeArr
=
[
"临时采购"
,
"固定采购"
]
let
titleArr
=
[
"采购日期"
,
"供应商"
,
"采购人"
,
"采购类型"
]
var
holderArr
=
[
""
,
"请选择供应商"
,
"请输入采购人姓名"
,
"
请选择采购类型
"
]
var
holderArr
=
[
""
,
"请选择供应商"
,
"请输入采购人姓名"
,
"
固定采购
"
]
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"新增采购单"
...
...
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