chenrui hace 3 años
padre
commit
dd08a8879e
Se han modificado 1 ficheros con 8 adiciones y 2 borrados
  1. 8 2
      src/views/salesManagement/salesReturn/queryPart.vue

+ 8 - 2
src/views/salesManagement/salesReturn/queryPart.vue

@@ -166,7 +166,10 @@ export default {
         ]
         if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
           arr.splice(4, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-          arr.splice(7, 0, { title: '采购价', dataIndex: 'showCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+        if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+          const ind = this.$hasPermissions('B_isShowPrice') ? 7 : 6
+          arr.splice(ind, 0, { title: '采购价', dataIndex: 'showCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         }
         this.columns = arr
       } else {
@@ -182,7 +185,10 @@ export default {
         ]
         if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
           arr.splice(3, 0, { title: '当前售价', dataIndex: 'productPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-          arr.splice(5, 0, { title: '采购价', dataIndex: 'lastStockCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+        if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+          const ind = this.$hasPermissions('B_isShowPrice') ? 5 : 4
+          arr.splice(ind, 0, { title: '采购价', dataIndex: 'lastStockCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         }
         this.columns = arr
       }