gjy 3 éve
szülő
commit
ac8575eb0e
1 módosított fájl, 82 hozzáadás és 23 törlés
  1. 82 23
      src/views/outboundManagement/weighingManagementNew.vue

+ 82 - 23
src/views/outboundManagement/weighingManagementNew.vue

@@ -315,6 +315,7 @@
     getstaff,
     getReceiptTaskNo,
   } from '@/model/warehouse/index'
+  import axios from 'axios'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   import inspectInfoPrint from './component/inspectInfoPrint.vue'
   import html2canvas from 'html2canvas'
@@ -366,6 +367,7 @@
         carstatus: false,
         carjudge: false,
         warehouseCount: 0,
+		warehouseCount1:0,
         warehouseNo: '',
         statusType: '3',
         warehouseType: 1,
@@ -491,6 +493,30 @@
                 .toPromise()
                 .then((response) => {
                   this.types = ''
+				  this.weighingList = {
+                            grossWeight: 0,
+                            tare: 0,
+                            tips: '',
+                            // contractNo:'',
+                            // inOutTaskNo:'',
+                            buckleMiscellaneous: 0,
+                            netWeight: 0,
+                            receivableWeighingFee: '',
+                            warehouseInOutDetail: {
+                              grade: '',
+                              imperfectGrain: '',
+                              impurity: '',
+                              jiaorenli: '',
+                              bulkDensity: '',
+                              mildewGrain: '',
+                            },
+                            qualityInspectionManagement: {
+                              boxNo: '暂无',
+                              boxNoOther: '暂无',
+                              titleNo: '暂无',
+                              titleNoOther: '暂无',
+                            },
+                          }
                   // this.inspect = []
                 })
             })
@@ -524,6 +550,30 @@
                   this.types = ''
                   // this.inspect = []
                   this.isShowPrint = false
+				  this.weighingList = {
+                            grossWeight: 0,
+                            tare: 0,
+                            tips: '',
+                            // contractNo:'',
+                            // inOutTaskNo:'',
+                            buckleMiscellaneous: 0,
+                            netWeight: 0,
+                            receivableWeighingFee: '',
+                            warehouseInOutDetail: {
+                              grade: '',
+                              imperfectGrain: '',
+                              impurity: '',
+                              jiaorenli: '',
+                              bulkDensity: '',
+                              mildewGrain: '',
+                            },
+                            qualityInspectionManagement: {
+                              boxNo: '暂无',
+                              boxNoOther: '暂无',
+                              titleNo: '暂无',
+                              titleNoOther: '暂无',
+                            },
+                          }
                 })
             })
             this.dialogTableVisible = true
