Commit d2159f22 by 朱继来

自营添加推送WMS

parent ffb13fcc
......@@ -377,5 +377,15 @@ class ApiController extends Controller
$this->Export(0, '更新标准品牌成功');
}
public function pushWms($request)
{
$order_sn = $request->input('order_sn', '');
$url = Config('website.pur_url').'/server/wms2?order_sn='.$order_sn;
$res = curlApi($url);
$this->Export(0, '成功');
}
}
......@@ -99,5 +99,7 @@ return [
'export_url' => 'http://export.liexin.com',
'export_joint_source_id' => 16,
'export_self_source_id' => 17,
'pur_url' => 'http://pur.ichunt.net',
];
......@@ -382,13 +382,19 @@
<!-- 管理员和自营客服主管或有推送权限显示 -->
@if ((in_array($role, [1, 10]) || in_array('self_send_salesman', $userPerms)))
<a class="btn btn-info" href="/sendSales/{{ $v['order_id'] }}?tags=self" target="_blank">推送</a>
<a class="btn btn-info" href="/sendSales/{{ $v['order_id'] }}?tags=self" target="_blank">推送客服</a>
@endif
@if ($v['status'] > 1 && in_array('self_order_download_contract', $userPerms))
<a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a>
@endif
@if ($v['status'] >= 4 && $v['status'] <= 7)
<a class="btn btn-warning push-wms" data-sn="{{$v['order_sn']}}" href="javascript:;">推送WMS</a>
<!-- <a class="btn btn-warning" href="{{ Config('website.pur_url') }}/server/wms2?order_sn={{$v['order_sn']}}" target="_blank">推送WMS</a> -->
@endif
@if ($v['status'] == -1 && !$v['cancel_reason'])
<a class="btn btn-danger input-cancel-reason" href="javascript:;" data-oid="{{$v['order_id']}}" data-type="4">填写取消原因</a>
@endif
......@@ -481,4 +487,30 @@
$.lie.order.index();
$.lie.track.orderTrack();
$.lie.cancel.cancelorder();
// 推送到WMS
$('.push-wms').click(function() {
var order_sn = $(this).data('sn');
layer.open({
title: '推送WMS',
content: '确定推送到WMS吗?',
btn: ['确定', '取消'],
btn1: function(index) {
$.ajax({
url: '/api/pushWms',
data: {order_sn: order_sn},
dataType: "json",
success: function(resp) {
layer.close(index);
layer.msg('成功');
}
});
},
btn2: function(index) {
layer.close(index)
}
})
})
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment