|
@@ -24,6 +24,7 @@ use think\admin\service\AdminService;
|
|
|
*/
|
|
|
class Goods extends Controller
|
|
|
{
|
|
|
+
|
|
|
/**
|
|
|
* 商品数据管理
|
|
|
* @auth true
|
|
@@ -306,10 +307,33 @@ class Goods extends Controller
|
|
|
*/
|
|
|
public function examinex()
|
|
|
{
|
|
|
+// 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){
|
|
|
+ ShopGoods::mSave($this->_vali([
|
|
|
+ 'examine.in:0,1,2' => '状态值范围异常!',
|
|
|
+ 'examine.require' => '状态值不能为空!',
|
|
|
+ ]), 'code');
|
|
|
+ }else{
|
|
|
+ ShopGoods::mForm('examinex_form', 'id');
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- ShopGoods::mSave($this->_vali([
|
|
|
- 'examine.in:0,1,2' => '状态值范围异常!',
|
|
|
- 'examine.require' => '状态值不能为空!',
|
|
|
- ]), 'code');
|
|
|
+
|
|
|
+ public function _examinex_form_filter(array &$data)
|
|
|
+ {
|
|
|
+ if ($this->request->isPost()) {
|
|
|
+ if (empty($data['examine_cause'])) $this->error('不能为空!');
|
|
|
+ $updata = [
|
|
|
+ 'examine_cause'=>$data['examine_cause'],
|
|
|
+ 'examine'=>2
|
|
|
+ ];
|
|
|
+ ShopGoods::update($updata,['id'=>$data['id']]);
|
|
|
+ $this->success('操作成功');
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|