|
@@ -332,6 +332,83 @@ class Consult extends BaseController
|
|
|
}
|
|
|
|
|
|
public function zxinfo(){
|
|
|
+ $infoNo= isset($this->post['infoNo'])&&$this->post['infoNo']!=""?trim($this->post['infoNo']):"";
|
|
|
+ if($infoNo==""){
|
|
|
+ return error_show(1004,"参数infoNo不能为空");
|
|
|
+ }
|
|
|
+ $zxinfo = Db::name("consult_info")->where(["infoNo"=>$infoNo,"is_del"=>0])->find();
|
|
|
+ if($zxinfo==false){
|
|
|
+ return error_show(1004,"未找到信息数据");
|
|
|
+ }
|
|
|
+ $zxorder = Db::name("consilt_order")->where(["zxNo"=>$zxinfo['zxNo'],"is_del"=>0])->find();
|
|
|
+ if($zxorder==false){
|
|
|
+ return error_show(1004,"未找到咨询信息数据");
|
|
|
+ }
|
|
|
+ $zxorder['khname']="";
|
|
|
+ if($zxorder['khNo']!==""){
|
|
|
+ $kh=Db::name("customer_info")->where(['companyNo'=>$zxorder['khNo']])->find();
|
|
|
+ $zxorder['khname']= isset($kh['companyName'])?$kh['companyName']:"";
|
|
|
+ }
|
|
|
+ return app_show(0,"获取成功",$zxinfo);
|
|
|
+ }
|
|
|
+ //** 发布竞标任务 */
|
|
|
+ public function bargain(){
|
|
|
+ $infoNo= isset($this->post['infoNo'])&&$this->post['infoNo']!=""?trim($this->post['infoNo']):"";
|
|
|
+ if($infoNo==""){
|
|
|
+ return error_show(1004,"参数infoNo不能为空");
|
|
|
+ }
|
|
|
+ $zxinfo = Db::name("consult_info")->where(["infoNo"=>$infoNo,"is_del"=>0])->find();
|
|
|
+ if($zxinfo==false){
|
|
|
+ return error_show(1004,"未找到信息数据");
|
|
|
+ }
|
|
|
+ $status =isset($this->post['status']) && $this->post['status']!=="" ? intval($this->post['status']):"";
|
|
|
+ if($status===""){
|
|
|
+ return error_show(1004,"参数status不能为空");
|
|
|
+ }
|
|
|
+ if($status==1&&$zxinfo['status']>1){
|
|
|
+ $zxinfo['bargain_num']=+1;
|
|
|
+ }
|
|
|
+ $zxinfo['status']=$status;
|
|
|
+ $zxinfo['updatetime']=date("Y-m-d H:i:s");
|
|
|
+ $up = Db::name("consult_info")->save($zxinfo);
|
|
|
+ if($up){
|
|
|
+ return app_show(0,"状态更新成功");
|
|
|
+ }else{
|
|
|
+ return error_show(1003,"状态更新失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ public function feadback(){
|
|
|
+ $infoNo= isset($this->post['infoNo'])&&$this->post['infoNo']!=""?trim($this->post['infoNo']):"";
|
|
|
+ if($infoNo==""){
|
|
|
+ return error_show(1004,"参数infoNo不能为空");
|
|
|
+ }
|
|
|
+ $zxinfo = Db::name("consult_info")->where(["infoNo"=>$infoNo,"is_del"=>0])->find();
|
|
|
+ if($zxinfo==false){
|
|
|
+ return error_show(1004,"未找到信息数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ $pname = isset($this->post['pname'])&&$this->post['pname']!=""? trim($this->post['pname']):"";
|
|
|
+ if($pname==""){
|
|
|
+ return error_show(1004,"参数pname不能为空");
|
|
|
+ }
|
|
|
+ $brandid = isset($this->post['brandid'])&&$this->post['brandid']!=""? intval($this->post['brandid']):"";
|
|
|
+ if($brandid==""){
|
|
|
+ return error_show(1004,"参数brandid不能为空");
|
|
|
+ }
|
|
|
+ $cat_id = isset($this->post['cat_id'])&&$this->post['cat_id']!=""? trim($this->post['cat_id']):"";
|
|
|
+ if($cat_id==""){
|
|
|
+ return error_show(1004,"参数cat_id不能为空");
|
|
|
+ }
|
|
|
+ $model = isset($this->post['model'])&&$this->post['model']!=""? trim($this->post['model']):"";
|
|
|
+ $model = isset($this->post['model'])&&$this->post['model']!=""? trim($this->post['model']):"";
|
|
|
+ $model = isset($this->post['model'])&&$this->post['model']!=""? trim($this->post['model']):"";
|
|
|
+ $model = isset($this->post['model'])&&$this->post['model']!=""? trim($this->post['model']):"";
|
|
|
+ $model = isset($this->post['model'])&&$this->post['model']!=""? trim($this->post['model']):"";
|
|
|
+ $model = isset($this->post['model'])&&$this->post['model']!=""? trim($this->post['model']):"";
|
|
|
+ $model = isset($this->post['model'])&&$this->post['model']!=""? trim($this->post['model']):"";
|
|
|
+ if($pname==""){
|
|
|
+ return error_show(1004,"参数pname不能为空");
|
|
|
+ }
|
|
|
}
|
|
|
}
|