预出库修改
This commit is contained in:
		
							parent
							
								
									1613cf86b9
								
							
						
					
					
						commit
						fe36a85935
					
				| 
						 | 
				
			
			@ -649,8 +649,8 @@
 | 
			
		|||
            </el-row>
 | 
			
		||||
            <el-table v-loading="loading" :data="outNumList" height="500">
 | 
			
		||||
                <el-table-column label="序号" align="center" type="index" />
 | 
			
		||||
                <el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
 | 
			
		||||
                <el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
 | 
			
		||||
                <el-table-column label="设备类型" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
 | 
			
		||||
                <el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true" />
 | 
			
		||||
                <el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
 | 
			
		||||
                <el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
 | 
			
		||||
                <el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
 | 
			
		||||
| 
						 | 
				
			
			@ -1362,11 +1362,6 @@ export default {
 | 
			
		|||
        //输入预出库数量
 | 
			
		||||
        async checkPreNum(row) {
 | 
			
		||||
            console.log('🚀 ~ checkPreNum ~ row:', row)
 | 
			
		||||
            if (row.preNum > row.storageNum) {
 | 
			
		||||
                row.preNum = row.outNum
 | 
			
		||||
                this.$message.error('预出库数量不能大于库存数量')
 | 
			
		||||
                return
 | 
			
		||||
            }
 | 
			
		||||
            let minNum = row.alNum
 | 
			
		||||
            if (row.unitValue == 1) {
 | 
			
		||||
                row.preNum = Number(String(row.preNum).replace(/[^\d.]/g, ''))
 | 
			
		||||
| 
						 | 
				
			
			@ -1377,6 +1372,17 @@ export default {
 | 
			
		|||
                row.preNum = 0
 | 
			
		||||
                return
 | 
			
		||||
            }
 | 
			
		||||
            if (row.preNum > row.storageNum) {
 | 
			
		||||
                row.preNum = row.outNum
 | 
			
		||||
                this.$message.error('预出库数量不能大于库存数量')
 | 
			
		||||
                return
 | 
			
		||||
            }
 | 
			
		||||
            // publishTask - 领用申请不能大于发布数
 | 
			
		||||
            if (row.preNum > row.outNum && row.publishTask) {
 | 
			
		||||
                row.preNum = row.outNum
 | 
			
		||||
                this.$message.error('预出库数量不能大于待出库存数量')
 | 
			
		||||
                return
 | 
			
		||||
            }
 | 
			
		||||
            if (row.preNum < row.alNum) {
 | 
			
		||||
                row.preNum = minNum
 | 
			
		||||
                this.$message.error('预出库数量不能小于已出库数量')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue