Browse Source

完善入库管理的分批入库功能,增加相关提示

zhanglei
yunuo970428 3 years ago
parent
commit
748969f72e
  1. 48
      anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue
  2. 61
      anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue

48
anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue

@ -784,17 +784,22 @@ export default {
} else {
this.formobj.deductionPolicyFourThree = 1
}
// if (this.formobj.vehicleList.length > 0) {
// for (var i = 0; i < this.formobj.vehicleList.length; i++) {
// if (this.formobj.vehicleList[i].vinNo !== '') {
// if (this.formobj.vehicleList[i].vinNo.length < 17) {
// const message = '' + this.formobj.vehicleList[i].vinNo + ' 17'
// this.$message({ showClose: true, type: 'error', message: message })
// return
// }
// }
// }
// }
var hint = 0
if (this.formobj.vehicleList.length > 0) {
for (var i = 0; i < this.formobj.vehicleList.length; i++) {
if (this.formobj.vehicleList[i].vinNo === '') {
hint = 1
break
}
}
}
if (hint !== 0) {
const tip = '有些车架号没有填写,是否分批入库'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.submitVehicleApply(this.formobj).then(res => {
if (res.success) {
this.$message({
@ -811,6 +816,27 @@ export default {
})
}
})
}).catch(() => {
hint = 0
})
} else {
req.submitVehicleApply(this.formobj).then(res => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
})
}
})
}
},
// ===
handleReturn(isreload) {

61
anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue

@ -805,17 +805,22 @@ export default {
} else {
this.formobj.deductionPolicyFourThree = 1
}
// if (this.formobj.vehicleList.length > 0) {
// for (var i = 0; i < this.formobj.vehicleList.length; i++) {
// if (this.formobj.vehicleList[i].vinNo !== '') {
// if (this.formobj.vehicleList[i].vinNo.length < 17) {
// const message = '' + this.formobj.vehicleList[i].vinNo + ' 17'
// this.$message({ showClose: true, type: 'error', message: message })
// return
// }
// }
// }
// }
var hint = 0
if (this.formobj.vehicleList.length > 0) {
for (var i = 0; i < this.formobj.vehicleList.length; i++) {
if (this.formobj.vehicleList[i].vinNo === '') {
hint = 1
break
}
}
}
if (hint !== 0) {
const tip = '有些车架号没有填写,是否分批入库'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.submitVehicleApply(this.formobj).then(res => {
if (res.success) {
this.$message({
@ -823,18 +828,38 @@ export default {
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
this.handleReturn('true')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
})
}
}, '*')
})
}).catch(() => {
hint = 0
})
} else {
req.submitVehicleApply(this.formobj).then(res => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
})
}
})
}
}
}
}
</script>

Loading…
Cancel
Save