This commit is contained in:
bb_pan 2025-12-18 14:39:39 +08:00
parent 2d474c91cd
commit 34af59a297
1 changed files with 63 additions and 31 deletions

View File

@ -352,7 +352,7 @@
:min="0" :min="0"
:max="row.checkNum" :max="row.checkNum"
:precision="0" :precision="0"
:disabled="!showHandle" :disabled="!showHandle || row.status == 1"
style="width: 100%" style="width: 100%"
/> />
</template> </template>
@ -529,10 +529,15 @@
prop="unitName" prop="unitName"
/> />
<el-table-column <el-table-column
label="数量" label="验收数量"
align="center" align="center"
prop="checkNum" prop="checkNum"
/> />
<el-table-column
label="入库数量"
align="center"
prop="inputNum"
/>
<el-table-column <el-table-column
label="备注" label="备注"
align="center" align="center"
@ -692,9 +697,11 @@ export default {
this.detailTableList = response.data.rows this.detailTableList = response.data.rows
this.dialogTotal = response.data.total this.dialogTotal = response.data.total
this.loading = false this.loading = false
this.detailTableList.forEach(item => { if (this.showHandle) {
item.inputNum = item.checkNum this.detailTableList.forEach(item => {
}) item.inputNum = item.inputNum ? item.inputNum : item.checkNum
})
}
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
@ -755,13 +762,13 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.showHandle = true
this.query.pageNum = 1 this.query.pageNum = 1
this.query.pageSize = 10 this.query.pageSize = 10
this.query.taskId = row.taskId this.query.taskId = row.taskId
this.query.dictName = undefined this.query.dictName = undefined
this.getDialogTable() this.getDialogTable()
this.open = true this.open = true
this.showHandle = true
this.title = '审核' this.title = '审核'
}, },
@ -775,28 +782,35 @@ export default {
this.$message.error('当前设备未编码,无法审核!') this.$message.error('当前设备未编码,无法审核!')
return return
} }
let obj = { //
taskId: this.query.taskId, this.$confirm('是否确定通过?', '提示', {
maId: row.maId, confirmButtonText: '确定',
inputNum: row.inputNum, cancelButtonText: '取消',
maCode: row.maCode, type: 'warning'
typeId: row.typeId, }).then(() => {
num: row.num, let obj = {
} taskId: this.query.taskId,
maId: row.maId,
let param = { inputNum: row.inputNum,
taskId: this.query.taskId, maCode: row.maCode,
checkResult: '1', typeId: row.typeId,
inputRecordList: [obj], num: row.num,
}
changePutinStatus(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
this.getList()
} else {
this.$modal.msgSuccess('审批失败')
} }
let param = {
taskId: this.query.taskId,
checkResult: '1',
inputRecordList: [obj],
}
changePutinStatus(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
this.getList()
} else {
this.$modal.msgSuccess('审批失败')
}
})
}) })
}, },
passAll() { passAll() {
@ -815,11 +829,16 @@ export default {
}) })
} catch (error) {} } catch (error) {}
if (isCode) return if (isCode) return
this.$confirm('是否确定通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.ids.forEach((item) => { this.ids.forEach((item) => {
item.taskId = this.query.taskId item.taskId = this.query.taskId
item.typeId = item.typeId item.typeId = item.typeId
item.maId = item.maId item.maId = item.maId
item.inputNum = item.checkNum item.inputNum = item.inputNum
item.maCode = item.maCode item.maCode = item.maCode
}) })
let param = { let param = {
@ -836,6 +855,7 @@ export default {
this.$modal.msgSuccess('审批失败') this.$modal.msgSuccess('审批失败')
} }
}) })
})
}, },
// //
refused(row) { refused(row) {
@ -846,11 +866,16 @@ export default {
this.$message.error('当前设备未编码,无法审核!') this.$message.error('当前设备未编码,无法审核!')
return return
} }
this.$confirm('是否确定不通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let obj = { let obj = {
taskId: this.query.taskId, taskId: this.query.taskId,
maId: row.maId, maId: row.maId,
maCode: row.maCode, maCode: row.maCode,
inputNum: row.checkNum, inputNum: row.inputNum,
typeId: row.typeId, typeId: row.typeId,
} }
@ -868,6 +893,7 @@ export default {
this.$modal.msgSuccess('审批失败') this.$modal.msgSuccess('审批失败')
} }
}) })
})
}, },
refusedAll() { refusedAll() {
console.log(this.query.taskId) console.log(this.query.taskId)
@ -886,11 +912,16 @@ export default {
} catch (error) {} } catch (error) {}
if (isCode) return if (isCode) return
this.$confirm('是否确定不通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.ids.forEach((item) => { this.ids.forEach((item) => {
item.taskId = this.query.taskId item.taskId = this.query.taskId
item.typeId = item.typeId item.typeId = item.typeId
item.maId = item.maId item.maId = item.maId
item.inputNum = item.checkNum item.inputNum = item.inputNum
item.maCode = item.maCode item.maCode = item.maCode
}) })
let param = { let param = {
@ -908,16 +939,17 @@ export default {
this.$modal.msgSuccess('审批失败') this.$modal.msgSuccess('审批失败')
} }
}) })
})
}, },
// //
handleView(row) { handleView(row) {
this.showHandle = false
this.query.pageNum = 1 this.query.pageNum = 1
this.query.pageSize = 10 this.query.pageSize = 10
this.query.dictName = null this.query.dictName = null
this.query.taskId = row.taskId this.query.taskId = row.taskId
this.getDialogTable() this.getDialogTable()
this.open = true this.open = true
this.showHandle = false
this.title = '查看' this.title = '查看'
}, },
// //