|
@@ -198,7 +198,7 @@ class Goodup extends Base
|
|
|
->column('id','spuCode');
|
|
|
$exam_status_yz = Db::name('platform_youzan')
|
|
|
->whereIn('spuCode', array_column($list, 'spuCode'))
|
|
|
- ->where(['is_del' => 0, 'exam_status' => 3])//exam_status==6表示上线审核成功
|
|
|
+ ->where(['is_del' => 0, 'exam_status' => 6])//exam_status==6表示上线审核成功
|
|
|
->column('id', 'spuCode');
|
|
|
|
|
|
$account = checkHasAccountBySupplierNos(array_column($list, 'supplierNo'));
|
|
@@ -411,7 +411,7 @@ class Goodup extends Base
|
|
|
->column('id', 'spuCode');
|
|
|
$exam_status_yz = Db::name('platform_youzan')
|
|
|
->whereIn('spuCode', array_column($list, 'spuCode'))
|
|
|
- ->where(['is_del' => 0, 'exam_status' => 3])//exam_status==3表示上线审核成功
|
|
|
+ ->where(['is_del' => 0, 'exam_status' => 6])//exam_status==3表示上线审核成功
|
|
|
->column('id', 'spuCode');
|
|
|
|
|
|
$account = checkHasAccountBySupplierNos(array_column($list, 'supplierNo'));
|
|
@@ -1699,6 +1699,10 @@ class Goodup extends Base
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ if($post['exam_status']==5){
|
|
|
+ $platform['is_compliance']=0;
|
|
|
+ $platform['compliance_remark']='';
|
|
|
+ }
|
|
|
$platform['exam_status']=$post['exam_status'];
|
|
|
$platform['updatetime']=date("Y-m-d H:i:s");
|
|
|
$createrid= $this->uid;
|
|
@@ -2131,7 +2135,7 @@ class Goodup extends Base
|
|
|
}
|
|
|
$is_down = Db::name("good_platform")
|
|
|
->where(["spuCode"=>$supcode,"is_del"=>0])
|
|
|
- ->where("exam_status", "not in", [1, 8])//exam_status=1待完善成本,8已下线,除了这两个状态外其他状态都不允许编辑
|
|
|
+ ->where("exam_status", "not in", [1, 5])//exam_status=1待完善成本,8已下线,除了这两个状态外其他状态都不允许编辑
|
|
|
->find();
|
|
|
if($is_down!=false){
|
|
|
return error_show(1004,"存在未下线商品数据");
|
|
@@ -2903,7 +2907,7 @@ class Goodup extends Base
|
|
|
$rs = Db::name("good_platform")
|
|
|
->field('id,spuCode,skuCode,exam_status,createrid')
|
|
|
->where(['skuCode' => $param['skuCode'], 'is_del' => 0])
|
|
|
- ->where('exam_status', '<>', 6)//exam_status==6上线成功
|
|
|
+ ->where('exam_status', '<>', 3)//exam_status==6上线成功
|
|
|
->find();
|
|
|
|
|
|
if (empty($rs)) throw new \Exception('该记录不存在');
|
|
@@ -2916,7 +2920,7 @@ class Goodup extends Base
|
|
|
->find();
|
|
|
|
|
|
$exam_status = empty($good_nake) ? 1 : 2;
|
|
|
- if ($exam_status == $rs['exam_status']) $exam_status = 7;//第一级审核失败时,状态改为'审核失败'
|
|
|
+ if ($exam_status == $rs['exam_status']) $exam_status =4;//第一级审核失败时,状态改为'审核失败'
|
|
|
|
|
|
Db::name("good_platform")
|
|
|
->where('id', $rs['id'])
|
|
@@ -2984,7 +2988,7 @@ class Goodup extends Base
|
|
|
|
|
|
$skuCodeS = Db::name("good_platform")
|
|
|
->where(['spuCode' => $param['spuCode'], 'is_del' => 0])//exam_status 7审核失败,8已下线
|
|
|
- ->whereNotIn('exam_status', [7,8])
|
|
|
+ ->whereNotIn('exam_status', [4,5])
|
|
|
->column('exam_status,skuCode', 'skuCode');
|
|
|
|
|
|
if ($skuCodeS) {
|
|
@@ -2994,9 +2998,9 @@ class Goodup extends Base
|
|
|
//商品平台
|
|
|
Db::name("good_platform")
|
|
|
->where(['spuCode' => $param['spuCode'], 'is_del' => 0])//exam_status 7审核失败,8已下线
|
|
|
- ->whereNotIn('exam_status', [7,8])
|
|
|
+ ->whereNotIn('exam_status', [4,5])
|
|
|
->save([
|
|
|
- 'exam_status' => 8,
|
|
|
+ 'exam_status' => 5,
|
|
|
'updatetime' => date('Y-m-d H:i:s'),
|
|
|
]);
|
|
|
|
|
@@ -3028,7 +3032,7 @@ class Goodup extends Base
|
|
|
foreach ($skuCodeS as $skuCode => $value) {
|
|
|
$insert_good_exam_data[] = [
|
|
|
'code' => $skuCode,
|
|
|
- 'exam_status' => 8,
|
|
|
+ 'exam_status' =>5,
|
|
|
'type' => 2,
|
|
|
'exam_id' => $createrid,
|
|
|
'exam_name' => $creater,
|
|
@@ -3041,13 +3045,13 @@ class Goodup extends Base
|
|
|
"status" =>$value['exam_status'] ,
|
|
|
"action_remark" => '',//备注
|
|
|
"action_type" => "status"//新建create,编辑edit,更改状态status
|
|
|
- ], "GOL", 8, $param);
|
|
|
+ ], "GOL",5, $param);
|
|
|
|
|
|
ProcessOrder::AddProcess(['id' => $createrid, 'nickname' => $creater], [
|
|
|
"order_type" => 'GOL',
|
|
|
"order_code" => $skuCode,
|
|
|
"order_id" => $good_offline_log_id,
|
|
|
- "order_status" => 8,
|
|
|
+ "order_status" =>5,
|
|
|
"before_status" => $value['exam_status']
|
|
|
]);
|
|
|
|
|
@@ -3056,7 +3060,7 @@ class Goodup extends Base
|
|
|
'content' => '商品下线:' . $skuCode . '由' . $creater . '操作下线',
|
|
|
'orderCode' => $skuCode,
|
|
|
'order_type' => 'GOL',
|
|
|
- 'order_status' => 8,
|
|
|
+ 'order_status' =>5,
|
|
|
'order_id' => $good_offline_log_id,
|
|
|
'uid' => $itemitem['uid'],
|
|
|
'uname' => empty($itemitem['nickName']) ? '' : $itemitem['nickName'],
|
|
@@ -3158,7 +3162,7 @@ class Goodup extends Base
|
|
|
$rs = Db::name('good_platform')
|
|
|
->field('id')
|
|
|
->where(['spuCode' => $spuCode, 'is_del' => 0])
|
|
|
- ->whereNotIn('exam_status', [0, 8])//0待提交,8已下线
|
|
|
+ ->whereNotIn('exam_status', [0, 5])//0待提交,8已下线
|
|
|
->find();
|
|
|
|
|
|
if (!empty($rs)) $is_allow_update = 0;
|
|
@@ -3237,6 +3241,29 @@ class Goodup extends Base
|
|
|
|
|
|
return app_show(0, '请求成功', $count);
|
|
|
}
|
|
|
-
|
|
|
+ //财务审核是否合规接口 只有上线成功才可以操作
|
|
|
+ public function AddCompliance(){
|
|
|
+ $param = $this->request->filter('trim')->only(["skuCode"=>"","is_compliance"=>"","compliance_remark"=>""],
|
|
|
+ 'post',"trim");
|
|
|
+ $val = Validate::rule([
|
|
|
+ 'compliance_remark|备注' => 'max:255',
|
|
|
+ 'skuCode|上线商品编号' => 'require|max:255',
|
|
|
+ 'is_compliance|是否合规' => 'require|number|in:0,1,2']);
|
|
|
+ if ($val->check($param)==false) return error_show(1005, $val->getError());
|
|
|
+ $goodinfo =Db::name("good_platform")
|
|
|
+ ->where(["skuCode"=>$param["skuCode"],"is_del"=>0])
|
|
|
+ ->findOrEmpty();
|
|
|
+ if(empty($goodinfo)) return error_show(1004,"未找到上线商品数据");
|
|
|
+ if($goodinfo['status']!=3)return error_show(1004,"商品完成未上线不可操作");
|
|
|
+ $upinfo = [
|
|
|
+ "is_compliance"=>$param['is_compliance'],
|
|
|
+ "compliance_remark"=>$param['compliance_remark'],
|
|
|
+ "updatetime"=>date("Y-m-d H:i:s")
|
|
|
+ ];
|
|
|
+ $up = Db::name("good_platform")
|
|
|
+ ->where(["skuCode"=>$param["skuCode"],"is_del"=>0])->update($upinfo);
|
|
|
+ if($up==false)return error_show(1004,"数据更新失败");
|
|
|
+ else return app_show(0,"数据更新成功");
|
|
|
+ }
|
|
|
|
|
|
}
|