Commit cf26a7d1 by 朱继来

调整自营明细编辑

parent 139e2153
...@@ -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, '编辑明细失败');
......
...@@ -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},
......
...@@ -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="16">{{$order_info['order_remark']}}</td> <td colspan="17">{{$order_info['order_remark']}}</td>
</tr> </tr>
@endif @endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment