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
3141ab0e
Commit
3141ab0e
authored
Jun 16, 2017
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发运单只能整单添加商品、添加后不允许修改
parent
bc0c36fd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
31 deletions
+56
-31
Info.plist
XFFruit/Info.plist
+2
-2
ShopDetaileViewController.h
...trollers/PurchaseNotice/Views/ShopDetaileViewController.h
+12
-2
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+15
-5
NewTransportViewController.m
...ollers/Transport/Controllers/NewTransportViewController.m
+15
-0
TransportPurchaseCell.m
...t/ViewControllers/Transport/Views/TransportPurchaseCell.m
+12
-22
No files found.
XFFruit/Info.plist
View file @
3141ab0e
...
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.2
3
<
/string
>
<
string
>
1.2.2
4
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.2.2
3
<
/string
>
<
string
>
1.2.2
4
<
/string
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.h
View file @
3141ab0e
...
...
@@ -9,12 +9,22 @@
#import "ICRBaseViewController.h"
#import "Survey.h"
#import "ShopDetail.h"
/**
* 从哪个模块进入
*/
typedef
NS_ENUM
(
NSInteger
,
ShopDetailInterType
)
{
/**
* 发运单
*/
ShopDetailInterTypeTransport
=
1
,
/**
* 采购单
*/
ShopDetailInterTypePurchase
,
/**
* 转运单
*/
ShopDetailInterTypeTranfer
};
typedef
void
(
^
ChoseShopDetail
)(
ShopDetail
*
shopDetail
);
@interface
ShopDetaileViewController
:
ICRBaseViewController
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
3141ab0e
...
...
@@ -103,11 +103,18 @@ typedef enum : NSUInteger {
UIView
*
footView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
50
)];
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
];
[
footView
addSubview
:
saveBtn
];
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
)
{
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
];
[
footView
addSubview
:
saveBtn
];
UIButton
*
commitBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
saveBtn
.
frame
.
origin
.
x
+
saveBtn
.
frame
.
size
.
width
+
LeftMargin
,
10
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
BtnHeight
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
CommitTag
image
:
nil
title
:
@"保存"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
CornerRadius
bgColor
:
GXF_COMMIT_COLOR
];
[
footView
addSubview
:
commitBtn
];
}
UIButton
*
commitBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
saveBtn
.
frame
.
origin
.
x
+
saveBtn
.
frame
.
size
.
width
+
LeftMargin
,
10
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
BtnHeight
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
CommitTag
image
:
nil
title
:
@"保存"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
CornerRadius
bgColor
:
GXF_COMMIT_COLOR
];
[
footView
addSubview
:
commitBtn
];
_tableView
.
tableFooterView
=
footView
;
[
self
.
view
addSubview
:
_tableView
];
...
...
@@ -186,7 +193,6 @@ typedef enum : NSUInteger {
//只有发运单才需要差库存
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
)
{
__weak
ShopDetaileViewController
*
weakSelf
=
self
;
[
self
stockValidWithBillNumber
:
self
.
shopDetail
.
sourceBillNumber
complete
:
^
{
...
...
@@ -365,6 +371,10 @@ typedef enum : NSUInteger {
[
self
createViewInCell
:
cell
indexPath
:
indexPath
];
}
[
cell
setTitleStr
:
_dataArr
[
indexPath
.
row
]];
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
){
cell
.
userInteractionEnabled
=
NO
;
}
return
cell
;
}
...
...
XFFruit/ViewControllers/Transport/Controllers/NewTransportViewController.m
View file @
3141ab0e
...
...
@@ -349,6 +349,10 @@ typedef enum : NSUInteger {
ShowMessage
(
@"司机电话不能为空"
);
return
NO
;
}
if
(
_sheetView
.
arriveDate
.
length
==
0
)
{
ShowMessage
(
@"预计到货时间不能为空"
);
return
NO
;
}
if
(
_bottomView
.
productVC
.
transportProductArr
.
count
==
0
)
{
ShowMessage
(
@"商品不能为空"
);
...
...
@@ -456,6 +460,17 @@ typedef enum : NSUInteger {
TransportPdtDetail
*
tdetail
=
[
self
coverTransportPdtDetail
:
Detail
];
if
(
Detail
.
IsDeleted
)
{
[
_bottomView
refreshDelProduct
:
tdetail
tag
:
indexTag
];
//清空缓存,重新
[
self
.
dicProduct
removeAllObjects
];
for
(
TransportPdtDetail
*
pdtDetail
in
_bottomView
.
productVC
.
transportProductArr
)
{
NSMutableArray
*
arrProduct
=
[
self
.
dicProduct
objectForKey
:
pdtDetail
.
purchasebillnumber
];
if
(
!
arrProduct
)
{
arrProduct
=
[
NSMutableArray
array
];
[
self
.
dicProduct
setObject
:
arrProduct
forKey
:
pdtDetail
.
purchasebillnumber
];
}
[
arrProduct
addObject
:
pdtDetail
];
}
}
else
{
[
_bottomView
refreshEditProduct
:
tdetail
tag
:
indexTag
];
}
...
...
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.m
View file @
3141ab0e
...
...
@@ -160,28 +160,18 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
TransportPurductCell
*
cell
=
(
TransportPurductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
TransportPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
if
(
!
[
self
isHaveIndexPath
:
billProduct
])
{
cell
.
editBtn
.
hidden
=
NO
;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
// cell.lineLabel.y = ShowHeight + TableHeight -1;
// cell.showView.height = ShowHeight;
// cell.backgroundColor = [UIColor whiteColor];
[
self
.
selectArr
addObject
:
billProduct
];
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"add"}];
}
else
{
[
self
.
selectArr
removeObject
:
billProduct
];
cell
.
editBtn
.
hidden
=
YES
;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowright"];
// cell.lineLabel.y = TableHeight -1;
// cell.showView.height = 0;
// cell.backgroundColor = [UIColor whiteColor];
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"remove"}];
}
self
.
headCell
.
checkBox
.
isSelected
=
self
.
selectArr
.
count
==
self
.
secondArr
.
count
;
[
self
.
secondTable
reloadData
];
// TransportPurductCell *cell = (TransportPurductCell *)[tableView cellForRowAtIndexPath:indexPath];
// TransportPdtDetail * billProduct = self.secondArr[indexPath.row];
// if (![self isHaveIndexPath:billProduct]) {
// cell.editBtn.hidden = NO;
// [self.selectArr addObject:billProduct];
//
// }else{
// [self.selectArr removeObject:billProduct];
// cell.editBtn.hidden = YES;
// }
// self.headCell.checkBox.isSelected = self.selectArr.count == self.secondArr.count;
// [self.secondTable reloadData];
}
-
(
BOOL
)
isHaveIndexPath
:
(
TransportPdtDetail
*
)
billProduct
{
for
(
TransportPdtDetail
*
detail
in
self
.
selectArr
)
{
...
...
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