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
2c3fcf9a
authored
Nov 30, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
temp
parent
bbd9d3e2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
23 deletions
app/Http/Controllers/AddOrderController.php
app/Http/routes.php
public/css/detail.css
public/js/add_order.js
resources/views/addOnline/content.blade.php
resources/views/addOrder/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
2c3fcf9a
...
...
@@ -10,6 +10,7 @@ use Cookie;
use
App\Http\Page
;
use
App\Http\Controllers\PermController
;
use
App\Http\Error
;
use
Excel
;
Class
AddOrderController
extends
Controller
{
...
...
@@ -593,4 +594,18 @@ Class AddOrderController extends Controller
}
}
// 商品批量导入
public
function
batchGoodsImport
(
Request
$request
)
{
echo
'<pre>'
;
print_r
(
$_FILES
);
print_r
(
$request
->
input
());
die
;
$filePath
=
'storage/exports/'
.
iconv
(
'UTF-8'
,
'GBK'
,
'学生成绩'
)
.
'.xls'
;
Excel
::
load
(
$filePath
,
function
(
$reader
)
{
$data
=
$reader
->
all
();
dd
(
$data
);
});
}
}
\ No newline at end of file
app/Http/routes.php
View file @
2c3fcf9a
...
...
@@ -100,6 +100,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
post
(
'/ajax/selfCheck'
,
'AddOrderController@selfCheck'
);
Route
::
post
(
'/ajax/switchSaleType'
,
'AddOrderController@switchSaleType'
);
Route
::
post
(
'/ajax/checkStock'
,
'AddOrderController@checkStock'
);
Route
::
post
(
'/ajax/batchGoodsImport'
,
'AddOrderController@batchGoodsImport'
);
Route
::
match
([
'get'
,
'post'
],
'/web/{key}'
,
'WebController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/api/{key}'
,
'ApiController@Entrance'
);
...
...
public/css/detail.css
View file @
2c3fcf9a
...
...
@@ -95,6 +95,21 @@ li {
border-radius
:
3px
;
}
.search-user
,
.search-sku
{
width
:
240px
!important
;
}
.label-prompt
{
padding
:
6px
6px
;
}
.get-user
,
.get-sku
{
padding
:
3px
6px
;
margin-right
:
20px
;
}
.batch-btn
{
float
:
right
;
}
.order-invoice
select
{
width
:
150px
!important
;
}
...
...
@@ -103,7 +118,7 @@ li {
resize
:
none
;
}
/*
新增订单
*/
/*
后台新增订单 start
*/
.user-info
,
.address-content
,
.invoice-content
,
.order-info
{
display
:
none
;
}
...
...
@@ -193,6 +208,8 @@ li {
.con-val
{
float
:
left
;
}
/* END */
.other-infos
,
.click-up
{
display
:
none
;
...
...
@@ -207,7 +224,7 @@ li {
}
.payment-status
{
width
:
420px
;
width
:
420px
!important
;
}
/* 响应式 */
...
...
@@ -230,7 +247,7 @@ li {
.show-list-info
{
display
:
none
;
}
.payment-status
{
width
:
220px
;
}
.payment-status
{
width
:
220px
!important
;
}
}
@media
screen
and
(
max-width
:
460px
)
{
...
...
public/js/add_order.js
View file @
2c3fcf9a
...
...
@@ -513,6 +513,41 @@
}
})
// 批量导入物料
$
(
'.goods_import'
).
click
(
function
()
{
var
form
=
$
(
'<form id="formUpload" enctype="multipart/form-data">\
<input type="file" name="upload" accept="application/vnd.ms-excel, application/x-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">\
</form>'
);
var
type
=
$
(
this
).
data
(
'type'
);
// 1-联营模板,2-自营模板
console
.
log
(
form
);
form
.
find
(
'input'
).
change
(
function
(){
console
.
log
(
$
(
'#formUpload'
))
console
.
log
(
$
(
'#formUpload'
)[
0
])
var
formData
=
new
FormData
(
$
(
'#formUpload'
)[
0
]);
formData
.
append
(
'type'
,
type
);
console
.
log
(
formData
);
$
.
ajax
({
type
:
"POST"
,
url
:
'/ajax/batchGoodsImport'
,
data
:
formData
,
cache
:
false
,
processData
:
false
,
contentType
:
false
,
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
layer
.
msg
(
resp
.
errmsg
);
return
false
;
}
layer
.
msg
(
resp
.
errmsg
);
},
})
})
form
.
find
(
'input[type="file"]'
).
trigger
(
'click'
);
})
// 提交订单
$
(
'.submit-order'
).
click
(
function
()
{
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
...
...
resources/views/addOnline/content.blade.php
View file @
2c3fcf9a
...
...
@@ -5,11 +5,6 @@
<div
class=
"ibox-content"
>
<div
class=
"row"
style=
"margin-bottom: 30px;"
>
<style>
.search-user
{
width
:
240px
!important
;}
.label-prompt
{
padding
:
6px
6px
;}
.get-user
{
padding
:
3px
6px
;
margin-right
:
20px
;}
</style>
<div
class=
"col-sm-12"
>
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
<a
class=
"btn btn-info get-user"
>
获取用户信息
</a>
...
...
@@ -223,11 +218,6 @@
<div
class=
"ibox-content"
>
<div
class=
"row"
>
<style>
.search-sku
{
width
:
240px
!important
;}
.label-prompt
{
padding
:
6px
6px
;}
.get-sku
{
padding
:
3px
6px
;
margin-right
:
20px
;}
</style>
<div
class=
"col-sm-12"
>
<input
type=
"text"
class=
"search-sku"
name=
"sku_id"
value=
""
placeholder=
"请输入SKUID"
>
<a
class=
"btn btn-info get-sku"
>
获取SKU信息
</a>
...
...
@@ -235,6 +225,11 @@
<span>
快捷入口:
<a
href=
"{{Config('website.search-sku-url-2')}}"
target=
"_blank"
>
查询SKU
</a>
</span>
<div
class=
"batch-btn"
>
<a
class=
"btn btn-success goods_import"
data-type=
"2"
>
批量导入物料
</a>
<a
class=
"btn btn-info"
href=
"http://img.ichunt.com/doc/excel/template/b7af3ef88497e57e6cdf45782deb5c15.xlsx"
>
物料模板下载
</a>
</div>
</div>
</div>
...
...
resources/views/addOrder/content.blade.php
View file @
2c3fcf9a
...
...
@@ -5,11 +5,6 @@
<div
class=
"ibox-content"
>
<div
class=
"row"
style=
"margin-bottom: 30px;"
>
<style>
.search-user
{
width
:
240px
!important
;}
.label-prompt
{
padding
:
6px
6px
;}
.get-user
{
padding
:
3px
6px
;
margin-right
:
20px
;}
</style>
<div
class=
"col-sm-12"
>
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
<a
class=
"btn btn-info get-user"
>
获取用户信息
</a>
...
...
@@ -241,11 +236,6 @@
<div
class=
"ibox-content"
>
<div
class=
"row"
>
<style>
.search-sku
{
width
:
240px
!important
;}
.label-prompt
{
padding
:
6px
6px
;}
.get-sku
{
padding
:
3px
6px
;
margin-right
:
20px
;}
</style>
<div
class=
"col-sm-12"
>
<input
type=
"text"
class=
"search-sku"
name=
"sku_id"
value=
""
placeholder=
"请输入SKUID"
>
<a
class=
"btn btn-info get-sku"
>
获取SKU信息
</a>
...
...
@@ -254,6 +244,11 @@
<a
href=
"{{Config('website.add-sku-url')}}"
target=
"_blank"
style=
"margin-right: 10px;"
>
+新增SKU
</a>
<a
href=
"{{Config('website.search-sku-url-1')}}"
target=
"_blank"
>
查询SKU
</a>
</span>
<div
class=
"batch-btn"
>
<a
class=
"btn btn-success goods_import"
data-type=
"1"
>
批量导入物料
</a>
<a
class=
"btn btn-info"
href=
"http://img.ichunt.com/doc/excel/template/dcf485c2883829b24320b58b0a6888bc.xlsx"
>
物料模板下载
</a>
</div>
</div>
</div>
...
...
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