zuy преди 2 години
родител
ревизия
36a991a2e6

+ 1 - 1
admin-web/src/views/admin/dict/index.vue

@@ -213,7 +213,7 @@ onMounted(() => {
   nextTick(() => {
     let bodyHeight = document.body.clientHeight;
     let queryHeight = queryRef.value.$el.clientHeight;
-    state.tableData.height = bodyHeight - queryHeight - 220
+    state.tableData.height = bodyHeight - queryHeight - 320
   })
 });
 

+ 3 - 2
admin-web/src/views/admin/investor/dialog.vue

@@ -105,10 +105,10 @@
               v-model="state.ruleForm.bankName"
               placeholder="开户行名称"
               clearable
-              class="w100">
+              class="wd200">
           </el-input>
         </el-form-item>
-        <el-form-item label="电损承担比例 (0.30表示30%)" prop="elecLossProportion">
+        <el-form-item label="电损承担比例 (0.30表示30%)" prop="elecLossProportion">
           <el-input
               v-model="state.ruleForm.elecLossProportion"
               placeholder="电损承担比例 0.30表示30%"
@@ -149,6 +149,7 @@
               v-model="state.ruleForm.remark"
               placeholder="备注"
               clearable
+              :rows="3"
               type="textarea"
               class="w100">
           </el-input>

+ 1 - 1
admin-web/src/views/admin/investor/index.vue

