Browse Source

修改bug

chenrui 2 years ago
parent
commit
54fd9aac22

+ 10 - 10
src/store/modules/app.js

@@ -30,18 +30,18 @@ const app = {
     isNewTab: false,
     isNewSubTab: false,
     updateList: false,
-    winHeight: 0 ,//  窗口高度
+    winHeight: 0, //  窗口高度
     loadingStatus: false,
     closeTabPages: [], // 已关闭的页面
     employeeList: [], // 申请人列表
     returnReason: [], // 申请退货原因列表
     tempBillOfData: null, // 临时存储收货单数据
     authMenusList: [], // 权限菜单数据
-    priceAuthOptions:[], // 价格权限选项
+    priceAuthOptions: [], // 价格权限选项
     curActionPermission: '', // 当前激活状态的权限码
     showPdfPrintView: false, // pdf 打印预览
     pdfUrl: '',
-    isWarehouse:false,//仓库管理权限
+    isWarehouse: false// 仓库管理权限
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {
@@ -98,10 +98,10 @@ const app = {
     SET_loadingStatus: (state, val) => {
       state.loadingStatus = val
     },
-    SET_employeeList:(state, val) => {
+    SET_employeeList: (state, val) => {
       state.employeeList = val
     },
-    SET_returnReason:(state, val) => {
+    SET_returnReason: (state, val) => {
       state.returnReason = val
     },
     SET_showPdfPrint: (state, val) => {
@@ -109,7 +109,7 @@ const app = {
     },
     SET_PdfUrl: (state, val) => {
       state.pdfUrl = val
-    },
+    }
   },
   actions: {
     setSidebar ({ commit }, type) {
@@ -154,7 +154,7 @@ const app = {
     SetWinHeight ({ commit }, val) {
       commit('SET_WIN_HEIGHT', val)
     },
-    GetEmployeeList({ commit }, val) {
+    GetEmployeeList ({ commit }, val) {
       employeeQueryList({}).then(res => {
         if (res.status == 200) {
           commit('SET_employeeList', res.data)
@@ -163,7 +163,7 @@ const app = {
         }
       })
     },
-    getReturnReasonData({ commit }, code) {
+    getReturnReasonData ({ commit }, code) {
       getLookUpData({
         pageNo: 1,
         pageSize: 1000,
@@ -172,11 +172,11 @@ const app = {
       }).then(res => {
         if (res.status == 200) {
           commit('SET_returnReason', res.data.list)
-        }else{
+        } else {
           commit('SET_returnReason', [])
         }
       })
-    },
+    }
   }
 }
 

+ 1 - 1
src/views/common/chooseWarehouse.js

@@ -73,7 +73,7 @@ const warehouse = {
       ajaxName({}).then(res => {
         if (res.status == 200) {
           if (res.data && res.data.length <= 1) {
-
+            this.$store.state.app.isWarehouse = true
           }
           this.warehouseData = res.data
         } else {

+ 9 - 3
src/views/salesManagement/examineVerify/list.vue

@@ -63,7 +63,7 @@
                   <Area id="examineVerifyList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="6" :sm="24" v-if="!isShowWarehouse">
                 <a-form-model-item label="仓库">
                   <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
                 </a-form-model-item>
@@ -239,6 +239,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -248,7 +251,6 @@ export default {
         { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
         { title: '出库单号', dataIndex: 'stockOutNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'buyerName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouse', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '售价', dataIndex: 'totalAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '备货时间', dataIndex: 'stockUpDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -257,7 +259,11 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('M_examineVerifyList_salesPrice')) { //  售价权限
-        arr.splice(8, 0, { title: '售价', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(!this.isShowWarehouse ? 9 : 8, 0, { title: '售价', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+      }
+      // 仓库管理权限设置是否显示 (当客户有且只有一条仓库管理权限时,不显示仓库信息)
+      if (!this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouse', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true })
       }
       return arr
     }

+ 9 - 3
src/views/salesManagement/matchSendOutOrder/list.vue

@@ -81,8 +81,8 @@
                   </a-form-model-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
-                  <a-form-model-item label="仓库">
-                    <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                  <a-form-model-item label="仓库" v-if="!isShowWarehouse">
+                    <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
                   </a-form-model-item>
                 </a-col>
               </template>
@@ -216,6 +216,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -224,7 +227,7 @@ export default {
         { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
         { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouse', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouse', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -239,6 +242,9 @@ export default {
       if (this.$hasPermissions('M_matchSendOutOrderList_salesPrice')) { //  售价权限
         arr.splice(9, 0, { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
+      if (!this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouse', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       return arr
     }
   },

+ 9 - 3
src/views/salesManagement/outboundOrder/list.vue

@@ -70,8 +70,8 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="仓库">
-                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                <a-form-model-item label="仓库" v-if="!isShowWarehouse">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -244,6 +244,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -252,7 +255,7 @@ export default {
         { title: '业务单号', dataIndex: 'outBizNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'demanderName', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouse', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouse', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '售价', dataIndex: 'productTotalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '出库时间', dataIndex: 'outTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -263,6 +266,9 @@ export default {
       if (this.$hasPermissions('M_outboundOrderList_salesPrice')) { //  售价权限
         arr.splice(7, 0, { title: '售价', dataIndex: 'productTotalPrice', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
+      if (!this.isShowWarehouse) {
+        arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouse', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       return arr
     }
   },

+ 9 - 3
src/views/salesManagement/receiptPrint/list.vue

@@ -53,8 +53,8 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="仓库">
-                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                <a-form-model-item label="仓库" v-if="!isShowWarehouse">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
               <a-col :md="currentTab==2?4:24" :sm="24">
@@ -205,6 +205,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -212,7 +215,7 @@ export default {
         { title: '收款单号', dataIndex: 'bookNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款日期', dataIndex: 'receiptDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'payerName', align: 'left', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouse', align: 'left', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouse', align: 'left', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单金额', dataIndex: 'orderAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '收款金额', dataIndex: 'receiptAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
@@ -226,6 +229,9 @@ export default {
         { title: '打印次数', dataIndex: 'printNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
+      if (!this.isShowWarehouse) {
+        arr.splice(5, 0, { title: '仓库', dataIndex: 'warehouse', align: 'left', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       return arr
     }
   },

+ 9 - 3
src/views/salesManagement/sendOutOrder/list.vue

@@ -64,8 +64,8 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="仓库">
-                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                <a-form-model-item label="仓库" v-if="!isShowWarehouse">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -218,6 +218,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const _this = this
       const arr = [
@@ -228,7 +231,7 @@ export default {
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '地区', dataIndex: 'provinceName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'customeName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouse', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        // { title: '仓库', dataIndex: 'warehouse', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '托运日期', dataIndex: 'sendDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收货人', dataIndex: 'customerCacateName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '物流电话', dataIndex: 'transportTele', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -242,6 +245,9 @@ export default {
         { title: '备注', dataIndex: 'transportRemark', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      if (!this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouse', width: '10%', align: 'left', customRender: function (text) { return text || '--' } })
+      }
       return arr
     }
   },

+ 9 - 3
src/views/salesManagement/stockPrint/list.vue

@@ -83,9 +83,9 @@
                     <Area id="stockPrint-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                   </a-form-model-item>
                 </a-col>
-                <a-col :md="6" :sm="24">
+                <a-col :md="6" :sm="24" v-if="!isShowWarehouse">
                   <a-form-model-item label="仓库">
-                    <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                    <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
                   </a-form-model-item>
                 </a-col>
               </template>
@@ -268,6 +268,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
@@ -277,7 +280,7 @@ export default {
         { title: '发货编号', dataIndex: 'sendNo', width: '50px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '80px', align: 'center', ellipsis: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '100px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -292,6 +295,9 @@ export default {
         { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center', fixed: 'right' }
       ]
+      if (!this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouseName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       if (this.$hasPermissions('M_stockPrintList_salesPrice')) { //  售价权限
         arr.splice(9, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
         arr.splice(10, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })