gjy 3 سال پیش
والد
کامیت
e1e2898391
2فایلهای تغییر یافته به همراه81 افزوده شده و 17 حذف شده
  1. 42 1
      src/views/houseSelfCollect/inspectionManagementNew.vue
  2. 39 16
      src/views/outboundManagement/weighingManagementNew.vue

+ 42 - 1
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -998,6 +998,19 @@
           titleNo:'',
           titleNo:'',
           titleNoOther:'',
           titleNoOther:'',
         }
         }
+        if(this.serviceManagementType==3){
+          var count=''
+          if(this.warehouseCount.length==1){
+            count='000'+this.warehouseCount
+          }
+          if(this.warehouseCount.length==2){
+            count='00'+this.warehouseCount
+          }
+           if(this.warehouseCount.length==3){
+            count='0'+this.warehouseCount
+          }
+          this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+count
+        }
       },
       },
       statustypechangelist(status){
       statustypechangelist(status){
         this.statusType=status
         this.statusType=status
@@ -1132,6 +1145,24 @@
             })
             })
             return
             return
         }
         }
+        }
+         if(this.serviceManagementType==3){
+          
+          if (!this.deptBudgetList.customerName) {
+            this.$message({
+              message: '客户不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          
+          if (!this.outType) {
+            this.$message({
+              message: '请选择运输方式!',
+              type: 'warning',
+            })
+            return
+          }
         }
         }
         this.deptBudgetList.warehouseInOutDetail.grade=this.deptBudgetList.grade
         this.deptBudgetList.warehouseInOutDetail.grade=this.deptBudgetList.grade
         if (!this.deptBudgetList.grade) {
         if (!this.deptBudgetList.grade) {
@@ -1920,7 +1951,17 @@
       warehousetypechange(status){
       warehousetypechange(status){
         this.serviceManagementType=status
         this.serviceManagementType=status
         if(status==3){
         if(status==3){
-          this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+this.warehouseCount
+          var count=''
+          if(this.warehouseCount.length==1){
+            count='000'+this.warehouseCount
+          }
+          if(this.warehouseCount.length==2){
+            count='00'+this.warehouseCount
+          }
+           if(this.warehouseCount.length==3){
+            count='0'+this.warehouseCount
+          }
+          this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+count
         }
         }
         this.getList()
         this.getList()
       },
       },

+ 39 - 16
src/views/outboundManagement/weighingManagementNew.vue

@@ -237,8 +237,8 @@
 					<div>
 					<div>
 						<el-button v-if='tpyeNo == 1' @click='add' type="primary">新增</el-button>
 						<el-button v-if='tpyeNo == 1' @click='add' type="primary">新增</el-button>
             			<el-button v-if='tpyeNo == 1' @click='deletelist' type="danger">删除</el-button>
             			<el-button v-if='tpyeNo == 1' @click='deletelist' type="danger">删除</el-button>
-						<el-button v-if='tpyeNo == 2' @click='statustypechangelist(1)' :type="statusType==1?'primary':''">未称毛重</el-button>
-          				<el-button v-if='tpyeNo == 2' @click='statustypechangelist(2)' :type="statusType==2?'primary':''">已称毛重</el-button>
+						<el-button v-if='tpyeNo == 2' @click='statustypechangelist(5)' :type="statusType==5?'primary':''">未称毛重</el-button>
+          				<el-button v-if='tpyeNo == 2' @click='statustypechangelist(3)' :type="statusType==3?'primary':''">已称毛重</el-button>
 					</div>
 					</div>
 					<div><el-button @click='record' type="primary">记录</el-button></div>
 					<div><el-button @click='record' type="primary">记录</el-button></div>
 				</div>
 				</div>
@@ -739,6 +739,10 @@
 			.then(() => {
 			.then(() => {
 				this.weighingList.inOutFlag = 1
 				this.weighingList.inOutFlag = 1
               	this.weighingList.statusFlag = 3
               	this.weighingList.statusFlag = 3
+				this.weighingList.grossWeight=this.weighingList.grossWeight/1000
+				this.weighingList.tare=this.weighingList.tare/1000
+				this.weighingList.netWeight=this.weighingList.netWeight/1000
+				this.weighingList.buckleMiscellaneous=this.weighingList.buckleMiscellaneous/1000
 				if (this.tpyeNo == 1) {
 				if (this.tpyeNo == 1) {
 					this.weighingList.relationId = this.relationId
 					this.weighingList.relationId = this.relationId
 					this.weighingList.warehouseId = this.warehouseId
 					this.weighingList.warehouseId = this.warehouseId
@@ -759,6 +763,10 @@
 								message: '提交成功',
 								message: '提交成功',
 							})
 							})
 							this.getList()
 							this.getList()
+							this.weighingList.grossWeight=this.weighingList.grossWeight*1000
+							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))
 								this.inspect=JSON.parse(JSON.stringify(this.weighingList))
 								this.isShowPrint=true
 								this.isShowPrint=true
 								this.weighingList= {
 								this.weighingList= {
@@ -790,20 +798,29 @@
 						})
 						})
 						.catch((response) => {})
 						.catch((response) => {})
 					}else{
 					}else{
+						this.weighingList.relationId = this.relationId
+						this.weighingList.warehouseId = this.warehouseId
+						this.weighingList.baseId=this.warehouseId
+						console.log(this.weighingList)
 						tareAdd(this.weighingList)
 						tareAdd(this.weighingList)
 						.toPromise()
 						.toPromise()
 						.then((response) => {
 						.then((response) => {
-						this.$notify.success({
-							title: '成功',
-							message: '提交成功',
-						})
+						
 						addstorageputList(this.weighingList)
 						addstorageputList(this.weighingList)
 						.toPromise()
 						.toPromise()
 						.then((response) => {
 						.then((response) => {
 							if (this.reader) {
 							if (this.reader) {
 								this.reader.cancel()
 								this.reader.cancel()
 							}
 							}
+							this.$notify.success({
+							title: '成功',
+							message: '提交成功',
+						})
 							this.isShowPrint=true
 							this.isShowPrint=true
+							this.weighingList.grossWeight=this.weighingList.grossWeight*1000
+							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))
 							this.inspect=JSON.parse(JSON.stringify(this.weighingList))
 							this.weighingList= {
 							this.weighingList= {
 								grossWeight: 0,
 								grossWeight: 0,
@@ -841,20 +858,26 @@
 					grossWeight(this.weighingList)
 					grossWeight(this.weighingList)
 						.toPromise()
 						.toPromise()
 						.then((response) => {
 						.then((response) => {
-							this.$notify.success({
-								title: '成功',
-								message: '提交成功',
-							})
+							
 							addstorageputList(this.weighingList)
 							addstorageputList(this.weighingList)
 							.toPromise()
 							.toPromise()
 							.then((response) => {
 							.then((response) => {
 								if (this.reader) {
 								if (this.reader) {
 									this.reader.cancel()
 									this.reader.cancel()
 								}
 								}
+								this.$notify.success({
+								title: '成功',
+								message: '提交成功',
+							})
+							this.weighingList.grossWeight=this.weighingList.grossWeight*1000
+							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))
 								this.inspect=JSON.parse(JSON.stringify(this.weighingList))
 								this.isShowPrint=true
 								this.isShowPrint=true
 								this.weighingList= {
 								this.weighingList= {
 									grossWeight: 0,
 									grossWeight: 0,
+									selfLoading:0,
 									tare: 0,
 									tare: 0,
 									tips:'',
 									tips:'',
 										// contractNo:'',
 										// contractNo:'',
@@ -887,12 +910,12 @@
 		},
 		},
 		carNoTypeChange() {
 		carNoTypeChange() {
 			this.carjudge = !this.carjudge
 			this.carjudge = !this.carjudge
-			if (!this.carjudge) {
-			this.deptBudgetList.selfLoading = '0'
-			this.carChange1 = '手动填写'
-			} else {
-			this.deptBudgetList.selfLoading = '1'
+			if (this.carjudge) {
+			this.weighingList.selfLoading = '1'
 			this.carChange1 = '识别下拉'
 			this.carChange1 = '识别下拉'
+			} else {
+			this.weighingList.selfLoading = '0'
+			this.carChange1 = '手动填写'
 			}
 			}
 		},
 		},
 		tabClick(val){
 		tabClick(val){
@@ -1182,7 +1205,7 @@
 					for (let i = 0; i < response.length; i++) {
 					for (let i = 0; i < response.length; i++) {
 						if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
 						if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
 							this.warehouseName = response[i].warehouseName
 							this.warehouseName = response[i].warehouseName
-							this.warehouseId = response[i].warehouseId
+							this.warehouseId = response[i].id
 							this.positionInfos=response[i].positionInfos
 							this.positionInfos=response[i].positionInfos
 							this.warehouseCount = response[i].count
 							this.warehouseCount = response[i].count
 							this.warehouseNo = response[i].commonWarehouseNo
 							this.warehouseNo = response[i].commonWarehouseNo