|
@@ -118,8 +118,14 @@ class Purch extends Base
|
|
|
// if(!empty($role['platform']) ){
|
|
|
// $where[]=["po.platform_id","in",$role['platform']];
|
|
|
// }
|
|
|
- $count=Db::name("purchease_order")->alias('po')->leftJoin('order_num on','on.cgdNo=po.cgdNo')->where($where)
|
|
|
- ->where(function($query) use ($where){$query->whereOr([['po.order_type', '<>', 1],['po.order_source', '=', 0]]);})->count();
|
|
|
+ $count = Db::name("purchease_order")
|
|
|
+ ->alias('po')
|
|
|
+ ->leftJoin('order_num on', 'on.cgdNo=po.cgdNo')
|
|
|
+ ->where($where)
|
|
|
+ ->where(function ($query) use ($where) {
|
|
|
+ $query->whereOr([['po.order_type', '<>', 1], ['po.order_source', '=', 0]]);
|
|
|
+ })
|
|
|
+ ->count();
|
|
|
$total = ceil($count/$size);
|
|
|
$page = $page >= $total ? $total : $page;
|
|
|
$list = Db::name("purchease_order")
|
|
@@ -338,6 +344,10 @@ class Purch extends Base
|
|
|
|
|
|
$data['has_account'] = (int)isset(checkHasAccountBySupplierNos([$data['supplierNo']])[$data['supplierNo']]);
|
|
|
|
|
|
+ //补充商品创建人字段
|
|
|
+ $data['good_createrid']=$goon['createrid']??'';
|
|
|
+ $data['good_creater']=$goon['creater']??'';
|
|
|
+
|
|
|
return app_show(0, "获取成功", $data);
|
|
|
}
|
|
|
|