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
fbbfd02c
authored
Oct 19, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_order_20200923'
parents
939e5655
9064e465
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
1 deletions
app/Http/Controllers/ApiController.php
public/js/list.js
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/ApiController.php
View file @
fbbfd02c
...
@@ -12,10 +12,12 @@ use App\Model\Pcb\PcbPurchaseModel;
...
@@ -12,10 +12,12 @@ use App\Model\Pcb\PcbPurchaseModel;
use
App\Model\Pcb\PcbServerModel
;
use
App\Model\Pcb\PcbServerModel
;
use
App\Model\KefuModel
;
use
App\Model\KefuModel
;
use
App\Model\CmsModel
;
use
App\Model\CmsModel
;
use
App\Model\OrderExtendModel
;
use
App\Model\OrderItemsModel
;
use
App\Model\OrderItemsTrackModel
;
use
App\Model\OrderItemsTrackModel
;
use
App\Model\UserSampleApplyModel
;
use
App\Model\UserSampleApplyModel
;
use
App\Model\OrderActionLogModel
;
use
App\Model\UserSampleInviteModel
;
use
App\Model\UserSampleInviteModel
;
use
App\Model\OrderItemsModel
;
use
App\Model\UserGroupModel
;
use
App\Model\UserGroupModel
;
use
App\Model\BrandBlackListModel
;
use
App\Model\BrandBlackListModel
;
use
App\Model\PayExtendModel
;
use
App\Model\PayExtendModel
;
...
@@ -369,4 +371,26 @@ class ApiController extends Controller
...
@@ -369,4 +371,26 @@ class ApiController extends Controller
$this
->
Export
(
0
,
'成功'
,
$res
);
$this
->
Export
(
0
,
'成功'
,
$res
);
}
}
// 编辑ERP单号
public
function
edit_erp_sn
(
$request
)
{
$order_id
=
$request
->
input
(
'order_id'
);
$erp_sn
=
$request
->
input
(
'erp_sn'
);
$OrderExtendModel
=
new
OrderExtendModel
;
$OrderActionLogModel
=
new
OrderActionLogModel
;
$old_erp_sn
=
$OrderExtendModel
->
where
(
'order_id'
,
$order_id
)
->
value
(
'erp_sn'
);
$res
=
$OrderExtendModel
->
where
(
'order_id'
,
$order_id
)
->
update
([
'erp_sn'
=>
$erp_sn
]);
if
(
$res
===
false
)
{
$this
->
Export
(
-
1
,
'编辑ERP单号失败'
);
}
$OrderActionLogModel
->
addLog
(
$order_id
,
$request
->
user
->
userId
,
2
,
'编辑ERP单号,修改前:'
.
$old_erp_sn
);
$this
->
Export
(
0
,
'编辑ERP单号成功'
);
}
}
}
public/js/list.js
View file @
fbbfd02c
...
@@ -545,6 +545,48 @@
...
@@ -545,6 +545,48 @@
})
})
}
}
// 竞调账号编辑ERP单号
$
(
'.edit_erp_sn'
).
click
(
function
()
{
var
order_id
=
$
(
this
).
data
(
'oid'
);
var
erp_sn
=
$
(
this
).
data
(
'erp_sn'
);
var
content
=
'<div class="form-group"><input type="text" class="form-control new_erp_sn" name="new_erp_sn" value="'
+
erp_sn
+
'" style="width: 260px;"></div>'
;
layer
.
open
({
area
:
[
'300px'
],
title
:
'编辑ERP单号'
,
content
:
content
,
btn
:[
'确认'
,
'取消'
],
btn1
:
function
(
index
)
{
var
new_erp_sn
=
$
(
'.new_erp_sn'
).
val
();
if
(
!
new_erp_sn
)
{
layer
.
tips
(
'请输入ERP单号'
,
$
(
'.new_erp_sn'
));
return
false
;
}
$
.
ajax
({
url
:
'/api/edit_erp_sn'
,
type
:
'post'
,
data
:
{
order_id
:
order_id
,
erp_sn
:
new_erp_sn
},
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
!=
0
)
{
layer
.
msg
(
resp
.
msg
);
return
false
;
}
location
.
reload
();
}
})
layer
.
msg
(
'提交中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
},
btn2
:
function
(
index
)
{
layer
.
close
(
index
)
}
})
})
},
},
}
}
...
...
resources/views/orderlist/content.blade.php
View file @
fbbfd02c
...
@@ -400,6 +400,10 @@
...
@@ -400,6 +400,10 @@
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
@endif
@if ($username == 'vpadmin@ichunt.com')
<a
class=
"btn btn-info edit_erp_sn"
data-oid=
"{{$v['order_id']}}"
data-erp_sn=
"{{ $order_extend ? $order_extend->erp_sn : '' }}"
>
编辑ERP单号
</a>
@endif
</div>
</div>
</td>
</td>
</tr>
</tr>
...
...
resources/views/selfOrder/content.blade.php
View file @
fbbfd02c
...
@@ -401,6 +401,10 @@
...
@@ -401,6 +401,10 @@
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-uid=
"{{$v['user_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
@endif
@if ($username == 'vpadmin@ichunt.com')
<a
class=
"btn btn-info edit_erp_sn"
data-oid=
"{{$v['order_id']}}"
data-erp_sn=
"{{ $order_extend ? $order_extend->erp_sn : '' }}"
>
编辑ERP单号
</a>
@endif
</div>
</div>
</td>
</td>
</tr>
</tr>
...
...
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