Explorar el Código

经销商管理

chenrui hace 2 años
padre
commit
fc06485d40

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

@@ -2827,6 +2827,42 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/dealerManagement/businessOwnerSettings',
+            redirect: '/dealerManagement/businessOwnerSettings/list',
+            name: 'businessOwnerSettings',
+            component: BlankLayout,
+            meta: {
+              title: '业务负责人配置',
+              icon: 'stock'
+              // permission: 'M_businessOwnerSettingsList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'businessOwnerSettingsList',
+                component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/businessOwnerSettings/list.vue'),
+                meta: {
+                  title: '业务负责人配置列表',
+                  icon: 'stock',
+                  hidden: true
+                  // permission: 'M_businessOwnerSettingsList'
+                }
+              },
+              {
+                path: 'settingsIndex',
+                name: 'categorySet',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/dealerManagement/businessOwnerSettings/settingsIndex.vue'),
+                meta: {
+                  title: '管辖品类权限设置',
+                  icon: 'user',
+                  hidden: true
+                  // permission: 'M_settingsIndex'
+                }
+              }
+            ]
+          },
           {
             path: '/dealerManagement/marketingDivisionSet',
             redirect: '/dealerManagement/marketingDivisionSet/list',
@@ -3243,17 +3279,6 @@ 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'
-                }
               }
             ]
           },
@@ -3514,4 +3539,4 @@ export const constantRouterMap = [
     path: '/404',
     component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
   }
-]
+]

+ 224 - 0
src/views/common/chooseDealer.vue

