Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
02d928ff
authored
Mar 02, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整数量校验
parent
ce24b594
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
5 deletions
public/js/change_order.js
public/js/goods.js
resources/views/changeOrder/content.blade.php
public/js/change_order.js
View file @
02d928ff
...
...
@@ -183,7 +183,34 @@
}
})
// 输入数量、单价校验
// 输入数量校验
$
(
document
).
off
().
delegate
(
'.change_number'
,
'keyup'
,
function
(){
var
val
=
$
(
this
).
val
();
var
reg
=
/^
\d{0,8}
$/g
;
if
(
!
val
)
return
false
;
if
(
!
(
reg
.
test
(
val
)))
{
if
(
isNaN
(
parseInt
(
val
))){
layer
.
msg
(
'只能是数字组成'
);
$
(
this
).
val
(
''
);
}
else
{
$
(
this
).
val
(
parseInt
(
val
));
}
}
if
(
val
<
0
)
{
layer
.
msg
(
'只能是正整数'
);
$
(
this
).
val
(
''
);
return
false
;
}
if
(
val
.
length
>
8
){
$
(
this
).
val
(
val
.
slice
(
0
,
8
));
}
});
// 输入单价校验
$
(
'#checkOrderForm'
).
off
().
delegate
(
'.only_number'
,
'keyup'
,
function
(){
if
(
$
(
this
).
val
()
==
''
)
return
false
;
...
...
public/js/goods.js
View file @
02d928ff
...
...
@@ -151,7 +151,7 @@
html
+=
'<td>\
<input class="
only_number num change_goods
_number" name="change_info['
+
curr_no
+
'][goods_number]" value="'
+
order_item
.
goods_number
+
'">\
<input class="
num change
_number" name="change_info['
+
curr_no
+
'][goods_number]" value="'
+
order_item
.
goods_number
+
'">\
</td>\
<td>\
<input class="price only_number" name="change_info['
+
curr_no
+
'][goods_price]" data-price="'
+
order_item
.
goods_price
+
'" value="'
+
order_item
.
goods_price
+
'">\
...
...
@@ -357,7 +357,7 @@
<i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true" data-type=2></i>\
</td>\
<td>\
<input class="
only_number num change_goods
_number" name="change_info['
+
curr_no
+
'][goods_number]" value="'
+
add_goods_number
+
'">\
<input class="
num change
_number" name="change_info['
+
curr_no
+
'][goods_number]" value="'
+
add_goods_number
+
'">\
</td>\
<td>\
<input class="price only_number" name="change_info['
+
curr_no
+
'][goods_price]" data-price="'
+
add_goods_price
+
'" value="'
+
add_goods_price
+
'">\
...
...
resources/views/changeOrder/content.blade.php
View file @
02d928ff
...
...
@@ -209,7 +209,7 @@
</td>
@endif
<td>
<input
type=
"text"
class=
"
only_number num change_goods
_number"
name=
"change_info[{{$v['rec_id']}}][goods_number]"
value=
"{{$v['goods_number']}}"
<?=
$v
[
'status'
]
==
-
1
?
'readonly'
:
''
?>
>
<input
type=
"text"
class=
"
num change
_number"
name=
"change_info[{{$v['rec_id']}}][goods_number]"
value=
"{{$v['goods_number']}}"
<?=
$v
[
'status'
]
==
-
1
?
'readonly'
:
''
?>
>
</td>
<td>
<input
type=
"text"
class=
"price only_number change_goods_price"
name=
"change_info[{{$v['rec_id']}}][goods_price]"
data-origin=
"{{$v['original_price']}}"
data-price=
"{{$v['goods_price']}}"
value=
"{{$v['goods_price']}}"
<?=
$v
[
'status'
]
==
-
1
?
'readonly'
:
''
?>
>
...
...
@@ -217,7 +217,7 @@
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
<td>
<input
type=
"text"
class=
"
only
_number"
name=
"change_info[{{$v['rec_id']}}][delivery_time]"
value=
"{{$v['delivery_time']}}"
placeholder=
"请填写天数"
>
<input
type=
"text"
class=
"
change
_number"
name=
"change_info[{{$v['rec_id']}}][delivery_time]"
value=
"{{$v['delivery_time']}}"
placeholder=
"请填写天数"
>
</td>
<td>
<!-- 未锁库存 -->
...
...
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