|
@@ -1,124 +1,162 @@
|
|
|
<template>
|
|
|
<div class="m-container">
|
|
|
<h2>
|
|
|
- <div class="squrt"></div>订单管理
|
|
|
+ <div class="squrt"></div>
|
|
|
+ 订单管理
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
- <div class="newBand"
|
|
|
- @click="onOrderExport"
|
|
|
- v-permission="{child: 'export/orderList', parent: '/income'}">报表导出</div>
|
|
|
+ <div
|
|
|
+ class="newBand"
|
|
|
+ @click="onOrderExport"
|
|
|
+ v-permission="{ child: 'export/orderList', parent: '/income' }"
|
|
|
+ >
|
|
|
+ 报表导出
|
|
|
+ </div>
|
|
|
<!-- 搜索类型 -->
|
|
|
- <el-form :inline="true"
|
|
|
- class="searchForm"
|
|
|
- v-model.trim="searchForm">
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ class="searchForm"
|
|
|
+ v-model.trim="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ >
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="学生编号/姓名/手机号"
|
|
|
- type="text"
|
|
|
- v-model.trim="searchForm.search"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="学生编号/姓名/手机号"
|
|
|
+ type="text"
|
|
|
+ clearable
|
|
|
+ v-model.trim="searchForm.search"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="交易流水号"
|
|
|
- type="text"
|
|
|
- v-model.trim="searchForm.transNo"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="交易流水号"
|
|
|
+ type="text"
|
|
|
+ v-model.trim="searchForm.transNo"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="订单号"
|
|
|
- type="text"
|
|
|
- v-model.trim="searchForm.orderNo"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="订单号"
|
|
|
+ type="text"
|
|
|
+ v-model.trim="searchForm.orderNo"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="收款账户"
|
|
|
- type="text"
|
|
|
- v-model.trim="searchForm.merNos"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="收款账户"
|
|
|
+ type="text"
|
|
|
+ v-model.trim="searchForm.merNos"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="余额支付大于等于"
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="searchForm.balancePaymentAmount"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="余额支付大于等于"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="searchForm.balancePaymentAmount"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="现金支付大于等于"
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="searchForm.actualAmount"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="现金支付大于等于"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="searchForm.actualAmount"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="余额支付小于等于"
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="searchForm.lessBalancePaymentAmount"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="余额支付小于等于"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="searchForm.lessBalancePaymentAmount"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input placeholder="现金支付小于等于"
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="searchForm.lessActualAmount"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="现金支付小于等于"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="searchForm.lessActualAmount"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="organId">
|
|
|
- <el-select class="multiple"
|
|
|
- v-model.trim="searchForm.organId"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- @clear="onClear('organId')"
|
|
|
- placeholder="请选择分部">
|
|
|
- <el-option v-for="(item,index) in organList"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"></el-option>
|
|
|
+ <el-select
|
|
|
+ class="multiple"
|
|
|
+ v-model.trim="searchForm.organId"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @clear="onClear('organId')"
|
|
|
+ placeholder="请选择分部"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in organList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-date-picker v-model.trim="orderDate"
|
|
|
- style="width:410px;"
|
|
|
- type="daterange"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- @change="searchOrderDate"
|
|
|
- range-separator="至"
|
|
|
- :picker-options="{
|
|
|
- firstDayOfWeek: 1
|
|
|
- }"
|
|
|
- start-placeholder="订单开始日期"
|
|
|
- end-placeholder="订单结束日期"></el-date-picker>
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="orderDate"
|
|
|
+ style="width: 410px"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ @change="searchOrderDate"
|
|
|
+ range-separator="至"
|
|
|
+ :picker-options="{
|
|
|
+ firstDayOfWeek: 1,
|
|
|
+ }"
|
|
|
+ start-placeholder="订单开始日期"
|
|
|
+ end-placeholder="订单结束日期"
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select v-model.trim="searchForm.paymentType"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- @clear="onClear('paymentType')"
|
|
|
- placeholder="交易类型">
|
|
|
- <el-option v-for="(item, index) in orderStatus"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.paymentType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('paymentType')"
|
|
|
+ placeholder="交易类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in orderStatus"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select v-model.trim="searchForm.paymentStatus"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- @clear="onClear('paymentStatus')"
|
|
|
- placeholder="交易状态">
|
|
|
- <el-option v-for="(item, index) in dealStatus"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.paymentStatus"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('paymentStatus')"
|
|
|
+ placeholder="交易状态"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in dealStatus"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="search"
|
|
|
- type="danger">搜索</el-button>
|
|
|
- <el-button @click="onReSet"
|
|
|
- type="primary">重置</el-button>
|
|
|
+ <el-button native-type="submit" type="danger">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="primary">重置</el-button>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
+ </save-form>
|
|
|
<!-- 列表 -->
|
|
|
<!-- totalUserBalance: 20452784.02
|
|
|
totalExpectAmount: 0
|
|
|
totalActualAmount: 0
|
|
|
totalAdvanceAmount: 0
|
|
|
totalRevenueAmount: 0 -->
|
|
|
- <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
|
|
|
+ <div style="font-size: 14px; color: #f85043; padding-bottom: 10px">
|
|
|
<!-- 应收总金额:{{ totalExpectAmount }}元
|
|
|
现金实收总额:{{ totalActualAmount }}元
|
|
|
余额实收总额:{{ Number((totalExpectAmount - totalActualAmount).toFixed(2)) }}元 -->
|
|
@@ -126,120 +164,161 @@
|
|
|
实收金额=应收总额(包含余额支付)
|
|
|
预收金额=充值总额(发生消费,记负数)
|
|
|
预收余额=充值总余额 -->
|
|
|
- 营收金额:{{ totalRevenueAmount | moneyFormat }}元<i style="width: 10px; display: inline-block"></i>
|
|
|
- 实收金额:{{ totalActualAmount | moneyFormat}}元<i style="width: 10px; display: inline-block"></i>
|
|
|
- 预收金额:{{ totalAdvanceAmount | moneyFormat }}元<i style="width: 10px; display: inline-block"></i>
|
|
|
- 预收余额:{{ totalUserBalance |moneyFormat}}元
|
|
|
+ 营收金额:{{ totalRevenueAmount | moneyFormat }}元<i
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
+ ></i>
|
|
|
+ 实收金额:{{ totalActualAmount | moneyFormat }}元<i
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
+ ></i>
|
|
|
+ 预收金额:{{ totalAdvanceAmount | moneyFormat }}元<i
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
+ ></i>
|
|
|
+ 预收余额:{{ totalUserBalance | moneyFormat }}元
|
|
|
</div>
|
|
|
<div class="tableWrap">
|
|
|
- <el-table :data="tableList"
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column align="center"
|
|
|
- width="180px"
|
|
|
- prop="transNo"
|
|
|
- label="交易流水号"></el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- width="210px"
|
|
|
- prop="orderNo"
|
|
|
- label="订单号"></el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- width="150"
|
|
|
- prop="createTime"
|
|
|
- label="订单日期">
|
|
|
- <template slot-scope="scope">{{ scope.row.createTime | dateForMinFormat }}</template>
|
|
|
+ <el-table
|
|
|
+ :data="tableList"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ width="180px"
|
|
|
+ prop="transNo"
|
|
|
+ label="交易流水号"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <copy-text>{{ scope.row.transNo }}</copy-text>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ width="210px"
|
|
|
+ prop="orderNo"
|
|
|
+ label="订单号"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <copy-text>{{ scope.row.orderNo }}</copy-text>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ width="150"
|
|
|
+ prop="createTime"
|
|
|
+ label="订单日期"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.createTime | dateForMinFormat
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- width="100px"
|
|
|
- label="交易类型">
|
|
|
- <template slot-scope="scope">{{ scope.row.type | orderType }}</template>
|
|
|
+ <el-table-column align="center" width="100px" label="交易类型">
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.type | orderType
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="expectAmount"
|
|
|
- label="应付金额">
|
|
|
+ <el-table-column align="center" prop="expectAmount" label="应付金额">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.expectAmount | moneyFormat}}
|
|
|
+ {{ scope.row.expectAmount | moneyFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="balancePaymentAmount"
|
|
|
- label="余额支付">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="balancePaymentAmount"
|
|
|
+ label="余额支付"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.balancePaymentAmount | moneyFormat}}
|
|
|
+ {{ scope.row.balancePaymentAmount | moneyFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="actualAmount"
|
|
|
- label="现金支付">
|
|
|
+ <el-table-column align="center" prop="actualAmount" label="现金支付">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.actualAmount | moneyFormat}}
|
|
|
+ {{ scope.row.actualAmount | moneyFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- label="学员姓名">
|
|
|
+ <el-table-column align="center" label="学员姓名">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.user.username }}
|
|
|
- <span v-if="scope.row.user.username && scope.row.user.phone">/</span>
|
|
|
- {{ scope.row.user.phone }}
|
|
|
+ <copy-text> {{ scope.row.user.username }}</copy-text>
|
|
|
+ <span v-if="scope.row.user.username && scope.row.user.phone"
|
|
|
+ >/</span
|
|
|
+ >
|
|
|
+ <copy-text>
|
|
|
+ {{ scope.row.user.phone }}
|
|
|
+ </copy-text>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="paymentChannel"
|
|
|
- label="交易方式">
|
|
|
- <template slot-scope="scope">{{ scope.row.paymentChannel | paymentChannelStatus }}</template>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="paymentChannel"
|
|
|
+ label="交易方式"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.paymentChannel | paymentChannelStatus
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column align="center"
|
|
|
label="收款账户">
|
|
|
<template slot-scope="scope">{{ scope.row.merNos }}</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column align="center"
|
|
|
- label="交易状态">
|
|
|
- <template slot-scope="scope">{{ scope.row.status | dealStatus }}</template>
|
|
|
+ <el-table-column align="center" label="交易状态">
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.status | dealStatus
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- label="备注">
|
|
|
- <template slot-scope="scope">{{ scope.row.memo ? scope.row.memo : '-' }}</template>
|
|
|
+ <el-table-column align="center" label="备注">
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.memo ? scope.row.memo : "-"
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- width="150px"
|
|
|
- label="操作">
|
|
|
+ <el-table-column align="center" width="150px" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="scope.row.status != 'SUCCESS' && scope.row.actualAmount > 0"
|
|
|
- v-permission="'order/getOrderStatus'"
|
|
|
- @click="onGetOrderStatus(scope.row)"
|
|
|
- type="text">查询订单状态</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ scope.row.status != 'SUCCESS' && scope.row.actualAmount > 0
|
|
|
+ "
|
|
|
+ v-permission="'order/getOrderStatus'"
|
|
|
+ @click="onGetOrderStatus(scope.row)"
|
|
|
+ type="text"
|
|
|
+ >查询订单状态</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination :total="pageInfo.total"
|
|
|
- :page.sync="pageInfo.page"
|
|
|
- :limit.sync="pageInfo.limit"
|
|
|
- :page-sizes="pageInfo.page_size"
|
|
|
- @pagination="getList" />
|
|
|
+ <pagination
|
|
|
+ sync
|
|
|
+ :total.sync="pageInfo.total"
|
|
|
+ :page.sync="pageInfo.page"
|
|
|
+ :limit.sync="pageInfo.limit"
|
|
|
+ :page-sizes="pageInfo.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import pagination from '@/components/Pagination/index'
|
|
|
-import { orderQueryPage, getOrderStatus } from '@/api/orderManager'
|
|
|
-import { getEmployeeOrgan } from '@/api/buildTeam'
|
|
|
-import store from '@/store'
|
|
|
-import cleanDeep from 'clean-deep'
|
|
|
-import { orderStatus, dealStatus } from '@/utils/searchArray'
|
|
|
-import axios from 'axios'
|
|
|
-import qs from 'qs'
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
-import load from '@/utils/loading'
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import { orderQueryPage, getOrderStatus } from "@/api/orderManager";
|
|
|
+import { getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
+import store from "@/store";
|
|
|
+import cleanDeep from "clean-deep";
|
|
|
+import { orderStatus, dealStatus } from "@/utils/searchArray";
|
|
|
+import axios from "axios";
|
|
|
+import qs from "qs";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import load from "@/utils/loading";
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
name: "income",
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
orderStatus: orderStatus,
|
|
|
dealStatus: dealStatus,
|
|
@@ -257,7 +336,7 @@ export default {
|
|
|
transNo: null,
|
|
|
merNos: null,
|
|
|
lessBalancePaymentAmount: null,
|
|
|
- lessActualAmount: null
|
|
|
+ lessActualAmount: null,
|
|
|
},
|
|
|
tableList: [],
|
|
|
organList: [],
|
|
@@ -266,7 +345,7 @@ export default {
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
},
|
|
|
totalUserBalance: 0,
|
|
|
totalActualAmount: 0,
|
|
@@ -274,30 +353,32 @@ export default {
|
|
|
totalRevenueAmount: 0,
|
|
|
};
|
|
|
},
|
|
|
- mounted () {
|
|
|
- getEmployeeOrgan().then(res => {
|
|
|
+ mounted() {
|
|
|
+ getEmployeeOrgan().then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.organList = res.data;
|
|
|
}
|
|
|
});
|
|
|
var now = new Date();
|
|
|
|
|
|
- var startDate =
|
|
|
- new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()))
|
|
|
- .toISOString()
|
|
|
- .slice(0, 10);
|
|
|
+ var startDate = new Date(
|
|
|
+ Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
|
|
|
+ )
|
|
|
+ .toISOString()
|
|
|
+ .slice(0, 10);
|
|
|
// + " 00:00:00" + " 23:59:59"
|
|
|
- var endDate =
|
|
|
- new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()))
|
|
|
- .toISOString()
|
|
|
- .slice(0, 10);
|
|
|
+ var endDate = new Date(
|
|
|
+ Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
|
|
|
+ )
|
|
|
+ .toISOString()
|
|
|
+ .slice(0, 10);
|
|
|
this.orderDate = [];
|
|
|
this.orderDate.push(startDate);
|
|
|
this.orderDate.push(endDate);
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- onClear (type) {
|
|
|
+ onClear(type) {
|
|
|
if (type == "paymentType") {
|
|
|
this.searchForm.paymentType = null;
|
|
|
} else if (type == "paymentStatus") {
|
|
@@ -306,7 +387,7 @@ export default {
|
|
|
this.searchForm.organId = null;
|
|
|
}
|
|
|
},
|
|
|
- onOrderExport () {
|
|
|
+ onOrderExport() {
|
|
|
// 报表导出
|
|
|
let url = "/api-web/export/orderList";
|
|
|
let searchForm = this.searchForm;
|
|
@@ -322,8 +403,8 @@ export default {
|
|
|
paymentType: searchForm.paymentType,
|
|
|
organId: searchForm.organId,
|
|
|
lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
|
|
|
- lessActualAmount: searchForm.lessActualAmount
|
|
|
- }
|
|
|
+ lessActualAmount: searchForm.lessActualAmount,
|
|
|
+ };
|
|
|
if (this.orderDate && this.orderDate.length > 0) {
|
|
|
data.orderStartDate = this.orderDate[0];
|
|
|
data.orderEndDate = this.orderDate[1];
|
|
@@ -334,74 +415,78 @@ export default {
|
|
|
const options = {
|
|
|
method: "POST",
|
|
|
headers: {
|
|
|
- Authorization: getToken()
|
|
|
+ Authorization: getToken(),
|
|
|
},
|
|
|
data: qs.stringify(cleanDeep(data)),
|
|
|
url,
|
|
|
- responseType: "blob"
|
|
|
+ responseType: "blob",
|
|
|
};
|
|
|
this.$confirm("您确定导出报表", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- load.startLoading()
|
|
|
- axios(options).then(res => {
|
|
|
- let blob = new Blob([res.data], {
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- });
|
|
|
- let text = (new Response(blob)).text()
|
|
|
- text.then(res => {
|
|
|
- // 判断是否报错
|
|
|
- if (res.indexOf('code') != -1) {
|
|
|
- let json = JSON.parse(res)
|
|
|
- this.$message.error(json.msg)
|
|
|
- } else {
|
|
|
- let objectUrl = URL.createObjectURL(blob);
|
|
|
- let link = document.createElement("a");
|
|
|
- let nowTime = new Date();
|
|
|
- let ymd =
|
|
|
- nowTime.getFullYear() +
|
|
|
- "" +
|
|
|
- (nowTime.getMonth() + 1) +
|
|
|
- "" +
|
|
|
- nowTime.getDate() +
|
|
|
- "" +
|
|
|
- nowTime.getHours() +
|
|
|
- "" +
|
|
|
- nowTime.getMinutes();
|
|
|
- let fname = "报表导出" + new Date().getTime(); //下载文件的名字
|
|
|
- link.href = objectUrl;
|
|
|
- link.setAttribute("download", fname);
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- }
|
|
|
- })
|
|
|
+ load.startLoading();
|
|
|
+ axios(options)
|
|
|
+ .then((res) => {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8",
|
|
|
+ //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ });
|
|
|
+ let text = new Response(blob).text();
|
|
|
+ text.then((res) => {
|
|
|
+ // 判断是否报错
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
+ let json = JSON.parse(res);
|
|
|
+ this.$message.error(json.msg);
|
|
|
+ } else {
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let nowTime = new Date();
|
|
|
+ let ymd =
|
|
|
+ nowTime.getFullYear() +
|
|
|
+ "" +
|
|
|
+ (nowTime.getMonth() + 1) +
|
|
|
+ "" +
|
|
|
+ nowTime.getDate() +
|
|
|
+ "" +
|
|
|
+ nowTime.getHours() +
|
|
|
+ "" +
|
|
|
+ nowTime.getMinutes();
|
|
|
+ let fname = "报表导出" + new Date().getTime(); //下载文件的名字
|
|
|
+ link.href = objectUrl;
|
|
|
+ link.setAttribute("download", fname);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- load.endLoading();
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error('导出数据失败,请联系管理员');
|
|
|
- load.endLoading();
|
|
|
- });
|
|
|
+ load.endLoading();
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.$message.error("导出数据失败,请联系管理员");
|
|
|
+ load.endLoading();
|
|
|
+ });
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
- search () {
|
|
|
+ search() {
|
|
|
this.pageInfo.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- getList () {
|
|
|
- let params = JSON.parse(JSON.stringify(this.searchForm))
|
|
|
+ getList() {
|
|
|
+ let params = JSON.parse(JSON.stringify(this.searchForm));
|
|
|
params.rows = this.pageInfo.limit;
|
|
|
params.page = this.pageInfo.page;
|
|
|
- params.orderNo = params.orderNo ? params.orderNo : null
|
|
|
- params.transNo = params.transNo ? params.transNo : null
|
|
|
- params.merNos = params.merNos ? params.merNos : null
|
|
|
- params.actualAmount = params.actualAmount ? params.actualAmount : null
|
|
|
- params.balancePaymentAmount = params.balancePaymentAmount ? params.balancePaymentAmount : null
|
|
|
+ params.orderNo = params.orderNo ? params.orderNo : null;
|
|
|
+ params.transNo = params.transNo ? params.transNo : null;
|
|
|
+ params.merNos = params.merNos ? params.merNos : null;
|
|
|
+ params.actualAmount = params.actualAmount ? params.actualAmount : null;
|
|
|
+ params.balancePaymentAmount = params.balancePaymentAmount
|
|
|
+ ? params.balancePaymentAmount
|
|
|
+ : null;
|
|
|
if (this.orderDate && this.orderDate.length > 0) {
|
|
|
params.orderStartDate = this.orderDate[0];
|
|
|
params.orderEndDate = this.orderDate[1];
|
|
@@ -409,30 +494,40 @@ export default {
|
|
|
params.orderStartDate = null;
|
|
|
params.orderEndDate = null;
|
|
|
}
|
|
|
- orderQueryPage(cleanDeep(params)).then(res => {
|
|
|
+ orderQueryPage(cleanDeep(params)).then((res) => {
|
|
|
let result = res.data;
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = result.rows;
|
|
|
this.pageInfo.total = result.total;
|
|
|
- this.totalUserBalance = result.totalUserBalance ? result.totalUserBalance : 0
|
|
|
- this.totalActualAmount = result.totalActualAmount ? result.totalActualAmount : 0
|
|
|
- this.totalAdvanceAmount = result.totalAdvanceAmount ? result.totalAdvanceAmount : 0
|
|
|
- this.totalRevenueAmount = result.totalRevenueAmount ? result.totalRevenueAmount : 0
|
|
|
+ this.totalUserBalance = result.totalUserBalance
|
|
|
+ ? result.totalUserBalance
|
|
|
+ : 0;
|
|
|
+ this.totalActualAmount = result.totalActualAmount
|
|
|
+ ? result.totalActualAmount
|
|
|
+ : 0;
|
|
|
+ this.totalAdvanceAmount = result.totalAdvanceAmount
|
|
|
+ ? result.totalAdvanceAmount
|
|
|
+ : 0;
|
|
|
+ this.totalRevenueAmount = result.totalRevenueAmount
|
|
|
+ ? result.totalRevenueAmount
|
|
|
+ : 0;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- onGetOrderStatus (row) {
|
|
|
+ onGetOrderStatus(row) {
|
|
|
this.$confirm("您确定查询该订单状态", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- getOrderStatus({ id: row.id }).then(res => {
|
|
|
- this.getList()
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ getOrderStatus({ id: row.id }).then((res) => {
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
})
|
|
|
- }).catch(err => { })
|
|
|
+ .catch((err) => {});
|
|
|
},
|
|
|
- searchOrderDate (value) {
|
|
|
+ searchOrderDate(value) {
|
|
|
if (value) {
|
|
|
this.searchForm.orderStartDate = value[0];
|
|
|
this.searchForm.orderEndDate = value[1];
|
|
@@ -441,7 +536,7 @@ export default {
|
|
|
this.searchForm.orderEndDate = null;
|
|
|
}
|
|
|
},
|
|
|
- onReSet () {
|
|
|
+ onReSet() {
|
|
|
// 重置搜索
|
|
|
this.orderDate = null;
|
|
|
this.searchForm = {
|
|
@@ -457,12 +552,12 @@ export default {
|
|
|
transNo: null,
|
|
|
merNos: null,
|
|
|
lessBalancePaymentAmount: null,
|
|
|
- lessActualAmount: null
|
|
|
+ lessActualAmount: null,
|
|
|
};
|
|
|
this.getList();
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
-</style>
|
|
|
+</style>
|