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