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
b1e0903c
Commit
b1e0903c
authored
Jun 23, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
禅道bug修复
parent
2634125a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
200 additions
and
144 deletions
+200
-144
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
+20
-2
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
+107
-109
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
...iewController/代客下单(购物)/XuanZeShangPinViewController.swift
+63
-21
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
...atform/ViewController/新增采购单/XinCaiGouViewController.swift
+1
-0
GeliBusinessPlatform/ViewController/采购单列表/CGDListVC.swift
GeliBusinessPlatform/ViewController/采购单列表/CGDListVC.swift
+8
-12
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
+1
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b1e0903c
No preview for this file type
GeliBusinessPlatform/View/Cell/XuanZeShangPinCell.swift
View file @
b1e0903c
...
...
@@ -13,6 +13,7 @@ import UIKit
@objc
optional
func
XuanZeShangPinCellCountChange
(
sender
:
XuanZeShangPinCell
,
senderTF
:
UITextField
)
}
class
XuanZeShangPinCell
:
UITableViewCell
{
var
isCg
=
false
var
imgUrlPath
:
String
?
var
sku_id
:
Int
?
var
model
:
GetGoodsInfoDataModel
?
...
...
@@ -29,12 +30,25 @@ class XuanZeShangPinCell: UITableViewCell{
}
@IBAction
func
addOrDelAction
(
_
sender
:
UIButton
)
{
let
str
=
countTF
.
text
as!
NSString
if
isCg
{
if
sender
.
tag
==
0
{
//加
countTF
.
text
=
"
\(
str
.
integerValue
+
1
)
"
}
else
{
if
str
.
integerValue
>
1
{
countTF
.
text
=
"
\(
str
.
integerValue
-
1
)
"
}
}
delegate
?
.
XuanZeShangPinCellCountChange
?(
sender
:
self
,
senderTF
:
countTF
)
return
}
if
sender
.
tag
==
0
{
//加
if
maxNum
!
>
0
{
if
(
str
.
integerValue
+
1
)
>
maxNum
!
{
let
maxStr
=
StringByInt
(
number
:
maxNum
!
)
HUD
.
flash
(
.
label
(
"不可超过最大数量"
+
maxStr
),
delay
:
1.2
)
countTF
.
text
=
StringByInt
(
number
:
maxNum
!
)
}
else
{
countTF
.
text
=
"
\(
str
.
integerValue
+
1
)
"
}
...
...
@@ -74,14 +88,18 @@ class XuanZeShangPinCell: UITableViewCell{
@objc
func
textChange
(
sender
:
UITextField
){
let
num
=
sender
.
text
as!
NSString
if
isCg
{
delegate
?
.
XuanZeShangPinCellTextChange
?(
index
:
idx
!
,
sender
:
self
,
senderTF
:
sender
)
return
}
let
maxStr
=
StringByInt
(
number
:
maxNum
!
)
if
sender
==
countTF
{
if
num
.
integerValue
>
maxNum
!
{
HUD
.
flash
(
.
label
(
"不可超过最大数量"
+
maxStr
),
delay
:
1.2
)
countTF
.
text
=
maxStr
}
}
}
delegate
?
.
XuanZeShangPinCellTextChange
?(
index
:
idx
!
,
sender
:
self
,
senderTF
:
sender
)
}
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
View file @
b1e0903c
...
...
@@ -16,19 +16,106 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var
delegate
:
NewRKVcDelegate
?
var
po_id
=
0
var
isCaiGou
=
false
var
remark
=
""
//MARK: - 提交申请
func
sureGeliAlertTextViewAction
(
sender
:
String
)
{
if
isGm
{
if
sender
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写备注"
),
delay
:
1.2
)
remark
=
sender
holderArr
.
insert
(
remark
,
at
:
holderArr
.
count
-
1
)
holderArr
.
remove
(
at
:
holderArr
.
count
-
1
)
listView
.
reloadData
()
}
@IBAction
func
gmAction
(
_
sender
:
Any
)
{
if
gmNumber
==
nil
{
if
holderArr
[
0
]
==
"请选择仓库"
{
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
return
}
if
holderArr
[
1
]
==
"请选择库位"
{
HUD
.
flash
(
.
label
(
"请选择库位"
),
delay
:
1.2
)
return
}
}
HUD
.
show
(
.
progress
)
if
holderArr
[
2
]
==
"请选择入库类型"
{
HUD
.
flash
(
.
label
(
"请选择入库类型"
),
delay
:
1.2
)
return
}
if
rkSelectArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品"
),
delay
:
1.2
)
return
}
if
lgBtnTitLbl
.
text
==
"提交申请"
{
for
item
in
rkSelectArr
{
if
item
.
RKSL
==
nil
{
HUD
.
flash
(
.
label
(
"请填写入库数量"
),
delay
:
1.2
)
return
}
if
item
.
createDay
==
nil
{
HUD
.
flash
(
.
label
(
"请选择生产日期"
),
delay
:
1.2
)
return
}
if
item
.
BZQ
==
nil
{
HUD
.
flash
(
.
label
(
"请填写保质期"
),
delay
:
1.2
)
return
}
}
HUD
.
show
(
.
progress
)
if
lgBtnTitLbl
.
text
!=
"提交申请"
{
var
goodsInfoArr
:
Array
<
Any
>
?
=
[]
rkSelectArr
.
forEach
{
(
model
)
in
var
rkjg
:
Float
=
0
var
total
:
Float
=
0
if
model
.
RKJG
!=
nil
{
rkjg
=
model
.
RKJG
!
if
model
.
RKSL
!=
nil
{
total
=
rkjg
*
Float
(
model
.
RKSL
!
)
}
}
var
shelf_life
=
model
.
BZQ
if
model
.
DayType
==
0
{
shelf_life
=
model
.
BZQ
!
*
30
}
let
goods
=
[
"goods_id"
:
model
.
goods_id
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"goods_name"
:
model
.
goods_name
as
Any
,
"goods_spec"
:
model
.
spec_str
as
Any
,
"number"
:
model
.
RKSL
as
Any
,
"price"
:
model
.
price
as
Any
,
"amount"
:
rkjg
as
Any
,
"subtotal"
:
total
as
Any
,
"production_data"
:
model
.
createDay
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"report_id"
:
0
as
Any
,
"pog_id"
:
model
.
pog_id
as
Any
]
goodsInfoArr
?
.
append
(
goods
)
}
let
goods_info
=
dataChangeString
(
sender
:
goodsInfoArr
!
)
//直接入库
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
,
"p_id"
:
p_id
as
Any
,
"i_type"
:
typeSelect
!
+
1
as
Any
,
"apply_remark"
:
remark
as
Any
,
"po_id"
:
po_id
as
Any
,
"goods_info"
:
goods_info
as
Any
]
GoodsInput
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"入库成功"
),
delay
:
1.2
)
self
.
delegate
?
.
NewRKVcFinish
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
}
}
else
{
var
goodsInfoArr
:
Array
<
Any
>
?
=
[]
rkSelectArr
.
forEach
{
(
model
)
in
var
total
:
Float
=
0
...
...
@@ -60,7 +147,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"i_type"
:
typeSelect
!
+
1
as
Any
,
"apply_remark"
:
sender
as
Any
,
"apply_remark"
:
remark
as
Any
,
"po_id"
:
po_id
as
Any
,
"goods_info"
:
goods_info
as
Any
]
...
...
@@ -75,104 +162,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
return
}
var
goodsInfoArr
:
Array
<
Any
>
?
=
[]
rkSelectArr
.
forEach
{
(
model
)
in
var
rkjg
:
Float
=
0
var
total
:
Float
=
0
if
model
.
RKJG
!=
nil
{
rkjg
=
model
.
RKJG
!
if
model
.
RKSL
!=
nil
{
total
=
rkjg
*
Float
(
model
.
RKSL
!
)
}
}
var
shelf_life
=
model
.
BZQ
if
model
.
DayType
==
0
{
shelf_life
=
model
.
BZQ
!
*
30
}
let
goods
=
[
"goods_id"
:
model
.
goods_id
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"goods_name"
:
model
.
goods_name
as
Any
,
"goods_spec"
:
model
.
spec_str
as
Any
,
"number"
:
model
.
RKSL
as
Any
,
"price"
:
model
.
price
as
Any
,
"amount"
:
rkjg
as
Any
,
"subtotal"
:
total
as
Any
,
"production_data"
:
model
.
createDay
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"report_id"
:
0
as
Any
,
"pog_id"
:
model
.
pog_id
as
Any
]
goodsInfoArr
?
.
append
(
goods
)
}
let
goods_info
=
dataChangeString
(
sender
:
goodsInfoArr
!
)
//直接入库
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
,
"p_id"
:
p_id
as
Any
,
"i_type"
:
typeSelect
!
+
1
as
Any
,
"apply_remark"
:
sender
as
Any
,
"po_id"
:
po_id
as
Any
,
"goods_info"
:
goods_info
as
Any
]
GoodsInput
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"入库成功"
),
delay
:
1.2
)
self
.
delegate
?
.
NewRKVcFinish
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
})
{
(
error
)
in
}
}
@IBAction
func
gmAction
(
_
sender
:
Any
)
{
if
gmNumber
==
nil
{
if
holderArr
[
0
]
==
"请选择仓库"
{
HUD
.
flash
(
.
label
(
"请选择仓库"
),
delay
:
1.2
)
return
}
if
holderArr
[
1
]
==
"请选择库位"
{
HUD
.
flash
(
.
label
(
"请选择库位"
),
delay
:
1.2
)
return
}
}
if
holderArr
[
2
]
==
"请选择入库类型"
{
HUD
.
flash
(
.
label
(
"请选择入库类型"
),
delay
:
1.2
)
return
}
if
rkSelectArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择商品"
),
delay
:
1.2
)
return
}
for
item
in
rkSelectArr
{
if
item
.
RKSL
==
nil
{
HUD
.
flash
(
.
label
(
"请填写入库数量"
),
delay
:
1.2
)
return
}
if
item
.
createDay
==
nil
{
HUD
.
flash
(
.
label
(
"请选择生产日期"
),
delay
:
1.2
)
return
}
if
item
.
BZQ
==
nil
{
HUD
.
flash
(
.
label
(
"请填写保质期"
),
delay
:
1.2
)
return
}
}
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
alterView
.
titleLbl
.
text
=
"请填写入库备注"
alterView
.
placerLbl
.
text
=
"请填写入库备注..."
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
var
gmNumber
:
Int
?
...
...
@@ -182,8 +173,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
@IBOutlet
weak
var
lgBtnTitLbl
:
UILabel
!
@IBOutlet
weak
var
lgBtn
:
LGButton
!
var
isGm
=
false
let
titleArr
=
[
"仓库:"
,
"库位:"
,
"入库类型:"
,
"入库时间:"
]
var
holderArr
=
[
"请选择仓库"
,
"请选择库位"
,
"请选择入库类型"
,
"时间"
]
let
titleArr
=
[
"仓库:"
,
"库位:"
,
"入库类型:"
,
"入库时间:"
,
"备注:"
]
var
holderArr
=
[
"请选择仓库"
,
"请选择库位"
,
"请选择入库类型"
,
"时间"
,
"请输入备注"
]
//入库类型
var
rkTypeArr
=
[
"采购"
,
"调入"
,
"退货"
,
"生产"
,
"调出被拒绝"
,
"外采"
,
"其他"
,
"固定采购"
,
"临时采购"
]
var
typeSelect
:
Int
?
...
...
@@ -319,6 +310,13 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
if
indexPath
.
section
==
1
{
return
}
if
indexPath
.
row
==
4
{
let
alterView
=
GeliAlertTextView
(
frame
:
self
.
view
.
window
!.
bounds
)
alterView
.
delegate
=
self
alterView
.
titleLbl
.
text
=
"请填写入库备注"
alterView
.
placerLbl
.
text
=
"请填写入库备注..."
self
.
view
.
window
?
.
addSubview
(
alterView
)
}
if
indexPath
.
row
==
2
{
if
isCaiGou
==
false
{
if
glSelectView
==
nil
{
...
...
@@ -442,7 +440,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
if
data
.
BZQ
!=
nil
{
cell
.
bzqTf
.
text
=
"
\(
data
.
BZQ
!
)
"
}
if
data
.
DayType
==
0
{
cell
.
rightBtn
.
isSelected
=
true
cell
.
leftBtn
.
isSelected
=
false
...
...
@@ -460,7 +458,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
cell
.
mustLbl
.
isHidden
=
true
cell
.
nameLeft
.
constant
=
0
cell
.
mustWidth
.
constant
=
0
if
indexPath
.
row
==
3
{
if
indexPath
.
row
>
2
{
setCellUI
(
cell
:
cell
)
}
return
cell
...
...
@@ -657,7 +655,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
section
==
0
{
return
4
return
titleArr
.
count
}
return
rkSelectArr
.
count
}
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/XuanZeShangPinViewController.swift
View file @
b1e0903c
...
...
@@ -48,15 +48,31 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
return
}
}
else
{
var
PASS
=
true
if
selectArr
.
count
!=
0
{
delegate
?
.
XuanZeShangPinViewControllerSubmitAction
(
selectArr
:
selectArr
)
selectArr
.
forEach
{
(
model
)
in
if
model
.
target_Price
==
"0"
{
HUD
.
flash
(
.
label
(
"采购价格不能为0"
),
delay
:
1.2
)
PASS
=
false
return
}
if
model
.
target_Count
==
0
{
HUD
.
flash
(
.
label
(
"采购数量不能为0"
),
delay
:
1.2
)
PASS
=
false
return
}
}
if
PASS
{
delegate
?
.
XuanZeShangPinViewControllerSubmitAction
(
selectArr
:
selectArr
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
else
{
HUD
.
flash
(
.
label
(
"请选择商品"
),
delay
:
1.2
)
return
}
}
}
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
var
barTitle
:
String
?
//
...
...
@@ -154,21 +170,27 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
if
textField
==
cell
.
countTF
{
//数量
if
isPurnInt
(
string
:
textField
.
text
!
){
if
Int
(
textField
.
text
!
)
!
>
cell
.
maxNum
!
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
cell
.
maxNum
!
)
"
),
delay
:
1.2
)
model
.
target_Count
=
cell
.
maxNum
!
textField
.
text
=
"
\(
cell
.
maxNum
!
)
"
if
isCG
==
false
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
cell
.
maxNum
!
)
"
),
delay
:
1.2
)
model
.
target_Count
=
cell
.
maxNum
!
textField
.
text
=
"
\(
cell
.
maxNum
!
)
"
}
else
{
model
.
target_Count
=
Int
(
textField
.
text
!.
replacingOccurrences
(
of
:
","
,
with
:
""
))
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
}
}
else
if
Int
(
textField
.
text
!
)
==
0
{
HUD
.
flash
(
.
label
(
"数量不小于1"
),
delay
:
1.2
)
model
.
target_Count
=
1
textField
.
text
=
"1"
}
else
{
model
.
target_Count
=
Int
(
textField
.
text
!.
replacingOccurrences
(
of
:
","
,
with
:
""
))
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
model
.
target_Count
=
Int
(
textField
.
text
!
)
}
}
else
{
HUD
.
flash
(
.
label
(
"请输入正确的数量"
),
delay
:
1.2
)
textField
.
text
=
StringByInt
(
number
:
(
model
.
origin_number
!
))
model
.
target_Count
=
model
.
origin_number
!
textField
.
text
=
StringByInt
(
number
:
(
model
.
origin_number
!
))
}
}
else
{
//价格
if
isPurnNumber
(
str
:
textField
.
text
!
){
...
...
@@ -188,16 +210,22 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
if
textField
==
cell
.
countTF
{
//数量
if
isPurnInt
(
string
:
textField
.
text
!
){
if
Int
(
textField
.
text
!
)
!
>
cell
.
maxNum
!
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
cell
.
maxNum
!
)
"
),
delay
:
1.2
)
cell
.
model
!.
target_Count
=
cell
.
maxNum
!
textField
.
text
=
"
\(
cell
.
maxNum
!
)
"
if
isCG
==
false
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
cell
.
maxNum
!
)
"
),
delay
:
1.2
)
cell
.
model
!.
target_Count
=
cell
.
maxNum
!
textField
.
text
=
"
\(
cell
.
maxNum
!
)
"
}
else
{
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
cell
.
model
?
.
target_Count
=
Int
(
textField
.
text
!.
replacingOccurrences
(
of
:
","
,
with
:
""
))
}
}
else
if
Int
(
textField
.
text
!
)
==
0
{
HUD
.
flash
(
.
label
(
"数量不小于1"
),
delay
:
1.2
)
cell
.
model
!.
target_Count
=
1
textField
.
text
=
"1"
}
else
{
textField
.
text
=
formatShowNumber
(
value
:
textField
.
text
!
)
cell
.
model
?
.
target_Count
=
Int
(
textField
.
text
!
)
cell
.
model
?
.
target_Count
=
Int
(
textField
.
text
!
.
replacingOccurrences
(
of
:
","
,
with
:
""
)
)
}
}
else
{
HUD
.
flash
(
.
label
(
"请输入正确的数量"
),
delay
:
1.2
)
...
...
@@ -277,6 +305,7 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
cell
.
priceTF
.
keyboardType
=
.
decimalPad
cell
.
priceTF
.
returnKeyType
=
.
done
cell
.
countTF
.
returnKeyType
=
.
done
cell
.
isCg
=
isCG
if
barTitle
==
"修改价格"
{
let
model
=
selectArr
[
indexPath
.
row
]
...
...
@@ -286,7 +315,7 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
cell
.
detailLbl
.
text
=
"
\(
model
.
spec_str
!
)
/
\(
model
.
unit
!
)
"
cell
.
detailLbl2
.
text
=
"库存:
\(
model
.
inventory
!
)
"
cell
.
iconImg
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
model
.
goods_img
!
))
cell
.
countTF
.
text
=
"
\(
model
.
target_Count
!
)
"
cell
.
countTF
.
text
=
StringByInt
(
number
:
(
model
.
target_Count
!
))
cell
.
priceTF
.
text
=
model
.
target_Price
cell
.
maxNum
=
model
.
inventory
cell
.
selectBtn
.
isHidden
=
true
...
...
@@ -417,36 +446,49 @@ class XuanZeShangPinViewController: BaseViewController,UITableViewDelegate,UITab
if
barTitle
==
"修改价格"
{
let
model
=
selectArr
[
sender
.
tag
]
if
isPurnInt
(
string
:
senderTF
.
text
!
){
if
Int
(
senderTF
.
text
!
)
!
>
sender
.
maxNum
!
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
sender
.
maxNum
!
)
"
),
delay
:
1.2
)
model
.
target_Count
=
sender
.
maxNum
!
senderTF
.
text
=
"
\(
sender
.
maxNum
!
)
"
if
isCG
==
false
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
sender
.
maxNum
!
)
"
),
delay
:
1.2
)
model
.
target_Count
=
sender
.
maxNum
!
senderTF
.
text
=
"
\(
sender
.
maxNum
!
)
"
}
else
{
senderTF
.
text
=
formatShowNumber
(
value
:
senderTF
.
text
!
)
model
.
target_Count
=
Int
(
senderTF
.
text
!.
replacingOccurrences
(
of
:
","
,
with
:
""
))
print
(
"model 1= "
,
model
.
target_Count
)
}
}
else
if
Int
(
senderTF
.
text
!
)
==
0
{
HUD
.
flash
(
.
label
(
"数量不小于1"
),
delay
:
1.2
)
model
.
target_Count
=
1
senderTF
.
text
=
"1"
}
else
{
model
.
target_Count
=
Int
(
senderTF
.
text
!.
replacingOccurrences
(
of
:
","
,
with
:
""
))
senderTF
.
text
=
formatShowNumber
(
value
:
senderTF
.
text
!
)
model
.
target_Count
=
Int
(
senderTF
.
text
!
)
print
(
"model2= "
,
model
.
target_Count
)
}
}
else
{
HUD
.
flash
(
.
label
(
"请输入正确的数量"
),
delay
:
1.2
)
senderTF
.
text
=
StringByInt
(
number
:
(
model
.
origin_number
!
))
model
.
target_Count
=
model
.
origin_number
!
senderTF
.
text
=
StringByInt
(
number
:
(
model
.
origin_number
!
))
}
}
else
{
if
isPurnInt
(
string
:
senderTF
.
text
!
){
if
Int
(
senderTF
.
text
!
)
!
>
sender
.
maxNum
!
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
sender
.
maxNum
!
)
"
),
delay
:
1.2
)
sender
.
model
!.
target_Count
=
sender
.
maxNum
!
senderTF
.
text
=
"
\(
sender
.
maxNum
!
)
"
if
isCG
==
false
{
HUD
.
flash
(
.
label
(
"超出最大数量
\(
sender
.
maxNum
!
)
"
),
delay
:
1.2
)
sender
.
model
!.
target_Count
=
sender
.
maxNum
!
senderTF
.
text
=
"
\(
sender
.
maxNum
!
)
"
}
else
{
senderTF
.
text
=
formatShowNumber
(
value
:
senderTF
.
text
!
)
sender
.
model
?
.
target_Count
=
Int
(
senderTF
.
text
!.
replacingOccurrences
(
of
:
","
,
with
:
""
))
}
}
else
if
Int
(
senderTF
.
text
!
)
==
0
{
HUD
.
flash
(
.
label
(
"数量不小于1"
),
delay
:
1.2
)
sender
.
model
!.
target_Count
=
1
senderTF
.
text
=
"1"
}
else
{
senderTF
.
text
=
formatShowNumber
(
value
:
senderTF
.
text
!
)
sender
.
model
?
.
target_Count
=
Int
(
senderTF
.
text
!
)
sender
.
model
?
.
target_Count
=
Int
(
senderTF
.
text
!
.
replacingOccurrences
(
of
:
","
,
with
:
""
)
)
}
}
else
{
HUD
.
flash
(
.
label
(
"请输入正确的数量"
),
delay
:
1.2
)
...
...
GeliBusinessPlatform/ViewController/新增采购单/XinCaiGouViewController.swift
View file @
b1e0903c
...
...
@@ -481,6 +481,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
cell
.
delegate
=
self
let
model
=
datas
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
model
.
goods_name
!
print
(
"asdfasdf === "
,
model
.
target_Count
)
cell
.
detailLbl
.
text
=
model
.
spec_str
!
+
" ¥"
+
model
.
target_Price
!
+
"x
\(
model
.
target_Count
!
)
"
+
model
.
unit
!
cell
.
cgCount
.
text
=
"
\(
model
.
target_Count
!
)
"
cell
.
cgPrice
.
text
=
model
.
target_Price
!
...
...
GeliBusinessPlatform/ViewController/采购单列表/CGDListVC.swift
View file @
b1e0903c
...
...
@@ -149,15 +149,9 @@ class CGDListVC: BaseViewController , UITableViewDelegate, UITableViewDataSource
}
cell
.
statusLbl
.
text
=
status
}
var
count
=
0
var
amount
:
Float
=
0
model
.
goods_res
?
.
forEach
({
(
item
)
in
count
+=
item
.
num
!
let
str
=
item
.
subtotal
!
as
NSString
amount
+=
str
.
floatValue
})
cell
.
countLbl
.
text
=
"
\(
count
)
"
cell
.
priceLbl
.
text
=
"
\(
amount
)
"
cell
.
countLbl
.
text
=
"
\(
model
.
total_num
!
)
"
cell
.
priceLbl
.
text
=
model
.
total_amount
!
cell
.
timeLbl
.
text
=
dayAndTimeByDouble
(
sender
:
Double
(
model
.
purchase_time
!
))
var
btnStr
:
Array
<
String
>
=
[]
...
...
@@ -356,9 +350,11 @@ class CGDListVC: BaseViewController , UITableViewDelegate, UITableViewDataSource
purchaseOrderList
(
dic
,
success
:
{
(
data
)
in
self
.
datas
.
removeAll
()
let
model
=
data
as!
PurchaseOrderListModel
if
(
model
.
data
?
.
purchase_auth
?
.
contains
(
"119"
))
!
{
self
.
isGm
=
true
print
(
"model.data?.purchase_auth? == "
,
model
.
data
?
.
purchase_auth
)
if
model
.
data
?
.
purchase_auth
!=
nil
{
if
(
model
.
data
?
.
purchase_auth
?
.
contains
(
"119"
))
!
{
self
.
isGm
=
true
}
}
model
.
data
?
.
list
?
.
forEach
({
(
item
)
in
...
...
GeliBusinessPlatform/ViewController/采购单详情/CGDXQVc.swift
View file @
b1e0903c
...
...
@@ -217,6 +217,7 @@ class CGDXQVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,GLAl
vc
.
rkSelectArr
=
rkDatas
vc
.
po_id
=
model
?
.
po_id
!
as!
Int
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
case
"撤销入库"
:
...
...
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