|
@@ -199,6 +199,19 @@ class Goods extends Controller
|
|
|
|
|
|
} elseif ($this->request->isPost()) {
|
|
|
|
|
|
+ //审核拒绝的情况
|
|
|
+ if (!empty($data['examine_cause'])){
|
|
|
+ $updata = [
|
|
|
+ 'examine_cause'=>$data['examine_cause'],
|
|
|
+ 'examine'=>2,
|
|
|
+ 'examine_time'=>date('Y-m-d H:i:s'),
|
|
|
+ 'examine_adminid'=>AdminService::getUserName()
|
|
|
+ ];
|
|
|
+ ShopGoods::update($updata,['id'=>$data['id']]);
|
|
|
+ $this->success('操作成功1', 'javascript:history.back()');
|
|
|
+ //$this->success('操作成功');
|
|
|
+ }
|
|
|
+
|
|
|
$data['admin_id']=AdminService::getUserId();
|
|
|
// $data['examine']=0;
|
|
|
|
|
@@ -371,7 +384,30 @@ class Goods extends Controller
|
|
|
'examine.require' => '状态值不能为空!',
|
|
|
'examine_time' => date('Y-m-d H:i:s'),
|
|
|
'examine_adminid' => AdminService::getUserName()
|
|
|
- ]), 'code');
|
|
|
+ ]), '');
|
|
|
+ }else{
|
|
|
+ ShopGoods::mForm('examinex_form', 'id');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商品审核1
|
|
|
+ * @auth true
|
|
|
+ * @menu true
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ */
|
|
|
+ public function examines()
|
|
|
+ {
|
|
|
+// if ($this->request->isGet()) {
|
|
|
+// $query = BasePostageCompany::mk()->where(['deleted' => 0, 'status' => 1]);
|
|
|
+// $this->items = $query->order('sort desc,id desc')->select()->toArray();
|
|
|
+// }
|
|
|
+ if(input('examine')==1){
|
|
|
+ $code = input('code');
|
|
|
+ ShopGoods::where('code',$code)->update(['examine'=>1]);
|
|
|
+ $this->success('商品编辑成功!', 'javascript:history.back()');
|
|
|
}else{
|
|
|
ShopGoods::mForm('examinex_form', 'id');
|
|
|
}
|
|
@@ -450,6 +486,7 @@ class Goods extends Controller
|
|
|
'examine_adminid'=>AdminService::getUserName()
|
|
|
];
|
|
|
ShopGoods::update($updata,['id'=>$data['id']]);
|
|
|
+ //$this->success('操作成功1', 'javascript:history.back()');
|
|
|
$this->success('操作成功');
|
|
|
}
|
|
|
}
|