Commit 174063ef authored by Sandy's avatar Sandy

Merge branch 'master' of https://git.oschina.net/gomore/total

parents 32ff642a b3681334
......@@ -14,6 +14,8 @@
2933CC571D213377000F8EE6 /* OrderDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2933CC561D213377000F8EE6 /* OrderDetailsViewController.m */; };
2933CC5B1D213AF2000F8EE6 /* SelectOrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2933CC5A1D213AF2000F8EE6 /* SelectOrderViewController.m */; };
2933CC5F1D213C41000F8EE6 /* SelectOrderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2933CC5E1D213C41000F8EE6 /* SelectOrderTableViewCell.m */; };
293ADF491E23726D005C1AEB /* NSDictionary+Category.m in Sources */ = {isa = PBXBuildFile; fileRef = 293ADF481E23726D005C1AEB /* NSDictionary+Category.m */; };
293ADF4D1E2372E8005C1AEB /* QueryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 293ADF4C1E2372E8005C1AEB /* QueryModel.m */; };
294137691D50A17900AA86C3 /* SubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 294137681D50A17900AA86C3 /* SubTableViewCell.m */; };
294154321D1CFBDE00B3B761 /* total_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 294154311D1CFBDE00B3B761 /* total_objc_json_client.m */; };
294154361D1CFD3000B3B761 /* HttpRequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 294154351D1CFD3000B3B761 /* HttpRequestManager.m */; };
......@@ -348,6 +350,10 @@
2933CC5A1D213AF2000F8EE6 /* SelectOrderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SelectOrderViewController.m; sourceTree = "<group>"; };
2933CC5D1D213C41000F8EE6 /* SelectOrderTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectOrderTableViewCell.h; sourceTree = "<group>"; };
2933CC5E1D213C41000F8EE6 /* SelectOrderTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SelectOrderTableViewCell.m; sourceTree = "<group>"; };
293ADF471E23726D005C1AEB /* NSDictionary+Category.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+Category.h"; sourceTree = "<group>"; };
293ADF481E23726D005C1AEB /* NSDictionary+Category.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+Category.m"; sourceTree = "<group>"; };
293ADF4B1E2372E8005C1AEB /* QueryModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QueryModel.h; sourceTree = "<group>"; };
293ADF4C1E2372E8005C1AEB /* QueryModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QueryModel.m; sourceTree = "<group>"; };
294137671D50A17900AA86C3 /* SubTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubTableViewCell.h; sourceTree = "<group>"; };
294137681D50A17900AA86C3 /* SubTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SubTableViewCell.m; sourceTree = "<group>"; };
294154301D1CFBDE00B3B761 /* total_objc_json_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = total_objc_json_client.h; sourceTree = "<group>"; };
......@@ -1034,6 +1040,15 @@
name = view;
sourceTree = "<group>";
};
293ADF4A1E2372D5005C1AEB /* Models */ = {
isa = PBXGroup;
children = (
293ADF4B1E2372E8005C1AEB /* QueryModel.h */,
293ADF4C1E2372E8005C1AEB /* QueryModel.m */,
);
name = Models;
sourceTree = "<group>";
};
2941542E1D1CFB3300B3B761 /* JSONModel */ = {
isa = PBXGroup;
children = (
......@@ -1264,6 +1279,7 @@
children = (
29F143B31D18E1C800083975 /* SeePriceViewController.h */,
29F143B41D18E1C800083975 /* SeePriceViewController.m */,
293ADF4A1E2372D5005C1AEB /* Models */,
29F143D21D18F10000083975 /* view */,
);
name = "SeePrice(查看油品价格)";
......@@ -1882,6 +1898,8 @@
isa = PBXGroup;
children = (
3506EDB01BA0194300897EBE /* NSData+EncodeAdditions.h */,
293ADF471E23726D005C1AEB /* NSDictionary+Category.h */,
293ADF481E23726D005C1AEB /* NSDictionary+Category.m */,
3506EDB11BA0194300897EBE /* NSData+EncodeAdditions.m */,
3506EDB21BA0194300897EBE /* NSDate+FormatterAdditions.h */,
3506EDB31BA0194300897EBE /* NSDate+FormatterAdditions.m */,
......@@ -2792,6 +2810,7 @@
3506EDD71BA0194300897EBE /* UIApplication+CheckFirstRun.m in Sources */,
35EB8E681BE32C2800411E45 /* GTOLicenceBoltView.m in Sources */,
35E3BB191BF087AE0081232D /* GTOAlertInfoPatrolPlanViewController.m in Sources */,
293ADF491E23726D005C1AEB /* NSDictionary+Category.m in Sources */,
29BE72341D4077BE001D60EE /* NoteTableViewCell.m in Sources */,
3506ED5C1BA0164E00897EBE /* IBTUITextField.m in Sources */,
35EB8E621BE3208500411E45 /* GTOLicence.m in Sources */,
......@@ -2805,6 +2824,7 @@
35B2E59F1BAC171F00AB8582 /* ICRPlaceholderTextView.m in Sources */,
35B2E58F1BAC140500AB8582 /* ICRAttachmentUnit.m in Sources */,
35D66A401BE75670004476F0 /* GTOLicenceResultTopCellContentView.m in Sources */,
293ADF4D1E2372E8005C1AEB /* QueryModel.m in Sources */,
3506ED4B1BA0164E00897EBE /* IBTTableViewUserInfo.m in Sources */,
35B2E5761BAC064600AB8582 /* GTOPatrolPlanInfoItemView.m in Sources */,
29603D831D1CD52B00951670 /* BookingTableViewCell.m in Sources */,
......@@ -3124,8 +3144,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -3142,7 +3162,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE = "c2d977b5-adac-45f6-bfbb-3a53616b54d7";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
......@@ -3157,8 +3177,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -3175,7 +3195,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE = "c2d977b5-adac-45f6-bfbb-3a53616b54d7";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2";
......
......@@ -556,6 +556,9 @@
#pragma mark -删除区
- (void)deleteSectionAction:(UIButton *)btn
{
if (self.tankNumber <= 1) {
[IBTLoadingView showTextOnly:@"默认保留一个油罐"];return;
}
NSInteger index = btn.tag;
UIAlertController *alertView = [UIAlertController alertControllerWithTitle:@"提示" message:@"请确认是否删除" preferredStyle:UIAlertControllerStyleAlert];
__weak typeof(self) weakSelf = self;
......@@ -1044,10 +1047,10 @@
[HttpRequestManager requestNetworkwithURL:string withRequestType:ZERO withParameter:[orderBill toDictionary] withSuccess:^(id returnValue) {
if ([returnValue[@"success"] isEqualToNumber:@1]) {
[IBTLoadingView hideHUDWithText:@"保存成功"];
if (!boolValue) {
block(returnValue[@"data"][@"uuid"]);return;
}
[IBTLoadingView hideHUDWithText:@"保存成功"];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
SeeObtainViewController *orderBill = [weakSelf.storyboard instantiateViewControllerWithIdentifier:@"SeeObtainViewController"];
orderBill.orderUUIDString = returnValue[@"data"][@"uuid"];
......
......@@ -368,7 +368,7 @@
//油站经营类型
order.operatingType = self.recordSelectGasStation[@"operatingType"];
//订单状态
order.state = boolValue?@"initial":@"submit";
order.state = @"initial";
//所属业主公司
UCN *company = [[UCN alloc]init];
company.code = user.orgCode;
......@@ -416,14 +416,7 @@
[IBTLoadingView hideHUDWithText:@"保存成功"];
saveSuccess(returnValue[@"data"],order);
if (!boolValue) return;//提交调用保存时不需要跳转到详情
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
OrderDetailsViewController *orderDetail = [self.storyboard instantiateViewControllerWithIdentifier:@"OrderDetailsViewController"];
orderDetail.orderUUIDString = returnValue[@"data"][@"uuid"];
orderDetail.oilTypeListDatasArray = self.oilTypeListDatasArray;
orderDetail.title = @"订油单详情";
orderDetail.boolValue = YES;
[weakSelf PushViewController:orderDetail animated:YES];
});
[weakSelf gotoOrderDetail:returnValue[@"data"][@"uuid"]];
} else {
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
}
......@@ -434,6 +427,18 @@
}];
}
#pragma mark -订单详情
- (void)gotoOrderDetail:(NSString *)uuid
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
OrderDetailsViewController *orderDetail = [self.storyboard instantiateViewControllerWithIdentifier:@"OrderDetailsViewController"];
orderDetail.orderUUIDString = uuid;
orderDetail.oilTypeListDatasArray = self.oilTypeListDatasArray;
orderDetail.title = @"订油单详情";
orderDetail.boolValue = YES;
[self PushViewController:orderDetail animated:YES];
});
}
#pragma mark -提交订油单
- (void)commitOilOrder
......@@ -470,6 +475,7 @@
} else {
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
[weakSelf gotoOrderDetail:dict[@"uuid"]];
}
} withFailed:^(NSError *failed) {
......
......@@ -129,7 +129,7 @@
//获取建仓单详情
if (self.isSaveDetails) {
[self getOrderDetailsDatas];
[self getOilPriceDatas];
[self getOilPriceDatas];
}
}
......@@ -270,6 +270,16 @@
{
TypeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TypeTableViewCell" forIndexPath:indexPath];
cell.titleLabe.text = @"配送区域:";
//只有一个配送区域情况
if (self.distributionArray.count == 1) {
self.distributionDict = [self.distributionArray firstObject];
cell.contentLabe.text = self.distributionDict[@"name"];
}
//无配送区域情况
if (!self.distributionArray.count) {
cell.contentLabe.text = @"无";
}
cell.userInteractionEnabled = self.distributionArray.count > 1;
if (self.isSaveDetails) {
cell.contentLabe.text = self.orderDetails.deliveryArea.name;
}
......@@ -380,15 +390,20 @@
break;
case 1://配送区域
{
TypeTableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
if (![ICRUserUtil sharedInstance].storeArray.count) {
[IBTLoadingView showTextOnly:@"当前用户没有所属油站,不能选择配送区域"];return;
}
PromptTableViewController *selectArea = [[PromptTableViewController alloc]init];
selectArea.title = @"选择配送区域";
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *dict in self.distributionArray) {
[tempArray addObject:dict[@"name"]];
if (![tempArray containsObject:dict[@"name"]]) {
[tempArray addObject:dict[@"name"]];
}
}
selectArea.datasArray = tempArray;
//选择配送区后回调
[selectArea setSelectCellTitle:^(NSString *title,NSInteger cellindex) {
cell.contentLabe.text = title?title:@"请选择";
......@@ -466,8 +481,15 @@
#pragma mark -UITextField监听
- (void)changeTextfieldString:(UITextField *)textField
{
if (!self.oilPrice.records.count) {
[IBTLoadingView showTextOnly:@"油品价格异常"];
textField.text = nil;
return;
}
if (![self isPureInt:textField.text]) {
[IBTLoadingView showTextOnly:@"只支持整数、浮点数"];
textField.text = nil;
return;
}
//申请总额
NumberTableViewCell *numberCell = [self.createWarehouseTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:5 inSection:0]];
......@@ -501,6 +523,7 @@
}
TimeSelectTableViewCell *cell = [self.createWarehouseTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
DepotRequestBill *orderBill = [[DepotRequestBill alloc]init];
orderBill.version = self.orderDetails.version;
ICRUserUtil *user = [ICRUserUtil sharedInstance];
//状态
orderBill.state = @"initial";
......@@ -543,13 +566,13 @@
time.endDateTime = [NSString stringWithFormat:@"%@ 23:59:59",[cell.endTimeButton currentTitle]];
orderBill.deliveryTime = time;
//申请价格
orderBill.reqPrice = [NSNumber numberWithFloat:[[self.oilPrice.records firstObject][@"salePrice"] doubleValue]];
orderBill.reqPrice = [NSNumber numberWithDouble:[[self.oilPrice.records firstObject][@"salePrice"] doubleValue]];
NumberTableViewCell *numberCell = [self.createWarehouseTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:5 inSection:0]];
if ([orderBill.reqPrice isEqualToNumber:@0]) {
[IBTLoadingView showTextOnly:@"价格异常"];return;
}
//申请数量
orderBill.quantity = [NSNumber numberWithFloat:[numberCell.createNumberField.text doubleValue]];
orderBill.quantity = [NSNumber numberWithDouble:[numberCell.createNumberField.text doubleValue]];
if ([orderBill.quantity isEqualToNumber:@0]) {
[IBTLoadingView showTextOnly:@"数量异常"];return;
}
......@@ -563,18 +586,12 @@
[HttpRequestManager requestNetworkwithURL:string withRequestType:ZERO withParameter:[orderBill toDictionary] withSuccess:^(id returnValue) {
if ([returnValue[@"success"] isEqualToNumber:@1]) {
if (!isPushDetails) {
[IBTLoadingView hideHUDWithText:nil];
block(returnValue[@"data"],orderBill);return;
}
[IBTLoadingView hideHUDWithText:@"保存成功"];
block(returnValue[@"data"],orderBill);
if (!isPushDetails) return;//是否需要跳转太详情页
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
NewRequestViewController *details = [weakSelf.storyboard instantiateViewControllerWithIdentifier:@"NewRequestViewController"];
details.orderUUID = returnValue[@"data"][@"uuid"];
details.isSaveDetails = YES;
details.title = @"修改建仓单";
details.oilTypeDict = weakSelf.oilTypeDict;
details.distributionDict = weakSelf.distributionDict;
[weakSelf PushViewController:details animated:YES];
});
[weakSelf saveOrderSuccess:returnValue[@"data"][@"uuid"]];
}
else {
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
......@@ -586,11 +603,24 @@
}];
}
#pragma mark -保存成功
- (void)saveOrderSuccess:(NSString *)uuidString
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
NewRequestViewController *details = [self.storyboard instantiateViewControllerWithIdentifier:@"NewRequestViewController"];
details.orderUUID = uuidString;
details.isSaveDetails = YES;
details.title = @"建仓申请单明细";
details.oilTypeDict = self.oilTypeDict;
details.distributionDict = self.distributionDict;
[self PushViewController:details animated:YES];
});
}
#pragma mark -提交建仓单
- (void)commitOrder
{
__weak typeof(self) weakSelf = self;
[self saveOrderBill:NO returnSaveSateBlock:^(NSDictionary *dict, DepotRequestBill *orderbBill) {
[IBTLoadingView showProgressLabel:@"提交中..."];
......@@ -615,6 +645,7 @@
} else {
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
[weakSelf saveOrderSuccess:dict[@"uuid"]];
}
} withFailed:^(NSError *failed) {
[IBTLoadingView hideHUDWithText:nil];
......
......@@ -368,7 +368,7 @@
//油站经营类型
order.operatingType = self.orderDetails.operatingType;
//订单状态
order.state = boolValue?@"initial":@"submit";
order.state = @"initial";
order.version = self.orderDetails.version;
order.uuid = self.orderDetails.uuid;
order.billnumber = self.orderDetails.billnumber;
......@@ -415,17 +415,13 @@
NSDictionary *orderDict = [order toDictionary];
[HttpRequestManager requestNetworkwithURL:string withRequestType:ZERO withParameter:orderDict withSuccess:^(id returnValue) {
if ([returnValue[@"success"] isEqualToNumber:@1]) {
if (!boolValue) {
[IBTLoadingView hideHUDWithText:nil];
saveSuccess(returnValue[@"data"],order);return;
}
[IBTLoadingView hideHUDWithText:@"保存成功"];
saveSuccess(returnValue[@"data"],order);
if (!boolValue) return;//提交调用保存时不需要跳转到详情
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
OrderDetailsViewController *orderDetail = [self.storyboard instantiateViewControllerWithIdentifier:@"OrderDetailsViewController"];
orderDetail.orderUUIDString = returnValue[@"data"][@"uuid"];
orderDetail.oilTypeListDatasArray = self.oilTypeListDatasArray;
orderDetail.title = @"订油单详情";
orderDetail.boolValue = YES;
[weakSelf PushViewController:orderDetail animated:YES];
});
[weakSelf gotoOrderDetail:returnValue[@"data"][@"uuid"]];
}else
{
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
......@@ -436,6 +432,19 @@
}];
}
#pragma mark -订单详情
- (void)gotoOrderDetail:(NSString *)uuid
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
OrderDetailsViewController *orderDetail = [self.storyboard instantiateViewControllerWithIdentifier:@"OrderDetailsViewController"];
orderDetail.orderUUIDString = uuid;
orderDetail.oilTypeListDatasArray = self.oilTypeListDatasArray;
orderDetail.title = @"订油单详情";
orderDetail.boolValue = YES;
[self PushViewController:orderDetail animated:YES];
});
}
#pragma mark -提交订油单
- (void)commitOilOrder
......@@ -462,17 +471,11 @@
if ([returnValue[@"success"] isEqualToNumber:@1]) {
[IBTLoadingView hideHUDWithText:@"提交成功"];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
OrderDetailsViewController *orderDetail = [self.storyboard instantiateViewControllerWithIdentifier:@"OrderDetailsViewController"];
orderDetail.orderUUIDString = dict[@"uuid"];
orderDetail.oilTypeListDatasArray = self.oilTypeListDatasArray;
orderDetail.title = @"订油单详情";
orderDetail.boolValue = YES;
[weakSelf PushViewController:orderDetail animated:YES];
});
[weakSelf gotoOrderDetail:dict[@"uuid"]];
} else {
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
[weakSelf gotoOrderDetail:dict[@"uuid"]];
}
} withFailed:^(NSError *failed) {
......
//
// QueryModel.h
// total
//
// Created by 曹云霄 on 2017/1/9.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import <JSONModel/JSONModel.h>
@class Orders,Condition;
@protocol Orders @end
@protocol Condition @end
@interface QueryModel : JSONModel
@property (nonatomic, strong) NSArray<Orders> *orders;
@property (nonatomic, assign) NSInteger pageNumber;
@property (nonatomic, assign) NSInteger pageSize;
@property (nonatomic, strong) NSArray<Condition> *conditions;
@end
@interface Orders : JSONModel
@property (nonatomic, copy) NSString *field;
@property (nonatomic, copy) NSString *direction;
@end
@interface Condition : JSONModel
@property (nonatomic, copy) NSString *operation;
@property (nonatomic, strong) NSArray<NSString *>*parameters;
@end
//
// QueryModel.m
// total
//
// Created by 曹云霄 on 2017/1/9.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import "QueryModel.h"
@implementation QueryModel
+ (BOOL)propertyIsOptional:(NSString *)propertyName
{
return YES;
}
@end
@implementation Orders
+ (BOOL)propertyIsOptional:(NSString *)propertyName
{
return YES;
}
@end
@implementation Condition
+ (BOOL)propertyIsOptional:(NSString *)propertyName
{
return YES;
}
@end
......@@ -1003,22 +1003,16 @@
self.orderDetails.remark = self.userInputArray[ONE][9];
NSString *urlString = [NSString stringWithFormat:@"%@/receiveBill/save?operId=%@&operName=%@&time=%@",HTTP_REST_API_BASE_URL,user.f_user_uuid,user.f_user_name,[GTOCommonTools GetCurrenttime]];
NSString *string = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"%@",[self.orderDetails toDictionary]);
[IBTLoadingView showProgressLabel:@"保存中..."];
[HttpRequestManager requestNetworkwithURL:string withRequestType:ZERO withParameter:[self.orderDetails toDictionary] withSuccess:^(id returnValue) {
if ([returnValue[@"success"] isEqualToNumber:@1]) {
[IBTLoadingView hideHUDWithText:@"保存成功"];
if (!boolValue) {
[IBTLoadingView hideHUDWithText:nil];
bolck(returnValue[@"data"][@"uuid"]);return;
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
SeeObtainViewController *orderBill = [weakSelf.storyboard instantiateViewControllerWithIdentifier:@"SeeObtainViewController"];
orderBill.orderUUIDString = returnValue[@"data"][@"uuid"];
orderBill.storeDict = self.storeDict;//油站
orderBill.isReturnRootVC = YES;
[weakSelf PushViewController:orderBill animated:YES];
});
[IBTLoadingView hideHUDWithText:@"保存成功"];
[weakSelf saveOrderSuccess:returnValue[@"data"][@"uuid"]];
} else {
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
}
......@@ -1053,6 +1047,7 @@
} else {
[IBTLoadingView hideHUDWithText:returnValue[@"message"]];
[weakSelf saveOrderSuccess:uuidString];
}
} withFailed:^(NSError *failed) {
......@@ -1063,6 +1058,18 @@
} isPushDetails:NO];
}
#pragma mark -保存收油单成功
- (void)saveOrderSuccess:(NSString *)uuidString
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
SeeObtainViewController *orderBill = [self.storyboard instantiateViewControllerWithIdentifier:@"SeeObtainViewController"];
orderBill.orderUUIDString = uuidString;
orderBill.storeDict = self.storeDict;//油站
orderBill.isReturnRootVC = YES;
[self PushViewController:orderBill animated:YES];
});
}
#pragma mark -返回提示信息
- (NSString *)returnPromptInformation:(NSInteger)index
......
......@@ -319,7 +319,7 @@ typedef enum : NSUInteger {
NewRequestViewController *details = [self.storyboard instantiateViewControllerWithIdentifier:@"NewRequestViewController"];
details.orderUUID = dict[@"uuid"];
details.isSaveDetails = YES;
details.title = @"修改建仓单";
details.title = @"建仓申请单明细";
details.oilTypeDict = dict[@"item"];
details.distributionDict = dict[@"deliveryArea"];
[self PushViewController:details animated:YES];
......
......@@ -192,7 +192,7 @@
cell.establishWarehouseUnitLabe.text = self.orderDetails.org.name;
cell.establishName.text = self.orderDetails.createInfo.operator.operName;
cell.establishDate.text = self.orderDetails.createInfo.time;
if ([self.orderDetails.state isEqualToString:@"general"]) {
if ([self.orderDetails.type isEqualToString:@"general"]) {
cell.typeLabe.text = @"普通";
}
cell.distributionLabe.text = self.orderDetails.deliveryArea.name;
......@@ -324,8 +324,6 @@
options:WYPopoverAnimationOptionFadeWithScale];
}
#pragma mark -删除或者作废后返回此订单UUID
- (void)returnUUIDsingAfterDeleteOrCancel:(BOOL)isDelete
{
......
......@@ -93,6 +93,7 @@
#pragma mark -确定
- (void)completeButtonClick:(UIBarButtonItem *)item
{
[self dismissViewControllerAnimated:YES completion:nil];
if (self.selectTitle || self.currentTitle) {
if (self.selectCellTitle) {
self.selectCellTitle(self.selectTitle?self.selectTitle:self.currentTitle,self.indexpathSelect.row);
......
......@@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.7</string>
<string>1.2.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.7</string>
<string>1.2.9</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
......@@ -35,6 +35,7 @@
#import "NSData+EncodeAdditions.h"
#import "UIScrollView+Content.h"
#import "GTOCommonTools.h"
#import "NSDictionary+Category.h"
......@@ -78,21 +79,17 @@
//#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/total-server/rest" //
//#define HTTP_LOCAL_BASE_URL @"http://218.244.151.129:7580"
////正式环境
//正式环境
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:7080/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//测试环境
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//
//测试环境
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8080/total-server/rest"
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//开发环境
#define HTTP_LOCAL_BASE_URL @"http://139.196.195.30:8093"
#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.195.30:8093"
//#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
......
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