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