@@ -779,14 +829,23 @@
             type: 'warning',
           })
           .then(() => {
+			this.weighingList.serviceManagementType=2
             this.weighingList.inOutFlag = 1
             this.weighingList.statusFlag = 3
-            this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
+			if(this.weighingList.grossWeight){
+				this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
+			}
+            
+			if(this.weighingList.netWeight){
+				this.weighingList.netWeight = this.weighingList.netWeight / 1000
+			}
             this.weighingList.tare = this.weighingList.tare / 1000
-            this.weighingList.netWeight = this.weighingList.netWeight / 1000
-            this.weighingList.buckleMiscellaneous =
-              this.weighingList.buckleMiscellaneous / 1000
+			if(this.weighingList.buckleMiscellaneous){
+				this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
+			}
             if (this.tpyeNo == 1) {
+			//  this.weighingList.serviceManagementType=2
+			 this.weighingList.statusFlag = 1
               this.weighingList.relationId = this.relationId
               this.weighingList.warehouseId = this.warehouseId
               this.weighingList.baseId = this.warehouseId
@@ -796,6 +855,7 @@
                 addstorageputList(this.weighingList)
                   .toPromise()
                   .then((response) => {
+					
                     this.weighingList.warehouseInOutId = response
                     tareEdit(this.weighingList)
                       .toPromise()
@@ -814,14 +874,9 @@
                           })
                           this.getList()
                           this.weighingList = response
-                          this.warehouseCount += 1
-                          this.weighingList.grossWeight =
-                            this.weighingList.grossWeight * 1000
+                          this.warehouseCount = Number(this.warehouseCount)+ 1
+						  this.warehouseCount1 = Number(this.warehouseCount1)+ 1
                           this.weighingList.tare = this.weighingList.tare * 1000
-                          this.weighingList.netWeight =
-                            this.weighingList.netWeight * 1000
-                          this.weighingList.buckleMiscellaneous =
-                            this.weighingList.buckleMiscellaneous * 1000
                           this.inspect = JSON.parse(
                             JSON.stringify(this.weighingLis)
                           )
@@ -857,6 +912,7 @@
                     this.$notify.warning(response)
                   })
               } else {
+				  console.log(22222)
                 this.weighingList.relationId = this.relationId
                 this.weighingList.warehouseId = this.warehouseId
                 this.weighingList.baseId = this.warehouseId
@@ -874,14 +930,9 @@
                           .toPromise()
                           .then((response) => {
                             this.weighingList = response
-                            this.warehouseCount += 1
-                            this.weighingList.grossWeight =
-                              this.weighingList.grossWeight * 1000
+                        	this.warehouseCount = Number(this.warehouseCount)+ 1
+							this.warehouseCount1 = Number(this.warehouseCount1)+ 1
                             this.weighingList.tare = this.weighingList.tare * 1000
-                            this.weighingList.netWeight =
-                              this.weighingList.netWeight * 1000
-                            this.weighingList.buckleMiscellaneous =
-                              this.weighingList.buckleMiscellaneous * 1000
                             this.inspect = JSON.parse(
                               JSON.stringify(this.weighingList)
                             )
@@ -993,7 +1044,7 @@
                         this.weighingList.netWeight * 1000
                       this.weighingList.buckleMiscellaneous =
                         this.weighingList.buckleMiscellaneous * 1000
-                        debugger
+                        // debugger
                       this.inspect = JSON.parse(JSON.stringify(this.weighingList))
                       
                       this.isShowPrint = true
@@ -1290,6 +1341,7 @@
         return date.getFullYear() + mouth + date.getDate()
       },
       contractNoChange(e) {
+		this.warehouseCount=this.warehouseCount1
         for (let i = 0; i < this.taskNolist.length; i++) {
           if (this.taskNolist[i].inOutTaskNo == e) {
             var data = this.taskNolist[i]
@@ -1315,7 +1367,7 @@
             this.weighingList.grade = this.outContractNo[i].grade
             this.weighingList.inOutType = this.outContractNo[i].inOutType
             if (this.outContractNo[i].inOutType == '销售出库') {
-              this.warehouseCount = '000' + Number(this.warehouseCount + 1)
+              this.warehouseCount = '000' +(Number(this.warehouseCount) + 1) 
               this.weighingList.number =
                 'XSCK' +
                 this.getTime() +
@@ -1335,7 +1387,7 @@
               }
               this.weighingList.inOutTypeKey = 1
             } else if (this.outContractNo[i].inOutType == '移库出库') {
-              this.warehouseCount = '000' + Number(this.warehouseCount + 1)
+              this.warehouseCount = '000' +(Number(this.warehouseCount) + 1) 
               this.weighingList.number =
                 'YKCK' +
                 this.getTime() +
@@ -1400,7 +1452,8 @@
                 this.warehouseName = response[i].warehouseName
                 this.warehouseId = response[i].id
                 this.positionInfos = response[i].positionInfos
-                this.warehouseCount = response[i].count
+                this.warehouseCount = response[i].outCount
+				this.warehouseCount1 = response[i].outCount
                 this.warehouseNo = response[i].commonWarehouseNo
                 this.warehouseType = response[i].warehouseType
                 if (response[i].allowEdit == 1) {
@@ -1413,9 +1466,15 @@
                 this.warehouseName = this.warehouseList[0].value
                 this.warehouseId = this.warehouseList[0].warehouseId
                 this.positionInfos = response[0].positionInfos
-                this.warehouseCount = response[0].count
+                this.warehouseCount = response[0].outCount
+				this.warehouseCount1 = response[i].outCount
                 this.warehouseNo = response[0].commonWarehouseNo
                 this.warehouseType = response[0].warehouseType
+				if (response[0].allowEdit == 1) {
+                  this.disabled = false
+                } else {
+                  this.disabled = true
+                }
               }
             }
             this.warehouseList1 = response