| xqd
@@ -27,8 +27,8 @@
|
|
|
<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-item command="成功">成功</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="失败">失败</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
| xqd
@@ -170,26 +170,29 @@
|
|
|
>
|
|
|
<template slot-scope="scope"> {{ scope.row.interest }}% </template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column align="center" label="审核状态" prop="statusText">
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+ <el-table-column align="center" label="时间" prop="createdAt" width="200">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" label="操作" width="300">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
|
type="primary"
|
|
|
style="cursor: pointer; margin-right: 15px"
|
|
|
+ v-if="scope.row.status != 1"
|
|
|
@click="success(scope.row.id)"
|
|
|
v-permission="['admin', 'salesman']"
|
|
|
- v-if="scope.row.status != 1"
|
|
|
- >审核通过
|
|
|
+ >审核成功
|
|
|
</el-tag>
|
|
|
<el-tag
|
|
|
type="primary"
|
|
|
style="cursor: pointer; margin-right: 15px"
|
|
|
+ v-if="scope.row.status != 2"
|
|
|
@click="fail(scope.row.id)"
|
|
|
v-permission="['admin', 'salesman']"
|
|
|
- v-if="scope.row.status != 2"
|
|
|
- >审核不通过
|
|
|
+
|
|
|
+ >审核失败
|
|
|
</el-tag>
|
|
|
<el-tag
|
|
|
type="primary"
|
| xqd
@@ -243,398 +246,6 @@
|
|
|
|
|
|
|
|
|
<script>
|
|
|
-<<<<<<< HEAD
|
|
|
- import {
|
|
|
- dataConversionUtil
|
|
|
- } from "../../utils/Excel.js";
|
|
|
- import {
|
|
|
- getSupplierAcceptor
|
|
|
- } from "@/api/supplierAcceptor";
|
|
|
- import {
|
|
|
- getAcceptorSearch
|
|
|
- } from "@/api/acceptor";
|
|
|
- export default {
|
|
|
- filters: {
|
|
|
- statusFilter(status) {
|
|
|
- const statusMap = {
|
|
|
- published: "success",
|
|
|
- draft: "gray",
|
|
|
- deleted: "danger",
|
|
|
- };
|
|
|
- return statusMap[status];
|
|
|
- },
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- // 角色ID
|
|
|
- roleId: '',
|
|
|
- // 弹窗显示 1修改信息 2新增
|
|
|
- dialogVisible1: false,
|
|
|
- dialogVisible2: false,
|
|
|
- // 表单数据
|
|
|
- formData: {
|
|
|
- pageIndex:'',
|
|
|
- pageSize:'',
|
|
|
- startTime: "",
|
|
|
- endTime: "",
|
|
|
- status: "", // 审核状态
|
|
|
- supplierId: "", //供应商ID
|
|
|
- supplierName:'', //供应商名称
|
|
|
- acceptorName:'',
|
|
|
- },
|
|
|
- //承兑人列表
|
|
|
- acceptorList: '',
|
|
|
- // 新增承兑人数据
|
|
|
- form: {
|
|
|
- supplierId: '',
|
|
|
- acceptorIds: [],
|
|
|
- },
|
|
|
- /* 当前页数 */
|
|
|
- currentPage: 1,
|
|
|
- /* 每页显示个数 */
|
|
|
- pagesize: 10,
|
|
|
- /* 总条数 */
|
|
|
- total: 20,
|
|
|
- srcList: [],
|
|
|
- list: [],
|
|
|
- listLoading: false,
|
|
|
- status: "",
|
|
|
- search: "",
|
|
|
- temporaryList: [],
|
|
|
- multipleSelection: [],
|
|
|
- hpstatus: "",
|
|
|
- checked: false,
|
|
|
- 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]);
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- value1: "",
|
|
|
- value2: "",
|
|
|
- exportExcelData1: [], //列表缓存数据
|
|
|
- exportExcelData2: [],
|
|
|
- };
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.roleId = this.$store.state.user.userInfo.roleId;
|
|
|
- this.checked = this.$store.state.user.checked;
|
|
|
- // 获取供应商列表传递的供应商id
|
|
|
- this.formData.supplierId = this.$route.params.id
|
|
|
- // 获取供应商id
|
|
|
- this.form.supplierId = this.$store.state.user.userInfo.id
|
|
|
-
|
|
|
- if (this.formData.supplierId == "") {
|
|
|
- this.getAllList()
|
|
|
- } else {
|
|
|
- this.searchForm = {
|
|
|
- ...this.formData,
|
|
|
- };
|
|
|
- this.getAllList(this.searchForm);
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- /* 获取列表数据 */
|
|
|
- getAllList(searchForm = {}) {
|
|
|
- const params = {
|
|
|
- pageIndex: this.currentPage,
|
|
|
- pageSize: this.pagesize,
|
|
|
- };
|
|
|
- getSupplierAcceptor({
|
|
|
- ...params,
|
|
|
- ...searchForm,
|
|
|
- }).then((res) => {
|
|
|
- const {
|
|
|
- data
|
|
|
- } = res;
|
|
|
- console.log(res, "res");
|
|
|
- this.temporaryList = data.result;
|
|
|
- this.srcList = data.result;
|
|
|
- this.total = res.data.total;
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- // 获取承兑人列表
|
|
|
- getAcceptor(searchForm = {}) {
|
|
|
- this.dialogVisible2 = true
|
|
|
- const params = {
|
|
|
- pageIndex: '',
|
|
|
- pageSize: -1
|
|
|
- };
|
|
|
- getAcceptorSearch({
|
|
|
- ...params,
|
|
|
- ...searchForm,
|
|
|
- }).then((res) => {
|
|
|
- this.acceptorList = res.data.result
|
|
|
- });
|
|
|
- },
|
|
|
- /* 输入供应商名称查询 */
|
|
|
- Search() {
|
|
|
- let name=this.srcList.filter((item)=>item.supplierName===this.formData.supplierName)
|
|
|
- this.form.supplierId=name[0].supplierId
|
|
|
- this.currentPage = 1;
|
|
|
- this.searchForm = {
|
|
|
- ...this.formData,
|
|
|
- };
|
|
|
- console.log(this.searchForm)
|
|
|
- this.getAllList(this.searchForm);
|
|
|
- },
|
|
|
- // 添加承兑人
|
|
|
- addAcceptor() {
|
|
|
- this.$request({
|
|
|
- url: '/api/SupplierAcceptor',
|
|
|
- method: 'post',
|
|
|
- data: this.form
|
|
|
- }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: "添加成功!"
|
|
|
- })
|
|
|
- this.getAllList()
|
|
|
- }
|
|
|
- })
|
|
|
- this.dialogVisible2 = false
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
- // 重新提交
|
|
|
- Resubmit(supplierId, acceptorId) {
|
|
|
- this.$request({
|
|
|
- url: '/api/SupplierAcceptor',
|
|
|
- method: 'post',
|
|
|
- data: {
|
|
|
- supplierId: supplierId,
|
|
|
- acceptorIds: [acceptorId]
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- console.log(res)
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: "提交成功!"
|
|
|
- })
|
|
|
- this.getAllList()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- // 批量审核成功
|
|
|
- successes() {
|
|
|
- let 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/SupplierAcceptor/update",
|
|
|
- method: "post",
|
|
|
- data: {
|
|
|
- ids: ids,
|
|
|
- status: 1,
|
|
|
- },
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "审核成功",
|
|
|
- });
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- this.multipleSelection = "";
|
|
|
- this.getAllList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "danger",
|
|
|
- message: "审核失败",
|
|
|
- });
|
|
|
- this.getAllList();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- // 单个审核通过
|
|
|
- success(id) {
|
|
|
- this.$request({
|
|
|
- url: '/api/SupplierAcceptor/update',
|
|
|
- method: "post",
|
|
|
- data: {
|
|
|
- ids: [id],
|
|
|
- status: 1,
|
|
|
- },
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "审核成功",
|
|
|
- });
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- this.multipleSelection = "";
|
|
|
- this.getAllList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "danger",
|
|
|
- message: "审核失败",
|
|
|
- });
|
|
|
- this.getAllList();
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- // 批量审核不通过
|
|
|
- failed() {
|
|
|
- let 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/SupplierAcceptor/update",
|
|
|
- method: "post",
|
|
|
- data: {
|
|
|
- ids: ids,
|
|
|
- status: 2,
|
|
|
- },
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "审核成功",
|
|
|
- });
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- this.multipleSelection = "";
|
|
|
- this.getAllList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "danger",
|
|
|
- message: "审核失败",
|
|
|
- });
|
|
|
- this.getAllList();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- // 单个审核不通过
|
|
|
- fail(id) {
|
|
|
- this.$request({
|
|
|
- url: '/api/SupplierAcceptor/update',
|
|
|
- method: "post",
|
|
|
- data: {
|
|
|
- ids: [id],
|
|
|
- status: 2,
|
|
|
- },
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "审核成功",
|
|
|
- });
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- this.multipleSelection = "";
|
|
|
- this.getAllList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "danger",
|
|
|
- message: "审核失败",
|
|
|
- });
|
|
|
- this.getAllList();
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- // 批量删除
|
|
|
- deleteStatuses() {
|
|
|
- let ids = Array.from(this.multipleSelection, ({
|
|
|
- id
|
|
|
- }) => id)
|
|
|
- if (ids == "") {
|
|
|
- this.$message({
|
|
|
- type: 'error',
|
|
|
- message: '请选择数据'
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$confirm('您确定要删除吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.$request({
|
|
|
- url: "/api/SupplierAcceptor/delete",
|
|
|
- method: "post",
|
|
|
- data: ids
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "删除成功",
|
|
|
- });
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- this.multipleSelection = "";
|
|
|
- this.getAllList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "danger",
|
|
|
- message: "删除失败",
|
|
|
- });
|
|
|
- this.getAllList();
|
|
|
- }
|
|
|
- });
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消删除'
|
|
|
- });
|
|
|
- })
|
|
|
-=======
|
|
|
import { dataConversionUtil } from "../../utils/Excel.js";
|
|
|
import { getSupplierAcceptor } from "@/api/supplierAcceptor";
|
|
|
import { getAcceptorSearch } from "@/api/acceptor";
|
| xqd
@@ -760,10 +371,10 @@ export default {
|
|
|
type: "success",
|
|
|
message: "添加成功!",
|
|
|
});
|
|
|
+ this.getAllList();
|
|
|
}
|
|
|
});
|
|
|
this.dialogVisible2 = false;
|
|
|
- this.getAllList();
|
|
|
},
|
|
|
|
|
|
// 重新提交
|
| xqd
@@ -777,14 +388,13 @@ export default {
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
- console.log(res);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "提交成功!",
|
|
|
});
|
|
|
+ this.getAllList();
|
|
|
}
|
|
|
});
|
|
|
- this.getAllList();
|
|
|
},
|
|
|
|
|
|
// 批量审核成功
|
| xqd
@@ -1013,10 +623,10 @@ export default {
|
|
|
if (command === "待审核") {
|
|
|
this.formData.status = 0;
|
|
|
}
|
|
|
- if (command === "通过") {
|
|
|
+ if (command === "成功") {
|
|
|
this.formData.status = 1;
|
|
|
}
|
|
|
- if (command === "不通过") {
|
|
|
+ if (command === "失败") {
|
|
|
this.formData.status = 2;
|
|
|
}
|
|
|
if (command === "全部") {
|
| xqd
@@ -1152,7 +762,6 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
->>>>>>> 8d3c049c352701eacdc0059c004d3702069c33b3
|
|
|
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|