Browse Source

Merge branch 'develop_temp0626' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_sale20

# Conflicts:
#	vue.config.js
合并临时迭代
lilei 2 years ago
parent
commit
fa5694990c

+ 57 - 5
src/api/bizuser.js

@@ -71,9 +71,20 @@ export const saveProductTypeList = params => {
     method: 'post'
   })
 }
+// 设置管辖区域
+export const queryDealerScopePage = params => {
+  const url = `/bizuser/scope/queryDealerScopePage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 // 设置管辖品类
-export const bizuserScopeQueryPage = params => {
-  const url = `/bizuser/scope/queryPage/${params.pageNo}/${params.pageSize}`
+export const queryProductScopePage = params => {
+  const url = `/bizuser/scope/queryProductScopePage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -82,6 +93,7 @@ export const bizuserScopeQueryPage = params => {
     method: 'post'
   })
 }
+
 // 设置管辖品类  删除整列
 export const bizuserScopeDelete = params => {
   return axios({
@@ -119,7 +131,7 @@ export const findById = params => {
 // 查询区域回显列表
 export const queryAreaScope = params => {
   return axios({
-    url: '/bizuser/scope/queryAreaScope',
+    url: '/bizuser/scope/queryAreaScopeList',
     data: params,
     method: 'post'
   })
@@ -137,7 +149,7 @@ export const saveAreaScope = params => {
 // 查询经销商回显列表
 export const queryDealerScope = params => {
   return axios({
-    url: '/bizuser/scope/queryDealerScope',
+    url: '/bizuser/scope/queryDealerScopeList',
     data: params,
     method: 'post'
   })
@@ -153,7 +165,7 @@ export const saveDealerScope = params => {
 
 // 经销商列表  (选择过的优先显示)
 export const bizuserScopeQueryDealer = (params) => {
-  const url = `/bizuser/scope/queryDealer/${params.pageNo}/${params.pageSize}`
+  const url = `/bizuser/scope/queryDealerPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -162,3 +174,43 @@ export const bizuserScopeQueryDealer = (params) => {
     method: 'post'
   })
 }
+
+/* 供应商 */
+// 供应商显示列表
+export const querySupplierScopePage = (params) => {
+  const url = `/bizuser/scope/querySupplierScopePage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 供应商列表  (选择过的优先显示)
+export const querySupplierPage = (params) => {
+  const url = `/bizuser/scope/querySupplierPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 保存供应商
+export const saveSupplierList = params => {
+  return axios({
+    url: '/bizuser/scope/saveSupplierList',
+    data: params,
+    method: 'post'
+  })
+}
+
+export const querySupplierScope = params => {
+  return axios({
+    url: '/bizuser/scope/querySupplierScopeList',
+    data: params,
+    method: 'post'
+  })
+}

+ 7 - 1
src/api/supplier.js

@@ -31,7 +31,13 @@ export const supplierProductCostLogExport = params => {
     responseType: 'blob'
   })
 }
-
+// 供应商 列表 有权限
+export const supplierAuthAllList = (params) => {
+  return axios({
+    url: '/bizuser/queryAuthSupplier',
+    method: 'get'
+  })
+}
 //  供应商 列表  无分页
 export const supplierAllList = (params) => {
   return axios({

+ 7 - 2
src/views/common/supplier.js

@@ -1,4 +1,4 @@
-import { supplierAllList } from '@/api/supplier.js'
+import { supplierAllList, supplierAuthAllList } from '@/api/supplier.js'
 const Employee = {
   template: `
       <a-select
@@ -36,6 +36,10 @@ const Employee = {
     disabledFlag: {
       type: Boolean,
       default: false
+    },
+    isPermission: {
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -65,7 +69,8 @@ const Employee = {
       this.$emit('change', value, item)
     },
     getList () {
-      supplierAllList().then(res => {
+      const funs = this.isPermission ? supplierAuthAllList : supplierAllList
+      funs().then(res => {
         if (res.status == 200) {
           if (this.enableFlag != '') {
             this.list = res.data.filter(item => item.enableFlag == this.enableFlag)

+ 19 - 4
src/views/dealerManagement/businessOwnerSettings/addModal.vue

@@ -48,6 +48,17 @@
             </a-radio>
           </a-radio-group>
         </a-form-model-item>
+        <!-- 供应商 -->
+        <a-form-model-item label="供应商" prop="allSupplierFlag" v-if="form.bizUserType == 'cg'">
+          <a-radio-group v-model="form.allSupplierFlag">
+            <a-radio value="1">
+              全部供应商
+            </a-radio>
+            <a-radio value="0">
+              部分供应商
+            </a-radio>
+          </a-radio-group>
+        </a-form-model-item>
         <!-- 人员类型为仓库管理员时 显示管辖仓库 -->
         <a-form-model-item label="管辖仓库" prop="bizUserScopeList" v-if="form.bizUserType == 'cg'">
           <chooseWarehouse ref="warehouse" modeType="multiple" :value="warehouseList" @change="handleWarehouse"></chooseWarehouse>
@@ -89,7 +100,8 @@ export default {
         bizUserType: undefined, // 人员类型
         allDealerFlag: undefined,
         allProductFlag: undefined,
-        bizUserScopeList: []
+        bizUserScopeList: [],
+        allSupplierFlag: undefined
       },
       warehouseList: [],
       user_name: '',
@@ -100,7 +112,8 @@ export default {
         bizUserType: [{ required: true, message: '请选择人员类型', trigger: 'change' }],
         allDealerFlag: [{ required: true, message: '请选择管辖经销商', trigger: 'change' }],
         allProductFlag: [{ required: true, message: '请选择管辖产品', trigger: 'change' }],
-        bizUserScopeList: [{ required: true, message: '请选择管辖仓库', trigger: 'change' }]
+        bizUserScopeList: [{ required: true, message: '请选择管辖仓库', trigger: 'change' }],
+        allSupplierFlag: [{ required: true, message: '请选择供应商', trigger: 'change' }]
       }
     }
   },
@@ -112,8 +125,9 @@ export default {
           _this.spinning = true
           _this.form.id = _this.itemId ? _this.itemId : ''
           if (_this.form.bizUserType != 'cg') {
-            this.warehouseList = []
+            _this.warehouseList = []
             _this.form.bizUserScopeList = []
+            _this.form.allSupplierFlag = undefined
           }
           bizuserSave(_this.form).then(res => {
             _this.spinning = false
@@ -173,7 +187,8 @@ export default {
         bizUserType: obj.bizUserType, // 人员类型
         allDealerFlag: obj.allDealerFlag,
         allProductFlag: obj.allProductFlag,
-        bizUserScopeList: newarr
+        bizUserScopeList: newarr,
+        allSupplierFlag: obj.allSupplierFlag
       }
     }
   },

+ 5 - 4
src/views/dealerManagement/businessOwnerSettings/categorySet.vue

@@ -90,7 +90,7 @@ import { commonMixin } from '@/utils/mixin'
 import ChooseBrandModal from '@/views/common/chooseBrandModal.vue'
 import ChooseTypeModal from '@/views/common/chooseTypeModal.vue'
 import { STable } from '@/components'
-import { getNewScopeSn, bizuserScopeQueryPage, saveProductBrandList, saveProductTypeList, bizuserScopeDelete, deleteProductBrand, deleteProductType } from '@/api/bizuser'
+import { getNewScopeSn, queryProductScopePage, saveProductBrandList, saveProductTypeList, bizuserScopeDelete, deleteProductBrand, deleteProductType } from '@/api/bizuser'
 export default {
   name: 'CategorySet',
   mixins: [commonMixin],
@@ -129,15 +129,16 @@ export default {
         this.spinning = true
         this.queryParam.userSn = this.$route.query.sn
         this.queryParam.bizUserSn = this.bizUserSn
-        return bizuserScopeQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
-          let data
-          data = res.data
+        return queryProductScopePage(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           this.total = data.count || 0
+
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
           this.dataSource = data.list
+
           this.disabled = false
           this.spinning = false
           return data

+ 199 - 0
src/views/dealerManagement/businessOwnerSettings/chooseSupplier.vue

@@ -0,0 +1,199 @@
+<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="chooseSupplier-nameLike" v-model.trim="queryParam.supplier.supplierName" allowClear placeholder="请输入供应商名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="searchForm(true)" :disabled="disabled" id="chooseSupplier-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseSupplier-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="selectCount"> {{ `已选 ${selectCount} 项` }} </template>
+        </span>
+      </div>
+    </div>
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.supplierSn"
+      rowKeyName="supplierSn"
+      :row-selection="{ columnWidth: 40}"
+      @rowSelection="rowSelectionFun"
+      :columns="columns"
+      :data="loadData"
+      :style="{ height:tableHeight-15+'px' }"
+      :scroll="{ y:tableHeight+80 }"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import AreaList from '@/views/common/areaList.js'
+import { querySupplierPage } from '@/api/bizuser'
+import subarea from '@/views/common/subarea.js'
+export default {
+  name: 'ChooseSupplier',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList },
+  data () {
+    return {
+      spinning: false,
+      queryParam: { //  查询条件
+        supplier: {
+          supplierName: ''
+        }
+      },
+      userSn: '',
+      pageFlag: false,
+      chooseInfo: [],
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false, // 批量添加loading
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        this.queryParam.userSn = this.userSn
+        return querySupplierPage(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          const _this = this
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            const chooseData = []
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].supplierSn = data.list[i].supplier.supplierSn
+              if (_this.chooseInfo && _this.chooseInfo.length > 0) {
+                // 回显选中数据
+                const flag = _this.chooseInfo.includes(data.list[i].supplier.supplierSn)
+                if (flag) {
+                  chooseData.push(data.list[i])
+                }
+              }
+            }
+            if (!_this.pageFlag) {
+              console.log('11111111111111111111111', _this.chooseInfo, chooseData)
+              _this.$refs.table.setTableSelected(_this.chooseInfo, chooseData) // 设置表格选中项
+              _this.pageFlag = true
+            }
+          }
+          _this.spinning = false
+          return data
+        })
+      },
+      rowSelectionInfo: null
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '供应商名称', dataIndex: 'supplier.supplierName', width: '96%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        // { title: '联系人', dataIndex: 'supplier.contact', align: 'left', width: '26%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '联系电话', dataIndex: 'supplier.contactMobile', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      return arr
+    },
+    selectCount () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : ''
+      this.queryParam.citySn = val[1] ? val[1] : ''
+      this.queryParam.districtSn = val[2] ? val[2] : ''
+    },
+    searchForm (flag) {
+      this.$refs.table.refresh(flag)
+      this.spinning = false
+    },
+    subareaChange (val) {
+      this.queryParam.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam = {
+        supplier: {
+          supplierName: ''
+        }
+      }
+      this.$refs.table.clearSelected()
+      this.$refs.table.refresh(true)
+      this.pageFlag = false
+    },
+    clearTable () {
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
+    },
+    // 批量添加
+    handleBatchAudit () {
+      const _this = this
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
+      const supplierSnList = _this.rowSelectionInfo.selectedRowKeys
+      this.spinning = false
+      this.$emit('plAdd', supplierSnList)
+    },
+    handleAdd (row) {
+      if (row.subareaArea) {
+        const _this = this
+        this.$confirm({
+          title: '提示',
+          content: '当前经销商已被其他区域分区绑定,确定要更新绑定关系吗?',
+          centered: true,
+          onOk () {
+            _this.spinning = true
+            _this.$emit('add', row)
+          }
+        })
+      } else {
+        this.spinning = true
+        this.$emit('add', row)
+      }
+    },
+    pageInit (data) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.chooseInfo = data.list ? data.list : []
+      this.userSn = data.sn
+      this.resetSearchForm()
+      this.pageFlag = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 300
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  }
+}
+</script>

+ 2 - 1
src/views/dealerManagement/businessOwnerSettings/list.vue

@@ -63,7 +63,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-warning" v-if="record.allDealerFlag!=1 || record.allProductFlag!=1" @click="handleSetCategory(record)">设置管辖范围</a-button>
+            <a-button size="small" type="link" class="button-warning" v-if="record.allDealerFlag!=1 || record.allProductFlag!=1 ||record.allSupplierFlag!=1" @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>
@@ -99,6 +99,7 @@ export default {
         { title: '人员类型', dataIndex: 'bizUserTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '管辖经销商', dataIndex: 'allDealerFlagDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '管辖品类', dataIndex: 'allProductFlagDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '管辖供应商', dataIndex: 'allSupplierFlagDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '管辖仓库', scopedSlots: { customRender: 'showWarehouse' }, width: '22%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' }
       ],

+ 14 - 3
src/views/dealerManagement/businessOwnerSettings/settingsIndex.vue

@@ -71,6 +71,9 @@
             <a-tab-pane key="2" tab="设置管辖品类" force-render v-if="infoObj.allProductFlag&&infoObj.allProductFlag!=1">
               <categorySet ref="setCategory" :bizUserSn="infoObj.bizUserSn"></categorySet>
             </a-tab-pane>
+            <a-tab-pane key="3" tab="设置供应商" force-render v-if="infoObj.allSupplierFlag&&infoObj.allSupplierFlag!=1">
+              <supplierSet ref="setSupplier" :bizUserSn="infoObj.bizUserSn"></supplierSet>
+            </a-tab-pane>
           </a-tabs>
         </div>
       </a-card>
@@ -103,14 +106,15 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import categorySet from './categorySet'
+import supplierSet from './supplierSet'
 import chooseAreaModal from './chooseAreaModal'
 import chooseDealer from './chooseDealer.vue'
-import { bizuserScopeQueryPage, bizuserScopeDelete, findById, queryAreaScope, queryDealerScope, saveAreaScope, saveDealerScope } from '@/api/bizuser'
+import { queryDealerScopePage, bizuserScopeDelete, findById, queryAreaScope, queryDealerScope, saveAreaScope, saveDealerScope } from '@/api/bizuser'
 import subarea from '@/views/common/subarea.js'
 export default {
   name: 'SettingsIndex',
   mixins: [commonMixin],
-  components: { STable, categorySet, chooseAreaModal, chooseDealer, subarea },
+  components: { STable, categorySet, chooseAreaModal, chooseDealer, subarea, supplierSet },
   data () {
     return {
       openChooseArea: false,
@@ -143,7 +147,7 @@ export default {
         this.disabled = true
         this.spinning = true
         this.queryParam.userSn = this.$route.query.sn
-        return bizuserScopeQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
+        return queryDealerScopePage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -177,6 +181,11 @@ export default {
             _this.$nextTick(() => {
               this.$refs.setCategory.pageInit()
             })
+          } else if (res.data.allDealerFlag == 1 && res.data.allProductFlag == 1 && res.data.allSupplierFlag != 1) {
+            _this.activeKeyVal = '3'
+            _this.$nextTick(() => {
+              this.$refs.setSupplier.pageInit()
+            })
           }
         }
       })
@@ -217,6 +226,8 @@ export default {
       this.activeKeyVal = val
       if (val == 2) {
         this.$refs.setCategory.pageInit()
+      } else if (val == 3) {
+        this.$refs.setSupplier.pageInit()
       }
     },
     // 所在区域分区查询

+ 226 - 0
src/views/dealerManagement/businessOwnerSettings/supplierSet.vue

@@ -0,0 +1,226 @@
+<template>
+  <div class="categorySet-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="categorySet-cont">
+        <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="openSupplierModal">新增</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-item label="供应商名称">
+                    <a-input id="areaSet-dealerName" v-model.trim="queryParam.supplierName" 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.no"
+              rowKeyName="no"
+              :columns="columns"
+              :data="loadData"
+              :defaultLoadData="false"
+              :style="{ height: tableHeight+'px' }"
+              :scroll="{ y: tableHeight-180 }"
+              bordered>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button
+                  size="small"
+                  type="link"
+                  class="button-error"
+                  @click="handleDel(record)"
+                >
+                  删除
+                </a-button>
+              </template>
+            </s-table>
+          </a-spin>
+        </div>
+      </a-card>
+    </a-spin>
+    <!-- 选择供应商 -->
+    <a-drawer
+      title="选择供应商"
+      width="80%"
+      :zIndex="100"
+      :visible="openChooseSupplier"
+      :get-container="false"
+      :wrap-style="{ position: 'absolute' }"
+      @close="openChooseSupplier = false">
+      <div class="dealerModalCon">
+        <chooseSupplier ref="supplierChoose" @plAdd="handleAddSupplier"></chooseSupplier>
+      </div>
+    </a-drawer>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import chooseSupplier from './chooseSupplier.vue'
+import ChooseTypeModal from '@/views/common/chooseTypeModal.vue'
+import { STable } from '@/components'
+import { querySupplierScopePage, querySupplierScope, saveSupplierList, bizuserScopeDelete } from '@/api/bizuser'
+export default {
+  name: 'CategorySet',
+  mixins: [commonMixin],
+  components: { chooseSupplier, ChooseTypeModal, STable },
+  props: {
+    bizUserSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '添加时间', dataIndex: 'createDate', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商名称', dataIndex: 'supplier.supplierName', width: '60%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '联系人', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '联系手机', dataIndex: 'subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ],
+      openChooseSupplier: false,
+      queryParam: {
+        supplierName: ''
+      },
+      dataSource: [],
+      openModal: false, //  新增编辑产品品牌  弹框
+      itemSn: '', //  当前sn
+      nowData: null, //  当前记录数据
+      openBrandModal: false,
+      openChooseDealer: true,
+      openTypeModal: false,
+      chooseBrand: [],
+      chooseType: [],
+      chooseObj: null, // 选择品牌 内容
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // this.spinning = true
+        this.queryParam.userSn = this.$route.query.sn
+        this.queryParam.bizUserSn = this.bizUserSn
+        return querySupplierScopePage(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          this.total = data.count || 0
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.dataSource = data.list
+          this.disabled = false
+          // this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    // 打开供应商弹窗
+    async openSupplierModal () {
+      const _this = this
+      const arr = []
+      const dataList = await querySupplierScope({ userSn: this.$route.query.sn })
+      if (dataList.data && dataList.data.length > 0) {
+        dataList.data.forEach(con => {
+          arr.push(con.bizSn)
+        })
+        _this.chooseInfo = [...new Set(arr)]
+      } else {
+        _this.chooseInfo = []
+      }
+      const dataInfo = {
+        list: _this.chooseInfo,
+        sn: _this.$route.query.sn
+      }
+      this.openChooseSupplier = true
+      this.$nextTick(() => {
+        _this.$refs.supplierChoose.pageInit(dataInfo)
+      })
+    },
+    // 选择供应商
+    handleAddSupplier (list) {
+      const newData = []
      list.forEach(con => {
        const obj = {}
+        obj.userSn = this.$route.query.sn
+        obj.bizUserSn = this.bizUserSn
        obj.bizType = 'supplier'
        obj.bizSn = con
        newData.push(obj)
      })
      this.saveChooseDealer(newData)
+    },
+    saveChooseDealer (list) {
+      const _this = this
+      const ajaxData = {}
+      ajaxData.userSn = _this.$route.query.sn
+      ajaxData.bizUserScopeList = list
+      saveSupplierList(ajaxData).then(res => {
+        if (res.status == 200) {
+          _this.openChooseSupplier = false
+          _this.resetSearchForm()
+        }
+      })
+    },
+    // 删除供应商
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?删除后当前用户权限以最新权限为准',
+        centered: true,
+        onOk () {
+          bizuserScopeDelete({ id: row.bizUserScopeSn }).then(res => {
+            if (res.status == 200) {
+              _this.resetSearchForm()
+            }
+          })
+        }
+      })
+    },
+    resetSearchForm () {
+      this.queryParam = {
+        supplierName: ''
+      }
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.$refs.table.refresh()
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 385
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .categorySet-wrap{
+    .table-operator{
+    text-align:right;
+    }
+  }
+</style>

+ 1 - 0
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -34,6 +34,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-item label="仓库">
                   <warehouse
+                    isPermission
                     v-model="queryParam.warehouseSn"
                     id="inventoryQueryList-warehouseSn"
                     placeholder="请选择仓库"

+ 1 - 1
src/views/purchasingManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -17,7 +17,7 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol" >
         <a-form-model-item label="供应商" prop="supplierSn">
-          <supplier v-model="form.supplierSn" placeholder="请输入供应商名称"></supplier>
+          <supplier v-model="form.supplierSn" isPermission placeholder="请输入供应商名称"></supplier>
         </a-form-model-item>
         <a-form-model-item label="入库类型" prop="sparePartsType">
           <v-select

+ 1 - 1
src/views/purchasingManagement/purchaseReturn/addModal.vue

@@ -17,7 +17,7 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol" >
         <a-form-model-item label="供应商名称" prop="supplierSn">
-          <supplier v-model="form.supplierSn" :disabledFlag="itemSn?true:false" placeholder="请输入供应商名称"></supplier>
+          <supplier v-model="form.supplierSn" isPermission :disabledFlag="itemSn?true:false" placeholder="请输入供应商名称"></supplier>
         </a-form-model-item>
         <a-form-model-item label="退货原因" prop="returnReason">
           <v-select

+ 1 - 1
src/views/reportData/urchaseDetailReturn/detailList.vue

@@ -24,7 +24,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="供应商名称">
-                <supplier v-model="queryParam.supplier.supplierSn" @change="getSupplierName" placeholder="请输入供应商名称"></supplier>
+                <supplier isPermission v-model="queryParam.supplier.supplierSn" @change="getSupplierName" placeholder="请输入供应商名称"></supplier>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">

+ 1 - 1
src/views/reportData/urchaseReturn/list.vue

@@ -24,7 +24,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="供应商名称">
-                <supplier v-model="queryParam.supplierSn" placeholder="请输入供应商名称"></supplier>
+                <supplier v-model="queryParam.supplierSn" isPermission placeholder="请输入供应商名称"></supplier>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">

+ 1 - 1
src/views/reportData/warehousingOrder/list.vue

@@ -52,7 +52,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="入库仓库">
-                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                  <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
             </template>

+ 1 - 1
src/views/reportData/warehousingOrderDetail/list.vue

@@ -46,7 +46,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="入库仓库">
-                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                  <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
             <template v-if="advanced">