ccjgmwz 3 years ago
parent
commit
0c824a1f95

+ 36 - 15
src/views/warehouse/warehouseManagementGross.vue

@@ -652,6 +652,7 @@ export default {
         addressUrl:'',
         addressUrl:'',
         warehouseInOutDetail: {},
         warehouseInOutDetail: {},
         deductionAmount:0,
         deductionAmount:0,
+        deductionWeight:0,
         grossWeight:0,
         grossWeight:0,
         tare:0
         tare:0
       },
       },
@@ -891,7 +892,7 @@ export default {
       for (let i = 0; i < this.tranCarInfoList.length; i++) {
       for (let i = 0; i < this.tranCarInfoList.length; i++) {
         if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
         if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
           this.deptBudgetList.tranCarNo=this.tranCarInfoList[i].tranCarNo
           this.deptBudgetList.tranCarNo=this.tranCarInfoList[i].tranCarNo
-          this.deptBudgetList.freight = this.tranCarInfoList[i].tranPrice
+          this.deptBudgetList.freight = Math.round(this.tranCarInfoList[i].tranPrice)
         }
         }
       }
       }
     },
     },
@@ -1205,13 +1206,13 @@ export default {
       //   })
       //   })
       //   return
       //   return
       // }
       // }
-      if (!this.deptBudgetList.addressUrl) {
-        this.$message({
-          message: '附件不能为空',
-          type: 'warning',
-        })
-        return
-      }
+      // if (!this.deptBudgetList.addressUrl) {
+      //   this.$message({
+      //     message: '附件不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
       //自检员
       //自检员
       if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
       if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
         if (
         if (
@@ -1408,7 +1409,6 @@ export default {
         }
         }
       }
       }
       console.log(this.deptBudgetList, '入库对象')
       console.log(this.deptBudgetList, '入库对象')
-      this.deptBudgetList.id = this.$route.query.id
       this.$confirm(`确定提交入库信息`, {
       this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         confirmButtonText: '确定',
@@ -1422,15 +1422,36 @@ export default {
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.statusFlag = 3
               this.deptBudgetList.statusFlag = 3
-              his.deptBudgetList.grossWeight /= 1000
-                this.deptBudgetList.tare /= 1000
-                this.deptBudgetList.netWeight /= 1000
-                this.deptBudgetList.pureWeight /= 1000
-                this.deptBudgetList.deductionAmount *= 1000
-                this.deptBudgetList.deductionWeight /= 1000
+              this.deptBudgetList.grossWeight = (this.deptBudgetList.grossWeight/1000).toFixed(2)
+              this.deptBudgetList.tare = (this.deptBudgetList.tare/1000).toFixed(2)
+              this.deptBudgetList.netWeight = (this.deptBudgetList.netWeight/1000).toFixed(2)
+              if(!this.deptBudgetList.pureWeight){
+                this.deptBudgetList.pureWeight = 0
+              }
+              this.deptBudgetList.pureWeight = (this.deptBudgetList.pureWeight/1000).toFixed(2)
+              if(!this.deptBudgetList.deductionWeight){
+                this.deptBudgetList.deductionWeight = 0
+              }
+              if(!this.deptBudgetList.deductionAmount){
+                this.deptBudgetList.deductionAmount = 0
+              }
+              this.deptBudgetList.deductionWeight = (this.deptBudgetList.deductionWeight/1000).toFixed(2)
+              this.deptBudgetList.deductionAmount = Math.round(this.deptBudgetList.deductionAmount*1000)
+              
+              // this.deptBudgetList.grossWeight /= 1000
+              //   this.deptBudgetList.tare /= 1000
+              //   this.deptBudgetList.netWeight /= 1000
+              //   this.deptBudgetList.pureWeight /= 1000
+              //   this.deptBudgetList.deductionAmount *= 1000
+              //   this.deptBudgetList.deductionWeight /= 1000
               addstorageputList(this.deptBudgetList)
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .toPromise()
                 .then((response) => {
                 .then((response) => {
+                  // this.deptBudgetList.grossWeight = Math.round(this.dataList.grossWeight*1000)
+                  // this.deptBudgetList.tare = Math.round(this.dataList.tare*1000)
+                  // this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
+                  // this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
+                  // this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
                   this.$message.success('添加成功')
                   this.$message.success('添加成功')
                   this.$router.push({ path: 'warehouseManagementList' })
                   this.$router.push({ path: 'warehouseManagementList' })
                 })
                 })

+ 20 - 12
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -610,14 +610,14 @@ export default {
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.getList()
     this.getList()
     this.dataList.id = this.$route.query.id
     this.dataList.id = this.$route.query.id
-    this.dataList.grossWeight = this.$route.query.grossWeight*1000
+    this.dataList.grossWeight = Math.round(this.$route.query.grossWeight*1000)
     this.dataList.contractNo = this.$route.query.contractNo
     this.dataList.contractNo = this.$route.query.contractNo
     this.dataList.baseId = this.$route.query.baseId
     this.dataList.baseId = this.$route.query.baseId
     this.dataList.positionId = this.$route.query.positionId
     this.dataList.positionId = this.$route.query.positionId
     this.dataList.warehouseName = this.$route.query.warehouseName
     this.dataList.warehouseName = this.$route.query.warehouseName
     this.dataList.binNumber = this.$route.query.binNumber
     this.dataList.binNumber = this.$route.query.binNumber
-    this.dataList.tare = this.$route.query.tare*1000
-    this.dataList.netWeight = this.$route.query.netWeight*1000
+    this.dataList.tare = Math.round(this.$route.query.tare*1000)
+    this.dataList.netWeight = Math.round(this.$route.query.netWeight*1000)
     this.dataList.grade = this.$route.query.grade
     this.dataList.grade = this.$route.query.grade
     this.dataList.agent = this.$route.query.agent
     this.dataList.agent = this.$route.query.agent
     this.dataList.carNo = this.$route.query.carNo
     this.dataList.carNo = this.$route.query.carNo
@@ -640,9 +640,9 @@ export default {
     this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
     this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
     this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
     this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
     this.dataList.solidGrainWater=this.$route.query.solidGrainWater
     this.dataList.solidGrainWater=this.$route.query.solidGrainWater
-    this.dataList.pureWeight=this.$route.query.pureWeight*1000
+    this.dataList.pureWeight=Math.round(this.$route.query.pureWeight*1000)
     this.dataList.deductionAmount=this.$route.query.deductionAmount/1000
     this.dataList.deductionAmount=this.$route.query.deductionAmount/1000
-    this.dataList.deductionWeight=this.$route.query.deductionWeight*1000
+    this.dataList.deductionWeight=Math.round(this.$route.query.deductionWeight*1000)
     this.dataList.inOutTypeFlag=1
     this.dataList.inOutTypeFlag=1
     this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
     this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
     if(this.dataList.cost){
     if(this.dataList.cost){
@@ -1371,24 +1371,31 @@ export default {
         .then(() => {
         .then(() => {
           this.$refs.dataList.validate((valid) => {
           this.$refs.dataList.validate((valid) => {
             if (valid) {
             if (valid) {
+              debugger
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
               this.dataList.inOutFlag = 2
               this.dataList.inOutFlag = 2
               this.dataList.statusFlag = 3
               this.dataList.statusFlag = 3
-              this.dataList.grossWeight /= 1000
-              this.dataList.tare /= 1000
-              this.dataList.netWeight /= 1000
-              this.dataList.pureWeight /= 1000
+              this.dataList.grossWeight = (this.dataList.grossWeight/1000).toFixed(2)
+              this.dataList.tare = (this.dataList.tare/1000).toFixed(2)
+              this.dataList.netWeight = (this.dataList.netWeight/1000).toFixed(2)
+              this.dataList.pureWeight = (this.dataList.pureWeight/1000).toFixed(2)
               if(!this.dataList.deductionWeight){
               if(!this.dataList.deductionWeight){
                 this.dataList.deductionWeight = 0
                 this.dataList.deductionWeight = 0
               }
               }
               if(!this.dataList.deductionAmount){
               if(!this.dataList.deductionAmount){
                 this.dataList.deductionAmount = 0
                 this.dataList.deductionAmount = 0
               }
               }
-              this.dataList.deductionWeight /= 1000
-              this.dataList.deductionAmount *= 1000
+              this.dataList.deductionWeight = (this.dataList.deductionWeight/1000).toFixed(2)
+              this.dataList.deductionAmount = Math.round(this.dataList.deductionAmount*1000)
+
               addstorageputList(this.dataList)
               addstorageputList(this.dataList)
                 .toPromise()
                 .toPromise()
                 .then((response) => {
                 .then((response) => {
+                  this.dataList.grossWeight = Math.round(this.dataList.grossWeight*1000)
+                  this.dataList.tare = Math.round(this.dataList.tare*1000)
+                  this.dataList.netWeight = Math.round(this.dataList.netWeight*1000)
+                  this.dataList.pureWeight = Math.round(this.dataList.pureWeight*1000)
+                  this.dataList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
                   this.$message.success('提交成功')
                   this.$message.success('提交成功')
                   this.$confirm(`是否打印磅单`, {
                   this.$confirm(`是否打印磅单`, {
                     cancelButtonText: '取消',
                     cancelButtonText: '取消',
@@ -1403,8 +1410,9 @@ export default {
                         .then((response) => {
                         .then((response) => {
                             window.open( '../../../../static/weightCheckInOut.html?type=2&tableData=' +JSON.stringify(response))
                             window.open( '../../../../static/weightCheckInOut.html?type=2&tableData=' +JSON.stringify(response))
                         })
                         })
-                      this.$router.push({ path: 'warehouseManagementList' })
+                      
                     })
                     })
+                    this.$router.push({ path: 'warehouseManagementList' })
                     .catch(() => {
                     .catch(() => {
                       return false
                       return false
                     })
                     })

+ 3 - 3
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -521,14 +521,14 @@ export default {
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.getList()
     this.getList()
     this.dataList.id = this.$route.query.id
     this.dataList.id = this.$route.query.id
-    this.dataList.grossWeight = this.$route.query.grossWeight*1000
+    this.dataList.grossWeight = Math.round(this.$route.query.grossWeight*1000)
     this.dataList.contractNo = this.$route.query.contractNo
     this.dataList.contractNo = this.$route.query.contractNo
     this.dataList.baseId = this.$route.query.baseId
     this.dataList.baseId = this.$route.query.baseId
     this.dataList.positionId = this.$route.query.positionId
     this.dataList.positionId = this.$route.query.positionId
     this.dataList.warehouseName = this.$route.query.warehouseName
     this.dataList.warehouseName = this.$route.query.warehouseName
     this.dataList.binNumber = this.$route.query.binNumber
     this.dataList.binNumber = this.$route.query.binNumber
-    this.dataList.tare = this.$route.query.tare*1000
-    this.dataList.netWeight = this.$route.query.netWeight*1000
+    this.dataList.tare = Math.round(this.$route.query.tare*1000)
+    this.dataList.netWeight = Math.round(this.$route.query.netWeight*1000)
     this.dataList.grade = this.$route.query.grade
     this.dataList.grade = this.$route.query.grade
     this.dataList.agent = this.$route.query.agent
     this.dataList.agent = this.$route.query.agent
     this.dataList.carNo = this.$route.query.carNo
     this.dataList.carNo = this.$route.query.carNo