From 64e47529e29ab013b32d3c09e4044b5b192c3c7a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 26 十月 2026 17:11:33 +0800
Subject: [PATCH] feat: 完善南通苏珩线缆工业智能系统
---
src/views/basicData/mdm/data.ts | 129 ++++++++++++++++++++++++-------------------
1 files changed, 72 insertions(+), 57 deletions(-)
diff --git a/src/views/basicData/mdm/data.ts b/src/views/basicData/mdm/data.ts
index 051a99c..d4c6974 100644
--- a/src/views/basicData/mdm/data.ts
+++ b/src/views/basicData/mdm/data.ts
@@ -1,19 +1,14 @@
import type { VbenFormApi, VbenFormSchema } from "#/adapter/form";
import type { VxeTableGridOptions } from "#/adapter/vxe-table";
-import { h } from 'vue';
-
import { CommonStatusEnum, DICT_TYPE } from "#/packages/constants/src";
import { getDictOptions } from "#/packages/effects/hooks/src";
import { z } from '#/adapter/form';
-import { generateAutoCode } from '#/api/mes/md/autocode/record';
-import { MesAutoCodeRuleCode } from '@vben/constants';
import { getItemTypeSimpleList } from '#/api/mes/md/item/type';
import { getUnitPage } from '#/api/mdm/unit';
import { getWarehouseSimpleList } from '#/api/mes/wm/warehouse';
-import { Button } from 'ant-design-vue';
// 缂撳瓨鍗曚綅鍒楄〃
let unitListCache: any[] | null = null;
@@ -95,26 +90,13 @@
{
component: "Input",
fieldName: "code",
- label: "鐗╂枡缂栫爜",
+ label: "浜у搧缂栧彿",
componentProps: {
maxLength: 64,
- placeholder: "璇疯緭鍏ョ墿鏂欑紪鐮�",
+ placeholder: "閫夋嫨浜у搧绫诲瀷骞朵繚瀛樺悗鑷姩鐢熸垚",
+ disabled: true,
},
- rules: z.string().min(1, '鐗╂枡缂栫爜涓嶈兘涓虹┖').max(64),
- suffix: () =>
- h(
- Button,
- {
- type: 'default',
- onClick: async () => {
- const code = await generateAutoCode(
- MesAutoCodeRuleCode.MD_ITEM_CODE,
- );
- await formApi?.setFieldValue('code', code);
- },
- },
- { default: () => '鐢熸垚' },
- ),
+ help: "绯荤粺鎸変骇鍝佺被鍨嬭嚜鍔ㄧ敓鎴愪節浣嶇紪鍙凤紝渚嬪鍘熸潗鏂� 100100001",
},
{
component: "Input",
@@ -136,6 +118,22 @@
treeDefaultExpandAll: true,
treeData: categoryTreeData,
fieldNames: { label: 'label', value: 'value', children: 'children' },
+ },
+ },
+ {
+ component: 'Select',
+ fieldName: 'itemType',
+ label: '浜у搧绫诲瀷',
+ rules: 'selectRequired',
+ componentProps: {
+ placeholder: '璇烽�夋嫨浜у搧绫诲瀷',
+ options: [
+ { label: '鍘熸潗鏂欙紙1001锛�', value: 1 },
+ { label: '鍗婃垚鍝侊紙1002锛�', value: 2 },
+ { label: '鎴愬搧锛�1003锛�', value: 3 },
+ { label: '杈呮潗锛�1004锛�', value: 4 },
+ { label: '鍏朵粬锛�1005锛�', value: 5 },
+ ],
},
},
{
@@ -245,6 +243,56 @@
},
},
{
+ component: 'Divider',
+ fieldName: 'basicDataDivider',
+ label: '鍩虹鏁版嵁',
+ formItemClass: 'col-span-2',
+ componentProps: { orientation: 'left', plain: true },
+ },
+ {
+ component: 'Textarea',
+ fieldName: 'technicalParameters',
+ label: '鎶�鏈弬鏁�',
+ formItemClass: 'col-span-2',
+ componentProps: {
+ placeholder: '璇疯緭鍏ヤ骇鍝佹妧鏈弬鏁�',
+ rows: 4,
+ },
+ },
+ {
+ component: "InputNumber",
+ fieldName: "safetyStock",
+ label: "搴撳瓨棰勮鏁伴噺",
+ componentProps: {
+ class: "!w-full",
+ min: 0,
+ precision: 2,
+ placeholder: "璇疯緭鍏ュ簱瀛橀璀︽暟閲�",
+ },
+ },
+ {
+ component: "InputNumber",
+ fieldName: "minStock",
+ label: "鏈�浣庡簱瀛�",
+ componentProps: {
+ class: "!w-full",
+ min: 0,
+ precision: 2,
+ placeholder: "璇疯緭鍏ユ渶浣庡簱瀛�",
+ },
+ },
+ {
+ component: "InputNumber",
+ fieldName: "maxStock",
+ label: "鏈�楂樺簱瀛�",
+ componentProps: {
+ class: "!w-full",
+ min: 0,
+ precision: 2,
+ placeholder: "璇疯緭鍏ユ渶楂樺簱瀛�",
+ },
+ },
+ {
component: "InputNumber",
fieldName: "purchasePrice",
label: "閲囪喘浠�",
@@ -275,39 +323,6 @@
min: 0,
precision: 2,
placeholder: "璇疯緭鍏ユ垚鏈环",
- },
- },
- {
- component: "InputNumber",
- fieldName: "safetyStock",
- label: "瀹夊叏搴撳瓨",
- componentProps: {
- class: "!w-full",
- min: 0,
- precision: 2,
- placeholder: "璇疯緭鍏ュ畨鍏ㄥ簱瀛�",
- },
- },
- {
- component: "InputNumber",
- fieldName: "minStock",
- label: "鏈�浣庡簱瀛�",
- componentProps: {
- class: "!w-full",
- min: 0,
- precision: 2,
- placeholder: "璇疯緭鍏ユ渶浣庡簱瀛�",
- },
- },
- {
- component: "InputNumber",
- fieldName: "maxStock",
- label: "鏈�楂樺簱瀛�",
- componentProps: {
- class: "!w-full",
- min: 0,
- precision: 2,
- placeholder: "璇疯緭鍏ユ渶楂樺簱瀛�",
},
},
{
@@ -492,7 +507,7 @@
return [
{
fieldName: "code",
- label: "鐗╂枡缂栫爜",
+ label: "浜у搧缂栧彿",
component: "Input",
componentProps: {
placeholder: "璇疯緭鍏ョ墿鏂欑紪鐮�",
@@ -527,7 +542,7 @@
{ type: "checkbox", width: 40 },
{
field: "code",
- title: "鐗╂枡缂栫爜",
+ title: "浜у搧缂栧彿",
minWidth: 120,
},
{
--
Gitblit v1.9.3