fix:性能检验修正

This commit is contained in:
shijing 2025-10-10 09:37:51 +08:00
parent 59b35b10f3
commit 62ed6a66bb
1 changed files with 42 additions and 22 deletions

View File

@ -182,16 +182,6 @@
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :md="12" :sm="24">
<el-form-item
label="实验温度及保温时间"
prop="sample_density"
>
<el-input
v-model="form.sample_number"
></el-input>
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item <el-form-item
label="样品密度" label="样品密度"
@ -246,7 +236,23 @@ export default {
return { return {
loading: false, loading: false,
form: { form: {
val_xj: "", test_date:'',
sample_number:'',
test_user:'',
equip_state:null,
val_hd:null,
specification:null,
val_zsl:null,
val_tgl:null,
val_pzxs:null,
val_ts:null,
val_tg:null,
val_tf:null,
val_xj:null,
sample_count:null,
sample_density:null,
val_zgwd:null,
note:null,
}, },
rules: { rules: {
belong_dept: [ belong_dept: [
@ -284,6 +290,13 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
sample_number:[
{
required: true,
message: "请输入样品编号",
trigger: "blur",
}
],
is_ok: [ is_ok: [
{ {
required: true, required: true,
@ -373,23 +386,30 @@ export default {
handleClick() {}, handleClick() {},
// //
submit() { submit() {
this.$refs.dialogForm.validate(async (valid) => { let that = this;
that.$refs.dialogForm.validate(async (valid) => {
if (valid) { if (valid) {
this.isSaveing = true; that.isSaveing = true;
let form = {};
for( let key in that.form){
if(that.form[key]!=null&&that.form[key]!=''){
form[key] = that.form[key];
}
}
try { try {
var res; var res;
if (this.mode == "add") { if (that.mode == "add") {
res = await this.$API.qm.ptest.create.req(this.form); res = await that.$API.qm.ptest.create.req(form);
} else if (this.mode == "edit") { } else if (that.mode == "edit") {
res = await this.$API.qm.ptest.update.req(this.form.id,this.form); res = await that.$API.qm.ptest.update.req(that.form.id,form);
} }
this.isSaveing = false; that.isSaveing = false;
this.$emit("success"); that.$emit("success");
this.visible = false; that.visible = false;
this.$message.success("操作成功"); that.$message.success("操作成功");
} catch (err) { } catch (err) {
// //
this.isSaveing = false; that.isSaveing = false;
return err; return err;
} }
} }