Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kt-ios
Overview
Overview
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
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Виктор
kt-ios
Commits
7797d5fc
Commit
7797d5fc
authored
Dec 22, 2017
by
Olzhas Aldabergenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bill detailes added. 1.0.4
parent
e92882a0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
297 additions
and
40 deletions
+297
-40
project.pbxproj
kt.xcodeproj/project.pbxproj
+12
-0
UserInterfaceState.xcuserstate
...cuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ata/neox.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+1
-33
Facade+Reports.swift
kt/Facade/Facade+Reports.swift
+50
-1
Facade.swift
kt/Facade/Facade.swift
+8
-1
BillDetailItem.swift
kt/Models/reports/BillDetailItem.swift
+34
-0
Main.storyboard
kt/Resources/Base.lproj/Main.storyboard
+0
-0
Info.plist
kt/Supporting Files/Info.plist
+2
-2
LoginViewController.swift
kt/ViewControllers/Cabinet/Login/LoginViewController.swift
+1
-1
BillDetailedViewController.swift
.../Cabinet/cashAndPayments/BillDetailedViewController.swift
+112
-0
BillPositionsModalViewController.swift
...et/cashAndPayments/BillPositionsModalViewController.swift
+16
-1
PublishedCashesViewController.swift
...binet/cashAndPayments/PublishedCashesViewController.swift
+2
-0
BillDetailCell.swift
kt/Views/Cabinet/CashAndPayment/BillDetailCell.swift
+58
-0
FeedFeedbackCell.swift
kt/Views/FeedFeedbackCell.swift
+1
-1
No files found.
kt.xcodeproj/project.pbxproj
View file @
7797d5fc
...
...
@@ -89,7 +89,10 @@
3E2C3E9B1EFCB17E00E553CD
/* Validator.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E2C3E9A1EFCB17E00E553CD
/* Validator.swift */
;
};
3E2E1E821F84DB0100DC0FE5
/* LKSettingsViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E2E1E811F84DB0100DC0FE5
/* LKSettingsViewController.swift */
;
};
3E323D501FBEF916009C3DA8
/* FeedFeedbackCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E323D4F1FBEF916009C3DA8
/* FeedFeedbackCell.swift */
;
};
3E32AF811FE3EEF800E8F6EB
/* BillDetailItem.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E32AF801FE3EEF800E8F6EB
/* BillDetailItem.swift */
;
};
3E3BCC9C1FCEB692008613E2
/* Facade+NewLogin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E3BCC9B1FCEB692008613E2
/* Facade+NewLogin.swift */
;
};
3E50961D1FE2985E00CCD080
/* BillDetailedViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E50961C1FE2985E00CCD080
/* BillDetailedViewController.swift */
;
};
3E5096261FE29EA900CCD080
/* BillDetailCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E5096251FE29EA900CCD080
/* BillDetailCell.swift */
;
};
3E5CC7A51FA83F7400B55DF0
/* BotManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E5CC7A41FA83F7400B55DF0
/* BotManager.swift */
;
};
3E5CC7AE1FA84F9F00B55DF0
/* DateUtil.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E5CC7AD1FA84F9F00B55DF0
/* DateUtil.swift */
;
};
3E6969B31FA2097200032D95
/* ServiceDetailsViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3E6969B21FA2097200032D95
/* ServiceDetailsViewController.swift */
;
};
...
...
@@ -645,7 +648,10 @@
3E2C3E9A1EFCB17E00E553CD
/* Validator.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Validator.swift
;
sourceTree
=
"<group>"
;
};
3E2E1E811F84DB0100DC0FE5
/* LKSettingsViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LKSettingsViewController.swift
;
sourceTree
=
"<group>"
;
};
3E323D4F1FBEF916009C3DA8
/* FeedFeedbackCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FeedFeedbackCell.swift
;
sourceTree
=
"<group>"
;
};
3E32AF801FE3EEF800E8F6EB
/* BillDetailItem.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BillDetailItem.swift
;
sourceTree
=
"<group>"
;
};
3E3BCC9B1FCEB692008613E2
/* Facade+NewLogin.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Facade+NewLogin.swift"
;
sourceTree
=
"<group>"
;
};
3E50961C1FE2985E00CCD080
/* BillDetailedViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BillDetailedViewController.swift
;
sourceTree
=
"<group>"
;
};
3E5096251FE29EA900CCD080
/* BillDetailCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BillDetailCell.swift
;
sourceTree
=
"<group>"
;
};
3E5CC7A41FA83F7400B55DF0
/* BotManager.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BotManager.swift
;
sourceTree
=
"<group>"
;
};
3E5CC7AD1FA84F9F00B55DF0
/* DateUtil.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DateUtil.swift
;
sourceTree
=
"<group>"
;
};
3E6969B21FA2097200032D95
/* ServiceDetailsViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ServiceDetailsViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1863,6 +1869,7 @@
985207C41CECFE7B00E6C391
/* Bill.swift */
,
984C96531CEDA87F001CD53D
/* Payment.swift */
,
3EA7F6EF1F074BF9003F6CBF
/* AccountServices.swift */
,
3E32AF801FE3EEF800E8F6EB
/* BillDetailItem.swift */
,
);
path
=
reports
;
sourceTree
=
"<group>"
;
...
...
@@ -1876,6 +1883,7 @@
98561BDA1CED7A7000B454AD
/* PublishedCashPayCell.swift */
,
984C963A1CEDA760001CD53D
/* PaymentHistoryCell.swift */
,
98A350271DBFD25800D0D636
/* BillsPositionCell.swift */
,
3E5096251FE29EA900CCD080
/* BillDetailCell.swift */
,
);
path
=
CashAndPayment
;
sourceTree
=
"<group>"
;
...
...
@@ -2112,6 +2120,7 @@
984C96551CEDAEE0001CD53D
/* OnlinePaymentViewController.swift */
,
989B5B691CEF3D8200E00500
/* OnlinePaymentFormViewController.swift */
,
98A350071DBFCF1200D0D636
/* BillPositionsModalViewController.swift */
,
3E50961C1FE2985E00CCD080
/* BillDetailedViewController.swift */
,
);
path
=
cashAndPayments
;
sourceTree
=
"<group>"
;
...
...
@@ -2721,6 +2730,7 @@
9844938A1CFE5BB100AD08FC
/* CallbackRegion.swift in Sources */
,
985546941CF2D9AC00EBE6AD
/* Device.swift in Sources */
,
98BABA1C1D84705E00C10F60
/* MAPageViewController.swift in Sources */
,
3E5096261FE29EA900CCD080
/* BillDetailCell.swift in Sources */
,
0F8DC6061AB04658007C5C13
/* WiFiTableViewController.swift in Sources */
,
0F8DC5FA1AB04658007C5C13
/* RootViewController.swift in Sources */
,
84F475011E05125C00A8B2D9
/* UIListBoxViewController.swift in Sources */
,
...
...
@@ -2729,6 +2739,7 @@
98FC98651C7C618200585865
/* DeviceSettingsViewController.swift in Sources */
,
844554481DFB349F007D9EE9
/* RegistrationIntroViewController.swift in Sources */
,
84F253541DF600B2000123D0
/* UIRBTableViewCell.swift in Sources */
,
3E50961D1FE2985E00CCD080
/* BillDetailedViewController.swift in Sources */
,
0F8DC5F31AB04658007C5C13
/* BannerItemController.swift in Sources */
,
98E3F87F1CFA21B700112FB7
/* Validation.swift in Sources */
,
98E3F87D1CFA21B700112FB7
/* Timeline.swift in Sources */
,
...
...
@@ -2854,6 +2865,7 @@
0F8DC5A81AB04608007C5C13
/* Pss.swift in Sources */
,
0F8DC5BD1AB04619007C5C13
/* TariffNameCell.swift in Sources */
,
98483BDA1CF1AAB600226E41
/* WifiOffer.swift in Sources */
,
3E32AF811FE3EEF800E8F6EB
/* BillDetailItem.swift in Sources */
,
0F8DC5FB1AB04658007C5C13
/* ServiceCallbackController.swift in Sources */
,
98ABE3DF1DE8D76400642645
/* ClaimPageMenuViewController.swift in Sources */
,
986203A61C6C73C600E4B20A
/* DSLTransitionFromFirstToSecond.swift in Sources */
,
...
...
kt.xcworkspace/xcuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
View file @
7797d5fc
No preview for this file type
kt.xcworkspace/xcuserdata/neox.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
7797d5fc
...
...
@@ -15,7 +15,7 @@
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"107"
endingLineNumber =
"107"
landmarkName =
"registerTap(
_
:)"
landmarkName =
"registerTap(
sender
:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
...
...
@@ -131,37 +131,5 @@
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Cabinet/cashAndPayments/PaymentsHistoryViewController.swift"
timestampString =
"534837511.617012"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"147"
endingLineNumber =
"147"
landmarkName =
"numberOfSections(in:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Cabinet/cashAndPayments/PaymentsHistoryViewController.swift"
timestampString =
"534837511.617012"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"142"
endingLineNumber =
"142"
landmarkName =
"tableView(_:numberOfRowsInSection:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
kt/Facade/Facade+Reports.swift
View file @
7797d5fc
...
...
@@ -80,7 +80,7 @@ extension Facade {
onError
(
error
:
"code:
\(
errorCode
)
,
\(
errorMsg
)
"
)
}
else
{
var
payments
:
[[
AnyObject
]]
=
[]
print
(
"json:
\(
json
)
"
)
//
print("json: \(json)")
for
subJson
in
json
.
arrayValue
{
let
payment
=
Payment
(
json
:
subJson
)
if
payments
.
count
>
0
&&
(
payments
.
last
!
[
0
]
as!
NSDate
)
.
isEqualByComponents
(
payment
.
systemDate
!
)
{
...
...
@@ -101,4 +101,53 @@ extension Facade {
})
}
func
getBillsDetailed
(
billId
:
Int
,
billType
:
Int
,
periodId
:
Int
,
onSuccess
:
(
details
:
[
BillDetailItem
]
)
->
Void
,
onError
:
((
error
:
String
)
->
Void
),
onFinish
:
()
->
Void
)
{
let
params
=
[
"access_token"
:
Facade
.
accessToken
!
,
"client_id"
:
Facade
.
clientId
!
,
"server_id"
:
Facade
.
serverId
!
,
"abonent_id"
:
Facade
.
accountId
!
,
"bill_type"
:
billType
,
"bill_id"
:
billId
,
"period_id"
:
periodId
]
as
[
String
:
AnyObject
]
print
(
params
)
request
(
Router
.
GetBillDetails
(
params
))
.
responseSwiftyJSON
(
completionHandler
:
{
(
req
,
resp
,
json
,
error
)
in
Router
.
globalLog
.
debug
(
req
)
Router
.
globalLog
.
debug
(
json
)
if
let
error
=
error
{
Router
.
globalLog
.
error
(
error
.
debugDescription
)
onError
(
error
:
error
.
localizedDescription
)
}
else
{
Router
.
globalLog
.
debug
(
resp
)
if
let
errorCode
=
json
[
"error_code"
]
.
string
,
let
errorMsg
=
json
[
"error"
]
.
string
{
Router
.
globalLog
.
error
(
"code:
\(
errorCode
)
,
\(
errorMsg
)
"
)
onError
(
error
:
"code:
\(
errorCode
)
,
\(
errorMsg
)
"
)
}
else
{
var
details
:
[
BillDetailItem
]
=
[]
//print("json: \(json)")
for
subJson
in
json
.
arrayValue
{
// let payment = BillDetail(json: subJson)
// if payments.count > 0 && (payments.last![0] as! NSDate).isEqualByComponents(payment.systemDate!) {
// var groupedPayments = payments[payments.count - 1][1] as! [Payment]
// groupedPayments.append(payment)
// payments[payments.count - 1][1] = groupedPayments
// } else {
// var groupedByDate:[AnyObject] = []
// groupedByDate.append(payment.systemDate!)
// groupedByDate.append([payment])
// payments.append(groupedByDate)
// }
let
detail
=
BillDetailItem
(
json
:
subJson
)
details
.
append
(
detail
)
}
onSuccess
(
details
:
details
)
}
}
})
}
}
kt/Facade/Facade.swift
View file @
7797d5fc
...
...
@@ -54,6 +54,7 @@ enum Router: URLRequestConvertible {
case
PaymentForm
(
String
,
[
String
:
AnyObject
])
case
GetPublicWifi
([
String
:
AnyObject
])
case
CreateOrder
([
String
:
AnyObject
])
case
GetBillDetails
([
String
:
AnyObject
])
case
GetPaymentsList
([
String
:
AnyObject
])
case
GetBillList
([
String
:
AnyObject
])
case
GetReportsPeriodList
([
String
:
AnyObject
])
...
...
@@ -109,7 +110,7 @@ enum Router: URLRequestConvertible {
var
method
:
Method
{
switch
self
{
case
.
SendCallbackRequest
,
.
Register
,
.
GetGUID
,
.
Megogo
,
.
Devices
,
.
AltelDevices
,
.
Forget
,
.
DeviceSettings
,
.
ChangeTariff
,
.
ChangeInternetAccessPassword
,
.
AltelPeriodsList
,
.
AltelDetalization
,
.
GetPromisedPayment
,
.
SavePromisedPayment
,
.
AddSi
,
.
RemoveSi
,
.
GetMailNotificationList
,
.
MailNotification
,
.
GetReportsPeriodList
,
.
GetBillList
,
.
GetPaymentsList
,
.
CreateOrder
,
.
CreateIDTV
,
.
RemoveIDTV
,
.
ListIDTVPlans
,
.
PaymentForm
,
.
GetPublicWifi
,
.
ConnectWifi
,
.
DisconnectWifi
,
.
SubscribeHistoryForMonth
,
.
SubscribeHistoryForPeriod
,
.
GetActiveSessions
,
.
ChangeCreditLimit
,
.
GetProviders
,
.
GetTargetingList
,
.
CallbackSend
,
.
GetCardAndBankTypes
,
.
SpecialOffers
,
.
ChangeStaticIp
,
.
GetFramedIpAddressStatus
,
.
GetStaticIpAddress
,
.
CheckParentalControl
,
.
MythPost
,
.
GetTariffPlanChangeHistory
,
.
SetExtTraffic
,
.
SetTurboTraffic
,
.
SiebelAccountGet
,
.
SiebelGetDamageList
,
.
SiebelGetDamageSourceList
,
.
SiebelDamageCreate
,
.
SiebelDamageDelete
,
.
SiebelClaimDelete
,
.
SiebelGetClaimList
,
.
SiebelGetClaimSourceList
,
.
SiebelGetClaimSourceSubList
,
.
SiebelClaimCreate
,
.
GetAccountServices
,
.
AskBot
,
.
ChildBot
:
case
.
SendCallbackRequest
,
.
Register
,
.
GetGUID
,
.
Megogo
,
.
Devices
,
.
AltelDevices
,
.
Forget
,
.
DeviceSettings
,
.
ChangeTariff
,
.
ChangeInternetAccessPassword
,
.
AltelPeriodsList
,
.
AltelDetalization
,
.
GetPromisedPayment
,
.
SavePromisedPayment
,
.
AddSi
,
.
RemoveSi
,
.
GetMailNotificationList
,
.
MailNotification
,
.
GetReportsPeriodList
,
.
GetBillList
,
.
GetPaymentsList
,
.
GetBillDetails
,
.
CreateOrder
,
.
CreateIDTV
,
.
RemoveIDTV
,
.
ListIDTVPlans
,
.
PaymentForm
,
.
GetPublicWifi
,
.
ConnectWifi
,
.
DisconnectWifi
,
.
SubscribeHistoryForMonth
,
.
SubscribeHistoryForPeriod
,
.
GetActiveSessions
,
.
ChangeCreditLimit
,
.
GetProviders
,
.
GetTargetingList
,
.
CallbackSend
,
.
GetCardAndBankTypes
,
.
SpecialOffers
,
.
ChangeStaticIp
,
.
GetFramedIpAddressStatus
,
.
GetStaticIpAddress
,
.
CheckParentalControl
,
.
MythPost
,
.
GetTariffPlanChangeHistory
,
.
SetExtTraffic
,
.
SetTurboTraffic
,
.
SiebelAccountGet
,
.
SiebelGetDamageList
,
.
SiebelGetDamageSourceList
,
.
SiebelDamageCreate
,
.
SiebelDamageDelete
,
.
SiebelClaimDelete
,
.
SiebelGetClaimList
,
.
SiebelGetClaimSourceList
,
.
SiebelGetClaimSourceSubList
,
.
SiebelClaimCreate
,
.
GetAccountServices
,
.
AskBot
,
.
ChildBot
:
return
.
POST
default
:
return
.
GET
...
...
@@ -217,6 +218,8 @@ enum Router: URLRequestConvertible {
return
"invoice/get_bill_list.json"
case
.
GetReportsPeriodList
:
return
"invoice/get_reports_period_list.json"
case
.
GetBillDetails
:
return
"invoice/bill_detail.json"
case
.
MailNotification
:
return
"devices/mail_notification.json"
case
.
GetMailNotificationList
:
...
...
@@ -472,6 +475,10 @@ enum Router: URLRequestConvertible {
let
request
=
ParameterEncoding
.
JSON
.
encode
(
mutableURLRequest
,
parameters
:
params
)
.
0
let
mutableRequest
=
request
.
mutableCopy
()
as!
NSMutableURLRequest
return
mutableRequest
case
.
GetBillDetails
(
let
params
):
let
request
=
ParameterEncoding
.
JSON
.
encode
(
mutableURLRequest
,
parameters
:
params
)
.
0
let
mutableRequest
=
request
.
mutableCopy
()
as!
NSMutableURLRequest
return
mutableRequest
case
.
GetPaymentsList
(
let
params
):
let
request
=
ParameterEncoding
.
JSON
.
encode
(
mutableURLRequest
,
parameters
:
params
)
.
0
let
mutableRequest
=
request
.
mutableCopy
()
as!
NSMutableURLRequest
...
...
kt/Models/reports/BillDetailItem.swift
0 → 100644
View file @
7797d5fc
//
// BillDetails.swift
// kt
//
// Created by neox on 15.12.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import
Foundation
class
BillDetailItem
{
var
billId
:
Int
?
var
device
:
String
?
var
serviceDate
:
String
?
var
name
:
String
?
var
serviceCount
:
Int
?
var
scgName
:
String
?
var
sumDebit
:
Double
?
var
direction
:
String
?
var
detail
:
String
?
init
(
json
:
JSON
)
{
self
.
billId
=
json
[
"bill_id"
]
.
intValue
self
.
device
=
json
[
"device"
]
.
stringValue
self
.
serviceDate
=
json
[
"service_date"
]
.
stringValue
self
.
name
=
json
[
"name"
]
.
stringValue
self
.
serviceCount
=
json
[
"service_count"
]
.
intValue
self
.
scgName
=
json
[
"scg_name"
]
.
stringValue
self
.
sumDebit
=
json
[
"sum_debit"
]
.
doubleValue
self
.
direction
=
json
[
"direction"
]
.
stringValue
self
.
detail
=
json
[
"detail"
]
.
stringValue
}
}
kt/Resources/Base.lproj/Main.storyboard
View file @
7797d5fc
This diff is collapsed.
Click to expand it.
kt/Supporting Files/Info.plist
View file @
7797d5fc
...
...
@@ -17,11 +17,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0.
3
<
/string
>
<
string
>
1.0.
4
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
8
1
<
/string
>
<
string
>
8
2
<
/string
>
<
k
e
y
>
Fabric
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
APIKey
<
/k
e
y
>
...
...
kt/ViewControllers/Cabinet/Login/LoginViewController.swift
View file @
7797d5fc
...
...
@@ -653,7 +653,7 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
phoneHint
.
hidden
=
false
self
.
view
.
endEditing
(
true
)
_loginTextField
.
text
=
"+7 "
//
"+7 727 817-7224"//"7172682610" // ntcnjdsq 7278177224
//_loginTextField.text =
"+7 727 817-7224"//"7172682610" // ntcnjdsq 7278177224
_passwordTextField
.
text
=
""
//"123456789"//"NewPassword1"
}
...
...
kt/ViewControllers/Cabinet/cashAndPayments/BillDetailedViewController.swift
0 → 100644
View file @
7797d5fc
//
// BillDetailedViewController.swift
// kt
//
// Created by neox on 14.12.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import
Foundation
class
BillDetailedViewController
:
UIViewController
,
UITableViewDataSource
,
UITableViewDelegate
{
var
bill
:
Bill
?
var
billId
:
Int
?
var
billType
:
Int
?
var
billPeriod
:
Int
?
var
titleString
:
String
?
@IBOutlet
weak
var
tableView
:
UITableView
!
var
rows
:
[
BillDetailItem
]
=
[]
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
self
.
title
=
titleString
configureTableView
()
requestDetails
()
}
func
configureTableView
()
{
tableView
.
rowHeight
=
UITableViewAutomaticDimension
tableView
.
estimatedRowHeight
=
300
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
}
func
requestDetails
()
{
// billId
// bill.reportDateId
// billPeriod
print
(
billId
!
)
print
(
bill
!.
reportDateId
!
)
print
(
billPeriod
!
)
//bill!.reportDateId!, billId: billId!,
Facade
.
sharedInstance
()
.
getBillsDetailed
(
bill
!.
reportDateId
!
,
billType
:
billId
!
,
periodId
:
billPeriod
!
,
onSuccess
:
{
(
details
)
in
dispatch_async
(
dispatch_get_main_queue
(),{
self
.
rows
=
details
self
.
tableView
.
reloadData
()
})
},
onError
:
{
(
errorString
)
in
},
onFinish
:
{
()
in
}
)
// Facade.sharedInstance().getPaymentList({ (payments) in
// self.payments = payments
// self.currentPaymentIndex = payments.count > 0 ? payments.count - 1 : nil
// }, onError: { (error) in
// AlertViewUtil.showIncorrectAlert(error)
// }, onFinish: { () in
// })
}
}
// UITableViewDataSource
extension
BillDetailedViewController
{
func
numberOfSectionsInTableView
(
tableView
:
UITableView
)
->
Int
{
var
numOfSections
:
Int
=
1
if
!
rows
.
isEmpty
{
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyle
.
SingleLine
numOfSections
=
1
tableView
.
backgroundView
=
nil
}
else
{
let
noDataLabel
:
UILabel
=
UILabel
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
bounds
.
size
.
width
,
height
:
tableView
.
bounds
.
size
.
height
))
noDataLabel
.
text
=
LS
(
"no_data"
)
noDataLabel
.
textColor
=
UIColor
.
darkGrayColor
()
noDataLabel
.
textAlignment
=
NSTextAlignment
.
Center
tableView
.
backgroundView
=
noDataLabel
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyle
.
None
}
return
numOfSections
}
func
tableView
(
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
// return billPositions.count
return
rows
.
count
}
func
tableView
(
tableView
:
UITableView
,
cellForRowAtIndexPath
indexPath
:
NSIndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCellWithIdentifier
(
"BillDetailCell"
,
forIndexPath
:
indexPath
)
as!
BillDetailCell
cell
.
labelIndex
.
text
=
"
\(
indexPath
.
row
+
1
)
"
cell
.
display
(
rows
[
indexPath
.
row
])
if
(
indexPath
.
row
%
2
==
0
)
{
cell
.
contentView
.
backgroundColor
=
UIColor
.
whiteColor
()
}
else
{
cell
.
contentView
.
backgroundColor
=
UIColor
.
silver
()
}
// cell.leftLabel.setTextAndSizeToFit(billPositions[indexPath.row].billPosName)
// cell.rightLabel.setTextAndSizeToFit(billPositions[indexPath.row].debit == nil ? "" : "\(Int(billPositions[indexPath.row].debit!)) тг.")
// cell.rightLabel.textAlignment = NSTextAlignment.Right
// //cell.selectionStyle = .None
// cell.accessoryType = UITableViewCellAccessoryType.DisclosureIndicator
return
cell
}
}
kt/ViewControllers/Cabinet/cashAndPayments/BillPositionsModalViewController.swift
View file @
7797d5fc
...
...
@@ -9,12 +9,16 @@
import
Foundation
import
UIKit
class
BillPositionsModalViewController
:
UIViewController
,
UITableViewDataSource
{
class
BillPositionsModalViewController
:
UIViewController
,
UITableViewDataSource
,
UITableViewDelegate
{
var
bill
:
Bill
?
// used for details of bill
var
periodId
:
Int
?
// period id
@IBOutlet
weak
var
tableView
:
UITableView
!
var
billPositions
:
[
Bill
.
BillPos
]
=
[]
func
configureTableView
()
{
tableView
.
delegate
=
self
tableView
.
rowHeight
=
UITableViewAutomaticDimension
tableView
.
estimatedRowHeight
=
50
}
...
...
@@ -44,6 +48,17 @@ extension BillPositionsModalViewController {
cell
.
rightLabel
.
setTextAndSizeToFit
(
billPositions
[
indexPath
.
row
]
.
debit
==
nil
?
""
:
"
\(
Int
(
billPositions
[
indexPath
.
row
]
.
debit
!
)
)
тг."
)
cell
.
rightLabel
.
textAlignment
=
NSTextAlignment
.
Right
//cell.selectionStyle = .None
cell
.
accessoryType
=
UITableViewCellAccessoryType
.
DisclosureIndicator
return
cell
}
func
tableView
(
tableView
:
UITableView
,
didSelectRowAtIndexPath
indexPath
:
NSIndexPath
)
{
let
vc
=
storyboard
!.
instantiateViewControllerWithIdentifier
(
"BillDetailedViewController"
)
as!
BillDetailedViewController
// vc.serviceItemForLoading = serviceItem
vc
.
bill
=
bill
vc
.
billId
=
billPositions
[
indexPath
.
row
]
.
billPosId
vc
.
billPeriod
=
periodId
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
kt/ViewControllers/Cabinet/cashAndPayments/PublishedCashesViewController.swift
View file @
7797d5fc
...
...
@@ -45,6 +45,8 @@ class PublishedCashesViewController: UIViewController, UITableViewDataSource, UI
case
"bill_positions"
:
let
nav
=
segue
.
destinationViewController
as!
UINavigationController
let
vc
=
nav
.
topViewController
as!
BillPositionsModalViewController
vc
.
bill
=
self
.
currentBill
vc
.
periodId
=
self
.
periods
[
currentPeriodIndex
!
]
.
period
!//
self
.
periods
[
currentPeriodIndex
!
]
.
periodId
!
vc
.
billPositions
=
self
.
currentBill
!.
billPositions
break
default
:
...
...
kt/Views/Cabinet/CashAndPayment/BillDetailCell.swift
0 → 100644
View file @
7797d5fc
//
// BillDetail.swift
// kt
//
// Created by neox on 14.12.17.
// Copyright © 2017 SimpleCode. All rights reserved.
//
import
Foundation
class
BillDetailCell
:
UITableViewCell
{
@IBOutlet
weak
var
labelIndex
:
UILabel
!
@IBOutlet
weak
var
labelDevice
:
UILabel
!
@IBOutlet
weak
var
labelDeviceValue
:
UILabel
!
@IBOutlet
weak
var
labelDate
:
UILabel
!
@IBOutlet
weak
var
labelDateValue
:
UILabel
!
@IBOutlet
weak
var
labelService
:
UILabel
!
@IBOutlet
weak
var
labelServiceValue
:
UILabel
!
@IBOutlet
weak
var
labelVolume
:
UILabel
!
@IBOutlet
weak
var
labeVolumeValue
:
UILabel
!
@IBOutlet
weak
var
labelUnit
:
UILabel
!
@IBOutlet
weak
var
labelUnitValue
:
UILabel
!
@IBOutlet
weak
var
labelDebit
:
UILabel
!
@IBOutlet
weak
var
labelDebitValue
:
UILabel
!
@IBOutlet
weak
var
directionLabel
:
UILabel
!
@IBOutlet
weak
var
directionLabelValue
:
UILabel
!
@IBOutlet
weak
var
labelDirectionDetail
:
UILabel
!
@IBOutlet
weak
var
labelDirectionDetailValue
:
UILabel
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
self
.
selectionStyle
=
UITableViewCellSelectionStyle
.
None
labelDevice
.
text
=
"Номер устройства"
labelDate
.
text
=
"Дата"
labelService
.
text
=
"Услуга"
labelVolume
.
text
=
"Объем"
labelUnit
.
text
=
"Единица измерения"
labelDebit
.
text
=
"Начислено"
directionLabel
.
text
=
"Направление"
labelDirectionDetail
.
text
=
"Детализация направления"
}
func
display
(
billItem
:
BillDetailItem
)
{
labelDeviceValue
.
text
=
billItem
.
device
labelDateValue
.
text
=
billItem
.
serviceDate
labelServiceValue
.
text
=
billItem
.
name
labeVolumeValue
.
text
=
"
\(
billItem
.
serviceCount
!
)
"
labelUnitValue
.
text
=
billItem
.
scgName
labelDebitValue
.
text
=
"
\(
billItem
.
sumDebit
!
)
"
directionLabelValue
.
text
=
billItem
.
direction
labelDirectionDetailValue
.
text
=
billItem
.
detail
}
}
kt/Views/FeedFeedbackCell.swift
View file @
7797d5fc
...
...
@@ -28,7 +28,7 @@ class FeedFeedbackCell: UITableViewCell {
}
func
openLink
(
sender
:
UIButton
)
{
UIApplication
.
sharedApplication
()
.
openURL
(
NSURL
(
string
:
"http
://telecom.kz/ios
"
)
!
)
UIApplication
.
sharedApplication
()
.
openURL
(
NSURL
(
string
:
"http
s://itunes.apple.com/kz/app/apple-store/id1321394950?mt=8
"
)
!
)
}
...
...
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