Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
9ec64ef9
Commit
9ec64ef9
authored
5 years ago
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了(收支统计的时间选择)和 新增编辑地址的地址选择器
parent
fe252789
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
260 additions
and
17 deletions
+260
-17
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+4
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Assets.xcassets/收支统计/Contents.json
GeliBusinessPlatform/Assets.xcassets/收支统计/Contents.json
+6
-0
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/Contents.json
...xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/Contents.json
+23
-0
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit.png
...统计/ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit@2x.png
...ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit@2x.png
+0
-0
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit@3x.png
...ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit@3x.png
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+4
-4
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.xib
...sinessPlatform/ViewController/地址管理/DZGLViewController.xib
+4
-3
GeliBusinessPlatform/ViewController/地址管理/DiZhiGuanLiCell.xib
GeliBusinessPlatform/ViewController/地址管理/DiZhiGuanLiCell.xib
+2
-1
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
...form/ViewController/地址管理/XinZengDiZhiViewController.swift
+140
-1
GeliBusinessPlatform/ViewController/地址管理/address_new.json
GeliBusinessPlatform/ViewController/地址管理/address_new.json
+0
-0
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+8
-3
GeliBusinessPlatform/ViewController/收支统计/ShouZhiTongJiViewController.swift
...orm/ViewController/收支统计/ShouZhiTongJiViewController.swift
+64
-1
GeliBusinessPlatform/ViewController/收支统计/ShouZhiTongJiViewController.xib
...tform/ViewController/收支统计/ShouZhiTongJiViewController.xib
+5
-4
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
9ec64ef9
...
...
@@ -482,6 +482,7 @@
F96E9D5D246656A700B5B94A
/* HGImagePickerController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F96E9D58246656A700B5B94A
/* HGImagePickerController.swift */
;
};
F96E9D60246657B500B5B94A
/* HGImage.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F96E9D5E246657B500B5B94A
/* HGImage.xcassets */
;
};
F96E9D61246657B500B5B94A
/* HGImage.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F96E9D5F246657B500B5B94A
/* HGImage.storyboard */
;
};
F971D7B3248B6432007F1619
/* address_new.json in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F971D7B2248B6432007F1619
/* address_new.json */
;
};
F9956B1C2463D941001A617D
/* WorkSelectTimeView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9956B1B2463D941001A617D
/* WorkSelectTimeView.xib */
;
};
F9956B1E2463D94E001A617D
/* WorkSelectTimeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9956B1D2463D94E001A617D
/* WorkSelectTimeView.swift */
;
};
F9956B22246408A6001A617D
/* GoodsClassViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9956B20246408A6001A617D
/* GoodsClassViewController.swift */
;
};
...
...
@@ -1054,6 +1055,7 @@
F96E9D58246656A700B5B94A
/* HGImagePickerController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HGImagePickerController.swift
;
sourceTree
=
"<group>"
;
};
F96E9D5E246657B500B5B94A
/* HGImage.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
path
=
HGImage.xcassets
;
sourceTree
=
"<group>"
;
};
F96E9D5F246657B500B5B94A
/* HGImage.storyboard */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.storyboard
;
path
=
HGImage.storyboard
;
sourceTree
=
"<group>"
;
};
F971D7B2248B6432007F1619
/* address_new.json */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.json
;
path
=
address_new.json
;
sourceTree
=
"<group>"
;
};
F9956B1B2463D941001A617D
/* WorkSelectTimeView.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WorkSelectTimeView.xib
;
sourceTree
=
"<group>"
;
};
F9956B1D2463D94E001A617D
/* WorkSelectTimeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WorkSelectTimeView.swift
;
sourceTree
=
"<group>"
;
};
F9956B20246408A6001A617D
/* GoodsClassViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GoodsClassViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1366,6 +1368,7 @@
E02FD9F3245578D800E10E27
/* 地址管理 */
=
{
isa
=
PBXGroup
;
children
=
(
F971D7B2248B6432007F1619
/* address_new.json */
,
E02FD9F42455790800E10E27
/* DiZhiGuanLiCell.swift */
,
E02FD9F52455790800E10E27
/* DiZhiGuanLiCell.xib */
,
E02FD9F824557E8600E10E27
/* XinZengDiZhiViewController.swift */
,
...
...
@@ -2724,6 +2727,7 @@
E099B589246BF8FA009F587F
/* OrderDViewController.xib in Resources */
,
E0BE8A91245A9B9600E80134
/* YingFuZhangKuanCell.xib in Resources */
,
E02DDD9A24501A5B00ABB707
/* DelGuiGeCell.xib in Resources */
,
F971D7B3248B6432007F1619
/* address_new.json in Resources */
,
E00D85E8244561FE00F5F816
/* Preview Assets.xcassets in Resources */
,
E02DDD962450106C00ABB707
/* PuTongJieTiCell.xib in Resources */
,
E07B1E79245966E60055BA3C
/* XinCaiGouViewController.xib in Resources */
,
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
9ec64ef9
No preview for this file type
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Assets.xcassets/收支统计/Contents.json
0 → 100644
View file @
9ec64ef9
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/Contents.json
0 → 100644
View file @
9ec64ef9
{
"images"
:
[
{
"filename"
:
"ShouZhiTongJiDayEdit.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"ShouZhiTongJiDayEdit@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"ShouZhiTongJiDayEdit@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit.png
0 → 100644
View file @
9ec64ef9
437 Bytes
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit@2x.png
0 → 100644
View file @
9ec64ef9
622 Bytes
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Assets.xcassets/收支统计/ShouZhiTongJiDayEdit.imageset/ShouZhiTongJiDayEdit@3x.png
0 → 100644
View file @
9ec64ef9
1.28 KB
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/Define/Define.swift
View file @
9ec64ef9
...
...
@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址
//test
//
let SERVERCE_ImageHost = "https://z.gelifood.com/"
//
let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://zx.gelifood.com/"
let
SERVERCE_HOST
=
"https://zx.gelifood.com/admin/"
let
SERVERCE_ImageHost
=
"https://z.gelifood.com/"
let
SERVERCE_HOST
=
"https://z.gelifood.com/admin/"
//
let SERVERCE_ImageHost = "https://zx.gelifood.com/"
//
let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
//online
//let SERVERCE_ImageHost = "https://api.laigewan.com/upload/images/"
//let SERVERCE_HOST = "http://a.gelifood.com/apia"
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.xib
View file @
9ec64ef9
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"15704"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"DZGLViewController"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"DZGLViewController"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"btmBtn"
destination=
"cAI-JO-Qdu"
id=
"Ld9-CG-TRT"
/>
<outlet
property=
"btmLbl"
destination=
"Ypv-HH-qxb"
id=
"Qod-Sc-gU9"
/>
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/地址管理/DiZhiGuanLiCell.xib
View file @
9ec64ef9
...
...
@@ -2,6 +2,7 @@
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
...
...
@@ -157,7 +158,7 @@
<color
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27
799999713897705"
green=
"0.56099998950958252"
blue=
"0.889999985694885
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.89019607843137
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
View file @
9ec64ef9
...
...
@@ -7,8 +7,11 @@
//
import
UIKit
import
SwiftyJSON
class
XinZengDiZhiViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
{
class
XinZengDiZhiViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
{
let
titleArr
=
[
"收货人:"
,
"地址:"
,
"详细地址:"
,
"手机号:"
,
"电话:"
,
"邮编:"
]
let
holderArr
=
[
"请填写收货人姓名"
,
"请选择城市"
,
"请输入详细地址"
,
"请输入手机号"
,
"请输入电话"
,
"请输入邮编"
]
@IBOutlet
weak
var
listView
:
UITableView
!
...
...
@@ -38,6 +41,8 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
listView
.
register
(
UINib
(
nibName
:
"TitleAndSwitchCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndSwitchCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFAndBtnCell"
)
// Do any additional setup after loading the view.
showAreaSelect
()
}
func
rightBtnClick
()
{
print
(
"删除"
)
...
...
@@ -100,5 +105,139 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
}
}
//MARK:--地址选择器
func
showAreaSelect
(){
let
path
=
Bundle
.
main
.
path
(
forResource
:
"address_new"
,
ofType
:
"json"
)
let
url
=
URL
(
fileURLWithPath
:
path
!
)
// 带throws的方法需要抛异常
do
{
let
data
=
try
Data
(
contentsOf
:
url
)
let
jsonData
=
JSON
(
data
)
print
(
"地址文件数据"
,
jsonData
[
"data"
])
self
.
addressArray
=
jsonData
[
"data"
]
.
arrayObject
!
//创建选择器
pickerView
=
UIPickerView
()
//将dataSource设置成自己
pickerView
.
dataSource
=
self
//将delegate设置成自己
pickerView
.
delegate
=
self
self
.
view
.
addSubview
(
pickerView
)
pickerView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
200
)
make
.
top
.
equalTo
(
600
)
}
}
catch
let
error
as
Error
?
{
print
(
"读取本地数据出现错误!"
,
error
as
Any
)
}
}
//选择器
var
pickerView
:
UIPickerView
!
//所以地址数据集合
var
addressArray
:
Array
<
Any
>
=
[]
//选择的省索引
var
provinceIndex
=
0
//选择的市索引
var
cityIndex
=
0
//选择的区(县)索引
var
areaIndex
=
0
//设置选择框的列数为3列,继承于UIPickerViewDataSource协议
func
numberOfComponents
(
in
pickerView
:
UIPickerView
)
->
Int
{
return
3
}
//设置选择框的行数,继承于UIPickerViewDataSource协议
func
pickerView
(
_
pickerView
:
UIPickerView
,
numberOfRowsInComponent
component
:
Int
)
->
Int
{
if
component
==
0
{
return
self
.
addressArray
.
count
}
else
if
component
==
1
{
let
province
=
self
.
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
return
(
province
[
"city_list"
]
!
as
AnyObject
)
.
count
}
else
{
let
province
=
self
.
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
if
(
province
[
"city_list"
]
as!
NSArray
)
.
count
==
0
{
return
0
}
if
let
city
=
(
province
[
"city_list"
]
as!
NSArray
)[
cityIndex
]
as?
[
String
:
AnyObject
]
{
print
(
city
[
"district_list"
]
as
Any
)
return
city
[
"district_list"
]
!.
count
}
else
{
return
0
}
}
}
//设置选择框各选项的内容,继承于UIPickerViewDelegate协议
func
pickerView
(
_
pickerView
:
UIPickerView
,
titleForRow
row
:
Int
,
forComponent
component
:
Int
)
->
String
?
{
if
component
==
0
{
let
rowDic
=
self
.
addressArray
[
row
]
as!
Dictionary
<
String
,
Any
>
return
rowDic
[
"area_name"
]
as?
String
}
else
if
component
==
1
{
let
province
=
self
.
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
let
city
=
(
province
[
"city_list"
]
as!
NSArray
)[
row
]
as!
[
String
:
AnyObject
]
return
city
[
"area_name"
]
as?
String
}
else
{
let
province
=
self
.
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
let
city
=
(
province
[
"city_list"
]
as!
NSArray
)[
cityIndex
]
as!
[
String
:
AnyObject
]
let
area
=
(
city
[
"district_list"
]
as!
NSArray
)[
row
]
as!
Dictionary
<
String
,
Any
>
return
area
[
"area_name"
]
as?
String
}
}
//选中项改变事件(将在滑动停止后触发)
func
pickerView
(
_
pickerView
:
UIPickerView
,
didSelectRow
row
:
Int
,
inComponent
component
:
Int
)
{
//根据列、行索引判断需要改变数据的区域
switch
(
component
)
{
case
0
:
provinceIndex
=
row
;
cityIndex
=
0
;
areaIndex
=
0
;
pickerView
.
reloadComponent
(
1
);
pickerView
.
reloadComponent
(
2
);
pickerView
.
selectRow
(
0
,
inComponent
:
1
,
animated
:
false
)
pickerView
.
selectRow
(
0
,
inComponent
:
2
,
animated
:
false
)
case
1
:
cityIndex
=
row
;
areaIndex
=
0
;
pickerView
.
reloadComponent
(
2
);
pickerView
.
selectRow
(
0
,
inComponent
:
2
,
animated
:
false
)
case
2
:
areaIndex
=
row
;
default
:
break
;
}
}
//自定义UIPickerView
func
pickerView
(
_
pickerView
:
UIPickerView
,
viewForRow
row
:
Int
,
forComponent
component
:
Int
,
reusing
view
:
UIView
?)
->
UIView
{
let
genderLbl
=
UILabel
()
genderLbl
.
textAlignment
=
.
center
genderLbl
.
font
=
UIFont
.
systemFont
(
ofSize
:
15
)
genderLbl
.
textColor
=
UIColor
.
init
(
named
:
"标题字颜色"
)
if
component
==
0
{
let
rowDic
=
self
.
addressArray
[
row
]
as!
Dictionary
<
String
,
Any
>
genderLbl
.
text
=
rowDic
[
"area_name"
]
as?
String
}
else
if
component
==
1
{
let
province
=
self
.
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
let
city
=
(
province
[
"city_list"
]
as!
NSArray
)[
row
]
as!
[
String
:
AnyObject
]
genderLbl
.
text
=
city
[
"area_name"
]
as?
String
}
else
{
let
province
=
self
.
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
let
city
=
(
province
[
"city_list"
]
as!
NSArray
)[
cityIndex
]
as!
[
String
:
AnyObject
]
let
area
=
(
city
[
"district_list"
]
as!
NSArray
)[
row
]
as!
Dictionary
<
String
,
Any
>
genderLbl
.
text
=
area
[
"area_name"
]
as?
String
}
return
genderLbl
}
}
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/地址管理/address_new.json
0 → 100644
View file @
9ec64ef9
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
9ec64ef9
...
...
@@ -423,7 +423,10 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
59
:
//地址管理
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
// let vc = DZGLViewController()
let
vc
=
XinZengDiZhiViewController
()
//新增
vc
.
navTitle
=
"新增地址"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
61
:
//库存商品
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
...
...
@@ -472,7 +475,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
return
case
75
:
//收支统计
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
let
vc
=
ShouZhiTongJiViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
76
:
//收支详情
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
...
...
@@ -527,7 +531,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
119
:
//新增采购单
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
let
vc
=
XinCaiGouViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
120
:
//商品毛利统计
HUD
.
flash
(
.
label
(
"敬请期待"
),
delay
:
1.2
)
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/收支统计/ShouZhiTongJiViewController.swift
View file @
9ec64ef9
...
...
@@ -7,8 +7,9 @@
//
import
UIKit
import
SwiftDate
class
ShouZhiTongJiViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
{
class
ShouZhiTongJiViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
WorkSelectTimeViewDelegate
{
@IBOutlet
weak
var
scrollView
:
UIScrollView
!
@IBOutlet
weak
var
bottomListView
:
UITableView
!
...
...
@@ -22,6 +23,7 @@ class ShouZhiTongJiViewController: BaseViewController,UITableViewDelegate,UITabl
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"收支统计"
navbar
.
rightImg
=
UIImage
.
init
(
named
:
"ShouZhiTongJiDayEdit"
)
self
.
view
.
addSubview
(
navbar
)
SetTopFrame
(
view
:
scrollView
,
height
:
fullScreenHeight
-
NavCGRect
.
height
)
...
...
@@ -34,7 +36,68 @@ class ShouZhiTongJiViewController: BaseViewController,UITableViewDelegate,UITabl
topListView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
bottomListView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
}
//MARK:--日期筛选按钮(右上角按钮)
let
selectV
=
WorkSelectTimeView
()
var
selelctIndex
=
1001
var
isShowSelectTimeV
:
Bool
=
false
var
endTime
=
DateInRegion
()
.
dateAt
(
.
endOfDay
)
.
date
-
8
.
hours
var
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfDay
)
.
date
-
8
.
hours
func
rightBtnClick
()
{
print
(
"日期筛选按钮"
)
if
isShowSelectTimeV
{
selectV
.
removeFromSuperview
()
}
else
{
selectV
.
delegate
=
self
selectV
.
selectIndex
=
selelctIndex
self
.
view
.
window
?
.
addSubview
(
selectV
)
selectV
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
navbar
.
snp_bottom
)
make
.
left
.
right
.
bottom
.
equalToSuperview
()
}
selectV
.
BeginDate
=
starTime
selectV
.
EndDate
=
endTime
}
}
//MARK:--时间选择视图反馈
func
selectWorkIndx
(
sender
:
Int
,
beginDate
:
Date
?,
endginDate
:
Date
?)
{
selelctIndex
=
sender
;
isShowSelectTimeV
=
false
switch
sender
{
case
1001
:
// topNavBtn.setTitle("今日", for: .normal)
endTime
=
DateInRegion
()
.
dateAt
(
.
endOfDay
)
.
date
-
8
.
hours
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfDay
)
.
date
-
8
.
hours
//今天开始时间
// loadData()
break
case
1002
:
// topNavBtn.setTitle("本周", for: .normal)
endTime
=
DateInRegion
()
.
dateAt
(
.
endOfDay
)
.
date
-
8
.
hours
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfWeek
)
.
date
+
1
.
days
-
8
.
hours
//当周周一开始时间
// loadData()
break
case
1003
:
// topNavBtn.setTitle("本月", for: .normal)
endTime
=
DateInRegion
()
.
dateAt
(
.
endOfDay
)
.
date
-
8
.
hours
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfMonth
)
.
date
-
8
.
hours
//本月开始时间
// loadData()
break
case
1004
:
if
beginDate
!=
nil
&&
endginDate
!=
nil
{
let
timeInterval
:
TimeInterval
=
beginDate
!.
timeIntervalSince1970
let
timeIntervalEnd
:
TimeInterval
=
endginDate
!.
timeIntervalSince1970
let
timestr
=
dayByDouble
(
sender
:
timeInterval
)
+
"-"
+
dayByDouble
(
sender
:
timeIntervalEnd
)
// topNavBtn.setTitle(timestr, for: .normal)
endTime
=
endginDate
!
starTime
=
beginDate
!
print
(
timestr
)
// loadData()
}
break
default
:
break
}
}
//MARK: - cell delegate
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
...
...
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/收支统计/ShouZhiTongJiViewController.xib
View file @
9ec64ef9
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"15704"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"ShouZhiTongJiViewController"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"ShouZhiTongJiViewController"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"bottomListView"
destination=
"8vs-I4-ukF"
id=
"bKM-yV-LyJ"
/>
<outlet
property=
"scrollView"
destination=
"E3n-cW-Crm"
id=
"Qi6-93-OYR"
/>
...
...
@@ -235,7 +236,7 @@
<color
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27
799999713897705"
green=
"0.56099998950958252"
blue=
"0.889999985694885
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.89019607843137
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
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