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
6a9ab706
Commit
6a9ab706
authored
4 years ago
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规格新增条形码
parent
7a3499b3
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
110 additions
and
37 deletions
+110
-37
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
+2
-2
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.swift
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.swift
+14
-0
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.xib
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.xib
+57
-19
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+0
-0
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+6
-1
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+26
-12
GeliBusinessPlatform/ViewController/新增规格/GuiGeModel.swift
GeliBusinessPlatform/ViewController/新增规格/GuiGeModel.swift
+2
-0
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
+3
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
6a9ab706
No preview for this file type
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/Cell/AddGuiGeCell.xib
View file @
6a9ab706
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097.2
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
7701
"
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=
"1
6087
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
7703
"
/>
<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"
/>
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.swift
View file @
6a9ab706
...
...
@@ -11,6 +11,20 @@ protocol ShangPinGguiGeCellDelegate {
func
ShangPinGguiGeCellEditAction
(
cell
:
ShangPinGguiGeCell
)
}
class
ShangPinGguiGeCell
:
UITableViewCell
{
var
isCheck
=
false
{
didSet
{
if
isCheck
{
top_view
.
isHidden
=
false
code_lbl
.
isHidden
=
false
top_view_h
.
constant
=
49
}
else
{
top_view_h
.
constant
=
0
}
}
}
@IBOutlet
weak
var
code_lbl
:
UILabel
!
@IBOutlet
weak
var
top_view_h
:
NSLayoutConstraint
!
@IBOutlet
weak
var
top_view
:
UIView
!
var
delegate
:
ShangPinGguiGeCellDelegate
?
@IBAction
func
editAction
(
_
sender
:
Any
)
{
delegate
?
.
ShangPinGguiGeCellEditAction
(
cell
:
self
)
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/View/Cell/ShangPinGguiGeCell.xib
View file @
6a9ab706
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
6a9ab706
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
6a9ab706
...
...
@@ -407,6 +407,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
case
2
:
if
guiGeArr
.
count
>
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"ShangPinGguiGeCell"
)
as!
ShangPinGguiGeCell
cell
.
isCheck
=
true
cell
.
delegate
=
self
var
dict
:
GuiGeModel
!
if
selectIdx
!=
nil
{
...
...
@@ -416,6 +417,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
dict
=
guiGeArr
.
first
}
cell
.
code_lbl
.
text
=
"商品条码:未记录"
if
dict
.
code_number
.
count
>
0
{
cell
.
code_lbl
.
text
=
"商品条码:
\(
dict
.
code_number
)
"
}
cell
.
tempLbl
.
text
=
"温藏:未记录"
if
dict
.
wenDu
.
count
>
0
{
cell
.
tempLbl
.
text
=
"温藏:
\(
dict
.
wenDu
)
"
...
...
@@ -1196,7 +1201,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
case
1
:
return
148.5
case
2
:
if
guiGeArr
.
count
>
0
{
return
1
46
return
1
99
}
return
123.5
case
3
:
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
6a9ab706
...
...
@@ -36,8 +36,8 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var
datasArr
:
Array
<
GuiGeModel
>
=
[]
var
dataModel
=
GuiGeModel
()
var
firstTimeSetting
=
true
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量(kg):"
,
"温藏:"
,
"单位:"
,
"原价:"
,
"起售数量:"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"常温"
,
"请选择商品单位"
,
"请输入商品原价"
,
"请输入起售数量"
]
let
titleArray
=
[
"售价:"
,
"规格:"
,
"重量(kg):"
,
"温藏:"
,
"单位:"
,
"原价:"
,
"起售数量:"
,
"商品编码:"
]
let
pliceHolderArr
=
[
"请输入商品售价"
,
"请输入商品规格"
,
"请输入商品重量"
,
"常温"
,
"请选择商品单位"
,
"请输入商品原价"
,
"请输入起售数量"
,
"请输入商品编码"
]
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
bottomBtn
:
LGButton
!
@IBOutlet
weak
var
listTbv
:
UITableView
!
...
...
@@ -62,7 +62,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var
weight
=
""
var
wenDu
=
"常温"
var
danWei
=
""
var
code_number
=
""
var
originalPrice
=
""
var
originNumberSku
=
""
...
...
@@ -209,21 +209,27 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
if
DJBiLi
.
count
==
0
{
HUD
.
flash
(
.
label
(
"默认定金范围(1~20%)"
),
delay
:
1.2
)
DJBiLi
=
"20"
let
idx
=
IndexPath
(
row
:
0
,
section
:
1
)
let
cell
=
listTbv
.
cellForRow
(
at
:
idx
)
as!
YuShouCell
cell
.
inputTF3
.
text
=
"20"
if
isYuShouSetting
{
if
DJBiLi
.
count
==
0
{
HUD
.
flash
(
.
label
(
"默认定金范围(1~20%)"
),
delay
:
1.2
)
DJBiLi
=
"20"
let
idx
=
IndexPath
(
row
:
0
,
section
:
1
)
let
cell
=
listTbv
.
cellForRow
(
at
:
idx
)
as!
YuShouCell
cell
.
inputTF3
.
text
=
"20"
return
}
}
if
code_number
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入商品编码"
),
delay
:
1.2
)
return
}
dataModel
.
originalPrice
=
originalPrice
dataModel
.
originNumberSku
=
originNumberSku
dataModel
.
price
=
price
dataModel
.
guiGe
=
guiGe
dataModel
.
weight
=
weight
dataModel
.
code_number
=
code_number
dataModel
.
wenDu
=
wenDu
dataModel
.
danWei
=
danWei
dataModel
.
isYsJieTiOpen
=
isYsJieTiOpen
...
...
@@ -300,6 +306,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
}
break
default
:
code_number
=
textField
.
text
!
break
}
}
...
...
@@ -352,7 +359,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
//keyboardType
cell
.
textTF
.
returnKeyType
=
.
done
cell
.
textTF
.
delegate
=
self
if
indexPath
.
row
==
0
||
indexPath
.
row
==
2
||
indexPath
.
row
==
5
||
indexPath
.
row
==
6
{
if
indexPath
.
row
==
0
||
indexPath
.
row
==
2
||
indexPath
.
row
==
5
||
indexPath
.
row
==
6
||
indexPath
.
row
==
7
{
cell
.
textTF
.
keyboardType
=
.
decimalPad
}
let
str
=
NSAttributedString
(
string
:
pliceHolderArr
[
indexPath
.
row
],
attributes
:
[
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
named
:
"灰色字体颜色"
)])
...
...
@@ -371,9 +378,15 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
case
6
:
cell
.
textTF
.
text
=
originNumberSku
break
default
:
case
2
:
cell
.
textTF
.
text
=
weight
break
default
:
cell
.
textTF
.
text
=
code_number
if
code_number
.
count
==
0
&&
barTitle
?
.
contains
(
"查看"
)
==
true
{
cell
.
textTF
.
text
=
"未记录"
}
break
}
}
...
...
@@ -791,6 +804,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
price
=
dataDict
.
price
guiGe
=
dataDict
.
guiGe
weight
=
dataDict
.
weight
code_number
=
dataDict
.
code_number
wenDu
=
dataDict
.
wenDu
danWei
=
dataDict
.
danWei
yuShouPrice
=
dataDict
.
yuShouPrice
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/GuiGeModel.swift
View file @
6a9ab706
...
...
@@ -17,6 +17,8 @@ class GuiGeModel: NSObject {
var
guiGe
:
String
=
""
///重量
var
weight
:
String
=
""
///条形码
var
code_number
:
String
=
""
///温度
var
wenDu
:
String
=
""
///单位
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/新增规格/YuShouCell.xib
View file @
6a9ab706
...
...
@@ -51,7 +51,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入预售价格"
textAlignment=
"right"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"COH-zY-OUo"
>
<textField
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入预售价格"
textAlignment=
"right"
minimumFontSize=
"17"
clearButtonMode=
"whileEditing"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"COH-zY-OUo"
>
<rect
key=
"frame"
x=
"85"
y=
"46"
width=
"220"
height=
"34"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"34"
id=
"iAs-XY-QMJ"
/>
...
...
@@ -77,7 +77,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<textField
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入预售库存"
textAlignment=
"right"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Qb7-aM-usa"
>
<textField
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入预售库存"
textAlignment=
"right"
minimumFontSize=
"17"
clearButtonMode=
"whileEditing"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Qb7-aM-usa"
>
<rect
key=
"frame"
x=
"101"
y=
"89"
width=
"204"
height=
"34"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"34"
id=
"JmO-9y-uwH"
/>
...
...
@@ -103,7 +103,7 @@
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
<textField
opaque=
"NO"
tag=
"2"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入预售定金比例"
textAlignment=
"right"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"mht-f5-qwh"
>
<textField
opaque=
"NO"
tag=
"2"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
placeholder=
"请输入预售定金比例"
textAlignment=
"right"
minimumFontSize=
"17"
clearButtonMode=
"whileEditing"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"mht-f5-qwh"
>
<rect
key=
"frame"
x=
"121"
y=
"140"
width=
"184"
height=
"34"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"34"
id=
"57U-zx-suF"
/>
...
...
This diff is collapsed.
Click to expand it.
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