|
@@ -1,14 +1,41 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<div class="tree-container">
|
|
<div class="tree-container">
|
|
- <div style="padding: 10px; display: flex;">
|
|
|
|
- <el-button icon="el-icon-refresh-right" size="small" @click="refreshDepartment()" style="padding: 9px 10px; margin-right: 6px"></el-button>
|
|
|
|
- <el-input placeholder="输入关键字进行过滤" size="small" clearable v-model="filterText">
|
|
|
|
|
|
+ <div style="padding: 10px; display: flex">
|
|
|
|
+ <el-button
|
|
|
|
+ icon="el-icon-refresh-right"
|
|
|
|
+ size="small"
|
|
|
|
+ @click="refreshDepartment()"
|
|
|
|
+ style="padding: 9px 10px; margin-right: 6px"
|
|
|
|
+ ></el-button>
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="输入关键字进行过滤"
|
|
|
|
+ size="small"
|
|
|
|
+ clearable
|
|
|
|
+ v-model="filterText"
|
|
|
|
+ >
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
- <el-tree :data="departmentList" :props="defaultProps" default-expand-all highlight-current :expand-on-click-node="false" :filter-node-method="filterNode" @node-click="handleNodeClick" node-key="id" ref="listTree">
|
|
|
|
|
|
+ <el-tree
|
|
|
|
+ :data="departmentList"
|
|
|
|
+ :props="defaultProps"
|
|
|
|
+ default-expand-all
|
|
|
|
+ highlight-current
|
|
|
|
+ :expand-on-click-node="false"
|
|
|
|
+ :filter-node-method="filterNode"
|
|
|
|
+ @node-click="handleNodeClick"
|
|
|
|
+ node-key="id"
|
|
|
|
+ ref="listTree"
|
|
|
|
+ >
|
|
<div class="custom-tree-node" slot-scope="{ node, data }">
|
|
<div class="custom-tree-node" slot-scope="{ node, data }">
|
|
- <i :class="data.children && data.children.length > 0 ? 'el-icon-folder-opened':'el-icon-document-remove'"></i><span>{{ node.label }}</span>
|
|
|
|
|
|
+ <i
|
|
|
|
+ :class="
|
|
|
|
+ data.children && data.children.length > 0
|
|
|
|
+ ? 'el-icon-folder-opened'
|
|
|
|
+ : 'el-icon-document-remove'
|
|
|
|
+ "
|
|
|
|
+ ></i
|
|
|
|
+ ><span>{{ node.label }}</span>
|
|
</div>
|
|
</div>
|
|
</el-tree>
|
|
</el-tree>
|
|
</div>
|
|
</div>
|
|
@@ -17,17 +44,36 @@
|
|
<!-- <div class="top clearfix">
|
|
<!-- <div class="top clearfix">
|
|
<div class="title fl">条件筛选</div>
|
|
<div class="title fl">条件筛选</div>
|
|
</div> -->
|
|
</div> -->
|
|
- <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ ref="screenForm"
|
|
|
|
+ :model="screenForm"
|
|
|
|
+ label-width="70px"
|
|
|
|
+ size="mini"
|
|
|
|
+ label-position="left"
|
|
|
|
+ >
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-form-item label="账号名称" prop="name">
|
|
<el-form-item label="账号名称" prop="name">
|
|
- <el-input v-model="screenForm.name" placeholder="请输入账号名称"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="screenForm.name"
|
|
|
|
+ placeholder="请输入账号名称"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-form-item label="角色" prop="name">
|
|
<el-form-item label="角色" prop="name">
|
|
- <el-select class="selectStyle" v-model="screenForm.roleId" placeholder="请选择" filterable>
|
|
|
|
- <el-option v-for="(v, i) in roleList" :key="i" :label="v.name" :value="v.adminRoleId">
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ class="selectStyle"
|
|
|
|
+ v-model="screenForm.roleId"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(v, i) in roleList"
|
|
|
|
+ :key="i"
|
|
|
|
+ :label="v.name"
|
|
|
|
+ :value="v.adminRoleId"
|
|
|
|
+ >
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -35,7 +81,9 @@
|
|
<el-col :xs="24" :sm="12" :lg="12" class="tr">
|
|
<el-col :xs="24" :sm="12" :lg="12" class="tr">
|
|
<el-form-item label="">
|
|
<el-form-item label="">
|
|
<el-button size="mini" @click="resetScreenForm">清空</el-button>
|
|
<el-button size="mini" @click="resetScreenForm">清空</el-button>
|
|
- <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
|
|
|
|
+ <el-button size="mini" type="primary" @click="submitScreenForm"
|
|
|
|
+ >搜索</el-button
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -43,16 +91,35 @@
|
|
</div>
|
|
</div>
|
|
<div class="btn-group clearfix" style="margin-top: 20px">
|
|
<div class="btn-group clearfix" style="margin-top: 20px">
|
|
<div class="fl">
|
|
<div class="fl">
|
|
- <el-button size="mini" type="primary" @click="openAccountForm('add')">添加账号</el-button>
|
|
|
|
-
|
|
|
|
|
|
+ <el-button size="mini" type="primary" @click="openAccountForm('add')"
|
|
|
|
+ >添加账号</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
<div class="fr">
|
|
<div class="fr">
|
|
- <el-button size="mini" @click="handleDownload" v-if="checkBtnRole('download')">下载导入模板</el-button>
|
|
|
|
- <ExportButton class="import-btn" :exUrl="'/admin/user/user/listExport'" :exParams="exParams" />
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleDownload"
|
|
|
|
+ v-if="checkBtnRole('download')"
|
|
|
|
+ >下载导入模板</el-button
|
|
|
|
+ >
|
|
|
|
+ <ExportButton
|
|
|
|
+ class="import-btn"
|
|
|
|
+ :exUrl="'/admin/user/user/listExport'"
|
|
|
|
+ :exParams="exParams"
|
|
|
|
+ />
|
|
|
|
|
|
- <el-upload class="import-btn" v-if="checkBtnRole('import')" action="" :http-request="handleImport" :file-list="importFileList" :show-file-list="false">
|
|
|
|
|
|
+ <el-upload
|
|
|
|
+ class="import-btn"
|
|
|
|
+ v-if="checkBtnRole('import')"
|
|
|
|
+ action=""
|
|
|
|
+ :http-request="handleImport"
|
|
|
|
+ :file-list="importFileList"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ >
|
|
<!-- v-if="checkBtnRole('import')" -->
|
|
<!-- v-if="checkBtnRole('import')" -->
|
|
- <el-button size="mini" type="primary" :loading="importLoading">{{ importLoading ? '导入中...' : '导入' }}</el-button>
|
|
|
|
|
|
+ <el-button size="mini" type="primary" :loading="importLoading">{{
|
|
|
|
+ importLoading ? "导入中..." : "导入"
|
|
|
|
+ }}</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
|
|
|
|
<!--
|
|
<!--
|
|
@@ -64,119 +131,333 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="table">
|
|
<div class="table">
|
|
- <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ :data="dataList"
|
|
|
|
+ element-loading-text="Loading"
|
|
|
|
+ border
|
|
|
|
+ fit
|
|
|
|
+ highlight-current-row
|
|
|
|
+ stripe
|
|
|
|
+ >
|
|
<!-- <el-table-column align="center" type="selection" width="55" fixed></el-table-column> -->
|
|
<!-- <el-table-column align="center" type="selection" width="55" fixed></el-table-column> -->
|
|
- <el-table-column show-overflow-tooltip align="center" label="账号" prop="userName" min-width="120"></el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip align="center" label="用户名" prop="nickName" min-width="160"></el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip align="center" label="角色" prop="roleName" min-width="100"></el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip align="center" label="创建时间" prop="createTime" min-width="160"></el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip align="center" label="最后登录时间" prop="lastLoginTime" min-width="160"></el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip align="center" label="状态" class-name="status-col">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ align="center"
|
|
|
|
+ label="账号"
|
|
|
|
+ prop="userName"
|
|
|
|
+ min-width="120"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ align="center"
|
|
|
|
+ label="用户名"
|
|
|
|
+ prop="nickName"
|
|
|
|
+ min-width="160"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ align="center"
|
|
|
|
+ label="角色"
|
|
|
|
+ prop="roleName"
|
|
|
|
+ min-width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ align="center"
|
|
|
|
+ label="创建时间"
|
|
|
|
+ prop="createTime"
|
|
|
|
+ min-width="160"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ align="center"
|
|
|
|
+ label="最后登录时间"
|
|
|
|
+ prop="lastLoginTime"
|
|
|
|
+ min-width="160"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ align="center"
|
|
|
|
+ label="状态"
|
|
|
|
+ class-name="status-col"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-tag size="mini" :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '正常':'冻结' }}</el-tag>
|
|
|
|
|
|
+ <el-tag
|
|
|
|
+ size="mini"
|
|
|
|
+ :type="scope.row.status ? 'success' : 'danger'"
|
|
|
|
+ >{{ scope.row.status ? "正常" : "冻结" }}</el-tag
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="操作" min-width="160">
|
|
<el-table-column align="center" label="操作" min-width="160">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="checkBtnRole('status')">
|
|
<template v-if="checkBtnRole('status')">
|
|
- <el-popconfirm v-if="scope.row.status" style="margin-right: 10px;" title="确定冻结吗?" @onConfirm="changeStatus(scope.row.adminUserId, 0)">
|
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
+ v-if="scope.row.status"
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
+ title="确定冻结吗?"
|
|
|
|
+ @onConfirm="changeStatus(scope.row.adminUserId, 0)"
|
|
|
|
+ >
|
|
<el-button slot="reference" type="text">冻结</el-button>
|
|
<el-button slot="reference" type="text">冻结</el-button>
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
- <el-popconfirm v-else style="margin-right: 10px;" title="确定恢复吗?" @onConfirm="changeStatus(scope.row.adminUserId, 1)">
|
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
+ v-else
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
+ title="确定恢复吗?"
|
|
|
|
+ @onConfirm="changeStatus(scope.row.adminUserId, 1)"
|
|
|
|
+ >
|
|
<el-button slot="reference" type="text">恢复</el-button>
|
|
<el-button slot="reference" type="text">恢复</el-button>
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
- <el-button type="text" @click="openAccountForm('edit', scope.row.adminUserId)" v-if="checkBtnRole('edit')">编辑</el-button>
|
|
|
|
- <el-button type="text" @click="handleReset(scope.row.adminUserId)" v-if="checkBtnRole('reset')">重置密码</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ @click="openAccountForm('edit', scope.row.adminUserId)"
|
|
|
|
+ v-if="checkBtnRole('edit')"
|
|
|
|
+ >编辑</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ @click="handleReset(scope.row.adminUserId)"
|
|
|
|
+ v-if="checkBtnRole('reset')"
|
|
|
|
+ >重置密码</el-button
|
|
|
|
+ >
|
|
|
|
|
|
<!-- <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="deleteAccount(scope.row.id)" v-if="checkBtnRole('del')">
|
|
<!-- <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="deleteAccount(scope.row.id)" v-if="checkBtnRole('del')">
|
|
<el-button slot="reference" type="text">删除</el-button>
|
|
<el-button slot="reference" type="text">删除</el-button>
|
|
</el-popconfirm> -->
|
|
</el-popconfirm> -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
-
|
|
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="pagination clearfix">
|
|
<div class="pagination clearfix">
|
|
<div class="fr">
|
|
<div class="fr">
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="listTotal">
|
|
|
|
|
|
+ <el-pagination
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
+ :page-sizes="[10, 20, 30, 50]"
|
|
|
|
+ :page-size="10"
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
+ :total="listTotal"
|
|
|
|
+ >
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 添加编辑账号 -->
|
|
<!-- 添加编辑账号 -->
|
|
- <el-dialog :title="AccountFormType == 'add' ? '添加账号':'编辑账号'" :visible.sync="AccountFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
|
|
|
|
- <el-form ref="AccountForm" :model="AccountForm" :rules="AccountFormRules" label-position="left" label-width="80px">
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ :title="AccountFormType == 'add' ? '添加账号' : '编辑账号'"
|
|
|
|
+ :visible.sync="AccountFormVisible"
|
|
|
|
+ :show-close="false"
|
|
|
|
+ width="40%"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ >
|
|
|
|
+ <el-form
|
|
|
|
+ ref="AccountForm"
|
|
|
|
+ :model="AccountForm"
|
|
|
|
+ :rules="AccountFormRules"
|
|
|
|
+ label-position="left"
|
|
|
|
+ label-width="80px"
|
|
|
|
+ >
|
|
<el-form-item label="账号" prop="account">
|
|
<el-form-item label="账号" prop="account">
|
|
- <el-input v-model="AccountForm.account" autocomplete="off" placeholder="请输入账号"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="AccountForm.account"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请输入账号"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="用户名" prop="nickName">
|
|
<el-form-item label="用户名" prop="nickName">
|
|
- <el-input v-model="AccountForm.nickName" autocomplete="off" placeholder="请输入用户名"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="AccountForm.nickName"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请输入用户名"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="角色组" prop="role">
|
|
<el-form-item label="角色组" prop="role">
|
|
- <el-select v-model="AccountForm.role" placeholder="请选择角色组" style="width: 100%;" filterable>
|
|
|
|
- <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList" :key="index"></el-option>
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="AccountForm.role"
|
|
|
|
+ placeholder="请选择角色组"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.adminRoleId"
|
|
|
|
+ v-for="(item, index) in roleList"
|
|
|
|
+ :key="index"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="部门" prop="department" v-show="roleObj.type === 0">
|
|
|
|
- <el-tree :data="departmentList" show-checkbox :check-strictly="true" node-key="adminWebsitId" ref="tree" highlight-current :props="props">
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="部门"
|
|
|
|
+ prop="department"
|
|
|
|
+ v-show="roleObj.type === 0"
|
|
|
|
+ >
|
|
|
|
+ <el-tree
|
|
|
|
+ :data="departmentList"
|
|
|
|
+ show-checkbox
|
|
|
|
+ :check-strictly="true"
|
|
|
|
+ node-key="adminWebsitId"
|
|
|
|
+ ref="tree"
|
|
|
|
+ highlight-current
|
|
|
|
+ :props="props"
|
|
|
|
+ >
|
|
</el-tree>
|
|
</el-tree>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="经销商" prop="dealer" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
|
|
|
|
- <el-select v-model="AccountForm.dealer" placeholder="请选择经销商" style="width: 100%;" filterable>
|
|
|
|
- <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="经销商"
|
|
|
|
+ prop="dealer"
|
|
|
|
+ v-show="roleObj.type === 0 && roleObj.name === '经销商'"
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="AccountForm.dealer"
|
|
|
|
+ placeholder="请选择经销商"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ v-for="(item, index) in dealerList"
|
|
|
|
+ :key="index"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="商户" prop="merchant" v-show="roleObj.type === 1 || roleObj.type === 2">
|
|
|
|
- <el-select v-model="AccountForm.merchant" placeholder="请选择商户" style="width: 100%;" filterable>
|
|
|
|
- <el-option :label="item.adminCompanyName" :value="item.adminCompanyId" v-for="(item, index) in merchantList" :key="index"></el-option>
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="商户"
|
|
|
|
+ prop="merchant"
|
|
|
|
+ v-show="roleObj.type === 1 || roleObj.type === 2"
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="AccountForm.merchant"
|
|
|
|
+ placeholder="请选择商户"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.adminCompanyName"
|
|
|
|
+ :value="item.adminCompanyId"
|
|
|
|
+ v-for="(item, index) in merchantList"
|
|
|
|
+ :key="index"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="集团公司" prop="isGroup" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="集团公司"
|
|
|
|
+ prop="isGroup"
|
|
|
|
+ v-show="roleObj.type === 0 && roleObj.name === '经销商'"
|
|
|
|
+ >
|
|
<el-radio-group v-model="AccountForm.isGroup">
|
|
<el-radio-group v-model="AccountForm.isGroup">
|
|
<el-radio :label="true">是</el-radio>
|
|
<el-radio :label="true">是</el-radio>
|
|
<el-radio :label="false">否</el-radio>
|
|
<el-radio :label="false">否</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="所属集团" prop="company" v-show="roleObj.type === 0 && roleObj.name === '经销商' && !AccountForm.isGroup">
|
|
|
|
- <el-select v-model="AccountForm.company" placeholder="请选择所属集团" style="width: 100%;" filterable>
|
|
|
|
- <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="所属集团"
|
|
|
|
+ prop="company"
|
|
|
|
+ v-show="
|
|
|
|
+ roleObj.type === 0 &&
|
|
|
|
+ roleObj.name === '经销商' &&
|
|
|
|
+ !AccountForm.isGroup
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="AccountForm.company"
|
|
|
|
+ placeholder="请选择所属集团"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ v-for="(item, index) in dealerList"
|
|
|
|
+ :key="index"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="是否折让" prop="isDiscount" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="是否折让"
|
|
|
|
+ prop="isDiscount"
|
|
|
|
+ v-show="roleObj.type === 0 && roleObj.name === '经销商'"
|
|
|
|
+ >
|
|
<el-radio-group v-model="AccountForm.isDiscount">
|
|
<el-radio-group v-model="AccountForm.isDiscount">
|
|
<el-radio :label="true">是</el-radio>
|
|
<el-radio :label="true">是</el-radio>
|
|
<el-radio :label="false">否</el-radio>
|
|
<el-radio :label="false">否</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="密码" prop="newPassword" v-if="AccountFormType == 'add'">
|
|
|
|
- <el-input v-model="AccountForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码" :type="passwordType1"></el-input>
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="密码"
|
|
|
|
+ prop="newPassword"
|
|
|
|
+ v-if="AccountFormType == 'add'"
|
|
|
|
+ >
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="AccountForm.newPassword"
|
|
|
|
+ ref="password1"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请输入密码"
|
|
|
|
+ :type="passwordType1"
|
|
|
|
+ ></el-input>
|
|
<span class="show-pwd" @click="showPwd(1)">
|
|
<span class="show-pwd" @click="showPwd(1)">
|
|
- <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
|
|
|
|
|
|
+ <svg-icon
|
|
|
|
+ :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'"
|
|
|
|
+ />
|
|
</span>
|
|
</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="确认密码" prop="confirmPassword" v-if="AccountFormType == 'add'">
|
|
|
|
- <el-input v-model="AccountForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入密码" :type="passwordType2"></el-input>
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="确认密码"
|
|
|
|
+ prop="confirmPassword"
|
|
|
|
+ v-if="AccountFormType == 'add'"
|
|
|
|
+ >
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="AccountForm.confirmPassword"
|
|
|
|
+ ref="password2"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请再次输入密码"
|
|
|
|
+ :type="passwordType2"
|
|
|
|
+ ></el-input>
|
|
<span class="show-pwd" @click="showPwd(2)">
|
|
<span class="show-pwd" @click="showPwd(2)">
|
|
- <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
|
|
|
|
|
|
+ <svg-icon
|
|
|
|
+ :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'"
|
|
|
|
+ />
|
|
</span>
|
|
</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="可用仓库" prop="correspondIds">
|
|
<el-form-item label="可用仓库" prop="correspondIds">
|
|
- <el-select multiple v-model="AccountForm.correspondIds" placeholder="请选择可用仓库" style="width: 100%;" filterable>
|
|
|
|
- <el-option :label="item.name" :value="item.id" v-for="(item, index) in stockList" :key="index"></el-option>
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ multiple
|
|
|
|
+ v-model="AccountForm.correspondIds"
|
|
|
|
+ placeholder="请选择可用仓库"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ v-for="(item, index) in stockList"
|
|
|
|
+ :key="index"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="物料分类" prop="k3CategoryIds">
|
|
|
|
+ <el-select
|
|
|
|
+ multiple
|
|
|
|
+ v-model="AccountForm.k3CategoryIds"
|
|
|
|
+ placeholder="请选择物料分类"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ v-for="(item, index) in categoryList"
|
|
|
|
+ :key="index"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
-
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="物料分类" prop="k3CategoryIds">
|
|
|
|
- <el-select multiple v-model="AccountForm.k3CategoryIds" placeholder="请选择物料分类" style="width: 100%;" filterable>
|
|
|
|
- <el-option :label="item.name" :value="item.id" v-for="(item, index) in categoryList" :key="index"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
-
|
|
|
|
- </el-form-item>
|
|
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="cancelAccountForm">取 消</el-button>
|
|
<el-button @click="cancelAccountForm">取 消</el-button>
|
|
@@ -185,18 +466,46 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 重置密码 -->
|
|
<!-- 重置密码 -->
|
|
- <el-dialog title="重置密码" :visible.sync="resetFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
|
|
|
|
- <el-form ref="resetForm" :model="resetForm" :rules="resetFormRules" label-position="left" label-width="100px">
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="重置密码"
|
|
|
|
+ :visible.sync="resetFormVisible"
|
|
|
|
+ :show-close="false"
|
|
|
|
+ width="40%"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ >
|
|
|
|
+ <el-form
|
|
|
|
+ ref="resetForm"
|
|
|
|
+ :model="resetForm"
|
|
|
|
+ :rules="resetFormRules"
|
|
|
|
+ label-position="left"
|
|
|
|
+ label-width="100px"
|
|
|
|
+ >
|
|
<el-form-item label="输入新密码" prop="newPassword">
|
|
<el-form-item label="输入新密码" prop="newPassword">
|
|
- <el-input v-model="resetForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入新密码" :type="passwordType1"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="resetForm.newPassword"
|
|
|
|
+ ref="password1"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请输入新密码"
|
|
|
|
+ :type="passwordType1"
|
|
|
|
+ ></el-input>
|
|
<span class="show-pwd" @click="showPwd(1)">
|
|
<span class="show-pwd" @click="showPwd(1)">
|
|
- <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
|
|
|
|
|
|
+ <svg-icon
|
|
|
|
+ :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'"
|
|
|
|
+ />
|
|
</span>
|
|
</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="确认密码" prop="confirmPassword">
|
|
<el-form-item label="确认密码" prop="confirmPassword">
|
|
- <el-input v-model="resetForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入新密码" :type="passwordType2"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="resetForm.confirmPassword"
|
|
|
|
+ ref="password2"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请再次输入新密码"
|
|
|
|
+ :type="passwordType2"
|
|
|
|
+ ></el-input>
|
|
<span class="show-pwd" @click="showPwd(2)">
|
|
<span class="show-pwd" @click="showPwd(2)">
|
|
- <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
|
|
|
|
|
|
+ <svg-icon
|
|
|
|
+ :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'"
|
|
|
|
+ />
|
|
</span>
|
|
</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -205,7 +514,6 @@
|
|
<el-button type="primary" @click="submitResetForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitResetForm">确 定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -223,7 +531,7 @@ import {
|
|
changeAccountStatus,
|
|
changeAccountStatus,
|
|
resetPassword,
|
|
resetPassword,
|
|
} from "@/api/setting";
|
|
} from "@/api/setting";
|
|
-import { getDealerList ,getCategoryList } from "@/api/common";
|
|
|
|
|
|
+import { getDealerList, getCategoryList } from "@/api/common";
|
|
import { findElem, downloadFiles, handleImportTwo } from "@/utils/util";
|
|
import { findElem, downloadFiles, handleImportTwo } from "@/utils/util";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -301,7 +609,7 @@ export default {
|
|
isDiscount: true,
|
|
isDiscount: true,
|
|
newPassword: "", // 新密码
|
|
newPassword: "", // 新密码
|
|
confirmPassword: "", // 确认密码
|
|
confirmPassword: "", // 确认密码
|
|
- k3CategoryIds:[]
|
|
|
|
|
|
+ k3CategoryIds: [],
|
|
},
|
|
},
|
|
AccountFormRules: {
|
|
AccountFormRules: {
|
|
account: [{ required: true, message: "请输入账号", trigger: "blur" }],
|
|
account: [{ required: true, message: "请输入账号", trigger: "blur" }],
|
|
@@ -312,7 +620,7 @@ export default {
|
|
correspondIds: [
|
|
correspondIds: [
|
|
{ required: true, message: "请选择可用仓库", trigger: "change" },
|
|
{ required: true, message: "请选择可用仓库", trigger: "change" },
|
|
],
|
|
],
|
|
- k3CategoryIds: [
|
|
|
|
|
|
+ k3CategoryIds: [
|
|
{ required: true, message: "请选择物料分类", trigger: "change" },
|
|
{ required: true, message: "请选择物料分类", trigger: "change" },
|
|
],
|
|
],
|
|
newPassword: [
|
|
newPassword: [
|
|
@@ -323,7 +631,7 @@ export default {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
editAccountId: null,
|
|
editAccountId: null,
|
|
-categoryList:[],
|
|
|
|
|
|
+ categoryList: [],
|
|
filterText: "",
|
|
filterText: "",
|
|
departmentList: [],
|
|
departmentList: [],
|
|
defaultProps: {
|
|
defaultProps: {
|
|
@@ -423,7 +731,7 @@ categoryList:[],
|
|
});
|
|
});
|
|
return result;
|
|
return result;
|
|
},
|
|
},
|
|
- // 获
|
|
|
|
|
|
+ // 获取金蝶品类
|
|
async getCategoryList() {
|
|
async getCategoryList() {
|
|
const result = await new Promise((resolve, reject) => {
|
|
const result = await new Promise((resolve, reject) => {
|
|
getCategoryList({ pageNum: 1, pageSize: -1 })
|
|
getCategoryList({ pageNum: 1, pageSize: -1 })
|
|
@@ -564,7 +872,7 @@ categoryList:[],
|
|
await this.getMerchantList();
|
|
await this.getMerchantList();
|
|
await this.getDealerList();
|
|
await this.getDealerList();
|
|
await this.getRoleList();
|
|
await this.getRoleList();
|
|
- await this.getCategoryList()
|
|
|
|
|
|
+ await this.getCategoryList();
|
|
|
|
|
|
if (type == "add") {
|
|
if (type == "add") {
|
|
if (this.selectDepartment) {
|
|
if (this.selectDepartment) {
|
|
@@ -585,7 +893,7 @@ categoryList:[],
|
|
this.AccountForm.company = res.data.parentCustomerId;
|
|
this.AccountForm.company = res.data.parentCustomerId;
|
|
this.AccountForm.isDiscount = res.data.isZr;
|
|
this.AccountForm.isDiscount = res.data.isZr;
|
|
this.AccountForm.correspondIds = res.data.stockCorrespondList;
|
|
this.AccountForm.correspondIds = res.data.stockCorrespondList;
|
|
- this.AccountForm.k3CategoryIds =res.data.k3CategoryList
|
|
|
|
|
|
+ this.AccountForm.k3CategoryIds = res.data.k3CategoryList;
|
|
this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || []);
|
|
this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || []);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -604,18 +912,18 @@ categoryList:[],
|
|
console.log(this.AccountForm.correspondIds);
|
|
console.log(this.AccountForm.correspondIds);
|
|
this.$refs.AccountForm.validate((valid) => {
|
|
this.$refs.AccountForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- const categoryIds=[]
|
|
|
|
- this.categoryList.map(k=>{
|
|
|
|
- this.AccountForm.k3CategoryIds.map(i=>{
|
|
|
|
- if (i==k.id) {
|
|
|
|
|
|
+ const categoryIds = [];
|
|
|
|
+ this.categoryList.map((k) => {
|
|
|
|
+ this.AccountForm.k3CategoryIds.map((i) => {
|
|
|
|
+ if (i == k.id) {
|
|
categoryIds.push({
|
|
categoryIds.push({
|
|
- k3CategoryId:k.id,
|
|
|
|
- k3CategoryName:k.name,
|
|
|
|
- k3CategoryNumber:k.number
|
|
|
|
- })
|
|
|
|
|
|
+ k3CategoryId: k.id,
|
|
|
|
+ k3CategoryName: k.name,
|
|
|
|
+ k3CategoryNumber: k.number,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
|
|
let params = {
|
|
let params = {
|
|
userName: this.AccountForm.account,
|
|
userName: this.AccountForm.account,
|
|
@@ -623,7 +931,7 @@ categoryList:[],
|
|
roleId: this.AccountForm.role,
|
|
roleId: this.AccountForm.role,
|
|
password: this.AccountForm.newPassword,
|
|
password: this.AccountForm.newPassword,
|
|
correspondIds: this.AccountForm.correspondIds,
|
|
correspondIds: this.AccountForm.correspondIds,
|
|
- categoryIds
|
|
|
|
|
|
+ categoryIds,
|
|
};
|
|
};
|
|
|
|
|
|
if (this.roleObj.type === 0) {
|
|
if (this.roleObj.type === 0) {
|