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
139be52b
Commit
139be52b
authored
Feb 05, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新接口1
parent
53785cda
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
174 additions
and
54 deletions
+174
-54
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/GoodsManageMoel/GoodsDetailModel.swift
...nessPlatform/Model/GoodsManageMoel/GoodsDetailModel.swift
+4
-1
GeliBusinessPlatform/Model/VendorModel/VendorListModel.swift
GeliBusinessPlatform/Model/VendorModel/VendorListModel.swift
+5
-3
GeliBusinessPlatform/ViewController/供应商管理/GYSGLViewController.swift
...ssPlatform/ViewController/供应商管理/GYSGLViewController.swift
+130
-40
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.swift
...Platform/ViewController/供应商管理/GYSListViewController.swift
+1
-0
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.xib
...ssPlatform/ViewController/供应商管理/GYSListViewController.xib
+2
-2
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+15
-3
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+6
-2
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
...form/ViewController/地址管理/XinZengDiZhiViewController.swift
+4
-0
GeliBusinessPlatform/ViewController/打印订单/PrintViewController.swift
...essPlatform/ViewController/打印订单/PrintViewController.swift
+4
-0
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
...orm/ViewController/新增规格/CreatNewSpecsViewController.swift
+2
-2
GeliBusinessPlatform/ViewController/新增规格/GuiGeModel.swift
GeliBusinessPlatform/ViewController/新增规格/GuiGeModel.swift
+1
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
139be52b
No preview for this file type
GeliBusinessPlatform/Model/GoodsManageMoel/GoodsDetailModel.swift
View file @
139be52b
...
@@ -41,6 +41,7 @@ class GoodsDetailDataModel: Mappable {
...
@@ -41,6 +41,7 @@ class GoodsDetailDataModel: Mappable {
}
}
class
GoodsDetailGoodsResModel
:
Mappable
{
class
GoodsDetailGoodsResModel
:
Mappable
{
var
sale_inventory
:
Int
?
//可售库存
var
goods_id
:
Int
?
//商品id
var
goods_id
:
Int
?
//商品id
var
goods_name
:
String
?
//商品名
var
goods_name
:
String
?
//商品名
var
keywords
:
String
?
//关键字
var
keywords
:
String
?
//关键字
...
@@ -83,6 +84,7 @@ class GoodsDetailGoodsResModel: Mappable {
...
@@ -83,6 +84,7 @@ class GoodsDetailGoodsResModel: Mappable {
}
}
func
mapping
(
map
:
Map
)
{
func
mapping
(
map
:
Map
)
{
goods_id
<-
map
[
"goods_id"
]
goods_id
<-
map
[
"goods_id"
]
sale_inventory
<-
map
[
"sale_inventory"
]
goods_name
<-
map
[
"goods_name"
]
goods_name
<-
map
[
"goods_name"
]
cat_id
<-
map
[
"cat_id"
]
cat_id
<-
map
[
"cat_id"
]
brand_id
<-
map
[
"brand_id"
]
brand_id
<-
map
[
"brand_id"
]
...
@@ -140,12 +142,13 @@ class GoodsDetailSkuResModel: Mappable {
...
@@ -140,12 +142,13 @@ class GoodsDetailSkuResModel: Mappable {
var
is_adsale_tiered
:
Int
?
//是否开启预售阶梯价 1开启 0关闭
var
is_adsale_tiered
:
Int
?
//是否开启预售阶梯价 1开启 0关闭
var
original_price
:
String
?
//原价
var
original_price
:
String
?
//原价
var
origin_number_sku
:
Int
?
//起售数量
var
origin_number_sku
:
Int
?
//起售数量
var
bar_code
:
String
?
//商品条码
required
init
?(
map
:
Map
)
{
required
init
?(
map
:
Map
)
{
}
}
func
mapping
(
map
:
Map
)
{
func
mapping
(
map
:
Map
)
{
sku_id
<-
map
[
"sku_id"
]
sku_id
<-
map
[
"sku_id"
]
bar_code
<-
map
[
"bar_code"
]
price
<-
map
[
"price"
]
price
<-
map
[
"price"
]
pack_attr
<-
map
[
"pack_attr"
]
pack_attr
<-
map
[
"pack_attr"
]
refrigerate
<-
map
[
"refrigerate"
]
refrigerate
<-
map
[
"refrigerate"
]
...
...
GeliBusinessPlatform/Model/VendorModel/VendorListModel.swift
View file @
139be52b
...
@@ -36,19 +36,21 @@ class VendorListDataModel: Mappable {
...
@@ -36,19 +36,21 @@ class VendorListDataModel: Mappable {
var
contacts_name
:
String
?
//联系人
var
contacts_name
:
String
?
//联系人
var
contacts_phone
:
String
?
//联系人电话
var
contacts_phone
:
String
?
//联系人电话
var
contacts_mobile
:
String
?
//联系人手机号
var
contacts_mobile
:
String
?
//联系人手机号
var
zhizhao
:
String
?
//营业执照
var
zhizhao
:
Array
<
String
>
?
//营业执照
var
food_production_license
:
String
?
//食品流通许可证
var
food_production_license
:
Array
<
String
>
?
//食品流通许可证
var
payable_money
:
String
?
//详细地址
var
payable_money
:
String
?
//详细地址
var
is_delete
:
Int
?
var
is_delete
:
Int
?
var
p_cn
:
String
?
//省
var
p_cn
:
String
?
//省
var
c_cn
:
String
?
//市
var
c_cn
:
String
?
//市
var
d_cn
:
String
?
//区
var
d_cn
:
String
?
//区
var
unit_credit_code
:
String
?
//信用代码
required
init
?(
map
:
Map
)
{
required
init
?(
map
:
Map
)
{
}
}
func
mapping
(
map
:
Map
)
{
func
mapping
(
map
:
Map
)
{
ven_id
<-
map
[
"ven_id"
]
ven_id
<-
map
[
"ven_id"
]
unit_credit_code
<-
map
[
"unit_credit_code"
]
shop_id
<-
map
[
"shop_id"
]
shop_id
<-
map
[
"shop_id"
]
ven_name
<-
map
[
"ven_name"
]
ven_name
<-
map
[
"ven_name"
]
province
<-
map
[
"province"
]
province
<-
map
[
"province"
]
...
...
GeliBusinessPlatform/ViewController/供应商管理/GYSGLViewController.swift
View file @
139be52b
...
@@ -13,7 +13,34 @@ import Photos
...
@@ -13,7 +13,34 @@ import Photos
protocol
GYSGLViewControllerDelegate
{
protocol
GYSGLViewControllerDelegate
{
func
GYSGLViewControllerFinish
()
func
GYSGLViewControllerFinish
()
}
}
class
GYSGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
,
TitleAndOnlyBtnCellDelegate
,
SJMapViewControllerDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
,
GeliAlertViewDelegate
,
UITextFieldDelegate
{
class
GYSGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
,
TitleAndOnlyBtnCellDelegate
,
SJMapViewControllerDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
,
GeliAlertViewDelegate
,
UITextFieldDelegate
,
TitleAndTFCellDelegate
{
func
textFieldContent
(
content
:
String
,
cell
:
TitleAndTFCell
)
{
switch
cell
.
textTF
.
tag
{
case
0
:
gysName
=
content
break
case
2
:
detailDzStr
=
content
break
case
99
:
create_number
=
content
break
case
100
:
nameStr
=
content
break
case
101
:
phoneNum
=
content
break
case
102
:
telNum
=
content
break
default
:
break
}
}
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
HUD
.
flash
(
.
progress
)
HUD
.
flash
(
.
progress
)
let
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
let
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
...
@@ -27,8 +54,13 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -27,8 +54,13 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
areaDict
=
(
cityDict
[
"district_list"
]
as!
NSArray
)[
areaIndex
]
as!
Dictionary
<
String
,
Any
>
areaDict
=
(
cityDict
[
"district_list"
]
as!
NSArray
)[
areaIndex
]
as!
Dictionary
<
String
,
Any
>
}
}
}
}
let
zhizhaoStr
=
zhizhao
.
joined
(
separator
:
","
)
let
foodStr
=
food_production_license
.
joined
(
separator
:
","
)
var
dict
=
[
"user_token"
:
UserToken
as
Any
,
var
dict
=
[
"user_token"
:
UserToken
as
Any
,
"ven_name"
:
gysName
as
Any
,
"ven_name"
:
gysName
as
Any
,
"unit_credit_code"
:
create_number
,
"province"
:
proDict
[
"area_id"
]
as
Any
,
"province"
:
proDict
[
"area_id"
]
as
Any
,
"city"
:
cityDict
[
"area_id"
]
as
Any
,
"city"
:
cityDict
[
"area_id"
]
as
Any
,
"district"
:
areaDict
[
"area_id"
]
as
Any
,
"district"
:
areaDict
[
"area_id"
]
as
Any
,
...
@@ -36,8 +68,8 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -36,8 +68,8 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
"contacts_name"
:
nameStr
as
Any
,
"contacts_name"
:
nameStr
as
Any
,
"contacts_phone"
:
telNum
as
Any
,
"contacts_phone"
:
telNum
as
Any
,
"contacts_mobile"
:
phoneNum
as
Any
,
"contacts_mobile"
:
phoneNum
as
Any
,
"zhizhao"
:
zhizhao
as
Any
,
"zhizhao"
:
zhizhao
Str
as
Any
,
"food_production_license"
:
food
_production_license
as
Any
"food_production_license"
:
food
Str
as
Any
]
]
switch
sender
.
tag
{
switch
sender
.
tag
{
...
@@ -97,8 +129,31 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -97,8 +129,31 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
var
img1
=
UIImageView
()
var
img1
=
UIImageView
()
var
img2
=
UIImageView
()
var
img2
=
UIImageView
()
var
zhizhao
=
""
var
food_production_license
=
""
var
zhizhao
:
Array
<
String
>
=
[]{
didSet
{
for
i
in
0
..<
zhizhao
.
count
{
let
item
=
zhizhao
[
i
]
if
item
.
count
>
0
{
goods_banner
?
.
insert
(
item
,
at
:
i
)
goods_banner
?
.
remove
(
at
:
i
+
1
)
}
}
}
}
var
food_production_license
:
Array
<
String
>
=
[]{
didSet
{
for
i
in
0
..<
food_production_license
.
count
{
let
item
=
food_production_license
[
i
]
if
item
.
count
>
0
{
goods_banner2
?
.
insert
(
item
,
at
:
i
)
goods_banner2
?
.
remove
(
at
:
i
+
1
)
}
}
}
}
var
ven_id
:
Int
?
var
ven_id
:
Int
?
var
barT
=
""
var
barT
=
""
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
@@ -168,8 +223,8 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -168,8 +223,8 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
return
100
return
100
}
}
}
}
if
food_production_license
.
count
>
2
{
if
food_production_license
.
count
>
0
{
if
indexPath
.
row
==
1
{
if
indexPath
.
row
==
2
{
return
100
return
100
}
}
}
}
...
@@ -215,6 +270,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -215,6 +270,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
cell
.
nameLbl
.
text
=
sec1Arr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
sec1Arr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
hold1Arr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
hold1Arr
[
indexPath
.
row
]
cell
.
textTF
.
delegate
=
self
cell
.
textTF
.
delegate
=
self
cell
.
delegate
=
self
cell
.
textTF
.
tag
=
indexPath
.
row
cell
.
textTF
.
tag
=
indexPath
.
row
if
indexPath
.
row
==
0
{
if
indexPath
.
row
==
0
{
if
barT
.
contains
(
"编辑"
){
if
barT
.
contains
(
"编辑"
){
...
@@ -236,6 +292,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -236,6 +292,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
nameLbl
.
text
=
sec2Arr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
sec2Arr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
hold2Arr
[
indexPath
.
row
]
cell
.
textTF
.
placeholder
=
hold2Arr
[
indexPath
.
row
]
cell
.
delegate
=
self
if
barT
.
contains
(
"编辑"
){
if
barT
.
contains
(
"编辑"
){
cell
.
textTF
.
clearButtonMode
=
.
always
cell
.
textTF
.
clearButtonMode
=
.
always
}
else
{
}
else
{
...
@@ -267,12 +324,14 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -267,12 +324,14 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
cell
.
nameLbl
.
text
=
sec3Arr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
sec3Arr
[
indexPath
.
row
]
cell
.
star_lbl
.
isHidden
=
false
cell
.
star_lbl
.
isHidden
=
false
cell
.
textTF
.
placeholder
=
"请输入"
cell
.
textTF
.
placeholder
=
"请输入"
cell
.
textTF
.
tag
=
99
if
barT
.
contains
(
"编辑"
){
if
barT
.
contains
(
"编辑"
){
cell
.
textTF
.
clearButtonMode
=
.
always
cell
.
textTF
.
clearButtonMode
=
.
always
}
else
{
}
else
{
cell
.
textTF
.
clearButtonMode
=
.
whileEditing
cell
.
textTF
.
clearButtonMode
=
.
whileEditing
}
}
cell
.
textTF
.
delegate
=
self
cell
.
textTF
.
delegate
=
self
cell
.
delegate
=
self
cell
.
tag
=
99
cell
.
tag
=
99
cell
.
textTF
.
text
=
create_number
cell
.
textTF
.
text
=
create_number
return
cell
return
cell
...
@@ -283,15 +342,15 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -283,15 +342,15 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
cell
.
delegate
=
self
cell
.
delegate
=
self
cell
.
tag
=
indexPath
.
row
cell
.
tag
=
indexPath
.
row
if
zhizhao
.
count
>
0
{
if
zhizhao
.
count
>
0
{
if
indexPath
.
row
==
0
{
if
indexPath
.
row
==
1
{
cell
.
imgBgView
.
isHidden
=
false
cell
.
imgBgView
.
isHidden
=
false
cell
.
imgView
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
zhizhao
))
cell
.
imgView
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
zhizhao
.
first
!
))
}
}
}
}
if
food_production_license
.
count
>
0
{
if
food_production_license
.
count
>
0
{
if
indexPath
.
row
==
1
{
if
indexPath
.
row
==
2
{
cell
.
imgBgView
.
isHidden
=
false
cell
.
imgBgView
.
isHidden
=
false
cell
.
imgView
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
food_production_license
))
cell
.
imgView
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
food_production_license
.
first
!
))
}
}
}
}
...
@@ -342,6 +401,11 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -342,6 +401,11 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
bgBtn
=
nil
bgBtn
=
nil
listView
.
reloadData
()
listView
.
reloadData
()
}
}
var
goods_banner
:
Array
<
String
>
?
=
[
""
,
""
,
""
]
//商品副图,多张,最多5张,使用一维数组转json格式
var
goods_banner2
:
Array
<
String
>
?
=
[
""
,
""
,
""
]
var
idxRow
=
-
1
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
indexPath
.
section
==
0
{
if
indexPath
.
section
==
0
{
if
indexPath
.
row
==
1
{
if
indexPath
.
row
==
1
{
...
@@ -396,7 +460,17 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -396,7 +460,17 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
}
}
}
}
if
indexPath
.
section
==
2
{
if
indexPath
.
section
==
2
{
_
=
self
.
presentHGImagePicker
(
maxSelected
:
1
)
{
(
assets
)
in
var
num
=
3
if
indexPath
.
row
==
1
{
num
=
3
-
zhizhao
.
count
idxRow
=
1
}
if
indexPath
.
row
==
2
{
num
=
3
-
food_production_license
.
count
idxRow
=
2
}
_
=
self
.
presentHGImagePicker
(
maxSelected
:
num
)
{
(
assets
)
in
//结果处理
//结果处理
print
(
"共选择了
\(
assets
.
count
)
张图片,分别如下:"
)
print
(
"共选择了
\(
assets
.
count
)
张图片,分别如下:"
)
let
option
=
PHImageRequestOptions
()
let
option
=
PHImageRequestOptions
()
...
@@ -405,7 +479,19 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -405,7 +479,19 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
for
asset
in
assets
{
for
asset
in
assets
{
PHImageManager
.
default
()
.
requestImage
(
for
:
asset
,
targetSize
:
PHImageManagerMaximumSize
,
contentMode
:
.
default
,
options
:
option
,
resultHandler
:
{
(
image
,
_
:
[
AnyHashable
:
Any
]?)
in
PHImageManager
.
default
()
.
requestImage
(
for
:
asset
,
targetSize
:
PHImageManagerMaximumSize
,
contentMode
:
.
default
,
options
:
option
,
resultHandler
:
{
(
image
,
_
:
[
AnyHashable
:
Any
]?)
in
// print("上传图片==\(image)")
// print("上传图片==\(image)")
self
.
uploadImg
(
imge
:
image
!
,
isOriginal
:
true
,
tag
:
indexPath
.
row
)
if
indexPath
.
row
==
1
{
//调用上传图片
self
.
zhizhao
.
append
(
"insert"
)
self
.
uploadImg
(
imge
:
image
!
,
isOriginal
:
true
,
tag
:
self
.
zhizhao
.
count
-
1
)
}
if
indexPath
.
row
==
2
{
self
.
food_production_license
.
append
(
"insert"
)
self
.
uploadImg
(
imge
:
image
!
,
isOriginal
:
true
,
tag
:
self
.
food_production_license
.
count
-
1
)
}
})
})
}
}
self
.
listView
.
reloadData
()
self
.
listView
.
reloadData
()
...
@@ -420,11 +506,28 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -420,11 +506,28 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
let
dataM
=
data
as!
SaveFileModel
let
dataM
=
data
as!
SaveFileModel
if
dataM
.
code
==
1
{
if
dataM
.
code
==
1
{
print
(
"图片上传成功
\(
dataM
.
data
?
.
url
)
"
)
print
(
"图片上传成功
\(
dataM
.
data
?
.
url
)
"
)
if
tag
==
0
{
self
.
zhizhao
=
dataM
.
data
?
.
url
!
as!
String
if
self
.
idxRow
==
1
{
self
.
goods_banner
?
.
insert
((
dataM
.
data
?
.
url
!
)
!
,
at
:
tag
)
self
.
goods_banner
?
.
remove
(
at
:
tag
+
1
)
self
.
zhizhao
.
removeAll
()
self
.
goods_banner
?
.
forEach
({
(
str
)
in
if
str
.
count
>
0
{
self
.
zhizhao
.
append
(
str
)
}
})
self
.
img1
.
image
=
upLoadImg
self
.
img1
.
image
=
upLoadImg
}
else
{
}
self
.
food_production_license
=
dataM
.
data
?
.
url
!
as!
String
if
self
.
idxRow
==
2
{
self
.
goods_banner2
?
.
insert
((
dataM
.
data
?
.
url
!
)
!
,
at
:
tag
)
self
.
goods_banner2
?
.
remove
(
at
:
tag
+
1
)
self
.
food_production_license
.
removeAll
()
self
.
goods_banner2
?
.
forEach
({
(
str
)
in
if
str
.
count
>
0
{
self
.
food_production_license
.
append
(
str
)
}
})
self
.
img2
.
image
=
upLoadImg
self
.
img2
.
image
=
upLoadImg
}
}
self
.
listView
.
reloadData
()
self
.
listView
.
reloadData
()
...
@@ -517,6 +620,10 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -517,6 +620,10 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
}
}
}
}
}
else
{
provinceIndex
=
0
cityIndex
=
0
areaIndex
=
0
}
}
}
}
}
catch
let
error
as
Error
?
{
}
catch
let
error
as
Error
?
{
...
@@ -667,10 +774,15 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -667,10 +774,15 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
HUD
.
flash
(
.
label
(
"请填写手机号码"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请填写手机号码"
),
delay
:
1.2
)
return
return
}
}
if
isTelNumber
(
num
:
phoneNum
as
NSString
)
==
false
{
print
(
phoneNum
,
phoneNum
.
count
)
if
phoneNum
.
count
!=
11
{
HUD
.
flash
(
.
label
(
"请填写正确的手机号码"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"请填写正确的手机号码"
),
delay
:
1.2
)
return
return
}
}
if
create_number
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请填写信用社代码"
),
delay
:
1.2
)
return
}
// if zhizhao.count == 0 {
// if zhizhao.count == 0 {
// HUD.flash(.label("请上传营业资格证"), delay: 1.2)
// HUD.flash(.label("请上传营业资格证"), delay: 1.2)
// return
// return
...
@@ -697,28 +809,6 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -697,28 +809,6 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
HUD
.
flash
(
.
label
(
"输入不可包含表情符号"
),
delay
:
1.2
)
HUD
.
flash
(
.
label
(
"输入不可包含表情符号"
),
delay
:
1.2
)
return
return
}
}
switch
textField
.
tag
{
case
0
:
gysName
=
textField
.
text
!
break
case
2
:
detailDzStr
=
textField
.
text
!
break
case
99
:
create_number
=
textField
.
text
!
break
case
100
:
nameStr
=
textField
.
text
!
break
case
101
:
phoneNum
=
textField
.
text
!
break
case
102
:
telNum
=
textField
.
text
!
break
default
:
break
}
}
}
...
...
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.swift
View file @
139be52b
...
@@ -195,6 +195,7 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
...
@@ -195,6 +195,7 @@ class GYSListViewController: BaseViewController,UITableViewDataSource,UITableVie
if
data
.
contacts_phone
!=
nil
{
if
data
.
contacts_phone
!=
nil
{
vc
.
telNum
=
data
.
contacts_phone
!
vc
.
telNum
=
data
.
contacts_phone
!
}
}
vc
.
create_number
=
data
.
unit_credit_code
!
vc
.
ven_id
=
data
.
ven_id
!
vc
.
ven_id
=
data
.
ven_id
!
vc
.
nameStr
=
data
.
contacts_name
!
vc
.
nameStr
=
data
.
contacts_name
!
vc
.
phoneNum
=
data
.
contacts_mobile
!
vc
.
phoneNum
=
data
.
contacts_mobile
!
...
...
GeliBusinessPlatform/ViewController/供应商管理/GYSListViewController.xib
View file @
139be52b
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"17
156
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"17
701
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"17
125
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"17
703
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
139be52b
...
@@ -556,7 +556,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -556,7 +556,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
//是否有封面图
//是否有封面图
self
.
singleImgArr
=
[
(
model
.
data
?
.
goods_res
!.
original_img
)
!
]
//单张图
self
.
singleImgArr
=
[
(
model
.
data
?
.
goods_res
!.
original_img
)
!
]
//单张图
self
.
original_img
=
(
model
.
data
?
.
goods_res
!.
original_img
)
!
self
.
original_img
=
(
model
.
data
?
.
goods_res
!.
original_img
)
!
if
model
.
data
?
.
goods_res
?
.
sale_inventory
!=
nil
{
self
.
tishixxArr
.
insert
(
StringByInt
(
number
:
(
model
.
data
?
.
goods_res
?
.
sale_inventory
)
!
),
at
:
4
)
self
.
tishixxArr
.
remove
(
at
:
5
)
}
//商品规格
//商品规格
if
(
model
.
data
?
.
sku_res
?
.
count
)
!
>
0
{
if
(
model
.
data
?
.
sku_res
?
.
count
)
!
>
0
{
...
@@ -601,6 +604,9 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -601,6 +604,9 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
//百分比
//百分比
data
.
DJBiLi
=
StringByInt
(
number
:
dataSource
.
pct
!
)
data
.
DJBiLi
=
StringByInt
(
number
:
dataSource
.
pct
!
)
if
dataSource
.
bar_code
!=
nil
{
data
.
bar_code
=
dataSource
.
bar_code
!
}
//阶梯价
//阶梯价
if
dataSource
.
tiered_pri
!.
count
>
0
{
if
dataSource
.
tiered_pri
!.
count
>
0
{
data
.
jieTiArr
=
self
.
getResponseArr
(
str
:
dataSource
.
tiered_pri
!
)
data
.
jieTiArr
=
self
.
getResponseArr
(
str
:
dataSource
.
tiered_pri
!
)
...
@@ -846,9 +852,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -846,9 +852,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
dict
=
guiGeArr
.
first
dict
=
guiGeArr
.
first
}
}
cell
.
code_lbl
.
text
=
"商品条码:未记录"
cell
.
code_lbl
.
text
=
"商品条码:未记录"
if
dict
.
code_number
.
count
>
0
{
if
dict
.
bar_code
.
count
>
0
{
cell
.
code_lbl
.
text
=
"商品条码:
\(
dict
.
code_number
)
"
cell
.
code_lbl
.
text
=
"商品条码:
\(
dict
.
bar_code
)
"
}
}
cell
.
tempLbl
.
text
=
"温藏:未记录"
cell
.
tempLbl
.
text
=
"温藏:未记录"
if
dict
.
wenDu
.
count
>
0
{
if
dict
.
wenDu
.
count
>
0
{
...
@@ -1804,6 +1811,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1804,6 +1811,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var
sku
=
[
"sku_sn"
:
""
,
var
sku
=
[
"sku_sn"
:
""
,
"sku_id"
:
item
.
sku_id
,
"sku_id"
:
item
.
sku_id
,
"goods_id"
:
goods_id
,
"goods_id"
:
goods_id
,
"bar_code"
:
item
.
bar_code
,
"is_del"
:
0
,
"is_del"
:
0
,
"spec_id"
:
"1"
,
"spec_id"
:
"1"
,
"attr"
:
item
.
guiGe
,
"attr"
:
item
.
guiGe
,
...
@@ -1853,6 +1861,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1853,6 +1861,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
let
sku
=
[
"sku_sn"
:
""
,
let
sku
=
[
"sku_sn"
:
""
,
"sku_id"
:
skuModel
.
sku_id
as
Any
,
"sku_id"
:
skuModel
.
sku_id
as
Any
,
"goods_id"
:
goods_id
as
Any
,
"goods_id"
:
goods_id
as
Any
,
"bar_code"
:
skuModel
.
bar_code
as
Any
,
"is_del"
:
1
,
"is_del"
:
1
,
"spec_id"
:
"1"
,
"spec_id"
:
"1"
,
"attr"
:
strattr
as
Any
,
"attr"
:
strattr
as
Any
,
...
@@ -2091,6 +2100,9 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -2091,6 +2100,9 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
}
}
}
}
}
else
{
provinceIndex
=
0
cityIndex
=
0
}
}
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
// }
// }
...
...
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
139be52b
...
@@ -418,8 +418,8 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -418,8 +418,8 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
dict
=
guiGeArr
.
first
dict
=
guiGeArr
.
first
}
}
cell
.
code_lbl
.
text
=
"商品条码:未记录"
cell
.
code_lbl
.
text
=
"商品条码:未记录"
if
dict
.
code_number
.
count
>
0
{
if
dict
.
bar_code
.
count
>
0
{
cell
.
code_lbl
.
text
=
"商品条码:
\(
dict
.
code_number
)
"
cell
.
code_lbl
.
text
=
"商品条码:
\(
dict
.
bar_code
)
"
}
}
cell
.
tempLbl
.
text
=
"温藏:未记录"
cell
.
tempLbl
.
text
=
"温藏:未记录"
if
dict
.
wenDu
.
count
>
0
{
if
dict
.
wenDu
.
count
>
0
{
...
@@ -1323,6 +1323,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1323,6 +1323,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var
sku
=
[
"sku_sn"
:
""
,
var
sku
=
[
"sku_sn"
:
""
,
"spec_id"
:
"1"
,
"spec_id"
:
"1"
,
"bar_code"
:
md
.
bar_code
,
"attr"
:
md
.
guiGe
,
"attr"
:
md
.
guiGe
,
"pack_attr"
:
packAttrStr
,
"pack_attr"
:
packAttrStr
,
"refrigerate"
:
md
.
wenDu
,
"refrigerate"
:
md
.
wenDu
,
...
@@ -1500,6 +1501,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1500,6 +1501,9 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
}
}
}
}
}
else
{
provinceIndex
=
0
cityIndex
=
0
}
}
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
// }
// }
...
...
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
View file @
139be52b
...
@@ -187,6 +187,10 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
...
@@ -187,6 +187,10 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
}
}
}
}
}
}
}
else
{
provinceIndex
=
0
cityIndex
=
0
areaIndex
=
0
}
}
}
}
}
}
...
...
GeliBusinessPlatform/ViewController/打印订单/PrintViewController.swift
View file @
139be52b
...
@@ -326,6 +326,10 @@ class PrintViewController: BaseViewController,UITableViewDelegate,UITableViewDat
...
@@ -326,6 +326,10 @@ class PrintViewController: BaseViewController,UITableViewDelegate,UITableViewDat
}
}
}
}
}
}
}
else
{
provinceIndex
=
0
cityIndex
=
0
areaIndex
=
0
}
}
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
// }
// }
...
...
GeliBusinessPlatform/ViewController/新增规格/CreatNewSpecsViewController.swift
View file @
139be52b
...
@@ -237,7 +237,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -237,7 +237,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
dataModel
.
price
=
price
dataModel
.
price
=
price
dataModel
.
guiGe
=
guiGe
dataModel
.
guiGe
=
guiGe
dataModel
.
weight
=
weight
dataModel
.
weight
=
weight
dataModel
.
code_number
=
code_number
dataModel
.
bar_code
=
code_number
dataModel
.
wenDu
=
wenDu
dataModel
.
wenDu
=
wenDu
dataModel
.
danWei
=
danWei
dataModel
.
danWei
=
danWei
dataModel
.
isYsJieTiOpen
=
isYsJieTiOpen
dataModel
.
isYsJieTiOpen
=
isYsJieTiOpen
...
@@ -812,7 +812,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -812,7 +812,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
price
=
dataDict
.
price
price
=
dataDict
.
price
guiGe
=
dataDict
.
guiGe
guiGe
=
dataDict
.
guiGe
weight
=
dataDict
.
weight
weight
=
dataDict
.
weight
code_number
=
dataDict
.
code_number
code_number
=
dataDict
.
bar_code
wenDu
=
dataDict
.
wenDu
wenDu
=
dataDict
.
wenDu
danWei
=
dataDict
.
danWei
danWei
=
dataDict
.
danWei
yuShouPrice
=
dataDict
.
yuShouPrice
yuShouPrice
=
dataDict
.
yuShouPrice
...
...
GeliBusinessPlatform/ViewController/新增规格/GuiGeModel.swift
View file @
139be52b
...
@@ -18,7 +18,7 @@ class GuiGeModel: NSObject {
...
@@ -18,7 +18,7 @@ class GuiGeModel: NSObject {
///重量
///重量
var
weight
:
String
=
""
var
weight
:
String
=
""
///条形码
///条形码
var
code_number
:
String
=
""
var
bar_code
:
String
=
""
///温度
///温度
var
wenDu
:
String
=
""
var
wenDu
:
String
=
""
///单位
///单位
...
...
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