浏览代码

8.5 17.40

Tartarus 2 年之前
父节点
当前提交
d88d965fa0
共有 7 个文件被更改,包括 1874 次插入1825 次删除
  1. 151 91
      src/views/contracts/index.vue
  2. 723 731
      src/views/delivery/index.vue
  3. 241 270
      src/views/form/index.vue
  4. 653 648
      src/views/management/index.vue
  5. 14 27
      src/views/mine/index.vue
  6. 16 13
      src/views/sucuirtyaudit/detail.vue
  7. 76 45
      src/views/table/index.vue

+ 151 - 91
src/views/contracts/index.vue

xqd xqd xqd xqd
@@ -109,6 +109,7 @@
       element-loading-text="Loading"
       border
       fit
+			ref="multipleTable"
       highlight-current-row
       @select="handleSelectionChange"
       @select-all="handleAll"
@@ -398,30 +399,44 @@ export default {
       });
     },
     successed() {
-      // let successed = this.list.filter(item => item.id === id)
       const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      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.getData();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getData();
-        }
-      });
+			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,
+				  },
+				}).then((res) => {
+				  if (res.code === 200) {
+				    this.$message({
+				      type: "success",
+				      message: res.msg,
+				    });
+						this.$refs.multipleTable.clearSelection();
+				    this.getData();
+				  } else {
+				    this.$message({
+				      type: "danger",
+				      message: res.msg,
+				    });
+				    this.getData();
+				  }
+				});
+			}
+      
     },
     Ssuccessed(id) {
       this.$request({
@@ -449,28 +464,43 @@ export default {
     },
     failed() {
       const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      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.getData();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getData();
-        }
-      });
+			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.getData();
+				  } else {
+				    this.$message({
+				      type: "danger",
+				      message: res.msg,
+				    });
+				    this.getData();
+				  }
+				});
+			}
+      
     },
     Sfailed(id) {
       this.$request({
@@ -496,55 +526,85 @@ export default {
         }
       });
     },
