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
d9568f12
Commit
d9568f12
authored
9 years ago
by
n22
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购单接口
parent
c21d80e7
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
262 additions
and
94 deletions
+262
-94
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+6
-0
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+7
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+42
-1
ICRNotificationMacro.h
XFFruit/Macro/ICRNotificationMacro.h
+1
-0
ChooseTypeViewController.m
...ntrollers/Purchase/Controllers/ChooseTypeViewController.m
+4
-2
ChooseWarehouseViewController.m
...lers/Purchase/Controllers/ChooseWarehouseViewController.m
+4
-2
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+58
-2
ProductViewController.m
...wControllers/Purchase/Controllers/ProductViewController.m
+7
-2
PurchaseViewController.m
...Controllers/Purchase/Controllers/PurchaseViewController.m
+4
-4
PurchaseBill.h
XFFruit/ViewControllers/Purchase/Models/PurchaseBill.h
+3
-5
PurchaseBillProduct.h
...uit/ViewControllers/Purchase/Models/PurchaseBillProduct.h
+27
-0
PurchaseBillProduct.m
...uit/ViewControllers/Purchase/Models/PurchaseBillProduct.m
+13
-0
TopPurchaseView.h
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.h
+13
-0
TopPurchaseView.m
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.m
+18
-4
ChooseProductViewController.m
...trollers/Survey/controllers/ChooseProductViewController.m
+4
-2
ChosePersonViewController.m
...ontrollers/Survey/controllers/ChosePersonViewController.m
+10
-17
NewSurveyViewController.m
...wControllers/Survey/controllers/NewSurveyViewController.m
+34
-47
SurveyViewController.m
...ViewControllers/Survey/controllers/SurveyViewController.m
+6
-6
XFFruit-Prefix.pch
XFFruit/XFFruit-Prefix.pch
+1
-0
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
d9568f12
...
...
@@ -372,6 +372,7 @@
FE4678B61B8D986900B5EDA3
/* PurchaseBoltView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE4678B51B8D986900B5EDA3
/* PurchaseBoltView.m */
;
};
FE4F17251B72FAAB00924DED
/* ChosePersonViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
;
};
FE7155D91B7B328400595B0A
/* Product.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE7155D81B7B328400595B0A
/* Product.m */
;
};
FE95FDDA1B93FC12008040D0
/* PurchaseBillProduct.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE95FDD91B93FC12008040D0
/* PurchaseBillProduct.m */
;
};
FEA2F2FD1B8423B900D64735
/* BottomSheetView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FEA2F2FC1B8423B900D64735
/* BottomSheetView.m */
;
};
FEA2F3001B842A1C00D64735
/* MaterialVIewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FEA2F2FF1B842A1C00D64735
/* MaterialVIewController.m */
;
};
FEA2F3031B8453C700D64735
/* GoodsViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FEA2F3021B8453C700D64735
/* GoodsViewController.m */
;
};
...
...
@@ -820,6 +821,8 @@
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChosePersonViewController.m
;
sourceTree
=
"<group>"
;
};
FE7155D71B7B328400595B0A
/* Product.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Product.h
;
sourceTree
=
"<group>"
;
};
FE7155D81B7B328400595B0A
/* Product.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
Product.m
;
sourceTree
=
"<group>"
;
};
FE95FDD81B93FC12008040D0
/* PurchaseBillProduct.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PurchaseBillProduct.h
;
sourceTree
=
"<group>"
;
};
FE95FDD91B93FC12008040D0
/* PurchaseBillProduct.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseBillProduct.m
;
sourceTree
=
"<group>"
;
};
FEA2F2FB1B8423B900D64735
/* BottomSheetView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BottomSheetView.h
;
sourceTree
=
"<group>"
;
};
FEA2F2FC1B8423B900D64735
/* BottomSheetView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BottomSheetView.m
;
sourceTree
=
"<group>"
;
};
FEA2F2FE1B842A1C00D64735
/* MaterialVIewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MaterialVIewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1023,6 +1026,8 @@
7281A0C71B89BFE60052B1AC
/* Vendor.m */
,
FE4678AE1B8D63A100B5EDA3
/* Warehouse.h */
,
FE4678AF1B8D63A100B5EDA3
/* Warehouse.m */
,
FE95FDD81B93FC12008040D0
/* PurchaseBillProduct.h */
,
FE95FDD91B93FC12008040D0
/* PurchaseBillProduct.m */
,
);
path
=
Models
;
sourceTree
=
"<group>"
;
...
...
@@ -2274,6 +2279,7 @@
7281A0C21B898A040052B1AC
/* PurchaseDetailViewController.m in Sources */
,
FEA2F3061B8453DE00D64735
/* CostViewController.m in Sources */
,
C14BE3061ADB84350049F1AA
/* IBTTextFieldCell.m in Sources */
,
FE95FDDA1B93FC12008040D0
/* PurchaseBillProduct.m in Sources */
,
30F7F5711ADE723100A9B24E
/* ICRAttachmentCellContentView.m in Sources */
,
C15918451AC062460013B391
/* IBTBadgeView.m in Sources */
,
7281A0C81B89BFE60052B1AC
/* Vendor.m in Sources */
,
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
d9568f12
...
...
@@ -230,6 +230,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
page_size
:(
NSUInteger
)
page_size
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//添加采购单
-
(
void
)
savePurchaseWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
d9568f12
...
...
@@ -1312,7 +1312,9 @@ acceptTypeJson:YES
//添加行情调研单
-
(
void
)
saveSurveyWithAuthenticode
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
-
(
void
)
saveSurveyWithAuthenticode
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
data
)
{
if
(
fail
)
{
...
...
@@ -1705,4 +1707,43 @@ acceptTypeJson:YES
failure
:
failure
];
}
//添加采购单
-
(
void
)
savePurchaseWithData
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
data
)
{
if
(
fail
)
{
fail
(
[[
self
class
]
ErrorWithMsg
:
ERROR_PARAMETER
code
:
0
]
);
}
return
;
}
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
);
}
};
NSDictionary
*
dict
=
data
;
NSString
*
currentTime
=
[[
NSDate
date
]
httpParameterString
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_SurveySave
]
stringByAppendingFormat
:
@"?time=%@&operId=%@&operName=%@"
,
currentTime
,
userUtil
.
userCode
,
userUtil
.
displayName
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
parameters
:
dict
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/Macro/ICRNotificationMacro.h
View file @
d9568f12
...
...
@@ -9,5 +9,6 @@
#ifndef XFFruit_ICRNotificationMacro_h
#define XFFruit_ICRNotificationMacro_h
#define SetProductTotalPrice @"setProductTotalPrice"
#endif
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/ChooseTypeViewController.m
View file @
d9568f12
...
...
@@ -62,9 +62,11 @@
-
(
void
)
sureClick
{
if
(
self
.
dataArr
.
count
>
0
)
{
if
(
_currentIndexPath
)
{
NSString
*
type
=
self
.
dataArr
[
_currentIndexPath
.
row
];
self
.
choseType
(
type
);
}
}
[
self
PopViewControllerAnimated
:
YES
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/ChooseWarehouseViewController.m
View file @
d9568f12
...
...
@@ -110,9 +110,11 @@
-
(
void
)
sureClick
{
if
(
self
.
dataArr
.
count
>
0
)
{
if
(
_currentIndexPath
)
{
Warehouse
*
warehouse
=
self
.
dataArr
[
_currentIndexPath
.
row
];
self
.
choseWarehouse
(
warehouse
);
}
}
[
self
PopViewControllerAnimated
:
YES
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
d9568f12
...
...
@@ -10,6 +10,7 @@
#import "TopPurchaseView.h"
#import "ProductViewController.h"
#import "AddProductViewController.h"
#import "PurchaseBillProduct.h"
#define TopHeight 328
#define BottomHeight 300
#define SpaceHeight 20
...
...
@@ -28,10 +29,25 @@ typedef enum : NSUInteger {
ProductViewController
*
_pvc
;
AddProductViewController
*
_avc
;
}
@property
(
nonatomic
,
strong
)
NSNumber
*
total
;
@property
(
nonatomic
,
strong
)
NSNumber
*
charge
;
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@end
@implementation
NewPurchaseViewController
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
//监听值的改变
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
setProductTotalPrice
:
)
name
:
SetProductTotalPrice
object
:
nil
];
}
return
self
;
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
//布局
...
...
@@ -74,10 +90,50 @@ typedef enum : NSUInteger {
}
-
(
void
)
setProductTotalPrice
:
(
NSNotification
*
)
fication
{
//计算总金额
//其他费用 + 商品总金额
float
otherPrice
=
[
_purchaseView
.
otherPriceFiled
.
text
floatValue
];
NSMutableArray
*
purchaseProduct
=
_pvc
.
productArr
;
float
totalPrice
=
0
;
for
(
PurchaseBillProduct
*
billProduct
in
purchaseProduct
)
{
totalPrice
+=
[
billProduct
.
total
floatValue
];
}
_purchaseView
.
purchasePriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
totalPrice
+
otherPrice
];
self
.
charge
=
[
NSNumber
numberWithFloat
:
otherPrice
];
self
.
total
=
[
NSNumber
numberWithFloat
:
totalPrice
];
}
-
(
void
)
btnClick
:
(
UIButton
*
)
btn
{
switch
(
btn
.
tag
)
{
case
SaveTag
:
{
if
([
self
checkPurchase
])
{
}
}
break
;
case
CommitTag
:{
}
break
;
default
:
break
;
}
}
#pragma mark - checkNull
-
(
BOOL
)
checkPurchase
{
self
.
remark
=
_purchaseView
.
remarkTextView
.
text
;
if
(
_purchaseView
.
vendor_uuid
.
length
==
0
||
_purchaseView
.
receiveWrh_uuid
.
length
==
0
||
_purchaseView
.
type
.
length
==
0
||
[
self
.
total
floatValue
]
<
0
||
!
self
.
total
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示信息"
message
:
@"信息不完整"
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
return
NO
;
}
return
YES
;
}
#pragma mark - TopPurchaseViewDelegate
-
(
void
)
pushNextViewController
:
(
id
)
vc
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/ProductViewController.m
View file @
d9568f12
...
...
@@ -11,6 +11,7 @@
#import "HeaderCell.h"
#import "ProductCell.h"
#import "AddProductViewController.h"
#import "PurchaseBillProduct.h"
#define TableHeight 44
@interface
ProductViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
FooterCellDelegate
,
AddProductViewDelegate
>
...
...
@@ -35,8 +36,12 @@
if
(
!
self
.
productArr
)
{
self
.
productArr
=
[
NSMutableArray
array
];
}
[
self
.
productArr
addObject
:
@"ffff"
];
[
self
.
productArr
addObject
:
@"fffff"
];
PurchaseBillProduct
*
billProduct
=
[
PurchaseBillProduct
new
];
billProduct
.
total
=
[
NSNumber
numberWithFloat
:
25
];
[
self
.
productArr
addObject
:
billProduct
];
[
self
.
productArr
addObject
:
billProduct
];
}
-
(
void
)
setViewFrame
:
(
CGRect
)
viewFrame
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/PurchaseViewController.m
View file @
d9568f12
...
...
@@ -231,21 +231,21 @@ typedef enum : NSUInteger {
-
(
void
)
getSortValueSelectRow
:
(
NSString
*
)
state
{
if
(
state
.
length
>
0
)
{
self
.
orderDirection
=
state
;
NS
Log
(
@"%@"
,
state
);
C
Log
(
@"%@"
,
state
);
}
}
#pragma mark - boltDelegate
-
(
void
)
getBoltValueSelectRow
:
(
NSString
*
)
state
{
self
.
state
=
state
;
NS
Log
(
@"%@"
,
state
);
C
Log
(
@"%@"
,
state
);
}
-
(
void
)
getbillLike
:
(
NSString
*
)
billLike
{
self
.
billLike
=
billLike
;
NS
Log
(
@"%@"
,
billLike
);
C
Log
(
@"%@"
,
billLike
);
}
-
(
void
)
getnoticeLike
:
(
NSString
*
)
noticeLike
{
self
.
noticeLike
=
noticeLike
;
NS
Log
(
@"%@"
,
noticeLike
);
C
Log
(
@"%@"
,
noticeLike
);
}
-
(
void
)
clearBoltInformation
{
//清空所有条件
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Models/PurchaseBill.h
View file @
d9568f12
...
...
@@ -10,14 +10,15 @@
@interface
PurchaseBill
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NS
String
*
version
;
//版本
@property
(
nonatomic
,
strong
)
NS
Number
*
version
;
//版本
@property
(
nonatomic
,
strong
)
NSString
*
noticeUuid
;
//采购通知单uuid
@property
(
nonatomic
,
strong
)
NSString
*
noticeNumber
;
//采购通知单号
@property
(
nonatomic
,
strong
)
NSString
*
billNumber
;
//采购单号
@property
(
nonatomic
,
strong
)
NSString
*
vendor_uuid
;
//供应商uuid
@property
(
nonatomic
,
strong
)
NSString
*
vendor_code
;
//供应商代码
@property
(
nonatomic
,
strong
)
NSString
*
vendor_name
;
//供应商姓名
@property
(
nonatomic
,
strong
)
NSString
*
total
;
//总金额
@property
(
nonatomic
,
strong
)
NSNumber
*
total
;
//总金额
@property
(
nonatomic
,
strong
)
NSNumber
*
charge
;
//费用
@property
(
nonatomic
,
strong
)
NSString
*
endDate
;
//调研结束时间
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
//备注
@property
(
nonatomic
,
strong
)
NSString
*
state
;
// initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
...
...
@@ -29,7 +30,4 @@
@property
(
nonatomic
,
strong
)
NSString
*
lastModified_id
;
//最后修改人代码
@property
(
nonatomic
,
strong
)
NSString
*
lastModified_operName
;
//最后修改人名称
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Models/PurchaseBillProduct.h
0 → 100644
View file @
d9568f12
//
// PurchaseBillProduct.h
// XFFruit
//
// Created by n22 on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface
PurchaseBillProduct
:
IBTModel
@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
)
NSNumber
*
total
;
// 金额
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
//备注
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Models/PurchaseBillProduct.m
0 → 100644
View file @
d9568f12
//
// PurchaseBillProduct.m
// XFFruit
//
// Created by n22 on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "PurchaseBillProduct.h"
@implementation
PurchaseBillProduct
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.h
View file @
d9568f12
...
...
@@ -23,6 +23,19 @@
@property
(
nonatomic
,
strong
)
UITextField
*
otherPriceFiled
;
//其他费用
@property
(
nonatomic
,
strong
)
UILabel
*
purchasePriceLabel
;
//总金额
@property
(
nonatomic
,
strong
)
HPGrowingTextView
*
remarkTextView
;
//备注
//数据
@property
(
nonatomic
,
strong
)
NSString
*
noticeUuid
;
@property
(
nonatomic
,
strong
)
NSString
*
noticeNumber
;
@property
(
nonatomic
,
strong
)
NSString
*
billNumber
;
@property
(
nonatomic
,
strong
)
NSString
*
type
;
@property
(
nonatomic
,
strong
)
NSString
*
vendor_uuid
;
@property
(
nonatomic
,
strong
)
NSString
*
vendor_code
;
@property
(
nonatomic
,
strong
)
NSString
*
vendor_name
;
@property
(
nonatomic
,
strong
)
NSString
*
receiveWrh_uuid
;
@property
(
nonatomic
,
strong
)
NSString
*
receiveWrh_code
;
@property
(
nonatomic
,
strong
)
NSString
*
receiveWrh_name
;
@property
(
nonatomic
,
weak
)
id
<
TopPurchaseViewDelegate
>
delegate
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.m
View file @
d9568f12
...
...
@@ -67,7 +67,7 @@
cell
=
[[
SurveyCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
if
(
indexPath
.
row
!=
4
&&
indexPath
.
row
!=
5
&&
indexPath
.
row
!=
6
)
{
if
(
indexPath
.
row
>
0
&&
indexPath
.
row
<
4
)
{
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
}
[
self
createViewInCell
:
cell
indexPath
:
indexPath
];
...
...
@@ -111,7 +111,7 @@
contentLabel
.
font
=
FontSize
(
TitleSize
);
[
cell
.
contentView
addSubview
:
contentLabel
];
if
(
indexPath
.
row
==
0
)
{
contentLabel
.
text
=
@"
选择采购通知
"
;
contentLabel
.
text
=
@"
采购通知单号
"
;
self
.
purchaseNoticeLabel
=
contentLabel
;
}
else
if
(
indexPath
.
row
==
1
){
...
...
@@ -148,6 +148,9 @@
Vendor
*
vendor
=
vendors
[
0
];
self
.
purchaseSupplierLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,
vendor
.
name
,
vendor
.
code
];
self
.
purchaseSupplierLabel
.
textColor
=
HexColor
(
@"444444"
);
self
.
vendor_uuid
=
vendor
.
uuid
;
self
.
vendor_code
=
vendor
.
code
;
self
.
vendor_name
=
vendor
.
name
;
}
};
...
...
@@ -160,6 +163,7 @@
tvc
.
choseType
=
^
(
NSString
*
type
){
self
.
purchaseTypeLabel
.
text
=
type
;
self
.
purchaseTypeLabel
.
textColor
=
HexColor
(
@"444444"
);
self
.
type
=
type
;
};
[
self
.
delegate
pushNextViewController
:
tvc
];
}
else
if
(
indexPath
.
row
==
3
){
...
...
@@ -168,6 +172,9 @@
wvc
.
choseWarehouse
=
^
(
Warehouse
*
warehouse
){
self
.
purchaseStoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,
warehouse
.
name
,
warehouse
.
code
];
self
.
purchaseStoreLabel
.
textColor
=
HexColor
(
@"444444"
);
self
.
receiveWrh_uuid
=
warehouse
.
uuid
;
self
.
receiveWrh_code
=
warehouse
.
code
;
self
.
receiveWrh_name
=
warehouse
.
name
;
};
[
self
.
delegate
pushNextViewController
:
wvc
];
}
...
...
@@ -183,6 +190,13 @@
-
(
void
)
touchesEnded
:
(
NSSet
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
[
self
.
delegate
hiddenKeyBoard
];
}
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
{
if
(
textField
==
self
.
otherPriceFiled
)
{
if
(
self
.
otherPriceFiled
.
text
.
length
>
0
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
SetProductTotalPrice
object
:
nil
];
}
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/controllers/ChooseProductViewController.m
View file @
d9568f12
...
...
@@ -109,10 +109,12 @@
}
else
{
if
(
self
.
dataArr
.
count
>
0
)
{
if
(
_currentIndexPath
)
{
Product
*
product
=
self
.
dataArr
[
_currentIndexPath
.
row
];
self
.
choseProduct
(
product
);
}
}
}
[
self
PopViewControllerAnimated
:
YES
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/controllers/ChosePersonViewController.m
View file @
d9568f12
...
...
@@ -121,19 +121,11 @@
survey
.
userName
=
user
.
name
;
[
arr
addObject
:
survey
];
}
if
(
arr
.
count
==
0
)
{
SurveyUser
*
user
=
[[
SurveyUser
alloc
]
init
];
user
.
userUuid
=
@"5a7417014e4c2928014e4dea21fb002f"
;
user
.
userName
=
@"栗阳"
;
user
.
userCode
=
@"admin"
;
[
arr
addObject
:
user
];
self
.
chosePerson
(
arr
);
}
else
{
self
.
chosePerson
(
arr
);
}
}
else
{
NSMutableArray
*
arr
=
[[
NSMutableArray
alloc
]
init
];
if
(
self
.
dataArr
.
count
>
0
)
{
if
(
_currentIndexPath
)
{
User
*
user
=
self
.
dataArr
[
_currentIndexPath
.
row
];
SurveyUser
*
survey
=
[[
SurveyUser
alloc
]
init
];
survey
.
userUuid
=
user
.
uuid
;
...
...
@@ -143,6 +135,7 @@
self
.
chosePerson
(
arr
);
}
}
}
[
self
PopViewControllerAnimated
:
YES
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/controllers/NewSurveyViewController.m
View file @
d9568f12
...
...
@@ -47,7 +47,8 @@ typedef enum : NSUInteger {
StartTimeView
*
_startTimeView
;
id
uuidObject
;
id
billNumberObject
;
NSNumber
*
version
;
NSNumber
*
versionObject
;
NSString
*
_clickState
;
}
@property
(
nonatomic
,
strong
)
NSString
*
titleStr
;
@property
(
nonatomic
,
strong
)
NSString
*
productCodeStr
;
...
...
@@ -80,7 +81,7 @@ typedef enum : NSUInteger {
[
_dataArr
addObject
:
@"备注"
];
uuidObject
=
[
NSNull
null
];
billNumberObject
=
[
NSNull
null
];
version
=
[
NSNumber
numberWithInt
:
0
];
version
Object
=
[
NSNumber
numberWithInt
:
0
];
}
-
(
void
)
createTableView
...
...
@@ -111,6 +112,7 @@ typedef enum : NSUInteger {
case
SaveTag
:
{
if
([
self
checkSurvey
])
{
_clickState
=
@"initial"
;
[
self
saveSurvey
:
@"initial"
message
:
@"正在保存..."
];
}
}
...
...
@@ -118,6 +120,7 @@ typedef enum : NSUInteger {
case
CommitTag
:
{
if
([
self
checkSurvey
])
{
_clickState
=
@"submitted"
;
[
self
saveSurvey
:
@"submitted"
message
:
@"正在提交..."
];
}
}
...
...
@@ -150,7 +153,13 @@ typedef enum : NSUInteger {
if
(
success
==
1
)
{
//成功
if
([
state
isEqualToString
:
@"initial"
])
{
//保存成功
[
IBTLoadingView
showTips
:
@"操作成功"
];
NSString
*
uuidS
=
data
[
@"data"
][
@"uuid"
];
NSString
*
billNumberS
=
data
[
@"data"
][
@"billNumber"
];
NSNumber
*
versionN
=
data
[
@"data"
][
@"version"
];
uuidObject
=
uuidS
;
billNumberObject
=
billNumberS
;
versionObject
=
versionN
;
[
IBTLoadingView
showTips
:[
NSString
stringWithFormat
:
@"当前单据%@以保存成功"
,
billNumberS
]];
}
else
{
//提交成功
SurveyViewController
*
svc
=
[
SurveyViewController
new
];
[
self
PushViewController
:
svc
animated
:
YES
];
...
...
@@ -171,11 +180,11 @@ typedef enum : NSUInteger {
if
(
self
.
survey
.
billNumber
>
0
&&
billNumberObject
==
[
NSNull
null
])
{
billNumberObject
=
self
.
survey
.
billNumber
;
}
if
(
self
.
survey
&&
[
version
integerValue
]
==
0
)
{
version
=
self
.
survey
.
version
;
if
(
self
.
survey
&&
[
version
Object
integerValue
]
==
0
)
{
version
Object
=
self
.
survey
.
version
;
}
NSDictionary
*
dict
=
@{
@"uuid"
:
uuidObject
,
@"version"
:
version
,
@"version"
:
version
Object
,
@"billnumber"
:
billNumberObject
,
@"title"
:
[
IBTCommon
checkString
:
self
.
titleStr
],
@"state"
:
state
,
...
...
@@ -190,32 +199,6 @@ typedef enum : NSUInteger {
[[
ICRHTTPController
sharedController
]
saveSurveyWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
}
-
(
void
)
clearAllInformation
{
_titleField
.
text
=
@""
;
_productLabel
.
text
=
@"请输入商品"
;
_productLabel
.
textColor
=
HexColor
(
@"bbbbbb"
);
_startDateLabel
.
text
=
@"选择日期"
;
_startDateLabel
.
textColor
=
HexColor
(
@"bbbbbb"
);
_endDateLabel
.
text
=
@"选择日期"
;
_endDateLabel
.
textColor
=
HexColor
(
@"bbbbbb"
);
_personLabel
.
text
=
@"选择调研人员"
;
_personLabel
.
textColor
=
HexColor
(
@"bbbbbb"
);
_noteTextView
.
text
=
@""
;
//清空数据
self
.
titleStr
=
@""
;
self
.
productCodeStr
=
@""
;
self
.
productNameStr
=
@""
;
self
.
productUuidStr
=
@""
;
self
.
beginDateStr
=
@""
;
self
.
endDateStr
=
@""
;
[
self
.
users
removeAllObjects
];
self
.
remarkStr
=
@""
;
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
...
...
@@ -331,7 +314,7 @@ typedef enum : NSUInteger {
}
-
(
void
)
preferDataInProductLabel
{
if
(
self
.
survey
)
{
_productLabel
.
text
=
[
IBTCommon
checkString
:
self
.
survey
.
productName
];
_productLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,[
IBTCommon
checkString
:
self
.
survey
.
productName
],[
IBTCommon
checkString
:
self
.
survey
.
productCode
]
];
_productLabel
.
textColor
=
HexColor
(
@"444444"
);
self
.
productCodeStr
=
[
IBTCommon
checkString
:
self
.
survey
.
productCode
];
self
.
productNameStr
=
[
IBTCommon
checkString
:
self
.
survey
.
productName
];
...
...
@@ -358,6 +341,7 @@ typedef enum : NSUInteger {
}
else
if
(
indexPath
.
row
==
4
){
ChosePersonViewController
*
cvc
=
[
ChosePersonViewController
new
];
cvc
.
chosePerson
=
^
(
NSArray
*
users
){
if
(
users
.
count
>
0
){
NSString
*
textStr
=
@""
;
if
(
self
.
users
.
count
>
0
)
{
[
self
.
users
removeAllObjects
];
...
...
@@ -372,6 +356,7 @@ typedef enum : NSUInteger {
}
_personLabel
.
text
=
textStr
;
_personLabel
.
textColor
=
HexColor
(
@"444444"
);
}
};
cvc
.
isMoreChose
=
YES
;
[
self
PushViewController
:
cvc
animated
:
YES
];
...
...
@@ -461,7 +446,9 @@ typedef enum : NSUInteger {
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
if
(
self
.
survey
&&
[
_clickState
isEqualToString
:
@"initial"
]){
[
ICRUserUtil
sharedInstance
].
needFresh
=
YES
;
}
}
-
(
void
)
didReceiveMemoryWarning
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/controllers/SurveyViewController.m
View file @
d9568f12
...
...
@@ -95,8 +95,8 @@ typedef enum : NSUInteger {
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
if
([
ICRUserUtil
sharedInstance
].
needFresh
)
{
[
self
getData
];
if
([
ICRUserUtil
sharedInstance
].
needFresh
&&
self
.
tableView
!=
nil
)
{
[
self
.
tableView
.
header
beginRefreshing
];
}
}
...
...
@@ -363,21 +363,21 @@ typedef enum : NSUInteger {
-
(
void
)
getSortValueSelectRow
:
(
NSString
*
)
state
{
if
(
state
.
length
>
0
)
{
self
.
orderDirection
=
state
;
NS
Log
(
@"%@"
,
state
);
C
Log
(
@"%@"
,
state
);
}
}
#pragma mark - boltDelegate
-
(
void
)
getBoltValueSelectRow
:
(
NSString
*
)
state
{
self
.
state
=
state
;
NS
Log
(
@"%@"
,
state
);
C
Log
(
@"%@"
,
state
);
}
-
(
void
)
getTitleLike
:
(
NSString
*
)
titleLike
{
self
.
titleLike
=
titleLike
;
NS
Log
(
@"%@"
,
titleLike
);
C
Log
(
@"%@"
,
titleLike
);
}
-
(
void
)
getBillNumber
:
(
NSString
*
)
billNumber
{
self
.
billNumberLike
=
billNumber
;
NS
Log
(
@"%@"
,
billNumber
);
C
Log
(
@"%@"
,
billNumber
);
}
-
(
void
)
clearBoltInformation
{
//清空所有条件
...
...
This diff is collapsed.
Click to expand it.
XFFruit/XFFruit-Prefix.pch
View file @
d9568f12
...
...
@@ -14,5 +14,6 @@
#import "IBTConstants.h"
#import "ICRAppMacro.h"
#import "ICRNotificationMacro.h"
#endif
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