|
@@ -31,13 +31,13 @@ class InterOrder extends \app\admin\BaseController{
|
|
|
if($param['cgd_saler']!="") $where[]=["c.ownerName","like","%{$param['cgd_saler']}%"];
|
|
|
|
|
|
$count= Db::name("inter_order")->alias("a")
|
|
|
- ->leftJoin("qrd_info b","a.orderCode=b.sequenceNo and b.is_del=0 and b.department='网络部'")
|
|
|
- ->leftJoin("cgd_info c","a.cgdNo=c.sequenceNo and c.is_del=0 and c.department='网络部'")->where($where)->count();
|
|
|
+ ->leftJoin("qrd_info b","a.orderCode=b.sequenceNo and b.is_del=0 and b.qrdSource=10")
|
|
|
+ ->leftJoin("cgd_info c","a.cgdNo=c.sequenceNo and c.is_del=0 and c.cgdSource=10")->where($where)->count();
|
|
|
$total =ceil($count/$param['size']);
|
|
|
$page =$total>=$param['page'] ? intval($param['page']): intval($total);
|
|
|
$list= Db::name("inter_order")->alias("a")
|
|
|
- ->leftJoin("qrd_info b","a.orderCode=b.sequenceNo and b.is_del=0 and b.department='网络部'")
|
|
|
- ->leftJoin("cgd_info c","a.cgdNo=c.sequenceNo and c.is_del=0 and c.department='网络部'")
|
|
|
+ ->leftJoin("qrd_info b","a.orderCode=b.sequenceNo and b.is_del=0 and b.qrdSource=10")
|
|
|
+ ->leftJoin("cgd_info c","a.cgdNo=c.sequenceNo and c.is_del=0 and c.cgdSource=10")
|
|
|
->field("a.id,
|
|
|
a.orderCode,
|
|
|
b.customerName as khName,
|
|
@@ -399,7 +399,7 @@ class InterOrder extends \app\admin\BaseController{
|
|
|
'branch' => $customer['branch']??"",//分公司,从客户表中查
|
|
|
'updatetime' =>date("Y-m-d H:i:s"),
|
|
|
];
|
|
|
- $cgd=["id"=>$cgd_order['id'],
|
|
|
+ $cgd=["id"=>$cgd_order['id'],
|
|
|
'name' => $param['cgd_depart']."采购单",//采购单名称',
|
|
|
'ownerName' => $param['buyer'],//采购员名称',
|
|
|
'ownerid' => $param['buyerid'],//采购员id',
|
|
@@ -451,35 +451,12 @@ class InterOrder extends \app\admin\BaseController{
|
|
|
return error_show(1004, $e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
-// "id|主键ID"=>"require|number|gt:0",
|
|
|
-// "sale_name|业务员名称"=>"require|max:255|min:1",
|
|
|
-// "sale_id|业务员名称"=>"require|number|gt:0",
|
|
|
-// "companyNo|业务公司编号"=>"require|max:255|min:1",
|
|
|
-// "supplierNo|业务公司编号"=>"require|max:255|min:1",
|
|
|
-// "poNo|PO编号"=>"require|max:255|min:1",
|
|
|
-// "sequenceNo|单据编号"=>"require|max:255|min:1",
|
|
|
-// "khNo|客户公司编号"=>"require|max:255|min:1",
|
|
|
-// "qrdType|订单类型"=>"require|number|in:[1,2,3]",
|
|
|
-// "goodName|商品名称"=>"require|max:255|min:1",
|
|
|
-// "tax|税率"=>"require|number|gt:0",
|
|
|
-// "goodNum|商品数量"=>"require|number|gt:0",
|
|
|
-// "goodPrice|商品单价"=>"require|number|gt:0",
|
|
|
-// "mobile|联系人电话"=>"require|number|mobile",
|
|
|
-// "contactor|联系人"=>"require|max:255|min:1",
|
|
|
-// "addr|收货地址"=>"require|max:255|min:1",
|
|
|
-// "buyer|销售员"=>"require|max:255|min:1",
|
|
|
-// "buyerid|销售员"=>"require|number|gt:0",
|
|
|
-// "sendtime|发货时间"=>"require|date",
|
|
|
-// "cat|商品分类"=>"require|array",
|
|
|
-// "cgd_tax|采购毛利率"=>"require|number|gt:0",
|
|
|
-// "sale_depart|销售员部门"=>"require|max:255|min:1",
|
|
|
-// "cgd_depart|采购员部门"=>"require|max:255|min:1",
|
|
|
public function info(){
|
|
|
$post=$this->request->post();
|
|
|
$id = isset($post['id'])&&$post['id']!='' ? $post['id'] :"";
|
|
|
$condition = [['a.id',"=",$id]];
|
|
|
- $list=Db::name('inter_order')->alias('a')->join('qrd_info b',"a.orderCode=b.sequenceNo and b.is_del=0 and b.department='网络部'",'left')
|
|
|
- ->join('cgd_info c',"a.cgdNo=c.sequenceNo and c.is_del=0 and c.department='网络部'",'left')->json
|
|
|
+ $list=Db::name('inter_order')->alias('a')->join('qrd_info b',"a.orderCode=b.sequenceNo and b.is_del=0 and b.qrdSource=10",'left')
|
|
|
+ ->join('cgd_info c',"a.cgdNo=c.sequenceNo and c.is_del=0 and c.cgdSource=10",'left')->json
|
|
|
(["cat"])->where($condition)
|
|
|
->order("a.addtime desc")->field('a.id,
|
|
|
b.goodNo ,
|