This commit is contained in:
		
							parent
							
								
									44a101de15
								
							
						
					
					
						commit
						2c96d3b7ac
					
				| 
						 | 
					@ -252,7 +252,19 @@
 | 
				
			||||||
                    </template>
 | 
					                    </template>
 | 
				
			||||||
                </el-table-column>
 | 
					                </el-table-column>
 | 
				
			||||||
                <el-table-column label="当前库存" align="center" prop="storageNum" :show-overflow-tooltip="true" v-if="checkShowPreButton()"/>
 | 
					                <el-table-column label="当前库存" align="center" prop="storageNum" :show-overflow-tooltip="true" v-if="checkShowPreButton()"/>
 | 
				
			||||||
                <el-table-column label="待出库库存" align="center" prop="pendingOutNum" :show-overflow-tooltip="true" v-if="checkShowPreButton()"/>
 | 
					                <!-- <el-table-column label="待出库库存" align="center" prop="pendingOutNum" :show-overflow-tooltip="true" v-if="checkShowPreButton()"/> -->
 | 
				
			||||||
 | 
					                 <el-table-column
 | 
				
			||||||
 | 
					                    prop="pendingOutNum"
 | 
				
			||||||
 | 
					                    align="center"
 | 
				
			||||||
 | 
					                    show-overflow-tooltip
 | 
				
			||||||
 | 
					                    v-if="checkShowPreButton()"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                    <template #header>
 | 
				
			||||||
 | 
					                        <el-tooltip effect="dark" content="系统内该规格总计待出库数量" placement="top">
 | 
				
			||||||
 | 
					                            <span>待出库库存<i class="el-icon-info" style="color: #409EFF" /></span>
 | 
				
			||||||
 | 
					                        </el-tooltip>
 | 
				
			||||||
 | 
					                    </template>
 | 
				
			||||||
 | 
					                </el-table-column>
 | 
				
			||||||
                <el-table-column label="待出库数量" align="center" prop="outNum" :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" />
 | 
					                <el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
 | 
				
			||||||
                <el-table-column label="操作" align="center" width="120px" v-if="checkShowRejectButton()">
 | 
					                <el-table-column label="操作" align="center" width="120px" v-if="checkShowRejectButton()">
 | 
				
			||||||
| 
						 | 
					@ -1350,12 +1362,12 @@ export default {
 | 
				
			||||||
        //输入预出库数量
 | 
					        //输入预出库数量
 | 
				
			||||||
        async checkPreNum(row) {
 | 
					        async checkPreNum(row) {
 | 
				
			||||||
            console.log('🚀 ~ checkPreNum ~ row:', row)
 | 
					            console.log('🚀 ~ checkPreNum ~ row:', row)
 | 
				
			||||||
            if (row.preNum == row.outNum) return
 | 
					            // if (row.preNum == row.outNum) return
 | 
				
			||||||
            if (row.preNum > row.outNum) {
 | 
					            // if (row.preNum > row.outNum) {
 | 
				
			||||||
                row.preNum = row.outNum
 | 
					            //     row.preNum = row.outNum
 | 
				
			||||||
                this.$message.error('预出库数量不能大于待出库数量')
 | 
					            //     this.$message.error('预出库数量不能大于待出库数量')
 | 
				
			||||||
                return
 | 
					            //     return
 | 
				
			||||||
            }
 | 
					            // }
 | 
				
			||||||
            // let maxNum = row.pendingNum-row.pendingOutNum
 | 
					            // let maxNum = row.pendingNum-row.pendingOutNum
 | 
				
			||||||
            let minNum = row.alNum
 | 
					            let minNum = row.alNum
 | 
				
			||||||
            if (row.unitValue == 1) {
 | 
					            if (row.unitValue == 1) {
 | 
				
			||||||
| 
						 | 
					@ -1372,11 +1384,11 @@ export default {
 | 
				
			||||||
                this.$message.error('预出库数量不能小于已出库数量')
 | 
					                this.$message.error('预出库数量不能小于已出库数量')
 | 
				
			||||||
                return
 | 
					                return
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (row.preNum > (row.storageNum-row.pendingOutNum)) {
 | 
					            // if (row.preNum > (row.storageNum-row.pendingOutNum)) {
 | 
				
			||||||
                // row.preNum = maxNum
 | 
					            //     // row.preNum = maxNum
 | 
				
			||||||
                this.$message.error('预出库数量不能大于可出库数量')
 | 
					            //     this.$message.error('预出库数量不能大于可出库数量')
 | 
				
			||||||
                return
 | 
					            //     return
 | 
				
			||||||
            }
 | 
					            // }
 | 
				
			||||||
            let isConfirm = false
 | 
					            let isConfirm = false
 | 
				
			||||||
            try {
 | 
					            try {
 | 
				
			||||||
                // 二次确认
 | 
					                // 二次确认
 | 
				
			||||||
| 
						 | 
					@ -1476,7 +1488,7 @@ export default {
 | 
				
			||||||
        // 检查是否显示预出库字段
 | 
					        // 检查是否显示预出库字段
 | 
				
			||||||
        checkShowPreButton() {
 | 
					        checkShowPreButton() {
 | 
				
			||||||
            // 检查列表中是否有已出库数量为0的数据
 | 
					            // 检查列表中是否有已出库数量为0的数据
 | 
				
			||||||
            return this.getListOutInfo && this.getListOutInfo.some(item => item.alNum == 0) && this.currentRowData?.status != 4
 | 
					            return this.currentRowData?.status != 4
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 处理驳回操作
 | 
					        // 处理驳回操作
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue