@@ -10,6 +10,8 @@ namespace app\admin\dao; | |||||
use app\admin\command\Util; | use app\admin\command\Util; | ||||
use app\admin\model\OrderHotel; | |||||
use app\admin\model\OrderItem; | |||||
use app\admin\model\PaymentOrder; | use app\admin\model\PaymentOrder; | ||||
use think\Db; | use think\Db; | ||||
use think\Exception; | use think\Exception; | ||||
@@ -117,6 +119,25 @@ class PaymentOrderDao | |||||
{ | { | ||||
try { | try { | ||||
$where = ["a.del_flag"=>0,"a.group_id"=>$param['group_id']]; | $where = ["a.del_flag"=>0,"a.group_id"=>$param['group_id']]; | ||||
if (!empty($param['order_id'])) { | |||||
$idList = []; | |||||
$orderItemModel = new OrderItem(); | |||||
$orderItem = $orderItemModel->where(["id"=>$param['order_id']])->find(); | |||||
if ($orderItem != null && !empty($orderItem['payment_order_id'])) { | |||||
$idList[] = $orderItem['payment_order_id']; | |||||
} | |||||
$orderHotelModel = new OrderHotel(); | |||||
$orderHotel = $orderHotelModel->where(["id"=>$param['order_id']])->find(); | |||||
if ($orderHotel != null && !empty($orderHotel['payment_order_id'])) { | |||||
$idList[] = $orderHotel['payment_order_id']; | |||||
} | |||||
if (count($idList) == 0) { | |||||
$where["a.id"]=0; | |||||
}else{ | |||||
$where["a.id"]=["in",$idList]; | |||||
} | |||||
} | |||||
if (!empty($param['name'])) { | if (!empty($param['name'])) { | ||||
$where['a.name'] = ["like","%".$param['name']."%"]; | $where['a.name'] = ["like","%".$param['name']."%"]; | ||||
} | } | ||||
@@ -116,8 +116,18 @@ class ReceiptOrderDao | |||||
*/ | */ | ||||
public function getList($param) | public function getList($param) | ||||
{ | { | ||||
try { | try { | ||||
$where = ["a.del_flag"=>0,"a.group_id"=>$param['group_id']]; | $where = ["a.del_flag"=>0,"a.group_id"=>$param['group_id']]; | ||||
if (empty($param['order_id'])) { | |||||
$orderMainModel = new OrderMain(); | |||||
$orderMain = $orderMainModel->where(["id"=>$param['order_id']])->select()->find(); | |||||
if ($orderMain == null || empty($orderMain['receipt_order_id'])) { | |||||
$where["a.id"] = 0; | |||||
}else{ | |||||
$where["a.id"] = $orderMain['receipt_order_id']; | |||||
} | |||||
} | |||||
if (!empty($param['name'])) { | if (!empty($param['name'])) { | ||||
$where['a.name'] = ["like","%".$param['name']."%"]; | $where['a.name'] = ["like","%".$param['name']."%"]; | ||||
} | } | ||||
@@ -33,6 +33,8 @@ | |||||
</el-select> | </el-select> | ||||
</div> | </div> | ||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | <div class="header-search" style="width: 100%;margin-bottom: 10px"> | ||||
<span>订单ID:</span> | |||||
<el-input v-model="search.order_id" style="width: 150px;" placeholder="请输入内容"></el-input> | |||||
<span>成本</span> | <span>成本</span> | ||||
<el-input-number v-model="search.startCost" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | <el-input-number v-model="search.startCost" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | ||||
~ | ~ | ||||
@@ -302,6 +304,7 @@ | |||||
data: function () { | data: function () { | ||||
return { | return { | ||||
search: { | search: { | ||||
order_id:"", | |||||
id:"", | id:"", | ||||
create_id:"", | create_id:"", | ||||
name: "", | name: "", | ||||
@@ -34,6 +34,8 @@ | |||||
</div> | </div> | ||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | <div class="header-search" style="width: 100%;margin-bottom: 10px"> | ||||
<span>订单ID:</span> | |||||
<el-input v-model="search.order_id" style="width: 150px;" placeholder="请输入内容"></el-input> | |||||
<span>金额</span> | <span>金额</span> | ||||
<el-input-number v-model="search.startMoney" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | <el-input-number v-model="search.startMoney" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | ||||
~ | ~ | ||||
@@ -136,8 +138,6 @@ | |||||
</el-form> | </el-form> | ||||
<div> | <div> | ||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | <div class="header-search" style="width: 100%;margin-bottom: 10px"> | ||||
<span>订单ID:</span> | |||||
<el-input v-model="orderMainListSearch.order_id" style="width: 150px;" placeholder="请输入内容"></el-input> | |||||
<span>订单状态:</span> | <span>订单状态:</span> | ||||
<el-select v-model="orderMainListSearch.order_status" filterable style="width: 150px;" placeholder="请选择" clearable> | <el-select v-model="orderMainListSearch.order_status" filterable style="width: 150px;" placeholder="请选择" clearable> | ||||
<el-option | <el-option | ||||
@@ -191,6 +191,8 @@ | |||||
</el-select> | </el-select> | ||||
</div> | </div> | ||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | <div class="header-search" style="width: 100%;margin-bottom: 10px"> | ||||
<span>订单号</span> | |||||
<el-input v-model="orderMainListSearch.order_id" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | |||||
<span>手机号</span> | <span>手机号</span> | ||||
<el-input v-model="orderMainListSearch.user_phone" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | <el-input v-model="orderMainListSearch.user_phone" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | ||||
<span>金额</span> | <span>金额</span> | ||||
@@ -274,6 +276,7 @@ | |||||
data: function () { | data: function () { | ||||
return { | return { | ||||
search: { | search: { | ||||
order_id:"", | |||||
id:"", | id:"", | ||||
create_id:"", | create_id:"", | ||||
name: "", | name: "", | ||||