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
b10258bc
Commit
b10258bc
authored
7 years ago
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转运单选择采购单商品时不检查库存
parent
8d332eb7
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
79 additions
and
17 deletions
+79
-17
Info.plist
XFFruit/Info.plist
+2
-2
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+1
-5
TransferDetailViewController.h
...llers/Transfer/Controllers/TransferDetailViewController.h
+1
-0
TransferDetailViewController.m
...llers/Transfer/Controllers/TransferDetailViewController.m
+1
-1
TransferViewController.m
...Controllers/Transfer/Controllers/TransferViewController.m
+10
-4
NewTransportViewController.m
...ollers/Transport/Controllers/NewTransportViewController.m
+2
-1
TransportPurchaseViewController.m
...s/Transport/Controllers/TransportPurchaseViewController.m
+39
-0
TransportPdtDetail.h
...uit/ViewControllers/Transport/Models/TransportPdtDetail.h
+1
-0
TransportPurchaseCell.h
...t/ViewControllers/Transport/Views/TransportPurchaseCell.h
+1
-1
TransportPurchaseCell.m
...t/ViewControllers/Transport/Views/TransportPurchaseCell.m
+21
-3
No files found.
XFFruit/Info.plist
View file @
b10258bc
...
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.
28
<
/string
>
<
string
>
1.2.
32
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.2.
28
<
/string
>
<
string
>
1.2.
32
<
/string
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
b10258bc
...
...
@@ -105,10 +105,6 @@ typedef enum : NSUInteger {
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
)
{
}
else
if
(
self
.
intertype
==
ShopDetailInterTypeTranfer
){
UIButton
*
saveBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
LeftMargin
,
10
,
(
ScreenSize
.
width
-
LeftMargin
*
2
),
BtnHeight
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
SaveTag
image
:
nil
title
:
@"删除"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
CornerRadius
bgColor
:
GXF_SAVE_COLOR
];
[
footView
addSubview
:
saveBtn
];
}
else
{
UIButton
*
saveBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
LeftMargin
,
10
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
BtnHeight
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
SaveTag
image
:
nil
title
:
@"删除"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
CornerRadius
bgColor
:
GXF_SAVE_COLOR
];
...
...
@@ -375,7 +371,7 @@ typedef enum : NSUInteger {
}
[
cell
setTitleStr
:
_dataArr
[
indexPath
.
row
]];
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
||
self
.
intertype
==
ShopDetailInterTypeTranfer
){
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
){
cell
.
userInteractionEnabled
=
NO
;
}
return
cell
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Controllers/TransferDetailViewController.h
View file @
b10258bc
...
...
@@ -10,4 +10,5 @@
#import "Transfer.h"
@interface
TransferDetailViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
Transfer
*
transfer
;
@property
(
assign
,
nonatomic
)
BOOL
isWms
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Controllers/TransferDetailViewController.m
View file @
b10258bc
...
...
@@ -219,7 +219,7 @@ typedef enum : NSUInteger {
_scrollView
.
backgroundColor
=
XXFBgColor
;
[
self
.
view
addSubview
:
_scrollView
];
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_RECEIVED
]
||
[
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_UNRECEIVED
])
{
//已收货 //待收货
if
([
IBTCommon
checkIsPermission
:
TRANSFER_ACTION_ABORT
])
{
if
([
IBTCommon
checkIsPermission
:
TRANSFER_ACTION_ABORT
]
&&
!
self
.
isWms
)
{
[
self
createBtnWithArr
:@[
@"作废"
]];
}
else
{
[
self
hiddenBottomView
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transfer/Controllers/TransferViewController.m
View file @
b10258bc
...
...
@@ -442,16 +442,22 @@ typedef enum : NSUInteger {
if
(
_dataArr
.
count
>
0
)
{
Transfer
*
transfer
=
_dataArr
[
indexPath
.
row
];
if
([
transfer
.
state
isEqualToString
:
TRANSPORT_STATE_INITIAL
]
)
{
NewTransferViewController
*
nvc
=
[
NewTransferViewController
new
];
nvc
.
transfer
=
transfer
;
nvc
.
title
=
@"修改转运单"
;
[
self
PushViewController
:
nvc
animated
:
YES
];
}
else
{
[
IBTLoadingView
showProgressLabel
:
@""
];
[
HTTP
isWmsWarehouse
:
transfer
.
rwarehouseUuid
success
:
^
(
id
succ
)
{
[
IBTLoadingView
hideHUDWithText
:
@""
];
TransferDetailViewController
*
pvc
=
[
TransferDetailViewController
new
];
pvc
.
title
=
@"查看转运单"
;
pvc
.
transfer
=
transfer
;
pvc
.
isWms
=
[
succ
[
@"data"
]
boolValue
];
[
self
PushViewController
:
pvc
animated
:
YES
];
}
failure
:
nil
];
}
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/NewTransportViewController.m
View file @
b10258bc
...
...
@@ -297,7 +297,7 @@ typedef enum : NSUInteger {
[
self
PushViewController
:
svc
animated
:
YES
];
}
}
else
{
[
IBTLoadingView
showTips
:
message
]
;
ShowMessage
(
message
)
;
}
}
};
...
...
@@ -322,6 +322,7 @@ typedef enum : NSUInteger {
}
NSMutableArray
*
billProducts
=
[
NSMutableArray
array
];
for
(
TransportPdtDetail
*
pdtDetail
in
_bottomView
.
productVC
.
transportProductArr
)
{
pdtDetail
.
shippedFlag
=
nil
;
[
billProducts
addObject
:[
pdtDetail
dictForCommit
]];
}
NSMutableArray
*
costs
=
[
NSMutableArray
array
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/TransportPurchaseViewController.m
View file @
b10258bc
...
...
@@ -293,6 +293,7 @@ NSInteger purchaseStockCheckNumber = 0;
PurchaseBill
*
bill
=
_dataArr
[
indexPath
.
row
];
[
cell
setPurchaseBill
:
bill
selectArr
:
self
.
indexArr
];
}
cell
.
isTransportIn
=
self
.
isTransportIn
;
return
cell
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
@@ -326,6 +327,44 @@ NSInteger purchaseStockCheckNumber = 0;
ShowMessage
(
@"请选择商品!"
);
return
;
}
if
(
!
self
.
isTransportIn
)
{
//库存足够时,把临时数据放入正式的缓存数据中
for
(
NSString
*
key
in
dicProduct
.
allKeys
)
{
NSMutableArray
*
arrTemp
=
[
dicProduct
objectForKey
:
key
];
NSMutableArray
*
arrData
=
[
self
.
dicProduct
objectForKey
:
key
];
if
(
!
arrData
)
{
arrData
=
[
NSMutableArray
array
];
[
self
.
dicProduct
setObject
:
arrData
forKey
:
key
];
}
[
arrData
addObjectsFromArray
:
arrTemp
];
}
[
self
PopViewControllerAnimated
:
YES
];
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
for
(
TransportPdtDetail
*
detail
in
self
.
indexArr
)
{
detail
.
purchasePdtDetail
=
detail
.
uuid
;
detail
.
uuid
=
nil
;
[
arr
addObject
:
detail
];
}
if
(
self
.
getProchaseProduct
)
{
self
.
getProchaseProduct
(
arr
);
}
for
(
PurchaseBill
*
bill
in
self
.
dataArr
)
{
if
([
array
containsObject
:
bill
.
billNumber
])
{
if
(
self
.
blockFirstWarehouse
)
{
self
.
blockFirstWarehouse
(@[
bill
]);
}
break
;
}
}
return
;
}
//******************发运单要检查库存**********************
__weak
TransportPurchaseViewController
*
weakSelf
=
self
;
//判断数量问题
[
IBTLoadingView
showProgressLabel
:
@""
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Models/TransportPdtDetail.h
View file @
b10258bc
...
...
@@ -27,6 +27,7 @@
@property
(
nonatomic
,
strong
)
NSNumber
*
transferBaseQty
;
//已转运基础数量
@property
(
nonatomic
,
strong
)
NSNumber
*
transferQty
;
//已转运数量
@property
(
nonatomic
,
strong
)
NSString
*
note
;
//备注
@property
(
strong
,
nonatomic
)
NSNumber
*
shippedFlag
;
//新增手机和车辆信息
@property
(
nonatomic
,
strong
)
NSString
*
carphone
;
//司机电话
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.h
View file @
b10258bc
...
...
@@ -23,7 +23,7 @@
@property
(
nonatomic
,
strong
)
NSMutableArray
*
indexArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectArr
;
/** 是否发运单进入 */
@property
(
assign
,
nonatomic
)
BOOL
is
Purchase
In
;
@property
(
assign
,
nonatomic
)
BOOL
is
Transport
In
;
-
(
void
)
setPurchaseBill
:(
PurchaseBill
*
)
bill
selectArr
:(
NSMutableArray
*
)
selectArr
;
-
(
void
)
setTransPort
:(
Transport
*
)
bill
selectArr
:(
NSMutableArray
*
)
selectArr
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.m
View file @
b10258bc
...
...
@@ -62,9 +62,20 @@
__weak
TransportPurchaseCell
*
weakSelf
=
self
;
self
.
headCell
=
[[
HeaderCell
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
38
)
WithCheckBoxArr
:
arr
checkBox
:^
(
BOOL
isSelect
)
{
// [weakSelf.selectArr removeAllObjects];
if
(
isSelect
)
{
[
weakSelf
.
selectArr
removeAllObjects
];
for
(
TransportPdtDetail
*
pdt
in
weakSelf
.
secondArr
)
{
if
(
pdt
.
shippedFlag
.
boolValue
)
{
NSString
*
msg
=
[
NSString
stringWithFormat
:
@"商品[%@]已被转运或者发运!"
,
pdt
.
productName
];
ShowMessage
(
msg
);
weakSelf
.
headCell
.
checkBox
.
isSelected
=
NO
;
return
;
}
}
[
weakSelf
.
selectArr
addObjectsFromArray
:
weakSelf
.
secondArr
];
}
else
{
[
weakSelf
.
selectArr
removeObjectsInArray
:
weakSelf
.
secondArr
];
}
...
...
@@ -162,9 +173,16 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
!
self
.
isPurchaseIn
)
{
TransportPurductCell
*
cell
=
(
TransportPurductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
//如果不是发运单,则可以单选
if
(
!
self
.
isTransportIn
)
{
TransportPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
if
(
billProduct
.
shippedFlag
.
boolValue
)
{
ShowMessage
(
@"该商品已经被转运或发运!"
);
return
;
}
TransportPurductCell
*
cell
=
(
TransportPurductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
if
(
!
[
self
isHaveIndexPath
:
billProduct
])
{
cell
.
editBtn
.
hidden
=
NO
;
[
self
.
selectArr
addObject
:
billProduct
];
...
...
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