Commit 6b88076d authored by 曹云霄's avatar 曹云霄

caoyunxiao

parent 6d40a954
......@@ -193,6 +193,7 @@
#pragma mark -UITextFieldDelegate代理 ----搜索
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
[self searchCustomerInforMation];
return YES;
}
......@@ -209,9 +210,11 @@
[self CreateMBProgressHUDLoding];
ConsumerQueryCondition *searchCustomer = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init];
page.page = 0;
searchCustomer.page = page;
searchCustomer.nameEquals = self.searchPersonInformationField.text;
searchCustomer.mobileEquals = self.searchPersonInformationField.text;
searchCustomer.page.sort = @"lastVisitedTime";
//request
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:searchCustomer WithReturnValueBlock:^(id returnValue) {
......
......@@ -487,13 +487,17 @@
condition.spaceEquals = spaceCode;
condition.materialEqueals = materialCode;
if (![priceTitle isEqualToString:@"全部"]) {
//价格字符串切割
NSArray *spacrArray = [priceTitle componentsSeparatedByString:@"到"];
condition.startprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:0] integerValue]];
condition.endprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:1] integerValue]];
}
__weak typeof (self) Weakself = self;
NSLog(@"%@",[condition toDictionary]);
// NSLog(@"%@",[condition toDictionary]);
[self getGoodsListdatas:condition returnResponse:^(GoodsResponse *response) {
Weakself.screenSecondView.totalNumber = response.total;
......
......@@ -214,6 +214,14 @@
}
#pragma mark -二维码扫描
- (void)QrcodeButtonClick
{
NSLog(@"二维码扫描");
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
......@@ -17,6 +17,11 @@
*/
- (void)ButtonClickAction:(NSInteger)Buttontag withButton:(UIButton *)button;
/**
* 点击二维码扫描按钮
*/
- (void)QrcodeButtonClick;
@end
......
......@@ -61,37 +61,43 @@
[self addSubview:backView];
//搜索图标
UIImageView *imageview = [[UIImageView alloc]initWithFrame:CGRectMake(10, 7.5, 20, 20)];
imageview.image = TCImage(@"search");
[backView addSubview:imageview];
//输入框
UITextField *inputField = [[UITextField alloc]initWithFrame:CGRectMake(50, 0, 170, 35)];
UITextField *inputField = [[UITextField alloc]initWithFrame:CGRectMake(45, 0, 170, 35)];
inputField.borderStyle = UITextBorderStyleNone;
inputField.placeholder = @"请输入关键字";
inputField.font = [UIFont systemFontOfSize:12];
[backView addSubview:inputField];
//扫描二维码
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(backView.frame.size.width+backView.frame.origin.x+15, (NavigationHeight-20)/2, 25, 20);
[button setBackgroundImage:TCImage(@"圆角矩形-3") forState:UIControlStateNormal];
[button addTarget:self action:@selector(QrCodeButtonClickAction) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
//按钮
NSArray *titleArray = [NSArray arrayWithObjects:@"右视图",@"某某用户",@"我的客户",@"购物车", nil];
//图片
NSArray *imageArray = [NSArray arrayWithObjects:@"dial",@"Cog",@"data",@"ablum", nil];
for (int i=1; i<5; i++) {
CustomButton *button = [CustomButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(ScreenWidth-(i*ButtonWIDTH + Buttoninterval*(i-1)), 10, ButtonWIDTH, ButtonRIGHT);
[button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
[button setTitleColor:kMainBlueColor forState:UIControlStateNormal];
[button setTitle:[titleArray objectAtIndex_opple:i-1] forState:UIControlStateNormal];
button.tag = 100+i-1;
[button addTarget:self action:@selector(ButtonClick:) forControlEvents:UIControlEventTouchUpInside];
if (i == 4) {
button.instructionsNumber = i;
}
if (i==1) {
[button setImage:TCImage(@"business") forState:UIControlStateNormal];
}else
{
[button setImage:TCImage(@"data") forState:UIControlStateNormal];
}
[button setImage:TCImage([imageArray objectAtIndex_opple:i-1]) forState:UIControlStateNormal];
[self addSubview:button];
}
......@@ -104,6 +110,15 @@
}
#pragma mark -二维码扫描码
- (void)QrCodeButtonClickAction
{
if ([self.delegate respondsToSelector:@selector(QrcodeButtonClick)]) {
[self.delegate QrcodeButtonClick];
}
}
#pragma mark -按钮事件响应
- (void)ButtonClick:(UIButton *)button
{
......
......@@ -16,7 +16,7 @@
<rect key="frame" x="24" y="88" width="721" height="176"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="3z6-rk-Y7U">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="矢量智能对象" id="3z6-rk-Y7U">
<rect key="frame" x="19" y="14" width="100" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
......@@ -133,6 +133,17 @@
<rect key="frame" x="24" y="285" width="721" height="719"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="line" id="RR1-DJ-tqO">
<rect key="frame" x="28" y="12" width="257" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入客户的名称或者手机号" textAlignment="natural" minimumFontSize="17" id="UGf-5N-5E1">
<rect key="frame" x="79" y="12" width="190" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits" returnKeyType="search"/>
</textField>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="hkO-uH-vEN">
<rect key="frame" x="0.0" y="59" width="721" height="660"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
......@@ -152,40 +163,40 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="客户名称:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="aO8-U2-Q9v">
<rect key="frame" x="109" y="14" width="65" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="联系电话:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bMf-To-4Ie">
<rect key="frame" x="109" y="40" width="65" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="最近到访时间:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ooi-hz-Io8">
<rect key="frame" x="109" y="68" width="90" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="服务导购:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="iXr-Co-Hbz">
<rect key="frame" x="378" y="14" width="65" height="21"/>
<rect key="frame" x="331" y="14" width="65" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="客户地址:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="FGg-N9-TVk">
<rect key="frame" x="378" y="40" width="65" height="21"/>
<rect key="frame" x="331" y="41" width="65" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="BFX-MF-Tjn">
<rect key="frame" x="181" y="14" width="176" height="21"/>
<rect key="frame" x="181" y="14" width="110" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.39892781040000003" blue="0.50448872310000004" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -193,7 +204,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b5n-Bd-piS">
<rect key="frame" x="181" y="41" width="176" height="21"/>
<rect key="frame" x="181" y="41" width="110" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.39892781040000003" blue="0.50448872310000004" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -201,7 +212,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="3T5-Bf-6tT">
<rect key="frame" x="205" y="68" width="176" height="21"/>
<rect key="frame" x="205" y="68" width="140" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.39892781040000003" blue="0.50448872310000004" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -209,7 +220,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="gMQ-8Z-IHh">
<rect key="frame" x="441" y="14" width="176" height="21"/>
<rect key="frame" x="394" y="14" width="176" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.39892781040000003" blue="0.50448872310000004" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -217,30 +228,30 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="UX9-mF-TLc">
<rect key="frame" x="441" y="40" width="176" height="21"/>
<rect key="frame" x="394" y="41" width="176" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.39892781040000003" blue="0.50448872310000004" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="93Q-SP-eWa">
<rect key="frame" x="571" y="69" width="20" height="20"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="93Q-SP-eWa">
<rect key="frame" x="568" y="69" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="Button"/>
<state key="normal" backgroundImage="box-副本"/>
<state key="selected" image="bg"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="设为当前用户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9Bs-Yx-wfk">
<rect key="frame" x="600" y="69" width="100" height="20"/>
<rect key="frame" x="599" y="69" width="100" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.56470588239999997" green="0.75686274509999996" blue="0.1960784314" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableViewCellContentView>
<color key="backgroundColor" red="0.56470588239999997" green="0.75686274509999996" blue="0.1960784314" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="Guideservices" destination="gMQ-8Z-IHh" id="roV-8R-PjL"/>
<outlet property="personHeader" destination="F66-vh-va3" id="3p3-Th-3as"/>
......@@ -252,18 +263,11 @@
</tableViewCell>
</prototypes>
</tableView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入客户的名称或者手机号" textAlignment="natural" minimumFontSize="17" id="UGf-5N-5E1">
<rect key="frame" x="28" y="12" width="257" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="search"/>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.96470588235294119" green="0.96470588235294119" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews>
<color key="backgroundColor" red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.93333333333333335" green="0.93333333333333335" blue="0.93333333333333335" alpha="1" colorSpace="calibratedRGB"/>
</view>
<navigationItem key="navigationItem" id="CGP-HQ-YF5"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics"/>
......@@ -3157,5 +3161,9 @@
</scenes>
<resources>
<image name="05产品库-详情_03" width="500" height="375"/>
<image name="bg" width="27" height="26"/>
<image name="box-副本" width="26" height="26"/>
<image name="line" width="301" height="30"/>
<image name="矢量智能对象" width="110" height="110"/>
</resources>
</document>
......@@ -28,7 +28,7 @@
{
if (self = [super initWithFrame:frame]) {
self.titleLabel.font = [UIFont systemFontOfSize:13];
self.titleLabel.font = [UIFont systemFontOfSize:11];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
}
......
......@@ -74,7 +74,10 @@ static NetworkRequestClassManager *manager = nil;
if (requestType == 0) {
[manager POST:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSLog(@"%@",[jastorobject toDictionary]);
// toDictionary 转字典
[manager POST:requestURLString parameters:[jastorobject toJSONString] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
successBlock(responseObject);
......@@ -86,7 +89,7 @@ static NetworkRequestClassManager *manager = nil;
}else if (requestType == 1){
[manager GET:requestURLString parameters:[jastorobject toDictionary] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
[manager GET:requestURLString parameters:[jastorobject toJSONString] progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
successBlock(responseObject);
......
......@@ -57,6 +57,10 @@
*/
#define TCImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
/**
* 默认显示头像
*/
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]]
/**
* AppDelegate代理
......
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