| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541 |
- //
- // ProductSearchViewController.m
- // IBOSSmini
- //
- // Created by guan hong hou on 2017/5/16.
- // Copyright © 2017年 elongtian. All rights reserved.
- //
- #import "ProductSearchViewController.h"
- #import "GoodsSearchCell.h"
- #import "SBJsonWriter.h"
- #import "ShopCartViewController.h"
- #import "ScanViewController.h"
- #import "GoodsDetailViewController.h"
- @interface ProductSearchViewController (){
- MBProgressHUD *HUD;
- }
- @end
- @implementation ProductSearchViewController
- #pragma mark - 公共函数
- /**
- viewDidLoad函数
- */
- - (void)viewDidLoad {
- [super viewDidLoad];
- [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
- [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
- [self initUI];
- _orderArr=[NSMutableArray new];
- _goodsModel=[GoodsSearchModel new];
- _orderTempFilterArry=[NSMutableArray new];
- }
- #pragma mark -委托回调函数
- //购物车加载完成函数
- - (void)onCartLoadFinish:(ASIDownManager *)sender {
-
- NSDictionary *dic = [sender.mWebStr JSONValue];
- [HUD hide:YES];
- if (dic && [dic isKindOfClass:[NSDictionary class]]) {
- int iStatus = [[dic objectForKey:@"Status"] intValue];
- NSString *message=[dic objectForKey:@"Message"];
- if (iStatus == 0) {
-
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:@"操作成功" preferredStyle:UIAlertControllerStyleAlert];
- UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"继续操作" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-
- }];
- UIColor *cancelColor=[UIColor blackColor];
- UIColor *sureColor=[UIColor redColor];
- [cancelAction setValue:cancelColor forKey:@"titleTextColor"];
- UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"去购物车"
- style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
- self.cNav.visibleViewController.hidesBottomBarWhenPushed=YES;
- ShopCartViewController *detailVC=[[ShopCartViewController alloc] init];
- [self.cNav setNavigationBarHidden:NO animated:YES];
- [self.cNav pushViewController:detailVC animated:YES];
- }];
- [otherAction setValue:sureColor forKey:@"titleTextColor"];
-
-
- [alertController addAction:otherAction];
- [alertController addAction:cancelAction];
- [self presentViewController:alertController animated:YES completion:nil];
-
- }
-
- else if(iStatus==ActionResultStatusAuthError
- ||iStatus==ActionResultStatusNoLogin
- ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
- [self showReLoginDialog:message];
- return;
- }
-
-
- else {
- [self showAlertViewText:message];
- }
-
- }
- }
- /**
- 修改:2017-9-25
- 适配机型
- 安全区视图发生变化
- */
- -(void)viewSafeAreaInsetsDidChange{
- _tbView.frame=CGRectMake(0,CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame), SCREENWIDTH,self.view.superview.frame.size.height-CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame));
-
- [super viewSafeAreaInsetsDidChange];
- }
- //购物车加载失败函数
- - (void)onCartLoadFail:(ASIDownManager *)sender {
- [self cancel];
- [self showAlertViewText:@"请求失败"];
- }
- //文本编辑回調函数
- -(void)textValueChange:(GoodsSearchCell*)cell txtField:(UITextField*)txtfield
- {
- [_goodsModel updateCellSaleText:txtfield checkeId:cell.lblInventoryId.text];
-
-
- }
- //弹出消息回调
- -(void)alertMessage:(NSString*)message{
- [self showAlertViewText:message];
- return;
- }
- //文本编辑回车事件回调函数
- - (BOOL)textFieldShouldReturn:(UITextField *)textField{
-
- if(textField ==_onlyCodeTxt){
- if(textField.text.length==0)
- {
- [self showAlertViewText:@"商品编码和唯一编码不能都为空"];
- return YES;
- }
- [self.view endEditing:YES];
-
- [self reloadData];
- }
-
- return YES;
- }
- //扫描回调函数
- -(void)reloadDataWithOnlyCode:(NSString *)code
- {
- _onlyCodeTxt.text=code;
- [self reloadScanData];
-
-
- }
- //加载数据完成函数
- - (void)onLoadFinish:(ASIDownManager *)sender {
- NSDictionary *dic = [sender.mWebStr JSONValue];
- [self cancel];
- if (dic && [dic isKindOfClass:[NSDictionary class]]) {
- int iStatus = [[dic objectForKey:@"Status"] intValue];
- NSString *message=[dic objectForKey:@"Message"];
- _tbView.backgroundView=nil;
- if (iStatus == 0) {
- NSArray * approvArr=[dic objectForKey:@"Result"];
- if(approvArr!=nil)
- {
- [_orderArr removeAllObjects];
- _orderArr=[[NSMutableArray alloc]initWithArray:approvArr];
- if(_orderArr.count==0){
- UIView *noDataView = [[UIView alloc]init];
- noDataView.frame = _tbView.bounds;
- UIImageView *nodataImgView = [[UIImageView alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16,noDataView.frame.size.height/2-16,32,32)];
- [nodataImgView setImage:[UIImage imageNamed:@"icon_no_data"]];
- [noDataView addSubview:nodataImgView];
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16-12,CGRectGetMaxY(nodataImgView.frame)+3,70, 25)];
- label.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- label.text = @"无数据";
- label.numberOfLines = 2;
- label.textColor = [UIColor lightGrayColor];
- [noDataView addSubview:label];
- _tbView.backgroundView=noDataView;
- [_tbView reloadData];
- [self showAlertViewText:@"未找到匹配结果"];
- return;
- }
- _separatorView.hidden=NO;
- [_goodsModel parseWorkFlowArr:_orderArr];
-
- if(_goodsModel.workflowArr!=nil&&_goodsModel.workflowArr.count>0){
- _orderFilterArry=[[NSMutableArray alloc] initWithArray:_goodsModel.workflowArr copyItems:YES];
- }
- _filterHeight=50;
- _vFilterZeroCanSalesQuantity.frame=CGRectMake(0, CGRectGetMaxY(_separatorView.frame), Screen_Width, _filterHeight);
- [_btnFilterZeroCanSalesQuantity setBackgroundImage:[UIImage imageNamed:@"unck_round"] forState:UIControlStateNormal];
- _isFilterCanSalesQuantity=NO;
- if(IsiPhoneX){
- _tbView.frame=CGRectMake(0,CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame), Screen_Width,self.view.superview.frame.size.height-CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame));
-
- }
- else{
- _tbView.frame=CGRectMake(0,CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame), Screen_Width,self.view.frame.size.height-CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame)-105);
-
- }
-
- [_tbView reloadData];
- }
- }
- else if(iStatus==ActionResultStatusAuthError
- ||iStatus==ActionResultStatusNoLogin
- ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
- [self showReLoginDialog:message];
- return;
- }
-
- else {
- [_tbView reloadData];
- [self showAlertViewText:message];
-
-
- }
-
- }
- }
- //tableviewcell的高度
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- OrderSearchFrame *infoFrame=_goodsModel.workflowArr[indexPath.row];
- return infoFrame.cellHeight;
- }
- //tableview的分区数
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 1;
- }
- //tableview的行数
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
- return [_goodsModel.workflowArr count];
- }
- //获取tableviewcell
- -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
- static NSString *CellIdentifier = @"GoodsSearchCell";
- GoodsSearchCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-
- cell=[[ GoodsSearchCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
-
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- cell.delegate=self;
- OrderSearchFrame *infoFrame=_goodsModel.workflowArr[indexPath.row];
- [cell parseOrderInfo:infoFrame];
-
- return cell;
- }
- //行点击事件
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
- {
- self.hidesBottomBarWhenPushed=YES;
- GoodsDetailViewController *detailVC=[[GoodsDetailViewController alloc] init];
- // NSDictionary *dic= _orderArr[indexPath.row];
- OrderSearchFrame *infoFrame=_goodsModel.workflowArr[indexPath.row];
- GoodsSearchItemModel *searchItemModel= infoFrame.searchModel;
- int orderIdValue=[searchItemModel.inventoryID intValue];
- NSString *orderId= [NSString stringWithFormat:@"%d",orderIdValue];
- detailVC.inventoryId=orderId;
- self.cNav.visibleViewController.hidesBottomBarWhenPushed=YES;
- [self.cNav pushViewController:detailVC animated:YES];
-
-
- }
- //scrollview的委托函数
- -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- {
- [self.view endEditing:YES];
- }
- //scrollview的开始拖拽函数
- - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
- [self.view endEditing:YES];
- }
- //数据加载失败函数
- - (void)onLoadFail:(ASIDownManager *)sender {
- [self cancel];
- [self showAlertViewText:@"加载失败"];
- }
- //初始化UI函数
- -(void)initUI{
- self.view.backgroundColor=[UIColor whiteColor];
- UIView *searchView = [[UIView alloc] init];
- searchView.frame = CGRectMake(15,10,Screen_Width-70,35);
- searchView.backgroundColor = [UIColor colorWithRed:232.0/255.0 green:233.0/255.0 blue:235.0/255.0 alpha:1];
- searchView.layer.cornerRadius = 10;
- searchView.layer.masksToBounds = YES;
- UILabel* lblOnlyCode=[[UILabel alloc] init];
- lblOnlyCode.frame=CGRectMake(10, 5,80, 25);
- lblOnlyCode.text=@"唯一编码:";
- lblOnlyCode.font=orderTextFont;
- [searchView addSubview:lblOnlyCode];
- _onlyCodeTxt=[[UITextField alloc] init];
- _onlyCodeTxt.frame=CGRectMake(CGRectGetMaxX(lblOnlyCode.frame), 5, 150, 25);
- _onlyCodeTxt.textColor=[UIColor blackColor];
- _onlyCodeTxt.placeholder=@"请输入或扫描唯一编码";
- _onlyCodeTxt.font=orderTextFont;
- _onlyCodeTxt.delegate=self;
- [searchView addSubview:_onlyCodeTxt];
-
- _scanBtn=[UIButton buttonWithType:UIButtonTypeCustom];
- _scanBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
- _scanBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
- _scanBtn.frame=CGRectMake(Screen_Width-40,15, 25, 25);
- UIImage *backgroundImg = [UIImage imageNamed:@"icon_scan"];
- [_scanBtn setBackgroundImage:backgroundImg forState:UIControlStateNormal];
- [_scanBtn addTarget:self action:@selector(goScan) forControlEvents:UIControlEventTouchUpInside];
- [self.view addSubview:searchView];
- [self.view addSubview:_scanBtn];
- _separatorView = [[UIView alloc] init];
- _separatorView.frame = CGRectMake(0,CGRectGetMaxY(searchView.frame)+10,Screen_Width,10);
- _separatorView.backgroundColor = LineBackgroundColor;
- [self.view addSubview:_separatorView];
-
- _vFilterZeroCanSalesQuantity=[[UIView alloc]init];
- _filterHeight=0;
- _vFilterZeroCanSalesQuantity.frame=CGRectMake(0, CGRectGetMaxY(_separatorView.frame), Screen_Width, _filterHeight);
- [self.view addSubview:_vFilterZeroCanSalesQuantity];
- _btnFilterZeroCanSalesQuantity=[UIButton buttonWithType:UIButtonTypeCustom];
- _btnFilterZeroCanSalesQuantity.frame=CGRectMake(Screen_Width/2-70,11,16,16);
- [_btnFilterZeroCanSalesQuantity setBackgroundImage:[UIImage imageNamed:@"unck_round"] forState:UIControlStateNormal];
- [_btnFilterZeroCanSalesQuantity addTarget:self action:@selector(filterZeroCanSalesQuantity)
- forControlEvents:UIControlEventTouchUpInside];
- _isFilterCanSalesQuantity=NO;
- [_vFilterZeroCanSalesQuantity addSubview:_btnFilterZeroCanSalesQuantity];
- _lblFilterZeroCanSalesQuantity=[UILabel new];
- _lblFilterZeroCanSalesQuantity.frame=CGRectMake(CGRectGetMaxX(_btnFilterZeroCanSalesQuantity.frame)+3,7, 120, 25);
- _lblFilterZeroCanSalesQuantity.text=@"过滤零可售量";
- _lblFilterZeroCanSalesQuantity.font=orderTextFont;
- _lblFilterZeroCanSalesQuantity.textColor=[UIColor blackColor];
- UITapGestureRecognizer *tapRecognizerCustomerArea=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(filterZeroCanSalesQuantity)];
- _lblFilterZeroCanSalesQuantity.userInteractionEnabled=YES;
- [_lblFilterZeroCanSalesQuantity addGestureRecognizer:tapRecognizerCustomerArea];
- _middleSeparatorView = [[UIView alloc] init];
- _middleSeparatorView.frame = CGRectMake(0,40,Screen_Width,10);
- _middleSeparatorView.backgroundColor = LineBackgroundColor;
- [_vFilterZeroCanSalesQuantity addSubview:_middleSeparatorView];
- [_vFilterZeroCanSalesQuantity addSubview:_lblFilterZeroCanSalesQuantity];
-
- _tbView=[UITableView new];
- if(IsiPhoneX){
- _tbView.frame=CGRectMake(0,CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame), Screen_Width,self.view.superview.frame.size.height-CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame));
- }
- else{
- _tbView.frame=CGRectMake(0,CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame), Screen_Width,self.view.frame.size.height-CGRectGetMaxY(_vFilterZeroCanSalesQuantity.frame)-105);
- }
-
- _tbView.delegate=self;
- _tbView.separatorStyle=UITableViewCellSeparatorStyleNone;
- _tbView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
- _tbView.dataSource=self;
- _tbView.userInteractionEnabled=YES;
- [self.view addSubview:_tbView];
-
- }
- /**
- 键盘弹出
-
- @param note <#note description#>
- */
- -(void)keyboardWillShow:(NSNotification *)note
- {
- CGRect keyBoardRect=[note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
- _tbView.contentInset = UIEdgeInsetsMake(0, 0, keyBoardRect.size.height, 0);
- }
- /**
- 键盘隐藏
- @param note <#note description#>
- */
- -(void)keyboardWillHide:(NSNotification *)note
- {
- _tbView.contentInset = UIEdgeInsetsZero;
- }
- -(void)filterZeroCanSalesQuantity{
- if(_goodsModel.workflowArr!=nil&&_goodsModel.workflowArr.count>0){
- [_goodsModel.workflowArr removeAllObjects];
- }
-
- if(_orderTempFilterArry!=nil&&_orderTempFilterArry.count){
- [_orderTempFilterArry removeAllObjects];
- }
-
- if(_tbView!=nil){
- [_tbView reloadData];
- }
-
-
- if(!_isFilterCanSalesQuantity){
- [_btnFilterZeroCanSalesQuantity setBackgroundImage:[UIImage imageNamed:@"ck_round"] forState:UIControlStateNormal];
- _isFilterCanSalesQuantity=YES;
- if(_orderFilterArry!=nil&&_orderFilterArry.count>0){
- for(OrderSearchFrame *frame in _orderFilterArry){
- GoodsSearchItemModel *searchModel= frame.searchModel;
- NSString *balanceQuantity= searchModel.balanceQuantity;
- double balanceQuantityValue= [balanceQuantity doubleValue];
- if(balanceQuantityValue!=0){
- [_orderTempFilterArry addObject:frame];
- }
- }
- _goodsModel.workflowArr=[[NSMutableArray alloc] initWithArray:_orderTempFilterArry copyItems:YES];
- [_tbView reloadData];
- }
-
- }
- else{
-
- [_btnFilterZeroCanSalesQuantity setBackgroundImage:[UIImage imageNamed:@"unck_round"] forState:UIControlStateNormal];
- _isFilterCanSalesQuantity=NO;
- _goodsModel.workflowArr=[[NSMutableArray alloc] initWithArray:_orderFilterArry copyItems:YES];
- [_tbView reloadData];
- }
- }
- //扫描函数
- -(void)goScan{
-
- ScanViewController * rt = [[ScanViewController alloc]init];
- rt.rootVC=self;
- self.cNav.visibleViewController.hidesBottomBarWhenPushed=YES;
- [self.cNav pushViewController:rt animated:YES];
-
-
-
- }
- //加入购物车函数
- -(void)joinCart:(GoodsSearchItemModel *)searchItem{
- NSString *salesQuantity= searchItem.salesQuantity;
- if(salesQuantity!=nil){
- double salesQuantityValue= salesQuantity.doubleValue;
- if(salesQuantityValue==0){
- [self showAlertViewText:@"商品的数量不能为0"];
- return;
- }
- else if(salesQuantityValue>MAXIMUM_QUANTITY){
- [self showAlertViewText:@"商品超过最大数量9999999999.999999"];
- return;
- }
- self.mDownManager = [[ASIDownManager alloc] init];
- _mDownManager.delegate = self;
- _mDownManager.OnImageDown = @selector(onCartLoadFinish:);
- _mDownManager.OnImageFail = @selector(onCartLoadFail:);
- HUD = [[MBProgressHUD alloc] initWithView:self.view];
- [self.view addSubview:HUD];
- HUD.dimBackground = YES;
- HUD.labelText = @"正在加入购物车";
- [HUD show:YES];
-
- NSString *urlStr = ServerURL;
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"SaveOrderShoppingCart" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:@"1" forKey:@"SaveFlag"]; // 1为新建;2为编辑
- NSMutableArray *goodsArr=[NSMutableArray new];
-
- NSDictionary *dic=[NSDictionary new];
- NSString *code=searchItem.code;
- NSString *onlyCode=searchItem.onlyCode;
- NSString *brandName=searchItem.brandName;
- NSString *gradeName=searchItem.gradeName;
- NSString *specification=searchItem.specification;
- NSString *colorNumber=searchItem.colorNumber;
- NSString *warehouseName=searchItem.warehouseName;
- NSString *positionNumber=searchItem.positionNumber;
- NSString *balanceQuantity=searchItem.balanceQuantity;
- NSString *inventoryID=searchItem.inventoryID;
- NSString *salesQuantity=searchItem.salesQuantity;
- NSString *salesPrice=searchItem.salesPrice;
- NSString *remarks=searchItem.remarks;
- dic=@{@"Code":code,@"OnlyCode":onlyCode,@"BrandName":brandName,@"GradeName":gradeName,@"Specification":specification,@"ColorNumber":colorNumber,@"WarehouseName":warehouseName,@"PositionNumber":positionNumber,@"BalanceQuantity":balanceQuantity,@"InventoryID":inventoryID,@"SalesQuantity":salesQuantity,@"SalesPrice":salesPrice,@"Remarks":remarks};
- [goodsArr addObject:dic];
-
-
-
- SBJsonWriter *write = [[SBJsonWriter alloc] init];
- NSString *value = [write stringWithObject:goodsArr];
- [dict setObject:value forKey:@"ShoppingCartData"];
- [_mDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
-
-
- }
- }
- //加载扫描函数
- -(void)reloadScanData
- {
- [self startLoading];
- NSString *urlStr = ServerURL;
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetInventoryByScan" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:@"" forKey:@"Code"];
- [dict setObject:_onlyCodeTxt.text forKey:@"OnlyCode"];
- [dict setObject:@"" forKey:@"ColorNumber"];
- [dict setObject:@"" forKey:@"WarehouseCode"];
- [dict setObject:@"" forKey:@"Specification"];
- self.mDownManager = [[ASIDownManager alloc] init];
- _mDownManager.delegate = self;
- _mDownManager.OnImageDown = @selector(onLoadFinish:);
- _mDownManager.OnImageFail = @selector(onLoadFail:);
- [_mDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
-
- }
- //加载扫描函数
- -(void)reloadData
- {
- [self startLoading];
- NSString *urlStr = ServerURL;
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetInventoryIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:@"" forKey:@"Code"];
- [dict setObject:_onlyCodeTxt.text forKey:@"OnlyCode"];
- [dict setObject:@"" forKey:@"ColorNumber"];
- [dict setObject:@"" forKey:@"WarehouseCode"];
- [dict setObject:@"" forKey:@"Specification"];
- self.mDownManager = [[ASIDownManager alloc] init];
- _mDownManager.delegate = self;
- _mDownManager.OnImageDown = @selector(onLoadFinish:);
- _mDownManager.OnImageFail = @selector(onLoadFail:);
- [_mDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
-
- }
- //进度条取消函数
- - (void)cancel {
- [self stopLoading];
- }
- @end
|