Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-iOS
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
张杰
Opple-iOS
Commits
d7b136f4
Commit
d7b136f4
authored
May 23, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
曹云霄
parent
ebd70446
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
82 additions
and
114 deletions
+82
-114
AllpriceTableViewCell.m
Lighting/Class/AllpriceTableViewCell.m
+3
-3
ClientViewController.m
Lighting/Class/ClientViewController.m
+19
-8
CommodityListTableViewCell.m
Lighting/Class/CommodityListTableViewCell.m
+2
-2
OrderdetailsViewController.m
Lighting/Class/OrderdetailsViewController.m
+1
-1
PersonInformationTableViewCell.m
Lighting/Class/PersonInformationTableViewCell.m
+1
-1
AddressViewController.m
Lighting/Class/Shoppingcart/AddressViewController.m
+16
-4
GenerateOrdersViewController.m
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
+1
-1
ModifyShippingAddressView.h
Lighting/Class/Shoppingcart/ModifyShippingAddressView.h
+1
-1
ModifyShippingAddressView.m
Lighting/Class/Shoppingcart/ModifyShippingAddressView.m
+2
-2
ShoppingTableViewCell.m
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
+1
-1
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+5
-2
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+28
-86
Customermanager.h
Lighting/Tools/Customermanager.h
+2
-2
No files found.
Lighting/Class/AllpriceTableViewCell.m
View file @
d7b136f4
...
...
@@ -22,15 +22,15 @@
{
_goodsAllprice
=
goodsAllprice
;
NSUInteger
allNumber
;
NSInteger
allPrice
;
NSUInteger
allNumber
=
0
;
NSInteger
allPrice
=
0
;
for
(
ShopcarModel
*
model
in
_goodsAllprice
)
{
allNumber
+=
model
.
goodsNum
;
allPrice
+=
[
model
.
goods
.
costPrice
integerValue
];
}
self
.
goodsAllNumber
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
allNumber
];
self
.
goodsAllPrice
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
allPrice
];
self
.
goodsAllPrice
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
allPrice
*
allNumber
];
}
...
...
Lighting/Class/ClientViewController.m
View file @
d7b136f4
...
...
@@ -136,11 +136,11 @@
self
.
searchPersonInformationField
.
delegate
=
self
;
//监听键盘落下的通知
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
KeyboadrDismiss
)
name
:
UIKeyboardWillHideNotification
object
:
nil
];
}
#pragma mark -获取导购关联客户
-
(
void
)
getShoppersAssociatedCustomer
:
(
ConsumerQueryCondition
*
)
condition
isRemoveArray
:
(
BOOL
)
remove
{
...
...
@@ -267,13 +267,18 @@
[
Customermanager
manager
].
customerID
=
model
.
fid
;
[
Customermanager
manager
].
customerName
=
model
.
name
;
[
Customermanager
manager
].
customerPhoneNumber
=
model
.
mobile
;
[
Customermanager
manager
].
company
Address
=
model
.
address
;
[
Customermanager
manager
].
company
Name
=
model
.
address
;
[
Customermanager
manager
].
cutomerAddress
=
model
.
address
;
[
self
.
addpersonInformationButton
setTitle
:
@"退出当前客户"
forState
:
UIControlStateNormal
];
self
.
changePersonInformationButton
.
hidden
=
NO
;
[
self
SetupUserShoppingCarNumberRequest
];
[
self
SetupUserRequest
];
[
self
ChangeCustomerName
];
self
.
customerNameField
.
enabled
=
NO
;
self
.
customerAddress
.
enabled
=
NO
;
self
.
phoneNumberField
.
enabled
=
NO
;
self
.
companyNameField
.
enabled
=
NO
;
}
...
...
@@ -311,13 +316,11 @@
}
#pragma mark -添加客户信息、或者退出当前客户
-
(
IBAction
)
addCustomerInformationORExit
:
(
UIButton
*
)
sender
{
if
([
sender
.
currentTitle
isEqualToString
:
@"退出当前客户"
])
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
@
(
0
)];
self
.
customerNameField
.
text
=
nil
;
self
.
customerAddress
.
text
=
nil
;
self
.
phoneNumberField
.
text
=
nil
;
...
...
@@ -329,8 +332,13 @@
self
.
changePersonInformationButton
.
hidden
=
YES
;
[
Shoppersmanager
manager
].
currentCustomer
=
NO
;
[
Customermanager
manager
].
customerID
=
nil
;
[
Customermanager
manager
].
customerName
=
nil
;
[
Customermanager
manager
].
customerPhoneNumber
=
nil
;
[
Customermanager
manager
].
companyName
=
nil
;
[
Customermanager
manager
].
cutomerAddress
=
nil
;
[
self
.
changePersonInformationButton
setTitle
:
@"更改客户信息"
forState
:
UIControlStateNormal
];
[
self
ChangeCustomerName
];
[
self
QueryShoppingCarNumber
];
//全部为为选中状态
for
(
InformationTableViewCell
*
cell
in
self
.
informationTableview
.
visibleCells
)
{
...
...
@@ -344,6 +352,7 @@
return
;
}
[
self
addCustomerInformation
:
NO
];
}
...
...
@@ -386,6 +395,8 @@
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
//进入刷新状态
[
self
.
informationTableview
.
mj_header
beginRefreshing
];
//新增保存ID
if
(
!
isChange
)
{
[
Customermanager
manager
].
customerID
=
returnValue
[
@"data"
];
...
...
@@ -398,7 +409,7 @@
//保存客户信息
[
Customermanager
manager
].
customerName
=
customerEntity
.
name
;
[
Customermanager
manager
].
customerPhoneNumber
=
customerEntity
.
mobile
;
[
Customermanager
manager
].
company
Address
=
customerEntity
.
address
;
[
Customermanager
manager
].
company
Name
=
customerEntity
.
address
;
[
Customermanager
manager
].
cutomerAddress
=
customerEntity
.
address
;
[
Shoppersmanager
manager
].
currentCustomer
=
YES
;
[
self
.
addpersonInformationButton
setTitle
:
@"退出当前客户"
forState
:
UIControlStateNormal
];
...
...
@@ -504,7 +515,7 @@
#pragma mark -键盘落下,判断更改信息按钮是否可见,可见则取消输入框的响应
-
(
void
)
KeyboadrDismiss
{
if
(
!
self
.
changePersonInformationButton
.
selected
)
{
if
(
!
self
.
changePersonInformationButton
.
hidden
)
{
self
.
customerNameField
.
enabled
=
NO
;
self
.
customerAddress
.
enabled
=
NO
;
...
...
Lighting/Class/CommodityListTableViewCell.m
View file @
d7b136f4
...
...
@@ -21,10 +21,10 @@
_model
=
model
;
[
self
.
goodsHeader
sd_setImageWithURL
:[
NSURL
URLWithString
:
_model
.
goods
.
pictures
]
placeholderImage
:
ReplaceImage
];
self
.
goodsName
.
text
=
_model
.
goods
.
name
;
self
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"数量 X%
@"
,
_model
.
goods
.
number
];
self
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"数量 X%
d"
,
_model
.
goodsNum
];
self
.
clinchPrice
.
text
=
[
NSString
stringWithFormat
:
@"成交价 ¥%@"
,[
_model
.
goods
.
costPrice
stringValue
]];
//计算总价格
NSInteger
number
=
[
_model
.
goods
.
number
integerValue
]
;
NSInteger
number
=
_model
.
goodsNum
;
NSInteger
price
=
[
_model
.
goods
.
costPrice
integerValue
];
NSInteger
allPrice
=
number
*
price
;
self
.
totalPrice
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
allPrice
];
...
...
Lighting/Class/OrderdetailsViewController.m
View file @
d7b136f4
...
...
@@ -288,7 +288,7 @@
break
;
case
1
:
{
return
1
35
;
return
1
10
;
}
break
;
case
2
:
...
...
Lighting/Class/PersonInformationTableViewCell.m
View file @
d7b136f4
...
...
@@ -18,7 +18,7 @@
self
.
customerName
.
text
=
[
Customermanager
manager
].
customerName
;
self
.
companyName
.
text
=
[
Customermanager
manager
].
customerName
;
// self.emailName.text = [Customermanager manager]
self
.
companyLocation
.
text
=
[
Customermanager
manager
].
company
Address
;
self
.
companyLocation
.
text
=
[
Customermanager
manager
].
company
Name
;
self
.
customerPhoneNumber
.
text
=
[
Customermanager
manager
].
customerPhoneNumber
;
}
...
...
Lighting/Class/Shoppingcart/AddressViewController.m
View file @
d7b136f4
...
...
@@ -16,6 +16,17 @@
* 城市选择器
*/
@property
(
nonatomic
,
strong
)
ModifyShippingAddressView
*
citySelecteview
;
/**
* 选中省
*/
@property
(
nonatomic
,
copy
)
NSString
*
provincesString
;
/**
* 选中城市
*/
@property
(
nonatomic
,
copy
)
NSString
*
cityString
;
@end
@implementation
AddressViewController
...
...
@@ -123,13 +134,15 @@
#pragma mark 完成城市选择后
-
(
void
)
citySelected
:
(
NSString
*
)
cityString
-
(
void
)
citySelected
:
(
NSString
*
)
cityString
WithprovincesString
:
(
NSString
*
)
provincesString
{
self
.
cityString
=
cityString
;
self
.
provincesString
=
provincesString
;
[
self
.
citySelected
setTitle
:
cityString
forState
:
UIControlStateNormal
];
}
#pragma mark 新增按钮点击,或者
修改
#pragma mark 新增按钮点击,或者
保存
-
(
IBAction
)
addAddressButtonClick
:
(
UIButton
*
)
sender
{
if
([
sender
.
currentTitle
isEqualToString
:
@"新增"
])
{
...
...
@@ -140,11 +153,9 @@
{
[
self
ChangeAddressInformationRequest
];
}
}
#pragma mark -新增地址信息
-
(
void
)
addAddressInformationRequest
{
...
...
@@ -153,6 +164,7 @@
address
.
name
=
self
.
recipientPerson
.
text
;
address
.
miblephone
=
self
.
PhoneNumber
.
text
;
address
.
city
=
[
self
.
citySelected
currentTitle
];
address
.
province
=
self
.
provincesString
;
address
.
address
=
self
.
detailsAddress
.
text
;
[
self
CreateMBProgressHUDLoding
];
...
...
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
View file @
d7b136f4
...
...
@@ -210,7 +210,7 @@
switch
(
indexPath
.
section
)
{
case
0
:
{
return
1
4
0
;
return
1
1
0
;
}
break
;
case
1
:
...
...
Lighting/Class/Shoppingcart/ModifyShippingAddressView.h
View file @
d7b136f4
...
...
@@ -12,7 +12,7 @@
@protocol
CityselectedDelegate
<
NSObject
>
//城市选择
-
(
void
)
citySelected
:
(
NSString
*
)
cityString
;
-
(
void
)
citySelected
:
(
NSString
*
)
cityString
WithprovincesString
:
(
NSString
*
)
provincesString
;
@end
...
...
Lighting/Class/Shoppingcart/ModifyShippingAddressView.m
View file @
d7b136f4
...
...
@@ -114,8 +114,8 @@
break
;
}
if
([
self
.
delegate
respondsToSelector
:
@selector
(
citySelected
:)])
{
[
self
.
delegate
citySelected
:
cityString
];
if
([
self
.
delegate
respondsToSelector
:
@selector
(
citySelected
:
WithprovincesString
:
)])
{
[
self
.
delegate
citySelected
:
cityString
WithprovincesString
:
provincesString
];
}
}
...
...
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
View file @
d7b136f4
...
...
@@ -36,7 +36,7 @@
self
.
tagsPriceLabe
.
text
=
[
_model
.
goods
.
tagPrice
stringValue
];
self
.
clinchTextfield
.
text
=
[
_model
.
goods
.
costPrice
stringValue
];
self
.
goodsNumbersLabe
.
text
=
[
NSString
stringWithFormat
:
@"%d"
,
_model
.
goodsNum
];
self
.
productPriceLabe
.
text
=
[
_model
.
goods
.
costPrice
stringValue
]
;
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%ld"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
_model
.
goods
.
costPrice
integerValue
]];
;
}
#pragma mark -增加或者减少商品
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
d7b136f4
...
...
@@ -11,6 +11,7 @@
#import "AppDelegate.h"
#import "GenerateOrdersViewController.h"
#import "ShopcarModel.h"
#import "AddressModel.h"
@interface
ShoppingViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
ChangeGoodsNumberDelegate
>
...
...
@@ -227,9 +228,11 @@
[
self
ErrorMBProgressView
:
@"没有选中任何商品"
];
return
;
}
//占位
ShopcarModel
*
ZhanweiModel
=
[[
ShopcarModel
alloc
]
init
];
//商品总信息占位
ShopcarModel
*
ZhanweiModel
=
[[
ShopcarModel
alloc
]
init
];
[
array
addObject
:
ZhanweiModel
];
GenerateOrdersViewController
*
generateOrder
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"generateorders"
];
generateOrder
.
settlementGoodsdatas
=
array
;
//清除已经生成订单的商品
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
d7b136f4
This diff is collapsed.
Click to expand it.
Lighting/Tools/Customermanager.h
View file @
d7b136f4
...
...
@@ -35,9 +35,9 @@
@property
(
nonatomic
,
copy
)
NSString
*
customerPhoneNumber
;
/**
* 客户公司
地址
* 客户公司
名字
*/
@property
(
nonatomic
,
copy
)
NSString
*
company
Address
;
@property
(
nonatomic
,
copy
)
NSString
*
company
Name
;
/**
* 客户地址
...
...
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