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
8 years ago
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发运单只能整单添加商品、添加后不允许修改
parent
bc0c36fd
master
No related merge requests found
Show 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 @@
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
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
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
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
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.h
View file @
3141ab0e
...
@@ -9,12 +9,22 @@
...
@@ -9,12 +9,22 @@
#import "ICRBaseViewController.h"
#import "ICRBaseViewController.h"
#import "Survey.h"
#import "Survey.h"
#import "ShopDetail.h"
#import "ShopDetail.h"
/**
* 从哪个模块进入
*/
typedef
NS_ENUM
(
NSInteger
,
ShopDetailInterType
)
{
typedef
NS_ENUM
(
NSInteger
,
ShopDetailInterType
)
{
/**
* 发运单
*/
ShopDetailInterTypeTransport
=
1
,
ShopDetailInterTypeTransport
=
1
,
/**
* 采购单
*/
ShopDetailInterTypePurchase
,
ShopDetailInterTypePurchase
,
/**
* 转运单
*/
ShopDetailInterTypeTranfer
ShopDetailInterTypeTranfer
};
};
typedef
void
(
^
ChoseShopDetail
)(
ShopDetail
*
shopDetail
);
typedef
void
(
^
ChoseShopDetail
)(
ShopDetail
*
shopDetail
);
@interface
ShopDetaileViewController
:
ICRBaseViewController
@interface
ShopDetaileViewController
:
ICRBaseViewController
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
3141ab0e
...
@@ -103,11 +103,18 @@ typedef enum : NSUInteger {
...
@@ -103,11 +103,18 @@ typedef enum : NSUInteger {
UIView
*
footView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
50
)];
UIView
*
footView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
50
)];
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
];
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
];
[
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
];
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
];
[
footView
addSubview
:
commitBtn
];
}
_tableView
.
tableFooterView
=
footView
;
_tableView
.
tableFooterView
=
footView
;
[
self
.
view
addSubview
:
_tableView
];
[
self
.
view
addSubview
:
_tableView
];
...
@@ -186,7 +193,6 @@ typedef enum : NSUInteger {
...
@@ -186,7 +193,6 @@ typedef enum : NSUInteger {
//只有发运单才需要差库存
//只有发运单才需要差库存
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
)
{
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
)
{
__weak
ShopDetaileViewController
*
weakSelf
=
self
;
__weak
ShopDetaileViewController
*
weakSelf
=
self
;
[
self
stockValidWithBillNumber
:
self
.
shopDetail
.
sourceBillNumber
complete
:
^
{
[
self
stockValidWithBillNumber
:
self
.
shopDetail
.
sourceBillNumber
complete
:
^
{
...
@@ -365,6 +371,10 @@ typedef enum : NSUInteger {
...
@@ -365,6 +371,10 @@ typedef enum : NSUInteger {
[
self
createViewInCell
:
cell
indexPath
:
indexPath
];
[
self
createViewInCell
:
cell
indexPath
:
indexPath
];
}
}
[
cell
setTitleStr
:
_dataArr
[
indexPath
.
row
]];
[
cell
setTitleStr
:
_dataArr
[
indexPath
.
row
]];
if
(
self
.
intertype
==
ShopDetailInterTypeTransport
){
cell
.
userInteractionEnabled
=
NO
;
}
return
cell
;
return
cell
;
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/NewTransportViewController.m
View file @
3141ab0e
...
@@ -349,6 +349,10 @@ typedef enum : NSUInteger {
...
@@ -349,6 +349,10 @@ typedef enum : NSUInteger {
ShowMessage
(
@"司机电话不能为空"
);
ShowMessage
(
@"司机电话不能为空"
);
return
NO
;
return
NO
;
}
}
if
(
_sheetView
.
arriveDate
.
length
==
0
)
{
ShowMessage
(
@"预计到货时间不能为空"
);
return
NO
;
}
if
(
_bottomView
.
productVC
.
transportProductArr
.
count
==
0
)
{
if
(
_bottomView
.
productVC
.
transportProductArr
.
count
==
0
)
{
ShowMessage
(
@"商品不能为空"
);
ShowMessage
(
@"商品不能为空"
);
...
@@ -456,6 +460,17 @@ typedef enum : NSUInteger {
...
@@ -456,6 +460,17 @@ typedef enum : NSUInteger {
TransportPdtDetail
*
tdetail
=
[
self
coverTransportPdtDetail
:
Detail
];
TransportPdtDetail
*
tdetail
=
[
self
coverTransportPdtDetail
:
Detail
];
if
(
Detail
.
IsDeleted
)
{
if
(
Detail
.
IsDeleted
)
{
[
_bottomView
refreshDelProduct
:
tdetail
tag
:
indexTag
];
[
_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
{
}
else
{
[
_bottomView
refreshEditProduct
:
tdetail
tag
:
indexTag
];
[
_bottomView
refreshEditProduct
:
tdetail
tag
:
indexTag
];
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.m
View file @
3141ab0e
...
@@ -160,28 +160,18 @@
...
@@ -160,28 +160,18 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
TransportPurductCell
*
cell
=
(
TransportPurductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
// TransportPurductCell *cell = (TransportPurductCell *)[tableView cellForRowAtIndexPath:indexPath];
TransportPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
// TransportPdtDetail * billProduct = self.secondArr[indexPath.row];
if
(
!
[
self
isHaveIndexPath
:
billProduct
])
{
// if (![self isHaveIndexPath:billProduct]) {
cell
.
editBtn
.
hidden
=
NO
;
// cell.editBtn.hidden = NO;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
// [self.selectArr addObject:billProduct];
// cell.lineLabel.y = ShowHeight + TableHeight -1;
//
// cell.showView.height = ShowHeight;
// }else{
// cell.backgroundColor = [UIColor whiteColor];
// [self.selectArr removeObject:billProduct];
// cell.editBtn.hidden = YES;
[
self
.
selectArr
addObject
:
billProduct
];
// }
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"add"}];
// self.headCell.checkBox.isSelected = self.selectArr.count == self.secondArr.count;
}
else
{
// [self.secondTable reloadData];
[
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
];
}
}
-
(
BOOL
)
isHaveIndexPath
:
(
TransportPdtDetail
*
)
billProduct
{
-
(
BOOL
)
isHaveIndexPath
:
(
TransportPdtDetail
*
)
billProduct
{
for
(
TransportPdtDetail
*
detail
in
self
.
selectArr
)
{
for
(
TransportPdtDetail
*
detail
in
self
.
selectArr
)
{
...
...
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