Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
张杰
xffruit
Commits
54a297e0
Commit
54a297e0
authored
Sep 08, 2015
by
freecui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进行中加工单的原料明细的操作
parent
14709692
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
71 deletions
+85
-71
IBTCommon.h
XFFruit/Utilities/IBTUIKit/IBTCommon.h
+1
-0
IBTCommon.m
XFFruit/Utilities/IBTUIKit/IBTCommon.m
+5
-0
GXFNewProcessViewController.m
...rollers/Process/Controllers/GXFNewProcessViewController.m
+34
-63
GXFPopNewMaterialViewController.m
...ntrollers/Process/Views/GXFPopNewMaterialViewController.m
+37
-1
GXFPopNewProductViewController.m
...ontrollers/Process/Views/GXFPopNewProductViewController.m
+8
-7
No files found.
XFFruit/Utilities/IBTUIKit/IBTCommon.h
View file @
54a297e0
...
...
@@ -36,6 +36,7 @@
+
(
NSString
*
)
stringFromDate
:(
NSDate
*
)
aDate
;
+
(
NSString
*
)
dictionaryToJson
:(
id
)
dic
;
+
(
NSString
*
)
checkString
:(
NSString
*
)
str
;
+
(
NSString
*
)
checkNull
:
(
id
)
data
;
+
(
BOOL
)
checkStringIsNilOrSpance
:
(
NSString
*
)
str
;
+
(
NSMutableAttributedString
*
)
setTextViewFontOfString
:(
NSString
*
)
string
paragraphStyle
:(
NSInteger
)
lineHeight
fontSize
:(
float
)
size
color
:(
UIColor
*
)
color
;
+
(
NSString
*
)
trimmingCharacters
:(
NSString
*
)
str
;
...
...
XFFruit/Utilities/IBTUIKit/IBTCommon.m
View file @
54a297e0
...
...
@@ -198,6 +198,11 @@
return
(
str
)?
str
:
@""
;
}
+
(
NSString
*
)
checkNull
:
(
id
)
data
{
return
data
==
[
NSNull
null
]
?
@""
:
data
;
}
+
(
BOOL
)
checkStringIsNilOrSpance
:
(
NSString
*
)
str
{
if
(
!
str
||
[
str
isEqualToString
:
@""
]
||
[
str
isEqual
:[
NSNull
null
]])
{
return
YES
;
...
...
XFFruit/ViewControllers/Process/Controllers/GXFNewProcessViewController.m
View file @
54a297e0
...
...
@@ -523,44 +523,6 @@ typedef NS_ENUM(NSInteger, cellRow) {
}
// if (cell == nil) {
// if (_d_isProduct) {
// GXFProcessProduct *processP = (GXFProcessProduct *)_d_productMuArr[indexPath.row - 2];
// cell = [[GXFProcessProductTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID processProduct:processP];
// } else {
// GXFProcessMaterial *pm = (GXFProcessMaterial *)_d_materialMuArr[indexPath.row - 2];
// cell = [[GXFProcessMaterialTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID processMaterial:pm];
// }
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// if (self.isHiddenEdit) {
// cell.editBtn.hidden = YES;
// }
// } else {
//
// }
// if ([self isHaveIndexPath:indexPath]) {
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
// CGRect Linefrmame = cell.lineLabel.frame;
// Linefrmame.origin.y = 200-1;
// cell.lineLabel.frame = Linefrmame;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = 150;
// cell.showView.frame = showfrmame;
// cell.backgroundColor = XXFBgColor;
// }else{
// cell.smallImageView.image = [UIImage imageNamed:@"arrowright"];
// CGRect Linefrmame = cell.lineLabel.frame;
// Linefrmame.origin.y = GXF_TABLEVIEW_NOMALCELL_HEIGHT-1;
// cell.lineLabel.frame = Linefrmame;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = 0;
// cell.showView.frame = showfrmame;
// cell.backgroundColor = [UIColor whiteColor];
// }
// cell.editBtn.tag = indexPath.row;
// [cell.editBtn addTarget:self action:@selector(editClick:) forControlEvents:UIControlEventTouchUpInside];
// return cell;
//
}
}
...
...
@@ -694,30 +656,35 @@ typedef NS_ENUM(NSInteger, cellRow) {
#pragma GXFBottomViewDelegate
-
(
void
)
bottomViewleftButtonClicked
:
(
UIButton
*
)
leftBtn
{
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
CLog
(
@"%@"
,
data
[
@"message"
]);};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
NSDictionary
*
material
=
@{
@"basePrice"
:
@"222"
,
@"baseQty"
:
@"3434"
,
@"instockDate"
:
@"2015-09-08 10:24:23"
,
@"place"
:
@"测试"
,
@"productCode"
:
@"100101"
,
@"productName"
:
@"可比克薯片紫色"
,
@"productUuid"
:
@"5a7417014e29bb2c014e351643f70032"
,
@"quality"
:
@"123"
,
@"remark"
:
@""
,
@"total"
:
@"4"
,
@"uuid"
:
[
NSNull
null
]};
NSDictionary
*
product
=
@{
@"baseQty"
:
@"2344"
,
@"outstockDate"
:
@"2015-09-08 10:24:42"
,
@"productCode"
:
@"农夫山泉"
,
@"productName"
:
@"dd"
,
@"productUuid"
:
@"402880e64e287fe2014e28895b8a0032"
,
@"qpc"
:
@"123"
,
@"qpcStr"
:
@"1 X123.0"
,
@"quantity"
:
@"234"
,
@"remark"
:
@""
,
@"unit"
:
@"篮"
,
@"uuid"
:
[
NSNull
null
]};
NSDictionary
*
para
=
@{
//@"uuid":@"",
@"contact"
:
@"222"
,
@"contactPhone"
:
@"3434"
,
@"materials"
:
@[
material
],
@"products"
:
@[
product
],
@"remark"
:
@"100101"
,
@"title"
:
@"可色"
,
@"total"
:
@"32"
,
@"vendor_code"
:
@"0001"
,
@"vendor_name"
:
@"卖香蕉的"
,
@"vendor_uuid"
:
@"297e48a24f0e3750014f0e3850a60001"
,
@"version"
:
@"0"
,
@"warehouse_code"
:
@"4028e4284f6e3ce5014f6e41a01b0001"
,
@"warehouse_name"
:
@"123"
,
@"warehouse_uuid"
:
@"123"
};
[[
ICRHTTPController
sharedController
]
saveProcessWithAuthenticode
:
para
success
:
succ
failure
:
fail
];
[
self
p_processBillSaveOrFinishWithIsSave
:
NO
];
// void(^succ)(id) = ^(id data) {
// [IBTLoadingView hideHUDWithText:nil];
// CLog(@"%@",data[@"message"]);};
// void(^fail)(id) = ^(id data) {
// [IBTLoadingView hideHUDWithText:nil];
// [IBTLoadingView showTips:data];
// };
//
// NSDictionary *material = @{@"basePrice":@"222",@"baseQty":@"3434",@"instockDate":@"2015-09-08 10:24:23",@"place":@"测试",
// @"productCode":@"100101",@"productName":@"可比克薯片紫色",@"productUuid":@"5a7417014e29bb2c014e351643f70032",@"quality":@"123",
// @"remark":@"",@"total":@"4",@"uuid":[NSNull null]};
// NSDictionary *product = @{@"baseQty":@"2344",@"outstockDate":@"2015-09-08 10:24:42",@"productCode":@"农夫山泉",@"productName":@"dd",
// @"productUuid":@"402880e64e287fe2014e28895b8a0032",@"qpc":@"123",@"qpcStr":@"1 X123.0",@"quantity":@"234",
// @"remark":@"",@"unit":@"篮",@"uuid":[NSNull null]};
// NSDictionary *para = @{//@"uuid":@"",
// @"contact":@"222",
// @"contactPhone":@"3434",
// @"materials":@[material],
// @"products":@[product],
// @"remark":@"100101",@"title":@"可色",@"total":@"32",@"vendor_code":@"0001",
// @"vendor_name":@"卖香蕉的",@"vendor_uuid":@"297e48a24f0e3750014f0e3850a60001",@"version":@"0",@"warehouse_code":@"4028e4284f6e3ce5014f6e41a01b0001",@"warehouse_name":@"123",@"warehouse_uuid":@"123"};
// [[ICRHTTPController sharedController] saveProcessWithAuthenticode:para success:succ failure:fail];
}
-
(
void
)
bottomViewRightButtonClicked
:
(
UIButton
*
)
rightBtn
{
[
self
p_processBillSaveOrFinishWithIsSave
:
YES
];
}
-
(
void
)
p_processBillSaveOrFinishWithIsSave
:
(
BOOL
)
isSave
{
CLog
(
@"ffff"
);
//[IBTCommon checkString:_d_processBill.title]
// if ([IBTCommon checkStringIsNilOrSpance:_d_processBill.title]) {
...
...
@@ -812,10 +779,14 @@ typedef NS_ENUM(NSInteger, cellRow) {
@"materials"
:
materialMuArr
,
@"products"
:
productMuArr
};
//[IBTLoadingView showProgressLabel:msg];
[[
ICRHTTPController
sharedController
]
saveProcessWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
//[[ICRHTTPController sharedController] finishProcessWithAuthenticode:dict success:succ failure:fail];
if
(
isSave
)
{
[[
ICRHTTPController
sharedController
]
saveProcessWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
}
else
{
[[
ICRHTTPController
sharedController
]
finishProcessWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
}
}
/*
kTitle = 0, 不为空
kVendor, 不为空
...
...
XFFruit/ViewControllers/Process/Views/GXFPopNewMaterialViewController.m
View file @
54a297e0
...
...
@@ -62,7 +62,10 @@
self
.
d_leftArr
=
@[
@"原料商品:"
,
@"入库日期:"
,
@"产地:"
,
@"品质描述:"
,
@"基础数量"
,
@"基础单价:"
,
@"总金额:"
,
@"备注:"
,];
self
.
d_rightArr
=
@[
@"选择商品"
,
@""
,
@"输入产地"
,
@"输入品质描述"
,
@"基础数量"
,
@"基础单价"
,
@"总金额"
,
@"输入备注内容"
];
self
.
d_lableTextArr
=
@[
@"斤"
,
@"元"
,
@"元"
];
self
.
d_processMaterial
=
[[
GXFProcessMaterial
alloc
]
init
];
if
(
!
_d_processMaterial
)
{
self
.
d_processMaterial
=
[[
GXFProcessMaterial
alloc
]
init
];
}
}
-
(
void
)
initSubViews
{
//self.view.backgroundColor = RGBA(0, 0, 0, 0.5);
...
...
@@ -149,6 +152,39 @@
xfCell
.
selectionStyle
=
UITableViewCellAccessoryNone
;
xfCell
.
f_textField
.
tag
=
indexPath
.
row
;
xfCell
.
textLabel
.
text
=
_d_leftArr
[
indexPath
.
row
];
if
(
_d_isEdited
)
{
switch
(
indexPath
.
row
)
{
case
0
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
productName
];
break
;
case
1
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
instockDate
];
//[NSString stringWithFormat:@"%@",_d_processProduct.outstockDate];
break
;
case
2
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
place
];
//_d_processProduct.unit;
break
;
case
3
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
quality
];
//[NSString stringWithFormat:@"%@",_d_processProduct.qpc];
break
;
case
4
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
baseQty
];
//[NSString stringWithFormat:@"%@",_d_processProduct.quantity];
break
;
case
5
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
basePrice
];
//[NSString stringWithFormat:@"%@",_d_processProduct.baseQty];
break
;
case
6
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
total
];
//_d_processProduct.remark;
break
;
case
7
:
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processMaterial
.
remark
];
//_d_processProduct.remark;
break
;
default
:
break
;
}
}
return
xfCell
;
}
...
...
XFFruit/ViewControllers/Process/Views/GXFPopNewProductViewController.m
View file @
54a297e0
...
...
@@ -127,25 +127,26 @@
if
(
_d_isEdited
)
{
switch
(
indexPath
.
row
)
{
case
0
:
xfCell
.
f_textField
.
text
=
_d_processProduct
.
productName
;
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
productName
];
//
_d_processProduct.productName;
break
;
case
1
:
xfCell
.
f_textField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_d_processProduct
.
outstockDate
];
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
outstockDate
];
//[NSString stringWithFormat:@"%@",_d_processProduct.outstockDate];
break
;
case
2
:
xfCell
.
f_textField
.
text
=
_d_processProduct
.
unit
;
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
unit
];
//
_d_processProduct.unit;
break
;
case
3
:
xfCell
.
f_textField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_d_processProduct
.
qpc
];
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
qpc
];
//[
NSString stringWithFormat:@"%@",_d_processProduct.qpc];
break
;
case
4
:
xfCell
.
f_textField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_d_processProduct
.
quantity
];
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
quantity
];
//[
NSString stringWithFormat:@"%@",_d_processProduct.quantity];
break
;
case
5
:
xfCell
.
f_textField
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_d_processProduct
.
baseQty
];
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
baseQty
];
//[
NSString stringWithFormat:@"%@",_d_processProduct.baseQty];
break
;
case
6
:
xfCell
.
f_textField
.
text
=
_d_processProduct
.
remark
;
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
remark
];
//
_d_processProduct.remark;
break
;
default
:
break
;
...
...
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