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
655c6f92
Commit
655c6f92
authored
9 years ago
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小数位数
parent
9c761228
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
566 additions
and
142 deletions
+566
-142
Podfile.lock
Podfile.lock
+1
-1
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+19
-29
ICRDataBaseController.m
...it/Controllers/DataBaseController/ICRDataBaseController.m
+1
-1
ICRNotificationMacro.h
XFFruit/Macro/ICRNotificationMacro.h
+3
-0
ICRUserUtil.m
XFFruit/Utilities/UserUtil/ICRUserUtil.m
+0
-2
BusinessViewController.m
XFFruit/ViewControllers/Business/BusinessViewController.m
+3
-3
ICRHomeViewController.m
.../ViewControllers/Home/Controllers/ICRHomeViewController.m
+3
-7
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+4
-4
ProductBillCell.m
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
+4
-4
ShopDetail.h
XFFruit/ViewControllers/PurchaseNotice/Models/ShopDetail.h
+3
-3
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+37
-19
NewReceiveProductViewController.m
...s/Receiving/Controllers/NewReceiveProductViewController.m
+45
-26
ReceiveProductCell.m
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.m
+4
-4
ChooseTransferViewController.m
...llers/Transfer/Controllers/ChooseTransferViewController.m
+246
-15
NewTransferViewController.m
...trollers/Transfer/Controllers/NewTransferViewController.m
+17
-3
TransferProductViewController.m
...lers/Transfer/Controllers/TransferProductViewController.m
+3
-1
ChooseTansferCell.h
XFFruit/ViewControllers/Transfer/Views/ChooseTansferCell.h
+27
-0
ChooseTansferCell.m
XFFruit/ViewControllers/Transfer/Views/ChooseTansferCell.m
+137
-0
TransferProductCell.m
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
+3
-3
NewTransportViewController.m
...ollers/Transport/Controllers/NewTransportViewController.m
+3
-3
TransportPurchaseCell.m
...t/ViewControllers/Transport/Views/TransportPurchaseCell.m
+0
-11
TransportPurductCell.m
...it/ViewControllers/Transport/Views/TransportPurductCell.m
+3
-3
No files found.
Podfile.lock
View file @
655c6f92
...
...
@@ -64,4 +64,4 @@ SPEC CHECKSUMS:
SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
COCOAPODS: 0.3
9.0
COCOAPODS: 0.3
8.2
This diff is collapsed.
Click to expand it.
XFFruit.xcodeproj/project.pbxproj
View file @
655c6f92
...
...
@@ -123,6 +123,7 @@
724171731B9D30660094DF55
/* ChosePersonViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7241716E1B9D30660094DF55
/* ChosePersonViewController.m */
;
};
724171761B9D30DE0094DF55
/* ChooseCostViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
724171751B9D30DE0094DF55
/* ChooseCostViewController.m */
;
};
7249BDD71BE794640059EB8C
/* FinishTimeView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7249BDD61BE794640059EB8C
/* FinishTimeView.m */
;
};
726BEE831BF220450081360F
/* ChooseTansferCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
726BEE821BF220450081360F
/* ChooseTansferCell.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
726F4C6D1BDE5F83006A5E6D
/* RejectView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
726F4C6C1BDE5F83006A5E6D
/* RejectView.m */
;
};
72805CF31BB8E1B0009E1F82
/* TransferViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72805CF21BB8E1B0009E1F82
/* TransferViewController.m */
;
};
72805CF61BB8E20B009E1F82
/* NewTransferViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72805CF51BB8E20B009E1F82
/* NewTransferViewController.m */
;
};
...
...
@@ -147,18 +148,18 @@
72873CEB1BA27BA6007B3387
/* GXFPopView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72873CEA1BA27BA6007B3387
/* GXFPopView.m */
;
};
72873CEE1BA280DD007B3387
/* GXFPopCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72873CED1BA280DD007B3387
/* GXFPopCell.m */
;
};
72882D8B1BA9121E00935BA6
/* ChooseProductUnitViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72882D8A1BA9121E00935BA6
/* ChooseProductUnitViewController.m */
;
};
728899D01BECADA8003CC41E
/* ReportViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899CD1BECADA8003CC41E
/* ReportViewController.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899D31BECADCD003CC41E
/* CustomSegView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899D21BECADCD003CC41E
/* CustomSegView.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899D61BECB323003CC41E
/* SaleViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899D51BECB323003CC41E
/* SaleViewController.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899D91BEF20BA003CC41E
/* SMPageControl.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899D81BEF20BA003CC41E
/* SMPageControl.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899E21BEF35F3003CC41E
/* SaleViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899E11BEF35F3003CC41E
/* SaleViewCell.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899E51BEF3609003CC41E
/* SaleHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899E41BEF3609003CC41E
/* SaleHeaderView.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899E81BEF41FC003CC41E
/* PassengerViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899E71BEF41FC003CC41E
/* PassengerViewController.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899EB1BEF4233003CC41E
/* PassgerPriceViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899EA1BEF4233003CC41E
/* PassgerPriceViewController.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899EE1BEF4A75003CC41E
/* PasengerCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899ED1BEF4A75003CC41E
/* PasengerCell.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899F11BEF4A8A003CC41E
/* PassengerHeaderCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899F01BEF4A8A003CC41E
/* PassengerHeaderCell.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899F41BEF4D3D003CC41E
/* PassgerPriceHeaderCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899F31BEF4D3D003CC41E
/* PassgerPriceHeaderCell.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899F71BEF4D53003CC41E
/* PassgerPriceCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899F61BEF4D53003CC41E
/* PassgerPriceCell.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
728899D01BECADA8003CC41E
/* ReportViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899CD1BECADA8003CC41E
/* ReportViewController.m */
;
};
728899D31BECADCD003CC41E
/* CustomSegView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899D21BECADCD003CC41E
/* CustomSegView.m */
;
};
728899D61BECB323003CC41E
/* SaleViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899D51BECB323003CC41E
/* SaleViewController.m */
;
};
728899D91BEF20BA003CC41E
/* SMPageControl.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899D81BEF20BA003CC41E
/* SMPageControl.m */
;
};
728899E21BEF35F3003CC41E
/* SaleViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899E11BEF35F3003CC41E
/* SaleViewCell.m */
;
};
728899E51BEF3609003CC41E
/* SaleHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899E41BEF3609003CC41E
/* SaleHeaderView.m */
;
};
728899E81BEF41FC003CC41E
/* PassengerViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899E71BEF41FC003CC41E
/* PassengerViewController.m */
;
};
728899EB1BEF4233003CC41E
/* PassgerPriceViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899EA1BEF4233003CC41E
/* PassgerPriceViewController.m */
;
};
728899EE1BEF4A75003CC41E
/* PasengerCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899ED1BEF4A75003CC41E
/* PasengerCell.m */
;
};
728899F11BEF4A8A003CC41E
/* PassengerHeaderCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899F01BEF4A8A003CC41E
/* PassengerHeaderCell.m */
;
};
728899F41BEF4D3D003CC41E
/* PassgerPriceHeaderCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899F31BEF4D3D003CC41E
/* PassgerPriceHeaderCell.m */
;
};
728899F71BEF4D53003CC41E
/* PassgerPriceCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
728899F61BEF4D53003CC41E
/* PassgerPriceCell.m */
;
};
729A2E931BE60C0200493603
/* GeometryView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
729A2E921BE60C0200493603
/* GeometryView.m */
;
};
72A8132D1BCA8BBA003631F3
/* ChooseTransportViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A8132C1BCA8BBA003631F3
/* ChooseTransportViewController.m */
;
};
72A813FA1BCD3205003631F3
/* ReceiveViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A813F71BCD3205003631F3
/* ReceiveViewController.m */
;
};
...
...
@@ -185,7 +186,7 @@
72B3C0DC1B9DBD7500025D81
/* TransportCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0DB1B9DBD7500025D81
/* TransportCell.m */
;
};
72B3C0DF1B9DC60D00025D81
/* TransportDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0DE1B9DC60D00025D81
/* TransportDetailViewController.m */
;
};
72C803521B7B897B00990363
/* DataManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72C803511B7B897B00990363
/* DataManager.m */
;
};
72D645231BF1E9B80029E146
/* ChooseTransferViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72D645221BF1E9B80029E146
/* ChooseTransferViewController.m */
;
settings
=
{
ASSET_TAGS
=
();
};
};
72D645231BF1E9B80029E146
/* ChooseTransferViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72D645221BF1E9B80029E146
/* ChooseTransferViewController.m */
;
};
72EDD86E1B96E11700964115
/* ChooseParentViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72EDD86D1B96E11700964115
/* ChooseParentViewController.m */
;
};
72F56CB21B76EC200077F0C9
/* SurveyUser.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F56CB11B76EC200077F0C9
/* SurveyUser.m */
;
};
72F9D47F1BA7E97200795A00
/* NoticeProduct.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F9D47E1BA7E97200795A00
/* NoticeProduct.m */
;
};
...
...
@@ -679,6 +680,8 @@
724171751B9D30DE0094DF55
/* ChooseCostViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChooseCostViewController.m
;
sourceTree
=
"<group>"
;
};
7249BDD51BE794640059EB8C
/* FinishTimeView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FinishTimeView.h
;
sourceTree
=
"<group>"
;
};
7249BDD61BE794640059EB8C
/* FinishTimeView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FinishTimeView.m
;
sourceTree
=
"<group>"
;
};
726BEE811BF220450081360F
/* ChooseTansferCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ChooseTansferCell.h
;
sourceTree
=
"<group>"
;
};
726BEE821BF220450081360F
/* ChooseTansferCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChooseTansferCell.m
;
sourceTree
=
"<group>"
;
};
726F4C6B1BDE5F83006A5E6D
/* RejectView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RejectView.h
;
sourceTree
=
"<group>"
;
};
726F4C6C1BDE5F83006A5E6D
/* RejectView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RejectView.m
;
sourceTree
=
"<group>"
;
};
72805CF11BB8E1B0009E1F82
/* TransferViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TransferViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1550,6 +1553,8 @@
72805D071BB8F22B009E1F82
/* BottomTransferView.m */
,
72805D0C1BB8F46B009E1F82
/* TransferProductCell.h */
,
72805D0D1BB8F46B009E1F82
/* TransferProductCell.m */
,
726BEE811BF220450081360F
/* ChooseTansferCell.h */
,
726BEE821BF220450081360F
/* ChooseTansferCell.m */
,
);
path
=
Views
;
sourceTree
=
"<group>"
;
...
...
@@ -2665,7 +2670,6 @@
C1F696001AB870B400F9F5DD
/* Frameworks */
,
C1F696011AB870B400F9F5DD
/* Resources */
,
1454647E6246AB3D8AAE6FF2
/* Copy Pods Resources */
,
257FA5FADFB85E73662B5F98
/* Embed Pods Frameworks */
,
);
buildRules
=
(
);
...
...
@@ -2790,21 +2794,6 @@
shellScript
=
"\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"
;
showEnvVarsInLog
=
0
;
};
257FA5FADFB85E73662B5F98
/* Embed Pods Frameworks */
=
{
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
);
inputPaths
=
(
);
name
=
"Embed Pods Frameworks"
;
outputPaths
=
(
);
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellScript
=
"\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"
;
showEnvVarsInLog
=
0
;
};
2F15FB75DA97749DAA8CA872
/* Check Pods Manifest.lock */
=
{
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
...
...
@@ -3074,6 +3063,7 @@
C15918451AC062460013B391
/* IBTBadgeView.m in Sources */
,
7281A0C81B89BFE60052B1AC
/* Vendor.m in Sources */
,
C15295C31B2451AC00DF60D1
/* ICRQReseachViewController.m in Sources */
,
726BEE831BF220450081360F
/* ChooseTansferCell.m in Sources */
,
358432F71B998ED2007E73ED
/* GXFProductUnit.m in Sources */
,
C15918531AC062460013B391
/* IBTUINavigationController.m in Sources */
,
C11A346F1B247BDB00079129
/* ICRAnswerDetail.m in Sources */
,
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/DataBaseController/ICRDataBaseController.m
View file @
655c6f92
...
...
@@ -98,7 +98,7 @@ static NSString *ICRDataBasePath = @"";
[
_m_dbQueue
inDatabase
:
^
(
FMDatabase
*
db
)
{
NSArray
*
tableNameArr
=
@[
[
Product
class
],[
User
class
],[
Survey
class
],[
Vendor
class
],[
Warehouse
class
],[
GXFProductUnit
class
],[
Accounttitle
class
]];
@[
[
Product
class
],[
User
class
],[
Survey
class
],[
Vendor
class
],[
Warehouse
class
],[
GXFProductUnit
class
],[
Accounttitle
class
]
,[
ICRAnnouncement
class
]
];
NSMutableArray
*
sqlBatch
=
[
NSMutableArray
array
];
NSString
*
sql
=
nil
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Macro/ICRNotificationMacro.h
View file @
655c6f92
...
...
@@ -13,6 +13,9 @@
#define KNOTIFICATION_getSelectPurchaseProduct @"KNOTIFICATION_getSelectPurchaseProduct"
#define KNOTIFICATION_ChoseTransportPurchase @"KNOTIFICATION_ChoseTransportPurchase"//选择采购单
#define KNOTIFICATION_ChoseTransportProduct @"KNOTIFICATION_ChoseTransportProduct"//选择发运单
#define KNOTIFICATION_ChoseTransferProduct @"KNOTIFICATION_ChoseTransferProduct"//选择转运单
#define KNOTIFICATION_EditReceiveProduct @"KNOTIFICATION_EditReceiveProduct"
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/UserUtil/ICRUserUtil.m
View file @
655c6f92
...
...
@@ -74,8 +74,6 @@ static ICRUserUtil *sharedInstance = nil;
-
(
BOOL
)
saveArchive
{
BOOL
result
;
// get archive path to storage
NSString
*
filePath
=
[[
self
class
]
archivePath
];
result
=
[
NSKeyedArchiver
archiveRootObject
:
self
toFile
:
filePath
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Business/BusinessViewController.m
View file @
655c6f92
...
...
@@ -8,7 +8,7 @@
#import "BusinessViewController.h"
#import "ICRAnnouncementViewController.h"
#import "NewSurveyViewController.h"
#import "SurveyViewController.h"
...
...
@@ -123,8 +123,8 @@
switch
(
imageView
.
tag
)
{
case
kFunctionNotice
:
//公告
{
//
ICRAnnouncementViewController *aVC = [[ICRAnnouncementViewController alloc] init];
//
[self PushViewController:aVC animated:YES];
ICRAnnouncementViewController
*
aVC
=
[[
ICRAnnouncementViewController
alloc
]
init
];
[
self
PushViewController
:
aVC
animated
:
YES
];
}
break
;
case
kFunctionNewSurvey
:
//新建行情
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Home/Controllers/ICRHomeViewController.m
View file @
655c6f92
...
...
@@ -15,6 +15,7 @@
#import "ICRFunctionBaseView.h"
#import "ICRFunctionEntity.h"
#import "ICRAnnouncementViewController.h"
#import "NewSurveyViewController.h"
#import "SurveyViewController.h"
...
...
@@ -26,22 +27,17 @@
#import "PurchaseNoticeViewController.h"
#import "GXFNewProcessViewController.h"
#import "GXFFunctionsViewController.h"
#import "GXFDisplayFunction.h"
#import "GXFFunction.h"
#import "GXFNoticeFunctionTableViewCell.h"
#import "GXFFunctionCollectionViewCell.h"
#import "GXFListProcessViewController.h"
#import "GXFFunctionDB.h"
#define ICRFUNCTION_IMG_TOP_PADDING (25)
#define ICRFUNCTION_IMG_WIDTH (65)
#define ICRFUNCTION_LABEL_HEIGHT (15)
#define ICRFUNCTION_INNER_GAP (5)
#define RIGHT_LINE_WIDTH (0.5)
@interface
ICRHomeViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegate
,
ICRFunctionBaseViewDelegate
>
//,UICollectionViewDelegateFlowLayout>
...
...
@@ -226,8 +222,8 @@ static NSString *collectionCellID = @"collectionCell";
switch
(
imageView
.
tag
)
{
case
kFunctionNotice
:
//公告
{
//
ICRAnnouncementViewController *aVC = [[ICRAnnouncementViewController alloc] init];
//
[self PushViewController:aVC animated:YES];
ICRAnnouncementViewController
*
aVC
=
[[
ICRAnnouncementViewController
alloc
]
init
];
[
self
PushViewController
:
aVC
animated
:
YES
];
}
break
;
case
kFunctionNewSurvey
:
//新建行情
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
655c6f92
...
...
@@ -161,7 +161,7 @@ typedef enum : NSUInteger {
for
(
PurchaseBillProduct
*
billProduct
in
purchaseProduct
)
{
totalPrice
+=
[
billProduct
.
total
floatValue
];
}
_purchaseView
.
purchasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
totalPrice
+
otherPrice
];
_purchaseView
.
purchasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
totalPrice
+
otherPrice
];
_purchaseView
.
chargePurchase
=
[
NSNumber
numberWithFloat
:
otherPrice
];
_purchaseView
.
total
=
[
NSNumber
numberWithFloat
:
totalPrice
+
otherPrice
];
}
...
...
@@ -370,10 +370,10 @@ typedef enum : NSUInteger {
shopDetail
.
packageSpecification
=
[
billProduct
.
qpc
stringValue
];
shopDetail
.
packageUnit
=
billProduct
.
unit
;
shopDetail
.
packageQuantity
=
[
billProduct
.
qty
stringValue
];
shopDetail
.
packageUnitPrice
=
[
billProduct
.
price
stringValue
]
;
shopDetail
.
packageUnitPrice
=
billProduct
.
price
;
shopDetail
.
foundationQuantity
=
[
billProduct
.
baseQty
stringValue
];
shopDetail
.
foundationUnitPrice
=
[
billProduct
.
basePrice
stringValue
]
;
shopDetail
.
totalMoney
=
[
billProduct
.
total
stringValue
]
;
shopDetail
.
foundationUnitPrice
=
billProduct
.
basePrice
;
shopDetail
.
totalMoney
=
billProduct
.
total
;
shopDetail
.
remark
=
billProduct
.
remark
;
shopDetail
.
packageQpcStr
=
billProduct
.
qpcStr
;
shopDetail
.
packageQpcUnit
=
billProduct
.
baseUnit
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
View file @
655c6f92
...
...
@@ -145,7 +145,7 @@
{
self
.
seqLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
@
(
row
+
1
)];
self
.
titleLabel
.
text
=
billProduct
.
product_name
;
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
@元"
,[
billProduct
.
basePrice
string
Value
]];
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
.2f元"
,[
billProduct
.
basePrice
float
Value
]];
self
.
countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
billProduct
.
qty
stringValue
],
billProduct
.
unit
];
self
.
shippedQtyLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
billProduct
.
shippedBaseQty
?
[
billProduct
.
shippedBaseQty
stringValue
]:
@"0"
,
billProduct
.
unit
];
...
...
@@ -153,9 +153,9 @@
self
.
showStandLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装规格:1*%@%@"
,[
billProduct
.
qpc
stringValue
],
billProduct
.
baseUnit
];
self
.
showCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量:%@%@"
,[
billProduct
.
qty
stringValue
],
billProduct
.
unit
];
self
.
showBaseCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量:%@%@"
,[
billProduct
.
baseQty
stringValue
],
billProduct
.
baseUnit
];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
@元"
,[
billProduct
.
price
string
Value
]];
self
.
showBasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%
@元"
,[
billProduct
.
basePrice
string
Value
]];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
@元"
,[
billProduct
.
total
string
Value
]];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
.2f元"
,[
billProduct
.
price
float
Value
]];
self
.
showBasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%
.2f元"
,[
billProduct
.
basePrice
float
Value
]];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
.2f元"
,[
billProduct
.
total
float
Value
]];
self
.
showNoteLabel
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
billProduct
.
remark
?
billProduct
.
remark
:
@"无"
];
[
self
isShowShippingQty
:
billProduct
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Models/ShopDetail.h
View file @
655c6f92
...
...
@@ -21,9 +21,9 @@
@property
(
nonatomic
,
strong
)
NSString
*
packageQuantity
;
//包装数量
@property
(
nonatomic
,
strong
)
NSString
*
packageUnit
;
//包装单位
@property
(
nonatomic
,
strong
)
NSString
*
foundationQuantity
;
//基础数量
@property
(
nonatomic
,
strong
)
NS
String
*
foundationUnitPrice
;
//基础单价
@property
(
nonatomic
,
strong
)
NS
String
*
packageUnitPrice
;
//包装单价
@property
(
nonatomic
,
strong
)
NS
String
*
totalMoney
;
//总金额
@property
(
nonatomic
,
strong
)
NS
Number
*
foundationUnitPrice
;
//基础单价
@property
(
nonatomic
,
strong
)
NS
Number
*
packageUnitPrice
;
//包装单价
@property
(
nonatomic
,
strong
)
NS
Number
*
totalMoney
;
//总金额
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
//备注
@property
(
nonatomic
,
assign
)
BOOL
IsDeleted
;
//是否删除
@property
(
nonatomic
,
assign
)
BOOL
IsXiuGai
;
//是否删除
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
655c6f92
...
...
@@ -52,6 +52,12 @@ typedef enum : NSUInteger {
@property
(
nonatomic
,
strong
)
NSString
*
productMeasureUnit
;
//默认规格单位
@property
(
nonatomic
,
strong
)
NSString
*
packageQpcStr
;
//规格描述
@property
(
nonatomic
,
strong
)
NSString
*
packageUintStr
;
//包装单位
@property
(
nonatomic
,
strong
)
NSNumber
*
packPrice
;
//包装单价
@property
(
nonatomic
,
strong
)
NSNumber
*
basePrice
;
//基础单价
@property
(
nonatomic
,
strong
)
NSNumber
*
totalPrice
;
//总金额
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectProducts
;
@property
(
nonatomic
,
strong
)
NSString
*
selectUnit
;
...
...
@@ -125,18 +131,22 @@ typedef enum : NSUInteger {
foundationQuantity
.
text
=
self
.
shopDetail
.
foundationQuantity
;
//基础单价
if
([
self
.
shopDetail
.
foundationUnitPrice
floatValue
]
>
0
)
{
foundationUnitPrice
.
text
=
self
.
shopDetail
.
foundationUnitPrice
;
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,[
self
.
shopDetail
.
foundationUnitPrice
floatValue
]]
;
}
self
.
basePrice
=
self
.
shopDetail
.
foundationUnitPrice
;
//包装单价
if
([
self
.
shopDetail
.
packageUnitPrice
floatValue
]
>
0
)
{
packageUnitPrice
.
text
=
self
.
shopDetail
.
packageUnitPrice
;
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,[
self
.
shopDetail
.
packageUnitPrice
floatValue
]]
;
}
self
.
packPrice
=
self
.
shopDetail
.
packageUnitPrice
;
//总金额
if
([
self
.
shopDetail
.
totalMoney
floatValue
]
<=
0
)
{
totalMoney
.
text
=
@"0.0000"
;
}
else
{
totalMoney
.
text
=
self
.
shopDetail
.
totalMoney
;
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,[
self
.
shopDetail
.
totalMoney
floatValue
]]
;
}
self
.
totalPrice
=
self
.
shopDetail
.
totalMoney
;
//备注
remark
.
text
=
self
.
shopDetail
.
remark
;
...
...
@@ -226,12 +236,12 @@ typedef enum : NSUInteger {
self
.
shopDetail
.
packageUnit
=
self
.
packageUintStr
;
self
.
shopDetail
.
packageQuantity
=
packageQuantity
.
text
;
self
.
shopDetail
.
packageUnitPrice
=
packageUnitPrice
.
text
;
self
.
shopDetail
.
packageUnitPrice
=
self
.
packPrice
;
self
.
shopDetail
.
foundationQuantity
=
foundationQuantity
.
text
;
self
.
shopDetail
.
foundationUnitPrice
=
foundationUnitPrice
.
text
;
self
.
shopDetail
.
foundationUnitPrice
=
self
.
basePrice
;
self
.
shopDetail
.
totalMoney
=
totalMoney
.
text
;
self
.
shopDetail
.
totalMoney
=
self
.
totalPrice
;
self
.
shopDetail
.
remark
=
remark
.
text
;
if
(
self
.
productNameStr
.
length
==
0
)
{
...
...
@@ -458,13 +468,16 @@ typedef enum : NSUInteger {
}
}
else
if
(
textField
==
foundationUnitPrice
){
//基础单价
self
.
basePrice
=
[
NSNumber
numberWithFloat
:
foundationUnitPrice
.
text
.
floatValue
];
[
self
setPacktAndTotalPrice
];
//如果基础数量和包装数量有的话计算出包装单价和和总价
}
else
if
(
textField
==
packageUnitPrice
){
//包装单价
self
.
packPrice
=
[
NSNumber
numberWithFloat
:
packageUnitPrice
.
text
.
floatValue
];
[
self
setUnitAndTotalPrice
];
}
else
if
(
textField
==
totalMoney
){
//总金额
self
.
totalPrice
=
[
NSNumber
numberWithFloat
:
totalMoney
.
text
.
floatValue
];
[
self
setUnitAndPackPrice
];
}
}
...
...
@@ -475,27 +488,30 @@ typedef enum : NSUInteger {
[
self
setUnitAndTotalPrice
];
}
-
(
void
)
setPacktAndTotalPrice
{
if
(
foundationUnitPrice
.
text
.
length
>
0
)
{
if
(
self
.
basePrice
&&
foundationUnitPrice
.
text
.
length
>
0
)
{
if
(
foundationQuantity
.
text
.
length
>
0
)
{
float
totalPrice
=
[
foundationUnitPrice
.
text
floatValue
]
*
[
foundationQuantity
.
text
floatValue
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.4f"
,
totalPrice
];
float
totalPrice
=
[
self
.
basePrice
floatValue
]
*
[
foundationQuantity
.
text
floatValue
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
totalPrice
];
self
.
totalPrice
=
[
NSNumber
numberWithFloat
:
totalPrice
];
if
(
packageQuantity
.
text
.
length
>
0
&&
[
packageQuantity
.
text
floatValue
]
>
0
)
{
float
packagePrice
=
totalPrice
/
[
packageQuantity
.
text
floatValue
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.4f"
,
packagePrice
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
packagePrice
];
self
.
packPrice
=
[
NSNumber
numberWithFloat
:
packagePrice
];
}
}
}
}
//输入包装单价(包装数量和基础数量)计算基础单价和总金额
-
(
void
)
setUnitAndTotalPrice
{
if
(
packageUnitPrice
.
text
.
length
>
0
)
{
if
(
self
.
packPrice
&&
packageUnitPrice
.
text
.
length
>
0
)
{
if
(
packageQuantity
.
text
.
length
>
0
)
{
float
totalPrice
=
[
packageUnitPrice
.
text
floatValue
]
*
[
packageQuantity
.
text
floatValue
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.4f"
,
totalPrice
];
float
totalPrice
=
[
self
.
packPrice
floatValue
]
*
[
packageQuantity
.
text
floatValue
];
totalMoney
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
totalPrice
];
self
.
totalPrice
=
[
NSNumber
numberWithFloat
:
totalPrice
];
if
(
foundationQuantity
.
text
.
length
>
0
&&
[
foundationQuantity
.
text
integerValue
]
>
0
)
{
float
packagePrice
=
totalPrice
/
[
foundationQuantity
.
text
floatValue
];
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
4
f"
,
packagePrice
];
}
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
packagePrice
];
self
.
basePrice
=
[
NSNumber
numberWithFloat
:
packagePrice
];
}
}
}
}
...
...
@@ -503,12 +519,14 @@ typedef enum : NSUInteger {
-
(
void
)
setUnitAndPackPrice
{
if
(
totalMoney
.
text
.
length
>
0
)
{
if
(
packageQuantity
.
text
.
length
>
0
&&
[
packageQuantity
.
text
floatValue
]
>
0
)
{
float
packagePrice
=
[
totalMoney
.
text
floatValue
]
/
[
packageQuantity
.
text
floatValue
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.4f"
,
packagePrice
];
float
packagePrice
=
[
self
.
totalPrice
floatValue
]
/
[
packageQuantity
.
text
floatValue
];
packageUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
packagePrice
];
self
.
packPrice
=
[
NSNumber
numberWithFloat
:
packagePrice
];
}
if
(
foundationQuantity
.
text
.
length
>
0
&&
[
foundationQuantity
.
text
floatValue
]
>
0
)
{
float
packagePrice
=
[
totalMoney
.
text
floatValue
]
/
[
foundationQuantity
.
text
floatValue
];
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.4f"
,
packagePrice
];
float
packagePrice
=
[
self
.
totalPrice
floatValue
]
/
[
foundationQuantity
.
text
floatValue
];
foundationUnitPrice
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
packagePrice
];
self
.
basePrice
=
[
NSNumber
numberWithFloat
:
packagePrice
];
}
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Controllers/NewReceiveProductViewController.m
View file @
655c6f92
...
...
@@ -33,9 +33,10 @@
UILabel
*
_choosePackPriceLabel
;
UILabel
*
_chooseBasePriceLabel
;
UILabel
*
_chooseTotalLabel
;
UILabel
*
_chooseTotalPriceLabel
;
UILabel
*
_chooseTotalPriceLabel
;
UITextField
*
_shPackField
;
UITextField
*
_shBaseQuantityField
;
UILabel
*
_shjcLabel
;
...
...
@@ -152,8 +153,7 @@
}
self
.
noticeProduct
.
rctQty
=
[
NSNumber
numberWithFloat
:[
_shPackField
.
text
floatValue
]];
self
.
noticeProduct
.
rctBaseQty
=
[
NSNumber
numberWithFloat
:[
_shBaseQuantityField
.
text
floatValue
]];;
self
.
noticeProduct
.
rctTotal
=
[
NSNumber
numberWithFloat
:[
_chooseTotalPriceLabel
.
text
floatValue
]];
self
.
noticeProduct
.
rctBaseQty
=
[
NSNumber
numberWithFloat
:[
_shBaseQuantityField
.
text
floatValue
]];
self
.
noticeProduct
.
note
=
_noteTextView
.
text
;
return
YES
;
}
...
...
@@ -251,36 +251,43 @@
}
}
-
(
void
)
prepareDataIncell
{
//商品
_chooseProductLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,
self
.
noticeProduct
.
productName
,
self
.
noticeProduct
.
productCode
];
//包装单位
_choosePackUnitLabel
.
text
=
self
.
noticeProduct
.
unit
;
//包装规格
_choosePackStandLabel
.
text
=
[
NSString
stringWithFormat
:
@"1*%@ %@"
,[
self
.
noticeProduct
.
qpc
stringValue
],
self
.
noticeProduct
.
baseUnit
];
//待收包装数量
_choosePackCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ %@"
,[
self
.
noticeProduct
.
qty
stringValue
],
self
.
noticeProduct
.
unit
];
//待收基础数量
_chooseBaseCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ %@"
,[
self
.
noticeProduct
.
baseQty
stringValue
],
self
.
noticeProduct
.
baseUnit
];
_chooseTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@元"
,[
self
.
noticeProduct
.
total
stringValue
]];
_choosePackPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ 元"
,[
self
.
noticeProduct
.
packprice
stringValue
]];
_chooseBasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ 元"
,[
self
.
noticeProduct
.
price
stringValue
]];
//待收总金额
_chooseTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f元"
,[
self
.
noticeProduct
.
total
floatValue
]];
//包装单价
_choosePackPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f 元"
,[
self
.
noticeProduct
.
packprice
floatValue
]];
//基础单价
_chooseBasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f 元"
,[
self
.
noticeProduct
.
price
floatValue
]];
_shbzLabel
.
text
=
self
.
noticeProduct
.
unit
;
_shjcLabel
.
text
=
self
.
noticeProduct
.
baseUnit
;
//实收基础数量
if
(
self
.
noticeProduct
.
rctBaseQty
)
{
_shBaseQuantityField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,[
self
.
noticeProduct
.
rctBaseQty
stringValue
]];
}
//实收包装数量
if
(
self
.
noticeProduct
.
rctQty
)
{
_shPackField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,[
self
.
noticeProduct
.
rctQty
stringValue
]];
}
//实收总金额
if
(
self
.
noticeProduct
.
rctTotal
)
{
_chooseTotalPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
@ 元"
,[
self
.
noticeProduct
.
rctTotal
string
Value
]];
_chooseTotalPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
.2f 元"
,[
self
.
noticeProduct
.
rctTotal
float
Value
]];
}
else
{
_chooseTotalPriceLabel
.
text
=
@"0.00
00
元"
;
_chooseTotalPriceLabel
.
text
=
@"0.00元"
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
// if (indexPath.row == _dataArr.count - 1) {
// return TableRowHeight *2;
// }
return
TableRowHeight
;
}
...
...
@@ -288,25 +295,37 @@
-
(
void
)
textChange
:
(
UITextField
*
)
textField
{
if
(
textField
==
_shPackField
)
{
if
(
_shPackField
.
text
.
length
>
0
)
{
float
total
=
[
_shPackField
.
text
floatValue
]
*
[
self
.
noticeProduct
.
packprice
floatValue
];
float
baseCount
=
0
;
if
([
self
.
noticeProduct
.
price
floatValue
]
>
0
)
{
baseCount
=
total
/
[
self
.
noticeProduct
.
price
floatValue
];
}
_chooseTotalPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.4f元"
,
total
];
//基础数量【实收】= 包装数量【实收】* 规格
float
baseCount
=
[
_shPackField
.
text
floatValue
]
*
[
self
.
noticeProduct
.
qpc
floatValue
];
_shBaseQuantityField
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
baseCount
];
//总金额【实收】= 基础数量【实收】* 基础单价
float
total
=
0
;
if
([
_shPackField
.
text
floatValue
]
==
[
self
.
noticeProduct
.
qty
floatValue
])
{
total
=
[
self
.
noticeProduct
.
total
floatValue
];
}
else
{
total
=
baseCount
*
[
self
.
noticeProduct
.
price
floatValue
];
}
_chooseTotalPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f元"
,
total
];
self
.
noticeProduct
.
rctTotal
=
[
NSNumber
numberWithFloat
:
total
];
}
}
else
if
(
textField
==
_shBaseQuantityField
)
{
if
(
_shBaseQuantityField
.
text
.
length
>
0
)
{
float
total
=
[
_shBaseQuantityField
.
text
floatValue
]
*
[
self
.
noticeProduct
.
price
floatValue
];
float
baseCount
=
0
;
if
([
self
.
noticeProduct
.
packprice
floatValue
]
>
0
)
{
baseCount
=
total
/
[
self
.
noticeProduct
.
packprice
floatValue
];
// 包装数量【实收】= 基础数量【实收】/ 规格
float
baseCount
=
0
;
if
([
self
.
noticeProduct
.
qpc
floatValue
]
>
0
)
{
baseCount
=
[
_shBaseQuantityField
.
text
floatValue
]
/
[
self
.
noticeProduct
.
qpc
floatValue
];
}
_chooseTotalPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.4f元"
,
total
];
_shPackField
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
baseCount
];
float
total
=
0
;
if
([
_shPackField
.
text
floatValue
]
==
[
self
.
noticeProduct
.
qty
floatValue
])
{
total
=
[
self
.
noticeProduct
.
total
floatValue
];
}
else
{
total
=
baseCount
*
[
self
.
noticeProduct
.
price
floatValue
];
}
_chooseTotalPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f元"
,
total
];
self
.
noticeProduct
.
rctTotal
=
[
NSNumber
numberWithFloat
:
total
];
}
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.m
View file @
655c6f92
...
...
@@ -173,12 +173,12 @@
self
.
showshjcCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量[实收]:%@%@"
,
transferProduct
.
rctBaseQty
?[
transferProduct
.
rctBaseQty
stringValue
]:
@"0"
,
transferProduct
.
baseUnit
];
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
@元"
,[
transferProduct
.
packprice
string
Value
]];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%
@元"
,[
transferProduct
.
price
string
Value
]];
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
.2f元"
,[
transferProduct
.
packprice
float
Value
]];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%
.2f元"
,[
transferProduct
.
price
float
Value
]];
self
.
showshTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额[实收]:%
@元"
,
transferProduct
.
rctTotal
?[
transferProduct
.
rctTotal
stringValue
]:
@"0"
];
self
.
showshTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额[实收]:%
.2f元"
,
transferProduct
.
rctTotal
?[
transferProduct
.
rctTotal
floatValue
]:
0
.
00
f
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
@元"
,
transferProduct
.
total
?[
transferProduct
.
total
stringValue
]:
@"0"
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
.2f元"
,
transferProduct
.
total
?[
transferProduct
.
total
floatValue
]:
0
.
00
f
];
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/Controllers/ChooseTransferViewController.m
View file @
655c6f92
...
...
@@ -7,31 +7,262 @@
//
#import "ChooseTransferViewController.h"
@interface
ChooseTransferViewController
()
#import "ChooseTansferCell.h"
#import "QueryOrder.h"
#import "TransferPdtDetail.h"
#import "MJRefresh.h"
#import "Transfer.h"
#define TopMargin 50
#define TableHeight 50
@interface
ChooseTransferViewController
()
<
UITextFieldDelegate
,
UITableViewDataSource
,
UITableViewDelegate
>
{
BOOL
_isRefresh
;
BOOL
_isLoadMore
;
NSInteger
_currentPage
;
id
billNumberObject
;
}
@property
(
nonatomic
,
strong
)
NSMutableArray
*
indexArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArr
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITextField
*
selectTextFiled
;
@property
(
nonatomic
,
strong
)
NSString
*
contentStr
;
@end
@implementation
ChooseTransferViewController
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
}
return
self
;
}
-
(
void
)
dealloc
{
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
self
.
title
=
@"选择转运单"
;
[
self
initData
];
[
self
bulidLayout
];
[
self
createRefresh
];
[
self
getData
];
}
-
(
void
)
initData
{
self
.
dataArr
=
[
NSMutableArray
array
];
self
.
indexArr
=
[
NSMutableArray
array
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
-
(
void
)
getData
{
[
ICRUserUtil
sharedInstance
].
needFresh
=
NO
;
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
[
strongSelf
fetchtPuchaseList
:
data
];
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSMutableArray
*
orderArr
=
[
NSMutableArray
array
];
if
(
orderArr
.
count
==
0
)
{
QueryOrder
*
order
=
[
QueryOrder
new
];
order
.
field
=
@"billNumber"
;
order
.
direction
=
@"desc"
;
[
orderArr
addObject
:[
order
dictForCommit
]];
}
billNumberObject
=
[
NSNull
null
];
if
(
self
.
contentStr
.
length
>
0
)
{
billNumberObject
=
self
.
contentStr
;
}
NSDictionary
*
dict
=
@{
@"state"
:
TRANSFER_STATE_RECEIVED
,
@"billNumberLike"
:
billNumberObject
,
@"queryOrders"
:
orderArr
,
@"userUuid"
:
userUtil
.
userId
,
@"pageNumber"
:
@
(
_currentPage
),
// @"fetchParts":@"pdtDetails",
@"pageSize"
:
@
(
20
)};
[[
ICRHTTPController
sharedController
]
queryTransferWithData
:
dict
success
:
succ
failure
:
fail
];
}
-
(
void
)
fetchtPuchaseList
:
(
id
)
data
{
if
(
data
)
{
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
if
(
_currentPage
==
0
)
{
if
(
self
.
dataArr
.
count
>
0
)
{
[
self
.
dataArr
removeAllObjects
];
}
}
NSArray
*
recodesArr
=
data
[
@"data"
][
@"records"
];
for
(
NSDictionary
*
purchaseBillDict
in
recodesArr
)
{
Transfer
*
purchaseBill
=
[[
Transfer
alloc
]
init
];
[
purchaseBill
setValuesForKeysWithDictionary
:
purchaseBillDict
];
NSMutableArray
*
pdtArr
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
pdtDetailDict
in
purchaseBill
.
pdtDetails
)
{
TransferPdtDetail
*
tran
=
[
TransferPdtDetail
new
];
[
tran
setValuesForKeysWithDictionary
:
pdtDetailDict
];
tran
.
sourcebillnumber
=
purchaseBill
.
billnumber
;
[
pdtArr
addObject
:
tran
];
}
purchaseBill
.
pdtDetails
=
pdtArr
;
[
self
.
dataArr
addObject
:
purchaseBill
];
}
NSDictionary
*
pageDict
=
data
[
@"data"
][
@"paging"
];
NSInteger
pageCount
=
[
pageDict
[
@"pageCount"
]
integerValue
];
[
self
.
tableView
reloadData
];
[
self
endRefreshing
];
if
(
pageCount
<=
_currentPage
)
{
[
self
.
tableView
.
footer
noticeNoMoreData
];
}
if
(
_currentPage
==
0
&&
self
.
dataArr
.
count
>
0
)
{
[
self
.
tableView
scrollToRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
]
atScrollPosition
:
UITableViewScrollPositionTop
animated
:
YES
];
}
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
}
else
{
[
IBTLoadingView
showTips
:
@" 无记录 "
];
}
}
-
(
void
)
checkWithBillNumber
{
if
(
self
.
indexArr
.
count
>
0
)
{
[
self
.
indexArr
removeAllObjects
];
}
[
self
.
selectTextFiled
resignFirstResponder
];
if
(
self
.
selectTextFiled
.
text
.
length
>
0
)
{
self
.
contentStr
=
self
.
selectTextFiled
.
text
;
}
else
{
self
.
contentStr
=
@""
;
}
[
self
getData
];
}
/*
#pragma mark - Navigation
#pragma mark - 布局
-
(
void
)
bulidLayout
{
self
.
selectTextFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
20
,
5
,
ScreenSize
.
width
-
100
,
TopMargin
-
10
)];
self
.
selectTextFiled
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
selectTextFiled
.
background
=
[
UIImage
imageNamed
:
@"textFiled"
];
self
.
selectTextFiled
.
delegate
=
self
;
self
.
selectTextFiled
.
placeholder
=
@"输入类似转运单号"
;
self
.
selectTextFiled
.
font
=
GXF_FIFTEENTEN_SIZE
;
[
self
.
view
addSubview
:
self
.
selectTextFiled
];
// 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.
UIButton
*
btn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
btn
.
frame
=
CGRectMake
(
self
.
selectTextFiled
.
right
+
5
,
10
,
60
,
TopMargin
-
20
);
[
btn
setTitle
:
@"开始查询"
forState
:
UIControlStateNormal
];
btn
.
titleLabel
.
font
=
FontSize
(
13
);
btn
.
layer
.
cornerRadius
=
5
;
btn
.
layer
.
masksToBounds
=
YES
;
btn
.
backgroundColor
=
GXF_NAVIGAYION_COLOR
;
[
btn
addTarget
:
self
action
:
@selector
(
checkWithBillNumber
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn
];
UIImageView
*
leftView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
35
,
40
)];
leftView
.
image
=
[
UIImage
imageNamed
:
@"search"
];
self
.
selectTextFiled
.
leftView
=
leftView
;
self
.
selectTextFiled
.
leftViewMode
=
UITextFieldViewModeAlways
;
UIButton
*
rightView
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
rightView
setImage
:[
UIImage
imageNamed
:
@"delete"
]
forState
:
UIControlStateNormal
];
rightView
.
frame
=
CGRectMake
(
0
,
0
,
35
,
40
);
[
rightView
addTarget
:
self
action
:
@selector
(
deleteTextFieldStr
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
selectTextFiled
.
rightView
=
rightView
;
self
.
selectTextFiled
.
rightViewMode
=
UITextFieldViewModeAlways
;
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
TopMargin
,
ScreenSize
.
width
,
ScreenSize
.
height
-
64
-
TopMargin
))
style
:(
UITableViewStylePlain
)];
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
[
self
.
view
addSubview
:
self
.
tableView
];
UIBarButtonItem
*
rightItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"确定"
style
:
UIBarButtonItemStylePlain
target
:
self
action
:
@selector
(
sureClick
)];
self
.
navigationItem
.
rightBarButtonItem
=
rightItem
;
}
-
(
void
)
createRefresh
{
self
.
tableView
.
header
=
[
MJRefreshNormalHeader
headerWithRefreshingBlock
:
^
{
if
(
_isRefresh
)
{
return
;
}
_isRefresh
=
YES
;
_currentPage
=
0
;
[
self
getData
];
}];
self
.
tableView
.
header
.
lastUpdatedTimeKey
=
ChooseTransportUpdateDate
;
self
.
tableView
.
footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
if
(
_isLoadMore
)
{
return
;
}
_isLoadMore
=
YES
;
_currentPage
++
;
[
self
getData
];
}
];
}
#pragma mark - 结束刷新
-
(
void
)
endRefreshing
{
_isLoadMore
=
NO
;
_isRefresh
=
NO
;
[
self
.
tableView
.
header
endRefreshing
];
[
self
.
tableView
.
footer
endRefreshing
];
}
-
(
void
)
deleteTextFieldStr
{
self
.
selectTextFiled
.
text
=
@""
;
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
self
.
dataArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"ChooseTansferCell"
;
ChooseTansferCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
ChooseTansferCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
if
(
self
.
dataArr
.
count
>
0
){
Transfer
*
bill
=
_dataArr
[
indexPath
.
row
];
[
cell
setTransfer
:
bill
selectArr
:
self
.
indexArr
];
}
return
cell
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
//44+38+10 + count* 44
Transfer
*
bill
=
_dataArr
[
indexPath
.
row
];
return
102
+
bill
.
pdtDetails
.
count
*
44
;
}
#pragma mark - 按钮确定
-
(
void
)
sureClick
{
[
self
PopViewControllerAnimated
:
YES
];
if
(
self
.
indexArr
.
count
>
0
)
{
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
for
(
TransferPdtDetail
*
detail
in
self
.
indexArr
)
{
detail
.
sourcePdtDetail
=
detail
.
uuid
;
detail
.
uuid
=
nil
;
detail
.
sourcetype
=
@"transfer"
;
[
arr
addObject
:
detail
];
}
self
.
chooseTransferProduct
(
arr
);
}
}
*/
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Controllers/NewTransferViewController.m
View file @
655c6f92
...
...
@@ -17,6 +17,7 @@
#import "ShopDetaileViewController.h"
#import "TransportPdtDetail.h"
#import "ChooseTransportViewController.h"
#import "ChooseTransferViewController.h"
typedef
enum
:
NSUInteger
{
SaveTag
=
7000
,
CommitTag
,
...
...
@@ -49,6 +50,7 @@ typedef enum : NSUInteger {
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
addTransferCost
:
)
name
:
KNOTIFICATION_AddTransportCost
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
addPurchferProduct
:
)
name
:
KNOTIFICATION_AddPurchaseProduct
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
chooseTransportProduct
)
name
:
KNOTIFICATION_ChoseTransportProduct
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
chooseTransferProduct
)
name
:
KNOTIFICATION_ChoseTransferProduct
object
:
nil
];
}
return
self
;
}
...
...
@@ -300,6 +302,18 @@ typedef enum : NSUInteger {
};
[
self
PushViewController
:
tpv
animated
:
YES
];
}
-
(
void
)
chooseTransferProduct
{
ChooseTransferViewController
*
ctv
=
[
ChooseTransferViewController
new
];
ctv
.
chooseTransferProduct
=
^
(
NSArray
*
products
){
if
(
products
.
count
>
0
)
{
[
_bottomView
reProduct
:
products
];
}
};
[
self
PushViewController
:
ctv
animated
:
YES
];
}
-
(
void
)
addTransferCost
:
(
NSNotification
*
)
fination
{
NewCostViewController
*
nvc
=
[
NewCostViewController
new
];
...
...
@@ -386,10 +400,10 @@ typedef enum : NSUInteger {
shopDetail
.
packageSpecification
=
[
billProduct
.
qpc
stringValue
];
shopDetail
.
packageUnit
=
billProduct
.
unit
;
shopDetail
.
packageQuantity
=
[
billProduct
.
qty
stringValue
];
shopDetail
.
packageUnitPrice
=
[
billProduct
.
packprice
stringValue
]
;
shopDetail
.
foundationUnitPrice
=
[
billProduct
.
price
stringValue
]
;
shopDetail
.
packageUnitPrice
=
billProduct
.
packprice
;
shopDetail
.
foundationUnitPrice
=
billProduct
.
price
;
shopDetail
.
foundationQuantity
=
[
billProduct
.
baseQty
stringValue
];
shopDetail
.
totalMoney
=
[
billProduct
.
total
stringValue
]
;
shopDetail
.
totalMoney
=
billProduct
.
total
;
shopDetail
.
remark
=
billProduct
.
note
;
shopDetail
.
packageQpcUnit
=
billProduct
.
baseUnit
;
shopDetail
.
packageQpcStr
=
billProduct
.
qpcStr
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Controllers/TransferProductViewController.m
View file @
655c6f92
...
...
@@ -69,7 +69,7 @@
#pragma mark - headCellDelegate
-
(
void
)
addClickList
{
if
(
!
self
.
popView
)
{
NSArray
*
arr
=
@[
@"添加商品明细"
,
@"选择采购单"
,
@"选择发运单"
];
NSArray
*
arr
=
@[
@"添加商品明细"
,
@"选择采购单"
,
@"选择发运单"
,
@"选择转运单"
];
self
.
popView
=
[[
GXFPopView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
)
withArr
:
arr
];
self
.
popView
.
delegate
=
self
;
[
AppWindow
addSubview
:
self
.
popView
];
...
...
@@ -87,6 +87,8 @@
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_ChoseTransportPurchase
object
:
nil
];
}
else
if
([
str
isEqualToString
:
@"选择发运单"
]){
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_ChoseTransportProduct
object
:
nil
];
}
else
if
([
str
isEqualToString
:
@"选择转运单"
]){
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_ChoseTransferProduct object:nil];
}
}
-
(
void
)
clearFromSuper
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Views/ChooseTansferCell.h
0 → 100644
View file @
655c6f92
//
// ChooseTansferCell.h
// XFFruit
//
// Created by 陈俊俊 on 15/11/10.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Transfer.h"
@interface
ChooseTansferCell
:
UITableViewCell
<
UITableViewDataSource
,
UITableViewDelegate
>
@property
(
nonatomic
,
strong
)
UIView
*
bgView
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
secondLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
threeLabel
;
@property
(
nonatomic
,
strong
)
UITableView
*
secondTable
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
secondArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
indexArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectArr
;
-
(
void
)
setTransfer
:(
Transfer
*
)
bill
selectArr
:(
NSMutableArray
*
)
selectArr
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Views/ChooseTansferCell.m
0 → 100644
View file @
655c6f92
//
// ChooseTansferCell.m
// XFFruit
//
// Created by 陈俊俊 on 15/11/10.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "ChooseTansferCell.h"
#import "TransferProductCell.h"
#import "HeaderCell.h"
#define TableHeight 44
#define ShowHeight 110
@implementation
ChooseTansferCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
bulidLayout
];
}
return
self
;
}
-
(
void
)
bulidLayout
{
self
.
contentView
.
backgroundColor
=
XXFBgColor
;
self
.
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
170
)];
self
.
bgView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
contentView
addSubview
:
self
.
bgView
];
self
.
lineLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
1
))];;
self
.
lineLabel
.
backgroundColor
=
GXF_LINE_COLOR
;
self
.
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
44
))];
self
.
titleLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
titleLabel
.
font
=
GXF_SEVENTEENTH_SIZE
;
self
.
secondLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
44
-
1
,
ScreenSize
.
width
,
1
))];;
self
.
secondLabel
.
backgroundColor
=
GXF_LINE_COLOR
;
[
self
.
bgView
addSubview
:
self
.
titleLabel
];
[
self
.
bgView
addSubview
:
self
.
lineLabel
];
[
self
.
bgView
addSubview
:
self
.
secondLabel
];
self
.
secondTable
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
44
,
ScreenSize
.
width
,
self
.
bgView
.
height
-
45
))
style
:(
UITableViewStylePlain
)];
self
.
secondTable
.
delegate
=
self
;
self
.
secondTable
.
dataSource
=
self
;
self
.
secondTable
.
bounces
=
NO
;
self
.
secondTable
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
[
self
.
bgView
addSubview
:
self
.
secondTable
];
NSArray
*
arr
=
@[
@"商品"
,
@"单价"
,
@"包装数量"
];
HeaderCell
*
headCell
=
[[
HeaderCell
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
38
)
withArr
:
arr
withHiddenEdit
:
YES
];
self
.
secondTable
.
tableHeaderView
=
headCell
;
}
//转运单商品
-
(
void
)
setTransfer
:
(
Transfer
*
)
bill
selectArr
:
(
NSMutableArray
*
)
selectArr
{
self
.
bgView
.
height
=
92
+
bill
.
pdtDetails
.
count
*
44
;
self
.
secondTable
.
height
=
self
.
bgView
.
height
-
45
;
self
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"转单号:%@"
,
bill
.
billnumber
];
self
.
secondArr
=
[
NSMutableArray
array
];
self
.
selectArr
=
selectArr
;
[
self
.
secondArr
addObjectsFromArray
:
bill
.
pdtDetails
];
//重要
[
self
.
secondTable
reloadData
];
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
self
.
secondArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"TransferProductCell"
;
TransferProductCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
TransferProductCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
withImageName
:
@"selected"
];
cell
.
editBtn
.
hidden
=
YES
;
cell
.
rightImageName
=
@"edit"
;
}
if
(
self
.
secondArr
.
count
>
0
)
{
TransferPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
[
cell
setPdtDetail
:
billProduct
row
:
indexPath
.
row
];
if
([
self
isHaveIndexPath
:
billProduct
])
{
cell
.
editBtn
.
hidden
=
NO
;
}
else
{
cell
.
editBtn
.
hidden
=
YES
;
}
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
TableHeight
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
TransferProductCell
*
cell
=
(
TransferProductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
TransferPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
if
(
!
[
self
isHaveIndexPath
:
billProduct
])
{
cell
.
editBtn
.
hidden
=
NO
;
[
self
.
selectArr
addObject
:
billProduct
];
}
else
{
[
self
.
selectArr
removeObject
:
billProduct
];
cell
.
editBtn
.
hidden
=
YES
;
}
[
self
.
secondTable
reloadData
];
}
-
(
BOOL
)
isHaveIndexPath
:
(
TransferPdtDetail
*
)
billProduct
{
for
(
TransferPdtDetail
*
detail
in
self
.
selectArr
)
{
if
(
detail
.
uuid
==
billProduct
.
uuid
||
[
detail
.
uuid
isEqualToString
:
billProduct
.
uuid
])
{
return
YES
;
}
}
return
NO
;
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
View file @
655c6f92
...
...
@@ -144,13 +144,13 @@
-
(
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
.
price
string
Value
]];
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
.2f元"
,[
pdtDetail
.
price
float
Value
]];
self
.
countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
pdtDetail
.
qty
stringValue
],
pdtDetail
.
unit
];
self
.
showNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"商品:%@[%@]"
,
pdtDetail
.
productName
,
pdtDetail
.
productCode
];
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
.
baseUnit
];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
@元"
,[
pdtDetail
.
packprice
string
Value
]];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
.2f元"
,[
pdtDetail
.
packprice
float
Value
]];
NSString
*
sourceT
=
@""
;
if
([
pdtDetail
.
sourcetype
isEqualToString
:
@"none"
])
{
sourceT
=
@"无"
;
...
...
@@ -162,7 +162,7 @@
self
.
showPurchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"来源类型:%@"
,
sourceT
];
self
.
showSourceNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"来源单号:%@"
,
pdtDetail
.
sourcebillnumber
.
length
>
0
?
pdtDetail
.
sourcebillnumber
:
@"无"
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
@元"
,[
pdtDetail
.
total
string
Value
]];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
.2f元"
,[
pdtDetail
.
total
float
Value
]];
self
.
showNoteLabel
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
pdtDetail
.
note
?
pdtDetail
.
note
:
@"无"
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/NewTransportViewController.m
View file @
655c6f92
...
...
@@ -385,10 +385,10 @@ typedef enum : NSUInteger {
shopDetail
.
packageSpecification
=
[
billProduct
.
qpc
stringValue
];
shopDetail
.
packageUnit
=
billProduct
.
unit
;
shopDetail
.
packageQuantity
=
[
billProduct
.
qty
stringValue
];
shopDetail
.
packageUnitPrice
=
[
billProduct
.
packprice
stringValue
]
;
shopDetail
.
foundationUnitPrice
=
[
billProduct
.
price
stringValue
]
;
shopDetail
.
packageUnitPrice
=
billProduct
.
packprice
;
shopDetail
.
foundationUnitPrice
=
billProduct
.
price
;
shopDetail
.
foundationQuantity
=
[
billProduct
.
baseQty
stringValue
];
shopDetail
.
totalMoney
=
[
billProduct
.
total
stringValue
]
;
shopDetail
.
totalMoney
=
billProduct
.
total
;
shopDetail
.
remark
=
billProduct
.
note
;
shopDetail
.
sourceDetail
=
billProduct
.
purchasePdtDetail
;
shopDetail
.
sourceBillNumber
=
billProduct
.
purchasebillnumber
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.m
View file @
655c6f92
...
...
@@ -71,17 +71,6 @@
self
.
selectArr
=
selectArr
;
[
self
.
secondArr
addObjectsFromArray
:
bill
.
products
];
// self.secondTable = [[UITableView alloc]initWithFrame:(CGRectMake(0, 44,ScreenSize.width, self.bgView.height-45)) style:(UITableViewStylePlain)];
//
// self.secondTable.delegate = self;
// self.secondTable.dataSource = self;
//// self.secondTable.bounces = NO;
// self.secondTable.separatorStyle = UITableViewCellSeparatorStyleNone;
// [self.bgView addSubview:self.secondTable];
// NSArray *arr = @[@"商品",@"单价",@"包装数量"];
//
// HeaderCell *headCell = [[HeaderCell alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 38) withArr:arr];
// self.secondTable.tableHeaderView = headCell;
//重要
[
self
.
secondTable
reloadData
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Views/TransportPurductCell.m
View file @
655c6f92
...
...
@@ -150,15 +150,15 @@
-
(
void
)
setPdtDetail
:
(
TransportPdtDetail
*
)
pdtDetail
row
:
(
NSInteger
)
row
{
self
.
seqLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
@
(
row
+
1
)];
self
.
titleLabel
.
text
=
pdtDetail
.
productName
;
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
@元"
,[
pdtDetail
.
price
string
Value
]];
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
.2f元"
,[
pdtDetail
.
price
float
Value
]];
self
.
countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
pdtDetail
.
qty
stringValue
],
pdtDetail
.
unit
];
self
.
showNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"商品:%@[%@]"
,
pdtDetail
.
productName
,
pdtDetail
.
productCode
];
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
.
baseUnit
];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
@元"
,[
pdtDetail
.
packprice
string
Value
]];
self
.
showPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%
.2f元"
,[
pdtDetail
.
packprice
float
Value
]];
self
.
showPurchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"采购单号:%@"
,
pdtDetail
.
purchasebillnumber
.
length
>
0
?
pdtDetail
.
purchasebillnumber
:
@"无"
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
@元"
,[
pdtDetail
.
total
string
Value
]];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%
.2f元"
,[
pdtDetail
.
total
float
Value
]];
self
.
showNoteLabel
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
pdtDetail
.
note
?
pdtDetail
.
note
:
@"无"
];
}
...
...
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