|
@@ -59,6 +59,15 @@ class Resign extends BaseController
|
|
|
if($status!==""){
|
|
|
$where['status'] = $status;
|
|
|
}
|
|
|
+
|
|
|
+ $start = isset($this->post['start']) && $this->post['start']!=="" ? $this->post['start']:"";
|
|
|
+ if($start!==""){
|
|
|
+ $where['addtime'] = Db::Raw(">= '{$start}'");
|
|
|
+ }
|
|
|
+ $end = isset($this->post['end']) && $this->post['end']!=="" ? $this->post['end']:"";
|
|
|
+ if($end!==""){
|
|
|
+ $where['addtime'] = Db::Raw("<= '{$end}'");
|
|
|
+ }
|
|
|
$count=Db::name("purchease")->where($where)->count();
|
|
|
$total = ceil($count/$size);
|
|
|
$page = $page >= $total ? $total : $page;
|
|
@@ -167,14 +176,14 @@ class Resign extends BaseController
|
|
|
}
|
|
|
$good_type_code = isset($this->post['good_type_code'])&&$this->post['good_type_code']!="" ? trim($this->post['good_type_code'])
|
|
|
:"";
|
|
|
- if($good_type_code==""){
|
|
|
- return error_show(1002,'参数good_type_code 不能为空');
|
|
|
- }
|
|
|
- $good_type= Db::name("good_type")->where(['good_code'=>$good_code,'is_del'=>0,'type_code'=>$good_type_code])
|
|
|
- ->find();
|
|
|
- if(empty($good_type)){
|
|
|
- return error_show(1002,'未找到商品属性数据');
|
|
|
- }
|
|
|
+ if($good_type_code!=''){
|
|
|
+ $good_type= Db::name("good_type")->where(['good_code'=>$good_code,'is_del'=>0,'type_code'=>$good_type_code])
|
|
|
+ ->find();
|
|
|
+ if(empty($good_type)){
|
|
|
+ return error_show(1002,'未找到商品属性数据');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$good_num = isset($this->post['good_num'])&&$this->post['good_num']!=="" ? intval($this->post['good_num']) :"";
|
|
|
if($good_num==''){
|
|
|
return error_show(1002,'参数good_num 不能为空或零');
|