fix:点检包养项目内容添加字段过长校验。点检包养计划编辑选择项目时重置按钮无反应问题解决。来料检验单中接收数量与合格数不合格数校验。
This commit is contained in:
parent
c9a4b55b18
commit
aac0566659
@ -23,16 +23,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类型" prop="subjectType">
|
||||
<el-select v-model="queryParams.subjectType" placeholder="请选择项目类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_dvsubject_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -128,9 +118,18 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {}
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.subjectType = this.subjectType
|
||||
this.getList();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.getList();
|
||||
},
|
||||
// 多选框选中数据
|
||||
|
@ -229,13 +229,18 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
subjectCode: [
|
||||
{ required: true, message: "项目编码不能为空", trigger: "blur" }
|
||||
{ required: true, message: "项目编码不能为空", trigger: "blur" },
|
||||
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||
],
|
||||
subjectType: [
|
||||
{ required: true, message: "请选择项目类型", trigger: "blur" }
|
||||
],
|
||||
subjectName: [
|
||||
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||
],
|
||||
subjectContent: [
|
||||
{ required: true, message: "项目内容不能为空", trigger: "blur" }
|
||||
{ required: true, message: "项目内容不能为空", trigger: "blur" },
|
||||
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||
],
|
||||
enableFlag: [
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||
|
@ -296,7 +296,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合格品数量" prop="quantityQualified">
|
||||
<el-input :min="0" v-model="form.quantityQualified" placeholder="请输入合格品数量" />
|
||||
<el-input-number :min="0" v-model="form.quantityQualified" placeholder="请输入合格品数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -305,7 +305,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来料日期" prop="reciveDate">
|
||||
<el-date-picker clearable
|
||||
@ -619,6 +619,26 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
// 判断接收总数与合格不合格数之间的校验
|
||||
if (this.form.quantityQualified != '' && this.form.quantityQualified != undefined && this.form.quantityQualified != 0
|
||||
&& this.form.quantityUnqualified != '' && this.form.quantityUnqualified != undefined && this.form.quantityUnqualified != 0) {
|
||||
if ((this.form.quantityQualified + this.form.quantityUnqualified) != this.form.quantityRecived) {
|
||||
this.$message.warning("合格数与不合格数之和必须等于接收总数!");
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.form.quantityQualified != '' && this.form.quantityQualified != undefined) {
|
||||
if (this.form.quantityQualified > this.form.quantityRecived) {
|
||||
this.$message.warning("合格数不能大于接收总数!");
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.form.quantityUnqualified != '' && this.form.quantityUnqualified != undefined) {
|
||||
if (this.form.quantityUnqualified > this.form.quantityRecived) {
|
||||
this.$message.warning("不合格数不能大于接收总数!");
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.iqcId != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user