diff --git a/application/admin/dao/PurchasePriceDao.php b/application/admin/dao/PurchasePriceDao.php index a0da498..dd82af8 100644 --- a/application/admin/dao/PurchasePriceDao.php +++ b/application/admin/dao/PurchasePriceDao.php @@ -29,7 +29,7 @@ class PurchasePriceDao { try { //删除记录 - $this->delete($order_detail_id); + $this->delete($purchase_id); //循环添加 foreach ($param as $value) { $data = [ diff --git a/application/admin/service/PaymentOrderService.php b/application/admin/service/PaymentOrderService.php index d51d713..9ba4429 100644 --- a/application/admin/service/PaymentOrderService.php +++ b/application/admin/service/PaymentOrderService.php @@ -155,9 +155,13 @@ class PaymentOrderService }else{ $hotel_where_arr[]=" b.id = 0 "; } + if (!empty($param['sub_order_id'])) { + $item_where_arr[] = " a.id = {$param["sub_order_id"]} "; + $hotel_where_arr[]=" b.id = {$param['sub_order_id']} "; + } if (!empty($param['order_id'])) { - $item_where_arr[] = " a.id = {$param["order_id"]} "; - $hotel_where_arr[]=" b.id = {$param['order_id']} "; + $item_where_arr[] = " a.order_id = {$param["order_id"]} "; + $hotel_where_arr[]=" b.order_id = {$param['order_id']} "; } if (!empty($param['supplier_id'])) { $item_where_arr[] = " d.supplier_id = {$param["supplier_id"]} "; @@ -168,8 +172,8 @@ class PaymentOrderService $hotel_where_arr[]=" b.confirm_status = {$param['confirm_status']} "; } if (!empty($param['customer_name'])) { - $item_where_arr[] = " a.customer_name like %{$param["customer_name"]}% "; - $hotel_where_arr[]=" b.customer_name like %{$param['customer_name']}% "; + $item_where_arr[] = " a.customer_name like '%{$param["customer_name"]}%' "; + $hotel_where_arr[]=" b.customer_name like '%{$param['customer_name']}%' "; } if (!empty($param['item_id'])) { $item_where_arr[] = " a.item_id = {$param["item_id"]} "; diff --git a/application/admin/service/ReceiptOrderService.php b/application/admin/service/ReceiptOrderService.php index 7412607..2aaaa1b 100644 --- a/application/admin/service/ReceiptOrderService.php +++ b/application/admin/service/ReceiptOrderService.php @@ -133,7 +133,7 @@ class ReceiptOrderService $where['commissioner_id'] = $param['commissioner_id']; } if (!empty($param['user_name'])) { - $where['user_name'] = ["like","%".$param['user_name']."%"]; + $where['user_name'] = ["like","'%".$param['user_name']."%'"]; } if (!empty($param['user_phone'])) { $where['user_phone'] = $param['user_phone']; diff --git a/application/admin/view/payment_order/index.html b/application/admin/view/payment_order/index.html index f17dca9..cd7b507 100755 --- a/application/admin/view/payment_order/index.html +++ b/application/admin/view/payment_order/index.html @@ -126,6 +126,8 @@