|
@@ -1,924 +1,890 @@
|
|
<template>
|
|
<template>
|
|
- <div class="app-container">
|
|
|
|
- <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
|
|
|
|
- <!-- 查询表单 -->
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <el-input
|
|
|
|
- v-model="formData.name"
|
|
|
|
- placeholder="合同名称/编号,承兑人,出票人名称"
|
|
|
|
- clearable
|
|
|
|
- style="width: 300px"
|
|
|
|
- @change="Search"
|
|
|
|
- >
|
|
|
|
- <i slot="prefix" class="el-input__icon el-icon-search" />
|
|
|
|
- </el-input>
|
|
|
|
- </div>
|
|
|
|
- <!-- 供应商查询 -->
|
|
|
|
- <div v-if="isOpenSupplierName" class="grid-content bg-purple">
|
|
|
|
- <el-input
|
|
|
|
- v-model="formData.supplierName"
|
|
|
|
- placeholder="请输入供应商名称"
|
|
|
|
- clearable
|
|
|
|
- style="width: 180px"
|
|
|
|
- @change="searchName"
|
|
|
|
- >
|
|
|
|
- <i slot="prefix" class="el-input__icon el-icon-search" />
|
|
|
|
- </el-input>
|
|
|
|
- </div>
|
|
|
|
- <!-- 合同审核状态 -->
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <el-dropdown @command="handleCommandAuditstatus">
|
|
|
|
- <div class="pulldown">
|
|
|
|
- <span v-if="!Auditstatus" class="el-dropdown-link">
|
|
|
|
- 合同审核状态
|
|
|
|
- </span>
|
|
|
|
- <span v-if="Auditstatus" class="el-dropdown-link">
|
|
|
|
- {{ Auditstatus }}
|
|
|
|
- </span>
|
|
|
|
- <i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
- </div>
|
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
|
- <el-dropdown-item command="全部">全部</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="待审核">待审核</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="成功">成功</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="失败">失败</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </el-dropdown>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
|
|
|
|
+ <!-- 查询表单 -->
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <el-input v-model="formData.name" placeholder="合同名称/编号,承兑人,出票人名称" clearable style="width: 300px"
|
|
|
|
+ @change="Search">
|
|
|
|
+ <i slot="prefix" class="el-input__icon el-icon-search" />
|
|
|
|
+ </el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 供应商查询 -->
|
|
|
|
+ <div v-if="isOpenSupplierName" class="grid-content bg-purple">
|
|
|
|
+ <el-input v-model="formData.supplierName" placeholder="请输入供应商名称" clearable style="width: 180px"
|
|
|
|
+ @change="searchName">
|
|
|
|
+ <i slot="prefix" class="el-input__icon el-icon-search" />
|
|
|
|
+ </el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 合同审核状态 -->
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <el-dropdown @command="handleCommandAuditstatus">
|
|
|
|
+ <div class="pulldown">
|
|
|
|
+ <span v-if="!Auditstatus" class="el-dropdown-link">
|
|
|
|
+ 合同审核状态
|
|
|
|
+ </span>
|
|
|
|
+ <span v-if="Auditstatus" class="el-dropdown-link">
|
|
|
|
+ {{ Auditstatus }}
|
|
|
|
+ </span>
|
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item command="全部">全部</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="待审核">待审核</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="成功">成功</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="失败">失败</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- 汇票状态 -->
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <el-dropdown @command="handlehpCommand">
|
|
|
|
- <div class="pulldown">
|
|
|
|
- <span v-if="!hpstatus" class="el-dropdown-link"> 汇票状态 </span>
|
|
|
|
- <span v-if="hpstatus" class="el-dropdown-link">
|
|
|
|
- {{ hpstatus }}
|
|
|
|
- </span>
|
|
|
|
- <i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
- </div>
|
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
|
- <el-dropdown-item command="全部">全部</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="待审核">待审核</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="成功">成功</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="失败">失败</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </el-dropdown>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 汇票状态 -->
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <el-dropdown @command="handlehpCommand">
|
|
|
|
+ <div class="pulldown">
|
|
|
|
+ <span v-if="!hpstatus" class="el-dropdown-link"> 汇票状态 </span>
|
|
|
|
+ <span v-if="hpstatus" class="el-dropdown-link">
|
|
|
|
+ {{ hpstatus }}
|
|
|
|
+ </span>
|
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item command="全部">全部</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="待审核">待审核</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="成功">成功</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="失败">失败</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- 合同状态 -->
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <el-dropdown @command="handleCommand">
|
|
|
|
- <div class="pulldown">
|
|
|
|
- <span v-if="!status" class="el-dropdown-link"> 合同状态 </span>
|
|
|
|
- <span v-if="status" class="el-dropdown-link">
|
|
|
|
- {{ status }}
|
|
|
|
- </span>
|
|
|
|
- <i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
- </div>
|
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
|
- <el-dropdown-item command="全部">全部</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="正常">正常</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="删除">删除</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </el-dropdown>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 合同状态 -->
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <el-dropdown @command="handleCommand">
|
|
|
|
+ <div class="pulldown">
|
|
|
|
+ <span v-if="!status" class="el-dropdown-link"> 合同状态 </span>
|
|
|
|
+ <span v-if="status" class="el-dropdown-link">
|
|
|
|
+ {{ status }}
|
|
|
|
+ </span>
|
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item command="全部">全部</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="正常">正常</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="删除">删除</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- 日期查询 -->
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <div class="block">
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="value2"
|
|
|
|
- type="daterange"
|
|
|
|
- align="right"
|
|
|
|
- unlink-panels
|
|
|
|
- range-separator="至"
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
- :picker-options="pickerOptions"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- @change="startEndTime"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ <!-- 日期查询 -->
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <div class="block">
|
|
|
|
+ <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
|
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
|
|
|
|
+ value-format="yyyy-MM-dd" @change="startEndTime" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-row>
|
|
|
|
|
|
- <el-table
|
|
|
|
- :row-key="getRowKey"
|
|
|
|
- v-loading="listLoading"
|
|
|
|
- :data="temporaryList"
|
|
|
|
- element-loading-text="Loading"
|
|
|
|
- border
|
|
|
|
- fit
|
|
|
|
- ref="multipleTable"
|
|
|
|
- highlight-current-row
|
|
|
|
- @select="handleSelectionChange"
|
|
|
|
- @select-all="handleAll"
|
|
|
|
- >
|
|
|
|
- <el-table-column
|
|
|
|
- align="center"
|
|
|
|
- label=""
|
|
|
|
- width="55"
|
|
|
|
- type="selection"
|
|
|
|
- :reserve-selection="true"
|
|
|
|
- />
|
|
|
|
- <el-table-column label="合同名称" align="center" prop="name" />
|
|
|
|
- <el-table-column
|
|
|
|
- label="合同编号"
|
|
|
|
- align="center"
|
|
|
|
- prop="contractNo"
|
|
|
|
- width="155"
|
|
|
|
- />
|
|
|
|
- <el-table-column label="供应商名称" align="center" prop="supplierName" />
|
|
|
|
|
|
+ <el-table :row-key="getRowKey" v-loading="listLoading" :data="temporaryList" element-loading-text="Loading"
|
|
|
|
+ border fit ref="multipleTable" highlight-current-row @select="handleSelectionChange"
|
|
|
|
+ @select-all="handleAll">
|
|
|
|
+ <el-table-column align="center" label="" width="55" type="selection" :reserve-selection="true" />
|
|
|
|
+ <el-table-column label="合同名称" align="center" prop="name" />
|
|
|
|
+ <el-table-column label="合同编号" align="center" prop="contractNo" width="155" />
|
|
|
|
+ <el-table-column label="供应商名称" align="center" prop="supplierName" />
|
|
|
|
|
|
- <el-table-column label="承兑人名称" align="center" prop="acceptorName" />
|
|
|
|
- <el-table-column label="出票人名称" align="center" prop="drawersName" />
|
|
|
|
- <!-- 合同审核状态 -->
|
|
|
|
- <el-table-column
|
|
|
|
- class-name="status-col"
|
|
|
|
- label="合同审核状态"
|
|
|
|
- align="center"
|
|
|
|
- prop="statusText"
|
|
|
|
- />
|
|
|
|
- <!-- 汇票状态 -->
|
|
|
|
- <el-table-column label="汇票审核状态" align="center" prop="draftStatusText" />
|
|
|
|
- <!-- 合同状态 -->
|
|
|
|
- <el-table-column
|
|
|
|
- label="合同状态"
|
|
|
|
- align="center"
|
|
|
|
- prop="contractStatusText"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- align="center"
|
|
|
|
- label="上传日期"
|
|
|
|
- prop="createdAt"
|
|
|
|
- width="155"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- align="center"
|
|
|
|
- prop="created_at"
|
|
|
|
- label="操作"
|
|
|
|
- width="250"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-tag
|
|
|
|
- type="primary"
|
|
|
|
- style="cursor: pointer"
|
|
|
|
- @click="tapDetail(scope.row.id)"
|
|
|
|
- >查看详情</el-tag
|
|
|
|
- >
|
|
|
|
- <el-tag
|
|
|
|
- v-permission="['salesman', 'admin']"
|
|
|
|
- type="success"
|
|
|
|
- style="cursor: pointer"
|
|
|
|
- v-if="scope.row.status == 0"
|
|
|
|
- @click="Ssuccessed(scope.row.id)"
|
|
|
|
- >
|
|
|
|
- 审核成功</el-tag
|
|
|
|
- >
|
|
|
|
- <el-tag
|
|
|
|
- v-permission="['salesman', 'admin']"
|
|
|
|
- type="danger"
|
|
|
|
- style="cursor: pointer"
|
|
|
|
- v-if="scope.row.status == 0"
|
|
|
|
- @click="Sfailed(scope.row.id)"
|
|
|
|
- >审核失败
|
|
|
|
- </el-tag>
|
|
|
|
- <el-tag
|
|
|
|
- v-permission="['supplier']"
|
|
|
|
- type="danger"
|
|
|
|
- style="cursor: pointer"
|
|
|
|
- v-show="scope.row.status == 2"
|
|
|
|
- @click="editNewContract(scope.row)"
|
|
|
|
- >重新提交
|
|
|
|
- </el-tag>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
|
- <el-row type="flex" justify="space-between">
|
|
|
|
- <div class="btn" style="display: flex; justify-content: flex-end">
|
|
|
|
- <el-button
|
|
|
|
- v-permission="['supplier']"
|
|
|
|
- type="primary"
|
|
|
|
- @click="addNewContract"
|
|
|
|
- >上传合同</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-permission="['salesman', 'admin']"
|
|
|
|
- type="primary"
|
|
|
|
- @click="successed"
|
|
|
|
- >审核成功</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-permission="['salesman', 'admin']"
|
|
|
|
- type="primary"
|
|
|
|
- @click="failed"
|
|
|
|
- >审核失败</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="primary" @click="batchExports">导出</el-button>
|
|
|
|
- <el-button type="success" @click="recover">恢复</el-button>
|
|
|
|
- <el-button type="danger" @click="deleted">删除</el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-row>
|
|
|
|
- <div class="pagesip">
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- style="
|
|
|
|
|
|
+ <el-table-column label="承兑人名称" align="center" prop="acceptorName" />
|
|
|
|
+ <el-table-column label="出票人名称" align="center" prop="drawersName" />
|
|
|
|
+ <!-- 合同审核状态 -->
|
|
|
|
+ <el-table-column class-name="status-col" label="合同审核状态" align="center" prop="statusText" />
|
|
|
|
+ <!-- 汇票状态 -->
|
|
|
|
+ <el-table-column label="汇票审核状态" align="center" prop="draftStatusText" />
|
|
|
|
+ <!-- 合同状态 -->
|
|
|
|
+ <el-table-column label="合同状态" align="center" prop="contractStatusText" />
|
|
|
|
+ <el-table-column align="center" label="上传日期" prop="createdAt" width="155" />
|
|
|
|
+ <el-table-column align="center" prop="created_at" label="操作" width="250">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-tag type="primary" style="cursor: pointer" @click="tapDetail(scope.row.id)">查看详情</el-tag>
|
|
|
|
+ <el-tag v-permission="['salesman', 'admin']" type="success" style="cursor: pointer"
|
|
|
|
+ v-if="scope.row.status == 0" @click="Ssuccessed(scope.row.id)">
|
|
|
|
+ 审核成功</el-tag>
|
|
|
|
+ <el-tag v-permission="['salesman', 'admin']" type="danger" style="cursor: pointer"
|
|
|
|
+ v-if="scope.row.status == 0" @click="Sfailed(scope.row.id)">审核失败
|
|
|
|
+ </el-tag>
|
|
|
|
+ <el-tag v-permission="['supplier']" type="danger" style="cursor: pointer"
|
|
|
|
+ v-show="scope.row.status == 2" @click="editNewContract(scope.row)">重新提交
|
|
|
|
+ </el-tag>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
|
+ <el-row type="flex" justify="space-between">
|
|
|
|
+ <div class="btn" style="display: flex; justify-content: flex-end">
|
|
|
|
+ <el-button v-permission="['supplier']" type="primary" @click="addNewContract">上传合同</el-button>
|
|
|
|
+ <el-button v-permission="['salesman', 'admin']" type="primary" @click="successed">审核成功</el-button>
|
|
|
|
+ <el-button v-permission="['salesman', 'admin']" type="primary" @click="failed">审核失败</el-button>
|
|
|
|
+ <el-button type="primary" @click="batchExports">导出</el-button>
|
|
|
|
+ <el-button type="success" @click="recover">恢复</el-button>
|
|
|
|
+ <el-button type="danger" @click="deleted">删除</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-row>
|
|
|
|
+ <div class="pagesip">
|
|
|
|
+ <el-button type="primary" size="small" style="
|
|
background-color: #d8ab5a;
|
|
background-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
margin: 0 20px;
|
|
margin: 0 20px;
|
|
- "
|
|
|
|
- @click="jumpFirstPage"
|
|
|
|
- >首页
|
|
|
|
- </el-button>
|
|
|
|
- <el-pagination
|
|
|
|
- ref="pagination"
|
|
|
|
- background
|
|
|
|
- layout="total,prev, pager, next"
|
|
|
|
- :total="total"
|
|
|
|
- :page-size="pagesize"
|
|
|
|
- :current-page="currentPage"
|
|
|
|
- prev-text="上一页"
|
|
|
|
- next-text="下一页"
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- />
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- style="
|
|
|
|
|
|
+ " @click="jumpFirstPage">首页
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-pagination ref="pagination" background layout="total,prev, pager, next" :total="total"
|
|
|
|
+ :page-size="pagesize" :current-page="currentPage" prev-text="上一页" next-text="下一页"
|
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
|
+ <el-button type="primary" size="small" style="
|
|
background-color: #d8ab5a;
|
|
background-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
border-color: #d8ab5a;
|
|
margin: 0 20px;
|
|
margin: 0 20px;
|
|
- "
|
|
|
|
- @click="jumpLastPage"
|
|
|
|
- >尾页
|
|
|
|
- </el-button>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ " @click="jumpLastPage">尾页
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { dataConversionUtil } from "../../utils/Excel.js";
|
|
|
|
-import { contractsPageApi } from "@/api/contracts";
|
|
|
|
-import { mapGetters } from "vuex";
|
|
|
|
|
|
+ import {
|
|
|
|
+ dataConversionUtil
|
|
|
|
+ } from "../../utils/Excel.js";
|
|
|
|
+ import {
|
|
|
|
+ contractsPageApi
|
|
|
|
+ } from "@/api/contracts";
|
|
|
|
+ import {
|
|
|
|
+ mapGetters
|
|
|
|
+ } from "vuex";
|
|
|
|
|
|
-export default {
|
|
|
|
- filters: {
|
|
|
|
- statusFilter(status) {
|
|
|
|
- const statusMap = {
|
|
|
|
- published: "success",
|
|
|
|
- draft: "gray",
|
|
|
|
- deleted: "danger",
|
|
|
|
- };
|
|
|
|
- return statusMap[status];
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- ...mapGetters(["roles"]),
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- // 角色id
|
|
|
|
- roleId:'',
|
|
|
|
- // 表单数据
|
|
|
|
- formData: {
|
|
|
|
- startTime: "",
|
|
|
|
- endTime: "",
|
|
|
|
- name: "", // 合同名称
|
|
|
|
- contractNo: "", // 合同编码
|
|
|
|
- supplierName: "", // 供应商
|
|
|
|
- acceptorName: "", // 承兑人
|
|
|
|
- contractStatusText: "", // 合同状态
|
|
|
|
- contractStatus: "",
|
|
|
|
- draftStatus: "",
|
|
|
|
- },
|
|
|
|
- isOpenSupplierName: false, //是否显示供应商查询
|
|
|
|
- srcList: [],
|
|
|
|
- list: [],
|
|
|
|
- /* 表格数据 */
|
|
|
|
- temporaryList: [],
|
|
|
|
- /* 总条数 */
|
|
|
|
- total: 20,
|
|
|
|
- listLoading: false,
|
|
|
|
- status: "",
|
|
|
|
- hpstatus: "",
|
|
|
|
- Auditstatus: "",
|
|
|
|
- search: "",
|
|
|
|
- /* 当前页数 */
|
|
|
|
- currentPage: 1,
|
|
|
|
- /* 每页显示个数 */
|
|
|
|
- pagesize: 10,
|
|
|
|
- checked: "",
|
|
|
|
- pickerOptions: {
|
|
|
|
- shortcuts: [
|
|
|
|
- {
|
|
|
|
- text: "最近一周",
|
|
|
|
- onClick(picker) {
|
|
|
|
- const end = new Date();
|
|
|
|
- const start = new Date();
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- text: "最近一个月",
|
|
|
|
- onClick(picker) {
|
|
|
|
- const end = new Date();
|
|
|
|
- const start = new Date();
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- text: "最近三个月",
|
|
|
|
- onClick(picker) {
|
|
|
|
- const end = new Date();
|
|
|
|
- const start = new Date();
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- value2: "",
|
|
|
|
- multipleSelection: [],
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- mounted() {
|
|
|
|
- this.checked = this.$store.state.user.checked;
|
|
|
|
- this.roleId = this.$store.state.user.userInfo.roleId;
|
|
|
|
- console.log(this.roleId,"id")
|
|
|
|
- // 获取所有数据
|
|
|
|
- this.getData()
|
|
|
|
-
|
|
|
|
- //是否显示供应商查询
|
|
|
|
- this.getSupplierName();
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- /* ajax发请求获取列表数据 */
|
|
|
|
- getData(searchForm = {
|
|
|
|
- contractStatus:2
|
|
|
|
- }) {
|
|
|
|
- const params = {
|
|
|
|
- pageIndex: this.currentPage,
|
|
|
|
- pageSize: this.pagesize,
|
|
|
|
- };
|
|
|
|
- contractsPageApi({ ...params, ...searchForm }).then((res) => {
|
|
|
|
- const { data } = res;
|
|
|
|
- this.filter = params;
|
|
|
|
- this.temporaryList = data.result;
|
|
|
|
- this.srcList = data.result;
|
|
|
|
- console.log(this.srcList);
|
|
|
|
- this.total = res.data.total;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ export default {
|
|
|
|
+ filters: {
|
|
|
|
+ statusFilter(status) {
|
|
|
|
+ const statusMap = {
|
|
|
|
+ published: "success",
|
|
|
|
+ draft: "gray",
|
|
|
|
+ deleted: "danger",
|
|
|
|
+ };
|
|
|
|
+ return statusMap[status];
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapGetters(["roles"]),
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ // 角色id
|
|
|
|
+ roleId: '',
|
|
|
|
+ // 表单数据
|
|
|
|
+ formData: {
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ name: "", // 合同名称
|
|
|
|
+ contractNo: "", // 合同编码
|
|
|
|
+ supplierName: "", // 供应商
|
|
|
|
+ acceptorName: "", // 承兑人
|
|
|
|
+ contractStatusText: "", // 合同状态
|
|
|
|
+ contractStatus: "",
|
|
|
|
+ draftStatus: "",
|
|
|
|
+ },
|
|
|
|
+ isOpenSupplierName: false, //是否显示供应商查询
|
|
|
|
+ srcList: [],
|
|
|
|
+ list: [],
|
|
|
|
+ /* 表格数据 */
|
|
|
|
+ temporaryList: [],
|
|
|
|
+ /* 总条数 */
|
|
|
|
+ total: 20,
|
|
|
|
+ listLoading: false,
|
|
|
|
+ status: "",
|
|
|
|
+ hpstatus: "",
|
|
|
|
+ Auditstatus: "",
|
|
|
|
+ search: "",
|
|
|
|
+ /* 当前页数 */
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ /* 每页显示个数 */
|
|
|
|
+ pagesize: 10,
|
|
|
|
+ checked: "",
|
|
|
|
+ pickerOptions: {
|
|
|
|
+ shortcuts: [{
|
|
|
|
+ text: "最近一周",
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const end = new Date();
|
|
|
|
+ const start = new Date();
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: "最近一个月",
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const end = new Date();
|
|
|
|
+ const start = new Date();
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: "最近三个月",
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const end = new Date();
|
|
|
|
+ const start = new Date();
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ value2: "",
|
|
|
|
+ multipleSelection: [],
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.checked = this.$store.state.user.checked;
|
|
|
|
+ this.roleId = this.$store.state.user.userInfo.roleId;
|
|
|
|
+ console.log(this.roleId, "id")
|
|
|
|
+ // 获取所有数据
|
|
|
|
+ this.getData()
|
|
|
|
|
|
- addNewContract() {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "contracts/addcontract",
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- editNewContract(row) {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "contracts/addcontract?id=" + row.id,
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- tapDetail(id) {
|
|
|
|
- console.log(id);
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/detail",
|
|
|
|
- query: {
|
|
|
|
- id: id,
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- successed() {
|
|
|
|
- const ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
- let status=Array.from(this.multipleSelection,({status})=>status)
|
|
|
|
- if(status.includes(1)){
|
|
|
|
- this.$message({
|
|
|
|
- type:'error',
|
|
|
|
- message:'选项中已成功的数据不能再次审核成功'
|
|
|
|
- })
|
|
|
|
- }else if(ids==""){
|
|
|
|
- this.$message({
|
|
|
|
- type:'error',
|
|
|
|
- message:'请选择数据'
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Contract/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 3,
|
|
|
|
- },
|
|
|
|
|
|
+ //是否显示供应商查询
|
|
|
|
+ this.getSupplierName();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ /* ajax发请求获取列表数据 */
|
|
|
|
+ getData(searchForm = {
|
|
|
|
+ contractStatus: 2
|
|
|
|
+ }) {
|
|
|
|
+ const params = {
|
|
|
|
+ pageIndex: this.currentPage,
|
|
|
|
+ pageSize: this.pagesize,
|
|
|
|
+ };
|
|
|
|
+ contractsPageApi({
|
|
|
|
+ ...params,
|
|
|
|
+ ...searchForm
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
|
- this.multipleSelection="";
|
|
|
|
- this.getData();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- }
|
|
|
|
|
|
+ const {
|
|
|
|
+ data
|
|
|
|
+ } = res;
|
|
|
|
+ this.filter = params;
|
|
|
|
+ this.temporaryList = data.result;
|
|
|
|
+ this.srcList = data.result;
|
|
|
|
+ console.log(this.srcList);
|
|
|
|
+ this.total = res.data.total;
|
|
});
|
|
});
|
|
- }
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- Ssuccessed(id) {
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Contract/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: [id],
|
|
|
|
- operateType: 3,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- failed() {
|
|
|
|
- const ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
- let status=Array.from(this.multipleSelection,({status})=>status)
|
|
|
|
- if(status.includes(2)){
|
|
|
|
- this.$message({
|
|
|
|
- type:'error',
|
|
|
|
- message:'选项中已失败的数据不能再次审核失败'
|
|
|
|
- })
|
|
|
|
- }else if(ids==""){
|
|
|
|
- this.$message({
|
|
|
|
- type:'error',
|
|
|
|
- message:'请选择数据'
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Contract/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 4,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
|
- this.multipleSelection="";
|
|
|
|
- this.getData();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ addNewContract() {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "contracts/addcontract",
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ editNewContract(row) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "contracts/addcontract?id=" + row.id,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ tapDetail(id) {
|
|
|
|
+ console.log(id);
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/detail",
|
|
|
|
+ query: {
|
|
|
|
+ id: id,
|
|
|
|
+ },
|
|
});
|
|
});
|
|
- }
|
|
|
|
- },
|
|
|
|
- Sfailed(id) {
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Contract/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: [id],
|
|
|
|
- operateType: 4,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- recover() {
|
|
|
|
- const ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
- let status=Array.from(this.multipleSelection,({contractStatus})=>contractStatus)
|
|
|
|
- if(status.includes(0)){
|
|
|
|
- this.$message({
|
|
|
|
- type: 'error',
|
|
|
|
- message: '不能恢复已是正常状态的账号'
|
|
|
|
- })
|
|
|
|
- }else if(ids==""){
|
|
|
|
- this.$message({
|
|
|
|
- type: 'error',
|
|
|
|
- message: '请选择数据'
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- this.$request({
|
|
|
|
- url: "/api/Contract/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 2,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
|
- this.multipleSelection="";
|
|
|
|
- this.getData();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- deleted() {
|
|
|
|
- const ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
|
- let status=Array.from(this.multipleSelection,({contractStatus})=>contractStatus)
|
|
|
|
- let Auditstatus=Array.from(this.multipleSelection,({status})=>status)
|
|
|
|
- if(this.roleId===999){ //供应商删除
|
|
|
|
- if(status.includes(1)){
|
|
|
|
|
|
+ },
|
|
|
|
+ successed() {
|
|
|
|
+ const ids = Array.from(this.multipleSelection, ({
|
|
|
|
+ id
|
|
|
|
+ }) => id);
|
|
|
|
+ let status = Array.from(this.multipleSelection, ({
|
|
|
|
+ status
|
|
|
|
+ }) => status)
|
|
|
|
+ if (status.includes(1)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '选项中已成功的数据不能再次审核成功'
|
|
|
|
+ })
|
|
|
|
+ } else if (ids == "") {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '请选择数据'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$confirm('请确认审核成功返回信息已填写', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Contract/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 3,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
|
+ this.multipleSelection = "";
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消'
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ Ssuccessed(id) {
|
|
|
|
+ this.$confirm('请确认审核成功返回信息已填写', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Contract/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: [id],
|
|
|
|
+ operateType: 3,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消删除'
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ failed() {
|
|
|
|
+ const ids = Array.from(this.multipleSelection, ({
|
|
|
|
+ id
|
|
|
|
+ }) => id);
|
|
|
|
+ let status = Array.from(this.multipleSelection, ({
|
|
|
|
+ status
|
|
|
|
+ }) => status)
|
|
|
|
+ if (status.includes(2)) {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'error',
|
|
type: 'error',
|
|
- message: '不能删除合同状态已是删除状态的数据'
|
|
|
|
|
|
+ message: '选项中已失败的数据不能再次审核失败'
|
|
})
|
|
})
|
|
- }else if(Auditstatus.includes(1)){
|
|
|
|
|
|
+ } else if(status.includes(1)){
|
|
this.$message({
|
|
this.$message({
|
|
type: 'error',
|
|
type: 'error',
|
|
- message: '不能删除合同审核状态为成功的数据'
|
|
|
|
|
|
+ message: '审核成功后不能修改状态'
|
|
})
|
|
})
|
|
- }else if(ids==""){
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (ids == "") {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'error',
|
|
type: 'error',
|
|
message: '请选择数据'
|
|
message: '请选择数据'
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.$request({
|
|
this.$request({
|
|
- url: "/api/Contract/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 1,
|
|
|
|
- },
|
|
|
|
|
|
+ url: "/api/Contract/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 4,
|
|
|
|
+ },
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
this.$refs.multipleTable.clearSelection();
|
|
this.$refs.multipleTable.clearSelection();
|
|
- this.multipleSelection="";
|
|
|
|
- this.getData();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- }
|
|
|
|
|
|
+ this.multipleSelection = "";
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- }else{ //管理员删除
|
|
|
|
- if(status.includes(1)){
|
|
|
|
|
|
+ },
|
|
|
|
+ Sfailed(id) {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Contract/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: [id],
|
|
|
|
+ operateType: 4,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ recover() {
|
|
|
|
+ const ids = Array.from(this.multipleSelection, ({
|
|
|
|
+ id
|
|
|
|
+ }) => id);
|
|
|
|
+ let status = Array.from(this.multipleSelection, ({
|
|
|
|
+ contractStatus
|
|
|
|
+ }) => contractStatus)
|
|
|
|
+ if (status.includes(0)) {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'error',
|
|
type: 'error',
|
|
- message: '不能删除合同状态已是删除状态的数据'
|
|
|
|
|
|
+ message: '不能恢复已是正常状态的账号'
|
|
})
|
|
})
|
|
- }else if(ids==""){
|
|
|
|
|
|
+ } else if (ids == "") {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'error',
|
|
type: 'error',
|
|
message: '请选择数据'
|
|
message: '请选择数据'
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.$request({
|
|
this.$request({
|
|
- url: "/api/Contract/manage",
|
|
|
|
- method: "post",
|
|
|
|
- data: {
|
|
|
|
- ids: ids,
|
|
|
|
- operateType: 1,
|
|
|
|
- },
|
|
|
|
|
|
+ url: "/api/Contract/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 2,
|
|
|
|
+ },
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
this.$refs.multipleTable.clearSelection();
|
|
this.$refs.multipleTable.clearSelection();
|
|
- this.multipleSelection="";
|
|
|
|
- this.getData();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: "danger",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.getData();
|
|
|
|
- }
|
|
|
|
|
|
+ this.multipleSelection = "";
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- // 合同状态查询
|
|
|
|
- handleCommand(command) {
|
|
|
|
- this.status = command;
|
|
|
|
- if (command === "正常") {
|
|
|
|
- this.formData.contractStatus = 2;
|
|
|
|
- }
|
|
|
|
- if (command === "删除") {
|
|
|
|
- this.formData.contractStatus = 1;
|
|
|
|
- }
|
|
|
|
- if (command === "全部") {
|
|
|
|
- this.formData.contractStatus = 0;
|
|
|
|
- }
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- },
|
|
|
|
|
|
|
|
- // 汇票状态查询
|
|
|
|
- handlehpCommand(command) {
|
|
|
|
- this.hpstatus = command;
|
|
|
|
- if (command === "全部") {
|
|
|
|
- this.formData.draftStatus = 0;
|
|
|
|
- }
|
|
|
|
- if (command === "待审核") {
|
|
|
|
- this.formData.draftStatus = 1;
|
|
|
|
- }
|
|
|
|
- if (command === "成功") {
|
|
|
|
- this.formData.draftStatus = 2;
|
|
|
|
- }
|
|
|
|
- if (command === "失败") {
|
|
|
|
- this.formData.draftStatus = 3;
|
|
|
|
- }
|
|
|
|
- if (command === "删除") {
|
|
|
|
- this.formData.draftStatus = 4;
|
|
|
|
- }
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
+ deleted() {
|
|
|
|
+ const ids = Array.from(this.multipleSelection, ({
|
|
|
|
+ id
|
|
|
|
+ }) => id);
|
|
|
|
+ let status = Array.from(this.multipleSelection, ({
|
|
|
|
+ contractStatus
|
|
|
|
+ }) => contractStatus)
|
|
|
|
+ let Auditstatus = Array.from(this.multipleSelection, ({
|
|
|
|
+ status
|
|
|
|
+ }) => status)
|
|
|
|
+ if (this.roleId === 999) { //供应商删除
|
|
|
|
+ if (status.includes(1)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '不能删除合同状态已是删除状态的数据'
|
|
|
|
+ })
|
|
|
|
+ } else if (Auditstatus.includes(1)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '不能删除合同审核状态为成功的数据'
|
|
|
|
+ })
|
|
|
|
+ } else if (ids == "") {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '请选择数据'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Contract/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 1,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
|
+ this.multipleSelection = "";
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ } else { //管理员删除
|
|
|
|
+ if (status.includes(1)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '不能删除合同状态已是删除状态的数据'
|
|
|
|
+ })
|
|
|
|
+ } else if (ids == "") {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '请选择数据'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Contract/manage",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ ids: ids,
|
|
|
|
+ operateType: 1,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
|
+ this.multipleSelection = "";
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "danger",
|
|
|
|
+ message: res.msg,
|
|
|
|
+ });
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 合同状态查询
|
|
|
|
+ handleCommand(command) {
|
|
|
|
+ this.status = command;
|
|
|
|
+ if (command === "正常") {
|
|
|
|
+ this.formData.contractStatus = 2;
|
|
|
|
+ }
|
|
|
|
+ if (command === "删除") {
|
|
|
|
+ this.formData.contractStatus = 1;
|
|
|
|
+ }
|
|
|
|
+ if (command === "全部") {
|
|
|
|
+ this.formData.contractStatus = 0;
|
|
|
|
+ }
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 汇票状态查询
|
|
|
|
+ handlehpCommand(command) {
|
|
|
|
+ this.hpstatus = command;
|
|
|
|
+ if (command === "全部") {
|
|
|
|
+ this.formData.draftStatus = 0;
|
|
|
|
+ }
|
|
|
|
+ if (command === "待审核") {
|
|
|
|
+ this.formData.draftStatus = 1;
|
|
|
|
+ }
|
|
|
|
+ if (command === "成功") {
|
|
|
|
+ this.formData.draftStatus = 2;
|
|
|
|
+ }
|
|
|
|
+ if (command === "失败") {
|
|
|
|
+ this.formData.draftStatus = 3;
|
|
|
|
+ }
|
|
|
|
+ if (command === "删除") {
|
|
|
|
+ this.formData.draftStatus = 4;
|
|
|
|
+ }
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ },
|
|
|
|
|
|
- // 合同审核状态查询
|
|
|
|
- handleCommandAuditstatus(command) {
|
|
|
|
- this.Auditstatus = command;
|
|
|
|
- if (command === "全部") {
|
|
|
|
- this.formData.approveStatus = 0;
|
|
|
|
- }
|
|
|
|
- if (command === "待审核") {
|
|
|
|
- this.formData.approveStatus = 1;
|
|
|
|
- }
|
|
|
|
- if (command === "成功") {
|
|
|
|
- this.formData.approveStatus = 2;
|
|
|
|
- }
|
|
|
|
- if (command === "失败") {
|
|
|
|
- this.formData.approveStatus = 3;
|
|
|
|
- }
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- },
|
|
|
|
|
|
+ // 合同审核状态查询
|
|
|
|
+ handleCommandAuditstatus(command) {
|
|
|
|
+ this.Auditstatus = command;
|
|
|
|
+ if (command === "全部") {
|
|
|
|
+ this.formData.approveStatus = 0;
|
|
|
|
+ }
|
|
|
|
+ if (command === "待审核") {
|
|
|
|
+ this.formData.approveStatus = 1;
|
|
|
|
+ }
|
|
|
|
+ if (command === "成功") {
|
|
|
|
+ this.formData.approveStatus = 2;
|
|
|
|
+ }
|
|
|
|
+ if (command === "失败") {
|
|
|
|
+ this.formData.approveStatus = 3;
|
|
|
|
+ }
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ },
|
|
|
|
|
|
- // 日期审核状态查询
|
|
|
|
- startEndTime(item) {
|
|
|
|
- if (item == null) {
|
|
|
|
- item = [];
|
|
|
|
- this.formData.startTime = "";
|
|
|
|
- this.formData.endTime = "";
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- } else {
|
|
|
|
- this.formData.startTime = this.value2[0];
|
|
|
|
- this.formData.endTime = this.value2[1];
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 合同名称/编号/承兑人名称/出票查询
|
|
|
|
- Search() {
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- },
|
|
|
|
- // 供应商查询
|
|
|
|
- searchName() {
|
|
|
|
- this.currentPage = 1;
|
|
|
|
- this.searchForm = { ...this.formData };
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- },
|
|
|
|
|
|
+ // 日期审核状态查询
|
|
|
|
+ startEndTime(item) {
|
|
|
|
+ if (item == null) {
|
|
|
|
+ item = [];
|
|
|
|
+ this.formData.startTime = "";
|
|
|
|
+ this.formData.endTime = "";
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ } else {
|
|
|
|
+ this.formData.startTime = this.value2[0];
|
|
|
|
+ this.formData.endTime = this.value2[1];
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 合同名称/编号/承兑人名称/出票查询
|
|
|
|
+ Search() {
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ },
|
|
|
|
+ // 供应商查询
|
|
|
|
+ searchName() {
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.searchForm = {
|
|
|
|
+ ...this.formData
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ },
|
|
|
|
|
|
- //是否显示供应商查询
|
|
|
|
- getSupplierName() {
|
|
|
|
- console.log(this.roles);
|
|
|
|
- if (this.roles[0] === "admin") {
|
|
|
|
- this.isOpenSupplierName = true;
|
|
|
|
- } else if (this.roles[0] === "salesman") {
|
|
|
|
- this.isOpenSupplierName = true;
|
|
|
|
- } else {
|
|
|
|
- this.isOpenSupplierName = false;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ //是否显示供应商查询
|
|
|
|
+ getSupplierName() {
|
|
|
|
+ console.log(this.roles);
|
|
|
|
+ if (this.roles[0] === "admin") {
|
|
|
|
+ this.isOpenSupplierName = true;
|
|
|
|
+ } else if (this.roles[0] === "salesman") {
|
|
|
|
+ this.isOpenSupplierName = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.isOpenSupplierName = false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
- /* 分页功能,改变当前页 */
|
|
|
|
- handleCurrentChange(val) {
|
|
|
|
- this.currentPage = val;
|
|
|
|
- this.getData(this.searchForm);
|
|
|
|
- },
|
|
|
|
|
|
+ /* 分页功能,改变当前页 */
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val;
|
|
|
|
+ this.getData(this.searchForm);
|
|
|
|
+ },
|
|
|
|
|
|
- /* 分页功能:去首页 */
|
|
|
|
- jumpFirstPage() {
|
|
|
|
- this.$refs.pagination.handleCurrentChange(1);
|
|
|
|
- this.$emit("handleCurrentChange", 1);
|
|
|
|
- },
|
|
|
|
|
|
+ /* 分页功能:去首页 */
|
|
|
|
+ jumpFirstPage() {
|
|
|
|
+ this.$refs.pagination.handleCurrentChange(1);
|
|
|
|
+ this.$emit("handleCurrentChange", 1);
|
|
|
|
+ },
|
|
|
|
|
|
- /* 分页功能:去尾页 */
|
|
|
|
- jumpLastPage() {
|
|
|
|
- const font = this.$refs.pagination;
|
|
|
|
- const cpage = Math.ceil(font.total / font.pageSize);
|
|
|
|
- font.handleCurrentChange(cpage);
|
|
|
|
- },
|
|
|
|
|
|
+ /* 分页功能:去尾页 */
|
|
|
|
+ jumpLastPage() {
|
|
|
|
+ const font = this.$refs.pagination;
|
|
|
|
+ const cpage = Math.ceil(font.total / font.pageSize);
|
|
|
|
+ font.handleCurrentChange(cpage);
|
|
|
|
+ },
|
|
|
|
|
|
- getRowKey(row) {
|
|
|
|
- return row.id;
|
|
|
|
- },
|
|
|
|
|
|
+ getRowKey(row) {
|
|
|
|
+ return row.id;
|
|
|
|
+ },
|
|
|
|
|
|
- /* 批量导出数据 */
|
|
|
|
- handleSelectionChange(data) {
|
|
|
|
- this.multipleSelection = data;
|
|
|
|
- },
|
|
|
|
- handleAll(data) {
|
|
|
|
- this.multipleSelection = data;
|
|
|
|
- },
|
|
|
|
|
|
+ /* 批量导出数据 */
|
|
|
|
+ handleSelectionChange(data) {
|
|
|
|
+ this.multipleSelection = data;
|
|
|
|
+ },
|
|
|
|
+ handleAll(data) {
|
|
|
|
+ this.multipleSelection = data;
|
|
|
|
+ },
|
|
|
|
|
|
- /* 导出 */
|
|
|
|
- batchExports() {
|
|
|
|
- if (this.multipleSelection == "") {
|
|
|
|
- this.Exports();
|
|
|
|
- } else {
|
|
|
|
- var tableHeader = [
|
|
|
|
- [
|
|
|
|
- "序号",
|
|
|
|
- "合同名称",
|
|
|
|
- "合同编号",
|
|
|
|
- "承兑人",
|
|
|
|
- "出票人",
|
|
|
|
- "汇票状态",
|
|
|
|
- "合同状态",
|
|
|
|
- "审核状态",
|
|
|
|
- "时间",
|
|
|
|
- ],
|
|
|
|
- ];
|
|
|
|
- var dataList = [];
|
|
|
|
- this.multipleSelection.forEach((item, index) => {
|
|
|
|
- dataList.push([
|
|
|
|
- index + 1,
|
|
|
|
- item.name,
|
|
|
|
- item.contractNo,
|
|
|
|
- item.acceptorName,
|
|
|
|
- item.drawersName,
|
|
|
|
- item.draftStatusText,
|
|
|
|
- item.contractStatusText,
|
|
|
|
- item.statusText,
|
|
|
|
- item.createdAt,
|
|
|
|
- ]);
|
|
|
|
- });
|
|
|
|
- dataConversionUtil.dataToExcel("合同列表", tableHeader, dataList);
|
|
|
|
- this.$message.success("导出成功!");
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ /* 导出 */
|
|
|
|
+ batchExports() {
|
|
|
|
+ if (this.multipleSelection == "") {
|
|
|
|
+ this.Exports();
|
|
|
|
+ } else {
|
|
|
|
+ var tableHeader = [
|
|
|
|
+ [
|
|
|
|
+ "序号",
|
|
|
|
+ "合同名称",
|
|
|
|
+ "合同编号",
|
|
|
|
+ "承兑人",
|
|
|
|
+ "出票人",
|
|
|
|
+ "汇票状态",
|
|
|
|
+ "合同状态",
|
|
|
|
+ "审核状态",
|
|
|
|
+ "时间",
|
|
|
|
+ ],
|
|
|
|
+ ];
|
|
|
|
+ var dataList = [];
|
|
|
|
+ this.multipleSelection.forEach((item, index) => {
|
|
|
|
+ dataList.push([
|
|
|
|
+ index + 1,
|
|
|
|
+ item.name,
|
|
|
|
+ item.contractNo,
|
|
|
|
+ item.acceptorName,
|
|
|
|
+ item.drawersName,
|
|
|
|
+ item.draftStatusText,
|
|
|
|
+ item.contractStatusText,
|
|
|
|
+ item.statusText,
|
|
|
|
+ item.createdAt,
|
|
|
|
+ ]);
|
|
|
|
+ });
|
|
|
|
+ dataConversionUtil.dataToExcel("合同列表", tableHeader, dataList);
|
|
|
|
+ this.$message.success("导出成功!");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
- /* 全部导出承兑人列表数据 */
|
|
|
|
- getContacts() {
|
|
|
|
- const data = {
|
|
|
|
- pageIndex: "",
|
|
|
|
- pageSize: -1,
|
|
|
|
- startTime: "",
|
|
|
|
- endTime: "",
|
|
|
|
- name: "",
|
|
|
|
- contractStatus: "",
|
|
|
|
- approveStatus: "",
|
|
|
|
- draftStatus: "",
|
|
|
|
- supplierId: "",
|
|
|
|
- };
|
|
|
|
- contractsPageApi({ ...data }).then((res) => {
|
|
|
|
- const { result } = res.data;
|
|
|
|
- this.multipleSelection = result;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- /* 全部导出 */
|
|
|
|
- Exports() {
|
|
|
|
- const data = {
|
|
|
|
- pageIndex: "",
|
|
|
|
- pageSize: -1,
|
|
|
|
- startTime: "",
|
|
|
|
- endTime: "",
|
|
|
|
- name: "",
|
|
|
|
- contractStatus: "",
|
|
|
|
- approveStatus: "",
|
|
|
|
- draftStatus: "",
|
|
|
|
- supplierId: "",
|
|
|
|
- };
|
|
|
|
- contractsPageApi({ ...data }).then((res) => {
|
|
|
|
- const { result } = res.data;
|
|
|
|
- this.multipleSelection = result;
|
|
|
|
- var tableHeader = [
|
|
|
|
- [
|
|
|
|
- "序号",
|
|
|
|
- "合同名称",
|
|
|
|
- "合同编号",
|
|
|
|
- "承兑人",
|
|
|
|
- "出票人",
|
|
|
|
- "汇票状态",
|
|
|
|
- "合同状态",
|
|
|
|
- "审核状态",
|
|
|
|
- "时间",
|
|
|
|
- ],
|
|
|
|
- ];
|
|
|
|
- var dataList = [];
|
|
|
|
- this.multipleSelection.forEach((item, index) => {
|
|
|
|
- dataList.push([
|
|
|
|
- index + 1,
|
|
|
|
- item.name,
|
|
|
|
- item.contractNo,
|
|
|
|
- item.acceptorName,
|
|
|
|
- item.drawersName,
|
|
|
|
- item.draftStatusText,
|
|
|
|
- item.contractStatusText,
|
|
|
|
- item.statusText,
|
|
|
|
- item.createdAt,
|
|
|
|
- ]);
|
|
|
|
- });
|
|
|
|
- dataConversionUtil.dataToExcel("合同列表", tableHeader, dataList);
|
|
|
|
- this.$message.success("导出成功!");
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-};
|
|
|
|
|
|
+ /* 全部导出承兑人列表数据 */
|
|
|
|
+ getContacts() {
|
|
|
|
+ const data = {
|
|
|
|
+ pageIndex: "",
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ name: "",
|
|
|
|
+ contractStatus: "",
|
|
|
|
+ approveStatus: "",
|
|
|
|
+ draftStatus: "",
|
|
|
|
+ supplierId: "",
|
|
|
|
+ };
|
|
|
|
+ contractsPageApi({
|
|
|
|
+ ...data
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ const {
|
|
|
|
+ result
|
|
|
|
+ } = res.data;
|
|
|
|
+ this.multipleSelection = result;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /* 全部导出 */
|
|
|
|
+ Exports() {
|
|
|
|
+ const data = {
|
|
|
|
+ pageIndex: "",
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ name: "",
|
|
|
|
+ contractStatus: "",
|
|
|
|
+ approveStatus: "",
|
|
|
|
+ draftStatus: "",
|
|
|
|
+ supplierId: "",
|
|
|
|
+ };
|
|
|
|
+ contractsPageApi({
|
|
|
|
+ ...data
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ const {
|
|
|
|
+ result
|
|
|
|
+ } = res.data;
|
|
|
|
+ this.multipleSelection = result;
|
|
|
|
+ var tableHeader = [
|
|
|
|
+ [
|
|
|
|
+ "序号",
|
|
|
|
+ "合同名称",
|
|
|
|
+ "合同编号",
|
|
|
|
+ "承兑人",
|
|
|
|
+ "出票人",
|
|
|
|
+ "汇票状态",
|
|
|
|
+ "合同状态",
|
|
|
|
+ "审核状态",
|
|
|
|
+ "时间",
|
|
|
|
+ ],
|
|
|
|
+ ];
|
|
|
|
+ var dataList = [];
|
|
|
|
+ this.multipleSelection.forEach((item, index) => {
|
|
|
|
+ dataList.push([
|
|
|
|
+ index + 1,
|
|
|
|
+ item.name,
|
|
|
|
+ item.contractNo,
|
|
|
|
+ item.acceptorName,
|
|
|
|
+ item.drawersName,
|
|
|
|
+ item.draftStatusText,
|
|
|
|
+ item.contractStatusText,
|
|
|
|
+ item.statusText,
|
|
|
|
+ item.createdAt,
|
|
|
|
+ ]);
|
|
|
|
+ });
|
|
|
|
+ dataConversionUtil.dataToExcel("合同列表", tableHeader, dataList);
|
|
|
|
+ this.$message.success("导出成功!");
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ };
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-.pulldown {
|
|
|
|
- width: 185px;
|
|
|
|
- height: 40px;
|
|
|
|
- border: 1px solid #e8e8e8;
|
|
|
|
- border-radius: 10px;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- padding: 0 20px;
|
|
|
|
- color: #999999;
|
|
|
|
-}
|
|
|
|
|
|
+ .pulldown {
|
|
|
|
+ width: 185px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ border: 1px solid #e8e8e8;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ padding: 0 20px;
|
|
|
|
+ color: #999999;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .pagesip {
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin: 20px auto;
|
|
|
|
+ padding-right: 50px;
|
|
|
|
+ display: flex;
|
|
|
|
+ // align-items: center;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+ }
|
|
|
|
|
|
-.pagesip {
|
|
|
|
- width: 100%;
|
|
|
|
- margin: 20px auto;
|
|
|
|
- padding-right: 50px;
|
|
|
|
- display: flex;
|
|
|
|
- // align-items: center;
|
|
|
|
- justify-content: flex-end;
|
|
|
|
-}
|
|
|
|
|
|
+ .el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
|
|
+ background-color: #d8ab5a;
|
|
|
|
+ }
|
|
|
|
|
|
-.el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
|
|
- background-color: #d8ab5a;
|
|
|
|
-}
|
|
|
|
|
|
+ .el-col {
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
|
|
-.el-col {
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
-}
|
|
|
|
-.btn {
|
|
|
|
- padding: 20px;
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|
|
|
|
+ .btn {
|
|
|
|
+ padding: 20px;
|
|
|
|
+ }
|
|
|
|
+</style>
|