@@ -0,0 +1,224 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <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="8" :sm="24">
+            <a-form-item label="经销商名称/别名">
+              <a-input id="chooseDealer-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入经销商名称/别名"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-item label="商户类型">
+              <v-select code="DEALER_TYPE" id="chooseDealer-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择商户类型"></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-model-item label="商户级别" prop="dealerLevel">
+              <v-select code="DEALER_LEVEL" id="ucModal-dealerLevel" v-model="queryParam.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-item label="所在区域/分区">
+              <subarea id="chooseDealer-subarea" v-model="queryParam.subareaSn"></subarea>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseDealer-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseDealer-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+      <!-- 列表 -->
+      <div style="margin-bottom: 10px">
+        <a-button type="primary" ghost :loading="loading" @click="handleBatchAudit">批量添加</a-button>
+        <span style="margin-left: 5px">
+          <template v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length>0"> {{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }} </template>
+        </span>
+      </div>
+    </div>
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.stockPutSn"
+      rowKeyName="stockPutSn"
+      :row-selection="$hasPermissions('B_warehousingConfirmationpl') ? { columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.auditState != 'WAIT' } }) } : null"
+      @rowSelection="rowSelectionFun"
+      :columns="columns"
+      :data="loadData"
+      :style="{ height: tableHeight+84.5+'px' }"
+      :scroll="{ y: tableHeight }"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { stockPutList, stockPutConfirm } from '@/api/stockPut'
+import subarea from '@/views/common/subarea.js'
+export default {
+  name: 'ChooseDealer',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea },
+  data () {
+    return {
+      spinning: false,
+      queryParam: { //  查询条件
+        nameLike: '',
+        dealerType: undefined,
+        dealerLevel: undefined,
+        subareaSn: undefined
+      },
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return stockPutList(Object.assign(parameter, this.queryParam, { confirm: true })).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      rowSelectionInfo: null,
+      columns: [
+        { title: '经销商名称', dataIndex: 'putTime', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户别名', dataIndex: 'providerName', align: 'left', width: '30%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户类型', dataIndex: 'putBizTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'auditStateDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所在区域', dataIndex: 'remark', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.stockPutNo = ''
+      this.queryParam.auditState = undefined
+      this.$refs.table.refresh(true)
+    },
+    // 详情
+    handleDetail (row) {
+      if (this.$hasPermissions('B_warehousingConfirmationDetail')) {
+        this.itemSn = row.stockPutSn
+        this.nowData = row
+        this.openModal = true
+      }
+    },
+    closeModal () {
+      this.itemSn = ''
+      this.nowData = null
+      this.openModal = false
+    },
+    // 通过
+    handleConfirmationOk () {
+      if (this.isBatch) { //  批量
+        this.auditOrder(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys, true)
+      } else {
+        this.auditOrder([this.confirmationInfo.stockPutSn], true)
+      }
+    },
+    // 不通过
+    handleConfirmationFail () {
+      if (this.isBatch) { //  批量
+        this.auditOrder(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys, false)
+      } else {
+        this.auditOrder([this.confirmationInfo.stockPutSn], false)
+      }
+    },
+    // 单个审核
+    handleAudit (row) {
+      this.confirmationInfo = row
+      this.isBatch = false
+      this.confirmationModal = true
+    },
+    auditOrder (snList, flag) {
+      const _this = this
+      if (this.isBatch) {
+        _this.loading = true
+      }
+      _this.spinning = true
+      stockPutConfirm({ stockPutSnList: snList, confirm: flag }).then(res => {
+        if (this.isBatch) {
+          _this.loading = false
+        }
+        if (res.status == 200) {
+          if (this.isBatch) {
+            _this.$refs.table.clearSelected() // 清空表格选中项
+          }
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.confirmationModal = false
+          _this.spinning = false
+        } else {
+          _this.confirmationModal = false
+          _this.spinning = false
+        }
+      })
+    },
+    // 批量审核
+    handleBatchAudit () {
+      const _this = this
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
+      this.isBatch = true
+      this.confirmationModal = true
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 165
+    }
+  },
+  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>

+ 132 - 0
src/views/dealerManagement/businessOwnerSettings/addModal.vue

@@ -0,0 +1,132 @@
+<template>
+  <a-modal
+    centered
+    class="businessOwnerSettings-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="新增人员"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="600">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="labelCol"
+        :wrapper-col="wrapperCol"
+      >
+        <a-form-model-item label="人员名称">
+          <a-input id="businessOwnerSettings-name" v-model.trim="form.name" allowClear placeholder="请输入人员姓名"/>
+        </a-form-model-item>
+        <a-form-model-item label="人员类型" prop="subareaSnList">
+          <a-select
+            placeholder="请选择人员类型"
+            allowClear
+            mode="multiple"
+            v-model="form.subareaSnList"
+            :showSearch="true"
+            :filter-option="filterOption">
+            <a-select-option v-for="item in subareaList" :key="item.subareaSn" :value="item.subareaSn">{{ item.subareaName }}</a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="管辖经销商" prop="">
+          <a-radio-group v-model="form.value" @change="onChange">
+            <a-radio :value="1">
+              全部经销商
+            </a-radio>
+            <a-radio :value="2">
+              部分经销商
+            </a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item label="管辖品类" prop="">
+          <a-radio-group v-model="form.value" @change="onChange">
+            <a-radio :value="1">
+              全部品类
+            </a-radio>
+            <a-radio :value="2">
+              部分品类
+            </a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <div style="display: flex;justify-content: center;padding: 30px 0;">
+          <a-button type="primary" @click="onSubmit">确定</a-button>
+          <a-button style="margin-left: 15px;" @click="cansel">取消</a-button>
+        </div>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { checkWarehouseSave } from '@/api/checkWarehouse'
+export default {
+  name: 'ProductInfoDetailModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      form: {
+        name: '',
+        subareaSnList: undefined
+      },
+      labelCol: { span: 5 },
+      wrapperCol: { span: 16 }
+    }
+  },
+  methods: {
+    onChange () {},
+    // 确定
+    handleSave () {
+      this.spinning = true
+      checkWarehouseSave({}).then(res => {
+        this.spinning = false
+        if (res.status == 200) {
+          this.$message.success('盘点单新增成功')
+          this.$emit('ok', res.data)
+          this.isShow = false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .inventoryCheckAddModal-modal{
+    .ant-modal-body {
+      padding: 30px 40px 24px;
+    }
+    .inventoryCheckAddModal-con{
+      text-align: center;
+      h3{
+        font-size: 16px;
+        font-weight: bold;
+        margin-bottom: 25px;
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 5 - 14
src/views/power/user/categorySet.vue → src/views/dealerManagement/businessOwnerSettings/categorySet.vue

@@ -1,15 +1,8 @@
 <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">
+        <div class="table-operator" ref="categorySetAddBtn">
           <a-button type="primary" class="button-error" @click="addCategory">+新增管辖品类</a-button>
         </div>
         <a-table
@@ -17,9 +10,9 @@
           :data-source="dataSource"
           :columns="columns"
           ref="table"
-          :style="{ height: tableHeight+84.5+'px' }"
-          :scroll="{ y: tableHeight }"
           style="word-break: break-all;">
+          <!-- :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ y: tableHeight }" -->
           <!-- 产品分类 -->
           <template slot="classify" slot-scope="text,record,index">
             <a-row v-if="record.classifyList && record.classifyList.length>0">
@@ -75,9 +68,6 @@
             </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>
     <!-- 选择分类 -->
@@ -194,7 +184,8 @@ export default {
       })
     },
     setTableH () {
-      this.tableHeight = window.innerHeight - 350
+      const addBtnHeight = this.$refs.categorySetAddBtn.offsetHeight
+      this.tableHeight = window.innerHeight - addBtnHeight - 385
     }
   },
   watch: {

+ 98 - 0
src/views/dealerManagement/businessOwnerSettings/chooseAreaModal.vue

@@ -0,0 +1,98 @@
+<template>
+  <a-drawer
+    title="选择区域"
+    width="50%"
+    :zIndex="100"
+    :visible="visible"
+    :get-container="false"
+    :wrap-style="{ position: 'absolute' }"
+    @close="visible = false">
+    <div class="areaSetModal">
+      <div :style="{ height: tableHeight+84.5+'px' }"><a-tree :load-data="onLoadData" :tree-data="treeData" /></div>
+      <div class="areaFooter">
+        <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="areaSet-refresh">保存</a-button>
+        <a-button style="margin-left: 5px" @click="visible = false" :disabled="disabled" id="areaSet-reset">取消</a-button>
+      </div>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+export default {
+  mixins: [commonMixin],
+  props: {
+    showModal: {
+      type: Boolean,
+      default: false
+    }
+  },
+  watch: {
+    showModal (newValue, oldValue) {
+      this.visible = newValue
+    },
+    visible (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  },
+  data () {
+    return {
+      visible: this.showModal,
+      treeData: [{ title: 'Expand to load', key: '0' }, { title: 'Expand to load', key: '1' }, { title: 'Tree Node', key: '2', isLeaf: true }],
+      disabled: false,
+      tableHeight: 0
+    }
+  },
+
+  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)
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 345
+    }
+  },
+  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()
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.areaSetModal {
+  width: 100%;
+  .areaFooter {
+    text-align:center;
+  }
+}
+</style>

+ 3 - 1
src/views/power/user/chooseBrandModal.vue → src/views/dealerManagement/businessOwnerSettings/chooseBrandModal.vue

@@ -42,7 +42,9 @@ export default {
       checkedList: [],
       treeData: [{ title: 'Expand to load', key: '0' },
         { title: 'Expand to load', key: '1' },
-        { title: 'Tree Node', key: '2', isLeaf: true }]
+        { title: 'Tree Node', key: '2', isLeaf: true }],
+      indeterminate: false,
+      checkAll: false
     }
   },
   methods: {

+ 0 - 0
src/views/power/user/chooseClassifyModal.vue → src/views/dealerManagement/businessOwnerSettings/chooseClassifyModal.vue


+ 200 - 0
src/views/dealerManagement/businessOwnerSettings/list.vue

@@ -0,0 +1,200 @@
+<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-model-item label="人员类型">
+                <subarea id="businessOwnerSettings-subareaSn" v-model="queryParam.subareaSn"></subarea>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="人员姓名">
+                <a-input id="businessOwnerSettings-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入人员姓名"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="24" :sm="24" style="margin-top: 10px;text-align:center;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="businessOwnerSettings-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="businessOwnerSettings-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false" class="dealerZoneSearch-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div class="table-operator">
+          <a-button id="businessOwnerSettings-add" type="primary" class="button-error" @click="handleAdd">+新增</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="action" slot-scope="text, record">
+            <a-button size="small" type="link" class="button-warning" @click="handleSetCategory(record)">设置管辖范围</a-button>
+            <a-button size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
+            <a-button size="small" type="link" class="button-error" @click="handleDelete(record)">删除</a-button>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 新增 -->
+    <addModal :openModal="openAddModal" @close="openAddModal = false"></addModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { subareaQueryIncludeAreaAll, subareaDeleteBySn } from '@/api/subarea'
+import subarea from '@/views/common/subarea.js'
+import addModal from './addModal'
+export default {
+  name: 'BusinessOwnerSettings',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, addModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
+      queryParam: {
+        subareaSn: undefined,
+        dealerName: ''
+      },
+      columns: [
+        { title: '创建时间', dataIndex: 'subareaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员姓名', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '管辖经销商', dataIndex: 'subareaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '管辖品类', dataIndex: 'subareaName', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', 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
+        })
+      },
+      openAddModal: false, //  编辑  弹框
+      nowData: null,
+      itemId: null //  当前产品id
+    }
+  },
+  methods: {
+    handleSetCategory (row) {
+      this.$router.push({ name: 'categorySet', query: { sn: row.sn } })
+    },
+    // 新增
+    handleAdd () {
+      this.openAddModal = true
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.table.refresh(true)
+    },
+    // 删除
+    handleDelete (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 - 275
+    }
+  },
+  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">
+  .dealerZoneSearch-wrap{
+    height: 100%;
+    margin-top:6px;
+    .table-operator{
+      text-align:right;
+    }
+  }
+</style>

+ 267 - 0
src/views/dealerManagement/businessOwnerSettings/settingsIndex.vue

@@ -0,0 +1,267 @@
+<template>
+  <div class="categorySet-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div ref="headerBar">
+        <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>
+      </div>
+      <a-card size="small" :bordered="false" class="categorySet-cont">
+        <div :style="{ height: tableHeight+84.5+'px' }">
+          <a-tabs default-active-key="1">
+            <a-tab-pane key="1" tab="设置管辖区域">
+              <div class="areaSet-wrap">
+                <div class="table-page-search-wrapper newTableSearchName" >
+                  <div class="areaSet-btnGroup" style="margin-bottom:20px;">
+                    <a-button type="primary" class="button-error" @click="openAreaModal" ghost>选择区域</a-button>
+                    <a-button type="primary" class="button-error" @click="openDealerModal" ghost>选择经销商</a-button>
+                  </div>
+                  <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+                    <a-row :gutter="15">
+                      <a-col :md="6" :sm="24">
+                        <a-form-model-item label="所在区域/分区">
+                          <subarea id="areaSet-subareaSn" v-model="queryParam.subareaSn"></subarea>
+                        </a-form-model-item>
+                      </a-col>
+                      <a-col :md="6" :sm="24">
+                        <a-form-item label="经销商名称">
+                          <a-input id="areaSet-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="6" :sm="24">
+                        <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="areaSet-refresh">查询</a-button>
+                        <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="areaSet-reset">重置</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-form>
+                </div>
+                <a-spin :spinning="spinning" tip="Loading...">
+                  <!-- 列表 -->
+                  <s-table
+                    class="sTable fixPagination"
+                    ref="table"
+                    size="small"
+                    :rowKey="(record) => record.id"
+                    :columns="columns"
+                    :showPagination="false"
+                    :data="loadData"
+
+                    :defaultLoadData="false"
+                    bordered>
+                  </s-table>
+                </a-spin>
+                <!-- :style="{ height: tableHeight+'px' }"
+                :scroll="{ y: tableHeight }" -->
+              </div>
+            </a-tab-pane>
+            <a-tab-pane key="2" tab="设置管辖品类" force-render>
+              <categorySet></categorySet>
+            </a-tab-pane>
+          </a-tabs>
+        </div>
+      </a-card>
+      <!-- 选择区域 -->
+      <chooseAreaModal
+        ref="partQuery"
+        :showModal="openChooseArea"
+        @close="openChooseArea=false">
+      </chooseAreaModal>
+      <!-- 选择经销商 -->
+      <a-drawer
+        title="选择经销商"
+        width="80%"
+        :zIndex="100"
+        :visible="openChooseDealer"
+        :get-container="false"
+        :wrap-style="{ position: 'absolute' }"
+        @close="openChooseDealer = false">
+        <div class="dealerModalCon">
+          <chooseDealer></chooseDealer>
+        </div>
+      </a-drawer>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable } from '@/components'
+import categorySet from './categorySet'
+import chooseAreaModal from './chooseAreaModal'
+import chooseDealer from '@/views/common/chooseDealer.vue'
+export default {
+  name: 'SettingsIndex',
+  mixins: [commonMixin],
+  components: { STable, categorySet, chooseAreaModal, chooseDealer },
+  data () {
+    return {
+      openChooseArea: false,
+      openChooseDealer: false,
+      spinning: false,
+      tableHeight: 0,
+      queryParam: {
+        subareaSn: undefined,
+        dealerName: ''
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '添加时间', dataIndex: 'subareaName1', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'subareaName2', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaName3', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '经销商', dataIndex: 'subareaName4', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ],
+      disabled: false, //  查询、重置按钮是否可操作
+      dataSource: [],
+      openModal: false, //  新增编辑产品品牌  弹框
+      itemSn: '', //  当前sn
+      nowData: null, //  当前记录数据
+      showClassifyModal: false,
+      showBrandModal: false,
+      ChooseClassifyPos: null,
+      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
+        })
+      }
+    }
+  },
+  methods: {
+    resetSearchForm () {
+
+    },
+    openAreaModal () {
+      this.openChooseArea = true
+    },
+    openDealerModal () {
+      this.openChooseDealer = true
+    },
+    //  返回
+    handleBack () {
+      this.$router.push({ name: 'businessOwnerSettings' })
+    },
+    // 新增管辖品类
+    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 () {
+      const headHeight = this.$refs.headerBar.offsetHeight
+      this.tableHeight = window.innerHeight - headHeight - 230
+    }
+  },
+  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" scoped>
+  .categorySet-wrap{
+    .table-operator{
+    text-align:right;
+    }
+  }
+</style>

