Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xxmp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chan
xxmp
Commits
3cb3b19f
Commit
3cb3b19f
authored
Apr 29, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品详情
parent
d1114524
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
23 deletions
+70
-23
shopendorder.inc.php
addons/longbing_company/inc/web/manage/shopendorder.inc.php
+13
-10
shopgoodsdetail.inc.php
addons/longbing_company/inc/wxapp/shopgoodsdetail.inc.php
+1
-1
orders.html
addons/longbing_company/template/manage/orders.html
+56
-12
No files found.
addons/longbing_company/inc/web/manage/shopendorder.inc.php
View file @
3cb3b19f
...
...
@@ -41,6 +41,10 @@ function changeWater($id)
}
}
function
result
(
$tyep
,
$msg
,
$data
){
exit
(
json_encode
(
array
(
'errno'
=>
$tyep
,
'message'
=>
$msg
,
'data'
=>
$data
)));
}
function
checkFreeCard
(
$order_id
){
$order_goods_list
=
pdo_getall
(
'longbing_company_shop_order_item'
,
array
(
'order_id'
=>
$order_id
));
$return
=
false
;
...
...
@@ -59,21 +63,20 @@ is_file(ROOT_PATH . '/inc/we7.php') || exit('Access Denied Longbing');
require_once
ROOT_PATH
.
'/inc/we7.php'
;
global
$_GPC
;
global
$_W
;
$uid
=
$_GPC
[
'user_id'
];
$id
=
$_GPC
[
'id'
];
if
(
!
$uid
||
!
$id
)
{
re
turn
$this
->
re
sult
(
-
1
,
''
,
array
());
if
(
!
$id
)
{
result
(
-
1
,
''
,
array
());
}
$where
=
array
(
'user_id'
=>
$uid
,
'id'
=>
$id
);
$where
=
array
(
'id'
=>
$id
);
$info
=
pdo_get
(
'longbing_company_shop_order'
,
$where
);
if
(
!
$info
)
{
re
turn
$this
->
re
sult
(
-
1
,
''
,
array
());
result
(
-
1
,
''
,
array
());
}
if
(
$info
[
'
order_status'
]
!=
2
)
{
re
turn
$this
->
re
sult
(
-
1
,
''
,
array
());
$uid
=
$info
[
'user_id'
];
if
(
$info
[
'
pay_status'
]
!=
1
)
{
result
(
-
1
,
''
,
array
());
}
$uniacid
=
$info
[
'uniacid'
];
$result
=
pdo_update
(
'longbing_company_shop_order'
,
array
(
'order_status'
=>
3
),
$where
);
...
...
@@ -91,9 +94,9 @@ if ($result) {
/*if(checkFreeCard($id)){
pdo_update('longbing_company_user', array('is_pay' => 1,'is_staff'=>1), array('id' => $uid));
}*/
re
turn
$this
->
re
sult
(
0
,
''
,
array
());
result
(
0
,
''
,
array
());
}
re
turn
$this
->
re
sult
(
-
1
,
''
,
array
());
result
(
-
1
,
''
,
array
());
?>
addons/longbing_company/inc/wxapp/shopgoodsdetail.inc.php
View file @
3cb3b19f
...
...
@@ -123,7 +123,7 @@ function curlPostTmp($url, $data)
}
function
getCompanys
(
$good_id
){
$sql
=
"SELECT c.id,c.name FROM"
.
tablename
(
'longbing_company_company'
)
.
" c LEFT JOIN "
.
tablename
(
'longbing_company_goods_company'
)
.
" g
$sql
=
"SELECT c.id,c.
short_
name FROM"
.
tablename
(
'longbing_company_company'
)
.
" c LEFT JOIN "
.
tablename
(
'longbing_company_goods_company'
)
.
" g
ON c.id=g.company_id WHERE g.good_id=
$good_id
and g.isdel=0 and c.status=1"
;
$list
=
pdo_fetchall
(
$sql
);
return
$list
;
...
...
addons/longbing_company/template/manage/orders.html
View file @
3cb3b19f
...
...
@@ -115,6 +115,29 @@
<script
src=
"../../../addons/{$module_name}/images/layuiadmin/layui/layui.js"
></script>
<script
src=
"../../../addons/{$module_name}/images/js/jquery.min.js"
></script>
<script>
function
ajaxFun
(
e
,
fun
){
var
json_mun
=
false
;
$
.
ajax
({
type
:
"post"
,
url
:
e
.
url
,
data
:
e
.
json
,
async
:
false
,
dataType
:
"json"
,
success
:
function
(
resp
){
json_mun
=
resp
;
if
(
fun
){
fun
(
json_mun
);
return
false
;
}
},
error
:
function
(){
if
(
fun
){
fun
(
json_mun
)
return
false
;
}
}
});
}
layui
.
use
([
'layer'
,
'laypage'
],
function
()
{
var
layer
=
layui
.
layer
,
laypage
=
layui
.
laypage
;
...
...
@@ -148,19 +171,40 @@
return
false
;
}
$
(
"input[name='itemId']"
).
val
(
id
);
layer
.
open
({
type
:
1
,
title
:
false
,
closeBtn
:
0
,
shadeClose
:
true
,
skin
:
'yourClass'
,
content
:
'<div style="padding: 20px; width: 260px; height: 210px;">'
+
'<input type="text" autocomplete="off" class="layui-input" value="" id="courier_number" placeholder="请输入快递单号">'
+
'<input type="text" autocomplete="off" class="layui-input" value="" id="express_company" placeholder="请输入快递公司" style="margin-top: 10px">'
+
'<input type="text" autocomplete="off" class="layui-input" value="" id="express_phone" placeholder="请输入快递查询电话" style="margin-top: 10px">'
+
'<button class="layui-btn" required lay-verify="required" style="margin-top: 30px" onclick="btnSub()">立即提交</button>'
+
'</div>'
layer
.
confirm
(
'是否审核通过?'
,
{
btn
:
[
'通过'
,
'取消'
]
//按钮
},
function
(){
ajaxFun
({
url
:
"{php echo $this->createWebUrl('manage/shopendorder')}"
,
json
:{
id
:
id
}
},
function
(
e
){
if
(
e
){
if
(
e
.
errno
==
0
){
layer
.
msg
(
"审核成功!"
);
}
else
{
layer
.
msg
(
"审核失败!"
);
}
//e是后台返回的数据;这里是成功的意思
}
else
{
layer
.
msg
(
"网络失败,请稍后再试!"
);
}
})
},
function
(){
//取消调这里
});
// layer.open({
// type: 1,
// title: false,
// closeBtn: 0,
// shadeClose: true,
// skin: 'yourClass',
// content: '
<
div
style
=
"padding: 20px; width: 260px; height: 210px;"
>
' +
// '
<
input
type
=
"text"
autocomplete
=
"off"
class
=
"layui-input"
value
=
""
id
=
"courier_number"
placeholder
=
"请输入快递单号"
>
' +
// '
<
input
type
=
"text"
autocomplete
=
"off"
class
=
"layui-input"
value
=
""
id
=
"express_company"
placeholder
=
"请输入快递公司"
style
=
"margin-top: 10px"
>
' +
// '
<
input
type
=
"text"
autocomplete
=
"off"
class
=
"layui-input"
value
=
""
id
=
"express_phone"
placeholder
=
"请输入快递查询电话"
style
=
"margin-top: 10px"
>
' +
// '
<
button
class
=
"layui-btn"
required
lay
-
verify
=
"required"
style
=
"margin-top: 30px"
onclick
=
"btnSub()"
>
立即提交
<
/button>'
+
// '
<
/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