fix:点检包养项目内容添加字段过长校验。点检包养计划编辑选择项目时重置按钮无反应问题解决。来料检验单中接收数量与合格数不合格数校验。
This commit is contained in:
parent
c9a4b55b18
commit
aac0566659
@ -23,16 +23,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -128,9 +118,18 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {}
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.queryParams.subjectType = this.subjectType
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
@ -229,13 +229,18 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
subjectCode: [
|
subjectCode: [
|
||||||
{ required: true, message: "项目编码不能为空", trigger: "blur" }
|
{ required: true, message: "项目编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
subjectType: [
|
subjectType: [
|
||||||
{ required: true, message: "请选择项目类型", trigger: "blur" }
|
{ required: true, message: "请选择项目类型", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
subjectName: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
subjectContent: [
|
subjectContent: [
|
||||||
{ required: true, message: "项目内容不能为空", trigger: "blur" }
|
{ required: true, message: "项目内容不能为空", trigger: "blur" },
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
|
@ -296,7 +296,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="合格品数量" prop="quantityQualified">
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -619,6 +619,26 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
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 => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.iqcId != null) {
|
if (this.form.iqcId != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user