|
@@ -176,4 +176,28 @@ public function backfe(){
|
|
$datainfo=Db::name('purchease_back')->save($data);
|
|
$datainfo=Db::name('purchease_back')->save($data);
|
|
return $datainfo ? error_show(0,"更新成功") : error_show(1002,"更新失败");
|
|
return $datainfo ? error_show(0,"更新成功") : error_show(1002,"更新失败");
|
|
}
|
|
}
|
|
|
|
+public function info(){
|
|
|
|
+ $returnCode = isset($this->post['returnCode']) && $this->post['returnCode'] !==""? trim($this->post['returnCode']) :"";
|
|
|
|
+ if($returnCode==""){
|
|
|
|
+ return error_show(1002,"参数returnCode不能为空");
|
|
|
|
+ }
|
|
|
|
+ $info= Db::name("purchease_back")->where(['returnCode'=>$returnCode])->find();
|
|
|
|
+ if(empty($info)){
|
|
|
|
+ return error_show(1002,"未找到数据");
|
|
|
|
+ }
|
|
|
|
+ $goon = Db::name('good')->where(['good_code'=>$info['good_code']])->field("cat_id")->find();
|
|
|
|
+ if(empty($goon)){
|
|
|
|
+ return error_show(1002,"未找到商品数据");
|
|
|
|
+ }
|
|
|
|
+ $int= isset($goon['cat_id']) && $goon['cat_id'] !=0 ? made($goon['cat_id']):[];
|
|
|
|
+ $wsmcode = Db::name("purchease_order")->alias("k")->leftJoin("supplier c", "k.supplierNo=c.code")
|
|
|
|
+ ->where(["k.cgdNo" => $info['cgdNo']])->field("k.good_name,k.good_code,k.good_num,c.name,c.code")->find();
|
|
|
|
+ //$info['good'] = isset($wsmcode['good_name']) ? $wsmcode['good_name'] : "";
|
|
|
|
+ $info['goo_num'] = isset($wsmcode['good_num']) ? $wsmcode['good_num'] : "";
|
|
|
|
+ //$info['god'] = isset($wsmcode['good_code']) ? $wsmcode['good_code'] : "";
|
|
|
|
+ $info['wsm_supplier'] = isset($wsmcode['name']) ? $wsmcode['name'] : "";
|
|
|
|
+ $info['wsm_supplierNo'] = isset($wsmcode['code']) ? $wsmcode['code'] : "";
|
|
|
|
+ $info['can']=$int;
|
|
|
|
+ return app_show(0,"获取成功",$info);
|
|
|
|
+}
|
|
}
|
|
}
|