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
ccb75cb3
authored
Mar 05, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
审核时校验数量、单价
parent
1ea125fc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
public/js/order.js
resources/views/detail/changeOrder.blade.php
public/js/order.js
View file @
ccb75cb3
...
...
@@ -1664,7 +1664,7 @@
});
$
(
'.o
nly_number'
).
off
().
on
(
'keyup'
,
function
(){
$
(
'.o
rder-change-table'
).
delegate
(
'.only_number'
,
'keyup'
,
function
(){
if
(
!
$
(
this
).
val
()){
return
false
;
}
...
...
@@ -1693,7 +1693,7 @@
});
// 调整价格
$
(
'.order-change-table input'
).
off
().
on
(
'
blur
'
,
function
(
e
){
$
(
'.order-change-table input'
).
off
().
on
(
'
keyup
'
,
function
(
e
){
e
.
preventDefault
();
var
table
=
$
(
'.order-change-table'
);
...
...
@@ -1961,6 +1961,32 @@
return
false
;
}
// 校验商品数量、单价
var
change_price
=
false
;
var
change_goods_number
=
false
;
var
change_str
=
''
;
$
(
'.order-change-table'
).
find
(
'tbody tr'
).
each
(
function
(){
var
goods_number
=
$
(
this
).
find
(
'.change_goods_number'
).
val
();
var
price
=
$
(
this
).
find
(
'.price'
).
val
();
var
goods_name
=
$
(
this
).
find
(
'.change_goods_name'
).
val
();
if
(
goods_number
==
''
||
goods_number
==
0
)
{
change_goods_number
=
true
;
change_str
+=
goods_name
+
'数量不能为0或空 '
;
}
if
(
price
==
''
||
price
==
0
)
{
change_price
=
true
;
change_str
+=
goods_name
+
'单价不能为0或空 '
;
}
})
if
(
change_price
||
change_goods_number
)
{
layer
.
alert
(
change_str
)
return
false
;
}
// 预付款
if
(
pay_type
==
2
)
{
var
deposit_amount
=
$
(
'input[name=deposit_amount]'
).
val
();
...
...
resources/views/detail/changeOrder.blade.php
View file @
ccb75cb3
...
...
@@ -121,7 +121,7 @@
<p>
{{$v['goods_name']}}
</p>
</td>
<td>
<input
class=
"only_positive_nubme only_number num"
name=
"change_info[{{$v['rec_id']}}][goods_number]"
value=
"{{$v['goods_number']}}"
>
<input
class=
"only_positive_nubme only_number num
change_goods_number
"
name=
"change_info[{{$v['rec_id']}}][goods_number]"
value=
"{{$v['goods_number']}}"
>
</td>
<td>
<span>
{{$currency}}
</span>
...
...
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