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
ac484bc0
authored
Jul 13, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整下单、审单标准品牌
parent
b6d8336a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
34 deletions
app/Http/Controllers/AddOrderController.php
public/css/detail.css
public/js/add_order.js
public/js/change_order.js
public/js/goods.js
public/js/standardBrand.js
resources/views/changeOrder/content.blade.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
ac484bc0
...
...
@@ -880,8 +880,8 @@ Class AddOrderController extends Controller
public
function
addGoods
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$add_type
=
$request
->
input
(
'add_type'
,
''
);
// 新增类型
$goods_type
=
$request
->
input
(
'goods_type'
,
1
);
// 商品类型
$add_type
=
$request
->
input
(
'add_type'
,
''
);
// 新增类型 为空的话是新增有skuid商品
$goods_type
=
$request
->
input
(
'goods_type'
,
1
);
// 商品类型
1-联营,2-自营
if
(
$add_type
)
{
$data
[
'add_goods_name'
]
=
$request
->
input
(
'add_goods_name'
,
''
);
...
...
@@ -904,6 +904,17 @@ Class AddOrderController extends Controller
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
if
(
$goods_type
==
1
&&
!
$add_type
)
{
$temp_save_info
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
(
'order_id'
,
$data
[
'order_id'
])
->
value
(
'temp_save_info'
);
// 获取临时保存信息
if
(
$temp_save_info
)
{
$temp_save_info
=
json_decode
(
$temp_save_info
,
true
);
$goods_ids
=
array_column
(
$temp_save_info
[
'change_info'
],
'goods_id'
);
// 获取商品ID集合
$goods_ids
=
array_filter
(
$goods_ids
,
function
(
$v
)
{
return
$v
!=
''
;
});
if
(
in_array
(
$data
[
'goods_id'
],
$goods_ids
))
return
[
'errcode'
=>
1
,
'errmsg'
=>
'商品已存在'
];
}
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
...
...
public/css/detail.css
View file @
ac484bc0
...
...
@@ -268,3 +268,11 @@ p, h4 {
color
:
#337ab7
!important
;
}
/* 标准品牌背景色 */
.standard-brand-yellow
{
background
:
yellow
;
}
.standard-brand-green
{
background
:
springgreen
;
}
public/js/add_order.js
View file @
ac484bc0
...
...
@@ -886,7 +886,9 @@
'<td>'
+
list
[
i
].
brand_name
+
'</td>'
;
if
(
goods_type
==
1
)
{
// 联营添加标准品牌列
html
+=
'<td><input type="text" class="change_standard_brand_name" name="standard_brand_name" value="'
+
list
[
i
].
standard_brand_name
+
'" readonly /><i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true" data-type=1></i></td>'
;
html
+=
list
[
i
].
standard_brand_name
?
'<td class="standard-brand-yellow">'
:
'<td>'
;
html
+=
'<input type="text" class="change_standard_brand_name" name="standard_brand_name" value="'
+
list
[
i
].
standard_brand_name
+
'" readonly /><i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true" data-type=1></i></td>'
;
}
if
(
goods_type
==
2
)
{
...
...
public/js/change_order.js
View file @
ac484bc0
...
...
@@ -687,9 +687,15 @@
$
(
'.change_item_'
+
i
).
find
(
'.change_standard_brand_id'
).
val
(
items
[
i
].
standard_brand_id
);
$
(
'.change_item_'
+
i
).
find
(
'.change_standard_brand_name'
).
val
(
items
[
i
].
standard_brand_name
);
// input输入框 且 标准品牌存在
if
(
$
(
'.change_item_'
+
i
).
find
(
'.change_standard_brand_name'
).
attr
(
'type'
)
==
'text'
&&
items
[
i
].
standard_brand_name
)
{
$
(
'.change_item_'
+
i
).
find
(
'.change_standard_brand_name'
).
parent
(
'td'
).
addClass
(
'standard-brand-yellow'
);
}
if
(
items
[
i
].
status
==
-
1
)
{
$
(
'.change_item_'
+
i
).
find
(
'.change_status'
).
val
(
items
[
i
].
status
);
$
(
'.change_item_'
+
i
).
find
(
'.change_status'
).
next
(
'.change_status_val'
).
html
(
'<i class="error">已取消</i>'
);
$
(
'.change_item_'
+
i
).
find
(
'.deletegoods'
).
hide
();
}
}
...
...
@@ -720,9 +726,15 @@
<input class="change_brand_id" type="hidden" name="change_info['
+
i
+
'][brand_id]" value="'
+
items
[
i
].
brand_id
+
'">\
<input class="change_brand_name" type="hidden" name="change_info['
+
i
+
'][brand_name]" value="'
+
items
[
i
].
brand_name
+
'">\
<p>'
+
items
[
i
].
brand_name
+
'</p>\
</td>\
<td>\
<input type="hidden" class="change_standard_brand_id" name="change_info['
+
i
+
'][standard_brand_id]" value="'
+
items
[
i
].
standard_brand_id
+
'" />\
</td>'
;
if
(
items
[
i
].
standard_brand_name
)
{
new_str
+=
'<td class="standard-brand-yellow">'
;
}
else
{
new_str
+=
'<td>'
;
}
new_str
+=
'<input type="hidden" class="change_standard_brand_id" name="change_info['
+
i
+
'][standard_brand_id]" value="'
+
items
[
i
].
standard_brand_id
+
'" />\
<input type="text" class="change_standard_brand_name" name="change_info['
+
i
+
'][standard_brand_name]" value="'
+
items
[
i
].
standard_brand_name
+
'" readonly />\
<i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true" data-type=2></i>\
</td>\
...
...
@@ -731,32 +743,41 @@
</td>\
<td>\
<input class="price only_number" name="change_info['
+
i
+
'][goods_price]" data-price="'
+
items
[
i
].
goods_price
+
'" value="'
+
items
[
i
].
goods_price
+
'">\
</td>\
<td>\
<input class="change_status" type="hidden" name="change_info['
+
i
+
'][status]" value="1">\
<span class="change_status_val">正常<i style="color:green;">(新增)</i></span>\
</td>'
;
if
(
!
items
[
i
].
add_type
)
{
new_str
+=
'<td>\
<a class="btn btn-xs btn-danger deletegoods" href="javascript:;" data-id="" data-type="1">删除</a>\
<input class="is_add" type="hidden" name="change_info['
+
i
+
'][is_add]" value="1" />\
<input type="hidden" name="change_info['
+
i
+
'][goods_id]" value="'
+
items
[
i
].
goods_id
+
'" />\
</td>'
;
}
else
{
// 新增无skuid商品
new_str
+=
'<td>\
<a class="btn btn-xs btn-danger deletegoods" href="javascript:;" data-id="" data-type="1">删除</a>\
<input class="is_add" type="hidden" name="change_info['
+
i
+
'][is_add]" value="1" />\
<input type="hidden" name="change_info['
+
i
+
'][add_type]" value="1" />\
<input type="hidden" name="change_info['
+
i
+
'][order_id]" value="'
+
items
[
i
].
order_id
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][goods_id]" value="'
+
items
[
i
].
goods_id
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][brand_name]" value="'
+
items
[
i
].
brand_name
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][delivery_time]" value="'
+
items
[
i
].
delivery_time
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][buyer_id]" value="'
+
items
[
i
].
buyer_id
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][batch]" value="'
+
items
[
i
].
batch
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][remarks]" value="'
+
items
[
i
].
remarks
+
'" />\
</td>'
;
}
if
(
items
[
i
].
status
==
1
)
{
new_str
+=
'<td>\
<input class="change_status" type="hidden" name="change_info['
+
i
+
'][status]" value="1">\
<span class="change_status_val">正常<i style="color:green;">(新增)</i></span>\
</td>'
;
if
(
!
items
[
i
].
add_type
)
{
new_str
+=
'<td>\
<a class="btn btn-xs btn-danger deletegoods" href="javascript:;" data-id="" data-type="1">删除</a>\
<input class="is_add" type="hidden" name="change_info['
+
i
+
'][is_add]" value="1" />\
<input type="hidden" name="change_info['
+
i
+
'][goods_id]" value="'
+
items
[
i
].
goods_id
+
'" />\
</td>'
;
}
else
{
// 新增无skuid商品
new_str
+=
'<td>\
<a class="btn btn-xs btn-danger deletegoods" href="javascript:;" data-id="" data-type="1">删除</a>\
<input class="is_add" type="hidden" name="change_info['
+
i
+
'][is_add]" value="1" />\
<input type="hidden" name="change_info['
+
i
+
'][add_type]" value="1" />\
<input type="hidden" name="change_info['
+
i
+
'][order_id]" value="'
+
items
[
i
].
order_id
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][goods_id]" value="'
+
items
[
i
].
goods_id
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][brand_name]" value="'
+
items
[
i
].
brand_name
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][delivery_time]" value="'
+
items
[
i
].
delivery_time
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][buyer_id]" value="'
+
items
[
i
].
buyer_id
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][batch]" value="'
+
items
[
i
].
batch
+
'" />\
<input type="hidden" name="change_info['
+
i
+
'][remarks]" value="'
+
items
[
i
].
remarks
+
'" />\
</td>'
;
}
}
else
{
new_str
+=
'<td>\
<input class="change_status" type="hidden" name="change_info['
+
i
+
'][status]" value="-1">\
<span class="change_status_val"><i style="color:red;">已取消</i></span>\
</td>\
<td><input class="is_add" type="hidden" name="change_info['
+
i
+
'][is_add]" value="1" /></td>'
;
}
new_str
+=
'</tr>'
;
}
...
...
public/js/goods.js
View file @
ac484bc0
...
...
@@ -108,11 +108,12 @@
</td>\
<td>\
<input class="change_brand_id" type="hidden" name="change_info['
+
curr_no
+
'][brand_id]" value="'
+
order_item
.
brand_id
+
'">\
<input class="change_brand_id" type="hidden" name="change_info['
+
curr_no
+
'][brand_name]" value="'
+
order_item
.
brand_name
+
'">\
<p>'
+
order_item
.
brand_name
+
'</p>\
</td>'
;
if
(
order_item
.
standard_brand_name
)
{
html
+=
'<td>\
html
+=
'<td
class="standard-brand-green"
>\
<input class="change_standard_brand_id" type="hidden" name="change_info['
+
curr_no
+
'][standard_brand_id]" value="'
+
order_item
.
standard_brand_id
+
'">\
<input class="change_standard_brand_name" type="hidden" name="change_info['
+
curr_no
+
'][standard_brand_name]" value="'
+
order_item
.
standard_brand_name
+
'">\
<p>'
+
order_item
.
standard_brand_name
+
'</p>\
...
...
public/js/standardBrand.js
View file @
ac484bc0
...
...
@@ -100,6 +100,7 @@ layui.use(['table', 'form'], function() {
}
else
{
self
.
parents
(
'tr'
).
find
(
'.change_standard_brand_id'
).
val
(
scm_brand_id
);
self
.
parents
(
'tr'
).
find
(
'.change_standard_brand_name'
).
val
(
scm_brand_name
);
self
.
parent
(
'td'
).
addClass
(
'standard-brand-yellow'
);
}
return
false
;
...
...
resources/views/changeOrder/content.blade.php
View file @
ac484bc0
...
...
@@ -162,6 +162,7 @@
<p>
{{$v['supplier_name']}}
</p>
</td>
<td>
<input
class=
"change_goods_id"
type=
"hidden"
name=
"change_info[{{$v['rec_id']}}][goods_id]"
value=
"{{$v['goods_id']}}"
>
<input
class=
"change_goods_name"
type=
"hidden"
name=
"change_info[{{$v['rec_id']}}][goods_name]"
value=
"{{$v['goods_name']}}"
>
<p>
{{$v['goods_name']}}
</p>
</td>
...
...
@@ -171,7 +172,7 @@
<p>
{{$v['brand_name']}}
</p>
</td>
@if ($order_info['order_goods_type'] == 1)
<td>
<td
class=
"{{ $v['standard_brand_name'] && $v['status'] != -1 ? 'standard-brand-green' : '' }}"
>
<input
type=
"hidden"
class=
"change_standard_brand_id"
name=
"change_info[{{$v['rec_id']}}][standard_brand_id]"
value=
"{{$v['standard_brand_id']}}"
/>
@if ($v['standard_brand_name'] || $v['status'] == -1)
<input
type=
"hidden"
class=
"change_standard_brand_name"
name=
"change_info[{{$v['rec_id']}}][standard_brand_name]"
value=
"{{$v['standard_brand_name']}}"
/>
...
...
@@ -405,7 +406,7 @@
@endif
@if ($order_info['order_goods_type'] == 1)
<a
class=
"btn btn-info tempSave"
style=
"margin-right: 20px;"
>
保存
</a>
<a
class=
"btn btn-info tempSave"
style=
"margin-right: 20px;"
>
临时
保存
</a>
@endif
@if ($order_info['order_goods_type'] == 2
&&
$order_temp_info['status'] == 1)
...
...
resources/views/orderlist/content.blade.php
View file @
ac484bc0
...
...
@@ -369,7 +369,7 @@
<!-- 管理员和经理或有推送权限显示 -->
@if ((in_array($role, [1, 2]) || in_array('send_salesman', $userPerms)))
<a
class=
"btn btn-info"
href=
"{{URL('sendSales', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
推送
</a>
<a
class=
"btn btn-info"
href=
"{{URL('sendSales', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
推送
客服
</a>
@endif
@if ($v['status'] > 1
&&
in_array('download_contract', $userPerms))
...
...
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