|
@@ -199,18 +199,23 @@ class Consult extends Base
|
|
|
if($ladder==""){
|
|
|
return error_show(1005,"参数ladder不能为空");
|
|
|
}
|
|
|
- $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
- if($token==''){
|
|
|
- return error_show(105,"参数token不能为空");
|
|
|
- }
|
|
|
+// $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
+// if($token==''){
|
|
|
+// return error_show(105,"参数token不能为空");
|
|
|
+// }
|
|
|
|
|
|
- $user =GetUserInfo($token);
|
|
|
- if(empty($user)||$user['code']!=0){
|
|
|
- return error_show(102,"用户数据不存在");
|
|
|
- }
|
|
|
- $createrid= isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
- $creater= isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
- $depart= Db::name("depart_user")->where(["uid"=>$createrid,"status"=>1,"is_del"=>0])->find();
|
|
|
+// $user =GetUserInfo($token);
|
|
|
+// if(empty($user)||$user['code']!=0){
|
|
|
+// return error_show(102,"用户数据不存在");
|
|
|
+// }
|
|
|
+ $createrid= $this->uid;//isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
+ $creater= $this->uname;//isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
+// $depart= Db::name("depart_user")->where(["uid"=>$createrid,"status"=>1,"is_del"=>0])->find();
|
|
|
+ $depart = Db::connect('mysql_sys')
|
|
|
+ ->name('account_item')
|
|
|
+ ->field('itemid')
|
|
|
+ ->where('account_id',$createrid)
|
|
|
+ ->findOrEmpty();
|
|
|
$zxNo=makeNo("ZX");
|
|
|
Db::startTrans();
|
|
|
try{
|
|
@@ -274,7 +279,7 @@ class Consult extends Base
|
|
|
"budget_price"=>$value['budget_price'],
|
|
|
"num"=>$value['num'],
|
|
|
"pgNo"=>isset($value['pgNo'])&&$value['pgNo']!==""?trim($value['pgNo']):"",
|
|
|
- "use_desc"=>$value['use_desc'],
|
|
|
+ "use_desc"=>$value['use_desc']??'',
|
|
|
"remark"=>$value['remark'],
|
|
|
"status"=>1,
|
|
|
"is_del"=>0,
|
|
@@ -434,7 +439,7 @@ class Consult extends Base
|
|
|
$zxinfo['pgNo'] = isset($projectinfo['pgNo']) ? $projectinfo['pgNo']:"";
|
|
|
}
|
|
|
if($zxorder['depart']>0){
|
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
+
|
|
|
$tmp = $userCommon->handle('ciinfo',['id'=>$zxorder['depart']]);
|
|
|
$zxinfo['departinfo']=$tmp['data'];
|
|
|
}
|
|
@@ -518,9 +523,9 @@ class Consult extends Base
|
|
|
}
|
|
|
$pgNo = isset($this->post['pgNo'])&& $this->post['pgNo']!="" ? trim($this->post['pgNo']):"";
|
|
|
$use_desc = isset($this->post['use_desc'])&& $this->post['use_desc']!="" ? trim($this->post['use_desc']):"";
|
|
|
- if($use_desc==""){
|
|
|
- return error_show(1003,"参数use_desc不能为空");
|
|
|
- }
|
|
|
+// if($use_desc==""){
|
|
|
+// return error_show(1003,"参数use_desc不能为空");
|
|
|
+// }
|
|
|
$remark = isset($this->post['remark'])&& $this->post['remark']!="" ? trim($this->post['remark']):"";
|
|
|
if($remark==""){
|
|
|
return error_show(1003,"参数remark不能为空");
|
|
@@ -543,14 +548,14 @@ class Consult extends Base
|
|
|
return error_show(1003,"参数gold_price不能为空");
|
|
|
}
|
|
|
}
|
|
|
- $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
- if($token==''){
|
|
|
- return error_show(102,"参数token不能为空");
|
|
|
- }
|
|
|
- $user =GetUserInfo($token);
|
|
|
- if(empty($user)||$user['code']!=0){
|
|
|
- return error_show(105,"用户数据不存在");
|
|
|
- }
|
|
|
+// $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
+// if($token==''){
|
|
|
+// return error_show(102,"参数token不能为空");
|
|
|
+// }
|
|
|
+// $user =GetUserInfo($token);
|
|
|
+// if(empty($user)||$user['code']!=0){
|
|
|
+// return error_show(105,"用户数据不存在");
|
|
|
+// }
|
|
|
$specinfo=[];
|
|
|
foreach ($specin as $v){
|
|
|
$spec =Db::name("specs")->where(["id"=>$v['specid']])->find();
|
|
@@ -559,9 +564,9 @@ class Consult extends Base
|
|
|
$v['spec_value_name']=isset($spec_value['spec_value'])?$spec_value['spec_value']:"";
|
|
|
$specinfo[]=$v;
|
|
|
}
|
|
|
- $createrid= isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
- $creater= isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
- $bidlist = Db::name("consult_bids")->where(["infoNo"=>$zxinfo['infoNo'],"is_del"=>0])->select();
|
|
|
+ $createrid= $this->uid;//isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
+ $creater= $this->uname;//isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
+ $bidlist = Db::name("consult_bids")->where(["infoNo"=>$zxinfo['infoNo'],"is_del"=>0])->select()->toArray();
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
$innew =makeNo("IF");
|
|
@@ -605,7 +610,7 @@ class Consult extends Base
|
|
|
if($up){
|
|
|
|
|
|
//操作记录
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id'=>$this->uid,'nickname'=>$this->uname], [
|
|
|
"order_code" => $innew,//咨询单详情编号
|
|
|
"status" => 1,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -632,7 +637,7 @@ class Consult extends Base
|
|
|
Db::rollback();
|
|
|
return error_show(1004,"反馈商品新建失败");
|
|
|
}
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id'=>$this->uid,'nickname'=>$this->uname], [
|
|
|
"order_code" => $innew,//咨询单详情编号
|
|
|
"status" => 1,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -650,7 +655,7 @@ class Consult extends Base
|
|
|
return error_show(1004,"反馈商品更新失败");
|
|
|
}else{
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id'=>$this->uid,'nickname'=>$this->uname], [
|
|
|
"order_code" => $zxinfo['infoNo'],//咨询单详情编号
|
|
|
"status" => $zxinfo['status'],//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -718,7 +723,7 @@ class Consult extends Base
|
|
|
if($up){
|
|
|
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $zxinfo['infoNo'],//咨询单详情编号
|
|
|
"status" => $old_zxinfo_status,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -985,7 +990,7 @@ class Consult extends Base
|
|
|
$up = Db::name("project_info")->save($projectinfo);
|
|
|
if($up){
|
|
|
//修改状态,添加待办,只记录动作
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $projectinfo['pgNo'],//编码
|
|
|
"status" => $old_projectinfo_status,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -1004,14 +1009,14 @@ class Consult extends Base
|
|
|
return error_show(1006,"项目反馈失败");
|
|
|
}else{
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $projetc['projectNo'],//项目编码
|
|
|
"status" => 1,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
|
"action_type" => "status"//新建create,编辑edit,更改状态status
|
|
|
], "PRO", 2, $projetc);
|
|
|
|
|
|
- ProcessOrder::AddProcess($this->post['token'], [
|
|
|
+ ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_type" => 'PRO',
|
|
|
"order_code" => $projetc['projectNo'],
|
|
|
"order_id" => $projetc['id'],
|
|
@@ -1309,7 +1314,7 @@ class Consult extends Base
|
|
|
if ($up) {
|
|
|
|
|
|
//修改状态,添加待办,只记录动作
|
|
|
- ActionLog::logAdd($this->post['token'] , [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname] , [
|
|
|
"order_code"=>$projectinfo['pgNo'] ,//编码
|
|
|
"status"=>$old_projectinfo_status ,//这里的status是之前的值
|
|
|
"action_remark"=>'' ,//备注
|
|
@@ -1329,7 +1334,7 @@ class Consult extends Base
|
|
|
return error_show(1006 , "项目反馈失败");
|
|
|
} else {
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'] , [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname] , [
|
|
|
"order_code"=>$projectinfo['projectNo'] ,//项目编码
|
|
|
"status"=>1 ,//这里的status是之前的值
|
|
|
"action_remark"=>'' ,//备注
|
|
@@ -1337,7 +1342,7 @@ class Consult extends Base
|
|
|
] , "PRO" , 2 , $this->post
|
|
|
);
|
|
|
|
|
|
- ProcessOrder::AddProcess($this->post['token'] , [
|
|
|
+ ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname] , [
|
|
|
"order_type"=>'PRO' ,
|
|
|
"order_code"=>$projectinfo['projectNo'] ,
|
|
|
"order_id"=>$project_id ,
|
|
@@ -1406,14 +1411,14 @@ class Consult extends Base
|
|
|
if($infos['status']!=2&&$infos['status']!=3&&$infos['status']!=7){
|
|
|
return error_show(1004,"咨询单招标未结束或已确认商品");
|
|
|
}
|
|
|
- $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
- if($token==''){
|
|
|
- return error_show(105,"参数token不能为空");
|
|
|
- }
|
|
|
- $user =GetUserInfo($token);
|
|
|
- if(empty($user)||$user['code']!=0){
|
|
|
- return error_show(1002,"用户数据不存在");
|
|
|
- }
|
|
|
+// $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
+// if($token==''){
|
|
|
+// return error_show(105,"参数token不能为空");
|
|
|
+// }
|
|
|
+// $user =GetUserInfo($token);
|
|
|
+// if(empty($user)||$user['code']!=0){
|
|
|
+// return error_show(1002,"用户数据不存在");
|
|
|
+// }
|
|
|
//新增两个字段
|
|
|
//议价备注
|
|
|
$bargain_remark = isset($this->post['bargain_remark']) && $this->post['bargain_remark'] != "" ? trim($this->post['bargain_remark']) : "";
|
|
@@ -1424,8 +1429,8 @@ class Consult extends Base
|
|
|
if (empty($temp)) return error_show(1004, "议价原因选择不正确");
|
|
|
}
|
|
|
|
|
|
- $createrid= isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
- $creater= isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
+ $createrid= $this->uid;//isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
+ $creater= $this->uname;//isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
$bargainNo =makeNo("BA");
|
|
|
Db::startTrans();//::todo 金价 毛利计算
|
|
|
try{
|
|
@@ -1455,14 +1460,14 @@ class Consult extends Base
|
|
|
$int = Db::name("bargain_order")->insertGetId($data);
|
|
|
if($int){
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $bargainNo,//咨询单详情编号
|
|
|
"status" => 0,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
|
"action_type" => "status"//新建create,编辑edit,更改状态status
|
|
|
], "YJD", $data['status'], $data);
|
|
|
|
|
|
- ProcessOrder::AddProcess($this->post['token'], [
|
|
|
+ ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_type" => 'YJD',
|
|
|
"order_code" => $bargainNo,
|
|
|
"order_id" => $int,
|
|
@@ -1476,7 +1481,7 @@ class Consult extends Base
|
|
|
$up =Db::name("consult_bids")->save($info);
|
|
|
if($up){
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $bidNo,//咨询单详情编号
|
|
|
"status" => $odlstatus,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -1489,7 +1494,7 @@ class Consult extends Base
|
|
|
if($ups){
|
|
|
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $infos['infoNo'],//咨询单详情编号
|
|
|
"status" => $old_infos_status,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -1540,7 +1545,7 @@ class Consult extends Base
|
|
|
$bids = Db::name("consult_bids")->save($info);
|
|
|
if($bids){
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" =>$bidNo,//咨询单详情编号
|
|
|
"status" => $oldstattus,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -1553,7 +1558,7 @@ class Consult extends Base
|
|
|
if($se){
|
|
|
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $infos['infoNo'],//咨询单详情编号
|
|
|
"status" => $old_infos_status,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -1684,16 +1689,16 @@ class Consult extends Base
|
|
|
}
|
|
|
}
|
|
|
$remark = isset($this->post['remark'])&& $this->post['remark']!=""?trim($this->post['remark']):"";
|
|
|
- $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
- if($token==''){
|
|
|
- return error_show(105,"参数token不能为空");
|
|
|
- }
|
|
|
- $user =GetUserInfo($token);
|
|
|
- if(empty($user)||$user['code']!=0){
|
|
|
- return error_show(1002,"用户数据不存在");
|
|
|
- }
|
|
|
- $createrid= isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
- $creater= isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
+// $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
+// if($token==''){
|
|
|
+// return error_show(105,"参数token不能为空");
|
|
|
+// }
|
|
|
+// $user =GetUserInfo($token);
|
|
|
+// if(empty($user)||$user['code']!=0){
|
|
|
+// return error_show(1002,"用户数据不存在");
|
|
|
+// }
|
|
|
+ $createrid= $this->uid;//isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
+ $creater= $this->uname;//isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
$examinfo = isset($info['exam_info'])&&$info['exam_info']!="" ? json_decode($info['exam_info'],true):[];
|
|
@@ -1706,14 +1711,14 @@ class Consult extends Base
|
|
|
$up =Db::name("bargain_order")->save($info);
|
|
|
if($up){
|
|
|
//修改状态,添加待办
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $bargainNo,//咨询单详情编号
|
|
|
"status" =>$ra_status,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
|
"action_type" => "status"//新建create,编辑edit,更改状态status
|
|
|
], "YJD", $info['status'], $info);
|
|
|
$process=["order_code"=>$bargainNo,"order_id"=>$info['id'],"order_status"=>$info['status'],"order_type"=>'YJD',"before_status"=>$ra_status,'holder_id'=>$info['createrid']];
|
|
|
- ProcessOrder::AddProcess($token,$process);
|
|
|
+ ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname],$process);
|
|
|
if($info['status']==1||$info['status']==3||$info['status']==8||$info['status']==6||$info['status']==9||$info['status']==10||$info['status']==11){
|
|
|
$bidstatus=$bids['status'];
|
|
|
$bids['status']=5;
|
|
@@ -1734,7 +1739,7 @@ class Consult extends Base
|
|
|
Db::rollback();
|
|
|
return error_show(1004,"数据更新失败");
|
|
|
}
|
|
|
- ActionLog::logAdd($this->post['token'], [
|
|
|
+ ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], [
|
|
|
"order_code" => $info["bidsNo"],//咨询单详情编号
|
|
|
"status" => $bidstatus,//这里的status是之前的值
|
|
|
"action_remark" => '',//备注
|
|
@@ -1940,15 +1945,15 @@ class Consult extends Base
|
|
|
}
|
|
|
$is_own = isset($this->post['is_own']) ? intval($this->post['is_own']) : "0";
|
|
|
if($is_own==1){
|
|
|
- $token = isset($this->post['token']) ? trim($this->post['token']) : "";
|
|
|
- if($token==""){
|
|
|
- return error_show(101,'token不能为空');
|
|
|
- }
|
|
|
- $apply_id =GetUserInfo($token);
|
|
|
- if(empty($apply_id)||$apply_id['code']!=0){
|
|
|
- return error_show(1002,"申请人数据不存在");
|
|
|
- }
|
|
|
- $rm= isset($apply_id["data"]['id']) ? $apply_id["data"]['id'] : "";
|
|
|
+// $token = isset($this->post['token']) ? trim($this->post['token']) : "";
|
|
|
+// if($token==""){
|
|
|
+// return error_show(101,'token不能为空');
|
|
|
+// }
|
|
|
+// $apply_id =GetUserInfo($token);
|
|
|
+// if(empty($apply_id)||$apply_id['code']!=0){
|
|
|
+// return error_show(1002,"申请人数据不存在");
|
|
|
+// }
|
|
|
+ $rm= $this->uid;//isset($apply_id["data"]['id']) ? $apply_id["data"]['id'] : "";
|
|
|
$where[]=['createrid',"=",$rm];
|
|
|
}
|
|
|
|
|
@@ -2068,21 +2073,21 @@ class Consult extends Base
|
|
|
("zxNo");
|
|
|
$where[] = ['zxNo','in',$zxlist];
|
|
|
}
|
|
|
- $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
- if($token==''){
|
|
|
- return error_show(102,"参数token不能为空");
|
|
|
- }
|
|
|
+// $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
|
|
|
+// if($token==''){
|
|
|
+// return error_show(102,"参数token不能为空");
|
|
|
+// }
|
|
|
$is_own = isset($this->post['is_own']) ? intval($this->post['is_own']) : "0";
|
|
|
if($is_own==1){
|
|
|
- $token = isset($this->post['token']) ? trim($this->post['token']) : "";
|
|
|
- if($token==""){
|
|
|
- return error_show(101,'token不能为空');
|
|
|
- }
|
|
|
- $apply_id =GetUserInfo($token);
|
|
|
- if(empty($apply_id)||$apply_id['code']!=0){
|
|
|
- return error_show(1002,"申请人数据不存在");
|
|
|
- }
|
|
|
- $rm= isset($apply_id["data"]['id']) ? $apply_id["data"]['id'] : "";
|
|
|
+// $token = isset($this->post['token']) ? trim($this->post['token']) : "";
|
|
|
+// if($token==""){
|
|
|
+// return error_show(101,'token不能为空');
|
|
|
+// }
|
|
|
+// $apply_id =GetUserInfo($token);
|
|
|
+// if(empty($apply_id)||$apply_id['code']!=0){
|
|
|
+// return error_show(1002,"申请人数据不存在");
|
|
|
+// }
|
|
|
+ $rm= $this->uid;//isset($apply_id["data"]['id']) ? $apply_id["data"]['id'] : "";
|
|
|
$where[]=['createrid',"=",$rm];
|
|
|
}
|
|
|
$list =Db::name('consult_bids')->where($where)->select();
|