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
3eab557d
Commit
3eab557d
authored
9 years ago
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收货单
parent
97c995b9
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
1398 additions
and
71 deletions
+1398
-71
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+36
-18
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+13
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+110
-3
Info.plist
XFFruit/Info.plist
+1
-1
ICRNotificationMacro.h
XFFruit/Macro/ICRNotificationMacro.h
+3
-0
IBTCommon.h
XFFruit/Utilities/IBTUIKit/IBTCommon.h
+2
-0
IBTCommon.m
XFFruit/Utilities/IBTUIKit/IBTCommon.m
+8
-0
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+26
-19
BusinessViewController.m
XFFruit/ViewControllers/Business/BusinessViewController.m
+14
-2
ProductBillCell.m
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
+2
-2
NewPurchaseNoticeViewController.m
...chaseNotice/Controllers/NewPurchaseNoticeViewController.m
+9
-1
SeePurchaseNoticeViewController.m
...chaseNotice/Controllers/SeePurchaseNoticeViewController.m
+3
-3
NewReceiveProductViewController.h
...s/Receiving/Controllers/NewReceiveProductViewController.h
+20
-0
NewReceiveProductViewController.m
...s/Receiving/Controllers/NewReceiveProductViewController.m
+277
-0
NewReceiveViewController.h
...trollers/Receiving/Controllers/NewReceiveViewController.h
+3
-2
NewReceiveViewController.m
...trollers/Receiving/Controllers/NewReceiveViewController.m
+356
-5
ReceiveProductViewController.h
...lers/Receiving/Controllers/ReceiveProductViewController.h
+19
-0
ReceiveProductViewController.m
...lers/Receiving/Controllers/ReceiveProductViewController.m
+160
-0
ReceiveViewController.m
...Controllers/Receiving/Controllers/ReceiveViewController.m
+7
-7
ReceiveProductCell.h
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.h
+38
-0
ReceiveProductCell.m
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.m
+205
-0
ChooseTransportViewController.m
...lers/Transfer/Controllers/ChooseTransportViewController.m
+4
-2
NewTransferViewController.m
...trollers/Transfer/Controllers/NewTransferViewController.m
+36
-2
TransferPdtDetail.h
XFFruit/ViewControllers/Transfer/Models/TransferPdtDetail.h
+6
-0
TransferProductCell.m
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
+2
-2
NewTransportViewController.m
...ollers/Transport/Controllers/NewTransportViewController.m
+12
-0
TransportDetailViewController.m
...ers/Transport/Controllers/TransportDetailViewController.m
+22
-0
TransportPurchaseCell.m
...t/ViewControllers/Transport/Views/TransportPurchaseCell.m
+2
-0
TransportPurductCell.m
...it/ViewControllers/Transport/Views/TransportPurductCell.m
+2
-2
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
3eab557d
...
...
@@ -144,6 +144,9 @@
72A813FD1BCD33BE003631F3
/* ReceiveBoltView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A813FC1BCD33BE003631F3
/* ReceiveBoltView.m */
;
};
72A814001BCD3B0A003631F3
/* NewReceiveViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A813FF1BCD3B0A003631F3
/* NewReceiveViewController.m */
;
};
72A814031BCD3C6C003631F3
/* ReceiveDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A814021BCD3C6C003631F3
/* ReceiveDetailViewController.m */
;
};
72A814151BCF990B003631F3
/* ReceiveProductViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A814141BCF990B003631F3
/* ReceiveProductViewController.m */
;
};
72A814181BCF9CF6003631F3
/* ReceiveProductCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A814171BCF9CF6003631F3
/* ReceiveProductCell.m */
;
};
72A8141B1BCFD6A1003631F3
/* NewReceiveProductViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72A8141A1BCFD6A1003631F3
/* NewReceiveProductViewController.m */
;
};
72B3C0C11B9D3C7300025D81
/* CostViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0AC1B9D3C7300025D81
/* CostViewController.m */
;
};
72B3C0C21B9D3C7300025D81
/* NewCostViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0AE1B9D3C7300025D81
/* NewCostViewController.m */
;
};
72B3C0C31B9D3C7300025D81
/* NewTransportViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0B01B9D3C7300025D81
/* NewTransportViewController.m */
;
};
...
...
@@ -701,6 +704,12 @@
72A813FF1BCD3B0A003631F3
/* NewReceiveViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NewReceiveViewController.m
;
sourceTree
=
"<group>"
;
};
72A814011BCD3C6C003631F3
/* ReceiveDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ReceiveDetailViewController.h
;
sourceTree
=
"<group>"
;
};
72A814021BCD3C6C003631F3
/* ReceiveDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ReceiveDetailViewController.m
;
sourceTree
=
"<group>"
;
};
72A814131BCF990B003631F3
/* ReceiveProductViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ReceiveProductViewController.h
;
sourceTree
=
"<group>"
;
};
72A814141BCF990B003631F3
/* ReceiveProductViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ReceiveProductViewController.m
;
sourceTree
=
"<group>"
;
};
72A814161BCF9CF6003631F3
/* ReceiveProductCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ReceiveProductCell.h
;
sourceTree
=
"<group>"
;
};
72A814171BCF9CF6003631F3
/* ReceiveProductCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ReceiveProductCell.m
;
sourceTree
=
"<group>"
;
};
72A814191BCFD6A1003631F3
/* NewReceiveProductViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NewReceiveProductViewController.h
;
sourceTree
=
"<group>"
;
};
72A8141A1BCFD6A1003631F3
/* NewReceiveProductViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NewReceiveProductViewController.m
;
sourceTree
=
"<group>"
;
};
72B3C0AB1B9D3C7300025D81
/* CostViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CostViewController.h
;
sourceTree
=
"<group>"
;
};
72B3C0AC1B9D3C7300025D81
/* CostViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
CostViewController.m
;
sourceTree
=
"<group>"
;
};
72B3C0AD1B9D3C7300025D81
/* NewCostViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NewCostViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1533,6 +1542,10 @@
72A813FF1BCD3B0A003631F3
/* NewReceiveViewController.m */
,
72A814011BCD3C6C003631F3
/* ReceiveDetailViewController.h */
,
72A814021BCD3C6C003631F3
/* ReceiveDetailViewController.m */
,
72A814131BCF990B003631F3
/* ReceiveProductViewController.h */
,
72A814141BCF990B003631F3
/* ReceiveProductViewController.m */
,
72A814191BCFD6A1003631F3
/* NewReceiveProductViewController.h */
,
72A8141A1BCFD6A1003631F3
/* NewReceiveProductViewController.m */
,
);
path
=
Controllers
;
sourceTree
=
"<group>"
;
...
...
@@ -1549,6 +1562,8 @@
children
=
(
72A813FB1BCD33BE003631F3
/* ReceiveBoltView.h */
,
72A813FC1BCD33BE003631F3
/* ReceiveBoltView.m */
,
72A814161BCF9CF6003631F3
/* ReceiveProductCell.h */
,
72A814171BCF9CF6003631F3
/* ReceiveProductCell.m */
,
);
path
=
Views
;
sourceTree
=
"<group>"
;
...
...
@@ -2687,6 +2702,7 @@
C142D2C51AC3A16C000109A7
/* ICRBaseViewController.m in Sources */
,
351CFF5B1B90633700F30866
/* GXFDisplayFunction.m in Sources */
,
C123A91D1B25E3F1003C0C36
/* ICRPatrolResultViewController.m in Sources */
,
72A814181BCF9CF6003631F3
/* ReceiveProductCell.m in Sources */
,
C1E108651ADAD2F200620375
/* IBTUIScrollView.m in Sources */
,
7217E9E51B72364300FE5C1D
/* NewSurveyViewController.m in Sources */
,
C167F9BD1AC7BF5500D2A098
/* ICRUserUtil.m in Sources */
,
...
...
@@ -2699,6 +2715,7 @@
C15918511AC062460013B391
/* IBTUILabel.m in Sources */
,
72B3C0C21B9D3C7300025D81
/* NewCostViewController.m in Sources */
,
04040E001B6FE75800326D12
/* ICRPerson.m in Sources */
,
72A8141B1BCFD6A1003631F3
/* NewReceiveProductViewController.m in Sources */
,
C159183F1AC062460013B391
/* IBTTableViewInfo.m in Sources */
,
7281A0BC1B897EAB0052B1AC
/* PurchaseCell.m in Sources */
,
35CF339E1B96E606001211EF
/* GXFWarehouseViewController.m in Sources */
,
...
...
@@ -2833,6 +2850,7 @@
30D9D8811AD3AC5A0086EEE7
/* ICRHelpAndFeedBackViewController.m in Sources */
,
35CF33871B956CF7001211EF
/* GXFBottomView.m in Sources */
,
C14E3F7F1ADA336F0093325D
/* ICRTaskProcessViewController.m in Sources */
,
72A814151BCF990B003631F3
/* ReceiveProductViewController.m in Sources */
,
C1E91C471AD77842007B00D4
/* ICRTask.m in Sources */
,
C1D0171B1AD8F0D600CD9CB8
/* IBTSegmentContainer.m in Sources */
,
C10C90991AE56E8700B911CD
/* JTOptionCell.m in Sources */
,
...
...
@@ -3113,8 +3131,8 @@
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
COPY_PHASE_STRIP
=
NO
;
ENABLE_STRICT_OBJC_MSGSEND
=
YES
;
GCC_C_LANGUAGE_STANDARD
=
gnu99
;
...
...
@@ -3134,7 +3152,7 @@
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
2fa95960-d007-48b7-90a8-85831ed9bc43
"
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
...
...
@@ -3158,8 +3176,8 @@
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
COPY_PHASE_STRIP
=
NO
;
ENABLE_NS_ASSERTIONS
=
NO
;
ENABLE_STRICT_OBJC_MSGSEND
=
YES
;
...
...
@@ -3172,7 +3190,7 @@
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
2fa95960-d007-48b7-90a8-85831ed9bc43
"
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
...
...
@@ -3185,8 +3203,8 @@
baseConfigurationReference
=
1B0B22845F5CD40B5CF655F2
/* Pods.debug.xcconfig */
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
GCC_PREFIX_HEADER
=
"XFFruit/XFFruit-Prefix.pch"
;
INFOPLIST_FILE
=
XFFruit/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
...
...
@@ -3196,7 +3214,7 @@
"$(PROJECT_DIR)"
,
);
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
2fa95960-d007-48b7-90a8-85831ed9bc43
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
name
=
Debug
;
...
...
@@ -3206,8 +3224,8 @@
baseConfigurationReference
=
7DDFB1D460448C3B45118195
/* Pods.release.xcconfig */
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
GCC_PREFIX_HEADER
=
"XFFruit/XFFruit-Prefix.pch"
;
INFOPLIST_FILE
=
XFFruit/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
...
...
@@ -3217,7 +3235,7 @@
"$(PROJECT_DIR)"
,
);
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
2fa95960-d007-48b7-90a8-85831ed9bc43
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
name
=
Release
;
...
...
@@ -3226,8 +3244,8 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
BUNDLE_LOADER
=
"$(TEST_HOST)"
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
FRAMEWORK_SEARCH_PATHS
=
(
"$(SDKROOT)/Developer/Library/Frameworks"
,
"$(inherited)"
,
...
...
@@ -3240,7 +3258,7 @@
INFOPLIST_FILE
=
XFFruitTests/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_NAME
=
XFFruitTests
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
2fa95960-d007-48b7-90a8-85831ed9bc43
"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
...
...
@@ -3250,8 +3268,8 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
BUNDLE_LOADER
=
"$(TEST_HOST)"
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: Minglong Hu (TR9LJDJBFT)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Taiping E-Commerce Co., Ltd
"
;
FRAMEWORK_SEARCH_PATHS
=
(
"$(SDKROOT)/Developer/Library/Frameworks"
,
"$(inherited)"
,
...
...
@@ -3260,7 +3278,7 @@
INFOPLIST_FILE
=
XFFruitTests/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_NAME
=
XFFruitTests
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
2fa95960-d007-48b7-90a8-85831ed9bc43
"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
3eab557d
...
...
@@ -385,6 +385,19 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
version
:(
NSNumber
*
)
version
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//6.保存收货单
-
(
void
)
saveReceiveWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//7.保存并收货
-
(
void
)
saveReceiptAndReceiveWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
3eab557d
...
...
@@ -123,6 +123,10 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
XFFHttp_GetTransferDetail
,
XFFHttp_EndTransfer
,
XFFHttp_AbortTransfer
,
//收货单
XFFHttp_SaveRctinfo
,
XFFHttp_SaveReceipt
,
};
...
...
@@ -222,11 +226,17 @@ static NSString * const ICRHTTPInterface[] = {
[
XFFHttp_EndTransport
]
=
@"transport/finish"
,
[
XFFHttp_AbortTransport
]
=
@"transport/abort"
,
//转运单
[
XFFHTTP_TransferSave
]
=
@"transfer/save_transfer"
,
[
XFFHttp_QueryTransfer
]
=
@"transfer/query_transfer"
,
[
XFFHttp_GetTransferDetail
]
=
@"transfer/get_transfer"
,
[
XFFHttp_EndTransfer
]
=
@"transfer/finish"
,
[
XFFHttp_AbortTransfer
]
=
@"transfer/abort"
,
[
XFFHttp_EndTransfer
]
=
@"transfer/finish"
,
[
XFFHttp_AbortTransfer
]
=
@"transfer/abort"
,
//收货
[
XFFHttp_SaveRctinfo
]
=
@"transfer/save_rctinfo"
,
[
XFFHttp_SaveReceipt
]
=
@"transfer/receipt"
,
};
static
NSString
*
const
ICRAttachmentTypeValue
[]
=
{
...
...
@@ -2225,6 +2235,34 @@ acceptTypeJson:YES
success
:
success
failure
:
failure
];
}
////选择发运单列表
//- (void)chooseTransPortWithData:(id)data
// success:(void (^)(id))succ
// failure:(void (^)(id))fail{
//
// void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
// CLog(@"%@", responseObject);
// if (succ) {
// succ( responseObject );
// }
// };
// void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
// CLog(@"%@", error);
// if (fail) {
// fail( error );
// }
// };
// NSDictionary *dict = data;
// NSString *urlStr = [[self class] UrlForPluginHTTPAction:XFFHttp_QueryTransport];
// [self POST:urlStr
// parameters:dict
// needToken:NO
//acceptTypeJson:YES
// success:success
// failure:failure];
//}
//获取发运单详情
-
(
void
)
getTransportResultWithTransportUuid
:
(
NSString
*
)
transportUuid
success
:
(
void
(
^
)(
id
))
succ
...
...
@@ -2776,6 +2814,75 @@ acceptTypeJson:YES
failure
:
failure
];
}
//保存收货单
-
(
void
)
saveReceiveWithData
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
data
)
{
if
(
fail
)
{
fail
(
[[
self
class
]
ErrorWithMsg
:
ERROR_PARAMETER
code
:
0
]
);
}
return
;
}
void
(
^
success
)(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
=
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
CLog
(
@"%@"
,
responseObject
);
if
(
succ
)
{
succ
(
responseObject
);
}
};
void
(
^
failure
)(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
=
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
CLog
(
@"%@"
,
error
);
if
(
fail
)
{
fail
(
error
);
}
};
NSDictionary
*
dict
=
data
;
NSString
*
currentTime
=
[[
NSDate
date
]
httpParameterString
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_SaveRctinfo
]
stringByAppendingFormat
:
@"?time=%@&operId=%@&operName=%@"
,
currentTime
,
userUtil
.
userCode
,
userUtil
.
displayName
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
parameters
:
dict
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
//保存并收货
-
(
void
)
saveReceiptAndReceiveWithData
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
data
)
{
if
(
fail
)
{
fail
(
[[
self
class
]
ErrorWithMsg
:
ERROR_PARAMETER
code
:
0
]
);
}
return
;
}
void
(
^
success
)(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
=
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
CLog
(
@"%@"
,
responseObject
);
if
(
succ
)
{
succ
(
responseObject
);
}
};
void
(
^
failure
)(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
=
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
CLog
(
@"%@"
,
error
);
if
(
fail
)
{
fail
(
error
);
}
};
NSDictionary
*
dict
=
data
;
NSString
*
currentTime
=
[[
NSDate
date
]
httpParameterString
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_SaveReceipt
]
stringByAppendingFormat
:
@"?time=%@&operId=%@&operName=%@"
,
currentTime
,
userUtil
.
userCode
,
userUtil
.
displayName
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
parameters
:
dict
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/Info.plist
View file @
3eab557d
...
...
@@ -7,7 +7,7 @@
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
com.
gomor
e.XFFruit
<
/string
>
<
string
>
com.
cntaiping.lif
e.XFFruit
<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Macro/ICRNotificationMacro.h
View file @
3eab557d
...
...
@@ -13,6 +13,9 @@
#define KNOTIFICATION_getSelectPurchaseProduct @"KNOTIFICATION_getSelectPurchaseProduct"
#define KNOTIFICATION_ChoseTransportPurchase @"KNOTIFICATION_ChoseTransportPurchase"//选择采购单
#define KNOTIFICATION_ChoseTransportProduct @"KNOTIFICATION_ChoseTransportProduct"//选择发运单
#define KNOTIFICATION_EditReceiveProduct @"KNOTIFICATION_EditReceiveProduct"
#define KNOTIFICATION_AddPurchaseProduct @"KNOTIFICATION_AddPurchaseProduct"
#define KNOTIFICATION_AddTransportCost @"KNOTIFICATION_AddTransportCost"
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCommon.h
View file @
3eab557d
...
...
@@ -41,4 +41,6 @@
+
(
NSMutableAttributedString
*
)
setTextViewFontOfString
:(
NSString
*
)
string
paragraphStyle
:(
NSInteger
)
lineHeight
fontSize
:(
float
)
size
color
:(
UIColor
*
)
color
;
+
(
NSString
*
)
trimmingCharacters
:(
NSString
*
)
str
;
+
(
int
)
compareDate
:(
NSString
*
)
oneDate
withDate
:(
NSString
*
)
twoDate
;
+
(
BOOL
)
checkIsPermission
:(
NSString
*
)
permission
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCommon.m
View file @
3eab557d
...
...
@@ -243,5 +243,13 @@
}
return
ci
;
}
+
(
BOOL
)
checkIsPermission
:
(
NSString
*
)
permission
{
for
(
NSString
*
per
in
[
ICRUserUtil
sharedInstance
].
permissions
)
{
if
([
per
isEqualToString
:
permission
])
{
return
YES
;
}
}
return
NO
;
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
3eab557d
...
...
@@ -150,11 +150,7 @@
#define PURCHASE_ACTION_FINISH @"finish"
#define PURCHASE_ACTION_ABORT @"abort"
//权限列表vendorapprove
#define PURCHASE_PERMISSIONS_MANAGEAPPROVE @"500405"
#define PURCHASE_PERMISSIONS_VENDORAPPROVE @"500406"
#define PURCHASE_PERMISSIONS_FINISH @"500407"
#define PURCHASE_PERMISSIONS_ABORT @"500408"
//加工单状态
...
...
@@ -182,13 +178,6 @@
#define TRANSPORT_STATE_RECEIVED @"received" //已收货
#define TRANSPORT_STATE_ABORTED @"aborted" //已废用
//发运单权限
#define TRANSPORT_ACTION_FINISH @"500404" //结束权
#define TRANSPORT_ACTION_ABORT @"500505" //作废权
//采购通知单状态
//initial("未提交"), notAccepted("未接受"), purchasing("采购中"), finished("已完成")
#define PURCHASENOTICE_STATE_INITIAL @"initial"
...
...
@@ -196,19 +185,37 @@
#define PURCHASENOTICE_STATE_PURCHASEING @"purchasing"
#define PURCHASENOTICE_STATE_FINISHED @"finished"
//采购通知单权限
#define NOTICE_PERMISSIONS_ACCEPTTASK @"500304"//接受任务
#define NOTICE_PERMISSIONS_CREATEBILL @"500305"//新建权
#define NOTICE_PERMISSIONS_FINISH @"500306"//结束
//转运单状态
#define TRANSFER_STATE_INITIAL @"initial" //未提交
#define TRANSFER_STATE_UNRECEIVED @"unreceived"//待收货
#define TRANSFER_STATE_RECEIVED @"received" //已收货
#define TRANSFER_STATE_ABORTED @"aborted" //已废用
#define TRANSFER_ACTION_FINISH @"500604" //结束权
//收货单
#define RECEIVE_STATE_SAVE @"save" //保存
#define RECEIVE_STATE_RECEIVE @"receive" //收货
//权限列表vendorapprove 采购单
#define PURCHASE_PERMISSIONS_MANAGEAPPROVE @"500405"
#define PURCHASE_PERMISSIONS_VENDORAPPROVE @"500406"
#define PURCHASE_PERMISSIONS_FINISH @"500407"
#define PURCHASE_PERMISSIONS_ABORT @"500408"
//转运单
#define TRANSFER_ACTION_ABORT @"500605" //作废权
#define RECEIVE_ACTION_RECEIVE @"500803" //收货权
//采购通知单权限
#define NOTICE_PERMISSIONS_ACCEPTTASK @"500304"//接受任务
#define NOTICE_PERMISSIONS_CREATEBILL @"500305"//新建权
#define NOTICE_PERMISSIONS_FINISH @"500306"//结束
//发运单权限
#define TRANSPORT_ACTION_FINISH @"500504" //结束权
#define TRANSPORT_ACTION_ABORT @"500505" //作废权
//选中的颜色
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Business/BusinessViewController.m
View file @
3eab557d
...
...
@@ -45,6 +45,7 @@
[
super
viewDidLoad
];
[
self
setupSubviews
];
self
.
navigationItem
.
leftBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"收货单"
style
:
UIBarButtonItemStylePlain
target
:
self
action
:
@selector
(
receiveClick
:
)];
}
-
(
void
)
didReceiveMemoryWarning
{
...
...
@@ -209,7 +210,14 @@
[
self
PushViewController
:
tVC
animated
:
YES
];
}
break
;
// case kFunctionPatrolPlan://巡店计划
case
kFunctionSeeReceive
:
//收货单
{
ReceiveViewController
*
tVC
=
[[
ReceiveViewController
alloc
]
init
];
tVC
.
title
=
@"收货单"
;
[
self
PushViewController
:
tVC
animated
:
YES
];
}
break
;
// case kFunctionPatrolPlan://巡店计划
// {
// ICRPatrolPlanViewController *pVC = [[ICRPatrolPlanViewController alloc] initWithStore:nil isHomeShow:YES];
// [self PushViewController:pVC animated:YES];
...
...
@@ -242,7 +250,11 @@
break
;
}
}
-
(
void
)
receiveClick
:
(
UIBarButtonItem
*
)
item
{
ReceiveViewController
*
tVC
=
[[
ReceiveViewController
alloc
]
init
];
tVC
.
title
=
@"收货单"
;
[
self
PushViewController
:
tVC
animated
:
YES
];
}
//-(void)initView
//{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/ProductBillCell.m
View file @
3eab557d
...
...
@@ -15,7 +15,7 @@
#define LeftWidth 45
#define RightWidth 30
#define ShowWidth
150
#define ShowWidth
(ScreenSize.width - LeftMargin*2 - SmallSize)/2
#define ShowHeight 20
@implementation
ProductBillCell
...
...
@@ -66,7 +66,7 @@
self
.
showView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TableHeight
,
ScreenSize
.
width
,
0
)];
self
.
showView
.
clipsToBounds
=
YES
;
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetM
ax
X
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetM
in
X
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showStandLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showStandLabel
.
text
=
@"包装规格:1*12斤"
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.m
View file @
3eab557d
...
...
@@ -517,8 +517,16 @@ typedef enum : NSUInteger {
if
(
_shopeArr
.
count
==
0
)
{
ShowMessage
(
@"商品明细不能为空"
);
return
NO
;
}
for
(
NoticeProduct
*
billProduct
in
_shopeArr
)
{
if
([
billProduct
.
quantity
integerValue
]
<=
0
||
[
billProduct
.
qpcQuantity
integerValue
]
<=
0
)
{
ShowMessage
(
@"有数量等于0的商品明细,请编辑后保存"
);
return
NO
;
}
}
return
YES
;
}
-
(
void
)
saveSurvey
:
(
NSString
*
)
state
message
:
(
NSString
*
)
msg
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m
View file @
3eab557d
...
...
@@ -511,11 +511,11 @@ typedef enum : NSUInteger {
Cell
.
YcgslLabel
.
text
=
[
noticeProduct
.
purchasedQuantity
stringValue
];
//已采购数量
Cell
.
packageUnit
.
text
=
noticeProduct
.
packUnit
;
//包装单位
Cell
.
packageQuantity
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
noticeProduct
.
qpcQuantity
,
noticeProduct
.
packUnit
];
//包装数量
Cell
.
YcgslLabel
.
text
=
[
noticeProduct
.
purchasedQuantity
stringValue
];
//已采购数量
Cell
.
YcgslLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
noticeProduct
.
purchasedQuantity
,
noticeProduct
.
packUnit
];
//已采购数量
Cell
.
foundationQuantity
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
noticeProduct
.
quantity
,
noticeProduct
.
baseUnit
];
//基础数量
Cell
.
remark
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
noticeProduct
.
remark
?
noticeProduct
.
remark
:
@"无"
];
//备注
if
(
Cell
.
YcgslLabel
.
text
==
nil
)
{
Cell
.
YcgslLabel
.
text
=
@"0"
;
//已采购数量
if
(
!
noticeProduct
.
purchasedQuantity
)
{
Cell
.
YcgslLabel
.
text
=
[
NSString
stringWithFormat
:
@"0%@"
,
noticeProduct
.
packUnit
]
;
//已采购数量
}
}
//编辑
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Controllers/NewReceiveProductViewController.h
0 → 100644
View file @
3eab557d
//
// NewReceiveProductViewController.h
// XFFruit
//
// Created by 陈俊俊 on 15/10/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
#import "TransferPdtDetail.h"
typedef
void
(
^
ChoseNoticeProduct
)(
TransferPdtDetail
*
noticeProduct
,
NSInteger
indexTag
);
@interface
NewReceiveProductViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
TransferPdtDetail
*
noticeProduct
;
@property
(
nonatomic
,
copy
)
ChoseNoticeProduct
editReceiveProduct
;
@property
(
nonatomic
,
assign
)
NSInteger
indexTag
;
@property
(
nonatomic
,
strong
)
NSString
*
navTitle
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Controllers/NewReceiveProductViewController.m
0 → 100644
View file @
3eab557d
//
// NewReceiveProductViewController.m
// XFFruit
//
// Created by 陈俊俊 on 15/10/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "NewReceiveProductViewController.h"
#import "SurveyCell.h"
#import "HPGrowingTextView.h"
#import "ChooseProductViewController.h"
#import "ChooseProductUnitViewController.h"
#define LeftMargin 15
#define BtnHeight 44
#define TableRowHeight 46
#define CornerRadius 5
#define BtnSize 19
#define TotalHeight 230
#define KeyboardHeight 258
@interface
NewReceiveProductViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
HPGrowingTextViewDelegate
,
UITextFieldDelegate
,
UIAlertViewDelegate
>
{
UITableView
*
_tableView
;
NSMutableArray
*
_dataArr
;
UILabel
*
_chooseProductLabel
;
UILabel
*
_choosePackUnitLabel
;
UILabel
*
_choosePackStandLabel
;
UILabel
*
_choosePackCountLabel
;
UILabel
*
_chooseBaseCountLabel
;
UILabel
*
_choosePackPriceLabel
;
UILabel
*
_chooseBasePriceLabel
;
UILabel
*
_chooseTotalPriceLabel
;
UITextField
*
_shPackField
;
UITextField
*
_shBaseQuantityField
;
UILabel
*
_shjcLabel
;
UILabel
*
_shbzLabel
;
HPGrowingTextView
*
_noteTextView
;
}
@property
(
nonatomic
,
strong
)
NSString
*
productNameStr
;
@property
(
nonatomic
,
strong
)
NSString
*
productCodeStr
;
@property
(
nonatomic
,
strong
)
NSString
*
productUuidStr
;
@property
(
nonatomic
,
strong
)
NSString
*
productQpcStr
;
//商品规格描述
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectProducts
;
@property
(
nonatomic
,
strong
)
NSString
*
selectUnit
;
@end
@implementation
NewReceiveProductViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
self
.
navTitle
;
[
self
initData
];
[
self
createTableView
];
}
-
(
void
)
initData
{
_dataArr
=
[
NSMutableArray
array
];
self
.
selectProducts
=
[
NSMutableArray
array
];
[
_dataArr
addObject
:
@"商品"
];
[
_dataArr
addObject
:
@"包装单位"
];
[
_dataArr
addObject
:
@"包装规格"
];
[
_dataArr
addObject
:
@"包装数量"
];
[
_dataArr
addObject
:
@"包装数量[收货]"
];
[
_dataArr
addObject
:
@"基础数量"
];
[
_dataArr
addObject
:
@"基础数量[收货]"
];
[
_dataArr
addObject
:
@"包装单价"
];
[
_dataArr
addObject
:
@"基础单价"
];
[
_dataArr
addObject
:
@"总金额[收货]"
];
[
_dataArr
addObject
:
@"备注"
];
}
-
(
void
)
createTableView
{
self
.
view
.
backgroundColor
=
XXFBgColor
;
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
LeftMargin
,
ScreenSize
.
width
,
ScreenSize
.
height
-
64
-
LeftMargin
))
style
:(
UITableViewStylePlain
)];
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
UIView
*
footView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
50
)];
UIButton
*
commitBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
LeftMargin
,
5
,
(
ScreenSize
.
width
-
LeftMargin
*
2
),
BtnHeight
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
0
image
:
nil
title
:
@"保存"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
CornerRadius
bgColor
:
GXF_COMMIT_COLOR
];
[
footView
addSubview
:
commitBtn
];
_tableView
.
tableFooterView
=
footView
;
[
self
.
view
addSubview
:
_tableView
];
}
#pragma mark - 按钮点击事件
-
(
void
)
btnClick
:
(
UIButton
*
)
btn
{
if
([
self
checkCost
])
{
self
.
editReceiveProduct
(
self
.
noticeProduct
,
self
.
indexTag
);
[
self
PopViewControllerAnimated
:
YES
];
}
}
-
(
BOOL
)
checkCost
{
if
(
_shPackField
.
text
.
length
==
0
)
{
ShowMessage
(
@"包装数量(收货)不能为空"
);
return
NO
;
}
if
(
_shBaseQuantityField
.
text
.
length
==
0
)
{
ShowMessage
(
@"基础数量(收货)不能为空"
);
return
NO
;
}
if
(
!
self
.
noticeProduct
)
{
self
.
noticeProduct
=
[[
TransferPdtDetail
alloc
]
init
];
}
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
.
note
=
_noteTextView
.
text
;
return
YES
;
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
_dataArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"cellID"
;
SurveyCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
SurveyCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
[
self
createViewInCell
:
cell
indexPath
:
indexPath
];
}
[
cell
setTitleStr
:
_dataArr
[
indexPath
.
row
]];
return
cell
;
}
-
(
void
)
createViewInCell
:
(
SurveyCell
*
)
cell
indexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
_dataArr
.
count
-
1
){
_noteTextView
=
[[
HPGrowingTextView
alloc
]
initWithFrame
:
CGRectMake
(
100
+
LeftMargin
,
0
,
ScreenSize
.
width
-
100
-
LeftMargin
*
2
-
15
,
TableRowHeight
)];
_noteTextView
.
contentInset
=
UIEdgeInsetsMake
(
5
,
5
,
5
,
0
);
_noteTextView
.
minNumberOfLines
=
1
;
_noteTextView
.
maxNumberOfLines
=
2
;
_noteTextView
.
isScrollable
=
YES
;
_noteTextView
.
font
=
GXF_FIFTEENTEN_SIZE
;
_noteTextView
.
textAlignment
=
NSTextAlignmentRight
;
_noteTextView
.
delegate
=
self
;
_noteTextView
.
returnKeyType
=
UIReturnKeyDone
;
_noteTextView
.
placeholder
=
@"输入备注内容"
;
[
cell
.
contentView
addSubview
:
_noteTextView
];
CGRect
lineFrame
=
cell
.
lineLabel
.
frame
;
lineFrame
.
origin
.
y
=
TableRowHeight
*
2
-
1
;
cell
.
lineLabel
.
frame
=
lineFrame
;
}
else
if
(
indexPath
.
row
==
4
||
indexPath
.
row
==
6
){
UITextField
*
textField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
100
+
LeftMargin
,
0
,
ScreenSize
.
width
-
100
-
LeftMargin
*
2
-
30
,
TableRowHeight
)];
textField
.
textAlignment
=
NSTextAlignmentRight
;
textField
.
textColor
=
GXF_CONTENT_COLOR
;
textField
.
font
=
GXF_FIFTEENTEN_SIZE
;
textField
.
returnKeyType
=
UIReturnKeyDone
;
textField
.
keyboardType
=
UIKeyboardTypeDecimalPad
;
textField
.
delegate
=
self
;
[
cell
.
contentView
addSubview
:
textField
];
textField
.
textColor
=
[
UIColor
redColor
];
UILabel
*
label
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
textField
.
frame
)
+
5
,
0
,
20
,
TableRowHeight
)];
label
.
textColor
=
GXF_CONTENT_COLOR
;
label
.
font
=
GXF_FIFTEENTEN_SIZE
;
[
cell
.
contentView
addSubview
:
label
];
if
(
indexPath
.
row
==
4
)
{
_shbzLabel
=
label
;
textField
.
placeholder
=
@"输入包装数量(收货)"
;
[
textField
addTarget
:
self
action
:
@selector
(
textChange
:
)
forControlEvents
:
UIControlEventAllEditingEvents
];
_shPackField
=
textField
;
}
else
if
(
indexPath
.
row
==
6
){
_shjcLabel
=
label
;
textField
.
enabled
=
NO
;
textField
.
placeholder
=
@"基础数量(收货)"
;
_shBaseQuantityField
=
textField
;
}
}
else
{
UILabel
*
contentLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
100
+
LeftMargin
,
0
,
ScreenSize
.
width
-
100
-
LeftMargin
*
2
-
15
,
TableRowHeight
))];
contentLabel
.
textAlignment
=
NSTextAlignmentRight
;
contentLabel
.
textColor
=
GXF_CONTENT_COLOR
;
contentLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
[
cell
.
contentView
addSubview
:
contentLabel
];
if
(
indexPath
.
row
==
0
)
{
_chooseProductLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
1
)
{
_choosePackUnitLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
2
)
{
_choosePackStandLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
3
)
{
_choosePackCountLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
5
)
{
_chooseBaseCountLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
7
)
{
_choosePackPriceLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
8
)
{
_chooseBasePriceLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
9
)
{
_chooseTotalPriceLabel
=
contentLabel
;
_chooseTotalPriceLabel
.
textColor
=
[
UIColor
redColor
];
}
}
if
(
self
.
noticeProduct
)
{
[
self
prepareDataIncell
];
}
}
-
(
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
,
self
.
noticeProduct
.
baseUnit
];
_choosePackCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ %@"
,
self
.
noticeProduct
.
qty
,
self
.
noticeProduct
.
unit
];
_chooseBaseCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ %@"
,
self
.
noticeProduct
.
baseQty
,
self
.
noticeProduct
.
baseUnit
];
_choosePackPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ 元"
,
self
.
noticeProduct
.
packprice
];
_chooseBasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ 元"
,
self
.
noticeProduct
.
price
];
_shbzLabel
.
text
=
self
.
noticeProduct
.
unit
;
_shjcLabel
.
text
=
self
.
noticeProduct
.
baseUnit
;
if
(
self
.
noticeProduct
.
rctBaseQty
)
{
_shBaseQuantityField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
self
.
noticeProduct
.
rctBaseQty
];
}
if
(
self
.
noticeProduct
.
rctQty
)
{
_shPackField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
self
.
noticeProduct
.
rctQty
];
}
if
(
self
.
noticeProduct
.
rctTotal
)
{
_chooseTotalPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ 元"
,
self
.
noticeProduct
.
rctTotal
];
}
else
{
_chooseTotalPriceLabel
.
text
=
@"0 元"
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
// if (indexPath.row == _dataArr.count - 1) {
// return TableRowHeight *2;
// }
return
TableRowHeight
;
}
-
(
void
)
textChange
:
(
UITextField
*
)
textField
{
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
:
@"%.1f"
,
total
];
_shBaseQuantityField
.
text
=
[
NSString
stringWithFormat
:
@"%.0f"
,
baseCount
];
}
}
#pragma mark delegate
-
(
BOOL
)
growingTextViewShouldReturn
:
(
HPGrowingTextView
*
)
growingTextView
{
[
_noteTextView
resignFirstResponder
];
return
YES
;
}
-
(
void
)
keyboardHidden
{
[
_shPackField
resignFirstResponder
];
[
_shBaseQuantityField
resignFirstResponder
];
[
_noteTextView
resignFirstResponder
];
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Controllers/NewReceiveViewController.h
View file @
3eab557d
...
...
@@ -7,7 +7,8 @@
//
#import "ICRBaseViewController.h"
#import "Transfer.h"
@interface
NewReceiveViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
Transfer
*
transfer
;
@property
(
nonatomic
,
assign
)
BOOL
isNotShowEdit
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Controllers/NewReceiveViewController.m
View file @
3eab557d
...
...
@@ -7,17 +7,368 @@
//
#import "NewReceiveViewController.h"
@interface
NewReceiveViewController
()
#import "ReceiveProductViewController.h"
#import "TransferPdtDetail.h"
#import "NewReceiveProductViewController.h"
#import "ReceiveViewController.h"
#define BottomHeight 50
#define LeftMargin 15
#define LeftWidth 100
#define LeftHeight 30
#define TopMargin 15
typedef
enum
:
NSUInteger
{
SaveTag
=
20000
,
ReceiveTag
}
BtnTag
;
@interface
NewReceiveViewController
()
<
UIAlertViewDelegate
>
{
UIScrollView
*
_scrollView
;
UIView
*
_transportView
;
UIView
*
_bottomView
;
UIButton
*
_firstBtn
;
UIButton
*
_secondBtn
;
ReceiveProductViewController
*
_pvc
;
id
uuidObject
;
id
billNumberObject
;
NSNumber
*
versionObject
;
}
@property
(
nonatomic
,
strong
)
UILabel
*
billNumberLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
purchaseLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
stateLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
warehouseLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
rwarehouseLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
carnumberLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
carhoneLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
createOperLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
noteLabel
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
defalutState
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@end
@implementation
NewReceiveViewController
-
(
void
)
dealloc
{
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
}
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
editReceiveProduct
:
)
name
:
KNOTIFICATION_EditReceiveProduct
object
:
nil
];
}
return
self
;
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
uuidObject
=
[
NSNull
null
];
billNumberObject
=
[
NSNull
null
];
versionObject
=
[
NSNumber
numberWithInteger
:
0
];
[
self
bulifLayout
];
[
self
getDataFromServer
];
}
-
(
void
)
getDataFromServer
{
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
data
)
{
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
NSDictionary
*
dictData
=
data
[
@"data"
];
Transfer
*
transfer
=
[[
Transfer
alloc
]
init
];
[
transfer
setValuesForKeysWithDictionary
:
dictData
];
NSMutableArray
*
productArr
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
billDict
in
transfer
.
pdtDetails
)
{
TransferPdtDetail
*
billProbuct
=
[
TransferPdtDetail
new
];
[
billProbuct
setValuesForKeysWithDictionary
:
billDict
];
[
productArr
addObject
:
billProbuct
];
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_RECEIVED
])
{
[
self
.
defalutState
addObject
:
@"YES"
];
}
else
{
[
self
.
defalutState
addObject
:
@"NO"
];
}
}
transfer
.
pdtDetails
=
productArr
;
self
.
transfer
=
transfer
;
[
strongSelf
fetchtTransportDetail
];
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
}
else
{
[
IBTLoadingView
showTips
:
@" 无记录 "
];
}
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[[
ICRHTTPController
sharedController
]
getTransferResultWithTransferUuid
:
self
.
transfer
.
uuid
success
:
succ
failure
:
fail
];
}
-
(
void
)
fetchtTransportDetail
{
self
.
billNumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
billnumber
];
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_UNRECEIVED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
redColor
];
self
.
stateLabel
.
text
=
@"待收货"
;
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_RECEIVED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
text
=
@"已收货"
;
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_ABORTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已作废"
;
}
self
.
purchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"转运单%@"
,
self
.
transfer
.
billnumber
];
self
.
warehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseName
];
self
.
rwarehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseName
];
self
.
carnumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
carnumber
];
self
.
carhoneLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
carphone
];
self
.
noteLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
self
.
transfer
.
note
?
self
.
transfer
.
note
:
@"无"
];
self
.
createOperLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
IBTCommon
checkString
:
self
.
transfer
.
create_operName
],
self
.
transfer
.
create_time
.
length
>
10
?
[
self
.
transfer
.
create_time
substringToIndex
:
10
]
:
self
.
transfer
.
create_time
];
[
self
setNoteHeight
];
_pvc
.
productArr
=
[
NSMutableArray
arrayWithArray
:
self
.
transfer
.
pdtDetails
];
_pvc
.
defaultState
=
self
.
defalutState
;
[
_pvc
.
tableView
reloadData
];
}
-
(
void
)
setNoteHeight
{
CGFloat
height
=
[
self
.
noteLabel
calculateHeight
];
CGRect
noteFrame
=
self
.
noteLabel
.
frame
;
noteFrame
.
size
.
height
=
height
;
self
.
noteLabel
.
frame
=
noteFrame
;
CGFloat
totalHeight
=
height
+
LeftHeight
*
9
;
// CGRect purchaseFrame = _purchaseView.frame;
// purchaseFrame.size.height = totalHeight;
// _purchaseView.frame = purchaseFrame;
//
//
// CGRect bottomFrame = _bottomView.frame;
// bottomFrame.origin.y = CGRectGetMaxY(_purchaseView.frame) + TopMargin;
// _bottomView.frame = bottomFrame;
_scrollView
.
contentSize
=
CGSizeMake
(
ScreenSize
.
width
,
totalHeight
+
CGRectGetHeight
(
_bottomView
.
frame
)
+
TopMargin
*
2
);
}
#pragma mark - 视图初始化
-
(
void
)
bulifLayout
{
self
.
defalutState
=
[
NSMutableArray
array
];
_scrollView
=
[[
UIScrollView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
-
64
-
BottomHeight
)];
_scrollView
.
showsHorizontalScrollIndicator
=
NO
;
_scrollView
.
showsVerticalScrollIndicator
=
NO
;
_scrollView
.
backgroundColor
=
XXFBgColor
;
[
self
.
view
addSubview
:
_scrollView
];
_firstBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
LeftMargin
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
40
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
SaveTag
image
:
nil
title
:
@"保存"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
5
bgColor
:
GXF_SAVE_COLOR
];
[
self
.
view
addSubview
:
_firstBtn
];
_secondBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
_firstBtn
.
frame
)
+
LeftMargin
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
40
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
ReceiveTag
image
:
nil
title
:
@"收货"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
5
bgColor
:
GXF_COMMIT_COLOR
];
[
self
.
view
addSubview
:
_secondBtn
];
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_RECEIVED
]
||
!
[
IBTCommon
checkIsPermission
:
RECEIVE_ACTION_RECEIVE
])
{
_firstBtn
.
hidden
=
YES
;
_secondBtn
.
hidden
=
YES
;
CGRect
scrollViewFrame
=
_scrollView
.
frame
;
scrollViewFrame
.
size
.
height
=
ScreenSize
.
height
-
64
;
_scrollView
.
frame
=
scrollViewFrame
;
}
NSArray
*
leftArr
=
@[
@"单号:"
,
@"来源单据:"
,
@"状态:"
,
@"发货仓库:"
,
@"收货仓库:"
,
@"车辆:"
,
@"司机电话:"
,
@"创建:"
,
@"备注"
];
_transportView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TopMargin
,
ScreenSize
.
width
,
LeftHeight
*
leftArr
.
count
+
LeftMargin
)];
_transportView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_scrollView
addSubview
:
_transportView
];
for
(
NSInteger
i
=
0
;
i
<
leftArr
.
count
;
i
++
)
{
UILabel
*
leftLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
10
+
LeftHeight
*
i
,
LeftWidth
,
LeftHeight
)];
leftLabel
.
font
=
GXF_SEVENTEENTH_SIZE
;
leftLabel
.
text
=
leftArr
[
i
];
leftLabel
.
textColor
=
GXF_DETAIL_COLOR
;
[
_transportView
addSubview
:
leftLabel
];
UILabel
*
rightLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
leftLabel
.
frame
),
10
+
LeftHeight
*
i
,
_transportView
.
frame
.
size
.
width
-
LeftMargin
-
LeftWidth
,
LeftHeight
)];
rightLabel
.
font
=
GXF_SEVENTEENTH_SIZE
;
rightLabel
.
textColor
=
GXF_DETAIL_COLOR
;
if
(
i
==
0
)
{
self
.
billNumberLabel
=
rightLabel
;
}
else
if
(
i
==
1
)
{
self
.
purchaseLabel
=
rightLabel
;
}
else
if
(
i
==
2
){
self
.
stateLabel
=
rightLabel
;
}
else
if
(
i
==
3
){
self
.
warehouseLabel
=
rightLabel
;
}
else
if
(
i
==
4
){
self
.
rwarehouseLabel
=
rightLabel
;
}
else
if
(
i
==
5
){
self
.
carnumberLabel
=
rightLabel
;
}
else
if
(
i
==
6
){
self
.
carhoneLabel
=
rightLabel
;
}
else
if
(
i
==
7
){
self
.
createOperLabel
=
rightLabel
;
}
else
if
(
i
==
leftArr
.
count
-
1
){
rightLabel
.
numberOfLines
=
0
;
self
.
noteLabel
=
rightLabel
;
}
[
_transportView
addSubview
:
rightLabel
];
}
[
self
createBottomView
];
}
-
(
void
)
createBottomView
{
_bottomView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
CGRectGetMaxY
(
_transportView
.
frame
)
+
TopMargin
,
ScreenSize
.
width
,
300
)];
_bottomView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_scrollView
addSubview
:
_bottomView
];
_pvc
=
[[
ReceiveProductViewController
alloc
]
init
];
_pvc
.
viewFrame
=
_bottomView
.
bounds
;
_pvc
.
isHiddenAdd
=
YES
;
_pvc
.
isHiddenEdit
=
self
.
isNotShowEdit
;
[
_bottomView
addSubview
:
_pvc
.
view
];
}
-
(
void
)
editReceiveProduct
:
(
NSNotification
*
)
fination
{
NewReceiveProductViewController
*
nvc
=
[
NewReceiveProductViewController
new
];
NSInteger
indexTag
=
[[[
fination
userInfo
]
objectForKey
:
@"indexPath"
]
integerValue
];
TransferPdtDetail
*
transferPdtDetail
=
[[
fination
userInfo
]
objectForKey
:
@"transferPdtDetail"
];
if
(
transferPdtDetail
)
{
nvc
.
navTitle
=
@"商品明细"
;
nvc
.
indexTag
=
indexTag
;
nvc
.
noticeProduct
=
transferPdtDetail
;
}
nvc
.
editReceiveProduct
=
^
(
TransferPdtDetail
*
transferPdtDetail
,
NSInteger
indexTag
){
if
(
transferPdtDetail
)
{
[
_pvc
.
productArr
replaceObjectAtIndex
:
indexTag
withObject
:
transferPdtDetail
];
[
_pvc
.
defaultState
replaceObjectAtIndex
:
indexTag
withObject
:
@"YES"
];
[
_pvc
.
tableView
reloadData
];
}
};
[
self
PushViewController
:
nvc
animated
:
YES
];
}
-
(
void
)
btnClick
:
(
UIButton
*
)
btn
{
switch
(
btn
.
tag
)
{
case
SaveTag
:
{
if
([
self
checkReceive
])
{
self
.
state
=
RECEIVE_STATE_SAVE
;
[
self
getDataFromServer
:
RECEIVE_STATE_SAVE
msg
:
@"正在保存..."
];
}
}
break
;
case
ReceiveTag
:{
if
([
self
checkReceive
])
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"温馨提示"
message
:
@"收货后不能重复收货,请确认是否要收货?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确认"
,
nil
];
alertView
.
delegate
=
self
;
[
alertView
show
];
}
}
break
;
default
:
break
;
}
}
-
(
void
)
getDataFromServer
:
(
NSString
*
)
state
msg
:
(
NSString
*
)
msg
{
//保存
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
if
(
data
)
{
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
];
if
(
success
==
1
)
{
//成功
if
([
state
isEqualToString
:
RECEIVE_STATE_SAVE
])
{
//保存成功
NSString
*
uuidS
=
data
[
@"data"
][
@"uuid"
];
NSString
*
billNumberS
=
data
[
@"data"
][
@"billNumber"
];
NSNumber
*
versionN
=
data
[
@"data"
][
@"version"
];
uuidObject
=
uuidS
;
billNumberObject
=
billNumberS
;
versionObject
=
versionN
;
[
IBTLoadingView
showTips
:[
NSString
stringWithFormat
:
@"当前单据%@已保存成功"
,
billNumberS
]];
}
else
{
//提交成功
ReceiveViewController
*
svc
=
[
ReceiveViewController
new
];
svc
.
title
=
@"收货单列表"
;
[
self
PushViewController
:
svc
animated
:
YES
];
}
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
}
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
if
(
self
.
transfer
.
uuid
.
length
>
0
&&
uuidObject
==
[
NSNull
null
]){
uuidObject
=
self
.
transfer
.
uuid
;
}
if
(
self
.
transfer
.
billnumber
>
0
&&
billNumberObject
==
[
NSNull
null
])
{
billNumberObject
=
self
.
transfer
.
billnumber
;
}
if
(
self
.
transfer
&&
[
versionObject
integerValue
]
==
0
)
{
versionObject
=
self
.
transfer
.
version
;
}
NSMutableArray
*
billProducts
=
[
NSMutableArray
array
];
for
(
TransferPdtDetail
*
pdtDetail
in
_pvc
.
productArr
)
{
[
billProducts
addObject
:[
pdtDetail
dictForCommit
]];
}
NSDictionary
*
dict
=
@{
@"uuid"
:
uuidObject
,
@"version"
:
versionObject
,
@"billnumber"
:
billNumberObject
,
@"enterprise"
:
[
ICRUserUtil
sharedInstance
].
orgId
,
@"state"
:
self
.
transfer
.
state
,
@"warehouseUuid"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseUuid
],
@"warehouseCode"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseCode
],
@"warehouseName"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseName
],
@"rwarehouseUuid"
:
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseUuid
],
@"rwarehouseCode"
:
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseCode
],
@"rwarehouseName"
:
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseName
],
@"carnumber"
:
[
IBTCommon
checkString
:
self
.
transfer
.
carnumber
],
@"type"
:
[
IBTCommon
checkString
:
self
.
transfer
.
type
],
@"carphone"
:
[
IBTCommon
checkString
:
self
.
transfer
.
carphone
],
@"note"
:
self
.
transfer
.
note
,
@"pdtDetails"
:
billProducts
,
};
[
IBTLoadingView
showProgressLabel
:
msg
];
if
([
state
isEqualToString
:
RECEIVE_STATE_SAVE
])
{
[[
ICRHTTPController
sharedController
]
saveReceiveWithData
:
dict
success
:
succ
failure
:
fail
];
}
else
{
[[
ICRHTTPController
sharedController
]
saveReceiptAndReceiveWithData
:
dict
success
:
succ
failure
:
fail
];
}
}
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
1
)
{
//提交
self
.
state
=
RECEIVE_STATE_RECEIVE
;
[
self
getDataFromServer
:
RECEIVE_STATE_RECEIVE
msg
:
@"收货中..."
];
}
}
-
(
BOOL
)
checkReceive
{
if
(
_pvc
.
productArr
.
count
==
0
)
{
ShowMessage
(
@"商品不能为空"
);
return
NO
;
}
return
YES
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Controllers/ReceiveProductViewController.h
0 → 100644
View file @
3eab557d
//
// ReceiveProductViewController.h
// XFFruit
//
// Created by 陈俊俊 on 15/10/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface
ReceiveProductViewController
:
ICRBaseViewController
@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/Receiving/Controllers/ReceiveProductViewController.m
0 → 100644
View file @
3eab557d
//
// ReceiveProductViewController.m
// XFFruit
//
// Created by 陈俊俊 on 15/10/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ReceiveProductViewController.h"
#import "HeaderCell.h"
#import "ReceiveProductCell.h"
#import "PurchaseBillProduct.h"
#define TableHeight 44
#define ShowHeight 130
@interface
ReceiveProductViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
HeaderCellDelegate
>
{
CGRect
_tableFrame
;
NSMutableArray
*
_selectRowArr
;
//记录当前选中的cell
}
@end
@implementation
ReceiveProductViewController
-
(
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
)
setViewFrame
:
(
CGRect
)
viewFrame
{
_tableFrame
=
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
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
self
.
productArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"ReceiveProductCell"
;
ReceiveProductCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
ReceiveProductCell
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
)
{
TransferPdtDetail
*
billP
=
self
.
productArr
[
indexPath
.
row
];
[
cell
setBillProduct
:
billP
row
:
indexPath
.
row
defaultState
:
self
.
defaultState
[
indexPath
.
row
]];
}
return
cell
;
}
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
for
(
NSIndexPath
*
path
in
_selectRowArr
)
{
if
(
path
.
row
==
indexPath
.
row
)
{
return
YES
;
}
}
return
NO
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ReceiveProductCell
*
cell
=
(
ReceiveProductCell
*
)[
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/Receiving/Controllers/ReceiveViewController.m
View file @
3eab557d
...
...
@@ -372,17 +372,17 @@ typedef enum : NSUInteger {
if
(
_dataArr
.
count
>
0
)
{
Transfer
*
transfer
=
_dataArr
[
indexPath
.
row
];
if
([
transfer
.
state
isEqualToString
:
TRANSPORT_STATE_INITIAL
]
)
{
NewReceiveViewController
*
nvc
=
[
NewReceiveViewController
new
];
// nvc.transfer = transfer;
nvc
.
transfer
=
transfer
;
if
([
transfer
.
state
isEqualToString
:
TRANSFER_STATE_UNRECEIVED
]
)
{
nvc
.
title
=
@"收货单收货"
;
[
self
PushViewController
:
nvc
animated
:
YES
]
;
nvc
.
isNotShowEdit
=
NO
;
}
else
{
ReceiveDetailViewController
*
pvc
=
[
ReceiveDetailViewController
new
];
pvc
.
title
=
@"查看收货单"
;
// pvc.transfer = transfer;
[
self
PushViewController
:
pvc
animated
:
YES
];
nvc
.
title
=
@"查看收货单"
;
nvc
.
isNotShowEdit
=
YES
;
}
[
self
PushViewController
:
nvc
animated
:
YES
];
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Receiving/Views/ReceiveProductCell.h
0 → 100644
View file @
3eab557d
//
// ReceiveProductCell.h
// XFFruit
//
// Created by 陈俊俊 on 15/10/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TransferPdtDetail.h"
@interface
ReceiveProductCell
:
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
)
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
(
nonatomic
,
strong
)
UILabel
*
showNoteLabel
;
@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/Receiving/Views/ReceiveProductCell.m
0 → 100644
View file @
3eab557d
//
// ReceiveProductCell.m
// XFFruit
//
// Created by 陈俊俊 on 15/10/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ReceiveProductCell.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
ReceiveProductCell
-
(
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
*
(
3
-
1
))
/
3
;
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
.
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
.
showbzCountLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showStandLabel
.
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
.
showStandLabel
.
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
.
showjcPriceLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showjcCountLabel
.
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
.
showshjcCountLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showbzPriceLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showbzPriceLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showbzPriceLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showTotalLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
frame
),
CGRectGetMaxY
(
self
.
showjcPriceLabel
.
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
.
showjcPriceLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showshTotalLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showshTotalLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showshTotalLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showNoteLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showStandLabel
.
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
.
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
.
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
.
showjcPriceLabel
];
[
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
:
@"%@%@"
,
transferProduct
.
qty
,
transferProduct
.
unit
];
self
.
yscountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
transferProduct
.
rctQty
?
transferProduct
.
rctQty
:
@"0"
,
transferProduct
.
unit
];
self
.
showStandLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装规格:1*%@%@"
,
transferProduct
.
qpc
,
transferProduct
.
baseUnit
];
self
.
showbzdwLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单位:%@"
,
transferProduct
.
unit
];
self
.
showbzCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量:%@%@"
,
transferProduct
.
qty
,
transferProduct
.
unit
];
self
.
showshCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装数量[收货]:%@%@"
,
transferProduct
.
rctQty
?(
transferProduct
.
rctQty
):
@"0"
,
transferProduct
.
unit
];
self
.
showjcCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量:%@%@"
,
transferProduct
.
baseQty
,
transferProduct
.
baseUnit
];
self
.
showshjcCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础数量[收货]:%@%@"
,
transferProduct
.
rctBaseQty
?
transferProduct
.
rctBaseQty
:
@"0"
,
transferProduct
.
baseUnit
];
self
.
showbzPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"包装单价:%@元"
,
transferProduct
.
packprice
];
self
.
showjcPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"基础单价:%@元"
,
transferProduct
.
price
];
self
.
showshTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额[收货]:%@元"
,
transferProduct
.
rctTotal
?
transferProduct
.
rctTotal
:
@"0"
];
self
.
showTotalLabel
.
text
=
[
NSString
stringWithFormat
:
@"总金额:%@元"
,
transferProduct
.
total
?
transferProduct
.
total
:
@"0"
];
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/Transfer/Controllers/ChooseTransportViewController.m
View file @
3eab557d
...
...
@@ -47,6 +47,7 @@
[
self
bulidLayout
];
[
self
createRefresh
];
[
self
getData
];
NSLog
(
@"%@"
,@{
@"AB"
:
@"abc_123"
});
}
-
(
void
)
initData
{
self
.
dataArr
=
[
NSMutableArray
array
];
...
...
@@ -83,9 +84,9 @@
NSDictionary
*
dict
=
@{
@"state"
:
TRANSPORT_STATE_UNRECEIVED
,
@"userCode"
:
userUtil
.
userCode
,
@"fetchParts"
:
@"pdtDetails"
,
@"pageNumber"
:
@
(
_currentPage
),
@"pageSize"
:
@
(
20
),
// @"fetchParts":@"products"
@"pageSize"
:
@
(
20
)
};
[[
ICRHTTPController
sharedController
]
queryTransPortWithData
:
dict
success
:
succ
failure
:
fail
];
}
...
...
@@ -107,6 +108,7 @@
for
(
NSDictionary
*
pdtDetailDict
in
purchaseBill
.
pdtDetails
)
{
TransportPdtDetail
*
tran
=
[
TransportPdtDetail
new
];
[
tran
setValuesForKeysWithDictionary
:
pdtDetailDict
];
tran
.
purchasebillnumber
=
purchaseBill
.
billnumber
;
[
pdtArr
addObject
:
tran
];
}
purchaseBill
.
pdtDetails
=
pdtArr
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Controllers/NewTransferViewController.m
View file @
3eab557d
...
...
@@ -258,6 +258,16 @@ typedef enum : NSUInteger {
ShowMessage
(
@"费用不能为空"
);
return
NO
;
}
for
(
TransferPdtDetail
*
billProduct
in
_bottomView
.
productVC
.
transferProductArr
)
{
if
([
billProduct
.
qty
integerValue
]
<=
0
||
[
billProduct
.
baseQty
integerValue
]
<=
0
)
{
ShowMessage
(
@"有数量等于0的商品明细,请编辑后保存"
);
return
NO
;
}
if
([
billProduct
.
price
floatValue
]
<=
0
||
[
billProduct
.
packprice
floatValue
]
<=
0
)
{
ShowMessage
(
@"有价格未填写的商品明细,请编辑后保存"
);
return
NO
;
}
}
return
YES
;
}
...
...
@@ -277,7 +287,7 @@ typedef enum : NSUInteger {
ChooseTransportViewController
*
tpv
=
[
ChooseTransportViewController
new
];
tpv
.
getTransferProduct
=
^
(
NSArray
*
products
){
if
(
products
.
count
>
0
)
{
NSMutableArray
*
arr
=
[
self
coverTransferProduct
:
products
];
NSMutableArray
*
arr
=
[
self
coverTransfer
FromTransport
Product
:
products
];
[
_bottomView
reProduct
:
arr
];
}
};
...
...
@@ -405,7 +415,31 @@ typedef enum : NSUInteger {
}
return
transferP
;
}
-
(
NSMutableArray
*
)
coverTransferFromTransportProduct
:
(
NSArray
*
)
products
{
NSMutableArray
*
transferP
=
[
NSMutableArray
new
];
for
(
TransportPdtDetail
*
pdt
in
products
)
{
TransferPdtDetail
*
ferPdt
=
[
TransferPdtDetail
new
];
ferPdt
.
uuid
=
pdt
.
uuid
;
ferPdt
.
productCode
=
pdt
.
productCode
;
ferPdt
.
productName
=
pdt
.
productName
;
ferPdt
.
productUuid
=
pdt
.
productUuid
;
ferPdt
.
sourcebillnumber
=
pdt
.
purchasebillnumber
;
ferPdt
.
sourcePdtDetail
=
pdt
.
purchasePdtDetail
;
ferPdt
.
sourcetype
=
@"transport"
;
ferPdt
.
qpc
=
pdt
.
qpc
;
ferPdt
.
qpcStr
=
pdt
.
qpcStr
;
ferPdt
.
unit
=
pdt
.
unit
;
ferPdt
.
qty
=
pdt
.
qty
;
ferPdt
.
price
=
pdt
.
price
;
ferPdt
.
baseQty
=
pdt
.
baseQty
;
ferPdt
.
packprice
=
pdt
.
packprice
;
ferPdt
.
baseUnit
=
pdt
.
baseUnit
;
ferPdt
.
total
=
pdt
.
total
;
ferPdt
.
note
=
pdt
.
note
;
[
transferP
addObject
:
ferPdt
];
}
return
transferP
;
}
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
1
)
{
//提交
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Models/TransferPdtDetail.h
View file @
3eab557d
...
...
@@ -26,4 +26,10 @@
@property
(
nonatomic
,
strong
)
NSNumber
*
baseQty
;
//转运的基础数量
@property
(
nonatomic
,
strong
)
NSNumber
*
total
;
//转运合计金额
@property
(
nonatomic
,
strong
)
NSString
*
note
;
//备注
//新增
@property
(
nonatomic
,
strong
)
NSNumber
*
rctBaseQty
;
//收货的基础数量
@property
(
nonatomic
,
strong
)
NSNumber
*
rctQty
;
//收货数量
@property
(
nonatomic
,
strong
)
NSNumber
*
rctTotal
;
//收货金额
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
View file @
3eab557d
...
...
@@ -15,7 +15,7 @@
#define LeftWidth 45
#define RightWidth 30
#define ShowWidth
150
#define ShowWidth
(ScreenSize.width - LeftMargin*2 - SmallSize)/2
#define ShowHeight 20
@implementation
TransferProductCell
...
...
@@ -61,7 +61,7 @@
self
.
showView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TableHeight
,
ScreenSize
.
width
,
0
)];
self
.
showView
.
clipsToBounds
=
YES
;
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetM
ax
X
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetM
in
X
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showStandLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showStandLabel
.
font
=
GXF_THREETEENTH_SIZE
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/NewTransportViewController.m
View file @
3eab557d
...
...
@@ -255,6 +255,18 @@ typedef enum : NSUInteger {
ShowMessage
(
@"费用不能为空"
);
return
NO
;
}
for
(
TransportPdtDetail
*
billProduct
in
_bottomView
.
productVC
.
transportProductArr
)
{
if
([
billProduct
.
qty
integerValue
]
<=
0
||
[
billProduct
.
baseQty
integerValue
]
<=
0
)
{
ShowMessage
(
@"有数量等于0的商品明细,请编辑后保存"
);
return
NO
;
}
if
([
billProduct
.
price
floatValue
]
<=
0
||
[
billProduct
.
packprice
floatValue
]
<=
0
)
{
ShowMessage
(
@"有价格未填写的商品明细,请编辑后保存"
);
return
NO
;
}
}
return
YES
;
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/TransportDetailViewController.m
View file @
3eab557d
...
...
@@ -223,6 +223,28 @@ typedef enum : NSUInteger {
CGRect
scrollViewFrame
=
_scrollView
.
frame
;
scrollViewFrame
.
size
.
height
=
ScreenSize
.
height
-
64
;
_scrollView
.
frame
=
scrollViewFrame
;
}
else
{
if
([
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_ABORT
]
&&
[
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_FINISH
])
{
_secondBtn
.
hidden
=
NO
;
_firstBtn
.
hidden
=
NO
;
}
else
{
if
([
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_ABORT
])
{
_secondBtn
.
hidden
=
YES
;
_firstBtn
.
hidden
=
NO
;
_firstBtn
.
width
=
ScreenSize
.
width
-
LeftMargin
*
2
;
}
else
if
([
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_FINISH
])
{
_secondBtn
.
hidden
=
NO
;
_firstBtn
.
hidden
=
YES
;
_secondBtn
.
frame
=
CGRectMake
(
LeftMargin
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
ScreenSize
.
width
-
LeftMargin
*
2
,
40
);
}
else
{
_firstBtn
.
hidden
=
YES
;
_secondBtn
.
hidden
=
YES
;
CGRect
scrollViewFrame
=
_scrollView
.
frame
;
scrollViewFrame
.
size
.
height
=
ScreenSize
.
height
-
64
;
_scrollView
.
frame
=
scrollViewFrame
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.m
View file @
3eab557d
...
...
@@ -93,6 +93,8 @@
self
.
secondArr
=
[
NSMutableArray
array
];
self
.
selectArr
=
selectArr
;
[
self
.
secondArr
addObjectsFromArray
:
bill
.
pdtDetails
];
//重要
[
self
.
secondTable
reloadData
];
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Views/TransportPurductCell.m
View file @
3eab557d
...
...
@@ -15,7 +15,7 @@
#define LeftWidth 45
#define RightWidth 30
#define ShowWidth
150
#define ShowWidth
(ScreenSize.width - LeftMargin*2 - SmallSize)/2
#define ShowHeight 20
@implementation
TransportPurductCell
...
...
@@ -67,7 +67,7 @@
self
.
showView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TableHeight
,
ScreenSize
.
width
,
0
)];
self
.
showView
.
clipsToBounds
=
YES
;
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetM
ax
X
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetM
in
X
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showStandLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showStandLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showStandLabel
.
text
=
@"包装规格:1*12斤"
;
...
...
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