|
@@ -8,6 +8,7 @@ use Exception;
|
|
use think\App;
|
|
use think\App;
|
|
use think\facade\Db;
|
|
use think\facade\Db;
|
|
use app\admin\model\ActionLog;
|
|
use app\admin\model\ActionLog;
|
|
|
|
+use think\facade\Validate;
|
|
|
|
|
|
//销售单
|
|
//销售单
|
|
class Sale extends Base
|
|
class Sale extends Base
|
|
@@ -3180,4 +3181,51 @@ class Sale extends Base
|
|
$order["noble_weight"] = isset($order['weight'])?$order['weight']:0;
|
|
$order["noble_weight"] = isset($order['weight'])?$order['weight']:0;
|
|
return app_show(0,"获取成功",$order);
|
|
return app_show(0,"获取成功",$order);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //获取采反商品详情,当数据不在good_zixun中,模仿goodzxinfo
|
|
|
|
+ public function getGoodZxInfoByNotZixun(){
|
|
|
|
+
|
|
|
|
+ $param=$this->request->only(['spuCode'],'post','trim');
|
|
|
|
+
|
|
|
|
+ $val=Validate::rule(['spuCode'=>'require']);
|
|
|
|
+
|
|
|
|
+ if(!$val->check($param)) return error_show(1004,$val->getError());
|
|
|
|
+
|
|
|
|
+ $order = Db::name('consult_bids')
|
|
|
|
+ ->field(true)
|
|
|
|
+ ->where(['spuCode'=>$param['spuCode'],'is_del'=>0])
|
|
|
|
+ ->find();
|
|
|
|
+
|
|
|
|
+// $orderCode= isset($this->post['spuCode'])&&$this->post['spuCode']!=''?trim($this->post['spuCode']):"";
|
|
|
|
+// if($orderCode==""){
|
|
|
|
+// return error_show(1003,"参数spuCode不能为空");
|
|
|
|
+// }
|
|
|
|
+// $order= Db::name("good_zixun")->where(["spuCode"=>$orderCode,"is_del"=>0])->find();
|
|
|
|
+// if(empty($order)){
|
|
|
|
+// return error_show(1003,"订单数据未找到");
|
|
|
|
+// }
|
|
|
|
+ $unit =Db::name("unit")->where(["id"=>$order['unit_id']])->find();
|
|
|
|
+ if($order['brand_id']!=0){
|
|
|
|
+ $brand=Db::name("brand")->where(["id"=>$order['brand_id']])->find();
|
|
|
|
+ $order["brand_name"]=isset($brand['brand_name'])?$brand['brand_name']:"";
|
|
|
|
+ }else{
|
|
|
|
+ $order["brand_name"]="";
|
|
|
|
+ $order["brand_id"]="";
|
|
|
|
+ }
|
|
|
|
+ $order['specinfo']=json_decode($order['specinfo'],true);
|
|
|
|
+ $order['unit'] = isset($unit['unit'])?$unit['unit']:'';
|
|
|
|
+ $order['cat_info'] = made($order['cat_id'],[]);
|
|
|
|
+ $order['noble_name']=isset($order['noble_metal'])&&$order['noble_metal']!=0?$this->noble[$order['noble_metal']] :"";
|
|
|
|
+ if($order['is_gold_price']==1){
|
|
|
|
+ $price=Db::name("gold_price1")->where(["type"=>$order['noble_metal'],"status"=>1,"is_del"=>0])->order("addtime desc")->find();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ $supplier = Db::name("supplier")->where(["code"=>$order['supplierNo']])->find();
|
|
|
|
+ $order['supplier_name'] = isset($supplier['name']) ? $supplier['name']:"";
|
|
|
|
+// $palt =Db::name("platform")->where(["id"=>$order['platform_id']])->find();
|
|
|
|
+// $order['platform_name']=isset($palt['platform_name']) ? $palt['platform_name']:"";
|
|
|
|
+ $order["gold_price"] = isset($price['price'])?$price['price']:0;
|
|
|
|
+ $order["noble_weight"] = isset($order['weight'])?$order['weight']:0;
|
|
|
|
+ return app_show(0,"获取成功",$order);
|
|
|
|
+ }
|
|
}
|
|
}
|