Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Car-iOS-Merchant
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Car-iOS-Merchant
Commits
91105394
Commit
91105394
authored
8 years ago
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
金额统一保留2位小数、详情界面调整、加油单列表下拉加载数据错误修复
parent
c2c94b42
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
46 deletions
+60
-46
Main.storyboard
Car/Base.lproj/Main.storyboard
+35
-36
BillListViewController.m
...deClass/LeftView/ViewControllers/BillListViewController.m
+1
-1
CardViewController.m
Car/CodeClass/LeftView/ViewControllers/CardViewController.m
+4
-1
LeftTableViewController.m
...eClass/LeftView/ViewControllers/LeftTableViewController.m
+1
-1
OrderListTableViewCell.m
Car/CodeClass/Main/Cells/OrderListTableViewCell.m
+1
-1
OrderListModel.m
Car/CodeClass/Main/Models/OrderListModel.m
+3
-3
MainViewController.m
Car/CodeClass/Main/ViewControllers/MainViewController.m
+12
-1
OrderDetailViewController.m
...odeClass/Main/ViewControllers/OrderDetailViewController.m
+3
-2
No files found.
Car/Base.lproj/Main.storyboard
View file @
91105394
This diff is collapsed.
Click to expand it.
Car/CodeClass/LeftView/ViewControllers/BillListViewController.m
View file @
91105394
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Car/CodeClass/LeftView/ViewControllers/CardViewController.m
View file @
91105394
...
@@ -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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Car/CodeClass/LeftView/ViewControllers/LeftTableViewController.m
View file @
91105394
...
@@ -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
stringValu
e
];
self
.
labelScore
.
text
=
[
CalculateHelper
getMoneyStringFrom
:
self
.
acct
.
balanc
e
];
}
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
This diff is collapsed.
Click to expand it.
Car/CodeClass/Main/Cells/OrderListTableViewCell.m
View file @
91105394
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Car/CodeClass/Main/Models/OrderListModel.m
View file @
91105394
...
@@ -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
=
@"异常状态"
;
...
...
This diff is collapsed.
Click to expand it.
Car/CodeClass/Main/ViewControllers/MainViewController.m
View file @
91105394
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Car/CodeClass/Main/ViewControllers/OrderDetailViewController.m
View file @
91105394
...
@@ -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
,
@"最后一次打印时间:"
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment