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
4f2b9d53
Commit
4f2b9d53
authored
May 15, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改新增商品
parent
0afe6076
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
263 additions
and
110 deletions
+263
-110
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+3
-3
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/WareHouseSpCell.swift
GeliBusinessPlatform/View/Cell/WareHouseSpCell.swift
+14
-6
GeliBusinessPlatform/View/Cell/WareHouseSpCell.xib
GeliBusinessPlatform/View/Cell/WareHouseSpCell.xib
+11
-0
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+2
-2
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/ChuKuViewController.swift
...rm/ViewController/库存商品(库存商品的出库)/ChuKuViewController.swift
+1
-1
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/ChuKuViewController.xib
...form/ViewController/库存商品(库存商品的出库)/ChuKuViewController.xib
+0
-0
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/KuCunShangPinCell.swift
...form/ViewController/库存商品(库存商品的出库)/KuCunShangPinCell.swift
+0
-0
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/KuCunShangPinCell.xib
...atform/ViewController/库存商品(库存商品的出库)/KuCunShangPinCell.xib
+0
-0
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/KuCunShangPinXQViewController.swift
...troller/库存商品(库存商品的出库)/KuCunShangPinXQViewController.swift
+0
-0
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/KuCunShangPinXQViewController.xib
...ontroller/库存商品(库存商品的出库)/KuCunShangPinXQViewController.xib
+0
-0
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/KuCunXiangQingCell.swift
...orm/ViewController/库存商品(库存商品的出库)/KuCunXiangQingCell.swift
+0
-0
GeliBusinessPlatform/ViewController/库存商品(库存商品的出库)/KuCunXiangQingCell.xib
...tform/ViewController/库存商品(库存商品的出库)/KuCunXiangQingCell.xib
+0
-0
GeliBusinessPlatform/ViewController/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
...ontroller/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
+160
-82
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
...orm/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
+16
-4
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+56
-12
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
4f2b9d53
...
...
@@ -1500,7 +1500,7 @@
E02C88232456B23400925766
/* 物流跟踪 */
,
E02FD9F3245578D800E10E27
/* 地址管理 */
,
E02FD9EE2455704600E10E27
/* 出入库记录 */
,
E0A2E82024553EC500D6DB34
/* 库存商品 */
,
E0A2E82024553EC500D6DB34
/* 库存商品
(库存商品的出库)
*/
,
E0A2E81724552E1900D6DB34
/* 新增、编辑品牌 */
,
E09F4C9F2452D13F00BE033D
/* 增值服务 */
,
E09F4C9A2452BEA000BE033D
/* 寄派方式 */
,
...
...
@@ -1610,7 +1610,7 @@
path
=
"新增、编辑品牌"
;
sourceTree
=
"<group>"
;
};
E0A2E82024553EC500D6DB34
/* 库存商品 */
=
{
E0A2E82024553EC500D6DB34
/* 库存商品
(库存商品的出库)
*/
=
{
isa
=
PBXGroup
;
children
=
(
E0A2E82524555B4400D6DB34
/* KuCunShangPinCell.swift */
,
...
...
@@ -1622,7 +1622,7 @@
E00E48C42457C99900F16545
/* KuCunShangPinXQViewController.swift */
,
E00E48C52457C99900F16545
/* KuCunShangPinXQViewController.xib */
,
);
path
=
"库存商品"
;
path
=
"库存商品
(库存商品的出库)
"
;
sourceTree
=
"<group>"
;
};
E0A409C02463F2F400CFF109
/* 收支统计 */
=
{
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
4f2b9d53
No preview for this file type
GeliBusinessPlatform/View/Cell/WareHouseSpCell.swift
View file @
4f2b9d53
...
...
@@ -7,28 +7,36 @@
//
import
UIKit
@objc
protocol
WareHouseSpCellDelegate
{
@objc
optional
func
clickAction
(
sender
:
UIButton
)
protocol
WareHouseSpCellDelegate
{
func
clickAction
(
sender
:
UIButton
)
func
whTextChange
(
sender
:
String
,
cell
:
WareHouseSpCell
)
func
whSwitchChange
(
sender
:
UISwitch
)
}
class
WareHouseSpCell
:
UITableViewCell
{
var
delegate
:
WareHouseSpCellDelegate
?
@IBOutlet
weak
var
hiddenBtn
:
UIButton
!
@IBOutlet
weak
var
whSwitch
:
UISwitch
!
@IBOutlet
weak
var
clickBtn
:
UIButton
!
@IBOutlet
weak
var
titleLbl
:
UILabel
!
@IBAction
func
btnAction
(
_
sender
:
UIButton
)
{
delegate
?
.
clickAction
?
(
sender
:
sender
)
delegate
?
.
clickAction
(
sender
:
sender
)
}
@IBOutlet
weak
var
btnImg
:
UIImageView
!
@IBOutlet
weak
var
detailTF
:
UITextField
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
.
none
whSwitch
.
addTarget
(
self
,
action
:
#selector(
swValueChange(sender:)
)
,
for
:
.
valueChanged
)
whSwitch
.
transform
=
CGAffineTransform
(
scaleX
:
0.8
,
y
:
0.8
)
detailTF
.
addTarget
(
self
,
action
:
#selector(
textChange(sender:)
)
,
for
:
.
allEditingEvents
)
// Initialization code
}
@objc
func
swValueChange
(
sender
:
UISwitch
){
delegate
?
.
whSwitchChange
(
sender
:
sender
)
}
@objc
func
textChange
(
sender
:
UITextField
){
delegate
?
.
whTextChange
(
sender
:
sender
.
text
!
,
cell
:
self
)
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
...
...
GeliBusinessPlatform/View/Cell/WareHouseSpCell.xib
View file @
4f2b9d53
...
...
@@ -62,10 +62,17 @@
</constraints>
<color
key=
"onTintColor"
name=
"蓝色字体颜色"
/>
</switch>
<button
hidden=
"YES"
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7Ya-ff-0NB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"43"
/>
<connections>
<action
selector=
"btnAction:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"0b7-xP-8hW"
/>
</connections>
</button>
</subviews>
<constraints>
<constraint
firstItem=
"uEc-pe-iBV"
firstAttribute=
"leading"
secondItem=
"zsG-fB-Zeb"
secondAttribute=
"trailing"
constant=
"10"
id=
"DaV-Au-Fbz"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"uEc-pe-iBV"
secondAttribute=
"bottom"
id=
"JR4-Gh-Lso"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"7Ya-ff-0NB"
secondAttribute=
"trailing"
id=
"LPq-wT-wK0"
/>
<constraint
firstItem=
"Nns-NP-fAD"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"O4l-xC-hak"
/>
<constraint
firstItem=
"6Eb-eL-RFq"
firstAttribute=
"top"
secondItem=
"zsG-fB-Zeb"
secondAttribute=
"bottom"
id=
"Ptu-ui-fcg"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"3PL-vr-q2W"
secondAttribute=
"trailing"
constant=
"15"
id=
"R0N-fj-Nf4"
/>
...
...
@@ -77,10 +84,13 @@
<constraint
firstItem=
"Nns-NP-fAD"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"f18-iY-s23"
/>
<constraint
firstItem=
"3PL-vr-q2W"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"gzt-C3-0sQ"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"6Eb-eL-RFq"
secondAttribute=
"bottom"
id=
"h6b-GE-I1H"
/>
<constraint
firstItem=
"7Ya-ff-0NB"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"i6c-K5-0nF"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Nns-NP-fAD"
secondAttribute=
"bottom"
id=
"jIE-bB-8ic"
/>
<constraint
firstItem=
"zsG-fB-Zeb"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
id=
"kT5-VR-Vqg"
/>
<constraint
firstItem=
"GUA-N4-Rgf"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"n0g-sO-UI3"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"uEc-pe-iBV"
secondAttribute=
"trailing"
id=
"riL-Qy-yIc"
/>
<constraint
firstItem=
"7Ya-ff-0NB"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
id=
"uMQ-Vv-5ZN"
/>
<constraint
firstItem=
"6Eb-eL-RFq"
firstAttribute=
"top"
secondItem=
"7Ya-ff-0NB"
secondAttribute=
"bottom"
id=
"uoH-tq-oFM"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"GUA-N4-Rgf"
secondAttribute=
"trailing"
constant=
"15"
id=
"zP6-ZR-myY"
/>
</constraints>
</tableViewCellContentView>
...
...
@@ -89,6 +99,7 @@
<outlet
property=
"btnImg"
destination=
"3PL-vr-q2W"
id=
"YM6-J5-D8z"
/>
<outlet
property=
"clickBtn"
destination=
"uEc-pe-iBV"
id=
"Ld9-MC-lkC"
/>
<outlet
property=
"detailTF"
destination=
"zsG-fB-Zeb"
id=
"XEU-3n-EoN"
/>
<outlet
property=
"hiddenBtn"
destination=
"7Ya-ff-0NB"
id=
"Afu-I3-OZ4"
/>
<outlet
property=
"titleLbl"
destination=
"Nns-NP-fAD"
id=
"qIo-DJ-djf"
/>
<outlet
property=
"whSwitch"
destination=
"GUA-N4-Rgf"
id=
"IZK-Bu-rZg"
/>
</connections>
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
4f2b9d53
...
...
@@ -82,7 +82,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
//是否为预售商品
isYuShouShangPin
=
tru
e
isYuShouShangPin
=
fals
e
navbar
.
title
=
"商品详情"
self
.
view
.
addSubview
(
navbar
)
...
...
@@ -111,7 +111,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
cell
.
nameLbl
.
text
=
spxxArr
[
indexPath
.
row
]
//商家名称
switch
cell
.
nameLbl
.
text
{
case
"商
家
名称"
:
case
"商
品
名称"
:
cell
.
textTF
.
text
=
itemName
break
case
"起卖数量"
:
...
...
GeliBusinessPlatform/ViewController/库存商品/ChuKuViewController.swift
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/ChuKuViewController.swift
View file @
4f2b9d53
...
...
@@ -16,7 +16,7 @@ class ChuKuViewController: BaseViewController,UITableViewDelegate,UITableViewDat
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"出库"
navbar
.
title
=
"出库"
//库存商品的出库
self
.
view
.
addSubview
(
navbar
)
lietView
.
snp
.
makeConstraints
{
(
make
)
in
...
...
GeliBusinessPlatform/ViewController/库存商品/ChuKuViewController.xib
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/ChuKuViewController.xib
View file @
4f2b9d53
File moved
GeliBusinessPlatform/ViewController/库存商品/KuCunShangPinCell.swift
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/KuCunShangPinCell.swift
View file @
4f2b9d53
File moved
GeliBusinessPlatform/ViewController/库存商品/KuCunShangPinCell.xib
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/KuCunShangPinCell.xib
View file @
4f2b9d53
File moved
GeliBusinessPlatform/ViewController/库存商品/KuCunShangPinXQViewController.swift
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/KuCunShangPinXQViewController.swift
View file @
4f2b9d53
File moved
GeliBusinessPlatform/ViewController/库存商品/KuCunShangPinXQViewController.xib
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/KuCunShangPinXQViewController.xib
View file @
4f2b9d53
File moved
GeliBusinessPlatform/ViewController/库存商品/KuCunXiangQingCell.swift
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/KuCunXiangQingCell.swift
View file @
4f2b9d53
File moved
GeliBusinessPlatform/ViewController/库存商品/KuCunXiangQingCell.xib
→
GeliBusinessPlatform/ViewController/库存商品
(库存商品的出库)
/KuCunXiangQingCell.xib
View file @
4f2b9d53
File moved
GeliBusinessPlatform/ViewController/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
View file @
4f2b9d53
...
...
@@ -11,23 +11,31 @@ import LGButton
import
IQKeyboardManagerSwift
class
CheckWareHourseViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
WareHouseSpCellDelegate
,
GLAlertSelectViewDelegate
{
var
titleStr
:
String
?
func
whSwitchChange
(
sender
:
UISwitch
)
{
shiFouMoRen
=
sender
.
isOn
}
@IBOutlet
weak
var
btnTitleLbl
:
UILabel
!
@IBOutlet
weak
var
listView
:
UITableView
!
var
btnArray
:
NSMutableArray
=
NSMutableArray
()
var
statusStr
:
String
=
""
var
warehourseType
:
Int
=
99
var
warehourseTypeSelectView
:
UIView
?
=
nil
var
titleStr
:
String
?
let
titleArr
=
[
"仓库名称:"
,
"仓库类型:"
,
"包含库位:"
,
"仓库地址:"
,
"仓库容积:"
,
"仓库面积:"
,
"联系人:"
,
"联系人电话:"
]
let
placeHArr
=
[
"请输入仓库名称"
,
"请选择仓库类型"
,
"请输入库位名"
,
"请输仓库地址"
,
"请输入仓库容积"
,
"请输入仓库面积"
,
"请输入联系人"
,
"请输入联系人电话"
]
let
placeHArr
=
[
"请输入仓库名称"
,
"请选择仓库类型"
,
"请输入库位名"
,
"请输入仓库地址"
,
"请输入仓库容积"
,
"请输入仓库面积"
,
"请输入联系人"
,
"请输入联系人电话"
]
var
listArray
=
[
"a"
,
"b"
,
"c"
]
var
glSelectView
:
GLAlertSelectView
?
var
btnArray
:
Array
<
UIButton
>
=
[]
var
statusStr
=
""
var
warehourseType
:
Int
?
var
cangKuName
=
""
//仓库名称
var
kuWeiName
=
""
//库位名
var
cangKuAdr
=
""
//仓库地址
var
rongJi
=
""
//容积
var
mianJi
=
""
//面积
var
lianXiRen
=
""
//联系人
var
phone
=
""
//电话
var
shiFouMoRen
=
false
//是否默认
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
titleStr
...
...
@@ -42,7 +50,6 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
listView
?
.
register
(
UINib
(
nibName
:
"WareHouseSpCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"WareHouse"
)
listView
.
isScrollEnabled
=
false
listView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
NavCGRect
.
height
)
make
.
left
.
right
.
equalTo
(
0
)
...
...
@@ -50,66 +57,155 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
}
// Do any additional setup after loading the view.
}
//MARK: - cell delegate
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"WareHouse"
)
as!
WareHouseSpCell
cell
.
clickBtn
.
isHidden
=
true
cell
.
detailTF
.
isUserInteractionEnabled
=
false
cell
.
whSwitch
.
isUserInteractionEnabled
=
false
cell
.
tag
=
indexPath
.
row
if
indexPath
.
section
==
0
{
//仓库名称等
cell
.
whSwitch
.
isHidden
=
true
cell
.
delegate
=
self
cell
.
titleLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
detailTF
.
placeholder
=
placeHArr
[
indexPath
.
row
]
cell
.
btnImg
.
isHidden
=
true
switch
indexPath
.
row
{
case
0
:
cell
.
detailTF
.
text
=
cangKuName
break
case
1
:
cell
.
hiddenBtn
.
isHidden
=
false
if
warehourseType
!=
nil
{
cell
.
detailTF
.
text
=
listArray
[
warehourseType
!
]
}
break
case
2
:
cell
.
detailTF
.
text
=
kuWeiName
break
case
3
:
cell
.
detailTF
.
text
=
cangKuAdr
break
case
4
:
cell
.
detailTF
.
text
=
rongJi
break
case
5
:
cell
.
detailTF
.
text
=
mianJi
break
case
6
:
cell
.
detailTF
.
text
=
lianXiRen
break
case
7
:
cell
.
detailTF
.
text
=
phone
break
default
:
break
}
//cell ui 布局
self
.
setCellLayout
(
cell
:
cell
,
indexPath
:
indexPath
)
}
else
{
//默认仓库
cell
.
detailTF
.
isHidden
=
true
cell
.
clickBtn
.
isHidden
=
true
cell
.
btnImg
.
isHidden
=
true
cell
.
whSwitch
.
isOn
=
shiFouMoRen
}
return
cell
}
//MARK: -方法
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
{
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
func
whTextChange
(
sender
:
String
,
cell
:
WareHouseSpCell
)
{
switch
cell
.
tag
{
case
0
:
cangKuName
=
sender
break
case
3
:
cangKuAdr
=
sender
break
case
4
:
rongJi
=
sender
break
case
5
:
mianJi
=
sender
break
case
6
:
lianXiRen
=
sender
break
case
7
:
phone
=
sender
break
default
:
break
}
}
@IBAction
func
submitAction
(
_
sender
:
LGButton
)
{
if
sender
.
tag
==
999
{
//请选择或填写包含库位的确定按钮
print
(
"tag 999"
)
}
else
{
if
sender
.
titleString
==
"确定"
{
print
(
"确定 -- 仓库类型:
\(
warehourseType
)
(0:冷冻、1:冷藏、2:常温)"
)
}
else
{
if
sender
.
titleString
==
"保存"
{
sender
.
titleString
=
"编辑"
statusStr
=
sender
.
titleString
}
else
{
sender
.
titleString
=
"保存"
statusStr
=
sender
.
titleString
print
(
shiFouMoRen
)
print
(
lianXiRen
)
print
(
mianJi
)
print
(
rongJi
)
print
(
phone
)
print
(
cangKuAdr
)
print
(
cangKuName
)
print
(
kuWeiName
)
print
(
listArray
[
warehourseType
!
])
// if sender.tag == 999 {//请选择或填写包含库位的确定按钮
// print("tag 999")
//
// }else{
// if sender.titleString == "确定"{
// print("确定 -- 仓库类型:\(warehourseType) (0:冷冻、1:冷藏、2:常温)")
// }else{
// if sender.titleString == "保存" {
// sender.titleString = "编辑"
// statusStr = sender.titleString
// print("确定 -- 仓库类型:\(warehourseType) (0:冷冻、1:冷藏、2:常温)")
//
// }else{
// sender.titleString = "保存"
// statusStr = sender.titleString
// }
// }
// }
}
//库位
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
){
warehourseType
=
selectNum
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
listView
.
reloadData
()
}
func
GLAlertSelectDelAction
(
sender
:
Array
<
Any
>
)
{
print
(
sender
)
}
func
GLAlertSelectEditAction
(
sender
:
Int
)
{
print
(
sender
)
}
//MARK: - delegate
func
rightBtnClick
()
{
print
(
"删除"
)
}
@objc
func
removeActin
(
sender
:
UIButton
){
sender
.
superview
?
.
removeFromSuperview
()
}
//MARK: - 自定义DELEGATE
//库位
func
GLAlertSelectDelAction
(
sender
:
Array
<
Any
>
)
{
print
(
sender
)
}
func
GLAlertSelectEditAction
(
sender
:
Int
)
{
print
(
sender
)
}
func
GLAlertSelectSubmitAction
()
{
print
(
"确定"
)
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
}
func
clickAction
(
sender
:
UIButton
)
{
IQKeyboardManager
.
shared
.
resignFirstResponder
()
if
sender
.
tag
==
1
{
//新增仓库类型
if
sender
.
tag
==
1
{
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
titleLbl
.
text
=
"请选择仓库类型"
view
.
delegate
=
self
view
.
dataArr
=
listArray
if
warehourseType
!=
nil
{
view
.
selectNum
=
warehourseType
}
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
...
...
@@ -139,7 +235,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
btn
.
tag
=
tag
btn
.
addTarget
(
self
,
action
:
#selector(
typeSelect(sender:)
)
,
for
:
.
touchUpInside
)
view
.
addSubview
(
btn
)
btnArray
.
a
d
d
(
btn
)
btnArray
.
a
ppen
d
(
btn
)
let
line
=
UIView
(
frame
:
CGRect
(
x
:
15
,
y
:
title1
.
frame
.
maxY
,
width
:
fullScreenWidth
-
30
,
height
:
1
))
line
.
backgroundColor
=
UIColor
(
named
:
"灰色分界线"
)
...
...
@@ -170,31 +266,14 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
tableView
==
listView
{
if
section
==
0
{
return
titleArr
.
count
}
return
1
}
else
{
return
listArray
.
count
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
49
}
//footer
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
view
.
bounds
.
size
.
width
,
height
:
10
))
view
.
backgroundColor
=
UIColor
(
named
:
"app背景色"
)
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
10
}
func
setCellLayout
(
cell
:
WareHouseSpCell
,
indexPath
:
IndexPath
){
cell
.
detailTF
.
snp
.
updateConstraints
{
(
make
)
in
...
...
@@ -211,6 +290,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
cell
.
btnImg
.
isHidden
=
false
cell
.
clickBtn
.
isHidden
=
false
cell
.
clickBtn
.
tag
=
indexPath
.
row
cell
.
hiddenBtn
.
tag
=
indexPath
.
row
cell
.
detailTF
.
snp
.
updateConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
cell
.
titleLbl
.
snp_right
)
make
.
top
.
bottom
.
equalTo
(
0
)
...
...
@@ -234,27 +314,25 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"WareHouse"
)
as!
WareHouseSpCell
cell
.
clickBtn
.
isHidden
=
true
cell
.
detailTF
.
isUserInteractionEnabled
=
false
cell
.
whSwitch
.
isUserInteractionEnabled
=
false
if
indexPath
.
section
==
0
{
//仓库名称等
cell
.
whSwitch
.
isHidden
=
true
cell
.
delegate
=
self
cell
.
titleLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
detailTF
.
placeholder
=
placeHArr
[
indexPath
.
row
]
cell
.
btnImg
.
isHidden
=
true
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
{
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
}
//cell ui 布局
self
.
setCellLayout
(
cell
:
cell
,
indexPath
:
indexPath
)
}
else
{
//默认仓库
cell
.
detailTF
.
isHidden
=
true
cell
.
clickBtn
.
isHidden
=
true
cell
.
btnImg
.
isHidden
=
true
//footer
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
view
.
bounds
.
size
.
width
,
height
:
10
))
view
.
backgroundColor
=
UIColor
(
named
:
"app背景色"
)
return
view
}
return
cell
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
10
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
49
}
}
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
View file @
4f2b9d53
...
...
@@ -9,9 +9,15 @@
import
UIKit
import
ViewAnimator
import
LGButton
import
IQKeyboardManagerSwift
protocol
ChangeGoodsPriceVCDelegate
{
func
ChangeGoodsPriceVCKeyboardDone
(
str
:
String
)
}
class
ChangeGoodsPriceVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
{
var
orderID
:
Int
?
=
0
var
delegate
:
ChangeGoodsPriceVCDelegate
?
var
dataArr
:
Array
<
OrderDetailGoodsModel
>
?
=
[]
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -36,7 +42,11 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
}
}
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
IQKeyboardManager
.
shared
.
resignFirstResponder
()
delegate
?
.
ChangeGoodsPriceVCKeyboardDone
(
str
:
textField
.
text
!
)
return
true
}
var
tableV
:
UITableView
!
...
...
@@ -65,7 +75,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"ChangePriceNormalCell"
)
as!
ChangePriceNormalCell
let
rowModel
=
dataArr
!
[
indexPath
.
row
]
//
let rowModel = dataArr![indexPath.row]
//图片暂不处理
// cell.imageView?.kf.setImage(with: <#T##Resource?#>)
// cell.goodsNameLbl.text = rowModel.goods_name
...
...
@@ -73,7 +83,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
// cell.priceTf.text = rowModel.goods_price
// cell.detailLbl.isHidden = true
cell
.
priceTf
.
delegate
=
self
cell
.
priceTf
.
returnKeyType
=
.
done
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
...
...
@@ -84,5 +94,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
120*
glscale
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
IQKeyboardManager
.
shared
.
resignFirstResponder
()
}
}
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
4f2b9d53
...
...
@@ -8,7 +8,8 @@
import
UIKit
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
CommendCellDelegate
,
GeliAlertViewDelegate
{
class
OrderDViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GuanLianKehuVCDelegate
,
OrderDViewFooterViewDelegate
,
TitleAndTFCellDelegate
,
CommendCellDelegate
,
GeliAlertViewDelegate
,
GLAlertSelectViewDelegate
{
var
orderId
:
Int
?
//订单编号
var
isYuShou
:
Bool
=
false
//是否预售
...
...
@@ -19,8 +20,18 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let
yuShouTitleArr
=
[
"定金:"
,
"尾款:"
,
"商品合计:"
,
"物流费用:"
,
"其它费用:"
]
let
nonYuShouTitleArr
=
[
"商品合计:"
,
"物流费用:"
,
"其它费用:"
]
let
YuShouPart3Arr
=
[
"订单编号"
,
"下单时间"
,
"订单来源"
,
"提货方式"
,
"
运单号"
,
"物流公司
"
,
"支付方式"
,
"支付状态"
,
"买家留言"
,
"订单备注"
]
let
YuShouPart3Arr
=
[
"订单编号"
,
"下单时间"
,
"订单来源"
,
"提货方式"
,
"
物流公司"
,
"运单号
"
,
"支付方式"
,
"支付状态"
,
"买家留言"
,
"订单备注"
]
let
nonYuShouPart3Arr
=
[
"收货人"
,
"联系电话"
,
"地址"
]
var
glSelectView
:
GLAlertSelectView
?
let
zhiFuFangShiArr
=
[
"未支付"
,
"现金"
,
"转账(私)"
,
"转账(公)"
,
"转账(微信)"
,
"转账(支付宝)"
]
var
zhiFuSelect
:
Int
?
//选择支付方式
var
zhiFuStatus
=
[
"未付款"
,
"欠款"
,
"月结"
,
"已付款"
]
var
zhiFuStatusSelect
:
Int
?
//付款状态
@IBOutlet
weak
var
btmViewH
:
NSLayoutConstraint
!
@IBOutlet
weak
var
bottomView
:
UIView
!
@IBOutlet
weak
var
listView
:
UITableView
!
...
...
@@ -36,7 +47,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func
loadData
()
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
orderDetail
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
],
success
:
{
(
data
)
in
orderDetail
([
"user_token"
:
"RQdwz5QKpeg="
,
"order_id"
:
"11570"
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
let
dataM
=
data
as!
OrderDetailModel
self
.
dataMdoel
=
dataM
.
data
...
...
@@ -337,7 +348,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell
.
tag
=
indexPath
.
row
cell
.
titleLbl
.
text
=
YuShouPart3Arr
[
indexPath
.
row
]
switch
indexPath
.
row
{
case
4
:
case
5
:
cell
.
placeLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lwb_no
if
self
.
dataMdoel
?
.
order_res
?
.
lwb_no
==
nil
{
cell
.
placeLbl
.
text
=
"-"
...
...
@@ -345,12 +356,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell
.
placeLbl
.
text
=
"请输入物流单号"
}
break
case
5
:
cell
.
placeLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
lc_name
if
cell
.
placeLbl
.
text
?
.
count
==
0
{
cell
.
placeLbl
.
text
=
"请输入物流公司"
}
break
case
9
:
cell
.
placeLbl
.
text
=
self
.
dataMdoel
?
.
order_res
?
.
order_postscript
...
...
@@ -422,6 +427,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let
vc
=
ShowAlGoodsViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
//MARK:--选择的关联客户返回数据
var
selectKeHuData
:
CusListAllDataModel
?
=
nil
func
GuanLianKehuSelect
(
keHuData
:
CusListAllDataModel
)
{
...
...
@@ -444,16 +450,54 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
"支付方式"
:
print
(
"abc"
)
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择支付方式"
view
.
delegate
=
self
view
.
dataArr
=
zhiFuFangShiArr
if
zhiFuSelect
!=
nil
{
view
.
selectNum
=
zhiFuSelect
!
}
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
break
case
"支付状态"
:
print
(
"123"
)
if
glSelectView
==
nil
{
let
view
=
GLAlertSelectView
(
frame
:
self
.
view
.
bounds
)
view
.
tag
=
cell
.
tag
view
.
titleLbl
.
text
=
"请选择支付状态"
view
.
delegate
=
self
view
.
dataArr
=
zhiFuStatus
if
zhiFuStatusSelect
!=
nil
{
view
.
selectNum
=
zhiFuStatusSelect
!
}
self
.
view
.
addSubview
(
view
)
glSelectView
=
view
}
break
default
:
break
}
}
func
GLAlertSelectViewClick
(
selectNum
:
Int
,
view
:
GLAlertSelectView
)
{
if
view
.
titleLbl
.
text
==
"请选择支付方式"
{
zhiFuSelect
=
selectNum
}
else
{
zhiFuStatusSelect
=
selectNum
}
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
}
func
GLAlertSelectViewClose
(
sender
:
UIButton
)
{
glSelectView
?
.
removeFromSuperview
()
glSelectView
=
nil
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
}
//MARK: - section delegate
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
if
self
.
dataMdoel
==
nil
{
...
...
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