Переглянути джерело

项目日志:7.28第一次

gubai 2 роки тому
батько
коміт
8b44b47b7b

+ 9 - 0
src/api/account.js

xqd
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function getAccountSearch(data) {
+  return request({
+    url: '/api/Account/search',
+    method: 'post',
+    data
+  })
+}

+ 9 - 0
src/api/auditlog.js

xqd
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function getAuditLogSearch(data) {
+  return request({
+    url: '/api/AuditLog/search',
+    method: 'post',
+    data
+  })
+}

+ 29 - 36
src/views/delivery/index.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -13,7 +13,7 @@
         </el-input>
       </div>
       <div class="grid-content bg-purple">
-        <el-dropdown @command="PhandleCommand">
+        <el-dropdown @command="handleCommand">
           <div class="pulldown">
             <span class="el-dropdown-link" v-if="!providerStatus">
               供应商状态
@@ -33,11 +33,11 @@
       <div class="grid-content bg-purple">
         <el-dropdown @command="AhandleCommand">
           <div class="pulldown">
-            <span class="el-dropdown-link" v-if="!AuditStatus"> 审核状态 </span>
-            <span class="el-dropdown-link" v-if="AuditStatus">
-              {{ AuditStatus }}
+            <span v-if="!Auditstatus" class="el-dropdown-link"> 审核状态 </span>
+            <span v-if="Auditstatus" class="el-dropdown-link">
+              {{ Auditstatus }}
             </span>
-            <i class="el-icon-arrow-down el-icon--right"></i>
+            <i class="el-icon-arrow-down el-icon--right" />
           </div>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item command="审核状态">审核状态</el-dropdown-item>
