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
29a9b7d9
authored
May 22, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加编辑合同
parent
f7cfe5f9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
0 deletions
app/Http/Controllers/OrderController.php
app/Http/routes.php
public/js/order.js
resources/views/detail/content.blade.php
app/Http/Controllers/OrderController.php
View file @
29a9b7d9
...
@@ -1567,6 +1567,27 @@ Class OrderController extends Controller
...
@@ -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
)
public
function
tempCount
(
Request
$request
)
{
{
$current
=
strtotime
(
date
(
'Y-m-d'
,
time
()));
// 当天0点
$current
=
strtotime
(
date
(
'Y-m-d'
,
time
()));
// 当天0点
...
...
app/Http/routes.php
View file @
29a9b7d9
...
@@ -121,6 +121,7 @@ Route::group(['middleware' => 'web'], function () {
...
@@ -121,6 +121,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
get
(
'/refund_self_export'
,
'RefundController@refundSelfExport'
);
Route
::
get
(
'/refund_self_export'
,
'RefundController@refundSelfExport'
);
Route
::
post
(
'/ajax/offlinePaid'
,
'OrderController@offlinePaid'
);
Route
::
post
(
'/ajax/offlinePaid'
,
'OrderController@offlinePaid'
);
Route
::
post
(
'/ajax/editContract'
,
'OrderController@editContract'
);
});
});
// 不需要登陆态
// 不需要登陆态
...
...
public/js/order.js
View file @
29a9b7d9
...
@@ -809,6 +809,77 @@
...
@@ -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
);
}
})
})
},
},
//物流信息
//物流信息
...
...
resources/views/detail/content.blade.php
View file @
29a9b7d9
This diff is collapsed.
Click to expand it.
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