ccjgmwz %!s(int64=3) %!d(string=hai) anos
pai
achega
288abc302c

+ 14 - 13
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -684,7 +684,7 @@
           if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
           if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
           let _tobeVal1 = _val1 % point
           let _tobeVal1 = _val1 % point
           if (type == 'waterBase') {
           if (type == 'waterBase') {
-            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum && _tobeVal1 == 0) {
+            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum ) {
               return false
               return false
             }
             }
           }
           }
@@ -701,10 +701,10 @@
           }
           }
           return true
           return true
         }
         }
-        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterBase))) {
             .baseInfoForm.waterBase))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
-            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.5整除!');
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
+            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.1整除!');
           } else {
           } else {
             this.$message.error('基准水分不能为空!');
             this.$message.error('基准水分不能为空!');
           }
           }
@@ -731,13 +731,13 @@
           return false
           return false
         }
         }
 
 
-        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterMin))) {
             .baseInfoForm.waterMin))) {
           if (this.baseInfoForm.waterMin == '') {
           if (this.baseInfoForm.waterMin == '') {
             this.$message.error('干粮水分不能为空!')
             this.$message.error('干粮水分不能为空!')
           }
           }
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
-            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.5整除!')
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
+            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.1整除!')
           }
           }
           return false
           return false
         }
         }
@@ -751,10 +751,10 @@
           return false
           return false
         }
         }
 
 
-        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterMax))) {
             .baseInfoForm.waterMax))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
-            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.5整除!');
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
+            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.1整除!');
           } else {
           } else {
             this.$message.error('水分上限不能为空!');
             this.$message.error('水分上限不能为空!');
           }
           }
@@ -812,7 +812,7 @@
                 return false
                 return false
               }
               }
             } else {
             } else {
-              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.5, 'waterBase', parseFloat(_item1.water))) {
+              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.1, 'waterBase', parseFloat(_item1.water))) {
                 if (_item1.water == '') {
                 if (_item1.water == '') {
                   that.$message.error('分界水分不能为空!')
                   that.$message.error('分界水分不能为空!')
                 } else {
                 } else {
@@ -853,6 +853,7 @@
           isValidate = this.validate()
           isValidate = this.validate()
          
          
         if (isValidate) {
         if (isValidate) {
+          debugger
           this.makeTableList()
           this.makeTableList()
           this.baseInfoForm.details = []
           this.baseInfoForm.details = []
           this.makePriceDataList()
           this.makePriceDataList()
@@ -936,7 +937,7 @@
         let _obj = {}
         let _obj = {}
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
         let _waterMax = parseFloat(this.baseInfoForm.waterBase)
         let _waterMax = parseFloat(this.baseInfoForm.waterBase)
-        let _count = (_waterMax - _waterMin) / 0.1 
+        let _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0)) 
         if(this.baseInfoForm.paramType == '2'){
         if(this.baseInfoForm.paramType == '2'){
           for (let i = 0; i < _count; i++) {
           for (let i = 0; i < _count; i++) {
             // if (i == 0) {
             // if (i == 0) {
@@ -961,7 +962,7 @@
           _obj = {}
           _obj = {}
           _waterMin = parseFloat(this.baseInfoForm.waterBase)
           _waterMin = parseFloat(this.baseInfoForm.waterBase)
           _waterMax = parseFloat(this.baseInfoForm.waterMax)
           _waterMax = parseFloat(this.baseInfoForm.waterMax)
-          _count = (_waterMax - _waterMin) / 0.1
+          _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0))
           for (let i = 0; i < _count; i++) {
           for (let i = 0; i < _count; i++) {
             // if (i == 0) {
             // if (i == 0) {
             //   _waterMin += 0.4
             //   _waterMin += 0.4

+ 33 - 3
src/views/houseSelfCollect/inspectInfo.vue

@@ -74,7 +74,7 @@
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.tidalGrainPrice" placeholder="请输入净重单价" maxlength="10" size="small" :disabled="disabled2" />
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.tidalGrainPrice" placeholder="请输入净重单价" maxlength="10" size="small" :disabled="disabled2" />
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="干粮单价(元/公斤)" span="1" prop="dryGrainPrice" v-if="inspect.type == '干粮'">
             <ws-form-item label="干粮单价(元/公斤)" span="1" prop="dryGrainPrice" v-if="inspect.type == '干粮'">
-              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价" maxlength="10" size="small"  :disabled="disabled" />
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价" maxlength="10" size="small"  :disabled="disabled2" />
             </ws-form-item>
             </ws-form-item>
           </ws-info-table>
           </ws-info-table>
 
 
@@ -423,7 +423,7 @@
             })
             })
             return
             return
           }
           }
-           if(this.inspect.dryGrainPrice < 0 || this.inspect.dryGrainPrice > 1000){
+           if(this.inspect.dryGrainPrice <= 0 || this.inspect.dryGrainPrice > 1000){
             this.$message({
             this.$message({
               message:'干粮价格输入错误',
               message:'干粮价格输入错误',
               type:'warning'
               type:'warning'
@@ -440,6 +440,22 @@
           return
           return
         }
         }
         }
         }
+        else{
+          if(!this.inspect.tidalGrainPrice){
+            this.$message({
+              message:'净重单价不能为空',
+              type:'warning'
+            })
+            return
+          }
+           if(this.inspect.tidalGrainPrice <= 0 || this.inspect.tidalGrainPrice > 1000){
+            this.$message({
+              message:'净重单价输入错误',
+              type:'warning'
+            })
+            return
+          }
+        }
         if (!this.inspect.grade) {
         if (!this.inspect.grade) {
           this.$message({
           this.$message({
             message: '等级不能为空',
             message: '等级不能为空',
@@ -769,7 +785,21 @@
               if(this.inspect.paramType == '1'){
               if(this.inspect.paramType == '1'){
                 this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect.buckleMiscellaneous)/100*parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
                 this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect.buckleMiscellaneous)/100*parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
               }else{
               }else{
-                this.inspect.tidalGrainPrice = response
+                if(this.inspect.type=='干粮'){
+                  if(response == 0){
+                    getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
+                      .toPromise()
+                      .then((response) => { 
+                        this.$set(this.inspect,'dryGrainPrice',response)
+                      })
+                  }
+                  else{
+                    this.inspect.dryGrainPrice = response
+                  }
+                }
+                else{
+                  this.inspect.tidalGrainPrice = response
+                }
               }
               }
             })
             })
         }
         }

+ 12 - 4
src/views/houseSelfCollect/inspectionManagement.vue

@@ -158,7 +158,8 @@
 				isShowPrint: false,
 				isShowPrint: false,
 				printData: {},
 				printData: {},
 				deductWeight: '', //扣重比
 				deductWeight: '', //扣重比
-				saleLimit: ''
+				saleLimit: '',
+				allowEdit:'0'
 			}
 			}
 		},
 		},
 		activated() {
 		activated() {
@@ -195,7 +196,8 @@
 						id: row.id,
 						id: row.id,
 						warehouseName: this.warehouseName,
 						warehouseName: this.warehouseName,
 						count: this.warehouseCount,
 						count: this.warehouseCount,
-						warehouseNo: this.warehouseNo
+						warehouseNo: this.warehouseNo,
+						allowEdit:this.allowEdit
 					},
 					},
 				})
 				})
 			},
 			},
