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
2d507706
Commit
2d507706
authored
Feb 05, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级旧有接口
parent
68d938ac
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
197 additions
and
57 deletions
+197
-57
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/Interface.swift
GeliBusinessPlatform/Model/Interface.swift
+4
-1
GeliBusinessPlatform/Model/WarehouseInterface.swift
GeliBusinessPlatform/Model/WarehouseInterface.swift
+4
-0
GeliBusinessPlatform/Model/WarehouseManageModel/GetGoodBatchModel.swift
...atform/Model/WarehouseManageModel/GetGoodBatchModel.swift
+2
-0
GeliBusinessPlatform/Model/WarehouseManageModel/InputInitInfoModel.swift
...tform/Model/WarehouseManageModel/InputInitInfoModel.swift
+3
-2
GeliBusinessPlatform/Model/WarehouseManageModel/IoGoodsDetailModel.swift
...tform/Model/WarehouseManageModel/IoGoodsDetailModel.swift
+7
-2
GeliBusinessPlatform/Model/WarehouseManageModel/OutGoodsDetailModel.swift
...form/Model/WarehouseManageModel/OutGoodsDetailModel.swift
+6
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.swift
...ssPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.swift
+1
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.xib
...nessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.xib
+10
-1
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
+85
-28
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/CKGmCell.swift
...usinessPlatform/ViewController/1.1入库&出库/出库/CKGmCell.swift
+4
-1
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
+0
-0
GeliBusinessPlatform/ViewController/供应商管理/GYSGLViewController.swift
...ssPlatform/ViewController/供应商管理/GYSGLViewController.swift
+0
-2
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
+19
-1
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+2
-2
GeliBusinessPlatform/ViewController/新增、编辑品牌/XinZengPinPaiViewController.swift
.../ViewController/新增、编辑品牌/XinZengPinPaiViewController.swift
+15
-15
GeliBusinessPlatform/ViewController/溯源/Add_Report_View.swift
GeliBusinessPlatform/ViewController/溯源/Add_Report_View.swift
+32
-1
GeliBusinessPlatform/ViewController/溯源/Add_Report_View.xib
GeliBusinessPlatform/ViewController/溯源/Add_Report_View.xib
+2
-0
GeliBusinessPlatform/ViewController/订单列表/OrderListVC.swift
GeliBusinessPlatform/ViewController/订单列表/OrderListVC.swift
+1
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
2d507706
No preview for this file type
GeliBusinessPlatform/Model/Interface.swift
View file @
2d507706
...
...
@@ -161,7 +161,10 @@ func saveFile(image: UIImage,_ params:[String:Any],success:@escaping (_ res:Any)
}
else
if
key
==
"order_id"
{
urlStr
=
"上传发票"
}
//else if key == order_id 上传发票
// else if key == "path" && (value as AnyObject).contains("category") {
// urlStr = "上传发票"
// }
}
print
(
"上传信息"
,
urlStr
,
params
,
image
)
...
...
GeliBusinessPlatform/Model/WarehouseInterface.swift
View file @
2d507706
...
...
@@ -179,6 +179,8 @@ func GoodsInputAudit(_ params:[String:Any],success:@escaping (_ res:Any)->(),fai
shelf_life 保质期,单位:天
report_id 检测报告id,未选择填0
pog_id 固定值:1
ven_id 供货供应商的id
g_type 商品类型:1直销商品,2代销商品
*/
func
GoodsInput
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"商品入库"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
...
...
@@ -212,6 +214,8 @@ func GoodsInput(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture
shelf_life 保质期,单位:天
report_id 检测报告id,未选择填0
pog_id 固定值:1
ven_id 供货供应商的id
g_type 商品类型:1直销商品,2代销商品
*/
func
GoodsInputApply
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"商品入库申请"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
...
...
GeliBusinessPlatform/Model/WarehouseManageModel/GetGoodBatchModel.swift
View file @
2d507706
...
...
@@ -39,6 +39,7 @@ class GetGoodBatchDataModel: Mappable {
var
report_id
:
Int
?
//批次报告
var
chuHuoLiang
:
Int
?
//出货量
var
ven_name
:
String
?
//供应商名字
var
ven_id
:
Int
?
//供应商ID
required
init
?(
map
:
Map
)
{
}
...
...
@@ -55,6 +56,7 @@ class GetGoodBatchDataModel: Mappable {
status
<-
map
[
"status"
]
report_id
<-
map
[
"report_id"
]
chuHuoLiang
<-
map
[
"chuHuoLiang"
]
ven_id
<-
map
[
"ven_id"
]
}
}
GeliBusinessPlatform/Model/WarehouseManageModel/InputInitInfoModel.swift
View file @
2d507706
...
...
@@ -130,7 +130,7 @@ class InputInitInfoGoodsInfoModel: Mappable { //商品信息
var
pog_id
=
0
var
no_push_num
:
Int
?
var
report_id
:
String
?
required
init
?(
map
:
Map
)
{
}
...
...
@@ -151,6 +151,7 @@ class InputInitInfoGoodsInfoModel: Mappable { //商品信息
chuKuLiang
<-
map
[
"chuKuLiang"
]
pog_id
<-
map
[
"pog_id"
]
no_push_num
<-
map
[
"no_push_num"
]
report_id
<-
map
[
"report_id"
]
}
}
...
...
@@ -170,7 +171,7 @@ class GoodsReportAddModel: Mappable {
}
class
GoodsReportAddDataModel
:
Mappable
{
var
report_id
:
Int
?
var
report_id
:
String
?
required
init
?(
map
:
Map
)
{
}
...
...
GeliBusinessPlatform/Model/WarehouseManageModel/IoGoodsDetailModel.swift
View file @
2d507706
...
...
@@ -73,8 +73,9 @@ class IoGoodsDetailDataGoodsResModel: Mappable {
var
w_name
:
String
?
//仓库
var
p_name
:
String
?
//库位
var
ven_name
:
String
?
//供货供应商名称
var
batch_id
:
Int
?
//商品批次号
var
bar_code
:
Int
?
//商品条码
required
init
?(
map
:
Map
)
{
}
...
...
@@ -97,5 +98,9 @@ class IoGoodsDetailDataGoodsResModel: Mappable {
file_url
<-
map
[
"file_url"
]
w_name
<-
map
[
"w_name"
]
p_name
<-
map
[
"p_name"
]
ven_name
<-
map
[
"ven_name"
]
batch_id
<-
map
[
"batch_id"
]
bar_code
<-
map
[
"bar_code"
]
}
}
GeliBusinessPlatform/Model/WarehouseManageModel/OutGoodsDetailModel.swift
View file @
2d507706
...
...
@@ -72,6 +72,9 @@ class OutGoodsDetailDataGoodsResModel: Mappable {
var
file_url
:
String
?
var
report_sn
:
String
?
var
ven_id
:
Int
?
//供应商ID
var
ven_name
:
String
?
//供应商名字
required
init
?(
map
:
Map
)
{
}
...
...
@@ -90,6 +93,9 @@ class OutGoodsDetailDataGoodsResModel: Mappable {
report_id
<-
map
[
"report_id"
]
batch_id
<-
map
[
"batch_id"
]
inventory
<-
map
[
"inventory"
]
ven_id
<-
map
[
"ven_id"
]
ven_name
<-
map
[
"ven_name"
]
}
}
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.swift
View file @
2d507706
...
...
@@ -15,6 +15,7 @@ protocol NewOnlyRKCellDelegate {
func
NewOnlyRKCellTFinput
(
text
:
String
,
inputType
:
Int
,
cell
:
NewOnlyRKCell
)
}
class
NewOnlyRKCell
:
UITableViewCell
,
UITextFieldDelegate
{
@IBOutlet
weak
var
btn_title_lbl
:
UILabel
!
var
delegate
:
NewOnlyRKCellDelegate
?
@IBAction
func
add_report_action
(
_
sender
:
UIButton
)
{
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewOnlyRKCell.xib
View file @
2d507706
...
...
@@ -287,13 +287,19 @@
<constraint
firstAttribute=
"height"
constant=
"49"
id=
"3kt-ou-1OQ"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<state
key=
"normal"
title=
"添加"
>
<state
key=
"normal"
>
<color
key=
"titleColor"
name=
"蓝色字体颜色"
/>
</state>
<connections>
<action
selector=
"add_report_action:"
destination=
"KGk-i7-Jjw"
eventType=
"touchUpInside"
id=
"i3k-0d-CCB"
/>
</connections>
</button>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"添加"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"siW-9R-nkU"
>
<rect
key=
"frame"
x=
"370"
y=
"340.5"
width=
"26"
height=
"18.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"蓝色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<constraints>
<constraint
firstItem=
"Fr1-SS-krs"
firstAttribute=
"top"
secondItem=
"chy-ny-kVr"
secondAttribute=
"bottom"
constant=
"10"
id=
"1nB-uL-p9g"
/>
...
...
@@ -337,6 +343,7 @@
<constraint
firstItem=
"Fwd-sD-T0h"
firstAttribute=
"top"
secondItem=
"tfu-6M-ZkV"
secondAttribute=
"bottom"
constant=
"15"
id=
"bsU-gu-YLU"
/>
<constraint
firstItem=
"tfu-6M-ZkV"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"dgK-r0-YUm"
/>
<constraint
firstItem=
"tZB-Uo-CY9"
firstAttribute=
"leading"
secondItem=
"6MO-V8-sMn"
secondAttribute=
"trailing"
id=
"dgw-bv-QfM"
/>
<constraint
firstItem=
"siW-9R-nkU"
firstAttribute=
"centerY"
secondItem=
"Zbb-dP-OOv"
secondAttribute=
"centerY"
id=
"eAW-Fj-8jr"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"7fF-Od-2O3"
secondAttribute=
"trailing"
constant=
"15"
id=
"eRm-W7-r3f"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"s2D-dg-gBi"
secondAttribute=
"trailing"
constant=
"15"
id=
"eWH-sR-ZVd"
/>
<constraint
firstItem=
"chy-ny-kVr"
firstAttribute=
"top"
secondItem=
"JdU-F8-6ck"
secondAttribute=
"bottom"
constant=
"15"
id=
"ezY-Db-N2T"
/>
...
...
@@ -358,6 +365,7 @@
<constraint
firstItem=
"4j6-NB-EJe"
firstAttribute=
"leading"
secondItem=
"yHy-KY-Uxt"
secondAttribute=
"trailing"
constant=
"10"
id=
"wja-2I-IyW"
/>
<constraint
firstItem=
"ThE-Le-aUU"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"15"
id=
"xR2-34-4SX"
/>
<constraint
firstItem=
"GM4-XT-zet"
firstAttribute=
"top"
secondItem=
"D4z-vi-ogp"
secondAttribute=
"bottom"
constant=
"15.5"
id=
"xee-zN-VOT"
/>
<constraint
firstItem=
"Zbb-dP-OOv"
firstAttribute=
"trailing"
secondItem=
"siW-9R-nkU"
secondAttribute=
"trailing"
constant=
"15"
id=
"yn4-iW-e5c"
/>
<constraint
firstItem=
"7fF-Od-2O3"
firstAttribute=
"centerY"
secondItem=
"PST-FC-fG9"
secondAttribute=
"centerY"
id=
"yyZ-7a-pit"
/>
<constraint
firstItem=
"PdO-Zj-Dft"
firstAttribute=
"top"
secondItem=
"ThE-Le-aUU"
secondAttribute=
"bottom"
constant=
"15"
id=
"zOW-Lo-3jK"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"82n-oH-pbs"
secondAttribute=
"bottom"
id=
"zlz-v0-agc"
/>
...
...
@@ -365,6 +373,7 @@
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"btn_title_lbl"
destination=
"siW-9R-nkU"
id=
"7pz-Wo-hcw"
/>
<outlet
property=
"bzqTf"
destination=
"fLT-jy-0yj"
id=
"gg1-pH-dPz"
/>
<outlet
property=
"delBtn"
destination=
"cxO-LI-2Sg"
id=
"CYL-OW-Rud"
/>
<outlet
property=
"detailLbl"
destination=
"Fr1-SS-krs"
id=
"sBl-qJ-DRF"
/>
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/入库/NewRKVc.swift
View file @
2d507706
...
...
@@ -14,6 +14,32 @@ protocol NewRKVcDelegate {
func
NewRKVcFinish
()
}
class
NewRKVc
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
NewOnlyRKCellDelegate
,
NewSelectItemVcDelegate
,
NewSelectWarehouseVCDelegate
,
GLAlertSelectViewDelegate
,
GeliAlertTextViewDelegate
,
ShowTimeSelectViewDelegate
,
GYSListViewControllerDelegate
,
GYSGLViewControllerDelegate
,
Add_Report_View_Delegate
{
var
report_sn
=
""
func
Add_Report_View_Submit_Action
(
view
:
Add_Report_View
)
{
report_sn
=
view
.
report_sn_tf
.
text
!
let
model
=
rkSelectArr
[
view
.
tag
]
let
dic
=
[
"user_token"
:
UserToken
as
Any
,
"report_sn"
:
view
.
report_sn_tf
!.
text
!
as
Any
,
"report_type"
:
view
.
select_idx
!
+
1
as
Any
,
"goods_id"
:
model
.
goods_id
as
Any
,
"sku_id"
:
model
.
sku_id
as
Any
,
"file_url"
:
view
.
img_url
as
Any
]
GoodsReportAdd
(
dic
)
{
(
data
)
in
let
model
=
data
as!
GoodsReportAddModel
let
rkModel
=
self
.
rkSelectArr
[
view
.
tag
]
rkModel
.
report_id
=
model
.
data
?
.
report_id
self
.
report_view
?
.
removeFromSuperview
()
self
.
report_view
=
nil
self
.
listView
.
reloadData
()
}
failture
:
{
(
err
)
in
}
}
func
NewSelectItemVcSelect
(
datas
:
Array
<
InputInitInfoGoodsInfoModel
>
,
pici
:
Array
<
Array
<
GetGoodBatchDataModel
>>
)
{
rkSelectArr
.
removeAll
()
datas
.
forEach
{
(
model
)
in
...
...
@@ -26,8 +52,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var
maxFiveImgsArr
:
Array
<
String
>
=
[]
//多图
func
Add_Report_View_Select_Img
(
view
:
Add_Report_View
)
{
print
(
"选择"
)
let
num
=
5
-
maxFiveImgsArr
.
count
_
=
self
.
presentHGImagePicker
(
maxSelected
:
num
)
{
(
assets
)
in
_
=
self
.
presentHGImagePicker
(
maxSelected
:
1
)
{
(
assets
)
in
//结果处理
print
(
"共选择了
\(
assets
.
count
)
张图片,分别如下:"
)
let
option
=
PHImageRequestOptions
()
...
...
@@ -35,12 +60,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
option
.
isNetworkAccessAllowed
=
true
for
asset
in
assets
{
PHImageManager
.
default
()
.
requestImage
(
for
:
asset
,
targetSize
:
PHImageManagerMaximumSize
,
contentMode
:
.
default
,
options
:
option
,
resultHandler
:
{
(
image
,
_
:
[
AnyHashable
:
Any
]?)
in
// print("上传图片==\(image)")
// self.maxFiveImgsArr.append(image!)
// let index = Dollar.indexOf(self.maxFiveImgsArr, value: image!)
self
.
maxFiveImgsArr
.
append
(
"insert"
)
//调用上传图片
// self.uploadImg(imge: image!, isOriginal: false, tag: self.maxFiveImgsArr.count-1
)
self
.
uploadImg
(
imge
:
image
!
,
isOriginal
:
true
,
tag
:
0
)
})
}
...
...
@@ -48,14 +70,33 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
}
func
uploadImg
(
imge
:
UIImage
,
isOriginal
:
Bool
,
tag
:
Int
){
let
upLoadImg
=
imge
as!
UIImage
HUD
.
show
(
.
progress
)
saveFile
(
image
:
upLoadImg
,
[
"user_token"
:
UserToken
as
Any
,
"path"
:
"category"
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
SaveFileModel
if
dataM
.
code
==
1
{
print
(
"图片上传成功
\(
dataM
.
data
?
.
url
)
"
)
self
.
report_view
?
.
img_url
=
(
dataM
.
data
?
.
url
)
!
self
.
report_view
?
.
layoutIfNeeded
()
HUD
.
hide
()
}
})
{
(
error
)
in
print
(
"图片上传失败
\(
error
)
"
)
}
}
func
GYSGLViewControllerFinish
()
{
//此处无用
}
var
ven_id
=
-
1
func
GYSListViewControllerGetGYS
(
sender
:
VendorListDataModel
)
{
holderArr
.
insert
(
sender
.
ven_name
!
,
at
:
3
)
ven_id
=
sender
.
ven_id
!
holderArr
.
remove
(
at
:
4
)
listView
.
reloadData
()
}
...
...
@@ -115,6 +156,10 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
HUD
.
flash
(
.
label
(
"请填写保质期"
),
delay
:
1.2
)
return
}
if
item
.
report_id
==
nil
{
HUD
.
flash
(
.
label
(
"请提交检测报告"
),
delay
:
1.2
)
return
}
}
HUD
.
show
(
.
progress
)
if
lgBtnTitLbl
.
text
!=
"提交申请"
{
...
...
@@ -144,7 +189,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
"subtotal"
:
total
as
Any
,
"production_data"
:
model
.
createDay
as
Any
,
"shelf_life"
:
shelf_life
as
Any
,
"report_id"
:
0
as
Any
,
"report_id"
:
model
.
report_id
as
Any
,
"pog_id"
:
model
.
pog_id
as
Any
]
goodsInfoArr
?
.
append
(
goods
)
...
...
@@ -161,6 +206,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
"i_type"
:
typeSelect
+
1
as
Any
,
"apply_remark"
:
remark
as
Any
,
"po_id"
:
po_id
as
Any
,
"ven_id"
:
ven_id
as
Any
,
//待处理
"g_type"
:
selectTypeSelect
+
1
as
Any
,
"goods_info"
:
goods_info
as
Any
]
GoodsInput
(
dict
,
success
:
{
(
data
)
in
...
...
@@ -211,6 +258,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
"i_type"
:
typeSelect
+
1
as
Any
,
"apply_remark"
:
remark
as
Any
,
"po_id"
:
po_id
as
Any
,
"ven_id"
:
ven_id
as
Any
,
"g_type"
:
selectTypeSelect
+
1
as
Any
,
"goods_info"
:
goods_info
as
Any
]
...
...
@@ -261,7 +310,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var
w_id
:
Int
?
var
p_id
:
Int
?
func
rightBtnClick
()
{
print
(
"新增供应商"
)
print
(
"新增供应商"
)
let
vc
=
GYSGLViewController
()
vc
.
delegate
=
self
vc
.
barT
=
"新增供应商信息"
...
...
@@ -281,9 +330,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
holderArr
.
remove
(
at
:
3
)
}
// let strNowTime = getTimeNow()
// holderArr.insert(strNowTime, at: 3)
// holderArr.remove(at: 4)
// let strNowTime = getTimeNow()
// holderArr.insert(strNowTime, at: 3)
// holderArr.remove(at: 4)
navbar
.
title
=
"入库"
self
.
view
.
addSubview
(
navbar
)
...
...
@@ -552,6 +601,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
if
data
.
createDayStr
!=
nil
{
cell
.
timeLbl
.
text
=
data
.
createDayStr
}
if
report_sn
.
count
>
0
{
cell
.
btn_title_lbl
.
text
=
report_sn
}
return
cell
}
...
...
@@ -627,12 +679,17 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
listView
.
reloadData
()
}
var
report_view
:
Add_Report_View
?
func
NewOnlyRKCellAddRepord
(
cell
:
NewOnlyRKCell
)
{
//添加检测报告
print
(
"添加检测报告"
)
let
vc
=
Add_Report_View
(
frame
:
self
.
view
.
bounds
)
vc
.
delegate
=
self
self
.
view
.
addSubview
(
vc
)
if
report_view
==
nil
{
let
vc
=
Add_Report_View
(
frame
:
self
.
view
.
bounds
)
vc
.
delegate
=
self
vc
.
tag
=
cell
.
tag
self
.
view
.
addSubview
(
vc
)
report_view
=
vc
}
}
func
NewOnlyRKCellDel
(
cell
:
NewOnlyRKCell
)
{
...
...
@@ -688,16 +745,16 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
vc
.
rkSelectArr
=
rkSelectArr
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
// func getStrHeight(str:String) -> CGFloat{
// let lbl = UILabel()
// lbl.text = titleArr.last
// lbl.font = UIFont.systemFont(ofSize: 13)
// lbl.sizeToFit()
// let margin = lbl.bounds.size.width + 77
// let viewSize = CGSize(width:fullScreenWidth - margin , height: CGFloat(MAXFLOAT))
// let font = UIFont.systemFont(ofSize: 13)
// return (str as NSString).boundingRect(with: viewSize, options: [.usesLineFragmentOrigin], attributes: [NSAttributedString.Key.font:font], context: nil).height
// }
// func getStrHeight(str:String) -> CGFloat{
// let lbl = UILabel()
// lbl.text = titleArr.last
// lbl.font = UIFont.systemFont(ofSize: 13)
// lbl.sizeToFit()
// let margin = lbl.bounds.size.width + 77
// let viewSize = CGSize(width:fullScreenWidth - margin , height: CGFloat(MAXFLOAT))
// let font = UIFont.systemFont(ofSize: 13)
// return (str as NSString).boundingRect(with: viewSize, options: [.usesLineFragmentOrigin], attributes: [NSAttributedString.Key.font:font], context: nil).height
// }
//MARK: - cell delegate
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
0
{
...
...
@@ -816,7 +873,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
listView
.
reloadData
()
}
func
GLASClose
(
view
:
GLAlertSelectView
,
selectnum
:
Int
,
selectArr
:
Array
<
Int
>
)
{
if
view
.
tag
==
2
{
typeSelect
=
selectnum
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/CKGmCell.swift
View file @
2d507706
...
...
@@ -146,7 +146,10 @@ class CKGmCell: UITableViewCell {
make
.
centerY
.
equalTo
(
view
.
snp_centerY
)
make
.
width
.
equalTo
(
171.5
)
}
rightL2
.
text
=
"
\(
model
.
chuHuoLiang
!
)
"
rightL2
.
text
=
"-"
if
model
.
ven_name
!=
nil
{
rightL2
.
text
=
model
.
ven_name
}
}
}
scrollView
.
contentSize
=
CGSize
(
width
:
495.0
,
height
:
38.5
+
30.0
*
CGFloat
(
dataArr
!.
count
))
...
...
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
View file @
2d507706
This diff is collapsed.
Click to expand it.
GeliBusinessPlatform/ViewController/供应商管理/GYSGLViewController.swift
View file @
2d507706
...
...
@@ -405,9 +405,7 @@ class GYSGLViewController: BaseViewController,UITableViewDelegate,UITableViewDat
for
asset
in
assets
{
PHImageManager
.
default
()
.
requestImage
(
for
:
asset
,
targetSize
:
PHImageManagerMaximumSize
,
contentMode
:
.
default
,
options
:
option
,
resultHandler
:
{
(
image
,
_
:
[
AnyHashable
:
Any
]?)
in
// print("上传图片==\(image)")
self
.
uploadImg
(
imge
:
image
!
,
isOriginal
:
true
,
tag
:
indexPath
.
row
)
})
}
self
.
listView
.
reloadData
()
...
...
GeliBusinessPlatform/ViewController/出入库记录/CRKXiangQVC.swift
View file @
2d507706
...
...
@@ -320,7 +320,8 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
"shelf_life"
:
model
.
shelf_life
as
Any
,
"valid_date"
:
model
.
valid_date
as
Any
,
"batch_id"
:
model
.
batch_id
as
Any
,
"report_id"
:
model
.
report_id
as
Any
"report_id"
:
model
.
report_id
as
Any
,
"ven_id"
:
model
.
ven_id
as
Any
]
batchInfo
.
append
(
batch
)
}
...
...
@@ -515,6 +516,17 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
if
data
.
report_sn
!=
nil
{
cell
.
baogao
.
text
=
"报告:"
+
"
\(
data
.
report_sn
!
)
"
}
cell
.
pi_ci_lbl
.
text
=
"商品批次:无"
if
data
.
batch_id
!=
nil
{
cell
.
pi_ci_lbl
.
text
=
"商品批次:"
+
"
\(
data
.
batch_id
!
)
"
}
cell
.
gys_lbl
.
text
=
"供应商:无"
if
data
.
ven_name
!=
nil
{
cell
.
gys_lbl
.
text
=
"供应商:"
+
"
\(
data
.
ven_name
!
)
"
}
return
cell
}
else
{
let
model
=
inGoodsModels
!
[
indexPath
.
row
]
...
...
@@ -557,6 +569,8 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
if
model
.
report_sn
!=
nil
{
cell
.
baogao
.
text
=
"报告:"
+
"
\(
model
.
report_sn
!
)
"
}
return
cell
}
...
...
@@ -603,6 +617,10 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
cell
.
baozhiQ
.
text
=
"报告:"
+
"
\(
model
.
report_sn
!
)
"
}
cell
.
baogao
.
isHidden
=
true
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"NewCKCell"
)
as!
NewCKCell
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
2d507706
...
...
@@ -440,8 +440,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
return
case
51
:
//品牌列表
// HUD.flash(.label("敬请期待"),delay: 1.2)
let
vc
=
PinPaiListViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
let
vc
=
PinPaiListViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
53
:
//销售下单-代客下单
let
vc
=
DaiKeXiaDanGouWuViewController
()
...
...
GeliBusinessPlatform/ViewController/新增、编辑品牌/XinZengPinPaiViewController.swift
View file @
2d507706
...
...
@@ -181,23 +181,23 @@ class XinZengPinPaiViewController: BaseViewController,UITableViewDataSource,UITa
self
.
listView
.
reloadData
()
}
}
func
uploadImg
(
imge
:
UIImage
,
isOriginal
:
Bool
,
tag
:
Int
){
let
upLoadImg
=
imge
as!
UIImage
HUD
.
show
(
.
progress
)
saveFile
(
image
:
upLoadImg
,
[
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
SaveFileModel
if
dataM
.
code
==
1
{
func
uploadImg
(
imge
:
UIImage
,
isOriginal
:
Bool
,
tag
:
Int
){
let
upLoadImg
=
imge
as!
UIImage
HUD
.
show
(
.
progress
)
saveFile
(
image
:
upLoadImg
,
[
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
SaveFileModel
if
dataM
.
code
==
1
{
print
(
"图片上传成功
\(
dataM
.
data
?
.
url
)
"
)
self
.
iconUrl
=
dataM
.
data
!.
url
!
self
.
listView
.
reloadData
()
HUD
.
hide
()
}
print
(
"图片上传成功
\(
dataM
.
data
?
.
url
)
"
)
self
.
iconUrl
=
dataM
.
data
!.
url
!
self
.
listView
.
reloadData
()
HUD
.
hide
()
})
{
(
error
)
in
print
(
"图片上传失败
\(
error
)
"
)
}
})
{
(
error
)
in
print
(
"图片上传失败
\(
error
)
"
)
}
}
}
GeliBusinessPlatform/ViewController/溯源/Add_Report_View.swift
View file @
2d507706
...
...
@@ -10,23 +10,54 @@ import UIKit
import
LGButton
protocol
Add_Report_View_Delegate
{
func
Add_Report_View_Select_Img
(
view
:
Add_Report_View
)
func
Add_Report_View_Submit_Action
(
view
:
Add_Report_View
)
}
class
Add_Report_View
:
UIView
{
override
func
layoutIfNeeded
()
{
super
.
layoutIfNeeded
()
if
img_url
.
count
>
0
{
bg_view_width
.
constant
=
80
img_bg
.
backgroundColor
=
UIColor
.
red
let
imgView
=
UIImageView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
80
,
height
:
img_bg
.
bounds
.
size
.
height
))
add_img_btn
.
isHidden
=
true
self
.
img_bg
.
addSubview
(
imgView
)
imgView
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
img_url
))
{
(
img
,
err
,
type
,
url
)
in
}
}
}
@IBOutlet
weak
var
report_sn_tf
:
UITextField
!
var
delegate
:
Add_Report_View_Delegate
?
var
img_url
=
""
@IBOutlet
weak
var
select_view
:
UIView
!
var
select_idx
:
Int
?{
var
select_idx
:
Int
?
=
-
1
{
didSet
{
if
select_idx
!=
nil
{
select_img
.
isHidden
=
false
}
}
}
@IBOutlet
weak
var
img_bg
:
UIView
!
@IBOutlet
weak
var
bg_view_width
:
NSLayoutConstraint
!
@IBAction
func
add_img_action
(
_
sender
:
UIButton
)
{
delegate
?
.
Add_Report_View_Select_Img
(
view
:
self
)
}
@IBOutlet
weak
var
add_img_btn
:
UIButton
!
@IBAction
func
submit_action
(
_
sender
:
UIButton
)
{
if
report_sn_tf
.
text
?
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请输入报告编码"
),
delay
:
1.2
)
return
}
if
select_idx
==
-
1
{
HUD
.
flash
(
.
label
(
"请选择报告类型"
),
delay
:
1.2
)
return
}
if
img_url
.
count
==
0
{
HUD
.
flash
(
.
label
(
"请选择报告图片"
),
delay
:
1.2
)
return
}
delegate
?
.
Add_Report_View_Submit_Action
(
view
:
self
)
close_action
(
sender
)
}
@IBOutlet
weak
var
img_y
:
NSLayoutConstraint
!
...
...
GeliBusinessPlatform/ViewController/溯源/Add_Report_View.xib
View file @
2d507706
...
...
@@ -14,7 +14,9 @@
<connections>
<outlet
property=
"add_img_btn"
destination=
"glR-fE-Q1j"
id=
"6j1-UX-imB"
/>
<outlet
property=
"bg_view_width"
destination=
"HNq-up-1f4"
id=
"lZj-gw-mXg"
/>
<outlet
property=
"img_bg"
destination=
"QcK-RN-zvv"
id=
"QTU-iL-Yty"
/>
<outlet
property=
"img_y"
destination=
"Mng-xH-L9j"
id=
"HGL-mf-Nhb"
/>
<outlet
property=
"report_sn_tf"
destination=
"XkS-5B-cWo"
id=
"cYz-x9-CTZ"
/>
<outlet
property=
"select_img"
destination=
"yX5-IM-zDi"
id=
"Zzc-iq-lu0"
/>
<outlet
property=
"select_view"
destination=
"1E2-Hg-cjR"
id=
"Sdj-rQ-VHu"
/>
<outlet
property=
"type_lbl"
destination=
"aY2-2z-Z3V"
id=
"6ct-wS-9Wv"
/>
...
...
GeliBusinessPlatform/ViewController/订单列表/OrderListVC.swift
View file @
2d507706
...
...
@@ -353,7 +353,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
var
agreeType
=
10086
func
allBtnSubmit
(
sender
:
UIButton
)
{
let
rowModel
=
self
.
dataArr
[
sender
.
tag
]
print
(
"title == "
,
sender
.
tag
,
sender
.
titleLabel
?
.
text
,
rowModel
.
order_type
)
print
(
"title == "
,
sender
.
tag
)
if
rowModel
.
order_type
==
5
&&
(
sender
.
titleLabel
?
.
text
?
.
contains
(
"退款"
))
==
true
{
let
vc
=
OrderDViewController
()
vc
.
delegate
=
self
...
...
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