-    recover(id) {
+    recover() {
       const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      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.getData();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getData();
-        }
-      });
+	  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.getData();
+		    } else {
+		      this.$message({
+		        type: "danger",
+		        message: res.msg,
+		      });
+		      this.getData();
+		    }
+		  });
+	  }
+      
     },
     deleted() {
-      const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      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.getData();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getData();
-        }
-      });
+			const ids = Array.from(this.multipleSelection, ({ id }) => id);
+			let status=Array.from(this.multipleSelection,({contractStatus})=>contractStatus)
+			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.getData();
+				  } else {
+				    this.$message({
+				      type: "danger",
+				      message: res.msg,
+				    });
+				    this.getData();
+				  }
+				});
+			}
+     
     },
     // 合同状态查询
     handleCommand(command) {

+ 723 - 731
src/views/delivery/index.vue

xqd
@@ -1,762 +1,754 @@
 <template>
-  <div class="app-container">
-    <el-row type="flex" justify="space-around" style="margin-bottom: 20px">
-      <div class="grid-content bg-purple">
-        <el-input
-          placeholder="请输入供应商名称"
-          v-model="formData.name"
-          @change="Search"
-          clearable
-          style="width: 100%"
-        >
-          <i slot="prefix" class="el-input__icon el-icon-search"></i>
-        </el-input>
-      </div>
-      <!-- 审核状态 -->
-      <div class="grid-content bg-purple">
-        <el-dropdown @command="handleCommand">
-          <div class="pulldown">
-            <span v-if="!providerStatus" class="el-dropdown-link">
-              供应商状态
-            </span>
-            <span v-if="providerStatus" class="el-dropdown-link">
-              {{ providerStatus }}
-            </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="AhandleCommand">
-          <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-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>
-    <el-table
-      :row-key="getRowKey"
-      v-loading="listLoading"
-      :data="temporaryList"
-      element-loading-text="Loading"
-      border
-      fit
-      highlight-current-row
-      @selection-change="handleSelectionChange"
-      @select-all="handleAll"
-    >
-      <el-table-column type="selection" :reserve-selection="true"> </el-table-column>
-      <el-table-column
-        label="供应商名称"
-        align="center"
-        prop="name"
-        width="200"
-      >
-      </el-table-column>
-      <el-table-column
-        label="统一社会信用代码"
-        width="200"
-        align="center"
-        prop="socialCode"
-      >
-      </el-table-column>
-      <el-table-column label="账号" width="150" align="center" prop="account">
-      </el-table-column>
-      <el-table-column
-        label="法人姓名"
-        width="180"
-        align="center"
-        prop="legalPerson"
-      >
-      </el-table-column>
-      <el-table-column
-        label="联系人"
-        width="180"
-        align="center"
-        prop="contacts"
-      >
-      </el-table-column>
+	<div class="app-container">
+		<el-row type="flex" justify="space-around" style="margin-bottom: 20px">
+			<div class="grid-content bg-purple">
+				<el-input placeholder="请输入供应商名称" v-model="formData.name" @change="Search" clearable style="width: 100%">
+					<i slot="prefix" class="el-input__icon el-icon-search"></i>
+				</el-input>
+			</div>
+			<!-- 审核状态 -->
+			<div class="grid-content bg-purple">
+				<el-dropdown @command="handleCommand">
+					<div class="pulldown">
+						<span v-if="!providerStatus" class="el-dropdown-link">
+							供应商状态
+						</span>
+						<span v-if="providerStatus" class="el-dropdown-link">
+							{{ providerStatus }}
+						</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="AhandleCommand">
+					<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-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>
+		<el-table :row-key="getRowKey" v-loading="listLoading" :data="temporaryList" element-loading-text="Loading"
+			border fit ref="multipleTable" highlight-current-row @selection-change="handleSelectionChange"
+			@select-all="handleAll">
+			<el-table-column type="selection" :reserve-selection="true"> </el-table-column>
+			<el-table-column label="供应商名称" align="center" prop="name" width="200">
+			</el-table-column>
+			<el-table-column label="统一社会信用代码" width="200" align="center" prop="socialCode">
+			</el-table-column>
+			<el-table-column label="账号" width="150" align="center" prop="account">
+			</el-table-column>
+			<el-table-column label="法人姓名" width="180" align="center" prop="legalPerson">
+			</el-table-column>
+			<el-table-column label="联系人" width="180" align="center" prop="contacts">
+			</el-table-column>
 
-      <el-table-column
-        label="联系电话"
-        width="180"
-        align="center"
-        prop="contactsMobile"
-      >
-      </el-table-column>
-      <el-table-column label="审核状态" align="center" prop="statusText">
-      </el-table-column>
-      <el-table-column
-        label="供应商状态"
-        align="center"
-        prop="isDeletedText"
-        width="120"
-      >
-      </el-table-column>
-      <el-table-column align="center" prop="createdAt" label="时间" width="180">
-      </el-table-column>
-      <el-table-column
-        align="center"
-        prop="created_at"
-        label="操作"
-        width="250"
-      >
-        <template slot-scope="scope">
-          <el-tag
-            type="primary"
-            style="cursor: pointer; margin-right: 15px"
-            @click="toedit(scope.row.id)"
-            >详情
-          </el-tag>
-          <el-tag
-            type="success"
-            style="margin-right: 15px; cursor: pointer"
-            @click="Srecover(scope.row.id)"
-            v-if="scope.row.isDeleted == 1"
-            >恢复</el-tag
-          >
-          <el-tag
-            type="danger"
-            style="margin-right: 15px; cursor: pointer"
-            @click="Sdeleted(scope.row.id)"
-            v-if="scope.row.isDeleted == 0"
-            >禁用</el-tag
-          >
-          <el-tag
-            type="primary"
-            style="margin-right: 15px; cursor: pointer"
-            @click="reset(scope.row.id)"
-            v-permission="['admin']"
-            >重置密码</el-tag
-          >
-        </template>
-      </el-table-column>
-    </el-table>
+			<el-table-column label="联系电话" width="180" align="center" prop="contactsMobile">
+			</el-table-column>
+			<el-table-column label="审核状态" align="center" prop="statusText">
+			</el-table-column>
+			<el-table-column label="供应商状态" align="center" prop="isDeletedText" width="120">
+			</el-table-column>
+			<el-table-column align="center" prop="createdAt" label="时间" width="180">
+			</el-table-column>
+			<el-table-column align="center" prop="created_at" label="操作" width="250">
+				<template slot-scope="scope">
+					<el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="toedit(scope.row.id)">详情
+					</el-tag>
+					<el-tag type="success" style="margin-right: 15px; cursor: pointer" @click="Srecover(scope.row.id)"
+						v-if="scope.row.isDeleted == 1">恢复</el-tag>
+					<el-tag type="danger" style="margin-right: 15px; cursor: pointer" @click="Sdeleted(scope.row.id)"
+						v-if="scope.row.isDeleted == 0">删除</el-tag>
+					<el-tag type="primary" style="margin-right: 15px; cursor: pointer" @click="reset(scope.row.id)"
+						v-permission="['admin']">重置密码</el-tag>
+				</template>
+			</el-table-column>
+		</el-table>
 
-    <!-- 重置密码弹窗 -->
-    <el-dialog title="重置密码" :visible.sync="dialogVisible" width="30%">
-      <el-form ref="form" :model="password" label-width="80px">
-        <el-form-item label="登录密码" prop="password.newpassword">
-          <el-input
-            v-model="password.newpassword"
-            style="width: 300px"
-            show-password
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="确认密码" prop="password.ConfirmnewPassword">
-          <el-input
-            v-model="password.ConfirmnewPassword"
-            style="width: 300px"
-            show-password
-          ></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="onSubmit">提交修改</el-button>
-        </el-form-item>
-      </el-form>
-    </el-dialog>
+		<!-- 重置密码弹窗 -->
+		<el-dialog title="重置密码" :visible.sync="dialogVisible" width="30%">
+			<el-form ref="form" :model="password" label-width="80px">
+				<el-form-item label="登录密码" prop="password.newpassword">
+					<el-input v-model="password.newpassword" style="width: 300px" show-password></el-input>
+				</el-form-item>
+				<el-form-item label="确认密码" prop="password.ConfirmnewPassword">
+					<el-input v-model="password.ConfirmnewPassword" style="width: 300px" show-password></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button @click="dialogVisible = false">取 消</el-button>
+					<el-button type="primary" @click="onSubmit">提交修改</el-button>
+				</el-form-item>
+			</el-form>
+		</el-dialog>
 
-    <div style="display: flex; justify-content: space-between">
-      <el-row type="flex" justify="end">
-        <div class="btn" style="display: flex; justify-content: flex-end">
-          <el-button type="primary" @click="failed">认证失败</el-button>
-          <el-button type="primary" @click="success">认证成功</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="
+		<div style="display: flex; justify-content: space-between">
+			<el-row type="flex" justify="end">
+				<div class="btn" style="display: flex; justify-content: flex-end">
+					<el-button type="primary" @click="failed">认证失败</el-button>
+					<el-button type="primary" @click="success">认证成功</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;
             border-color: #d8ab5a;
             margin: 0 20px;
-          "
-          @click="jumpFirstPage"
-          >首页
-        </el-button>
-        <el-pagination
-          background
-          @current-change="handleCurrentChange"
-          layout="total,prev, pager, next"
-          :total="total"
-          :page-size="pagesize"
-          :current-page="currentPage"
-          prev-text="上一页"
-          next-text="下一页"
-          :hide-on-single-page="false"
-          ref="pagination"
-        >
-        </el-pagination>
-        <el-button
-          type="primary"
-          size="small"
-          style="
+          " @click="jumpFirstPage">首页
+				</el-button>
+				<el-pagination background @current-change="handleCurrentChange" layout="total,prev, pager, next"
+					:total="total" :page-size="pagesize" :current-page="currentPage" prev-text="上一页" next-text="下一页"
+					:hide-on-single-page="false" ref="pagination">
+				</el-pagination>
+				<el-button type="primary" size="small" style="
             background-color: #d8ab5a;
             border-color: #d8ab5a;
             margin: 0 20px;
-          "
-          @click="jumpLastPage"
-          >尾页
-        </el-button>
-      </div>
-    </div>
-  </div>
+          " @click="jumpLastPage">尾页
+				</el-button>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import { dataConversionUtil } from "../../utils/Excel.js";
-import { getSupplierSearch } from "@/api/supplier";
+	import {
+		dataConversionUtil
+	} from "../../utils/Excel.js";
+	import {
+		getSupplierSearch
+	} from "@/api/supplier";
 
-export default {
-  filters: {
-    statusFilter(status) {
-      const statusMap = {
-        published: "success",
-        draft: "gray",
-        deleted: "danger",
-      };
-      return statusMap[status];
-    },
-  },
-  data() {
-    return {
-      //重置密码
-      password: {
-        newpassword: "",
-        ConfirmnewPassword: "",
-        supplierId: "",
-      },
-      // 控制弹窗
-      dialogVisible: false,
-      // 表单数据
-      formData: {
-        startTime: "",
-        endTime: "",
-        name: "",
-        status: "",
-        socialCode: "",
-        legalPerson: "",
-        isDeleted: "",
-      },
-      /* 当前页数 */
-      currentPage: 1,
-      /* 每页显示个数 */
-      pagesize: 10,
-      /* 总条数 */
-      total: 20,
-      srcList: [],
-      list: [],
-      temporaryList: [],
-      listLoading: false,
-      providerStatus: "",
-      search: "",
-      Auditstatus: "",
-      multipleSelection: [],
-      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.checked = this.$store.state.user.checked;
-    this.getAllList();
-  },
-  methods: {
-    /* 获取列表数据 */
-    getAllList(searchForm = {}) {
-      const params = {
-        pageIndex: this.currentPage,
-        pageSize: this.pagesize,
-      };
-      getSupplierSearch({ ...params, ...searchForm }).then((res) => {
-        const { data } = res;
-        this.temporaryList = data.result;
-        this.srcList = data.result;
-        this.total = res.data.total;
-      });
-    },
+	export default {
+		filters: {
+			statusFilter(status) {
+				const statusMap = {
+					published: "success",
+					draft: "gray",
+					deleted: "danger",
+				};
+				return statusMap[status];
+			},
+		},
+		data() {
+			return {
+				//重置密码
+				password: {
+					newpassword: "",
+					ConfirmnewPassword: "",
+					supplierId: "",
+				},
+				// 控制弹窗
+				dialogVisible: false,
+				// 表单数据
+				formData: {
+					startTime: "",
+					endTime: "",
+					name: "",
+					status: "",
+					socialCode: "",
+					legalPerson: "",
+					isDeleted: "",
+				},
+				/* 当前页数 */
+				currentPage: 1,
+				/* 每页显示个数 */
+				pagesize: 10,
+				/* 总条数 */
+				total: 20,
+				srcList: [],
+				list: [],
+				temporaryList: [],
+				listLoading: false,
+				providerStatus: "",
+				search: "",
+				Auditstatus: "",
+				multipleSelection: [],
+				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.checked = this.$store.state.user.checked;
+			this.getAllList();
+		},
+		methods: {
+			/* 获取列表数据 */
+			getAllList(searchForm = {}) {
+				const params = {
+					pageIndex: this.currentPage,
+					pageSize: this.pagesize,
+				};
+				getSupplierSearch({
+					...params,
+					...searchForm
+				}).then((res) => {
+					const {
+						data
+					} = res;
+					this.temporaryList = data.result;
+					this.srcList = data.result;
+					this.total = res.data.total;
+				});
+			},
 
-    toedit(id) {
-      this.$router.push({
-        path: "/edit",
-        query: {
-          id: id,
-        },
-      });
-    },
+			toedit(id) {
+				this.$router.push({
+					path: "/edit",
+					query: {
+						id: id,
+					},
+				});
+			},
 
-    // 日期审核状态查询
-    startEndTime(item) {
-      if (item == null) {
-        item = [];
-        this.formData.startTime = "";
-        this.formData.endTime = "";
-        this.currentPage = 1;
-        this.searchForm = { ...this.formData };
-        this.getAllList(this.searchForm);
-      } else {
-        this.formData.startTime = this.value2[0];
-        this.formData.endTime = this.value2[1];
-        this.currentPage = 1;
-        this.searchForm = { ...this.formData };
-        this.getAllList(this.searchForm);
-      }
-    },
-    /* 审核状态查询 */
-    handleCommand(command) {
-      this.providerStatus = command;
-      if (command === "全部") {
-        this.formData.isDeleted = "";
-      }
-      if (command === "正常") {
-        this.formData.isDeleted = 0;
-      }
-      if (command === "删除") {
-        this.formData.isDeleted = 1;
-      }
-      this.currentPage = 1;
-      this.searchForm = { ...this.formData };
-      this.getAllList(this.searchForm);
-    },
+			// 日期审核状态查询
+			startEndTime(item) {
+				if (item == null) {
+					item = [];
+					this.formData.startTime = "";
+					this.formData.endTime = "";
+					this.currentPage = 1;
+					this.searchForm = {
+						...this.formData
+					};
+					this.getAllList(this.searchForm);
+				} else {
+					this.formData.startTime = this.value2[0];
+					this.formData.endTime = this.value2[1];
+					this.currentPage = 1;
+					this.searchForm = {
+						...this.formData
+					};
+					this.getAllList(this.searchForm);
+				}
+			},
+			/* 审核状态查询 */
+			handleCommand(command) {
+				this.providerStatus = command;
+				if (command === "全部") {
+					this.formData.isDeleted = "";
+				}
+				if (command === "正常") {
+					this.formData.isDeleted = 0;
+				}
+				if (command === "删除") {
+					this.formData.isDeleted = 1;
+				}
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData
+				};
+				this.getAllList(this.searchForm);
+			},
 
-    // 输入供应商状态查询
-    AhandleCommand(command) {
-      this.Auditstatus = command;
-      if (command === "全部") {
-        this.formData.status = "";
-      }
-      if (command === "已认证") {
-        this.formData.status = 2;
-      }
-      if (command === "未认证") {
-        this.formData.status = 1;
-      }
-      this.currentPage = 1;
-      this.searchForm = { ...this.formData };
-      this.getAllList(this.searchForm);
-    },
+			// 输入供应商状态查询
+			AhandleCommand(command) {
+				this.Auditstatus = command;
+				if (command === "全部") {
+					this.formData.status = "";
+				}
+				if (command === "已认证") {
+					this.formData.status = 2;
+				}
+				if (command === "未认证") {
+					this.formData.status = 1;
+				}
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData
+				};
+				this.getAllList(this.searchForm);
+			},
 
-    /* 输入出票人名称查询 */
-    Search() {
-      this.currentPage = 1;
-      this.searchForm = {
-        ...this.formData,
-      };
-      this.getAllList(this.searchForm);
-    },
+			/* 输入出票人名称查询 */
+			Search() {
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData,
+				};
+				this.getAllList(this.searchForm);
+			},
 
-    /* 分页功能,改变当前页 */
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getAllList(this.searchForm);
-    },
+			/* 分页功能,改变当前页 */
+			handleCurrentChange(val) {
+				this.currentPage = val;
+				this.getAllList(this.searchForm);
+			},
 
-    /* 分页功能去首页 */
-    jumpFirstPage() {
-      this.$refs.pagination.handleCurrentChange(1);
-      this.$emit("handleCurrentChange", 1);
-    },
-    /* 分页功能:去尾页 */
-    jumpLastPage() {
-      let font = this.$refs.pagination;
-      let cpage = Math.ceil(font.total / font.pageSize);
-      font.handleCurrentChange(cpage);
-    },
+			/* 分页功能去首页 */
+			jumpFirstPage() {
+				this.$refs.pagination.handleCurrentChange(1);
+				this.$emit("handleCurrentChange", 1);
+			},
+			/* 分页功能:去尾页 */
+			jumpLastPage() {
+				let font = this.$refs.pagination;
+				let 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
-    },
-    /* 批量导出数据 */
-    batchExports() {
-      if (this.multipleSelection == "") {
-        this.Exports()
-      } else {
-        var tableHeader = [
-          [
-            "序号",
-            "供应商名称",
-            "社会统一信用码",
-            "账号",
-            "法人名称",
-            "联系人",
-            "电话",
-            "审核状态",
-            "时间",
-          ],
-        ];
-        var dataList = [];
-        this.multipleSelection.forEach((item, index) => {
-          dataList.push([
-            index + 1,
-            item.name,
-            item.socialCode,
-            item.account,
-            item.legalPerson,
-            item.contacts,
-            item.contactsMobile,
-            item.statusText,
-            item.createdAt,
-          ]);
-        });
-        dataConversionUtil.dataToExcel("供应商列表", tableHeader, dataList);
-        this.$message.success("导出成功!");
-      }
-    },
+			/* 批量导出数据 */
+			handleSelectionChange(data) {
+				this.multipleSelection = data
+				console.log(this.multipleSelection)
+			},
+			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.socialCode,
+							item.account,
+							item.legalPerson,
+							item.contacts,
+							item.contactsMobile,
+							item.statusText,
+							item.createdAt,
+						]);
+					});
+					dataConversionUtil.dataToExcel("供应商列表", tableHeader, dataList);
+					this.$message.success("导出成功!");
+				}
+			},
 
-    /* 全部导出承兑人列表数据 */
-    getContacts() {
-      const data = {
-        pageIndex: "",
-        pageSize: -1,
-        startTime: "",
-        endTime: "",
-        name: "",
-        status: "",
-        socialCode: "",
-        legalPerson: "",
-        isDeleted: "",
-      };
-      getSupplierSearch({ ...data }).then((res) => {
-        const { result } = res.data;
-        this.multipleSelection = result;
-      });
-    },
-    /* 全部导出 */
-    Exports() {
-      this.getContacts();
-      setTimeout(() => {
-        var tableHeader = [
-          [
-            "序号",
-            "供应商名称",
-            "社会统一信用码",
-            "账号",
-            "法人名称",
-            "联系人",
-            "电话",
-            "审核状态",
-            "时间",
-          ],
-        ];
-        var dataList = [];
-        this.multipleSelection.forEach((item, index) => {
-          dataList.push([
-            index + 1,
-            item.name,
-            item.socialCode,
-            item.account,
-            item.legalPerson,
-            item.contacts,
-            item.contactsMobile,
-            item.statusText,
-            item.createdAt,
-          ]);
-        });
-        dataConversionUtil.dataToExcel("供应商列表", tableHeader, dataList);
-        this.$message.success("导出成功!");
-      }, 1000);
-    },
+			/* 全部导出承兑人列表数据 */
+			getContacts() {
+				const data = {
+					pageIndex: "",
+					pageSize: -1,
+					startTime: "",
+					endTime: "",
+					name: "",
+					status: "",
+					socialCode: "",
+					legalPerson: "",
+					isDeleted: "",
+				};
+				getSupplierSearch({
+					...data
+				}).then((res) => {
+					const {
+						result
+					} = res.data;
+					this.multipleSelection = result;
+				});
+			},
+			/* 全部导出 */
+			Exports() {
+				this.getContacts();
+				setTimeout(() => {
+					var tableHeader = [
+						[
+							"序号",
+							"供应商名称",
+							"社会统一信用码",
+							"账号",
+							"法人名称",
+							"联系人",
+							"电话",
+							"审核状态",
+							"时间",
+						],
+					];
+					var dataList = [];
+					this.multipleSelection.forEach((item, index) => {
+						dataList.push([
+							index + 1,
+							item.name,
+							item.socialCode,
+							item.account,
+							item.legalPerson,
+							item.contacts,
+							item.contactsMobile,
+							item.statusText,
+							item.createdAt,
+						]);
+					});
+					dataConversionUtil.dataToExcel("供应商列表", tableHeader, dataList);
+					this.$message.success("导出成功!");
+				}, 1000);
+			},
 
