领料出库

This commit is contained in:
bb_pan 2025-09-03 22:46:35 +08:00
parent 119de47912
commit 167590279a
1 changed files with 36 additions and 21 deletions

View File

@ -1023,6 +1023,7 @@ export default {
},
/** 出库查询列表 */
getDialogList() {
this.loadingView = true
outInfoList(this.queryOutInfo.id, {
keyWord: this.queryOutInfo.keyWord,
publishTask: this.publishTask
@ -1030,6 +1031,10 @@ export default {
this.getListOutInfo = response.data.leaseApplyDetailsList
// this.dialogTotal = response.
// this.loading = false;
}).catch((err) => {
console.log('🚀 ~ getDialogList ~ err:', err)
}).finally(() => {
this.loadingView = false
})
},
//
@ -1046,7 +1051,7 @@ export default {
/** 出库按钮操作 */
handleOut(row) {
this.currentRow = row
// console.log('🚀 ~ handleOut ~ this.currentRow:', this.currentRow)
console.log('🚀 ~ handleOut ~ this.currentRow:', this.currentRow)
this.getListOutInfo = []
const { id, publishTask } = row
this.publishTask = publishTask
@ -1071,27 +1076,28 @@ export default {
this.resetForm('codeOutForm')
this.resetForm('numOutForm')
// 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)
// 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])
this.outNumList = [obj]
},
@ -1106,16 +1112,22 @@ export default {
this.outNum = row.outNum
this.outQuery.typeId = row.typeId
this.outQuery.maStatus = 1
this.outQuery.code = this.currentRow.code
this.outObj = row
this.handleOutQuery()
},
getCodeList() {
this.loadingView = true
getDetailsByTypeId(this.outQuery).then(response => {
this.outCodeList = response.rows
if (response.total) {
this.outTotal = response.total
}
}).catch((err) => {
console.log('🚀 ~ getCodeList ~ err:', err)
}).finally(() => {
this.loadingView = false
})
},
handleOutQuery() {
@ -1137,6 +1149,9 @@ export default {
} else if (this.maCodeList.length > this.outNum) {
this.$modal.msgError('出库编码数量不可大于待出库数量!')
} else {
this.maCodeList.forEach(item => {
item.code = this.currentRow.code
})
let param = { leaseOutDetailsList: this.maCodeList }
submitOut(param).then(response => {
this.$modal.msgSuccess('出库成功')