Browse Source

加权限

1004749546@qq.com 3 years ago
parent
commit
676f258562

+ 1 - 1
src/views/allocationManagement/transferOut/detail.vue

@@ -14,7 +14,7 @@
             @click.stop="handleEdit">编辑</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra">
+        <template v-if="$hasPermissions('B_transferOut_print')" slot="extra">
           <a-button key="2" id="allocateBillDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
           <a-button key="1" type="primary" id="allocateBillDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
         </template>

+ 1 - 1
src/views/allocationManagement/transferOut/edit.vue

@@ -8,7 +8,7 @@
           <span style="margin: 0 15px;color: #666;">调往对象:{{ $route.params.name || '--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra">
+        <template v-if="$hasPermissions('B_transferOut_print')" slot="extra">
           <a-button key="2" id="allocateBillEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
           <a-button key="1" type="primary" id="allocateBillEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
         </template>

+ 19 - 8
src/views/allocationManagement/transferOut/list.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card size="small" :bordered="false" class="allocateBillList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      
+
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
@@ -63,7 +63,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="allocateBillList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
+        <a-button v-if="$hasPermissions('B_transferOut_add')" id="allocateBillList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -77,7 +77,7 @@
         bordered>
         <!-- 单号 -->
         <template slot="allocateNo" slot-scope="text, record">
-          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+          <span :class="$hasPermissions('M_transferOut_detail')?'active':'common'" @click="handleDetail(record)">{{ record.allocateNo }}</span>
         </template>
         <!-- 财务状态 -->
         <template slot="settleState" slot-scope="text, record">
@@ -88,25 +88,25 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'WAIT_AUDIT'"
+            v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_transferOut_audit')"
             class="button-warning"
             @click="handleExamine(record)"
             id="allocateBillList-examine-btn">审核</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')"
+            v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')) && $hasPermissions('M_transferOut_edit')"
             class="button-info"
             @click="handleEdit(record)"
             id="allocateBillList-edit-btn">编辑</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')"
+            v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')) && $hasPermissions('B_transferOut_del')"
             class="button-error"
             @click="handleDel(record)"
             id="allocateBillList-del-btn">删除</a-button>
-          <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'AUDIT_REJECT')">--</span>
+          <span v-if="((record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'AUDIT_REJECT'))||(!$hasPermissions('B_transferOut_audit') && !$hasPermissions('M_transferOut_edit') && !$hasPermissions('B_transferOut_del'))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -245,7 +245,9 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.allocateSn}` })
+      if (this.$hasPermissions('M_transferOut_detail')) {
+        this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.allocateSn}` })
+      }
     },
     //  编辑
     handleEdit (row) {
@@ -293,3 +295,12 @@ export default {
   }
 }
 </script>
+<style lang="less">
+	.active{
+		color: #ed1c24;
+		cursor: pointer;
+	}
+	.common{
+		color: #000;
+	}
+</style>

+ 14 - 5
src/views/financialManagement/financialCollection/list.vue

@@ -1,6 +1,6 @@
 <template>
   <a-card size="small" :bordered="false" class="financialCollectionList-wrap">
-	  <a-spin :spinning="spinning" tip="Loading...">
+    <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
@@ -125,14 +125,14 @@
         bordered>
         <!-- 单号 -->
         <template slot="salesBillNo" slot-scope="text, record">
-          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+          <span :class="$hasPermissions('B_salesDetail')?'active':'common'" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
             size="small"
             type="link"
-            v-if="record.financialStatus=='WAIT'"
+            v-if="record.financialStatus=='WAIT' && $hasPermissions('B_financialCollection_receipt')"
             class="button-warning"
             @click="handleAudit(record)"
             id="financialCollectionList-audit-btn">收款</a-button>
@@ -250,7 +250,9 @@ export default {
     },
     // 详情
     handleDetail (row) {
-      this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
+      if (this.$hasPermissions('B_salesDetail')) {
+        this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
+      }
     },
     // 收款
     handleAudit (row) {
@@ -266,7 +268,7 @@ export default {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.spinning = false
-            }else{
+            } else {
               _this.spinning = false
             }
           })
@@ -329,5 +331,12 @@ export default {
     .sTable{
       margin-top: 20px;
     }
+	.active{
+		color: #ed1c24;
+		cursor: pointer;
+	}
+	.common{
+		color: #000;
+	}
   }
 </style>

+ 12 - 4
src/views/financialManagement/returnConfirmation/list.vue

@@ -1,6 +1,6 @@
 <template>
   <a-card size="small" :bordered="false" class="returnConfirmationList-wrap">
-	  <a-spin :spinning="spinning" tip="Loading...">
+    <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
@@ -67,14 +67,14 @@
         bordered>
         <!-- 销退单号 -->
         <template slot="salesReturnBillNo" slot-scope="text, record">
-          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
+          <span :class="$hasPermissions('B_returnConfirmation_detail')?'active':'common'" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
             size="small"
             type="link"
-            v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT'"
+            v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT' && $hasPermissions('B_returnConfirmation_return')"
             class="button-warning"
             @click="handleAudit(record)"
             id="returnConfirmationList-audit-btn">退货确认</a-button>
@@ -165,6 +165,7 @@ export default {
     },
     // 详情
     handleDetail (row) {
+      if (!this.$hasPermissions('B_returnConfirmation_detail')) { return }
       this.itemSn = row.salesReturnBillSn
       this.openModal = true
     },
@@ -201,7 +202,7 @@ export default {
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
           _this.spinning = false
-        }else{
+        } else {
           _this.spinning = false
         }
       })
@@ -215,5 +216,12 @@ export default {
     .sTable{
       margin-top: 20px;
     }
+	.active{
+		color: #ed1c24;
+		cursor: pointer;
+	}
+	.common{
+		color: #000;
+	}
   }
 </style>

+ 38 - 25
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -1,6 +1,6 @@
 <template>
   <a-card size="small" :bordered="false" class="warehousingConfirmationList-wrap">
-	  <a-spin :spinning="spinning" tip="Loading...">
+    <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
@@ -29,7 +29,7 @@
         </a-form>
       </div>
       <!-- 列表 -->
-      <div style="margin-bottom: 15px">
+      <div v-if="$hasPermissions('B_warehousingConfirmationpl')" style="margin-bottom: 15px">
         <a-button type="primary" id="warehousingConfirmationList-export" :loading="loading" @click="handleBatchAudit">批量确认</a-button>
         <span style="margin-left: 8px">
           <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
@@ -47,14 +47,14 @@
         bordered>
         <!-- 入库单号 -->
         <template slot="stockPutNo" slot-scope="text, record">
-          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.stockPutNo }}</span>
+          <span :class="$hasPermissions('B_warehousingConfirmationDetail')?'active':'common'" @click="handleDetail(record)">{{ record.stockPutNo }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
             size="small"
             type="link"
-            v-if="record.auditState=='WAIT'"
+            v-if="record.auditState=='WAIT' && $hasPermissions('B_warehousingConfirmationAlone')"
             class="button-warning"
             @click="handleAudit(record)"
             id="warehousingConfirmationList-audit-btn">入库确认</a-button>
@@ -142,17 +142,21 @@ export default {
       return this.selectedRowKeys.length > 0
     },
     rowSelection () {
-      return {
-        selectedRowKeys: this.selectedRowKeys,
-        onChange: (selectedRowKeys, selectedRows) => {
-          console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-          this.onSelectChange(selectedRowKeys)
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.auditState != 'WAIT'
-          }
-        })
+      if (this.$hasPermissions('B_warehousingConfirmationpl')) {
+        return {
+			  selectedRowKeys: this.selectedRowKeys,
+			  onChange: (selectedRowKeys, selectedRows) => {
+			    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
+			    this.onSelectChange(selectedRowKeys)
+			  },
+			  getCheckboxProps: record => ({
+			    props: {
+			      disabled: record.auditState != 'WAIT'
+			    }
+			  })
+        }
+      } else {
+        return null
       }
     }
   },
@@ -165,9 +169,11 @@ export default {
     },
     // 详情
     handleDetail (row) {
-      this.itemSn = row.stockPutSn
-      this.nowData = row
-      this.openModal = true
+      if (this.$hasPermissions('B_warehousingConfirmationDetail')) {
+        this.itemSn = row.stockPutSn
+        this.nowData = row
+        this.openModal = true
+      }
     },
     closeModal () {
       this.itemSn = ''
@@ -175,18 +181,18 @@ export default {
       this.openModal = false
     },
     // 通过
-    handleConfirmationOk(){
-      if(this.isBatch){  //  批量
+    handleConfirmationOk () {
+      if (this.isBatch) { //  批量
         this.auditOrder(this.selectedRowKeys, true)
-      }else{
+      } else {
         this.auditOrder([this.confirmationInfo.stockPutSn], true)
       }
     },
     // 不通过
-    handleConfirmationFail(){
-      if(this.isBatch){  //  批量
+    handleConfirmationFail () {
+      if (this.isBatch) { //  批量
         this.auditOrder(this.selectedRowKeys, false)
-      }else{
+      } else {
         this.auditOrder([this.confirmationInfo.stockPutSn], false)
       }
     },
@@ -215,7 +221,7 @@ export default {
           _this.$refs.table.refresh()
           _this.confirmationModal = false
           _this.spinning = false
-        }else{
+        } else {
           _this.confirmationModal = false
           _this.spinning = false
         }
@@ -245,6 +251,13 @@ export default {
       margin-top: 20px;
     }
   }
+	.active{
+		color: #ed1c24;
+		cursor: pointer;
+	}
+	.common{
+		color: #000;
+	}
   .confirmation-modal{
     .ant-modal-body{
       padding: 32px 32px 24px;

+ 2 - 0
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -77,9 +77,11 @@
         <a-button
           size="small"
           type="link"
+          v-if="$hasPermissions('B_orderStatistics_detail')"
           @click="handleDetail(record)"
           class="button-success"
           id="orderStatisticsList-edit-btn">详情</a-button>
+        <span v-else>--</span>
       </template>
     </s-table>
     <!-- 详情 -->

+ 2 - 0
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -82,9 +82,11 @@
         <a-button
           size="small"
           type="link"
+          v-if="$hasPermissions('B_productStatistics_detail')"
           class="button-success"
           @click="handleDetail(record)"
           id="productStatisticsList-detail-btn">详情</a-button>
+        <span v-else>--</span>
       </template>
     </s-table>
     <!-- 详情 -->

+ 22 - 16
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -26,8 +26,9 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+        <a-button v-if="$hasPermissions('B_sparePartsNew')" id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
         <a-button
+          v-if="$hasPermissions('B_sparePartsAudit')"
           id="bulkWarehousingOrderList-batchAudit"
           type="primary"
           class="button-warning"
@@ -51,7 +52,7 @@
         bordered>
         <!-- 入库单号 -->
         <template slot="sparePartsNo" slot-scope="text, record">
-          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsNo }}</span>
+          <span :class="$hasPermissions('B_sparePartsDetail')?'active':'common'" @click="handleDetail(record)">{{ record.sparePartsNo }}</span>
         </template>
         <!-- 财务状态 -->
         <template slot="settleState" slot-scope="text, record">
@@ -62,18 +63,18 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'WAIT_AUDIT'"
+            v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_sparePartsEdit')"
             @click="handleEdit(record)"
             class="button-info"
             id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'WAIT_AUDIT'"
+            v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_sparePartsDel')"
             @click="handleDel(record)"
             class="button-error"
             id="bulkWarehousingOrderList-del-btn">删除</a-button>
-          <span v-if="record.state != 'WAIT_AUDIT'">--</span>
+          <span v-if="record.state != 'WAIT_AUDIT'||(!$hasPermissions('B_sparePartsEdit') && !$hasPermissions('B_sparePartsDel'))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -143,17 +144,21 @@ export default {
       return this.selectedRowKeys.length > 0
     },
     rowSelection () {
-      return {
-        selectedRowKeys: this.selectedRowKeys,
-        onChange: (selectedRowKeys, selectedRows) => {
-          console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-          this.onSelectChange(selectedRowKeys)
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.state != 'WAIT_AUDIT'
-          }
-        })
+      if (this.$hasPermissions('B_sparePartsAudit')) {
+        return {
+			  selectedRowKeys: this.selectedRowKeys,
+			  onChange: (selectedRowKeys, selectedRows) => {
+			    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
+			    this.onSelectChange(selectedRowKeys)
+			  },
+			  getCheckboxProps: record => ({
+			    props: {
+			      disabled: record.state != 'WAIT_AUDIT'
+			    }
+			  })
+        }
+      } else {
+        return null
       }
     }
   },
@@ -176,6 +181,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
+      if (!this.$hasPermissions('B_sparePartsDetail')) { return }
       this.itemSn = row.sparePartsSn
       this.openDetailModal = true
     },