-    success() {
-      let ids = Array.from(this.multipleSelection, ({ id }) => id);
-	  console.log(ids)
-      this.$request({
-        url: "/api/Supplier/manage",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 3,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    failed() {
-      let ids = Array.from(this.multipleSelection, ({ id }) => id);
-      this.$request({
-        url: "/api/Supplier/manage",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 4,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    recover() {
-      let ids = Array.from(this.multipleSelection, ({ id }) => id);
-      this.$request({
-        url: "/api/Supplier/manage",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 2,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    Srecover(id) {
-      this.$request({
-        url: "/api/Supplier/manage",
-        method: "post",
-        data: {
-          ids: [id],
-          operateType: 2,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    deleted() {
-      let ids = Array.from(this.multipleSelection, ({ id }) => id);
-      this.$request({
-        url: "/api/Supplier/manage",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 1,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    Sdeleted(id) {
-      this.$request({
-        url: "/api/Supplier/manage",
-        method: "post",
-        data: {
-          ids: [id],
-          operateType: 1,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "danger",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    reset(id) {
-      this.dialogVisible = true;
-      this.password.supplierId = id;
-    },
-    // 提交修改密码
-    onSubmit() {
-      if (this.password.newpassword !== this.password.ConfirmnewPassword) {
-        this.$message({
-          type: "error",
-          message: "密码与确认密码不一致",
-        });
-      } else if (
-        this.password.newpassword.length < 6 ||
-        this.password.ConfirmnewPassword < 6
-      ) {
-        this.$message({
-          type: "error",
-          message: "密码与确认密码至少6位",
-        });
-      } else {
-        this.$request({
-          url: "/api/Account/password/resetSupplier",
-          method: "post",
-          data: {
-            password: this.password.newpassword,
-            supplierId: this.password.supplierId,
-          },
-        }).then((res) => {
-          console.log(res);
-          if (res.code === 200) {
-            this.$message({
-              type: "success",
-              message: "重置成功",
-            });
-            this.dialogVisible = false;
-          }
-        });
-      }
-    },
-  },
-};
+			success() {
+				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/Supplier/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.getAllList();
+						} else {
+							this.$message({
+								type: "danger",
+								message: res.msg,
+							});
+							this.getAllList();
+						}
+					});
+				}
+				
+			},
+			failed() {
+				let ids = Array.from(this.multipleSelection, ({
+					id
+				}) => id);
+				let status = Array.from(this.multipleSelection, ({
+					status
+				}) => status)
+				if (status.includes(0)) {
+					this.$message({
+						type: 'error',
+						message: '未认证的选项不能在此认证失败'
+					})
+				}else if(ids == ""){
+					this.$message({
+						type: 'error',
+						message: '请选择数据'
+					})
+				} else {
+					this.$request({
+						url: "/api/Supplier/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.getAllList();
+						} else {
+							this.$message({
+				 			type: "danger",
+								message: res.msg,
+							});
+							this.getAllList();
+						}
+					});
+				}
+
+			},
+			recover() {
+				let ids = Array.from(this.multipleSelection, ({
+					id
+				}) => id);
+				let status = Array.from(this.multipleSelection, ({
+					isDeleted
+				}) => isDeleted)
+				if (status.includes(0)) {
+					this.$message({
+						type: 'error',
+						message: '不能恢复已是正常状态的账号'
+					})
+		}	else if (ids == "") {
+					this.$message({
+						type: 'error',
+						message: '请选择数据'
+					})
+				} else {
+					this.$request({
+						url: "/api/Supplier/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.getAllList();
+						} else {
+							this.$message({
+								type: "danger",
+								message: res.msg,
+							});
+							this.getAllList();
+						}
+					});
+				}
+
+			},
+			Srecover(id) {
+				this.$request({
+					url: "/api/Supplier/manage",
+					method: "post",
+					data: {
+						ids: [id],
+						operateType: 2,
+					},
+				}).then((res) => {
+					if (res.code == 200) {
+						this.$message({
+							type: "success",
+							message: res.msg,
+						});
+						this.getAllList();
+					} else {
+						this.$message({
+							type: "danger",
+							message: res.msg,
+						});
+						this.getAllList();
+					}
+				});
+			},
+			deleted() {
+				let ids = Array.from(this.multipleSelection, ({
+					id
+				}) => id);
+				let status = Array.from(this.multipleSelection, ({
+					isDeleted
+				}) => isDeleted)
+				if (status.includes(1)) {
+					this.$message({
+						type: 'error',
+						message: '不能删除已是删除状态的账号'
+					})
+				} else if (ids == "") {
+					this.$message({
+						type: 'error',
+						message: '请选择数据'
+					})
+				} else {
+					this.$request({
+						url: "/api/Supplier/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.getAllList();
+						} else {
+							this.$message({
+								type: "danger",
+								message: res.msg,
+							});
+							this.getAllList();
+						}
+					});
+				}
+
+			},
+			Sdeleted(id) {
+				this.$request({
+					url: "/api/Supplier/manage",
+					method: "post",
+					data: {
+						ids: [id],
+						operateType: 1,
+					},
+				}).then((res) => {
+					if (res.code == 200) {
+						this.$message({
+							type: "success",
+							message: res.msg,
+						});
+						this.getAllList();
+					} else {
+						this.$message({
+							type: "danger",
+							message: res.msg,
+						});
+						this.getAllList();
+					}
+				});
+			},
+			reset(id) {
+				this.dialogVisible = true;
+				this.password.supplierId = id;
+			},
+			// 提交修改密码
+			onSubmit() {
+				if (this.password.newpassword !== this.password.ConfirmnewPassword) {
+					this.$message({
+						type: "error",
+						message: "密码与确认密码不一致",
+					});
+				} else if (
+					this.password.newpassword.length < 6 ||
+					this.password.ConfirmnewPassword < 6
+				) {
+					this.$message({
+						type: "error",
+						message: "密码与确认密码至少6位",
+					});
+				} else {
+					this.$request({
+						url: "/api/Account/password/resetSupplier",
+						method: "post",
+						data: {
+							password: this.password.newpassword,
+							supplierId: this.password.supplierId,
+						},
+					}).then((res) => {
+						console.log(res);
+						if (res.code === 200) {
+							this.$message({
+								type: "success",
+								message: "重置成功",
+							});
+							this.dialogVisible = false;
+						}
+					});
+				}
+			},
+		},
+	};
 </script>
 <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;
-  display: flex;
-  // align-items: center;
-  justify-content: flex-end;
-}
+	.pagesip {
+		width: 100%;
+		margin: 20px auto;
+		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;
-}
+	.btn {
+		padding: 20px;
+	}
 </style>

+ 241 - 270
src/views/form/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -31,7 +31,6 @@
 				<el-button type="success" @click="recovers">恢复</el-button>
 				<el-button type="danger" @click="deletestatuses">删除</el-button>
 				<el-button type="primary" @click="dialogVisible2 = true">新增出票人</el-button>
-				\
 				<el-button type="primary" @click="batchExports">导出</el-button>
 			</div>
 		</el-row>
@@ -74,190 +73,145 @@
 			</el-form>
 		</el-dialog>
 
-    <el-table
-      :row-key="getRowKey"
-      v-loading="listLoading"
-      :data="temporaryList"
-      element-loading-text="Loading"
-      border
-      fit
-      highlight-current-row
-      @select="handleSelectionChange"
-      @select-all="handleAll"
-    >
-      <el-table-column
-        align="center"
-        type="selection"
-        :reserve-selection="true"
-      >
-      </el-table-column>
-      <el-table-column label="出票人名称" align="center" prop="name">
-      </el-table-column>
-      <el-table-column label="账号" align="center" prop="bankAccount">
-      </el-table-column>
-      <el-table-column align="center" prop="bankName" label="开户行名称">
-      </el-table-column>
-      <el-table-column align="center" prop="statusText" label="出票人状态">
-      </el-table-column>
-      <el-table-column align="center" prop="createdAt" label="时间">
-      </el-table-column>
-      <el-table-column
-        align="center"
-        prop="created_at"
-        label="操作"
-        width="250"
-      >
-        <template slot-scope="scope">
-          <el-tag
-            type="primary"
-            style="cursor: pointer; margin-right: 15px"
-            @click="modify(scope.row.id)"
-            >修改
-          </el-tag>
-          <el-tag
-            type="success"
-            style="cursor: pointer; margin-right: 15px"
-            @click="recover(scope.row.id)"
-            v-if="scope.row.status == 1"
-            >恢复
-          </el-tag>
-          <el-tag
-            type="danger"
-            style="cursor: pointer; margin-right: 15px"
-            @click="deletestatus(scope.row.id)"
-            v-if="scope.row.status == 0"
-            >删除</el-tag
-          >
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="pagesip">
-      <el-button
-        type="primary"
-        size="small"
-        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
-        @click="jumpFirstPage"
-        >首页
-      </el-button>
-      <el-pagination
-        background
-        @current-change="handleCurrentChange"
-        layout="total,prev, pager, next"
-        :total="total"
-        :page-size="pagesize"
-        :current-page="currentPage"
-        prev-text="上一页"
-        next-text="下一页"
-        :hide-on-single-page="false"
-        ref="pagination"
-      >
-      </el-pagination>
-      <el-button
-        type="primary"
-        size="small"
-        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
-        @click="jumpLastPage"
-        >尾页
-      </el-button>
-    </div>
-  </div>
+		<el-table :row-key="getRowKey" v-loading="listLoading" :data="temporaryList" element-loading-text="Loading"
+			border fit highlight-current-row @select="handleSelectionChange" @select-all="handleAll" ref="multipleTable">
+			<el-table-column align="center" type="selection" :reserve-selection="true">
+			</el-table-column>
+			<el-table-column label="出票人名称" align="center" prop="name">
+			</el-table-column>
+			<el-table-column label="账号" align="center" prop="bankAccount">
+			</el-table-column>
+			<el-table-column align="center" prop="bankName" label="开户行名称">
+			</el-table-column>
+			<el-table-column align="center" prop="statusText" label="出票人状态">
+			</el-table-column>
+			<el-table-column align="center" prop="createdAt" label="时间">
+			</el-table-column>
+			<el-table-column align="center" prop="created_at" label="操作" width="250">
+				<template slot-scope="scope">
+					<el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="modify(scope.row.id)">修改
+					</el-tag>
+					<el-tag type="success" style="cursor: pointer; margin-right: 15px" @click="recover(scope.row.id)"
+						v-if="scope.row.status == 1">恢复
+					</el-tag>
+					<el-tag type="danger" style="cursor: pointer; margin-right: 15px"
+						@click="deletestatus(scope.row.id)" v-if="scope.row.status == 0">删除</el-tag>
+				</template>
+			</el-table-column>
+		</el-table>
+		<div class="pagesip">
+			<el-button type="primary" size="small"
+				style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px" @click="jumpFirstPage">首页
+			</el-button>
+			<el-pagination background @current-change="handleCurrentChange" layout="total,prev, pager, next"
+				:total="total" :page-size="pagesize" :current-page="currentPage" prev-text="上一页" next-text="下一页"
+				:hide-on-single-page="false" ref="pagination">
+			</el-pagination>
+			<el-button type="primary" size="small"
+				style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px" @click="jumpLastPage">尾页
+			</el-button>
+		</div>
+	</div>
 </template>
 
 <script>
-import { dataConversionUtil } from "../../utils/Excel.js";
-import { getDrawerSearch } from "@/api/drawer";
-export default {
-  filters: {
-    statusFilter(status) {
-      const statusMap = {
-        published: "success",
-        draft: "gray",
-        deleted: "danger",
-      };
-      return statusMap[status];
-    },
-  },
-  data() {
-    return {
-      // 弹窗显示
-      dialogVisible1: false,
-      dialogVisible2: false,
-      // 表单数据
-      formData: {
-        startTime: "",
-        endTime: "",
-        name: "", // 出票人
-        status: "", // 出票人状态
-      },
-      // 新增出票人数据
-      form: {
-        name: "",
-        bankAccount: "",
-        bankName: "",
-      },
-      oldTableData: "",
-      // 修改出票人数据
-      tableData: {
-        name: "",
-        bankAccount: "",
-        bankName: "",
-        id: "",
-        createdAt: "",
-        status: "",
-        statusText: "",
-      },
-      /* 当前页数 */
-      currentPage: 1,
-      /* 每页显示个数 */
-      pagesize: 10,
-      /* 总条数 */
-      total: 20,
-      multipleSelection: [],
-      srcList: [],
-      list: [],
-      temporaryList: [],
-      listLoading: false,
-      status: "",
-      hpstatus: "",
-      search: "",
-      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]);
-            },
-          },
-        ],
-      },
-      value1: "",
-      value2: "",
-      exportExcelData1: [], //列表缓存数据
-      exportExcelData2: [],
-    };
-  },
+	import {
+		dataConversionUtil
+	} from "../../utils/Excel.js";
+	import {
+		getDrawerSearch
+	} from "@/api/drawer";
+	export default {
+		filters: {
+			statusFilter(status) {
+				const statusMap = {
+					published: "success",
+					draft: "gray",
+					deleted: "danger",
+				};
+				return statusMap[status];
+			},
+		},
+		data() {
+			return {
+				// 弹窗显示
+				dialogVisible1: false,
+				dialogVisible2: false,
+				// 表单数据
+				formData: {
+					startTime: "",
+					endTime: "",
+					name: "", // 出票人
+					status: "", // 出票人状态
+				},
+				// 新增出票人数据
+				form: {
+					name: "",
+					bankAccount: "",
+					bankName: "",
+				},
+				oldTableData: "",
+				// 修改出票人数据
+				tableData: {
+					name: "",
+					bankAccount: "",
+					bankName: "",
+					id: "",
+					createdAt: "",
+					status: "",
+					statusText: "",
+				},
+				/* 当前页数 */
+				currentPage: 1,
+				/* 每页显示个数 */
+				pagesize: 10,
+				/* 总条数 */
+				total: 20,
+				multipleSelection: [],
+				srcList: [],
+				list: [],
+				temporaryList: [],
+				listLoading: false,
+				status: "",
+				hpstatus: "",
+				search: "",
+				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]);
+							},
+						},
+					],
+				},
+				value1: "",
+				value2: "",
+				exportExcelData1: [], //列表缓存数据
+				exportExcelData2: [],
+			};
+		},
 
 
 		mounted() {
@@ -303,14 +257,20 @@ export default {
 				let ids = Array.from(this.multipleSelection, ({
 					id
 				}) => id)
-				let status=Array.from(this.multipleSelection,({status})=>status)
-				console.log(status.includes('0'),"ss")
-				if(!status.includes('0')){
+				let status = Array.from(this.multipleSelection, ({
+					status
+				}) => status)
+				if (status.includes(0)) {
 					this.$message({
-						type:'error',
-						message:'不能恢复已是正常状态的账号'
+						type: 'error',
+						message: '不能恢复已是正常状态的账号'
 					})
-				}else{
+				} else if(ids==""){
+					this.$message({
+						type: 'error',
+						message: '请选择数据'
+					})
+				} else{
 					this.$request({
 						url: "/api/Drawer/manager",
 						method: "post",
@@ -324,6 +284,7 @@ export default {
 								type: "success",
 								message: "恢复成功",
 							});
+							this.$refs.multipleTable.clearSelection();
 							this.getAllList();
 						} else {
 							this.$message({
@@ -334,7 +295,7 @@ export default {
 						}
 					});
 				}
-				
+
 			},
 			recover(id) {
 				this.$request({
@@ -364,12 +325,18 @@ export default {
 				let ids = Array.from(this.multipleSelection, ({
 					id
 				}) => id)
-				let status=Array.from(this.multipleSelection,({status})=>status)
-				console.log(status)
-				if(!status.includes('0')){
+				let status = Array.from(this.multipleSelection, ({
+					status
+				}) => status)
+				if (status.includes(1)) {
 					this.$message({
-						type:'error',
-						message:'不能删除已是删除状态的账号'
+						type: 'error',
+						message: '不能删除已是删除状态的账号'
+					})
+				} else if(ids==""){
+					this.$message({
+						type: 'error',
+						message: '请选择数据'
 					})
 				}else{
 					this.$request({
@@ -381,10 +348,11 @@ export default {
 						},
 					}).then((res) => {
 						if (res.code == 200) {
-					this.$message({
+							this.$message({
 								type: "success",
 								message: "删除成功",
 							});
+							this.$refs.multipleTable.clearSelection();
 							this.getAllList();
 						} else {
 							this.$message({
@@ -395,7 +363,7 @@ export default {
 						}
 					});
 				}
-				
+
 			},
 			deletestatus(id) {
 				this.$request({
@@ -444,7 +412,7 @@ export default {
 						type: 'error',
 						message: '数据没有改变!'
 					})
-				}else if (this.tableData.bankAccount.length < 5 || this.tableData.bankAccount > 20) {
+				} else if (this.tableData.bankAccount.length < 5 || this.tableData.bankAccount > 20) {
 					this.$message({
 						type: 'error',
 						message: '银行账号必须为5~20位!'
@@ -526,81 +494,84 @@ export default {
 			},
 
 
-    getRowKey(row) {
-      return row.id;
-    },
-    /* 批量导出数据 */
-    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.bankAccount,
-            item.bankName,
-            item.statusText,
-            item.createdAt,
-          ]);
-        });
-        dataConversionUtil.dataToExcel("出票人列表", tableHeader, dataList);
-        this.$message.success("导出成功!");
-      }
-    },
-    /* 全部导出承兑人列表数据 */
-    getContacts() {
-      const data = {
-        pageIndex: "",
-        pageSize: -1,
-        startTime: "",
-        endTime: "",
-        name: "",
-        status: "",
-      };
-      getDrawerSearch({ ...data }).then((res) => {
-        const { result } = res.data;
-        this.multipleSelection = result;
-      });
-    },
+			getRowKey(row) {
+				return row.id;
+			},
+			/* 批量导出数据 */
+			handleSelectionChange(data) {
+				this.multipleSelection = data;
+			},
+			handleAll(data) {
+				this.multipleSelection = data;
+			},
 
-    /* 全部导出 */
-    Exports() {
-      this.getContacts();
-      setTimeout(() => {
-        var tableHeader = [
-          ["序号", "出票人名称", "账号", "开户行名称", "状态", "时间"],
-        ];
-        var dataList = [];
-        this.multipleSelection.forEach((item, index) => {
-          dataList.push([
-            index + 1,
-            item.name,
-            item.bankAccount,
-            item.bankName,
-            item.statusText,
-            item.createdAt,
-          ]);
-        });
-        dataConversionUtil.dataToExcel("出票人列表", tableHeader, dataList);
-        this.$message.success("导出成功!");
-      }, 1000);
-    },
-  },
-};
+			/* 批量导出 */
+			batchExports() {
+				if (this.multipleSelection == "") {
+					this.Exports();
+				} else {
+					var tableHeader = [
+						["序号", "出票人名称", "账号", "开户行名称", "状态", "时间"],
+					];
+					var dataList = [];
+					this.multipleSelection.forEach((item, index) => {
+						dataList.push([
+							index + 1,
+							item.name,
+							item.bankAccount,
+							item.bankName,
+							item.statusText,
+							item.createdAt,
+						]);
+					});
+					dataConversionUtil.dataToExcel("出票人列表", tableHeader, dataList);
+					this.$message.success("导出成功!");
+				}
+			},
+			/* 全部导出承兑人列表数据 */
+			getContacts() {
+				const data = {
+					pageIndex: "",
+					pageSize: -1,
+					startTime: "",
+					endTime: "",
+					name: "",
+					status: "",
+				};
+				getDrawerSearch({
+					...data
+				}).then((res) => {
+					const {
+						result
+					} = res.data;
+					this.multipleSelection = result;
+				});
+			},
 
+			/* 全部导出 */
+			Exports() {
+				this.getContacts();
+				setTimeout(() => {
+					var tableHeader = [
+						["序号", "出票人名称", "账号", "开户行名称", "状态", "时间"],
+					];
+					var dataList = [];
+					this.multipleSelection.forEach((item, index) => {
+						dataList.push([
+							index + 1,
+							item.name,
+							item.bankAccount,
+							item.bankName,
+							item.statusText,
+							item.createdAt,
+						]);
+					});
+					dataConversionUtil.dataToExcel("出票人列表", tableHeader, dataList);
+					this.$message.success("导出成功!");
+				}, 1000);
+			},
+		},
+	};
 </script>
 <style lang="scss" scoped>
 	.pulldown {

+ 653 - 648
src/views/management/index.vue

xqd
@@ -1,671 +1,676 @@
 <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"
-          @change="Search"
-          placeholder="请输入业务管理员名称"
-          style="width: 100%"
-        >
-          <i slot="prefix" class="el-input__icon el-icon-search" />
-        </el-input>
-      </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="handlehpCommand">
-          <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"
-        style="display: flex; justify-content: flex-end; margin-left: 10px"
-      >
-        <el-button type="success" @click="success">审核成功</el-button>
-        <el-button type="danger" @click="failed">审核失败</el-button>
-        <el-button type="primary" @click="recover">恢复</el-button>
-        <el-button type="warning" @click="deleted">删除</el-button>
-        <el-button type="primary" @click="batchExports">导出</el-button>
-      </div>
-    </el-row>
-    <el-table
-    :row-key="getRowKey"
-      v-loading="listLoading"
-      :data="temporaryList"
-      element-loading-text="Loading"
-      border
-      fit
-      highlight-current-row
-      @selection-change="handleSelectionChange"
-      @select-all="handleAll"
-    >
-      <el-table-column align="center" label="" width="55" type="selection"  :reserve-selection="true" />
+	<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" @change="Search" placeholder="请输入业务管理员名称" style="width: 100%">
+					<i slot="prefix" class="el-input__icon el-icon-search" />
+				</el-input>
+			</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="handlehpCommand">
+					<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" style="display: flex; justify-content: flex-end; margin-left: 10px">
+				<el-button type="success" @click="success">审核成功</el-button>
+				<el-button type="danger" @click="failed">审核失败</el-button>
+				<el-button type="success" @click="recover">恢复</el-button>
+				<el-button type="danger" @click="deleted">删除</el-button>
+				<el-button type="primary" @click="batchExports">导出</el-button>
+			</div>
+		</el-row>
+		<el-table :row-key="getRowKey" v-loading="listLoading" :data="temporaryList" element-loading-text="Loading"
+			border fit highlight-current-row ref="multipleTable" @selection-change="handleSelectionChange"
+			@select-all="handleAll">
+			<el-table-column align="center" label="" width="55" type="selection" :reserve-selection="true" />
 
-      <el-table-column
-        label="业务管理员名称"
-        align="center"
-        width="180"
-        prop="realName"
-      />
-      <el-table-column label="账号" align="center" prop="account" />
-      <el-table-column
-        label="联系电话"
-        width="180"
-        align="center"
-        prop="mobile"
-      />
-      <el-table-column
-        label="审核状态"
-        align="center"
-        prop="approveStatusText"
-      />
-      <el-table-column
-        label="业务管理员状态"
-        align="center"
-        prop="statusText"
-        width="180"
-      />
+			<el-table-column label="业务管理员名称" align="center" width="180" prop="realName" />
+			<el-table-column label="账号" align="center" prop="account" />
+			<el-table-column label="联系电话" width="180" align="center" prop="mobile" />
+			<el-table-column label="审核状态" align="center" prop="approveStatusText" />
+			<el-table-column label="业务管理员状态" align="center" prop="statusText" width="180" />
 
-      <el-table-column
-        label="时间"
-        width="180"
-        align="center"
-        prop="createdAt"
-      />
-      <el-table-column
-        align="center"
-        prop="created_at"
-        label="操作"
-        width="300"
-      >
-        <template slot-scope="scope">
-          <el-tag
-            type="success"
-            style="cursor: pointer; margin: 0 5px"
-            @click="Srecover(scope.row.id)"
-            v-if="scope.row.status == 1"
-            >恢复</el-tag
-          >
-          <el-tag
-            type="danger"
-            style="cursor: pointer; margin: 0 5px"
-            @click="Sdeleted(scope.row.id)"
-            v-if="scope.row.status == 0"
-            >删除</el-tag
-          >
-          <el-tag
-            type="primary"
-            v-permission="['admin']"
-            style="cursor: pointer; margin: 0 5px"
-            @click="reset(scope.row.id)"
-            >重置密码
-          </el-tag>
-        </template>
-      </el-table-column>
-    </el-table>
-    <!-- 重置密码弹窗 -->
-    <el-dialog title="重置密码" :visible.sync="dialogVisible" width="30%">
-      <el-form ref="form" :model="password" label-width="80px">
-        <el-form-item label="登录密码" prop="password.newpassword">
-          <el-input
-            v-model="password.newpassword"
-            style="width: 300px"
-            show-password
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="确认密码" prop="password.ConfirmnewPassword">
-          <el-input
-            v-model="password.ConfirmnewPassword"
-            style="width: 300px"
-            show-password
-          ></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="onSubmit">提交修改</el-button>
-        </el-form-item>
-      </el-form>
-    </el-dialog>
+			<el-table-column label="时间" width="180" align="center" prop="createdAt" />
+			<el-table-column align="center" prop="created_at" label="操作" width="300">
+				<template slot-scope="scope">
+					<el-tag type="success" style="cursor: pointer; margin: 0 5px" @click="Srecover(scope.row.id)"
+						v-if="scope.row.status == 1">恢复</el-tag>
+					<el-tag type="danger" style="cursor: pointer; margin: 0 5px" @click="Sdeleted(scope.row.id)"
+						v-if="scope.row.status == 0">删除</el-tag>
+					<el-tag type="primary" v-permission="['admin']" style="cursor: pointer; margin: 0 5px"
+						@click="reset(scope.row.id)">重置密码
+					</el-tag>
+				</template>
+			</el-table-column>
+		</el-table>
+		<!-- 重置密码弹窗 -->
+		<el-dialog title="重置密码" :visible.sync="dialogVisible" width="30%">
+			<el-form ref="form" :model="password" label-width="80px">
+				<el-form-item label="登录密码" prop="password.newpassword">
+					<el-input v-model="password.newpassword" style="width: 300px" show-password></el-input>
+				</el-form-item>
+				<el-form-item label="确认密码" prop="password.ConfirmnewPassword">
+					<el-input v-model="password.ConfirmnewPassword" style="width: 300px" show-password></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button @click="dialogVisible = false">取 消</el-button>
+					<el-button type="primary" @click="onSubmit">提交修改</el-button>
+				</el-form-item>
+			</el-form>
+		</el-dialog>
 
-    <div class="pagesip">
-      <el-button
-        type="primary"
-        size="small"
-        style="background-color: #d8ab5a; border-color: #d8ab5a; 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="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
-        @click="jumpLastPage"
-        >尾页
-      </el-button>
-    </div>
-  </div>
+		<div class="pagesip">
+			<el-button type="primary" size="small"
+				style="background-color: #d8ab5a; border-color: #d8ab5a; 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="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px" @click="jumpLastPage">尾页
+			</el-button>
+		</div>
+	</div>
 </template>
 
 <script>
-import { dataConversionUtil } from "../../utils/Excel.js";
-import { getAccountSearch } from "@/api/account";
-export default {
-  filters: {
-    statusFilter(status) {
-      const statusMap = {
-        published: "success",
-        draft: "gray",
-        deleted: "danger",
-      };
-      return statusMap[status];
-    },
-  },
-  data() {
-    return {
-      dialogVisible: false,
-      // 表单数据
-      formData: {
-        startTime: "",
-        endTime: "",
-        name: "",
-        status: "", //审核状态
-        isDeleted: "", //删除状态
-      },
-      // 重置密码
-      password: {
-        newpassword: "",
-        ConfirmnewPassword: "",
-        userId: "",
-      },
-      /* 当前页数 */
-      currentPage: 1,
-      /* 每页显示个数 */
-      pagesize: 10,
-      /* 总条数 */
-      total: 20,
-      temporaryList: [],
-      srcList: [],
-      list: [],
-      listLoading: false,
-      status: "",
-      Auditstatus: "",
-      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: [], //导出列表缓存数据单选
-    };
-  },
+	import {
+		dataConversionUtil
+	} from "../../utils/Excel.js";
+	import {
+		getAccountSearch
+	} from "@/api/account";
+	export default {
+		filters: {
+			statusFilter(status) {
+				const statusMap = {
+					published: "success",
+					draft: "gray",
+					deleted: "danger",
+				};
+				return statusMap[status];
+			},
+		},
+		data() {
+			return {
+				dialogVisible: false,
+				// 表单数据
+				formData: {
+					startTime: "",
+					endTime: "",
+					name: "",
+					status: "", //审核状态
+					isDeleted: "", //删除状态
+				},
+				// 重置密码
+				password: {
+					newpassword: "",
+					ConfirmnewPassword: "",
+					userId: "",
+				},
+				/* 当前页数 */
+				currentPage: 1,
+				/* 每页显示个数 */
+				pagesize: 10,
+				/* 总条数 */
+				total: 20,
+				temporaryList: [],
+				srcList: [],
+				list: [],
+				multipleSelection: [],
+				listLoading: false,
+				status: "",
+				Auditstatus: "",
+				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.getAllList();
-  },
-  methods: {
-    /* 获取列表数据 */
-    getAllList(searchForm = {}) {
-      const params = {
-        pageIndex: this.currentPage,
-        pageSize: this.pagesize,
-      };
-      getAccountSearch({
-        ...params,
-        ...searchForm,
-      }).then((res) => {
-        const { data } = res;
-        this.temporaryList = data.result;
-        this.srcList = data.result;
-        this.total = res.data.total;
-      });
-    },
+		mounted() {
+			this.getAllList();
+		},
+		methods: {
+			/* 获取列表数据 */
+			getAllList(searchForm = {}) {
+				const params = {
+					pageIndex: this.currentPage,
+					pageSize: this.pagesize,
+				};
+				getAccountSearch({
+					...params,
+					...searchForm,
+				}).then((res) => {
+					const {
+						data
+					} = res;
+					this.temporaryList = data.result;
+					this.srcList = data.result;
+					this.total = res.data.total;
+				});
+			},
 
-    success() {
-      const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      this.$request({
-        url: "/api/Account/manager",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 3,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "error",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    failed() {
-      const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      this.$request({
-        url: "/api/Account/manager",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 4,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: res.msg,
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "error",
-            message: res.msg,
-          });
-          this.getAllList();
-        }
-      });
-    },
-    recover() {
-      const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      this.$request({
-        url: "/api/Account/manager",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 2,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: "恢复成功",
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "error",
-            message: "恢复失败",
-          });
-          this.getAllList();
-        }
-      });
-    },
-    deleted() {
-      const ids = Array.from(this.multipleSelection, ({ id }) => id);
-      this.$request({
-        url: "/api/Account/manager",
-        method: "post",
-        data: {
-          ids: ids,
-          operateType: 1,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: "删除成功",
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "error",
-            message: "删除失败",
-          });
-          this.getAllList();
-        }
-      });
-    },
-    Srecover(id) {
-      this.$request({
-        url: "/api/Account/manager",
-        method: "post",
-        data: {
-          ids: [id],
-          operateType: 2,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: "恢复成功",
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "error",
-            message: "恢复失败",
-          });
-          this.getAllList();
-        }
-      });
-    },
-    Sdeleted(id) {
-      this.$request({
-        url: "/api/Account/manager",
-        method: "post",
-        data: {
-          ids: [id],
-          operateType: 1,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: "删除成功",
-          });
-          this.getAllList();
-        } else {
-          this.$message({
-            type: "error",
-            message: "删除失败",
-          });
-          this.getAllList();
-        }
-      });
-    },
+			success() {
+				let ids = Array.from(this.multipleSelection, ({
+					id
+				}) => id);
+				let status = Array.from(this.multipleSelection, ({
+					approveStatus
+				}) => approveStatus)
+				console.log(status)
+				if (status.includes(1)) {
+					this.$message({
+						type: 'error',
+						message: '不能审核成功已通过项'
+					})
+				} else if (ids == "") {
+					this.$message({
+						type: 'error',
+						message: '请选择数据!'
+					})
+				} else {
+					this.$request({
+						url: "/api/Account/manager",
+						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.getAllList();
+						} else {
+							this.$message({
+								type: "error",
+								message: res.msg,
+							});
+							this.getAllList();
+						}
+					});
+				}
 
-    /* 输入出票人名称查询 */
-    Search() {
-      this.currentPage = 1;
-      this.searchForm = {
-        ...this.formData,
-      };
-      this.getAllList(this.searchForm);
-    },
-    /* 业务员状态筛选 */
-    handleCommand(command) {
-      this.status = command;
-      if (command === "全部") {
-        this.formData.isDeleted = "";
-      }
-      if (command === "正常") {
-        this.formData.isDeleted = 0;
-      }
-      if (command === "删除") {
-        this.formData.isDeleted = 1;
-      }
-      this.currentPage = 1;
-      this.searchForm = {
-        ...this.formData,
-      };
-      this.getAllList(this.searchForm);
-    },
+			},
+			failed() {
+				const ids = Array.from(this.multipleSelection, ({
+					id
+				}) => id);
+				let status = Array.from(this.multipleSelection, ({
+					approveStatus
+				}) => approveStatus)
+				if(status.includes(2)){
+					this.$message({
+						type: 'error',
+						message: '不能审核失败未通过项'
+					})
+				}else if(ids==""){
+					this.$message({
+						type: 'error',
+						message: '请选择数据!'
+					})
+				}else{
+					this.$request({
+						url: "/api/Account/manager",
+						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.getAllList();
+						} else {
+							this.$message({
+								type: "error",
+								message: res.msg,
+							});
+							this.getAllList();
+						}
+					});
+				}
+				
+			},
+			recover() {
+				let ids = Array.from(this.multipleSelection, ({
+					id
+				}) => id);
+				let status = Array.from(this.multipleSelection, ({
+					status
+				}) => status)
+				if (status.includes(0)) {
+					this.$message({
+						type: 'error',
+						message: '不能恢复已是正常状态的账号'
+					})
+				} else if (ids == "") {
+					this.$message({
+						type: 'error',
+						message: '请选择数据'
+					})
+				} else {
+					this.$request({
+						url: "/api/Account/manager",
+						method: "post",
+						data: {
+							ids: ids,
+							operateType: 2,
+						},
+					}).then((res) => {
+						if (res.code == 200) {
+							this.$message({
+								type: "success",
+								message: "恢复成功",
+							});
+							this.$refs.multipleTable.clearSelection();
+							this.getAllList();
+						} else {
+							this.$message({
+								type: "error",
+								message: "恢复失败",
+							});
+							this.getAllList();
+						}
+					});
+				}
 
-    /* 审核状态筛选 */
-    handlehpCommand(command) {
-      this.Auditstatus = command;
-      if (command === "全部") {
-        this.formData.status = "";
-      }
-      if (command === "待审核") {
-        this.formData.status = 1;
-      }
-      if (command === "通过") {
-        this.formData.status = 2;
-      }
-      if (command === "未通过") {
-        this.formData.status = 3;
-      }
-      this.currentPage = 1;
-      this.searchForm = {
-        ...this.formData,
-      };
-      this.getAllList(this.searchForm);
-    },
+			},
+			deleted() {
+				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/Account/manager",
+						method: "post",
+						data: {
+							ids: ids,
+							operateType: 1,
+						},
+					}).then((res) => {
+						if (res.code == 200) {
+							this.$message({
+								type: "success",
+								message: "删除成功",
+							});
+							this.$refs.multipleTable.clearSelection();
+							this.getAllList();
+						} else {
+							this.$message({
+								type: "error",
+								message: "删除失败",
+							});
+							this.getAllList();
+						}
+					});
+				}
 
