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
576af68a
authored
May 16, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_erp_syn_20190514' into development
parents
8459b6c6
7da44015
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
58 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/OrderController.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
576af68a
...
...
@@ -176,11 +176,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'ucoupon/bestusebyordersystem'
;
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
...
@@ -248,11 +244,7 @@ Class AddOrderController extends Controller
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$res
=
curlApi
(
$url
,
$data
,
'POST'
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
,
'POST'
),
true
);
if
(
!
empty
(
$response
[
'data'
]))
{
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$response
[
'data'
]];
...
...
@@ -279,11 +271,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/addByOrderSystem'
;
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
...
@@ -305,11 +293,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/switchSaleType'
;
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
}
...
...
@@ -328,11 +312,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/listsByOrderSystem'
;
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
...
@@ -361,11 +341,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/changeNumByOrderSystem'
;
}
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
...
@@ -387,11 +363,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/deleteByOrderSystem'
;
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
...
@@ -424,11 +396,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/confirm'
;
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
...
@@ -518,11 +486,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'order/create'
;
$res
=
curlApi
(
$url
,
$data
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
[
'order_id'
=>
$response
[
'data'
],
'type'
=>
$data
[
'type'
]]];
...
...
app/Http/Controllers/OrderController.php
View file @
576af68a
...
...
@@ -1557,11 +1557,7 @@ Class OrderController extends Controller
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$res
=
curlApi
(
$url
,
$data
,
"POST"
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$temp
=
json_decode
(
$res
,
true
);
// 连接API
$temp
=
json_decode
(
curlApi
(
$url
,
$data
,
"POST"
),
true
);
// 连接API
if
(
$temp
[
'err_code'
]
!=
0
)
{
return
[
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]];
...
...
resources/views/orderlist/content.blade.php
View file @
576af68a
...
...
@@ -287,14 +287,8 @@
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
]);
?>
</td>
<td
class=
"show-list"
>
<?php
if
(
$v
[
'order_pay_type'
]
==
3
)
{
// 账期订单待付款状态下显示未同步
$statusLimit
=
[
-
1
,
1
];
}
else
{
$statusLimit
=
[
-
1
,
1
,
2
];
}
if
(
in_array
(
$v
[
'status'
],
$statusLimit
))
{
<?php
if
(
in_array
(
$v
[
'status'
],
[
-
1
,
1
]))
{
echo
'不需同步'
;
}
else
{
echo
$v
[
'erp_order_id'
]
!=
''
&&
$v
[
'erp_order_id'
]
!=
'-'
?
'<span class="list-text-success"><b>已同步</b></span>'
:
'<span class="list-text-checking"><b>未同步</b></span>'
;
...
...
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