|
@@ -140,6 +140,39 @@ class Good extends Base
|
|
|
'类目是否一致','税率是否一致','创建时间'];
|
|
|
excelExport("商品税率异常记录", $header, $list);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public function export(){
|
|
|
+ ini_set('memory_limit' , '-1');
|
|
|
+ $param=$this->request->param(['spuCode'=>'','status'=>'','good_name'=>'','companyNo'=>'','supplierNo'=>'',
|
|
|
+ 'creater'=>'','isZx'=>'','isChange'=>'','cat_diff'=>'','tax_diff'=>'','is_diff'=>'','start'=>'','end'=>''
|
|
|
+ ],'post','trim');
|
|
|
+ $where=[];
|
|
|
+ $param['spuCode']==''?: $where[]=['spuCode','like',"%{$param['spuCode']}%"];
|
|
|
+ $param['good_name']==''?: $where[]=['good_name','like',"%{$param['good_name']}%"];
|
|
|
+ $param['companyNo']==''?: $where[]=['companyNo','like',"%{$param['companyNo']}%"];
|
|
|
+ $param['supplierNo']==''?: $where[]=['supplierNo','like',"%{$param['supplierNo']}%"];
|
|
|
+ $param['creater']==''?: $where[]=['creater','like',"%{$param['creater']}%"];
|
|
|
+ $param['status']===''?: $where[]=['status','=',$param['status']];
|
|
|
+ $param['isZx']==''?: $where[]=['isZx','=',$param['isZx']];
|
|
|
+ $param['isChange']===''?: $where[]=['isChange','=',$param['isChange']];
|
|
|
+ $param['is_diff']==''?: $where[]=['cat_diff|tax_diff','=',2];
|
|
|
+ $param['cat_diff']==''?: $where[]=['cat_diff','=',$param['cat_diff']];
|
|
|
+ $param['tax_diff']==''?: $where[]=['tax_diff','=',$param['tax_diff']];
|
|
|
+ $param['start']==''?: $where[]=['addtime','>=',date('Y-m-d 00:00:00',strtotime($param['start']))];
|
|
|
+ $param['end']==''?: $where[]=['addtime','<=',date('Y-m-d 23:59:59',strtotime($param['end']))];
|
|
|
+ $header=['商品编码','卖出方公司编号','卖出方公司','买入方公司编号','买入方公司','商品名称','采购类目编码','采购类目名称','采购开票商品名称',
|
|
|
+ '财务类目编码','财务类目名称','财务开票商品名称','状态','增值税管理内容','创建人','创建时间'];
|
|
|
+ $list =$this->model->where($where)
|
|
|
+ ->field('spuCode,supplierNo,supplierName,companyNo,companyName,good_name,cgd_inv_cat_code,cgd_inv_cat_name,
|
|
|
+ cgd_inv_good_name,inv_cat_code,inv_cat_name,inv_good_name,status,addTax,creater,addtime')
|
|
|
+ ->withAttr('status',function ($v){return \app\admin\model\Good::$status[$v]?:'';})
|
|
|
+ ->withAttr('inv_cat_code',function ($v){return $v.' ';})
|
|
|
+ ->withAttr('cgd_inv_cat_code',function ($v){return $v.' ';})
|
|
|
+ ->select();
|
|
|
+
|
|
|
+ excelExport('结算类目设置导出表',$header,$list);
|
|
|
+ }
|
|
|
/**
|
|
|
* @param $good
|
|
|
* @param $check
|