Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
xffruit
Commits
80825f5c
Commit
80825f5c
authored
Mar 09, 2018
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看采购单的时候,如果已运包装数大于0,则不显示作废按钮
parent
707e5ef7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
19 deletions
+37
-19
Info.plist
XFFruit/Info.plist
+2
-2
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+27
-9
ProductBillCell.m
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
+1
-1
PurchaseReceiveProductCell.m
...ewControllers/Purchase/Views/PurchaseReceiveProductCell.m
+2
-2
ReceiveProductCell.m
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.m
+2
-2
TransferProductCell.m
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
+1
-1
TransportCreateProductCell.m
...wControllers/Transport/Views/TransportCreateProductCell.m
+1
-1
TransportPurductCell.m
...it/ViewControllers/Transport/Views/TransportPurductCell.m
+1
-1
XFFruit_TEST.plist
XFFruit_TEST.plist
+0
-0
No files found.
XFFruit/Info.plist
View file @
80825f5c
...
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
2.0.1
4
<
/string
>
<
string
>
2.0.1
5
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
2.0.1
4
<
/string
>
<
string
>
2.0.1
5
<
/string
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
80825f5c
...
...
@@ -125,6 +125,7 @@ typedef enum : NSUInteger {
PurchaseBill
*
bill
=
[[
PurchaseBill
alloc
]
init
];
[
bill
setValuesForKeysWithDictionary
:
dictData
];
self
.
bill
=
bill
;
[
strongSelf
validAbort
];
[
weakSelf
judgeType
];
[
_aBottomView
refreshCost
:
dictData
[
@"accountDetails"
]];
[
strongSelf
fetchtPurchaseDetail
];
...
...
@@ -160,16 +161,18 @@ typedef enum : NSUInteger {
}
-
(
void
)
createBtn
{
_firstBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
LeftMargin
,
ScreenHeight
-
64
-
BottomHeight
+
5
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
40
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
0
image
:
nil
title
:
@""
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
5
bgColor
:
GXF_SAVE_COLOR
];
[
self
.
view
addSubview
:
_firstBtn
];
_secondBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
_firstBtn
.
frame
)
+
LeftMargin
,
ScreenHeight
-
64
-
BottomHeight
+
5
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
40
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
0
image
:
nil
title
:
@""
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
5
bgColor
:
GXF_COMMIT_COLOR
];
[
self
.
view
addSubview
:
_secondBtn
];
[
self
showBtnByPermissions
];
}
//
- (void)createBtn{
//
_firstBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenHeight - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR];
//
[self.view addSubview:_firstBtn];
//
//
_secondBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(_firstBtn.frame)+ LeftMargin, ScreenHeight - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"" titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
//
[self.view addSubview:_secondBtn];
//
[self showBtnByPermissions];
//
}
-
(
void
)
createBtnWithArr
:
(
NSArray
*
)
arr
{
-
(
void
)
createBtnWithArr
:
(
NSArray
*
)
arrTitles
{
NSMutableArray
*
arr
=
[
NSMutableArray
arrayWithArray
:
arrTitles
];
CGFloat
btnWidth
=
(
ScreenSize
.
width
-
LeftMargin
*
(
arr
.
count
+
1
))
/
arr
.
count
;
for
(
NSInteger
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
NSInteger
btnTag
=
0
;
...
...
@@ -194,6 +197,21 @@ typedef enum : NSUInteger {
}
}
//判断是否可以作废
-
(
BOOL
)
validAbort
{
for
(
NSDictionary
*
pdt
in
self
.
bill
.
products
)
{
PurchaseBillProduct
*
billProbuct
=
[
PurchaseBillProduct
new
];
[
billProbuct
setValuesForKeysWithDictionary
:
pdt
];
if
(
billProbuct
.
shippedQty
.
doubleValue
>
0
)
{
UIButton
*
btn
=
[
self
.
view
viewWithTag
:
CancleTag
];
btn
.
hidden
=
true
;
return
false
;
}
}
return
true
;
}
//根据权限判断按钮显示
-
(
void
)
showBtnByPermissions
{
//逻辑判断按钮显示不显示
...
...
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
View file @
80825f5c
...
...
@@ -159,7 +159,7 @@
self
.
showStandLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装规格:1*%@%@"
,[
billProduct
.
qpc
stringValue
],
billProduct
.
baseUnit
];
self
.
showCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量:%@%@"
,
billProduct
.
qty
,
billProduct
.
unit
];
self
.
showBaseCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量:%@%@"
,
billProduct
.
baseQty
,
billProduct
.
baseUnit
];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
2
f元"
,[
billProduct
.
price
floatValue
]];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
4
f元"
,[
billProduct
.
price
floatValue
]];
self
.
showBasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%.4f元"
,[
billProduct
.
basePrice
floatValue
]];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%@元"
,[
billProduct
.
total
stringValue
]];
self
.
showNoteLabel
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
billProduct
.
remark
?
billProduct
.
remark
:
@"无"
];
...
...
XFFruit/ViewControllers/Purchase/Views/PurchaseReceiveProductCell.m
View file @
80825f5c
...
...
@@ -210,8 +210,8 @@
if
(
transferProduct
.
rctBaseQty
==
nil
)
{
self
.
showshjcCountLabel
.
text
=
@"基础数量[实收]:空"
;
}
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
2
f元"
,[
transferProduct
.
packprice
floatValue
]];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%.
2
f元"
,[
transferProduct
.
price
floatValue
]];
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
4
f元"
,[
transferProduct
.
packprice
floatValue
]];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%.
4
f元"
,[
transferProduct
.
price
floatValue
]];
self
.
showshTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额[实收]:%.2f元"
,
transferProduct
.
rctTotal
?[
transferProduct
.
rctTotal
floatValue
]:
0
.
00
f
];
if
(
transferProduct
.
rctTotal
==
nil
)
{
...
...
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.m
View file @
80825f5c
...
...
@@ -204,8 +204,8 @@
if
(
transferProduct
.
rctBaseQty
==
nil
)
{
self
.
showshjcCountLabel
.
text
=
@"基础数量[实收]:空"
;
}
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
2
f元"
,[
transferProduct
.
packprice
floatValue
]];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%.
2
f元"
,[
transferProduct
.
price
floatValue
]];
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
4
f元"
,[
transferProduct
.
packprice
floatValue
]];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%.
4
f元"
,[
transferProduct
.
price
floatValue
]];
self
.
showshTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额[实收]:%.2f元"
,
transferProduct
.
rctQty
.
doubleValue
*
transferProduct
.
packprice
.
doubleValue
];
...
...
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
View file @
80825f5c
...
...
@@ -166,7 +166,7 @@
self
.
showCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量:%@%@"
,[
pdtDetail
.
qty
stringValue
],
pdtDetail
.
unit
];
self
.
showBaseCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量:%@%@"
,[
pdtDetail
.
baseQty
stringValue
],
pdtDetail
.
baseUnit
];
self
.
showBasePrice
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%@元"
,
pdtDetail
.
price
];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
2
f元"
,[
pdtDetail
.
packprice
floatValue
]];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
4
f元"
,[
pdtDetail
.
packprice
floatValue
]];
NSString
*
sourceT
=
@""
;
if
([
pdtDetail
.
sourcetype
isEqualToString
:
@"none"
])
{
sourceT
=
@"无"
;
...
...
XFFruit/ViewControllers/Transport/Views/TransportCreateProductCell.m
View file @
80825f5c
...
...
@@ -191,7 +191,7 @@
self
.
showBaseCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量:%@%@"
,
pdtDetail
.
baseQty
,
pdtDetail
.
baseUnit
];
self
.
showBasePrice
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%@元"
,
pdtDetail
.
price
];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
2
f元"
,[
pdtDetail
.
packprice
floatValue
]];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
4
f元"
,[
pdtDetail
.
packprice
floatValue
]];
self
.
showPurchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"采购单号:%@"
,
pdtDetail
.
purchasebillnumber
.
length
>
0
?
pdtDetail
.
purchasebillnumber
:
@"无"
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%.2f元"
,[
pdtDetail
.
total
floatValue
]];
self
.
showShippedBaseQty
.
text
=
[
NSString
stringWithFormat
:
@"转运包装数量:%@%@"
,
pdtDetail
.
transferQty
?
[
pdtDetail
.
transferQty
stringValue
]:
@"0"
,
pdtDetail
.
unit
];
...
...
XFFruit/ViewControllers/Transport/Views/TransportPurductCell.m
View file @
80825f5c
...
...
@@ -188,7 +188,7 @@
self
.
showStandLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装规格:1*%@%@"
,[
pdtDetail
.
qpc
stringValue
],
pdtDetail
.
baseUnit
];
self
.
showCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量:%@%@"
,[
pdtDetail
.
qty
stringValue
],
pdtDetail
.
unit
];
self
.
showBaseCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量:%@%@"
,[
pdtDetail
.
baseQty
stringValue
],
pdtDetail
.
baseQty
];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
2
f元"
,[
pdtDetail
.
packprice
floatValue
]];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.
4
f元"
,[
pdtDetail
.
packprice
floatValue
]];
self
.
showPurchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"采购单号:%@"
,
pdtDetail
.
purchasebillnumber
.
length
>
0
?
pdtDetail
.
purchasebillnumber
:
@"无"
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%.2f元"
,[
pdtDetail
.
total
floatValue
]];
self
.
showShippedBaseQty
.
text
=
[
NSString
stringWithFormat
:
@"转运包装数量:%@%@"
,
pdtDetail
.
transferQty
?
[
pdtDetail
.
transferQty
stringValue
]:
@"0"
,
pdtDetail
.
unit
];
...
...
XFFruit_TEST.plist
View file @
80825f5c
No preview for this file type
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