@@ -207,6 +209,7 @@
 						this.warehouseCount = this.warehouseList[i].count
 						this.warehouseCount = this.warehouseList[i].count
 						this.warehouseNo = this.warehouseList[i].No
 						this.warehouseNo = this.warehouseList[i].No
 						this.cangid = this.warehouseList[i].id
 						this.cangid = this.warehouseList[i].id
+						this.allowEdit = this.warehouseList[i].allowEdit
 						this.WAREHOUSE[1].payname = this.warehouseList[i].value
 						this.WAREHOUSE[1].payname = this.warehouseList[i].value
 					}
 					}
 				}
 				}
@@ -269,28 +272,33 @@
 								this.warehouseName = _wareHouse.value
 								this.warehouseName = _wareHouse.value
 								this.warehouseNo = _wareHouse.No
 								this.warehouseNo = _wareHouse.No
 								this.warehouseCount = _wareHouse.count
 								this.warehouseCount = _wareHouse.count
+								this.allowEdit = _wareHouse.allowEdit
 							} 
 							} 
 						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.warehouseCount = response[i].count
 								this.warehouseCount = response[i].count
+								this.allowEdit = response[i].allowEdit
 							}
 							}
 							this.warehouseList.push({
 							this.warehouseList.push({
 								value: response[i].warehouseName,
 								value: response[i].warehouseName,
 								id: response[i].id,
 								id: response[i].id,
 								count: response[i].count,
 								count: response[i].count,
-								No: response[i].commonWarehouseNo
+								No: response[i].commonWarehouseNo,
+								allowEdit:response[i].allowEdit
 							})
 							})
 							if (!_wareHouse) {
 							if (!_wareHouse) {
-									if (this.cangid && this.cangid == response[i].id) {
+								if (this.cangid && this.cangid == response[i].id) {
 									this.warehouseName = response[i].warehouseName
 									this.warehouseName = response[i].warehouseName
 									this.warehouseCount = response[i].count
 									this.warehouseCount = response[i].count
 									this.warehouseNo = response[i].commonWarehouseNo
 									this.warehouseNo = response[i].commonWarehouseNo
+									this.allowEdit =  response[i].allowEdit
 								}
 								}
 								if (this.warehouseList.length > 0 && !this.cangid) {
 								if (this.warehouseList.length > 0 && !this.cangid) {
 									this.warehouseName = this.warehouseList[0].value
 									this.warehouseName = this.warehouseList[0].value
 									this.warehouseCount = this.warehouseList[0].count
 									this.warehouseCount = this.warehouseList[0].count
 									this.warehouseNo = this.warehouseList[0].No
 									this.warehouseNo = this.warehouseList[0].No
 									this.cangid = this.warehouseList[0].id
 									this.cangid = this.warehouseList[0].id
+									this.allowEdit = this.warehouseList[0].allowEdit
 									this.WAREHOUSE[1].payname = this.warehouseList[0].value
 									this.WAREHOUSE[1].payname = this.warehouseList[0].value
 								}
 								}
 							}
 							}