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
7d7f62de
Commit
7d7f62de
authored
Jun 13, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充采购撤销入库逻辑
parent
8c349793
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
122 additions
and
111 deletions
+122
-111
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
+4
-4
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
+3
-3
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
...latform/ViewController/仓库管理/WarehoseMangementListVC.swift
+6
-5
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.swift
...Platform/ViewController/供应商管理/GYSListViewController.swift
+3
-2
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
+6
-5
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
+5
-4
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
...inessPlatform/ViewController/商品管理/GoodsManageListVC.swift
+5
-5
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+8
-9
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+4
-4
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
...nessPlatform/ViewController/地址管理/DZGLViewController.swift
+4
-4
GeliBusinessPlatform/ViewController/换绑支付账号(绑定,换绑)/BindViewController.swift
...orm/ViewController/换绑支付账号(绑定,换绑)/BindViewController.swift
+4
-3
GeliBusinessPlatform/ViewController/支付账号(设置,修改)/PayViewController.swift
...atform/ViewController/支付账号(设置,修改)/PayViewController.swift
+6
-6
GeliBusinessPlatform/ViewController/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
...ontroller/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
+4
-3
GeliBusinessPlatform/ViewController/消息中心/MsgCenterViewController.swift
...latform/ViewController/消息中心/MsgCenterViewController.swift
+3
-3
GeliBusinessPlatform/ViewController/订单列表/OrderListVC.swift
GeliBusinessPlatform/ViewController/订单列表/OrderListVC.swift
+5
-5
GeliBusinessPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
...essPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
+4
-3
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+11
-10
GeliBusinessPlatform/ViewController/采购单列表/CGDListVC.swift
GeliBusinessPlatform/ViewController/采购单列表/CGDListVC.swift
+37
-33
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
7d7f62de
No preview for this file type
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
View file @
7d7f62de
...
...
@@ -10,7 +10,7 @@ import UIKit
import
LGButton
class
NewRKVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
NewOnlyRKCellDelegate
,
NewSelectItemVcDelegate
,
NewSelectWarehouseVCDelegate
,
GLAlertSelectViewDelegate
,
GeliAlertTextViewDelegate
,
ShowTimeSelectViewDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
//MARK: - 提交申请
func
sureGeliAlertTextViewAction
(
sender
:
String
)
{
if
isGm
{
...
...
@@ -21,7 +21,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
HUD
.
show
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
lgBtnTitLbl
.
text
==
"提交申请"
{
var
goodsInfoArr
:
Array
<
Any
>
?
=
[]
...
...
@@ -208,7 +208,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
listView
.
register
(
UINib
(
nibName
:
"CRKBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"CRKBtnCell"
)
listView
.
register
(
UINib
(
nibName
:
"NewOnlyRKCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"NewOnlyRKCell"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
HUD
.
flash
(
.
progress
)
listView
.
isHidden
=
true
...
...
@@ -345,7 +345,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
}
else
{
//待
if
w_id
!=
nil
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
WarehouseDetail
([
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
],
success
:
{
(
data
)
in
let
model
=
data
as!
ShopWarehouseDetailModel
model
.
data
?
.
position_res
?
.
forEach
({
(
item
)
in
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
View file @
7d7f62de
...
...
@@ -10,7 +10,7 @@ import UIKit
import
LGButton
class
NewCKVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CKNonGmCellDelegate
,
CKGmCellDelegate
,
PiCiXuanZeViewControllerDelegate
,
GLAlertSelectViewDelegate
,
NewSelectItemVcDelegate
,
GeliAlertTextViewDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
gmNumber
:
Int
?
var
piCiArr
:
Array
<
Array
<
GetGoodBatchDataModel
>>
?
=
[]
...
...
@@ -64,7 +64,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
}
func
sureGeliAlertTextViewAction
(
sender
:
String
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
isGm
{
//直接出库
HUD
.
show
(
.
progress
)
if
sender
.
count
==
0
{
...
...
@@ -185,7 +185,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
holderArr
.
insert
(
getTimeNow
(),
at
:
1
)
holderArr
.
remove
(
at
:
2
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
self
.
listView
.
isHidden
=
true
self
.
btmLbl
.
isHidden
=
true
self
.
btmBtn
.
isHidden
=
true
...
...
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
View file @
7d7f62de
...
...
@@ -17,6 +17,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
tableV
.
mj_header
?
.
beginRefreshing
()
}
var
delegate
:
WarehoseMangementListVCDelegate
?
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
@IBOutlet
weak
var
topBgView
:
UIView
!
weak
var
searchV
:
SearchBarView
?
=
nil
@IBOutlet
weak
var
contentView
:
UIView
!
...
...
@@ -71,7 +72,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
print
(
"加载数据"
)
isUpData
=
true
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
,
"page"
:
page
]
warehouseList
(
dict
,
success
:
{
(
data
)
in
self
.
warehourseArr
.
removeAll
()
...
...
@@ -97,7 +98,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
,
"page"
:
page
]
warehouseList
(
dict
,
success
:
{
(
data
)
in
...
...
@@ -230,7 +231,7 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
if
isSelectWarehouse
{
let
model
=
warehourseArr
[
indexPath
.
row
]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
WarehouseDetail
([
"user_token"
:
UserToken
as
Any
,
"w_id"
:
model
.
w_id
as
Any
],
success
:
{
(
data
)
in
var
arr
:
Array
<
ShopWarehouseDetailDataPositionModel
>
=
[]
let
mo
=
data
as!
ShopWarehouseDetailModel
...
...
@@ -274,9 +275,9 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
let
deleteAction
=
SwipeAction
(
style
:
.
destructive
,
title
:
nil
)
{
action
,
indexPath
in
//将对应条目的数据删除
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
model
=
self
.
warehourseArr
[
indexPath
.
row
]
ShopWarehouseDel
([
"user_token"
:
UserToken
,
"w_id"
:
model
.
w_id
],
success
:
{
(
data
)
in
ShopWarehouseDel
([
"user_token"
:
self
.
UserToken
as
Any
,
"w_id"
:
model
.
w_id
as
Any
],
success
:
{
(
data
)
in
self
.
warehourseArr
.
remove
(
at
:
indexPath
.
row
)
tableView
.
reloadData
()
})
{
(
error
)
in
...
...
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.swift
View file @
7d7f62de
...
...
@@ -21,10 +21,11 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
var
keyWord
=
""
var
page
=
0
var
datas
:
Array
<
VendorListDataModel
>
=
[]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
@objc
func
loadData
(){
print
(
"加载数据"
)
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
as
Any
,
...
...
@@ -51,7 +52,7 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
//MARK:--加载更多数据
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyWord
as
Any
,
...
...
GeliBusinessPlatform/ViewController/出入库记录/CRKListVC.swift
View file @
7d7f62de
...
...
@@ -10,9 +10,10 @@ import UIKit
import
ViewAnimator
//cell动效
class
CRKListVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
CRKCellDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
CRKXiangQVCDelegate
,
MoreAndTimeSelectViewDelegate
,
GeliAlertTextViewDelegate
,
GeliAlertViewDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
//MARK: - 出入库列表 iog_id
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
data
=
datas
!
[
selectIdx
!
]
var
goodInfoArr
:
Array
<
Any
>
=
[]
...
...
@@ -273,7 +274,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
var
auth
:
Array
<
String
>
=
[]
@objc
func
loadData
(){
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"status"
:
status
as
Any
,
"page"
:
page
as
Any
,
"io_type"
:
io_type
as
Any
,
"i_type"
:
i_type
as
Any
,
"o_type"
:
o_type
as
Any
,
"start_time"
:
start_time
as
Any
,
"end_time"
:
end_time
as
Any
,
"keyword"
:
keyword
as
Any
]
WarehouseIoList
(
dic
,
success
:
{
(
data
)
in
...
...
@@ -312,7 +313,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
print
(
"page = "
,
page
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"status"
:
status
as
Any
,
"page"
:
page
as
Any
,
"io_type"
:
io_type
as
Any
,
"i_type"
:
i_type
as
Any
,
"o_type"
:
o_type
as
Any
,
"start_time"
:
start_time
as
Any
,
"end_time"
:
end_time
as
Any
,
"keyword"
:
keyword
as
Any
]
WarehouseIoList
(
dic
,
success
:
{
(
data
)
in
...
...
@@ -344,7 +345,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
HUD
.
flash
(
.
label
(
"请填写备注"
),
delay
:
1.2
)
return
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
isPass
{
//通过
let
data
=
datas
!
[
selectIdx
!
]
...
...
@@ -435,7 +436,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
if
model
.
io_type
==
1
&&
auth
.
contains
(
"122"
){
//入库
vc
.
isGm
=
true
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
InputInitInfo
([
"user_token"
:
UserToken
as
Any
,
"goods_id"
:
model
.
goods_res
?
.
first
?
.
goods_id
as
Any
],
success
:
{
(
data
)
in
let
model
=
data
as!
InputInitInfoModel
model
.
data
?
.
warehouse_res
?
.
forEach
({
(
item
)
in
...
...
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
View file @
7d7f62de
...
...
@@ -15,10 +15,11 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
var
p_id
:
Int
?
var
w_name
:
String
?
var
p_name
:
String
?
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
//MARK: - 出入库列表 iog_id
...
...
@@ -98,7 +99,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"io_id"
:
model
?
.
io_id
as
Any
]
let
strs
=
model
!.
io_type_cn
?
.
components
(
separatedBy
:
":"
)
let
str
=
strs
?
.
last
!
as!
String
...
...
@@ -292,7 +293,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
return
}
if
sender
.
count
>
0
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
isFailAction
{
//不通过
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
...
...
@@ -393,7 +394,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
}
}
else
{
if
w_id
!=
nil
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
WarehouseDetail
([
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
],
success
:
{
(
data
)
in
let
mo
=
data
as!
ShopWarehouseDetailModel
...
...
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
View file @
7d7f62de
...
...
@@ -11,7 +11,7 @@ import ViewAnimator
class
GoodsManageListVC
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
HeaderSelectViewDelegate
,
SelectContentViewDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
GoodsCollectionViewCellDelegate
,
ProductDetailViewControllerDelegate
,
GeliAlertViewDelegate
,
EPViewControllerDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
collection
:
UICollectionView
?
=
nil
var
layout
=
UICollectionViewFlowLayout
()
...
...
@@ -128,7 +128,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
page
=
pageNum
}
getSortData
()
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
goodsList
([
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
,
"goods_type"
:
goodsType
,
"sort"
:
sort
,
"is_show"
:
isShow
,
"page"
:
page
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
GoodsListModel
...
...
@@ -175,7 +175,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
page
=
pageNum
}
getSortData
()
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
goodsList
([
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
,
"goods_type"
:
goodsType
,
"sort"
:
sort
,
"is_show"
:
isShow
,
"page"
:
page
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
GoodsListModel
...
...
@@ -463,7 +463,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
//MARK:-- cell delegate 上下架,入库
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
changeGoodsResModel
!.
goods_id
as
Any
,
"value"
:
0
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
@@ -476,7 +476,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
}
else
if
sender
.
tag
==
1002
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
changeGoodsResModel
!.
goods_id
as
Any
,
"value"
:
1
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
7d7f62de
...
...
@@ -17,7 +17,7 @@ protocol EPViewControllerDelegate {
}
class
EPViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
,
TitleAndTFCellDelegate
,
YuShouWeiKuanFaHuoCellDelegate
,
UITextFieldDelegate
,
ShowTimeSelectViewDelegate
,
LMNoteViewControllerDelegate
,
GeliAlertViewDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
delegate
:
EPViewControllerDelegate
?
@IBOutlet
weak
var
btmColor
:
UIView
!
...
...
@@ -108,7 +108,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
return
}
if
sender
.
tag
==
1001
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
GeneralInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
self
.
generalInfoModel
=
(
data
as!
GeneralInfoModel
)
...
...
@@ -136,8 +136,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
else
if
sender
.
tag
==
1002
{
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
goods_type
=
""
for
i
in
1
..<
itemTypeArr
!.
count
{
let
num
=
itemTypeArr
!
[
i
]
...
...
@@ -247,7 +246,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
else
if
sender
.
tag
==
1003
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
goods_id
as
Any
,
"value"
:
1
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
@@ -263,7 +262,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
else
if
sender
.
tag
==
1004
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"15"
,
"prval"
:
goods_id
as
Any
,
"value"
:
0
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
@@ -276,7 +275,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
else
if
sender
.
tag
==
1005
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"16"
,
"prval"
:
goods_id
as
Any
,
"value"
:
1
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
@@ -437,7 +436,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
func
loadData
()
{
//MARK:--新增商品和编辑商品所需要的基本信息(无)就页面不正常显示
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
goodsDetail
([
"user_token"
:
UserToken
,
"goods_id"
:
goods_id
],
success
:
{
(
data
)
in
//MARK: - 获取详情
self
.
listTbv
.
isHidden
=
false
...
...
@@ -1217,7 +1216,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var
original_img
:
String
?
=
""
//商品封面图
var
goods_banner
:
Array
<
String
>
?
=
[
""
,
""
,
""
,
""
,
""
]
//商品副图,多张,最多5张,使用一维数组转json格式
func
uploadImg
(
imge
:
UIImage
,
isOriginal
:
Bool
,
tag
:
Int
){
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
upLoadImg
=
imge
as!
UIImage
HUD
.
show
(
.
progress
)
saveFile
(
image
:
upLoadImg
,
[
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
7d7f62de
...
...
@@ -18,7 +18,7 @@ protocol ProductDetailViewControllerDelegate {
}
class
ProductDetailViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndBtnCellDelegate
,
GLAlertSelectViewDelegate
,
GoodsClassViewControllerDelegate
,
PinPaiListViewControllerDelegate
,
AddImgCellDelegate
,
AddGuiGeCellDelegate
,
CreatNewSpecsViewControllerDelegate
,
ShangPinGguiGeCellDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
,
TitleAndSwitchCellDelegate
,
TitleAndTFCellDelegate
,
YuShouWeiKuanFaHuoCellDelegate
,
UITextFieldDelegate
,
ShowTimeSelectViewDelegate
,
LMNoteViewControllerDelegate
,
GeliAlertViewDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
delegate
:
ProductDetailViewControllerDelegate
?
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
if
view
.
titleLbl
.
text
==
"请选择商品类型"
{
...
...
@@ -153,7 +153,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
goods_type
=
""
for
i
in
1
..<
itemTypeArr
!.
count
{
...
...
@@ -272,7 +272,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
HUD
.
flash
(
.
progress
)
//MARK:--新增商品和编辑商品所需要的基本信息(无)就页面不正常显示
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
GeneralInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
self
.
generalInfoModel
=
(
data
as!
GeneralInfoModel
)
...
...
@@ -789,7 +789,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var
original_img
:
String
?
=
""
//商品封面图
var
goods_banner
:
Array
<
String
>
?
=
[
""
,
""
,
""
,
""
,
""
]
//商品副图,多张,最多5张,使用一维数组转json格式
func
uploadImg
(
imge
:
UIImage
,
isOriginal
:
Bool
,
tag
:
Int
){
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
upLoadImg
=
imge
as!
UIImage
HUD
.
show
(
.
progress
)
saveFile
(
image
:
upLoadImg
,
[
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
...
...
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
View file @
7d7f62de
...
...
@@ -14,7 +14,7 @@ protocol DZGLViewControllerDelegate {
}
class
DZGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
SwipeTableViewCellDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
XinZengDiZhiViewControllerDelegate
,
GeliAlertViewDelegate
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
model
=
adrArrs
[
sender
.
tag
]
AddressDel
([
"user_token"
:
UserToken
as
Any
,
"address_id"
:
model
.
address_id
as
Any
],
success
:
{
(
data
)
in
self
.
listView
.
mj_header
?
.
beginRefreshing
()
...
...
@@ -23,7 +23,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
}
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
func
XinZengDiZhiViewControllerFinishAction
()
{
listView
.
mj_header
?
.
beginRefreshing
()
}
...
...
@@ -105,7 +105,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
self
.
view
.
addSubview
(
navbar
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
cus_id
!=
nil
{
HUD
.
flash
(
.
progress
)
searchBgH
.
constant
=
0
...
...
@@ -166,7 +166,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
}
@objc
func
loadData
(){
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
adrArrs
.
removeAll
()
AddressList
([
"user_token"
:
UserToken
as
Any
,
"key_word"
:
keyWord
],
success
:
{
(
data
)
in
let
model
=
data
as!
AddressListModel
...
...
GeliBusinessPlatform/ViewController/换绑支付账号(绑定,换绑)/BindViewController.swift
View file @
7d7f62de
...
...
@@ -39,11 +39,12 @@ class BindViewController: BaseViewController, GeliAlertViewDelegate {
}
//MARK: -绑定、获取验证码
//
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
@IBAction
func
registerPayAccountAction
(
_
sender
:
Any
)
{
print
(
"注册支付账号"
)
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
locationGeliPay
([
"user_token"
:
UserToken
as
Any
,
"type"
:
"3"
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
let
dataM
=
data
as!
LocationGeliPayModel
...
...
@@ -103,7 +104,7 @@ class BindViewController: BaseViewController, GeliAlertViewDelegate {
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1001
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
bindGeliPay
([
"user_token"
:
UserToken
as
Any
,
"geli_pay_user"
:
accountTF
.
text
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
GeliBusinessPlatform/ViewController/支付账号(设置,修改)/PayViewController.swift
View file @
7d7f62de
...
...
@@ -19,7 +19,7 @@ class PayViewController: BaseViewController ,GeliAlertViewDelegate{
@IBOutlet
weak
var
passBtn
:
UIButton
!
@IBOutlet
weak
var
accountLbl
:
UILabel
!
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
@IBOutlet
weak
var
userEnShowView
:
UIView
!
override
func
viewDidLoad
()
{
...
...
@@ -27,7 +27,7 @@ class PayViewController: BaseViewController ,GeliAlertViewDelegate{
navbar
.
title
=
"支付账号"
self
.
view
.
addSubview
(
navbar
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
HUD
.
flash
(
.
progress
)
geliPayInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
...
...
@@ -57,7 +57,7 @@ class PayViewController: BaseViewController ,GeliAlertViewDelegate{
@IBAction
func
bindAction
(
_
sender
:
Any
)
{
print
(
"换绑账号"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
getShopAdministratorInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
ShopAdministratorInfoModel
if
dataM
.
code
!=
2
{
...
...
@@ -72,7 +72,7 @@ class PayViewController: BaseViewController ,GeliAlertViewDelegate{
}
@IBAction
func
passwordAction
(
_
sender
:
UIButton
)
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
locationGeliPay
([
"user_token"
:
UserToken
as
Any
,
"type"
:
"2"
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
...
...
@@ -87,7 +87,7 @@ class PayViewController: BaseViewController ,GeliAlertViewDelegate{
@IBAction
func
enterInGLPayAction
(
_
sender
:
Any
)
{
print
(
"进入格利支付"
)
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
locationGeliPay
([
"user_token"
:
UserToken
as
Any
,
"type"
:
"1"
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
...
...
@@ -102,7 +102,7 @@ class PayViewController: BaseViewController ,GeliAlertViewDelegate{
@IBAction
func
enterBindAction
(
_
sender
:
UIButton
)
{
print
(
"未绑定--"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
getShopAdministratorInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
ShopAdministratorInfoModel
...
...
GeliBusinessPlatform/ViewController/新增、编辑(查看)仓库/CheckWareHourseViewController.swift
View file @
7d7f62de
...
...
@@ -19,6 +19,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
var
dataModel
:
ShopWarehouseDetailModel
?
var
w_id
:
Int
?
//仓库id
var
editIdx
:
Int
?
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
@IBOutlet
weak
var
btnTitleLbl
:
UILabel
!
@IBOutlet
weak
var
listView
:
UITableView
!
var
titleStr
:
String
?
...
...
@@ -72,7 +73,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
func
loadData
(){
//加载数据
if
w_id
!=
nil
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
WarehouseDetail
([
"user_token"
:
UserToken
as
Any
,
"w_id"
:
w_id
as
Any
],
success
:
{
(
data
)
in
let
dataModel
=
data
as!
ShopWarehouseDetailModel
// self.dataModel = dataModel
...
...
@@ -278,7 +279,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
sender
.
tag
==
1000
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
ShopWarehouseDel
([
"user_token"
:
UserToken
,
"w_id"
:
w_id
],
success
:
{
(
data
)
in
self
.
delegate
?
.
CheckWareHourseViewControllerRefresh
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
...
...
@@ -292,7 +293,7 @@ class CheckWareHourseViewController: BaseViewController,UITableViewDelegate,UITa
if
shiFouMoRen
==
true
{
num
=
1
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
titleStr
==
"新增仓库"
{
let
dict
=
[
"user_token"
:
UserToken
,
"w_name"
:
cangKuName
,
"w_type"
:(
warehourseType
!
+
1
),
"position_str"
:
kuWeiName
,
"w_address"
:
cangKuAdr
,
"volume"
:
rj
.
floatValue
,
"area"
:
mj
.
floatValue
,
"contact"
:
lianXiRen
,
"contact_number"
:
phone
,
"mail"
:
""
,
"is_default"
:
num
]
ShopWarehouseAdd
(
dict
,
success
:
{
(
data
)
in
...
...
GeliBusinessPlatform/ViewController/消息中心/MsgCenterViewController.swift
View file @
7d7f62de
...
...
@@ -49,11 +49,11 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
}
var
dataModelArr
:
Array
<
MessageListDataModel
>
=
[]
var
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
//加载数据
@objc
func
loadData
(){
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
messageList
([
"page"
:
page
as
Any
,
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
MessageListModel
self
.
dataModelArr
.
removeAll
()
...
...
@@ -83,7 +83,7 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
}
//加载更多数据
@objc
func
loadMoreData
()
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
messageList
([
"page"
:
page
as
Any
,
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
MessageListModel
if
dataM
.
data
?
.
count
==
0
{
...
...
GeliBusinessPlatform/ViewController/订单列表/OrderListVC.swift
View file @
7d7f62de
...
...
@@ -10,6 +10,8 @@ import UIKit
import
ViewAnimator
//cell动效
class
OrderListVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GeliAlertViewDelegate
,
OrderDViewControllerDelegate
,
CGDListCellDelegate
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
//MARK:--基础数据
var
keyword
:
String
=
""
var
startTime
:
Int
=
0
...
...
@@ -72,7 +74,6 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
print
(
"加载数据"
)
isUpData
=
true
page
=
1
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
dic
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
,
"page"
:
page
,
"order_status"
:
orderStatus
,
"pay_status"
:
payStatus
,
"order_source"
:
orderSource
,
"shipping_status"
:
shippingStatus
,
"start_time"
:
startTime
,
"end_time"
:
endTime
]
if
endTime
==
0
{
dic
.
removeValue
(
forKey
:
"end_time"
)
...
...
@@ -109,7 +110,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
dic
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
,
"page"
:
page
,
"order_status"
:
orderStatus
,
"pay_status"
:
payStatus
,
"order_source"
:
orderSource
,
"shipping_status"
:
shippingStatus
,
"start_time"
:
startTime
,
"end_time"
:
endTime
]
if
endTime
==
0
{
dic
.
removeValue
(
forKey
:
"end_time"
)
...
...
@@ -266,8 +267,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
}
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
if
isSrueOrder
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
orderConfirm
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
sender
.
tag
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"确认成功"
),
delay
:
1.2
)
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"orderChange"
),
object
:
nil
)
...
...
@@ -276,7 +276,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
}
}
else
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
orderCancel
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
sender
.
tag
as
Any
],
success
:
{
(
data
)
in
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"取消成功"
),
delay
:
1.2
)
...
...
GeliBusinessPlatform/ViewController/订单管理/关联客户/GuanLianKehuVC.swift
View file @
7d7f62de
...
...
@@ -17,7 +17,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
var
delegate
:
GuanLianKehuVCDelegate
?
@IBOutlet
weak
var
btnLblH
:
NSLayoutConstraint
!
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
@IBOutlet
weak
var
btn
:
LGButton
!
var
selectIdx
:
Int
?
=
nil
//暂代关联客户数据
...
...
@@ -36,10 +36,11 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
}
return
}
if
selectIdx
!=
nil
{
HUD
.
flash
(
.
progress
)
let
model
=
self
.
dataArr
[
self
.
selectIdx
!
]
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
bindCus
([
"cus_id"
:
model
.
cus_id
as
Any
,
"user_token"
:
UserToken
as
Any
,
"order_id"
:
order_id
as
Any
],
success
:
{
(
data
)
in
...
...
@@ -74,7 +75,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
var
dataArr
:
Array
<
CusListAllDataModel
>
=
[]
//MARK:--加载数据
@objc
func
loadData
()
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
cusListAll
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
self
.
dataArr
.
removeAll
()
let
dataM
=
data
as!
CusListAllModel
...
...
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
7d7f62de
...
...
@@ -70,9 +70,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
//MARK:--加载数据
var
dataMdoel
:
OrderDetailDataModel
?
=
nil
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
func
loadData
()
{
HUD
.
flash
(
.
progress
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
orderDetail
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
],
success
:
{
(
data
)
in
HUD
.
hide
(
animated
:
true
)
let
dataM
=
data
as!
OrderDetailModel
...
...
@@ -141,7 +142,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
//MARK: - 底部自定义方法
@objc
func
bottomBtnClick
(
sender
:
UIButton
){
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
switch
sender
.
titleLabel
?
.
text
{
case
"修改价格"
:
...
...
@@ -292,7 +293,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
//MARK:--编辑运单号回调数据
func
sureGeliAlertTextFiledAction
(
sender
:
String
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editLwbno
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
,
"lwb_no"
:
sender
as
Any
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
@@ -306,7 +307,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
//MARK:--编辑订单备注回调数据
func
sureGeliAlertTextViewAction
(
sender
:
String
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"45"
,
"prval"
:
orderId
as
Any
,
"value"
:
sender
as
Any
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
...
...
@@ -667,7 +668,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case
"物流公司"
:
if
lcModel
==
nil
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
logisticsCompany
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
LogisticsCompanyModel
if
dataM
.
code
==
1
{
...
...
@@ -795,7 +796,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
else
if
selectNum
>
1
{
pay_type
=
selectNum
+
7
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editPayType
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
,
"is_adsale"
:
1
as
Any
,
"amount_type"
:
1
as
Any
,
"pay_type"
:
pay_type
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
...
...
@@ -827,7 +828,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
else
if
selectNum
>
1
{
pay_type
=
selectNum
+
7
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editPayType
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
,
"is_adsale"
:
1
as
Any
,
"amount_type"
:
2
as
Any
,
"pay_type"
:
pay_type
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
...
...
@@ -859,7 +860,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
else
if
selectNum
>
1
{
pay_type
=
selectNum
+
7
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
editPayType
([
"user_token"
:
UserToken
as
Any
,
"order_id"
:
orderId
as
Any
,
"is_adsale"
:
0
as
Any
,
"amount_type"
:
0
as
Any
,
"pay_type"
:
pay_type
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
...
...
@@ -884,7 +885,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
}
else
if
view
.
titleLbl
.
text
==
"请选择物流公司"
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
secltMd
=
self
.
lcModel
?
.
data
!
[
selectNum
]
editField
([
"user_token"
:
UserToken
as
Any
,
"function_id"
:
"46"
,
"prval"
:
orderId
as
Any
,
"value"
:
secltMd
!.
lc_id
as
Any
,],
success
:
{
(
data
)
in
let
dataM
=
data
as!
UpDataModel
...
...
@@ -1137,7 +1138,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
//MARK:--确认和取消订单
//MARK:--弹窗代理 --还有其他弹窗,根据tag分类
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
if
sender
.
tag
==
1001
{
HUD
.
flash
(
.
progress
)
...
...
GeliBusinessPlatform/ViewController/采购单列表/CGDListVC.swift
View file @
7d7f62de
...
...
@@ -11,14 +11,17 @@ import ViewAnimator //cell动效
class
CGDListVC
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
GeliAlertViewDelegate
,
CGDListCellDelegate
,
CGDXQVcDelegate
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"po_id"
:
sender
.
tag
as
Any
]
backOut
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"撤销成功"
),
delay
:
1.2
)
self
.
listView
.
mj_header
?
.
beginRefreshing
()
})
{
(
error
)
in
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"po_id"
:
sender
.
tag
as
Any
]
if
isBackOut
{
backOut
(
dict
,
success
:
{
(
data
)
in
HUD
.
hide
()
HUD
.
flash
(
.
labeledSubSuccess
(
subtitle
:
"撤销成功"
),
delay
:
1.2
)
self
.
isBackOut
=
false
//关闭进入撤销状态
self
.
listView
.
mj_header
?
.
beginRefreshing
()
})
{
(
error
)
in
}
}
}
...
...
@@ -150,37 +153,38 @@ func sureGeliAlertViewAction(sender: UIButton) {
vc
.
delegate
=
self
var
btnStr
:
Array
<
String
>
=
[]
switch
model
.
order_status
{
//订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
case
1
:
// if 权限 {
btnStr
=
[
"不通过"
,
"通过"
]
// }
break
case
2
:
//入库状态(1未入库,2部分入库,3已入库)
switch
model
.
push_status
{
case
1
:
btnStr
=
[
"入库"
]
break
case
2
:
btnStr
=
[
"撤销入库"
,
"补录入库"
]
break
default
:
btnStr
=
[
"撤销入库"
]
break
}
break
default
:
break
}
//订单状态(1未审核,2审核通过,3审核不通过,4已撤销,5已完成)
case
1
:
// if 权限 {
btnStr
=
[
"不通过"
,
"通过"
]
// }
break
case
2
:
//入库状态(1未入库,2部分入库,3已入库)
switch
model
.
push_status
{
case
1
:
btnStr
=
[
"入库"
]
break
case
2
:
btnStr
=
[
"撤销入库"
,
"补录入库"
]
break
default
:
btnStr
=
[
"撤销入库"
]
break
}
break
default
:
break
}
vc
.
btnTitle
=
btnStr
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
var
isBackOut
=
false
//撤销入库状态:默认关闭
//MARK: - 点击cell 按钮
func
allBtnSubmit
(
sender
:
UIButton
)
{
let
model
=
datas
[
sender
.
tag
]
switch
sender
.
titleLabel
?
.
text
{
case
"撤销入库"
:
isBackOut
=
true
//撤销入库状态:打开
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
;
alertView
.
tishiLbl
.
text
=
""
...
...
@@ -207,7 +211,7 @@ func sureGeliAlertViewAction(sender: UIButton) {
}
//MARK: - alertView delegate
//MARK:-- tablev 处理
var
listView
:
UITableView
!
...
...
@@ -276,7 +280,7 @@ func sureGeliAlertViewAction(sender: UIButton) {
//MARK:--加载更多数据
@objc
func
loadMoreData
(){
print
(
"加载更多数据"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
as
Any
,
"page"
:
page
as
Any
,
"order_status"
:
orderStatus
as
Any
]
purchaseOrderList
(
dic
,
success
:
{
(
data
)
in
let
model
=
data
as!
PurchaseOrderListModel
...
...
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