Commit f8c36318 authored by freecui's avatar freecui

企业版本的app更新

parent f3261261
...@@ -32,10 +32,65 @@ ...@@ -32,10 +32,65 @@
[self setupBMKMapMgr]; [self setupBMKMapMgr];
_m_appViewControllerMgr = [ICRAppViewControllerManager getAppViewControllerManager]; _m_appViewControllerMgr = [ICRAppViewControllerManager getAppViewControllerManager];
#pragma 版本更新
[self enterpriseUpdate];
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];
return YES; return YES;
} }
#pragma mark enterprise alertView 企业版提示
- (void)enterpriseUpdate{
NSString *currentVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
NSComparisonResult comResult = [self p_compareVersions: currentVersion betweenVersion2:@"后台返回的app版本"];//_versionModel.ClientVersion];
if (comResult == NSOrderedAscending) {
//299企业版的更新 @"有新的版本可供下载"
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本" message: @"" delegate:self cancelButtonTitle:@"下次再说"otherButtonTitles: @"去下载", nil];//_versionModel.UpgradeRemark
// alertV.tag = alertVEnterprise;
// [alertV show];
}else{
[IBTLoadingView showProgressLabel:@"暂无新版本"];
}
}
- (void) alertView:(UIAlertView *)alertView
clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 1) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"app下载的url"]];
}
}
//比较版本号
- (NSComparisonResult)p_compareVersions: (NSString *)version1 betweenVersion2: (NSString *)version2{
NSComparisonResult result = NSOrderedSame;
if ([version2 isEqualToString:@""]) {
result = NSOrderedDescending;
return result ;
}
NSMutableArray *a = (NSMutableArray *)[version1 componentsSeparatedByString:@"."];
NSMutableArray *b = (NSMutableArray *)[version2 componentsSeparatedByString:@"."];
while (a.count < b.count) {[ a addObject:@"0"];}
while (b.count < a.count) {[ b addObject:@"0"];}
for(int i = 0; i < a.count; ++i){
if ([[a objectAtIndex:i] integerValue] < [[b objectAtIndex:i] integerValue]) {
result = NSOrderedAscending;
break;
}else if ([[b objectAtIndex:i] integerValue] < [[a objectAtIndex:i] integerValue]){
result = NSOrderedDescending;
break;
}
}
return result;
}
- (void)applicationWillResignActive:(UIApplication *)application { - (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
......
...@@ -252,7 +252,14 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) { ...@@ -252,7 +252,14 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
success:(void (^)(id))succ success:(void (^)(id))succ
failure:(void (^)(id))fail; failure:(void (^)(id))fail;
//7.4 7.4 结束加工单(写)
- (void)finishProcessWithAuthenticode:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//7.5 作废加工单
- (void)abortProcessWithAuthenticode:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//1·保存采购通知单 //1·保存采购通知单
- (void)savePurchaseNoticeWithData:(id)data - (void)savePurchaseNoticeWithData:(id)data
success:(void (^)(id))succ success:(void (^)(id))succ
......
...@@ -86,6 +86,9 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) { ...@@ -86,6 +86,9 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
//加工单 //加工单
XFFHttp_QueryProcess, XFFHttp_QueryProcess,
XFFHttp_GetProcess, XFFHttp_GetProcess,
XFFHttp_SaveProcess,
XFFHttp_FinishProcess,
XFFHttp_AbortProcess,
//采购通知单 //采购通知单
XFFHttp_savePurchaseNotice, XFFHttp_savePurchaseNotice,
XFFHttp_getPurchaseNoticeList, XFFHttp_getPurchaseNoticeList,
...@@ -167,8 +170,11 @@ static NSString * const ICRHTTPInterface[] = { ...@@ -167,8 +170,11 @@ static NSString * const ICRHTTPInterface[] = {
//商品单位 //商品单位
[XFFHttp_GetProductunit] = @"data/productunit", [XFFHttp_GetProductunit] = @"data/productunit",
//加工单 //加工单
[XFFHttp_QueryProcess ] = @"process/query", [XFFHttp_QueryProcess ] = @"process/query",
[XFFHttp_GetProcess ] = @"process/get", [XFFHttp_GetProcess ] = @"process/get",
[XFFHttp_SaveProcess] = @"process/save",
[XFFHttp_FinishProcess] = @"process/finish",
[XFFHttp_AbortProcess] = @"process/abort",
//采购通知单 //采购通知单
[XFFHttp_savePurchaseNotice] = @"purchase/notice/save", [XFFHttp_savePurchaseNotice] = @"purchase/notice/save",
[XFFHttp_getPurchaseNoticeList] = @"purchase/notice/query", [XFFHttp_getPurchaseNoticeList] = @"purchase/notice/query",
...@@ -1766,6 +1772,44 @@ acceptTypeJson:YES ...@@ -1766,6 +1772,44 @@ acceptTypeJson:YES
} }
//加工单
- (void)p_postFunctionWithAction: (NSUInteger)http_action
authenticode: (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:http_action] 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];
}
//7.1 保存加工单(写) //7.1 保存加工单(写)
- (void)saveProcessWithAuthenticode:(id)data success:(void (^)(id))succ failure:(void (^)(id))fail - (void)saveProcessWithAuthenticode:(id)data success:(void (^)(id))succ failure:(void (^)(id))fail
{ {
...@@ -1791,7 +1835,7 @@ acceptTypeJson:YES ...@@ -1791,7 +1835,7 @@ acceptTypeJson:YES
NSDictionary *dict = data; NSDictionary *dict = data;
NSString *currentTime = [[NSDate date] httpParameterString]; NSString *currentTime = [[NSDate date] httpParameterString];
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance]; ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_SurveySave] stringByAppendingFormat:@"?time=%@&operId=%@&operName=%@",currentTime,userUtil.userCode,userUtil.displayName]; NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_SaveProcess] stringByAppendingFormat:@"?time=%@&operId=%@&operName=%@",currentTime,userUtil.userCode,userUtil.displayName];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[self POST:encodeUrlStr [self POST:encodeUrlStr
parameters:dict parameters:dict
...@@ -1821,14 +1865,9 @@ acceptTypeJson:YES ...@@ -1821,14 +1865,9 @@ acceptTypeJson:YES
NSDictionary *dict = data; NSDictionary *dict = data;
NSString *urlStr = [[self class] UrlForPluginHTTPAction:XFFHttp_QueryProcess ]; NSString *urlStr = [[self class] UrlForPluginHTTPAction:XFFHttp_QueryProcess ];
[self POST:urlStr parameters:dict needToken:NO acceptTypeJson:YES success:success failure:failure]; [self POST:urlStr parameters:dict needToken:NO acceptTypeJson:YES success:success failure:failure];
// [self GET:urlStr
// parameters:dict }
// needToken:NO //7.3 加工单明细(读)
//acceptTypeJson:YES
// success:success
// failure:failure];
}
//7.3 加工单明细(读) [已实现]
- (void)getResultWithProcessUuid:(NSString *)processUuid - (void)getResultWithProcessUuid:(NSString *)processUuid
success:(void (^)(id))succ success:(void (^)(id))succ
failure:(void (^)(id))fail { failure:(void (^)(id))fail {
...@@ -1867,7 +1906,18 @@ acceptTypeJson:YES ...@@ -1867,7 +1906,18 @@ acceptTypeJson:YES
} }
//7.4 7.4 结束加工单(写)
- (void)finishProcessWithAuthenticode:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail {
[self p_postFunctionWithAction:XFFHttp_FinishProcess authenticode:data success:succ failure:fail];
}
//7.5 作废加工单
- (void)abortProcessWithAuthenticode:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail {
}
//添加采购单 //添加采购单
- (void)savePurchaseWithData:(id)data - (void)savePurchaseWithData:(id)data
......
...@@ -445,7 +445,10 @@ ...@@ -445,7 +445,10 @@
value = [value httpParameterString]; value = [value httpParameterString];
} }
if (value) { // if (value) {
if (!value) {
value = [NSNull null];
}
if ([arrCustomKeys containsObject:key] || if ([arrCustomKeys containsObject:key] ||
[arrLocalKeys containsObject:key]) { [arrLocalKeys containsObject:key]) {
continue; continue;
...@@ -455,7 +458,7 @@ ...@@ -455,7 +458,7 @@
[mDict addEntriesFromDictionary:@{key: value}]; [mDict addEntriesFromDictionary:@{key: value}];
} }
} }
} // }
free(properties); free(properties);
return mDict; return mDict;
......
...@@ -424,6 +424,8 @@ typedef enum : NSUInteger { ...@@ -424,6 +424,8 @@ typedef enum : NSUInteger {
if([bill.state isEqualToString:PROCESS_STATE_PROCESSINF]){ if([bill.state isEqualToString:PROCESS_STATE_PROCESSINF]){
GXFNewProcessViewController *newProcessVC = [[GXFNewProcessViewController alloc]initWithProcessUuid:bill.uuid];
[self PushViewController:newProcessVC animated:YES];
} else { } else {
GXFSeeProcessViewController *seeProcessVC = [[GXFSeeProcessViewController alloc]initWithProcessUuid:bill.uuid]; GXFSeeProcessViewController *seeProcessVC = [[GXFSeeProcessViewController alloc]initWithProcessUuid:bill.uuid];
......
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
@interface GXFNewProcessViewController : UIViewController @interface GXFNewProcessViewController : UIViewController
- (instancetype)initWithProcessUuid: (NSString *)processUuid;
@end @end
...@@ -65,16 +65,29 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -65,16 +65,29 @@ typedef NS_ENUM(NSInteger, cellRow) {
@property (nonatomic,assign)BOOL isHiddenEdit; @property (nonatomic,assign)BOOL isHiddenEdit;
@property (nonatomic, copy) NSString *d_processUuid;
@property (nonatomic, assign) BOOL isProccessing;
@end @end
@implementation GXFNewProcessViewController @implementation GXFNewProcessViewController
- (instancetype)initWithProcessUuid:(NSString *)processUuid {
self = [super init];
if (!self) {
return nil;
}
self.d_processUuid = processUuid;
self.isProccessing = YES;
return self;
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.title = @"添加加工单"; self.title = @"添加加工单";
[self http];
[self initData]; [self initData];
[self initSubViews]; [self initSubViews];
...@@ -87,6 +100,57 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -87,6 +100,57 @@ typedef NS_ENUM(NSInteger, cellRow) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(editProduct:) name:KNOTIFICATION_editProduct object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(editProduct:) name:KNOTIFICATION_editProduct object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteProduct:) name:KNOTIFICATION_deleteProduct object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteProduct:) name:KNOTIFICATION_deleteProduct object:nil];
} }
- (void)http{
if (!self.d_materialMuArr) {
self.d_materialMuArr = [NSMutableArray array];
}
if (!self.d_productMuArr) {
self.d_productMuArr = [NSMutableArray array];
}
__weak typeof(self)weakSelf = self;
void (^success)(id) = ^(id data){
[IBTLoadingView hideHUDWithText:nil];
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf fetchDataWithData:data];
};
void (^fail)(id) = ^(id data){
[IBTLoadingView hideHUDWithText:nil];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
[[ICRHTTPController sharedController] getResultWithProcessUuid:_d_processUuid success:success failure:fail];
}
- (void)fetchDataWithData: (id)data {
if (data) {
NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"];
if (success == 1) {
NSDictionary *dict = (NSDictionary *)data[@"data"];
self.d_processBill = [[GXFProcessBill alloc]initWithDict:dict];
NSArray *arrMaterials = dict[@"materials"];
if (arrMaterials.count > 0) {
for (int i = 0; i < arrMaterials.count; i++) {
GXFProcessMaterial *material = [[GXFProcessMaterial alloc]initWithDict:arrMaterials[i]];
[self.d_materialMuArr addObject:material];
}
}
NSArray *arrProducts = dict[@"products"];
if (arrProducts.count > 0) {
for (int i = 0; i < arrMaterials.count; i++) {
GXFProcessProduct *product = [[GXFProcessProduct alloc]initWithDict:arrProducts[i]];
[self.d_productMuArr addObject:product];
}
}
}
}
[self.c_tableView reloadData];
}
//刷新数据 //刷新数据
- (void)p_refreshData { - (void)p_refreshData {
...@@ -140,63 +204,6 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -140,63 +204,6 @@ typedef NS_ENUM(NSInteger, cellRow) {
} }
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(editProduct:) name:KNOTIFICATION_editProduct object:nil];
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteProduct:) name:KNOTIFICATION_deleteProduct object:nil];
//
// //保存
// void(^succ)(id) = ^(id data) {
// [IBTLoadingView hideHUDWithText:nil];
//// if (data) {
//// NSInteger success = [data[@"success"] integerValue];
//// NSString *message = data[@"message"];
//// if (success == 1) {
//// //成功
//// if ([state isEqualToString:@"initial"]) {//保存成功
//// [IBTLoadingView showTips:@"操作成功"];
//// }else{//提交成功
//// SurveyViewController *svc = [SurveyViewController new];
//// [self PushViewController:svc animated:YES];
//// }
//// }else{
//// [IBTLoadingView showTips:message];
//// }
//// }
// };
// void(^fail)(id) = ^(id data) {
// [IBTLoadingView hideHUDWithText:nil];
// [IBTLoadingView showTips:data];
// };
//
//// if(self.survey.uuid.length > 0 && uuidObject == [NSNull null]){
//// uuidObject = self.survey.uuid;
//// }
//// if (self.survey.billNumber > 0 && billNumberObject == [NSNull null]) {
//// billNumberObject = self.survey.billNumber;
//// }
//// if (self.survey && [version integerValue] == 0) {
//// version = self.survey.version;
//// }
//
// NSDictionary *material = @{@"uuid":@"",@"productUuid":@"",@"productCode":@"",@"productName":@"",@"instockDate":@"",@"place":@"",@"quality":@"",@"baseQty":@"",@"basePrice":@"",@"total":@"",@"remark":@"",};
// NSDictionary *product = @{@"uuid":@"",@"productUuid":@"",@"productCode":@"",@"productName":@"",@"instockDate":@"",@"place":@"",@"quality":@"",@"baseQty":@"",@"basePrice":@"",@"total":@"",@"remark":@"",};
// NSDictionary *dict = @{@"uuid":@"",
// @"version":@(0),
// @"billnumber":@"",
// @"title":@"title",//[IBTCommon checkString:self.titleStr],
// @"vendor_uuid":_d_processBill.vendor_uuid,
// @"vendor_code":_d_processBill.vendor_code,
// @"vendor_name":_d_processBill.vendor_name,
// @"warehouse_uuid":_d_processBill.warehouse_uuid,
// @"warehouse_code":_d_processBill.warehouse_code,
// @"warehouse_name":_d_processBill.warehouse_name,
// @"contact":[IBTCommon checkString: _d_processBill.contact],
// @"contactPhone":[IBTCommon checkString:_d_processBill.contact],
// @"total":_d_processBill.total,
// @"remark":[IBTCommon checkString:_d_processBill.remark],
// @"materials":@[material],
// @"products":@[product]};
// //[IBTLoadingView showProgressLabel:msg];
// [[ICRHTTPController sharedController] saveSurveyWithAuthenticode:dict success:succ failure:fail];
} }
- (void)initData { - (void)initData {
...@@ -205,33 +212,19 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -205,33 +212,19 @@ typedef NS_ENUM(NSInteger, cellRow) {
self.d_meteilHeaderArr = @[@"原料",@"基础数量",@"入库时间"]; self.d_meteilHeaderArr = @[@"原料",@"基础数量",@"入库时间"];
self.d_productHeaderArr = @[@"原料",@"基础数量",@"出库时间"]; self.d_productHeaderArr = @[@"原料",@"基础数量",@"出库时间"];
_selectRowArr = [[NSMutableArray alloc]init]; _selectRowArr = [[NSMutableArray alloc]init];
if (!_d_processBill) {
self.d_processBill = [[GXFProcessBill alloc]init];
}
self.d_processBill = [[GXFProcessBill alloc]init]; self.d_processBill = [[GXFProcessBill alloc]init];
if (!self.d_materialMuArr) { if (!self.d_materialMuArr) {
self.d_materialMuArr = [NSMutableArray array]; self.d_materialMuArr = [NSMutableArray array];
} }
// GXFProcessMaterial *processM = [[GXFProcessMaterial alloc]init];
// processM.uuid = @"00";
// processM.productName = @"Material";
// processM.productUuid = @"01";
// processM.baseQty = @(10);
// processM.instockDate = [NSDate date];
// [self.d_materialMuArr addObject:processM];
// [self.d_materialMuArr addObject:processM];
if (!self.d_productMuArr) { if (!self.d_productMuArr) {
self.d_productMuArr = [NSMutableArray array]; self.d_productMuArr = [NSMutableArray array];
} }
// GXFProcessProduct *processP = [[GXFProcessProduct alloc]init];
// processP.uuid = @"11";
// processP.productName = @"product";
// processP.productUuid = @"12";
// processP.baseQty = @(10);
// processP.outstockDate = [NSDate date];
// [self.d_productMuArr addObject:processP];
} }
- (void)initSubViews { - (void)initSubViews {
self.view.backgroundColor = XXFBgColor; self.view.backgroundColor = XXFBgColor;
...@@ -350,6 +343,24 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -350,6 +343,24 @@ typedef NS_ENUM(NSInteger, cellRow) {
if (!xfCell ) { if (!xfCell ) {
xfCell = [[GXFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:noLblCell textFieldPlaceholder:_d_arrRightTableV[indexPath.row] isEdit:YES]; xfCell = [[GXFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:noLblCell textFieldPlaceholder:_d_arrRightTableV[indexPath.row] isEdit:YES];
} }
if (_isProccessing) {
switch (indexPath.row) {
case kTitle:
xfCell.f_textField.text = _d_processBill.title;
break;
case kContact:
xfCell.f_textField.text = _d_processBill.contact;
break;
case kContactPhone:
xfCell.f_textField.text = _d_processBill.contactPhone;
break;
case kRemark:
xfCell.f_textField.text = _d_processBill.remark;
break;
default:
break;
}
}
} else if (indexPath.row == kVendor || indexPath.row ==kWarehouse ) { } else if (indexPath.row == kVendor || indexPath.row ==kWarehouse ) {
xfCell = [tableView dequeueReusableCellWithIdentifier:arrowCell]; xfCell = [tableView dequeueReusableCellWithIdentifier:arrowCell];
if ( !xfCell) { if ( !xfCell) {
...@@ -357,11 +368,27 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -357,11 +368,27 @@ typedef NS_ENUM(NSInteger, cellRow) {
//xfCell = [[GXFTableViewCell alloc]initWithStyle:UITableVie<#(NSString *)#>wCellStyleDefault reuseIdentifier:arrowCell]; //xfCell = [[GXFTableViewCell alloc]initWithStyle:UITableVie<#(NSString *)#>wCellStyleDefault reuseIdentifier:arrowCell];
} }
xfCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; xfCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
if (_isProccessing) {
switch (indexPath.row) {
case kVendor:
xfCell.f_textField.text = _d_processBill.vendor_name;
break;
case kWarehouse:
xfCell.f_textField.text = [NSString stringWithFormat:@"%@[%@]",_d_processBill.warehouse_name,_d_processBill.warehouse_uuid];// _d_processBill.warehouse_name;
break;
default:
break;
}
}
} else if (indexPath.row == kTotal ){ } else if (indexPath.row == kTotal ){
xfCell = [tableView dequeueReusableCellWithIdentifier:lblCell]; xfCell = [tableView dequeueReusableCellWithIdentifier:lblCell];
if (!xfCell ) { if (!xfCell ) {
xfCell = [[GXFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:lblCell textFieldPlaceholder:_d_arrRightTableV[indexPath.row] hasLable:YES backLableText:@"元"]; xfCell = [[GXFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:lblCell textFieldPlaceholder:_d_arrRightTableV[indexPath.row] hasLable:YES backLableText:@"元"];
} }
if (_isProccessing) {
xfCell.f_textField.text = [NSString stringWithFormat:@"%@",_d_processBill.total];
}
} else { } else {
xfCell = [tableView dequeueReusableCellWithIdentifier:noLblCell]; xfCell = [tableView dequeueReusableCellWithIdentifier:noLblCell];
if (!xfCell ) { if (!xfCell ) {
...@@ -667,8 +694,27 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -667,8 +694,27 @@ typedef NS_ENUM(NSInteger, cellRow) {
#pragma GXFBottomViewDelegate #pragma GXFBottomViewDelegate
- (void)bottomViewleftButtonClicked:(UIButton *)leftBtn { - (void)bottomViewleftButtonClicked:(UIButton *)leftBtn {
void(^succ)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
CLog(@"%@",data[@"message"]);};
void(^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTips:data];
};
NSDictionary *material = @{@"basePrice":@"222",@"baseQty":@"3434",@"instockDate":@"2015-09-08 10:24:23",@"place":@"测试",
@"productCode":@"100101",@"productName":@"可比克薯片紫色",@"productUuid":@"5a7417014e29bb2c014e351643f70032",@"quality":@"123",
@"remark":@"",@"total":@"4",@"uuid":[NSNull null]};
NSDictionary *product = @{@"baseQty":@"2344",@"outstockDate":@"2015-09-08 10:24:42",@"productCode":@"农夫山泉",@"productName":@"dd",
@"productUuid":@"402880e64e287fe2014e28895b8a0032",@"qpc":@"123",@"qpcStr":@"1 X123.0",@"quantity":@"234",
@"remark":@"",@"unit":@"篮",@"uuid":[NSNull null]};
NSDictionary *para = @{@"contact":@"222",
@"contactPhone":@"3434",
@"materials":@[material],
@"products":@[product],
@"remark":@"100101",@"title":@"可色",@"total":@"32",@"vendor_code":@"0001",
@"vendor_name":@"卖香蕉的",@"vendor_uuid":@"297e48a24f0e3750014f0e3850a60001",@"version":@"0",@"warehouse_code":@"4028e4284f6e3ce5014f6e41a01b0001",@"warehouse_name":@"123",@"warehouse_uuid":@"123"};
[[ICRHTTPController sharedController] saveProcessWithAuthenticode:para success:succ failure:fail];
} }
- (void)bottomViewRightButtonClicked:(UIButton *)rightBtn { - (void)bottomViewRightButtonClicked:(UIButton *)rightBtn {
CLog(@"ffff"); CLog(@"ffff");
...@@ -746,10 +792,11 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -746,10 +792,11 @@ typedef NS_ENUM(NSInteger, cellRow) {
[materialMuArr addObject:dic];//materialdict]; [materialMuArr addObject:dic];//materialdict];
} }
[IBTLoadingView showProgressLabel:@"正在加载..."];
NSDictionary *dict = @{//@"uuid":@"", NSDictionary *dict = @{
@"version":@(0), // @"uuid":[NSNull null],//[IBTCommon checkString:_d_processBill.uuid],
@"billnumber":@"", @"version":@(0),//@(_d_processBill.version)
// @"billNumber":[NSNull null],//[IBTCommon checkString:_d_processBill.billNumber],
@"title":@"title",//[IBTCommon checkString:self.titleStr], @"title":@"title",//[IBTCommon checkString:self.titleStr],
@"vendor_uuid": _d_processBill.vendor_uuid, @"vendor_uuid": _d_processBill.vendor_uuid,
@"vendor_code": _d_processBill.vendor_code, @"vendor_code": _d_processBill.vendor_code,
...@@ -764,8 +811,8 @@ typedef NS_ENUM(NSInteger, cellRow) { ...@@ -764,8 +811,8 @@ typedef NS_ENUM(NSInteger, cellRow) {
@"materials":materialMuArr, @"materials":materialMuArr,
@"products":productMuArr}; @"products":productMuArr};
//[IBTLoadingView showProgressLabel:msg]; //[IBTLoadingView showProgressLabel:msg];
[[ICRHTTPController sharedController] saveSurveyWithAuthenticode:dict success:succ failure:fail]; [[ICRHTTPController sharedController] saveProcessWithAuthenticode:dict success:succ failure:fail];
//[[ICRHTTPController sharedController] finishProcessWithAuthenticode:dict success:succ failure:fail];
} }
/* /*
......
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
_d_processProduct.productUuid = product.uuid; _d_processProduct.productUuid = product.uuid;
_d_processProduct.productCode = product.code; _d_processProduct.productCode = product.code;
_d_processProduct.productName = product.name; _d_processProduct.productName = product.name;
_d_processProduct.qpcStr = @"";//product.qpcStr;
} }
}; };
[self PushViewController:vc animated:YES]; [self PushViewController:vc animated:YES];
...@@ -250,7 +251,7 @@ ...@@ -250,7 +251,7 @@
// self.d_processProduct.productName = textField.text; // self.d_processProduct.productName = textField.text;
break; break;
case 2: case 2:
self.d_processProduct.unit = textField.text; self.d_processProduct.unit = @"筐";//textField.text;
break; break;
case 3: case 3:
self.d_processProduct.qpc = [NSNumber numberWithFloat:[textField.text floatValue]]; self.d_processProduct.qpc = [NSNumber numberWithFloat:[textField.text floatValue]];
...@@ -280,7 +281,7 @@ ...@@ -280,7 +281,7 @@
- (void)bottomViewRightButtonClicked:(UIButton *)rightBtn { - (void)bottomViewRightButtonClicked:(UIButton *)rightBtn {
self.d_hasSaved = YES; self.d_hasSaved = YES;
[self.c_bottomV.f_rightBtn setBackgroundColor:GXF_GRAY_COLOR]; [self.c_bottomV.f_rightBtn setBackgroundColor:GXF_GRAY_COLOR];
self.d_processProduct.unit = @"筐";
if (_d_isEdited) { if (_d_isEdited) {
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_editProduct object:_d_processProduct]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_editProduct object:_d_processProduct];
} else { } else {
......
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