lilei 2 years ago
parent
commit
702472b126

+ 2 - 1
src/store/getters.js

@@ -23,7 +23,8 @@ const getters = {
   authMenusList: state => state.app.authMenusList,
   priceAuthOptions: state => state.app.priceAuthOptions,
   curActionPermission: state => state.app.curActionPermission,
-  isWarehouse: state => state.app.isWarehouse
+  isWarehouse: state => state.app.isWarehouse,
+  defWarehouse: state => state.app.defWarehouse
 }
 
 export default getters

+ 1 - 0
src/store/modules/app.js

@@ -41,6 +41,7 @@ const app = {
     curActionPermission: '', // 当前激活状态的权限码
     showPdfPrintView: false, // pdf 打印预览
     pdfUrl: '',
+    defWarehouse: null, // 默认仓库
     isWarehouse: false// 仓库管理权限
   },
   mutations: {

+ 3 - 0
src/utils/mixin.js

@@ -87,6 +87,9 @@ const commonMixin = {
     isShowWarehouse () {
       return this.$store.state.app.isWarehouse
     },
+    defWarehouse () {
+      return this.$store.state.app.defWarehouse
+    }
   },
   watch: {
     '$store.state.app.loadingStatus': function (a, b) {

+ 6 - 2
src/views/allocationManagement/matchSendOutOrder/list.vue

@@ -21,10 +21,11 @@
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="4" :sm="24">
+              <a-col :md="4" :sm="24" v-if="isShowWarehouse">
                 <a-form-item label="调出仓库">
                   <warehouse
                     v-model="queryParam.warehouseSn"
+                    isPermission
                     id="allocateBillList-warehouseSn"
                     placeholder="请选择调出仓库"
                   />
@@ -188,13 +189,16 @@ export default {
         { title: '发货说明', dataIndex: 'explainInfo', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单人员', dataIndex: 'checkPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单时间', dataIndex: 'checkDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
+      if(this.isShowWarehouse){
+        arr.splice(4,0,{ title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },)
+      }
       return arr
     }
   },

+ 11 - 6
src/views/allocationManagement/transfersPrint/list.vue

@@ -59,10 +59,11 @@
                     ></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="6" :sm="24">
+                <a-col :md="6" :sm="24" v-if="isShowWarehouse">
                 <a-form-item label="调出仓库">
                   <warehouse
                     v-model="queryParam.warehouseSn"
+                    isPermission
                     id="allocateBillList-warehouseSn"
                     placeholder="请选择调出仓库"
                   />
@@ -266,19 +267,23 @@ export default {
         // { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印状态', scopedSlots: { customRender: 'printStatus' }, width: '6%', align: 'center' },
         { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'printCount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      if(this.isShowWarehouse){
+        arr.splice(4,0,{ title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+
       if (this.$hasPermissions('M_transfersPrintList_salesPrice')) { //  售价权限
-        arr.splice(7, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '90px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(9, 0, { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(10, 0, { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(9, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '90px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(10, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(11, 0, { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(12, 0, { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
+      
       return arr
     }
   },

+ 3 - 0
src/views/common/chooseWarehouse.js

@@ -49,6 +49,7 @@ const warehouse = {
     }
   },
   mounted () {
+    this.$store.state.app.defWarehouse = null
     this.$store.state.app.isWarehouse = false
     this.getWarehouse()
   },
@@ -74,9 +75,11 @@ const warehouse = {
       ajaxName({}).then(res => {
         if (res.status == 200) {
           this.$store.state.app.isWarehouse = res.data && res.data.length > 1
+          this.$store.state.app.defWarehouse = res.data && res.data[0]
           this.warehouseData = res.data
         } else {
           this.$store.state.app.isWarehouse = false
+          this.$store.state.app.defWarehouse = null
           this.warehouseData = []
         }
       })

+ 8 - 7
src/views/dataExport/exportCheck/list.vue

@@ -23,15 +23,16 @@
               </a-form-model-item>
             </a-col>
           </a-row>
-          <a-row :gutter="15">
+          <a-row :gutter="15" v-if="isShowWarehouse">
             <a-col :md="12" :sm="24">
               <a-form-model-item label="选择仓库" prop="warehouseSn">
-              <warehouse
-                v-model="queryParam.warehouseSn"
-                id="exportCheckList-warehouseSn"
-                placeholder="请选择仓库"
-              />
-            </a-form-model-item>
+                <warehouse
+                  v-model="queryParam.warehouseSn"
+                  isPermission
+                  id="exportCheckList-warehouseSn"
+                  placeholder="请选择仓库"
+                />
+              </a-form-model-item>
             </a-col>
           </a-row>
           <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }">

+ 6 - 2
src/views/inventoryManagement/inventoryCheck/addModal.vue

@@ -15,9 +15,11 @@
           <h3>全盘盘点</h3>
           <p>全盘是指所有有过入库记录的产品都参与盘点</p>
           <p>确定创建新的盘点单吗?</p>
-          <p>仓库:<warehouse
+          <p v-if="isShowWarehouse">
+            仓库:<warehouse
                     style="width:200px;"
                     v-model="form.warehouseSn"
+                    isPermission
                     id="inventoryCheckAddModal-warehouseSn"
                     placeholder="请选择仓库"
                   />
@@ -33,10 +35,12 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { checkWarehouseSave } from '@/api/checkWarehouse'
 import warehouse from '@/views/common/chooseWarehouse.js'
 export default {
   name: 'ProductInfoDetailModal',
+  mixins: [commonMixin],
   components:{warehouse},
   props: {
     openModal: { //  弹框显示状态
@@ -54,7 +58,7 @@ export default {
   methods: {
     // 确定
     handleSave () {
-      if(!this.form.warehouseSn){
+      if(this.isShowWarehouse && !this.form.warehouseSn){
         this.$message.error('请选择仓库')
         return
       }

+ 15 - 17
src/views/inventoryManagement/inventoryCheck/list.vue

@@ -16,10 +16,11 @@
                 <a-input id="inventoryCheckList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="isShowWarehouse">
               <a-form-item label="仓库">
                 <warehouse
                   v-model="queryParam.warehouseSn"
+                  isPermission
                   id="inventoryCheckList-warehouseSn"
                   placeholder="请选择仓库"
                 />
@@ -152,37 +153,34 @@ export default {
   },
   computed: {
     columns () {
-      let arr = []
-      if (this.queryParam.deleteFlag == '0') { // 正常
-        arr = [
+      let arr = [
           { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
           { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
-          { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+          // { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '盘点提交时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '监盘提交时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        ]
+
+      if (this.queryParam.deleteFlag == '0') { // 正常
+        arr = arr.concat([
           { title: '财务确认时间', dataIndex: 'financeAuditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点单创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-        ]
+        ])
       } else if (this.queryParam.deleteFlag == '1') { // 已作废
-        arr = [
-          { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-          { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
-          { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
-          { title: '盘点提交时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
-          { title: '监盘提交时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        arr = arr.concat([
           { title: '盘点单创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点单作废时间', dataIndex: 'deleteTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-        ]
+        ])
+      }
+
+      if(this.isShowWarehouse){
+        arr.splice(2,0,{ title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }

+ 28 - 19
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -31,10 +31,11 @@
                   <ProductType id="inventoryWarningList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-              <a-form-item label="仓库">
+              <a-col :md="6" :sm="24" v-if="isShowWarehouse">
+                <a-form-item label="仓库">
                   <warehouse
                     v-model="queryParam.warehouseSn"
+                    isPermission
                     id="inventoryWarningList-warehouseSn"
                     placeholder="请选择仓库"
                   />
@@ -77,7 +78,7 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ columnWidth: 40 }:null"
+        :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ columnWidth: '4%' }:null"
         :rowKey="(record) => record.id"
         @rowSelection="rowSelectionFun"
         :columns="columns"
@@ -191,22 +192,6 @@ export default {
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
       productType: [],
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
-        { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: '6%', align: 'center' },
-        { title: '总库存数(个)', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: '6%', align: 'center' },
-        { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: '6%', align: 'center' },
-        { title: '差异数量', dataIndex: 'differenceNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: '6%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -237,6 +222,30 @@ export default {
       rowSelectionInfo: null
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
+        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: '6%', align: 'center' },
+        { title: '总库存数(个)', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: '6%', align: 'center' },
+        { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: '6%', align: 'center' },
+        { title: '差异数量', dataIndex: 'differenceNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: '6%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      if(this.isShowWarehouse){
+        arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 表格选中项
     rowSelectionFun (obj) {

+ 23 - 13
src/views/inventoryManagement/makeInventory/list.vue

@@ -10,11 +10,12 @@
                 <a-input id="makeInventoryList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="6" :sm="24" v-if="isShowWarehouse">
               <a-form-item label="仓库">
                 <warehouse
                   v-model="queryParam.warehouseSn"
                   id="inventoryCheckList-warehouseSn"
+                  isPermission
                   placeholder="请选择仓库"
                 />
               </a-form-item>
@@ -73,18 +74,6 @@ export default {
         warehouseSn: undefined,
         checkWarehouseNo: ''
       },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '12%', align: 'center' },
-        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品款数', dataIndex: 'productTotalCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存数量', dataIndex: 'totalStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点盈亏数量', dataIndex: 'totalProfitLossQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点单创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -105,6 +94,27 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '12%', align: 'center' },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'totalStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点盈亏数量', dataIndex: 'totalProfitLossQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点单创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      if(this.isShowWarehouse){
+        arr.splice(2, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 盘点
     handleCheck (row) {

+ 26 - 16
src/views/inventoryManagement/supervisionDisk/list.vue

@@ -10,11 +10,12 @@
                 <a-input id="supervisionDiskList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="6" :sm="24" v-if="isShowWarehouse">
               <a-form-item label="仓库">
                 <warehouse
                   v-model="queryParam.warehouseSn"
                   id="supervisionDiskList-warehouseSn"
+                  isPermission
                   placeholder="请选择仓库"
                 />
               </a-form-item>
@@ -73,21 +74,6 @@ export default {
         warehouseSn: undefined,
         checkWarehouseNo: ''
       },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
-        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '盘点时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存数量', dataIndex: 'totalStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '监盘数量', dataIndex: 'checkSuperviseTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '监盘盈亏数量', dataIndex: 'totalProfitLossQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -108,6 +94,30 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '盘点时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'totalStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '监盘数量', dataIndex: 'checkSuperviseTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '监盘盈亏数量', dataIndex: 'totalProfitLossQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
+      ]
+      if(this.isShowWarehouse){
+        arr.splice(2, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 监盘
     handleCheck (row) {

+ 22 - 13
src/views/productManagement/shelfNoManage/list.vue

@@ -31,10 +31,11 @@
                   <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="shelfNoMan-productType"></productTypeAll>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="4" :sm="24" v-if="isShowWarehouse">
                 <a-form-item label="仓库">
                   <warehouse
                     v-model="queryParam.product.warehouseSn"
+                    isPermission
                     id="shelfNoMan-warehouseSn"
                     placeholder="请选择仓库"
                   />
@@ -177,18 +178,6 @@ export default {
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productVO.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productVO.name', align: 'center', width: '20%', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productVO.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productVO.productBrandName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
-        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品状态', dataIndex: 'productVO.stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '货位编号', dataIndex: 'stackPlaceCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
-      ],
       loadingAudit: false,
       loadingLaunch: false,
       loadingDownline: false,
@@ -216,6 +205,26 @@ export default {
       pageFromInfo: null
     }
   },
+  computed: {
+	  columns () {
+	    const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productVO.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productVO.name', align: 'center', width: '20%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productVO.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productVO.productBrandName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品状态', dataIndex: 'productVO.stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货位编号', dataIndex: 'stackPlaceCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
+      ]
+      if (this.isShowWarehouse) {
+        arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+	    return arr
+	  }
+  },
   methods: {
     // 导入产品
     hanldeOk (obj) {

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

@@ -28,9 +28,10 @@
             placeholder="请选择入库类型"
             allowClear></v-select>
         </a-form-model-item>
-        <a-form-model-item label="入库仓库" prop="warehouseSn">
+        <a-form-model-item label="入库仓库" prop="warehouseSn" v-if="isShowWarehouse">
           <warehouse
             v-model="form.warehouseSn"
+            isPermission
             id="bulkWarehousingOrder-basicInfo-warehouseSn"
             placeholder="请选择入库仓库"
           />

+ 7 - 3
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -41,10 +41,11 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="isShowWarehouse">
                 <a-form-item label="入库仓库">
                   <warehouse
                     v-model="queryParam.warehouseSn"
+                    isPermission
                     id="salesReturn-warehouseSn"
                     placeholder="请选择退货仓库"
                   />
@@ -103,7 +104,7 @@
         size="small"
         :rowKey="(record) => record.sparePartsSn"
         rowKeyName="sparePartsSn"
-        :row-selection="$hasPermissions('B_sparePartsBatchAudit')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_AUDIT' } }) }:null"
+        :row-selection="$hasPermissions('B_sparePartsBatchAudit')?{ columnWidth: '4%', getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_AUDIT' } }) }:null"
         @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
@@ -222,13 +223,16 @@ export default {
 	      { title: '入库数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
 	      // { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
 	      { title: '入库类型', dataIndex: 'sparePartsTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-	      { title: '入库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+	      // { title: '入库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '关联单号', dataIndex: 'relationNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
 	      { title: '金蝶单号', dataIndex: 'kingdeeNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
 	      { title: '状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
 	      { title: '备注', dataIndex: 'remark', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
 	      { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
 	    ]
+      if (this.isShowWarehouse) {
+        arr.splice(6, 0, { title: '入库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
 	    if (this.$hasPermissions('M_bulkWarehousingOrderList_costPrice')) { //  成本价权限
 	      arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
 	    }

+ 8 - 16
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -265,13 +265,14 @@ export default {
       const _this = this
       warehouseCascadeList({}).then(res => {
         if (res.status == 200) {
-          res.data.filter(item => {
-            // 过滤默认仓库
-            if (item.defaultFlag == 1) { //  defaultFlag为1是默认仓库
-              _this.defaultWarehouseCascade[0] = item.warehouseSn
-              // 过滤默认仓位
-              item.warehouseLocationList.filter(subItem => {
-                if (subItem.defaultFlag == 1) {
+          this.warehouseCascadeData = res.data.find(item => _this.defWarehouse && item.warehouseSn == _this.defWarehouse.warehouseSn)
+          this.defaultWarehouseCascade[0] = this.defWarehouse.warehouseSn
+          this.warehouseCascadeData.map(item => {
+            item.sn = item.warehouseSn
+            if (item.warehouseLocationList) {
+              item.warehouseLocationList.map(subItem => {
+                subItem.sn = subItem.warehouseLocationSn
+                if(subItem.defaultFlag == 1){
                   _this.defaultWarehouseCascade[1] = subItem.warehouseLocationSn
                   _this.form.warehouse = _this.defaultWarehouseCascade
                   _this.form.warehouseSn = _this.defaultWarehouseCascade[0] || undefined
@@ -282,15 +283,6 @@ export default {
               })
             }
           })
-          res.data.map(item => {
-            item.sn = item.warehouseSn
-            if (item.warehouseLocationList) {
-              item.warehouseLocationList.map(subItem => {
-                subItem.sn = subItem.warehouseLocationSn
-              })
-            }
-          })
-          this.warehouseCascadeData = res.data
         } else {
           this.warehouseCascadeData = []
         }

+ 5 - 2
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -31,10 +31,11 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="6" :sm="24" v-if="isShowWarehouse">
                 <a-form-item label="退货仓库">
                   <warehouse
                     v-model="queryParam.warehouseSn"
+                    isPermission
                     id="purchaseReturn-warehouseSn"
                     placeholder="请选择退货仓库"
                   />
@@ -219,12 +220,14 @@ export default {
         { title: '采购退货单号', scopedSlots: { customRender: 'sparePartsReturnNo' }, width: '9%', align: 'center' },
         { title: '供应商名称', dataIndex: 'supplier.supplierName', align: 'center', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货原因', dataIndex: 'returnReasonDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '退货仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
+      if(this.isShowWarehouse){
+        arr.splice(5,0,{ title: '退货仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },)
+      }
       if (this.$hasPermissions('M_purchaseReturnList_costPrice')) { //  售价权限
         arr.splice(7, 0, { title: '退货金额', dataIndex: 'totalCost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }