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
4c20cc6d
Commit
4c20cc6d
authored
7 years ago
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
52cb0498
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
577 additions
and
16 deletions
+577
-16
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+12
-0
Info.plist
XFFruit/Info.plist
+2
-2
ProductBillViewController.m
...trollers/Purchase/Controllers/ProductBillViewController.m
+1
-1
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+3
-3
PurchaseReceiveProductViewController.h
...rchase/Controllers/PurchaseReceiveProductViewController.h
+19
-0
PurchaseReceiveProductViewController.m
...rchase/Controllers/PurchaseReceiveProductViewController.m
+229
-0
ProductBillCell.m
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
+5
-5
PurchaseReceiveProductCell.h
...ewControllers/Purchase/Views/PurchaseReceiveProductCell.h
+45
-0
PurchaseReceiveProductCell.m
...ewControllers/Purchase/Views/PurchaseReceiveProductCell.m
+252
-0
ReceiveProductViewController.m
...lers/Receiving/Controllers/ReceiveProductViewController.m
+1
-1
ReceiveProductCell.m
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.m
+2
-1
TransferProductCell.m
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
+4
-3
TransportPurchaseViewController.m
...s/Transport/Controllers/TransportPurchaseViewController.m
+2
-0
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
4c20cc6d
...
...
@@ -215,6 +215,8 @@
72F9D4881BA8065500795A00
/* PurchaseNoticeListCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F9D4871BA8065500795A00
/* PurchaseNoticeListCell.m */
;
};
72F9D48B1BA8582100795A00
/* NoticeBoltView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F9D48A1BA8582100795A00
/* NoticeBoltView.m */
;
};
871F9F047CDDAC523E4358DC
/* libPods.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
86D33EC280C440156ED1B976
/* libPods.a */
;
};
8F1523D31F21B2D4004ECC7B
/* PurchaseReceiveProductCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8F1523D21F21B2D4004ECC7B
/* PurchaseReceiveProductCell.m */
;
};
8F3EB1A41F21AABC00F3A669
/* PurchaseReceiveProductViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8F3EB1A31F21AABC00F3A669
/* PurchaseReceiveProductViewController.m */
;
};
8F67988A1DB8CC9400348267
/* WebKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8F6798891DB8CC9400348267
/* WebKit.framework */
;
};
8F67988C1DB8CC9E00348267
/* WebKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8F67988B1DB8CC9E00348267
/* WebKit.framework */
;
};
8FD12B531EC4737200845F9B
/* ProductStockModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8FD12B521EC4737200845F9B
/* ProductStockModel.m */
;
};
...
...
@@ -1233,6 +1235,10 @@
72F9D48A1BA8582100795A00
/* NoticeBoltView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NoticeBoltView.m
;
sourceTree
=
"<group>"
;
};
7DDFB1D460448C3B45118195
/* Pods.release.xcconfig */
=
{
isa
=
PBXFileReference
;
includeInIndex
=
1
;
lastKnownFileType
=
text.xcconfig
;
name
=
Pods.release.xcconfig
;
path
=
"Pods/Target Support Files/Pods/Pods.release.xcconfig"
;
sourceTree
=
"<group>"
;
};
86D33EC280C440156ED1B976
/* libPods.a */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
archive.ar
;
includeInIndex
=
0
;
path
=
libPods.a
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
8F1523D11F21B2D4004ECC7B
/* PurchaseReceiveProductCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PurchaseReceiveProductCell.h
;
sourceTree
=
"<group>"
;
};
8F1523D21F21B2D4004ECC7B
/* PurchaseReceiveProductCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseReceiveProductCell.m
;
sourceTree
=
"<group>"
;
};
8F3EB1A21F21AABC00F3A669
/* PurchaseReceiveProductViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PurchaseReceiveProductViewController.h
;
sourceTree
=
"<group>"
;
};
8F3EB1A31F21AABC00F3A669
/* PurchaseReceiveProductViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseReceiveProductViewController.m
;
sourceTree
=
"<group>"
;
};
8F6798891DB8CC9400348267
/* WebKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
WebKit.framework
;
path
=
System/Library/PrivateFrameworks/WebKit.framework
;
sourceTree
=
SDKROOT
;
};
8F67988B1DB8CC9E00348267
/* WebKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
WebKit.framework
;
path
=
System/Library/Frameworks/WebKit.framework
;
sourceTree
=
SDKROOT
;
};
8FD12B511EC4737200845F9B
/* ProductStockModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ProductStockModel.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2077,6 +2083,8 @@
7281A0B81B897BB20052B1AC
/* PurchaseViewController.m */
,
7281A0C01B898A040052B1AC
/* PurchaseDetailViewController.h */
,
7281A0C11B898A040052B1AC
/* PurchaseDetailViewController.m */
,
8F3EB1A21F21AABC00F3A669
/* PurchaseReceiveProductViewController.h */
,
8F3EB1A31F21AABC00F3A669
/* PurchaseReceiveProductViewController.m */
,
);
path
=
Controllers
;
sourceTree
=
"<group>"
;
...
...
@@ -2111,6 +2119,8 @@
FE4678B51B8D986900B5EDA3
/* PurchaseBoltView.m */
,
049957E31C8C1CFD003388D3
/* BottomPurchaseView.h */
,
049957E41C8C1CFD003388D3
/* BottomPurchaseView.m */
,
8F1523D11F21B2D4004ECC7B
/* PurchaseReceiveProductCell.h */
,
8F1523D21F21B2D4004ECC7B
/* PurchaseReceiveProductCell.m */
,
);
path
=
Views
;
sourceTree
=
"<group>"
;
...
...
@@ -3879,6 +3889,7 @@
726B2D361C05A46A000D54A7
/* LowerOrgs.m in Sources */
,
359788661C868EB8009205AA
/* XFPhoto.m in Sources */
,
72F9D48B1BA8582100795A00
/* NoticeBoltView.m in Sources */
,
8F3EB1A41F21AABC00F3A669
/* PurchaseReceiveProductViewController.m in Sources */
,
C142D2AA1AC3A155000109A7
/* NSDate+FormatterAdditions.m in Sources */
,
72805CF61BB8E20B009E1F82
/* NewTransferViewController.m in Sources */
,
C1B307A31ADD199600657F11
/* ICRTaskResultContentView.m in Sources */
,
...
...
@@ -3887,6 +3898,7 @@
721BF46A1BAAA18400255750
/* FooterCell.m in Sources */
,
30DB9F971AD7DEC00085FA5C
/* IBTUISearchBar.m in Sources */
,
7217E9E61B72364300FE5C1D
/* SurveyViewController.m in Sources */
,
8F1523D31F21B2D4004ECC7B
/* PurchaseReceiveProductCell.m in Sources */
,
C10214E41AD9141E0024637E
/* ICRAnnouncementViewController.m in Sources */
,
C1D017281AD8F46700CD9CB8
/* IBTScrollLoadMoreView.m in Sources */
,
72A813FD1BCD33BE003631F3
/* ReceiveBoltView.m in Sources */
,
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Info.plist
View file @
4c20cc6d
...
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.
37
<
/string
>
<
string
>
1.2.
40
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.2.
37
<
/string
>
<
string
>
1.2.
40
<
/string
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/ProductBillViewController.m
View file @
4c20cc6d
...
...
@@ -50,7 +50,7 @@
self
.
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
[
self
.
view
addSubview
:
self
.
tableView
];
NSArray
*
arr
=
@[
@"商品"
,
@"单价"
,
@"包装数量"
,
@"已发运数"
];
NSArray
*
arr
=
@[
@"商品"
,
@"单价"
,
@"包装数量"
];
HeaderCell
*
headCell
=
[[
HeaderCell
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
38
)
withArr
:
arr
withHiddenEdit
:
self
.
isHiddenEdit
];
[
self
.
view
addSubview
:
headCell
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
4c20cc6d
...
...
@@ -10,7 +10,7 @@
#import "ProductBillViewController.h"
#import "PurchaseBillProduct.h"
#import "BottomPurchaseView.h"
#import "ReceiveProductViewController.h"
#import "
Purchase
ReceiveProductViewController.h"
#import "TransferPdtDetail.h"
#import "NewReceiveProductViewController.h"
//#import "RejectView.h"
...
...
@@ -42,7 +42,7 @@ typedef enum : NSUInteger {
UIButton
*
_secondBtn
;
BottomPurchaseView
*
_aBottomView
;
UIView
*
_recieveBottomView
;
ReceiveProductViewController
*
_pvc
;
Purchase
ReceiveProductViewController
*
_pvc
;
}
@property
(
nonatomic
,
strong
)
UILabel
*
billNumberLabel
;
...
...
@@ -405,7 +405,7 @@ typedef enum : NSUInteger {
_recieveBottomView
.
backgroundColor
=
[
UIColor
redColor
];
[
_scrollView
addSubview
:
_recieveBottomView
];
_pvc
=
[[
ReceiveProductViewController
alloc
]
init
];
_pvc
=
[[
Purchase
ReceiveProductViewController
alloc
]
init
];
_pvc
.
viewFrame
=
_recieveBottomView
.
bounds
;
_pvc
.
isHiddenAdd
=
YES
;
[
_recieveBottomView
addSubview
:
_pvc
.
view
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/PurchaseReceiveProductViewController.h
0 → 100644
View file @
4c20cc6d
//
// PurchaseReceiveProductViewController.h
// XFFruit
//
// Created by Javen on 2017/7/21.
// Copyright © 2017年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
PurchaseReceiveProductViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
NSMutableArray
*
defaultState
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productArr
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
assign
)
CGRect
viewFrame
;
@property
(
nonatomic
,
assign
)
BOOL
isHiddenAdd
;
@property
(
nonatomic
,
assign
)
BOOL
isHiddenEdit
;
@property
(
nonatomic
,
strong
)
NSString
*
productName
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/PurchaseReceiveProductViewController.m
0 → 100644
View file @
4c20cc6d
//
// PurchaseReceiveProductViewController.m
// XFFruit
//
// Created by Javen on 2017/7/21.
// Copyright © 2017年 Xummer. All rights reserved.
//
#import "PurchaseReceiveProductViewController.h"
#import "HeaderCell.h"
#import "PurchaseReceiveProductCell.h"
#import "PurchaseBillProduct.h"
#define TableHeight 44
#define ShowHeight 170
#define HeaderHeight 40
@interface
PurchaseReceiveProductViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
HeaderCellDelegate
>
{
CGRect
_tableFrame
;
NSMutableArray
*
_selectRowArr
;
//记录当前选中的cell
}
//采购单号
@property
(
strong
,
nonatomic
)
NSMutableArray
*
arrBillNumber
;
//按照采购单号区分之后的数据
@property
(
strong
,
nonatomic
)
NSMutableDictionary
*
dictData
;
@end
@implementation
PurchaseReceiveProductViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
XXFBgColor
;
[
super
viewDidLoad
];
[
self
initData
];
[
self
createView
];
}
-
(
void
)
initData
{
_selectRowArr
=
[[
NSMutableArray
alloc
]
init
];
if
(
!
self
.
productArr
)
{
self
.
productArr
=
[
NSMutableArray
array
];
}
}
-
(
void
)
setProductArr
:
(
NSMutableArray
*
)
productArr
{
_productArr
=
productArr
;
[
self
convertData
];
}
-
(
void
)
convertData
{
self
.
arrBillNumber
=
[
NSMutableArray
array
];
self
.
dictData
=
[
NSMutableDictionary
dictionary
];
for
(
TransferPdtDetail
*
pdt
in
self
.
productArr
)
{
NSString
*
sourceBillNumber
=
pdt
.
sourcebillnumber
?
pdt
.
sourcebillnumber
:
@" "
;
if
(
!
[
self
.
arrBillNumber
containsObject
:
sourceBillNumber
])
{
[
self
.
arrBillNumber
addObject
:
sourceBillNumber
];
}
NSMutableArray
*
arrTemp
=
[
self
.
dictData
objectForKey
:
sourceBillNumber
];
if
(
!
arrTemp
)
{
arrTemp
=
[
NSMutableArray
array
];
[
self
.
dictData
setObject
:
arrTemp
forKey
:
sourceBillNumber
];
}
[
arrTemp
addObject
:
pdt
];
}
CLog
(
@"%@"
,
self
.
dictData
);
}
-
(
void
)
setViewFrame
:
(
CGRect
)
viewFrame
{
_tableFrame
=
viewFrame
;
_tableView
.
frame
=
viewFrame
;
}
-
(
void
)
createView
{
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
_tableFrame
style
:(
UITableViewStylePlain
)];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
[
self
.
view
addSubview
:
self
.
tableView
];
NSArray
*
arr
=
@[
@"商品"
,
@"待收包装数"
,
@"已收包装数"
,
@"已运包装数"
];
HeaderCell
*
headCell
=
[[
HeaderCell
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
38
)
withArr
:
arr
withHiddenEdit
:
self
.
isHiddenAdd
];
[
self
.
view
addSubview
:
headCell
];
headCell
.
delegate
=
self
;
self
.
tableView
.
tableHeaderView
=
headCell
;
}
-
(
void
)
editClick
:
(
UIButton
*
)
btn
{
TransferPdtDetail
*
billProduct
=
self
.
productArr
[
btn
.
tag
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_EditReceiveProduct
object
:
nil
userInfo
:
@{
@"transferPdtDetail"
:
billProduct
,
@"indexPath"
:
@
(
btn
.
tag
)}];
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
self
.
arrBillNumber
.
count
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
NSString
*
sourceBillNumber
=
self
.
arrBillNumber
[
section
];
if
(
sourceBillNumber
.
length
==
1
)
{
return
0
;
}
else
{
return
HeaderHeight
;
}
}
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
UIView
*
header
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
HeaderHeight
)];
header
.
backgroundColor
=
[
UIColor
whiteColor
];
UILabel
*
transportBillNumber
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
16
,
0
,
250
,
HeaderHeight
)];
[
header
addSubview
:
transportBillNumber
];
transportBillNumber
.
text
=
[
NSString
stringWithFormat
:
@"[采购单:%@]"
,
self
.
arrBillNumber
[
section
]];
transportBillNumber
.
textColor
=
GXF_GREEN_COLOR
;
UIView
*
line
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
HeaderHeight
-
1
,
IBT_MAIN_SCREEN_WIDTH
,
1
)];
line
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
.
835
alpha
:
1
.
000
];
[
header
addSubview
:
line
];
//删除按钮
// UIButton *btnDelete = [UIButton buttonWithType:UIButtonTypeCustom];
// btnDelete.frame = CGRectMake(IBT_MAIN_SCREEN_WIDTH - 16 - 30, (HeaderHeight - 30)/2, 30, 30);
// [btnDelete setImage:[UIImage imageNamed:@"xf_delete_pic"] forState:UIControlStateNormal];
// [header addSubview:btnDelete];
// btnDelete.tag = section;
// [btnDelete addTarget:self action:@selector(actionDeleteBillNumber:) forControlEvents:UIControlEventTouchUpInside];
return
header
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
NSMutableArray
*
arrSection
=
[
self
.
dictData
objectForKey
:
self
.
arrBillNumber
[
section
]];
return
arrSection
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"ReceiveProductCell"
;
PurchaseReceiveProductCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
PurchaseReceiveProductCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
if
(
self
.
isHiddenEdit
)
{
cell
.
editBtn
.
hidden
=
YES
;
}
}
if
([
self
isHaveIndexPath
:
indexPath
])
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowdown"
];
CGRect
Linefrmame
=
cell
.
lineLabel
.
frame
;
Linefrmame
.
origin
.
y
=
ShowHeight
+
TableHeight
-
1
;
cell
.
lineLabel
.
frame
=
Linefrmame
;
CGRect
showfrmame
=
cell
.
showView
.
frame
;
showfrmame
.
size
.
height
=
ShowHeight
;
cell
.
showView
.
frame
=
showfrmame
;
cell
.
backgroundColor
=
XXFBgColor
;
}
else
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
CGRect
Linefrmame
=
cell
.
lineLabel
.
frame
;
Linefrmame
.
origin
.
y
=
TableHeight
-
1
;
cell
.
lineLabel
.
frame
=
Linefrmame
;
CGRect
showfrmame
=
cell
.
showView
.
frame
;
showfrmame
.
size
.
height
=
0
;
cell
.
showView
.
frame
=
showfrmame
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
}
cell
.
editBtn
.
tag
=
indexPath
.
row
;
[
cell
.
editBtn
addTarget
:
self
action
:
@selector
(
editClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
if
(
self
.
productArr
.
count
>
0
)
{
NSMutableArray
*
arrSection
=
[
self
.
dictData
objectForKey
:
self
.
arrBillNumber
[
indexPath
.
section
]];
TransferPdtDetail
*
billP
=
arrSection
[
indexPath
.
row
];
[
cell
setBillProduct
:
billP
row
:
indexPath
.
row
defaultState
:
self
.
defaultState
[
indexPath
.
row
]];
}
// cell.backgroundColor = [UIColor redColor];
return
cell
;
}
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
for
(
NSIndexPath
*
path
in
_selectRowArr
)
{
if
(
path
==
indexPath
)
{
return
YES
;
}
}
return
NO
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
PurchaseReceiveProductCell
*
cell
=
(
PurchaseReceiveProductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
CGRect
Linefrmame
=
cell
.
lineLabel
.
frame
;
CGRect
showfrmame
=
cell
.
showView
.
frame
;
if
(
Linefrmame
.
origin
.
y
==
TableHeight
-
1
)
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowdown"
];
Linefrmame
.
origin
.
y
=
ShowHeight
+
TableHeight
-
1
;
showfrmame
.
size
.
height
=
ShowHeight
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_selectRowArr
addObject
:
indexPath
];
}
else
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
Linefrmame
.
origin
.
y
=
TableHeight
-
1
;
showfrmame
.
size
.
height
=
0
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_selectRowArr
removeObject
:
indexPath
];
}
cell
.
lineLabel
.
frame
=
Linefrmame
;
cell
.
showView
.
frame
=
showfrmame
;
[
self
.
tableView
reloadData
];
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
([
self
isHaveIndexPath
:
indexPath
])
{
return
ShowHeight
+
TableHeight
;
}
return
TableHeight
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
View file @
4c20cc6d
...
...
@@ -33,7 +33,7 @@
-
(
void
)
bulidLayout
{
CGFloat
headWidth
=
(
ScreenSize
.
width
-
LeftWidth
*
2
-
SpaceMargin
*
(
4
-
1
))
/
4
;
CGFloat
headWidth
=
(
ScreenSize
.
width
-
LeftWidth
*
2
-
SpaceMargin
*
(
3
-
1
))
/
3
;
self
.
smallImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
(
TableHeight
-
SmallSize
)
/
2
,
SmallSize
,
SmallSize
)];
self
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
...
...
@@ -59,10 +59,10 @@
self
.
countLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
countLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
shippedQtyLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
countLabel
.
frame
)
+
SpaceMargin
,
0
,
headWidth
,
TableHeight
))];
self
.
shippedQtyLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
shippedQtyLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
shippedQtyLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
//
self.shippedQtyLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.countLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))];
//
self.shippedQtyLabel.textAlignment = NSTextAlignmentCenter;
//
self.shippedQtyLabel.textColor = GXF_CONTENT_COLOR;
//
self.shippedQtyLabel.font = GXF_SIXTEENTEH_SIZE;
self
.
showView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TableHeight
,
ScreenSize
.
width
,
0
)];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/PurchaseReceiveProductCell.h
0 → 100644
View file @
4c20cc6d
//
// PurchaseReceiveProductCell.h
// XFFruit
//
// Created by Javen on 2017/7/21.
// Copyright © 2017年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TransferPdtDetail.h"
@interface
PurchaseReceiveProductCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UIImageView
*
smallImageView
;
@property
(
nonatomic
,
strong
)
UIButton
*
editBtn
;
@property
(
nonatomic
,
strong
)
UILabel
*
seqLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
dscountLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
yscountLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
/** 已运包装数 */
@property
(
nonatomic
,
strong
)
UILabel
*
labelShipPkgCount
;
@property
(
nonatomic
,
strong
)
UIView
*
showView
;
@property
(
nonatomic
,
strong
)
UILabel
*
showStandLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showbzdwLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showbzCountLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showshCountLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showjcCountLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showshjcCountLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showjcPriceLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showbzPriceLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showTotalLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showshTotalLabel
;
@property
(
strong
,
nonatomic
)
UILabel
*
showPkgQty
;
@property
(
strong
,
nonatomic
)
UILabel
*
showBaseQty
;
@property
(
strong
,
nonatomic
)
UILabel
*
showTotal
;
@property
(
nonatomic
,
strong
)
UILabel
*
showNoteLabel
;
@property
(
strong
,
nonatomic
)
UILabel
*
showCounterNum
;
@property
(
nonatomic
,
assign
)
BOOL
isShowShipping
;
//是否发运
-
(
void
)
setBillProduct
:(
TransferPdtDetail
*
)
billProduct
row
:(
NSInteger
)
row
defaultState
:(
NSString
*
)
state
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/PurchaseReceiveProductCell.m
0 → 100644
View file @
4c20cc6d
//
// PurchaseReceiveProductCell.m
// XFFruit
//
// Created by Javen on 2017/7/21.
// Copyright © 2017年 Xummer. All rights reserved.
//
#import "PurchaseReceiveProductCell.h"
#define LeftMargin 13
#define TableHeight 44
#define SmallSize 10
#define SmallWidth 20
#define SpaceMargin 1
#define LeftWidth 45
#define RightWidth 30
#define ShowWidth (ScreenSize.width - LeftMargin*2 - SmallSize)/2
#define ShowHeight 20
@implementation
PurchaseReceiveProductCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
bulidLayout
];
}
return
self
;
}
-
(
void
)
bulidLayout
{
CGFloat
headWidth
=
(
ScreenSize
.
width
-
LeftWidth
*
2
-
SpaceMargin
*
(
4
-
1
))
/
4
;
self
.
smallImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
(
TableHeight
-
SmallSize
)
/
2
,
SmallSize
,
SmallSize
)];
self
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
self
.
smallImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
self
.
seqLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
smallImageView
.
frame
),
0
,
SmallWidth
,
TableHeight
))];
self
.
seqLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
seqLabel
.
text
=
@"13"
;
self
.
seqLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftWidth
,
0
,
headWidth
,
TableHeight
))];
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
titleLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
titleLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
dscountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
titleLabel
.
frame
)
+
SpaceMargin
,
0
,
headWidth
,
TableHeight
))];
self
.
dscountLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
dscountLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
dscountLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
yscountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
dscountLabel
.
frame
)
+
SpaceMargin
,
0
,
headWidth
,
TableHeight
))];
self
.
yscountLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
yscountLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
yscountLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
labelShipPkgCount
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
yscountLabel
.
frame
)
+
SpaceMargin
,
0
,
headWidth
,
TableHeight
))];
self
.
labelShipPkgCount
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
labelShipPkgCount
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
labelShipPkgCount
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
showView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TableHeight
,
ScreenSize
.
width
,
0
)];
self
.
showView
.
clipsToBounds
=
YES
;
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showStandLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showStandLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showbzdwLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
showStandLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showbzdwLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showbzdwLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showbzdwLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showjcPriceLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showStandLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showjcPriceLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showjcPriceLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showjcPriceLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showbzPriceLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showbzdwLabel
.
frame
),
CGRectGetMaxY
(
self
.
showStandLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showbzPriceLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showbzPriceLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showbzPriceLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showbzCountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showjcPriceLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showbzCountLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showbzCountLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showbzCountLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showshCountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showbzdwLabel
.
frame
),
CGRectGetMaxY
(
self
.
showjcPriceLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showshCountLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showshCountLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showshCountLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showjcCountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showbzCountLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showjcCountLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showjcCountLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showjcCountLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showshjcCountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showbzdwLabel
.
frame
),
CGRectGetMaxY
(
self
.
showbzCountLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showshjcCountLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showshjcCountLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showshjcCountLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showTotalLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showjcCountLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showTotalLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showTotalLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showTotalLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showshTotalLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showbzdwLabel
.
frame
),
CGRectGetMaxY
(
self
.
showjcCountLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showshTotalLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showshTotalLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showshTotalLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showCounterNum
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showTotalLabel
.
frame
),
ShowWidth
*
2
,
ShowHeight
))];
self
.
showCounterNum
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showCounterNum
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showCounterNum
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showNoteLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showbzdwLabel
.
frame
),
CGRectGetMaxY
(
self
.
showTotalLabel
.
frame
),
ShowWidth
*
2
,
ShowHeight
))];
self
.
showNoteLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showNoteLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showNoteLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showPkgQty
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showNoteLabel
.
frame
),
ShowWidth
*
2
,
ShowHeight
))];
self
.
showPkgQty
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showPkgQty
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showPkgQty
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showBaseQty
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showbzdwLabel
.
frame
),
CGRectGetMaxY
(
self
.
showNoteLabel
.
frame
),
ShowWidth
*
2
,
ShowHeight
))];
self
.
showBaseQty
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showBaseQty
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showBaseQty
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showTotal
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showPkgQty
.
frame
),
ShowWidth
*
2
,
ShowHeight
))];
self
.
showTotal
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showTotal
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showTotal
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
editBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
editBtn
setImage
:[
UIImage
imageNamed
:
@"edit"
]
forState
:
UIControlStateNormal
];
self
.
editBtn
.
frame
=
CGRectMake
(
ScreenSize
.
width
-
LeftWidth
,
0
,
LeftWidth
,
TableHeight
);
self
.
editBtn
.
contentMode
=
UIViewContentModeScaleAspectFit
;
self
.
lineLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
TableHeight
-
1
,
ScreenSize
.
width
-
LeftMargin
*
2
,
1
))];;
self
.
lineLabel
.
backgroundColor
=
GXF_LINE_COLOR
;
[
self
.
contentView
addSubview
:
self
.
smallImageView
];
[
self
.
contentView
addSubview
:
self
.
seqLabel
];
[
self
.
contentView
addSubview
:
self
.
titleLabel
];
[
self
.
contentView
addSubview
:
self
.
dscountLabel
];
[
self
.
contentView
addSubview
:
self
.
yscountLabel
];
[
self
.
contentView
addSubview
:
self
.
labelShipPkgCount
];
[
self
.
contentView
addSubview
:
self
.
editBtn
];
[
self
.
contentView
addSubview
:
self
.
showView
];
[
self
.
showView
addSubview
:
self
.
showStandLabel
];
[
self
.
showView
addSubview
:
self
.
showbzdwLabel
];
[
self
.
showView
addSubview
:
self
.
showbzCountLabel
];
[
self
.
showView
addSubview
:
self
.
showshCountLabel
];
[
self
.
showView
addSubview
:
self
.
showjcCountLabel
];
[
self
.
showView
addSubview
:
self
.
showshjcCountLabel
];
[
self
.
showView
addSubview
:
self
.
showCounterNum
];
[
self
.
showView
addSubview
:
self
.
showjcPriceLabel
];
[
self
.
showView
addSubview
:
self
.
showBaseQty
];
[
self
.
showView
addSubview
:
self
.
showPkgQty
];
[
self
.
showView
addSubview
:
self
.
showTotal
];
[
self
.
showView
addSubview
:
self
.
showbzPriceLabel
];
[
self
.
showView
addSubview
:
self
.
showTotalLabel
];
[
self
.
showView
addSubview
:
self
.
showshTotalLabel
];
[
self
.
showView
addSubview
:
self
.
showNoteLabel
];
[
self
.
contentView
addSubview
:
self
.
lineLabel
];
}
-
(
void
)
setBillProduct
:
(
TransferPdtDetail
*
)
transferProduct
row
:
(
NSInteger
)
row
defaultState
:
(
NSString
*
)
state
{
self
.
seqLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
@
(
row
+
1
)];
self
.
titleLabel
.
text
=
transferProduct
.
productName
;
self
.
dscountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%lu%@"
,
transferProduct
.
qty
.
integerValue
-
transferProduct
.
rctQty
.
integerValue
,
transferProduct
.
unit
];
self
.
yscountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
transferProduct
.
rctQty
?[
transferProduct
.
rctQty
stringValue
]:
@"0"
,
transferProduct
.
unit
];
self
.
labelShipPkgCount
.
text
=
[
NSString
stringWithFormat
:
@"%lu"
,
transferProduct
.
shippedQty
.
integerValue
];
self
.
showStandLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装规格:1*%@%@"
,[
transferProduct
.
qpc
stringValue
],
transferProduct
.
baseUnit
];
self
.
showbzdwLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单位:%@"
,
transferProduct
.
unit
];
self
.
showbzCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量:%@%@"
,[
transferProduct
.
qty
stringValue
],
transferProduct
.
unit
];
self
.
showshCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量[实收]:%@%@"
,
transferProduct
.
rctQty
?([
transferProduct
.
rctQty
stringValue
]):
@"0"
,
transferProduct
.
unit
];
if
(
transferProduct
.
rctQty
==
nil
)
{
self
.
showshCountLabel
.
text
=
@"包装数量[实收]:空"
;
}
self
.
showPkgQty
.
text
=
[
NSString
stringWithFormat
:
@"包装数量[已运]:%@%@"
,
transferProduct
.
shippedQty
,
transferProduct
.
unit
];
self
.
showTotal
.
text
=
[
NSString
stringWithFormat
:
@"总金额[已运]:%.2f元"
,
transferProduct
.
packprice
.
doubleValue
*
transferProduct
.
shippedQty
.
doubleValue
];
self
.
showBaseQty
.
text
=
[
NSString
stringWithFormat
:
@"基础数量[已运]:%@%@"
,
transferProduct
.
baseQty
,
transferProduct
.
unit
];
self
.
showjcCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量:%@%@"
,[
transferProduct
.
baseQty
stringValue
],
transferProduct
.
baseUnit
];
self
.
showshjcCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量[实收]:%@%@"
,
transferProduct
.
rctBaseQty
?[
transferProduct
.
rctBaseQty
stringValue
]:
@"0"
,
transferProduct
.
baseUnit
];
if
(
transferProduct
.
rctBaseQty
==
nil
)
{
self
.
showshjcCountLabel
.
text
=
@"基础数量[实收]:空"
;
}
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%.2f元"
,[
transferProduct
.
packprice
floatValue
]];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%.2f元"
,[
transferProduct
.
price
floatValue
]];
self
.
showshTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额[实收]:%.2f元"
,
transferProduct
.
rctTotal
?[
transferProduct
.
rctTotal
floatValue
]:
0
.
00
f
];
if
(
transferProduct
.
rctTotal
==
nil
)
{
self
.
showshTotalLabel
.
text
=
@"总金额[实收]:空"
;
}
self
.
showCounterNum
.
text
=
[
NSString
stringWithFormat
:
@"柜号:%@"
,
transferProduct
.
vnum
?
transferProduct
.
vnum
:
@""
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%.2f元"
,
transferProduct
.
packprice
.
doubleValue
*
transferProduct
.
qty
.
doubleValue
];
self
.
showNoteLabel
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
transferProduct
.
note
?
transferProduct
.
note
:
@"无"
];
if
([
state
isEqualToString
:
@"YES"
])
{
if
([
transferProduct
.
qty
floatValue
]
>
[
transferProduct
.
rctQty
floatValue
])
{
self
.
yscountLabel
.
textColor
=
[
UIColor
redColor
];
self
.
showshCountLabel
.
textColor
=
[
UIColor
redColor
];
}
else
{
self
.
yscountLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
self
.
showshCountLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
}
if
([
transferProduct
.
baseQty
floatValue
]
>
[
transferProduct
.
rctBaseQty
floatValue
])
{
self
.
showshjcCountLabel
.
textColor
=
[
UIColor
redColor
];
}
else
{
self
.
showshjcCountLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
}
if
([
transferProduct
.
total
floatValue
]
>
[
transferProduct
.
rctTotal
floatValue
])
{
self
.
showshTotalLabel
.
textColor
=
[
UIColor
redColor
];
}
else
{
self
.
showshTotalLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
}
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Controllers/ReceiveProductViewController.m
View file @
4c20cc6d
...
...
@@ -170,7 +170,7 @@
TransferPdtDetail
*
billP
=
arrSection
[
indexPath
.
row
];
[
cell
setBillProduct
:
billP
row
:
indexPath
.
row
defaultState
:
self
.
defaultState
[
indexPath
.
row
]];
}
//
cell.backgroundColor = [UIColor redColor];
cell
.
backgroundColor
=
[
UIColor
redColor
];
return
cell
;
}
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.m
View file @
4c20cc6d
...
...
@@ -193,7 +193,8 @@
self
.
showCounterNum
.
text
=
[
NSString
stringWithFormat
:
@"柜号:%@"
,
transferProduct
.
vnum
?
transferProduct
.
vnum
:
@""
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%.2f元"
,
transferProduct
.
total
?[
transferProduct
.
total
floatValue
]:
0
.
00
f
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%.2f元"
,
transferProduct
.
packprice
.
doubleValue
*
transferProduct
.
qty
.
doubleValue
];
self
.
showNoteLabel
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
transferProduct
.
note
?
transferProduct
.
note
:
@"无"
];
if
([
state
isEqualToString
:
@"YES"
])
{
if
([
transferProduct
.
qty
floatValue
]
>
[
transferProduct
.
rctQty
floatValue
])
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
View file @
4c20cc6d
...
...
@@ -151,8 +151,8 @@
-
(
void
)
setPdtDetail
:
(
TransferPdtDetail
*
)
pdtDetail
row
:
(
NSInteger
)
row
{
self
.
seqLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
@
(
row
+
1
)];
self
.
titleLabel
.
text
=
pdtDetail
.
productName
;
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
@"
,
pdtDetail
.
qty
];
self
.
countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
@"
,
@"0"
];
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
.0f"
,
pdtDetail
.
qty
.
doubleValue
-
pdtDetail
.
rctQty
.
doubleValue
];
self
.
countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
.0f"
,
pdtDetail
.
rctQty
.
doubleValue
];
//已转运
self
.
showNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"商品:%@[%@]"
,
pdtDetail
.
productName
,
pdtDetail
.
productCode
];
self
.
showStandLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装规格:1*%@%@"
,[
pdtDetail
.
qpc
stringValue
],
pdtDetail
.
baseUnit
];
...
...
@@ -173,7 +173,8 @@
self
.
showPurchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"来源类型:%@"
,
sourceT
];
self
.
showSourceNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"来源单号:%@"
,
pdtDetail
.
sourcebillnumber
.
length
>
0
?
pdtDetail
.
sourcebillnumber
:
@"无"
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%.2f元"
,[
pdtDetail
.
total
floatValue
]];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%.2f元"
,
pdtDetail
.
qty
.
doubleValue
*
pdtDetail
.
packprice
.
doubleValue
];
self
.
showNoteLabel
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
pdtDetail
.
note
?
pdtDetail
.
note
:
@"无"
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/TransportPurchaseViewController.m
View file @
4c20cc6d
...
...
@@ -345,6 +345,8 @@ NSInteger purchaseStockCheckNumber = 0;
for
(
TransportPdtDetail
*
detail
in
self
.
indexArr
)
{
detail
.
purchasePdtDetail
=
detail
.
uuid
;
detail
.
uuid
=
nil
;
detail
.
baseQty
=
@
(
detail
.
qpc
.
floatValue
*
detail
.
qty
.
floatValue
);
detail
.
total
=
@
(
detail
.
qty
.
doubleValue
*
detail
.
packprice
.
doubleValue
);
[
arr
addObject
:
detail
];
}
...
...
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