| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562 |
- //
- // NewSalesOutStorageListVC.m
- // IBOSSmini
- //
- // Created by guan hong hou on 2018/4/12.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "NewSalesOutStorageListVC.h"
- @interface NewSalesOutStorageListVC (){
- UIScrollView *_scrollView;
- }
- @end
- UITextField *_selectedAchievementField;
- CGRect originalAchievementFrame;
- @implementation NewSalesOutStorageListVC
- #pragma mark 公共函数
- /**
- 视图加载完成函数
- */
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self initUI];
- self.goodsDetailVc.goodsList=[[NSMutableArray alloc]init];
- [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
-
- [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
- [self initSlideSlip];
-
-
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
-
- }
- /**
- 安全区变化函数
- */
- -(void)viewSafeAreaInsetsDidChange{
- _scrollView.frame=CGRectMake(0, CGRectGetMaxY(_middleSeparatorView.frame), Screen_Width,self.view.safeAreaLayoutGuide.layoutFrame.size.height-CGRectGetMaxY(_middleSeparatorView.frame));
- [super viewSafeAreaInsetsDidChange];
- }
- #pragma mark 委托函数
- /**
- 销售单列表回调函数
- @param checkedSalesSlipList <#checkedSalesSlipList description#>
- */
- -(void) getSelectedSalesSlipList:(NSMutableArray *)checkedSalesSlipList{
- _salesSlipListModel=[checkedSalesSlipList objectAtIndex:0];
- _lblCustomerCode.text=_salesSlipListModel.customerCode;
- _lblCustomerName.text=_salesSlipListModel.customerName;
- _lblTelephone.text=_salesSlipListModel.telephone;
- _lblCustomerAddress.text=_salesSlipListModel.customerAddress;
- if(checkedSalesSlipList!=nil&&checkedSalesSlipList.count>0){
-
- for(SalesOutStorageSalesSlipModel *salesSlipModel in checkedSalesSlipList){
- if(salesSlipModel.goodsDetailArray!=nil&&salesSlipModel.goodsDetailArray.count>0){
-
- for( SalesOutStorageSalesSlipGoodsListModel *goodsModel in salesSlipModel.goodsDetailArray){
- if(goodsModel.checkedFlag){
- [self.goodsDetailVc.goodsList addObject:goodsModel];
- }
- }
- }
- }
- [self.goodsDetailVc.vTableView reloadData];
- }
-
-
- }
- /**
- textfield委托回调
- @param textField <#textField description#>
- @return <#return value description#>
- */
- -(BOOL)textFieldShouldBeginEditing:(UITextField *)textField
- {
- _selectedAchievementField = textField;
- return YES;
- }
- /**
- 司机,装卸工人等返回回调
-
- @param model <#model description#>
- @param cr <#cr description#>
- */
- - (void)customerReportTextDoneDatas:(CustomerReportTextInfoModel *)model CustomerReport:(CustomerReport)cr
- {
- if (model==nil) {
- return;
- }
- //渠道返回值
- if(cr==ReportDriver){
- _driverId=model.idCode;
- _driverName=model.name;
- _lblDriver.text=_driverName;
- }
-
- if(cr==ReportDocker){
- _dockerId=model.idCode;
- _dockerName=model.name;
- _lblDocker.text=_dockerName;
- }
-
- }
- #pragma mark 私有函数
- /**
- 初始化UI
- */
- -(void)initUI{
- [self.view setBackgroundColor:[UIColor whiteColor]];
- UIView *topSeparatorView = [UIView new];
- topSeparatorView.frame=CGRectMake(0,3, Screen_Width, 10);
- topSeparatorView.backgroundColor = LineBackgroundColor;
- [self.view addSubview:topSeparatorView];
- CGFloat height = 40;
- UIView *searchView = [[UIView alloc]initWithFrame:CGRectMake(0,CGRectGetMaxY(topSeparatorView.frame)+5, Screen_Width, 50)];
- searchView.backgroundColor = [UIColor whiteColor];
- _btnSearch = [UIButton buttonWithType:UIButtonTypeCustom];
- _btnSearch.frame = CGRectMake(5, 5, Screen_Width-45, height);
- _btnSearch.layer.cornerRadius = 6.0f;
- [_btnSearch setTitle:@"搜索销售单" forState:UIControlStateNormal];
- [_btnSearch setTitleColor:NavBarUnEnbleItemColor forState:UIControlStateNormal];
- _btnSearch.titleLabel.textAlignment = NSTextAlignmentCenter;
- _btnSearch.titleLabel.font = [UIFont systemFontOfSize:LabelAndTextFontOfSize];
- _btnSearch.backgroundColor = LineBackgroundColor;
- [_btnSearch addTarget:self action:@selector(goodsSearch) forControlEvents:UIControlEventTouchUpInside];
- [searchView addSubview:_btnSearch];
- [self.view addSubview:searchView];
-
- UIButton *scan=[UIButton buttonWithType:UIButtonTypeCustom];
- scan.frame=CGRectMake(searchView.frame.size.width-35,8,35,35);
- scan.contentHorizontalAlignment=UIControlContentHorizontalAlignmentRight;
- [scan setImage:[UIImage imageNamed:@"scan"] forState:UIControlStateNormal];
- [searchView addSubview:scan];
- [scan addTarget:self action:@selector(btnScanCilck) forControlEvents:UIControlEventTouchUpInside];
- _middleSeparatorView = [UIView new];
- _middleSeparatorView.frame=CGRectMake(0, CGRectGetMaxY(searchView.frame)+5, Screen_Width, 10);
- _middleSeparatorView.backgroundColor = LineBackgroundColor;
- [self.view addSubview:_middleSeparatorView];
-
- [self.view setBackgroundColor:[UIColor whiteColor]];
- CGFloat heightRow = 40;
- CGFloat lblx = 20;
- CGFloat lbly = 8;
- CGFloat lblwidth = 80;
- CGFloat lblheight = 25;
- _scrollView=[UIScrollView new];
- _scrollView.frame=CGRectMake(0, CGRectGetMaxY(_middleSeparatorView.frame), Screen_Width,self.view.frame.size.height-CGRectGetMaxY(_middleSeparatorView.frame));
- [self.view addSubview:_scrollView];
- UIView *vBody = [UIView new];
- [_scrollView addSubview:vBody];
-
- UITapGestureRecognizer* singleRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKey)];
-
- [self.view addGestureRecognizer:singleRecognizer];
-
- UIView *vOutStorageNo = [UIView new];
- vOutStorageNo.frame=CGRectMake(0,0, Screen_Width, heightRow);
- [vBody addSubview:vOutStorageNo];
-
- NSString *outStorageNoTitle=@"出库单号";
- UILabel *lblTitleOutStorageNo=[UILabel new];
- lblTitleOutStorageNo.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblTitleOutStorageNo.textColor = [UIColor blackColor];
- lblTitleOutStorageNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vOutStorageNo addSubview:lblTitleOutStorageNo];
- lblTitleOutStorageNo.text=outStorageNoTitle;
-
- _lblOutStorageNo = [UILabel new];
- _lblOutStorageNo.frame=CGRectMake(CGRectGetMaxX(lblTitleOutStorageNo.frame), lbly,Screen_Width-CGRectGetMaxX(lblTitleOutStorageNo.frame)-10, lblheight);
- _lblOutStorageNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vOutStorageNo addSubview:_lblOutStorageNo];
- UIView *outStorageNoSeparator=[UIView new];
- outStorageNoSeparator.backgroundColor=LineBackgroundColor;
- outStorageNoSeparator.frame=CGRectMake(CGRectGetMaxX(lblTitleOutStorageNo.frame),heightRow,Screen_Width-CGRectGetMaxX(lblTitleOutStorageNo.frame),1);
- [vOutStorageNo addSubview:outStorageNoSeparator];
-
- UIView *vCustomerCode = [UIView new];
- vCustomerCode.frame=CGRectMake(0,CGRectGetMaxY(vOutStorageNo.frame), Screen_Width, heightRow);
- [vBody addSubview:vCustomerCode];
-
- NSString *customerCodeTitle=@"客户编码";
- UILabel *lblTitleCustomerCode=[UILabel new];
- lblTitleCustomerCode.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblTitleCustomerCode.textColor = [UIColor blackColor];
- lblTitleCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerCode addSubview:lblTitleCustomerCode];
- lblTitleCustomerCode.text=customerCodeTitle;
-
- _lblCustomerCode = [UILabel new];
- _lblCustomerCode.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerCode.frame), lbly,Screen_Width-CGRectGetMaxX(lblTitleCustomerCode.frame)-10, lblheight);
- _lblCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerCode addSubview:_lblCustomerCode];
- UIView *customerCodeSeparator=[UIView new];
- customerCodeSeparator.backgroundColor=LineBackgroundColor;
- customerCodeSeparator.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerCode.frame),heightRow,Screen_Width-CGRectGetMaxX(lblTitleCustomerCode.frame),1);
- [vCustomerCode addSubview:customerCodeSeparator];
-
- UIView *vCustomerName = [UIView new];
- vCustomerName.frame=CGRectMake(0,CGRectGetMaxY(vCustomerCode.frame), Screen_Width, heightRow);
- [vBody addSubview:vCustomerName];
-
- NSString *customerNameTitle=@"客户名称";
- UILabel *lblTitleCustomerName=[UILabel new];
- lblTitleCustomerName.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblTitleCustomerName.textColor = [UIColor blackColor];
- lblTitleCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerName addSubview:lblTitleCustomerName];
- lblTitleCustomerName.text=customerNameTitle;
-
- _lblCustomerName = [UILabel new];
- _lblCustomerName.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerName.frame), lbly,Screen_Width-CGRectGetMaxX(lblTitleCustomerName.frame)-10, lblheight);
- _lblCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerName addSubview:_lblCustomerName];
- UIView *customerNameSeparator=[UIView new];
- customerNameSeparator.backgroundColor=LineBackgroundColor;
- customerNameSeparator.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerName.frame),heightRow,Screen_Width-CGRectGetMaxX(lblTitleCustomerName.frame),1);
- [vCustomerName addSubview:customerNameSeparator];
-
- UIView *vTelephone = [UIView new];
- vTelephone.frame=CGRectMake(0,CGRectGetMaxY(vCustomerName.frame), Screen_Width, heightRow);
- [vBody addSubview:vTelephone];
-
- NSString *telephoneTitle=@"联系电话";
- UILabel *lblTitleTelephone=[UILabel new];
- lblTitleTelephone.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblTitleTelephone.textColor = [UIColor blackColor];
- lblTitleTelephone.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vTelephone addSubview:lblTitleTelephone];
- lblTitleTelephone.text=telephoneTitle;
-
- _lblTelephone = [UILabel new];
- _lblTelephone.frame=CGRectMake(CGRectGetMaxX(lblTitleTelephone.frame), lbly,Screen_Width-CGRectGetMaxX(lblTitleTelephone.frame)-10, lblheight);
- _lblTelephone.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vTelephone addSubview:_lblTelephone];
- UIView *telephoneSeparator=[UIView new];
- telephoneSeparator.backgroundColor=LineBackgroundColor;
- telephoneSeparator.frame=CGRectMake(CGRectGetMaxX(lblTitleTelephone.frame),heightRow,Screen_Width-CGRectGetMaxX(lblTitleTelephone.frame),1);
- [vTelephone addSubview:telephoneSeparator];
-
- UIView *vDriver = [UIView new];
- vDriver.frame=CGRectMake(0,CGRectGetMaxY(vTelephone.frame), Screen_Width, heightRow);
- [vBody addSubview:vDriver];
- NSString *driverTitle=@"运输司机";
- UILabel *lblTitleDriver=[UILabel new];
- lblTitleDriver.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblTitleDriver.textColor = [UIColor blackColor];
- lblTitleDriver.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vDriver addSubview:lblTitleDriver];
- lblTitleDriver.text=driverTitle;
- _lblDriver = [UILabel new];
- _lblDriver.frame=CGRectMake(CGRectGetMaxX(lblTitleDriver.frame), lbly,Screen_Width-CGRectGetMaxX(lblTitleDriver.frame)-55, lblheight);
- _lblDriver.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- _lblDriver.text=@"请选择运输司机";
- _lblDriver.textColor=LabelGrayTextColor;
- _lblDriver.userInteractionEnabled=YES;
- UITapGestureRecognizer *driverTapGesture=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(goDriver:)];
- [_lblDriver addGestureRecognizer:driverTapGesture];
- [vDriver addSubview:_lblDriver];
- UIButton *btnDriverRightArrow = [UIButton buttonWithType:UIButtonTypeCustom];
- btnDriverRightArrow.frame=CGRectMake(Screen_Width-50,lbly,32,30);
- UIImageView *rightArrowImg = [[UIImageView alloc]initWithFrame:CGRectMake(25,9,7, 12)];
- [rightArrowImg setImage:[UIImage imageNamed:@"rightarrow"]];
- [ btnDriverRightArrow addSubview:rightArrowImg];
- rightArrowImg.userInteractionEnabled=NO;
- [vDriver addSubview:btnDriverRightArrow];
- UIView *driverSeparator=[UIView new];
- driverSeparator.backgroundColor=LineBackgroundColor;
- driverSeparator.frame=CGRectMake(CGRectGetMaxX(lblTitleDriver.frame),heightRow,Screen_Width-CGRectGetMaxX(lblTitleDriver.frame),1);
- [vDriver addSubview:driverSeparator];
-
-
- UIView *vDocker = [UIView new];
- vDocker.frame=CGRectMake(0,CGRectGetMaxY(vDriver.frame), Screen_Width, heightRow);
- [vBody addSubview:vDocker];
- NSString *dockerTitle=@"装卸工人";
- UILabel *lblTitleDocker=[UILabel new];
- lblTitleDocker.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblTitleDocker.textColor = [UIColor blackColor];
- lblTitleDocker.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vDocker addSubview:lblTitleDocker];
- lblTitleDocker.text=dockerTitle;
-
- _lblDocker = [UILabel new];
- _lblDocker.frame=CGRectMake(CGRectGetMaxX(lblTitleDocker.frame), lbly,Screen_Width-CGRectGetMaxX(lblTitleDocker.frame)-55, lblheight);
- _lblDocker.textColor=LabelGrayTextColor;
- _lblDocker.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- _lblDocker.text=@"请选择装卸工人";
- _lblDocker.userInteractionEnabled=YES;
- UITapGestureRecognizer *dockerTapGesture=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(goDocker:)];
- [_lblDocker addGestureRecognizer:dockerTapGesture];
- [vDocker addSubview:_lblDocker];
- UIButton *btnDockerRightArrow = [UIButton buttonWithType:UIButtonTypeCustom];
- btnDockerRightArrow.frame=CGRectMake(Screen_Width-50,lbly,32,30);
- UIImageView *rightArrowImg1 = [[UIImageView alloc]initWithFrame:CGRectMake(25,9,7, 12)];
- [rightArrowImg1 setImage:[UIImage imageNamed:@"rightarrow"]];
- [ btnDockerRightArrow addSubview:rightArrowImg1];
- rightArrowImg1.userInteractionEnabled=NO;
- [vDocker addSubview:btnDockerRightArrow];
- UIView *dockerSeparator=[UIView new];
- dockerSeparator.backgroundColor=LineBackgroundColor;
- dockerSeparator.frame=CGRectMake(CGRectGetMaxX(lblTitleDocker.frame),heightRow,Screen_Width-CGRectGetMaxX(lblTitleDocker.frame),1);
- [vDocker addSubview:dockerSeparator];
-
- UIView *vCustomerAddress = [UIView new];
- vCustomerAddress.frame=CGRectMake(0,CGRectGetMaxY(vDocker.frame), Screen_Width, heightRow);
- [vBody addSubview:vCustomerAddress];
- NSString *customerAddressTitle=@"客户地址";
- UILabel *lblCustomerAddressTitle=[UILabel new];
- lblCustomerAddressTitle.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblCustomerAddressTitle.textColor = [UIColor blackColor];
- lblCustomerAddressTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerAddress addSubview:lblCustomerAddressTitle];
- lblCustomerAddressTitle.text=customerAddressTitle;
-
- _lblCustomerAddress = [UILabel new];
- _lblCustomerAddress.frame=CGRectMake(CGRectGetMaxX(lblTitleDocker.frame), lbly,Screen_Width-CGRectGetMaxX(lblTitleDocker.frame)-55, lblheight);
- _lblCustomerAddress.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerAddress addSubview:_lblCustomerAddress];
-
- UIView *customerAddressSeparator=[UIView new];
- customerAddressSeparator.backgroundColor=LineBackgroundColor;
- customerAddressSeparator.frame=CGRectMake(CGRectGetMaxX(lblCustomerAddressTitle.frame),heightRow,Screen_Width-CGRectGetMaxX(lblCustomerAddressTitle.frame),1);
- [vCustomerAddress addSubview:customerAddressSeparator];
-
- UIView *vRemarks = [UIView new];
- vRemarks.frame=CGRectMake(0,CGRectGetMaxY(vCustomerAddress.frame), Screen_Width, heightRow);
- [vBody addSubview:vRemarks];
- NSString *remarksTitle=@"备 注";
- UILabel *lblRemarksTitle=[UILabel new];
- lblRemarksTitle.frame=CGRectMake(lblx,lbly,lblwidth,lblheight);
- lblRemarksTitle.textColor = [UIColor blackColor];
- lblRemarksTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vRemarks addSubview:lblRemarksTitle];
- lblRemarksTitle.text=remarksTitle;
-
- _txtRemarks = [UITextField new];
- _txtRemarks.frame=CGRectMake(CGRectGetMaxX(lblRemarksTitle.frame), lbly,Screen_Width-CGRectGetMaxX(lblRemarksTitle.frame)-10, lblheight);
- _txtRemarks.placeholder=@"请输入备注";
- _txtRemarks.delegate=self;
- _txtRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vRemarks addSubview:_txtRemarks];
-
- UIView *remarksSeparator=[UIView new];
- remarksSeparator.backgroundColor=LineBackgroundColor;
- remarksSeparator.frame=CGRectMake(CGRectGetMaxX(lblRemarksTitle.frame),heightRow,Screen_Width-CGRectGetMaxX(lblRemarksTitle.frame),1);
- [vRemarks addSubview:remarksSeparator];
-
- vBody.frame=CGRectMake(0,0, Screen_Width,CGRectGetMaxY(vRemarks.frame));
- _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vBody.frame)+rectStatusHeight+rectNavHeight);
- originalAchievementFrame=_scrollView.frame;
- }
- /**
- 扫描回调函数
- @param code <#code description#>
- */
- -(void)reloadDataWithOnlyCode:(NSString *)code
- {
- _salesNo=code;
- SalesSlipSearchListVC *searchVc=[[SalesSlipSearchListVC alloc] init];
- searchVc.salesNo=_salesNo;
- searchVc.salesSlipDelegate=self;
- [self.listNavVc pushViewController:searchVc animated:YES];
-
- }
- /**
- 抽屉初始化
- */
- - (void)initSlideSlip{
- // 抽屉对象
- __weak typeof(self) weakself=self;
- self.filterController = [[SideSlipFilterController alloc]
- initWithSponsor:self
- resetBlock:^(NSArray *dataList) {
- for (SideSlipModel *model in dataList) {
-
- model.selectedItemList = nil;
- model.customDict = nil;
- }
- } commitBlock:^(NSArray *dataList) {
- // 查询条件
- SideSlipModel *serviceRegionModel = dataList[0];
- SalesSlipSearchModel *m = [serviceRegionModel.customDict objectForKey:SALES_SLIP_SEARCH_RANGE_MODEL];
-
- _salesNo= m.SalesNo;
- _customerName=m.customerName;
- if([m.startDate isEqualToString:@"请选择开始账务日期"]){
- _startDate=@"";
- }
- else{
- _startDate=m.startDate;
- }
-
- if([m.endDate isEqualToString:@"请选择结束账务日期"]){
- _endDate=@"";
- }
- else{
- _endDate=m.endDate;
- }
-
- _goodsCode=m.goodsCode;
- _customerCode=m.customerCode;
- _address = m.customerAddress;
- _invoiceStatus=m.invoiceStatus;
- [weakself.filterController dismiss];
- SalesSlipSearchListVC *searchVc=[[SalesSlipSearchListVC alloc] init];
- searchVc.salesNo=_salesNo;
- searchVc.customerName=_customerName;
- searchVc.customerCode=_customerCode;
- searchVc.address=_address;
- searchVc.startDate=_startDate;
- searchVc.endDate=_endDate;
- searchVc.goodsCode=_goodsCode;
- searchVc.invoiceStatus=_invoiceStatus;
- searchVc.salesSlipDelegate=self;
- searchVc.goodsDetailVc=_goodsDetailVc;
- [self.listNavVc pushViewController:searchVc animated:YES];
-
- }];
- _filterController.animationDuration = AnimationDuration;
- _filterController.hasHeadView = YES;
- _filterController.sideSlipLeading = UIScreenSideSlipLeading*[UIScreen mainScreen].bounds.size.width;
- _filterController.dataList = [self packageDataList];
- }
- /**
- 隐藏键盘
- */
- -(void)hideKey{
- [self.view endEditing:YES];
- }
- /**
- 键盘弹出函数
- @param notification <#notification description#>
- */
- -(void)keyboardWillShow:(NSNotification*)notification
- {
-
- // 获得键盘尺寸
- NSDictionary *info = notification.userInfo;
-
- NSValue *aValue = [info objectForKeyedSubscript:UIKeyboardFrameEndUserInfoKey];
- CGSize keyboardSize = [aValue CGRectValue].size;
-
- if(!_keyboardShow){
- // //重新定义ScrollView的尺寸
- CGRect viewFrame = _scrollView.frame;
-
- viewFrame.size.height -=(keyboardSize.height); //原来的尺寸减去键盘的高度
- viewFrame.size.height-=130;
- _scrollView.frame = viewFrame;
-
-
- //获取当前文本框架大小
- CGRect textFieldRect = [_selectedAchievementField frame];
-
- //滚动到当前文本框
- [_scrollView scrollRectToVisible:textFieldRect animated:YES];
- }
- _keyboardShow=YES;
- }
- /**
- 键盘隐藏函数
- @param aNotification <#aNotification description#>
- */
- - (void)keyboardWillHide:(NSNotification *)aNotification
- {
-
- if(_keyboardShow){
-
- _scrollView.frame=originalAchievementFrame;
- }
- _keyboardShow=NO;
- }
- /**
- 数据源
-
- @return <#return value description#>
- */
- - (NSArray *)packageDataList {
- NSMutableArray *dataArray = [NSMutableArray array];
- SideSlipModel *model = [[SideSlipModel alloc] init];
- model.containerCellClass = @"SalesOutStorageSalesSlipSearchCell";
- model.regionTitle = @"查询条件";
- [dataArray addObject:model];
- return [dataArray mutableCopy];
- }
- /**
- 跳转到司机页面
- @param gesture <#gesture description#>
- */
- - (void)goDriver:(UITapGestureRecognizer *)gesture {
- CustomerReportTextVC *tc=[[CustomerReportTextVC alloc] init];
- tc.delegate=self;
- tc.dataSourceCode=@"T_MST_Driver";
- tc.showDialogViewTag=ReportDriver;
- [self.listNavVc pushViewController:tc animated:YES];
- }
- /**
- 跳转到装卸工人页面
- @param gesture <#gesture description#>
- */
- - (void)goDocker:(UITapGestureRecognizer *)gesture {
- CustomerReportTextVC *tc=[[CustomerReportTextVC alloc] init];
- tc.delegate=self;
- tc.dataSourceCode=@"T_MST_Docker";
- tc.showDialogViewTag=ReportDocker;
- [self.listNavVc pushViewController:tc animated:YES];
- }
- /**
- 打开抽屉
- */
- -(void)goodsSearch{
- [_filterController showPagerView:self.listNavVc];
- }
- /**
- 扫描点击事件
- */
- -(void)btnScanCilck{
- ScanViewController *scanVc=[[ScanViewController alloc]init];
- scanVc.rootVC=self;
- [self.listNavVc pushViewController:scanVc animated:YES];
- }
- @end
|