-    /* 分页功能,改变当前页 */
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getAllList(this.searchForm);
-    },
+			},
+			Srecover(id) {
+				this.$request({
+					url: "/api/Account/manager",
+					method: "post",
+					data: {
+						ids: [id],
+						operateType: 2,
+					},
+				}).then((res) => {
+					if (res.code == 200) {
+						this.$message({
+							type: "success",
+							message: "恢复成功",
+						});
+						this.getAllList();
+					} else {
+						this.$message({
+							type: "error",
+							message: "恢复失败",
+						});
+						this.getAllList();
+					}
+				});
+			},
+			Sdeleted(id) {
+				this.$request({
+					url: "/api/Account/manager",
+					method: "post",
+					data: {
+						ids: [id],
+						operateType: 1,
+					},
+				}).then((res) => {
+					if (res.code == 200) {
+						this.$message({
+							type: "success",
+							message: "删除成功",
+						});
+						this.getAllList();
+					} else {
+						this.$message({
+							type: "error",
+							message: "删除失败",
+						});
+						this.getAllList();
+					}
+				});
+			},
 
-    /* 分页功能去首页 */
-    jumpFirstPage() {
-      this.$refs.pagination.handleCurrentChange(1);
-      this.$emit("handleCurrentChange", 1);
-    },
-    /* 分页功能:去尾页 */
-    jumpLastPage() {
-      let font = this.$refs.pagination;
-      let cpage = Math.ceil(font.total / font.pageSize);
-      font.handleCurrentChange(cpage);
-    },
+			/* 输入出票人名称查询 */
+			Search() {
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData,
+				};
+				this.getAllList(this.searchForm);
+			},
+			/* 业务员状态筛选 */
+			handleCommand(command) {
+				this.status = command;
+				if (command === "全部") {
+					this.formData.isDeleted = "";
+				}
+				if (command === "正常") {
+					this.formData.isDeleted = 0;
+				}
+				if (command === "删除") {
+					this.formData.isDeleted = 1;
+				}
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData,
+				};
+				this.getAllList(this.searchForm);
+			},
 
