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
cf26a7d1
authored
Mar 24, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整自营明细编辑
parent
139e2153
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
app/Http/Controllers/ApiController.php
public/js/order.js
resources/views/detail/content.blade.php
app/Http/Controllers/ApiController.php
View file @
cf26a7d1
...
@@ -203,7 +203,7 @@ class ApiController extends Controller
...
@@ -203,7 +203,7 @@ class ApiController extends Controller
$result
=
$OrderItemsModel
->
updateData
(
$data
);
$result
=
$OrderItemsModel
->
updateData
(
$data
);
if
(
$result
){
if
(
$result
!==
false
){
$this
->
Export
(
0
,
'编辑明细成功'
);
$this
->
Export
(
0
,
'编辑明细成功'
);
}
else
{
}
else
{
$this
->
Export
(
1
,
'编辑明细失败'
);
$this
->
Export
(
1
,
'编辑明细失败'
);
...
...
public/js/order.js
View file @
cf26a7d1
...
@@ -1175,9 +1175,15 @@
...
@@ -1175,9 +1175,15 @@
var
content
=
''
;
var
content
=
''
;
content
=
'<div class="form-horizontal">\
content
=
'<div class="form-horizontal">\
<div class="form-group">\
<div class="form-group">'
;
<label class="col-sm-3 control-label"><i class="error">*</i> 批次</label>\
<div class="col-sm-9">\
if
(
order_goods_type
==
1
)
{
content
+=
'<label class="col-sm-3 control-label"><i class="error">*</i> 批次</label>'
;
}
else
{
content
+=
'<label class="col-sm-3 control-label"> 批次</label>'
;
}
content
+=
'<div class="col-sm-9">\
<input type="text" class="form-control" name="batch" value="'
+
item_batch
+
'" placeholder="请填写批次" style="width:200px;">\
<input type="text" class="form-control" name="batch" value="'
+
item_batch
+
'" placeholder="请填写批次" style="width:200px;">\
</div>\
</div>\
</div>'
;
</div>'
;
...
@@ -1196,11 +1202,7 @@
...
@@ -1196,11 +1202,7 @@
content
+=
'<div class="form-group">'
;
content
+=
'<div class="form-group">'
;
if
(
order_goods_type
==
1
)
{
content
+=
'<label class="col-sm-3 control-label">备注</label>'
;
content
+=
'<label class="col-sm-3 control-label">备注</label>'
;
}
else
{
content
+=
'<label class="col-sm-3 control-label"><i class="error">*</i> 备注</label>'
;
}
content
+=
'<div class="col-sm-9">\
content
+=
'<div class="col-sm-9">\
<textarea class="form-control" name="remarks" placeholder="请填写备注" style="width:200px;">'
+
item_remarks
+
'</textarea>\
<textarea class="form-control" name="remarks" placeholder="请填写备注" style="width:200px;">'
+
item_remarks
+
'</textarea>\
...
@@ -1219,16 +1221,11 @@
...
@@ -1219,16 +1221,11 @@
var
buyer_id
=
$
(
'select[name=buyer_id]'
).
val
()
||
0
;
var
buyer_id
=
$
(
'select[name=buyer_id]'
).
val
()
||
0
;
var
remarks
=
$
(
'textarea[name=remarks]'
).
val
();
var
remarks
=
$
(
'textarea[name=remarks]'
).
val
();
if
(
!
batch
)
{
if
(
order_goods_type
==
1
&&
!
batch
)
{
layer
.
tips
(
'请填写批次'
,
$
(
'input[name=batch]'
));
layer
.
tips
(
'请填写批次'
,
$
(
'input[name=batch]'
));
return
false
;
return
false
;
}
}
if
(
order_goods_type
==
2
&&
!
remarks
)
{
layer
.
tips
(
'请填写备注'
,
$
(
'textarea[name=remarks]'
));
return
false
;
}
$
.
ajax
({
$
.
ajax
({
url
:
'/api/update_order_items'
,
url
:
'/api/update_order_items'
,
data
:
{
id
:
rec_id
,
batch
:
batch
,
buyer_id
:
buyer_id
,
remarks
:
remarks
},
data
:
{
id
:
rec_id
,
batch
:
batch
,
buyer_id
:
buyer_id
,
remarks
:
remarks
},
...
...
resources/views/detail/content.blade.php
View file @
cf26a7d1
...
@@ -576,7 +576,9 @@
...
@@ -576,7 +576,9 @@
<td>
<td>
<!-- <button type="button" class="btn btn-success btn-xs remarks">编辑</button> -->
<!-- <button type="button" class="btn btn-success btn-xs remarks">编辑</button> -->
@if ($order_info['status'] != -1)
<button
type=
"button"
class=
"btn btn-success btn-xs edit-item"
data-id=
"{{$v['rec_id']}}"
data-batch=
"{{$v['batch']}}"
data-bid=
"{{$v['buyer_id']}}"
data-remarks=
"{{$v['remarks']}}"
>
编辑
</button>
<button
type=
"button"
class=
"btn btn-success btn-xs edit-item"
data-id=
"{{$v['rec_id']}}"
data-batch=
"{{$v['batch']}}"
data-bid=
"{{$v['buyer_id']}}"
data-remarks=
"{{$v['remarks']}}"
>
编辑
</button>
@endif
</td>
</td>
@if ($action_name == 'changeOrder'
&&
count($order_items_info) > 1
&&
in_array($order_info['status'], [1, 2]))
@if ($action_name == 'changeOrder'
&&
count($order_items_info) > 1
&&
in_array($order_info['status'], [1, 2]))
...
@@ -590,7 +592,7 @@
...
@@ -590,7 +592,7 @@
@if ($order_info['order_remark'])
@if ($order_info['order_remark'])
<tr>
<tr>
<td>
订单备注信息:
</td>
<td>
订单备注信息:
</td>
<td
colspan=
"1
6
"
>
{{$order_info['order_remark']}}
</td>
<td
colspan=
"1
7
"
>
{{$order_info['order_remark']}}
</td>
</tr>
</tr>
@endif
@endif
...
...
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