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
ce19df1b
authored
Nov 16, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整审单添加商品
parent
86c9b021
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
9 deletions
app/Http/Controllers/AddOrderController.php
public/js/change_order.js
public/js/goods.js
app/Http/Controllers/AddOrderController.php
View file @
ce19df1b
...
...
@@ -935,7 +935,7 @@ Class AddOrderController extends Controller
$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'
=>
'
商品已存在
'
];
if
(
in_array
(
$data
[
'goods_id'
],
$goods_ids
))
return
[
'errcode'
=>
1
,
'errmsg'
=>
'
临时保存信息里已存在该商品,请查看‘变更历史’按钮
'
];
}
$data
[
'k1'
]
=
time
();
...
...
public/js/change_order.js
View file @
ce19df1b
...
...
@@ -741,6 +741,18 @@
}
else
{
new_str
+=
'<tr data-brand_id="'
+
items
[
i
].
brand_id
+
'" data-brand_name="'
+
items
[
i
].
brand_name
+
'">'
;
}
var
buyers_option
=
''
;
for
(
var
j
=
0
;
j
<
buyers
.
length
;
j
++
)
{
if
(
items
[
i
].
buyer_id
==
buyers
[
j
].
userId
)
{
buyers_option
+=
'<option value="'
+
buyers
[
j
].
userId
+
'" selected>'
+
buyers
[
j
].
name
+
'</option>'
;
}
else
{
buyers_option
+=
'<option value="'
+
buyers
[
j
].
userId
+
'">'
+
buyers
[
j
].
name
+
'</option>'
;
}
}
var
sale_type
=
items
[
i
].
sale_type
==
1
?
'现卖'
:
'预售'
;
new_str
+=
'<td>'
+
i
+
'</td>\
<td>\
...
...
@@ -748,6 +760,10 @@
<p>'
+
items
[
i
].
supplier_name
+
'</p>\
</td>\
<td>\
<input type="hidden" name="change_info['
+
i
+
'][sale_type]" value="1">\
<p>'
+
sale_type
+
'</p>\
</td>\
<td>\
<input class="change_goods_name" type="hidden" name="change_info['
+
i
+
'][goods_name]" value="'
+
items
[
i
].
goods_name
+
'">\
<p>'
+
items
[
i
].
goods_name
+
'</p>\
</td>\
...
...
@@ -772,6 +788,14 @@
</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>\
<select id="buyer_id_'
+
i
+
'" class="form-control change_buyer_id selectpicker" name="change_info['
+
i
+
'][buyer_id]" data-live-search="true" data-size="5" title="请选择采购员">\
<option value="">请选择采购员</option>'
+
buyers_option
+
'\
</select>\
</td>\
<td>\
<input type="text" class="form-control change_batch" name="change_info['
+
i
+
'][batch]" value="'
+
items
[
i
].
batch
+
'">\
</td>'
;
if
(
items
[
i
].
status
==
1
)
{
...
...
@@ -813,6 +837,7 @@
$
(
'.order-change-table'
).
find
(
'tbody'
).
append
(
new_str
);
$
(
'.order-change-table'
).
find
(
'tbody input'
).
trigger
(
'blur'
);
// 自动触发
$
(
'.change_buyer_id'
).
selectpicker
();
// 调整附加费
var
extend_fee_items
=
temp_save_info
.
change_extend_fee
;
...
...
public/js/goods.js
View file @
ce19df1b
...
...
@@ -29,10 +29,10 @@
}
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
if
(
type
==
3
||
type
==
4
)
{
layer
.
msg
(
'自营商品不能添加到联营订单'
);
return
false
;
}
//
if (type == 3 || type == 4) {
//
layer.msg('自营商品不能添加到联营订单');
//
return false;
//
}
if
(
delivery_place
==
1
)
{
if
(
!
goods_min_price
)
{
...
...
@@ -44,6 +44,11 @@
layer
.
msg
(
'缺少美金价格,商品添加失败'
);
return
false
;
}
if
(
type
==
3
||
type
==
4
)
{
layer
.
msg
(
'自营商品不能添加到美金订单'
);
return
false
;
}
}
}
else
{
if
(
type
==
1
||
type
==
2
)
{
// 1.联营 2.专卖
...
...
@@ -97,10 +102,14 @@
var
buyers_option
=
''
;
for
(
var
i
=
0
;
i
<
buyers
.
length
;
i
++
)
{
buyers_option
+=
'<option value="'
+
buyers
[
i
].
userId
+
'">'
+
buyers
[
i
].
name
+
'</option>'
;
if
(
order_item
.
buyer_id
==
buyers
[
i
].
userId
)
{
buyers_option
+=
'<option value="'
+
buyers
[
i
].
userId
+
'" selected>'
+
buyers
[
i
].
name
+
'</option>'
;
}
else
{
buyers_option
+=
'<option value="'
+
buyers
[
i
].
userId
+
'">'
+
buyers
[
i
].
name
+
'</option>'
;
}
}
var
sale_type
=
order_item
.
sale_type
==
1
?
'现卖'
:
'预售
'
;
var
sale_type
=
'现卖
'
;
html
+=
'<tr data-sup="'
+
sup
+
'" data-brand_name="'
+
order_item
.
brand_name
+
'">\
<td>'
+
curr_no
+
'</td>\
...
...
@@ -109,7 +118,10 @@
<input type="hidden" name="change_info['
+
curr_no
+
'][supplier_name]" value="'
+
order_item
.
supplier_name
+
'">\
<p>'
+
order_item
.
supplier_name
+
'</p>\
</td>\
<td>'
+
sale_type
+
'</td>\
<td>\
<input type="hidden" name="change_info['
+
curr_no
+
'][sale_type]" value="1">\
<p>'
+
sale_type
+
'</p>\
</td>\
<td>\
<input class="change_goods_name" type="hidden" name="change_info['
+
curr_no
+
'][goods_name]" value="'
+
order_item
.
goods_name
+
'">\
<p>'
+
order_item
.
goods_name
+
'</p>\
...
...
@@ -322,7 +334,10 @@
<input type="hidden" name="change_info['
+
curr_no
+
'][supplier_name]" value="'
+
add_supplier_name
+
'">\
<p>'
+
add_supplier_name
+
'</p>\
</td>\
<td>'
+
sale_type
+
'</td>\
<td>\
<input type="hidden" name="change_info['
+
curr_no
+
'][sale_type]" value="1">\
<p>'
+
sale_type
+
'</p>\
</td>\
<td>\
<input class="change_goods_name" type="hidden" name="change_info['
+
curr_no
+
'][goods_name]" value="'
+
add_goods_name
+
'">\
<p>'
+
add_goods_name
+
'</p>\
...
...
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