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
e0cd63b4
Commit
e0cd63b4
authored
Jun 22, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复已完成不显示按钮bug
parent
126cc654
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
14 deletions
+78
-14
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/PurchaseModel/PurchaseModel.swift
GeliBusinessPlatform/Model/PurchaseModel/PurchaseModel.swift
+1
-1
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
...atform/ViewController/新增采购单/XinCaiGouViewController.swift
+3
-3
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
+73
-10
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.xib
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.xib
+1
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e0cd63b4
No preview for this file type
GeliBusinessPlatform/Model/PurchaseModel/PurchaseModel.swift
View file @
e0cd63b4
...
@@ -46,7 +46,7 @@ class PurchaseOrderListDataModel: Mappable {
...
@@ -46,7 +46,7 @@ class PurchaseOrderListDataModel: Mappable {
var
ven_name
:
String
?
//供应商名
var
ven_name
:
String
?
//供应商名
var
goods_res
:
Array
<
PurchaseOrderListDataItemsModel
>
?
var
goods_res
:
Array
<
PurchaseOrderListDataItemsModel
>
?
var
purchase_time
:
Int
?
var
purchase_time
:
Double
?
var
remarks
:
String
?
var
remarks
:
String
?
required
init
?(
map
:
Map
)
{
required
init
?(
map
:
Map
)
{
...
...
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
View file @
e0cd63b4
...
@@ -201,7 +201,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -201,7 +201,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
listView
.
reloadData
()
listView
.
reloadData
()
}
}
var
dayTimeStr
=
""
var
dayTimeStr
=
""
var
dayTime
:
Int
?
var
dayTime
:
Double
?
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
btmLbl
:
UILabel
!
...
@@ -354,7 +354,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -354,7 +354,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
let
timeInterval
:
TimeInterval
=
beginDate
.
timeIntervalSince1970
let
timeInterval
:
TimeInterval
=
beginDate
.
timeIntervalSince1970
print
(
timeStr
,
"采购日期"
,
timeInterval
)
print
(
timeStr
,
"采购日期"
,
timeInterval
)
dayTimeStr
=
timeStr
dayTimeStr
=
timeStr
dayTime
=
Int
(
timeInterval
)
dayTime
=
Double
(
Int
(
timeInterval
)
)
listView
.
reloadData
()
listView
.
reloadData
()
}
}
...
@@ -381,7 +381,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -381,7 +381,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
cell
.
dayLbl
.
text
=
dayTimeStr
cell
.
dayLbl
.
text
=
dayTimeStr
}
else
{
}
else
{
cell
.
dayLbl
.
text
=
getTimeDayNow
()
cell
.
dayLbl
.
text
=
getTimeDayNow
()
dayTime
=
D
ate
()
.
timeStamp
dayTime
=
D
ouble
(
Date
()
.
timeStamp
)
}
}
return
cell
return
cell
}
else
{
}
else
{
...
...
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
View file @
e0cd63b4
...
@@ -10,26 +10,39 @@ import UIKit
...
@@ -10,26 +10,39 @@ import UIKit
protocol
CGDXQVcDelegate
{
protocol
CGDXQVcDelegate
{
func
CGDXQVcFinishAction
()
func
CGDXQVcFinishAction
()
}
}
class
CGDXQVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GLAlertSelectViewDelegate
,
GeliAlertTextViewDelegate
,
GeliAlertViewDelegate
,
NewRKVcDelegate
{
class
CGDXQVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GLAlertSelectViewDelegate
,
GeliAlertTextViewDelegate
,
GeliAlertViewDelegate
,
NewRKVcDelegate
,
XinCaiGouViewControllerDelegate
{
func
NewRKVc
Finish
()
{
func
XinCaiGouViewController
Finish
()
{
loadData
()
loadData
()
}
func
NewRKVcFinish
()
{
loadData
()
// delegate?.CGDXQVcFinishAction()
// self.navigationController?.popViewController(animated: false)
}
}
@IBOutlet
weak
var
btmHeight
:
NSLayoutConstraint
!
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"po_id"
:
po_id
as
Any
]
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"po_id"
:
po_id
as
Any
]
if
isBackOut
{
backOut
(
dict
,
success
:
{
(
data
)
in
backOut
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"撤销成功"
),
delay
:
1.2
)
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"撤销成功"
),
delay
:
1.2
)
self
.
delegate
?
.
CGDXQVcFinishAction
()
self
.
delegate
?
.
CGDXQVcFinishAction
()
self
.
isBackOut
=
false
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
})
{
(
error
)
in
}
}
else
{
cancelPurchaseOrder
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
self
.
delegate
?
.
CGDXQVcFinishAction
()
self
.
isBackOut
=
false
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
err
)
in
}
}
}
}
}
...
@@ -100,7 +113,6 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
...
@@ -100,7 +113,6 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"CGDCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CGDCell"
)
listView
.
register
(
UINib
(
nibName
:
"CGDCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CGDCell"
)
loadData
()
loadData
()
}
}
...
@@ -111,22 +123,70 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
...
@@ -111,22 +123,70 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
if
btnTitle
.
count
==
0
{
if
btnTitle
.
count
==
0
{
btmView
.
isHidden
=
true
btmView
.
isHidden
=
true
btmColor
.
isHidden
=
true
btmColor
.
isHidden
=
true
btmHeight
.
constant
=
0
btmColor
.
backgroundColor
=
UIColor
(
named
:
"app底色"
)
}
else
{
}
else
{
btmHeight
.
constant
=
49
btmColor
.
backgroundColor
=
UIColor
.
white
let
w
=
fullScreenWidth
/
CGFloat
(
btnTitle
.
count
)
let
w
=
fullScreenWidth
/
CGFloat
(
btnTitle
.
count
)
for
i
in
0
..<
btnTitle
.
count
{
for
i
in
0
..<
btnTitle
.
count
{
let
btn
=
UIButton
(
frame
:
CGRect
(
x
:
CGFloat
(
i
)
*
w
,
y
:
0
,
width
:
w
,
height
:
49
))
let
btn
=
UIButton
(
frame
:
CGRect
(
x
:
CGFloat
(
i
)
*
w
,
y
:
0
,
width
:
w
,
height
:
49
))
btmView
.
addSubview
(
btn
)
btmView
.
addSubview
(
btn
)
btn
.
setTitle
(
btnTitle
[
i
],
for
:
.
normal
)
btn
.
setTitle
(
btnTitle
[
i
],
for
:
.
normal
)
btn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
btn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
if
btnTitle
[
i
]
==
"修改信息"
{
btn
.
backgroundColor
=
UIColor
(
named
:
"蓝色字体颜色"
)
btn
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
}
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
btn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
btn
.
addTarget
(
self
,
action
:
#selector(
btmBtnClick(sender:)
)
,
for
:
.
touchUpInside
)
btn
.
addTarget
(
self
,
action
:
#selector(
btmBtnClick(sender:)
)
,
for
:
.
touchUpInside
)
}
}
}
}
}
}
var
isBackOut
=
false
@objc
func
btmBtnClick
(
sender
:
UIButton
){
@objc
func
btmBtnClick
(
sender
:
UIButton
){
switch
sender
.
titleLabel
?
.
text
{
switch
sender
.
titleLabel
?
.
text
{
case
"取消"
:
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
titileLbl
.
text
=
"是否取消?"
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确定"
),
for
:
.
normal
)
alertView
.
rightBtn
.
tag
=
model
!.
po_id
!
self
.
view
.
window
?
.
addSubview
(
alertView
)
break
case
"修改信息"
:
let
vc
=
XinCaiGouViewController
()
vc
.
delegate
=
self
vc
.
cgName
=
model
?
.
purchaser
!
vc
.
orderNum
=
model
?
.
po_no
!
vc
.
po_id
=
model
?
.
po_id
!
vc
.
ven_id
=
model
?
.
ven_id
!
vc
.
ven_name
=
model
?
.
ven_name
!
vc
.
dayTime
=
(
model
?
.
purchase_time
!
)
!
vc
.
contentStr
=
model
?
.
remarks
!
as!
String
vc
.
typeSelect
=
(
model
?
.
type
!
)
!
-
1
model
?
.
goods_res
?
.
forEach
({
(
item
)
in
let
dict
=
[
"goods_name"
:
item
.
goods_name
as
Any
,
"goods_id"
:
item
.
goods_id
as
Any
,
"sku_id"
:
item
.
sku_id
as
Any
,
"spec_str"
:
item
.
sku_name
as
Any
,
"unit"
:
item
.
unit
as
Any
,
"price"
:
item
.
price
as
Any
,
"target_Count"
:
item
.
num
as
Any
,
"target_Price"
:
item
.
amount
as
Any
,
"pog_id"
:
item
.
pog_id
as
Any
]
as
[
String
:
Any
]
let
mo
=
GetGoodsInfoDataModel
(
JSON
:
dict
)
vc
.
datas
.
append
(
mo
!
)
vc
.
recordArr
.
append
(
mo
!
)
})
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
"入库"
,
"补录入库"
:
case
"入库"
,
"补录入库"
:
var
rkDatas
:
Array
<
InputInitInfoGoodsInfoModel
>
=
[]
var
rkDatas
:
Array
<
InputInitInfoGoodsInfoModel
>
=
[]
model
!.
goods_res
?
.
forEach
({
(
item
)
in
model
!.
goods_res
?
.
forEach
({
(
item
)
in
...
@@ -160,6 +220,7 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
...
@@ -160,6 +220,7 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
break
case
"撤销入库"
:
case
"撤销入库"
:
isBackOut
=
true
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
alertView
.
tishiLbl
.
text
=
""
...
@@ -187,7 +248,6 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
...
@@ -187,7 +248,6 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
}
}
}
}
func
loadData
(){
func
loadData
(){
print
(
"test === "
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"po_id"
:
po_id
as
Any
]
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"po_id"
:
po_id
as
Any
]
purchaseOrderDetail
(
dict
,
success
:
{
(
data
)
in
purchaseOrderDetail
(
dict
,
success
:
{
(
data
)
in
let
item
=
data
as!
PurchaseOrderDetailModel
let
item
=
data
as!
PurchaseOrderDetailModel
...
@@ -227,8 +287,11 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
...
@@ -227,8 +287,11 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
self
.
model
=
mo
self
.
model
=
mo
switch
self
.
model
!.
order_status
{
switch
self
.
model
!.
order_status
{
case
1
:
self
.
btnTitle
=
[
"取消"
,
"修改信息"
]
break
//订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
//订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
case
2
:
//入库状态(1未入库,2部分入库,3已入库)
case
2
,
5
:
//入库状态(1未入库,2部分入库,3已入库)
switch
self
.
model
!.
push_status
{
switch
self
.
model
!.
push_status
{
case
1
:
case
1
:
self
.
btnTitle
=
[
"入库"
]
self
.
btnTitle
=
[
"入库"
]
...
...
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.xib
View file @
e0cd63b4
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"CGDXQVc"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"CGDXQVc"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<connections>
<connections>
<outlet
property=
"btmColor"
destination=
"XSf-8D-3tt"
id=
"14B-Gc-l2f"
/>
<outlet
property=
"btmColor"
destination=
"XSf-8D-3tt"
id=
"14B-Gc-l2f"
/>
<outlet
property=
"btmHeight"
destination=
"nCB-Nc-mxK"
id=
"x4S-1D-3xP"
/>
<outlet
property=
"btmView"
destination=
"AfC-cy-CDK"
id=
"OZa-qe-r81"
/>
<outlet
property=
"btmView"
destination=
"AfC-cy-CDK"
id=
"OZa-qe-r81"
/>
<outlet
property=
"listView"
destination=
"xUS-ih-bIA"
id=
"8g9-zc-R5S"
/>
<outlet
property=
"listView"
destination=
"xUS-ih-bIA"
id=
"8g9-zc-R5S"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
...
...
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