Commit 6f6e8b62 authored by 勾芒's avatar 勾芒

debug

parent 0ec4d741
......@@ -24,7 +24,7 @@
self.isInvoiceLabe.text = _model.isBill;
self.invoiceHeader.text = _model.billTitle;
self.invoiceType.text = _model.billType;
self.invoiceType.text = _model.payType;
self.payType.text = _model.payType;
}
......
......@@ -414,7 +414,7 @@
[Customermanager manager].companyName = nil;
[Customermanager manager].cutomerAddress = nil;
[Customermanager manager].header = nil;
self.customerHeader.image = nil;
self.customerHeader.image = TCImage(@"now");
[self.changePersonInformationButton setTitle:@"更改客户信息" forState:UIControlStateNormal];
[self ChangeCustomerName];
[self QueryShoppingCarNumber];
......
......@@ -21,4 +21,13 @@
* 身份ID/判断是场景库调用还是产品库调用
*/
@property (nonatomic,assign) BOOL isProductLibrary;
/**
* 应该现在的下标
*/
@property (nonatomic,assign) NSInteger currentindex;
@end
......@@ -81,7 +81,7 @@ static NSString * const reuseIdentifier = @"Cell";
}else//场景列表调用
{
self.backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 64)];
self.backView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
self.backView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
[self.view addSubview:self.backView];
//返回按钮
UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
......@@ -101,6 +101,7 @@ static NSString * const reuseIdentifier = @"Cell";
[tiYanCenterButton addTarget:self action:@selector(GotoTiYanCenterButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.backView addSubview:tiYanCenterButton];
}
[self.collectionView setContentOffset:CGPointMake(ScreenWidth*self.currentindex, 0)];
}
#pragma mark -返回
......@@ -134,8 +135,13 @@ static NSString * const reuseIdentifier = @"Cell";
FullScreenViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
cell.backgroundColor = kTCColor(251, 248, 241);
if (self.isProductLibrary) {
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:[self.datasArray objectAtIndex_opple:indexPath.item]] placeholderImage:REPLACEIMAGE];
return cell;
}
TOSceneEntity *model = [self.datasArray objectAtIndex_opple:indexPath.item];
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:model.pricure] placeholderImage:REPLACEIMAGE];
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
......
......@@ -184,7 +184,7 @@
} WithErrorCodeBlock:^(id errorCodeValue) {
NSLog(@"%@",errorCodeValue);
[self ErrorMBProgressView:@"网络中的"];
} WithFailureBlock:^(id error) {
......@@ -255,7 +255,6 @@
return;
}
self.identityView.layer.masksToBounds = YES;
self.identityView.layer.cornerRadius = 10;
[self.identityView.backLoginButton addTarget:self action:@selector(BackloginButtonClick) forControlEvents:UIControlEventTouchUpInside];
......
......@@ -111,7 +111,6 @@
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
......@@ -159,7 +158,6 @@
UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(0, 59, ScreenWidth, 1)];
lineView.backgroundColor = kTCColor(193, 193, 193);
[headerView addSubview:lineView];
self.orderDetailsTableview.tableHeaderView = headerView;
}
......@@ -362,7 +360,6 @@
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 60)];
//区头文字
UILabel *Titlelabe = [[UILabel alloc]initWithFrame:CGRectMake(0, 10, ScreenWidth, 50)];
......@@ -394,8 +391,8 @@
{
[self DownloadPDF:^(id returnValue) {
[self callAirprintWithdata:returnValue SuccessBlock:^{
[self SuccessMBProgressView:@"打印成功"];
[self callAirprintWithURL:[NSURL URLWithString:@"http://139.196.195.30:8090/opple-web/export/pdf/A0516052616540001.pdf"] SuccessBlock:^{
[self SuccessMBProgressView:@"打印完成"];
} ErrorBlock:^{
[self ErrorMBProgressView:@"打印失败"];
}];
......@@ -406,23 +403,26 @@
#pragma mark -下载PDF
- (void)DownloadPDF:(void(^)(id returnValue))success
{
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/order/UrlOfprintPDF/",_orderCode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
NSString *url = [NSString stringWithFormat:@"%@%@",PDFSERADDRESS,returnValue[@"data"]];
[[NetworkRequestClassManager Manager] DownloadPDFdatasWithURL:url WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
success(returnValue);
NSString *url = [NSString stringWithFormat:@"%@%@",PDFSERADDRESS,returnValue[@"data"]];
success(url);
// [[NetworkRequestClassManager Manager] DownloadPDFdatasWithURL:url WithReturnValueBlock:^(id returnValue) {
//
// [self RemoveMBProgressHUDLoding];
// success(returnValue);
//
// } WithErrorCodeBlock:^(id errorCodeValue) {
//
// } WithFailureBlock:^(id error) {
// [self RemoveMBProgressHUDLoding];
// }];
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}];
} WithErrorCodeBlock:^(id errorCodeValue) {
[self ErrorMBProgressView:@"网络中断"];
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}];
......@@ -437,12 +437,15 @@
__weak typeof(self) weakSelf = self;
[self DownloadPDF:^(id returnValue) {
self.PDFpath = returnValue;
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = weakSelf;
// PDFViewController *viewvc = [[PDFViewController alloc]init];
// [viewvc.view addSubview:previewController.view];
[weakSelf presentViewController:previewController animated:YES completion:nil];
// self.PDFpath = returnValue;
// QLPreviewController *previewController = [[QLPreviewController alloc] init];
// previewController.dataSource = weakSelf;
// previewController.navigationController.navigationBarHidden = YES;
// [weakSelf presentViewController:previewController animated:YES completion:nil];
PDFViewController *pdfvc = [[PDFViewController alloc]init];
pdfvc.pdfURLString = returnValue;
[weakSelf presentViewController:pdfvc animated:YES completion:nil];
}];
}else if ([button.currentTitle isEqualToString:@"撤销订单"])
......@@ -452,7 +455,6 @@
[alertVC addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}]];
[alertVC addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action)
{
[self CreateMBProgressHUDLoding];
......
......@@ -32,6 +32,11 @@
*/
@property (nonatomic,strong) NSMutableArray *imagesArray;
/**
* 点击小图的下标 默认0
*/
@property (nonatomic,assign) NSInteger imageIndex;
@end
@implementation ProductDetailsViewController
......@@ -71,6 +76,7 @@
#pragma mark -UI
- (void)uiConfigAction
{
self.imageIndex = 0;
self.productDetilsTableview.dataSource = self;
self.productDetilsTableview.delegate = self;
[self.productDetilsTableview registerNib:[UINib nibWithNibName:@"goodsDetailsTableViewCell" bundle:nil] forCellReuseIdentifier:@"goodsdetailscell"];
......@@ -151,12 +157,12 @@
//图文大图
self.goodsDetailsArray = [NSMutableArray arrayWithArray:[self.entity.detailedIntro componentsSeparatedByString:@","]];
[self.productDetilsTableview reloadData];
}
#pragma mark -小图点击手势、切换图片显示
- (void)SubimageViewClickAction:(UITapGestureRecognizer *)tap
{
self.imageIndex = tap.view.tag-100;
[self.headerView.goodsImageview sd_setImageWithURL:[self.imagesArray objectAtIndex_opple:tap.view.tag-100] placeholderImage:REPLACEIMAGE];
}
......@@ -168,11 +174,8 @@
FullScreenViewController *fullScreenVC = [[FullScreenViewController alloc]init];
fullScreenVC.datasArray = self.imagesArray;
fullScreenVC.isProductLibrary = YES;
dispatch_async(dispatch_get_main_queue(), ^{
fullScreenVC.currentindex = self.imageIndex;
[self presentViewController:fullScreenVC animated:YES completion:nil];
});
}
......
......@@ -102,8 +102,6 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
......
......@@ -222,7 +222,9 @@
{
FullScreenViewController *fullScreenVC = [[FullScreenViewController alloc]init];
[self presentViewController:fullScreenVC animated:NO completion:nil];
fullScreenVC.datasArray = self.responseArray;
fullScreenVC.currentindex = indexPath.row;
[self presentViewController:fullScreenVC animated:YES completion:nil];
}
......
......@@ -256,7 +256,6 @@
order.orderNumber = _orderCode;
order.fnewstate = @"002";
order.oldstate = @"001";
order.billTitle = self.invoiceHeader.text;
//支付类型
if (self.payTreasureButton.selected) {
......@@ -280,11 +279,17 @@
if ([self.invoiceType.currentTitle isEqualToString:@"公司发票"]) {
order.billType = @"001";
if (self.invoiceHeader.text.length == 0 || !self.invoiceHeader.text) {
[self ErrorMBProgressView:@"发票抬头不能为空"];
return;
}
}else if ([self.invoiceType.currentTitle isEqualToString:@"个人发票"])
{
order.billType = @"002";
}
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/payOrder"] WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) {
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
......@@ -153,7 +153,7 @@
<rect key="frame" x="0.0" y="28" width="721" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="NV8-I4-ig4" id="E0m-wU-1b5">
<rect key="frame" x="0.0" y="0.0" width="721" height="99"/>
<rect key="frame" x="0.0" y="0.0" width="721" height="99.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="F66-vh-va3">
......@@ -422,7 +422,7 @@
<rect key="frame" x="0.0" y="28" width="717" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1Sl-4a-xI0" id="Kls-Lg-VEy">
<rect key="frame" x="0.0" y="0.0" width="717" height="99"/>
<rect key="frame" x="0.0" y="0.0" width="717" height="99.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="mhA-C1-oB5">
......@@ -530,7 +530,7 @@
<rect key="frame" x="0.0" y="128" width="717" height="200"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1pL-BK-mae" id="zJa-bo-n5G">
<rect key="frame" x="0.0" y="0.0" width="717" height="199"/>
<rect key="frame" x="0.0" y="0.0" width="717" height="199.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="下单时间:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="DqG-UR-Q08">
......@@ -749,10 +749,10 @@
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="firstcell" rowHeight="84" id="XgA-9w-ut9" customClass="OrderInformationTableViewCell">
<rect key="frame" x="0.0" y="114" width="1024" height="84"/>
<rect key="frame" x="0.0" y="113.5" width="1024" height="84"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XgA-9w-ut9" id="BWi-jv-OOH">
<rect key="frame" x="0.0" y="0.0" width="1024" height="83"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="83.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单编号:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="KGm-XJ-NyV">
......@@ -822,10 +822,10 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="secondcell" rowHeight="110" id="rIO-yd-hh7" customClass="PersonInformationTableViewCell">
<rect key="frame" x="0.0" y="198" width="1024" height="110"/>
<rect key="frame" x="0.0" y="197.5" width="1024" height="110"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rIO-yd-hh7" id="mn8-g0-Zqo">
<rect key="frame" x="0.0" y="0.0" width="1024" height="109"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="109.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="Zdg-s0-xfD">
......@@ -854,7 +854,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="oql-Lw-B2F">
<rect key="frame" x="608" y="55" width="200" height="21"/>
<rect key="frame" x="608" y="55" width="309" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
......@@ -868,7 +868,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="TDA-d4-cxP">
<rect key="frame" x="202" y="55" width="218" height="21"/>
<rect key="frame" x="202" y="55" width="307" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
......@@ -899,10 +899,10 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="thirdcell" rowHeight="90" id="PfN-24-v5t" customClass="GoodsInformationTableViewCell">
<rect key="frame" x="0.0" y="308" width="1024" height="90"/>
<rect key="frame" x="0.0" y="307.5" width="1024" height="90"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PfN-24-v5t" id="2Je-94-WVY">
<rect key="frame" x="0.0" y="0.0" width="1024" height="89"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="89.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收货人:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tiK-JC-Jy4">
......@@ -927,7 +927,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Dse-ts-588">
<rect key="frame" x="84" y="52" width="206" height="21"/>
<rect key="frame" x="84" y="52" width="451" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
......@@ -956,10 +956,10 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="fourthcell" rowHeight="80" id="47T-H0-tG7" customClass="CommodityListTableViewCell">
<rect key="frame" x="0.0" y="398" width="1024" height="80"/>
<rect key="frame" x="0.0" y="397.5" width="1024" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="47T-H0-tG7" id="zXR-bC-Wdh">
<rect key="frame" x="0.0" y="0.0" width="1024" height="79"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="79.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="6MS-gq-TMk">
......@@ -1020,10 +1020,10 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="sixthcell" rowHeight="50" id="PNT-Fy-4Hi" customClass="AllpriceTableViewCell">
<rect key="frame" x="0.0" y="478" width="1024" height="50"/>
<rect key="frame" x="0.0" y="477.5" width="1024" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PNT-Fy-4Hi" id="PxE-0c-Zdt">
<rect key="frame" x="0.0" y="0.0" width="1024" height="49"/>
<rect key="frame" x="0.0" y="0.0" width="1024" height="49.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="总数量:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rbZ-Pg-7Uu">
......@@ -1181,7 +1181,7 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="productcell" id="J5m-0M-uqb" customClass="ProductCollectionViewCell">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<rect key="frame" x="0.0" y="64" width="300" height="300"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
......@@ -1263,10 +1263,10 @@
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="productDetailscell" rowHeight="170" id="Sye-2R-IQf" customClass="ProductDetailsTableViewCell">
<rect key="frame" x="0.0" y="49.5" width="768" height="170"/>
<rect key="frame" x="0.0" y="113.5" width="768" height="170"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP">
<rect key="frame" x="0.0" y="0.0" width="768" height="169"/>
<rect key="frame" x="0.0" y="0.0" width="768" height="169.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" id="2bG-Ip-ptr">
......@@ -1653,7 +1653,7 @@
<rect key="frame" x="0.0" y="28" width="973" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZT1-XJ-ObI" id="GWp-Jl-7br">
<rect key="frame" x="0.0" y="0.0" width="973" height="79"/>
<rect key="frame" x="0.0" y="0.0" width="973" height="79.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="PkJ-eJ-ksY">
......@@ -1874,7 +1874,7 @@
<rect key="frame" x="0.0" y="92" width="768" height="110"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="LsY-i0-h5H" id="dPG-p9-V2i">
<rect key="frame" x="0.0" y="0.0" width="768" height="109"/>
<rect key="frame" x="0.0" y="0.0" width="768" height="109.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="qWT-p0-Gta">
......@@ -1951,7 +1951,7 @@
<rect key="frame" x="0.0" y="202" width="768" height="56"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gfQ-UE-mXV" id="za6-HU-VEw">
<rect key="frame" x="0.0" y="0.0" width="768" height="55"/>
<rect key="frame" x="0.0" y="0.0" width="768" height="55.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="手机号码:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="X0Z-8j-BdI">
......@@ -2019,7 +2019,7 @@
<rect key="frame" x="0.0" y="258" width="768" height="56"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Kk4-Fh-HhL" id="oRX-7p-HkY">
<rect key="frame" x="0.0" y="0.0" width="768" height="55"/>
<rect key="frame" x="0.0" y="0.0" width="768" height="55.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="m0f-EW-LM5">
......@@ -2050,7 +2050,7 @@
<rect key="frame" x="0.0" y="314" width="768" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="G7o-xS-1mB" id="l3e-TL-GCT">
<rect key="frame" x="0.0" y="0.0" width="768" height="79"/>
<rect key="frame" x="0.0" y="0.0" width="768" height="79.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="Un4-g0-sG6">
......@@ -2122,7 +2122,7 @@
<rect key="frame" x="0.0" y="394" width="768" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6K9-mc-7RW" id="Vc7-f6-wGb">
<rect key="frame" x="0.0" y="0.0" width="768" height="49"/>
<rect key="frame" x="0.0" y="0.0" width="768" height="49.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="总数量:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ULe-0J-pCd">
......
......@@ -8,7 +8,7 @@
#import "BaseViewController.h"
@interface BaseViewController ()<UIPrintInteractionControllerDelegate>
@interface BaseViewController ()<UIPrintInteractionControllerDelegate,UIWebViewDelegate>
@property (nonatomic,strong) MBProgressHUD*TCHud;
@property (nonatomic,strong) UIWebView *webView;
......@@ -245,8 +245,8 @@
pic.delegate = self;
[self.webView loadRequest:[NSURLRequest requestWithURL:datasurl]];//网页
self.webView.delegate = self;
pic.printFormatter = [self.webView viewPrintFormatter];//布局打印视图绘制的内容。
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.jobName = @"订单明细";
......@@ -273,6 +273,19 @@
}
}
- (void)webViewDidStartLoad:(UIWebView *)webView
{
[self CreateMBProgressHUDLoding];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[self RemoveMBProgressHUDLoding];
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)error
{
[self ErrorMBProgressView:@"打印失败"];
}
#pragma mark -提示文本,图片
- (void)PromptinformationViewWithimage:(UIImage *)image withTitle:(NSString *)title withpoint:(CGPoint)point
......
......@@ -24,124 +24,42 @@
}
- (BOOL)prefersStatusBarHidden
{
return YES;
}
//
//#pragma mark -UI
#pragma mark -UI
- (void)uiConfigAction
{
// self.webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
// [self.view addSubview:self.webView];
// self.webView.delegate = self;
//// NSString * strUrl = [[NSString alloc]initWithContentsOfURL:[NSURL URLWithString:_pdfURLString] encoding:NSUTF8StringEncoding error:nil];
//
// NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:_pdfURLString]];
//// NSURL *url = [NSURL URLWithString:_pdfURLString];
//// if ([url pathExtension] && ([[[url pathExtension] lowercaseString] isEqualToString:@"txt"] || [[[url pathExtension] lowercaseString] isEqualToString:@"text"]))
//// {
////// return [self convertTxtEncoding:url];
//// NSURLRequest *request = [NSURLRequest requestWithURL:[self convertTxtEncoding:url]];
//// [self.webView loadRequest:request];
//// }
//// else
//// {
////// return url;
//// NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:_pdfURLString]];
//// [self.webView loadRequest:request];
//// }
// [self.webView loadRequest:request];
self.webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:self.webView];
self.webView.scalesPageToFit = YES;
self.webView.delegate = self;
// NSString *path = [[NSBundle mainBundle] pathForResource:@"A0516052613060001" ofType:@"pdf"];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:_pdfURLString]];
[self.webView loadRequest:request];
[self.view addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(PDFClickAction)]];
}
#pragma mark -dismiss
- (void)PDFClickAction
{
[self dismissViewControllerAnimated:YES completion:nil];
}
//
//
//#pragma mark -加载错误
//- (void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)error
//{
// [self ErrorMBProgressView:@"加载错误"];
// [self dismissViewControllerAnimated:YES completion:nil];
//}
//
//
//
//- (NSURL *)convertTxtEncoding:(NSURL *)fileUrl
//
//{
////
//// if ([FileManagementAPI getFileSize:[fileUrl path]] > 1024*1024.0f)
////
//// {
////
//// return fileUrl;
////
//// }
//
// NSString *tmpFilePath = [NSString stringWithFormat:@"%@/tmp/%@", NSHomeDirectory(), [fileUrl lastPathComponent]];
//
// NSLog(@"tmpFilePath=%@", tmpFilePath);
//
// NSURL *tmpFileUrl = [NSURL fileURLWithPath:tmpFilePath];
//
// NSStringEncoding encode;
//
// NSString *contentStr = [NSString stringWithContentsOfURL:fileUrl usedEncoding:&encode error:NULL];
//
//
//
// if (contentStr)
//
// {
//
// [contentStr writeToURL:tmpFileUrl atomically:YES encoding:NSUTF16StringEncoding error:NULL];
//
//
//
// return tmpFileUrl;
//
// }
//
// else
//
// {
//
// NSStringEncoding convertEncoding = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
//
// contentStr = [NSString stringWithContentsOfURL:fileUrl encoding:convertEncoding error:NULL];
//
//
//
// if (contentStr)
//
// {
//
// [contentStr writeToURL:tmpFileUrl atomically:YES encoding:NSUTF16StringEncoding error:NULL];
//
//
//
// return tmpFileUrl;
//
// }
//
// else
//
// {
//
// return fileUrl;
//
// }
//
// }
//
//}
#pragma mark -加载错误
- (void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)error
{
[self ErrorMBProgressView:@"加载错误"];
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)webViewDidStartLoad:(UIWebView *)webView
{
[self CreateMBProgressHUDLoding];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[self RemoveMBProgressHUDLoding];
}
......
......@@ -285,7 +285,7 @@
- (void)LineAnimation {
if (_up == YES) {
CGFloat y = self.instructionsLine.frame.origin.y;
y += 3;
y += 4;
CGRect frame = self.instructionsLine.frame;
frame.origin.y = y;
self.instructionsLine.frame = frame;
......@@ -294,7 +294,7 @@
}
}else{
CGFloat y = self.instructionsLine.frame.origin.y;
y -= 3;
y -= 4;
CGRect frame = self.instructionsLine.frame;
frame.origin.y = y;
self.instructionsLine.frame = frame;;
......
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