From 2b31fa203f3435a582be51f45899d99164c9917a Mon Sep 17 00:00:00 2001
From: zhuguifei <312353457@qq.com>
Date: 星期四, 09 四月 2026 13:34:59 +0800
Subject: [PATCH] Merge branch 'master' of http://lanpucloud.cn:1111/r/SC/gfzl
---
ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue | 102 ++++++++++++++++++++++++++++++++++++---------------
1 files changed, 72 insertions(+), 30 deletions(-)
diff --git a/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue b/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue
index e4af1c5..529aa4e 100755
--- a/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue
+++ b/ruoyi-plus-soybean/src/views/qm/checkitem/modules/checkitem-operate-drawer.vue
@@ -1,11 +1,7 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue';
import { jsonClone } from '@sa/utils';
-import {
- fetchCreateCheckitem,
- fetchGetRid,
- fetchUpdateCheckitem
-} from '@/service/api/qm/checkitem';
+import { fetchCreateCheckitem, fetchGetRid, fetchUpdateCheckitem } from '@/service/api/qm/checkitem';
import { fetchGetInstrumentList } from '@/service/api/md/instrument';
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
import { $t } from '@/locales';
@@ -120,35 +116,31 @@
fetchInstrumentOptions(query);
}
-
function createDefaultModel(): Model {
return {
- id: '',
- itemCode: '',
- itemName: '',
- unit: '',
- enable: 1,
- del: 0,
- itemDes: '',
- stdCode: '',
- instrumentDes: '',
- location: '',
- checkLevel: '',
- ismix: null,
- rid: null,
- category: null,
- instrumentCode: '',
- score: null
+ id: '',
+ itemCode: '',
+ itemName: '',
+ unit: '',
+ enable: 1,
+ del: 0,
+ itemDes: '',
+ stdCode: '',
+ instrumentDes: '',
+ location: '',
+ checkLevel: '',
+ ismix: null,
+ rid: null,
+ category: null,
+ instrumentCode: '',
+ score: null
};
}
-type RuleKey = Extract<
- keyof Model,
- | 'id'
->;
+type RuleKey = Extract<keyof Model, 'id'>;
const rules: Record<RuleKey, App.Global.FormRule> = {
- id: createRequiredRule('缂栫爜涓嶈兘涓虹┖'),
+ id: createRequiredRule('缂栫爜涓嶈兘涓虹┖')
};
async function handleUpdateModelWhenEdit() {
@@ -176,17 +168,67 @@
async function handleSubmit() {
await validate();
- const { id, itemCode, itemName, unit, enable, del, itemDes, stdCode, instrumentDes, location, checkLevel, ismix, rid, category, instrumentCode, score } = model.value;
+ const {
+ id,
+ itemCode,
+ itemName,
+ unit,
+ enable,
+ del,
+ itemDes,
+ stdCode,
+ instrumentDes,
+ location,
+ checkLevel,
+ ismix,
+ rid,
+ category,
+ instrumentCode,
+ score
+ } = model.value;
// request
if (props.operateType === 'add') {
- const payload = { itemCode, itemName, unit, enable, del, itemDes, stdCode, instrumentDes, location, checkLevel, ismix, rid, category, instrumentCode, score };
+ const payload = {
+ itemCode,
+ itemName,
+ unit,
+ enable,
+ del,
+ itemDes,
+ stdCode,
+ instrumentDes,
+ location,
+ checkLevel,
+ ismix,
+ rid,
+ category,
+ instrumentCode,
+ score
+ };
const { error } = await fetchCreateCheckitem(payload);
if (error) return;
}
if (props.operateType === 'edit') {
- const payload = { id, itemCode, itemName, unit, enable, del, itemDes, stdCode, instrumentDes, location, checkLevel, ismix, rid, category, instrumentCode, score };
+ const payload = {
+ id,
+ itemCode,
+ itemName,
+ unit,
+ enable,
+ del,
+ itemDes,
+ stdCode,
+ instrumentDes,
+ location,
+ checkLevel,
+ ismix,
+ rid,
+ category,
+ instrumentCode,
+ score
+ };
const { error } = await fetchUpdateCheckitem(payload);
if (error) return;
}
--
Gitblit v1.9.3