From 64a8cd04229f7b903913fc3dc7ef4aef267ac3bc Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 26 十月 2026 17:36:14 +0800
Subject: [PATCH] Merge branch 'dev_pro2.0' into dev_南通_苏珩
---
src/views/basicData/mdm/data.ts | 197 +++++++++++++++++++++++++-----------------------
1 files changed, 103 insertions(+), 94 deletions(-)
diff --git a/src/views/basicData/mdm/data.ts b/src/views/basicData/mdm/data.ts
index ca625c3..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,
},
{
@@ -551,52 +566,46 @@
title: "鍗曚綅",
minWidth: 80,
},
- {
- field: "unitMeasureName2",
- title: "杈呭崟浣�1",
- minWidth: 80,
- },
- {
- field: "unitMeasureRate1",
- title: "杈呭崟浣�1鎹㈢畻姣旂巼",
- minWidth: 130,
- },
- {
- field: "unitMeasureName3",
- title: "杈呭崟浣�2",
- minWidth: 80,
- },
- {
- field: "unitMeasureRate2",
- title: "杈呭崟浣�2鎹㈢畻姣旂巼",
- minWidth: 130,
- },
+ // 杈呭崟浣�1/杈呭崟浣�1鎹㈢畻姣旂巼/杈呭崟浣�2/杈呭崟浣�2鎹㈢畻姣旂巼锛氱墿鏂欏垪琛ㄤ笉鍐嶅睍绀猴紙琛ㄥ崟閲屼粛鍙淮鎶わ級锛岄渶瑕佹仮澶嶅氨鍙栨秷娉ㄩ噴
+ // {
+ // field: "unitMeasureName2",
+ // title: "杈呭崟浣�1",
+ // minWidth: 80,
+ // },
+ // {
+ // field: "unitMeasureRate1",
+ // title: "杈呭崟浣�1鎹㈢畻姣旂巼",
+ // minWidth: 130,
+ // },
+ // {
+ // field: "unitMeasureName3",
+ // title: "杈呭崟浣�2",
+ // minWidth: 80,
+ // },
+ // {
+ // field: "unitMeasureRate2",
+ // title: "杈呭崟浣�2鎹㈢畻姣旂巼",
+ // minWidth: 130,
+ // },
{
field: "warehouseName",
title: "榛樿浠撳簱",
minWidth: 100,
},
- {
- field: "purchasePrice",
- title: "閲囪喘浠�",
- minWidth: 100,
- formatter: ({ cellValue }) => {
- return cellValue != null ? `楼${Number(cellValue).toFixed(2)}` : "";
- },
- },
- {
- field: "salesPrice",
- title: "閿�鍞环",
- minWidth: 100,
- formatter: ({ cellValue }) => {
- return cellValue != null ? `楼${Number(cellValue).toFixed(2)}` : "";
- },
- },
+ // 閿�鍞环锛氱墿鏂欏垪琛ㄤ笉鍐嶅睍绀猴紝闇�瑕佹仮澶嶅氨鍙栨秷娉ㄩ噴
+ // {
+ // field: "salesPrice",
+ // title: "閿�鍞环",
+ // minWidth: 100,
+ // formatter: ({ cellValue }) => {
+ // return cellValue != null ? `楼${Number(cellValue).toFixed(2)}` : "";
+ // },
+ // },
{
field: "createTime",
title: "鍒涘缓鏃堕棿",
minWidth: 180,
- formatter: "formatDateTime",
+ formatter: 'formatDate',
},
{
field: "isBatchManaged",
--
Gitblit v1.9.3