Browse Source

处理出入库权限

yangg 1 year ago
parent
commit
439ec39275

+ 2 - 2
manager-admin/src/views/stock/goodsExchange/goodsExchange.vue

@@ -67,10 +67,10 @@
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-btns">
           <el-button size="mini" v-if="
-            checkPermission(['querOutIn:query']) && activeName == 'second'
+            checkPermission(['addInventory']) && activeName == 'second'
           " type="primary" @click="handleAddGoodsExchange">新增入库</el-button>
           <el-button size="mini" v-if="
-            checkPermission(['querOutIn:query']) && activeName == 'first'
+            checkPermission(['goodsExchangeAdd']) && activeName == 'first'
           " type="primary" @click="handleShiftGoodsExchange">新增出库</el-button>
           <!-- <el-button
             v-if="checkPermission(['goodsExchange:del'])"

+ 2 - 2
manager-admin/src/views/stock/goodsExchange/goodsExchangeAdd.vue

@@ -708,7 +708,7 @@ export default {
           }
           if (params.type == 'OTHER_OUT' || params.type == 'BORROW_OUT') {
             const isStockSufficient = params.product_list.map((el) => {
-              if (el.out_num < el.usable_stock) {
+              if (el.out_num > el.usable_stock) {
                 this.$message.error("该商品库存不足!");
                 return false
               }
@@ -777,7 +777,7 @@ export default {
           }
           if (params.type == 'OTHER_OUT' || params.type == 'BORROW_OUT') {
             const isStockSufficient = params.product_list.map((el) => {
-              if (el.out_num < el.usable_stock) {
+              if (el.out_num > el.usable_stock) {
                 this.$message.error("该商品库存不足!");
                 return false
               }