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
...
@@ -176,11 +176,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'ucoupon/bestusebyordersystem'
;
$url
=
Config
(
'website.api_domain'
)
.
'ucoupon/bestusebyordersystem'
;
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
@@ -248,11 +244,7 @@ Class AddOrderController extends Controller
...
@@ -248,11 +244,7 @@ Class AddOrderController extends Controller
$data
[
'k1'
]
=
time
();
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$res
=
curlApi
(
$url
,
$data
,
'POST'
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
,
'POST'
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
!
empty
(
$response
[
'data'
]))
{
if
(
!
empty
(
$response
[
'data'
]))
{
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$response
[
'data'
]];
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$response
[
'data'
]];
...
@@ -279,11 +271,7 @@ Class AddOrderController extends Controller
...
@@ -279,11 +271,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/addByOrderSystem'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/addByOrderSystem'
;
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
@@ -305,11 +293,7 @@ Class AddOrderController extends Controller
...
@@ -305,11 +293,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/switchSaleType'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/switchSaleType'
;
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
}
}
...
@@ -328,11 +312,7 @@ Class AddOrderController extends Controller
...
@@ -328,11 +312,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/listsByOrderSystem'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/listsByOrderSystem'
;
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
@@ -361,11 +341,7 @@ Class AddOrderController extends Controller
...
@@ -361,11 +341,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/changeNumByOrderSystem'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/changeNumByOrderSystem'
;
}
}
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
@@ -387,11 +363,7 @@ Class AddOrderController extends Controller
...
@@ -387,11 +363,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/deleteByOrderSystem'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/deleteByOrderSystem'
;
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
@@ -424,11 +396,7 @@ Class AddOrderController extends Controller
...
@@ -424,11 +396,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/confirm'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/confirm'
;
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
...
@@ -518,11 +486,7 @@ Class AddOrderController extends Controller
...
@@ -518,11 +486,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'order/create'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/create'
;
$res
=
curlApi
(
$url
,
$data
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$response
=
json_decode
(
$res
,
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
[
'order_id'
=>
$response
[
'data'
],
'type'
=>
$data
[
'type'
]]];
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
...
@@ -1557,11 +1557,7 @@ Class OrderController extends Controller
$data
[
'k1'
]
=
time
();
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$res
=
curlApi
(
$url
,
$data
,
"POST"
);
$temp
=
json_decode
(
curlApi
(
$url
,
$data
,
"POST"
),
true
);
// 连接API
if
(
!
$res
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'未访问到API接口,请重新尝试'
];
$temp
=
json_decode
(
$res
,
true
);
// 连接API
if
(
$temp
[
'err_code'
]
!=
0
)
{
if
(
$temp
[
'err_code'
]
!=
0
)
{
return
[
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]];
return
[
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]];
...
...
resources/views/orderlist/content.blade.php
View file @
576af68a
...
@@ -287,14 +287,8 @@
...
@@ -287,14 +287,8 @@
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
]);
?>
</td>
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
]);
?>
</td>
<td
class=
"show-list"
>
<td
class=
"show-list"
>
<?php
<?php
if
(
$v
[
'order_pay_type'
]
==
3
)
{
// 账期订单待付款状态下显示未同步
if
(
in_array
(
$v
[
'status'
],
[
-
1
,
1
]))
{
$statusLimit
=
[
-
1
,
1
];
}
else
{
$statusLimit
=
[
-
1
,
1
,
2
];
}
if
(
in_array
(
$v
[
'status'
],
$statusLimit
))
{
echo
'不需同步'
;
echo
'不需同步'
;
}
else
{
}
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>'
;
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