Commit 1de7a49b authored by 陈俊俊's avatar 陈俊俊

采购通知选择多人

parent a5276e21
...@@ -3213,7 +3213,7 @@ ...@@ -3213,7 +3213,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 7.0; IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
SDKROOT = iphoneos; SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
...@@ -3251,7 +3251,7 @@ ...@@ -3251,7 +3251,7 @@
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0; IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
SDKROOT = iphoneos; SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
...@@ -3278,7 +3278,7 @@ ...@@ -3278,7 +3278,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.life.xffruit; PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.life.xffruit;
PRODUCT_NAME = XFFruit; PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
}; };
name = Debug; name = Debug;
...@@ -3302,7 +3302,7 @@ ...@@ -3302,7 +3302,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.life.xffruit; PRODUCT_BUNDLE_IDENTIFIER = com.cntaiping.life.xffruit;
PRODUCT_NAME = XFFruit; PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
}; };
name = Release; name = Release;
...@@ -3325,7 +3325,7 @@ ...@@ -3325,7 +3325,7 @@
INFOPLIST_FILE = XFFruitTests/Info.plist; INFOPLIST_FILE = XFFruitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = XFFruitTests; PRODUCT_NAME = XFFruitTests;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
}; };
...@@ -3345,7 +3345,7 @@ ...@@ -3345,7 +3345,7 @@
INFOPLIST_FILE = XFFruitTests/Info.plist; INFOPLIST_FILE = XFFruitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = XFFruitTests; PRODUCT_NAME = XFFruitTests;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
}; };
......
...@@ -23,14 +23,14 @@ ...@@ -23,14 +23,14 @@
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1] #define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
//********阿里云内部测试环境******** //********阿里云内部测试环境********
//#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest" #define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
//********现场测试环境******** //********现场测试环境********
//#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest" //#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//********现场正式环境********* //********现场正式环境*********
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest" // #define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
// HTTP // HTTP
......
...@@ -101,21 +101,21 @@ ...@@ -101,21 +101,21 @@
// self.m_containerView.m_passwordTextF.text = @"aaa"; // self.m_containerView.m_passwordTextF.text = @"aaa";
//@"http://218.244.151.129:7580/cruiser-server/rest" //@"http://218.244.151.129:7580/cruiser-server/rest"
// self.m_containerView.m_cCodeTextF.text = @"211534962"; self.m_containerView.m_cCodeTextF.text = @"211534962";
// self.m_containerView.m_userNameTextF.text = @"admin"; self.m_containerView.m_userNameTextF.text = @"admin";
// self.m_containerView.m_passwordTextF.text = @"thoradmin"; self.m_containerView.m_passwordTextF.text = @"thoradmin";
//@"http://122.224.171.126:7280/cruiser-server/rest" //@"http://122.224.171.126:7280/cruiser-server/rest"
// self.m_containerView.m_cCodeTextF.text = @"923"; // self.m_containerView.m_cCodeTextF.text = @"923";
// self.m_containerView.m_userNameTextF.text = @"admin"; // self.m_containerView.m_userNameTextF.text = @"admin";
// self.m_containerView.m_passwordTextF.text = @"thoradmin"; // self.m_containerView.m_passwordTextF.text = @"thoradmin";
//现场正式环境登陆
self.m_containerView.m_cCodeTextF.text = @"211534968"; // self.m_containerView.m_cCodeTextF.text = @"211534968";
self.m_containerView.m_userNameTextF.text = @"admin"; // self.m_containerView.m_userNameTextF.text = @"admin";
self.m_containerView.m_passwordTextF.text = @"thoradmin"; // self.m_containerView.m_passwordTextF.text = @"thoradmin";
[self.m_containerView checkLoginEnable]; [self.m_containerView checkLoginEnable];
#else #else
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
}else if(indexPath.row == 5){ }else if(indexPath.row == 5){
contentLabel.text = @"0"; contentLabel.text = @"0";
contentLabel.frame = CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-30, TableHeight); contentLabel.frame = CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-30, TableHeight);
contentLabel.textColor = [UIColor redColor]; contentLabel.textColor = GXF_NAVIGAYION_COLOR;
self.purchasePriceLabel = contentLabel; self.purchasePriceLabel = contentLabel;
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(contentLabel.frame)+ 5, 0, 20, TableHeight)]; UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(contentLabel.frame)+ 5, 0, 20, TableHeight)];
label.text = @"元"; label.text = @"元";
......
...@@ -69,6 +69,7 @@ typedef enum : NSUInteger { ...@@ -69,6 +69,7 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)UILabel *FootLabel; @property (nonatomic,strong)UILabel *FootLabel;
@property (nonatomic,strong)UIButton *addDetailedButton; @property (nonatomic,strong)UIButton *addDetailedButton;
@property (nonatomic,strong)NSMutableArray *selectUsers; @property (nonatomic,strong)NSMutableArray *selectUsers;
@property (nonatomic,strong)NSMutableArray *users;
@property (nonatomic,strong)NSString *purchaseNoticeUuid; @property (nonatomic,strong)NSString *purchaseNoticeUuid;
...@@ -123,13 +124,28 @@ typedef enum : NSUInteger { ...@@ -123,13 +124,28 @@ typedef enum : NSUInteger {
_titleField.text = self.purchaseNotice.title; _titleField.text = self.purchaseNotice.title;
self.titleStr = self.purchaseNotice.title; self.titleStr = self.purchaseNotice.title;
} }
if (self.purchaseNotice.purchaserName.length > 0) {
_personLabel.text = self.purchaseNotice.purchaserName; if (self.purchaseNotice.purchasers.count > 0) {
NSString *personStr = @"";
for (NSDictionary * userDict in self.purchaseNotice.purchasers) {
SurveyUser *surveyUser = [[SurveyUser alloc]init];
[surveyUser setValuesForKeysWithDictionary:userDict];
[self.selectUsers addObject:surveyUser.userUuid];
if (personStr.length == 0) {
personStr = [personStr stringByAppendingFormat:@"%@",surveyUser.userName];
}else{
personStr = [personStr stringByAppendingFormat:@"、%@",surveyUser.userName];
}
}
_personLabel.text = personStr;
_personLabel.textColor = GXF_CONTENT_COLOR; _personLabel.textColor = GXF_CONTENT_COLOR;
self.purchaseUuidStr = self.purchaseNotice.purchaserUuid; }
self.purchaseCodeStr = self.purchaseNotice.purchaserCode; if (self.users) {
self.purchaseNameStr = self.purchaseNotice.purchaserName; if (self.users.count > 0) {
[self.selectUsers addObject:self.purchaseNotice.purchaserUuid]; [self.users removeAllObjects];
}
[self.users addObjectsFromArray:self.purchaseNotice.purchasers];
} }
if (self.purchaseNotice.finishDate) { if (self.purchaseNotice.finishDate) {
if (self.purchaseNotice.finishDate.length > 15) { if (self.purchaseNotice.finishDate.length > 15) {
...@@ -159,6 +175,7 @@ typedef enum : NSUInteger { ...@@ -159,6 +175,7 @@ typedef enum : NSUInteger {
{ {
selectCellAry=[[NSMutableArray alloc]initWithCapacity:1000]; selectCellAry=[[NSMutableArray alloc]initWithCapacity:1000];
self.selectUsers = [NSMutableArray array]; self.selectUsers = [NSMutableArray array];
self.users = [NSMutableArray array];
_dataArr=[[NSMutableArray alloc]initWithObjects:@"标题:",@"采购员:",@"要求采购完成时间:",@"备注:", nil]; _dataArr=[[NSMutableArray alloc]initWithObjects:@"标题:",@"采购员:",@"要求采购完成时间:",@"备注:", nil];
_shopeArr=[[NSMutableArray alloc]init]; _shopeArr=[[NSMutableArray alloc]init];
...@@ -337,20 +354,28 @@ typedef enum : NSUInteger { ...@@ -337,20 +354,28 @@ typedef enum : NSUInteger {
cvc.selectArr = self.selectUsers; cvc.selectArr = self.selectUsers;
} }
cvc.choseBaseInfo = ^(NSArray *users){ cvc.choseBaseInfo = ^(NSArray *users){
if (users.count > 0) { if(users.count > 0){
NSString *textStr = @"";
if (self.users.count > 0) {
[self.users removeAllObjects];
}
if (self.selectUsers.count > 0) { if (self.selectUsers.count > 0) {
[self.selectUsers removeAllObjects]; [self.selectUsers removeAllObjects];
} }
SurveyUser *user = users[0]; for (SurveyUser *user in users) {
_personLabel.text = user.userName; if (textStr.length == 0) {
textStr = [textStr stringByAppendingFormat:@"%@",user.userName];
}else {
textStr = [textStr stringByAppendingFormat:@"、%@",user.userName];
}
[self.selectUsers addObject:user.userUuid];
[self.users addObject:[user dictForCommit]];
}
_personLabel.text = textStr;
_personLabel.textColor = GXF_CONTENT_COLOR; _personLabel.textColor = GXF_CONTENT_COLOR;
self.purchaseNameStr = user.userName;
self.purchaseCodeStr = user.userCode;
self.purchaseUuidStr = user.userUuid;
[self.selectUsers addObject:user.userUuid];
} }
}; };
cvc.isMoreChose = NO; cvc.isMoreChose = YES;
[self PushViewController:cvc animated:YES]; [self PushViewController:cvc animated:YES];
}else if(indexPath.row == 2){ }else if(indexPath.row == 2){
[self startDatePickView]; [self startDatePickView];
...@@ -521,7 +546,7 @@ typedef enum : NSUInteger { ...@@ -521,7 +546,7 @@ typedef enum : NSUInteger {
ShowMessage(@"采购通知单标题不能为空"); ShowMessage(@"采购通知单标题不能为空");
return NO; return NO;
} }
if (_personLabel.text.length == 0 ) { if (self.users.count <=0) {
ShowMessage(@"采购员不能为空"); ShowMessage(@"采购员不能为空");
return NO; return NO;
} }
...@@ -642,14 +667,13 @@ typedef enum : NSUInteger { ...@@ -642,14 +667,13 @@ typedef enum : NSUInteger {
@"version":versionObject, @"version":versionObject,
@"title":[IBTCommon checkString:self.titleStr], @"title":[IBTCommon checkString:self.titleStr],
@"state":[IBTCommon checkString:state], @"state":[IBTCommon checkString:state],
@"purchaserUuid":[IBTCommon checkString:self.purchaseUuidStr], @"purchasers":self.users,
@"purchaserCode":[IBTCommon checkString:self.purchaseCodeStr],
@"purchaserName":[IBTCommon checkString:self.purchaseNameStr],
@"finishDate":[IBTCommon checkString:self.finishDateStr], @"finishDate":[IBTCommon checkString:self.finishDateStr],
@"remark":[IBTCommon checkString:self.remarkStr], @"remark":[IBTCommon checkString:self.remarkStr],
@"products":billProducts}; @"products":billProducts};
[IBTLoadingView showProgressLabel:msg]; [IBTLoadingView showProgressLabel:msg];
[[ICRHTTPController sharedController] savePurchaseNoticeWithData:dict success:succ failure:fail]; [[ICRHTTPController sharedController] savePurchaseNoticeWithData:dict success:succ failure:fail];
} }
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex == 1) { if (buttonIndex == 1) {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#import "MJRefresh.h" #import "MJRefresh.h"
#import "PurchaseNoticeListCell.h" #import "PurchaseNoticeListCell.h"
#import "PurchaseNotice.h" #import "PurchaseNotice.h"
#import "SurveyUser.h"
#define TopMargin 44 #define TopMargin 44
#define TableHeight 120 #define TableHeight 120
#define LeftMargin 20 #define LeftMargin 20
...@@ -128,6 +129,13 @@ typedef enum : NSUInteger { ...@@ -128,6 +129,13 @@ typedef enum : NSUInteger {
for (NSDictionary *purchaseBillDict in recodesArr) { for (NSDictionary *purchaseBillDict in recodesArr) {
PurchaseNotice *purchaseBill = [[PurchaseNotice alloc]init]; PurchaseNotice *purchaseBill = [[PurchaseNotice alloc]init];
[purchaseBill setValuesForKeysWithDictionary:purchaseBillDict]; [purchaseBill setValuesForKeysWithDictionary:purchaseBillDict];
NSMutableArray *users = [NSMutableArray array];
for (NSDictionary *userDict in purchaseBill.purchasers) {
SurveyUser *user = [SurveyUser new];
[user setValuesForKeysWithDictionary:userDict];
[users addObject:user];
}
purchaseBill.purchasers = users;
[self.dataArr addObject:purchaseBill]; [self.dataArr addObject:purchaseBill];
} }
NSDictionary *pageDict = data[ @"data" ][ @"paging" ]; NSDictionary *pageDict = data[ @"data" ][ @"paging" ];
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#import "NoticeProduct.h" #import "NoticeProduct.h"
#import "NoticeDetailCell.h" #import "NoticeDetailCell.h"
#import "SurveyCell.h" #import "SurveyCell.h"
#import "SurveyUser.h"
#import "HPGrowingTextView.h" #import "HPGrowingTextView.h"
#import "NoticeProductViewController.h" #import "NoticeProductViewController.h"
#import "FollowUpRecordViewController.h" #import "FollowUpRecordViewController.h"
...@@ -92,6 +92,13 @@ typedef enum : NSUInteger { ...@@ -92,6 +92,13 @@ typedef enum : NSUInteger {
[productArr addObject:billProbuct]; [productArr addObject:billProbuct];
} }
purchaseNotice.products = productArr; purchaseNotice.products = productArr;
NSMutableArray *users = [NSMutableArray array];
for (NSDictionary *userDict in purchaseNotice.purchasers) {
SurveyUser *user = [SurveyUser new];
[user setValuesForKeysWithDictionary:userDict];
[users addObject:user];
}
purchaseNotice.purchasers = users;
self.purchaseNotice = purchaseNotice; self.purchaseNotice = purchaseNotice;
[strongSelf fetchtNoticeDetail]; [strongSelf fetchtNoticeDetail];
}else{ }else{
...@@ -123,7 +130,15 @@ typedef enum : NSUInteger { ...@@ -123,7 +130,15 @@ typedef enum : NSUInteger {
self.createOperNameLabel.text = [NSString stringWithFormat:@"%@%@",[IBTCommon checkString:self.purchaseNotice.create_operName],self.purchaseNotice.create_time.length > 10 ? [self.purchaseNotice.create_time substringToIndex:10] : self.purchaseNotice.create_time]; self.createOperNameLabel.text = [NSString stringWithFormat:@"%@%@",[IBTCommon checkString:self.purchaseNotice.create_operName],self.purchaseNotice.create_time.length > 10 ? [self.purchaseNotice.create_time substringToIndex:10] : self.purchaseNotice.create_time];
self.titleLabel.text = [IBTCommon checkString:self.purchaseNotice.title]; self.titleLabel.text = [IBTCommon checkString:self.purchaseNotice.title];
self.userLabel.text = [IBTCommon checkString:self.purchaseNotice.purchaserName]; NSString *textStr = @"";
for (SurveyUser *user in self.purchaseNotice.purchasers) {
if (textStr.length == 0) {
textStr = [textStr stringByAppendingFormat:@"%@",user.userName];
}else {
textStr = [textStr stringByAppendingFormat:@"、%@",user.userName];
}
}
self.userLabel.text = [IBTCommon checkString:textStr];
self.countLabel.text = [NSString stringWithFormat:@"%@",[self calutionTotalCount]]; self.countLabel.text = [NSString stringWithFormat:@"%@",[self calutionTotalCount]];
self.finishLabel.text = [NSString stringWithFormat:@"%@",self.purchaseNotice.finishDate?[[IBTCommon checkString:self.purchaseNotice.finishDate] substringToIndex:10]:@"无"]; self.finishLabel.text = [NSString stringWithFormat:@"%@",self.purchaseNotice.finishDate?[[IBTCommon checkString:self.purchaseNotice.finishDate] substringToIndex:10]:@"无"];
self.noteLabel.text = [IBTCommon checkString:self.purchaseNotice.remark]; self.noteLabel.text = [IBTCommon checkString:self.purchaseNotice.remark];
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
@property (nonatomic,strong)NSString *purchaserUuid;//采购员ID @property (nonatomic,strong)NSString *purchaserUuid;//采购员ID
@property (nonatomic,strong)NSString *purchaserCode;//采购员代码 @property (nonatomic,strong)NSString *purchaserCode;//采购员代码
@property (nonatomic,strong)NSString *purchaserName;//采购员名称 @property (nonatomic,strong)NSString *purchaserName;//采购员名称
@property (nonatomic,strong)NSArray *purchasers;
@property (nonatomic,strong)NSString *finishDate;//新增要求采购完成时间 @property (nonatomic,strong)NSString *finishDate;//新增要求采购完成时间
@property (nonatomic,strong)NSString *remark;//备注 @property (nonatomic,strong)NSString *remark;//备注
@property (nonatomic,strong)NSArray *products;//商品 @property (nonatomic,strong)NSArray *products;//商品
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import "PurchaseNoticeListCell.h" #import "PurchaseNoticeListCell.h"
#import "SurveyUser.h"
#define TitleSize 16 #define TitleSize 16
#define LeftMargin 90 #define LeftMargin 90
#define TopMargin 10 #define TopMargin 10
...@@ -69,7 +69,15 @@ ...@@ -69,7 +69,15 @@
- (void)setPurchaseNotice:(PurchaseNotice *)purchaseNotice{ - (void)setPurchaseNotice:(PurchaseNotice *)purchaseNotice{
self.billNumberLabel.text = [NSString stringWithFormat:@"单号:%@",purchaseNotice.billnumber]; self.billNumberLabel.text = [NSString stringWithFormat:@"单号:%@",purchaseNotice.billnumber];
self.titleLabel.text = [NSString stringWithFormat:@"标题:%@",purchaseNotice.title]; self.titleLabel.text = [NSString stringWithFormat:@"标题:%@",purchaseNotice.title];
self.userLabel.text = [NSString stringWithFormat:@"采购员:%@",purchaseNotice.purchaserName] ; NSString *textStr = @"";
for (SurveyUser *user in purchaseNotice.purchasers) {
if (textStr.length == 0) {
textStr = [textStr stringByAppendingFormat:@"%@",user.userName];
}else {
textStr = [textStr stringByAppendingFormat:@"、%@",user.userName];
}
}
self.userLabel.text = [NSString stringWithFormat:@"采购员:%@",textStr] ;
self.createOperNameLabel.text = [NSString stringWithFormat:@"创建人:%@",purchaseNotice.create_operName] ; self.createOperNameLabel.text = [NSString stringWithFormat:@"创建人:%@",purchaseNotice.create_operName] ;
self.createTimeLabel.text =[NSString stringWithFormat:@"创建时间:%@",purchaseNotice.create_time]; self.createTimeLabel.text =[NSString stringWithFormat:@"创建时间:%@",purchaseNotice.create_time];
NSString *stateStr = @""; NSString *stateStr = @"";
......
...@@ -102,7 +102,6 @@ typedef enum : NSUInteger { ...@@ -102,7 +102,6 @@ typedef enum : NSUInteger {
- (void)setviewsData - (void)setviewsData
{ {
if (self.shopDetail!=nil) { if (self.shopDetail!=nil) {
//商品 //商品
_productLabel.text = [NSString stringWithFormat:@"%@[%@]",self.shopDetail.merchandise,self.shopDetail.product_code]; _productLabel.text = [NSString stringWithFormat:@"%@[%@]",self.shopDetail.merchandise,self.shopDetail.product_code];
[self.selectProducts addObject:_shopDetail.product_uuid]; [self.selectProducts addObject:_shopDetail.product_uuid];
...@@ -367,7 +366,7 @@ typedef enum : NSUInteger { ...@@ -367,7 +366,7 @@ typedef enum : NSUInteger {
_baseCountLabel = label; _baseCountLabel = label;
[textField setEnabled:NO]; [textField setEnabled:NO];
textField.placeholder = @"基础数量"; textField.placeholder = @"基础数量";
textField.textColor = [UIColor redColor]; textField.textColor = GXF_NAVIGAYION_COLOR;
foundationQuantity=textField; //基础数量 foundationQuantity=textField; //基础数量
}else if (indexPath.row==5) }else if (indexPath.row==5)
...@@ -380,15 +379,14 @@ typedef enum : NSUInteger { ...@@ -380,15 +379,14 @@ typedef enum : NSUInteger {
{ {
label.text = @"元"; label.text = @"元";
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents]; [textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
textField.placeholder = @"包装单价"; textField.placeholder = @"输入包装单价";
packageUnitPrice=textField; //包装单价 packageUnitPrice=textField; //包装单价
}else if (indexPath.row==7) }else if (indexPath.row==7)
{ {
label.text = @"元"; label.text = @"元";
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents]; [textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
textField.placeholder = @"总金额"; textField.placeholder = @"输入总金额";
textField.textColor = [UIColor redColor];
totalMoney=textField; //总金额 totalMoney=textField; //总金额
} }
} }
......
...@@ -206,7 +206,6 @@ ...@@ -206,7 +206,6 @@
textField.delegate = self; textField.delegate = self;
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents]; [textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
[cell.contentView addSubview:textField]; [cell.contentView addSubview:textField];
textField.textColor = [UIColor redColor];
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(textField.frame)+ 5, 0, 20, TableRowHeight)]; UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(textField.frame)+ 5, 0, 20, TableRowHeight)];
label.textColor = GXF_CONTENT_COLOR; label.textColor = GXF_CONTENT_COLOR;
...@@ -295,7 +294,7 @@ ...@@ -295,7 +294,7 @@
baseCount = total / [self.noticeProduct.price floatValue]; baseCount = total / [self.noticeProduct.price floatValue];
} }
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f元",total]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total];
_shBaseQuantityField.text = [NSString stringWithFormat:@"%.0f",baseCount]; _shBaseQuantityField.text = [NSString stringWithFormat:@"%.0f",baseCount];
} }
}else if (textField == _shBaseQuantityField) { }else if (textField == _shBaseQuantityField) {
...@@ -306,7 +305,7 @@ ...@@ -306,7 +305,7 @@
baseCount = total / [self.noticeProduct.packprice floatValue]; baseCount = total / [self.noticeProduct.packprice floatValue];
} }
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f元",total]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total];
_shPackField.text = [NSString stringWithFormat:@"%.0f",baseCount]; _shPackField.text = [NSString stringWithFormat:@"%.0f",baseCount];
} }
} }
......
...@@ -356,6 +356,9 @@ typedef enum : NSUInteger { ...@@ -356,6 +356,9 @@ typedef enum : NSUInteger {
_personLabel.textColor = GXF_CONTENT_COLOR; _personLabel.textColor = GXF_CONTENT_COLOR;
} }
if (self.users) { if (self.users) {
// if (self.users.count > 0) {
// [self.users removeAllObjects];
// }
[self.users addObjectsFromArray:self.survey.users]; [self.users addObjectsFromArray:self.survey.users];
} }
} }
......
...@@ -216,7 +216,7 @@ typedef enum : NSUInteger { ...@@ -216,7 +216,7 @@ typedef enum : NSUInteger {
}else{ }else{
[textField setEnabled:NO]; [textField setEnabled:NO];
textField.text = @"0"; textField.text = @"0";
textField.textColor = [UIColor redColor]; textField.textColor = GXF_NAVIGAYION_COLOR;
_leftmoneyField = textField; _leftmoneyField = textField;
} }
} }
...@@ -236,7 +236,7 @@ typedef enum : NSUInteger { ...@@ -236,7 +236,7 @@ typedef enum : NSUInteger {
} }
- (void)textChange:(UITextField *)textField{ - (void)textChange:(UITextField *)textField{
if (_actualmoneyField.text.length > 0 && _paidmoneyField.text.length > 0 ) { if (_actualmoneyField.text.length > 0 && _paidmoneyField.text.length > 0 ) {
_leftmoneyField.text = [NSString stringWithFormat:@"%.2f",[_actualmoneyField.text floatValue] - [_paidmoneyField.text floatValue]]; _leftmoneyField.text = [NSString stringWithFormat:@"%.4f",[_actualmoneyField.text floatValue] - [_paidmoneyField.text floatValue]];
} }
} }
......
...@@ -9,5 +9,11 @@ ...@@ -9,5 +9,11 @@
#import "Accounttitle.h" #import "Accounttitle.h"
@implementation Accounttitle @implementation Accounttitle
+ (NSDictionary *)specialKeysAndReplaceKeys {
return @{ @"aID" : [[self class] PrimaryKey], };
}
+ (NSString *)PrimaryKey {
return @"uuid";
}
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment