工地直转输入小数
This commit is contained in:
		
							parent
							
								
									b48471f9d7
								
							
						
					
					
						commit
						9d0e1d5842
					
				| 
						 | 
					@ -295,10 +295,10 @@
 | 
				
			||||||
                        v-model="scope.row.directNum"
 | 
					                        v-model="scope.row.directNum"
 | 
				
			||||||
                        :value="scope.row.directNum || ''"
 | 
					                        :value="scope.row.directNum || ''"
 | 
				
			||||||
                        controls-position="right"
 | 
					                        controls-position="right"
 | 
				
			||||||
                        :precision="0"
 | 
					                        :precision="scope.row.unitValue == 1 ? 3 : 0"
 | 
				
			||||||
                         style="width: 100%"
 | 
					                         style="width: 100%"
 | 
				
			||||||
                        :disabled="isDetail || !scope.row.isActive"
 | 
					                        :disabled="isDetail || !scope.row.isActive"
 | 
				
			||||||
                        :min="1"
 | 
					                        :min="scope.row.unitValue == 1 ? 0.001 : 1"
 | 
				
			||||||
                        @change="directNumChange(scope.row)"
 | 
					                        @change="directNumChange(scope.row)"
 | 
				
			||||||
                    ></el-input-number>
 | 
					                    ></el-input-number>
 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
| 
						 | 
					@ -915,6 +915,11 @@ export default {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 数量变更
 | 
					        // 数量变更
 | 
				
			||||||
        directNumChange(row) {
 | 
					        directNumChange(row) {
 | 
				
			||||||
 | 
					            if (row.unitValue == 1) {
 | 
				
			||||||
 | 
					                row.directNum = Number(String(row.directNum).replace(/[^\d.]/g, ''))
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                row.directNum = Number(String(row.directNum).replace(/[^\d]/g, ''))
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            if (row.directNum > row.useNum) {
 | 
					            if (row.directNum > row.useNum) {
 | 
				
			||||||
                this.$message.error('直转数量不能大于领料数量')
 | 
					                this.$message.error('直转数量不能大于领料数量')
 | 
				
			||||||
                this.$nextTick(() => {
 | 
					                this.$nextTick(() => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue