|
|
|
@ -50,9 +50,9 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="false" label="工厂" prop="factory">
|
|
|
|
|
<el-form-item v-if="false" label="工厂" prop="factoryCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.factory"
|
|
|
|
|
v-model="queryParams.factoryCode"
|
|
|
|
|
placeholder="请输入工厂"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@ -196,7 +196,7 @@
|
|
|
|
|
<el-table-column label="维护类型编码" align="center" prop="itemType" />
|
|
|
|
|
<el-table-column label="维护类型名称" align="center" prop="itemTypeName" />
|
|
|
|
|
<el-table-column label="检查项备注" align="center" prop="itemRemark" />
|
|
|
|
|
<el-table-column v-if="false" label="工厂" align="center" prop="factory" />
|
|
|
|
|
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode" />
|
|
|
|
|
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
|
|
|
|
|
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
|
|
|
|
|
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
|
|
|
|
@ -242,59 +242,88 @@
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改检查项维护对话框 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-form-item label="检查项编码" prop="itemCode">
|
|
|
|
|
<el-input v-model="form.itemCode" placeholder="请输入检查项编码" />
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="addrules" label-width="80px">
|
|
|
|
|
<!-- 第一行 -->
|
|
|
|
|
<el-row>
|
|
|
|
|
<!-- 第一列 -->
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="检查项" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入检查项"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="检查项名称" prop="itemName">
|
|
|
|
|
<el-input v-model="form.itemName" placeholder="请输入检查项名称" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="检查项方法/工具" prop="itemMethod">
|
|
|
|
|
<el-input v-model="form.itemMethod" placeholder="请输入检查项方法/工具" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="维护类型名称" prop="itemTypeName">
|
|
|
|
|
<el-input v-model="form.itemTypeName" placeholder="请输入维护类型名称" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="检查项备注" prop="itemRemark">
|
|
|
|
|
<el-input v-model="form.itemRemark" placeholder="请输入检查项备注" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工厂" prop="factory">
|
|
|
|
|
<el-input v-model="form.factory" placeholder="请输入工厂" />
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 第二列 -->
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="维护类型" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入输入维护类型"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备用字段1" prop="attr1">
|
|
|
|
|
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 第三列 -->
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label-width="100px" label="检查方法/工具" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入检查方法/工具"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备用字段2" prop="attr2">
|
|
|
|
|
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 动态表单 -->
|
|
|
|
|
<div v-for="(item, index) in formStandard" :key="index">
|
|
|
|
|
<!-- 标准类型 -->
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="标准类型" prop="prodCode">
|
|
|
|
|
<el-radio v-model="item.standardType" label="1">定性</el-radio>
|
|
|
|
|
<el-radio v-model="item.standardType" label="2">定量</el-radio>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备用字段3" prop="attr3">
|
|
|
|
|
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 单选-动态表单 -->
|
|
|
|
|
<el-row v-if="item.standardType === '1'">
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label-width="100px" label="标准名称" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入标准名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="删除标识" prop="delFlag">
|
|
|
|
|
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button size="small" v-if="formStandard.length > 1" @click="removeStandard(index)" type="danger">删除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="small" v-if="index === formStandard.length - 1" @click="addStandard" type="primary">添加
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row v-else>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label-width="100px" label="标准名称" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入标准名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="创建时间" prop="createdTime">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.createdTime"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择创建时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item label="上限" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入上限"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="创建人" prop="createdBy">
|
|
|
|
|
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item label="下限" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入下限"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="更新时间" prop="updatedTime">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.updatedTime"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择更新时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item label="单位" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入单位"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="更新人" prop="updatedBy">
|
|
|
|
|
<el-input v-model="form.updatedBy" placeholder="请输入更新人" />
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button size="small" v-if="formStandard.length > 1" @click="removeStandard(index)" type="danger">删除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="small" v-if="index === formStandard.length - 1" @click="addStandard" type="primary">添加
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 备注 -->
|
|
|
|
|
<el-form-item label="备注" prop="prodCode">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入备注"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -312,6 +341,11 @@ export default {
|
|
|
|
|
name: "Item",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 标准列表
|
|
|
|
|
formStandard: [{
|
|
|
|
|
standardType: '1',
|
|
|
|
|
value1: null,
|
|
|
|
|
}],
|
|
|
|
|
// 日期范围选择快捷
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
shortcuts: [{
|
|
|
|
@ -368,7 +402,7 @@ export default {
|
|
|
|
|
itemType: null,
|
|
|
|
|
itemTypeName: null,
|
|
|
|
|
itemRemark: null,
|
|
|
|
|
factory: null,
|
|
|
|
|
factoryCode: null,
|
|
|
|
|
attr1: null,
|
|
|
|
|
attr2: null,
|
|
|
|
|
attr3: null,
|
|
|
|
@ -384,39 +418,12 @@ export default {
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
itemCode: [
|
|
|
|
|
{ required: true, message: "检查项编码不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
itemName: [
|
|
|
|
|
{ required: true, message: "检查项名称不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
itemMethod: [
|
|
|
|
|
{ required: true, message: "检查项方法/工具不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
itemType: [
|
|
|
|
|
{ required: true, message: "维护类型编码不能为空", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
itemTypeName: [
|
|
|
|
|
{ required: true, message: "维护类型名称不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
itemRemark: [
|
|
|
|
|
{ required: true, message: "检查项备注不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
delFlag: [
|
|
|
|
|
{ required: true, message: "删除标识不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
createdTime: [
|
|
|
|
|
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
createdBy: [
|
|
|
|
|
{ required: true, message: "创建人不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
updatedTime: [
|
|
|
|
|
{ required: true, message: "更新时间不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
updatedBy: [
|
|
|
|
|
{ required: true, message: "更新人不能为空", trigger: "blur" }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
@ -424,6 +431,14 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 动态增加表单
|
|
|
|
|
addStandard() {
|
|
|
|
|
this.formStandard.push({standardType: '2', value1: ''})
|
|
|
|
|
},
|
|
|
|
|
// 动态删除表单
|
|
|
|
|
removeStandard(index) {
|
|
|
|
|
this.formStandard.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
/** 查询检查项维护列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -448,7 +463,7 @@ export default {
|
|
|
|
|
itemType: null,
|
|
|
|
|
itemTypeName: null,
|
|
|
|
|
itemRemark: null,
|
|
|
|
|
factory: null,
|
|
|
|
|
factoryCode: null,
|
|
|
|
|
attr1: null,
|
|
|
|
|
attr2: null,
|
|
|
|
|
attr3: null,
|
|
|
|
|