소스 검색

报表页面价格权限控制

zhangdan 3 년 전
부모
커밋
5b3f53ebea

+ 36 - 28
src/views/reportData/salesReturnReport/list.vue

@@ -124,7 +124,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
-                <a-col span="6">实售退货合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
+                <a-col span="6" v-if="$hasPermissions('B_isShowPrice')">实售退货合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
               </a-row>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -173,7 +173,34 @@ export default {
       addrProvinceList: [], //  省下拉
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
       addrDistrictList: [], //  区下拉
-      columns: [
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 380
+        }
+        const params = Object.assign(parameter, this.queryParam) //  无分页
+        delete params.time
+        return salesReportReturnRebateList(params).then(res => {
+          this.getCount(params)
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
+      },
+      productType: [],
+      totalData: null
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
         { title: '区域', dataIndex: 'dealer.subareaNameSet', width: 120, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
         { title: '区域', dataIndex: 'dealer.subareaNameSet', width: 120, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
         { title: '省份', dataIndex: 'dealer.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'dealer.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealer.dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealer.dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -344,32 +371,13 @@ export default {
               width: 80,
               width: 80,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
             }
-          ] },
-        { title: '实售退货合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
-        const params = Object.assign(parameter, this.queryParam) //  无分页
-        delete params.time
-        return salesReportReturnRebateList(params).then(res => {
-          this.getCount(params)
-          const data = res.data
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          this.disabled = false
-          this.spinning = false
-          return data
-        })
-      },
-      productType: [],
-      totalData: null
+          ] }
+        // { title: '实售退货合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(6, 0, { title: '实售退货合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } })
+      }
+      return arr
     }
     }
   },
   },
   methods: {
   methods: {

+ 37 - 23
src/views/reportData/salesReturnsReport/list.vue

@@ -114,19 +114,19 @@
             <a-col :md="4" :sm="24">
             <a-col :md="4" :sm="24">
               总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
               总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
             </a-col>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">
               开单退货金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}
               开单退货金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}
             </a-col>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">
               实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount : '--' }}
               实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount : '--' }}
             </a-col>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">
               经销商金额:{{ (totalData && (totalData.totalWholesalePrice2 || totalData.totalWholesalePrice2==0)) ? totalData.totalWholesalePrice2 : '--' }}
               经销商金额:{{ (totalData && (totalData.totalWholesalePrice2 || totalData.totalWholesalePrice2==0)) ? totalData.totalWholesalePrice2 : '--' }}
             </a-col>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">
               服务中心金额:{{ (totalData && (totalData.totalWholesalePrice1 || totalData.totalWholesalePrice1==0)) ? totalData.totalWholesalePrice1 : '--' }}
               服务中心金额:{{ (totalData && (totalData.totalWholesalePrice1 || totalData.totalWholesalePrice1==0)) ? totalData.totalWholesalePrice1 : '--' }}
             </a-col>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">
               特约加盟店金额:{{ (totalData && (totalData.totalWholesalePrice3 || totalData.totalWholesalePrice3==0)) ? totalData.totalWholesalePrice3 : '--' }}
               特约加盟店金额:{{ (totalData && (totalData.totalWholesalePrice3 || totalData.totalWholesalePrice3==0)) ? totalData.totalWholesalePrice3 : '--' }}
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -172,24 +172,6 @@ export default {
         'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
         'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '退货单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealerName', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '退货数量', dataIndex: 'totalQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '开单退货金额', dataIndex: 'totalAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '经销商价', dataIndex: 'totalWholesalePrice2', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '服务中心价', dataIndex: 'totalWholesalePrice1', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '特约加盟店价', dataIndex: 'totalWholesalePrice3', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实售退货金额', dataIndex: 'totalRealAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '直接差价', dataIndex: 'totalDirectRebate', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '间接差价', dataIndex: 'totalIndirectRebate', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '坏件数量', dataIndex: 'totalBadQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作员', dataIndex: 'operatorName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
-      ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
@@ -214,6 +196,38 @@ export default {
       addrDistrictList: [] //  区下拉
       addrDistrictList: [] //  区下拉
     }
     }
   },
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '退货单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '退货数量', dataIndex: 'totalQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '开单退货金额', dataIndex: 'totalAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '经销商价', dataIndex: 'totalWholesalePrice2', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '服务中心价', dataIndex: 'totalWholesalePrice1', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '特约加盟店价', dataIndex: 'totalWholesalePrice3', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '实售退货金额', dataIndex: 'totalRealAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '直接差价', dataIndex: 'totalDirectRebate', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '间接差价', dataIndex: 'totalIndirectRebate', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '坏件数量', dataIndex: 'totalBadQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作员', dataIndex: 'operatorName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(7, 0, { title: '开单退货金额', dataIndex: 'totalAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '经销商价', dataIndex: 'totalWholesalePrice2', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(9, 0, { title: '服务中心价', dataIndex: 'totalWholesalePrice1', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(10, 0, { title: '特约加盟店价', dataIndex: 'totalWholesalePrice3', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(11, 0, { title: '实售退货金额', dataIndex: 'totalRealAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(12, 0, { title: '直接差价', dataIndex: 'totalDirectRebate', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(13, 0, { title: '间接差价', dataIndex: 'totalIndirectRebate', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
   methods: {
     //  导出
     //  导出
     handleExport () {
     handleExport () {

+ 37 - 29
src/views/reportData/salesSlipReport/list.vue

@@ -129,7 +129,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
-                <a-col span="6">开单销售单合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
+                <a-col span="6" v-if="$hasPermissions('B_isShowPrice')">开单销售单合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
               </a-row>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -178,7 +178,35 @@ export default {
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       exportLoading: false,
-      columns: [
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 380
+        }
+        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
+        return salesBillReportList(paramsPage).then(res => {
+          this.getCount(paramsPage)
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
+      },
+      totalData: null,
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [] //  区下拉
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
         { title: '区域', dataIndex: 'dealer.subareaNameSet', width: 120, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
         { title: '区域', dataIndex: 'dealer.subareaNameSet', width: 120, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
         { title: '销售单号', dataIndex: 'salesBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', dataIndex: 'salesBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'dealer.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '省份', dataIndex: 'dealer.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -350,33 +378,13 @@ export default {
               width: 80,
               width: 80,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
             }
-          ] },
-        { title: '开单销售单合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
-        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
-        return salesBillReportList(paramsPage).then(res => {
-          this.getCount(paramsPage)
-          const data = res.data
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          this.disabled = false
-          this.spinning = false
-          return data
-        })
-      },
-      totalData: null,
-      addrProvinceList: [], //  省下拉
-      addrCityList: [], //  市下拉
-      addrDistrictList: [] //  区下拉
+          ] }
+        // { title: '开单销售单合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(7, 0, { title: '开单销售单合计金额', width: 90, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } })
+      }
+      return arr
     }
     }
   },
   },
   methods: {
   methods: {

+ 18 - 10
src/views/reportData/warehousingOrder/list.vue

@@ -87,7 +87,7 @@
             <a-col :md="4" :sm="24">
             <a-col :md="4" :sm="24">
               总数量:{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}
               总数量:{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}
             </a-col>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowCost')">
               总金额:{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? totalData.productTotalCost : '--' }}
               总金额:{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? totalData.productTotalCost : '--' }}
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -122,15 +122,6 @@ export default {
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       exportLoading: false,
-      columns: [
-        { title: '入库单号', dataIndex: 'stockPutNo', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库开单日期', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'supplierName', width: '22%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '入库数量', dataIndex: 'productTotalQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库金额', dataIndex: 'productTotalCost', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
@@ -152,6 +143,23 @@ export default {
       totalData: null
       totalData: null
     }
     }
   },
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '入库单号', dataIndex: 'stockPutNo', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库开单日期', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'supplierName', width: '22%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '入库数量', dataIndex: 'productTotalQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '入库金额', dataIndex: 'productTotalCost', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+        arr.splice(4, 0, { title: '入库金额', dataIndex: 'productTotalCost', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
   methods: {
     // 盘点库存日期
     // 盘点库存日期
     handleStock () {
     handleStock () {

+ 24 - 15
src/views/reportData/warehousingOrderDetail/list.vue

@@ -102,7 +102,7 @@
             <a-col :md="4" :sm="24">
             <a-col :md="4" :sm="24">
               总数量:{{ (totalData && (totalData.totalPutQty || totalData.totalPutQty==0)) ? totalData.totalPutQty : '--' }}
               总数量:{{ (totalData && (totalData.totalPutQty || totalData.totalPutQty==0)) ? totalData.totalPutQty : '--' }}
             </a-col>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowCost')">
               总金额:{{ (totalData && (totalData.totalPutAmount || totalData.totalPutAmount==0)) ? totalData.totalPutAmount : '--' }}
               总金额:{{ (totalData && (totalData.totalPutAmount || totalData.totalPutAmount==0)) ? totalData.totalPutAmount : '--' }}
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -139,20 +139,6 @@ export default {
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       exportLoading: false,
-      columns: [
-        { title: '入库单号', dataIndex: 'stockPutNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库开单日期', dataIndex: 'openBillTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'supplierName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productCode', width: '9%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库数量', dataIndex: 'putQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '进价', dataIndex: 'putCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库金额', dataIndex: 'putAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '完成日期', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
@@ -174,6 +160,29 @@ export default {
       totalData: null
       totalData: null
     }
     }
   },
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '入库单号', dataIndex: 'stockPutNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库开单日期', dataIndex: 'openBillTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'supplierName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productCode', width: '9%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库数量', dataIndex: 'putQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '进价', dataIndex: 'putCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '入库金额', dataIndex: 'putAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '完成日期', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+        arr.splice(7, 0, { title: '进价', dataIndex: 'putCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '入库金额', dataIndex: 'putAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
   methods: {
     // 盘点库存日期
     // 盘点库存日期
     handleStock () {
     handleStock () {