From dbfd4bc96205dd957827ee16c1149058fc2b88bb Mon Sep 17 00:00:00 2001
From: zhuguifei <312353457@qq.com>
Date: 星期三, 04 三月 2026 15:31:14 +0800
Subject: [PATCH] perf:
---
ruoyi-plus-soybean/src/views/analy/store-silk/modules/store-silk-operate-drawer.vue | 72 +++++++++++++++++++++++++----------
1 files changed, 51 insertions(+), 21 deletions(-)
diff --git a/ruoyi-plus-soybean/src/views/analy/store-silk/modules/store-silk-operate-drawer.vue b/ruoyi-plus-soybean/src/views/analy/store-silk/modules/store-silk-operate-drawer.vue
index 523341c..169e340 100644
--- a/ruoyi-plus-soybean/src/views/analy/store-silk/modules/store-silk-operate-drawer.vue
+++ b/ruoyi-plus-soybean/src/views/analy/store-silk/modules/store-silk-operate-drawer.vue
@@ -45,31 +45,26 @@
function createDefaultModel(): Model {
return {
- id: null,
- materialname: '',
- batchcode: '',
- actualstarttime: null,
- jobinput: null,
- weightloss: null,
- slkrate: null,
- weight: null,
- distimebegin: null,
- distimeend: null,
- siloid: ''
+ id: null,
+ materialname: '',
+ batchcode: '',
+ actualstarttime: null,
+ jobinput: null,
+ weightloss: null,
+ slkrate: null,
+ weight: null,
+ distimebegin: null,
+ distimeend: null,
+ siloid: ''
};
}
-type RuleKey = Extract<
- keyof Model,
- | 'id'
- | 'materialname'
- | 'batchcode'
->;
+type RuleKey = Extract<keyof Model, 'id' | 'materialname' | 'batchcode'>;
const rules: Record<RuleKey, App.Global.FormRule> = {
id: createRequiredRule('id涓嶈兘涓虹┖'),
materialname: createRequiredRule('鐗屽彿涓嶈兘涓虹┖'),
- batchcode: createRequiredRule('鎵规鍙蜂笉鑳戒负绌�'),
+ batchcode: createRequiredRule('鎵规鍙蜂笉鑳戒负绌�')
};
function handleUpdateModelWhenEdit() {
@@ -87,16 +82,51 @@
async function handleSubmit() {
await validate();
- const { id, materialname, batchcode, actualstarttime, jobinput, weightloss, slkrate, weight, distimebegin, distimeend, siloid } = model.value;
+ const {
+ id,
+ materialname,
+ batchcode,
+ actualstarttime,
+ jobinput,
+ weightloss,
+ slkrate,
+ weight,
+ distimebegin,
+ distimeend,
+ siloid
+ } = model.value;
// request
if (props.operateType === 'add') {
- const { error } = await fetchCreateStoreSilk({ materialname, batchcode, actualstarttime, jobinput, weightloss, slkrate, weight, distimebegin, distimeend, siloid });
+ const { error } = await fetchCreateStoreSilk({
+ materialname,
+ batchcode,
+ actualstarttime,
+ jobinput,
+ weightloss,
+ slkrate,
+ weight,
+ distimebegin,
+ distimeend,
+ siloid
+ });
if (error) return;
}
if (props.operateType === 'edit') {
- const { error } = await fetchUpdateStoreSilk({ id, materialname, batchcode, actualstarttime, jobinput, weightloss, slkrate, weight, distimebegin, distimeend, siloid });
+ const { error } = await fetchUpdateStoreSilk({
+ id,
+ materialname,
+ batchcode,
+ actualstarttime,
+ jobinput,
+ weightloss,
+ slkrate,
+ weight,
+ distimebegin,
+ distimeend,
+ siloid
+ });
if (error) return;
}
--
Gitblit v1.9.3