Commit 2b2427f0 authored by Sandy's avatar Sandy

1、对账单中的金额加千分号

2、模块名称修改:“商铺对账单”改为“对账单”

3、对账单里商户代码不要显示出来

4、模块名称修改:系统公告改为公告栏
parent 1d0eefbc
......@@ -5606,8 +5606,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = NO;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = NO;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
COMPRESS_PNG_FILES = NO;
ENABLE_STRICT_OBJC_MSGSEND = NO;
GCC_PREFIX_HEADER = vanke/vanke.pch;
......@@ -5651,7 +5651,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.vanke;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE = "da8de50e-62c2-4312-8dda-7c81fb04858d";
TARGETED_DEVICE_FAMILY = 1;
VALID_ARCHS = "arm64 armv7 armv7s";
VERSIONING_SYSTEM = "";
......@@ -5712,7 +5712,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.vanke;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE = "da8de50e-62c2-4312-8dda-7c81fb04858d";
TARGETED_DEVICE_FAMILY = 1;
VALID_ARCHS = "arm64 armv7 armv7s";
VERSIONING_SYSTEM = "";
......
......@@ -128,7 +128,7 @@
}
+ (NSString *)getPercent:(id)num1 num:(id)num2 {
[self calculateNum1:num1 num2:num1 type:CalculateTypeDiv roundingType:NSRoundBankers cutLenth:4];
NSDecimalNumber *result = [self oneHundredTimes:[self calculateNum1:num1 num2:num2 type:CalculateTypeDiv roundingType:NSRoundBankers cutLenth:4]];
return [NSString stringWithFormat:@"%@%%",[self getMoneyStringFromString:result.stringValue]];
}
......
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.6</string>
<string>1.4.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -26,11 +26,9 @@
//后台多媒体文件基准地址
#define VANKE_SERVER_MEDIA_BASE_URL @"http://140.206.62.178:8080" //正式
// 测试环境
//#define VANKE_SERVER_BASE_URL @"http://139.196.39.77:8080/wanke-server/rest"
//#define VANKE_SERVER_MEDIA_BASE_URL @"http://139.196.39.77:8080"
//#define VANKE_SERVER_BASE_URL @"http://139.196.39.77:6080/wanke-server/rest"
//#define VANKE_SERVER_MEDIA_BASE_URL @"http://139.196.39.77:6080"
// 后台服务企业认证码
#define VANKE_AUTHENTI_CODE @"211534962"
......@@ -41,6 +39,4 @@
// 后台服务认证用户密码
#define VANKE_SERVER_PASSWORD @"password"
#endif /* VankeConfig_h */
......@@ -34,6 +34,10 @@
// 项目列表,多个值以“,“分隔
@property (nonatomic, strong) NSString *projectIdsIn;
// 收缴率 年月
@property (nonatomic, strong) NSString *collectFeeRateDate;
@end
// 项目汇总信息
......@@ -57,6 +61,12 @@
// wifi登录数
@property (nonatomic, strong) NSNumber *wifiLoginTimes;
@property (nonatomic, strong) NSNumber *paidStatement;
@property (nonatomic, strong) NSNumber *totalStatement;
@end
......
......@@ -27,8 +27,14 @@
if (![self checkToQuery]) {
return;
}
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd"];
NSDate *date = [df dateFromString:self.passengerDate];
[df setDateFormat:@"yyyyMM"];
NSString *yearMonth = [df stringFromDate:date];
[self http_get:@"project/queryclassificationby"].PARAM(@"salesDateEquals", self.salesDate).PARAM(@"passengerDateEquals", self.passengerDate).PARAM(@"trafficDateEquals", self.trafficDate).PARAM(@"rentalDateEquals", self.rentalDateEquals).PARAM(@"projectIdsIn", self.projectIdsIn) .TIMEOUT(10);
[self http_get:@"project/queryclassificationby"].PARAM(@"salesDateEquals", self.salesDate).PARAM(@"passengerDateEquals", self.passengerDate).PARAM(@"trafficDateEquals", self.trafficDate).PARAM(@"rentalDateEquals", self.rentalDateEquals).PARAM(@"projectIdsIn", self.projectIdsIn).PARAM(@"settleNoEquals",yearMonth).TIMEOUT(10);
}
else if (self.succeed)
{
......
......@@ -30,6 +30,9 @@
// 项目列表,多个值以“,"分隔
@property (nonatomic, strong) NSString *projectIdsIn;
// 收缴率 年月
@property (nonatomic, strong) NSString *collectFeeRateDate;
-(ProjectSummaryResponse*) getServerResp;
@end
vanke/view_iPhone/resource/img/bill.png

3.75 KB | W: | H:

vanke/view_iPhone/resource/img/bill.png

3.02 KB | W: | H:

vanke/view_iPhone/resource/img/bill.png
vanke/view_iPhone/resource/img/bill.png
vanke/view_iPhone/resource/img/bill.png
vanke/view_iPhone/resource/img/bill.png
  • 2-up
  • Swipe
  • Onion skin
vanke/view_iPhone/resource/img/bill@2x.png

5.65 KB | W: | H:

vanke/view_iPhone/resource/img/bill@2x.png

4.76 KB | W: | H:

vanke/view_iPhone/resource/img/bill@2x.png
vanke/view_iPhone/resource/img/bill@2x.png
vanke/view_iPhone/resource/img/bill@2x.png
vanke/view_iPhone/resource/img/bill@2x.png
  • 2-up
  • Swipe
  • Onion skin
vanke/view_iPhone/resource/img/notice.png

3.29 KB | W: | H:

vanke/view_iPhone/resource/img/notice.png

2.6 KB | W: | H:

vanke/view_iPhone/resource/img/notice.png
vanke/view_iPhone/resource/img/notice.png
vanke/view_iPhone/resource/img/notice.png
vanke/view_iPhone/resource/img/notice.png
  • 2-up
  • Swipe
  • Onion skin
vanke/view_iPhone/resource/img/notice@2x.png

5.04 KB | W: | H:

vanke/view_iPhone/resource/img/notice@2x.png

4.36 KB | W: | H:

vanke/view_iPhone/resource/img/notice@2x.png
vanke/view_iPhone/resource/img/notice@2x.png
vanke/view_iPhone/resource/img/notice@2x.png
vanke/view_iPhone/resource/img/notice@2x.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -126,7 +126,7 @@
//客流分布
NSString *url = [NSString stringWithFormat:@"%@/wanke-web/chart/formatpaschart.thor?projectEquals=%@&passengerFlowDateEquals=%@&enterprise=%@", VANKE_SERVER_MEDIA_BASE_URL,self.floorValue.project.projectId,self.strSelectDate,ent.uuid];
CLog(@"%@", @[passengersaleschart, formatdischart, url2, sale, flow, url]);
return @[passengersaleschart, formatdischart, url2, sale, flow, url];
return @[formatdischart, passengersaleschart, url2, sale, flow, url];
}
- (void)viewDidLayoutSubviews {
......
......@@ -108,14 +108,14 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
if (authorizedOrgs.count == 0) {
return;
}
// else if (authorizedOrgs.count == 1) {
// AuthorizedOrg *org = [authorizedOrgs objectAtIndex:0];
// //跳转对账单
// UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Statement" bundle:nil];
// StatementViewController *statementVC = [storyboard instantiateViewControllerWithIdentifier:@"StatementViewController"];
// statementVC.org = org;
// [self.navigationController pushViewController:statementVC animated:YES];
// }
else if (authorizedOrgs.count == 1) {
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:0];
//跳转对账单
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Statement" bundle:nil];
StatementViewController *statementVC = [storyboard instantiateViewControllerWithIdentifier:@"StatementViewController"];
statementVC.org = org;
[self.navigationController pushViewController:statementVC animated:YES];
}
else {
CGFloat xWidth = self.view.bounds.size.width - 20.0f;
CGFloat yHeight = authorizedOrgs.count * 60 + 50;
......@@ -148,21 +148,29 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) {
// salesVC.authorizedOrg = [model getAuthOrgs][0];
// [self.navigationController pushViewController:salesVC animated:YES];
// }
SalesInputViewController *salesVC = [[SalesInputViewController alloc] init];
VankeCommonModel *userModel = [VankeCommonModel sharedInstance];
authorizedOrgs = [userModel getAuthOrgs];
CGFloat xWidth = self.view.bounds.size.width - 20.0f;
CGFloat yHeight = authorizedOrgs.count * 60 + 50;
if (yHeight > 400) {
yHeight = 400.0f;
if ([[userModel getAuthOrgs] count] == 1) {
salesVC.authorizedOrg = [userModel getAuthOrgs][0];
[self.navigationController pushViewController:salesVC animated:YES];
}else{
authorizedOrgs = [userModel getAuthOrgs];
CGFloat xWidth = self.view.bounds.size.width - 20.0f;
CGFloat yHeight = authorizedOrgs.count * 60 + 50;
if (yHeight > 400) {
yHeight = 400.0f;
}
CGFloat yOffset = (self.view.bounds.size.height - yHeight)/2.0f;
UIPopoverListView *poplistview = [[UIPopoverListView alloc] initWithFrame:CGRectMake(10, yOffset, xWidth, yHeight)];
poplistview.tag = 10001;
poplistview.delegate = self;
poplistview.datasource = self;
poplistview.listView.scrollEnabled = YES;
[poplistview setTitle:@"请选择查看项目"];
[poplistview show];
}
CGFloat yOffset = (self.view.bounds.size.height - yHeight)/2.0f;
UIPopoverListView *poplistview = [[UIPopoverListView alloc] initWithFrame:CGRectMake(10, yOffset, xWidth, yHeight)];
poplistview.tag = 10001;
poplistview.delegate = self;
poplistview.datasource = self;
poplistview.listView.scrollEnabled = YES;
[poplistview setTitle:@"请选择查看项目"];
[poplistview show];
}
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnServiceApply, signal) {
......
......@@ -185,6 +185,9 @@ ON_SIGNAL3( VankeServiceSaleCell_iPhone, btnHistoryMask, signal ) {
_summaryModel.trafficDate = dateStr;
_summaryModel.rentalDateEquals = dateStr;
_summaryModel.projectIdsIn = [[VankeCommonModel sharedInstance] getAuthOrgCodesWithComma];
[df setDateFormat:@"yyyyMM"];
NSString *date = [df stringFromDate:picker.date];
_summaryModel.collectFeeRateDate = date;
[_summaryModel reload];
}
}];
......
#import "VankeServiceDashBoard_iPhone.h"
#import "CalculateHelper.h"
#pragma mark -
@interface VankeServiceDashBoard_iPhone ()
......@@ -62,7 +62,7 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
[self.passenger loadDefaults:@"people.png" title:@"昨日客流" bgColor:[UIColor colorWithRed:0 green:195/255.0 blue:230/255.0 alpha:1] unit:@"人" defValue:[NSNumber numberWithInt:0]];
[self.traffic loadDefaults:@"car.png" title:@"车流" bgColor:[UIColor colorWithRed:79/255.0 green:143/255.0 blue:248/255.0 alpha:1] unit:@"次" defValue:[NSNumber numberWithInt:0]];
[self.energy loadDefaults:@"energy.png" title:@"坪效" bgColor:[UIColor colorWithRed:149/255.0 green:200/255.0 blue:8/255.0 alpha:1] unit:@"元" defValue:[NSNumber numberWithInt:0]];
[self.complaint loadDefaults:@"complaint.png" title:@"收缴率" bgColor:[UIColor colorWithRed:252/255.0 green:67/255.0 blue:62/255.0 alpha:1] unit:@"" defValue:[NSNumber numberWithInt:0]];
[self.complaint loadDefaults:@"complaint.png" title:@"收缴率" bgColor:[UIColor colorWithRed:252/255.0 green:67/255.0 blue:62/255.0 alpha:1] unit:@" " defValue:[NSNumber numberWithInt:0]];
}
- (void)unload
......@@ -80,7 +80,9 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
[self.passenger setData:summary.passengerFlowVolume];
[self.traffic setData:[NSNumber numberWithFloat:122]];
[self.energy setData:[NSNumber numberWithInt:789]];
[self.complaint setData:summary.wifiLoginTimes];
NSString *rate = [CalculateHelper getPercent:summary.paidStatement num:summary.totalStatement];
self.complaint.lblAmount.text = rate;
}
}
......
......@@ -61,7 +61,7 @@ ON_CREATE_VIEWS( signal )
[UIApplication sharedApplication].statusBarHidden = NO;
self.navigationBarShown = YES;
self.title = @"公告";
self.title = @"公告";
self.allowedSwipeToBack = YES;
[self.segment addTitle:@"未读" tag: SEGMENT_UNREAD];
......
......@@ -65,11 +65,10 @@ ON_CREATE_VIEWS( signal )
} else {
self.navigationController.navigationBar.tintColor = color;
}
}
- (instancetype)init{
self = [super init];
if (self) {
......@@ -94,6 +93,7 @@ ON_CREATE_VIEWS( signal )
self.totalArr = [NSMutableArray array];
self.selectArr = [NSMutableArray array];
[self bulidLayout];
UIBarButtonItem *searchItem = [[UIBarButtonItem alloc]initWithTitle:@"历史" style:UIBarButtonItemStyleDone target:self action:@selector(customSegTwoClick:)];
self.navigationItem.rightBarButtonItem = searchItem;
self.automaticallyAdjustsScrollViewInsets = NO;
......@@ -212,6 +212,27 @@ ON_CREATE_VIEWS( signal )
}
}
if (com == nil) {
com = [[Compass alloc] init];
}
if ([self.segView.currentTitle isEqualToString:SaleDay]) {
com.dataScope = self.selectDay;
if (self.selectDay == nil) {
com.dataScope = [[NSDate date] yearMonthDayString];
}
}else if ([self.segView.currentTitle isEqualToString:SaleWeek]) {
com.dataScope = self.selectWeek;;
if (self.selectWeek == nil) {
com.dataScope = [IBTCommon getWeekFromDate];
}
}else if ([self.segView.currentTitle isEqualToString:SaleMonth]) {
com.dataScope = self.selectMonth;;
if (self.selectMonth == nil) {
com.dataScope = [[NSDate date] yearMonthString];
}
}
self.compass = com;
[self setValueInScrollView];
}else{
......
......@@ -12,11 +12,13 @@
//#import "ReportDetailViewController.h"
#import "RSaleView.h"
#import "Compass.h"
#import "UIScrollView+EmptyDataSet.h"
static NSString *saleCellIdentify = @"saleCellIdentify";
static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
@interface SaleViewController ()<UITableViewDataSource,UITableViewDelegate>
@interface SaleViewController ()<UITableViewDataSource,UITableViewDelegate,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
@property (nonatomic,strong)RSaleView *rsaleView;
@property (nonatomic,strong)Compass *compass;
@property (nonatomic,strong)NSIndexPath *currentIndex;
......@@ -53,9 +55,12 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
self.tableView = [[UITableView alloc]initWithFrame:rect style:UITableViewStylePlain];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.emptyDataSetSource = self;
self.tableView.emptyDataSetDelegate = self;
[self.tableView registerClass:[SaleViewCell class] forCellReuseIdentifier:saleCellIdentify];
[self.tableView registerClass:[SaleHeaderView class] forHeaderFooterViewReuseIdentifier:saleHeaderIdentify];
self.tableView.tableHeaderView = self.rsaleView;
self.tableView.tableFooterView = [UIView new];
[self.view addSubview:self.tableView];
}
......@@ -94,6 +99,24 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
return cell;
}
#pragma mark - empty state
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
return [UIImage imageNamed:@"no_data"];
}
- (CAAnimation *)imageAnimationForEmptyDataSet:(UIScrollView *)scrollView {
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath: @"transform"];
animation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI_2, 0.0, 0.0, 1.0)];
animation.duration = 1;
animation.cumulative = YES;
animation.repeatCount = MAXFLOAT;
return animation;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return [SaleViewCell cellHeight];
......
......@@ -165,7 +165,7 @@
weekday = [IBTCommon weekdayStringFromDate:[IBTCommon convertToDateFrom:compass.dataScope]];
}
self.dateLabel.text = compass.dataScope?[NSString stringWithFormat:@"%@%@累计销售额",compass.dataScope,weekday]:@"无";
self.dateLabel.text = [NSString stringWithFormat:@"%@累计销售额",compass.dataScope];
//销售额
NSString *strSales = [CalculateHelper getMoneyStringFrom:compass.sales Lenth:0 isSeparate:YES];
......@@ -186,13 +186,16 @@
if (![salesChainRateStr hasPrefix:@"-"] && ![salesChainRateStr isEqualToString:@"0"] && ![salesChainRateStr hasPrefix:@"--"]) {
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal];
self.centerLabel.textColor = ReportContentColor;
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateNormal];
}else if ([salesChainRateStr hasPrefix:@"-"] && ![salesChainRateStr isEqualToString:@"0"] && ![salesChainRateStr hasPrefix:@"--"]){
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal];
self.centerLabel.textColor = GXF_SAVE_COLOR;
[self.lastWeekLabel setTitleColor:GXF_SAVE_COLOR forState:UIControlStateNormal];
}else{
[self.lastWeekLabel setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
[self.lastWeekLabel setImage:nil forState:UIControlStateNormal];
self.centerLabel.textColor = [UIColor lightGrayColor];
}
[self.lastWeekLabel setTitle:[CalculateHelper getABSValue:salesChainRateStr] forState:UIControlStateNormal];
......@@ -224,7 +227,7 @@
//坪效
NSDecimalNumber *groundEffect = [CalculateHelper calculateNum1:compass.sales num2:compass.area type:CalculateTypeDiv roundingType:NSRoundBankers cutLenth:2];
NSString *salesTargetStr = compass.area?[NSString stringWithFormat:@"%@",[groundEffect stringValue]]:@"---";
NSString *salesTargetStr = compass.area?[NSString stringWithFormat:@"%@",[CalculateHelper getMoneyStringFrom:groundEffect]]:@"---";
self.rateLabel.text = salesTargetStr;
// //单店日均销售
// NSString *dailysalesPerStr = compass.dailysalesPerStore?[NSString stringWithFormat:@"%@",[IBTCommon stringDisposeWithFloat:[compass.dailysalesPerStore floatValue]]]:@"---";
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
</dependencies>
<objects>
......@@ -12,7 +12,7 @@
<rect key="frame" x="0.0" y="0.0" width="316" height="85"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="316" height="84"/>
<rect key="frame" x="0.0" y="0.0" width="316" height="84.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="楼层销售" translatesAutoresizingMaskIntoConstraints="NO" id="6lO-Np-GH7">
......
......@@ -94,6 +94,10 @@
self.dailySaleLabel.textColor = GXF_COMMIT_COLOR;
[self.contentView addSubview:self.dailySaleLabel];
UIView *line = [UIView new];
line.backgroundColor = [UIColor lightGrayColor];
//三个小点
// rect = CGRectMake(self.rateLabel.right, 0, 25, Sale_Cell_Height);
// self.detailBtn = [IBTCommon buttonWithTitle:@"" Image:[UIImage imageNamed:@"more_detail"] frame:rect fontSize:20 fontColor:ReportBgColor];
......
......@@ -29,9 +29,9 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.arrData = [LoginShopsInstance shareInstance].arrShops;
self.results = [self.arrData mutableCopy];
// [self httpRequestGetShops];
// self.arrData = [LoginShopsInstance shareInstance].arrShops;
[self httpRequestGetShops];
self.title = @"选择商铺";
[self setUPSearchBar];
......@@ -41,24 +41,27 @@
- (void)httpRequestGetShops {
self.arrData = [LoginShopsInstance shareInstance].arrShops;
NSMutableArray *arr = [NSMutableArray array];
for (VankeShopModel *shop in self.arrData) {
[arr addObject:shop.code];
if ([[VankeCommonModel sharedInstance] curUserIsTenant]) {
self.results = [[LoginShopsInstance shareInstance].arrShops mutableCopy];
[self.tableView reloadData];
return;
}
NSString *codes = [arr componentsJoinedByString:@","];
NSString *url = [NSString stringWithFormat:@"shopCodesIn%@/projectIdEquals%@",codes, self.projectId];
NSString *url = [NSString stringWithFormat:@"shop/query?projectIdEquals=%@",self.projectId];
NSString *encodeUrlStr = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
WS(weakSelf);
[httpCtrl getUrl:encodeUrlStr params:nil success:^(id data) {
[weakSelf.arrData removeAllObjects];
for (NSDictionary *dic in data[@"data"]) {
VankeShopModel *shop = [VankeShopModel modelObjectWithDictionary:dic];
[weakSelf.arrData addObject:shop];
}
weakSelf.results = [NSArray arrayWithArray:weakSelf.arrData];
[weakSelf.tableView reloadData];
} failure:^(id data) {
}];
......@@ -136,6 +139,13 @@
[self.navigationController popViewControllerAnimated:YES];
}
- (NSMutableArray *)arrData {
if (!_arrData) {
_arrData = [NSMutableArray array];
}
return _arrData;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
......@@ -71,6 +71,10 @@
}
- (void)chooseShopAction {
if ([[VankeCommonModel sharedInstance] curUserIsTenant]) {
return;
}
ChooseShopViewController *chooseVC = [[ChooseShopViewController alloc] init];
chooseVC.projectId = self.projectid;
WS(weakSelf);
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--Sale Input Pic Collection View Controller-->
......
......@@ -32,7 +32,6 @@
#define kAutoValue(value) (float)value / 375 * self.view.frame.size.width
@interface SalesInputViewController ()<UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) SalesInputTopView *topView;
......@@ -50,6 +49,9 @@
@implementation SalesInputViewController
//顶部高度
static NSInteger const TOP_HEIGHT = 145;
- (void)viewDidLoad {
[super viewDidLoad];
......@@ -75,12 +77,9 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
if([LoginShopsInstance shareInstance].arrShops.count == 1){
self.topView.buttonName.userInteractionEnabled = NO;
}
if (self.shop == nil) {
[self.topView setShopName:@"请选择店铺"];
}else{
......@@ -98,9 +97,7 @@ ON_WILL_APPEAR( signal )
}
- (void)setUpTableView {
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 125, SCREEN_WIDTH, SCREEN_HEIGHT - self.topView.bottom - 70) style:UITableViewStylePlain];
// self.tableView.contentInset = UIEdgeInsetsMake(179, 0, 0, 0);
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, TOP_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT - self.topView.bottom - 70) style:UITableViewStylePlain];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
......@@ -208,9 +205,9 @@ ON_WILL_APPEAR( signal )
- (void)setUpNavigationBar {
self.navigationItem.title = @"销售录入";
self.navigationController.navigationBar.backgroundImage = [UIImage imageWithColor:[UIColor colorWithRed:0.953 green:0.439 blue:0.063 alpha:1.000]];
self.navigationController.navigationBar.backgroundImage = [UIImage imageWithColor:[UIColor colorWithRed:0.918 green:0.392 blue:0.004 alpha:1.000]];
UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithTitle:@"历史" style:UIBarButtonItemStyleDone target:self action:@selector(goToHistory)];
UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithTitle:@"历史查询" style:UIBarButtonItemStyleDone target:self action:@selector(goToHistory)];
rightBtn.tintColor = [UIColor whiteColor];
self.navigationItem.rightBarButtonItem = rightBtn;
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
......@@ -219,24 +216,22 @@ ON_WILL_APPEAR( signal )
- (void)setUpTopView {
SalesInputTopView *topView = [self viewWithNibName:@"SalesInputTopView"];
topView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 125 + 64);
topView.frame = CGRectMake(0, 0, SCREEN_WIDTH, TOP_HEIGHT + 64);
self.topView = topView;
topView.textfieldDate.inputView = self.datePicker;
topView.textfieldDate.delegate = self;
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd"];
NSString *strTime = [df stringFromDate:[NSDate date]];
topView.textfieldDate.text = strTime;
WS(weakSelf)
topView.nameTapActionBlock = ^{
[weakSelf chooseShopAction];
};
[self.view addSubview:topView];
if ([[VankeCommonModel sharedInstance] curUserIsTenant]) {
self.shop = [LoginShopsInstance shareInstance].arrShops[0];
}
}
......@@ -258,7 +253,11 @@ ON_WILL_APPEAR( signal )
- (void)chooseShopAction {
ChooseShopViewController *chooseVC = [[ChooseShopViewController alloc] init];
chooseVC.projectId = self.authorizedOrg.uuid;
chooseVC.projectId = self.authorizedOrg.code;
if ([[VankeCommonModel sharedInstance] curUserIsTenant]) {
return;
}
chooseVC.chooseBlock = ^(VankeShopModel *shop){
self.shop = shop;
[self.topView setShopName:shop.name];
......@@ -290,35 +289,27 @@ ON_WILL_APPEAR( signal )
if (self.shop == nil) {
}else{
[self.tableView reloadData];
WS(weakSelf)
NSDictionary *params = @{@"shopCodeEquals" : self.shop.code,
@"beginDateEquals" : self.topView.textfieldDate.text,
@"endDateEquals" : self.topView.textfieldDate.text,
@"pageNumber" : @0,
@"pageSize" : @0};
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
[httpCtrl getUrl:@"salesinput/query" params:params success:^(id data) {
if ([data[@"data"][@"records"] count] > 0) {
NSNumber *amount = data[@"data"][@"records"][0][@"amount"];
NSString *amountStr = [NSString stringWithFormat:@"%.0f", [amount floatValue]];
weakSelf.todayTotalAmount = amountStr;
weakSelf.totalView.labelTotalAmount.text = amountStr;
}else{
weakSelf.todayTotalAmount = @"0";
weakSelf.totalView.labelTotalAmount.text = @"0";
}
[weakSelf countTotalMonney];
NSLog(@"d");
} failure:^(id data) {
}];
}
}
......@@ -343,7 +334,7 @@ ON_WILL_APPEAR( signal )
}
self.totalView.labelTotal.text = [count stringValue];
self.totalView.labelTotalAmount.text = [[CalculateHelper calculateNum1:count num2:self.todayTotalAmount type:CalculateTypeAdd roundingType:NSRoundBankers cutLenth:2] stringValue];
self.topView.textFieldTotalAmount.text = [[CalculateHelper calculateNum1:count num2:self.todayTotalAmount type:CalculateTypeAdd roundingType:NSRoundBankers cutLenth:2] stringValue];
}
......@@ -357,20 +348,22 @@ ON_WILL_APPEAR( signal )
//利用字典key的唯一性,保存每个cell上的数据
if (![self.cellDataDic objectForKey:indextPath]) {
[self.cellDataDic setObject:@[@"0",@"0"] forKey:indextPath];
[self.cellDataDic setObject:@[@""] forKey:indextPath];
}
return [self.cellDataDic objectForKey:indextPath];
}
- (void)goToHistory {
HistoryViewController *history = [[HistoryViewController alloc] init];
history.projectid = self.authorizedOrg.uuid;
history.projectid = self.authorizedOrg.code;
history.shop = self.shop;
WS(weakSelf);
history.historyBlock = ^(){
[self.arrPics removeAllObjects];
[self.selectedAssets removeAllObjects];
[self.cellDataDic removeAllObjects];
[self.tableView reloadData];
[weakSelf.arrPics removeAllObjects];
[weakSelf.selectedAssets removeAllObjects];
[weakSelf.cellDataDic removeAllObjects];
weakSelf.totalView.textFieldBillCount.text = nil;
[weakSelf.tableView reloadData];
};
[self.navigationController pushViewController:history animated:YES];
}
......@@ -423,7 +416,6 @@ ON_WILL_APPEAR( signal )
for (NSDictionary *data in responseObject[@"data"]) {
[arrUuid addObject:data[@"uuid"]];
}
NSString *entityUuid = responseObject[@"data"][0][@"entityUuid"];
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
NSDictionary *params = [weakSelf getParamsAttachmentUuid:[NSString stringWithFormat:@"%@%@",weakSelf.shop.code, weakSelf.topView.textfieldDate.text] pictureUuids:arrUuid];
......@@ -450,13 +442,14 @@ ON_WILL_APPEAR( signal )
NSMutableArray *lines = [NSMutableArray array];
for (int i = 0; i < self.arrPaymentType.count; i++) {
NSString *bill = [self.cellDataDic objectForKey:[NSIndexPath indexPathForRow:i inSection:0]][1];
// NSString *bill = [self.cellDataDic objectForKey:[NSIndexPath indexPathForRow:i inSection:0]][1];
NSString *amount = [self.cellDataDic objectForKey:[NSIndexPath indexPathForRow:i inSection:0]][0];
NSString *filter = amount.length > 0 ? amount : @"0";
PaymentTypeModel *model = self.arrPaymentType[i];
NSDictionary *pay = @{@"payment" : model.name,
@"sortNumber" : model.sortNumber,
@"transactions" : [NSDecimalNumber decimalNumberWithString:bill],
@"amount" : [NSDecimalNumber decimalNumberWithString:amount]};
@"transactions" : @"0",
@"amount" : [NSDecimalNumber decimalNumberWithString:filter]};
[lines addObject:pay];
}
......@@ -467,6 +460,7 @@ ON_WILL_APPEAR( signal )
@"shopName" : self.shop.name,
@"salesDate" : self.topView.textfieldDate.text,
@"attachments" : pictures,
@"transactions":self.totalView.textFieldBillCount.text,
@"attachmentUuid" : attachmentUuid ? attachmentUuid : [NSNull null],
@"lines" : lines};
......@@ -475,6 +469,7 @@ ON_WILL_APPEAR( signal )
@"shopCode" : self.shop.code,
@"shopName" : self.shop.name,
@"salesDate" : self.topView.textfieldDate.text,
@"transactions":self.totalView.textFieldBillCount.text,
@"lines" : lines};
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
......@@ -91,7 +91,7 @@
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UAX-J6-XYl">
<rect key="frame" x="258" y="79" width="104" height="59"/>
<color key="backgroundColor" red="0.95294117649999999" green="0.43921568630000002" blue="0.062745098040000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="47" id="SdU-ok-lNc"/>
</constraints>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
......@@ -11,7 +11,7 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="110"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="109"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="109.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pbc-cV-k3t">
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
......@@ -22,11 +22,21 @@
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zfi-kO-rTQ">
<rect key="frame" x="0.0" y="0.0" width="326" height="1"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="PL5-W9-4Qm"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Zfi-kO-rTQ" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="64h-j2-LnM"/>
<constraint firstItem="VpK-Lc-RKO" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="JAw-vd-vqc"/>
<constraint firstItem="Zfi-kO-rTQ" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Z8g-lV-fQE"/>
<constraint firstAttribute="trailing" secondItem="VpK-Lc-RKO" secondAttribute="trailing" constant="18" id="dUO-Se-WcY"/>
<constraint firstAttribute="trailing" secondItem="Zfi-kO-rTQ" secondAttribute="trailing" id="mXu-X9-KBs"/>
<constraint firstItem="VpK-Lc-RKO" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="18" id="nvK-Ab-4Op"/>
<constraint firstItem="VpK-Lc-RKO" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="r3w-AF-tKU"/>
</constraints>
......@@ -34,7 +44,7 @@
<connections>
<outlet property="buttonCommit" destination="VpK-Lc-RKO" id="yKf-xH-qfI"/>
</connections>
<point key="canvasLocation" x="347" y="282.5"/>
<point key="canvasLocation" x="338" y="282.5"/>
</view>
</objects>
</document>
......@@ -10,7 +10,6 @@
@interface SalesInputTableViewCell ()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *textFieldAmount;
@property (weak, nonatomic) IBOutlet UITextField *txtfieldSum;
@end
......@@ -19,29 +18,22 @@
- (void)awakeFromNib {
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.textFieldAmount.delegate = self;
self.txtfieldSum.delegate = self;
// self.txtfieldSum.delegate = self;
// Initialization code
}
- (void)cellWithArray:(NSArray *)array {
self.textFieldAmount.text = [array[0] isEqualToString:@"0"] ? @"" : array[0];
self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0];
self.textFieldAmount.text = array[0];
// self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0];
}
//结束编辑
- (void)textFieldDidEndEditing:(UITextField *)textField {
NSLog(@"textField end editing");
if (([self.txtfieldSum.text isEqualToString:@"0"] || [self.txtfieldSum.text isEqualToString:@""]) && ![self.textFieldAmount.text isEqualToString:@""])
{
self.txtfieldSum.text = @"1";
}else if ([self.textFieldAmount.text isEqualToString:@""]){
self.txtfieldSum.text = @"";
}
self.updateCellData(@[self.textFieldAmount.text, self.txtfieldSum.text]);
self.updateCellData(@[self.textFieldAmount.text]);
}
- (void)textFieldDidBeginEditing:(UITextField *)textField
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<objects>
......@@ -12,11 +13,11 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="59"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付方式" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="42B-69-MrJ">
<rect key="frame" x="8" y="19" width="104" height="22"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付方式" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="42B-69-MrJ">
<rect key="frame" x="16" y="19" width="165.5" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -30,8 +31,8 @@
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="IOd-nI-Sgk">
<rect key="frame" x="126" y="7" width="103" height="45"/>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入金额" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="IOd-nI-Sgk">
<rect key="frame" x="195.5" y="7" width="165.5" height="45"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="Tti-cq-XrO"/>
</constraints>
......@@ -40,24 +41,30 @@
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
</subviews>
<color key="backgroundColor" red="0.99607843137254903" green="0.97647058823529409" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="42B-69-MrJ" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="30G-yc-aMR"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="4zD-3a-Npn"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="leading" secondItem="IOd-nI-Sgk" secondAttribute="trailing" constant="14" id="IDn-fs-A6c"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="leading" secondItem="42B-69-MrJ" secondAttribute="trailing" constant="14" id="K0R-E6-pq2"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="width" secondItem="42B-69-MrJ" secondAttribute="width" id="LyE-89-ZUP"/>
<constraint firstAttribute="trailing" secondItem="IOd-nI-Sgk" secondAttribute="trailing" constant="14" id="NvZ-dW-ui2"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" constant="-20" id="X6v-gb-CsP"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="gLQ-a3-OwZ"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="leading" secondItem="42B-69-MrJ" secondAttribute="trailing" constant="14" id="m7d-pg-dI8"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="leading" secondItem="IOd-nI-Sgk" secondAttribute="trailing" constant="14" id="nFY-mV-eit"/>
<constraint firstItem="42B-69-MrJ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="nZ2-4B-4Hr"/>
<constraint firstItem="42B-69-MrJ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="8" id="nZ2-4B-4Hr"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="width" secondItem="42B-69-MrJ" secondAttribute="width" id="wRK-zA-B9k"/>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="DwV-QQ-nIc"/>
</mask>
</variation>
</tableViewCellContentView>
<connections>
<outlet property="paymentType" destination="42B-69-MrJ" id="iVU-7e-ZnE"/>
<outlet property="textFieldAmount" destination="IOd-nI-Sgk" id="5cG-QC-dtr"/>
<outlet property="txtfieldSum" destination="DwV-QQ-nIc" id="sTl-vV-Iet"/>
</connections>
<point key="canvasLocation" x="158.5" y="379"/>
</tableViewCell>
......
......@@ -14,7 +14,7 @@ typedef void (^tapBlock)(void);
@property (nonatomic, copy) tapBlock dateTapActionBlock;
@property (weak, nonatomic) IBOutlet UITextField *textfieldDate;
@property (weak, nonatomic) IBOutlet UIButton *buttonName;
@property (weak, nonatomic) IBOutlet UITextField *textFieldTotalAmount;
- (void)setShopName:(NSString *)name;
- (void)setDate:(NSString *)date;
......
......@@ -10,6 +10,7 @@
@interface SalesInputTotalVIew : UIView
@property (weak, nonatomic) IBOutlet UILabel *labelTotal;
@property (weak, nonatomic) IBOutlet UILabel *labelTotalAmount;
@property (weak, nonatomic) IBOutlet UITextField *textFieldBillCount;
@end
......@@ -17,7 +17,7 @@
#import "GEToast.h"
#import "VankeVersionAPI.h"
#import "VankeCommonModel.h"
#import "LoginShopsInstance.h"
#define TAG_ACTION_SHEET_EXIT 0
@interface ICRSystemViewController ()
......@@ -205,6 +205,7 @@ ON_DID_APPEAR( signal )
// 删除当前用户
VankeCommonModel *userModel = [VankeCommonModel sharedInstance];
[userModel removeLoginInfo];
[[LoginShopsInstance shareInstance].arrShops removeAllObjects];
[self postNotification:self.SUCC_LOGOUT];
}
......
......@@ -155,17 +155,17 @@
}else{
self.labelShoudPay.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.amount]];
self.labelPaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.paid]];
self.labelUnpaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.unpaid]];
self.labelShoudPay.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.amount] Lenth:2 isSeparate:YES];
self.labelPaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.paid] Lenth:2 isSeparate:YES];
self.labelUnpaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.unpaid] Lenth:2 isSeparate:YES];
self.labelPaidRate.text = [CalculateHelper getPercent:[NSNumber numberWithDouble:self.detailModel.paid] num:[NSNumber numberWithDouble:self.detailModel.amount]];
return;
}
self.labelShoudPay.text = [CalculateHelper getMoneyStringFrom:totalAmount];
self.labelPaid.text = [CalculateHelper getMoneyStringFrom:totalPaid];
self.labelUnpaid.text = [CalculateHelper getMoneyStringFrom:totalUpPaid];
self.labelShoudPay.text = [CalculateHelper getMoneyStringFrom:totalAmount Lenth:2 isSeparate:YES];
self.labelPaid.text = [CalculateHelper getMoneyStringFrom:totalPaid Lenth:2 isSeparate:YES];
self.labelUnpaid.text = [CalculateHelper getMoneyStringFrom:totalUpPaid Lenth:2 isSeparate:YES];
self.labelPaidRate.text = [CalculateHelper getPercent:totalPaid num:totalAmount];
}
......
......@@ -67,7 +67,7 @@
[self setDefaults];
[self setUpDatePicker];
self.paramModel = [[StatementListParamModel alloc] init];
self.title = @"商铺对账单";
self.title = @"对账单";
self.tableView.estimatedRowHeight = 90;
self.tableView.emptyDataSetSource = self;
self.tableView.emptyDataSetDelegate = self;
......@@ -124,24 +124,24 @@
}else if(!self.btnIsClear.isSelected){
for (int i = 0; i < self.arrUnClear.count; i++) {
StatementRecords *record = self.arrUnClear[i];
totalPaid = [CalculateHelper calculateNum1:totalPaid num2:[NSNumber numberWithDouble:record.unpaid] type:CalculateTypeAdd];
totalPaid = [CalculateHelper calculateNum1:totalPaid num2:[NSNumber numberWithDouble:record.paid] type:CalculateTypeAdd];
totalUpPaid = [CalculateHelper calculateNum1:totalUpPaid num2:[NSNumber numberWithDouble:record.unpaid] type:CalculateTypeAdd];
totalAmount = [CalculateHelper calculateNum1:totalAmount num2:[NSNumber numberWithDouble:record.amount] type:CalculateTypeAdd];
}
}else{
self.labelTotalShouldPay.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.statementModel.amount]];
self.labelTotalPaidIn.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.statementModel.paidTotal]];
self.labelTotalUnPaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.statementModel.unpaidTotal]];
self.labelTotalShouldPay.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.statementModel.amount] Lenth:2 isSeparate:YES];
self.labelTotalPaidIn.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.statementModel.paidTotal] Lenth:2 isSeparate:YES];
self.labelTotalUnPaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.statementModel.unpaidTotal] Lenth:2 isSeparate:YES];
self.labelTotalPaidPercent.text = [CalculateHelper getPercent:[NSNumber numberWithDouble:self.statementModel.paidTotal] num:[NSNumber numberWithDouble:self.statementModel.amount]];
return;
}
self.labelTotalShouldPay.text = [CalculateHelper getMoneyStringFrom:totalAmount];
self.labelTotalPaidIn.text = [CalculateHelper getMoneyStringFrom:totalPaid];
self.labelTotalUnPaid.text = [CalculateHelper getMoneyStringFrom:totalUpPaid];
self.labelTotalShouldPay.text = [CalculateHelper getMoneyStringFrom:totalAmount Lenth:2 isSeparate:YES];
self.labelTotalPaidIn.text = [CalculateHelper getMoneyStringFrom:totalPaid Lenth:2 isSeparate:YES];
self.labelTotalUnPaid.text = [CalculateHelper getMoneyStringFrom:totalUpPaid Lenth:2 isSeparate:YES];
self.labelTotalPaidPercent.text = [CalculateHelper getPercent:totalPaid num:totalAmount];
}
......@@ -195,7 +195,6 @@
/** 网络请求 */
- (void)setUpData {
LoginResponseData *model = [[VankeCommonModel sharedInstance] getLoginInfo];
User *user = [[VankeCommonModel sharedInstance] currentUser];
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
NSString *url = [NSString stringWithFormat:@"statement/query/%@~%@?authorizedOrgIn=%@&pageNumber=%@&pageSize=%@", self.startDate, self.endDate, self.org.code,@0, @9999];
if ([[VankeCommonModel sharedInstance] curUserIsTenant]) {
......@@ -208,8 +207,7 @@
CLog(@"%@", dict.JSONString);
if ([data[@"message"] isEqualToString:@"ok"]) {
weakSelf.statementModel = [StatementModel modelObjectWithDictionary:dict[@"data"]];
// weakSelf.labelTotalShop.text = [NSString stringWithFormat:@"共%@家",[NSNumber numberWithDouble:weakSelf.statementModel.paging.recordCount]];
[weakSelf calculateTop];
[weakSelf.tableView reloadData];
......
......@@ -8,6 +8,7 @@
#import "StatementDetailCell.h"
#import "StatementDetailItems.h"
#import "CalculateHelper.h"
@interface StatementDetailCell ()
/** 标题 */
@property (weak, nonatomic) IBOutlet UILabel *labelTitle;
......@@ -33,9 +34,9 @@
StatementDetailItems *item = array[indexPath.row];
self.labelTitle.text = item.subject;
self.labelDate.text = [NSString stringWithFormat:@"%@~%@",item.beginDate,item.endDate];
self.labelShouldPay.text = [NSString stringWithFormat:@"%.2f",item.amount];
self.labelPaidIn.text = [NSString stringWithFormat:@"[已缴]%.2f",item.paid];
self.labelUnPaid.text = [NSString stringWithFormat:@"[未缴]%.2f",item.unpaid];
self.labelShouldPay.text = [NSString stringWithFormat:@"%@",[CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:item.amount] Lenth:2 isSeparate:YES]];
self.labelPaidIn.text = [NSString stringWithFormat:@"[已缴]%@",[CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:item.paid] Lenth:2 isSeparate:YES]];
self.labelUnPaid.text = [NSString stringWithFormat:@"[未缴]%@",[CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:item.unpaid] Lenth:2 isSeparate:YES]];
if (item.direction < 0) {
self.img.image = [UIImage imageNamed:@"money_reduce"];
}else{
......
......@@ -7,7 +7,7 @@
//
#import "StatementTableViewCell.h"
#import "CalculateHelper.h"
@interface StatementTableViewCell ()
@property (weak, nonatomic) IBOutlet UIView *imgShop;
@property (weak, nonatomic) IBOutlet UILabel *labelTitle;
......@@ -27,10 +27,10 @@
- (void)setUpCellWithArray:(NSArray *)array index:(NSIndexPath *)indexPath {
StatementRecords *model = array[indexPath.row];
self.labelTitle.text = [NSString stringWithFormat:@"%@ %@",model.shopCode, model.shopName];
self.labelShouldPay.text = [NSString stringWithFormat:@"%.2f",model.amount];
self.labelPaidIn.text = [NSString stringWithFormat:@"[已缴]%.2f",model.paid];
self.labelUnPaid.text = [NSString stringWithFormat:@"[未缴]%.2f",model.unpaid];
self.labelTitle.text = [NSString stringWithFormat:@"%@", model.shopName];
self.labelShouldPay.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:model.amount] Lenth:2 isSeparate:YES];
self.labelPaidIn.text = [NSString stringWithFormat:@"[已缴]%@",[CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:model.paid] Lenth:2 isSeparate:YES]];
self.labelUnPaid.text = [NSString stringWithFormat:@"[未缴]%@",[CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:model.unpaid] Lenth:2 isSeparate:YES]];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
......
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