record
This commit is contained in:
parent
11a4ff1916
commit
ee367f5a76
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace app\admin\controller\orders;
|
||||
|
||||
use app\admin\model\OrderDispatch;
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\Exception;
|
||||
|
|
@ -45,16 +46,18 @@ class Dispatchrecord extends Backend
|
|||
* @return string
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function add()
|
||||
public function add($ids=null)
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
|
||||
$dispatch_id = $this->request->get('dispatch_id');
|
||||
$dispatch = OrderDispatch::get($ids);
|
||||
|
||||
if(empty($dispatch)){
|
||||
$this->error('没有关联派单');
|
||||
}
|
||||
$list = $this->model->where('dispatch_id',$ids)->order('id','desc')->select();
|
||||
|
||||
$list = $this->model->where('dispatch_id',$dispatch_id)->order('id','desc')->select();
|
||||
|
||||
$this->assign('dispatch_id',$dispatch_id);
|
||||
$this->assign('dispatch',$dispatch);
|
||||
|
||||
$this->assign('records',$list);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
{notempty name='records'}
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
{/notempty}
|
||||
<input type="hidden" name="row[dispatch_id]" type="text" value="{$dispatch.id}">
|
||||
<input type="hidden" name="row[dispatch_id]" value="{$dispatch.id|htmlentities}">
|
||||
|
||||
<input type="hidden" name="row[worker_id]" type="text" value="{$dispatch.worker_id}">
|
||||
<input type="hidden" name="row[worker_id]" value="{$dispatch.worker_id|htmlentities}">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -111,9 +111,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
|
|||
text:"完成",
|
||||
title:"完成",
|
||||
icon: 'fa fa-check',
|
||||
url: function(row){
|
||||
return 'orders/dispatch2/finish?dispatch_id='+row.id;
|
||||
},
|
||||
url:'orders/dispatch2/finish',
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-success btn-dialog',
|
||||
visible:function(row){
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user