|
|
|
@ -730,9 +730,51 @@ export default {
|
|
|
|
|
/** 新增-提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
// 表单校验
|
|
|
|
|
if (this.checkNull(this.form.prodCode) == 0 || this.checkNull(this.form.planProDate) == 0 || this.checkNull(this.form.prodDesc) == 0 || this.checkNull(this.form.planComplete) == 0 || this.checkNull(this.form.quantity) == 0 || this.checkNull(this.form.unit) == 0 || this.checkNull(this.form.prodType) == 0) {
|
|
|
|
|
if (this.checkNull(this.form.prodCode) == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '数据不能为空!',
|
|
|
|
|
message: '物料号不能为空!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.checkNull(this.form.planProDate) == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择计划生产日期!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.checkNull(this.form.planComplete) == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择计划完成日期!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.checkNull(this.form.prodDesc) == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '物料名称不能为空!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.checkNull(this.form.quantity) == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请填写订单数量!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.checkNull(this.form.unit) == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请填写单位!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.checkNull(this.form.prodType) == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择产品类型!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
@ -790,16 +832,37 @@ export default {
|
|
|
|
|
/** 拆分提交按钮 */
|
|
|
|
|
batchBtn() {
|
|
|
|
|
// 判断数据不能为空
|
|
|
|
|
if (this.splitForm.splitNum == null || this.splitForm.shiftId == null || this.splitForm.prodLineCode == null || this.splitForm.routeCode == null) {
|
|
|
|
|
if (this.splitForm.splitNum == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '拆分数量不能为空!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.splitForm.shiftId == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '班次信息不能为空!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.splitForm.prodLineCode == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '数据不能为空!',
|
|
|
|
|
message: '请选择机型!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.splitForm.routeCode == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '数据不能为空!',
|
|
|
|
|
message: '请选择工艺信息!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.splitForm.productDate == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择工单日期!!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|