Ver Fonte

用户管理-->分区、管辖品类

chenrui há 2 anos atrás
pai
commit
07d618e8ff

+ 15 - 2
src/components/index.less

@@ -367,7 +367,7 @@
 }
 
 
-//表格查询条件样式修改
+//表格查询条件  样式
 .newTableSearchName{
    margin-bottom: 6px;
    .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
@@ -385,10 +385,23 @@
      }
    }
 }
+//头部样式
+.header-bar{
+  margin:6px auto;
+  .subTitle-word{
+    font-size: 16px;
+    font-weight: 600;
+    display: inline-block;
+    vertical-align: middle;
+    color: #333 !important;
+  }
+}
+
+
 // 数据汇总样式
 .gatherMessage {
   margin:10px 0;
   strong{
     color: #ed1c24;
   }
-}
+}

+ 12 - 1
src/config/router.config.js

@@ -1363,7 +1363,7 @@ export const asyncRouterMap = [
                 meta: {
                   title: '确认导入',
                   icon: 'monitor',
-                  hidden: true,
+                  hidden: true
                 }
               },
               {
@@ -3218,6 +3218,17 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'M_userList'
                 }
+              },
+              {
+                path: 'categorySet',
+                name: 'powerUserSet',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/power/user/categorySet.vue'),
+                meta: {
+                  title: '管辖品类权限设置',
+                  icon: 'user',
+                  hidden: true,
+                  permission: 'M_userSet'
+                }
               }
             ]
           },

+ 211 - 0
src/views/dealerManagement/marketingDivisionSetNew/list.vue

