提交 b7221ed4 authored 作者: chengye's avatar chengye

修复账单列表无法显示与账单详情显示错误

上级 0e2dea9d
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f51c1393-9404-4c81-be85-d91ed40531b3" name="默认更改列表" comment=""> <list default="true" id="f51c1393-9404-4c81-be85-d91ed40531b3" name="默认更改列表" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/application/em/model/EmInvoice.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/em/model/EmInvoice.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> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
...@@ -16,10 +17,10 @@ ...@@ -16,10 +17,10 @@
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.gitignore"> <entry file="file://$PROJECT_DIR$/application/em/controller/Invoice.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="403"> <state relative-caret-position="1426">
<caret line="13" column="6" selection-start-line="13" selection-start-column="6" selection-end-line="13" selection-end-column="6" /> <caret line="61" column="40" selection-start-line="61" selection-start-column="40" selection-end-line="61" selection-end-column="40" />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -27,65 +28,17 @@ ...@@ -27,65 +28,17 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/em/model/EmInvoice.php"> <entry file="file://$PROJECT_DIR$/application/em/model/EmInvoice.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="279"> <state relative-caret-position="-46">
<caret line="44" selection-start-line="44" selection-end-line="44" /> <caret line="42" column="36" selection-start-line="42" selection-start-column="36" selection-end-line="42" selection-end-column="36" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/thinkphp/library/think/db/Query.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="495">
<caret line="655" column="45" selection-start-line="655" selection-start-column="40" selection-end-line="655" selection-end-column="45" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/em/view/invoice/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="208">
<caret line="42" column="92" selection-start-line="42" selection-start-column="84" selection-end-line="42" selection-end-column="92" />
<folding>
<element signature="n#style#0;n#input#0;n#div#1;n#form#0;n#div#0;n#div#0;n#div#0;n#div#0;n#div#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/route/admin.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="291">
<caret line="149" column="32" selection-start-line="149" selection-start-column="25" selection-end-line="149" selection-end-column="32" />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/em/controller/Invoice.php"> <entry file="file://$PROJECT_DIR$/application/em/controller/Payment.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="495"> <state relative-caret-position="5673">
<caret line="80" lean-forward="true" selection-start-line="80" selection-end-line="80" /> <caret line="199" selection-start-line="199" selection-end-line="199" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/admin/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="341">
<caret line="12" column="61" selection-start-line="12" selection-start-column="61" selection-end-line="12" selection-end-column="61" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/em/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8587">
<caret line="277" column="29" selection-start-line="277" selection-start-column="29" selection-end-line="277" selection-end-column="29" />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -99,6 +52,7 @@ ...@@ -99,6 +52,7 @@
<find>/invoice</find> <find>/invoice</find>
<find>getInvoiceList</find> <find>getInvoiceList</find>
<find>getInvoiceCount</find> <find>getInvoiceCount</find>
<find>status</find>
</findStrings> </findStrings>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
...@@ -160,22 +114,7 @@ ...@@ -160,22 +114,7 @@
<item name="E:\master\Jz-Php" type="442cc68d:ScopeViewTreeModel$RootNode" /> <item name="E:\master\Jz-Php" type="442cc68d:ScopeViewTreeModel$RootNode" />
<item name="application" type="9f88c78c:ScopeViewTreeModel$FileNode" /> <item name="application" type="9f88c78c:ScopeViewTreeModel$FileNode" />
<item name="em" type="9f88c78c:ScopeViewTreeModel$FileNode" /> <item name="em" type="9f88c78c:ScopeViewTreeModel$FileNode" />
<item name="controller" type="9f88c78c:ScopeViewTreeModel$FileNode" /> <item name="model" type="9f88c78c:ScopeViewTreeModel$FileNode" />
</path>
<path>
<item name="Jz-Php" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
<item name="E:\master\Jz-Php" type="442cc68d:ScopeViewTreeModel$RootNode" />
<item name="application" type="9f88c78c:ScopeViewTreeModel$FileNode" />
<item name="em" type="9f88c78c:ScopeViewTreeModel$FileNode" />
<item name="view" type="9f88c78c:ScopeViewTreeModel$FileNode" />
</path>
<path>
<item name="Jz-Php" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
<item name="E:\master\Jz-Php" type="442cc68d:ScopeViewTreeModel$RootNode" />
<item name="application" type="9f88c78c:ScopeViewTreeModel$FileNode" />
<item name="em" type="9f88c78c:ScopeViewTreeModel$FileNode" />
<item name="view" type="9f88c78c:ScopeViewTreeModel$FileNode" />
<item name="invoice" type="9f88c78c:ScopeViewTreeModel$FileNode" />
</path> </path>
<path> <path>
<item name="Jz-Php" type="3d21c010:ScopeViewTreeModel$ProjectNode" /> <item name="Jz-Php" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
...@@ -191,7 +130,7 @@ ...@@ -191,7 +130,7 @@
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="E:/Jz-Php" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
</component> </component>
...@@ -221,18 +160,20 @@ ...@@ -221,18 +160,20 @@
<workItem from="1578817951649" duration="618000" /> <workItem from="1578817951649" duration="618000" />
<workItem from="1578900535997" duration="5097000" /> <workItem from="1578900535997" duration="5097000" />
<workItem from="1578907167448" duration="144000" /> <workItem from="1578907167448" duration="144000" />
<workItem from="1578972376079" duration="7184000" /> <workItem from="1578972376079" duration="9405000" />
<workItem from="1579059424177" duration="1050000" />
<workItem from="1579079847870" duration="51000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="13131000" /> <option name="totallyTimeSpent" value="16453000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="1358" y="-125" width="1936" height="1056" extended-state="6" /> <frame x="1358" y="-125" width="1936" height="1056" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.1512247" /> <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.1544196" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" /> <window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
...@@ -245,7 +186,7 @@ ...@@ -245,7 +186,7 @@
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Database Changes" order="8" /> <window_info anchor="bottom" id="Database Changes" order="8" />
<window_info anchor="bottom" id="Version Control" order="9" /> <window_info anchor="bottom" id="Version Control" order="9" />
<window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.32934782" /> <window_info anchor="bottom" id="Terminal" order="10" visible="true" weight="0.2771739" />
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" /> <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
...@@ -492,15 +433,22 @@ ...@@ -492,15 +433,22 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/application/em/controller/Invoice.php"> <entry file="file://$PROJECT_DIR$/application/em/controller/Invoice.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="495"> <state relative-caret-position="1426">
<caret line="80" lean-forward="true" selection-start-line="80" selection-end-line="80" /> <caret line="61" column="40" selection-start-line="61" selection-start-column="40" selection-end-line="61" selection-end-column="40" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/em/controller/Payment.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="5673">
<caret line="199" selection-start-line="199" selection-end-line="199" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/application/em/model/EmInvoice.php"> <entry file="file://$PROJECT_DIR$/application/em/model/EmInvoice.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="279"> <state relative-caret-position="-46">
<caret line="44" selection-start-line="44" selection-end-line="44" /> <caret line="42" column="36" selection-start-line="42" selection-start-column="36" selection-end-line="42" selection-end-column="36" />
</state> </state>
</provider> </provider>
</entry> </entry>
......
...@@ -32,12 +32,10 @@ class EmInvoice extends Base ...@@ -32,12 +32,10 @@ class EmInvoice extends Base
public function getInvoiceList($map,$Nowpage,$limits){ public function getInvoiceList($map,$Nowpage,$limits){
$data = self::alias('inv') $data = self::alias('inv')
->field('inv.*') ->field('inv.*')
->field('station.station_name') ->field('station.station_name,em.em_numb')
->field('em.em_numb') ->join(['em_account'=>'ea'],'ea.account_id = inv.account_id')
->leftJoin(['em_invoice_useage'=>'eiu'],'eiu.invoice_id=inv.invoice_id') ->join(['em'],'em.id=ea.em_id')
->leftJoin(['em_useage'=>'eu'],'eu.useage_id = eiu.useage_id') ->join(['station_info'=>'station'],'station.station_id=em.station_id')
->leftJoin(['em'],'em.id=eu.em_id')
->leftJoin(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map) ->where($map)
->page($Nowpage, $limits) ->page($Nowpage, $limits)
->select() ->select()
...@@ -57,12 +55,9 @@ class EmInvoice extends Base ...@@ -57,12 +55,9 @@ class EmInvoice extends Base
public function getInvoiceCount($map){ public function getInvoiceCount($map){
$data = self::alias('inv') $data = self::alias('inv')
->field('inv.*') ->field('inv.*')
->field('station.station_name') ->join(['em_account'=>'ea'],'ea.account_id = inv.account_id')
->field('em.em_numb') ->join(['em'],'em.id=ea.em_id')
->leftJoin(['em_invoice_useage'=>'eiu'],'eiu.invoice_id=inv.invoice_id') ->join(['station_info'=>'station'],'station.station_id=em.station_id')
->leftJoin(['em_useage'=>'eu'],'eu.useage_id = eiu.useage_id')
->leftJoin(['em'],'em.id=eu.em_id')
->leftJoin(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map) ->where($map)
->count(); ->count();
return $data; return $data;
...@@ -73,10 +68,9 @@ class EmInvoice extends Base ...@@ -73,10 +68,9 @@ class EmInvoice extends Base
->field('inv.*') ->field('inv.*')
->field('station.station_name') ->field('station.station_name')
->field('em.em_numb') ->field('em.em_numb')
->leftJoin(['em_invoice_useage'=>'eiu'],'eiu.invoice_id=inv.invoice_id') ->join(['em_account'=>'ea'],'ea.account_id = inv.account_id')
->leftJoin(['em_useage'=>'eu'],'eu.useage_id = eiu.useage_id') ->join(['em'],'em.id=ea.em_id')
->leftJoin(['em'],'em.id=eu.em_id') ->join(['station_info'=>'station'],'station.station_id=em.station_id')
->leftJoin(['station_info'=>'station'],'station.station_id=em.station_id')
->where(['inv.invoice_id'=>$ids]) ->where(['inv.invoice_id'=>$ids])
// ->where('inv.payment_balance','neq',0) // ->where('inv.payment_balance','neq',0)
->select(); ->select();
...@@ -94,7 +88,14 @@ class EmInvoice extends Base ...@@ -94,7 +88,14 @@ class EmInvoice extends Base
$eiu = EmInvoiceUseage::where(['invoice_id'=>$inv->invoice_id])->find(); $eiu = EmInvoiceUseage::where(['invoice_id'=>$inv->invoice_id])->find();
//查询抄表信息 //查询抄表信息
$useage = Useage::with('photo')->get(['useage_id'=>$eiu->useage_id]); $useage = Useage::get(['useage_id'=>$eiu->useage_id]);
if($useage->photo_id) {
$receipt = Receipt::get(['id'=>$useage->photo_id]);
if($receipt) $useage['photo'] = $receipt;
} else {
$useage['photo'] = [];
}
//获取电表信息 //获取电表信息
$em = Em::with('rule')->field('id,station_id,em_numb,em_type_id,rate')->where(['id'=>$useage->em_id])->find(); $em = Em::with('rule')->field('id,station_id,em_numb,em_type_id,rate')->where(['id'=>$useage->em_id])->find();
...@@ -143,7 +144,7 @@ class EmInvoice extends Base ...@@ -143,7 +144,7 @@ class EmInvoice extends Base
$totle['current_numb'] = 0; $totle['current_numb'] = 0;
$totle['repo_numb'] = 0; $totle['repo_numb'] = 0;
$totle['amount'] = $totle['settle_amount'] = 0; $totle['amount'] = $totle['settle_amount'] = 0;
$totle['settle_price'] = $inv->em->emr->settle_price * $inv->em->rate; $totle['settle_price'] = ($inv->em->emr->settle_price?:0) * $inv->em->rate;
$totle['settle_status'] = parseStatus($inv->status,2); $totle['settle_status'] = parseStatus($inv->status,2);
//峰谷表与普通抄表 //峰谷表与普通抄表
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论