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
6e3a293a
authored
Oct 30, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/zhujilai/Order
into zjl_self_express_20181030
parents
9a0da6d4
bc69f462
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
57 deletions
app/Http/Controllers/AddOrderController.php
config/website.php
public/js/add_order.js
resources/views/addOnline/content.blade.php
resources/views/addOrder/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
6e3a293a
...
@@ -288,19 +288,15 @@ Class AddOrderController extends Controller
...
@@ -288,19 +288,15 @@ Class AddOrderController extends Controller
{
{
if
(
$request
->
isMethod
(
'post'
))
{
if
(
$request
->
isMethod
(
'post'
))
{
$url
=
Config
(
'website.search-skuid'
);
$url
=
Config
(
'website.search-skuid'
);
$data
[
'sku_id'
]
=
$request
->
input
(
'sku_id'
);
$data
[
'id'
]
=
$request
->
input
(
'sku_id'
);
$goods_type
=
$request
->
input
(
'goods_type'
);
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
,
'POST'
),
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
,
'POST'
),
true
);
if
(
$goods_type
==
1
)
{
if
(
!
empty
(
$response
[
'data'
]))
{
$goods_info
=
$response
[
'data'
][
'sku'
];
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$response
[
'data'
]];
}
else
{
$goods_info
=
$response
[
'data'
];
}
if
(
!
empty
(
$goods_info
))
{
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$goods_info
];
}
else
{
}
else
{
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'未找SKU信息'
];
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'未找SKU信息'
];
}
}
...
...
config/website.php
View file @
6e3a293a
...
@@ -51,8 +51,9 @@ return [
...
@@ -51,8 +51,9 @@ return [
'check-user-url'
=>
'http://member.liexin.net/list'
,
'check-user-url'
=>
'http://member.liexin.net/list'
,
// 查询SKUID接口
// 查询SKUID接口
'search-skuid'
=>
'http://footstone.liexin.net/webapi/goods_details
'
,
// 'search-skuid' => 'http://footstone.liexin.net/webapi/sku_list
',
// 'search-skuid' => 'http://www.liexin.com/v3/sku/list',
// 'search-skuid' => 'http://www.liexin.com/v3/sku/list',
'search-skuid'
=>
'http://api.liexin.com/goods/detail'
,
// 新增SKU入口
// 新增SKU入口
'add-sku-url'
=>
'http://footstone.liexin.net/manage/addsku'
,
'add-sku-url'
=>
'http://footstone.liexin.net/manage/addsku'
,
...
...
public/js/add_order.js
View file @
6e3a293a
...
@@ -220,9 +220,9 @@
...
@@ -220,9 +220,9 @@
$
.
ajax
({
$
.
ajax
({
url
:
'/ajax/getSku'
,
url
:
'/ajax/getSku'
,
type
:
'post'
,
type
:
'post'
,
data
:
{
sku_id
:
sku_id
.
trim
()
,
goods_type
:
goods_type
},
data
:
{
sku_id
:
sku_id
.
trim
()},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
console
.
log
(
resp
)
if
(
resp
.
errcode
!=
0
)
{
if
(
resp
.
errcode
!=
0
)
{
layer
.
msg
(
resp
.
errmsg
);
layer
.
msg
(
resp
.
errmsg
);
return
false
;
return
false
;
...
@@ -236,74 +236,77 @@
...
@@ -236,74 +236,77 @@
$
(
'.goods_name'
).
text
(
data
.
goods_name
);
$
(
'.goods_name'
).
text
(
data
.
goods_name
);
$
(
'.brand_name'
).
text
(
data
.
brand_name
);
$
(
'.brand_name'
).
text
(
data
.
brand_name
);
$
(
'.supplier_name'
).
text
(
data
.
supplier_name
);
$
(
'.supplier_name'
).
text
(
data
.
supplier_name
);
$
(
'.stock'
).
text
(
data
.
stock
);
$
(
'.stock'
).
text
(
data
.
goods_number
);
$
(
'.moq'
).
text
(
data
.
m
oq
);
$
(
'.moq'
).
text
(
data
.
m
in_buy
);
$
(
'.mpq'
).
text
(
data
.
mpq
);
$
(
'.mpq'
).
text
(
data
.
m
in_m
pq
);
if
(
goods_type
==
1
)
{
//
if (goods_type == 1) {
var
status
=
data
.
goods_status
;
//
var status = data.goods_status;
}
else
{
//
} else {
var
status
=
data
.
status
;
//
var status = data.status;
}
//
}
switch
(
status
)
{
//
switch (status) {
case
0
:
status_val
=
'待入库'
;
break
;
//
case 0: status_val = '待入库'; break;
case
1
:
status_val
=
'审核通过(上架)'
;
break
;
//
case 1: status_val = '审核通过(上架)'; break;
case
3
:
status_val
=
'下架'
;
break
;
//
case 3: status_val = '下架'; break;
case
4
:
status_val
=
'删除'
;
break
;
//
case 4: status_val = '删除'; break;
}
//
}
status_val
=
data
.
is_buy
?
'是'
:
'否'
;
$
(
'.status'
).
text
(
status_val
);
$
(
'.status'
).
text
(
status_val
);
$
(
'.goods_id'
).
val
(
data
.
goods_id
);
$
(
'.goods_id'
).
val
(
data
.
goods_id
);
$
(
'.goods_type'
).
val
(
data
.
goods_type
);
$
(
'.goods_type'
).
val
(
data
.
goods_type
);
//阶梯价格
//阶梯价格
if
(
data
.
ladder_price
!=
null
)
{
if
(
data
.
tiered
!=
null
)
{
if
(
data
.
ladder_price
.
constructor
==
String
)
{
//如果阶梯价为字符串,则转换为数字
var
len
=
data
.
tiered
.
length
;
var
price_arr
=
eval
(
data
.
ladder_price
);
}
else
{
var
price_arr
=
data
.
ladder_price
;
}
var
len
=
price_arr
.
length
;
if
(
len
>
0
)
{
if
(
len
>
0
)
{
var
html
=
''
;
var
html
=
''
;
html
+=
'<tr><th>阶梯</th><th>RMB价格</th>'
;
if
(
data
.
ac_type
==
1
)
{
html
+=
'<th>活动价</th>'
;
}
if
(
goods_type
==
1
)
{
html
+=
'<th>USD价格</th>'
;
}
html
+=
'</tr>'
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
html
+=
'<tr>'
;
html
+=
'<tr>'
;
if
(
i
==
0
)
{
if
(
i
==
0
)
{
if
(
data
.
ac_type
)
{
if
(
data
.
ac_type
)
{
html
+=
'<td><span class="goods-min-num">'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="goods-min-price price-line">'
+
price_arr
[
i
][
'price_cn'
]
+
'</span><td>¥<span>'
+
price_arr
[
i
][
'price_ac'
]
+
'</span></td>'
;
html
+=
'<td><span class="goods-min-num">'
+
data
.
tiered
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="goods-min-price price-line">'
+
data
.
tiered
[
i
][
'price_cn'
]
+
'</span><td>¥<span>'
+
data
.
tiered
[
i
][
'price_ac'
]
+
'</span></td>'
;
}
else
{
}
else
{
html
+=
'<td><span class="goods-min-num">'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="goods-min-price">'
+
price_arr
[
i
][
'price_cn'
]
+
'</span></td>'
;
html
+=
'<td><span class="goods-min-num">'
+
data
.
tiered
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="goods-min-price">'
+
data
.
tiered
[
i
][
'price_cn'
]
+
'</span></td>'
;
}
}
if
(
goods_type
==
1
)
{
if
(
goods_type
==
1
)
{
html
+=
'<td>$<span class="goods-min-price-us">'
+
price_arr
[
i
][
'price_us'
]
+
'</span></td>'
;
html
+=
'<td>$<span class="goods-min-price-us">'
+
data
.
tiered
[
i
][
'price_us'
]
+
'</span></td>'
;
}
}
}
else
{
}
else
{
if
(
data
.
ac_type
)
{
if
(
data
.
ac_type
)
{
html
+=
'<td><span>'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="price-line">'
+
price_arr
[
i
][
'price_cn'
]
+
'</span></td><td>¥<span>'
+
price_arr
[
i
][
'price_ac'
]
+
'</span></td>'
;
html
+=
'<td><span>'
+
data
.
tiered
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="price-line">'
+
data
.
tiered
[
i
][
'price_cn'
]
+
'</span></td><td>¥<span>'
+
data
.
tiered
[
i
][
'price_ac'
]
+
'</span></td>'
;
}
else
{
}
else
{
html
+=
'<td><span>'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span>'
+
price_arr
[
i
][
'price_cn'
]
+
'</span></td>'
;
html
+=
'<td><span>'
+
data
.
tiered
[
i
][
'purchases'
]
+
'</span></td><td>¥<span>'
+
data
.
tiered
[
i
][
'price_cn'
]
+
'</span></td>'
;
}
}
if
(
goods_type
==
1
)
{
if
(
goods_type
==
1
)
{
html
+=
'<td>$<span>'
+
price_arr
[
i
][
'price_us'
]
+
'</span></td>'
;
html
+=
'<td>$<span>'
+
data
.
tiered
[
i
][
'price_us'
]
+
'</span></td>'
;
}
}
}
}
html
+=
'</tr>'
;
html
+=
'</tr>'
;
}
}
if
(
data
.
ac_type
==
1
)
{
// $('.ladder_price_table tr:gt(0)').remove();
$
(
'.ladder_price_table tr:eq(0)'
).
append
(
'<th>活动价</th>'
)
$
(
'.ladder_price_table'
).
empty
().
append
(
html
);
}
$
(
'.ladder_price_table tr:gt(0)'
).
remove
();
$
(
'.ladder_price_table'
).
append
(
html
);
}
}
}
}
}
}
...
@@ -334,7 +337,7 @@
...
@@ -334,7 +337,7 @@
return
false
;
return
false
;
}
}
if
(
type
==
0
)
{
if
(
type
==
3
||
type
==
4
)
{
layer
.
msg
(
'仅支持联营商品下单,请在自营订单中下单'
);
layer
.
msg
(
'仅支持联营商品下单,请在自营订单中下单'
);
return
false
;
return
false
;
}
}
...
...
resources/views/addOnline/content.blade.php
View file @
6e3a293a
...
@@ -301,7 +301,7 @@
...
@@ -301,7 +301,7 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<span>
状态
:
</span>
<span>
是否能购买
:
</span>
<span
class=
"status"
></span>
<span
class=
"status"
></span>
</div>
</div>
</div>
</div>
...
@@ -310,10 +310,10 @@
...
@@ -310,10 +310,10 @@
<div
class=
"sku-info-right"
>
<div
class=
"sku-info-right"
>
<table
class=
"table table-hover ladder_price_table"
>
<table
class=
"table table-hover ladder_price_table"
>
<tr>
<
!-- <
tr>
<th>阶梯</th>
<th>阶梯</th>
<th>RMB价格</th>
<th>RMB价格</th>
</tr>
</tr>
-->
</table>
</table>
</div>
</div>
...
...
resources/views/addOrder/content.blade.php
View file @
6e3a293a
...
@@ -320,7 +320,7 @@
...
@@ -320,7 +320,7 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<span>
状态
:
</span>
<span>
是否能购买
:
</span>
<span
class=
"status"
></span>
<span
class=
"status"
></span>
</div>
</div>
</div>
</div>
...
@@ -329,11 +329,11 @@
...
@@ -329,11 +329,11 @@
<div
class=
"sku-info-right"
>
<div
class=
"sku-info-right"
>
<table
class=
"table table-hover ladder_price_table"
>
<table
class=
"table table-hover ladder_price_table"
>
<tr>
<
!-- <
tr>
<th>阶梯</th>
<th>阶梯</th>
<th>RMB价格</th>
<th>RMB价格</th>
<th>USD价格</th>
<th>USD价格</th>
</tr>
</tr>
-->
</table>
</table>
</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