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
4a62d8c4
Commit
4a62d8c4
authored
May 10, 2017
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非产品中心非wms仓收货
parent
1fb47ad6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
460 additions
and
119 deletions
+460
-119
ICRDataBaseController.m
...it/Controllers/DataBaseController/ICRDataBaseController.m
+15
-1
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+6
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+28
-0
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+2
-0
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+38
-33
PurchaseDetailViewController.h
...llers/Purchase/Controllers/PurchaseDetailViewController.h
+17
-0
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+239
-62
PurchaseBill.h
XFFruit/ViewControllers/Purchase/Models/PurchaseBill.h
+5
-1
PurchaseBillProduct.h
...uit/ViewControllers/Purchase/Models/PurchaseBillProduct.h
+3
-0
PurchaseCell.m
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
+6
-1
TopPurchaseView.h
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.h
+5
-1
TopPurchaseView.m
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.m
+38
-11
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+16
-6
NewReceiveViewController.m
...trollers/Receiving/Controllers/NewReceiveViewController.m
+0
-2
Product.h
XFFruit/ViewControllers/Survey/models/Product.h
+1
-0
TransferPdtDetail.h
XFFruit/ViewControllers/Transfer/Models/TransferPdtDetail.h
+22
-1
TransferPdtDetail.m
XFFruit/ViewControllers/Transfer/Models/TransferPdtDetail.m
+19
-0
No files found.
XFFruit/Controllers/DataBaseController/ICRDataBaseController.m
View file @
4a62d8c4
...
...
@@ -329,7 +329,11 @@ static NSString *ICRDataBasePath = @"";
[
_m_dbQueue
inDatabase
:
^
(
FMDatabase
*
db
)
{
// [db open];
//2017-05-08仓库增加了iswms 和 isproductcenter两个字段
/*
2017-05-08
Warehouse 增加了iswms 和 isproductcenter两个字段
Product 增加了purMeasureUnit默认采购单位字段
*/
if
(
!
[
db
columnExists
:
@"iswms"
inTableWithName
:
@"Warehouse"
])
{
CLog
(
@"没有iswms 和 isproductcenter两个字段"
);
...
...
@@ -340,6 +344,16 @@ static NSString *ICRDataBasePath = @"";
[
db
executeUpdate
:
addTable
];
}
if
(
!
[
db
columnExists
:
@"purMeasureUnit"
inTableWithName
:
@"Product"
])
{
NSString
*
sql
=
@"DROP TABLE IF EXISTS 'Product'"
;
[
db
executeUpdate
:
sql
];
NSString
*
addTable
=
[
Product
SQLForCreateTable
];
[
db
executeUpdate
:
addTable
];
}
// [db close];
}];
}
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
4a62d8c4
...
...
@@ -354,6 +354,12 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//5.采购单收货
-
(
void
)
recievePurchase
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//1.添加发运单
-
(
void
)
saveTransportWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
4a62d8c4
...
...
@@ -2359,6 +2359,34 @@ acceptTypeJson:YES
}
-
(
void
)
recievePurchase
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
void
(
^
success
)(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
=
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
CLog
(
@"%@"
,
responseObject
);
if
(
succ
)
{
succ
(
responseObject
);
}
};
void
(
^
failure
)(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
=
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
CLog
(
@"%@"
,
error
);
if
(
fail
)
{
fail
(
error
);
}
};
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@/purchase/bill/receive?time=%@&operId=%@&operName=%@"
,
HTTP_REST_API_BASE_URL
,[[
NSDate
date
]
httpParameterString
],
userUtil
.
userCode
,
userUtil
.
displayName
];
NSString
*
encodeUrlStr
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
parameters
:
data
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
#pragma mark - 添加发运单
-
(
void
)
saveTransportWithData
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
...
...
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
4a62d8c4
...
...
@@ -149,6 +149,8 @@
#define PURCHASE_STATE_ABORTED @"aborted" //已作废
#define PURCHASE_STATE_PROCESS @"process"//提交系统处理
#define PURCHASE_STATE_PROCESSFAIL @"processFail"//系统处理失败
#define PURCHASE_STATE_WAITE_RECIEVE @"waitReceive"//待收货
//采购单操作
#define PURCHASE_ACTION_REJECT @"reject"
#define PURCHASE_ACTION_APPROVE @"approve"
...
...
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
4a62d8c4
...
...
@@ -120,7 +120,7 @@ typedef enum : NSUInteger {
[
arr
addObject
:
billProduct
];
}
_aBottomView
.
productVC
.
productArr
=
arr
;
[
_aBottomView
.
productVC
.
tableView
reloadData
];
[
_aBottomView
.
productVC
.
tableView
reloadData
];
NSMutableArray
*
arrCost
=
[
NSMutableArray
array
];
...
...
@@ -181,18 +181,18 @@ typedef enum : NSUInteger {
[
footView
addSubview
:
commitBtn
];
[
self
.
view
addSubview
:
footView
];
_purchaseView
=
[[
TopPurchaseView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
TopHeight
)];
_purchaseView
.
delegate
=
self
;
[
_scrollView
addSubview
:
_purchaseView
];
// _bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + 20, ScreenSize.width,BottomHeight)];
// _bottomView.backgroundColor = [UIColor whiteColor];
// [_scrollView addSubview:_bottomView];
//
// _pvc = [[ProductBillViewController alloc]init];
// _pvc.viewFrame = _bottomView.bounds;
// [_bottomView addSubview:_pvc.view];
// _bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + 20, ScreenSize.width,BottomHeight)];
// _bottomView.backgroundColor = [UIColor whiteColor];
// [_scrollView addSubview:_bottomView];
//
// _pvc = [[ProductBillViewController alloc]init];
// _pvc.viewFrame = _bottomView.bounds;
// [_bottomView addSubview:_pvc.view];
_aBottomView
=
[[
BottomPurchaseView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
CGRectGetMaxY
(
_purchaseView
.
frame
)
+
20
,
ScreenSize
.
width
,
BottomHeight
)
withHidden
:
NO
];
_aBottomView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_scrollView
addSubview
:
_aBottomView
];
...
...
@@ -203,14 +203,14 @@ typedef enum : NSUInteger {
-
(
void
)
setProductTotalPrice
:
(
NSNotification
*
)
fication
{
//计算总金额
NSDecimalNumber
*
otherPrice
=
[
NSDecimalNumber
decimalNumberWithString
:
@"0"
];
// if (_aBottomView.costVC.costArr.count == 0) {
// otherPrice = [_purchaseView.otherPriceFiled.text floatValue];
// }else{
for
(
FeeAcountDetail
*
cost
in
_aBottomView
.
costVC
.
costArr
)
{
otherPrice
=
[
CalculateHelper
calculateNum1
:
otherPrice
num2
:
cost
.
leftmoney
type
:
CalculateTypeAdd
roundingType
:
NSRoundBankers
cutLenth
:
10
];
}
_purchaseView
.
otherPriceFiled
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
otherPrice
];
// }
// if (_aBottomView.costVC.costArr.count == 0) {
// otherPrice = [_purchaseView.otherPriceFiled.text floatValue];
// }else{
for
(
FeeAcountDetail
*
cost
in
_aBottomView
.
costVC
.
costArr
)
{
otherPrice
=
[
CalculateHelper
calculateNum1
:
otherPrice
num2
:
cost
.
leftmoney
type
:
CalculateTypeAdd
roundingType
:
NSRoundBankers
cutLenth
:
10
];
}
_purchaseView
.
otherPriceFiled
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
otherPrice
];
// }
//其他费用 + 商品总金额
...
...
@@ -225,7 +225,7 @@ typedef enum : NSUInteger {
_purchaseView
.
chargePurchase
=
otherPrice
;
...
...
@@ -261,7 +261,7 @@ typedef enum : NSUInteger {
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
SetProductTotalPrice
object
:
nil
];
};
}
svc
.
title
=
[
IBTCommon
localizableString
:
@"AddShopDetail"
];
[
self
PushViewController
:
svc
animated
:
YES
];
}
...
...
@@ -368,6 +368,7 @@ typedef enum : NSUInteger {
@"total"
:
_purchaseView
.
total
,
@"charge"
:
_purchaseView
.
chargePurchase
,
@"remark"
:
[
IBTCommon
checkString
:
_purchaseView
.
remark
],
@"outSideBillNumber"
:
[
IBTCommon
checkString
:
_purchaseView
.
purchaseExternal
.
text
],
@"products"
:
billProducts
,
@"accountDetails"
:
costs
};
[
IBTLoadingView
showProgressLabel
:
msg
];
...
...
@@ -392,6 +393,10 @@ typedef enum : NSUInteger {
ShowMessage
(
@"收货仓库不能为空"
);
return
NO
;
}
if
(
_purchaseView
.
purchaseExternal
.
text
==
0
)
{
ShowMessage
(
@"外部单据号不能为空"
);
return
NO
;
}
if
(
_aBottomView
.
productVC
.
productArr
.
count
==
0
)
{
ShowMessage
(
@"采购商品不能为空"
);
return
NO
;
...
...
@@ -405,12 +410,12 @@ typedef enum : NSUInteger {
ShowMessage
(
@"有数量等于0的商品明细,请编辑后保存"
);
return
NO
;
}
// if ([billProduct.price floatValue] <=0 || [billProduct.basePrice floatValue] <= 0) {
// ShowMessage(@"有价格未填写的商品明细,请编辑后保存");
// return NO;
// }
// if ([billProduct.price floatValue] <=0 || [billProduct.basePrice floatValue] <= 0) {
// ShowMessage(@"有价格未填写的商品明细,请编辑后保存");
// return NO;
// }
}
return
YES
;
}
...
...
@@ -461,7 +466,7 @@ typedef enum : NSUInteger {
NSMutableArray
*
billArr
=
[
NSMutableArray
array
];
for
(
NoticeProduct
*
product
in
arr
)
{
PurchaseBillProduct
*
billProduct
=
[
PurchaseBillProduct
new
];
// billProduct.uuid = product.uuid;
// billProduct.uuid = product.uuid;
billProduct
.
product_name
=
product
.
productName
;
billProduct
.
product_uuid
=
product
.
productUuid
;
billProduct
.
product_code
=
product
.
productCode
;
...
...
@@ -507,13 +512,13 @@ typedef enum : NSUInteger {
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.h
View file @
4a62d8c4
...
...
@@ -8,6 +8,19 @@
#import "ICRBaseViewController.h"
#import "PurchaseBill.h"
/**
* 采购单状态
*/
typedef
NS_ENUM
(
NSInteger
,
PurchaseType
)
{
/**
* 审核之前的状态(已保存、已提交)
*/
PurchaseTypeBeforeVerify
=
1
,
/**
* 审核之后的状态(待收货、发运中等。。)
*/
PurchaseTypeAfterVerify
,
};
@interface
PurchaseDetailViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
PurchaseBill
*
bill
;
...
...
@@ -15,4 +28,8 @@
//显示样式
@property
(
nonatomic
,
assign
)
NSInteger
indexStyle
;
//0.1.2
@property
(
nonatomic
,
assign
)
PurchaseType
type
;
@end
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
4a62d8c4
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Models/PurchaseBill.h
View file @
4a62d8c4
...
...
@@ -36,7 +36,11 @@
@property
(
nonatomic
,
strong
)
NSString
*
type
;
//类型
@property
(
nonatomic
,
strong
)
NSString
*
purchaserName
;
//采购员名字
@property
(
nonatomic
,
strong
)
NSString
*
purchaserCode
;
//采购员代码
@property
(
nonatomic
,
strong
)
NSString
*
purchaserUuid
;
//采购员uuid
@property
(
strong
,
nonatomic
)
NSString
*
outSideBillNumber
;
//外部单据号
@property
(
nonatomic
,
strong
)
NSArray
*
products
;
@property
(
strong
,
nonatomic
)
NSArray
*
accountDetails
;
@property
(
nonatomic
,
strong
)
NSString
*
approv_time
;
//审核时间
@property
(
nonatomic
,
strong
)
NSString
*
approv_id
;
//审核人id
@property
(
nonatomic
,
strong
)
NSString
*
approv_operName
;
//审核人
@end
XFFruit/ViewControllers/Purchase/Models/PurchaseBillProduct.h
View file @
4a62d8c4
...
...
@@ -26,6 +26,9 @@
@property
(
nonatomic
,
strong
)
NSNumber
*
shippedFlag
;
//发运标志,0 未发运,1已发运
@property
(
nonatomic
,
strong
)
NSNumber
*
shippedQty
;
//发运包装数量
@property
(
nonatomic
,
strong
)
NSNumber
*
shippedBaseQty
;
//发运基础数量
@property
(
strong
,
nonatomic
)
NSNumber
*
receivedQty
;
//收货数量
@property
(
strong
,
nonatomic
)
NSNumber
*
receivedBaseQty
;
//收货基础数量
...
...
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
View file @
4a62d8c4
...
...
@@ -71,7 +71,8 @@
-
(
void
)
setPurchaseBill
:
(
PurchaseBill
*
)
purchaseBill
{
self
.
billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"单号:%@"
,
purchaseBill
.
billNumber
];
self
.
noticeNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"采购通知单号:%@"
,
purchaseBill
.
noticeNumber
.
length
>
0
?
purchaseBill
.
noticeNumber
:
@"无"
];
self
.
noticeNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"收货仓库:%@[%@]"
,
purchaseBill
.
receiveWrh_name
,
purchaseBill
.
receiveWrh_code
];
self
.
vendorLabel
.
text
=
[
NSString
stringWithFormat
:
@"供应商:%@[%@]"
,
purchaseBill
.
vendor_name
,
purchaseBill
.
vendor_code
]
;
self
.
createOperNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"创建人:%@"
,
purchaseBill
.
create_operName
]
;
self
.
createTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"创建时间:%@"
,
purchaseBill
.
create_time
];
...
...
@@ -113,6 +114,10 @@
// self.stateBtn.frame = CGRectMake(0 , TopMargin, LeftMargin - TopMargin, 20);
stateStr
=
@"系统处理失败"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"finish"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_WAITE_RECIEVE
]){
self
.
stateBtn
.
frame
=
CGRectMake
(
TopMargin
*
2
,
TopMargin
,
LeftMargin
-
TopMargin
*
3
,
20
);
stateStr
=
@"待收货"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
[
self
.
stateBtn
setTitle
:
stateStr
forState
:
UIControlStateNormal
];
...
...
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.h
View file @
4a62d8c4
...
...
@@ -17,13 +17,17 @@
@end
@interface
TopPurchaseView
:
UIView
@property
(
nonatomic
,
strong
)
UILabel
*
purchase
NoticeLabel
;
//采购通知单号
@property
(
nonatomic
,
strong
)
UILabel
*
purchase
rLabel
;
//采购员
@property
(
nonatomic
,
strong
)
UILabel
*
purchaseTypeLabel
;
//类型
@property
(
nonatomic
,
strong
)
UILabel
*
purchaseSupplierLabel
;
//供应商
@property
(
nonatomic
,
strong
)
UILabel
*
purchaseStoreLabel
;
//收货仓库
@property
(
nonatomic
,
strong
)
UITextField
*
otherPriceFiled
;
//其他费用
@property
(
nonatomic
,
strong
)
UILabel
*
purchasePriceLabel
;
//总金额
@property
(
nonatomic
,
strong
)
HPGrowingTextView
*
remarkTextView
;
//备注
/**
* 外部单据号
*/
@property
(
strong
,
nonatomic
)
UITextField
*
purchaseExternal
;
//数据
@property
(
nonatomic
,
strong
)
NSString
*
noticeUuid
;
@property
(
nonatomic
,
strong
)
NSString
*
noticeNumber
;
...
...
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.m
View file @
4a62d8c4
...
...
@@ -47,7 +47,7 @@
{
self
.
backgroundColor
=
XXFBgColor
;
_dataArr
=
[
NSMutableArray
array
];
NSArray
*
arr
=
@[
@"采购员:"
,
@"类型:"
,
@"供应商:"
,
@"收货仓库:"
,
@"其他费用:"
,
@"总金额:"
,
@"备注:"
];
NSArray
*
arr
=
@[
@"采购员:"
,
@"类型:"
,
@"供应商:"
,
@"收货仓库:"
,
@"其他费用:"
,
@"总金额:"
,
@"
外部单据号:"
,
@"
备注:"
];
[
_dataArr
addObjectsFromArray
:
arr
];
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
TopMargin
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
-
TopMargin
))
style
:(
UITableViewStylePlain
)];
...
...
@@ -55,6 +55,7 @@
_tableView
.
bounces
=
NO
;
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
[
self
addSubview
:
_tableView
];
}
#pragma mark - 协议方法
...
...
@@ -108,7 +109,7 @@
[
cell
.
contentView
addSubview
:
label
];
cell
.
alpha
=
0
;
}
else
if
(
indexPath
.
row
==
_dataArr
.
count
-
1
){
}
else
if
(
[
_dataArr
[
indexPath
.
row
]
isEqualToString
:
@"备注:"
]
){
self
.
remarkTextView
=
[[
HPGrowingTextView
alloc
]
initWithFrame
:
CGRectMake
(
100
+
LeftMargin
,
0
,
ScreenSize
.
width
-
100
-
LeftMargin
*
2
-
15
,
TableHeight
)];
self
.
remarkTextView
.
contentInset
=
UIEdgeInsetsMake
(
5
,
5
,
5
,
0
);
self
.
remarkTextView
.
minNumberOfLines
=
1
;
...
...
@@ -121,6 +122,15 @@
self
.
remarkTextView
.
placeholder
=
@"输入备注内容"
;
[
cell
.
contentView
addSubview
:
self
.
remarkTextView
];
}
else
if
([
_dataArr
[
indexPath
.
row
]
isEqualToString
:
@"外部单据号:"
]){
UITextField
*
textField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
100
+
LeftMargin
,
0
,
ScreenSize
.
width
-
100
-
LeftMargin
*
2
-
15
,
TableHeight
)];
textField
.
textAlignment
=
NSTextAlignmentRight
;
textField
.
textColor
=
GXF_CONTENT_COLOR
;
textField
.
font
=
GXF_FIFTEENTEN_SIZE
;
textField
.
delegate
=
self
;
[
cell
.
contentView
addSubview
:
textField
];
self
.
purchaseExternal
=
textField
;
self
.
purchaseExternal
.
placeholder
=
@"输入外部单据号"
;
}
else
{
UILabel
*
contentLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
100
+
LeftMargin
,
0
,
ScreenSize
.
width
-
100
-
LeftMargin
*
2
-
15
,
TableHeight
))];
contentLabel
.
textAlignment
=
NSTextAlignmentRight
;
...
...
@@ -129,7 +139,7 @@
[
cell
.
contentView
addSubview
:
contentLabel
];
if
(
indexPath
.
row
==
0
)
{
contentLabel
.
text
=
@"选择采购员"
;
self
.
purchase
Notice
Label
=
contentLabel
;
self
.
purchase
r
Label
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
1
){
contentLabel
.
text
=
@"选择类型"
;
...
...
@@ -138,6 +148,8 @@
}
else
if
(
indexPath
.
row
==
2
){
contentLabel
.
text
=
@"选择供应商"
;
self
.
purchaseSupplierLabel
=
contentLabel
;
self
.
purchaseTypeLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
purchaseTypeLabel
.
text
=
@"普通"
;
}
else
if
(
indexPath
.
row
==
3
){
contentLabel
.
text
=
@"选择收货仓库"
;
...
...
@@ -152,7 +164,6 @@
label
.
textColor
=
GXF_CONTENT_COLOR
;
label
.
font
=
GXF_FIFTEENTEN_SIZE
;
[
cell
.
contentView
addSubview
:
label
];
}
}
[
self
prepareDataInCell
];
...
...
@@ -160,9 +171,14 @@
//赋值
-
(
void
)
setBill
:
(
PurchaseBill
*
)
bill
{
if
(
bill
)
{
if
(
bill
.
noticeUuid
.
length
>
0
)
{
self
.
purchaseNoticeLabel
.
text
=
bill
.
noticeNumber
;
self
.
purchaseNoticeLabel
.
textColor
=
GXF_CONTENT_COLOR
;
if
(
bill
.
purchaserName
.
length
>
0
)
{
self
.
selectPerson
=
[
SurveyUser
new
];
self
.
selectPerson
.
userCode
=
bill
.
purchaserCode
;
self
.
selectPerson
.
userName
=
bill
.
purchaserName
;
self
.
selectPerson
.
userUuid
=
bill
.
purchaserUuid
;
self
.
purchaserLabel
.
text
=
bill
.
purchaserName
;
self
.
purchaserLabel
.
textColor
=
GXF_CONTENT_COLOR
;
}
if
(
bill
.
type
.
length
>
0
)
{
NSString
*
type
=
[
bill
.
type
isEqualToString
:
GXF_Critical
]
?
@"紧急"
:
@"普通"
;
...
...
@@ -198,6 +214,8 @@
self
.
purchasePriceLabel
.
text
=
[
bill
.
total
stringValue
];
self
.
total
=
bill
.
total
;
}
self
.
purchaseExternal
.
text
=
bill
.
outSideBillNumber
;
if
(
bill
.
remark
.
length
>
0
)
{
self
.
remarkTextView
.
text
=
bill
.
remark
;
self
.
remark
=
bill
.
remark
;
...
...
@@ -209,8 +227,8 @@
self
.
purchasePriceLabel
.
text
=
[
self
.
total
stringValue
];
}
if
(
self
.
noticeNumber
.
length
>
0
)
{
self
.
purchase
Notice
Label
.
text
=
self
.
noticeNumber
;
self
.
purchase
Notice
Label
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
purchase
r
Label
.
text
=
self
.
noticeNumber
;
self
.
purchase
r
Label
.
textColor
=
GXF_CONTENT_COLOR
;
}
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
@@ -271,8 +289,8 @@
cvc
.
choseBaseInfo
=
^
(
NSArray
*
users
){
if
(
users
.
count
==
1
){
self
.
selectPerson
=
users
[
0
];
self
.
purchase
Notice
Label
.
text
=
_selectPerson
.
userName
;
self
.
purchase
Notice
Label
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
purchase
r
Label
.
text
=
_selectPerson
.
userName
;
self
.
purchase
r
Label
.
textColor
=
GXF_CONTENT_COLOR
;
}
};
cvc
.
isMoreChose
=
NO
;
...
...
@@ -280,6 +298,15 @@
}
}
-
(
NSString
*
)
type
{
if
([
self
.
purchaseTypeLabel
.
text
isEqualToString
:
@"紧急"
])
{
_type
=
GXF_Critical
;
}
else
{
_type
=
GXF_Normal
;
}
return
_type
;
}
-
(
BOOL
)
growingTextViewShouldReturn
:
(
HPGrowingTextView
*
)
growingTextView
{
[
self
.
remarkTextView
resignFirstResponder
];
return
YES
;
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
4a62d8c4
...
...
@@ -406,7 +406,7 @@ typedef enum : NSUInteger {
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
//选择商品
if
(
indexPath
.
row
==
0
){
ChooseProductViewController
*
cvc
=
[
ChooseProductViewController
new
];
if
(
self
.
selectProducts
.
count
>
0
)
{
...
...
@@ -432,6 +432,7 @@ typedef enum : NSUInteger {
_measureUnitLabel
.
text
=
self
.
productMeasureUnit
;
_baseCountLabel
.
text
=
self
.
productMeasureUnit
;
}
[
self
setPackageUnit
:
product
.
purMeasureUnit
];
};
cvc
.
isMoreChose
=
NO
;
[
self
PushViewController
:
cvc
animated
:
YES
];
...
...
@@ -444,11 +445,7 @@ typedef enum : NSUInteger {
cvc
.
choseBaseInfo
=
^
(
NSArray
*
products
){
if
(
products
.
count
>
0
)
{
GXFProductUnit
*
productUnit
=
products
[
0
];
_PackagingLable
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
productUnit
.
name
];
_PackagingLable
.
textColor
=
GXF_CONTENT_COLOR
;
_packageCountLabel
.
text
=
productUnit
.
name
;
self
.
packageUintStr
=
productUnit
.
name
;
self
.
selectUnit
=
productUnit
.
name
;
[
self
setPackageUnit
:
productUnit
.
name
];
}
};
cvc
.
isMoreChose
=
NO
;
...
...
@@ -456,6 +453,19 @@ typedef enum : NSUInteger {
}
}
/**
* 设置包装单位
*
* @param packageUnit 包装单位
*/
-
(
void
)
setPackageUnit
:
(
NSString
*
)
packageUnit
{
_PackagingLable
.
text
=
packageUnit
;
_PackagingLable
.
textColor
=
GXF_CONTENT_COLOR
;
_packageCountLabel
.
text
=
packageUnit
;
self
.
packageUintStr
=
packageUnit
;
self
.
selectUnit
=
packageUnit
;
}
-
(
BOOL
)
textField
:
(
UITextField
*
)
textField
shouldChangeCharactersInRange
:
(
NSRange
)
range
replacementString
:
(
NSString
*
)
string
{
if
(
textField
.
tag
!=
111
)
{
return
YES
;
...
...
XFFruit/ViewControllers/Receiving/Controllers/NewReceiveViewController.m
View file @
4a62d8c4
...
...
@@ -301,8 +301,6 @@ typedef enum : NSUInteger {
_pvc
.
isHiddenAdd
=
YES
;
_pvc
.
isHiddenEdit
=
self
.
isNotShowEdit
;
[
_bottomView
addSubview
:
_pvc
.
view
];
NSLog
(
@">>>>>>>>>>>>>>>>>>>>>>>>>>%f"
,
_transportView
.
bottom
);
}
...
...
XFFruit/ViewControllers/Survey/models/Product.h
View file @
4a62d8c4
...
...
@@ -33,6 +33,7 @@
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
@property
(
nonatomic
,
strong
)
NSString
*
specification
;
@property
(
nonatomic
,
strong
)
NSString
*
version
;
@property
(
nonatomic
,
strong
)
NSString
*
purMeasureUnit
;
//默认采购单位
@end
XFFruit/ViewControllers/Transfer/Models/TransferPdtDetail.h
View file @
4a62d8c4
...
...
@@ -7,7 +7,7 @@
//
#import "IBTModel.h"
#import "PurchaseBillProduct.h"
@interface
TransferPdtDetail
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
productUuid
;
//商品id
...
...
@@ -37,4 +37,25 @@
@property
(
nonatomic
,
strong
)
NSString
*
carnumber
;
//车牌号
//采购单商品对象
//@property (nonatomic,strong)NSString *uuid;//唯一标识
//@property (nonatomic,strong)NSString *product_uuid;//商品uuid
//@property (nonatomic,strong)NSString *product_code;//商品代码
//@property (nonatomic,strong)NSString *product_name;//商品名称
//@property (nonatomic,strong)NSNumber *qpc;//包装规格
//@property (nonatomic,strong)NSString *qpcStr;//包装规格描述
//@property (nonatomic,strong)NSString *unit;//包装单位
//@property (nonatomic,strong)NSNumber *qty;//包装数量
//@property (nonatomic,strong)NSNumber *price;//包装单价
//@property (nonatomic,strong)NSNumber *baseQty;//基础数量
@property
(
nonatomic
,
strong
)
NSNumber
*
basePrice
;
//基础单价
//@property (nonatomic,strong)NSString *baseUnit;//规格单位
//@property (nonatomic,strong)NSNumber *total;// 金额
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
//备注
@property
(
nonatomic
,
strong
)
NSNumber
*
shippedFlag
;
//发运标志,0 未发运,1已发运
@property
(
nonatomic
,
strong
)
NSNumber
*
shippedQty
;
//发运包装数量
@property
(
nonatomic
,
strong
)
NSNumber
*
shippedBaseQty
;
//发运基础数量
@property
(
strong
,
nonatomic
)
PurchaseBillProduct
*
purchasePdt
;
-
(
PurchaseBillProduct
*
)
changeToPurchasePdt
;
@end
XFFruit/ViewControllers/Transfer/Models/TransferPdtDetail.m
View file @
4a62d8c4
...
...
@@ -10,4 +10,23 @@
@implementation
TransferPdtDetail
-
(
void
)
setPurchasePdt
:(
PurchaseBillProduct
*
)
purchasePdt
{
_purchasePdt
=
purchasePdt
;
self
.
productUuid
=
purchasePdt
.
product_uuid
;
self
.
productCode
=
purchasePdt
.
product_code
;
self
.
productName
=
purchasePdt
.
product_name
;
self
.
price
=
purchasePdt
.
basePrice
;
self
.
packprice
=
purchasePdt
.
price
;
}
-
(
PurchaseBillProduct
*
)
changeToPurchasePdt
{
if
(
!
self
.
purchasePdt
)
{
self
.
purchasePdt
=
[
PurchaseBillProduct
new
];
NSDictionary
*
dict
=
[
self
dictForCommit
];
[
self
.
purchasePdt
setValuesForKeysWithDictionary
:
dict
];
}
self
.
purchasePdt
.
receivedQty
=
self
.
rctQty
;
self
.
purchasePdt
.
receivedBaseQty
=
self
.
rctBaseQty
;
return
self
.
purchasePdt
;
}
@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