浏览代码

'cheweifei'

aiyou 3 年之前
父节点
当前提交
4099c0f4fc
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      application/admin/controller/cost/CostBillPaid.php

+ 8 - 2
application/admin/controller/cost/CostBillPaid.php

@@ -76,8 +76,14 @@ class CostBillPaid extends Backend
                         }else{
                             $item_id=3;
                         }
-                        $get_item=CostItem::where('village_id',$get['village_id'])->where('item',$item_id)->column('id');
-                        $where_and['item_id']=['in',$get_item];
+                        if (isset($get['village_id'])){
+                            $get_item=CostItem::where('village_id',$get['village_id'])->where('item',$item_id)->column('id');
+                            $where_and['item_id']=['in',$get_item];
+                        }else{
+                            $get_item=CostItem::where('item',$item_id)->column('id');
+                            $where_and['item_id']=['in',$get_item];
+                        }
+
                     }
                 }
                 if (isset($get['pay_time'])){