From 874ddf20325b535872488905caa648beaf9ff024 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 14 5月 2025 14:07:17 +0800
Subject: [PATCH] 管件提交
---
Weben_CMS专用代码生成器/Weben_CMS_TemplateDemo/templatedemo_web/src/widgets/WmsMaterial/Controllers/WmsMaterialDrawer.tsx | 208 +++++++++++++++++++++------------------------------
1 files changed, 85 insertions(+), 123 deletions(-)
diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Weben_CMS_TemplateDemo/templatedemo_web/src/widgets/WmsMaterial/Controllers/WmsMaterialDrawer.tsx" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Weben_CMS_TemplateDemo/templatedemo_web/src/widgets/WmsMaterial/Controllers/WmsMaterialDrawer.tsx"
index 06079b1..5b14d1f 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Weben_CMS_TemplateDemo/templatedemo_web/src/widgets/WmsMaterial/Controllers/WmsMaterialDrawer.tsx"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Weben_CMS_TemplateDemo/templatedemo_web/src/widgets/WmsMaterial/Controllers/WmsMaterialDrawer.tsx"
@@ -14,6 +14,10 @@
import isEqual from 'lodash/isEqual'
import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
import { cloneDeep } from 'lodash'
+// 寮曞叆鍏叡閫夐」閰嶇疆
+import {
+ BOOLEAN_OPTIONS_AddEdit
+} from '@/utils/commonOptionConstants';
export const useWmsMaterialDrawer = (props: any, ctx?: any) => {
const wmsMaterialDrawer = injectModel<WmsMaterialDrawer>('wmsMaterialDrawer')
@@ -85,6 +89,56 @@
rules: [{required: true, message: '鐗╂枡缂栫爜锛堝敮涓�鏍囪瘑锛変笉鑳戒负绌�', trigger: 'blur' }],
},
{
+ label: '鏄惁鏈夋晥鐗╂枡',
+ prop: 'isValid',
+ el: 'select',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ユ槸鍚︽湁鏁堢墿鏂�',
+ rules: [{required: true, message: '鏄惁鏈夋晥鐗╂枡涓嶈兘涓虹┖', trigger: 'blur' }],
+ options: BOOLEAN_OPTIONS_AddEdit
+ },
+ {
+ label: '鏄惁鑷骇',
+ prop: 'isSelfMade',
+ el: 'select',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ユ槸鍚﹁嚜浜�',
+ options: BOOLEAN_OPTIONS_AddEdit
+ },
+ {
+ label: '鏁伴噺',
+ prop: 'num',
+ el: (props: any, { attrs }: SetupContext) => {
+ return h(inputNumber, {
+ ...props,
+ clearable: true,
+ ...attrs,
+ })
+ },
+ width: '100%',
+ step: 1,
+ precision: 0,
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ユ暟閲�',
+ rules: [{required: true, message: '鏁伴噺涓嶈兘涓虹┖', trigger: 'blur' }],
+ },
+ {
+ label: '鑷湁鏁伴噺',
+ prop: 'selfNum',
+ el: (props: any, { attrs }: SetupContext) => {
+ return h(inputNumber, {
+ ...props,
+ clearable: true,
+ ...attrs,
+ })
+ },
+ width: '100%',
+ step: 1,
+ precision: 0,
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ヨ嚜鏈夋暟閲�',
+ },
+ {
label: '鐗╂枡鍚嶇О',
prop: 'materialName',
el: 'input',
@@ -93,9 +147,26 @@
rules: [{required: true, message: '鐗╂枡鍚嶇О涓嶈兘涓虹┖', trigger: 'blur' }],
},
{
+ label: '鍙┖闀垮害',
+ prop: 'nullLength',
+ el: (props: any, { attrs }: SetupContext) => {
+ return h(inputNumber, {
+ ...props,
+ clearable: true,
+ ...attrs,
+ })
+ },
+ width: '100%',
+ step: 0.01,
+ precision: 2,
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ュ彲绌洪暱搴�',
+ },
+ {
label: '閲囪喘绫诲瀷锛堟灇涓惧�硷級',
prop: 'purchaseType',
el: 'select',
+ clearable:true,
options: [],
//disabled: disabled,
placeholder: '璇疯緭鍏ラ噰璐被鍨嬶紙鏋氫妇鍊硷級',
@@ -105,6 +176,7 @@
label: '鐗╂枡绫诲瀷锛堟灇涓惧�硷級',
prop: 'materialType',
el: 'select',
+ clearable:true,
options: [],
//disabled: disabled,
placeholder: '璇疯緭鍏ョ墿鏂欑被鍨嬶紙鏋氫妇鍊硷級',
@@ -186,6 +258,7 @@
label: '鏄惁涓轰富鏀',
prop: 'isMainBranch',
el: 'select',
+ clearable:true,
options: [],
//disabled: disabled,
placeholder: '璇疯緭鍏ユ槸鍚︿负涓绘敮绠�',
@@ -227,112 +300,11 @@
placeholder: '璇疯緭鍏ュ啑浣欏瓧娈�3 - 棰勭暀鎵╁睍鐢ㄩ��',
},
{
- label: '鍒涘缓浜�',
- prop: 'creatorName',
- el: 'input',
- //disabled: disabled,
- placeholder: '璇疯緭鍏ュ垱寤轰汉',
- },
- {
- label: '淇敼浜�',
- prop: 'lastModifierName',
- el: 'input',
- //disabled: disabled,
- placeholder: '璇疯緭鍏ヤ慨鏀逛汉',
- },
- {
label: '澶囨敞',
prop: 'remark',
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ娉�',
- },
- {
- label: '鎵╁睍瀛楁1',
- prop: 'extraField1',
- el: 'input',
- //disabled: disabled,
- placeholder: '璇疯緭鍏ユ墿灞曞瓧娈�1',
- },
- {
- label: '鎵╁睍瀛楁2',
- prop: 'extraField2',
- el: 'input',
- //disabled: disabled,
- placeholder: '璇疯緭鍏ユ墿灞曞瓧娈�2',
- },
- {
- label: '鎵╁睍瀛楁3',
- prop: 'extraField3',
- el: 'input',
- //disabled: disabled,
- placeholder: '璇疯緭鍏ユ墿灞曞瓧娈�3',
- },
- {
- label: '鏁伴噺',
- prop: 'isSelfMade',
- el: 'select',
- //disabled: disabled,
- placeholder: '璇疯緭鍏ユ暟閲�',
- options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}]
- },
- {
- label: '鏄惁鏈夋晥鐗╂枡',
- prop: 'isValid',
- el: 'select',
- //disabled: disabled,
- placeholder: '璇疯緭鍏ユ槸鍚︽湁鏁堢墿鏂�',
- rules: [{required: true, message: '鏄惁鏈夋晥鐗╂枡涓嶈兘涓虹┖', trigger: 'blur' }],
- options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}]
- },
- {
- label: '',
- prop: 'nullLength',
- el: (props: any, { attrs }: SetupContext) => {
- return h(inputNumber, {
- ...props,
- clearable: true,
- ...attrs,
- })
- },
- width: '100%',
- step: 0.01,
- precision: 2,
- //disabled: disabled,
- placeholder: '璇疯緭鍏�',
- },
- {
- label: '鏄惁鏈夋晥鐗╂枡',
- prop: 'num',
- el: (props: any, { attrs }: SetupContext) => {
- return h(inputNumber, {
- ...props,
- clearable: true,
- ...attrs,
- })
- },
- width: '100%',
- step: 1,
- precision: 0,
- //disabled: disabled,
- placeholder: '璇疯緭鍏ユ槸鍚︽湁鏁堢墿鏂�',
- rules: [{required: true, message: '鏄惁鏈夋晥鐗╂枡涓嶈兘涓虹┖', trigger: 'blur' }],
- },
- {
- label: '鑷湁鏁伴噺',
- prop: 'selfNum',
- el: (props: any, { attrs }: SetupContext) => {
- return h(inputNumber, {
- ...props,
- clearable: true,
- ...attrs,
- })
- },
- width: '100%',
- step: 1,
- precision: 0,
- //disabled: disabled,
- placeholder: '璇疯緭鍏ヨ嚜鏈夋暟閲�',
},
])
/**
@@ -370,7 +342,12 @@
await formRef.value?.validate()
const data = {
materialCode: formData.value.materialCode,
+isValid: formData.value.isValid,
+isSelfMade: formData.value.isSelfMade,
+num: formData.value.num,
+selfNum: formData.value.selfNum,
materialName: formData.value.materialName,
+nullLength: formData.value.nullLength,
purchaseType: formData.value.purchaseType,
materialType: formData.value.materialType,
primaryUnit: formData.value.primaryUnit,
@@ -385,17 +362,7 @@
redundantField1: formData.value.redundantField1,
redundantField2: formData.value.redundantField2,
redundantField3: formData.value.redundantField3,
-creatorName: formData.value.creatorName,
-lastModifierName: formData.value.lastModifierName,
-remark: formData.value.remark,
-extraField1: formData.value.extraField1,
-extraField2: formData.value.extraField2,
-extraField3: formData.value.extraField3,
-isSelfMade: formData.value.isSelfMade,
-isValid: formData.value.isValid,
-nullLength: formData.value.nullLength,
-num: formData.value.num,
-selfNum: formData.value.selfNum,
+remark: formData.value.remark,
}
if (!current.value) {
await wmsMaterialDrawer.addWmsMaterial(data)
@@ -451,7 +418,12 @@
formData.value = {
materialCode: res.materialCode,
+isValid: res.isValid,
+isSelfMade: res.isSelfMade,
+num: res.num,
+selfNum: res.selfNum,
materialName: res.materialName,
+nullLength: res.nullLength,
purchaseType: res.purchaseType,
materialType: res.materialType,
primaryUnit: res.primaryUnit,
@@ -466,17 +438,7 @@
redundantField1: res.redundantField1,
redundantField2: res.redundantField2,
redundantField3: res.redundantField3,
-creatorName: res.creatorName,
-lastModifierName: res.lastModifierName,
-remark: res.remark,
-extraField1: res.extraField1,
-extraField2: res.extraField2,
-extraField3: res.extraField3,
-isSelfMade: res.isSelfMade,
-isValid: res.isValid,
-nullLength: res.nullLength,
-num: res.num,
-selfNum: res.selfNum,
+remark: res.remark,
id: res.id,
}
disabled.value = true
--
Gitblit v1.9.3