+ 5 - 5
src/views/dealerManagement/dealerZoneSearch/list.vue

@@ -7,22 +7,22 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="所在区域/分区">
-                <subarea id="rebateSettingsList-subareaSn" v-model="queryParam.subareaSn"></subarea>
+                <subarea id="dealerZoneSearch-subareaSn" v-model="queryParam.subareaSn"></subarea>
               </a-form-model-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-input id="dealerZoneSearch-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="8" :sm="24">
               <a-form-item label="客服/区域负责人/销售总监">
-                <a-input id="rebateSettingsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客服/区域负责人/销售总监"/>
+                <a-input id="dealerZoneSearch-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客服/区域负责人/销售总监"/>
               </a-form-item>
             </a-col>
             <a-col :md="24" :sm="24" style="margin-top: 10px;text-align:center;">
-              <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-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerZoneSearch-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="dealerZoneSearch-reset">重置</a-button>
               <a-button
                 style="margin-left: 5px"
                 type="primary"

+ 0 - 12
src/views/power/user/userList.vue

@@ -75,14 +75,6 @@
           >
             分区设置
           </a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-info"
-            @click="categorySet(record)"
-          >
-            管辖品类设置
-          </a-button>
           <a-button
             size="small"
             type="link"
@@ -204,10 +196,6 @@ export default {
         }
       })
     },
-    // 品类管理设置
-    categorySet (row) {
-      this.$router.push({ name: 'powerUserSet', query: { sn: row.sn } })
-    },
     // 删除
     delect (row) {
       const _this = this

+ 1 - 5
src/views/reportData/receivedSendStorageReport/index.vue

@@ -86,7 +86,7 @@
       </a-form>
     </div>
     <div :style="{ height: tableHeight+84.5+'px' }">
-      <a-tabs default-active-key="1" @change="tabsCallback">
+      <a-tabs default-active-key="1">
         <a-tab-pane key="1" tab="明细">
           明细
         </a-tab-pane>
@@ -175,13 +175,9 @@ export default {
     },
     searchForm () {
       console.log('1111:', this.startMonthVal)
-      debugger
     },
     resetSearchForm () {
 
-    },
-    tabsCallback () {
-
     },
     pageInit () {
       this.getProductType()