Parcourir la source

出库计算逻辑修改

asd26269546 il y a 2 ans
Parent
commit
e33f4cb72e
1 fichiers modifiés avec 12 ajouts et 1 suppressions
  1. 12 1
      src/components/my-modal-form/my-modal-material.vue

+ 12 - 1
src/components/my-modal-form/my-modal-material.vue

@@ -102,6 +102,7 @@ import MyTable from '@/components/my-table/my-table'
 import MyNumberBoardInput from '@/components/my-number-board-input/my-number-board-input'
 import axios from 'axios'
 import { json } from 'body-parser'
+import { versions } from 'process'
 
 export default {
   name: 'material_maintenance',
@@ -349,7 +350,7 @@ export default {
 
         v.restrictedPickingData = res.data.data
         this.dataCopy = JSON.parse(JSON.stringify(this.data))
-        console.log(this.dataCopy)
+        console.log(v.restrictedPickingData)
       })
     },
     handlePageChange () {
@@ -426,6 +427,16 @@ export default {
     cfm () {
       // this.$refs.table.clear()
       // this.modal = false
+      for (let i = 0; i < this.restrictedPickingData.length; i++) {
+        const element = this.restrictedPickingData[i];
+        const msg = element.quantity.split(",")
+        element.quantity = 0
+        for (let j = 0; j < msg.length; j++) {
+          const jelement = msg[j];
+          element.quantity += jelement * 1
+        }
+        element.quantity = element.quantity + ''
+      }
       this.$emit('getselectedList', this.handleData,this.restrictedPickingData)
       console.log(this.handleData)
     },