@@ -244,8 +244,8 @@ export default {
       temporaryList: [],
       listLoading: false,
       providerStatus: "",
-      AuditStatus: "",
       search: "",
+      Auditstatus:'',
       multipleSelection: [],
       checked: false,
       pickerOptions: {
@@ -283,7 +283,6 @@ export default {
       value2: "",
     };
   },
-
   mounted() {
     this.checked = this.$store.state.user.checked;
     this.getAllList();
@@ -312,28 +311,7 @@ export default {
       this.multipleSelection = data;
       console.log(this.multipleSelection);
     },
-    PhandleCommand(command) {
-      this.providerStatus = command;
-      if (this.providerStatus == "正常" || this.providerStatus == "删除") {
-        this.temporaryList = this.srcList.filter(
-          (item) => item.isDeletedText == this.providerStatus
-        );
-      } else {
-        this.temporaryList = this.srcList;
-      }
-      (this.AuditStatus = ""), (this.search = "");
-    },
-    AhandleCommand(command) {
-      this.AuditStatus = command;
-      if (this.AuditStatus == "已认证" || this.AuditStatus == "未认证") {
-        this.temporaryList = this.srcList.filter(
-          (item) => item.statusText == this.AuditStatus
-        );
-      } else {
-        this.temporaryList = this.srcList;
-      }
-      (this.providerStatus = ""), (this.search = "");
-    },
+    
     toedit(id) {
       this.$router.push({
         path: "/edit",
@@ -354,16 +332,30 @@ export default {
 	/* 输入供应商状态查询 */
     handleCommand(command) {
       this.status = command;
-      //     if (command === '正常') {
-      //     this.formData.status = 0
-      //   }
-      //   if (command === '删除') {
-      //     this.formData.status = 1
-      //   }
-      this.formData.status = 1;
+          if (command === '正常') {
+          this.formData.status = 5
+        }
+        if (command === '删除') {
+          this.formData.status = 4
+        }
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      this.getAllList(this.searchForm);
+    },
+
+    /* 审核状态查询 */
+    AhandleCommand(command){
+      this.Auditstatus=command
+       if (command === '已认证') {
+          this.formData.status = 5
+        }
+        if (command === '未认证') {
+          this.formData.status = 4
+        }
       this.currentPage = 1;
       this.searchForm = { ...this.formData };
       this.getAllList(this.searchForm);
+      
     },
 
       /* 输入出票人名称查询 */
@@ -390,6 +382,7 @@ export default {
       let cpage = Math.ceil(font.total / font.pageSize);
       font.handleCurrentChange(cpage);
     },
+    
     /* 导出 */
     Exports() {
       if (this.multipleSelection == "") {

+ 6 - 18
src/views/form/index.vue

xqd xqd
@@ -227,17 +227,6 @@ export default {
       this.multipleSelection = data;
       console.log(this.multipleSelection);
     },
-    handleCommand(command) {
-      this.status = command;
-      if (this.status == "正常" || this.status == "删除") {
-        this.temporaryList = this.srcList.filter(
-          (item) => item.statusText == this.status
-        );
-      } else {
-        this.temporaryList = this.srcList;
-      }
-      console.log(this.srcList, "command");
-    },
     handlehpCommand(command) {
       this.hpstatus = command;
     },
@@ -307,13 +296,12 @@ export default {
     /* 输入出票人状态查询 */
     handleCommand(command) {
       this.status = command;
-      //     if (command === '正常') {
-      //     this.formData.status = 0
-      //   }
-      //   if (command === '删除') {
-      //     this.formData.status = 1
-      //   }
-      this.formData.status = 1;
+          if (command === '正常') {
+          this.formData.status = 5
+        }
+        if (command === '删除') {
+          this.formData.status = 4
+        }
       this.currentPage = 1;
       this.searchForm = { ...this.formData };
       this.getAllList(this.searchForm);

+ 532 - 427
src/views/management/index.vue

xqd
@@ -1,437 +1,542 @@
 <template>
-	<div class="app-container">
-		<el-row type="flex" justify="space-between" style="margin-bottom:20px ;">
-			<div class="grid-content bg-purple">
-				<el-input v-model="input4" placeholder="业务管理员名称搜索" style="width: 100%;">
-					<i slot="prefix" class="el-input__icon el-icon-search" />
-				</el-input>
-			</div>
-			<div class="grid-content bg-purple">
-				<el-dropdown @command="handleCommand">
-					<div class="pulldown">
-						<span v-if="!status" class="el-dropdown-link">
-							业务员状态筛选
-						</span>
-						<span v-if="status" class="el-dropdown-link">
-							{{ status }}
-						</span>
-						<i class="el-icon-arrow-down el-icon--right" />
-					</div>
-					<el-dropdown-menu slot="dropdown">
-						<el-dropdown-item command="全部">全部</el-dropdown-item>
-						<el-dropdown-item command="正常">正常</el-dropdown-item>
-						<el-dropdown-item command="删除">删除</el-dropdown-item>
-					</el-dropdown-menu>
-				</el-dropdown>
-			</div>
-			<div class="grid-content bg-purple">
-				<el-dropdown @command="handlehpCommand()">
-					<div class="pulldown">
-						<span v-if="!hpstatus" class="el-dropdown-link">
-							审核状态筛选
-						</span>
-						<span v-if="hpstatus" class="el-dropdown-link">
-							{{ hpstatus }}
-						</span>
-						<i class="el-icon-arrow-down el-icon--right" />
-					</div>
-					<el-dropdown-menu slot="dropdown">
-						<el-dropdown-item command="失败">待审核</el-dropdown-item>
-						<el-dropdown-item command="成功">通过</el-dropdown-item>
-						<el-dropdown-item command="失败">未通过</el-dropdown-item>
-					</el-dropdown-menu>
-				</el-dropdown>
-			</div>
-			<div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;margin-left: 10px;">
-				<el-button type="success" @click="success">审核成功</el-button>
-				<el-button type="danger" @click="failed">审核失败</el-button>
-				<el-button type="primary" @click="recover">恢复</el-button>
-				<el-button type="warning" @click="deleted">删除</el-button>
-				<el-button type="primary" @click="Exports">批量导出</el-button>
-			</div>
-		</el-row>
-		<el-table v-loading="listLoading" :data="srcList" element-loading-text="Loading" border fit
-			highlight-current-row @selection-change="handleSelectionChange" @select-all="handleAll">
-			<el-table-column align="center" label="" width="55" type="selection" />
-			<el-table-column label="id" align="center"  prop="id" />
-			<el-table-column label="业务管理员姓名" align="center" width="180" prop="realName" />
-			<el-table-column label="账号" align="center" prop="account" />
-			<el-table-column label="联系电话" width="180" align="center" prop="mobile" />
-			<el-table-column label="业务管理员状态" align="center" prop="statusText" />
-			<el-table-column label="审核状态" align="center" prop="approveStatusText" />
-			<el-table-column label="时间" width="180" align="center" prop='createdAt' />
-			<el-table-column align="center" prop="created_at" label="操作" width="300">
-				<template slot-scope="scope">
-					<el-tag type="success" style="cursor: pointer; margin:0 5px;" @click="Srecover(scope.row.id)"
-						v-if="scope.row.status==1">恢复</el-tag>
-					<el-tag type="danger" style="cursor: pointer; margin:0 5px;" @click="Sdeleted(scope.row.id)"
-						v-if="scope.row.status==0">删除</el-tag>
-					<el-tag type="primary" v-permission="['admin']" style="cursor: pointer; margin:0 5px;" @click="reset(scope.row.id)">重置密码
-					</el-tag>
-				</template>
-			</el-table-column>
-		</el-table>
-		<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 layout="prev, pager, next" :total="list.length" :page-size="11" prev-text="上一页"
-				next-text="下一页" @current-change="handleCurrentChange" :hide-on-single-page="false" ref="pagination" />
-			<el-button type="primary" size="small"
-				style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页
-			</el-button>
-		</div>
-	</div>
+  <div class="app-container">
+    <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
+      <div class="grid-content bg-purple">
+        <el-input
+          v-model="formData.name"
+          @change="Search"
+          placeholder="业务管理员名称搜索"
+          style="width: 100%"
+        >
+          <i slot="prefix" class="el-input__icon el-icon-search" />
+        </el-input>
+      </div>
+      <div class="grid-content bg-purple">
+        <el-dropdown @command="handleCommand">
+          <div class="pulldown">
+            <span v-if="!status" class="el-dropdown-link">
+              业务员状态筛选
+            </span>
+            <span v-if="status" class="el-dropdown-link">
+              {{ status }}
+            </span>
+            <i class="el-icon-arrow-down el-icon--right" />
+          </div>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="全部">全部</el-dropdown-item>
+            <el-dropdown-item command="正常">正常</el-dropdown-item>
+            <el-dropdown-item command="删除">删除</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </div>
+      <div class="grid-content bg-purple">
+        <el-dropdown @command="handlehpCommand()">
+          <div class="pulldown">
+            <span v-if="!hpstatus" class="el-dropdown-link">
+              审核状态筛选
+            </span>
+            <span v-if="hpstatus" class="el-dropdown-link">
+              {{ hpstatus }}
+            </span>
+            <i class="el-icon-arrow-down el-icon--right" />
+          </div>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="失败">待审核</el-dropdown-item>
+            <el-dropdown-item command="成功">通过</el-dropdown-item>
+            <el-dropdown-item command="失败">未通过</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </div>
+      <div
+        class="grid-content bg-purple"
+        style="display: flex; justify-content: flex-end; margin-left: 10px"
+      >
+        <el-button type="success" @click="success">审核成功</el-button>
+        <el-button type="danger" @click="failed">审核失败</el-button>
+        <el-button type="primary" @click="recover">恢复</el-button>
+        <el-button type="warning" @click="deleted">删除</el-button>
+        <el-button type="primary" @click="Exports">批量导出</el-button>
+      </div>
+    </el-row>
+    <el-table
+      v-loading="listLoading"
+      :data="temporaryList"
+      element-loading-text="Loading"
+      border
+      fit
+      highlight-current-row
+      @selection-change="handleSelectionChange"
+      @select-all="handleAll"
+    >
+      <el-table-column align="center" label="" width="55" type="selection" />
+      <el-table-column label="id" align="center" prop="id" />
+      <el-table-column
+        label="业务管理员姓名"
+        align="center"
+        width="180"
+        prop="realName"
+      />
+      <el-table-column label="账号" align="center" prop="account" />
+      <el-table-column
+        label="联系电话"
+        width="180"
+        align="center"
+        prop="mobile"
+      />
+      <el-table-column
+        label="业务管理员状态"
+        align="center"
+        prop="statusText"
+      />
+      <el-table-column
+        label="审核状态"
+        align="center"
+        prop="approveStatusText"
+      />
+      <el-table-column
+        label="时间"
+        width="180"
+        align="center"
+        prop="createdAt"
+      />
+      <el-table-column
+        align="center"
+        prop="created_at"
+        label="操作"
+        width="300"
+      >
+        <template slot-scope="scope">
+          <el-tag
+            type="success"
+            style="cursor: pointer; margin: 0 5px"
+            @click="Srecover(scope.row.id)"
+            v-if="scope.row.status == 1"
+            >恢复</el-tag
+          >
+          <el-tag
+            type="danger"
+            style="cursor: pointer; margin: 0 5px"
+            @click="Sdeleted(scope.row.id)"
+            v-if="scope.row.status == 0"
+            >删除</el-tag
+          >
+          <el-tag
+            type="primary"
+            v-permission="['admin']"
+            style="cursor: pointer; margin: 0 5px"
+            @click="reset(scope.row.id)"
+            >重置密码
+          </el-tag>
+        </template>
+      </el-table-column>
+    </el-table>
+    <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 {
-		getList
-	} from '@/api/table'
-	import {
-		dataConversionUtil
-	} from '../../utils/Excel.js'
-	export default {
-		filters: {
-			statusFilter(status) {
-				const statusMap = {
-					published: 'success',
-					draft: 'gray',
-					deleted: 'danger'
-				}
-				return statusMap[status]
-			}
-		},
-		data() {
-			return {
-				srcList: [],
-				list: [],
-				listLoading: false,
-				status: '',
-				currentPage: 1,
-				pagesize: 11,
-				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: ''
-			}
-		},
-		created() {},
-		mounted() {
-			this.getData()
-		},
-		methods: {
-			getData() {
-				this.$request({
-					url: '/api/Account/search',
-					method: 'post',
-					data: {
-						pageIndex: 0,
-						pageSize: 30
-					}
-				}).then((res) => {
-					this.list = res.data.result
-					console.log(res.data.result)
-					this.getPageData()
-				})
-			},
-			handleSelectionChange(data) {
-				this.multipleSelection = data
-				console.log(this.multipleSelection)
-			},
-			handleAll(data) {
-				this.multipleSelection = data
-				console.log(this.multipleSelection)
-			},
-			handleCommand(command) {
-				this.status = command
-			},
-			handlehpCommand(command) {
-				this.hpstatus = command
-			},
-			handleCurrentChange(val) {
-				this.currentPage = val
-				this.getPageData()
-			},
-			jumpFirstPage() {
-				this.$refs.pagination.handleCurrentChange(1)
-				this.$emit('handleCurrentChange', 1)
-			},
-			jumpLastPage() {
-				const font = this.$refs.pagination
-				const cpage = Math.ceil(font.total / font.pageSize)
-				font.handleCurrentChange(cpage)
-			},
-			getPageData() {
-				const start = (this.currentPage - 1) * this.pagesize
-				const end = start + this.pagesize
-				this.srcList = this.list.slice(start, end)
-			},
-			success() {
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url: '/api/Account/manager',
-					method: 'post',
-					data: {
-						ids: ids,
-						operateType: 3
-					}
-				}).then((res) => {
-					if (res.code == 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'danger',
-							message: res.msg
-						})
-						this.getData()
-					}
-				})
-			},
-			failed() {
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url: '/api/Account/manager',
-					method: 'post',
-					data: {
-						ids: ids,
-						operateType: 4
-					}
-				}).then((res) => {
-					if (res.code == 200) {
-						this.$message({
-							type: 'success',
-							message: res.msg
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'danger',
-							message: res.msg
-						})
-						this.getData()
-					}
-				})
-			},
-			recover() {
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url: '/api/Account/manager',
-					method: 'post',
-					data: {
-						ids: ids,
-						operateType: 2
-					}
-				}).then((res) => {
-					if (res.code == 200) {
-						this.$message({
-							type: 'success',
-							message: '恢复成功'
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'danger',
-							message: '恢复失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			deleted() {
-				const ids = Array.from(this.multipleSelection, ({
-					id
-				}) => id)
-				this.$request({
-					url: '/api/Account/manager',
-					method: 'post',
-					data: {
-						ids: ids,
-						operateType: 1
-					}
-				}).then((res) => {
-					if (res.code == 200) {
-						this.$message({
-							type: 'success',
-							message: '删除成功'
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'danger',
-							message: '删除失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			Srecover(id) {
-				this.$request({
-					url: '/api/Account/manager',
-					method: 'post',
-					data: {
-						ids: [id],
-						operateType: 2
-					}
-				}).then((res) => {
-					if (res.code == 200) {
-						this.$message({
-							type: 'success',
-							message: '恢复成功'
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'danger',
-							message: '恢复失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			Sdeleted(id) {
-				this.$request({
-					url: '/api/Account/manager',
-					method: 'post',
-					data: {
-						ids: [id],
-						operateType: 1
-					}
-				}).then((res) => {
-					if (res.code == 200) {
-						this.$message({
-							type: 'success',
-							message: '删除成功'
-						})
-						this.getData()
-					} else {
-						this.$message({
-							type: 'danger',
-							message: '删除失败'
-						})
-						this.getData()
-					}
-				})
-			},
-			Exports() {
-				if (this.multipleSelection == "") {
-					this.$message({
-						type: 'warning',
-						message: '请选择数据!'
-					})
-				} else {
-					var tableHeader = [
-						['序号', '业务管理员姓名', '账号', '联系电话', '业务管理员状态', '审核状态', '时间'],
-					]
-					var dataList = []
-					this.multipleSelection.forEach((item, index) => {
-						dataList.push([index + 1, item.realName, item.account, item.mobile, item.statusText, item
-							.approveStatusText, item
-							.createdAt
-						]);
-					})
-					dataConversionUtil.dataToExcel('业务管理员列表', tableHeader, dataList)
-					this.$message.success('导出成功!');
-				}
-			},
-			// 重置业务员密码
-			reset(id){
-				console.log(id)
-				this.$prompt('请输入密码','重置密码',{
-					confirmButtonText:'确定',
-					cancleButtonText:'取消',
-				}).then(({value})=>{
-					this.$request({
-						url:'/api/Account/password/resetUser',
-						method:'post',
-						data:{
-							password:value,
-							userId:id
-						}
-					}).then((res)=>{
-						console.log(res)
-						if(res.code===200){
-							this.$message({
-								type:'success',
-								message:'重置成功'
-							})
-						}
-					})
-				}).catch(()=>{
-					this.$message({
-						type:'info',
-						message:'取消重置密码'
-					})
-				})
-			}
-		}
-	}
+import { dataConversionUtil } from "../../utils/Excel.js";
+import { getAccountSearch } from '@/api/account';
+export default {
+  filters: {
+    statusFilter(status) {
+      const statusMap = {
+        published: "success",
+        draft: "gray",
+        deleted: "danger",
+      };
+      return statusMap[status];
+    },
+  },
+  data() {
+    return {
+      // 表单数据
+      formData: {
+        startTime: "",
+        endTime: "",
+		    name:'',
+        id: "",
+        approveStatus: "", //通过1,不通过2
+      },
+      /* 当前页数 */
+      currentPage: 1,
+      /* 每页显示个数 */
+      pagesize: 10,
+      /* 总条数 */
+      total: 20,
+	  temporaryList: [],
+      srcList: [],
+      list: [],
+      listLoading: false,
+      status: "",
+      hpstatus: "",
+      checked: false,
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+      value1: "",
+      value2: "",
+    };
+  },
+  
+  mounted() {
+    this.getAllList();
+  },
+  methods: {
+	 /* 获取列表数据 */
+    getAllList(searchForm = {}) {
+      const params = {
+        pageIndex: this.currentPage,
+        pageSize: this.pagesize,
+      };
+      getAccountSearch({ ...params, ...searchForm }).then((res) => {
+        const { data } = res;
+		console.log(data);
+        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);
+    },
+    handleCommand(command) {
+      this.status = command;
+    },
+    handlehpCommand(command) {
+      this.hpstatus = command;
+    },
+
+    success() {
+      const ids = Array.from(this.multipleSelection, ({ id }) => id);
+      this.$request({
+        url: "/api/Account/manager",
+        method: "post",
+        data: {
+          ids: ids,
+          operateType: 3,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message({
+            type: "success",
+            message: res.msg,
+          });
+          this.getData();
+        } else {
+          this.$message({
+            type: "danger",
+            message: res.msg,
+          });
+          this.getData();
+        }
+      });
+    },
+    failed() {
+      const ids = Array.from(this.multipleSelection, ({ id }) => id);
+      this.$request({
+        url: "/api/Account/manager",
+        method: "post",
+        data: {
+          ids: ids,
+          operateType: 4,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message({
+            type: "success",
+            message: res.msg,
+          });
+          this.getData();
+        } else {
+          this.$message({
+            type: "danger",
+            message: res.msg,
+          });
+          this.getData();
+        }
+      });
+    },
+    recover() {
+      const ids = Array.from(this.multipleSelection, ({ id }) => id);
+      this.$request({
+        url: "/api/Account/manager",
+        method: "post",
+        data: {
+          ids: ids,
+          operateType: 2,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message({
+            type: "success",
+            message: "恢复成功",
+          });
+          this.getData();
+        } else {
+          this.$message({
+            type: "danger",
+            message: "恢复失败",
+          });
+          this.getData();
+        }
+      });
+    },
+    deleted() {
+      const ids = Array.from(this.multipleSelection, ({ id }) => id);
+      this.$request({
+        url: "/api/Account/manager",
+        method: "post",
+        data: {
+          ids: ids,
+          operateType: 1,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message({
+            type: "success",
+            message: "删除成功",
+          });
+          this.getData();
+        } else {
+          this.$message({
+            type: "danger",
+            message: "删除失败",
+          });
+          this.getData();
+        }
+      });
+    },
+    Srecover(id) {
+      this.$request({
+        url: "/api/Account/manager",
+        method: "post",
+        data: {
+          ids: [id],
+          operateType: 2,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message({
+            type: "success",
+            message: "恢复成功",
+          });
+          this.getData();
+        } else {
+          this.$message({
+            type: "danger",
+            message: "恢复失败",
+          });
+          this.getData();
+        }
+      });
+    },
+    Sdeleted(id) {
+      this.$request({
+        url: "/api/Account/manager",
+        method: "post",
+        data: {
+          ids: [id],
+          operateType: 1,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message({
+            type: "success",
+            message: "删除成功",
+          });
+          this.getData();
+        } else {
+          this.$message({
+            type: "danger",
+            message: "删除失败",
+          });
+          this.getData();
+        }
+      });
+    },
+
+	    /* 输入出票人名称查询 */
+    Search() {
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      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);
+    },
+
+	/* 导出 */
+    Exports() {
+      if (this.multipleSelection == "") {
+        this.$message({
+          type: "warning",
+          message: "请选择数据!",
+        });
+      } else {
+        var tableHeader = [
+          [
+            "序号",
+            "业务管理员姓名",
+            "账号",
+            "联系电话",
+            "业务管理员状态",
+            "审核状态",
+            "时间",
+          ],
+        ];
+        var dataList = [];
+        this.multipleSelection.forEach((item, index) => {
+          dataList.push([
+            index + 1,
+            item.realName,
+            item.account,
+            item.mobile,
+            item.statusText,
+            item.approveStatusText,
+            item.createdAt,
+          ]);
+        });
+        dataConversionUtil.dataToExcel("业务管理员列表", tableHeader, dataList);
+        this.$message.success("导出成功!");
+      }
+    },
+    // 重置业务员密码
+    reset(id) {
+      console.log(id);
+      this.$prompt("请输入密码", "重置密码", {
+        confirmButtonText: "确定",
+        cancleButtonText: "取消",
+      })
+        .then(({ value }) => {
+          this.$request({
+            url: "/api/Account/password/resetUser",
+            method: "post",
+            data: {
+              password: value,
+              userId: id,
+            },
+          }).then((res) => {
+            console.log(res);
+            if (res.code === 200) {
+              this.$message({
+                type: "success",
+                message: "重置成功",
+              });
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消重置密码",
+          });
+        });
+    },
+  },
+};
 </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 - 0
src/views/shipments/index.vue

xqd
@@ -204,6 +204,7 @@
 					path: "/shipments3"
 				})
 			},
+			/* 导出 */
 			Export() {
 				// window.open('https://ht.9026.com/api/Report/export/acceptorClassification?frequency=1&startDate=&endDate=')
 				if(this.multipleSelection==""){

+ 273 - 215
src/views/sucuirtyaudit/index.vue

xqd
@@ -1,229 +1,287 @@
 <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" >
-					<el-input placeholder="请输入查询内容" v-model="input4" 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-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">
+          <el-input
+            placeholder="请输入查询内容"
+            v-model="formData.content"
+            @change="Search"
+            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-menu>
+        </el-dropdown>
+      </div>
 
+      <div class="grid-content bg-purple">
+        <div class="block">
+          <el-date-picker
+            v-model="value2"
+            type="daterange"
+            align="right"
+            unlink-panels
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            :picker-options="pickerOptions"
+          >
+          </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="结束日期"
-							:picker-options="pickerOptions">
-						</el-date-picker>
-					</div>
+      <div
+        class="grid-content bg-purple"
+        style="display: flex; justify-content: flex-end"
+      >
+        <el-button type="primary" disabled>操作日志</el-button>
+        <el-button type="primary" @click="toannexList">附件列表</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
+    >
+      <el-table-column align="center" label="" width="55" type="selection">
+      </el-table-column>
+      <el-table-column align="center" prop="created_at" label="操作日">
+        <template slot-scope="scope">
+          <i class="el-icon-time" />
+          <span>{{ scope.row.createdAt }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="事件" align="center" width="340" prop="event">
+      </el-table-column>
+      <el-table-column label="操作人员" align="center" prop="userName">
+      </el-table-column>
+      <el-table-column label="操作状态" align="center" prop="status">
+      </el-table-column>
 
-				</div>
-				
-	
-				<div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
-					<el-button type="primary" disabled>操作日志</el-button>
-					<el-button type="primary" @click="toannexList">附件列表</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>
-			<el-table-column align="center" label="" width="55" type="selection">
-				
-			</el-table-column>
-			<el-table-column align="center" prop="created_at" label="操作日">
-				<template slot-scope="scope">
-					<i class="el-icon-time" />
-					<span>{{ scope.row.createdAt }}</span>
-				</template>
-			</el-table-column>
-			<el-table-column label="事件" align="center" width="340" prop="event">
-				
-			</el-table-column>
-			<el-table-column label="操作人员"  align="center" prop="userName">
-				
-			</el-table-column>
-			<el-table-column label="操作状态"  align="center" prop="status">
-				
-			</el-table-column>
-
-			<el-table-column label="操作说明" align="center" prop="remark">
-				
-			</el-table-column>
-			<el-table-column align="center"  label="操作" width="250">
-				<template slot-scope="scope">
-					<el-tag type="primary" style="cursor: pointer;margin-right: 15px;" @click="todetail(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 background @current-change="handleCurrentChange" layout="prev, pager, next"
-				:total="list.length" :page-size="10" prev-text="上一页" next-text="下一页" :hide-on-single-page="false"
-				ref="pagination">
-			</el-pagination>
-			<el-button type="primary" size="small"
-				style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px" @click="jumpLastPage">尾页
-			</el-button>
-		</div>
-	</div>
+      <el-table-column label="操作说明" align="center" prop="remark">
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="250">
+        <template slot-scope="scope">
+          <el-tag
+            type="primary"
+            style="cursor: pointer; margin-right: 15px"
+            @click="todetail(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 {
-		getList
-	} from '@/api/table'
+import { getAuditLogSearch } 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,
+      };
+      getAuditLogSearch({ ...params, ...searchForm }).then((res) => {
+        const { data } = res;
+		console.log(data);
+        this.temporaryList = data.result;
+        this.srcList = data.result;
+        this.total = res.data.total;
+      })
+	},
+
+    todetail(id) {
+      this.$router.push({ path: "/logdetail", query: { id: id } });
+    },
+    toannexList() {
+      this.$router.push({
+        path: "/annexList",
+      });
+    },
+
+	/* 查询功能 */
+    handleCommand(command) {
+      this.status = command;
+    },
+    handlehpCommand(command) {
+      this.hpstatus = command;
+    },
+
+
+	
+
 
-	export default {
-		filters: {
-			statusFilter(status) {
-				const statusMap = {
-					published: 'success',
-					draft: 'gray',
-					deleted: 'danger'
-				}
-				return statusMap[status]
-			}
-		},
-		data() {
-			return {
-				temporaryList:[],
-				srcList: [],
-				currentPage: 1,
-				pagesize: 11,
-				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: ''
-			}
-		},
-		created() {},
-		mounted() {
-			this.$request({
-				url:'/api/AuditLog/search',
-				method:'post',
-				data:{
-					pageIndex:1,
-					pageSize:100,
-				}
-			}).then((res)=>{
-				console.log(res)
-				this.list=res.data.result
-				this.getPageData();
-			})
-		},
-		methods: {
-			handleCommand(command) {
-				this.status = command
+     /* 输入出票人名称查询 */
+    Search() {
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      this.getAllList(this.searchForm);
+    },
+	 /* 分页功能,改变当前页 */
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getAllList(this.searchForm);
+    },
 
-			},
-			handlehpCommand(command) {
-				this.hpstatus = command
-			},
-			todetail(id){
-				this.$router.push({path:'/logdetail',query:{id:id}})
-			},
-			toannexList() {
-				this.$router.push({
-					path: '/annexList'
-				})
-			},
-			handleCurrentChange(val) {
-				this.currentPage = val;
-				this.getPageData();
-			},
-			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);
-			},
-			getPageData() {
-				let start = (this.currentPage - 1) * this.pagesize;
-				let end = start + this.pagesize;
-				this.srcList = this.list.slice(start, end);
-				this.temporaryList = this.srcList;
-			},
-		}
-	}
+    /* 分页功能去首页 */
+    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);
+    },
+  },
+};
 </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;
+}
 </style>

+ 6 - 7
src/views/table/index.vue

xqd
@@ -302,13 +302,12 @@ export default {
 	/* 输入承兑人状态查询 */
     handleCommand(command) {
       this.status = command
-    //     if (command === '正常') {
-    //     this.formData.status = 0
-    //   }
-    //   if (command === '删除') {
-    //     this.formData.status = 1
-    //   }
-	this.formData.status=0
+        if (command === '正常') {
+        this.formData.status = 5
+      }
+      if (command === '删除') {
+        this.formData.status = 4
+      }
        this.currentPage = 1;
       this.searchForm = { ...this.formData };
       this.getAllList(this.searchForm);