|
@@ -14,8 +14,9 @@ class Distribution extends Api
|
|
|
protected $noNeedRight = ['*'];
|
|
|
|
|
|
public function dist_list(){
|
|
|
+ $dis_type = input('dis_type',1);
|
|
|
$method_model = new Method();
|
|
|
- $list = $method_model->where(array('type'=>1,'moshi'=>3,'status'=>1))->paginate();
|
|
|
+ $list = $method_model->where(array('type'=>1,'moshi'=>3,'status'=>1,'dis_type'=>$dis_type))->paginate();
|
|
|
$this->success('选择模式列表',$list);
|
|
|
}
|
|
|
public function order_list(){
|
|
@@ -51,8 +52,10 @@ class Distribution extends Api
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
foreach ($array as $k=>$v){
|
|
|
- $dis_model->isUpdate('true',$array[$k]['id'])->save(['number'=>$k+1]);
|
|
|
+ $dis_model->isUpdate('true',['id'=>$array[$k]['id']])->save(['number'=>$k+1]);
|
|
|
}
|
|
|
+ $method_model = new Method();
|
|
|
+ $method_model->isUpdate('true',['id'=>$method_id])->save(['dis_type'=>2]);
|
|
|
Db::commit();
|
|
|
$this->success('生成座位表');
|
|
|
|