提交 6a412ed8 authored 作者: chengye's avatar chengye

调整账单查询条件

上级 88b7291d
......@@ -2,6 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="f51c1393-9404-4c81-be85-d91ed40531b3" name="默认更改列表" comment="">
<change beforePath="$PROJECT_DIR$/application/em/controller/Invoice.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/em/controller/Invoice.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/application/em/model/EmInvoice.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/em/model/EmInvoice.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
......@@ -15,20 +16,20 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/em/model/EmInvoice.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="98">
<caret line="40" column="23" selection-start-line="40" selection-start-column="23" selection-end-line="40" selection-end-column="23" />
<state relative-caret-position="439">
<caret line="51" column="9" lean-forward="true" selection-start-line="51" selection-start-column="9" selection-end-line="51" selection-end-column="9" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/em/controller/Invoice.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="322">
<caret line="62" column="33" selection-start-line="62" selection-start-column="33" selection-end-line="62" selection-end-column="33" />
<state relative-caret-position="384">
<caret line="67" column="52" selection-start-line="67" selection-start-column="52" selection-end-line="67" selection-end-column="52" />
</state>
</provider>
</entry>
......@@ -52,8 +53,8 @@
<list>
<option value="$PROJECT_DIR$/application/em/view/useage/special.html" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/application/em/controller/Invoice.php" />
<option value="$PROJECT_DIR$/application/em/model/EmInvoice.php" />
<option value="$PROJECT_DIR$/application/em/controller/Invoice.php" />
</list>
</option>
</component>
......@@ -150,12 +151,12 @@
<workItem from="1578900535997" duration="5097000" />
<workItem from="1578907167448" duration="144000" />
<workItem from="1578972376079" duration="6515000" />
<workItem from="1579067299817" duration="2802000" />
<workItem from="1579067299817" duration="2907000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="15264000" />
<option name="totallyTimeSpent" value="15369000" />
</component>
<component name="ToolWindowManager">
<frame x="1358" y="-125" width="1936" height="1056" extended-state="6" />
......@@ -419,17 +420,17 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/em/controller/Invoice.php">
<entry file="file://$PROJECT_DIR$/application/em/model/EmInvoice.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="322">
<caret line="62" column="33" selection-start-line="62" selection-start-column="33" selection-end-line="62" selection-end-column="33" />
<state relative-caret-position="439">
<caret line="51" column="9" lean-forward="true" selection-start-line="51" selection-start-column="9" selection-end-line="51" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/em/model/EmInvoice.php">
<entry file="file://$PROJECT_DIR$/application/em/controller/Invoice.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="98">
<caret line="40" column="23" selection-start-line="40" selection-start-column="23" selection-end-line="40" selection-end-column="23" />
<state relative-caret-position="384">
<caret line="67" column="52" selection-start-line="67" selection-start-column="52" selection-end-line="67" selection-end-column="52" />
</state>
</provider>
</entry>
......
......@@ -60,12 +60,12 @@ class Invoice extends Base
$page =Request::param('page')?Request::param('page'):1;
$limit = Request::param('limit')?Request::param('limit'):10;
$data = (new EmInvoice)->getInvoiceList($map,$page,$limit);
// foreach ( $data as $key => &$v) {
// $v['status']=parseStatus($v['status']);
// }
$InvoiceCount = (new EmInvoice)->getInvoiceCount($map);
foreach ( $data as $key => &$v) {
$v['status']=parseStatus($v['status']);
}
//$InvoiceCount = (new EmInvoice)->getInvoiceCount($map);
if(Request::param('page')){
return ['code'=>0,'msg'=>'','count'=>$InvoiceCount,'data'=>$data];
return ['code'=>0,'msg'=>'','count'=>100,'data'=>$data];
}
return $this->fetch();
......
......@@ -38,17 +38,18 @@ class EmInvoice extends Base
->join(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map)
->page($Nowpage, $limits)
->select();
// foreach ($data as &$item){
// if($item['payment_balance'] == '') $item['payment_balance'] = 0;
// $item['paid_amount'] = $item['payment_amount'] - $item['payment_balance'];
// if(is_int($item['settle_amount']) && $item['settle_balance']){
// if($item['settle_balance'] == '') $item['settle_balance'] = 0;
// $item['sett_amount'] = $item['settle_amount'] - $item['settle_balance'];
// } else {
// $item['sett_amount'] = '';
// }
// }
->select()
->toarray();
foreach ($data as &$item){
if($item['payment_balance'] == '') $item['payment_balance'] = 0;
$item['paid_amount'] = $item['payment_amount'] - $item['payment_balance'];
if(is_int($item['settle_amount']) && $item['settle_balance']){
if($item['settle_balance'] == '') $item['settle_balance'] = 0;
$item['sett_amount'] = $item['settle_amount'] - $item['settle_balance'];
} else {
$item['sett_amount'] = '';
}
}
return $data;
}
public function getInvoiceCount($map){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论