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
f988f954
Commit
f988f954
authored
Jul 02, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
33
parent
5caefc91
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
241 additions
and
72 deletions
+241
-72
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+4
-4
GeliBusinessPlatform/Interface/Interface_Z.plist
GeliBusinessPlatform/Interface/Interface_Z.plist
+8
-0
GeliBusinessPlatform/Model/CustomerInterface.swift
GeliBusinessPlatform/Model/CustomerInterface.swift
+1
-1
GeliBusinessPlatform/Model/UpDataModel.swift
GeliBusinessPlatform/Model/UpDataModel.swift
+1
-1
GeliBusinessPlatform/Model/agentList_interface.swift
GeliBusinessPlatform/Model/agentList_interface.swift
+72
-0
GeliBusinessPlatform/Model/agentList_model/agentList_model.swift
...inessPlatform/Model/agentList_model/agentList_model.swift
+24
-1
GeliBusinessPlatform/Other/HGImage/HGImagePickerController.swift
...inessPlatform/Other/HGImage/HGImagePickerController.swift
+2
-4
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
...ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
+8
-0
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+4
-0
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
...nessPlatform/ViewController/地址管理/DZGLViewController.swift
+96
-54
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
...form/ViewController/地址管理/XinZengDiZhiViewController.swift
+0
-0
GeliBusinessPlatform/ViewController/客户管理/KeHuListViewController.swift
...Platform/ViewController/客户管理/KeHuListViewController.swift
+3
-0
GeliBusinessPlatform/ViewController/客户管理/XinZengAndBianJiKeHuViewController.swift
...wController/客户管理/XinZengAndBianJiKeHuViewController.swift
+16
-5
GeliBusinessPlatform/ViewController/打印订单/print_bottom_cell.xib
...usinessPlatform/ViewController/打印订单/print_bottom_cell.xib
+2
-2
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f988f954
No preview for this file type
GeliBusinessPlatform/Define/Define.swift
View file @
f988f954
...
...
@@ -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
//视图常量
...
...
GeliBusinessPlatform/Interface/Interface_Z.plist
View file @
f988f954
...
...
@@ -420,5 +420,13 @@
<string>
Distribution/delDbtListInfo
</string>
<key>
设置商品参与分销
</key>
<string>
Distribution/dbtSetDbtGoods
</string>
<key>
修改客户收货地址
</key>
<string>
Customer/saveShippingAddress
</string>
<key>
新增客户收货地址
</key>
<string>
Customer/newShippingAddress
</string>
<key>
删除客户地址
</key>
<string>
Customer/deleteCusAdd
</string>
<key>
特殊客户地址查询
</key>
<string>
Customer/getAddrsInfoCaddr
</string>
</dict>
</plist>
GeliBusinessPlatform/Model/CustomerInterface.swift
View file @
f988f954
...
...
@@ -52,7 +52,7 @@ cus_name 客户名
phone 联系电话
user_id 绑定用户的用户id
discounts_rate 优惠率,使用时除100
address_id 新增地址时返回的address_id,多个就用英文逗号隔开的字符串。新增客户时新增了地址就必传
*/
func
cusAdd
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"新增客户"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
...
...
GeliBusinessPlatform/Model/UpDataModel.swift
View file @
f988f954
...
...
@@ -8,7 +8,7 @@
import
Foundation
import
ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,供应商新增代理商(批量和单个新增代理商),终止与代理商合作,给代理商设置分销商品,商品上下架,供应商取消商品分销,上下架(设置分销商品给分销商),代理商终止与供应商合作,代理商的铺货或分销设置,取消分销,代理商设置分销商品上下架商品,代理商终止合作,分销商新增代理商,删除下游店长,新增店铺,上下架,上游商品上下架,上游取消分销,设置商品参与分销,
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,供应商新增代理商(批量和单个新增代理商),终止与代理商合作,给代理商设置分销商品,商品上下架,供应商取消商品分销,上下架(设置分销商品给分销商),代理商终止与供应商合作,代理商的铺货或分销设置,取消分销,代理商设置分销商品上下架商品,代理商终止合作,分销商新增代理商,删除下游店长,新增店铺,上下架,上游商品上下架,上游取消分销,设置商品参与分销,
修改客户收货地址,删除客户地址,
class
UpDataModel
:
Mappable
{
...
...
GeliBusinessPlatform/Model/agentList_interface.swift
View file @
f988f954
...
...
@@ -483,3 +483,75 @@ func dbtSetDbtGoods(_ params:[String:Any],success:@escaping (_ res:Any)->(),fail
failture
(
error
)
}
}
//MARK:-- 修改客户收货地址
/*
user_token 1 string 验证token 必填
cus_id 1 int 客户id 必填
consignee 1 string 收货人的名字 必填
province 1 int 省份 必填
city 1 int 城市 必填
district 1 int 地区 必填
street 0 int 街道 非必填
address 1 string 详细地址 必填
mobile 1 int 手机 必填
is_default 1 int 是否为默认收货地址:1默认 0非默认 必填
*/
func
saveShippingAddress
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"修改客户收货地址"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
//MARK:-- 删除客户地址
/*
user_token 1 string 验证token 必填
caddr_id 1 int 客户地址id(getAddrsInfo接口有返回) 必填
*/
func
deleteCusAdd
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"删除客户地址"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
//MARK:-- 新增客户收货地址
/*
user_token 1 string 验证token 必填
cus_id 0 int 客户id【注:只有在新增客户时先新增了地址才可以不传,新增客户时把返回的address_id英文逗号拼接返回。其他有客户的情况下必填】 非必填
consignee 1 string 收货人的名字 必填
province 1 int 省份 必填
city 1 int 城市 必填
district 1 int 地区 必填
street 0 int 街道 非必填
address 1 string 详细地址 必填
mobile 1 int 手机 必填
is_default 1 int 是否为默认收货地址:1默认 0非默认 必填
*/
func
newShippingAddress
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"新增客户收货地址"
,
params
,
{
(
rep
:
DataResponse
<
newShippingAddress_model
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
//MARK:-- 特殊客户地址查询
/*
user_token 1 string 验证token 必填
caddr_id 1 string caddr_id就是接口【saveShippingAddress】返回的address_id,用英文逗号隔开 必填
*/
func
getAddrsInfoCaddr
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"特殊客户地址查询"
,
params
,
{
(
rep
:
DataResponse
<
GetAddrsInfoModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
GeliBusinessPlatform/Model/agentList_model/agentList_model.swift
View file @
f988f954
...
...
@@ -8,7 +8,30 @@
import
Foundation
import
ObjectMapper
//MARK: - 新增客户收货地址
class
newShippingAddress_model
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
newShippingAddress_data_model
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
newShippingAddress_data_model
:
Mappable
{
var
address_id
:
String
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
address_id
<-
map
[
"address_id"
]
}
}
//MARK: - 代理商下拉框列表查询(查询合作着的代理商)
class
ageConList_model
:
Mappable
{
var
code
:
Int
?
...
...
GeliBusinessPlatform/Other/HGImage/HGImagePickerController.swift
View file @
f988f954
...
...
@@ -37,7 +37,7 @@ class HGImagePickerController: UIViewController {
let
userCollections
=
PHCollectionList
.
fetchTopLevelUserCollections
(
with
:
nil
)
self
.
convertCollection
(
collection
:
userCollections
as!
PHFetchResult
<
PHAssetCollection
>
)
//相册按包含的照片数量排序(降序)
self
.
items
.
sort
{
(
item1
,
item2
)
->
Bool
in
return
item1
.
fetchResult
.
count
>
item2
.
fetchResult
.
count
...
...
@@ -45,9 +45,7 @@ class HGImagePickerController: UIViewController {
//异步加载表格数据,需要在主线程中调用reloadData() 方法
DispatchQueue
.
main
.
async
{
self
.
tableView
?
.
reloadData
()
//首次进来后直接进入第一个相册图片展示页面(相机胶卷)
self
.
tableView
?
.
reloadData
()
//首次进来后直接进入第一个相册图片展示页面(相机胶卷)
if
let
imageCollectionVC
=
self
.
storyboard
?
.
instantiateViewController
(
withIdentifier
:
"hgImageCollectionVC"
)
as?
HGImageCollectionViewController
{
...
...
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
View file @
f988f954
...
...
@@ -16,6 +16,14 @@ import IQKeyboardManagerSwift
class
XiaYunDanViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
JiTuoWuXinXiViewDelegate
,
JiPaiFangShiViewControllerDelegate
,
ZengZhiServicesViewControllerDelegate
,
AdressSelectCellDelegate
,
DZGLViewControllerDelegate
,
XinZengDiZhiViewControllerDelegate
,
TitleAndTFBtnCellDelegate
,
WenDuCellDelegate
,
LogisticalSelectViewDelegate
,
UIPickerViewDataSource
,
UIPickerViewDelegate
,
GLAlertSelectViewDelegate
,
CLLocationManagerDelegate
,
CityListViewControllerDelegate
,
ToAndFormSelectViewControllerDelegate
,
WayBillAddressCanDelItemCellDelegate
,
HLLTopCellDelegate
,
OtherDemandViewControllerDelegate
,
OnlyViewCellDelegate
,
XiaDanUserInfoViewControllerDelegate
,
P_P_H_Time_Select_View_Delegate
,
P_P_H_Adr_VC_Delegate
,
Suc_LOG_Cell_Delegate
,
PaymentViewDelegate
{
func
DZGLViewController_adr
(
adr_id
:
String
)
{
//此处无用
}
func
XinZengDiZhiViewControllerFinishAction_kehu
(
adr_id
:
String
)
{
//此处无用
}
func
PaymentViewClose
()
{
paymentView
?
.
removeFromSuperview
()
paymentView
=
nil
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
f988f954
...
...
@@ -10,6 +10,10 @@ import UIKit
import
IQKeyboardManagerSwift
class
DaiKeXiaDanGouWuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
DaiKeXiaDanFooterViewDelegate
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
DZGLViewControllerDelegate
,
XuanZeShangPinViewControllerDelegate
,
DaiKeXiaDanGouWuCellDelegate
,
GuanLianKehuVCDelegate
,
XiuGaiYuShouJiaViewControllerDelegate
,
TitleAndTFCellDelegate
,
GeliAlertViewDelegate
,
UITextFieldDelegate
{
func
DZGLViewController_adr
(
adr_id
:
String
)
{
//此处无用
}
func
DaiKeXiaDanGouWuCell_select_pi_ci
(
cell
:
DaiKeXiaDanGouWuCell
)
{
print
(
"选择批次2"
)
}
...
...
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
View file @
f988f954
...
...
@@ -11,8 +11,24 @@ import SwipeCellKit
import
LGButton
protocol
DZGLViewControllerDelegate
{
func
DZGLViewControllerSelect
(
data
:
GetAddrsInfoDataModel
)
func
DZGLViewController_adr
(
adr_id
:
String
)
}
class
DZGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
SwipeTableViewCellDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
XinZengDiZhiViewControllerDelegate
,
GeliAlertViewDelegate
{
func
XinZengDiZhiViewControllerFinishAction_kehu
(
adr_id
:
String
)
{
if
adr_id
.
count
>
0
{
address_id_arr
.
append
(
adr_id
)
if
address_id_arr
.
count
>
1
{
delegate
?
.
DZGLViewController_adr
(
adr_id
:
address_id_arr
.
joined
(
separator
:
","
))
}
else
{
delegate
?
.
DZGLViewController_adr
(
adr_id
:
adr_id
)
}
}
listView
.
mj_header
?
.
beginRefreshing
()
}
@IBOutlet
weak
var
holder_view
:
UIView
!
var
is_keHu_list
=
false
var
kehu_adrArr
:
Array
<
GetAddrsInfoDataModel
>
=
[]
...
...
@@ -89,7 +105,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
var
selectIdx
:
IndexPath
?
var
adrInfo
:
GetAddrsInfoModel
?
var
isSelectlogAddress
=
false
var
address_id_arr
:
Array
<
String
>
=
[]
//列表
var
adrArrs
:
Array
<
AddressListDataModel
>
=
[]
@IBOutlet
weak
var
searchBg
:
UIView
!
...
...
@@ -129,43 +145,27 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
}
}
else
{
if
cus_id
!=
nil
{
HUD
.
flash
(
.
progress
)
searchBgH
.
constant
=
0
getAddrsInfo
([
"user_token"
:
UserToken
as
Any
,
"cus_id"
:
cus_id
as
Any
],
success
:
{
(
data
)
in
self
.
adrInfo
=
(
data
as!
GetAddrsInfoModel
)
if
self
.
adrInfo
?
.
data
?
.
count
==
0
{
self
.
holder_view
.
isHidden
=
false
}
self
.
listView
.
reloadData
()
HUD
.
hide
()
})
{
(
error
)
in
}
}
else
{
//searchbar
let
searchBr
=
SearchBarView
.
init
()
self
.
searchBg
.
addSubview
(
searchBr
)
searchBr
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
35
)
}
searchV
=
searchBr
searchBr
.
placeholderStr
=
"请输入收货人地址"
searchBr
.
cornerRadius
=
35
/
2.0
searchBr
.
delegate
=
self
searchBr
.
delegateL
=
self
navbar
.
rightTitle
=
"新增"
searchBgH
.
constant
=
45
//下拉刷新相关设置
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadData
)
)
self
.
listView
!.
mj_header
=
headerMJ
self
.
listView
.
mj_header
?
.
beginRefreshing
()
//searchbar
let
searchBr
=
SearchBarView
.
init
()
self
.
searchBg
.
addSubview
(
searchBr
)
searchBr
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
35
)
}
searchV
=
searchBr
searchBr
.
placeholderStr
=
"请输入收货人地址"
searchBr
.
cornerRadius
=
35
/
2.0
searchBr
.
delegate
=
self
searchBr
.
delegateL
=
self
navbar
.
rightTitle
=
"新增"
searchBgH
.
constant
=
45
//下拉刷新相关设置
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadData
)
)
self
.
listView
!.
mj_header
=
headerMJ
self
.
listView
.
mj_header
?
.
beginRefreshing
()
}
listView
.
separatorStyle
=
.
none
...
...
@@ -191,11 +191,48 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
listView
.
estimatedRowHeight
=
49
listView
.
rowHeight
=
UITableView
.
automaticDimension
// Do any additional setup after loading the view.
}
@objc
func
loadData
(){
if
is_keHu_list
{
if
cus_id
!=
nil
{
getAddrsInfo
([
"user_token"
:
UserToken
as
Any
,
"cus_id"
:
cus_id
as
Any
],
success
:
{
(
data
)
in
self
.
adrInfo
=
(
data
as!
GetAddrsInfoModel
)
self
.
kehu_adrArr
.
removeAll
()
if
self
.
adrInfo
?
.
data
?
.
count
==
0
{
self
.
holder_view
.
isHidden
=
false
}
else
{
self
.
holder_view
.
isHidden
=
true
self
.
adrInfo
?
.
data
?
.
forEach
({
item
in
self
.
kehu_adrArr
.
append
(
item
)
})
}
self
.
listView
.
reloadData
()
self
.
listView
.
mj_header
?
.
endRefreshing
()
})
{
(
error
)
in
self
.
listView
.
mj_header
?
.
endRefreshing
()
}
}
else
{
getAddrsInfoCaddr
([
"user_token"
:
UserToken
as
Any
,
"caddr_id"
:
address_id_arr
.
joined
(
separator
:
","
)
as
Any
])
{
data
in
self
.
adrInfo
=
(
data
as!
GetAddrsInfoModel
)
self
.
kehu_adrArr
.
removeAll
()
if
self
.
adrInfo
?
.
data
?
.
count
==
0
{
self
.
holder_view
.
isHidden
=
false
}
else
{
self
.
holder_view
.
isHidden
=
true
self
.
adrInfo
?
.
data
?
.
forEach
({
item
in
self
.
kehu_adrArr
.
append
(
item
)
})
}
self
.
listView
.
reloadData
()
self
.
listView
.
mj_header
?
.
endRefreshing
()
}
failture
:
{
err
in
self
.
listView
.
mj_header
?
.
endRefreshing
()
}
}
return
}
adrArrs
.
removeAll
()
AddressList
([
"user_token"
:
UserToken
as
Any
,
"key_word"
:
keyWord
],
success
:
{
(
data
)
in
let
model
=
data
as!
AddressListModel
...
...
@@ -207,9 +244,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
self
.
adrArrs
.
append
(
item
)
})
}
print
(
"adrs == "
,
self
.
adrArrs
.
count
)
self
.
listView
.
reloadData
()
self
.
listView
.
mj_header
?
.
endRefreshing
()
})
{
(
data
)
in
self
.
listView
.
mj_header
?
.
endRefreshing
()
...
...
@@ -221,6 +256,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
let
vc
=
XinZengDiZhiViewController
()
vc
.
navTitle
=
"新增地址"
vc
.
delegate
=
self
vc
.
is_keHu_list
=
is_keHu_list
if
cus_id
!=
nil
{
vc
.
cus_id
=
cus_id
!
}
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
...
...
@@ -330,28 +369,31 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
if
kehu_adrArr
.
count
>
0
{
let
model
=
kehu_adrArr
[
indexPath
.
row
]
let
vc
=
XinZengDiZhiViewController
()
vc
.
is_keHu_list
=
true
vc
.
cus_id
=
cus_id
!
vc
.
caddr_id
=
model
.
caddr_id
!
vc
.
delegate
=
self
vc
.
navTitle
=
"编辑地址"
vc
.
provinceIndex
=
model
.
province
!
vc
.
cityIndex
=
model
.
city
!
vc
.
areaIndex
=
model
.
district
!
// vc.address_id = model.address_id!
// vc.address_id = model.address_id!
vc
.
adrStr
=
model
.
address
!
vc
.
nameStr
=
model
.
consignee
!
vc
.
phone
=
model
.
mobile
!
// vc.tel = model.tel!
// vc.zip = model.zipcode!
vc
.
is_send_default
=
false
// vc.pcdStr = model.province_cn!
// if model.city_cn != nil {
// vc.pcdStr = model.province_cn! + "-" + model.city_cn!
// if model.district_cn != nil {
// vc.pcdStr = model.province_cn! + "-" + model.city_cn! + "-" + model.district_cn!
// }
// }
// if model.is_send_default == 1 {
// vc.is_send_default = true
// }
if
model
.
province_cn
!=
nil
{
vc
.
pcdStr
=
model
.
province_cn
!
if
model
.
city_cn
!=
nil
{
vc
.
pcdStr
=
model
.
province_cn
!
+
"-"
+
model
.
city_cn
!
if
model
.
district_cn
!=
nil
{
vc
.
pcdStr
=
model
.
province_cn
!
+
"-"
+
model
.
city_cn
!
+
"-"
+
model
.
district_cn
!
}
}
}
//if model.is_send_default == 1 {
// vc.is_send_default = true
//}
vc
.
is_default
=
false
if
model
.
is_default
==
1
{
vc
.
is_default
=
true
...
...
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
View file @
f988f954
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/客户管理/KeHuListViewController.swift
View file @
f988f954
...
...
@@ -236,7 +236,9 @@ class KeHuListViewController: BaseViewController,UITableViewDelegate,UITableView
@IBAction
func
addAction
(
_
sender
:
Any
)
{
let
vc
=
XinZengAndBianJiKeHuViewController
()
vc
.
titleStr
=
"新增客户"
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
//MARK: - 自定义delegate
...
...
@@ -246,6 +248,7 @@ class KeHuListViewController: BaseViewController,UITableViewDelegate,UITableView
vc
.
titleStr
=
"编辑客户"
vc
.
delegate
=
self
vc
.
cus_id
=
model
.
cus_id
!
if
model
.
company
!=
nil
{
vc
.
companyName
=
model
.
company
!
}
...
...
GeliBusinessPlatform/ViewController/客户管理/XinZengAndBianJiKeHuViewController.swift
View file @
f988f954
...
...
@@ -11,11 +11,20 @@ import LGButton
protocol
XinZengAndBianJiKeHuViewControllerDelegate
{
func
XinZengAndBianJiKeHuViewControllerFinish
()
}
class
XinZengAndBianJiKeHuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
BingDingKeHuViewControllerDelegate
,
GLAlertSelectViewDelegate
,
UITextFieldDelegate
,
GeliAlertViewDelegate
{
class
XinZengAndBianJiKeHuViewController
:
BaseViewController
,
UITableViewDataSource
,
UITableViewDelegate
,
BingDingKeHuViewControllerDelegate
,
GLAlertSelectViewDelegate
,
UITextFieldDelegate
,
GeliAlertViewDelegate
,
DZGLViewControllerDelegate
{
func
DZGLViewControllerSelect
(
data
:
GetAddrsInfoDataModel
)
{
//此处无用
}
func
DZGLViewController_adr
(
adr_id
:
String
)
{
address_id
=
adr_id
print
(
"abc = "
,
address_id
)
}
var
delegate
:
XinZengAndBianJiKeHuViewControllerDelegate
?
var
cus_id
:
Int
?
var
user_id
:
Int
?
var
address_id
=
""
func
rightBtnClick
()
{
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
...
...
@@ -55,6 +64,7 @@ class XinZengAndBianJiKeHuViewController: BaseViewController,UITableViewDataSour
"discounts_rate"
:
discount
as
Any
]
if
cus_id
==
nil
{
dict
[
"address_id"
]
=
address_id
cusAdd
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"提交成功"
),
delay
:
1.2
)
...
...
@@ -63,10 +73,8 @@ class XinZengAndBianJiKeHuViewController: BaseViewController,UITableViewDataSour
})
{
(
err
)
in
}
print
(
"add == "
,
dict
)
}
else
{
dict
[
"cus_id"
]
=
cus_id
print
(
"edit == "
,
dict
)
cusEdit
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"编辑成功"
),
delay
:
1.2
)
...
...
@@ -188,7 +196,10 @@ class XinZengAndBianJiKeHuViewController: BaseViewController,UITableViewDataSour
if
indexPath
.
row
==
6
{
let
vc
=
DZGLViewController
()
vc
.
is_keHu_list
=
true
vc
.
kehu_adrArr
=
adrArr
// vc.kehu_adrArr = adrArr
vc
.
cus_id
=
cus_id
print
(
"vc.cus = "
,
vc
.
cus_id
)
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
if
indexPath
.
row
==
3
{
...
...
GeliBusinessPlatform/ViewController/打印订单/print_bottom_cell.xib
View file @
f988f954
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
7701
"
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
8122
"
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=
"1
770
3"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
809
3"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
...
...
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