Преглед изворни кода

财务管理:增加对公对账,对账详情功能模块

shipeng пре 5 дана
родитељ
комит
b151ad940c

+ 28 - 0
src/api/financeMr/reconciliation.js

@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/member/marketTeam/coreStatePageList',
+    method: 'get',
+    params: query
+  })
+}
+// 分页查询
+export const orderInfoList = (query) => {
+  return request({
+    url: '/member/marketTeam/coreStateOrder',
+    method: 'get',
+    params: query
+  })
+}
+
+//  导出
+export function downOrderListXls(params) {
+  return request({
+    url: '/member/marketTeam/coreStateOrderExport',
+    method: 'get',
+    responseType: 'blob',
+    params
+  });
+}

+ 189 - 0
src/views/finance/reconciliation/dialog/orderInfo.vue

@@ -0,0 +1,189 @@
+<!--
+ * @Description: 新增/编辑弹框
+-->
+<template>
+  <el-dialog
+    :title="subTitle"
+    v-if="isShow"
+    :visible.sync="isShow"
+    width="90%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <!-- 表格 -->
+      <el-button type="primary" style="margin-bottom: 10px;" @click="handleExport">导出</el-button>
+      <div class="app-container-table-info">
+        <el-table ref="tables" v-loading="isLoading" height="500px" :data="orderList" border>
+          <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
+          <el-table-column label="业务订单号" align="center" prop="orderId" width="170" />
+          <el-table-column label="演出日期" align="center" prop="performDate" />
+          <el-table-column label="演出时段" align="center" prop="performInterval" />
+          <el-table-column label="实收金额" align="center" prop="realPrice">
+            <template slot-scope="scope">
+              <span>¥{{ scope.row.realPrice }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="核销金额" align="center" prop="usedPrice">
+            <template slot-scope="scope">
+              <span>¥{{ scope.row.usedPrice }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="退款金额" align="center" prop="refundPrice	">
+            <template slot-scope="scope">
+              <span>¥{{ scope.row.refundPrice	 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="下单时间" align="center" prop="createTime" width="150" >
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="支付时间" align="center" prop="payTime" width="150" >
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.payTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="支付方式" align="center" prop="payWay">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.pay_way_type" :value="scope.row.payWay"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="是否其他团队代付" align="center" prop="ifRepay">
+            <template slot-scope="scope">
+              <el-tag type="danger" v-if="scope.row.ifRepay  == '0'">否</el-tag>
+              <el-tag type="success" v-else-if="scope.row.ifRepay  == '1'">是</el-tag>
+              <span v-else></span>
+            </template>
+          </el-table-column>
+          <el-table-column label="是否有子订单" align="center" prop="hasChildOrder">
+            <template slot-scope="scope">
+              <el-tag type="danger" v-if="scope.row.hasChildOrder  == '0'">否</el-tag>
+              <el-tag type="success" v-else-if="scope.row.hasChildOrder  == '1'">是</el-tag>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+        <div class="cal-info">
+          查询结果:订单笔数<span class="text-price">{{ statInfo.orderNum }}</span>笔,
+          实收金额总额:<span class="text-price">¥{{ statInfo.realTotalPrice }}</span>,
+          核销金额总额:<span class="text-price">¥{{ statInfo.usedTotalPrice }}</span>,
+          退款金额总额:<span class="text-price">¥{{ statInfo.refundTotalPrice }}</span>,
+        </div>
+
+      </div>
+      
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  orderInfoList, 
+  downOrderListXls
+} from '@/api/financeMr/reconciliation'
+import { exportExcel } from '@/utils/exportexcel'
+
+export default {
+  name: "OrderInfo",
+  dicts: ['order_status_type','pay_way_type'],
+  data() {
+    return {
+      model: "ORDER",
+      isShow: false,
+      loading: false,
+      isLoading: false,
+      subTitle: "订单详情",
+      orderList: [],
+      handleExportLoading: false,
+      statInfo: {},
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        teamId: '',
+      },
+      total:0,
+      
+    };
+  },
+  methods: {
+    // 打开弹框
+    openDialog(title, obj, type) {
+      this.isShow = true;
+      this.subTitle = title;
+      this.queryParams.teamId = obj.teamId
+      this.getList();
+    },
+    /** 获取子订单 */
+    getList() {
+      this.loading = true;
+      orderInfoList(this.queryParams).then(res => {
+        console.log(res,'res11');
+        this.orderList = res.data.pageList.rows;
+        this.total = res.data.pageList.total;
+        this.statInfo = res.data.statInfo;
+        this.isLoading = false;
+      }).catch(()=>{
+        this.orderList = [];
+        this.isLoading = false;
+      })
+    },
+    // 导出报表
+    handleExport() {
+      this.$confirm('您确定要导出当前查询的数据吗?', '提示', {
+        confirmButtonText: '确定 ',
+        cancelButtonText: '取消 ',
+        type: 'warning'
+      })
+        .then(() => {
+          this.handleExportLoading = true;
+          downOrderListXls({ teamId: this.queryParams.teamId })
+            .then((res) => {
+              exportExcel(res, '对公对账', '.xlsx');
+              this.handleExportLoading = false;
+            })
+            .catch((error) => {
+              // console.log("error===",error)
+              this.handleExportLoading = false;
+            });
+        })
+        .catch(() => {
+          this.$message.info('您已取消导出!');
+        });
+    },
+    
+    // 关闭弹框
+    cancel() {
+      this.isShow = false;
+    },
+    
+    
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 10px;
+  max-height: 85vh;
+  overflow-y: auto;
+  .cal-info {
+    font-size: 16px;
+    margin-top: 15px;
+    .text-price {
+      color: blue;
+    }
+
+  }
+  
+  
+}
+
+</style>

+ 211 - 0
src/views/finance/reconciliation/index.vue

@@ -0,0 +1,211 @@
+<template>
+  <div class="app-container withdrawalApp-table" :style="{'--q-height':qHeight}">
+    <div class="app-container-query" ref="queryFormBox">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+        <el-form-item label="团队名称" prop="teamName">
+          <el-input
+            v-model="queryParams.teamName"
+            placeholder="请输入团队名称"
+            clearable
+            style="width: 220px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker
+            style="width: 240px"
+            v-model="dateRange"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    
+    <div class="app-container-table-box">
+      <div class="app-container-table-info">
+        <el-table ref="tables" v-loading="loading" height="100%" :data="dataList" border>
+          <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+          <el-table-column label="团队名称" align="center" prop="teamName"  width="100" />
+          <el-table-column label="银企直连交易金额" align="center" prop="transAmt" />
+          <el-table-column label="订单笔数" align="center" prop="orderNum" width="120" />
+          <el-table-column label="下单人数" align="center" prop="touristNum" width="150" />
+          <el-table-column label="订单交易总额" align="center" prop="realTotalPrice" />
+          <el-table-column label="核销金额" align="center" prop="usedPrice" />
+          <el-table-column label="退款人数" align="center" prop="refundNum" />
+          <el-table-column label="退款金额" align="center" prop="refundPrice" />
+          <el-table-column label="储值额度" align="center" prop="regTotalAmount	" />
+          <el-table-column label="储值余额" align="center" prop="balance" />
+          <el-table-column label="授信额度" align="center" prop="grantQuota" />
+          <el-table-column label="授信余额" align="center" prop="grantSurplus" />
+          <el-table-column label="操作" align="center" width="100" fixed="right" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                @click="viewOrderInfo(scope.row)"
+              >订单详情</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+
+    <!--  修改凭证  -->
+    <!-- <imgAduit ref="imgAduit" @getList="getList" /> -->
+     <!-- 订单详情 -->
+    <orderInfo ref="orderInfo" @getList="getList" />
+
+
+  </div>
+</template>
+
+<script>
+
+import { 
+  pageList
+} from '@/api/financeMr/reconciliation'
+import orderInfo from "./dialog/orderInfo.vue";
+import moment from "moment"
+// import html2canvas from 'html2canvas'
+
+export default {
+  name: "Reconciliation",
+  dicts: ['distribution_type'],
+  components: { orderInfo },
+  data() {
+    return {
+      qHeight: '0px',
+      resizeObserver: null,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      dataList: null,
+      // 弹出层标题
+      title: "",
+
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        teamName: ""
+      },
+    };
+  },
+  created() {
+    this.setDateRange();
+    this.getList();
+  },
+  mounted() {
+    this.resizeObserver = new ResizeObserver(entries => {
+      for (let entry of entries) {
+        const { width, height } = entry.contentRect;
+        this.qHeight = height + 'px'
+      }
+    });
+    this.resizeObserver.observe(this.$refs.queryFormBox);
+  },
+  methods: {
+    // 日期处理
+    setDateRange() {
+      const today = moment();
+      const firstDayOfMonth = moment().startOf('month');
+      this.dateRange = [
+        firstDayOfMonth.format("YYYY-MM-DD"),
+        today.format("YYYY-MM-DD")
+      ];
+    },
+    /** 查询列表 */
+    getList() {
+      this.dataList = []
+      this.loading = true;
+       if(this.dateRange && this.dateRange.length > 0){
+         this.queryParams.startDate = this.dateRange[0];
+         this.queryParams.endDate = this.dateRange[1];
+       } else {
+         if(this.queryParams.startDate) {
+           delete this.queryParams.startDate
+           delete this.queryParams.endDate
+         }
+       }
+      pageList(this.queryParams)
+      .then(response => {
+          let list = response.data.rows
+          list.forEach(item =>{
+            item.switchValue = item.status;
+          })
+          this.dataList = list
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      ).catch(()=>{
+        this.dataList = []
+        this.loading = false;
+      })
+    },
+    // 订单详情
+    viewOrderInfo(row) {
+      this.$refs["orderInfo"].openDialog("订单详情", row);
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.$set(this.queryParams, 'teamName', '');
+
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    
+  },
+  beforeDestroy() {
+    this.resizeObserver.unobserve(this.$refs.queryFormBox);
+    this.resizeObserver.disconnect();
+  },
+};
+</script>
+<style lang="scss" scoped>
+.app-container {
+  height: calc( 100vh - 110px );
+  box-sizing: border-box;
+}
+.app-container-table-box {
+  height: calc( 100% - var(--q-height) );
+  .app-container-table-info {
+    height: calc( 100% - 100px );
+  }
+}
+</style>