浏览代码

前端dev

gjy 3 年之前
父节点
当前提交
1a7455b6a8

+ 10 - 2
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -14,7 +14,7 @@
         <div class="row1">
         <div class="row1">
           <div class="grid-content">
           <div class="grid-content">
             <el-form-item label="货名">
             <el-form-item label="货名">
-              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit" filterable clearable>
+              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit" filterable clearable ref="elSelect">
                 <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
                 <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
                   :value="item.constValue">
                   :value="item.constValue">
                 </el-option>
                 </el-option>
@@ -380,8 +380,16 @@
           break
           break
       }
       }
     },
     },
-    mounted() {},
+    mounted() {
+         if (window.history && window.history.pushState) {
+             history.pushState(null, null, document.URL);
+             window.addEventListener("popstate", this.onCloseGoodSelect, false);
+         }
+     },
     methods: {
     methods: {
+      onCloseGoodSelect(){
+        this.$refs.elSelect.blur()
+      },
       paramTypeChange(e){
       paramTypeChange(e){
         // this.makeTableList()
         // this.makeTableList()
       },
       },

+ 60 - 25
src/views/outboundManagement/weighingManagementNew.vue

@@ -531,6 +531,10 @@
 				.toPromise()
 				.toPromise()
 				.then((response) => {
 				.then((response) => {
 					this.weighingList=response
 					this.weighingList=response
+					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.weighingList.carNo=response.qualityInspectionManagement.carNumber
 					this.weighingList.carNo=response.qualityInspectionManagement.carNumber
 					this.weighingList.boxNo=response.boxNo
 					this.weighingList.boxNo=response.boxNo
 					this.weighingList.boxNoOther=response.boxNoOther
 					this.weighingList.boxNoOther=response.boxNoOther
@@ -591,6 +595,7 @@
 					message: '删除成功!',
 					message: '删除成功!',
 					type: 'success',
 					type: 'success',
 				})
 				})
+				this.id=''
 				this.weighingList= {
 				this.weighingList= {
 					grossWeight: 0,
 					grossWeight: 0,
 					tare: 0,
 					tare: 0,
@@ -679,30 +684,33 @@
 					})
 					})
 					return
 					return
 				}
 				}
-					// if (!this.weighingList.tare) {
-					// 	this.$message({
-					// 		message: '皮重不能为空',
-					// 		type: 'warning',
-					// 	})
-					// 	return
-					// }
-					// if (
-					// 	isNaN(this.weighingList.tare) ||
-					// 	(String(this.weighingList.tare).indexOf('.') != -1 &&
-					// 		String(this.weighingList.tare).length -
-					// 		(String(this.weighingList.tare).indexOf('.') + 1) >
-					// 		1) ||
-					// 	this.weighingList.tare < 1 ||
-					// 	this.weighingList.tare > 100000
-					// ) {
-					// 	this.$message({
-					// 		message: '皮重输入错误!',
-					// 		type: 'warning',
-					// 	})
-					// 	return
-					// }
+					
+			}
+			if(this.tpyeNo==1){
+				if (!this.weighingList.tare) {
+						this.$message({
+							message: '皮重不能为空',
+							type: 'warning',
+						})
+						return
+					}
+					if (
+						isNaN(this.weighingList.tare) ||
+						(String(this.weighingList.tare).indexOf('.') != -1 &&
+							String(this.weighingList.tare).length -
+							(String(this.weighingList.tare).indexOf('.') + 1) >
+							1) ||
+						this.weighingList.tare < 1 ||
+						this.weighingList.tare > 100000
+					) {
+						this.$message({
+							message: '皮重输入错误!',
+							type: 'warning',
+						})
+						return
+					}
 			}
 			}
-			if (this.types == 1) {
+			if (this.types == 2) {
 				if (!this.weighingList.grossWeight) {
 				if (!this.weighingList.grossWeight) {
 					this.$message({
 					this.$message({
 						message: '毛重不能为空',
 						message: '毛重不能为空',
@@ -770,12 +778,13 @@
 										message: '提交成功',
 										message: '提交成功',
 									})
 									})
 									this.getList()
 									this.getList()
+									this.weighingList=response
 									this.warehouseCount+=1
 									this.warehouseCount+=1
 									this.weighingList.grossWeight=this.weighingList.grossWeight*1000
 									this.weighingList.grossWeight=this.weighingList.grossWeight*1000
 									this.weighingList.tare=this.weighingList.tare*1000
 									this.weighingList.tare=this.weighingList.tare*1000
 									this.weighingList.netWeight=this.weighingList.netWeight*1000
 									this.weighingList.netWeight=this.weighingList.netWeight*1000
 									this.weighingList.buckleMiscellaneous=this.weighingList.buckleMiscellaneous*1000
 									this.weighingList.buckleMiscellaneous=this.weighingList.buckleMiscellaneous*1000
-									this.inspect=JSON.parse(JSON.stringify(response))
+									this.inspect=JSON.parse(JSON.stringify(this.weighingLis))
 									this.isShowPrint=true
 									this.isShowPrint=true
 									this.weighingList= {
 									this.weighingList= {
 										grossWeight: 0,
 										grossWeight: 0,
@@ -822,12 +831,13 @@
 							getweighing({id:response})
 							getweighing({id:response})
 								.toPromise()
 								.toPromise()
 								.then((response) => {
 								.then((response) => {
+									this.weighingList=response
 									this.warehouseCount+=1
 									this.warehouseCount+=1
 									this.weighingList.grossWeight=this.weighingList.grossWeight*1000
 									this.weighingList.grossWeight=this.weighingList.grossWeight*1000
 									this.weighingList.tare=this.weighingList.tare*1000
 									this.weighingList.tare=this.weighingList.tare*1000
 									this.weighingList.netWeight=this.weighingList.netWeight*1000
 									this.weighingList.netWeight=this.weighingList.netWeight*1000
 									this.weighingList.buckleMiscellaneous=this.weighingList.buckleMiscellaneous*1000
 									this.weighingList.buckleMiscellaneous=this.weighingList.buckleMiscellaneous*1000
-									this.inspect=JSON.parse(JSON.stringify(response))
+									this.inspect=JSON.parse(JSON.stringify(this.weighingList))
 									this.isShowPrint=true
 									this.isShowPrint=true
 									
 									
 								})
 								})
@@ -1015,6 +1025,31 @@
 					}
 					}
 				}
 				}
 				this.getList()
 				this.getList()
+				this.weighingList= {
+					grossWeight: 0,
+					selfLoading:0,
+					tare: 0,
+					tips:'',
+					// contractNo:'',
+					// inOutTaskNo:'',
+					buckleMiscellaneous: 0,
+					netWeight: 0,
+					receivableWeighingFee: '',
+					warehouseInOutDetail: {
+						grade:'',
+						imperfectGrain:'',
+						impurity:'',
+						jiaorenli:'',
+						bulkDensity:'',
+						mildewGrain:'',
+					},
+					qualityInspectionManagement: {
+						boxNo: "暂无",
+						boxNoOther: "暂无",
+						titleNo: "暂无",
+						titleNoOther: "暂无",
+					}
+				}
 			},
 			},
 			async openPort(){
 			async openPort(){
 			 console.log('openPort', navigator)
 			 console.log('openPort', navigator)