Jelajahi Sumber

成本价、售价 权限添加

chenrui 3 tahun lalu
induk
melakukan
c3b377a0b4

+ 12 - 5
src/views/allocationManagement/transferOut/detail.vue

@@ -64,7 +64,7 @@
           <div slot="message">
             总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
             <span v-if="$hasPermissions('B_isShowCost')">总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong> ,</span>
-            总售价(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
+            <span v-if="$hasPermissions('B_isShowPrice')">总售价(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong></span>
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -135,14 +135,21 @@ export default {
         { title: '产品名称', dataIndex: 'productEntity.name', width: '27%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出数量', dataIndex: 'qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售价小计(¥)', dataIndex: 'totalPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        // { title: '成本价', dataIndex: 'cost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调出数量', dataIndex: 'qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        // { title: '成本小计(¥)', dataIndex: 'totalCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '售价小计(¥)', dataIndex: 'totalPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
-      if (this.$hasPermissions('B_isShowCost')) {
+      if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
         arr.splice(5, 0, { title: '成本价', dataIndex: 'cost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         arr.splice(8, 0, { title: '成本小计(¥)', dataIndex: 'totalCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        const ind = this.$hasPermissions('B_isShowCost') ? 6 : 5
+        arr.splice(ind, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(ind + 3, 0, { title: '售价小计(¥)', dataIndex: 'totalPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
       return arr
     }
   },

+ 15 - 5
src/views/allocationManagement/transferOut/edit.vue

@@ -115,7 +115,7 @@
               <div slot="message">
                 总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
                 <span v-if="$hasPermissions('B_isShowCost')">总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong> ,</span>
-                总售价(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
+                <span v-if="$hasPermissions('B_isShowPrice')">总售价(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong></span>
               </div>
             </a-alert>
             <!-- 筛选条件 -->
@@ -304,14 +304,19 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '售价', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productUnit', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action1' }, width: '10%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowCost')) {
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
         arr.splice(4, 0, { title: '成本价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        const ind = this.$hasPermissions('B_isShowCost') ? 5 : 4
+        arr.splice(ind, 0, { title: '售价', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
       return arr
     },
     chooseColumns () {
@@ -320,15 +325,20 @@ export default {
         { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', scopedSlots: { customRender: 'price' }, width: '10%', align: 'center' },
+        // { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '售价', scopedSlots: { customRender: 'price' }, width: '10%', align: 'center' },
         { title: '库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowCost')) {
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
         arr.splice(4, 0, { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        const ind = this.$hasPermissions('B_isShowCost') ? 5 : 4
+        arr.splice(ind, 0, { title: '售价', scopedSlots: { customRender: 'price' }, width: '10%', align: 'center' })
+      }
       return arr
     }
   },

+ 7 - 2
src/views/allocationManagement/transferOut/list.vue

@@ -179,8 +179,9 @@ export default {
         { title: '起止时间', scopedSlots: { customRender: 'promoDate' }, align: 'center', width: '8%' },
         { title: '调往对象', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'allocateTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -188,9 +189,13 @@ export default {
         { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowCost')) {
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
         arr.splice(6, 0, { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        const ind = this.$hasPermissions('B_isShowCost') ? 8 : 7
+        arr.splice(ind, 0, { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
       return arr
     }
   },

+ 6 - 6
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -87,16 +87,16 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '10%',align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center',width: '31%', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode',width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', width: '31%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库时间', dataIndex: 'putTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName',width: '6%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue',width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '6%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'currentQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
-      if (this.$hasPermissions('B_isShowCost')) {
+      if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
         arr.splice(9, 0, { title: '成本单价', dataIndex: 'putCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr

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

@@ -207,7 +207,7 @@ export default {
         { title: '可用库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowCost')) {
+      if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
         arr.splice(7, 0, { title: '可用库存成本', dataIndex: 'currentStockCost', width: '10%', align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr

+ 7 - 3
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -181,12 +181,16 @@ export default {
         { title: '仓库', dataIndex: 'warehouseName', width: '4%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '4%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', scopedSlots: { customRender: 'qty' }, width: '4%', align: 'center' },
-        { title: '出入库状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总售价', dataIndex: 'totalPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '出入库状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
+        // { title: '总成本', dataIndex: 'totalCost', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '总售价', dataIndex: 'totalPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
-      if (this.$hasPermissions('B_isShowCost')) {
+      if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
         arr.splice(13, 0, { title: '总成本', dataIndex: 'totalCost', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
+      if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
+        arr.splice(arr.length, 0, { title: '总售价', dataIndex: 'totalPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
       return arr
     }
   },

+ 56 - 49
src/views/productManagement/priceChangeRecord/list.vue

@@ -69,7 +69,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1810, y: tableHeight }"
+        :scroll="{ x: 1520, y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
@@ -140,80 +140,87 @@ export default {
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
       ], //  变更时间
       exportLoading: false, // 导出loading
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
-        { title: '变更时间', dataIndex: 'updateDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        {
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
+          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.total = data.count || 0
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0,
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [] //  分类下拉数据
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: 50, align: 'center', fixed: 'left' },
+        { title: '变更时间', dataIndex: 'updateDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'left', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' },
+        { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '变更原因', dataIndex: 'changeReason', width: 70, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(7, 0, {
           title: '省级价',
           dataIndex: 'sdtermindfaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 80, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 70, align: 'center' }
           ]
-        },
-        {
+        })
+        arr.splice(8, 0, {
           title: '市级价',
           dataIndex: 'sdterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 80, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 70, align: 'center' }
           ]
-        },
-        {
+        })
+        arr.splice(9, 0, {
           title: '特约价',
           dataIndex: 'gterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 80, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 70, align: 'center' }
           ]
-        },
-        {
+        })
+        arr.splice(10, 0, {
           title: '终端价',
           dataIndex: 'hterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 80, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 70, align: 'center' }
           ]
-        },
-        {
+        })
+        arr.splice(11, 0, {
           title: '车主价',
           dataIndex: 'sterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 80, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 70, align: 'center' }
           ]
-        },
-        { title: '变更原因', dataIndex: 'changeReason', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
-          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.total = data.count || 0
-          this.disabled = false
-          this.spinning = false
-          return data
         })
-      },
-      total: 0,
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  分类下拉数据
+      }
+      return arr
     }
   },
   methods: {

+ 10 - 19
src/views/productManagement/productUniversal/list.vue

@@ -56,7 +56,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1230, y: tableHeight }"
+        :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
@@ -112,24 +112,15 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       columns: [
-        // { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        // { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '产品名称', dataIndex: 'product.name', align: 'center', width: '24%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        // { title: '产品状态', dataIndex: 'product.stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '通用产品编码', dataIndex: 'productCommonCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '通用产品名称', dataIndex: 'productCommont.name', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        // { title: '通用产品分类', scopedSlots: { customRender: 'productType' }, width: '12%', align: 'center' },
-        // { title: '通用产品状态', dataIndex: 'productCommont.stateDictValue', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品状态', dataIndex: 'product.stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '通用产品编码', dataIndex: 'productCommonCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '通用产品名称', dataIndex: 'productCommont.name', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '通用产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
-        { title: '通用产品状态', dataIndex: 'productCommont.stateDictValue', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', align: 'center', width: '24%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品状态', dataIndex: 'product.stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用产品编码', dataIndex: 'productCommonCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用产品名称', dataIndex: 'productCommont.name', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '通用产品分类', scopedSlots: { customRender: 'productType' }, width: '12%', align: 'center' },
+        { title: '通用产品状态', dataIndex: 'productCommont.stateDictValue', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 25 - 14
src/views/promotionRulesManagement/orderStatistics/detailModal.vue

@@ -53,20 +53,6 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原价', dataIndex: 'origPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销价小计', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销类型', dataIndex: 'promotionRulesName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         return salesDetailList(Object.assign(parameter, { salesBillSn: this.itemSn, promotionFlag: 1 })).then(res => {
@@ -84,6 +70,31 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '原价', dataIndex: 'origPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '促销价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '促销价小计', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销类型', dataIndex: 'promotionRulesName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(3, 0, { title: '原价', dataIndex: 'origPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(4, 0, { title: '促销价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(7, 0, { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '促销价小计', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(9, 0, { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
 
   },

+ 28 - 19
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -55,9 +55,9 @@
       <!-- alert -->
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
-          促销品原价总额:<strong>{{ productTotal && (productTotal.totalOrigAmount || productTotal.totalOrigAmount==0) ? productTotal.totalOrigAmount : '--' }}</strong>,
-          促销品促销价总额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--' }}</strong>,
-          节省总额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,
+          <span v-if="$hasPermissions('B_isShowPrice')">促销品原价总额:<strong>{{ productTotal && (productTotal.totalOrigAmount || productTotal.totalOrigAmount==0) ? productTotal.totalOrigAmount : '--' }}</strong>,</span>
+          <span v-if="$hasPermissions('B_isShowPrice')">促销品促销价总额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--' }}</strong>,</span>
+          <span v-if="$hasPermissions('B_isShowPrice')">节省总额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,</span>
           总单数:<strong>{{ productTotal && (productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--' }}</strong>,
           总款数:<strong>{{ productTotal && (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong>,
           总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
@@ -122,22 +122,6 @@ export default {
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '促销名称', dataIndex: 'promoName', align: 'center', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '促销品款数', dataIndex: 'totalPromoCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销品数量', dataIndex: 'totalPromoQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '原价总额', dataIndex: 'promoTotal', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销品总额', dataIndex: 'totalPromoAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '节省总额', dataIndex: 'totalEconomizeAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '4%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -165,6 +149,31 @@ export default {
       productTotal: null
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '促销名称', dataIndex: 'promoName', align: 'center', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '促销品款数', dataIndex: 'totalPromoCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销品数量', dataIndex: 'totalPromoQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '原价总额', dataIndex: 'promoTotal', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '促销品总额', dataIndex: 'totalPromoAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '节省总额', dataIndex: 'totalEconomizeAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '4%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(8, 0, { title: '原价总额', dataIndex: 'promoTotal', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(9, 0, { title: '促销品总额', dataIndex: 'totalPromoAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(10, 0, { title: '节省总额', dataIndex: 'totalEconomizeAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     //  创建时间  change
     dateChange (date) {

+ 24 - 13
src/views/promotionRulesManagement/productStatistics/detailModal.vue

@@ -55,19 +55,6 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', width: '26%', customRender: function (text) { return text || '--' } },
-        { title: '原价', dataIndex: 'origPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销价小计', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销类型', dataIndex: 'promotionRulesName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         return salesDetailPromoProductList(Object.assign(parameter, { productSn: this.itemSn, promotionFlag: 1 })).then(res => {
@@ -85,6 +72,30 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', width: '26%', customRender: function (text) { return text || '--' } },
+        // { title: '原价', dataIndex: 'origPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '促销价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '促销价小计', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销类型', dataIndex: 'promotionRulesName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(2, 0, { title: '原价', dataIndex: 'origPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(3, 0, { title: '促销价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(6, 0, { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(7, 0, { title: '促销价小计', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
 
   },

+ 19 - 11
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -55,7 +55,7 @@
       <!-- alert -->
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
-          节省总金额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,
+          <span v-if="$hasPermissions('B_isShowPrice')">节省总金额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,</span>
           总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
         </div>
       </a-alert>
@@ -121,16 +121,6 @@ export default {
         getDate.getCurrMonthDays().endtime
       ],
       disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', width: '28%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -155,6 +145,24 @@ export default {
       productTotal: null
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', width: '28%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(6, 0, { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     //  时间  change
     dateChange (date) {

+ 18 - 11
src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue

@@ -32,7 +32,7 @@
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
           入库数量 <strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
-          入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
+          <span v-if="$hasPermissions('B_isShowCost')">入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong></span>
         </div>
       </a-alert>
       <!-- 列表 -->
@@ -72,16 +72,6 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName',width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'unit',width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库单价', dataIndex: 'productCost',width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '小计', dataIndex: 'subtotal',width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         return sparePartsDetailList(Object.assign(parameter, { sparePartsSn: this.itemSn })).then(res => {
@@ -99,6 +89,23 @@ export default {
       productTotal: null //  合计
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName',width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'unit',width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '入库单价', dataIndex: 'productCost',width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '小计', dataIndex: 'subtotal',width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+        arr.splice(5, 0, { title: '入库单价', dataIndex: 'productCost',width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     //  返回列表
     handleBack () {

+ 19 - 12
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -33,7 +33,7 @@
         <a-alert type="info" v-if="productTotal" style="margin-bottom:10px">
           <div slot="message">
             入库数量 <strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
-            入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
+            <span v-if="$hasPermissions('B_isShowCost')">入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong></span>
           </div>
         </a-alert>
         <!-- 筛选条件 -->
@@ -116,17 +116,6 @@ export default {
         productCode: '',
         productName: ''
       },
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '小计', dataIndex: 'subtotal', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         return sparePartsDetailList(Object.assign(parameter, this.queryParam, { sparePartsSn: this.$route.params.sn })).then(res => {
@@ -148,6 +137,24 @@ export default {
       openGuideModal: false //  导入产品引导
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '小计', dataIndex: 'subtotal', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+        arr.splice(5, 0, { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     //  添加/编辑
     handleEdit (row) {

+ 19 - 14
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -120,20 +120,6 @@ export default {
         relationNo: '',
         state: undefined
       },
-      // 表头
-      columns: [
-        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: '15%', align: 'center' },
-        { title: '商户名称', dataIndex: 'supplierName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { 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: 'relationNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '金蝶单号', dataIndex: 'kingdeeNo', width: '12.5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'remark', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
-      ],
       selectedRowKeys: [], // Check here to configure the default column
       selectedRows: [],
       loading: false,
@@ -157,6 +143,25 @@ export default {
     }
   },
   computed: {
+	  columns () {
+	    const arr = [
+	      { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: '15%', align: 'center' },
+	      { title: '商户名称', dataIndex: 'supplierName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
+	      { 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: 'relationNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '金蝶单号', dataIndex: 'kingdeeNo', width: '12.5%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '备注', dataIndex: 'remark', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+	      { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
+	    ]
+	    if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+	      arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+	    }
+	    return arr
+	  },
     hasSelected () {
       return this.selectedRowKeys.length > 0
     },

+ 18 - 10
src/views/supplierManagement/associatedProduct/add.vue

@@ -131,16 +131,6 @@ export default {
         }
       },
       productType: [],
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品品牌', dataIndex: 'product.productBrandName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '15%', align: 'center' },
-        { title: '产品名称', dataIndex: 'product.name', align: 'center', width: '25%', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'product.origCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -161,6 +151,24 @@ export default {
       openGuideModal: false //  导入产品引导
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品品牌', dataIndex: 'product.productBrandName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '15%', align: 'center' },
+        { title: '产品名称', dataIndex: 'product.name', align: 'center', width: '25%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'product.origCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+        arr.splice(6, 0, { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 返回
     handleBack () {

+ 18 - 10
src/views/supplierManagement/associatedProductDetails/list.vue

@@ -90,16 +90,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       productType: [],
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '供应商名称', dataIndex: 'supplierName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'product.productBrandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '18%', align: 'center' },
-        { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价(¥)', dataIndex: 'cost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '原厂编码', dataIndex: 'product.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -117,6 +107,24 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '供应商名称', dataIndex: 'supplierName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'product.productBrandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '18%', align: 'center' },
+        { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '成本价(¥)', dataIndex: 'cost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '原厂编码', dataIndex: 'product.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+        arr.splice(6, 0, { title: '成本价(¥)', dataIndex: 'cost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     //  重置
     resetSearchForm () {