@@ -204,7 +204,7 @@ onMounted(() => {
   nextTick(() => {
     let bodyHeight = document.body.clientHeight;
     let queryHeight = queryRef.value.$el.clientHeight;
-    state.tableData.height = bodyHeight - queryHeight - 220
+    state.tableData.height = bodyHeight - queryHeight - 320
   })
 
   mittBus.on("investorInfo.refresh", () => {

+ 3 - 2
admin-web/src/views/admin/station/stat/index.vue

@@ -234,6 +234,7 @@ const state = reactive({
     loading: false,
     columns: [
       {type: 'selection', width: 60, align: 'center', fixed: 'left'},
+      {label: '实际抄表电费金额(分)', prop: 'actualElecMoney', resizable: true,width:130},
       {label: '订单平均充电费用', prop: 'avgOrderMoney', resizable: true,width:130},
       {label: '充电人数', prop: 'chargeUsers', resizable: true,width:130},
       {label: '', prop: 'createTime', sortable: 'custom', resizable: true,width:150},
@@ -272,7 +273,7 @@ onMounted(() => {
   nextTick(() => {
     let bodyHeight = document.body.clientHeight;
     let queryHeight = queryRef.value.$el.clientHeight;
-    state.tableData.height = bodyHeight - queryHeight - 220
+    state.tableData.height = bodyHeight - queryHeight - 320
   })
 
   mittBus.on("stationStatMonth.refresh", () => {
@@ -292,7 +293,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
-  $body(`/stationStatMonth/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
+  $get(`/stat/listStatMonth`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
     let {list, total} = res;
     state.tableData.data = list;
     state.pageQuery.total = total;

+ 33 - 24
admin-web/src/views/admin/station/statment/dialog.vue

@@ -37,16 +37,16 @@
 
       <table border="0" cellspacing="0"  id="settle-table" class="w100">
         <tr style="background-color: lightsteelblue;font-weight: bold">
-        <td colspan="9" style="height: 34px;text-align: center;">深圳市快与慢充电桩服务有限公司—阳光科创中心对账单</td>
+        <td colspan="9" style="height: 34px;text-align: center;">深圳市快与慢充电桩服务有限公司—{{ state.ruleForm.stationName }}对账单</td>
         </tr>
         <tbody>
         <tr>
           <td>客户名称</td>
-          <td :colspan="8">客户名称</td>
+          <td :colspan="8">{{ state.ruleForm.adminUserName }}</td>
         </tr>
         <tr>
           <td>所属期间</td>
-          <td :colspan="8">2023年8月1日—2023年8月31日</td>
+          <td :colspan="8">{{ state.ruleForm.statMonth }}</td>
         </tr>
 
         <tr style="background-color: lightsteelblue;">
@@ -63,14 +63,14 @@
           <td>订单总金额</td>
         </tr>
         <tr style="text-align: center">
-          <td>阳光科创中心</td>
-          <td>10441.3</td>
-          <td>6874.05</td>
-          <td>10800</td>
-          <td>7182.57</td>
-          <td>308.52</td>
-          <td>8331.78</td>
-          <td>15205.83</td>
+          <td>{{ state.ruleForm.stationName }}</td>
+          <td>{{ state.ruleForm.actualElecMoney }}</td>
+          <td>{{ u.fmt.fmtMoney(state.ruleForm.totalMoney) }}</td>
+          <td>{{ state.ruleForm.actualPower }}</td>
+          <td>{{ u.fmt.fmtMoney(state.ruleForm.elecMoney) }}</td>
+          <td>{{ u.fmt.fmtMoney(state.ruleForm.elecLossMoney) }}</td>
+          <td>{{ u.fmt.fmtMoney(state.ruleForm.serviceMoney) }}</td>
+          <td>{{ u.fmt.fmtMoney(state.ruleForm.totalMoney) }}</td>
         </tr>
         <tr style="background-color: lightsteelblue">
           <td colspan="9">二、客户结算数据(含税)(电费和服务费以及金额单位为“元”)</td>
@@ -84,12 +84,12 @@
           <td colspan="2">分成金额=③*④</td>
         </tr>
         <tr style="text-align: center">
-          <td>阳光科创中心</td>
-          <td>8331.78</td>
-          <td>308.52</td>
-          <td colspan="2">8023.26</td>
-          <td>45%</td>
-          <td colspan="2">3610.47</td>
+          <td>{{ state.ruleForm.stationName }}</td>
+          <td>{{ u.fmt.fmtMoney(state.ruleForm.serviceMoney) }}</td>
+          <td>{{ u.fmt.fmtMoney(state.ruleForm.elecLossMoney) }}</td>
+          <td colspan="2">{{ u.fmt.fmtMoney(state.ruleForm.actualServiceMoney) }}</td>
+          <td>{{(state.ruleForm.splittingProportion*100).toFixed(2)}}%</td>
+          <td colspan="2">{{ u.fmt.fmtMoney(state.ruleForm.splittingAmount) }}</td>
         </tr>
         <tr style="background-color: lightsteelblue">
           <td colspan="9">三、客户结算数据(不含税)(税额和金额单位为“元”)</td>
@@ -101,10 +101,10 @@
           <td colspan="3">应付金额=①-②</td>
         </tr>
         <tr style="text-align: center">
-          <td colspan="2">3610.47</td>
-          <td colspan="2">6%</td>
-          <td colspan="2">228.89</td>
-          <td colspan="3">3381.58</td>
+          <td colspan="2">{{ u.fmt.fmtMoney(state.ruleForm.splittingAmount) }}</td>
+          <td colspan="2">{{(state.ruleForm.vatRate*100).toFixed(2)}}%</td>
+          <td colspan="2">{{ u.fmt.fmtMoney(state.ruleForm.vatAmount) }}</td>
+          <td colspan="2">{{ u.fmt.fmtMoney(state.ruleForm.actualSplittingAmount) }}</td>
         </tr>
         <tr style="background-color: lightsteelblue">
           <td colspan="9">备注:</td>
@@ -113,11 +113,11 @@
           <td colspan="9">
             分成金额=实际服务费收入*分成比例<br>
 
-            注意:乙方通过运营平台收取扣除相应费用以后的“实际收取的充电服务费收益”*甲方分成比例,甲方收益分成比例为45%。<br>
+            注意:乙方通过运营平台收取扣除相应费用以后的“实际收取的充电服务费收益”*甲方分成比例,甲方收益分成比例为{{(state.ruleForm.splittingProportion*100).toFixed(2)}}%。<br>
 
-            结算账户:邱翔          &nbsp;&nbsp;  联系电话:15519385554 <br>
+            结算账户:{{ state.ruleForm.adminUserName }}          &nbsp;&nbsp;  联系电话:{{ state.ruleForm.adminUserName }}   <br>
 
-            开户行:建设银行应城支行    &nbsp;&nbsp;     银行账号:6217002720009469623 <br>
+            开户行:{{ state.ruleForm.adminUserName }}      &nbsp;&nbsp;     银行账号:{{ state.ruleForm.adminUserName }}   <br>
           </td>
         </tr>
         </tbody>
@@ -135,6 +135,8 @@
 
 <script setup lang="ts" name="StationDialog">
 import {defineAsyncComponent, reactive, onMounted, ref} from 'vue';
+import {$body, $get} from "/@/utils/request";
+import u from "/@/utils/u";
 
 import html2canvas from 'html2canvas';
 import jsPDF from 'jspdf'
@@ -165,6 +167,7 @@ const state = reactive(initState());
 // 打开弹窗
 const open = (action: string = 'add', row: any) => {
   state.dialog.isShowDialog = true;
+  loadData(row.id);
 };
 // 关闭弹窗
 const onClose = () => {
@@ -176,6 +179,12 @@ const onCancel = () => {
   onClose();
 };
 
+const loadData = (id:number) => {
+  $get(`statements/preview/${id}`).then(res=>{
+    state.ruleForm = res;
+  })
+}
+
 
 const onSubmit = () => {
   htmlToPDF('settle-table')

+ 61 - 109
admin-web/src/views/admin/station/statment/index.vue

@@ -34,104 +34,35 @@
           ref="queryRef"
           size="default" label-width="0px" class="mt5 mb5">
         <el-input
-            v-model="state.formQuery.avgConnectorElec"
-            placeholder="单枪平均日充电量"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.avgOrderElec"
-            placeholder="订单平均充电量"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.avgOrderMoney"
-            placeholder="订单平均充电费用"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.chargeUsers"
-            placeholder="充电人数"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.discountAmount"
-            placeholder="总优惠金额"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.elecMoney"
-            placeholder="总电费"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.serviceMoney"
-            placeholder="总服务费"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.serviceMoneyDiscount"
-            placeholder="服务费优惠金额"
+            v-model="state.formQuery.adminUserName"
+            placeholder="客户姓名"
             clearable
             @blur="loadData(true)"
             class="wd150 mr10">
         </el-input>
+
         <el-input
             v-model="state.formQuery.statMonth"
-            placeholder="统计时间"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.stationId"
-            placeholder="站点id"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.totalMoney"
-            placeholder="总充电费用"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>
-        <el-input
-            v-model="state.formQuery.totalPower"
-            placeholder="总电量"
+            placeholder="统计时间(月)"
             clearable
             @blur="loadData(true)"
             class="wd150 mr10">
         </el-input>
         <el-input
-            v-model="state.formQuery.updateTime"
-            placeholder=""
+            v-model="state.formQuery.stationName"
+            placeholder="站点名称"
             clearable
             @blur="loadData(true)"
             class="wd150 mr10">
         </el-input>
-        <el-input
-            v-model="state.formQuery.validOrders"
-            placeholder="充电有效订单数"
+        <ext-d-select
+            type="Statement.status"
+            v-model="state.formQuery.status"
+            placeholder="状态"
             clearable
             @blur="loadData(true)"
             class="wd150 mr10">
-        </el-input>
-
+        </ext-d-select>
 
         <el-button class="ml10" plain size="default" type="success" @click="loadData(true)">
           <SvgIcon name="ele-Search"/>
@@ -153,7 +84,6 @@
         <template #empty>
           <el-empty></el-empty>
         </template>
-        <el-table-column type="selection" align="center" width="55" fixed="left"/>
         <el-table-column
             v-for="field in state.tableData.columns"
             :key="field.prop"
@@ -166,8 +96,21 @@
             :show-overflow-tooltip="!field.fixed&&field.width>150"
         >
           <template #default="{row}">
-            <template v-if="field.prop==='expand'">
-              <p style="padding-left: 2em;" v-html="row[field.prop]"></p>
+            <template v-if="field.prop==='action'">
+              <el-button v-auth="'statement.list'" size="small" plain type="primary" @click="onRowClick('view',row)">查看</el-button>
+            </template>
+            <template v-else-if="field.prop==='stationId'">
+              <div class="text-align-center">
+                {{ row.stationId }}
+                <hr>
+                {{ row.stationName }}
+              </div>
+            </template>
+            <template v-else-if="field.prop==='status'">
+              <ext-d-label type="Statement.status" v-model="row.status"/>
+            </template>
+            <template v-else-if="['actualElecMoney','actualServiceMoney','actualSplittingAmount','discountAmount','elecLossMoney','elecMoney','serviceMoney','serviceMoneyDiscount','splittingAmount','totalMoney','vatAmount'].includes(field.prop)">
+              {{ u.fmt.fmtMoney(row[field.prop]) }}
             </template>
             <template v-else>
               <div>{{ row[field.prop] }}</div>
@@ -180,24 +123,27 @@
       <ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
     </el-card>
   </div>
-  <StationStatementsMonthDialog ref="stationStatementsMonthDialogRef" @refresh="loadData(true)"/>
+  <StatementsDialog ref="statementsDialogRef" @refresh="loadData(true)"/>
 </template>
 
-<script setup lang="ts" name="StationStatementsMonthList">
+<script setup lang="ts" name="StatementsList">
 import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
 import {$body, $get} from "/@/utils/request";
 import {Msg} from "/@/utils/message";
+import u from "/@/utils/u";
 
 
 import ExtPage from '/@/components/form/ExtPage.vue'
 
 import mittBus from '/@/utils/mitt';
+import ExtDLabel from "/@/components/form/ExtDLabel.vue";
+import ExtDSelect from "/@/components/form/ExtDSelect.vue";
 
-const StationStatementsMonthDialog = defineAsyncComponent(() => import("/@/views/admin/station/statment/dialog.vue"));
+const StatementsDialog = defineAsyncComponent(() => import("/@/views/admin/station/statment/dialog.vue"));
 
 //定义引用
 const queryRef = ref();
-const stationStatementsMonthDialogRef = ref();
+const statementsDialogRef = ref();
 
 //定义变量
 const state = reactive({
@@ -212,21 +158,27 @@ const state = reactive({
     data: [] as Array<any>,
     loading: false,
     columns: [
-      {type: 'selection', width: 60, align: 'center', fixed: 'left'},
-      {label: '订单平均充电费用', prop: 'avgOrderMoney', resizable: true, width: 130},
-      {label: '充电人数', prop: 'chargeUsers', resizable: true, width: 130},
-      {label: '', prop: 'createTime', sortable: 'custom', resizable: true, width: 150},
-      {label: '总优惠金额', prop: 'discountAmount', resizable: true, width: 130},
-      {label: '总电费', prop: 'elecMoney', resizable: true, width: 130},
-      {label: '总服务费', prop: 'serviceMoney', resizable: true, width: 130},
-      {label: '服务费优惠金额', prop: 'serviceMoneyDiscount', resizable: true, width: 130},
-      {label: '统计时间', prop: 'statMonth', resizable: true},
-      {label: '站点id', prop: 'stationId', resizable: true},
-      {label: '总充电费用', prop: 'totalMoney', resizable: true, width: 130},
-      {label: '', prop: 'updateTime', sortable: 'custom', resizable: true, width: 150},
-      {label: '充电有效订单数', prop: 'validOrders', resizable: true, width: 130},
+      {label: '客户姓名', prop: 'adminUserName', resizable: true, fixed: 'left', width: 150},
+      {label: '站点', prop: 'stationId', resizable: true, width: 130},
+      {label: '统计时间(月)', prop: 'statMonth', resizable: true, width: 160},
+      {label: '状态', prop: 'status', sortable: 'custom', align: 'center', width: 130},
+      {label: '实际抄表电费金额', prop: 'actualElecMoney', resizable: true, width: 160},
+      {label: '实际参与分成的服务费', prop: 'actualServiceMoney', resizable: true, width: 180},
+      {label: '实际分成金额', prop: 'actualSplittingAmount', resizable: true, width: 160},
+
+      {label: '优惠金额', prop: 'discountAmount', resizable: true, width: 160},
+      {label: '电损电费金额', prop: 'elecLossMoney', resizable: true, width: 160},
+      {label: '订单电费金额', prop: 'elecMoney', resizable: true, width: 160},
+
+      {label: '服务费金额', prop: 'serviceMoney', resizable: true, width: 160},
+      {label: '服务费优惠金额', prop: 'serviceMoneyDiscount', resizable: true, width: 160},
+      {label: '分成金额', prop: 'splittingAmount', resizable: true, width: 160},
+
+      {label: '订单金额', prop: 'totalMoney', resizable: true, width: 160},
+      {label: '增值税额', prop: 'vatAmount', resizable: true, width: 160},
+      {label: '创建时间', prop: 'createTime', sortable: 'custom', resizable: true, width: 200, fixed: 'right'},
       {
-        label: '操作', prop: 'action', width: 180, align: 'center', fixed: 'right',
+        label: '操作', prop: 'action', width: 100, align: 'center', fixed: 'right',
       }
     ],
   },
@@ -251,16 +203,16 @@ onMounted(() => {
   nextTick(() => {
     let bodyHeight = document.body.clientHeight;
     let queryHeight = queryRef.value.$el.clientHeight;
-    state.tableData.height = bodyHeight - queryHeight - 220
+    state.tableData.height = bodyHeight - queryHeight - 320
   })
 
-  mittBus.on("stationStatementsMonth.refresh", () => {
+  mittBus.on("statements.refresh", () => {
     loadData();
   })
 });
 
 onBeforeUnmount(() => {
-  mittBus.off("stationStatementsMonth.refresh")
+  mittBus.off("statements.refresh")
 })
 
 
@@ -271,7 +223,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
-  $body(`/stationStatementsMonth/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
+  $get(`/statements/listStatements`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
     let {list, total} = res;
     state.tableData.data = list;
     state.pageQuery.total = total;
@@ -282,15 +234,15 @@ const loadData = (refresh: boolean = false) => {
   })
 };
 
-// 打开修改站点经营数据对账表-月弹窗
+// 打开修改客户对账单弹窗
 const onRowClick = (type: string, row: any) => {
-  stationStatementsMonthDialogRef.value.open(type, row);
+  statementsDialogRef.value.open(type, row);
 };
 
-// 删除站点经营数据对账表-月
+// 删除客户对账单
 const onRowDel = (row: any) => {
   Msg.confirm(`此操作将永久删除:『${row.name}』,是否继续?`).then(() => {
-    $get(`/stationStatementsMonth/delete/${row.id}`).then(() => {
+    $get(`/statements/delete/${row.id}`).then(() => {
       Msg.message("删除成功", 'success')
     }).catch(() => {
       Msg.message("删除失败", 'error')