|
@@ -0,0 +1,226 @@
|
|
|
+<template>
|
|
|
+ <div class="m-container">
|
|
|
+ <h2>
|
|
|
+ <div class="squrt"></div>
|
|
|
+ 机构协议管理
|
|
|
+ </h2>
|
|
|
+ <div class="m-core">
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ class="searchForm"
|
|
|
+ ref="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="reset"
|
|
|
+ :saveKey="'tenantTradeManager'"
|
|
|
+ :model.sync="searchForm"
|
|
|
+ >
|
|
|
+ <el-form-item prop="transNo">
|
|
|
+ <el-input
|
|
|
+ placeholder="交易流水号"
|
|
|
+ clearable
|
|
|
+ type="text"
|
|
|
+ v-model.trim="searchForm.transNo"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="orderNo">
|
|
|
+ <el-input
|
|
|
+ placeholder="订单号"
|
|
|
+ clearable
|
|
|
+ type="text"
|
|
|
+ v-model.trim="searchForm.orderNo"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="orderType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.orderType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('orderType')"
|
|
|
+ placeholder="交易类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, key, index) in tenantStatus"
|
|
|
+ :key="index"
|
|
|
+ :label="item"
|
|
|
+ :value="key"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="orderState">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.orderState"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('orderState')"
|
|
|
+ placeholder="交易状态"
|
|
|
+ >
|
|
|
+ <el-option label="待支付" :value="0"></el-option>
|
|
|
+ <el-option label="已支付" :value="1"></el-option>
|
|
|
+ <el-option label="支付失败" :value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="createTimer">
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="searchForm.createTimer"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="订单开始时间"
|
|
|
+ :default-time="['00:00:00', '23:59:59']"
|
|
|
+ end-placeholder="订单结束时间"
|
|
|
+ :picker-options="{ firstDayOfWeek: 1 }"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button native-type="submit" type="danger">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="primary">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </save-form>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
+ @click="roleOperation('create')"
|
|
|
+ >新增协议</el-button
|
|
|
+ >
|
|
|
+ <!-- 列表 -->
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ :data="tableList"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" label="协议编号" prop="transNo">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="协议号" prop="orderNo">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="协议名称" prop="createdTime">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="上传时间" prop="tenantName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作人">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.actualAmount | moneyFormat }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.orderState | tenantOrderStatus }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click="openService(scope.row)"
|
|
|
+ v-permission="'tenantInfo/info'"
|
|
|
+ type="text"
|
|
|
+ >查看</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="openService(scope.row)"
|
|
|
+ v-permission="'tenantInfo/info'"
|
|
|
+ type="text"
|
|
|
+ >修改</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="openService(scope.row)"
|
|
|
+ v-permission="'tenantInfo/info'"
|
|
|
+ type="text"
|
|
|
+ >启用</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ :saveKey="'tenantTradeManager'"
|
|
|
+ sync
|
|
|
+ :total.sync="pageInfo.total"
|
|
|
+ :page.sync="pageInfo.page"
|
|
|
+ :limit.sync="pageInfo.limit"
|
|
|
+ :page-sizes="pageInfo.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-dialog title="订单详情" :visible.sync="orderVisible" width="1200px">
|
|
|
+ <order-info />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import { tenantOrderRecordQueryPage } from "./api";
|
|
|
+import { tenantStatus } from '@/constant'
|
|
|
+import { dealStatus } from "@/utils/searchArray";
|
|
|
+import OrderInfo from './model/orderInfo'
|
|
|
+import { getTimes } from "@/utils";
|
|
|
+const initSearch = {
|
|
|
+ transNo: null,
|
|
|
+ orderNo: null,
|
|
|
+ orderType: null,
|
|
|
+ orderState: null,
|
|
|
+ createTimer: [],
|
|
|
+};
|
|
|
+export default {
|
|
|
+ components: { pagination, OrderInfo },
|
|
|
+ data() {
|
|
|
+ const baseTenantId = sessionStorage.getItem('baseTenantId')
|
|
|
+ return {
|
|
|
+ baseTenantId,
|
|
|
+ tenantStatus,
|
|
|
+ dealStatus,
|
|
|
+ tableList: [],
|
|
|
+ orderVisible: false,
|
|
|
+ pageInfo: {
|
|
|
+ // 分页规则
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ },
|
|
|
+ searchForm: { ...initSearch },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ let { createTimer, ...reset } = this.searchForm;
|
|
|
+ const res = await tenantOrderRecordQueryPage({
|
|
|
+ ...reset,
|
|
|
+ ...getTimes(createTimer, ["startDate", "endDate"], "YYYY-MM-DD HH:mm:ss"),
|
|
|
+ page: this.pageInfo.page,
|
|
|
+ rows: this.pageInfo.limit,
|
|
|
+ });
|
|
|
+ this.pageInfo.total = res.total;
|
|
|
+ this.tableList = res.rows;
|
|
|
+ } catch (e) {}
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ this.pageInfo.page = 1;
|
|
|
+ this.$refs.searchForm.save(this.searchForm);
|
|
|
+ this.$refs.searchForm.save(this.pageInfo, "page");
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ reset() {
|
|
|
+ this.searchForm = { ...initSearch };
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ openService(row) {
|
|
|
+ this.orderVisible = true
|
|
|
+ },
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ tenantOrderStatus(val) {
|
|
|
+ const template = {
|
|
|
+ 0: "待支付",
|
|
|
+ 1: "已支付",
|
|
|
+ 2: "支付失败"
|
|
|
+ }
|
|
|
+ return template[val]
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.courseMask .el-dialog__body {
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
+</style>
|