Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
dafd7a8e
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dafd7a8e
编写于
5月 29, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单售后
上级
cf7ecfa1
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
145 addition
and
32 deletion
+145
-32
application/admin/controller/Orderaftersale.php
application/admin/controller/Orderaftersale.php
+26
-0
application/admin/view/default/orderaftersale/index.html
application/admin/view/default/orderaftersale/index.html
+4
-5
application/index/view/default/orderaftersale/aftersale.html
application/index/view/default/orderaftersale/aftersale.html
+3
-3
application/index/view/default/orderaftersale/index.html
application/index/view/default/orderaftersale/index.html
+2
-2
application/service/OrderAftersaleService.php
application/service/OrderAftersaleService.php
+97
-5
extend/payment/Weixin.php
extend/payment/Weixin.php
+2
-7
public/static/admin/default/css/orderaftersale.css
public/static/admin/default/css/orderaftersale.css
+2
-1
public/static/index/default/css/orderaftersale.aftersale.css
public/static/index/default/css/orderaftersale.aftersale.css
+9
-9
未找到文件。
application/admin/controller/Orderaftersale.php
浏览文件 @
dafd7a8e
...
@@ -156,6 +156,8 @@ class Orderaftersale extends Common
...
@@ -156,6 +156,8 @@ class Orderaftersale extends Common
}
}
$params
=
input
();
$params
=
input
();
$params
[
'creator'
]
=
$this
->
admin
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
admin
[
'username'
];
return
OrderAftersaleService
::
AftersaleRefuse
(
$params
);
return
OrderAftersaleService
::
AftersaleRefuse
(
$params
);
}
}
...
@@ -176,7 +178,31 @@ class Orderaftersale extends Common
...
@@ -176,7 +178,31 @@ class Orderaftersale extends Common
}
}
$params
=
input
();
$params
=
input
();
$params
[
'creator'
]
=
$this
->
admin
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
admin
[
'username'
];
return
OrderAftersaleService
::
AftersaleCancel
(
$params
);
return
OrderAftersaleService
::
AftersaleCancel
(
$params
);
}
}
/**
* 订单删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-30
* @desc description
*/
public
function
Delete
()
{
// 是否ajax请求
if
(
!
IS_AJAX
)
{
return
$this
->
error
(
'非法访问'
);
}
$params
=
input
();
$params
[
'creator'
]
=
$this
->
admin
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
admin
[
'username'
];
return
OrderAftersaleService
::
AftersaleDelete
(
$params
);
}
}
}
?>
?>
\ No newline at end of file
application/admin/view/default/orderaftersale/index.html
浏览文件 @
dafd7a8e
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
<th
class=
"am-hide-sm-only"
>
凭证
</th>
<th
class=
"am-hide-sm-only"
>
凭证
</th>
<th
class=
"am-hide-sm-only"
>
状态
</th>
<th
class=
"am-hide-sm-only"
>
状态
</th>
<th
class=
"am-hide-sm-only"
>
快递信息
</th>
<th
class=
"am-hide-sm-only"
>
快递信息
</th>
<th>
更多
</th>
<th
class=
"row-more"
>
更多
</th>
<th
class=
"row-operation"
>
操作
</th>
<th
class=
"row-operation"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
<span
class=
"am-badge am-badge-success am-margin-top-xs"
>
{{$v.refundment_text}}
</span>
<span
class=
"am-badge am-badge-success am-margin-top-xs"
>
{{$v.refundment_text}}
</span>
{{/if}}
{{/if}}
{{if $v['status'] eq 4 and !empty($v['refuse_reason'])}}
{{if $v['status'] eq 4 and !empty($v['refuse_reason'])}}
<span
class=
"am-
badge am-badge-danger am-margin-top-xs
"
>
{{$v.refuse_reason}}
</span>
<span
class=
"am-
text-danger
"
>
{{$v.refuse_reason}}
</span>
{{/if}}
{{/if}}
</td>
</td>
<td
class=
"am-hide-sm-only"
>
<td
class=
"am-hide-sm-only"
>
...
@@ -236,10 +236,9 @@
...
@@ -236,10 +236,9 @@
{{if $v['status'] eq 3 and !empty($v['refundment_text'])}}
{{if $v['status'] eq 3 and !empty($v['refundment_text'])}}
<span
class=
"am-badge am-badge-success am-margin-top-xs"
>
{{$v.refundment_text}}
</span>
<span
class=
"am-badge am-badge-success am-margin-top-xs"
>
{{$v.refundment_text}}
</span>
{{/if}}
{{/if}}
{{if $v['status'] eq 4 and !empty($v['refuse_reason'])}}
<span
class=
"am-badge am-badge-danger am-margin-top-xs"
>
{{$v.refuse_reason}}
</span>
{{/if}}
</dd>
</dd>
<dt>
拒绝原因
</dt>
<dd
class=
"am-text-danger"
>
{{$v.refuse_reason}}
</dd>
<dt>
快递信息
</dt>
<dt>
快递信息
</dt>
<dd>
<dd>
...
...
application/index/view/default/orderaftersale/aftersale.html
浏览文件 @
dafd7a8e
...
@@ -215,7 +215,7 @@
...
@@ -215,7 +215,7 @@
</div>
</div>
<div
class=
"am-cf am-padding-vertical-xs"
>
<div
class=
"am-cf am-padding-vertical-xs"
>
<span>
拒绝原因:
</span>
<span>
拒绝原因:
</span>
<span>
{{$new_aftersale_data.refuse_reason}}
</span>
<span
class=
"am-text-danger"
>
{{$new_aftersale_data.refuse_reason}}
</span>
</div>
</div>
<div
class=
"am-cf am-padding-vertical-xs"
>
<div
class=
"am-cf am-padding-vertical-xs"
>
<span>
申请时间:
</span>
<span>
申请时间:
</span>
...
@@ -274,10 +274,10 @@
...
@@ -274,10 +274,10 @@
<div
class=
"am-u-md-6 voucher-container"
>
<div
class=
"am-u-md-6 voucher-container"
>
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel-hd"
>
凭证
</div>
<div
class=
"am-panel-hd"
>
凭证
</div>
<div
class=
"am-panel-bd"
>
<div
class=
"am-panel-bd
am-cf
"
>
{{if !empty($new_aftersale_data['images'])}}
{{if !empty($new_aftersale_data['images'])}}
{{foreach $new_aftersale_data.images as $img}}
{{foreach $new_aftersale_data.images as $img}}
<a
href=
"{{$img}}"
target=
"_blank"
>
<a
href=
"{{$img}}"
target=
"_blank"
class=
"am-fl am-margin-right-xs"
>
<img
src=
"{{$img}}"
class=
"am-img-thumbnail am-block"
width=
"80"
height=
"80"
/>
<img
src=
"{{$img}}"
class=
"am-img-thumbnail am-block"
width=
"80"
height=
"80"
/>
</a>
</a>
{{/foreach}}
{{/foreach}}
...
...
application/index/view/default/orderaftersale/index.html
浏览文件 @
dafd7a8e
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
<span
class=
"am-badge am-badge-success am-margin-top-xs"
>
{{$v.refundment_text}}
</span>
<span
class=
"am-badge am-badge-success am-margin-top-xs"
>
{{$v.refundment_text}}
</span>
{{/if}}
{{/if}}
{{if $v['status'] eq 4 and !empty($v['refuse_reason'])}}
{{if $v['status'] eq 4 and !empty($v['refuse_reason'])}}
<span
class=
"am-
badge am-badge-danger am-margin-top-xs
"
>
{{$v.refuse_reason}}
</span>
<span
class=
"am-
text-danger
"
>
{{$v.refuse_reason}}
</span>
{{/if}}
{{/if}}
</td>
</td>
<td
class=
"am-hide-sm-only"
>
<td
class=
"am-hide-sm-only"
>
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
{{if $v['status'] eq 1 and $v['type'] eq 1}}
{{if $v['status'] eq 1 and $v['type'] eq 1}}
<a
href=
"{{:MyUrl('index/orderaftersale/aftersale', ['id'=>$v['order_id'], 'gid'=>$v['goods_id']])}}"
target=
"_blank"
class=
"am-btn am-btn-secondary am-btn-xs am-radius am-icon-send am-btn-block"
>
发货
</a>
<a
href=
"{{:MyUrl('index/orderaftersale/aftersale', ['id'=>$v['order_id'], 'gid'=>$v['goods_id']])}}"
target=
"_blank"
class=
"am-btn am-btn-secondary am-btn-xs am-radius am-icon-send am-btn-block"
>
发货
</a>
{{/if}}
{{/if}}
{{if !in_array($v['status'], [3,
4,
5])}}
{{if !in_array($v['status'], [3,5])}}
<button
type=
"button"
class=
"am-btn am-btn-warning am-btn-xs am-radius am-icon-paint-brush am-btn-block submit-ajax submit-cancel"
data-url=
"{{:MyUrl('index/orderaftersale/cancel')}}"
data-id=
"{{$v.id}}"
data-view=
"reload"
>
取消
</button>
<button
type=
"button"
class=
"am-btn am-btn-warning am-btn-xs am-radius am-icon-paint-brush am-btn-block submit-ajax submit-cancel"
data-url=
"{{:MyUrl('index/orderaftersale/cancel')}}"
data-id=
"{{$v.id}}"
data-view=
"reload"
>
取消
</button>
{{/if}}
{{/if}}
<a
href=
"{{:MyUrl('index/orderaftersale/aftersale', ['oid'=>$v['order_id'], 'did'=>$v['order_detail_id']])}}"
target=
"_blank"
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-cubes am-btn-block"
>
详情
</a>
<a
href=
"{{:MyUrl('index/orderaftersale/aftersale', ['oid'=>$v['order_id'], 'did'=>$v['order_detail_id']])}}"
target=
"_blank"
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-cubes am-btn-block"
>
详情
</a>
...
...
application/service/OrderAftersaleService.php
浏览文件 @
dafd7a8e
...
@@ -176,7 +176,7 @@ class OrderAftersaleService
...
@@ -176,7 +176,7 @@ class OrderAftersaleService
$history_price
=
PriceNumberFormat
(
Db
::
name
(
'OrderAftersale'
)
->
where
(
$where
)
->
sum
(
'price'
));
$history_price
=
PriceNumberFormat
(
Db
::
name
(
'OrderAftersale'
)
->
where
(
$where
)
->
sum
(
'price'
));
if
(
$price
+
$history_price
>
$order
[
'data'
][
'pay_price'
])
if
(
$price
+
$history_price
>
$order
[
'data'
][
'pay_price'
])
{
{
return
DataReturn
(
'退款金额大于支付金额[ 历史退款
'
.
$history_price
.
'
]'
,
-
1
);
return
DataReturn
(
'退款金额大于支付金额[ 历史退款
'
.
$history_price
.
'元, 订单金额'
.
$order
[
'data'
][
'pay_price'
]
.
'元
]'
,
-
1
);
}
}
// 退货数量
// 退货数量
...
@@ -189,7 +189,7 @@ class OrderAftersaleService
...
@@ -189,7 +189,7 @@ class OrderAftersaleService
{
{
if
(
$number
+
$history_number
>
$order
[
'data'
][
'items'
][
'buy_number'
])
if
(
$number
+
$history_number
>
$order
[
'data'
][
'items'
][
'buy_number'
])
{
{
return
DataReturn
(
'退货数量大于购买数量[ 历史退货数量 '
.
$history_number
.
' ]'
,
-
1
);
return
DataReturn
(
'退货数量大于购买数量[ 历史退货数量 '
.
$history_number
.
'
, 订单商品数量 '
.
$order
[
'data'
][
'items'
][
'buy_number'
]
.
'
]'
,
-
1
);
}
}
}
}
...
@@ -683,7 +683,7 @@ class OrderAftersaleService
...
@@ -683,7 +683,7 @@ class OrderAftersaleService
$history_price
=
PriceNumberFormat
(
Db
::
name
(
'OrderAftersale'
)
->
where
(
$where
)
->
sum
(
'price'
));
$history_price
=
PriceNumberFormat
(
Db
::
name
(
'OrderAftersale'
)
->
where
(
$where
)
->
sum
(
'price'
));
if
(
$aftersale
[
'price'
]
+
$history_price
>
$order
[
'data'
][
'pay_price'
])
if
(
$aftersale
[
'price'
]
+
$history_price
>
$order
[
'data'
][
'pay_price'
])
{
{
return
DataReturn
(
'退款金额大于支付金额[ 历史退款
'
.
$history_price
.
'
]'
,
-
1
);
return
DataReturn
(
'退款金额大于支付金额[ 历史退款
'
.
$history_price
.
'元, 订单金额'
.
$order
[
'data'
][
'pay_price'
]
.
'元
]'
,
-
1
);
}
}
// 历史退货数量
// 历史退货数量
...
@@ -693,7 +693,7 @@ class OrderAftersaleService
...
@@ -693,7 +693,7 @@ class OrderAftersaleService
{
{
if
(
$aftersale
[
'number'
]
+
$history_number
>
$order
[
'data'
][
'items'
][
'buy_number'
])
if
(
$aftersale
[
'number'
]
+
$history_number
>
$order
[
'data'
][
'items'
][
'buy_number'
])
{
{
return
DataReturn
(
'退货数量大于购买数量[ 历史退货数量 '
.
$history_number
.
' ]'
,
-
1
);
return
DataReturn
(
'退货数量大于购买数量[ 历史退货数量 '
.
$history_number
.
'
, 订单商品数量 '
.
$order
[
'data'
][
'items'
][
'buy_number'
]
.
'
]'
,
-
1
);
}
}
}
}
...
@@ -964,7 +964,99 @@ class OrderAftersaleService
...
@@ -964,7 +964,99 @@ class OrderAftersaleService
*/
*/
public
static
function
AftersaleRefuse
(
$params
=
[])
public
static
function
AftersaleRefuse
(
$params
=
[])
{
{
return
DataReturn
(
'开发中'
,
-
10
);
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'id'
,
'error_msg'
=>
'操作id有误'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'refuse_reason'
,
'checked_data'
=>
'2,230'
,
'error_msg'
=>
'拒绝原因格式 2~230 个字符'
,
],
];
$ret
=
ParamsChecked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 售后订单
$aftersale
=
Db
::
name
(
'OrderAftersale'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
find
();
if
(
empty
(
$aftersale
))
{
return
DataReturn
(
'数据不存在或已删除'
,
-
1
);
}
// 状态校验
if
(
!
in_array
(
$aftersale
[
'status'
],
[
0
,
2
]))
{
$status_list
=
lang
(
'common_order_aftersale_status_list'
);
return
DataReturn
(
'状态不可操作['
.
$status_list
[
$aftersale
[
'status'
]][
'name'
]
.
']'
,
-
1
);
}
// 更新操作
$data
=
[
'status'
=>
4
,
'refuse_reason'
=>
$params
[
'refuse_reason'
],
'audit_time'
=>
time
(),
'upd_time'
=>
time
(),
];
if
(
Db
::
name
(
'OrderAftersale'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
update
(
$data
))
{
return
DataReturn
(
'拒绝成功'
,
0
);
}
return
DataReturn
(
'拒绝失败'
,
-
100
);
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-27
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
AftersaleDelete
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'id'
,
'error_msg'
=>
'操作id有误'
,
],
];
$ret
=
ParamsChecked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 售后订单
$aftersale
=
Db
::
name
(
'OrderAftersale'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
find
();
if
(
empty
(
$aftersale
))
{
return
DataReturn
(
'数据不存在或已删除'
,
-
1
);
}
// 状态校验
if
(
!
in_array
(
$aftersale
[
'status'
],
[
4
,
5
]))
{
$status_list
=
lang
(
'common_order_aftersale_status_list'
);
return
DataReturn
(
'状态不可操作['
.
$status_list
[
$aftersale
[
'status'
]][
'name'
]
.
']'
,
-
1
);
}
// 删除操作
if
(
Db
::
name
(
'OrderAftersale'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
delete
())
{
return
DataReturn
(
'删除成功'
,
0
);
}
return
DataReturn
(
'删除失败'
,
-
100
);
}
}
}
}
?>
?>
\ No newline at end of file
extend/payment/Weixin.php
浏览文件 @
dafd7a8e
...
@@ -636,18 +636,13 @@ class Weixin
...
@@ -636,18 +636,13 @@ class Weixin
if
(
$use_cert
==
true
)
if
(
$use_cert
==
true
)
{
{
//设置证书
//使用证书:cert 与 key 分别属于两个.pem文件
$apiclient
=
$this
->
GetApiclientFile
();
$apiclient
=
$this
->
GetApiclientFile
();
$options
[
CURLOPT_SSLCERTTYPE
]
=
'PEM'
;
$options
[
CURLOPT_SSLCERTTYPE
]
=
'PEM'
;
$options
[
CURLOPT_SSLCERT
]
=
$apiclient
[
'cert'
];
$options
[
CURLOPT_SSLCERT
]
=
$apiclient
[
'cert'
];
$options
[
CURLOPT_SSLKEYTYPE
]
=
'PEM'
;
$options
[
CURLOPT_SSLKEYTYPE
]
=
'PEM'
;
$options
[
CURLOPT_SSLKEY
]
=
$apiclient
[
'key'
];
$options
[
CURLOPT_SSLKEY
]
=
$apiclient
[
'key'
];
//设置证书
//使用证书:cert 与 key 分别属于两个.pem文件
// $options[CURLOPT_SSLCERTTYPE] = 'PEM';
// $options[CURLOPT_SSLCERT] = ROOT.'cert/apiclient_cert.pem';
// $options[CURLOPT_SSLKEYTYPE] = 'PEM';
// $options[CURLOPT_SSLKEY] = ROOT.'cert/apiclient_key.pem';
}
}
$ch
=
curl_init
(
$url
);
$ch
=
curl_init
(
$url
);
...
...
public/static/admin/default/css/orderaftersale.css
浏览文件 @
dafd7a8e
...
@@ -33,11 +33,12 @@
...
@@ -33,11 +33,12 @@
.content-right
table
.am-table
tr
.row-user-info
{
width
:
20%
;
}
.content-right
table
.am-table
tr
.row-user-info
{
width
:
20%
;
}
.content-right
table
.am-table
tr
.row-goods
{
width
:
20%
;
}
.content-right
table
.am-table
tr
.row-goods
{
width
:
20%
;
}
.content-right
table
.am-table
tr
.row-apply
{
width
:
25%
;
}
.content-right
table
.am-table
tr
.row-apply
{
width
:
25%
;
}
.content-right
table
.am-table
tr
.row-more
{
width
:
80px
;
}
.content-right
table
.am-table
tr
.row-operation
{
width
:
85px
;
}
.content-right
table
.am-table
tr
.row-operation
{
width
:
85px
;
}
}
}
@media
only
screen
and
(
max-width
:
640px
)
{
@media
only
screen
and
(
max-width
:
640px
)
{
.content-right
table
.am-table
tr
.row-apply
{
width
:
50%
;
}
.content-right
table
.am-table
tr
.row-apply
{
width
:
50%
;
}
.content-right
table
.am-table
tr
.row-operation
{
width
:
75px
;
}
.content-right
table
.am-table
tr
.row-operation
,
.content-right
table
.am-table
tr
.row-more
{
width
:
75px
;
}
}
}
.content-right
table
.am-table
.am-slider
{
.content-right
table
.am-table
.am-slider
{
...
...
public/static/index/default/css/orderaftersale.aftersale.css
浏览文件 @
dafd7a8e
...
@@ -169,7 +169,14 @@ form.form-validation .number-container .am-input-group-label {
...
@@ -169,7 +169,14 @@ form.form-validation .number-container .am-input-group-label {
/**
/**
* 详情信息
* 详情信息
*/
*/
@media
only
screen
and
(
min-width
:
460px
)
{
.user-content-body
.detail
.am-u-md-6
.am-panel
{
box-shadow
:
none
;
-webkit-box-shadow
:
none
;
}
.user-content-body
.detail
.am-u-md-6
.am-panel-bd
{
padding
:
10px
;
}
@media
only
screen
and
(
min-width
:
641px
)
{
.user-content-body
.apply-container
{
.user-content-body
.apply-container
{
padding-left
:
0
;
padding-left
:
0
;
padding-right
:
10px
;
padding-right
:
10px
;
...
@@ -179,15 +186,8 @@ form.form-validation .number-container .am-input-group-label {
...
@@ -179,15 +186,8 @@ form.form-validation .number-container .am-input-group-label {
padding-right
:
0
;
padding-right
:
0
;
}
}
}
}
@media
only
screen
and
(
max-width
:
460
px
)
{
@media
only
screen
and
(
max-width
:
641
px
)
{
.user-content-body
.detail
.am-u-md-6
{
.user-content-body
.detail
.am-u-md-6
{
padding
:
0
;
padding
:
0
;
}
}
}
.user-content-body
.detail
.am-u-md-6
.am-panel
{
box-shadow
:
none
;
-webkit-box-shadow
:
none
;
}
.user-content-body
.detail
.am-u-md-6
.am-panel-bd
{
padding
:
10px
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录