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
6035c146
Commit
6035c146
authored
May 26, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单详情的修改价格
parent
6314d778
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
112 additions
and
11 deletions
+112
-11
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+4
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+10
-0
GeliBusinessPlatform/Define/StringFile.swift
GeliBusinessPlatform/Define/StringFile.swift
+60
-0
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+1
-0
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
...orm/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
+23
-9
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.xib
...tform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.xib
+2
-2
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
...ssPlatform/ViewController/订单详情/OrderDViewController.swift
+12
-0
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
6035c146
...
...
@@ -474,6 +474,7 @@
F9DDBE922457BFEC00A32CB2
/* HUDEXT.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
;
};
F9DDBE962457D3EC00A32CB2
/* WebViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE942457D3EC00A32CB2
/* WebViewController.swift */
;
};
F9DDBE972457D3EC00A32CB2
/* WebViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9DDBE952457D3EC00A32CB2
/* WebViewController.xib */
;
};
F9FF1E45247D1F670026FCE3
/* StringFile.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9FF1E44247D1F670026FCE3
/* StringFile.swift */
;
};
F9FF7BA124760DA9006E305E
/* LogisticsCompanyModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F9FF7BA024760DA9006E305E
/* LogisticsCompanyModel.swift */
;
};
/* End PBXBuildFile section */
...
...
@@ -1026,6 +1027,7 @@
F9DDBE912457BFEC00A32CB2
/* HUDEXT.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HUDEXT.swift
;
sourceTree
=
"<group>"
;
};
F9DDBE942457D3EC00A32CB2
/* WebViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WebViewController.swift
;
sourceTree
=
"<group>"
;
};
F9DDBE952457D3EC00A32CB2
/* WebViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WebViewController.xib
;
sourceTree
=
"<group>"
;
};
F9FF1E44247D1F670026FCE3
/* StringFile.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
StringFile.swift
;
sourceTree
=
"<group>"
;
};
F9FF7BA024760DA9006E305E
/* LogisticsCompanyModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LogisticsCompanyModel.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
...
...
@@ -1503,6 +1505,7 @@
E09B03A22445AF9500211A51
/* NetworkRequest.swift */
,
E09B03A02445AF7100211A51
/* Define.swift */
,
E01C26BA2446D68500ADCC70
/* Bridge_Header.h */
,
F9FF1E44247D1F670026FCE3
/* StringFile.swift */
,
);
path
=
Define
;
sourceTree
=
"<group>"
;
...
...
@@ -2783,6 +2786,7 @@
E0228BB0246FDA9A005812FA
/* TitleAndLblCell.swift in Sources */
,
F950FDA92451613500C40530
/* GetMobileModel.swift in Sources */
,
F94A314724624E9500FEC38E
/* GetGelipayInfoModel.swift in Sources */
,
F9FF1E45247D1F670026FCE3
/* StringFile.swift in Sources */
,
E0B5307E247266F400FFCC15
/* DKXDAdrCell.swift in Sources */
,
F93E31FD24727A2D00524DFC
/* ShowTimeSelectView.swift in Sources */
,
E0B94623245671E100FBEC9A
/* DaiKeXiaDanGouWuViewController.swift in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
6035c146
No preview for this file type
GeliBusinessPlatform/Define/Define.swift
View file @
6035c146
...
...
@@ -126,6 +126,16 @@ func isPurnInt(string: String) -> Bool {
}
//MARK:--是否是正确的数值
func
isPurnNumber
(
str
:
String
)
->
Bool
{
// let expression = "^[0-9]*((\\.|,)[0-9]{0,2})?$"
if
str
.
count
>
0
{
var
predicateStr
:
String
!
var
currObject
:
String
!
predicateStr
=
"^[0-9]*((
\\
.|,)[0-9]{0,2})?$"
currObject
=
str
let
predicate
=
NSPredicate
(
format
:
"SELF MATCHES %@"
,
predicateStr
)
return
predicate
.
evaluate
(
with
:
currObject
)
}
let
arr
=
str
.
components
(
separatedBy
:
","
)
if
arr
.
count
>
0
{
var
num
=
""
...
...
GeliBusinessPlatform/Define/StringFile.swift
0 → 100644
View file @
6035c146
//
// StringFile.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/5/26.
// Copyright © 2020 junye lu. All rights reserved.
//
import
Foundation
enum
Validate
{
case
email
(
_
:
String
)
case
phoneNum
(
_
:
String
)
case
carNum
(
_
:
String
)
case
username
(
_
:
String
)
case
password
(
_
:
String
)
case
nickname
(
_
:
String
)
case
URL
(
_
:
String
)
case
IP
(
_
:
String
)
case
priceNum
(
_
:
String
)
var
isRight
:
Bool
{
var
predicateStr
:
String
!
var
currObject
:
String
!
switch
self
{
case
let
.
email
(
str
):
predicateStr
=
"^([a-z0-9_
\\
.-]+)@([
\\
da-z
\\
.-]+)
\\
.([a-z
\\
.]{2,6})$"
currObject
=
str
case
let
.
phoneNum
(
str
):
predicateStr
=
"^((13[0-9])|(15[^4,
\\
D]) |(17[0,0-9])|(18[0,0-9]))
\\
d{8}$"
currObject
=
str
case
let
.
carNum
(
str
):
predicateStr
=
"^[A-Za-z]{1}[A-Za-z_0-9]{5}$"
currObject
=
str
case
let
.
username
(
str
):
predicateStr
=
"^[A-Za-z0-9]{6,20}+$"
currObject
=
str
case
let
.
password
(
str
):
predicateStr
=
"^[a-zA-Z0-9]{6,20}+$"
currObject
=
str
case
let
.
nickname
(
str
):
predicateStr
=
"^[
\\
u4e00-
\\
u9fa5]{4,8}$"
currObject
=
str
case
let
.
URL
(
str
):
predicateStr
=
"^(https?:
\\
/
\\
/)?([
\\
da-z
\\
.-]+)
\\
.([a-z
\\
.]{2,6})([
\\
/
\\
w
\\
.-]*)*
\\
/?$"
currObject
=
str
case
let
.
IP
(
str
):
predicateStr
=
"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
\\
.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
currObject
=
str
case
let
.
priceNum
(
str
):
predicateStr
=
"^[0-9]*((
\\
.|,)[0-9]{0,2})?$"
currObject
=
str
}
let
predicate
=
NSPredicate
(
format
:
"SELF MATCHES %@"
,
predicateStr
)
return
predicate
.
evaluate
(
with
:
currObject
)
}
}
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
6035c146
...
...
@@ -115,6 +115,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
let
dataM
=
data
as!
UpDataModel
if
dataM
.
code
==
1
{
HUD
.
flash
(
.
label
(
"提交成功"
),
delay
:
1.2
)
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"orderChange"
),
object
:
nil
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
HUD
.
hide
()
...
...
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.swift
View file @
6035c146
...
...
@@ -59,19 +59,33 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
}
}
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
IQKeyboardManager
.
shared
.
resignFirstResponder
()
//MARK:--输入点确定后,修改数据
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
for
i
in
0
..<
dataArr
!.
count
{
if
i
==
textField
.
tag
{
let
md
=
dataArr
!
[
i
]
md
.
goods_price
=
textField
.
text
//记录哪个更改了
md
.
is_edit
=
1
if
isPurnNumber
(
str
:
textField
.
text
!
)
{
md
.
goods_price
=
textField
.
text
//记录哪个更改了
md
.
is_edit
=
1
}
}
}
return
true
self
.
tableV
.
reloadData
()
}
// func textFieldShouldReturn(_ textField: UITextField) -> Bool {
//// IQKeyboardManager.shared.resignFirstResponder()
// //MARK:--输入点确定后,修改数据
// for i in 0..<dataArr!.count {
// if i == textField.tag {
// let md = dataArr![i]
// md.goods_price = textField.text
// //记录哪个更改了
// md.is_edit = 1
// }
// }
// return true
// }
var
tableV
:
UITableView
!
...
...
@@ -101,14 +115,14 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"ChangePriceNormalCell"
)
as!
ChangePriceNormalCell
let
rowModel
=
dataArr
!
[
indexPath
.
row
]
//图片暂不处理
// cell.imageView?.kf.setImage(with: <#T##Resource?#>)
cell
.
goodsImgVire
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
rowModel
.
goods_thumb
!
))
cell
.
goodsNameLbl
.
text
=
rowModel
.
goods_name
cell
.
attrrLbl
.
text
=
rowModel
.
goods_attr
cell
.
priceTf
.
text
=
rowModel
.
goods_price
cell
.
detailLbl
.
isHidden
=
true
cell
.
priceTf
.
delegate
=
self
cell
.
priceTf
.
returnKeyType
=
.
done
cell
.
priceTf
.
keyboardType
=
.
decimalPad
cell
.
priceTf
.
tag
=
indexPath
.
row
return
cell
}
...
...
GeliBusinessPlatform/ViewController/订单管理/普通商品修改价格/ChangeGoodsPriceVC.xib
View file @
6035c146
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
...
GeliBusinessPlatform/ViewController/订单详情/OrderDViewController.swift
View file @
6035c146
...
...
@@ -429,6 +429,18 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell
.
textTF
.
isUserInteractionEnabled
=
false
cell
.
nameLbl
.
text
=
nonYuShouPart3Arr
[
indexPath
.
row
]
cell
.
textTF
.
text
=
"-"
if
self
.
dataMdoel
?
.
receiving
!=
nil
{
switch
indexPath
.
row
{
case
0
:
cell
.
textTF
.
text
=
self
.
dataMdoel
?
.
receiving
?
.
consignee
case
1
:
cell
.
textTF
.
text
=
self
.
dataMdoel
?
.
receiving
?
.
mobile
case
2
:
cell
.
textTF
.
text
=
self
.
dataMdoel
?
.
receiving
?
.
addr_str
default
:
break
}
}
return
cell
case
4
:
//MARK:--订单信息cell
...
...
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