Selaa lähdekoodia

Merge branch 'master' of http://git.9026.com/Tartarus/alhj-admin

Sunny Feng 2 vuotta sitten
vanhempi
commit
71181399de

+ 9 - 0
src/api/supplier.js

xqd
@@ -15,3 +15,12 @@ export function getSupplierSearch(data) {
     data
   })
 }
+
+/* 获取供应商个人信息 */
+export function getSupplierInfo() {
+  return request({
+    url: '/api/Supplier',
+    method: 'get',
+  })
+}
+

+ 15 - 0
src/api/user.js

xqd
@@ -30,3 +30,18 @@ export function addTicketdrawer() {
     method: 'post'
   })
 }
+
+
+/* 获取业务管理员个人信息 */
+
+
+export function getAccountInfo() {
+  return request({
+    url: '/api/Account',
+    method: 'get',
+  })
+}
+
+
+
+

+ 69 - 28
src/layout/components/Navbar.vue

xqd xqd xqd xqd
@@ -1,23 +1,29 @@
 <template>
   <div class="navbar">
-    <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
+    <hamburger
+      :is-active="sidebar.opened"
+      class="hamburger-container"
+      @toggleClick="toggleSideBar"
+    />
 
     <breadcrumb class="breadcrumb-container" />
 
     <div class="right-menu">
+      <span class="nav-userName">
+        <i class="el-icon-s-custom"></i>
+        您好,{{ userName || supplierName }},欢迎您登录
+      </span>
       <el-dropdown class="avatar-container" trigger="click">
         <div class="avatar-wrapper">
-          <img src="../../assets/img/logo.png" class="user-avatar">
+          <img src="../../assets/img/logo.png" class="user-avatar" />
           <i class="el-icon-caret-bottom" />
         </div>
         <el-dropdown-menu slot="dropdown" class="user-dropdown">
-          <router-link to="/">
-            <el-dropdown-item>
-              首页
-            </el-dropdown-item>
+          <router-link to="/contracts/contracts">
+            <el-dropdown-item > 首页 </el-dropdown-item>
           </router-link>
           <el-dropdown-item divided @click.native="logout">
-            <span style="display:block;">退出</span>
+            <span style="display: block">退出</span>
           </el-dropdown-item>
           <!-- <router-link to="/login">
             <el-dropdown-item>
@@ -31,30 +37,58 @@
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import Breadcrumb from '@/components/Breadcrumb'
-import Hamburger from '@/components/Hamburger'
+import { mapGetters } from "vuex";
+import Breadcrumb from "@/components/Breadcrumb";
+import Hamburger from "@/components/Hamburger";
+import { getAccountInfo } from "@/api/user";
+import { getSupplierInfo } from "@/api/supplier";
 
 export default {
   components: {
     Breadcrumb,
-    Hamburger
+    Hamburger,
   },
   computed: {
-    ...mapGetters([
-      'sidebar',
-      'avatar'
-    ])
+    ...mapGetters(["sidebar", "avatar", "roles"]),
+  },
+  data() {
+    return {
+      userName: "", //管理员名称
+      supplierName: "", //供应商名称
+    };
   },
   methods: {
     toggleSideBar() {
-      this.$store.dispatch('app/toggleSideBar')
+      this.$store.dispatch("app/toggleSideBar");
     },
+    /* 退出登录 */
     async logout() {
-      await this.$store.dispatch('user/ActionLogout')
-    }
-  }
-}
+      await this.$store.dispatch("user/ActionLogout");
+    },
+   
+
+
+    //获取数据方法
+    async getData() {
+      if (this.roles[0] === "admin") {
+        let res = await getAccountInfo();
+        //数据赋值
+        this.userName = res.data.account;
+      } else if(this.roles[0] === "salesman") {
+         let res = await getAccountInfo();
+        //数据赋值
+        this.userName = res.data.account;
+      }else {
+        let req = await getSupplierInfo();
+        this.supplierName = req.data.account;
+        console.log(req);
+      }
+    },
+  },
+  mounted() {
+    this.getData();
+  },
+};
 </script>
 
 <style lang="scss" >
@@ -63,22 +97,29 @@ export default {
   overflow: hidden;
   position: relative;
   background: #fff;
-  box-shadow: 0 1px 4px rgba(0,21,41,.08);
+  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
+  .nav-userName {
+    position: relative;
+    top: -6px;
+    left: -35px;
+    font-size: 14px;
+    color: #298be2;
+  }
 
   .hamburger-container {
     line-height: 46px;
     height: 100%;
     float: left;
     cursor: pointer;
-    transition: background .3s;
-    -webkit-tap-highlight-color:transparent;
+    transition: background 0.3s;
+    -webkit-tap-highlight-color: transparent;
 
     &:hover {
-      background: rgba(0, 0, 0, .025)
+      background: rgba(0, 0, 0, 0.025);
     }
   }
-  .right-menu .el-dropdown-menu__item{
-    padding:0 30px !important;
+  .right-menu .el-dropdown-menu__item {
+    padding: 0 30px !important;
   }
   .breadcrumb-container {
     float: left;
@@ -103,10 +144,10 @@ export default {
 
       &.hover-effect {
         cursor: pointer;
-        transition: background .3s;
+        transition: background 0.3s;
 
         &:hover {
-          background: rgba(0, 0, 0, .025)
+          background: rgba(0, 0, 0, 0.025);
         }
       }
     }

+ 16 - 0
src/layout/components/Sidebar/SidebarItem.vue

xqd
@@ -95,3 +95,19 @@ export default {
   }
 }
 </script>
+<style lang="scss">
+.svg-icon{
+  margin-left: 4px;
+}
+.el-tooltip{
+  position: absolute !important;
+  left: 0px !important;
+  top: 0px;
+  height: 100%;
+  width: 100%;
+  display: inline-block;
+  box-sizing: border-box;
+  padding: 0px -20px;
+}
+
+</style>

+ 0 - 6
src/utils/request.js

xqd
@@ -77,18 +77,12 @@ service.interceptors.response.use(
   response => {
     const res = response.data
     // if the custom code is not 20000, it is judged as an error.
-
-	console.log(response,"response")
-	console.log(res,"res")
-
     // if (res.code !== 200) {
     //   Message({
     //     message: res.msg || 'Error',
     //     type: 'error',
     //     duration: 5 * 1000
     //   })
-
-
       // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
       // if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
       //   // to re-login

+ 23 - 6
src/views/contracts/index.vue

xqd xqd xqd
@@ -5,15 +5,26 @@
       <div class="grid-content bg-purple">
         <el-input
           v-model="formData.name"
-          placeholder="合同名称/编号、承兑人名称或出票人名称"
-
+          placeholder="合同名称/编号、承兑人名称..."
           clearable
-          style="width:350px"
+          style="width: 160px"
           @change="Search"
         >
           <i slot="prefix" class="el-input__icon el-icon-search" />
         </el-input>
       </div>
+      <!-- 供应商查询 -->
+      <div class="grid-content bg-purple">
+        <el-input
+          v-model="formData.supplierName"
+          placeholder="请输入供应商名称"
+          clearable
+          style="width: 180px"
+          @change="searchName"
+        >
+          <i slot="prefix" class="el-input__icon el-icon-search" />
+        </el-input>
+      </div>
       <!-- 合同状态 -->
       <div class="grid-content bg-purple">
         <el-dropdown @command="handleCommand">
@@ -584,9 +595,9 @@ export default {
     startEndTime(item) {
       if (item == null) {
         item = [];
-         this.formData.startTime = ''
-        this.formData.endTime = '';
-         this.currentPage = 1;
+        this.formData.startTime = "";
+        this.formData.endTime = "";
+        this.currentPage = 1;
         this.searchForm = { ...this.formData };
         this.getData(this.searchForm);
       } else {
@@ -603,6 +614,12 @@ export default {
       this.searchForm = { ...this.formData };
       this.getData(this.searchForm);
     },
+    // 供应商查询
+    searchName() {
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      this.getData(this.searchForm);
+    },
 
     handleSelectionChange(data) {
       this.multipleSelection = data;

+ 63 - 40
src/views/delivery/index.vue

xqd xqd xqd xqd xqd xqd
@@ -17,7 +17,7 @@
         <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 }}
@@ -36,7 +36,7 @@
         <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 }}
@@ -118,13 +118,12 @@
       >
       </el-table-column>
       <el-table-column
-        label="供应商状态"
-        width="180"
+        label="审核状态"
         align="center"
         prop="statusText"
       >
       </el-table-column>
-      <el-table-column label="审核状态" align="center" prop="isDeletedText">
+      <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>
@@ -165,6 +164,23 @@
         </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 style="display: flex; justify-content: space-between">
       <el-row type="flex" justify="end">
         <div class="btn" style="display: flex; justify-content: flex-end">
@@ -233,6 +249,14 @@ export default {
   },
   data() {
     return {
+	  //重置密码
+	  password:{
+		  newpassword:'',
+		  ConfirmnewPassword:'',
+		  supplierId:'',
+	  },
+	  // 控制弹窗
+	  dialogVisible:false,
       // 表单数据
       formData: {
         startTime: "",
@@ -616,42 +640,41 @@ export default {
       });
     },
     reset(id) {
-      this.$prompt("请输入密码", "重置密码", {
-        confirmButtonText: "确定",
-        cancleButtonText: "取消",
-      })
-        .then(({ value }) => {
-          if (value.length < 6) {
-            this.$message({
-              type: "error",
-              message: "密码至少六位!",
-            });
-          } else {
-            this.$request({
-              url: "/api/Account/password/resetSupplier",
-              method: "post",
-              data: {
-                password: value,
-                supplierId: id,
-              },
-            }).then((res) => {
-              console.log(res);
-              if (res.code === 200) {
-                this.$message({
-                  type: "success",
-                  message: "重置成功",
-                });
-              }
-            });
-          }
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消重置密码",
-          });
-        });
+		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>

+ 6 - 4
src/views/form/addTicketdrawer.vue

xqd
@@ -39,10 +39,12 @@
 					method: 'post',
 					data: this.form
 				}).then((res) => {
-					this.$message("添加成功!")
-					this.$router.push({
-						path: 'index'
-					})
+					if(res.code===200){
+						this.$message("添加成功!")
+						this.$router.go(-1)
+					}else{
+						this.$message("提交失败")
+					}
 				})
 			},
 			resetForm(form) {

+ 0 - 1
src/views/form/detail.vue

xqd
@@ -47,7 +47,6 @@
 					createdAt: '',
 					status: '',
 					statusText: '',
-
 				},
 			}
 		},

+ 450 - 373
src/views/form/index.vue

xqd
@@ -1,396 +1,473 @@
 <template>
 
-  <div class="app-container">
-    <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
-      <div class="grid-content bg-purple">
-        <div class="grid-content bg-purple" style="margin-left: 30px">
-          <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>
-      <div class="grid-content bg-purple">
-        <el-dropdown @command="handleCommand">
-          <div class="pulldown">
-            <span class="el-dropdown-link" v-if="!status"> 出票人状态 </span>
-            <span class="el-dropdown-link" v-if="status">
-              {{ status }}
-            </span>
-            <i class="el-icon-arrow-down el-icon--right"></i>
-          </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="app-container">
+		<el-row type="flex" justify="space-between" style="margin-bottom: 20px">
+			<div class="grid-content bg-purple">
+				<div class="grid-content bg-purple" style="margin-left: 30px">
+					<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>
+			<div class="grid-content bg-purple">
+				<el-dropdown @command="handleCommand">
+					<div class="pulldown">
+						<span class="el-dropdown-link" v-if="!status"> 出票人状态 </span>
+						<span class="el-dropdown-link" v-if="status">
+							{{ status }}
+						</span>
+						<i class="el-icon-arrow-down el-icon--right"></i>
+					</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"
-        style="display: flex; justify-content: flex-end"
-      >
-        <el-button type="primary" @click="addTicketdrawer"
-          >新增出票人</el-button
-        >
-        <el-button type="primary" @click="Exports">批量导出</el-button>
-      </div>
-    </el-row>
-    <el-table
-      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"> </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
+			<div class="grid-content bg-purple" style="display: flex; justify-content: flex-end">
+				<el-button type="primary" @click="dialogVisible2=true">新增出票人</el-button>
+				<el-button type="primary" @click="Exports">批量导出</el-button>
+			</div>
+		</el-row>
+		
+		<!--修改出票人弹窗 -->
+		<el-dialog title="修改出票人" :visible.sync="dialogVisible1" width="30%">
+		<el-form ref="form" :model="tableData" label-width="80px">
+			<el-form-item label="姓名" prop="tableData.name">
+				<el-input v-model="tableData.name" style="width: 300px;"></el-input>
+			</el-form-item>
+			<el-form-item label="银行账户" prop="tableData.bankAccount">
+				<el-input v-model="tableData.bankAccount" style="width: 300px;"></el-input>
+			</el-form-item>
+			<el-form-item label="银行名称" prop="tableData.bankName">
+				<el-input v-model="tableData.bankName" style="width: 300px;"></el-input>
+			</el-form-item>
+			<el-form-item >
+				<el-button @click="dialogVisible1 = false">取 消</el-button>
+				<el-button type="primary" @click="onSubmit">提交修改</el-button>
+			</el-form-item>
+		</el-form>
+		</el-dialog>
+		
+		<el-dialog title="新增出票人" :visible.sync="dialogVisible2" width="30%">
+			<el-form ref="form" :model="form" label-width="100px">
+				<el-form-item label="出票人名称" style="width: 500px;" prop="name">
+					<el-input v-model="form.name"></el-input>
+				</el-form-item>
+				<el-form-item label="账号" style="width: 500px;" prop="bankAccount">
+					<el-input v-model="form.bankAccount"></el-input>
+				</el-form-item>
+				<el-form-item label="开户行名称" style="width: 500px;" prop="bankName">
+					<el-input v-model="form.bankName"></el-input>
+				</el-form-item>
+				<el-form-item style="display: flex;">
+					<!-- <el-button type="primary" @click="resetForm('form')">重置</el-button> -->
+					<el-button @click="dialogVisible2 = false">取 消</el-button>
+					<el-button type="primary" @click="addTicketdrawer">确认添加</el-button>
+				</el-form-item>
+			</el-form>
+		</el-dialog>
+		
+		<el-table 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"> </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="todetail(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-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 { getList } from "@/api/table";
-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 {
-      // 表单数据
-      formData: {
-        startTime: "",
-        endTime: "",
-        name: "", // 出票人
-        status: "", // 出票人状态
-      },
-      /* 当前页数 */
-      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: "",
-    };
-  },
+	import {
+		getList
+	} from "@/api/table";
+	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: '',
+				},
+				// 修改出票人数据
+				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: "",
+			};
+		},
 
-  mounted() {
-    this.checked = this.$store.state.user.checked;
-    this.getAllList();
-  },
-  methods: {
-    /* 获取列表数据 */
-    getAllList(searchForm = {}) {
-      const params = {
-        pageIndex: this.currentPage,
-        pageSize: this.pagesize,
-      };
-      getDrawerSearch({ ...params, ...searchForm }).then((res) => {
-        const { data } = res;
-        this.temporaryList = data.result;
-        this.srcList = data.result;
-        this.total = res.data.total;
-      });
-    },
-    handleSelectionChange(data) {
-      this.multipleSelection = data;
-      console.log(this.multipleSelection);
-    },
-    handleAll(data) {
-      this.multipleSelection = data;
-      console.log(this.multipleSelection);
-    },
-    handlehpCommand(command) {
-      this.hpstatus = command;
-    },
-    addTicketdrawer() {
-      this.$router.push({
-        path: "/form/addTicketdrawer",
-      });
-    },
-    todetail(id) {
-      console.log(id);
-      this.$router.push({
-        path: "/form/detail",
-        query: {
-          id: id,
-        },
-      });
-    },
-    recover(id) {
-      this.$request({
-        url: "/api/Drawer/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: "danger",
-            message: "恢复失败",
-          });
-          this.getAllList();
-        }
-      });
-    },
-    deletestatus(id) {
-      this.$request({
-        url: "/api/Drawer/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: "danger",
-            message: "删除失败",
-          });
-          this.getAllList();
-        }
-      });
-    },
+		mounted() {
+			this.checked = this.$store.state.user.checked;
+			this.getAllList();
+		},
+		methods: {
+			/* 获取列表数据 */
+			getAllList(searchForm = {}) {
+				const params = {
+					pageIndex: this.currentPage,
+					pageSize: this.pagesize,
+				};
+				getDrawerSearch({
+					...params,
+					...searchForm
+				}).then((res) => {
+					const {
+						data
+					} = res;
+					this.temporaryList = data.result;
+					this.srcList = data.result;
+					this.total = res.data.total;
+				});
+			},
+			handleSelectionChange(data) {
+				this.multipleSelection = data;
+				console.log(this.multipleSelection);
+			},
+			handleAll(data) {
+				this.multipleSelection = data;
+				console.log(this.multipleSelection);
+			},
+			handlehpCommand(command) {
+				this.hpstatus = command;
+			},
+			addTicketdrawer() {
+				this.$router.push({
+					path: "/form/addTicketdrawer",
+				});
+			},
+			todetail(id) {
+				console.log(id);
+				this.$router.push({
+					path: "/form/detail",
+					query: {
+						id: id,
+					},
+				});
+			},
+			recover(id) {
+				this.$request({
+					url: "/api/Drawer/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: "danger",
+							message: "恢复失败",
+						});
+						this.getAllList();
+					}
+				});
+			},
+			deletestatus(id) {
+				this.$request({
+					url: "/api/Drawer/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: "danger",
+							message: "删除失败",
+						});
+						this.getAllList();
+					}
+				});
+			},
+			
+			// 修改信息弹窗
+			modify(id){
+				this.dialogVisible1=true
+				this.$request({
+					url: '/api/Drawer/' + id,
+					method: 'get',
+				}).then((res) => {
+					this.tableData = res.data
+					this.talbeData = this.$route.query.id
+				})
+			},
+			// 修改信息弹窗提交
+			onSubmit(){
+				this.$request({
+					url: '/api/Drawer/update',
+					method: 'post',
+					data: this.tableData
+				}).then((res) => {
+					if (res.code == 200) {
+						this.$message({
+							type: 'success',
+							message: '修改成功!'
+						})
+						this.getAllList();
+						this.dialogVisible1=false
+					} else {
+						this.$message({
+							type: 'danger',
+							message: '修改失败!'
+						})
+					}
+				})
+			},
+			// 新增出票人弹窗
+			addTicketdrawer(){
+				this.$request({
+					url: '/api/Drawer',
+					method: 'post',
+					data: this.form
+				}).then((res) => {
+					if(res.code===200){
+						this.$message("添加成功!")
+						this.getAllList();
+						this.dialogVisible2=false
+					}else{
+						this.$message("提交失败")
+					}
+				})
+			},
+			
 
-    /* 输入出票人状态查询 */
-    handleCommand(command) {
-      this.status = command;
-          if (command === '正常') {
-          this.formData.status = 5
-        }
-        if (command === '删除') {
-          this.formData.status = 4
-        }
-        if (command === '全部') {
-          this.formData.status = ''
-        }
-      this.currentPage = 1;
-      this.searchForm = { ...this.formData };
-      this.getAllList(this.searchForm);
-    },
-    /* 输入出票人名称查询 */
-    Search() {
-      this.currentPage = 1;
-      this.searchForm = { ...this.formData };
-      this.getAllList(this.searchForm);
-    },
+			/* 输入出票人状态查询 */
+			handleCommand(command) {
+				this.status = command;
+				if (command === '正常') {
+					this.formData.status = 5
+				}
+				if (command === '删除') {
+					this.formData.status = 4
+				}
+				if (command === '全部') {
+					this.formData.status = ''
+				}
+				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);
+			},
 
-    /* 导出 */
-    Exports() {
-      if (this.multipleSelection == "") {
-        this.$message({
-          type: "warning",
-          message: "请选择数据!",
-        });
-      } 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("导出成功!");
-      }
-    },
-  },
-};
+			/* 导出 */
+			Exports() {
+				if (this.multipleSelection == "") {
+					this.$message({
+						type: "warning",
+						message: "请选择数据!",
+					});
+				} 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("导出成功!");
+				}
+			},
+		},
+	};
 </script>
 <style lang="scss">
-.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>

+ 271 - 257
src/views/login/index.vue

xqd xqd xqd xqd xqd
@@ -15,20 +15,27 @@
               auto-complete="on"
               label-position="left"
             >
-
               <div class="title-container">
                 <h3 class="title">登录</h3>
               </div>
               <div class="checkbox flex1">
-                <div class="business " :class="checked==0 ? 'bnesper' : 'actbnes' " @click="checked=0">
+                <div
+                  class="business"
+                  :class="checked == 0 ? 'bnesper' : 'actbnes'"
+                  @click="checked = 0"
+                >
                   <p class="asp">业务人员</p>
                 </div>
-                <div class="business " :class="checked==1 ? 'applyper' : 'actapp' " @click="checked=1">
+                <div
+                  class="business"
+                  :class="checked == 1 ? 'applyper' : 'actapp'"
+                  @click="checked = 1"
+                >
                   <p class="asp">供应商</p>
                 </div>
               </div>
               <el-form-item prop="username">
-                <span class="svg-container"> 账 </span>
+                <span class="svg-container"> 账 </span>
                 <el-input
                   ref="username"
                   v-model="loginForm.username"
@@ -41,9 +48,7 @@
               </el-form-item>
 
               <el-form-item prop="password">
-                <span class="svg-container">
-                  密码
-                </span>
+                <span class="svg-container"> 密码 </span>
                 <el-input
                   :key="passwordType"
                   ref="password"
@@ -56,7 +61,11 @@
                   @keyup.enter.native="handleLogin"
                 />
                 <span class="show-pwd" @click="showPwd">
-                  <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
+                  <svg-icon
+                    :icon-class="
+                      passwordType === 'password' ? 'eye' : 'eye-open'
+                    "
+                  />
                 </span>
               </el-form-item>
 
@@ -68,139 +77,146 @@
                   <p class="asp">忘记密码?</p>
                 </div>
               </div>
-              <el-button :loading="loading" type="primary" class="loginbtn" @click.native.prevent="handleLogin">登录
+              <el-button
+                :loading="loading"
+                type="primary"
+                class="loginbtn"
+                @click.native.prevent="handleLogin"
+                >登录
               </el-button>
             </el-form>
           </div>
         </el-col>
       </el-col>
-
     </el-row>
   </div>
 </template>
 
 <script>
-import logo from '/src/assets/img/logo.png'
+import logo from "/src/assets/img/logo.png";
 import router from "@/router";
 export default {
-  name: 'Login',
+  name: "Login",
   data() {
     const validateUsername = (rule, value, callback) => {
       if (value.length === 0) {
-        callback(new Error('请输入账户名称'))
+        callback(new Error("请输入账户名称"));
       } else {
-        callback()
+        callback();
       }
-    }
+    };
     const validatePassword = (rule, value, callback) => {
       if (value.length < 6) {
-        callback(new Error('请输入大于6位数密码'))
+        callback(new Error("请输入大于6位数密码"));
       } else {
-        callback()
+        callback();
       }
-    }
-    const validateloginType = (rule, value, callback) => {
-
-    }
+    };
+    const validateloginType = (rule, value, callback) => {};
     return {
       loginForm: {
-        username: 'admin',
-        password: '123456',
-        loginType: 0
+        username: "admin",
+        password: "123456",
+        loginType: 0,
       },
       loginRules: {
-        username: [{
-          required: true,
-          trigger: 'blur',
-          validator: validateUsername
-        }],
-        password: [{
-          required: true,
-          trigger: 'blur',
-          validator: validatePassword
-        }],
-        loginType: [{
-          required: true,
-          trigger: 'blur',
-          validator: validateloginType
-        }]
+        username: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateUsername,
+          },
+        ],
+        password: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validatePassword,
+          },
+        ],
+        loginType: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateloginType,
+          },
+        ],
       },
       loading: false,
-      passwordType: 'password',
+      passwordType: "password",
       redirect: undefined,
       src: logo,
-      checked: 0
-    }
+      checked: 0,
+    };
   },
   watch: {
     $route: {
-      handler: function(route) {
-        this.redirect = route.query && route.query.redirect
+      handler: function (route) {
+        this.redirect = route.query && route.query.redirect;
       },
-      immediate: true
-    }
+      immediate: true,
+    },
   },
   mounted() {
     if (this.$route.query.checked) {
-      this.checked = this.$route.query.checked
+      this.checked = this.$route.query.checked;
     }
   },
   methods: {
     showPwd() {
-      if (this.passwordType === 'password') {
-        this.passwordType = ''
+      if (this.passwordType === "password") {
+        this.passwordType = "";
       } else {
-        this.passwordType = 'password'
+        this.passwordType = "password";
       }
       this.$nextTick(() => {
-        this.$refs.password.focus()
-      })
+        this.$refs.password.focus();
+      });
     },
     registerNum() {
       this.$router.push({
-        path: '/register',
+        path: "/register",
         query: {
-          checked: this.checked
-        }
-      })
+          checked: this.checked,
+        },
+      });
     },
     open() {
-      const h = this.$createElement
+      const h = this.$createElement;
       this.$msgbox({
-        title: '',
-        message: h('p', null, [
-          h('span', null, '请电话联系管理员,进行密码确定 ')
+        title: "",
+        message: h("p", null, [
+          h("span", null, "请电话联系管理员,进行密码确定 "),
         ]),
         showCancelButton: true,
         showConfirmButton: true,
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            done()
+          if (action === "confirm") {
+            done();
           } else {
-            done()
+            done();
           }
-        }
-      }).then(action => {
+        },
+      }).then((action) => {
         // this.$message({
         //   type: 'info',
         //   message: 'action: ' + action
         // })
-      })
+      });
     },
     handleLogin() {
-      this.loginForm.loginType = this.checked + 1
-      this.$refs.loginForm.validate(valid => {
+      this.loginForm.loginType = this.checked + 1;
+      this.$refs.loginForm.validate((valid) => {
         if (!valid) {
-          this.$message.error('请检查表单')
-          return
+          this.$message.error("请检查表单");
+          return;
         }
-        this.$store.dispatch('user/ActionLogin', this.loginForm)
-		this.$store.commit('user/getAdmin', this.checked)
-		
-      })
-    }
+        this.$store.dispatch("user/ActionLogin", this.loginForm);
+        this.$store.commit("user/getAdmin", this.checked);
+      });
+    },
     //  handleLogin() {
     //   that.loginForm.loginType = that.checked + 1
     //   console.log(this.loginForm, 88)
@@ -222,233 +238,231 @@ export default {
     //       return false
     //     }
     //   })
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" >
-  /* 修复input 背景不协调 和光标变色 */
-  /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
+/* 修复input 背景不协调 和光标变色 */
+/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
 
-  $bg:#F6F6F6;
-  $light_gray:#BEBDBB;
-  $cursor: #BEBDBB;
+$bg: #f6f6f6;
+$light_gray: #bebdbb;
+$cursor: #bebdbb;
 
-  @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
-    .login-container .el-input input {
-      color: $cursor;
-    }
+@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
+  .login-container .el-input input {
+    color: $cursor;
   }
+}
 
-  /* reset element-ui css */
-  .login-container {
-    background: url("../../assets/img/loginbg.png") no-repeat;
-    background-size: 100%;
-
-    .el-input {
-      display: inline-block;
+/* reset element-ui css */
+.login-container {
+  background: url("../../assets/img/loginbg.png") no-repeat;
+  background-size: 100%;
+
+  .el-input {
+    display: inline-block;
+    height: 47px;
+    width: 85%;
+    background-color: #f6f6f6;
+
+    input {
+      background: #f6f6f6;
+      border: 0px;
+      -webkit-appearance: none;
+      border-radius: 0px;
+      padding: 12px 5px 12px 15px;
+      color: $light_gray;
       height: 47px;
-      width: 85%;
-      background-color: #F6F6F6;
-
-      input {
-        background: #F6F6F6;
-        border: 0px;
-        -webkit-appearance: none;
-        border-radius: 0px;
-        padding: 12px 5px 12px 15px;
-        color: $light_gray;
-        height: 47px;
-        caret-color: $cursor;
-
-        &:-webkit-autofill {
-          box-shadow: 0 0 0px 1000px $bg inset !important;
-          -webkit-text-fill-color: $cursor !important;
-        }
+      caret-color: $cursor;
+
+      &:-webkit-autofill {
+        box-shadow: 0 0 0px 1000px $bg inset !important;
+        -webkit-text-fill-color: $cursor !important;
       }
     }
+  }
 
-    .el-form-item {
-      border: 1px solid rgba(255, 255, 255, 0.1);
-      background: #F6F6F6;
-      border-radius: 5px;
-      color: #454545;
-    }
+  .el-form-item {
+    border: 1px solid rgba(255, 255, 255, 0.1);
+    background: #f6f6f6;
+    border-radius: 5px;
+    color: #454545;
   }
+}
 </style>
 
 <style lang="scss" scoped>
-  $bg:#2d3a4b;
-  $dark_gray:#F6F6F6;
-  $light_gray:#eee;
-
-  .login-container {
-    height: 100%;
-    width: 100%;
-    // background-color: $bg;
+$bg: #2d3a4b;
+$dark_gray: #f6f6f6;
+$light_gray: #eee;
+
+.login-container {
+  height: 100%;
+  width: 100%;
+  // background-color: $bg;
+  // overflow: hidden;
+
+  .login-form {
+    position: relative;
+    width: 470px;
+    max-width: 100%;
+    padding: 0 35px 0;
+    margin: 0 auto;
     // overflow: hidden;
+  }
 
-    .login-form {
-      position: relative;
-      width: 470px;
-      max-width: 100%;
-      padding: 0 35px 0;
-      margin: 0 auto;
-      // overflow: hidden;
-    }
-
-    .tips {
-      font-size: 14px;
-      color: #fff;
-      margin-bottom: 10px;
+  .tips {
+    font-size: 14px;
+    color: #fff;
+    margin-bottom: 10px;
 
-      span {
-        &:first-of-type {
-          margin-right: 16px;
-        }
+    span {
+      &:first-of-type {
+        margin-right: 16px;
       }
     }
+  }
 
-    .svg-container {
-      padding: 6px 5px 6px 15px;
-      color: #1F242A;
-      vertical-align: middle;
-      // width: 30px;
-      display: inline-block;
-    }
-
-    .title-container {
-      position: relative;
+  .svg-container {
+    padding: 6px 5px 6px 15px;
+    color: #1f242a;
+    vertical-align: middle;
+    // width: 30px;
+    display: inline-block;
+  }
 
-      .title {
-        font-size: 48px;
-        color: #1F242A;
-        margin: 0px auto 40px auto;
-        // text-align: center;
-        font-weight: bold;
-      }
-    }
+  .title-container {
+    position: relative;
 
-    .show-pwd {
-      position: absolute;
-      right: 10px;
-      top: 7px;
-      font-size: 16px;
-      color: $dark_gray;
-      cursor: pointer;
-      user-select: none;
+    .title {
+      font-size: 48px;
+      color: #1f242a;
+      margin: 0px auto 40px auto;
+      // text-align: center;
+      font-weight: bold;
     }
   }
 
-  .el-row {
-    height: 100%;
-  }
-
-  .el-col {
-    height: 100%;
+  .show-pwd {
+    position: absolute;
+    right: 10px;
+    top: 7px;
+    font-size: 16px;
+    color: $dark_gray;
+    cursor: pointer;
+    user-select: none;
   }
+}
 
-  .business {
-    width: 305px;
-    height: 90px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    text-align: center;
-    // background-color: #D8AB5A;
-    border-raotherdius: 20rpx;
-    color: #FFFFFF;
-    margin-top: 57rpx;
-  }
+.el-row {
+  height: 100%;
+}
 
-  .business {
-    width: 305rpx;
-    height: 90rpx;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    text-align: center;
-    // background-color: #D8AB5A;
-    border-raotherdius: 20rpx;
-    color: #FFFFFF;
-    margin-top: 57rpx;
-    // line-height: 110rpx;
-  }
+.el-col {
+  height: 100%;
+}
 
-  .bnesper {
-    background-size: 100%;
-    background-image: url("../../assets/img/loginbtn4.png");
-    background-repeat: no-repeat;
-    padding-top: 10rpx;
-    color: #FFF1D8;
+.business {
+  width: 305px;
+  height: 90px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  text-align: center;
+  // background-color: #D8AB5A;
+  border-raotherdius: 20rpx;
+  color: #ffffff;
+  margin-top: 57rpx;
+}
 
-    .asp {
-      padding-bottom: 5px;
-    }
-  }
+.business {
+  width: 305rpx;
+  height: 90rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  text-align: center;
+  // background-color: #D8AB5A;
+  border-raotherdius: 20rpx;
+  color: #ffffff;
+  margin-top: 57rpx;
+  // line-height: 110rpx;
+}
 
-  .applyper {
-    background-image: url("../../assets/img/loginbt1.png");
-    background-repeat: no-repeat;
-    background-size: 100%;
-    padding-top: 10rpx;
-    color: #FFF1D8;
+.bnesper {
+  background-size: 100%;
+  background-image: url("../../assets/img/loginbtn4.png");
+  background-repeat: no-repeat;
+  padding-top: 10rpx;
+  color: #fff1d8;
 
-    .asp {
-      padding-bottom: 5px;
-    }
+  .asp {
+    padding-bottom: 5px;
   }
+}
 
-  .actapp {
-    background-image: url("../../assets/img/loginbtn3.png");
-    background-repeat: no-repeat;
-    background-size: 100%;
-    color: #D05C39;
-    margin-bottom: 80rpx;
-
-    .asp {
-      padding-bottom: 20px;
-    }
+.applyper {
+  background-image: url("../../assets/img/loginbt1.png");
+  background-repeat: no-repeat;
+  background-size: 100%;
+  padding-top: 10rpx;
+  color: #fff1d8;
 
-    // line-height: 180rpx;
+  .asp {
+    padding-bottom: 5px;
   }
+}
 
-  .actbnes {
-    background-image: url("../../assets/img/loginbt2.png");
-    background-repeat: no-repeat;
-    background-size: 100%;
-    color: #D05C39;
+.actapp {
+  background-image: url("../../assets/img/loginbtn3.png");
+  background-repeat: no-repeat;
+  background-size: 100%;
+  color: #d05c39;
+  margin-bottom: 80rpx;
 
-    .asp {
-      padding-bottom: 20px;
-    }
+  .asp {
+    padding-bottom: 20px;
   }
 
-  .loginbtn {
-    width: 100%;
-    margin-bottom: 30px;
-    background: linear-gradient(to right, #FFE1AD, #D07539);
-    border: none;
-
-    height: 56px;
-    border-radius: 10px;
+  // line-height: 180rpx;
+}
 
-    font-size: 24px;
+.actbnes {
+  background-image: url("../../assets/img/loginbt2.png");
+  background-repeat: no-repeat;
+  background-size: 100%;
+  color: #d05c39;
 
+  .asp {
+    padding-bottom: 20px;
   }
+}
 
-  .registerbtn {
-    margin-top: -20px;
-    margin-bottom: 30px;
-    font-size: 16px;
+.loginbtn {
+  width: 100%;
+  margin-bottom: 30px;
+  background: linear-gradient(to right, #ffe1ad, #d07539);
+  border: none;
 
-    .forgect {
-      cursor: pointer;
-    }
+  height: 56px;
+  border-radius: 10px;
 
-    .nes {
-      color: #D05C39;
-    }
+  font-size: 24px;
+}
 
+.registerbtn {
+  margin-top: -20px;
+  margin-bottom: 30px;
+  font-size: 16px;
+
+  .forgect {
+    cursor: pointer;
+  }
+
+  .nes {
+    color: #d05c39;
   }
+}
 </style>

+ 89 - 48
src/views/mine/index.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -11,16 +11,16 @@
 							</span>
 						</el-form-item>
 						<el-form-item label="供应商" :rules="[{  message: '姓名不能为空不能为空'}]">
-							<el-input v-model="form.name" class="ipwidth" />
+							<el-input v-model="form.name" class="ipwidth"  disabled/>
 						</el-form-item>
 						<el-form-item label="社会信用代码" :rules="[{ message: '电话号码不能为空'}]">
-							<el-input v-model="form.socialCode" class="ipwidth" />
+							<el-input v-model="form.socialCode" class="ipwidth" disabled/>
 						</el-form-item>
 						<el-form-item label="法人姓名" :rules="[{  message: '身份证不能为空'}]">
-							<el-input v-model="form.legalPerson" class="ipwidth" />
+							<el-input v-model="form.legalPerson" class="ipwidth" disabled/>
 						</el-form-item>
 						<el-form-item label="联系人" :rules="[{  message: '身份证不能为空'}]">
-							<el-input v-model="form.contacts" class="ipwidth" />
+							<el-input v-model="form.contacts" class="ipwidth" disabled/>
 						</el-form-item>
 						</el-form-item>
 					</el-form>
@@ -33,12 +33,13 @@
 							</span>
 						</el-form-item>
 						<el-form-item label="联系电话">
-							<el-input v-model="form.contactsMobile" class="ipwidth" />
+							<el-input v-model="form.contactsMobile" class="ipwidth" disabled/>
 						</el-form-item>
 						<el-form-item label="账号">
-							<el-input v-model="form.account" class="ipwidth" />
+							<el-input v-model="form.account" class="ipwidth" disabled/>
 						</el-form-item>
-						<el-collapse v-model="activeNames" @change="handleChange" style="width: 80%;float: right;">
+						
+						<el-collapse v-model="activeNames"  style="width: 80%;float: right;">
 							<el-collapse-item title="认证照片" name="3">
 								<div>
 									<el-image style="width: 100px; height: 100px" v-for="(item,index) in form.identifyPicList" :key="index" :src="item"
@@ -54,14 +55,38 @@
 								</div>
 							</el-collapse-item>
 							<el-collapse-item title="修改密码" name="5">
-								<el-input v-model="oldPassword" placeholder="请输入旧密码"></el-input>
-								<el-input v-model="newPassword" placeholder="请输入新密码"></el-input>
+								<el-input v-model="password.oldPassword" placeholder="请输入旧密码" type="password" show-password></el-input>
+								<el-input v-model="password.newPassword" placeholder="请输入新密码" type="password" show-password></el-input>
+								<el-input v-model="password.ConfirmnewPassword" placeholder="确认新密码" type="password" show-password ></el-input>
 								<el-button type="primary" @click="onSubmit">确认修改</el-button>
 							</el-collapse-item>
 						</el-collapse>
 						</el-form-item>
 					</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-item label="" style="border-bottom:1px solid #F4F4F4">
@@ -79,10 +104,11 @@
 							<el-input v-model="form.mobile" class="ipwidth" />
 						</el-form-item>
 					</el-form>
-					<el-collapse v-model="activeNames" @change="handleChange" style="width: 90%;float: right;">
+					<el-collapse v-model="password"  style="width: 90%;float: right;">
 						<el-collapse-item title="修改密码" name="1">
-							<el-input v-model="oldPassword" placeholder="请输入旧密码"></el-input>
-							<el-input v-model="newPassword" placeholder="请输入新密码"></el-input>
+							<el-input v-model="password.oldPassword" placeholder="请输入旧密码" type="password" show-password></el-input>
+							<el-input v-model="password.newPassword" placeholder="请输入新密码" type="password" show-password></el-input>
+							<el-input v-model="password.ConfirmnewPassword" placeholder="确认新密码" type="password" show-password></el-input>
 							<el-button type="primary" @click="onSubmit">确认修改</el-button>
 						</el-collapse-item>
 						<el-collapse-item title="忘记密码">
@@ -91,6 +117,7 @@
 					</el-collapse>
 				</el-col>
 			</el-col>
+			
 		</el-row>
 	</div>
 </template>
@@ -100,14 +127,20 @@
 	export default {
 		data() {
 			return {
+				// 弹窗
+				dialogVisible:false,
 				role: '',
 				id: '',
 				resource: '',
 				radio: '1',
-				activeNames: '',
+				activeNames:'',
 				form: {},
-				oldPassword: '',
-				newPassword: ''
+				password:{
+					oldPassword: '',
+					newPassword: '',
+					ConfirmnewPassword:'',
+				},
+				
 			}
 		},
 		mounted() {
@@ -133,43 +166,51 @@
 			}
 		},
 		methods: {
-			handleChange() {
-
-			},
 			onSubmit() {
-				if(this.role===2){
-					this.$request({
-						url: '/api/Supplier/password',
-						method: 'post',
-						data: {
-							oldPassword: this.oldPassword,
-							newPassword: this.newPassword
-						}
-					}).then((res) => {
-						console.log(res)
-						this.$message({
-							type: 'success',
-							message: '修改密码成功'
-						})
-					}).catch((err) => {
-						console.log(err)
+				if(this.password.ConfirmnewPassword!==this.password.newPassword){
+					this.$message({
+						type:"error",
+						message:'密码和确认密码不一致'
 					})
-				}else if(this.role===1){
-					this.$request({
-						url:'/api/Account/password',
-						method:'post',
-						data:{
-							oldPassword: this.oldPassword,
-							newPassword: this.newPassword
-						}
-					}).then((res)=>{
-						this.$message({
-							type: 'success',
-							message: '修改密码成功'
+				}else{
+					if(this.role===2){
+						this.$request({
+							url: '/api/Supplier/password',
+							method: 'post',
+							data: {
+								oldPassword: this.password.oldPassword,
+								newPassword: this.password.newPassword
+							}
+						}).then((res) => {
+							if(res.code===200){
+								this.$message({
+									type: 'success',
+									message: '修改密码成功'
+								})
+								this.dialogVisible=false
+							}
+						}).catch((err) => {
+							console.log(err)
 						})
-					})
+					}else if(this.role===1){
+						this.$request({
+							url:'/api/Account/password',
+							method:'post',
+							data:{
+								oldPassword: this.password.oldPassword,
+								newPassword: this.password.newPassword
+							}
+						}).then((res)=>{
+							if(res.code===200){
+								this.$message({
+									type: 'success',
+									message: '修改密码成功'
+								})
+								this.dialogVisible=false
+							}
+						})
+					}
 				}
-				
 			},
 			onCancel() {
 				this.$message({

+ 86 - 79
src/views/register/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -14,25 +14,26 @@
 								type="text" tabindex="1" />
 						</el-form-item>
 						<el-form-item prop="username">
-							<span class="svg-container"> 账户 </span>
+							<span class="svg-container"> 登录账户 </span>
 							<el-input ref="username" v-model="loginForm.account" placeholder="输入账户名称" name="username"
 								type="text" tabindex="2" />
 						</el-form-item>
-						<el-form-item prop="username">
-							<span class="svg-container"> 密码 </span>
+						<el-form-item prop="password">
+							<span class="svg-container"> 登录密码 </span>
 							<el-input ref="password" v-model="loginForm.password" placeholder="至少6位数的字母数字组合"
-								name="password" :type="passwordType" tabindex="3" />
+								name="password" :type="passwordType" tabindex="2" show-password />
 						</el-form-item>
-						<el-form-item prop="password">
+						<el-form-item prop="surepsd">
 							<span class="svg-container"> 确认密码 </span>
 							<el-input :key="passwordType" ref="password" v-model="loginForm.surepsd"
-								:type="passwordType" placeholder="至少6位数的字母数字组合" name="password" tabindex="4"
-								auto-complete="on" @keyup.enter.native="handleLogin" />
+								:type="passwordType" placeholder="至少6位数的字母数字组合" name="password" auto-complete="on"
+								show-password tabindex="3" />
 						</el-form-item>
 						<el-form-item prop="mobile">
 							<span class="svg-container"> 联系电话 </span>
 							<el-input ref="mobile" v-model="loginForm.mobile" type="text" placeholder="请输入业务员联系电话"
-								name="mobile" tabindex="5" auto-complete="on" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" />
+								name="mobile" tabindex="5" auto-complete="on"
+								onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" />
 						</el-form-item>
 
 						<el-button :loading="loading" type="primary" class="loginbtn"
@@ -103,16 +104,6 @@
 							<el-input ref="name" v-model="providerForm.name" placeholder="输入供货商名称" name="name"
 								type="text" tabindex="1" />
 						</el-form-item>
-						<el-form-item prop="username">
-							<span class="svg-container"> 账户 </span>
-							<el-input ref="username" v-model="providerForm.account" placeholder="输入账户名称" name="username"
-								type="text" tabindex="2" />
-						</el-form-item>
-						<el-form-item prop="username">
-							<span class="svg-container"> 联系人 </span>
-							<el-input ref="password" v-model="providerForm.contacts" placeholder="输入联系人的真实姓名"
-								name="password" type="passwordType" tabindex="3" />
-						</el-form-item>
 						<el-form-item prop="username">
 							<span class="svg-container"> 统一社会信用代码 </span>
 							<el-input ref="username" v-model="providerForm.socialCode" placeholder="输入统一社会信用代码"
@@ -123,21 +114,28 @@
 							<el-input ref="password" v-model="providerForm.legalPerson" placeholder="输入法人的真实姓名"
 								name="password" type="passwordType" tabindex="3" />
 						</el-form-item>
-						<el-form-item prop="password">
-							<span class="svg-container"> 密码 </span>
-							<el-input :key="passwordType" ref="password" v-model="providerForm.password"
-								:type="passwordType" placeholder="至少6位数的字母数字组合" name="password" tabindex="4"
-								auto-complete="on"  />
-							<!-- <span class="show-pwd" @click="showPwd">
-                    <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
-                  </span> -->
+						<el-form-item prop="username">
+							<span class="svg-container"> 联系人 </span>
+							<el-input ref="password" v-model="providerForm.contacts" placeholder="输入联系人的真实姓名"
+								name="password" type="passwordType" tabindex="3" />
 						</el-form-item>
-						<el-form-item prop="mobile" style="margin-bottom: 0">
+						<el-form-item prop="mobile">
 							<span class="svg-container"> 联系电话 </span>
 							<el-input ref="mobile" v-model="providerForm.contactsMobile" type="text"
-								placeholder="请输入业务员联系电话" name="mobile" tabindex="5" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" />
+								placeholder="请输入业务员联系电话" name="mobile" tabindex="5"
+								onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" />
+						</el-form-item>
+						<el-form-item prop="username">
+							<span class="svg-container"> 登录账号 </span>
+							<el-input ref="username" v-model="providerForm.account" placeholder="输入账号名称" name="username"
+								type="text" tabindex="2" />
+						</el-form-item>
+						<el-form-item prop="password">
+							<span class="svg-container"> 登录密码 </span>
+							<el-input :key="passwordType" ref="password" v-model="providerForm.password"
+								:type="passwordType" placeholder="至少6位数的字母数字组合" name="password" tabindex="4"
+								auto-complete="on" show-password />
 						</el-form-item>
-
 						<!-- 供应商上传身份证图片 -->
 						<div class="choosepic">
 							<el-form-item style="background-color: transparent; margin: 0; padding: 0">
@@ -170,9 +168,9 @@
 									style="background-color: transparent; margin: 0; padding: 0">
 									授权委托书
 								</span>
-									<span class="svg-container" style="float: right;">
-										委托书模板下载
-									</span>
+								<span class="svg-container" style="float: right;" @click="download">
+									点击获取授权委托书
+								</span>
 								<div class="boximg">
 									<el-upload action="https://ht.9026.com/api/File" list-type="picture-card"
 										:on-success="handleSuccess">
@@ -250,12 +248,13 @@
 				upweituo: upweituo,
 				fit: "cover",
 				imageUrl: "",
+				// 业务管理员数据
 				loginForm: {
 					realName: "",
 					account: "",
 					password: "",
 					surepsd: "",
-					mobile:"",
+					mobile: "",
 				},
 				/* 供应商数据 */
 				providerForm: {
@@ -265,7 +264,7 @@
 					socialCode: "",
 					legalPerson: "",
 					contacts: "",
-					contactsMobile:"",
+					contactsMobile: "",
 					identifyPics: [],
 					proxyFile: [],
 				},
@@ -363,53 +362,61 @@
 
 			/* 供应商注册发送请求 */
 			handleLogin(form) {
-				if (form == this.loginForm) {
-					this.$request({
-						url: "/api/Account/register",
-						method: "post",
-						data: form,
-					}).then(res => {
-						if(res.code===200){
-							this.$message({
-								type:'success',
-								message:"注册成功"
-							});
-							this.$router.push({
+				if (this.loginForm.password !== this.loginForm.surepsd) {
+					this.$message({
+						type: 'error',
+						message: '密码和确认密码不一致'
+					})
+				} else {
+					if (form == this.loginForm) {
+						this.$request({
+							url: "/api/Account/register",
+							method: "post",
+							data: form,
+						}).then(res => {
+							if (res.code === 200) {
+								this.$message({
+									type: 'success',
+									message: "注册成功"
+								});
+								this.$router.push({
 									path: "/login",
 								});
-						}
-						// if(res.code!=200){
-						// 	this.$message({
-						// 		type:"error",
-						// 		message:res.data.msg
-						// 	});
-						// }else {
-						// 	this.$message({
-						// 		type:"success",
-						// 		message:res.data.msg
-						// 	});
-						// 	this.$router.push({
-						// 		path: "/login",
-						// 	});
-						// }
-						
-					});
-				} else {
-					this.$request({
-						url: "/api/Supplier/register",
-						method: "post",
-						data: form,
-					}).then((res) => {
-						this.$message("注册成功");
-						this.$router.push({
-							path: "/login",
-							query: {
-								checked: this.checked,
-							},
+							}
+						});
+					} else {
+						this.$request({
+							url: "/api/Supplier/register",
+							method: "post",
+							data: form,
+						}).then((res) => {
+							if (res.code === 200) {
+								this.$message({
+									type: 'success',
+									message: "注册成功"
+								});
+								this.$router.push({
+									path: "/login",
+								});
+							}
 						});
-					});
+					}
 				}
+
 			},
+			// 下载委托书模板
+			download(){
+				this.$request({
+					url:'/api/Setting/attorney',
+					method:'get'
+				}).then(res=>{
+					console.log(res)
+					if(res.code===200){
+						let url=res.data
+						window.open(url)
+					}
+				})
+			}
 		},
 	};
 </script>
@@ -453,9 +460,11 @@
 				}
 			}
 		}
+
 		.el-input .el-input__inner {
-		  color: #030303;
+			color: #030303;
 		}
+
 		.el-form-item {
 			border: 1px solid rgba(255, 255, 255, 0.1);
 			background: #f6f6f6;
@@ -667,6 +676,4 @@
 		padding-top: 50px;
 		box-sizing: border-box;
 	}
-	
-
 </style>

+ 280 - 338
src/views/sucuirtyaudit/annexList.vue

xqd xqd xqd xqd
@@ -1,319 +1,256 @@
 <template>
-  <div class="app-container">
-    <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
-      <div class="grid-content bg-purple">
-        <div class="grid-content bg-purple" style="margin-left: 30px">
-          <el-input
-            placeholder="请输入合同名称"
-            v-model="formData.content"
-            @change="Search"
-            style="width: 80%"
-          >
-            <i slot="prefix" class="el-input__icon el-icon-search"></i>
-          </el-input>
-        </div>
-      </div>
-      <div class="grid-content bg-purple">
-         <el-input
-          placeholder="请输入供应商名称"
-          v-model="formData.operateUser"
-          @change="SearchOperateUser"
-          style="width: 100%"
-        >
-          <i slot="prefix" class="el-input__icon el-icon-search"></i>
-        </el-input>
-      </div>
+	<div class="app-container">
+		<el-row type="flex" justify="space-between" style="margin-bottom: 20px">
+			<div class="grid-content bg-purple">
+				<div class="grid-content bg-purple" style="margin-left: 30px">
+					<el-input placeholder="请输入合同名称" v-model="formData.content" @change="Search" style="width: 80%">
+						<i slot="prefix" class="el-input__icon el-icon-search"></i>
+					</el-input>
+				</div>
+			</div>
+			<div class="grid-content bg-purple">
+				<el-input placeholder="请输入供应商名称" v-model="formData.operateUser" @change="SearchOperateUser"
+					style="width: 100%">
+					<i slot="prefix" class="el-input__icon el-icon-search"></i>
+				</el-input>
+			</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="结束日期"
-            value-format="yyyy-MM-dd"
-            :picker-options="pickerOptions"
-            @change="startEndTime"
-          >
-          </el-date-picker>
-        </div>
-      </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="结束日期" value-format="yyyy-MM-dd"
+						:picker-options="pickerOptions" @change="startEndTime">
+					</el-date-picker>
+				</div>
+			</div>
 
-      <div
-        class="grid-content bg-purple"
-        style="display: flex; justify-content: flex-end"
-      >
-        <el-button type="primary" @click="toindex">操作日志</el-button>
-        <el-button type="primary" disabled>附件列表</el-button>
-        <el-button type="primary">批量下载</el-button>
-      </div>
-    </el-row>
-    <el-table
-      v-loading="listLoading"
-      :data="temporaryList"
-      element-loading-text="Loading"
-      border
-      fit
-      highlight-current-row
-      @select="handleSelectionChange"
-      @select-all="handleAll"
-    >
-      <el-table-column align="center" label="" width="55" type="selection">
-      </el-table-column>
-      <el-table-column align="center" label="合同名称" width="200" prop="name">
-      </el-table-column>
+			<div class="grid-content bg-purple" style="display: flex; justify-content: flex-end">
+				<el-button type="primary" @click="toindex">操作日志</el-button>
+				<el-button type="primary" disabled>附件列表</el-button>
+				<el-button type="primary">批量下载</el-button>
+			</div>
+		</el-row>
+		<el-table v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border fit
+			highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
+			<el-table-column align="center" label="" width="55" type="selection">
+			</el-table-column>
+			<el-table-column align="center" label="合同名称" width="200" prop="name">
+			</el-table-column>
 
-      <el-table-column
-        label="供应商名称"
-        align="center"
-        width="340"
-        prop="supplierName"
-      >
-      </el-table-column>
-      <el-table-column label="日期" width="200" align="center">
-        <template slot-scope="scope">
-          <i class="el-icon-time" />
-          <span>{{ scope.row.createdAt }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        align="center"
-        label="合同附件"
-        width="800"
-        prop="attachments"
-      >
-        <template slot-scope="scope">
-          <img
-            width="100"
-            height="100"
-            v-for="item in scope.row.attachments"
-            :key="item.id"
-            :src="item"
-          />
-        </template>
-      </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"
-            >查看详情</el-tag
-          >
-          <el-tag
-            type="primary"
-            style="cursor: pointer; margin-right: 15px"
-            @click="download(scope.row.id)"
-          >
-            下载</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
-        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>
+			<el-table-column label="供应商名称" align="center" width="340" prop="supplierName">
+			</el-table-column>
+			<el-table-column label="日期" width="200" align="center">
+				<template slot-scope="scope">
+					<i class="el-icon-time" />
+					<span>{{ scope.row.createdAt }}</span>
+				</template>
+			</el-table-column>
+			<el-table-column align="center" label="合同附件" width="800" prop="attachments">
+				<template slot-scope="scope">
+					<img width="100" height="100" v-for="item in scope.row.attachments" :key="item.id" :src="item" />
+				</template>
+			</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="todetail(scope.row.id)">查看详情</el-tag>
+					<el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="download(scope.row.id)">
+						下载</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 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 { getAuditLogAttachmentsSearch } from "@/api/auditlog";
-export default {
-  filters: {
-    statusFilter(status) {
-      const statusMap = {
-        published: "success",
-        draft: "gray",
-        deleted: "danger",
-      };
-      return statusMap[status];
-    },
-  },
-  data() {
-    return {
-      // 表单数据
-      formData: {
-        startTime: "",
-        endTime: "",
-        name: "",
-        operateUser: "", //操作人员
-        content: "", //查询内容
-      },
-      /* 当前页数 */
-      currentPage: 1,
-      /* 每页显示个数 */
-      pagesize: 10,
-      /* 总条数 */
-      total: 20,
-      temporaryList: [],
-      srcList: [],
-      list: [],
-      listLoading: false,
-      status: "",
-      hpstatus: "",
-      input4: "",
-      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: "",
-    };
-  },
-  mounted() {
-   this.getAllList();
-  },
-  methods: {
-	/* 获取列表数据 */
-    getAllList(searchForm = {}) {
-      const params = {
-        pageIndex: this.currentPage,
-        pageSize: this.pagesize,
-      };
-      getAuditLogAttachmentsSearch({ ...params, ...searchForm }).then((res) => {
-        const { data } = res;
-        console.log(data);
-        this.temporaryList = data.result;
-        this.srcList = data.result;
-        this.total = res.data.total;
-      });
-	},
-
-    handleCommand(command) {
-      this.status = command;
-    },
-    handlehpCommand(command) {
-      this.hpstatus = command;
-    },
+	import {
+		getAuditLogAttachmentsSearch
+	} from "@/api/auditlog";
+	export default {
+		filters: {
+			statusFilter(status) {
+				const statusMap = {
+					published: "success",
+					draft: "gray",
+					deleted: "danger",
+				};
+				return statusMap[status];
+			},
+		},
+		data() {
+			return {
+				// 表单数据
+				formData: {
+					startTime: "",
+					endTime: "",
+					name: "",
+					operateUser: "", //操作人员
+					content: "", //查询内容
+				},
+				/* 当前页数 */
+				currentPage: 1,
+				/* 每页显示个数 */
+				pagesize: 10,
+				/* 总条数 */
+				total: 20,
+				temporaryList: [],
+				srcList: [],
+				list: [],
+				listLoading: false,
+				status: "",
+				hpstatus: "",
+				input4: "",
+				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: "",
+			};
+		},
+		mounted() {
+			this.getAllList();
+		},
+		methods: {
+			/* 获取列表数据 */
+			getAllList(searchForm = {}) {
+				const params = {
+					pageIndex: this.currentPage,
+					pageSize: this.pagesize,
+				};
+				getAuditLogAttachmentsSearch({
+					...params,
+					...searchForm
+				}).then((res) => {
+					const {
+						data
+					} = res;
+					console.log(data);
+					this.temporaryList = data.result;
+					this.srcList = data.result;
+					this.total = res.data.total;
+				});
+			},
 
-	/* 请输入查询内容 */
-    Search() {
-      this.currentPage = 1;
-      this.searchForm = { ...this.formData };
-      this.getAllList(this.searchForm);
-    },
-    /* 操作人员查询*/
-    SearchOperateUser() {
-      console.log("我是操作人员");
-      this.currentPage = 1;
-      this.searchForm = {
-        ...this.formData,
-      };
-      this.getAllList(this.searchForm);
-    },
+			handleCommand(command) {
+				this.status = command;
+			},
+			handlehpCommand(command) {
+				this.hpstatus = command;
+			},
 
-    // 日期审核状态查询
-    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);
-      }
-    },
+			/* 请输入查询内容 */
+			Search() {
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData
+				};
+				this.getAllList(this.searchForm);
+			},
+			/* 操作人员查询*/
+			SearchOperateUser() {
+				console.log("我是操作人员");
+				this.currentPage = 1;
+				this.searchForm = {
+					...this.formData,
+				};
+				this.getAllList(this.searchForm);
+			},
 
-    /* 分页功能,改变当前页 */
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      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);
+				}
+			},
 
-    /* 分页功能去首页 */
-    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);
-    },
+			/* 分页功能,改变当前页 */
+			handleCurrentChange(val) {
+				this.currentPage = val;
+				this.getAllList(this.searchForm);
+			},
 
-    handleSelectionChange(data) {
-      this.multipleSelection = data;
-      console.log(this.multipleSelection);
-    },
-    handleAll(data) {
-      this.multipleSelection = data;
-      console.log(this.multipleSelection);
-    },
-    todetail() {
-      this.$router.push({
-        path: "/detail",
-      });
-    },
-    toindex() {
-      this.$router.push({
-        path: "/sucuirtyaudit/index",
-      });
-    },
+			/* 分页功能去首页 */
+			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);
+			},
 
+			handleSelectionChange(data) {
+				this.multipleSelection = data;
+				console.log(this.multipleSelection);
+			},
+			handleAll(data) {
+				this.multipleSelection = data;
+				console.log(this.multipleSelection);
+			},
+			todetail() {
+				this.$router.push({
+					path: "/detail",
+				});
+			},
+			toindex() {
+				this.$router.push({
+					path: "/sucuirtyaudit/index",
+				});
 			},
 			handleSelectionChange(data) {
 				this.multipleSelection = data;
@@ -326,8 +263,8 @@ export default {
 			todetail(id) {
 				this.$router.push({
 					path: '/detail',
-					query:{
-						id:id
+					query: {
+						id: id
 					}
 				})
 			},
@@ -383,25 +320,29 @@ export default {
 				var filename = '';
 				var filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
 				var matches = filenameRegex.exec(contentDisposition);
-				if (matches != null && matches[1]){
-				filename = matches[1].replace(/['"]/g,'');
+				if (matches != null && matches[1]) {
+					filename = matches[1].replace(/['"]/g, '');
 				}
 				return decodeURI(filename);
 			},
-			Exports(){
-				let ids=Array.from(this.multipleSelection,({id})=>id)
+			Exports() {
+				let ids = Array.from(this.multipleSelection, ({
+					id
+				}) => id)
 				this.$request({
 					url: '/api/AuditLog/attachments/download',
 					method: 'post',
 					data: {
 						contractIds: ids
 					},
-					responseType:'blob'
+					responseType: 'blob'
 				}).then((res) => {
 					console.log(res)
 					let filename = this.getFileName(res.headers['content-disposition']);
 					let fileData = res.data;
-					let blob = new Blob([fileData],{ type:'application/zip'})
+					let blob = new Blob([fileData], {
+						type: 'application/zip'
+					})
 					let url = URL.createObjectURL(blob)
 					const link = document.createElement('a')
 					link.href = url
@@ -411,37 +352,38 @@ export default {
 					URL.revokeObjectURL(url)
 				})
 			}
-		}
-
 
+		},
+		
+	}
 </script>
 <style lang="scss">
-.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>

+ 0 - 1
src/views/table/detail.vue

xqd
@@ -63,7 +63,6 @@
 			}).then((res) => {
 				this.tableData = res.data
 				this.tableData.id=this.$route.query.id
-				console.log(this.tableData)
 			})
 		},
 		methods:{

+ 151 - 23
src/views/table/index.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -2,14 +2,14 @@
 
 	<div class="app-container">
 		<el-row type="flex" justify="space-between" style="margin-bottom: 20px">
+			<div class="grid-content bg-purple">
 				<div class="grid-content bg-purple">
-					<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>
+					<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>
 			<div class="grid-content bg-purple">
 				<el-dropdown @command="handleCommand">
 					<div class="pulldown">
@@ -27,10 +27,66 @@
 				</el-dropdown>
 			</div>
 			<div class="grid-content bg-purple" style="display: flex; justify-content: flex-end">
-				<el-button type="primary" @click="addAcceptor">新增承兑人</el-button>
+				<el-button type="primary" @click="dialogVisible2=true">新增承兑人</el-button>
 				<el-button type="primary" @click="Exports">批量导出</el-button>
 			</div>
 		</el-row>
+
+		<!-- 弹窗修改 -->
+		<el-dialog title="修改供应商" :visible.sync="dialogVisible1" width="40%">
+			<el-form :model="tableData" label-width="80px">
+				<el-form-item label="姓名" prop="tableData.name">
+					<el-input v-model="tableData.name" style="width: 300px;"></el-input>
+				</el-form-item>
+				<el-form-item label="服务费率" prop="tableData.serviceRate">
+					<el-input v-model="tableData.serviceRate" style="width: 300px;"></el-input>
+				</el-form-item>
+				<el-form-item label="利率" prop="tableData.interest">
+					<el-input v-model="tableData.interest" style="width: 300px;"></el-input>
+				</el-form-item>
+				<el-form-item label="银行账户" prop="tableData.bankAccount">
+					<el-input v-model="tableData.bankAccount" style="width: 300px;"></el-input>
+				</el-form-item>
+				<el-form-item label="银行名称" prop="tableData.bankName">
+					<el-input v-model="tableData.bankName" style="width: 300px;"></el-input>
+				</el-form-item>
+				<el-form-item >
+					<el-button @click="dialogVisible1 = false">取 消</el-button>
+					<el-button type="primary" @click="onSubmit">提交修改</el-button>
+				</el-form-item>
+			</el-form>
+		</el-dialog>
+
+		<!-- 弹窗新增承兑人 -->
+		<el-dialog title="新增承兑人" :visible.sync="dialogVisible2" width="40%">
+			<el-form ref="form" :model="form" label-width="100px">
+				<el-form-item label="承兑人名称" prop="name">
+					<el-input v-model="form.name" style="width: 500px;" placeholder="请输入承兑人名称"></el-input>
+				</el-form-item>
+				<el-form-item label="账号" prop="bankAccount">
+					<el-input v-model="form.bankAccount" style="width: 500px;" placeholder="请输入账号"></el-input>
+				</el-form-item>
+				<el-form-item label="开户行名称" prop="bankName">
+					<el-input v-model="form.bankName" style="width: 500px;" placeholder="请输入开户行名称"></el-input>
+				</el-form-item>
+				<el-form-item label="服务费率" prop="serviceRate">
+					<el-input v-model="form.serviceRate" placeholder="请输入服务费率" style="width: 500px;">
+						<i slot="suffix" style="font-style:normal;margin-right: 10px;">%</i>
+					</el-input>
+				</el-form-item>
+				<el-form-item label="利率" prop="interest">
+					<el-input v-model="form.interest" placeholder="请输入利率" style="width: 500px;">
+						<i slot="suffix" style="font-style:normal;margin-right: 10px;">%</i>
+					</el-input>
+				</el-form-item>
+				<el-form-item>
+					<!-- <el-button @click="resetForm('form')">重置</el-button> -->
+					<el-button @click="dialogVisible2 = false">取 消</el-button>
+					<el-button type="primary" @click="addAcceptor">确认添加</el-button>
+				</el-form-item>
+			</el-form>
+		</el-dialog>
+
 		<el-table v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border fit
 			highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
 			<el-table-column align="center" label="" width="55" type="selection">
@@ -53,8 +109,10 @@
 			</el-table-column>
 			<el-table-column align="center" prop="created_at" label="操作" width="300">
 				<template slot-scope="scope">
-					<el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="toDetail(scope.row.id)">
-						详情</el-tag>
+					<!-- <el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="toDetail(scope.row.id)">
+						详情</el-tag> -->
+					<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>
@@ -99,6 +157,9 @@
 		},
 		data() {
 			return {
+				// 弹窗显示 1修改信息 2新增
+				dialogVisible1: false,
+				dialogVisible2: false,
 				// 表单数据
 				formData: {
 					startTime: "",
@@ -106,6 +167,23 @@
 					name: "", // 承兑人名称
 					status: "", // 承兑人状态
 				},
+				// 新增承兑人数据
+				form: {
+					name: '',
+					bankAccount: '',
+					bankName: '',
+					serviceRate: '',
+					interest: ''
+				},
+				// 弹窗修改数据
+				tableData: {
+					name: '',
+					serviceRate: '',
+					interest: '',
+					bankAccount: '',
+					bankName: '',
+					id: ''
+				},
 				/* 当前页数 */
 				currentPage: 1,
 				/* 每页显示个数 */
@@ -192,9 +270,26 @@
 				console.log(this.multipleSelection);
 			},
 			addAcceptor() {
-				this.$router.push({
-					path: "/table/addAcceptor",
-				});
+				this.$request({
+					url: '/api/Acceptor',
+					method: 'post',
+					data: this.form
+				}).then((res) => {
+					if (res.code === 200) {
+						this.$message({
+							type: 'success',
+							message: "添加成功"
+						});
+						this.getAllList();
+						this.dialogVisible2 = false;
+					} else {
+						this.$message({
+							type: 'error',
+							message: res.msg
+						})
+					}
+				})
+
 			},
 			toDetail(id) {
 				this.$router.push({
@@ -252,22 +347,55 @@
 					}
 				});
 			},
-
+			resetForm() {
+				this.$refs[form].resetFields();
+			},
+			modify(id) {
+				this.$request({
+					url: '/api/Acceptor/' + id,
+					method: 'get',
+				}).then((res) => {
+					this.tableData = res.data
+					this.tableData.id = this.$route.query.id
+				})
+				this.dialogVisible1 = true
+			},
+			// 弹窗修改
+			onSubmit() {
+				this.$request({
+					url: '/api/Acceptor/update',
+					method: 'post',
+					data: this.tableData
+				}).then((res) => {
+					if (res.code == 200) {
+						this.$message({
+							type: 'success',
+							message: '修改成功!'
+						})
+					} else {
+						this.$message({
+							type: 'danger',
+							message: '修改失败!'
+						})
+					}
+				})
+				this.dialogVisible1 = false
+			},
 
 
 			/* 输入承兑人状态查询 */
 			handleCommand(command) {
 				this.status = command
-				    if (command === '正常') {
-				    this.formData.status = 5
-				  }
-				  if (command === '删除') {
-				    this.formData.status = 4
-				  }
-				  if (command === '全部') {
-				    this.formData.status =''
-				  }
-				  
+				if (command === '正常') {
+					this.formData.status = 5
+				}
+				if (command === '删除') {
+					this.formData.status = 4
+				}
+				if (command === '全部') {
+					this.formData.status = ''
+				}
+
 				this.currentPage = 1;
 				this.searchForm = {
 					...this.formData