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
18016f2c
authored
Nov 24, 2022
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
cccc9bf5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
public/assets/js/order/index.js
resources/views/admin/pages/order-page.blade.php
public/assets/js/order/index.js
View file @
18016f2c
...
@@ -165,6 +165,23 @@ layui.use(['form', 'table', 'laydate'], function () {
...
@@ -165,6 +165,23 @@ layui.use(['form', 'table', 'laydate'], function () {
},
},
handleBind
:
function
()
{
handleBind
:
function
()
{
//国家/地区
$
(
document
).
on
(
'change'
,
'select[name="country"]'
,
function
()
{
var
country_name
=
$
(
this
).
find
(
'option:selected'
).
text
();
var
type
=
$
(
this
).
attr
(
'data'
);
if
(
type
==
1
)
{
//收货信息
layui
.
form
.
val
(
'receiveInfo'
,
{
country_name
:
country_name
})
}
else
{
//账单邮寄信息
layui
.
form
.
val
(
'billingInfo'
,
{
country_name
:
country_name
})
}
});
//收货信息
//收货信息
layui
.
form
.
on
(
'submit(receiveInfoSubmit)'
,
function
(
data
)
{
layui
.
form
.
on
(
'submit(receiveInfoSubmit)'
,
function
(
data
)
{
var
text
=
$
(
data
.
elem
).
text
();
var
text
=
$
(
data
.
elem
).
text
();
...
@@ -189,6 +206,30 @@ layui.use(['form', 'table', 'laydate'], function () {
...
@@ -189,6 +206,30 @@ layui.use(['form', 'table', 'laydate'], function () {
return
false
;
return
false
;
});
});
//账单邮寄信息
layui
.
form
.
on
(
'submit(billingInfoSubmit)'
,
function
(
data
)
{
var
text
=
$
(
data
.
elem
).
text
();
if
(
text
==
'修改'
)
{
$
(
data
.
elem
).
text
(
'保存'
);
$
(
data
.
elem
).
next
().
show
();
$
(
data
.
elem
).
parent
().
parent
().
find
(
'.show'
).
prev
().
hide
();
$
(
data
.
elem
).
parent
().
parent
().
find
(
'.show'
).
show
();
return
false
;
}
else
{
Request
(
'/api/order/editOrderAdress'
,
'POST'
,
data
.
field
,
function
(
res
)
{
if
(
res
.
code
==
0
)
{
layer
.
msg
(
'操作成功'
,
{
shift
:
0
,
time
:
2000
},
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
});
}
else
{
layer
.
msg
(
res
.
msg
);
}
});
}
return
false
;
});
//结算信息
//结算信息
layui
.
form
.
on
(
'submit(settlementInfoSubmit)'
,
function
(
data
)
{
layui
.
form
.
on
(
'submit(settlementInfoSubmit)'
,
function
(
data
)
{
var
text
=
$
(
data
.
elem
).
text
();
var
text
=
$
(
data
.
elem
).
text
();
...
@@ -230,6 +271,39 @@ layui.use(['form', 'table', 'laydate'], function () {
...
@@ -230,6 +271,39 @@ layui.use(['form', 'table', 'laydate'], function () {
$
(
"#order_total_amount"
).
empty
().
text
(
freight_charge
+
pay_commission
+
order_amount
);
$
(
"#order_total_amount"
).
empty
().
text
(
freight_charge
+
pay_commission
+
order_amount
);
},
800
))
},
800
))
//同收货地址
layui
.
form
.
on
(
'switch(switchChange)'
,
function
(
data
)
{
if
(
data
.
elem
.
checked
)
{
layui
.
form
.
val
(
'billingInfo'
,
{
shipping_name
:
layui
.
form
.
val
(
'receiveInfo'
).
shipping_name
,
shipping_sn
:
layui
.
form
.
val
(
'receiveInfo'
).
shipping_sn
,
consignee
:
layui
.
form
.
val
(
'receiveInfo'
).
consignee
,
company_name
:
layui
.
form
.
val
(
'receiveInfo'
).
company_name
,
email
:
layui
.
form
.
val
(
'receiveInfo'
).
email
,
phone
:
layui
.
form
.
val
(
'receiveInfo'
).
phone
,
country
:
layui
.
form
.
val
(
'receiveInfo'
).
country
,
province
:
layui
.
form
.
val
(
'receiveInfo'
).
province
,
city
:
layui
.
form
.
val
(
'receiveInfo'
).
city
,
post_code
:
layui
.
form
.
val
(
'receiveInfo'
).
post_code
,
detail_address
:
layui
.
form
.
val
(
'receiveInfo'
).
detail_address
})
}
else
{
layui
.
form
.
val
(
'billingInfo'
,
{
shipping_name
:
''
,
shipping_sn
:
''
,
consignee
:
''
,
company_name
:
''
,
email
:
''
,
phone
:
''
,
country
:
''
,
province
:
''
,
city
:
''
,
post_code
:
''
,
detail_address
:
''
})
}
});
return
this
;
return
this
;
}
}
}
}
...
...
resources/views/admin/pages/order-page.blade.php
View file @
18016f2c
This diff is collapsed.
Click to expand it.
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