领料出库
This commit is contained in:
		
							parent
							
								
									119de47912
								
							
						
					
					
						commit
						167590279a
					
				| 
						 | 
					@ -1023,6 +1023,7 @@ export default {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        /** 出库查询列表 */
 | 
					        /** 出库查询列表 */
 | 
				
			||||||
        getDialogList() {
 | 
					        getDialogList() {
 | 
				
			||||||
 | 
					            this.loadingView = true
 | 
				
			||||||
            outInfoList(this.queryOutInfo.id, {
 | 
					            outInfoList(this.queryOutInfo.id, {
 | 
				
			||||||
                keyWord: this.queryOutInfo.keyWord,
 | 
					                keyWord: this.queryOutInfo.keyWord,
 | 
				
			||||||
                publishTask: this.publishTask
 | 
					                publishTask: this.publishTask
 | 
				
			||||||
| 
						 | 
					@ -1030,6 +1031,10 @@ export default {
 | 
				
			||||||
                this.getListOutInfo = response.data.leaseApplyDetailsList
 | 
					                this.getListOutInfo = response.data.leaseApplyDetailsList
 | 
				
			||||||
                // this.dialogTotal = response.
 | 
					                // this.dialogTotal = response.
 | 
				
			||||||
                // this.loading = false;
 | 
					                // this.loading = false;
 | 
				
			||||||
 | 
					            }).catch((err) => {
 | 
				
			||||||
 | 
					                console.log('🚀 ~ getDialogList ~ err:', err)
 | 
				
			||||||
 | 
					            }).finally(() => {
 | 
				
			||||||
 | 
					                this.loadingView = false
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        //出库搜索按钮
 | 
					        //出库搜索按钮
 | 
				
			||||||
| 
						 | 
					@ -1046,7 +1051,7 @@ export default {
 | 
				
			||||||
        /** 出库按钮操作 */
 | 
					        /** 出库按钮操作 */
 | 
				
			||||||
        handleOut(row) {
 | 
					        handleOut(row) {
 | 
				
			||||||
            this.currentRow = row
 | 
					            this.currentRow = row
 | 
				
			||||||
            // console.log('🚀 ~ handleOut ~ this.currentRow:', this.currentRow)
 | 
					            console.log('🚀 ~ handleOut ~ this.currentRow:', this.currentRow)
 | 
				
			||||||
            this.getListOutInfo = []
 | 
					            this.getListOutInfo = []
 | 
				
			||||||
            const { id, publishTask } = row
 | 
					            const { id, publishTask } = row
 | 
				
			||||||
            this.publishTask = publishTask
 | 
					            this.publishTask = publishTask
 | 
				
			||||||
| 
						 | 
					@ -1071,27 +1076,28 @@ export default {
 | 
				
			||||||
            this.resetForm('codeOutForm')
 | 
					            this.resetForm('codeOutForm')
 | 
				
			||||||
            this.resetForm('numOutForm')
 | 
					            this.resetForm('numOutForm')
 | 
				
			||||||
            // console.log(row)
 | 
					            // console.log(row)
 | 
				
			||||||
            let obj = {}
 | 
					            let obj = {
 | 
				
			||||||
 | 
					                id: row.id,
 | 
				
			||||||
 | 
					                manageType: 1,
 | 
				
			||||||
 | 
					                maId: row.maId,
 | 
				
			||||||
 | 
					                parentId: row.parentId,
 | 
				
			||||||
 | 
					                typeName: row.typeName,
 | 
				
			||||||
 | 
					                typeModelName: row.maTypeName,
 | 
				
			||||||
 | 
					                typeId: row.typeId,
 | 
				
			||||||
 | 
					                alNum: row.alNum,      // 已出库数量
 | 
				
			||||||
 | 
					                outNum: row.outNum,    // 待出库数量
 | 
				
			||||||
 | 
					                inputNum: 1,           // 出库数量
 | 
				
			||||||
 | 
					                num: row.num,          // 库存
 | 
				
			||||||
 | 
					                unitValue: row.unitValue,
 | 
				
			||||||
 | 
					                unitName: row.unitName,
 | 
				
			||||||
 | 
					                leaseUnit: this.currentRow.leaseUnit,
 | 
				
			||||||
 | 
					                leaseUnitId: this.currentRow.leaseUnitId,
 | 
				
			||||||
 | 
					                leaseProject: this.currentRow.leaseProject,
 | 
				
			||||||
 | 
					                leaseProjectId: this.currentRow.leaseProjectId,
 | 
				
			||||||
 | 
					                taskId: this.currentRow.taskId,
 | 
				
			||||||
 | 
					                code: this.currentRow.code
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            console.log('row', row)
 | 
					            console.log('row', row)
 | 
				
			||||||
            // this.$set(obj, 'taskId', row.taskId)
 | 
					 | 
				
			||||||
            this.$set(obj, 'id', row.id)
 | 
					 | 
				
			||||||
            this.$set(obj, 'manageType', 1)
 | 
					 | 
				
			||||||
            this.$set(obj, 'maId', row.maId)
 | 
					 | 
				
			||||||
            this.$set(obj, 'parentId', row.parentId)
 | 
					 | 
				
			||||||
            this.$set(obj, 'typeName', row.typeName)
 | 
					 | 
				
			||||||
            this.$set(obj, 'typeModelName', row.maTypeName)
 | 
					 | 
				
			||||||
            this.$set(obj, 'typeId', row.typeId)
 | 
					 | 
				
			||||||
            this.$set(obj, 'alNum', row.alNum) //已出库数量
 | 
					 | 
				
			||||||
            this.$set(obj, 'outNum', row.outNum) //待出库数量
 | 
					 | 
				
			||||||
            this.$set(obj, 'inputNum', 1) //出库数量
 | 
					 | 
				
			||||||
            this.$set(obj, 'num', row.num) //库存
 | 
					 | 
				
			||||||
            this.$set(obj, 'unitValue', row.unitValue)
 | 
					 | 
				
			||||||
            this.$set(obj, 'unitName', row.unitName)
 | 
					 | 
				
			||||||
            this.$set(obj, 'leaseUnit', this.currentRow.leaseUnit)
 | 
					 | 
				
			||||||
            this.$set(obj, 'leaseUnitId', this.currentRow.leaseUnitId)
 | 
					 | 
				
			||||||
            this.$set(obj, 'leaseProject', this.currentRow.leaseProject)
 | 
					 | 
				
			||||||
            this.$set(obj, 'leaseProjectId', this.currentRow.leaseProjectId)
 | 
					 | 
				
			||||||
            this.$set(obj, 'taskId', this.currentRow.taskId)
 | 
					 | 
				
			||||||
            console.log('[obj]', [obj])
 | 
					            console.log('[obj]', [obj])
 | 
				
			||||||
            this.outNumList = [obj]
 | 
					            this.outNumList = [obj]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
| 
						 | 
					@ -1106,16 +1112,22 @@ export default {
 | 
				
			||||||
            this.outNum = row.outNum
 | 
					            this.outNum = row.outNum
 | 
				
			||||||
            this.outQuery.typeId = row.typeId
 | 
					            this.outQuery.typeId = row.typeId
 | 
				
			||||||
            this.outQuery.maStatus = 1
 | 
					            this.outQuery.maStatus = 1
 | 
				
			||||||
 | 
					            this.outQuery.code = this.currentRow.code
 | 
				
			||||||
            this.outObj = row
 | 
					            this.outObj = row
 | 
				
			||||||
            this.handleOutQuery()
 | 
					            this.handleOutQuery()
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        getCodeList() {
 | 
					        getCodeList() {
 | 
				
			||||||
 | 
					            this.loadingView = true
 | 
				
			||||||
            getDetailsByTypeId(this.outQuery).then(response => {
 | 
					            getDetailsByTypeId(this.outQuery).then(response => {
 | 
				
			||||||
                this.outCodeList = response.rows
 | 
					                this.outCodeList = response.rows
 | 
				
			||||||
                if (response.total) {
 | 
					                if (response.total) {
 | 
				
			||||||
                    this.outTotal = response.total
 | 
					                    this.outTotal = response.total
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            }).catch((err) => {
 | 
				
			||||||
 | 
					                console.log('🚀 ~ getCodeList ~ err:', err)
 | 
				
			||||||
 | 
					            }).finally(() => {
 | 
				
			||||||
 | 
					                this.loadingView = false
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        handleOutQuery() {
 | 
					        handleOutQuery() {
 | 
				
			||||||
| 
						 | 
					@ -1137,6 +1149,9 @@ export default {
 | 
				
			||||||
            } else if (this.maCodeList.length > this.outNum) {
 | 
					            } else if (this.maCodeList.length > this.outNum) {
 | 
				
			||||||
                this.$modal.msgError('出库编码数量不可大于待出库数量!')
 | 
					                this.$modal.msgError('出库编码数量不可大于待出库数量!')
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
 | 
					                this.maCodeList.forEach(item => {
 | 
				
			||||||
 | 
					                    item.code = this.currentRow.code
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
                let param = { leaseOutDetailsList: this.maCodeList }
 | 
					                let param = { leaseOutDetailsList: this.maCodeList }
 | 
				
			||||||
                submitOut(param).then(response => {
 | 
					                submitOut(param).then(response => {
 | 
				
			||||||
                    this.$modal.msgSuccess('出库成功')
 | 
					                    this.$modal.msgSuccess('出库成功')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue