Commit 2b97d8ec authored by 勾芒's avatar 勾芒

caoyunxiao

parent baa1ad95
...@@ -25,14 +25,41 @@ ...@@ -25,14 +25,41 @@
*/ */
@property (weak, nonatomic) IBOutlet UIImageView *scanRectView; @property (weak, nonatomic) IBOutlet UIImageView *scanRectView;
/**
*用于记录scrollLine的上下循环状态
*/
@property (assign, nonatomic) BOOL up;
/**
*计时器
*/
@property (strong, nonatomic) CADisplayLink *link;
/**
* 指示线
*/
@property (weak, nonatomic) IBOutlet UIImageView *instructionsLine;
@end @end
@implementation ScannerViewController @implementation ScannerViewController
- (CADisplayLink *)link {
if (!_link) {
_link = [CADisplayLink displayLinkWithTarget:self selector:@selector(LineAnimation)];
}
return _link;
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view from its nib. // Do any additional setup after loading the view from its nib.
//计时器添加到循环中去
_up = YES;
[self.link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
[self uiConfigAction]; [self uiConfigAction];
} }
...@@ -135,6 +162,29 @@ ...@@ -135,6 +162,29 @@
} }
#pragma mark - 线条运动的动画
- (void)LineAnimation {
if (_up == YES) {
CGFloat y = self.instructionsLine.frame.origin.y;
y += 2;
CGRect frame = self.instructionsLine.frame;
frame.origin.y = y;
self.instructionsLine.frame = frame;
if (y >= self.scanRectView.frame.origin.y + self.scanRectView.frame.size.height-20) {
_up = NO;
}
}else{
CGFloat y = self.instructionsLine.frame.origin.y;
y -= 2;
CGRect frame = self.instructionsLine.frame;
frame.origin.y = y;
self.instructionsLine.frame = frame;;
if (y <= self.scanRectView.frame.origin.y+20) {
_up = YES;
}
}
}
......
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ScannerViewController"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ScannerViewController">
<connections> <connections>
<outlet property="instructionsLine" destination="Qlb-aW-bDM" id="1jD-uu-254"/>
<outlet property="scanRectView" destination="nwi-18-pl1" id="YRc-6i-tRV"/> <outlet property="scanRectView" destination="nwi-18-pl1" id="YRc-6i-tRV"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <view clearsContextBeforeDrawing="NO" alpha="0.5" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="700" height="528"/> <rect key="frame" x="0.0" y="0.0" width="700" height="528"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ScannerViewController" id="nwi-18-pl1"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ScannerViewController" id="nwi-18-pl1">
<rect key="frame" x="150" y="101" width="400" height="400"/> <rect key="frame" x="150" y="107" width="400" height="400"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Max-ka-Yvf"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Max-ka-Yvf">
...@@ -36,13 +37,17 @@ ...@@ -36,13 +37,17 @@
<action selector="cancelButtonClick:" destination="-1" eventType="touchUpInside" id="8qh-ki-1tT"/> <action selector="cancelButtonClick:" destination="-1" eventType="touchUpInside" id="8qh-ki-1tT"/>
</connections> </connections>
</button> </button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="圆角矩形-5" id="Qlb-aW-bDM">
<rect key="frame" x="175" y="130" width="350" height="10"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="363" y="-85"/> <point key="canvasLocation" x="363" y="-85"/>
</view> </view>
</objects> </objects>
<resources> <resources>
<image name="ScannerViewController" width="430" height="430"/> <image name="ScannerViewController" width="430" height="430"/>
<image name="圆角矩形-5" width="383" height="19"/>
</resources> </resources>
</document> </document>
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
orderGoods.goodsUnit = model.goods.unit; orderGoods.goodsUnit = model.goods.unit;
//总价 //总价
NSInteger allprice = [model.goods.number integerValue]*[model.goods.costPrice integerValue]; NSInteger allprice = model.goodsNum *[model.goods.costPrice integerValue];
orderGoods.goodsTotalPrice = [NSNumber numberWithInteger:allprice]; orderGoods.goodsTotalPrice = [NSNumber numberWithInteger:allprice];
orderReceiver.orderPrice = [NSNumber numberWithInteger:allprice]; orderReceiver.orderPrice = [NSNumber numberWithInteger:allprice];
[goodidArr addObject:orderGoods]; [goodidArr addObject:orderGoods];
......
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
//右侧视图 //右侧视图
case 100: case 100:
[self dismissViewControllerAnimated:YES completion:nil];
[SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:nil]; [SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:nil];
break; break;
...@@ -182,6 +183,7 @@ ...@@ -182,6 +183,7 @@
//我的客户 //我的客户
case 102: case 102:
[self dismissViewControllerAnimated:YES completion:nil];
self.selectedIndex = 7; self.selectedIndex = 7;
break; break;
...@@ -189,6 +191,7 @@ ...@@ -189,6 +191,7 @@
//购物车 //购物车
case 103: case 103:
[self dismissViewControllerAnimated:YES completion:nil];
//必须设置当前客户才能跳转到购物车 //必须设置当前客户才能跳转到购物车
if (![Shoppersmanager manager].currentCustomer) { if (![Shoppersmanager manager].currentCustomer) {
...@@ -207,6 +210,7 @@ ...@@ -207,6 +210,7 @@
[hud hide:YES afterDelay:1]; [hud hide:YES afterDelay:1];
}else }else
{ {
self.selectedIndex = 8; self.selectedIndex = 8;
} }
...@@ -256,6 +260,7 @@ ...@@ -256,6 +260,7 @@
} }
#pragma mark -二维码扫描 #pragma mark -二维码扫描
- (void)QrcodeButtonClick - (void)QrcodeButtonClick
{ {
......
...@@ -119,7 +119,6 @@ ...@@ -119,7 +119,6 @@
29EAAE8E1CDC3E8E00C4DBA2 /* BillingInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE8D1CDC3E8E00C4DBA2 /* BillingInfoView.m */; }; 29EAAE8E1CDC3E8E00C4DBA2 /* BillingInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE8D1CDC3E8E00C4DBA2 /* BillingInfoView.m */; };
29EAAE901CDC3E9700C4DBA2 /* BillingInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */; }; 29EAAE901CDC3E9700C4DBA2 /* BillingInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */; };
29EAAE951CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE941CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m */; }; 29EAAE951CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE941CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m */; };
29EAAE971CDC4B2900C4DBA2 /* The Swift Programming Language 中文版 - v1.2.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 29EAAE961CDC4B2900C4DBA2 /* The Swift Programming Language 中文版 - v1.2.pdf */; };
29EAAE9C1CDC74CA00C4DBA2 /* AllCustomerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE9B1CDC74CA00C4DBA2 /* AllCustomerViewController.m */; }; 29EAAE9C1CDC74CA00C4DBA2 /* AllCustomerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE9B1CDC74CA00C4DBA2 /* AllCustomerViewController.m */; };
29EAAEA01CDC79DC00C4DBA2 /* CustomerOrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE9F1CDC79DC00C4DBA2 /* CustomerOrderViewController.m */; }; 29EAAEA01CDC79DC00C4DBA2 /* CustomerOrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE9F1CDC79DC00C4DBA2 /* CustomerOrderViewController.m */; };
29EAAEA51CDC7F7000C4DBA2 /* CustomerOrderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAEA41CDC7F7000C4DBA2 /* CustomerOrderTableViewCell.m */; }; 29EAAEA51CDC7F7000C4DBA2 /* CustomerOrderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAEA41CDC7F7000C4DBA2 /* CustomerOrderTableViewCell.m */; };
...@@ -339,7 +338,6 @@ ...@@ -339,7 +338,6 @@
29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BillingInfoView.xib; sourceTree = "<group>"; }; 29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BillingInfoView.xib; sourceTree = "<group>"; };
29EAAE931CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SeceneLibraryCollectionViewCell.h; sourceTree = "<group>"; }; 29EAAE931CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SeceneLibraryCollectionViewCell.h; sourceTree = "<group>"; };
29EAAE941CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SeceneLibraryCollectionViewCell.m; sourceTree = "<group>"; }; 29EAAE941CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SeceneLibraryCollectionViewCell.m; sourceTree = "<group>"; };
29EAAE961CDC4B2900C4DBA2 /* The Swift Programming Language 中文版 - v1.2.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = "The Swift Programming Language 中文版 - v1.2.pdf"; path = "Class/The Swift Programming Language 中文版 - v1.2.pdf"; sourceTree = "<group>"; };
29EAAE9A1CDC74CA00C4DBA2 /* AllCustomerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllCustomerViewController.h; sourceTree = "<group>"; }; 29EAAE9A1CDC74CA00C4DBA2 /* AllCustomerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllCustomerViewController.h; sourceTree = "<group>"; };
29EAAE9B1CDC74CA00C4DBA2 /* AllCustomerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AllCustomerViewController.m; sourceTree = "<group>"; }; 29EAAE9B1CDC74CA00C4DBA2 /* AllCustomerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AllCustomerViewController.m; sourceTree = "<group>"; };
29EAAE9E1CDC79DC00C4DBA2 /* CustomerOrderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomerOrderViewController.h; sourceTree = "<group>"; }; 29EAAE9E1CDC79DC00C4DBA2 /* CustomerOrderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomerOrderViewController.h; sourceTree = "<group>"; };
...@@ -793,7 +791,6 @@ ...@@ -793,7 +791,6 @@
29706D981CD082980003C412 = { 29706D981CD082980003C412 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29EAAE961CDC4B2900C4DBA2 /* The Swift Programming Language 中文版 - v1.2.pdf */,
2928F7DD1CD085430036D761 /* Class */, 2928F7DD1CD085430036D761 /* Class */,
2928F7DE1CD085430036D761 /* Tools */, 2928F7DE1CD085430036D761 /* Tools */,
29706DA31CD082990003C412 /* Lighting */, 29706DA31CD082990003C412 /* Lighting */,
...@@ -1342,7 +1339,6 @@ ...@@ -1342,7 +1339,6 @@
294CF0EE1CEDCF540055F1D8 /* PromptinformationView.xib in Resources */, 294CF0EE1CEDCF540055F1D8 /* PromptinformationView.xib in Resources */,
29834EBB1CDF1FBC001A484F /* screeningFirstView.xib in Resources */, 29834EBB1CDF1FBC001A484F /* screeningFirstView.xib in Resources */,
29EAAEAC1CDCA28300C4DBA2 /* city.json in Resources */, 29EAAEAC1CDCA28300C4DBA2 /* city.json in Resources */,
29EAAE971CDC4B2900C4DBA2 /* The Swift Programming Language 中文版 - v1.2.pdf in Resources */,
2928F83D1CD0A9CD0036D761 /* qq.png in Resources */, 2928F83D1CD0A9CD0036D761 /* qq.png in Resources */,
29834EC61CDF76C1001A484F /* UserViewController.xib in Resources */, 29834EC61CDF76C1001A484F /* UserViewController.xib in Resources */,
299C7F5B1CE21FA800E7D7CB /* AddressViewController.xib in Resources */, 299C7F5B1CE21FA800E7D7CB /* AddressViewController.xib in Resources */,
......
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
if (code) { if (code) {
return kTCColor(153, 153, 153); return kTCColor(153, 153, 153);
} }
return @"已作废"; return @"已撤销";
} }
break; break;
case 006://已完成 case 006://已完成
......
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