Merge remote-tracking branch 'origin/dev-nx' into dev-nx

This commit is contained in:
mashuai 2025-04-17 18:12:32 +08:00
commit d02ec45f57
1 changed files with 46 additions and 33 deletions

View File

@ -1118,45 +1118,58 @@ export default {
saveCodeOut() { saveCodeOut() {
this.$refs.codeOutForm.validate((valid) => { this.$refs.codeOutForm.validate((valid) => {
if (!valid) return if (!valid) return
if (this.maCodeList.length <= this.outObj.outNum) { //
let params = this.maCodeList.map((item) => { this.$confirm('确定出库该设备么?设备出库后无法修改', '提示', {
let obj = { confirmButtonText: '确定',
id: this.outObj.id, cancelButtonText: '取消',
maId: item, type: 'warning',
manageType: 0, }).then(() => {
carCode: this.codeOutForm.carCode, if (this.maCodeList.length <= this.outObj.outNum) {
typeId: this.outObj.typeId, let params = this.maCodeList.map((item) => {
parentId: this.outObj.parentId, let obj = {
outNum: 1, id: this.outObj.id,
taskId: this.outObj.taskId, maId: item,
createBy: sessionStorage.getItem('userId'), manageType: 0,
companyId: this.outObj.companyId, carCode: this.codeOutForm.carCode,
} typeId: this.outObj.typeId,
return obj parentId: this.outObj.parentId,
}) outNum: 1,
// console.log(params) taskId: this.outObj.taskId,
submitOut(params).then((res) => { createBy: sessionStorage.getItem('userId'),
this.$modal.msgSuccess('出库成功') companyId: this.outObj.companyId,
this.openCode = false }
this.handleDialogQuery() return obj
this.handleQuery() })
}) // console.log(params)
} else { submitOut(params).then((res) => {
this.$modal.msgError('所选机具编码已超出出库数量!') this.$modal.msgSuccess('出库成功')
} this.openCode = false
this.handleDialogQuery()
this.handleQuery()
})
} else {
this.$modal.msgError('所选机具编码已超出出库数量!')
}
})
}) })
}, },
// //
saveNumOut() { saveNumOut() {
this.$refs.numOutForm.validate((valid) => { this.$refs.numOutForm.validate((valid) => {
if (!valid) return if (!valid) return
this.outNumList[0].carCode = this.numOutForm.carCode this.$confirm('确定出库该设备么?设备出库后无法修改', '提示', {
let param = this.outNumList confirmButtonText: '确定',
submitNumOut(param).then((res) => { cancelButtonText: '取消',
this.$modal.msgSuccess('出库成功') type: 'warning',
this.openNum = false }).then(() => {
this.handleDialogQuery() this.outNumList[0].carCode = this.numOutForm.carCode
this.handleQuery() let param = this.outNumList
submitNumOut(param).then((res) => {
this.$modal.msgSuccess('出库成功')
this.openNum = false
this.handleDialogQuery()
this.handleQuery()
})
}) })
}) })
}, },