-    getRowKey(row) {
-      return row.id;
-    },
-    /* 批量导出数据 */
-    handleSelectionChange(data) {
-      this.multipleSelection = data;
-    },
-    handleAll(data) {
-      this.multipleSelection = data;
-    },
+			/* 审核状态筛选 */
+			handlehpCommand(command) {
+				this.Auditstatus = command;
+				if (command === "全部") {
+					this.formData.status = "";
+				}
+				if (command === "待审核") {
+					this.formData.status = 1;
+				}
+				if (command === "通过") {
+					this.formData.status = 2;
+				}
+				if (command === "未通过") {
+					this.formData.status = 3;
+				}
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData,
+				};
+				this.getAllList(this.searchForm);
+			},
 
-    /* 批量导出 */
-    batchExports() {
-      if (this.multipleSelection == "") {
-        this.Exports()
-      } else {
-        var tableHeader = [
-          [
-            "序号",
-            "业务管理员姓名",
-            "账号",
-            "联系电话",
-            "业务管理员状态",
-            "审核状态",
-            "时间",
-          ],
-        ];
-        var dataList = [];
-        this.multipleSelection.forEach((item, index) => {
-          dataList.push([
-            index + 1,
-            item.realName,
-            item.account,
-            item.mobile,
-            item.statusText,
-            item.approveStatusText,
-            item.createdAt,
-          ]);
-        });
-        dataConversionUtil.dataToExcel("业务管理员列表", tableHeader, dataList);
-        this.$message.success("导出成功!");
-      }
-    },
-    /* 全部导出合同列表数据 */
-    getContacts() {
-      const data = {
-        pageIndex: "",
-        pageSize: -1,
-        startTime: "",
-        endTime: "",
-        isDeleted: "",
-        status: "",
-      };
-      getAccountSearch({ ...data }).then((res) => {
-        const { result } = res.data;
-        this.multipleSelection = result;
-      });
-    },
+			/* 分页功能,改变当前页 */
+			handleCurrentChange(val) {
+				this.currentPage = val;
+				this.getAllList(this.searchForm);
+			},
 
