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
3e43ba17
Commit
3e43ba17
authored
Jun 23, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
b86c3495
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
113 additions
and
9 deletions
+113
-9
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+6
-0
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+7
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+46
-0
NSDictionary+Category.h
XFFruit/General/Categories/NSDictionary+Category.h
+19
-0
NSDictionary+Category.m
XFFruit/General/Categories/NSDictionary+Category.m
+18
-0
NewTransferViewController.m
...trollers/Transfer/Controllers/NewTransferViewController.m
+8
-4
TransferProductViewController.m
...lers/Transfer/Controllers/TransferProductViewController.m
+1
-1
TransferProductCell.h
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.h
+1
-0
TransferProductCell.m
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
+3
-2
TransportPurchaseViewController.m
...s/Transport/Controllers/TransportPurchaseViewController.m
+2
-0
TransportPurductCell.m
...it/ViewControllers/Transport/Views/TransportPurductCell.m
+2
-2
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
3e43ba17
...
...
@@ -22,6 +22,7 @@
04B4A3871B9CAAD700D88D68
/* ShopDetail.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B4A3861B9CAAD700D88D68
/* ShopDetail.m */
;
};
04E721E31BA755FD008F9158
/* ProductUnit.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E721E21BA755FD008F9158
/* ProductUnit.m */
;
};
04F6E70A1B9B08A500550849
/* PurchaseNoticeViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F6E7091B9B08A500550849
/* PurchaseNoticeViewController.m */
;
};
19D20B8B1D1BC11000BF7FE2
/* NSDictionary+Category.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19D20B8A1D1BC11000BF7FE2
/* NSDictionary+Category.m */
;
};
300DD94A1B184B450080EE12
/* ICRPatrolPlan.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
300DD9491B184B450080EE12
/* ICRPatrolPlan.m */
;
};
300DD94B1B184B450080EE12
/* ICRPatrolPlan.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
300DD9491B184B450080EE12
/* ICRPatrolPlan.m */
;
};
300DD94E1B184EA70080EE12
/* ICRQuestion.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
300DD94D1B184EA70080EE12
/* ICRQuestion.m */
;
};
...
...
@@ -543,6 +544,8 @@
04E721E21BA755FD008F9158
/* ProductUnit.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ProductUnit.m
;
sourceTree
=
"<group>"
;
};
04F6E7081B9B08A500550849
/* PurchaseNoticeViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PurchaseNoticeViewController.h
;
sourceTree
=
"<group>"
;
};
04F6E7091B9B08A500550849
/* PurchaseNoticeViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseNoticeViewController.m
;
sourceTree
=
"<group>"
;
};
19D20B891D1BC11000BF7FE2
/* NSDictionary+Category.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"NSDictionary+Category.h"
;
sourceTree
=
"<group>"
;
};
19D20B8A1D1BC11000BF7FE2
/* NSDictionary+Category.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"NSDictionary+Category.m"
;
sourceTree
=
"<group>"
;
};
1B0B22845F5CD40B5CF655F2
/* Pods.debug.xcconfig */
=
{
isa
=
PBXFileReference
;
includeInIndex
=
1
;
lastKnownFileType
=
text.xcconfig
;
name
=
Pods.debug.xcconfig
;
path
=
"Pods/Target Support Files/Pods/Pods.debug.xcconfig"
;
sourceTree
=
"<group>"
;
};
300DD9481B184B450080EE12
/* ICRPatrolPlan.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ICRPatrolPlan.h
;
sourceTree
=
"<group>"
;
};
300DD9491B184B450080EE12
/* ICRPatrolPlan.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ICRPatrolPlan.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2238,6 +2241,8 @@
C14BE30D1ADB86DB0049F1AA
/* NSData+EncodeAdditions.m */
,
C123A8F11B251284003C0C36
/* UIScrollView+Content.h */
,
C123A8F21B251284003C0C36
/* UIScrollView+Content.m */
,
19D20B891D1BC11000BF7FE2
/* NSDictionary+Category.h */
,
19D20B8A1D1BC11000BF7FE2
/* NSDictionary+Category.m */
,
);
path
=
Categories
;
sourceTree
=
"<group>"
;
...
...
@@ -3095,6 +3100,7 @@
72B3C0C61B9D3C7300025D81
/* Transport.m in Sources */
,
C12C24D11B0BA3C700E1FEBF
/* ICRTaskHandleViewController.m in Sources */
,
72B3C0CD1B9D3FDD00025D81
/* CostCell.m in Sources */
,
19D20B8B1D1BC11000BF7FE2
/* NSDictionary+Category.m in Sources */
,
35CF33781B953F07001211EF
/* GXFProcessBill.m in Sources */
,
047C7E431BA9DF1800051DE7
/* NoticeDetailCell.m in Sources */
,
FE7155D91B7B328400595B0A
/* Product.m in Sources */
,
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
3e43ba17
...
...
@@ -388,6 +388,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
/**
* 保存并提交转运单
*/
-
(
void
)
saveAndSubmitTransferWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//2.获取转运单列表
-
(
void
)
queryTransferWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
3e43ba17
...
...
@@ -17,6 +17,7 @@
#import "ICRAttachment.h"
#import "ICRAnnouncement.h"
#import "ICRStoreResult.h"
#import "NSDictionary+Category.h"
#define MAX_CONCURRENCY_UPLOAD 1
#define MAX_CONCURRENCY_DOWNLOAD 3
...
...
@@ -126,6 +127,7 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
XFFHttp_QueryTransfer
,
XFFHTTP_TransferSave
,
XFFHTTP_TransferSaveAndSubmit
,
XFFHttp_GetTransferDetail
,
XFFHttp_EndTransfer
,
XFFHttp_AbortTransfer
,
...
...
@@ -246,6 +248,7 @@ static NSString * const ICRHTTPInterface[] = {
//转运单
[
XFFHTTP_TransferSave
]
=
@"transfer/save_transfer"
,
[
XFFHTTP_TransferSaveAndSubmit
]
=
@"transfer/saveandsubmit_transfer"
,
[
XFFHttp_QueryTransfer
]
=
@"transfer/query_transfer"
,
[
XFFHttp_GetTransferDetail
]
=
@"transfer/get_transfer"
,
[
XFFHttp_EndTransfer
]
=
@"transfer/finish"
,
...
...
@@ -2877,6 +2880,9 @@ acceptTypeJson:YES
failure
:
failure
];
}
#pragma mark - 添加转运单
/**
* 保存转运单
*/
-
(
void
)
saveTransferWithData
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
...
...
@@ -2913,6 +2919,44 @@ acceptTypeJson:YES
failure
:
failure
];
}
/**
* 保存并提交转运单
*/
-
(
void
)
saveAndSubmitTransferWithData
:
(
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_TransferSaveAndSubmit
]
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
];
}
#pragma mark - 获取转运单详情
-
(
void
)
getTransferResultWithTransferUuid
:
(
NSString
*
)
transferUuid
...
...
@@ -2929,6 +2973,8 @@ acceptTypeJson:YES
CLog
(
@"%@"
,
responseObject
);
if
(
succ
)
{
succ
(
responseObject
);
NSString
*
string
=
[
responseObject
JSONString
];
CLog
(
@"%@"
,
string
);
}
};
void
(
^
failure
)(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
=
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
...
...
XFFruit/General/Categories/NSDictionary+Category.h
0 → 100644
View file @
3e43ba17
//
// NSDictionary+Category.h
// ALand
//
// Created by Z on 16/3/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
NSDictionary
(
Category
)
/**
* 字典转换为json字符串
*
* @return
*/
-
(
NSString
*
)
JSONString
;
@end
XFFruit/General/Categories/NSDictionary+Category.m
0 → 100644
View file @
3e43ba17
//
// NSDictionary+Category.m
// ALand
//
// Created by Z on 16/3/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import "NSDictionary+Category.h"
@implementation
NSDictionary
(
Category
)
-
(
NSString
*
)
JSONString
{
NSError
*
parseError
=
nil
;
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
self
options
:
NSJSONWritingPrettyPrinted
error
:&
parseError
];
return
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
}
@end
XFFruit/ViewControllers/Transfer/Controllers/NewTransferViewController.m
View file @
3e43ba17
...
...
@@ -135,7 +135,7 @@ typedef enum : NSUInteger {
{
if
([
self
checkTransfer
])
{
self
.
state
=
TRANSFER_STATE_INITIAL
;
[
self
getDataFromServer
:
TRANSFER_STATE_INITIAL
msg
:
@"正在保存..."
];
[
self
getDataFromServer
:
TRANSFER_STATE_INITIAL
msg
:
@"正在保存..."
isSubmit
:
NO
];
}
}
break
;
...
...
@@ -151,7 +151,7 @@ typedef enum : NSUInteger {
break
;
}
}
-
(
void
)
getDataFromServer
:
(
NSString
*
)
state
msg
:
(
NSString
*
)
msg
{
-
(
void
)
getDataFromServer
:
(
NSString
*
)
state
msg
:
(
NSString
*
)
msg
isSubmit
:
(
BOOL
)
isSubmit
{
//保存
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
...
...
@@ -222,7 +222,11 @@ typedef enum : NSUInteger {
@"accountDetails"
:
costs
};
[
IBTLoadingView
showProgressLabel
:
msg
];
[[
ICRHTTPController
sharedController
]
saveTransferWithData
:
dict
success
:
succ
failure
:
fail
];
if
(
isSubmit
)
{
[[
ICRHTTPController
sharedController
]
saveAndSubmitTransferWithData
:
dict
success
:
succ
failure
:
fail
];
}
else
{
[[
ICRHTTPController
sharedController
]
saveTransferWithData
:
dict
success
:
succ
failure
:
fail
];
}
}
...
...
@@ -493,7 +497,7 @@ typedef enum : NSUInteger {
if
(
buttonIndex
==
1
)
{
//提交
self
.
state
=
TRANSFER_STATE_UNRECEIVED
;
[
self
getDataFromServer
:
TRANSFER_STATE_UNRECEIVED
msg
:
@"正在提交..."
];
[
self
getDataFromServer
:
TRANSFER_STATE_UNRECEIVED
msg
:
@"正在提交..."
isSubmit
:
YES
];
}
}
...
...
XFFruit/ViewControllers/Transfer/Controllers/TransferProductViewController.m
View file @
3e43ba17
...
...
@@ -53,7 +53,7 @@
NSArray
*
arr
=
@[
@"商品"
,
@"单价"
,
@"包装数量"
];
HeaderCell
*
headCell
=
[[
HeaderCell
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
38
)
withArr
:
arr
withHiddenEdit
:
self
.
isHiddenEdit
];
HeaderCell
*
headCell
=
[[
HeaderCell
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
38
)
withArr
:
arr
withHiddenEdit
:
self
.
isHiddenEdit
];
[
self
.
view
addSubview
:
headCell
];
headCell
.
delegate
=
self
;
self
.
tableView
.
tableHeaderView
=
headCell
;
...
...
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.h
View file @
3e43ba17
...
...
@@ -16,6 +16,7 @@
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
priceLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
countLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
transferedCount
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
@property
(
nonatomic
,
strong
)
UIView
*
showView
;
...
...
XFFruit/ViewControllers/Transfer/Views/TransferProductCell.m
View file @
3e43ba17
...
...
@@ -31,7 +31,7 @@
-
(
void
)
bulidLayout
{
CGFloat
headWidth
=
(
ScreenSize
.
width
-
LeftWidth
*
2
-
SpaceMargin
*
(
3
-
1
))
/
3
;
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"
];
...
...
@@ -146,7 +146,8 @@
self
.
titleLabel
.
text
=
pdtDetail
.
productName
;
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f元"
,[
pdtDetail
.
price
floatValue
]];
self
.
countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
pdtDetail
.
qty
stringValue
],
pdtDetail
.
unit
];
self
.
showNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"商品:%@[%@]"
,
pdtDetail
.
productName
,
pdtDetail
.
productCode
];
//已转运
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
];
...
...
XFFruit/ViewControllers/Transport/Controllers/TransportPurchaseViewController.m
View file @
3e43ba17
...
...
@@ -137,6 +137,8 @@
detail
.
productName
=
arrDict
[
@"product_name"
];
detail
.
price
=
arrDict
[
@"basePrice"
];
detail
.
packprice
=
arrDict
[
@"price"
];
detail
.
transferBaseQty
=
arrDict
[
@"shippedBaseQty"
];
detail
.
transferQty
=
arrDict
[
@"shippedQty"
];
detail
.
note
=
arrDict
[
@"remark"
]
!=
[
NSNull
null
]
?
arrDict
[
@"remark"
]
:
@"无"
;
[
transArr
addObject
:
detail
];
}
...
...
XFFruit/ViewControllers/Transport/Views/TransportPurductCell.m
View file @
3e43ba17
...
...
@@ -181,8 +181,8 @@
self
.
titleLabel
.
text
=
pdtDetail
.
productName
;
self
.
priceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f元"
,[
pdtDetail
.
price
floatValue
]];
self
.
countLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
pdtDetail
.
qty
stringValue
],
pdtDetail
.
unit
];
self
.
shippedQtyLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
pdtDetail
.
transfer
BaseQty
?
[
pdtDetail
.
transferBase
Qty
stringValue
]:
@"0"
,
pdtDetail
.
unit
];
self
.
shippedQtyLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
pdtDetail
.
transfer
Qty
!=
nil
&&
!
[
pdtDetail
.
transferQty
isKindOfClass
:[
NSNull
class
]]?
[
pdtDetail
.
transfer
Qty
stringValue
]:
@"0"
,
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
];
...
...
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