Browse Source

收款单查询优化

master
nizongfeng 1 year ago
parent
commit
93c878fba5
5 changed files with 47 additions and 4 deletions
  1. +1
    -1
      application/admin/controller/CfItem.php
  2. +6
    -0
      application/admin/dao/PaymentOrderDao.php
  3. +6
    -0
      application/admin/dao/ReceiptOrderDao.php
  4. +17
    -2
      application/admin/view/payment_order/index.html
  5. +17
    -1
      application/admin/view/receipt_order/index.html

+ 1
- 1
application/admin/controller/CfItem.php View File

@@ -222,7 +222,7 @@ class CfItem extends Backend
$config = \think\Config::get("site.item_category");
$config = json_decode($config,true);
foreach ($result as $key=>$value){
$result[$key]["item_type_name"]= $config[$value["item_type"]];
$result[$key]["item_type_name"]= empty($config[$value["item_type"]])?"":$config[$value["item_type"]];
}
$config = \think\Config::get("site.item_unit");
$config = json_decode($config,true);


+ 6
- 0
application/admin/dao/PaymentOrderDao.php View File

@@ -123,6 +123,12 @@ class PaymentOrderDao
if ($param['status']."" != 'all' && $param['status']!=="") {
$where["a.status"] = $param['status'];
}
if (!empty($param["id"])) {
$where["a.id"] = $param["id"];
}
if (!empty($param['create_id'])) {
$where["a.create_id"] = $param["create_id"];
}
$having = [];
if(!empty($param['startCost']) && !empty($param['endCost'])) {
$having[] = " (itemMoney >= {$param['startCost']} and itemMoney <= {$param['endCost']} ) or (hotelMoney >= {$param['startCost']} and hotelMoney <= {$param['endCost']} ) ";


+ 6
- 0
application/admin/dao/ReceiptOrderDao.php View File

@@ -124,6 +124,12 @@ class ReceiptOrderDao
if ($param['status']."" != 'all' && $param['status']!=="") {
$where["a.status"] = $param['status'];
}
if (!empty($param["id"])) {
$where["a.id"] = $param["id"];
}
if (!empty($param['create_id'])) {
$where["a.create_id"] = $param["create_id"];
}
$having = "";
if(!empty($param['startMoney']) && !empty($param['endMoney'])) {
$having = " total_amount >= {$param['startMoney']} and total_amount <= {$param['endMoney']} ";


+ 17
- 2
application/admin/view/payment_order/index.html View File

@@ -8,9 +8,11 @@
<body>
<div id="app" class="table">
<div>
<div class="header-search">
<div class="header-search" style="width: 100%;margin-bottom: 10px">
<span>付款单ID:</span>
<el-input v-model="search.id" style="width: 120px;" placeholder="请输入内容" clearable></el-input>
<span>名称:</span>
<el-input v-model="search.name" style="width: 120px;" placeholder="请输入内容"></el-input>
<el-input v-model="search.name" style="width: 120px;" placeholder="请输入内容" clearable></el-input>
<span>状态</span>
<el-select v-model="search.status" filterable placeholder="请选择" clearable>
<el-option
@@ -20,6 +22,17 @@
:value="item.id">
</el-option>
</el-select>
<span>创建人</span>
<el-select v-model="search.create_id" filterable placeholder="请选择" clearable>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="header-search" style="width: 100%;margin-bottom: 10px">
<span>成本</span>
<el-input-number v-model="search.startCost" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number>
~
@@ -289,6 +302,8 @@
data: function () {
return {
search: {
id:"",
create_id:"",
name: "",
status: "all",
startCost:"",


+ 17
- 1
application/admin/view/receipt_order/index.html View File

@@ -8,7 +8,9 @@
<body>
<div id="app" class="table">
<div>
<div class="header-search">
<div class="header-search" style="width: 100%;margin-bottom: 10px">
<span>付款单ID:</span>
<el-input v-model="search.id" style="width: 120px;" placeholder="请输入内容" clearable></el-input>
<span>名称:</span>
<el-input v-model="search.name" style="width: 150px;" placeholder="请输入内容"></el-input>
<span>状态</span>
@@ -20,6 +22,18 @@
:value="item.id">
</el-option>
</el-select>
<span>创建人</span>
<el-select v-model="search.create_id" filterable placeholder="请选择" clearable>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>

</div>
<div class="header-search" style="width: 100%;margin-bottom: 10px">
<span>金额</span>
<el-input-number v-model="search.startMoney" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number>
~
@@ -260,6 +274,8 @@
data: function () {
return {
search: {
id:"",
create_id:"",
name: "",
status: "all",
startMoney:0,


Loading…
Cancel
Save