Ver Fonte

Merge branch 'dev' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc into dev

zhongtianhaoyuan há 3 anos atrás
pai
commit
1b6edac589
1 ficheiros alterados com 126 adições e 78 exclusões
  1. 126 78
      src/views/outboundManagement/weighingManagementNew.vue

+ 126 - 78
src/views/outboundManagement/weighingManagementNew.vue

@@ -733,8 +733,7 @@
 			}
 			this.weighingList.compId=localStorage.getItem('ws-pf_compId')
 			this.weighingList.warehouseName = this.warehouseName
-			this.weighingList.warehouseType=this.warehouseType
-			this.weighingList.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
+			this.weighingList.warehouseType=this.warehouseTyp
 			this.$confirm('确定保存检斤信息?', '提示', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
@@ -751,6 +750,7 @@
 					this.weighingList.relationId = this.relationId
 					this.weighingList.warehouseId = this.warehouseId
 					this.weighingList.baseId=this.warehouseId
+					this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
 					if(this.weighingList.id){
 						tareEdit(this.weighingList)
 						.toPromise()
@@ -759,45 +759,49 @@
 							addstorageputList(this.weighingList)
 							.toPromise()
 							.then((response) => {
-								if (this.reader) {
+								
+								getweighing({id:this.weighingList.id})
+								toPromise()
+								.then((response) => {
+									if (this.reader) {
 									this.reader.cancel()
-								}
-								this.$notify.success({
-								title: '成功',
-								message: '提交成功',
-							})
-							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.isShowPrint=true
-								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.$notify.success({
+										title: '成功',
+										message: '提交成功',
+									})
+									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(response))
+									this.isShowPrint=true
+									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: "暂无",
+										}
+									}
+								})
 							})
 						})
 						.catch((response) => {})
@@ -805,58 +809,102 @@
 						this.weighingList.relationId = this.relationId
 						this.weighingList.warehouseId = this.warehouseId
 						this.weighingList.baseId=this.warehouseId
-						console.log(this.weighingList)
+						// console.log(this.weighingList)
 						tareAdd(this.weighingList)
 						.toPromise()
 						.then((response) => {
-						
+						getweighing({id:response})
+								.toPromise()
+								.then((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.inspect=JSON.parse(JSON.stringify(response))
+									this.isShowPrint=true
+									
+								})
 						addstorageputList(this.weighingList)
 						.toPromise()
 						.then((response) => {
 							if (this.reader) {
-								this.reader.cancel()
-							}
-							this.$notify.success({
-							title: '成功',
-							message: '提交成功',
-						})
-							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.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.getList()
+									this.reader.cancel()
+									}
+									this.$notify.success({
+										title: '成功',
+										message: '提交成功',
+									})
+									this.getList()
+									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: "暂无",
+										}
+									}
+						// 	if (this.reader) {
+						// 		this.reader.cancel()
+						// 	}
+						// 	this.$notify.success({
+						// 	title: '成功',
+						// 	message: '提交成功',
+						// })
+						// 	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.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: "暂无",
+						// 		}
+						// 	}
+						
 						})
 						
 					})
 					.catch((response) => {})
 					}
 				} else if (this.tpyeNo == 2) {
+					this.weighingList.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
 					this.weighingList.warehouseId = this.warehouseId
 					this.weighingList.baseId=this.warehouseId
 					grossWeight(this.weighingList)