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
ebaef158
Commit
ebaef158
authored
Sep 09, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购单细节
parent
0702ff8d
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
175 additions
and
73 deletions
+175
-73
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+0
-8
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+63
-18
ProductBillViewController.m
...trollers/Purchase/Controllers/ProductBillViewController.m
+21
-21
PurchaseViewController.m
...Controllers/Purchase/Controllers/PurchaseViewController.m
+1
-0
ShopDetail.h
XFFruit/ViewControllers/PurchaseNotice/Models/ShopDetail.h
+1
-0
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+7
-3
CostViewController.m
...iewControllers/Transport/Controllers/CostViewController.m
+0
-1
NewTransportViewController.m
...ollers/Transport/Controllers/NewTransportViewController.m
+60
-16
TransportProductViewController.m
...rs/Transport/Controllers/TransportProductViewController.m
+5
-4
BottomTransportView.h
...uit/ViewControllers/Transport/Views/BottomTransportView.h
+7
-2
BottomTransportView.m
...uit/ViewControllers/Transport/Views/BottomTransportView.m
+10
-0
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
ebaef158
...
...
@@ -75,7 +75,6 @@
35C3C0BC1AE959B80035AC8A
/* ICRNavigationViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
35C3C0BB1AE959B80035AC8A
/* ICRNavigationViewController.xib */
;
};
35C3C0BF1AE95F1D0035AC8A
/* UIImage+Rotate.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
35C3C0BE1AE95F1D0035AC8A
/* UIImage+Rotate.m */
;
};
35CF33781B953F07001211EF
/* GXFProcessBill.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
35CF33771B953F07001211EF
/* GXFProcessBill.m */
;
};
35CF337B1B953F9A001211EF
/* GXFProcessMaterial.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
35CF337A1B953F9A001211EF
/* GXFProcessMaterial.m */
;
};
35CF337E1B953FFF001211EF
/* GXFProcessProduct.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
35CF337D1B953FFF001211EF
/* GXFProcessProduct.m */
;
};
35CF33811B9542BE001211EF
/* GXFNewProcessViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
35CF33801B9542BE001211EF
/* GXFNewProcessViewController.m */
;
};
35CF33841B954F35001211EF
/* GXFTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
35CF33831B954F35001211EF
/* GXFTableViewCell.m */
;
};
...
...
@@ -544,8 +543,6 @@
35C3C0BE1AE95F1D0035AC8A
/* UIImage+Rotate.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIImage+Rotate.m"
;
sourceTree
=
"<group>"
;
};
35CF33761B953F07001211EF
/* GXFProcessBill.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
GXFProcessBill.h
;
path
=
../Views/GXFProcessBill.h
;
sourceTree
=
"<group>"
;
};
35CF33771B953F07001211EF
/* GXFProcessBill.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
GXFProcessBill.m
;
path
=
../Views/GXFProcessBill.m
;
sourceTree
=
"<group>"
;
};
35CF33791B953F9A001211EF
/* GXFProcessMaterial.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
GXFProcessMaterial.h
;
path
=
../Views/GXFProcessMaterial.h
;
sourceTree
=
"<group>"
;
};
35CF337A1B953F9A001211EF
/* GXFProcessMaterial.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
GXFProcessMaterial.m
;
path
=
../Views/GXFProcessMaterial.m
;
sourceTree
=
"<group>"
;
};
35CF337C1B953FFF001211EF
/* GXFProcessProduct.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
GXFProcessProduct.h
;
path
=
../Views/GXFProcessProduct.h
;
sourceTree
=
"<group>"
;
};
35CF337D1B953FFF001211EF
/* GXFProcessProduct.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
GXFProcessProduct.m
;
path
=
../Views/GXFProcessProduct.m
;
sourceTree
=
"<group>"
;
};
35CF337F1B9542BE001211EF
/* GXFNewProcessViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GXFNewProcessViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1146,8 +1143,6 @@
children
=
(
35CF33761B953F07001211EF
/* GXFProcessBill.h */
,
35CF33771B953F07001211EF
/* GXFProcessBill.m */
,
35CF33791B953F9A001211EF
/* GXFProcessMaterial.h */
,
35CF337A1B953F9A001211EF
/* GXFProcessMaterial.m */
,
35CF337C1B953FFF001211EF
/* GXFProcessProduct.h */
,
35CF337D1B953FFF001211EF
/* GXFProcessProduct.m */
,
);
...
...
@@ -2518,7 +2513,6 @@
7217E9E91B72364300FE5C1D
/* SurveyResult.m in Sources */
,
C10214DB1AD90A3F0024637E
/* ICRFunctionBaseView.m in Sources */
,
35B448DF1B9B0A73001209E2
/* ProductBillCell.m in Sources */
,
35CF337B1B953F9A001211EF
/* GXFProcessMaterial.m in Sources */
,
30D7495F1ACE8F4400C63BA1
/* ICRConfigurationViewController.m in Sources */
,
724171721B9D30660094DF55
/* ChooseWarehouseViewController.m in Sources */
,
FE2FCC821B745E1A00BBC6FB
/* SurveyDetailViewController.m in Sources */
,
...
...
@@ -3042,7 +3036,6 @@
"$(PROJECT_DIR)"
,
);
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"cfc700e3-f78e-4893-a7fd-62daba6a0c6c"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
...
...
@@ -3064,7 +3057,6 @@
"$(PROJECT_DIR)"
,
);
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"cfc700e3-f78e-4893-a7fd-62daba6a0c6c"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
...
...
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
ebaef158
...
...
@@ -149,28 +149,39 @@ typedef enum : NSUInteger {
_purchaseView
.
total
=
[
NSNumber
numberWithFloat
:
totalPrice
+
otherPrice
];
}
-
(
void
)
addPurchaseProduct
:
(
NSNotification
*
)
fication
{
PurchaseBillProduct
*
billProduct
=
[[
fication
userInfo
]
objectForKey
:
@"purchaseBillProduct"
];
NSInteger
indexTag
=
[[[
fication
userInfo
]
objectForKey
:
@"indexTag"
]
integerValue
];
ShopDetaileViewController
*
svc
=
[[
ShopDetaileViewController
alloc
]
init
];
if
(
billProduct
)
{
ShopDetail
*
shopDetail
=
[
self
coverShopDetail
:
billProduct
];
shopDetail
.
IsXiuGai
=
YES
;
svc
.
choseShopDetail
=
^
(
ShopDetail
*
Detail
){
if
(
Detail
.
IsDeleted
)
{
[
_pvc
.
productArr
removeObjectAtIndex
:
indexTag
];
}
else
{
PurchaseBillProduct
*
billProduct
=
[
self
coverPurchaseProduct
:
Detail
];
[
_pvc
.
productArr
replaceObjectAtIndex
:
indexTag
withObject
:
billProduct
];
}
[
_pvc
.
tableView
reloadData
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
SetProductTotalPrice
object
:
nil
];
};
svc
.
shopDetail
=
shopDetail
;
}
else
{
// 回调
svc
.
choseShopDetail
=
^
(
ShopDetail
*
shopDetail
){
PurchaseBillProduct
*
billProduct
=
[[
PurchaseBillProduct
alloc
]
init
];
billProduct
.
product_uuid
=
shopDetail
.
product_uuid
;
billProduct
.
product_code
=
shopDetail
.
product_code
;
billProduct
.
product_name
=
shopDetail
.
merchandise
;
billProduct
.
qpc
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
packageSpecification
floatValue
]];
billProduct
.
unit
=
shopDetail
.
packageUnit
;
billProduct
.
qty
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
packageQuantity
floatValue
]];
billProduct
.
price
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
packageUnitPrice
floatValue
]];
billProduct
.
baseQty
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
foundationQuantity
floatValue
]];
billProduct
.
basePrice
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
foundationUnitPrice
floatValue
]];
billProduct
.
total
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
totalMoney
floatValue
]];
billProduct
.
remark
=
shopDetail
.
remark
;
billProduct
.
qpcStr
=
@"fdsfdsfdsa"
;
PurchaseBillProduct
*
billProduct
=
[
self
coverPurchaseProduct
:
shopDetail
];
[
_pvc
.
productArr
addObject
:
billProduct
];
[
_pvc
.
tableView
reloadData
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
SetProductTotalPrice
object
:
nil
];
};
}
svc
.
title
=
[
IBTCommon
localizableString
:
@"AddShopDetail"
];
[
self
PushViewController
:
svc
animated
:
YES
];
}
-
(
void
)
btnClick
:
(
UIButton
*
)
btn
{
switch
(
btn
.
tag
)
{
case
SaveTag
:
...
...
@@ -289,6 +300,40 @@ typedef enum : NSUInteger {
-
(
void
)
pushNextViewController
:
(
id
)
vc
{
[
self
PushViewController
:
vc
animated
:
YES
];
}
//两个类之间的转换
-
(
PurchaseBillProduct
*
)
coverPurchaseProduct
:
(
ShopDetail
*
)
shopDetail
{
PurchaseBillProduct
*
billProduct
=
[[
PurchaseBillProduct
alloc
]
init
];
billProduct
.
product_uuid
=
shopDetail
.
product_uuid
;
billProduct
.
product_code
=
shopDetail
.
product_code
;
billProduct
.
product_name
=
shopDetail
.
merchandise
;
billProduct
.
qpc
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
packageSpecification
floatValue
]];
billProduct
.
unit
=
shopDetail
.
packageUnit
;
billProduct
.
qty
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
packageQuantity
floatValue
]];
billProduct
.
price
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
packageUnitPrice
floatValue
]];
billProduct
.
baseQty
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
foundationQuantity
floatValue
]];
billProduct
.
basePrice
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
foundationUnitPrice
floatValue
]];
billProduct
.
total
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
totalMoney
floatValue
]];
billProduct
.
remark
=
shopDetail
.
remark
;
billProduct
.
qpcStr
=
@"fdsfdsfdsa"
;
return
billProduct
;
}
-
(
ShopDetail
*
)
coverShopDetail
:
(
PurchaseBillProduct
*
)
billProduct
{
ShopDetail
*
shopDetail
=
[[
ShopDetail
alloc
]
init
];
shopDetail
.
uuid
=
billProduct
.
uuid
;
shopDetail
.
product_uuid
=
billProduct
.
product_uuid
;
shopDetail
.
product_code
=
billProduct
.
product_code
;
shopDetail
.
merchandise
=
billProduct
.
product_name
;
shopDetail
.
packageSpecification
=
[
billProduct
.
qpc
stringValue
];
shopDetail
.
packageUnit
=
billProduct
.
unit
;
shopDetail
.
packageQuantity
=
[
billProduct
.
qty
stringValue
];
shopDetail
.
packageUnitPrice
=
[
billProduct
.
price
stringValue
];
shopDetail
.
foundationQuantity
=
[
billProduct
.
baseQty
stringValue
];
shopDetail
.
foundationUnitPrice
=
[
billProduct
.
basePrice
stringValue
];
shopDetail
.
totalMoney
=
[
billProduct
.
total
stringValue
];
shopDetail
.
remark
=
billProduct
.
remark
;
return
shopDetail
;
}
#pragma mark - 协议方法
...
...
XFFruit/ViewControllers/Purchase/Controllers/ProductBillViewController.m
View file @
ebaef158
...
...
@@ -35,21 +35,21 @@
if
(
!
self
.
productArr
)
{
self
.
productArr
=
[
NSMutableArray
array
];
}
PurchaseBillProduct
*
billProduct
=
[
PurchaseBillProduct
new
];
billProduct
.
product_name
=
@"dd"
;
billProduct
.
product_uuid
=
@"402880e64e287fe2014e28895b8a0032"
;
billProduct
.
product_code
=
@"农夫山泉"
;
billProduct
.
qpc
=
[
NSNumber
numberWithFloat
:
22
];
billProduct
.
unit
=
@"筐"
;
billProduct
.
qty
=
[
NSNumber
numberWithFloat
:
23
];
billProduct
.
price
=
[
NSNumber
numberWithFloat
:
333
];
billProduct
.
baseQty
=
[
NSNumber
numberWithFloat
:
333
];
billProduct
.
basePrice
=
[
NSNumber
numberWithFloat
:
33
];
billProduct
.
total
=
[
NSNumber
numberWithFloat
:
80
];
billProduct
.
remark
=
@"hshshshsh"
;
billProduct
.
qpcStr
=
@"fdsfdsfdsa"
;
[
self
.
productArr
addObject
:
billProduct
];
//
PurchaseBillProduct *billProduct = [PurchaseBillProduct new];
//
//
billProduct.product_name = @"dd";
//
billProduct.product_uuid = @"402880e64e287fe2014e28895b8a0032";
//
billProduct.product_code = @"农夫山泉";
//
billProduct.qpc = [NSNumber numberWithFloat:22];
//
billProduct.unit = @"筐";
//
billProduct.qty = [NSNumber numberWithFloat:23];
//
billProduct.price = [NSNumber numberWithFloat:333];
//
billProduct.baseQty = [NSNumber numberWithFloat:333];
//
billProduct.basePrice = [NSNumber numberWithFloat:33];
//
billProduct.total = [NSNumber numberWithFloat:80];
//
billProduct.remark = @"hshshshsh";
//
billProduct.qpcStr = @"fdsfdsfdsa";
//
[self.productArr addObject:billProduct];
if
(
self
.
productArr
.
count
>
0
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
SetProductTotalPrice
object
:
nil
];
}
...
...
@@ -85,7 +85,10 @@
-
(
void
)
choosePurchase
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_ChoseTransportPurchase
object
:
nil
];
}
-
(
void
)
editClick
:
(
UIButton
*
)
btn
{
PurchaseBillProduct
*
billProduct
=
self
.
productArr
[
btn
.
tag
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_AddPurchaseProduct
object
:
nil
userInfo
:
@{
@"purchaseBillProduct"
:
billProduct
,
@"indexTag"
:
@
(
btn
.
tag
)}];
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
...
...
@@ -171,10 +174,7 @@
return
TableHeight
;
}
-
(
void
)
editClick
:
(
UIButton
*
)
btn
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@""
message
:
@"哈哈"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
}
...
...
XFFruit/ViewControllers/Purchase/Controllers/PurchaseViewController.m
View file @
ebaef158
...
...
@@ -446,6 +446,7 @@ typedef enum : NSUInteger {
if
([
bill
.
state
isEqualToString
:
PURCHASE_STATE_INITIAL
]
||
[
bill
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
NewPurchaseViewController
*
nvc
=
[
NewPurchaseViewController
new
];
nvc
.
purchaseBill
=
bill
;
nvc
.
title
=
@"修改采购单"
;
[
self
PushViewController
:
nvc
animated
:
YES
];
}
else
{
PurchaseDetailViewController
*
pvc
=
[
PurchaseDetailViewController
new
];
...
...
XFFruit/ViewControllers/PurchaseNotice/Models/ShopDetail.h
View file @
ebaef158
...
...
@@ -9,6 +9,7 @@
#import "IBTModel.h"
@interface
ShopDetail
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//商品
@property
(
nonatomic
,
strong
)
NSString
*
merchandise
;
//商品
@property
(
nonatomic
,
strong
)
NSString
*
product_uuid
;
//商品
@property
(
nonatomic
,
strong
)
NSString
*
product_code
;
//商品
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
ebaef158
...
...
@@ -131,6 +131,8 @@ typedef enum : NSUInteger {
packageUnitPrice
.
text
=
self
.
shopDetail
.
packageUnitPrice
;
//包装单价
totalMoney
.
text
=
self
.
shopDetail
.
totalMoney
;
//总金额
remark
.
text
=
self
.
shopDetail
.
remark
;
self
.
productCodeStr
=
self
.
shopDetail
.
product_code
;
self
.
productUuidStr
=
self
.
shopDetail
.
product_uuid
;
_productLabel
.
textColor
=
GXF_CONTENT_COLOR
;
_PackagingLable
.
textColor
=
GXF_CONTENT_COLOR
;
}
...
...
@@ -200,7 +202,9 @@ typedef enum : NSUInteger {
_PackagingLable
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
}
-
(
BOOL
)
informationComplete
{
if
(
!
self
.
shopDetail
)
{
self
.
shopDetail
=
[[
ShopDetail
alloc
]
init
];
}
self
.
shopDetail
.
merchandise
=
merchandise
.
text
;
self
.
shopDetail
.
packageSpecification
=
packageSpecification
.
text
;
self
.
shopDetail
.
packageQuantity
=
packageQuantity
.
text
;
...
...
@@ -427,7 +431,7 @@ typedef enum : NSUInteger {
cvc
.
choseBaseInfo
=
^
(
NSArray
*
products
){
Product
*
product
=
products
[
0
];
_productLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,
product
.
name
,
product
.
code
];
merchandise
.
text
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,
product
.
name
,
product
.
code
]
;
merchandise
.
text
=
product
.
name
;
_productLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
productNameStr
=
product
.
name
;
self
.
productUuidStr
=
product
.
uuid
;
...
...
XFFruit/ViewControllers/Transport/Controllers/CostViewController.m
View file @
ebaef158
...
...
@@ -55,7 +55,6 @@
-
(
void
)
editClick
:
(
UIButton
*
)
btn
{
FeeAcountDetail
*
fee
=
self
.
costArr
[
btn
.
tag
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_AddTransportCost
object
:
nil
userInfo
:
@{
@"indexPath"
:
[
NSIndexPath
indexPathForRow
:
btn
.
tag
inSection
:
0
],
@"feeAccountDetail"
:
fee
}];
}
#pragma mark footDelegate
-
(
void
)
choosePurchase
{}
...
...
XFFruit/ViewControllers/Transport/Controllers/NewTransportViewController.m
View file @
ebaef158
...
...
@@ -292,10 +292,38 @@ typedef enum : NSUInteger {
}
-
(
void
)
addPurchaseProduct
:
(
NSNotification
*
)
fication
{
TransportPdtDetail
*
billProduct
=
[[
fication
userInfo
]
objectForKey
:
@"transportPdtDetail"
];
NSInteger
indexTag
=
[[[
fication
userInfo
]
objectForKey
:
@"indexTag"
]
integerValue
];
ShopDetaileViewController
*
svc
=
[[
ShopDetaileViewController
alloc
]
init
];
if
(
billProduct
)
{
ShopDetail
*
shopDetail
=
[
self
coverShopDetail
:
billProduct
];
shopDetail
.
IsXiuGai
=
YES
;
svc
.
choseShopDetail
=
^
(
ShopDetail
*
Detail
){
TransportPdtDetail
*
tdetail
=
[
self
coverTransportPdtDetail
:
Detail
];
if
(
Detail
.
IsDeleted
)
{
[
_bottomView
refreshDelProduct
:
tdetail
tag
:
indexTag
];
}
else
{
[
_bottomView
refreshEditProduct
:
tdetail
tag
:
indexTag
];
}
};
svc
.
shopDetail
=
shopDetail
;
}
else
{
// 回调
svc
.
choseShopDetail
=
^
(
ShopDetail
*
shopDetail
){
TransportPdtDetail
*
tdetail
=
[
self
coverTransportPdtDetail
:
shopDetail
];
[
_bottomView
refreshProduct
:
tdetail
];
};
}
svc
.
title
=
[
IBTCommon
localizableString
:
@"AddShopDetail"
];
[
self
PushViewController
:
svc
animated
:
YES
];
}
-
(
TransportPdtDetail
*
)
coverTransportPdtDetail
:
(
ShopDetail
*
)
shopDetail
{
TransportPdtDetail
*
billProduct
=
[[
TransportPdtDetail
alloc
]
init
];
billProduct
.
uuid
=
shopDetail
.
uuid
;
billProduct
.
productUuid
=
shopDetail
.
product_uuid
;
billProduct
.
productCode
=
shopDetail
.
product_code
;
billProduct
.
productName
=
shopDetail
.
merchandise
;
...
...
@@ -307,12 +335,28 @@ typedef enum : NSUInteger {
billProduct
.
total
=
[
NSNumber
numberWithFloat
:[
shopDetail
.
totalMoney
floatValue
]];
billProduct
.
note
=
shopDetail
.
remark
;
billProduct
.
qpcStr
=
@"fdsfdsfdsa"
;
[
_bottomView
refreshProduct
:
billProduct
];
};
svc
.
title
=
[
IBTCommon
localizableString
:
@"AddShopDetail"
];
[
self
PushViewController
:
svc
animated
:
YES
];
return
billProduct
;
}
-
(
ShopDetail
*
)
coverShopDetail
:
(
TransportPdtDetail
*
)
billProduct
{
ShopDetail
*
shopDetail
=
[[
ShopDetail
alloc
]
init
];
shopDetail
.
uuid
=
billProduct
.
uuid
;
shopDetail
.
product_uuid
=
billProduct
.
productUuid
;
shopDetail
.
product_code
=
billProduct
.
productCode
;
shopDetail
.
merchandise
=
billProduct
.
productName
;
shopDetail
.
packageSpecification
=
[
billProduct
.
qpc
stringValue
];
shopDetail
.
packageUnit
=
billProduct
.
unit
;
shopDetail
.
packageQuantity
=
[
billProduct
.
qty
stringValue
];
shopDetail
.
packageUnitPrice
=
[
billProduct
.
price
stringValue
];
#warning 少一个包装单价
shopDetail
.
foundationQuantity
=
[
billProduct
.
price
stringValue
];
shopDetail
.
foundationUnitPrice
=
[
billProduct
.
baseQty
stringValue
];
shopDetail
.
totalMoney
=
[
billProduct
.
total
stringValue
];
shopDetail
.
remark
=
billProduct
.
note
;
return
shopDetail
;
}
#pragma mark - TopPurchaseViewDelegate
-
(
void
)
pushNextViewController
:
(
id
)
vc
{
...
...
XFFruit/ViewControllers/Transport/Controllers/TransportProductViewController.m
View file @
ebaef158
...
...
@@ -79,6 +79,11 @@
-
(
void
)
addClick
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_AddPurchaseProduct
object
:
nil
];
}
-
(
void
)
editClick
:
(
UIButton
*
)
btn
{
TransportPdtDetail
*
pdDetail
=
self
.
transportProductArr
[
btn
.
tag
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_AddPurchaseProduct
object
:
nil
userInfo
:
@{
@"transportPdtDetail"
:
pdDetail
,
@"indexTag"
:
@
(
btn
.
tag
)}];
}
-
(
void
)
choosePurchase
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_ChoseTransportPurchase
object
:
nil
];
}
...
...
@@ -166,10 +171,6 @@
return
TableHeight
;
}
-
(
void
)
editClick
:
(
UIButton
*
)
btn
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@""
message
:
@"哈哈"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
XFFruit/ViewControllers/Transport/Views/BottomTransportView.h
View file @
ebaef158
...
...
@@ -25,11 +25,16 @@
//刷新费用
-
(
void
)
refreshCost
:(
NSArray
*
)
costArr
;
//刷新商品
-
(
void
)
refreshTranProduct
:(
NSArray
*
)
tranProductArr
;
#warning - 临时
-
(
void
)
reProduct
:(
NSArray
*
)
tranProductArr
;
//添加或者编辑
//删除商品
-
(
void
)
refreshDelProduct
:(
TransportPdtDetail
*
)
fee
tag
:(
NSInteger
)
indexTag
;
//添加
-
(
void
)
refreshProduct
:(
TransportPdtDetail
*
)
transportPdtDetail
;
-
(
void
)
refreshEditProduct
:(
TransportPdtDetail
*
)
transportPdtDetail
tag
:(
NSInteger
)
indexTag
;
@end
XFFruit/ViewControllers/Transport/Views/BottomTransportView.m
View file @
ebaef158
...
...
@@ -173,5 +173,15 @@
[
self
.
productVC
.
transportProductArr
addObjectsFromArray
:
tranProductArr
];
[
self
.
productVC
.
tableView
reloadData
];
}
-
(
void
)
refreshDelProduct
:
(
TransportPdtDetail
*
)
fee
tag
:
(
NSInteger
)
indexTag
{
if
(
fee
)
{
[
self
.
productVC
.
transportProductArr
removeObjectAtIndex
:
indexTag
];
[
self
.
productVC
.
tableView
reloadData
];
}
}
-
(
void
)
refreshEditProduct
:
(
TransportPdtDetail
*
)
transportPdtDetail
tag
:
(
NSInteger
)
indexTag
{
[
self
.
productVC
.
transportProductArr
replaceObjectAtIndex
:
indexTag
withObject
:
transportPdtDetail
];
[
self
.
productVC
.
tableView
reloadData
];
}
@end
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