|
@@ -17,8 +17,8 @@
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="form.qualityStandardId"
|
|
v-model="form.qualityStandardId"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
- class="ele-block"
|
|
|
|
|
filterable
|
|
filterable
|
|
|
|
|
+ style="width: 100%"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
:label="item.name"
|
|
:label="item.name"
|
|
@@ -40,7 +40,9 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
|
|
|
|
|
+ <el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="参数名称:" prop="inspectionName">
|
|
<el-form-item label="参数名称:" prop="inspectionName">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -288,6 +290,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { save, update, getById } from '@/api/inspectionProject';
|
|
import { save, update, getById } from '@/api/inspectionProject';
|
|
|
|
|
+ import { getCode } from '@/api/login';
|
|
|
|
|
|
|
|
import { getList } from '@/api/inspectionStandard';
|
|
import { getList } from '@/api/inspectionStandard';
|
|
|
import ProductModal from './ProductModal.vue';
|
|
import ProductModal from './ProductModal.vue';
|
|
@@ -332,22 +335,9 @@
|
|
|
defaultForm,
|
|
defaultForm,
|
|
|
// 表单数据
|
|
// 表单数据
|
|
|
form: { ...defaultForm },
|
|
form: { ...defaultForm },
|
|
|
- timeType: [
|
|
|
|
|
- { value: 1, label: '是' },
|
|
|
|
|
- { value: 0, label: '否' }
|
|
|
|
|
- ],
|
|
|
|
|
- statusList: [
|
|
|
|
|
- { label: '工艺', value: 0 },
|
|
|
|
|
- { label: '质检', value: 1 },
|
|
|
|
|
- { label: '产品', value: 2 },
|
|
|
|
|
- { label: '原料', value: 3 },
|
|
|
|
|
- { label: '设备', value: 4 },
|
|
|
|
|
- { label: '其他', value: 5 }
|
|
|
|
|
- ],
|
|
|
|
|
- tacticsType: [
|
|
|
|
|
- { code: 1, label: '标准时间' },
|
|
|
|
|
- { code: 2, label: '最短时间' }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
qualityStandardList: [],
|
|
qualityStandardList: [],
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
@@ -378,13 +368,7 @@
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- tableFormRules: {
|
|
|
|
|
- formula: {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请输入公式',
|
|
|
|
|
- trigger: 'blur'
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 提交状态
|
|
// 提交状态
|
|
|
loading: false,
|
|
loading: false,
|
|
@@ -491,7 +475,7 @@
|
|
|
this.form.postscriptList.push({ sort: null, content: '' });
|
|
this.form.postscriptList.push({ sort: null, content: '' });
|
|
|
},
|
|
},
|
|
|
removePostscript(idx, row) {
|
|
removePostscript(idx, row) {
|
|
|
- this.$confirm(`是否删除这个事项?`).then(async () => {
|
|
|
|
|
|
|
+ this.$confirm(`是否删除这个注意事项?`).then(async () => {
|
|
|
this.form.postscriptList.splice(idx, 1);
|
|
this.form.postscriptList.splice(idx, 1);
|
|
|
if (row.id) {
|
|
if (row.id) {
|
|
|
this.form.postscriptRemoveIds.push(row.id);
|
|
this.form.postscriptRemoveIds.push(row.id);
|
|
@@ -505,12 +489,16 @@
|
|
|
if (visible) {
|
|
if (visible) {
|
|
|
if (this.data) {
|
|
if (this.data) {
|
|
|
const res = await getById(this.data.id);
|
|
const res = await getById(this.data.id);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
this.$util.assignObject(this.form, {
|
|
this.$util.assignObject(this.form, {
|
|
|
- ...res
|
|
|
|
|
|
|
+ ...res.data
|
|
|
});
|
|
});
|
|
|
this.isUpdate = true;
|
|
this.isUpdate = true;
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ const code = await getCode('inspection_code');
|
|
|
|
|
+ this.form.inspectionCode = code;
|
|
|
|
|
+
|
|
|
this.isUpdate = false;
|
|
this.isUpdate = false;
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|