Tartarus hace 2 años
padre
commit
f7069339d4

+ 59 - 35
src/views/delivery/index.vue

xqd xqd xqd
@@ -165,6 +165,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 +250,14 @@ export default {
   },
   data() {
     return {
+	  //重置密码
+	  password:{
+		  newpassword:'',
+		  ConfirmnewPassword:'',
+		  supplierId:'',
+	  },
+	  // 控制弹窗
+	  dialogVisible:false,
       // 表单数据
       formData: {
         startTime: "",
@@ -616,42 +641,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>

+ 1 - 1
src/views/login/index.vue

xqd
@@ -28,7 +28,7 @@
                 </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"

+ 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