Parcourir la source

台账新增汇总,菜单更改间距

chen il y a 3 ans
Parent
commit
47722962ed

+ 8 - 0
src/api/finance/standbook_list.js

@@ -24,3 +24,11 @@ export function getCustomerList(params) {
     params,
   });
 }
+// 台账列表统计
+export function getAmountCount(params) {
+  return request({
+    url: "/finance/standing/book/amountCount",
+    method: "get",
+    params,
+  });
+}

+ 62 - 58
src/layout/components/Navbar.vue

@@ -19,14 +19,14 @@
             @click="toEngine"
           ></i>
         </el-tooltip>
-<!--        工程机多帐号-->
-<!--        <el-tooltip effect="dark" content="家用工程机登录" placement="bottom">-->
-<!--          <i-->
-<!--            class="el-icon-s-platform"-->
-<!--            style="font-size: 24px; line-height: 50px"-->
-<!--            @click="openEngineAccount"-->
-<!--          ></i>-->
-<!--        </el-tooltip>-->
+        <!--        工程机多帐号-->
+        <!--        <el-tooltip effect="dark" content="家用工程机登录" placement="bottom">-->
+        <!--          <i-->
+        <!--            class="el-icon-s-platform"-->
+        <!--            style="font-size: 24px; line-height: 50px"-->
+        <!--            @click="openEngineAccount"-->
+        <!--          ></i>-->
+        <!--        </el-tooltip>-->
       </div>
 
       <el-badge
@@ -96,53 +96,53 @@
         <el-button type="primary" @click="submitForm">确 定</el-button>
       </div>
     </el-dialog>
-<!--    工程机多帐号-->
-<!--    <el-dialog-->
-<!--      title="绑定工程机系统"-->
-<!--      :visible.sync="dialogFormVisible"-->
-<!--      :modal="false"-->
-<!--      width="60%"-->
-<!--    >-->
-<!--      <el-form ref="engineForm" :model="engineForm">-->
-<!--        <el-row v-for="(row, index) in engineForm.engineList" :key="row.id" :gutter="20">-->
-<!--          <el-col :span="8">-->
-<!--            <el-form-item-->
-<!--              :label="'账号' + (index+1)"-->
-<!--              :label-width="formLabelWidth"-->
-<!--              :prop="'engineList.' + index + '.enginUserName'"-->
-<!--              :rules="{required: true, message: '请输入工程机账号', trigger: 'blur'}"-->
-<!--            >-->
-<!--              <el-input v-model="row.enginUserName" placeholder="请输入账号" autocomplete="off"></el-input>-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
-<!--          <el-col :span="8">-->
-<!--            <el-form-item-->
-<!--              :label="'密码' + (index+1)"-->
-<!--              :label-width="formLabelWidth"-->
-<!--              :prop="'engineList.' + index + '.enginPassword'"-->
-<!--              :rules="{required: true, message: '请输入工程机密码', trigger: 'blur'}"-->
-<!--            >-->
-<!--              <el-input v-model="row.enginPassword" placeholder="请输入密码" autocomplete="off" show-password></el-input>-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
-<!--          <el-col :span="8">-->
-<!--            <template v-if="row.adminUserId">-->
-<!--              <el-button @click="submitForm(index)">重验</el-button>-->
-<!--            </template>-->
-<!--            <template v-else>-->
-<!--              <el-button @click="submitForm(index)">验证</el-button>-->
-<!--            </template>-->
+    <!--    工程机多帐号-->
+    <!--    <el-dialog-->
+    <!--      title="绑定工程机系统"-->
+    <!--      :visible.sync="dialogFormVisible"-->
+    <!--      :modal="false"-->
+    <!--      width="60%"-->
+    <!--    >-->
+    <!--      <el-form ref="engineForm" :model="engineForm">-->
+    <!--        <el-row v-for="(row, index) in engineForm.engineList" :key="row.id" :gutter="20">-->
+    <!--          <el-col :span="8">-->
+    <!--            <el-form-item-->
+    <!--              :label="'账号' + (index+1)"-->
+    <!--              :label-width="formLabelWidth"-->
+    <!--              :prop="'engineList.' + index + '.enginUserName'"-->
+    <!--              :rules="{required: true, message: '请输入工程机账号', trigger: 'blur'}"-->
+    <!--            >-->
+    <!--              <el-input v-model="row.enginUserName" placeholder="请输入账号" autocomplete="off"></el-input>-->
+    <!--            </el-form-item>-->
+    <!--          </el-col>-->
+    <!--          <el-col :span="8">-->
+    <!--            <el-form-item-->
+    <!--              :label="'密码' + (index+1)"-->
+    <!--              :label-width="formLabelWidth"-->
+    <!--              :prop="'engineList.' + index + '.enginPassword'"-->
+    <!--              :rules="{required: true, message: '请输入工程机密码', trigger: 'blur'}"-->
+    <!--            >-->
+    <!--              <el-input v-model="row.enginPassword" placeholder="请输入密码" autocomplete="off" show-password></el-input>-->
+    <!--            </el-form-item>-->
+    <!--          </el-col>-->
+    <!--          <el-col :span="8">-->
+    <!--            <template v-if="row.adminUserId">-->
+    <!--              <el-button @click="submitForm(index)">重验</el-button>-->
+    <!--            </template>-->
+    <!--            <template v-else>-->
+    <!--              <el-button @click="submitForm(index)">验证</el-button>-->
+    <!--            </template>-->
 
-<!--            <el-button v-if="row.adminUserId" @click="toEngine(index)">打开</el-button>-->
-<!--            <el-button @click="delAccountForm(index)">删除</el-button>-->
-<!--          </el-col>-->
-<!--        </el-row>-->
-<!--      </el-form>-->
-<!--      <div slot="footer" class="dialog-footer">-->
-<!--        <el-button @click="addRowEngine">新增账号</el-button>-->
-<!--        <el-button @click="dialogFormVisible = false">取 消</el-button>-->
-<!--      </div>-->
-<!--    </el-dialog>-->
+    <!--            <el-button v-if="row.adminUserId" @click="toEngine(index)">打开</el-button>-->
+    <!--            <el-button @click="delAccountForm(index)">删除</el-button>-->
+    <!--          </el-col>-->
+    <!--        </el-row>-->
+    <!--      </el-form>-->
+    <!--      <div slot="footer" class="dialog-footer">-->
+    <!--        <el-button @click="addRowEngine">新增账号</el-button>-->
+    <!--        <el-button @click="dialogFormVisible = false">取 消</el-button>-->
+    <!--      </div>-->
+    <!--    </el-dialog>-->
   </div>
 </template>
 
@@ -154,7 +154,11 @@ import Hamburger from "@/components/Hamburger";
 import Screenfull from "@/components/Screenfull";
 import NavMenu from "@/components/NavMenu";
 import { getNoticeListCount } from "@/api/notice";
-import {checkEngineAccount, bindEngineAccount, delEngineAccount} from "@/api/setting";
+import {
+  checkEngineAccount,
+  bindEngineAccount,
+  delEngineAccount,
+} from "@/api/setting";
 import request from "@/utils/request";
 
 export default {
@@ -178,7 +182,7 @@ export default {
         ],
       },
       formLabelWidth: "100px",
-      dialogFormVisible: false
+      dialogFormVisible: false,
     };
   },
   mounted() {
@@ -188,7 +192,7 @@ export default {
     that.tcMessage();
     this.intivalId = setInterval(function () {
       that.tcMessage();
-    }, 3000);
+    }, 5000);
     // this.timer = setInterval(function () {
     //   that.initNotice();
     // }, 3000);
@@ -252,7 +256,7 @@ export default {
       this.$router.push("/notice/index");
     },
     openEngineAccount() {
-      this.engineForm.engineList = this.userInfo.bindEnginList
+      this.engineForm.engineList = this.userInfo.bindEnginList;
       this.dialogFormVisible = true;
     },
     toEngine() {

+ 11 - 1
src/styles/sidebar.scss

@@ -68,8 +68,18 @@
       border: none;
       height: 100%;
       width: 100% !important;
+      // >div {
+      //   height: 40px;
+      // }
+    }
+    .el-menu-item {
+      height: 40px;
+      line-height: 40px;
+    }
+    .el-submenu__title {
+      height: 40px;
+      line-height: 40px;
     }
-
     // menu hover
     .submenu-title-noDropdown,
     .el-submenu__title {

+ 13 - 3
src/views/finance/receivable_list.vue

@@ -133,6 +133,8 @@
             highlight-current-row
             stripe
             @selection-change="selectionChangeFn"
+            show-summary
+            :summary-method="$getSummaries"
           >
             <el-table-column align="center" type="selection" width="100">
             </el-table-column>
@@ -190,12 +192,16 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
-              align="center"
+              align="right"
               label="总金额"
               prop="totalAmount"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.totalAmount | numToFixed }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="单据状态"
@@ -402,8 +408,12 @@ export default {
     },
     //获取来列表数据
     async getDataList(data) {
-      const res = await getFinanceOtherReceList(data);
+      let res = await getFinanceOtherReceList(data);
       console.log(res);
+      res.data.records.forEach((item) => {
+        item.sums2 = ["totalAmount"];
+        item.sums1 = ["totalAmount"];
+      });
       this.dataList = res.data.records;
       this.listTotal = res.data.total;
     },

+ 95 - 0
src/views/finance/standbook_list.vue

@@ -118,6 +118,26 @@
       </div>
     </div>
     <div v-show="bill == 'COMMONLY'">
