Browse Source

bug修复

chenrui 4 years ago
parent
commit
eb724d6b39
1 changed files with 21 additions and 1 deletions
  1. 21 1
      src/views/salesManagement/outboundOrder/list.vue

+ 21 - 1
src/views/salesManagement/outboundOrder/list.vue

@@ -90,9 +90,11 @@
           <a-button
             size="small"
             type="link"
+            v-if="detailPermissions(record)"
             class="button-success"
             @click="handleDetail(record)"
             id="outboundOrderList-detail-btn">详情</a-button>
+          <span v-if="!(record.state=='WAIT'&&$hasPermissions('B_outboundOut')) && !(detailPermissions(record))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -171,6 +173,24 @@ export default {
     }
   },
   methods: {
+    detailPermissions (row) {
+      let state = false
+      //  根据出库类型和对应功能权限 判断是否有查看详情的权限
+      if ((row.outBizType == 'PURCHASE_RETURN') && this.$hasPermissions('B_purchaseReturnDetail')) { // 采购退货
+        state = true
+      } else if ((row.outBizType == 'SALES') && this.$hasPermissions('B_salesDetail')) { // 销售
+        state = true
+      } else if ((row.outBizType == 'DISPATCH_DEDUCT') && this.$hasPermissions('M_urgentDetail')) { // 急件冲减
+        state = true
+      } else if ((row.outBizType == 'SHOP_CALL_OUT') && this.$hasPermissions('B_storeCallOutDetail')) { // 店内调出
+        state = true
+      } else if ((row.outBizType == 'LINKAGE_CALL_OUT') && this.$hasPermissions('B_allocLinkageOutDetail')) { // 连锁调出
+        state = true
+      } else if ((row.outBizType == 'WAREHOUSE_CALL_OUT') && this.$hasPermissions('B_warehouseAllocationDetail')) { // 仓库调出
+        state = true
+      }
+      return state
+    },
     //  时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
@@ -199,7 +219,7 @@ export default {
       } else if (row.outBizType == 'SPARE_PARTS_RETURN') { // 散件退货
         this.$message.warning('该出库类型对应页面未开发')
         // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
-      } else if (row.outBizType == 'SALES') { // 出库
+      } else if (row.outBizType == 'SALES') { // 销售
         this.$router.push({ path: `/salesManagement/salesQuery/detail/${row.outBizSn}` })
       } else if (row.outBizType == 'DISPATCH_DEDUCT') { // 急件冲减
         this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.outBizSn}` })