-    /* 全部导出 */
-    Exports() {
-      this.getContacts();
-      setTimeout(() => {
-        var tableHeader = [
-          [
-            "序号",
-            "业务管理员姓名",
-            "账号",
-            "联系电话",
-            "业务管理员状态",
-            "审核状态",
-            "时间",
-          ],
-        ];
-        var dataList = [];
-        this.multipleSelection.forEach((item, index) => {
-          dataList.push([
-            index + 1,
-            item.realName,
-            item.account,
-            item.mobile,
-            item.statusText,
-            item.approveStatusText,
-            item.createdAt,
-          ]);
-        });
-        dataConversionUtil.dataToExcel("业务管理员列表", tableHeader, dataList);
-        this.$message.success("导出成功!");
-      }, 1000);
-    },
+			/* 分页功能去首页 */
+			jumpFirstPage() {
+				this.$refs.pagination.handleCurrentChange(1);
+				this.$emit("handleCurrentChange", 1);
+			},
+			/* 分页功能:去尾页 */
+			jumpLastPage() {
+				let font = this.$refs.pagination;
+				let cpage = Math.ceil(font.total / font.pageSize);
+				font.handleCurrentChange(cpage);
+			},
 
-    // 重置业务员密码
-    reset(id) {
-      this.dialogVisible = true;
-      this.password.userId = id;
-    },
-    // 提交修改密码
-    onSubmit() {
-      if (this.password.newpassword !== this.password.ConfirmnewPassword) {
-        this.$message({
-          type: "error",
-          message: "密码与确认密码不一致",
-        });
-      } else if (
-        this.password.newpassword.length < 6 ||
-        this.password.ConfirmnewPassword < 6
-      ) {
-        this.$message({
-          type: "error",
-          message: "密码与确认密码至少6位",
-        });
-      } else {
-        this.$request({
-          url: "/api/Account/password/resetUser",
-          method: "post",
-          data: {
-            password: this.password.newpassword,
-            userId: this.password.userId,
-          },
-        }).then((res) => {
-          console.log(res);
-          if (res.code === 200) {
-            this.$message({
-              type: "success",
-              message: "重置成功",
-            });
-            this.dialogVisible = false;
-          }
-        });
-      }
-    },
-  },
-};
+			getRowKey(row) {
+				return row.id;
+			},
+			/* 批量导出数据 */
+			handleSelectionChange(data) {
+				this.multipleSelection = data;
+				console.log(this.multipleSelection)
+			},
+			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.realName,
+							item.account,
+							item.mobile,
+							item.statusText,
+							item.approveStatusText,
+							item.createdAt,
+						]);
+					});
+					dataConversionUtil.dataToExcel("业务管理员列表", tableHeader, dataList);
+					this.$message.success("导出成功!");
+				}
+			},
+			/* 全部导出合同列表数据 */
+			getContacts() {
+				const data = {
+					pageIndex: "",
+					pageSize: -1,
+					startTime: "",
+					endTime: "",
+					isDeleted: "",
+					status: "",
+				};
+				getAccountSearch({
+					...data
+				}).then((res) => {
+					const {
+						result
+					} = res.data;
+					this.multipleSelection = result;
+				});
+			},
+
+			/* 全部导出 */
+			Exports() {
+				this.getContacts();
+				setTimeout(() => {
+					var tableHeader = [
+						[
+							"序号",
+							"业务管理员姓名",
+							"账号",
+							"联系电话",
+							"业务管理员状态",
+							"审核状态",
+							"时间",
+						],
+					];
+					var dataList = [];
+					this.multipleSelection.forEach((item, index) => {
+						dataList.push([
+							index + 1,
+							item.realName,
+							item.account,
+							item.mobile,
+							item.statusText,
+							item.approveStatusText,
+							item.createdAt,
+						]);
+					});
+					dataConversionUtil.dataToExcel("业务管理员列表", tableHeader, dataList);
+					this.$message.success("导出成功!");
+				}, 1000);
+			},
+
+			// 重置业务员密码
+			reset(id) {
+				this.dialogVisible = true;
+				this.password.userId = id;
+			},
+			// 提交修改密码
+			onSubmit() {
+				if (this.password.newpassword !== this.password.ConfirmnewPassword) {
+					this.$message({
+						type: "error",
+						message: "密码与确认密码不一致",
+					});
+				} else if (
+					this.password.newpassword.length < 6 ||
+					this.password.ConfirmnewPassword < 6
+				) {
+					this.$message({
+						type: "error",
+						message: "密码与确认密码至少6位",
+					});
+				} else {
+					this.$request({
+						url: "/api/Account/password/resetUser",
+						method: "post",
+						data: {
+							password: this.password.newpassword,
+							userId: this.password.userId,
+						},
+					}).then((res) => {
+						console.log(res);
+						if (res.code === 200) {
+							this.$message({
+								type: "success",
+								message: "重置成功",
+							});
+							this.dialogVisible = false;
+						}
+					});
+				}
+			},
+		},
+	};
 </script>
 <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;
-  display: flex;
-  // align-items: center;
-  justify-content: flex-end;
-}
+	.pagesip {
+		width: 100%;
+		margin: 20px auto;
+		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;
+	}
 </style>

+ 14 - 27
src/views/mine/index.vue

xqd xqd xqd
@@ -98,43 +98,24 @@
 					</el-form>
 
 
-					<!-- 修改密码弹窗 -->
-					<!-- <el-dialog title="修改密码" :visible.sync="dialogVisible" width="30%">
-					<el-form ref="form" :model="password" label-width="80px">
-						<el-form-item label="旧密码" prop="password.oldPassword">
-							<el-input v-model="password.oldPassword" style="width: 300px;"></el-input>
-						</el-form-item>
-						<el-form-item label="新密码" prop="password.newPassword">
-							<el-input v-model="password.newPassword" style="width: 300px;"></el-input>
-						</el-form-item>
-						<el-form-item label="确认新密码" prop="password.newPassword">
-							<el-input v-model="password.newPassword" style="width: 300px;"></el-input>
-						</el-form-item>
-						<el-form-item >
-							<el-button @click="dialogVisible = false">取 消</el-button>
-							<el-button type="primary" @click="onSubmit">提交修改</el-button>
-						</el-form-item>
-					</el-form>
-					</el-dialog> -->
-
 				</el-col>
 
 
 				<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="10" style="padding-right: 10px;" v-if="role===1">
-					<el-form ref="form" :model="form" label-width="140px">
+					<el-form ref="form" :model="salesmanform" label-width="140px">
 						<el-form-item label="" style="border-bottom:1px solid #F4F4F4">
 							<span slot="label">
 								<span style="color:#262626;">业务管理员个人信息</span>
 							</span>
 						</el-form-item>
-						<el-form-item label="姓名" :rules="[{  message: '姓名不能为空不能为空'}]">
-							<el-input v-model="form.realName" class="ipwidth" />
+						<el-form-item label="姓名" >
+							<el-input v-model="salesmanform.realName" class="ipwidth" />
 						</el-form-item>
-						<el-form-item label="账号" :rules="[{ message: '账号不能为空'}]">
-							<el-input v-model="form.account" class="ipwidth" />
+						<el-form-item label="账号" >
+							<el-input v-model="salesmanform.account" class="ipwidth" />
 						</el-form-item>
-						<el-form-item label="联系电话" :rules="[{  message: '联系电话不能为空'}]">
-							<el-input v-model="form.mobile" class="ipwidth" />
+						<el-form-item label="联系电话" >
+							<el-input v-model="salesmanform.mobile" class="ipwidth"  onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"/>
 						</el-form-item>
 					</el-form>
 					<el-collapse v-model="password" style="width: 90%;float: right;">
@@ -185,6 +166,11 @@
 					identifyPics: [],
 					proxyFile: [],
 				},
+				salesmanform:{
+					realName:'',
+					account:'',
+					mobile:'',
+				},
 				password: {
 					oldPassword: '',
 					newPassword: '',
@@ -213,7 +199,8 @@
 					url: '/api/Account',
 					method: 'get'
 				}).then((res) => {
-					this.form = res.data
+					console.log(res)
+					this.salesmanform = res.data
 				})
 			}
 		},

+ 16 - 13
src/views/sucuirtyaudit/detail.vue

xqd xqd xqd
@@ -27,8 +27,12 @@
 			  </el-table> -->
 			</el-collapse-item>
 		  <el-collapse-item title="更新后" name="2" style=" margin-left:20px">
-			  <el-descriptions :title="title" :column="3" border style="margin: 20px;">
-				  <!-- <el-descriptions-item  v-for="item in afterobj.columns" :label="getColumnName(item)">{{item.value}}</el-descriptions-item> -->
+			  <el-descriptions :title="title" :column="2" border style="margin: 20px;">
+				  <el-descriptions-item  v-for="item in afterobj.columns" :label="getColumnName(item.columnName)">
+					  <template >
+						  {{item.value}}
+					  </template>
+				  </el-descriptions-item>
 			  	<!-- <el-descriptions-item label="姓名">{{afterobj.columns.name}}</el-descriptions-item>
 			  	<el-descriptions-item label="银行账号">{{afterobj.columns.bank_account}}</el-descriptions-item>
 			  	<el-descriptions-item label="银行名称">{{afterobj.columns.bank_name}}</el-descriptions-item>
@@ -75,9 +79,9 @@
 				// this.beforeobj=JSON.parse(res.data.before)
 				console.log(this.afterobj, "更新后")
 				let columnName=Array.from(this.afterobj.columns,({columnName})=>columnName)
-				console.log(columnName)
 				this.columnName=this.getnewarr(columnName,this.hanhua)
-				console.log(this.columnName)
+				console.log(this.columnName,"this.columnName")
+				console.log(this.afterobj.columns,"afterobj.columns")
 				// 更新内容设置标题
 				if(this.afterobj.tableName=='contract'){
 					this.title='合同'
@@ -96,15 +100,14 @@
 				})
 			   return obj;
 			},
-			// getColumnName(item){
-			// 	for(let i in this.columnName){
-			// 		if(item.columnName==i){
-			// 			return i
-			// 		}
-			// 		return this.columnName[i]
-			// 	}
-			// 	return this.columnName[i]
-			// }
+			getColumnName(val){
+				for(var key in this.columnName){
+					console.log(key)
+					if(val==key){
+						return this.columnName[key]
+					}
+				}
+			}
 		}
 	}
 </script>

+ 76 - 45
src/views/table/index.vue

xqd xqd xqd xqd
@@ -166,6 +166,7 @@
       element-loading-text="Loading"
       border
       fit
+	  ref="multipleTable"
       highlight-current-row
       @select="handleSelectionChange"
       @select-all="handleAll"
@@ -416,28 +417,43 @@ export default {
 	// 批量恢复
 	recovers(){
 		let ids=Array.from(this.multipleSelection,({id})=>id)
-		this.$request({
-		  url: "/api/Acceptor/manager",
-		  method: "post",
-		  data: {
-		    ids:ids,
-		    operateType: 2,
-		  },
-		}).then((res) => {
-		  if (res.code == 200) {
-		    this.$message({
-		      type: "success",
-		      message: "恢复成功",
-		    });
-		    this.getAllList();
-		  } else {
-		    this.$message({
-		      type: "danger",
-		      message: "恢复失败",
-		    });
-		    this.getAllList();
-		  }
-		});
+		let status=Array.from(this.multipleSelection,({status})=>status)
+		if(status.includes(0)){
+			this.$message({
+				type: 'error',
+				message: '不能恢复已是正常状态的账号'
+			})
+		}else if(ids==""){
+			this.$message({
+				type: 'error',
+				message: '请选择数据'
+			})
+		}else{
+			this.$request({
+			  url: "/api/Acceptor/manager",
+			  method: "post",
+			  data: {
+			    ids:ids,
+			    operateType: 2,
+			  },
+			}).then((res) => {
+			  if (res.code == 200) {
+			    this.$message({
+			      type: "success",
+			      message: "恢复成功",
+			    });
+				this.$refs.multipleTable.clearSelection();
+			    this.getAllList();
+			  } else {
+			    this.$message({
+			      type: "danger",
+			      message: "恢复失败",
+			    });
+			    this.getAllList();
+			  }
+			});
+		}
+		
 	},
     recover(id) {
       this.$request({
@@ -466,28 +482,43 @@ export default {
 	// 批量删除
 	deleteStatuses(){
 		let ids=Array.from(this.multipleSelection,({id})=>id)
-		this.$request({
-		  url: "/api/Acceptor/manager",
-		  method: "post",
-		  data: {
-		    ids: ids,
-		    operateType: 1,
-		  },
-		}).then((res) => {
-		  if (res.code == 200) {
-		    this.$message({
-		      type: "success",
-		      message: "删除成功",
-		    });
-		    this.getAllList();
-		  } else {
-		    this.$message({
-		      type: "danger",
-		      message: "删除失败",
-		    });
-		    this.getAllList();
-		  }
-		});
+		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/Acceptor/manager",
+			  method: "post",
+			  data: {
+			    ids: ids,
+			    operateType: 1,
+			  },
+			}).then((res) => {
+			  if (res.code == 200) {
+			    this.$message({
+			      type: "success",
+			      message: "删除成功",
+			    });
+				this.$refs.multipleTable.clearSelection();
+			    this.getAllList();
+			  } else {
+			    this.$message({
+			      type: "danger",
+			      message: "删除失败",
+			    });
+			    this.getAllList();
+			  }
+			});
+		}
+		
 	},
     deleteStatus(id) {
       this.$request({
@@ -618,7 +649,7 @@ export default {
     /* 批量导出数据 */
     handleSelectionChange(data) {
       this.multipleSelection = data
-
+			console.log(this.multipleSelection)
     },
     handleAll(data) {
       this.multipleSelection = data