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
4f18777e
authored
May 23, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_erp_syn_20190514' into development
parents
576af68a
29a9b7d9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
131 additions
and
156 deletions
app/Http/Controllers/OrderController.php
app/Http/routes.php
app/Model/OrderModel.php
config/params.php
public/js/order.js
resources/views/detail/changeOrder.blade.php
resources/views/detail/content.blade.php
resources/views/erpOrder/content.blade.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
4f18777e
...
...
@@ -1567,6 +1567,27 @@ Class OrderController extends Controller
}
}
// 编辑合同乙方信息
public
function
editContract
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$order_id
=
$request
->
input
(
'order_id'
,
''
);
$data
[
'contract_com_name'
]
=
$request
->
input
(
'contract_com_name'
,
''
);
$data
[
'contract_com_addr'
]
=
$request
->
input
(
'contract_com_addr'
,
''
);
$data
[
'contract_link_name'
]
=
$request
->
input
(
'contract_link_name'
,
''
);
$data
[
'contract_link_tel'
]
=
$request
->
input
(
'contract_link_tel'
,
''
);
DB
::
connection
(
'order'
)
->
transaction
(
function
()
use
(
$request
,
$order_id
,
$data
)
{
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
(
'order_id'
,
$order_id
)
->
update
(
$data
);
$OrderActionLogModel
=
new
OrderActionLogModel
();
$OrderActionLogModel
->
addLog
(
$order_id
,
$request
->
user
->
userId
,
2
,
'编辑合同乙方信息'
);
// 操作记录
});
return
[
'errcode'
=>
0
,
'errmsg'
=>
'编辑合同成功'
];
}
}
public
function
tempCount
(
Request
$request
)
{
$current
=
strtotime
(
date
(
'Y-m-d'
,
time
()));
// 当天0点
...
...
app/Http/routes.php
View file @
4f18777e
...
...
@@ -122,6 +122,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
get
(
'/refund_self_export'
,
'RefundController@refundSelfExport'
);
Route
::
post
(
'/ajax/offlinePaid'
,
'OrderController@offlinePaid'
);
Route
::
post
(
'/ajax/editContract'
,
'OrderController@editContract'
);
});
// 不需要登陆态
...
...
app/Model/OrderModel.php
View file @
4f18777e
...
...
@@ -264,9 +264,9 @@ class OrderModel extends Model
// 标题
if
(
$map
[
'order_goods_type'
]
==
1
)
{
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'是否为新订单'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
$sale_name
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'
订单
类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
];
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'会员账号'
,
'是否为新订单'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
$sale_name
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'
付款
类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
];
}
else
{
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'销售类型'
,
'业务类型'
,
'会员账号'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
$sale_name
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'
订单
类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
];
$headerCell
=
[
'订单ID'
,
'订单编号'
,
'销售类型'
,
'业务类型'
,
'会员账号'
,
'收货人'
,
'下单日期'
,
'下单时间'
,
'客户名称'
,
'平台来源'
,
'商品型号'
,
'制造商'
,
'供应商'
,
'数量'
,
'单价'
,
'均摊后单价'
,
'商品小计'
,
'币种'
,
$sale_name
,
'商品总额'
,
'运费'
,
'附加费'
,
'优惠券'
,
'订单总额'
,
'
付款
类型'
,
'订单状态'
,
'发货状态'
,
'收货地址'
,
'发票类型'
,
'发票状态'
,
'发票抬头'
,
'公司注册地址'
,
'公司电话'
,
'adtags来源'
,
'新用户来源'
,
'取消原因'
,
'推送备注'
,
'是否为测试订单'
];
}
array_unshift
(
$cellData
,
$headerCell
);
...
...
@@ -290,25 +290,6 @@ class OrderModel extends Model
*/
public
function
exportList
(
$order
)
{
// 订单类型
$order_type
=
array
(
'1'
=>
'全款'
,
'2'
=>
'预付款'
,
'3'
=>
'账期支付'
,
);
// 订单状态
$order_status
=
array
(
'-1'
=>
'已取消'
,
'1'
=>
'待审核'
,
'2'
=>
'待付款'
,
'3'
=>
'待付尾款'
,
'4'
=>
'待发货'
,
'7'
=>
'部分发货'
,
'8'
=>
'待收货'
,
'10'
=>
'交易成功'
,
);
// 订单发货状态
$shipping_status
=
array
(
'-1'
=>
'未配送'
,
...
...
@@ -393,8 +374,8 @@ class OrderModel extends Model
$tmp
[
$i
][
'order_amount'
]
=
$order
[
$i
][
'order_amount'
];
}
$tmp
[
$i
][
'order_type'
]
=
!
empty
(
$order
[
$i
][
'order_pay_type'
])
?
$order_type
[
$order
[
$i
][
'order_pay_type'
]]
:
'未知'
;
$tmp
[
$i
][
'order_status'
]
=
!
empty
(
$order
[
$i
][
'status'
])
?
$order_status
[
$order
[
$i
][
'status'
]]
:
'未知'
;
$tmp
[
$i
][
'order_type'
]
=
!
empty
(
$order
[
$i
][
'order_pay_type'
])
?
Config
(
'params.order_pay_type'
)
[
$order
[
$i
][
'order_pay_type'
]]
:
'未知'
;
$tmp
[
$i
][
'order_status'
]
=
!
empty
(
$order
[
$i
][
'status'
])
?
Config
(
'params.order_status'
)
[
$order
[
$i
][
'status'
]]
:
'未知'
;
$tmp
[
$i
][
'shipping_status'
]
=
!
empty
(
$order
[
$i
][
'shipping_status'
])
?
$shipping_status
[
$order
[
$i
][
'shipping_status'
]]
:
'无发货信息'
;
// 发货状态
$tmp
[
$i
][
'address'
]
=
$order
[
$i
][
'address'
];
$tmp
[
$i
][
'inv_type'
]
=
$order
[
$i
][
'inv_type'
]
?
$inv_type
[
$order
[
$i
][
'inv_type'
]]
:
'未知'
;
// 发票类型
...
...
config/params.php
View file @
4f18777e
...
...
@@ -12,6 +12,13 @@
10
=>
'交易成功'
,
],
'order_pay_type'
=>
[
1
=>
'全款'
,
2
=>
'预付款'
,
3
=>
'账期'
,
4
=>
'货到付款'
,
],
// 支付方式
'order_paid_name'
=>
[
1
=>
'微信支付'
,
...
...
public/js/order.js
View file @
4f18777e
...
...
@@ -809,6 +809,77 @@
});
})
// 编辑合同信息
$
(
'.contract_info_edit'
).
click
(
function
(){
var
order_id
=
$
(
'input[name=order_id]'
).
val
();
var
content
=
$
(
'.contract_info:hidden'
).
html
();
layer
.
open
({
area
:[
'500px'
],
title
:
'编辑合同信息'
,
content
:
content
,
btn
:
[
'确认'
,
'取消'
],
btn1
:
function
()
{
var
contract_com_name
=
$
(
'.layui-layer-content'
).
find
(
'.contract_com_name'
).
val
();
var
contract_com_addr
=
$
(
'.layui-layer-content'
).
find
(
'.contract_com_addr'
).
val
();
var
contract_link_name
=
$
(
'.layui-layer-content'
).
find
(
'.contract_link_name'
).
val
();
var
contract_link_tel
=
$
(
'.layui-layer-content'
).
find
(
'.contract_link_tel'
).
val
();
if
(
!
contract_com_name
)
{
layer
.
tips
(
'请填写公司名称'
,
$
(
'.layui-layer-content'
).
find
(
'.contract_com_name'
));
return
false
;
}
if
(
!
contract_com_addr
)
{
layer
.
tips
(
'请填写公司地址'
,
$
(
'.layui-layer-content'
).
find
(
'.contract_com_addr'
));
return
false
;
}
if
(
!
contract_link_name
)
{
layer
.
tips
(
'请填写联系人'
,
$
(
'.layui-layer-content'
).
find
(
'.contract_link_name'
));
return
false
;
}
if
(
!
contract_link_tel
)
{
layer
.
tips
(
'请填写联系电话'
,
$
(
'.layui-layer-content'
).
find
(
'.contract_link_tel'
));
return
false
;
}
var
datax
=
{
order_id
:
order_id
,
contract_com_name
:
contract_com_name
,
contract_com_addr
:
contract_com_addr
,
contract_link_name
:
contract_link_name
,
contract_link_tel
:
contract_link_tel
,
};
$
.
ajax
({
url
:
'/ajax/editContract'
,
data
:
datax
,
type
:
'post'
,
dataType
:
'json'
,
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
();
},
1000
);
return
false
;
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
);
}
},
error
:
function
(){
layer
.
alert
(
'网络异常'
);
}
});
},
btn2
:
function
(
index
)
{
layer
.
close
(
index
);
}
})
})
},
//物流信息
...
...
@@ -1195,8 +1266,8 @@
var
val
=
$
(
this
).
val
();
if
(
val
==
2
)
{
$
(
'.show-advance-pay'
).
show
();
$
(
'.show-pay-time'
).
show
();
$
(
'.show-advance-pay'
).
show
();
// 定金
$
(
'.show-pay-time'
).
show
();
// 付款时间
}
else
if
(
val
==
3
)
{
$
(
'.show-advance-pay'
).
hide
();
$
(
'.show-pay-time'
).
hide
();
...
...
@@ -1353,6 +1424,17 @@
// // }
// })
$
(
'.advance'
).
on
(
'blur'
,
function
(){
var
val
=
$
(
this
).
val
();
if
(
val
==
''
)
{
layer
.
tips
(
'预付定金不能为空'
,
$
(
this
));
return
false
;
}
else
if
(
val
==
0
)
{
layer
.
tips
(
'预付定金为0,请更换付款方式:货到深圳仓付款'
,
$
(
this
));
}
})
// 用户来源 -- 其他
$
(
'input[name="client_source"]'
).
on
(
'click'
,
function
(){
if
(
$
(
this
).
val
()
==
1
){
...
...
@@ -1496,49 +1578,6 @@
// 审核不通过
if
(
order_status
==
-
1
)
{
$
(
'.input-cancel-reason'
).
click
();
// if (reason == null) {
// layer.msg('请选择不通过原因!');
// return false;
// } else if (reason == 1) {
// if ($('#input-reason').val() == '') {
// layer.msg('请填写其他原因!');
// return false;
// }
// }
// // 弹出提示
// layer.open({
// title: '提醒',
// content: '<div>确定审核不通过吗?</div>',
// btn:['取消','确定'],
// yes: function(index, layero){
// layer.close(index);
// },
// btn2: function(index, layero){
// $.ajax({
// url : '/ajaxCheck',
// type: 'post',
// data: $('#checkOrderForm').serialize(),
// dataType: 'json',
// success: function (resp) {
// if(resp.errcode === 0){
// layer.msg(resp.errmsg || '操作成功');
// setTimeout(function(){
// location.reload();
// }, 1000);
// } else {
// layer.alert(resp.errmsg || '网络异常');
// }
// },
// error: function (res) {
// console.log(res);
// }
// })
// }
// });
return
false
;
}
...
...
@@ -1546,9 +1585,12 @@
if
(
pay_type
==
2
)
{
var
deposit_amount
=
$
(
'input[name=deposit_amount]'
).
val
();
if
(
!
deposit_amount
)
{
if
(
deposit_amount
==
''
)
{
layer
.
msg
(
'请填写定金金额'
);
return
false
;
}
else
if
(
deposit_amount
==
0
)
{
layer
.
msg
(
'定金金额不能为0'
);
return
false
;
}
}
...
...
resources/views/detail/changeOrder.blade.php
View file @
4f18777e
...
...
@@ -54,6 +54,7 @@
@if ($order_info['sale_type'] == 1)
<label><input
class=
"order_advance_pay"
type=
"radio"
name=
"order_pay_type"
value=
"2"
>
预付首款
</label>
<label><input
class=
"order_account_period"
type=
"radio"
name=
"order_pay_type"
value=
"3"
>
账期
</label>
<label><input
class=
"order_cod"
type=
"radio"
name=
"order_pay_type"
value=
"4"
>
货到深圳仓付款
</label>
@endif
</td>
</tr>
...
...
@@ -64,32 +65,6 @@
<label><input
type=
"radio"
name=
"order_status"
class=
"input-cancel-reason"
value=
"-1"
data-oid=
"{{$order_info['order_id']}}"
data-type=
"3"
>
审核不通过
</label>
</td>
</tr>
<!-- <tr class="cancle_reason" style="display: none;">
<td class="check-table-title">审核不通过原因:</td>
<td>
<div class="form-group">
<label>常见原因:</label>
<div class="input-radio">
<label class="radio-inline"><input type="radio" name="cancel_reason" value="测试订单">测试订单</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户没需求">客户没需求</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="审核太久">审核太久</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="订单信息填错">订单信息填错</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="需用优惠券">需用优惠券</label>
</div>
</div>
<div class="multi-reason">
<label><input type="radio" name="reason" value="客户不接受调价">客户不接受调价</label>
<label><input type="radio" name="reason" value="无现货">无现货</label>
<label><input type="radio" name="reason" value="客户不接受附加费">客户不接受附加费</label>
<label><input type="radio" name="reason" value="客户下错单">客户下错单</label>
<label><input type="radio" name="reason" value="1">其他</label>
</div>
<div class="other-reason" style="display: none;">
<textarea name="reason" id="input-reason" placeholder="请填写其他原因"></textarea>
</div>
</td>
</tr> -->
</table>
<hr/>
...
...
resources/views/detail/content.blade.php
View file @
4f18777e
This diff is collapsed.
Click to expand it.
resources/views/erpOrder/content.blade.php
View file @
4f18777e
...
...
@@ -57,39 +57,6 @@
</select>
</dd>
</dl>
<style>
.order_send
.btn
{
padding
:
4px
12px
;}
</style>
<dl>
<dt>
推送业务员:
</dt>
<dd>
<select
id=
"order_send"
name=
"order_send"
class=
"form-control order_send selectpicker"
title=
"全部"
data-live-search=
"true"
>
<optgroup
label=
"在职"
>
@foreach ($sale_list as $v)
@if ($v->status != 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
<optgroup
label=
"离职"
>
@foreach ($sale_list as $v)
@if ($v->status == 4)
<option
value=
"{{$v->userId}}"
>
{{$v->name}}
</option>
@endif
@endforeach
</optgroup>
</select>
<!-- <div class="droplist" data-default="{{$condition['order_send']}}" id="order_send" name="order_send" >
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
@foreach ($sale_list as $v)
<li data-val="{{$v->userId}}">{{$v->name}}</li>
@endforeach
</ul>
</div> -->
</dd>
</dl>
</td>
</tr>
</table>
...
...
@@ -110,7 +77,7 @@
<th
class=
"pl30"
>
会员账号
</th>
<th
class=
"pl30"
>
应付金额
</th>
<th
class=
"pl30"
>
订单状态
</th>
<th
class=
"pl30"
>
订单
类型
</th>
<th
class=
"pl30"
>
付款
类型
</th>
<th
class=
"pl30"
>
支付方式
</th>
<th
class=
"pl30"
>
推送业务员
</th>
<th
class=
"pl30"
>
发货状态
</th>
...
...
@@ -152,15 +119,7 @@
}
?>
</td>
<td
class=
"show-list"
>
<?php
switch
(
$v
[
'order_pay_type'
])
{
case
1
:
echo
"全款"
;
break
;
case
2
:
echo
"预付款"
;
break
;
case
3
:
echo
"账期"
;
break
;
}
?>
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
...
...
@@ -304,7 +263,6 @@
<script>
var
order_status
=
"{{$condition['order_status']}}"
;
var
order_source
=
"{{$condition['order_source_pf']}}"
;
var
order_send
=
"{{$condition['order_send']}}"
;
var
manager
=
"{{$role}}"
;
$
(
".order_status"
).
selectpicker
({
...
...
@@ -316,10 +274,7 @@
})
$
(
'.order_status'
).
selectpicker
(
'val'
,
order_status
.
split
(
','
)).
trigger
(
"change"
);
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
);
$
(
'#order_source'
).
selectpicker
(
'val'
,
order_source
);
$
(
'#order_send'
).
selectpicker
(
'val'
,
order_send
);
$
.
lie
.
order
.
index
();
</script>
\ No newline at end of file
resources/views/orderlist/content.blade.php
View file @
4f18777e
...
...
@@ -54,9 +54,11 @@
<dt>
付款类型:
</dt>
<dd>
<select
id=
"order_pay_type"
name=
"order_pay_type"
class=
"form-control order_pay_type selectpicker"
title=
"全部"
multiple
>
<option
value=
"1"
>
全款
</option>
<option
value=
"2"
>
预付款
</option>
<option
value=
"3"
>
账期
</option>
@if (Config('params.order_pay_type'))
@foreach (Config('params.order_pay_type') as $k=>$v)
<option
value=
"{{$k}}"
>
{{$v}}
</option>
@endforeach
@endif
</select>
</dd>
</dl>
...
...
@@ -225,7 +227,7 @@
<th
class=
"pl30"
>
订单编号
</th>
<th
class=
"pl30"
>
应付金额
</th>
<th
class=
"pl30"
>
订单状态
</th>
<th
class=
"pl30"
>
订单
类型
</th>
<th
class=
"pl30"
>
付款
类型
</th>
<th
class=
"pl30"
>
支付方式
</th>
<th
class=
"pl30"
>
推送业务员
</th>
@if ($username != 'vpadmin@ichunt.com')
...
...
@@ -270,15 +272,7 @@
}
?>
</td>
<td
class=
"show-list"
>
<?php
switch
(
$v
[
'order_pay_type'
])
{
case
1
:
echo
"全款"
;
break
;
case
2
:
echo
"预付款"
;
break
;
case
3
:
echo
"账期"
;
break
;
}
?>
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getSalesName
(
$v
[
'sale_id'
]));
?>
</td>
...
...
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