@@ -0,0 +1,211 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="经销商名称">
+                <a-input id="rebateSettingsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客服/区域负责人/销售总监">
+                <a-input id="rebateSettingsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客服/区域负责人/销售总监"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="rebateSettingsList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateSettingsList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div></a-card>
+    <a-card size="small" :bordered="false" class="marketingDivisionSetList-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 操作按钮 -->
+        <div ref="tableSearch" class="table-operator" style="border: 0;">
+          <a-button id="marketingDivisionSetList-add" type="primary" v-if="$hasPermissions('B_marketingDivisionSet_add')" class="button-error" @click="handleEdit()">+新增区域</a-button>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :showPagination="false"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 市区 -->
+          <template slot="cityArea" slot-scope="text, record">
+            <div style="display: inline-block;margin-right: 15px;" v-for="item in record.subareaAreaList" :key="item.id">
+              {{ item.areaName }}
+              <span v-if="item.citySubareaAreaList">(</span>
+              <span style="color: #999;margin:0 3px;" v-for="area in item.citySubareaAreaList" :key="area.id">
+                {{ area.areaName }}
+              </span>
+              <span v-if="item.citySubareaAreaList">)</span>
+            </div>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="$hasPermissions('B_marketingDivisionSet_edit')"
+              class="button-info"
+              @click="handleEdit(record)"
+              id="marketingDivisionSetList-edit-btn">编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              v-if="$hasPermissions('B_marketingDivisionSet_del')"
+              class="button-error"
+              @click="handleDel(record)"
+              id="marketingDivisionSetList-del-btn">删除</a-button>
+            <span v-if="!$hasPermissions('B_marketingDivisionSet_edit') && !$hasPermissions('B_marketingDivisionSet_del')">--</span>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 编辑分区 -->
+      <marketing-division-set-edit-modal
+        v-drag
+        :nowData="nowData"
+        :openModal="openModal"
+        :itemId="itemId"
+        @ok="$refs.table.refresh()"
+        @close="closeModal" />
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import marketingDivisionSetEditModal from './editModal.vue'
+import { subareaQueryIncludeAreaAll, subareaDeleteBySn } from '@/api/subarea'
+export default {
+  name: 'MarketingDivisionSetList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, marketingDivisionSetEditModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '分区名', dataIndex: 'subareaName', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份/市', scopedSlots: { customRender: 'cityArea' }, align: 'left', width: '55%' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return subareaQueryIncludeAreaAll(parameter).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      openModal: false, //  编辑  弹框
+      nowData: null,
+      itemId: null //  当前产品id
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.$refs.table.refresh(true)
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要删除吗?删除后,经销商解除区域归属,人员解除管辖区域,删除后数据不可恢复。',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          subareaDeleteBySn({ sn: row.subareaSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    //  编辑
+    handleEdit (row) {
+      this.itemId = row && row.subareaSn ? row.subareaSn : null
+      this.nowData = row
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = null
+      this.nowData = null
+      this.openModal = false
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style lang="less">
+  .marketingDivisionSetList-wrap{
+    height: 100%;
+  }
+</style>

+ 233 - 0
src/views/power/user/categorySet.vue

@@ -0,0 +1,233 @@
+<template>
+  <div class="categorySet-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="header-bar">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <span class="subTitle-word text-overflow" style="max-width:300px;">用户姓名:测试测试</span>
+          <a-button id="purchaseNewOrderEdit-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="categorySet-cont">
+        <div class="table-operator">
+          <a-button type="primary" class="button-error" @click="addCategory">+新增管辖品类</a-button>
+        </div>
+        <a-table
+          bordered
+          :data-source="dataSource"
+          :columns="columns"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight }"
+          style="word-break: break-all;">
+          <!-- 产品分类 -->
+          <template slot="classify" slot-scope="text,record,index">
+            <a-row v-if="record.classifyList && record.classifyList.length>0">
+              <a-col :span="20">
+                <a-tag closable @close="delLabel(index,i,'classifyList')" v-for="(con,i) in record.classifyList" :key="i">
+                  {{ con }}
+                </a-tag>
+              </a-col>
+              <a-col :span="4" style="text-align:right;">
+                <a-tag style="background: #fff; borderStyle: dashed;" @click="addClassifyTag(index, record)" color="blue">
+                  <a-icon type="plus" /> 选择
+                </a-tag>
+              </a-col>
+            </a-row>
+            <a-row v-else>
+              <a-col :span="24">
+                <a-tag style="background: #fff; borderStyle: dashed;" @click="addClassifyTag(index, record)" color="blue">
+                  <a-icon type="plus" /> 选择
+                </a-tag>
+              </a-col>
+            </a-row>
+          </template>
+          <!-- 产品品牌 -->
+          <template slot="brand" slot-scope="text,record,index">
+            <a-row v-if="record.brandList && record.brandList.length>0">
+              <a-col :span="20">
+                <a-tag closable @close="delLabel(index,j,'brandList')" v-for="(item,j) in record.brandList" :key="j">
+                  {{ item }}
+                </a-tag>
+              </a-col>
+              <a-col :span="4" style="text-align:right;">
+                <a-tag style="background: #fff; borderStyle: dashed;" @click="addBrandTag" color="blue">
+                  <a-icon type="plus" /> 选择
+                </a-tag>
+              </a-col>
+            </a-row>
+            <a-row v-else>
+              <a-col :span="24">
+                <a-tag style="background: #fff; borderStyle: dashed;" @click="addBrandTag" color="blue">
+                  <a-icon type="plus" /> 选择
+                </a-tag>
+              </a-col>
+            </a-row>
+          </template>
+          <span slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              @click="handleDel(text)"
+            >
+              删除
+            </a-button>
+          </span>
+        </a-table>
+        <div class="table-operator">
+          <a-button type="primary" class="button-info" @click="save">保存</a-button>
+        </div>
+      </a-card>
+    </a-spin>
+    <!-- 选择分类 -->
+    <chooseClassifyModal :openModal="showClassifyModal" @ok="handleClassifyModal" @close="showClassifyModal=false" ></chooseClassifyModal>
+    <!-- 选择品牌 -->
+    <chooseBrandModal :openModal="showBrandModal" @close="showBrandModal=false" ></chooseBrandModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import chooseBrandModal from './chooseBrandModal'
+import chooseClassifyModal from './chooseClassifyModal'
+export default {
+  name: 'CategorySet',
+  mixins: [commonMixin],
+  components: { chooseBrandModal, chooseClassifyModal },
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        warehouseSn: this.$route.params.sn, //  仓库sn
+        name: '' //  仓位名称
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      columns: [
+        { title: '分类', dataIndex: 'no', width: '42%', align: 'center', scopedSlots: { customRender: 'classify' } },
+        { title: '品牌', dataIndex: 'name', width: '42%', align: 'center', scopedSlots: { customRender: 'brand' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
+      ],
+      dataSource: [],
+      openModal: false, //  新增编辑产品品牌  弹框
+      itemSn: '', //  当前sn
+      nowData: null, //  当前记录数据
+      showClassifyModal: false,
+      showBrandModal: false,
+      ChooseClassifyPos: null
+    }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.push({ name: 'powerUserList' })
+    },
+    // 新增管辖品类
+    addCategory () {
+      const newData = {
+        classifyList: [],
+        brandList: []
+      }
+      this.dataSource.push(newData)
+    },
+    // 删除分类、品牌标签
+    delLabel (pos, i, name) {
+      this.dataSource[pos][name].splice(i, 1)
+    },
+    // 添加分类标签
+    addClassifyTag (pos, row) {
+      this.ChooseClassifyPos = pos
+      this.showClassifyModal = true
+    },
+    handleClassifyModal (con) {
+      const chooseList = con
+      this.showClassifyModal = false
+      this.dataSource[this.ChooseClassifyPos].classifyList = [...this.dataSource[this.ChooseClassifyPos].classifyList, ...chooseList]
+    },
+    // 添加品牌标签
+    addBrandTag (pos, row) {
+      this.ChooseBrandPos = pos
+      this.showBrandModal = true
+    },
+    // 保存
+    save () {
+
+    },
+    //  新增/编辑
+    handleEdit (row) {
+      if (row) {
+        this.itemSn = row.warehouseLocationSn
+        row.warehouseSn = this.$route.params.sn
+        this.nowData = row
+      } else {
+        this.itemSn = null
+        this.nowData = { warehouseSn: this.$route.params.sn }
+      }
+      this.openModal = true
+    },
+    //  新增/编辑  成功
+    handleOk () {
+      this.$refs.table.refresh(true)
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemSn = ''
+      this.openModal = false
+    },
+    //  删除
+    handleDel (pos) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '删除后不可恢复,确定要进行删除吗?',
+        centered: true,
+        onOk () {
+          _this.dataSource.splice(pos, 1)
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 350
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .categorySet-wrap{
+    .table-operator{
+    text-align:right;
+    }
+  }
+</style>

+ 113 - 0
src/views/power/user/chooseBrandModal.vue

@@ -0,0 +1,113 @@
+<template>
+  <a-modal
+    centered
+    class="chooseClassify-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="选择产品分类"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="680">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="checkboxAllBtn">
+        <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
+          全选
+        </a-checkbox>
+      </div>
+      <a-tree :load-data="onLoadData" :tree-data="treeData" checkable/>
+      <div class="btn-cont">
+        <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { bindRelation } from '@/api/dealerRelation'
+export default {
+  name: 'ChooseClassifyModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      checkedList: [],
+      treeData: [{ title: 'Expand to load', key: '0' },
+        { title: 'Expand to load', key: '1' },
+        { title: 'Tree Node', key: '2', isLeaf: true }]
+    }
+  },
+  methods: {
+    onLoadData (treeNode) {
+      return new Promise(resolve => {
+        if (treeNode.dataRef.children) {
+          resolve()
+          return
+        }
+        setTimeout(() => {
+          treeNode.dataRef.children = [
+            { title: 'Child Node', key: `${treeNode.eventKey}-0` },
+            { title: 'Child Node', key: `${treeNode.eventKey}-1` }
+          ]
+          this.treeData = [...this.treeData]
+          resolve()
+        }, 1000)
+      })
+    },
+    onCheckAllChange (e) {
+      Object.assign(this, {
+        checkedList: e.target.checked ? this.plainOptions : [],
+        indeterminate: false,
+        checkAll: e.target.checked
+      })
+    },
+    //  保存
+    handleSave () {
+      const _this = this
+      _this.$emit('ok', _this.checkedList)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.indeterminate = false
+        this.checkAll = false
+        this.checkedList = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .chooseClassify-modal{
+    .ant-modal-body {
+      padding: 20px 30px;
+      .checkboxAllBtn{
+        border-bottom:1px solid #E9E9E9;
+        padding-bottom:20px;
+        margin-bottom:20px;
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 104 - 0
src/views/power/user/chooseClassifyModal.vue

@@ -0,0 +1,104 @@
+<template>
+  <a-modal
+    centered
+    class="chooseClassify-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="选择产品分类"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="680">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="checkboxAllBtn">
+        <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
+          全选
+        </a-checkbox>
+      </div>
+      <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" />
+      <div class="btn-cont">
+        <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { bindRelation } from '@/api/dealerRelation'
+export default {
+  name: 'ChooseClassifyModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      checkedList: [],
+      plainOptions: ['欧司朗', '优志旺', '阪东BANDO', '东洋', '盖达', '欧皮特(Optibelt)'],
+      checkAll: false,
+      indeterminate: false
+    }
+  },
+  methods: {
+    getData () {
+
+    },
+    onChange () {
+      this.indeterminate = !!this.checkedList.length && this.checkedList.length < this.plainOptions.length
+      this.checkAll = this.checkedList.length === this.plainOptions.length
+    },
+    onCheckAllChange (e) {
+      Object.assign(this, {
+        checkedList: e.target.checked ? this.plainOptions : [],
+        indeterminate: false,
+        checkAll: e.target.checked
+      })
+    },
+    //  保存
+    handleSave () {
+      const _this = this
+      _this.$emit('ok', _this.checkedList)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.indeterminate = false
+        this.checkAll = false
+        this.checkedList = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .chooseClassify-modal{
+    .ant-modal-body {
+      padding: 20px 30px;
+      .checkboxAllBtn{
+        border-bottom:1px solid #E9E9E9;
+        padding-bottom:20px;
+        margin-bottom:20px;
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 44 - 32
src/views/power/user/userList.vue

@@ -49,41 +49,49 @@
         </span>
         <span slot="action" slot-scope="text, record">
           <a-button
-              size="small"
-              type="link"
-              class="button-info"
-              v-if="record.superAdmin!=1 &&$hasPermissions('B_power_user_edit')"
-              @click="handleEdit(record)"
-            >
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.superAdmin!=1 &&$hasPermissions('B_power_user_edit')"
+            @click="handleEdit(record)"
+          >
             编辑
-            </a-button>
-            <a-button
-              size="small"
-              type="link"
-              class="button-info"
-              v-if="record.loginFlag==1 && record.superAdmin!=1 &&$hasPermissions('B_power_user_resetPsd')"
-              @click="resetPassword(record)"
-            >
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.loginFlag==1 && record.superAdmin!=1 &&$hasPermissions('B_power_user_resetPsd')"
+            @click="resetPassword(record)"
+          >
             重置密码
-            </a-button>
-            <a-button
-              size="small"
-              type="link"
-              class="button-info"
-              v-if="$hasPermissions('B_power_user_set')"
-              @click="handleSetting(record)"
-            >
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="$hasPermissions('B_power_user_set')"
+            @click="handleSetting(record)"
+          >
             分区设置
-            </a-button>
-            <a-button
-              size="small"
-              type="link"
-              class="button-error"
-              v-if="record.loginFlag==0 && record.superAdmin!=1 &&$hasPermissions('B_power_user_del')"
-              @click="delect(record)"
-            >
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="categorySet(record)"
+          >
+            管辖品类设置
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.loginFlag==0 && record.superAdmin!=1 &&$hasPermissions('B_power_user_del')"
+            @click="delect(record)"
+          >
             删除
-            </a-button>
+          </a-button>
         </span>
       </s-table>
     </a-spin>
@@ -128,7 +136,7 @@ export default {
         { title: '所属分区', dataIndex: 'allSubareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '角色', dataIndex: 'roleNames', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', width: '6%', align: 'center', scopedSlots: { customRender: 'status' } },
-        { title: '操作', width: '12%', align: 'center', scopedSlots: { customRender: 'action' } }
+        { title: '操作', width: '20%', align: 'center', scopedSlots: { customRender: 'action' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -196,6 +204,10 @@ export default {
         }
       })
     },
+    // 品类管理设置
+    categorySet (row) {
+      this.$router.push({ name: 'powerUserSet', query: { sn: row.sn } })
+    },
     // 删除
     delect (row) {
       const _this = this