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
139e2153
authored
Mar 11, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
自营添加备注
parent
0f3dc01e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
18 deletions
public/js/order.js
resources/views/detail/content.blade.php
public/js/order.js
View file @
139e2153
...
...
@@ -1154,10 +1154,13 @@
// 编辑商品明细
$
(
'.edit-item'
).
click
(
function
()
{
var
order_goods_type
=
$
(
'#order_goods_type'
).
val
();
var
rec_id
=
$
(
this
).
data
(
'id'
);
var
item_batch
=
$
(
this
).
data
(
'batch'
);
var
item_buyer_id
=
$
(
this
).
data
(
'bid'
);
var
item_remarks
=
$
(
this
).
data
(
'remarks'
);
if
(
order_goods_type
==
1
)
{
var
item_buyer_id
=
$
(
this
).
data
(
'bid'
);
var
buyer_count
=
buyers
.
length
;
var
html
=
''
;
...
...
@@ -1168,15 +1171,19 @@
html
+=
'<option value="'
+
buyers
[
i
].
userId
+
'">'
+
buyers
[
i
].
name
+
'</option>'
;
}
}
}
var
content
=
'<div class="form-horizontal">\
var
content
=
''
;
content
=
'<div class="form-horizontal">\
<div class="form-group">\
<label class="col-sm-3 control-label"><i class="error">*</i> 批次</label>\
<div class="col-sm-9">\
<input type="text" class="form-control" name="batch" value="'
+
item_batch
+
'" placeholder="请填写批次" style="width:200px;">\
</div>\
</div>\
<div class="form-group">\
</div>'
;
if
(
order_goods_type
==
1
)
{
content
+=
'<div class="form-group">\
<label class="col-sm-3 control-label">采购员</label>\
<div class="col-sm-9" style="width:230px;">\
<select class="form-control buyer_id selectpicker" name="buyer_id" data-live-search="true" data-size="7">\
...
...
@@ -1184,10 +1191,18 @@
'
+
html
+
'\
</select>\
</div>\
</div>\
<div class="form-group">\
<label class="col-sm-3 control-label">备注</label>\
<div class="col-sm-9">\
</div>'
;
}
content
+=
'<div class="form-group">'
;
if
(
order_goods_type
==
1
)
{
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">\
<textarea class="form-control" name="remarks" placeholder="请填写备注" style="width:200px;">'
+
item_remarks
+
'</textarea>\
</div>\
</div>\
...
...
@@ -1201,7 +1216,7 @@
//提交事件
btn1
:
function
(){
var
batch
=
$
(
'input[name=batch]'
).
val
();
var
buyer_id
=
$
(
'select[name=buyer_id]'
).
val
();
var
buyer_id
=
$
(
'select[name=buyer_id]'
).
val
()
||
0
;
var
remarks
=
$
(
'textarea[name=remarks]'
).
val
();
if
(
!
batch
)
{
...
...
@@ -1209,6 +1224,11 @@
return
false
;
}
if
(
order_goods_type
==
2
&&
!
remarks
)
{
layer
.
tips
(
'请填写备注'
,
$
(
'textarea[name=remarks]'
));
return
false
;
}
$
.
ajax
({
url
:
'/api/update_order_items'
,
data
:
{
id
:
rec_id
,
batch
:
batch
,
buyer_id
:
buyer_id
,
remarks
:
remarks
},
...
...
resources/views/detail/content.blade.php
View file @
139e2153
...
...
@@ -22,6 +22,7 @@
<input
type=
"hidden"
class=
"action_type"
value=
"{{$action_name}}"
>
<input
type=
"hidden"
id=
"order_id"
name=
"order_id"
value=
"{{$order_info['order_id']}}"
>
<input
type=
"hidden"
id=
"user_id"
name=
"user_id"
value=
"{{$order_info['user_id']}}"
>
<input
type=
"hidden"
id=
"order_goods_type"
name=
"order_goods_type"
value=
"{{$order_info['order_goods_type']}}"
>
<div
class=
"tabs-box table-responsive"
>
<table
class=
"table table-bordered order-express"
>
...
...
@@ -491,13 +492,9 @@
<th>
生产跟踪
</th>
@endif
@if (empty($_REQUEST['tags']))
<th>
备注
</th>
@endif
@if ($order_info['order_goods_type'] == 1)
<th></th>
@endif
<th>
操作
</th>
<?php
if
(
$action_name
==
'changeOrder'
&&
count
(
$order_items_info
)
>
1
&&
in_array
(
$order_info
[
'status'
],
[
1
,
2
]))
{
...
...
@@ -571,20 +568,16 @@
<td><a
class=
"order-track"
data-rid=
"{{$v['rec_id']}}"
>
{{ App\Http\Controllers\getLastTrack($v['rec_id']) }}
</a></td>
@endif
@if (empty($_REQUEST['tags']))
<td
class=
"remarks"
>
@if(!empty($v['remarks']))
{{$v['remarks']}}
@endif
</td>
@endif
@if ($order_info['order_goods_type'] == 1)
<td>
<!-- <button type="button" class="btn btn-success btn-xs 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>
</td>
@endif
@if ($action_name == 'changeOrder'
&&
count($order_items_info) > 1
&&
in_array($order_info['status'], [1, 2]))
<td><a
class=
"btn btn-danger deletegoods"
href=
"javascript:;"
data-id=
"{{$v['rec_id']}}"
>
删除
</a></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