Browse Source

退库入库退货库存增加限制

Epans 2 years ago
parent
commit
272e703198

+ 13 - 1
src/views/custom/retreat/index.vue

@@ -782,7 +782,19 @@ export default {
   computed: {
 
   },
-
+  watch: {
+    listAdd: {
+      deep: true,
+      handler: function (item) {
+          this.listAdd.forEach(function(i){
+            if(parseInt(i.quitNumber) > (parseInt(i.checkoutNumber)-parseInt(i.quitNumberC))){
+              i.quitNumber = parseInt(i.checkoutNumber)-parseInt(i.quitNumberC)
+            }
+                
+          })  
+      }
+    },
+  },
   created() {
     const that = this
     GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {

+ 20 - 0
src/views/custom/returngoods/index.vue

@@ -828,6 +828,26 @@ export default {
 
   },
 
+  watch: {
+ 
+    listAdd: {
+      deep: true,
+      handler: function (item) {
+   
+          this.listAdd.forEach(function(i){
+            if(parseInt(i.refundNumber) > parseInt(i.reportery)){
+              i.refundNumber = i.reportery
+            }
+               
+          })
+
+           
+      }
+    },
+ 
+  },
+
+
   created() {
     const that = this
     GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {

+ 13 - 0
src/views/custom/storage/index.vue

@@ -959,6 +959,19 @@ export default {
       return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
     }
   },
+  watch: {
+    listAdd: {
+      deep: true,
+      handler: function (item) {
+          this.listAdd.forEach(function(i){
+            if(parseInt(i.reportery) > (parseInt(i.amount)-parseInt(i.receiveAmount))){
+              i.reportery = parseInt(i.amount)-parseInt(i.receiveAmount)
+            }
+                
+          })  
+      }
+    },
+  },
 
   created() {
     this.getDownList()