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
a861541b
authored
Nov 20, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_adjust_20201116'
parents
94e9610b
b36770af
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
10 deletions
app/Http/Controllers/AddOrderController.php
public/js/change_order.js
public/js/goods.js
resources/views/detail/detail_items_info.php
app/Http/Controllers/AddOrderController.php
View file @
a861541b
...
@@ -839,6 +839,16 @@ Class AddOrderController extends Controller
...
@@ -839,6 +839,16 @@ Class AddOrderController extends Controller
return
;
return
;
}
}
if
(
$type
==
1
&&
$val
[
'buyer_id'
]
==
'平台'
)
{
if
(
!
$val
[
'id'
])
{
$err
[]
=
'第'
.
(
$key
+
1
)
.
'行,采购员为平台时,SKUID必填'
;
return
;
}
else
if
(
strlen
(
$val
[
'id'
])
==
19
)
{
$err
[]
=
'第'
.
(
$key
+
1
)
.
'行,采购员为平台时,必须填写自营SKUID'
;
return
;
}
}
// if ($type == 1 && !$val['standard_brand_name']) {
// if ($type == 1 && !$val['standard_brand_name']) {
// $err[] = '第'.($key+1).'行,标准品牌不能为空';
// $err[] = '第'.($key+1).'行,标准品牌不能为空';
// return;
// return;
...
@@ -925,7 +935,7 @@ Class AddOrderController extends Controller
...
@@ -925,7 +935,7 @@ Class AddOrderController extends Controller
$goods_ids
=
array_column
(
$temp_save_info
[
'change_info'
],
'goods_id'
);
// 获取商品ID集合
$goods_ids
=
array_column
(
$temp_save_info
[
'change_info'
],
'goods_id'
);
// 获取商品ID集合
$goods_ids
=
array_filter
(
$goods_ids
,
function
(
$v
)
{
return
$v
!=
''
;
});
$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
();
$data
[
'k1'
]
=
time
();
...
...
public/js/change_order.js
View file @
a861541b
...
@@ -741,6 +741,18 @@
...
@@ -741,6 +741,18 @@
}
else
{
}
else
{
new_str
+=
'<tr data-brand_id="'
+
items
[
i
].
brand_id
+
'" data-brand_name="'
+
items
[
i
].
brand_name
+
'">'
;
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>\
new_str
+=
'<td>'
+
i
+
'</td>\
<td>\
<td>\
...
@@ -748,6 +760,10 @@
...
@@ -748,6 +760,10 @@
<p>'
+
items
[
i
].
supplier_name
+
'</p>\
<p>'
+
items
[
i
].
supplier_name
+
'</p>\
</td>\
</td>\
<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
+
'">\
<input class="change_goods_name" type="hidden" name="change_info['
+
i
+
'][goods_name]" value="'
+
items
[
i
].
goods_name
+
'">\
<p>'
+
items
[
i
].
goods_name
+
'</p>\
<p>'
+
items
[
i
].
goods_name
+
'</p>\
</td>\
</td>\
...
@@ -772,6 +788,14 @@
...
@@ -772,6 +788,14 @@
</td>\
</td>\
<td>\
<td>\
<input class="price only_number" name="change_info['
+
i
+
'][goods_price]" data-price="'
+
items
[
i
].
goods_price
+
'" value="'
+
items
[
i
].
goods_price
+
'">\
<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>'
;
</td>'
;
if
(
items
[
i
].
status
==
1
)
{
if
(
items
[
i
].
status
==
1
)
{
...
@@ -813,6 +837,7 @@
...
@@ -813,6 +837,7 @@
$
(
'.order-change-table'
).
find
(
'tbody'
).
append
(
new_str
);
$
(
'.order-change-table'
).
find
(
'tbody'
).
append
(
new_str
);
$
(
'.order-change-table'
).
find
(
'tbody input'
).
trigger
(
'blur'
);
// 自动触发
$
(
'.order-change-table'
).
find
(
'tbody input'
).
trigger
(
'blur'
);
// 自动触发
$
(
'.change_buyer_id'
).
selectpicker
();
// 调整附加费
// 调整附加费
var
extend_fee_items
=
temp_save_info
.
change_extend_fee
;
var
extend_fee_items
=
temp_save_info
.
change_extend_fee
;
...
...
public/js/goods.js
View file @
a861541b
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
}
}
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
if
(
type
==
3
||
type
==
4
)
{
//
if (type == 3 || type == 4) {
layer
.
msg
(
'自营商品不能添加到联营订单'
);
//
layer.msg('自营商品不能添加到联营订单');
return
false
;
//
return false;
}
//
}
if
(
delivery_place
==
1
)
{
if
(
delivery_place
==
1
)
{
if
(
!
goods_min_price
)
{
if
(
!
goods_min_price
)
{
...
@@ -44,6 +44,11 @@
...
@@ -44,6 +44,11 @@
layer
.
msg
(
'缺少美金价格,商品添加失败'
);
layer
.
msg
(
'缺少美金价格,商品添加失败'
);
return
false
;
return
false
;
}
}
if
(
type
==
3
||
type
==
4
)
{
layer
.
msg
(
'自营商品不能添加到美金订单'
);
return
false
;
}
}
}
}
else
{
}
else
{
if
(
type
==
1
||
type
==
2
)
{
// 1.联营 2.专卖
if
(
type
==
1
||
type
==
2
)
{
// 1.联营 2.专卖
...
@@ -97,10 +102,14 @@
...
@@ -97,10 +102,14 @@
var
buyers_option
=
''
;
var
buyers_option
=
''
;
for
(
var
i
=
0
;
i
<
buyers
.
length
;
i
++
)
{
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
+
'">\
html
+=
'<tr data-sup="'
+
sup
+
'" data-brand_name="'
+
order_item
.
brand_name
+
'">\
<td>'
+
curr_no
+
'</td>\
<td>'
+
curr_no
+
'</td>\
...
@@ -109,7 +118,10 @@
...
@@ -109,7 +118,10 @@
<input type="hidden" name="change_info['
+
curr_no
+
'][supplier_name]" value="'
+
order_item
.
supplier_name
+
'">\
<input type="hidden" name="change_info['
+
curr_no
+
'][supplier_name]" value="'
+
order_item
.
supplier_name
+
'">\
<p>'
+
order_item
.
supplier_name
+
'</p>\
<p>'
+
order_item
.
supplier_name
+
'</p>\
</td>\
</td>\
<td>'
+
sale_type
+
'</td>\
<td>\
<input type="hidden" name="change_info['
+
curr_no
+
'][sale_type]" value="1">\
<p>'
+
sale_type
+
'</p>\
</td>\
<td>\
<td>\
<input class="change_goods_name" type="hidden" name="change_info['
+
curr_no
+
'][goods_name]" value="'
+
order_item
.
goods_name
+
'">\
<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>\
<p>'
+
order_item
.
goods_name
+
'</p>\
...
@@ -322,7 +334,10 @@
...
@@ -322,7 +334,10 @@
<input type="hidden" name="change_info['
+
curr_no
+
'][supplier_name]" value="'
+
add_supplier_name
+
'">\
<input type="hidden" name="change_info['
+
curr_no
+
'][supplier_name]" value="'
+
add_supplier_name
+
'">\
<p>'
+
add_supplier_name
+
'</p>\
<p>'
+
add_supplier_name
+
'</p>\
</td>\
</td>\
<td>'
+
sale_type
+
'</td>\
<td>\
<input type="hidden" name="change_info['
+
curr_no
+
'][sale_type]" value="1">\
<p>'
+
sale_type
+
'</p>\
</td>\
<td>\
<td>\
<input class="change_goods_name" type="hidden" name="change_info['
+
curr_no
+
'][goods_name]" value="'
+
add_goods_name
+
'">\
<input class="change_goods_name" type="hidden" name="change_info['
+
curr_no
+
'][goods_name]" value="'
+
add_goods_name
+
'">\
<p>'
+
add_goods_name
+
'</p>\
<p>'
+
add_goods_name
+
'</p>\
...
...
resources/views/detail/detail_items_info.php
View file @
a861541b
...
@@ -77,7 +77,15 @@
...
@@ -77,7 +77,15 @@
<td>
<?=
App\Http\Controllers\getGoodsName
(
$v
[
'goods_id'
])
?>
</td>
<td>
<?=
App\Http\Controllers\getGoodsName
(
$v
[
'goods_id'
])
?>
</td>
<?php
}
else
{
?>
<?php
}
else
{
?>
<td>
<?=
$v
[
'goods_id'
]
?>
</td>
<td>
<?=
$v
[
'goods_id'
]
?>
</td>
<td><a
href=
"
<?=
Config
(
'website.main_url'
)
.
'goods_'
.
$v
[
'goods_id'
]
.
'.html?ptag=order'
?>
"
target=
"_blank"
>
<?=
$v
[
'goods_name'
]
?>
</a></td>
<td>
<?php
if
(
strlen
(
$v
[
'goods_id'
])
==
19
)
{
?>
<a
href=
"
<?=
Config
(
'website.main_url'
)
.
'goods_'
.
$v
[
'goods_id'
]
.
'.html?ptag=order'
?>
"
target=
"_blank"
>
<?=
$v
[
'goods_name'
]
?>
</a>
<?php
}
else
if
(
$v
[
'goods_id'
]
==
0
)
{
?>
<a>
<?=
$v
[
'goods_name'
]
?>
</a>
<?php
}
else
{
?>
<a
href=
"
<?=
Config
(
'website.main_url'
)
.
'item/'
.
$v
[
'goods_id'
]
.
'.html?ptag=order'
?>
"
target=
"_blank"
>
<?=
$v
[
'goods_name'
]
?>
</a>
<?php
}
?>
</td>
<?php
}
?>
<?php
}
?>
<td>
<?=
$v
[
'brand_name'
]
?>
</td>
<td>
<?=
$v
[
'brand_name'
]
?>
</td>
...
...
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