Commit 91105394 authored by Sandy's avatar Sandy

金额统一保留2位小数、详情界面调整、加油单列表下拉加载数据错误修复

parent c2c94b42
This diff is collapsed.
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
NSArray *tempSortData = [self.arrData sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { NSArray *tempSortData = [self.arrData sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
StationUserAcctHisEntity *a = (StationUserAcctHisEntity *)obj1; StationUserAcctHisEntity *a = (StationUserAcctHisEntity *)obj1;
StationUserAcctHisEntity *b = (StationUserAcctHisEntity *)obj2; StationUserAcctHisEntity *b = (StationUserAcctHisEntity *)obj2;
return [a.createDate compare:b.createDate]; return [b.createDate compare:a.createDate];
}]; }];
NSArray *months = self.dicMonthData.allKeys; NSArray *months = self.dicMonthData.allKeys;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
[self findCard]; [self findCard];
self.cardView.model = self.card; self.cardView.model = self.card;
if ([self.card.state isEqualToString:@"used"]) { if ([self.card.state isEqualToString:@"used"]) {
// self.btnConfirm.enabled = NO; self.btnConfirm.enabled = NO;
} }
} }
...@@ -114,10 +114,13 @@ ...@@ -114,10 +114,13 @@
param.checkManId = kUser.fid; param.checkManId = kUser.fid;
param.checkManName = kUser.realName; param.checkManName = kUser.realName;
param.ticketNumber = self.card.ticketNumber; param.ticketNumber = self.card.ticketNumber;
WS(weakSelf);
[kHttp POST:kCheckTicketUrl parameters:[param toDictionary] complete:^(id _Nullable response, NSError * _Nullable error) { [kHttp POST:kCheckTicketUrl parameters:[param toDictionary] complete:^(id _Nullable response, NSError * _Nullable error) {
[MBProgressHUD j_hideLoadingView]; [MBProgressHUD j_hideLoadingView];
if (kRsSuccess(response)) { if (kRsSuccess(response)) {
[MBProgressHUD j_textOnly:@"销券成功!"]; [MBProgressHUD j_textOnly:@"销券成功!"];
weakSelf.card.state = @"used";
[weakSelf configUIWithCard];
}else{ }else{
kShowRsMsg(response); kShowRsMsg(response);
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
- (void)configUIWithAcct { - (void)configUIWithAcct {
self.labelName.text = kUser.realName; self.labelName.text = kUser.realName;
self.labelScore.text = [self.acct.balance stringValue]; self.labelScore.text = [CalculateHelper getMoneyStringFrom:self.acct.balance];
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
- (void)configCellArray:(NSMutableArray *)array indexPath:(NSIndexPath *)indexPath { - (void)configCellArray:(NSMutableArray *)array indexPath:(NSIndexPath *)indexPath {
OrderListModel *model = array[indexPath.row]; OrderListModel *model = array[indexPath.row];
self.labelTime.text = [model.payTime substringToIndex:16]; self.labelTime.text = model.payTime;
self.labelStation.text = [NSString stringWithFormat:@"%@ - %@",model.stationName, model.stationUserName]; self.labelStation.text = [NSString stringWithFormat:@"%@ - %@",model.stationName, model.stationUserName];
self.labelOil.text = [NSString stringWithFormat:@"%@ - %@",model.gasItemName, model.oilGunName]; self.labelOil.text = [NSString stringWithFormat:@"%@ - %@",model.gasItemName, model.oilGunName];
self.labelBillNumber.text = model.billNumber; self.labelBillNumber.text = model.billNumber;
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
- (NSString *)paymentString { - (NSString *)paymentString {
if (!_paymentString) { if (!_paymentString) {
if ([self.payMethod isEqualToString:@"weixin_pub"]) { if ([self.payMethod isEqualToString:@"weixin_pub"]) {
_paymentString = @"微信"; _paymentString = @"微信支付";
}else if([self.payMethod isEqualToString:@"alipay"]){ }else if([self.payMethod isEqualToString:@"alipay"]){
_paymentString = @"支付宝"; _paymentString = @"支付宝支付";
}else{ }else{
_paymentString = @"未知支付方式"; _paymentString = @"未知支付方式";
}; };
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
if (!_stateString) { if (!_stateString) {
if ([self.state isEqualToString:@"nonpay"]) { if ([self.state isEqualToString:@"nonpay"]) {
_stateString = @"未支付"; _stateString = @"未支付";
}else if ([self.state isEqualToString:@""]){ }else if ([self.state isEqualToString:@"paid"]){
_stateString = @"已支付"; _stateString = @"已支付";
}else{ }else{
_stateString = @"异常状态"; _stateString = @"异常状态";
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
} }
- (void)httpRequest { - (void)httpRequest {
CLog(@">>>>>>>>%p",self.navigationController); self.param.pageSize = self.pageSize;
self.param.pageNumber = self.page;
NSDictionary *param = [self.param toDictionary]; NSDictionary *param = [self.param toDictionary];
[MBProgressHUD j_loading:@"加载中…"]; [MBProgressHUD j_loading:@"加载中…"];
WS(weakSelf); WS(weakSelf);
...@@ -64,11 +65,21 @@ ...@@ -64,11 +65,21 @@
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
OrderListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"OrderListTableViewCell" forIndexPath:indexPath]; OrderListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"OrderListTableViewCell" forIndexPath:indexPath];
[cell configCellArray:self.arrData indexPath:indexPath]; [cell configCellArray:self.arrData indexPath:indexPath];
return cell; return cell;
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
#ifdef DEBUG
[MBProgressHUD j_textOnly:[NSString stringWithFormat:@"%lu",indexPath.row + 1]];
#else
#endif
}
- (void)listDidSelect:(id)model { - (void)listDidSelect:(id)model {
OrderDetailViewController *detailVC = [OrderDetailViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_MAIN]; OrderDetailViewController *detailVC = [OrderDetailViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_MAIN];
detailVC.model = model; detailVC.model = model;
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
} }
- (void)configUI { - (void)configUI {
self.title = @"加油单详情";
UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithTitle:@"重新打印" style:UIBarButtonItemStyleDone target:self action:@selector(actionRePrint)]; UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithTitle:@"重新打印" style:UIBarButtonItemStyleDone target:self action:@selector(actionRePrint)];
self.navigationItem.rightBarButtonItem = rightBtn; self.navigationItem.rightBarButtonItem = rightBtn;
...@@ -70,8 +71,8 @@ ...@@ -70,8 +71,8 @@
self.labelPayment.text = kStrPrefix(self.model.paymentString, @"支付方式:"); self.labelPayment.text = kStrPrefix(self.model.paymentString, @"支付方式:");
self.labelPayTime.text = kStrPrefix(self.model.payTime, @"支付时间:"); self.labelPayTime.text = kStrPrefix(self.model.payTime, @"支付时间:");
self.labelPrice.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.total], @"¥"); self.labelPrice.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.total], @"¥");
self.labelVoucher.text = kStrPrefix([self.model.deduct stringValue], @"¥"); self.labelVoucher.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.deduct], @"¥");
self.labelRealPrice.text = kStrPrefix([self.model.realPayTotal stringValue], @"¥"); self.labelRealPrice.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.realPayTotal], @"¥");
self.labelIsInvoice.text = kStrPrefix(self.model.invoiceString, @"是否开票:"); self.labelIsInvoice.text = kStrPrefix(self.model.invoiceString, @"是否开票:");
self.labelIsPrint.text = kStrPrefix(self.model.printStateString, @"是否打印:"); self.labelIsPrint.text = kStrPrefix(self.model.printStateString, @"是否打印:");
self.labelLatestPrintTime.text = kStrPrefix(self.model.lstPrintedTime, @"最后一次打印时间:"); self.labelLatestPrintTime.text = kStrPrefix(self.model.lstPrintedTime, @"最后一次打印时间:");
......
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