+      <ul class="ulStyle">
+        <li>
+          预付货款:<span>{{ amountList.preCount }}</span>
+        </li>
+        <li>
+          订单占款:<span>{{ amountList.orderCOunt }}</span>
+        </li>
+        <li>
+          支付货款:<span>{{ amountList.payCount }}</span>
+        </li>
+        <li>
+          押金:<span>{{ amountList.orderDate }}</span>
+        </li>
+        <li>
+          工程保证金:<span>{{ amountList.projectCount }}</span>
+        </li>
+        <li>
+          其他暂扣款:<span>{{ amountList.otherCount }}</span>
+        </li>
+      </ul>
       <!-- 列表 -->
       <div class="mymain-container">
         <div class="table">
@@ -311,6 +331,14 @@
       </div>
     </div>
     <div v-show="bill == 'REBATE'">
+      <ul class="ulStyle">
+        <li>
+          返利支出:<span>{{ amountList.outCount }}</span>
+        </li>
+        <li>
+          返利收入:<span>{{ amountList.inCount }}</span>
+        </li>
+      </ul>
       <!-- 列表 -->
       <div class="mymain-container">
         <div class="table">
@@ -482,11 +510,13 @@ import {
   getStandbookList,
   getDictList,
   getCustomerList,
+  getAmountCount,
 } from "@/api/finance/standbook_list";
 
 export default {
   data() {
     return {
+      amountList: {},
       customerList: [],
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
@@ -578,6 +608,11 @@ export default {
           customerName: vm.$route.query.customerName,
           customerNumber: vm.$route.query.customerNumber,
         });
+        vm.getAmountList({
+          type: vm.bill,
+          customerName: vm.$route.query.customerName,
+          customerNumber: vm.$route.query.customerNumber,
+        });
       } else if (vm.isCustomer) {
         vm.isDisabled = true;
         vm.searchForm.customerId = vm.$store.state.user.customerId;
@@ -588,6 +623,10 @@ export default {
           type: vm.bill,
           ...vm.isCustomerList,
         });
+        vm.getAmountList({
+          type: vm.bill,
+          ...vm.isCustomerList,
+        });
       } else {
         vm.searchForm.customerId = "";
         vm.isDisabled = false;
@@ -597,6 +636,9 @@ export default {
           type: vm.bill,
         });
         vm.getCustomerDataList();
+        vm.getAmountList({
+          type: vm.bill,
+        });
       }
     });
   },
@@ -673,6 +715,13 @@ export default {
 
     //   // return sums;
     // },
+
+    //获取汇总总数
+    async getAmountList(data) {
+      let res = await getAmountCount(data);
+
+      this.amountList = res.data;
+    },
     //改变经销商
     async changeFn(v) {
       this.searchForm.customerWalletId = "";
@@ -813,6 +862,12 @@ export default {
           customerName: this.$route.query.customerName,
           customerNumber: this.$route.query.customerNumber,
         });
+        this.getAmountList({
+          ...this.searchForm,
+          type: this.bill,
+          customerName: this.$route.query.customerName,
+          customerNumber: this.$route.query.customerNumber,
+        });
       } else if (this.isCustomer) {
         this.getDataList({
           ...this.searchForm,
@@ -821,6 +876,11 @@ export default {
           type: this.bill,
           ...this.isCustomerList,
         });
+        this.getAmountList({
+          ...this.searchForm,
+          type: this.bill,
+          ...this.isCustomerList,
+        });
       } else {
         this.getDataList({
           ...this.searchForm,
@@ -831,6 +891,12 @@ export default {
           pageNum: this.currentPage,
           type: this.bill,
         });
+        this.getAmountList({
+          ...this.searchForm,
+          type: this.bill,
+          customerName: this.customerName,
+          customerNumber: this.customerNumber,
+        });
       }
     },
 
@@ -864,6 +930,13 @@ export default {
           customerName: this.$route.query.customerName,
           customerNumber: this.$route.query.customerNumber,
         });
+        this.getAmountList({
+          ...this.searchForm,
+          type: v,
+          customerId: this.$route.query.customerId,
+          customerName: this.$route.query.customerName,
+          customerNumber: this.$route.query.customerNumber,
+        });
       } else if (this.isCustomer) {
         this.changeFn(this.$store.state.user.customerId);
         this.getDataList({
@@ -873,6 +946,11 @@ export default {
           type: v,
           ...this.isCustomerList,
         });
+        this.getAmountList({
+          ...this.searchForm,
+          type: v,
+          ...this.isCustomerList,
+        });
       } else {
         this.getDataList({
           // ...this.searchForm,
@@ -883,6 +961,9 @@ export default {
           pageNum: this.currentPage,
           type: v,
         });
+        this.getAmountList({
+          type: v,
+        });
       }
       // this.getWalletList();
     },
@@ -903,6 +984,20 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.ulStyle {
+  list-style: none;
+  padding: 0;
+  li {
+    display: inline-block;
+    font-weight: 700;
+    span {
+      padding-left: 6px;
+      font-weight: 400;
+    }
+    // float: right;
+    margin-right: 20px;
+  }
+}
 .moneyStyle {
   height: 130px;
   border-radius: 20px;