Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
total
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
张杰
total
Commits
925ae1e5
Commit
925ae1e5
authored
8 years ago
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收油单增加出库编码
parent
0d826879
master
No related merge requests found
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
322 additions
and
149 deletions
+322
-149
project.pbxproj
total.xcodeproj/project.pbxproj
+32
-26
BusinessStoryBoard.storyboard
total/GTOApp/Business/BusinessStoryBoard.storyboard
+110
-28
DeleteSectionView.h
total/GTOApp/Business/DeleteSectionView.h
+2
-2
DeleteSectionView.m
total/GTOApp/Business/DeleteSectionView.m
+4
-4
DeleteSectionView.xib
total/GTOApp/Business/DeleteSectionView.xib
+12
-8
NewObtainViewController.m
total/GTOApp/Business/NewObtainViewController.m
+35
-23
SeeObtainViewController.m
total/GTOApp/Business/SeeObtainViewController.m
+35
-20
SelectTimeCell.h
total/GTOApp/Business/SelectTimeCell.h
+2
-2
SelectTimeCell.m
total/GTOApp/Business/SelectTimeCell.m
+3
-3
SerialNumberTableViewCell.h
total/GTOApp/Business/SerialNumberTableViewCell.h
+21
-0
SerialNumberTableViewCell.m
total/GTOApp/Business/SerialNumberTableViewCell.m
+24
-0
SourceOrderSectionView.h
total/GTOApp/Business/SourceOrderSectionView.h
+2
-2
SourceOrderSectionView.m
total/GTOApp/Business/SourceOrderSectionView.m
+6
-6
SourceOrderSectionView.xib
total/GTOApp/Business/SourceOrderSectionView.xib
+27
-23
total_objc_json_client.h
total/GTOApp/UserUtil/total_objc_json_client.h
+5
-0
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+2
-2
No files found.
total.xcodeproj/project.pbxproj
View file @
925ae1e5
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/BusinessStoryBoard.storyboard
View file @
925ae1e5
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
d
eleteSectionView.h
→
total/GTOApp/Business/
D
eleteSectionView.h
View file @
925ae1e5
//
//
d
eleteSectionView.h
//
D
eleteSectionView.h
// total
//
// Created by 曹云霄 on 16/6/23.
...
...
@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
@interface
d
eleteSectionView
:
UIView
@interface
D
eleteSectionView
:
UIView
+
(
instancetype
)
initialize
;
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
d
eleteSectionView.m
→
total/GTOApp/Business/
D
eleteSectionView.m
View file @
925ae1e5
//
//
d
eleteSectionView.m
//
D
eleteSectionView.m
// total
//
// Created by 曹云霄 on 16/6/23.
// Copyright © 2016年 free. All rights reserved.
//
#import "
d
eleteSectionView.h"
#import "
D
eleteSectionView.h"
@implementation
d
eleteSectionView
@implementation
D
eleteSectionView
+
(
instancetype
)
initialize
{
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
d
eleteSectionView"
owner
:
nil
options
:
nil
]
firstObject
];
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
D
eleteSectionView"
owner
:
nil
options
:
nil
]
firstObject
];
}
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
d
eleteSectionView.xib
→
total/GTOApp/Business/
D
eleteSectionView.xib
View file @
925ae1e5
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"10117"
systemVersion=
"15F34"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"11762"
systemVersion=
"16D32"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"11757"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"
d
eleteSectionView"
>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"
D
eleteSectionView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
...
...
@@ -21,7 +25,7 @@
<inset
key=
"titleEdgeInsets"
minX=
"0.0"
minY=
"0.0"
maxX=
"12"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"23"
minY=
"5"
maxX=
"60"
maxY=
"6"
/>
<state
key=
"normal"
title=
"删除"
image=
"Trash"
>
<color
key=
"titleColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite
"
/>
<color
key=
"titleColor"
red=
"0.33333333333333331"
green=
"0.33333333333333331"
blue=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
</state>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"6Zf-nE-def"
>
...
...
@@ -33,12 +37,12 @@
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"12"
/>
<inset
key=
"imageEdgeInsets"
minX=
"58"
minY=
"4"
maxX=
"20"
maxY=
"4"
/>
<state
key=
"normal"
image=
"narrow"
>
<color
key=
"titleColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite
"
/>
<color
key=
"titleColor"
red=
"0.33333333333333331"
green=
"0.33333333333333331"
blue=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
</state>
<state
key=
"selected"
image=
"2-副本-5"
/>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite
"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
<constraints>
<constraint
firstItem=
"j37-i7-FR9"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"dka-2c-2DL"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"j37-i7-FR9"
secondAttribute=
"bottom"
constant=
"7"
id=
"pyh-fT-Coh"
/>
...
...
@@ -57,7 +61,7 @@
</objects>
<resources>
<image
name=
"2-副本-5"
width=
"42"
height=
"42"
/>
<image
name=
"Trash"
width=
"2
9"
height=
"31
"
/>
<image
name=
"Trash"
width=
"2
8"
height=
"30
"
/>
<image
name=
"narrow"
width=
"42"
height=
"42"
/>
</resources>
</document>
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/NewObtainViewController.m
View file @
925ae1e5
...
...
@@ -13,9 +13,9 @@
#import "ThirdTableViewCell.h"
#import "FourthTableViewCell.h"
#import "screeningButton.h"
#import "
s
ourceOrderSectionView.h"
#import "
S
ourceOrderSectionView.h"
#import "SaveCommitView.h"
#import "
d
eleteSectionView.h"
#import "
D
eleteSectionView.h"
#import "PromptTableViewController.h"
#import "SeeObtainHeaderView.h"
#import "OilOrderDetailTableViewCell.h"
...
...
@@ -26,9 +26,9 @@
#import "NoteTableViewCell.h"
#import "OilNumberTableViewCell.h"
#import "LossNumberTableViewCell.h"
#import "SerialNumberTableViewCell.h"
#define COUNT 11
#define COUNT 12
@interface
NewObtainViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
...
...
@@ -118,8 +118,8 @@
[
_imageAndTitleArray
addObject
:
array
];
}
//送货人信息
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"car1"
,
@"Friends"
,
@"图层-2New"
,
@"图层-2New"
,
@"班"
,
@"wNew"
,
@"ρNew"
,
@"car1"
,
@"Friends"
,
@"car1"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"车牌号:"
,
@"司机:"
,
@"实际到油时间:"
,
@"到油营业日期:"
,
@"班次号:"
,
@"发油公斤数:"
,
@"发油密度:"
,
@"发油升数:"
,
@"损耗升数:"
,
@"备注:"
,
nil
];
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"car1"
,
@"Friends"
,
@"图层-2New"
,
@"图层-2New"
,
@"班"
,
@"wNew"
,
@"ρNew"
,
@"car1"
,
@"Friends"
,
@"car1"
,
@"car1"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"车牌号:"
,
@"司机:"
,
@"实际到油时间:"
,
@"到油营业日期:"
,
@"班次号:"
,
@"发油公斤数:"
,
@"发油密度:"
,
@"发油升数:"
,
@"损耗升数:"
,
@"
出库编码:"
,
@"
备注:"
,
nil
];
for
(
int
i
=
0
;
i
<
imageArray
.
count
;
i
++
)
{
NSDictionary
*
dict
=
@{
@"image"
:
[
imageArray
objectAtIndex
:
i
],
@"title"
:
[
titleArray
objectAtIndex
:
i
]};
[
_imageAndTitleArray
[
0
]
addObject
:
dict
];
...
...
@@ -172,7 +172,7 @@
[
_userInputArray
addObject
:[
NSMutableArray
array
]];
}
//司机、车牌
for
(
int
i
=
0
;
i
<
1
0
;
i
++
)
{
for
(
int
i
=
0
;
i
<
1
1
;
i
++
)
{
[
_userInputArray
[
0
]
addObject
:
@""
];
}
//油罐信息
...
...
@@ -347,7 +347,7 @@
return
cell
;
}
if
(
indexPath
.
row
==
2
+
self
.
numberValue
||
indexPath
.
row
==
3
+
self
.
numberValue
)
{
//实际到油时间、到油营业时间
selectTimeCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"s
electTimeCell"
forIndexPath
:
indexPath
];
SelectTimeCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"S
electTimeCell"
forIndexPath
:
indexPath
];
[
cell
.
selecteArriveTimeButton
addTarget
:
self
action
:
@selector
(
detailsTimeButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
headerView
.
image
=
TCImage
([[[
self
.
imageAndTitleArray
objectAtIndex
:
indexPath
.
section
]
objectAtIndex
:
indexPath
.
row
]
objectForKey
:
@"image"
]);
cell
.
titleLabel
.
text
=
[[[
self
.
imageAndTitleArray
objectAtIndex
:
indexPath
.
section
]
objectAtIndex
:
indexPath
.
row
]
objectForKey
:
@"title"
];
...
...
@@ -383,7 +383,14 @@
cell
.
lossNumberLabel
.
text
=
self
.
userInputArray
[
indexPath
.
section
][
indexPath
.
row
];
return
cell
;
}
if
(
indexPath
.
row
==
9
+
self
.
numberValue
)
{
//备注
if
(
indexPath
.
row
==
9
+
self
.
numberValue
)
{
//出库编码
SerialNumberTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"SerialNumberTableViewCell"
forIndexPath
:
indexPath
];
[
cell
.
codingTextField
addTarget
:
self
action
:
@selector
(
firstTableViewCellInputString
:
)
forControlEvents
:
UIControlEventEditingChanged
];
cell
.
codingTextField
.
tag
=
indexPath
.
row
;
cell
.
codingTextField
.
text
=
self
.
userInputArray
[
indexPath
.
section
][
indexPath
.
row
];;
return
cell
;
}
if
(
indexPath
.
row
==
10
+
self
.
numberValue
)
{
//备注
NoteTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"NoteTableViewCell"
forIndexPath
:
indexPath
];
[
cell
.
userInputTextField
addTarget
:
self
action
:
@selector
(
firstTableViewCellInputString
:
)
forControlEvents
:
UIControlEventEditingChanged
];
cell
.
userInputTextField
.
tag
=
indexPath
.
row
;
...
...
@@ -454,7 +461,7 @@
return
view
;
}
if
(
section
%
2
==
0
)
{
deleteSectionView
*
deleteView
=
[
d
eleteSectionView
initialize
];
DeleteSectionView
*
deleteView
=
[
D
eleteSectionView
initialize
];
deleteView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
44
);
deleteView
.
deleteButton
.
tag
=
section
;
deleteView
.
zoomButton
.
tag
=
section
;
...
...
@@ -462,7 +469,7 @@
[
deleteView
.
zoomButton
addTarget
:
self
action
:
@selector
(
zoomSectionAction
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
deleteView
;
}
sourceOrderSectionView
*
sectionView
=
[
s
ourceOrderSectionView
initializeOne
];
SourceOrderSectionView
*
sectionView
=
[
S
ourceOrderSectionView
initializeOne
];
//监听
[
sectionView
.
selectetankButton
addTarget
:
self
action
:
@selector
(
selectetankButtonClickAction
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
if
([
self
.
tankInputArray
[
section
]
isKindOfClass
:[
NSDictionary
class
]])
{
//油罐信息
...
...
@@ -605,9 +612,9 @@
#pragma mark -油站选择
-
(
void
)
selectedGasStation
:
(
UIButton
*
)
btn
{
//
if (!self.recordSelectOrder) {
//
[IBTLoadingView showTextOnly:@"请先选择配油单"];return;
//
}
if
(
!
self
.
recordSelectOrder
)
{
[
IBTLoadingView
showTextOnly
:
@"请先选择配油单"
];
return
;
}
PromptTableViewController
*
promptVoew
=
[[
PromptTableViewController
alloc
]
init
];
promptVoew
.
isBoolValue
=
YES
;
__weak
typeof
(
self
)
weakSelf
=
self
;
...
...
@@ -724,8 +731,8 @@
#pragma mark -监听车牌号、司机姓名录入
-
(
void
)
firstTableViewCellInputString
:
(
UITextField
*
)
textField
{
//过滤车牌号输入、司机姓名输入、备注输入、班次号
if
(
!
(
textField
.
tag
==
(
0
+
self
.
numberValue
)
||
textField
.
tag
==
(
1
+
self
.
numberValue
)
||
textField
.
tag
==
(
4
+
self
.
numberValue
)
||
textField
.
tag
==
(
9
+
self
.
numberValue
)))
{
//过滤车牌号输入、司机姓名输入、备注输入、班次号
、出库编码
if
(
!
(
textField
.
tag
==
(
0
+
self
.
numberValue
)
||
textField
.
tag
==
(
1
+
self
.
numberValue
)
||
textField
.
tag
==
(
4
+
self
.
numberValue
)
||
textField
.
tag
==
(
9
+
self
.
numberValue
)
||
textField
.
tag
==
(
10
+
self
.
numberValue
)
))
{
if
(
!
[
self
isPureInt
:
textField
.
text
])
{
textField
.
text
=
nil
;
return
;
...
...
@@ -838,6 +845,9 @@
if
([
self
.
userInputArray
[
0
][
4
+
self
.
numberValue
]
isEqualToString
:
@""
])
{
[
IBTLoadingView
showTextOnly
:
@"请输入班次号"
];
return
;
}
if
([
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
]
isEqualToString
:
@""
])
{
[
IBTLoadingView
showTextOnly
:
@"请输入出库编码"
];
return
;
}
for
(
int
i
=
1
;
i
<
self
.
tankInputArray
.
count
;
i
+=
2
)
{
if
(
!
[
self
.
tankInputArray
[
i
]
isKindOfClass
:[
NSDictionary
class
]])
{
[
IBTLoadingView
showTextOnly
:
@"请选择油罐"
];
return
;
...
...
@@ -852,12 +862,12 @@
NSString
*
remark
=
@"该单损耗超过千分之三!"
;
if
(
lossNumber
>
delivery
*
3
/
1000
)
{
//添加到备注信息
if
([
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
]
isEqualToString
:
@""
])
{
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
]
=
remark
;
if
([
self
.
userInputArray
[
0
][
10
+
self
.
numberValue
]
isEqualToString
:
@""
])
{
self
.
userInputArray
[
0
][
10
+
self
.
numberValue
]
=
remark
;
}
else
{
NSString
*
string
=
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
];
NSString
*
string
=
self
.
userInputArray
[
0
][
10
+
self
.
numberValue
];
if
(
!
[
string
containsString
:
remark
])
{
//包含就不追加
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
]
=
[
NSString
stringWithFormat
:
@"%@,%@"
,
string
,
remark
];
self
.
userInputArray
[
0
][
10
+
self
.
numberValue
]
=
[
NSString
stringWithFormat
:
@"%@,%@"
,
string
,
remark
];
}
}
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
@"该单损耗超过千分之三,确认继续吗?"
preferredStyle
:
UIAlertControllerStyleAlert
];
...
...
@@ -873,9 +883,9 @@
}
else
{
//修改后不满足该单损耗超过千分之三
NSString
*
string
=
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
];
NSString
*
string
=
self
.
userInputArray
[
0
][
10
+
self
.
numberValue
];
if
(
!
[
string
containsString
:
remark
])
{
self
.
userInputArray
[
0
][
9
]
=
[
NSString
stringWithFormat
:
@"%@"
,
string
];
self
.
userInputArray
[
0
][
10
]
=
[
NSString
stringWithFormat
:
@"%@"
,
string
];
}
}
}
else
{
...
...
@@ -943,6 +953,8 @@
orderBill
.
truckNo
=
self
.
userInputArray
[
0
][
0
+
self
.
numberValue
]?
self
.
userInputArray
[
0
][
0
+
self
.
numberValue
]:
nil
;
//司机
orderBill
.
carter
=
self
.
userInputArray
[
0
][
1
+
self
.
numberValue
]?
self
.
userInputArray
[
0
][
1
+
self
.
numberValue
]:
nil
;
//出库编码
orderBill
.
envOutCode
=
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
]?
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
]:
nil
;
//油罐信息
__weak
typeof
(
self
)
weakSelf
=
self
;
NSMutableArray
*
tanksArray
=
[
NSMutableArray
array
];
...
...
@@ -1039,7 +1051,7 @@
//损耗升数
orderBill
.
wasterCapacity
=
[
NSNumber
numberWithDouble
:[
self
.
userInputArray
[
0
][
8
+
self
.
numberValue
]
doubleValue
]];
//备注
orderBill
.
remark
=
self
.
userInputArray
[
0
][
9
+
self
.
numberValue
];
orderBill
.
remark
=
self
.
userInputArray
[
0
][
10
+
self
.
numberValue
];
NSString
*
urlString
=
[
NSString
stringWithFormat
:
@"%@/receiveBill/save?operId=%@&operName=%@&time=%@"
,
HTTP_REST_API_BASE_URL
,
user
.
f_user_uuid
,
user
.
f_user_name
,[
GTOCommonTools
GetCurrenttime
]];
NSString
*
string
=
[
urlString
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSLog
(
@"%@"
,[
orderBill
toDictionary
]);
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/SeeObtainViewController.m
View file @
925ae1e5
...
...
@@ -12,17 +12,19 @@
#import "FirstTableViewCell.h"
#import "SecondTableViewCell.h"
#import "ThirdTableViewCell.h"
#import "
s
ourceOrderSectionView.h"
#import "
S
ourceOrderSectionView.h"
#import "FourthTableViewCell.h"
#import "
d
eleteSectionView.h"
#import "
D
eleteSectionView.h"
#import "OilOrderDetailTableViewCell.h"
#import "SelectOrderViewController.h"
#import "PromptTableViewController.h"
#import "
s
electTimeCell.h"
#import "
S
electTimeCell.h"
#import "OilNumberTableViewCell.h"
#import "LossNumberTableViewCell.h"
#import "NoteTableViewCell.h"
#import "DetailTimeViewController.h"
#import "SerialNumberTableViewCell.h"
#define COUNT 11
...
...
@@ -96,8 +98,8 @@
}
[
_imageAndTitleArray
[
0
]
addObject
:
@""
];
//配油单
//送货人信息
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"car1"
,
@"Friends"
,
@"图层-2New"
,
@"图层-2New"
,
@"班"
,
@"wNew"
,
@"ρNew"
,
@"car1"
,
@"Friends"
,
@"car1"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"车牌号:"
,
@"司机:"
,
@"实际到油时间:"
,
@"到油营业日期:"
,
@"班次号:"
,
@"发油公斤数:"
,
@"发油密度:"
,
@"发油升数:"
,
@"损耗升数:"
,
@"备注:"
,
nil
];
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"car1"
,
@"Friends"
,
@"图层-2New"
,
@"图层-2New"
,
@"班"
,
@"wNew"
,
@"ρNew"
,
@"car1"
,
@"Friends"
,
@"car1"
,
@"car1"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"车牌号:"
,
@"司机:"
,
@"实际到油时间:"
,
@"到油营业日期:"
,
@"班次号:"
,
@"发油公斤数:"
,
@"发油密度:"
,
@"发油升数:"
,
@"损耗升数:"
,
@"
出库编码:"
,
@"
备注:"
,
nil
];
for
(
int
i
=
0
;
i
<
imageArray
.
count
;
i
++
)
{
NSDictionary
*
dict
=
@{
@"image"
:
[
imageArray
objectAtIndex
:
i
],
@"title"
:
[
titleArray
objectAtIndex
:
i
]};
[
_imageAndTitleArray
[
1
]
addObject
:
dict
];
...
...
@@ -150,7 +152,7 @@
//配油单
[
_userInputArray
[
0
]
addObject
:
@""
];
//司机、车牌
for
(
int
i
=
0
;
i
<
1
0
;
i
++
)
{
for
(
int
i
=
0
;
i
<
1
1
;
i
++
)
{
[
_userInputArray
[
1
]
addObject
:
@""
];
}
}
...
...
@@ -257,7 +259,8 @@
weakSelf
.
userInputArray
[
ONE
][
6
]
=
[
NSString
stringWithFormat
:
@"%.6lf"
,[
weakSelf
.
orderDetails
.
pickFuelDensity
doubleValue
]];
//发油密度
weakSelf
.
userInputArray
[
ONE
][
7
]
=
[
NSString
stringWithFormat
:
@"%.6lf"
,[
weakSelf
.
orderDetails
.
pickFuelDensityCapacity
doubleValue
]];
//发油升数
weakSelf
.
userInputArray
[
ONE
][
8
]
=
[
NSString
stringWithFormat
:
@"%.6lf"
,[
weakSelf
.
orderDetails
.
wasterCapacity
doubleValue
]];
//损耗升数
weakSelf
.
userInputArray
[
ONE
][
9
]
=
weakSelf
.
orderDetails
.
remark
?
weakSelf
.
orderDetails
.
remark
:
@""
;
//备注;
weakSelf
.
userInputArray
[
ONE
][
9
]
=
weakSelf
.
orderDetails
.
envOutCode
?
weakSelf
.
orderDetails
.
envOutCode
:
@""
;
//出库编码;
weakSelf
.
userInputArray
[
ONE
][
10
]
=
weakSelf
.
orderDetails
.
remark
?
weakSelf
.
orderDetails
.
remark
:
@""
;
//备注;
//默认数据源个数
for
(
int
i
=
0
;
i
<
weakSelf
.
orderDetails
.
tankDtls
.
count
;
i
++
)
{
NSInteger
index
=
weakSelf
.
orderStateBoolValue
?
1
:
2
;
//区分收油单状态
...
...
@@ -386,7 +389,7 @@
if
(
indexPath
.
section
==
1
)
{
if
(
indexPath
.
row
==
2
||
indexPath
.
row
==
3
)
{
//实际到油时间/到油营业时间
selectTimeCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"s
electTimeCell"
forIndexPath
:
indexPath
];
SelectTimeCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"S
electTimeCell"
forIndexPath
:
indexPath
];
[
cell
.
selecteArriveTimeButton
addTarget
:
self
action
:
@selector
(
detailsTimeButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
selecteArriveTimeButton
.
tag
=
indexPath
.
row
;
[
cell
.
selecteArriveTimeButton
setTitle
:
self
.
userInputArray
[
indexPath
.
section
][
indexPath
.
row
]
forState
:
UIControlStateNormal
];
...
...
@@ -427,7 +430,14 @@
cell
.
lossNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.6lf"
,[
self
.
userInputArray
[
indexPath
.
section
][
indexPath
.
row
]
doubleValue
]];
return
cell
;
}
if
(
indexPath
.
row
==
9
)
{
//备注
if
(
indexPath
.
row
==
9
)
{
//出库编码
SerialNumberTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"SerialNumberTableViewCell"
forIndexPath
:
indexPath
];
[
cell
.
codingTextField
addTarget
:
self
action
:
@selector
(
firstTableViewCellInputString
:
)
forControlEvents
:
UIControlEventEditingChanged
];
cell
.
codingTextField
.
tag
=
indexPath
.
row
;
cell
.
codingTextField
.
text
=
self
.
userInputArray
[
indexPath
.
section
][
indexPath
.
row
];;
return
cell
;
}
if
(
indexPath
.
row
==
10
)
{
//备注
NoteTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"NoteTableViewCell"
forIndexPath
:
indexPath
];
[
cell
.
userInputTextField
addTarget
:
self
action
:
@selector
(
firstTableViewCellInputString
:
)
forControlEvents
:
UIControlEventEditingChanged
];
cell
.
userInputTextField
.
tag
=
indexPath
.
row
;
...
...
@@ -504,7 +514,7 @@
{
//配油单
if
(
section
==
0
)
{
sourceOrderSectionView
*
sectionView
=
[
s
ourceOrderSectionView
initializenThird
];
SourceOrderSectionView
*
sectionView
=
[
S
ourceOrderSectionView
initializenThird
];
sectionView
.
zoomButton
.
tag
=
section
;
sectionView
.
oilOrderNumber
.
enabled
=
!
self
.
orderStateBoolValue
;
// sectionView.arrowImageView.hidden = self.orderStateBoolValue;//区分收油单状态
...
...
@@ -523,7 +533,7 @@
if
(
!
self
.
orderStateBoolValue
)
{
//删除
if
(
section
%
2
!=
0
&&
section
>
2
)
{
deleteSectionView
*
deleteView
=
[
d
eleteSectionView
initialize
];
DeleteSectionView
*
deleteView
=
[
D
eleteSectionView
initialize
];
deleteView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
44
);
deleteView
.
deleteButton
.
tag
=
section
;
deleteView
.
zoomButton
.
tag
=
section
;
...
...
@@ -533,7 +543,7 @@
}
}
//油罐
sourceOrderSectionView
*
sectionView
=
self
.
orderStateBoolValue
?[
sourceOrderSectionView
initializenTwo
]:[
s
ourceOrderSectionView
initializeOne
];
SourceOrderSectionView
*
sectionView
=
self
.
orderStateBoolValue
?[
SourceOrderSectionView
initializenTwo
]:[
S
ourceOrderSectionView
initializeOne
];
sectionView
.
zoomButton
.
tag
=
section
+
1
;
sectionView
.
selectetankButton
.
tag
=
section
;
sectionView
.
selectetankButtonTwo
.
enabled
=
!
self
.
orderStateBoolValue
;
//区分收油单状态
...
...
@@ -756,7 +766,7 @@
-
(
void
)
firstTableViewCellInputString
:
(
UITextField
*
)
textField
{
//过滤车牌号输入、司机姓名输入、备注输入
if
(
!
(
textField
.
tag
==
0
||
textField
.
tag
==
1
||
textField
.
tag
==
9
||
textField
.
tag
==
4
))
{
if
(
!
(
textField
.
tag
==
0
||
textField
.
tag
==
1
||
textField
.
tag
==
9
||
textField
.
tag
==
4
||
textField
.
tag
==
10
))
{
if
(
!
[
self
isPureInt
:
textField
.
text
])
{
textField
.
text
=
nil
;
return
;
...
...
@@ -832,6 +842,9 @@
if
([
self
.
userInputArray
[
ONE
][
4
]
isEqualToString
:
@""
])
{
[
IBTLoadingView
showTextOnly
:
@"请输入班次号"
];
return
;
}
if
([
self
.
userInputArray
[
ONE
][
9
]
isEqualToString
:
@""
])
{
[
IBTLoadingView
showTextOnly
:
@"请输入出库编码"
];
return
;
}
for
(
int
i
=
2
;
i
<
self
.
tankInputArray
.
count
-
1
;
i
+=
2
)
{
if
(
!
[
self
.
tankInputArray
[
i
]
isKindOfClass
:[
NSDictionary
class
]])
{
[
IBTLoadingView
showTextOnly
:
@"请选择油罐"
];
return
;
...
...
@@ -854,12 +867,12 @@
NSString
*
remark
=
@"该单损耗超过千分之三!"
;
if
(
lossNumber
>
delivery
*
3
/
1000
)
{
//添加到备注信息
if
([
self
.
userInputArray
[
ONE
][
9
]
isEqualToString
:
@""
])
{
self
.
userInputArray
[
ONE
][
9
]
=
remark
;
if
([
self
.
userInputArray
[
ONE
][
10
]
isEqualToString
:
@""
])
{
self
.
userInputArray
[
ONE
][
10
]
=
remark
;
}
else
{
NSString
*
string
=
self
.
userInputArray
[
ONE
][
9
];
NSString
*
string
=
self
.
userInputArray
[
ONE
][
10
];
if
(
!
[
string
containsString
:
remark
])
{
//包含就不追加
self
.
userInputArray
[
ONE
][
9
]
=
[
NSString
stringWithFormat
:
@"%@,%@"
,
string
,
remark
];
self
.
userInputArray
[
ONE
][
10
]
=
[
NSString
stringWithFormat
:
@"%@,%@"
,
string
,
remark
];
}
}
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
@"该单损耗超过千分之三,确认继续吗?"
preferredStyle
:
UIAlertControllerStyleAlert
];
...
...
@@ -875,9 +888,9 @@
}
else
{
//修改后不满足该单损耗超过千分之三
NSString
*
string
=
self
.
userInputArray
[
ONE
][
9
];
NSString
*
string
=
self
.
userInputArray
[
ONE
][
10
];
if
(
!
[
string
containsString
:
remark
])
{
self
.
userInputArray
[
ONE
][
9
]
=
[
NSString
stringWithFormat
:
@"%@"
,
string
];
self
.
userInputArray
[
ONE
][
10
]
=
[
NSString
stringWithFormat
:
@"%@"
,
string
];
}
}
}
else
{
...
...
@@ -999,8 +1012,10 @@
self
.
orderDetails
.
pickFuelDensityCapacity
=
[
NSNumber
numberWithDouble
:[
self
.
userInputArray
[
ONE
][
7
]
doubleValue
]];
//损耗升数
self
.
orderDetails
.
wasterCapacity
=
[
NSNumber
numberWithDouble
:[
self
.
userInputArray
[
ONE
][
8
]
doubleValue
]];
//出库编码
self
.
orderDetails
.
envOutCode
=
self
.
userInputArray
[
ONE
][
9
];
//备注
self
.
orderDetails
.
remark
=
self
.
userInputArray
[
ONE
][
9
];
self
.
orderDetails
.
remark
=
self
.
userInputArray
[
ONE
][
10
];
NSString
*
urlString
=
[
NSString
stringWithFormat
:
@"%@/receiveBill/save?operId=%@&operName=%@&time=%@"
,
HTTP_REST_API_BASE_URL
,
user
.
f_user_uuid
,
user
.
f_user_name
,[
GTOCommonTools
GetCurrenttime
]];
NSString
*
string
=
[
urlString
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
IBTLoadingView
showProgressLabel
:
@"保存中..."
];
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
s
electTimeCell.h
→
total/GTOApp/Business/
S
electTimeCell.h
View file @
925ae1e5
//
//
s
electTimeCell.h
//
S
electTimeCell.h
// total
//
// Created by 曹云霄 on 16/7/21.
...
...
@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
@interface
s
electTimeCell
:
UITableViewCell
@interface
S
electTimeCell
:
UITableViewCell
/**
* 选择到油时间
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
s
electTimeCell.m
→
total/GTOApp/Business/
S
electTimeCell.m
View file @
925ae1e5
//
//
s
electTimeCell.m
//
S
electTimeCell.m
// total
//
// Created by 曹云霄 on 16/7/21.
// Copyright © 2016年 Delevin. All rights reserved.
//
#import "
s
electTimeCell.h"
#import "
S
electTimeCell.h"
@implementation
s
electTimeCell
@implementation
S
electTimeCell
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/SerialNumberTableViewCell.h
0 → 100644
View file @
925ae1e5
//
// SerialNumberTableViewCell.h
// total
//
// Created by 曹云霄 on 2017/3/29.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SerialNumberTableViewCell
:
UITableViewCell
/**
出库编码
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UITextField
*
codingTextField
;
@end
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/SerialNumberTableViewCell.m
0 → 100644
View file @
925ae1e5
//
// SerialNumberTableViewCell.m
// total
//
// Created by 曹云霄 on 2017/3/29.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import "SerialNumberTableViewCell.h"
@implementation
SerialNumberTableViewCell
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
// Initialization code
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
s
ourceOrderSectionView.h
→
total/GTOApp/Business/
S
ourceOrderSectionView.h
View file @
925ae1e5
//
//
s
ourceOrderSectionView.h
//
S
ourceOrderSectionView.h
// total
//
// Created by 曹云霄 on 16/6/22.
...
...
@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
@interface
s
ourceOrderSectionView
:
UIView
@interface
S
ourceOrderSectionView
:
UIView
+
(
instancetype
)
initializeOne
;
+
(
instancetype
)
initializenTwo
;
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
s
ourceOrderSectionView.m
→
total/GTOApp/Business/
S
ourceOrderSectionView.m
View file @
925ae1e5
//
//
s
ourceOrderSectionView.m
//
S
ourceOrderSectionView.m
// total
//
// Created by 曹云霄 on 16/6/22.
// Copyright © 2016年 free. All rights reserved.
//
#import "
s
ourceOrderSectionView.h"
#import "
S
ourceOrderSectionView.h"
@implementation
s
ourceOrderSectionView
@implementation
S
ourceOrderSectionView
+
(
instancetype
)
initializeOne
{
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
s
ourceOrderSectionView"
owner
:
nil
options
:
nil
]
firstObject
];
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
S
ourceOrderSectionView"
owner
:
nil
options
:
nil
]
firstObject
];
}
+
(
instancetype
)
initializenTwo
{
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
s
ourceOrderSectionView"
owner
:
nil
options
:
nil
]
objectAtIndex
:
1
];
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
S
ourceOrderSectionView"
owner
:
nil
options
:
nil
]
objectAtIndex
:
1
];
}
+
(
instancetype
)
initializenThird
{
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
s
ourceOrderSectionView"
owner
:
nil
options
:
nil
]
lastObject
];
return
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"
S
ourceOrderSectionView"
owner
:
nil
options
:
nil
]
lastObject
];
}
@end
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/
s
ourceOrderSectionView.xib
→
total/GTOApp/Business/
S
ourceOrderSectionView.xib
View file @
925ae1e5
This diff is collapsed.
Click to expand it.
total/GTOApp/UserUtil/total_objc_json_client.h
View file @
925ae1e5
...
...
@@ -2539,6 +2539,11 @@ extern NSString * const POSITIONTYPE_NONE;
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
remark
;
/**
出库编码
*/
@property
(
nonatomic
,
copy
)
NSString
*
envOutCode
;
/**
* 收油单油罐明细
* @see ReceiveTankDtl
...
...
This diff is collapsed.
Click to expand it.
total/Macro/GTOAppMacro.h
View file @
925ae1e5
...
...
@@ -88,8 +88,8 @@
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//开发环境
#define HTTP_LOCAL_BASE_URL @"http://
139.196.195.30:809
3"
#define HTTP_REST_API_BASE_URL @"http://
139.196.195.30:809
3/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://
gomoredev:808
3"
#define HTTP_REST_API_BASE_URL @"http://
gomoredev:808
3/total-server/rest"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
...
...
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