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
a8757b11
authored
Jun 16, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整下单、审单时查询标准品牌
parent
f9aeb4c4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
18 deletions
app/Http/Controllers/ApiController.php
public/js/add_order.js
public/js/standardBrand.js
resources/views/changeOrder/content.blade.php
resources/views/common/selectBrand.blade.php
app/Http/Controllers/ApiController.php
View file @
a8757b11
...
...
@@ -334,13 +334,14 @@ class ApiController extends Controller
// 绑定品牌
public
function
apiBindStandardBrand
(
$request
)
{
$type
=
$request
->
input
(
'type'
,
1
);
$cart_id
=
$request
->
input
(
'cart_id'
,
0
);
$curr_brand_id
=
$request
->
input
(
'curr_brand_id'
,
0
);
$scm_brand_id
=
$request
->
input
(
'scm_brand_id'
,
0
);
$scm_brand_name
=
$request
->
input
(
'scm_brand_name'
,
0
);
$type
=
$request
->
input
(
'type'
,
1
);
$cart_id
=
$request
->
input
(
'cart_id'
,
0
);
$curr_brand_id
=
$request
->
input
(
'curr_brand_id'
,
0
);
$curr_brand_name
=
$request
->
input
(
'curr_brand_name'
,
''
);
$scm_brand_id
=
$request
->
input
(
'scm_brand_id'
,
0
);
$scm_brand_name
=
$request
->
input
(
'scm_brand_name'
,
''
);
if
(
!
$
curr_brand_id
||
!
$
scm_brand_id
)
$this
->
Export
(
1
,
'参数缺失'
);
if
(
!
$scm_brand_id
)
$this
->
Export
(
1
,
'参数缺失'
);
if
(
$type
==
1
&&
!
$cart_id
)
$this
->
Export
(
1
,
'当前行购物车ID缺失'
);
...
...
@@ -350,6 +351,7 @@ class ApiController extends Controller
$map
[
'time'
]
=
time
();
$map
[
'scm_brand_id'
]
=
$scm_brand_id
;
$map
[
'brand_id'
]
=
[
$curr_brand_id
];
$map
[
'brand_name'
]
=
[
$curr_brand_name
];
$map
[
'admin_id'
]
=
$request
->
user
->
userId
;
$map
[
'admin_name'
]
=
$request
->
user
->
name
;
$map
[
'AuthSign'
]
=
MD5
(
MD5
(
http_build_query
(
$map
))
.
$key
);
...
...
public/js/add_order.js
View file @
a8757b11
...
...
@@ -879,7 +879,7 @@
// list = list.reverse();
// 购物车列表
for
(
var
i
=
len
-
1
;
i
>=
0
;
i
--
)
{
html
+=
'<tr data-cid="'
+
list
[
i
].
cart_id
+
'" data-type="'
+
list
[
i
].
type
+
'" min_buy="'
+
list
[
i
].
min_buy
+
'" data-sup_name="'
+
list
[
i
].
supplier_name
+
'" data-sup_id="'
+
list
[
i
].
supplier_id
+
'" data-brand_id="'
+
list
[
i
].
brand_id
+
'">'
+
html
+=
'<tr data-cid="'
+
list
[
i
].
cart_id
+
'" data-type="'
+
list
[
i
].
type
+
'" min_buy="'
+
list
[
i
].
min_buy
+
'" data-sup_name="'
+
list
[
i
].
supplier_name
+
'" data-sup_id="'
+
list
[
i
].
supplier_id
+
'" data-brand_id="'
+
list
[
i
].
brand_id
+
'"
data-brand_name="'
+
list
[
i
].
brand_name
+
'"
>'
+
'<td>'
+
(
len
-
i
)
+
'</td>'
+
'<td class="goods_id">'
+
list
[
i
].
goods_id
+
'</td>'
+
'<td>'
+
list
[
i
].
goods_name
+
'</td>'
+
...
...
public/js/standardBrand.js
View file @
a8757b11
...
...
@@ -46,7 +46,8 @@ layui.use(['table', 'form'], function() {
// 选择标准品牌
$
(
'.shop-table'
).
delegate
(
'.select-standard-brand'
,
'click'
,
function
()
{
var
type
=
$
(
this
).
data
(
'type'
);
// 1-后台购物车,2-后台审单
var
self
=
$
(
this
);
var
type
=
self
.
data
(
'type'
);
// 1-后台购物车,2-后台审单
$
(
'.standard_brand_name'
).
val
(
''
);
scm_brand_id
=
0
;
...
...
@@ -54,15 +55,17 @@ layui.use(['table', 'form'], function() {
renderTable
();
// 重载表格
var
curr_brand_id
=
$
(
this
).
parents
(
'tr'
).
data
(
'brand_id'
);
var
curr_brand_id
=
self
.
parents
(
'tr'
).
data
(
'brand_id'
);
// 当前品牌ID
var
curr_brand_name
=
self
.
parents
(
'tr'
).
data
(
'brand_name'
);
// 当前品牌名称
var
datax
=
{
type
:
type
,
curr_brand_id
:
curr_brand_id
curr_brand_id
:
curr_brand_id
,
curr_brand_name
:
curr_brand_name
,
};
if
(
type
==
1
)
{
var
cart_id
=
$
(
this
)
.
parents
(
'tr'
).
data
(
'cid'
)
||
0
;
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
)
||
0
;
datax
.
cart_id
=
cart_id
;
}
...
...
@@ -96,8 +99,8 @@ layui.use(['table', 'form'], function() {
$
.
lie
.
add_order
.
lists
(
user_id
,
1
,
1
,
delivery_place
);
}
else
{
$
(
'.standard_brand_id'
).
val
(
scm_brand_id
);
$
(
'.standard_brand_name'
).
val
(
scm_brand_name
);
self
.
parents
(
'tr'
).
find
(
'.standard_brand_id'
).
val
(
scm_brand_id
);
self
.
parents
(
'tr'
).
find
(
'.standard_brand_name'
).
val
(
scm_brand_name
);
}
return
false
;
...
...
@@ -115,6 +118,8 @@ layui.use(['table', 'form'], function() {
layer
.
close
(
index
);
}
})
$
(
'.curr-brand'
).
text
(
curr_brand_name
)
})
})
\ No newline at end of file
resources/views/changeOrder/content.blade.php
View file @
a8757b11
...
...
@@ -152,7 +152,7 @@
<tbody>
@foreach ($order_items_info as $k=>$v)
<tr
class=
"change_item_{{$v['rec_id']}}"
data-sup=
"{{$v['canal'] ? $v['supplier_id'].'.'.$v['canal'] : $v['supplier_id']}}"
data-brand_id=
"{{ $v['brand_id'] }}"
>
<tr
class=
"change_item_{{$v['rec_id']}}"
data-sup=
"{{$v['canal'] ? $v['supplier_id'].'.'.$v['canal'] : $v['supplier_id']}}"
data-brand_id=
"{{ $v['brand_id'] }}"
data-brand_name=
"{{ $v['brand_name'] }}"
>
<input
class=
"change_rec_id"
type=
"hidden"
name=
"change_rec_id"
value=
"{{ $v['rec_id'] }}"
>
<td>
{{ $k+1 }}
</td>
<td>
...
...
resources/views/common/selectBrand.blade.php
View file @
a8757b11
...
...
@@ -4,16 +4,17 @@
.confirm-standard-brand
{
float
:
right
;
}
.brand-search
{
margin-top
:
-3px
;
}
#select-brand-pop
.label-prompt
{
padding
:
6px
!important
;
}
.show-right
{
float
:
right
;
}
</style>
<div
id=
"select-brand-pop"
class=
"select-content"
>
<form
class=
"layui-form layui-box"
method=
"post"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
class=
"standard_brand_name"
name=
"standard_brand_name"
placeholder=
"输入品牌名称"
autocomplete=
"off"
>
<span>
当前品牌:
<strong
class=
"layui-btn-sm curr-brand"
></strong></span>
<div
class=
"layui-input-inline show-right"
>
<input
type=
"text"
class=
"standard_brand_name"
name=
"standard_brand_name"
placeholder=
"输入标准品牌名称"
autocomplete=
"off"
>
<button
lay-submit
lay-filter=
"load"
class=
"layui-btn layui-btn-sm brand-search"
>
搜索
</button>
</div>
<!-- <a class="layui-btn layui-btn-normal layui-btn-sm confirm-standard-brand">确认带回</a> -->
</form>
<table
id=
"brandList"
lay-filter=
"brandList"
></table>
...
...
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