|
@@ -35,6 +35,7 @@
|
|
|
|
|
|
|
|
- (void)viewDidLoad {
|
|
- (void)viewDidLoad {
|
|
|
[super viewDidLoad];
|
|
[super viewDidLoad];
|
|
|
|
|
+ self.verify_msg0=@"Model does not exist";
|
|
|
// Do any additional setup after loading the view.
|
|
// Do any additional setup after loading the view.
|
|
|
self.noteTextView.layer.borderColor = [UIColor blackColor].CGColor;
|
|
self.noteTextView.layer.borderColor = [UIColor blackColor].CGColor;
|
|
|
self.noteTextView.layer.borderWidth = 1.0f;
|
|
self.noteTextView.layer.borderWidth = 1.0f;
|
|
@@ -103,13 +104,47 @@
|
|
|
[RAUtils message_alert:@"You must take at least one photo." title:@"Warning" controller:self];
|
|
[RAUtils message_alert:@"You must take at least one photo." title:@"Warning" controller:self];
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
|
|
|
|
|
-
|
|
|
|
|
- NSString *manufacturer = self.manufacturer;
|
|
|
|
|
if (self.manufacturerList.count && self.manufacturer.length == 0) {
|
|
if (self.manufacturerList.count && self.manufacturer.length == 0) {
|
|
|
[RAUtils message_alert:@"Manufacturer does not set." title:@"Warning" controller:self];
|
|
[RAUtils message_alert:@"Manufacturer does not set." title:@"Warning" controller:self];
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
|
|
|
|
|
+
|
|
|
|
|
+ NSString* encryptu=[AESCrypt AES128Encrypt:Appdelegate.user key:@"usai"];
|
|
|
|
|
+ NSString* encryptp=[AESCrypt AES128Encrypt:Appdelegate.password key:@"usai"];
|
|
|
|
|
+
|
|
|
|
|
+ NSMutableDictionary* params = [@{
|
|
|
|
|
+ @"user" : encryptu,
|
|
|
|
|
+ @"password" : encryptp,
|
|
|
|
|
+ @"mode":self.name,
|
|
|
|
|
+ @"barcode":self.barcode,
|
|
|
|
|
+ @"_operate":@"valid_upload",
|
|
|
|
|
+ @"platform":@"ios",
|
|
|
|
|
+
|
|
|
|
|
+ } mutableCopy];
|
|
|
|
|
+
|
|
|
|
|
+ NSString *manufacturer = self.manufacturer;
|
|
|
|
|
+
|
|
|
|
|
+ NSString *note = self.noteTextView.text;
|
|
|
|
|
+ if (manufacturer) {
|
|
|
|
|
+ [params setObject:manufacturer forKey:@"manufacturer"];
|
|
|
|
|
+ }
|
|
|
|
|
+ if (note) {
|
|
|
|
|
+ [params setObject:note forKey:@"note"];
|
|
|
|
|
+ }
|
|
|
|
|
+ [self verify:params];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// UploadViewController *upVC = (UploadViewController *)[self viewControllerInStoryboard:@"Upload" withId:@"UploadViewController"];
|
|
|
|
|
+// [self.navigationController pushViewController:upVC animated:YES];
|
|
|
|
|
+}
|
|
|
|
|
+-(void) addTasks
|
|
|
|
|
+{
|
|
|
|
|
+ AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
|
|
|
|
|
+
|
|
|
|
|
+ NSString *manufacturer = self.manufacturer;
|
|
|
|
|
+
|
|
|
NSString *note = self.noteTextView.text;
|
|
NSString *note = self.noteTextView.text;
|
|
|
|
|
|
|
|
//prepare upload
|
|
//prepare upload
|
|
@@ -128,7 +163,7 @@
|
|
|
|
|
|
|
|
task[@"url"]=Appdelegate.address;
|
|
task[@"url"]=Appdelegate.address;
|
|
|
NSString *md5 = [photo objectForKey:@"md5"];
|
|
NSString *md5 = [photo objectForKey:@"md5"];
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
NSString* encryptu=[AESCrypt AES128Encrypt:Appdelegate.user key:@"usai"];
|
|
NSString* encryptu=[AESCrypt AES128Encrypt:Appdelegate.user key:@"usai"];
|
|
|
NSString* encryptp=[AESCrypt AES128Encrypt:Appdelegate.password key:@"usai"];
|
|
NSString* encryptp=[AESCrypt AES128Encrypt:Appdelegate.password key:@"usai"];
|
|
|
NSMutableDictionary* params = [@{
|
|
NSMutableDictionary* params = [@{
|
|
@@ -161,9 +196,6 @@
|
|
|
[Appdelegate.uploadManager addTasks:tasks];
|
|
[Appdelegate.uploadManager addTasks:tasks];
|
|
|
|
|
|
|
|
[self clear];
|
|
[self clear];
|
|
|
-
|
|
|
|
|
-// UploadViewController *upVC = (UploadViewController *)[self viewControllerInStoryboard:@"Upload" withId:@"UploadViewController"];
|
|
|
|
|
-// [self.navigationController pushViewController:upVC animated:YES];
|
|
|
|
|
}
|
|
}
|
|
|
- (IBAction)typeBtnClick:(UIButton *)sender {
|
|
- (IBAction)typeBtnClick:(UIButton *)sender {
|
|
|
[self showBarcodeInput:UIKeyboardTypeDefault];
|
|
[self showBarcodeInput:UIKeyboardTypeDefault];
|