Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
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
51e518ea
authored
Nov 24, 2022
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
详情
parent
18016f2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
public/assets/js/order/index.js
resources/views/admin/pages/order-page.blade.php
public/assets/js/order/index.js
View file @
51e518ea
...
...
@@ -47,7 +47,11 @@ layui.use(['form', 'table', 'laydate'], function () {
return
'<span>'
+
d
.
goods_number
+
'</span><input class="hide-input input-style goods_number" value="'
+
d
.
goods_number
+
'"/>'
}
},
{
field
:
'total_amount'
,
title
:
'小计'
,
width
:
120
},
{
field
:
'total_amount'
,
title
:
'小计'
,
width
:
120
,
templet
(
d
)
{
return
'<span class="total_amount">'
+
d
.
total_amount
+
'</span>'
}
},
{
field
:
'delivery_time'
,
title
:
'货期'
,
width
:
120
},
{
field
:
'batch'
,
title
:
'批次'
,
width
:
120
},
{
field
:
'remarks'
,
title
:
'客户备注'
,
width
:
120
},
...
...
@@ -163,12 +167,15 @@ layui.use(['form', 'table', 'laydate'], function () {
return
this
;
},
calcTotal
:
function
(
goods_price
,
goods_number
,
obj
)
{
$
(
obj
).
empty
().
text
(
goods_price
*
goods_number
);
},
handleBind
:
function
()
{
//国家/地区
$
(
document
).
on
(
'change'
,
'select[name="country"]'
,
function
(
)
{
var
country_name
=
$
(
this
).
find
(
'option:selected'
).
text
()
;
var
type
=
$
(
this
).
attr
(
'data'
);
layui
.
form
.
on
(
'select(countryChange)'
,
function
(
data
)
{
var
country_name
=
data
.
elem
[
data
.
elem
.
selectedIndex
].
text
;
var
type
=
$
(
data
.
elem
).
attr
(
'data'
);
if
(
type
==
1
)
{
//收货信息
layui
.
form
.
val
(
'receiveInfo'
,
{
...
...
@@ -262,6 +269,22 @@ layui.use(['form', 'table', 'laydate'], function () {
$
(
data
.
elem
).
parent
().
parent
().
find
(
'.show'
).
hide
();
});
//单价
$
(
document
).
on
(
'input'
,
'.goods_price'
,
debounce
(
function
(
e
)
{
var
goods_price
=
$
(
this
).
val
()
*
1
;
var
goods_number
=
$
(
this
).
parent
().
parent
().
parent
().
find
(
'.goods_number'
).
val
()
*
1
;
var
obj
=
$
(
this
).
parent
().
parent
().
parent
().
find
(
'.total_amount'
);
IndexController
.
calcTotal
(
goods_price
,
goods_number
,
obj
);
},
800
))
//数量
$
(
document
).
on
(
'input'
,
'.goods_number'
,
debounce
(
function
(
e
)
{
var
goods_number
=
$
(
this
).
val
()
*
1
;
var
goods_price
=
$
(
this
).
parent
().
parent
().
parent
().
find
(
'.goods_price'
).
val
()
*
1
;
var
obj
=
$
(
this
).
parent
().
parent
().
parent
().
find
(
'.total_amount'
);
IndexController
.
calcTotal
(
goods_price
,
goods_number
,
obj
);
},
800
))
//监听运费 支付手续费
$
(
document
).
on
(
'input'
,
'.change-num'
,
debounce
(
function
(
e
)
{
var
self
=
$
(
this
);
...
...
resources/views/admin/pages/order-page.blade.php
View file @
51e518ea
...
...
@@ -224,7 +224,7 @@
<div class="
layui
-
form
-
mid
mid
-
width
">
{
{$info['receiveInfo']['country_name']}
}
</div>
<div class="
show
" style="
display
:
none
;
width
:
158
px
;
">
<input type="
hidden
" name="
country_name
" value="">
<select data="
1
" name="
country
" style="
height
:
30
px
;
border
:
1
px
solid
#eee;background: transparent;width: 100%;">
<select data="
1
" name="
country
"
lay-filter="
countryChange
"
style="
height
:
30
px
;
border
:
1
px
solid
#eee;background: transparent;width: 100%;">
<
option
value
=
""
>
请选择国家
</
option
>
@
foreach
(
\App\Models\Country
::
getCountryMap
()
as
$cid
=>
$cname
)
<
option
data
=
"
{
{$cname}
}
"
value
=
"
{
{$cid}}">{{$cname}
}
</option>
...
...
@@ -333,7 +333,7 @@
<div class="
layui
-
form
-
mid
mid
-
width
">
{
{$info['billingInfo']['country_name']}
}
</div>
<div class="
show
" style="
display
:
none
;
width
:
158
px
;
">
<input type="
hidden
" name="
country_name
" value="">
<select data="
2
" name="
country
" style="
height
:
30
px
;
border
:
1
px
solid
#eee;background: transparent;width: 100%;">
<select data="
2
" name="
country
"
lay-filter="
countryChange
"
style="
height
:
30
px
;
border
:
1
px
solid
#eee;background: transparent;width: 100%;">
<
option
value
=
""
>
请选择国家
</
option
>
@
foreach
(
\App\Models\Country
::
getCountryMap
()
as
$cid
=>
$cname
)
<
option
data
=
"
{
{$cname}
}
"
value
=
"
{
{$cid}}">{{$cname}
}
</option>
...
...
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