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
9 years ago
by
freecui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进行中加工单的原料明细的操作
parent
14709692
Show 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 @@
...
@@ -36,6 +36,7 @@
+
(
NSString
*
)
stringFromDate
:(
NSDate
*
)
aDate
;
+
(
NSString
*
)
stringFromDate
:(
NSDate
*
)
aDate
;
+
(
NSString
*
)
dictionaryToJson
:(
id
)
dic
;
+
(
NSString
*
)
dictionaryToJson
:(
id
)
dic
;
+
(
NSString
*
)
checkString
:(
NSString
*
)
str
;
+
(
NSString
*
)
checkString
:(
NSString
*
)
str
;
+
(
NSString
*
)
checkNull
:
(
id
)
data
;
+
(
BOOL
)
checkStringIsNilOrSpance
:
(
NSString
*
)
str
;
+
(
BOOL
)
checkStringIsNilOrSpance
:
(
NSString
*
)
str
;
+
(
NSMutableAttributedString
*
)
setTextViewFontOfString
:(
NSString
*
)
string
paragraphStyle
:(
NSInteger
)
lineHeight
fontSize
:(
float
)
size
color
:(
UIColor
*
)
color
;
+
(
NSMutableAttributedString
*
)
setTextViewFontOfString
:(
NSString
*
)
string
paragraphStyle
:(
NSInteger
)
lineHeight
fontSize
:(
float
)
size
color
:(
UIColor
*
)
color
;
+
(
NSString
*
)
trimmingCharacters
:(
NSString
*
)
str
;
+
(
NSString
*
)
trimmingCharacters
:(
NSString
*
)
str
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCommon.m
View file @
54a297e0
...
@@ -198,6 +198,11 @@
...
@@ -198,6 +198,11 @@
return
(
str
)?
str
:
@""
;
return
(
str
)?
str
:
@""
;
}
}
+
(
NSString
*
)
checkNull
:
(
id
)
data
{
return
data
==
[
NSNull
null
]
?
@""
:
data
;
}
+
(
BOOL
)
checkStringIsNilOrSpance
:
(
NSString
*
)
str
{
+
(
BOOL
)
checkStringIsNilOrSpance
:
(
NSString
*
)
str
{
if
(
!
str
||
[
str
isEqualToString
:
@""
]
||
[
str
isEqual
:[
NSNull
null
]])
{
if
(
!
str
||
[
str
isEqualToString
:
@""
]
||
[
str
isEqual
:[
NSNull
null
]])
{
return
YES
;
return
YES
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Process/Controllers/GXFNewProcessViewController.m
View file @
54a297e0
...
@@ -523,44 +523,6 @@ typedef NS_ENUM(NSInteger, cellRow) {
...
@@ -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) {
...
@@ -694,30 +656,35 @@ typedef NS_ENUM(NSInteger, cellRow) {
#pragma GXFBottomViewDelegate
#pragma GXFBottomViewDelegate
-
(
void
)
bottomViewleftButtonClicked
:
(
UIButton
*
)
leftBtn
{
-
(
void
)
bottomViewleftButtonClicked
:
(
UIButton
*
)
leftBtn
{
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
self
p_processBillSaveOrFinishWithIsSave
:
NO
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
// void(^succ)(id) = ^(id data) {
CLog
(
@"%@"
,
data
[
@"message"
]);};
// [IBTLoadingView hideHUDWithText:nil];
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
// CLog(@"%@",data[@"message"]);};
[
IBTLoadingView
hideHUDWithText
:
nil
];
// void(^fail)(id) = ^(id data) {
[
IBTLoadingView
showTips
:
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"
,
// NSDictionary *material = @{@"basePrice":@"222",@"baseQty":@"3434",@"instockDate":@"2015-09-08 10:24:23",@"place":@"测试",
@"remark"
:
@""
,
@"total"
:
@"4"
,
@"uuid"
:
[
NSNull
null
]};
// @"productCode":@"100101",@"productName":@"可比克薯片紫色",@"productUuid":@"5a7417014e29bb2c014e351643f70032",@"quality":@"123",
NSDictionary
*
product
=
@{
@"baseQty"
:
@"2344"
,
@"outstockDate"
:
@"2015-09-08 10:24:42"
,
@"productCode"
:
@"农夫山泉"
,
@"productName"
:
@"dd"
,
// @"remark":@"",@"total":@"4",@"uuid":[NSNull null]};
@"productUuid"
:
@"402880e64e287fe2014e28895b8a0032"
,
@"qpc"
:
@"123"
,
@"qpcStr"
:
@"1 X123.0"
,
@"quantity"
:
@"234"
,
// NSDictionary *product = @{@"baseQty":@"2344",@"outstockDate":@"2015-09-08 10:24:42",@"productCode":@"农夫山泉",@"productName":@"dd",
@"remark"
:
@""
,
@"unit"
:
@"篮"
,
@"uuid"
:
[
NSNull
null
]};
// @"productUuid":@"402880e64e287fe2014e28895b8a0032",@"qpc":@"123",@"qpcStr":@"1 X123.0",@"quantity":@"234",
NSDictionary
*
para
=
@{
//@"uuid":@"",
// @"remark":@"",@"unit":@"篮",@"uuid":[NSNull null]};
@"contact"
:
@"222"
,
// NSDictionary *para = @{//@"uuid":@"",
@"contactPhone"
:
@"3434"
,
// @"contact":@"222",
@"materials"
:
@[
material
],
// @"contactPhone":@"3434",
@"products"
:
@[
product
],
// @"materials":@[material],
@"remark"
:
@"100101"
,
@"title"
:
@"可色"
,
@"total"
:
@"32"
,
@"vendor_code"
:
@"0001"
,
// @"products":@[product],
@"vendor_name"
:
@"卖香蕉的"
,
@"vendor_uuid"
:
@"297e48a24f0e3750014f0e3850a60001"
,
@"version"
:
@"0"
,
@"warehouse_code"
:
@"4028e4284f6e3ce5014f6e41a01b0001"
,
@"warehouse_name"
:
@"123"
,
@"warehouse_uuid"
:
@"123"
};
// @"remark":@"100101",@"title":@"可色",@"total":@"32",@"vendor_code":@"0001",
[[
ICRHTTPController
sharedController
]
saveProcessWithAuthenticode
:
para
success
:
succ
failure
:
fail
];
// @"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
{
-
(
void
)
bottomViewRightButtonClicked
:
(
UIButton
*
)
rightBtn
{
[
self
p_processBillSaveOrFinishWithIsSave
:
YES
];
}
-
(
void
)
p_processBillSaveOrFinishWithIsSave
:
(
BOOL
)
isSave
{
CLog
(
@"ffff"
);
CLog
(
@"ffff"
);
//[IBTCommon checkString:_d_processBill.title]
//[IBTCommon checkString:_d_processBill.title]
// if ([IBTCommon checkStringIsNilOrSpance:_d_processBill.title]) {
// if ([IBTCommon checkStringIsNilOrSpance:_d_processBill.title]) {
...
@@ -812,10 +779,14 @@ typedef NS_ENUM(NSInteger, cellRow) {
...
@@ -812,10 +779,14 @@ typedef NS_ENUM(NSInteger, cellRow) {
@"materials"
:
materialMuArr
,
@"materials"
:
materialMuArr
,
@"products"
:
productMuArr
};
@"products"
:
productMuArr
};
//[IBTLoadingView showProgressLabel:msg];
//[IBTLoadingView showProgressLabel:msg];
if
(
isSave
)
{
[[
ICRHTTPController
sharedController
]
saveProcessWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
[[
ICRHTTPController
sharedController
]
saveProcessWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
//[[ICRHTTPController sharedController] finishProcessWithAuthenticode:dict success:succ failure:fail];
}
else
{
}
[[
ICRHTTPController
sharedController
]
finishProcessWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
}
}
/*
/*
kTitle = 0, 不为空
kTitle = 0, 不为空
kVendor, 不为空
kVendor, 不为空
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Process/Views/GXFPopNewMaterialViewController.m
View file @
54a297e0
...
@@ -62,7 +62,10 @@
...
@@ -62,7 +62,10 @@
self
.
d_leftArr
=
@[
@"原料商品:"
,
@"入库日期:"
,
@"产地:"
,
@"品质描述:"
,
@"基础数量"
,
@"基础单价:"
,
@"总金额:"
,
@"备注:"
,];
self
.
d_leftArr
=
@[
@"原料商品:"
,
@"入库日期:"
,
@"产地:"
,
@"品质描述:"
,
@"基础数量"
,
@"基础单价:"
,
@"总金额:"
,
@"备注:"
,];
self
.
d_rightArr
=
@[
@"选择商品"
,
@""
,
@"输入产地"
,
@"输入品质描述"
,
@"基础数量"
,
@"基础单价"
,
@"总金额"
,
@"输入备注内容"
];
self
.
d_rightArr
=
@[
@"选择商品"
,
@""
,
@"输入产地"
,
@"输入品质描述"
,
@"基础数量"
,
@"基础单价"
,
@"总金额"
,
@"输入备注内容"
];
self
.
d_lableTextArr
=
@[
@"斤"
,
@"元"
,
@"元"
];
self
.
d_lableTextArr
=
@[
@"斤"
,
@"元"
,
@"元"
];
if
(
!
_d_processMaterial
)
{
self
.
d_processMaterial
=
[[
GXFProcessMaterial
alloc
]
init
];
self
.
d_processMaterial
=
[[
GXFProcessMaterial
alloc
]
init
];
}
}
}
-
(
void
)
initSubViews
{
-
(
void
)
initSubViews
{
//self.view.backgroundColor = RGBA(0, 0, 0, 0.5);
//self.view.backgroundColor = RGBA(0, 0, 0, 0.5);
...
@@ -149,6 +152,39 @@
...
@@ -149,6 +152,39 @@
xfCell
.
selectionStyle
=
UITableViewCellAccessoryNone
;
xfCell
.
selectionStyle
=
UITableViewCellAccessoryNone
;
xfCell
.
f_textField
.
tag
=
indexPath
.
row
;
xfCell
.
f_textField
.
tag
=
indexPath
.
row
;
xfCell
.
textLabel
.
text
=
_d_leftArr
[
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
;
return
xfCell
;
}
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Process/Views/GXFPopNewProductViewController.m
View file @
54a297e0
...
@@ -127,25 +127,26 @@
...
@@ -127,25 +127,26 @@
if
(
_d_isEdited
)
{
if
(
_d_isEdited
)
{
switch
(
indexPath
.
row
)
{
switch
(
indexPath
.
row
)
{
case
0
:
case
0
:
xfCell
.
f_textField
.
text
=
_d_processProduct
.
productName
;
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
productName
];
//
_d_processProduct.productName;
break
;
break
;
case
1
:
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
;
break
;
case
2
:
case
2
:
xfCell
.
f_textField
.
text
=
_d_processProduct
.
unit
;
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
unit
];
//
_d_processProduct.unit;
break
;
break
;
case
3
:
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
;
break
;
case
4
:
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
;
break
;
case
5
:
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
;
break
;
case
6
:
case
6
:
xfCell
.
f_textField
.
text
=
_d_processProduct
.
remark
;
xfCell
.
f_textField
.
text
=
[
IBTCommon
checkNull
:
_d_processProduct
.
remark
];
//
_d_processProduct.remark;
break
;
break
;
default
:
default
:
break
;
break
;
...
...
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