From 679c5b64e0dcbee2ea29c38c9c55c3ff1d4b6258 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 02 十一月 2026 10:51:36 +0800
Subject: [PATCH] 诚发五金:入库/调整/移库/调拨/盘点表单去掉库区库位选择,改由后端默认库区库位兜底

---
 src/views/mes/pro/workorder/data.ts |  123 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 106 insertions(+), 17 deletions(-)

diff --git a/src/views/mes/pro/workorder/data.ts b/src/views/mes/pro/workorder/data.ts
index cf8cdd4..8e4bf12 100644
--- a/src/views/mes/pro/workorder/data.ts
+++ b/src/views/mes/pro/workorder/data.ts
@@ -18,12 +18,14 @@
 import { Button } from 'ant-design-vue';
 
 import { generateAutoCode } from '#/api/mes/md/autocode/record';
+import { getFactorySimpleList } from '#/api/mes/md/factory';
 import CrmCustomerSelect from '#/components/crm-customer-select.vue';
 import { getRangePickerDefaultProps } from '#/utils';
 import {
   MdItemSelect,
 } from '#/views/mes/md/item/components';
 import { MdVendorSelect } from '#/views/mes/md/vendor/components';
+import MdWorkshopSelect from '#/views/mes/md/workstation/components/workshop-select.vue';
 
 /** 琛ㄥ崟绫诲瀷 */
 export type FormType = 'confirm' | 'create' | 'detail' | 'finish' | 'update';
@@ -107,6 +109,37 @@
       rules: 'required',
     },
     {
+      fieldName: 'factoryId',
+      label: '宸ュ巶',
+      component: 'ApiSelect',
+      componentProps: {
+        allowClear: true,
+        api: getFactorySimpleList,
+        disabled: headerReadonly,
+        labelField: 'name',
+        placeholder: '璇烽�夋嫨宸ュ巶',
+        valueField: 'id',
+      },
+      help: '閫夋嫨宸ュ崟鎵�灞炲伐鍘傦紙鐢熶骇涓讳綋锛夛紝鐢ㄤ簬鎸夊伐鍘傜瓫閫夊伐鍗曘�佸綊闆嗛鏂欙紱宸ュ巶鍙湪銆屽伐鍘傘�嶅熀纭�璧勬枡涓淮鎶ゃ��',
+    },
+    {
+      fieldName: 'workshopId',
+      label: '杞﹂棿',
+      component: markRaw(MdWorkshopSelect),
+      componentProps: {
+        disabled: headerReadonly,
+        placeholder: '璇烽�夋嫨杞﹂棿',
+      },
+      dependencies: {
+        triggerFields: ['factoryId'],
+        componentProps: (values: { factoryId?: number }) => ({
+          disabled: headerReadonly,
+          factoryId: values.factoryId,
+        }),
+      },
+      help: '閫夋嫨宸ュ巶鍚庯紝姝ゅ鍙樉绀鸿宸ュ巶涓嬬殑杞﹂棿锛涚敤浜庢淳宸ヤ笌宸ヤ綅褰掑睘銆�',
+    },
+    {
       fieldName: 'orderSourceType',
       label: '璁㈠崟鏉ユ簮',
       component: 'Select',
@@ -127,6 +160,10 @@
           }
         },
       },
+      help: (values: { orderSourceType?: number }) =>
+        values.orderSourceType === MesProWorkOrderSourceTypeEnum.ORDER
+          ? '宸查�夊鎴疯鍗曪細闇�琛ュ厖鏉ユ簮鍗曟嵁缂栧彿涓庡鎴凤紝渚夸簬杩芥函璁㈠崟鏉ユ簮銆�'
+          : '鐢ㄤ簬鍖哄垎璁㈠崟涓氬姟褰掑睘锛涢�夈�屽鎴疯鍗曘�嶆椂鎵嶉渶鍏宠仈鏉ユ簮鍗曟嵁涓庡鎴枫��',
       rules: 'selectRequired',
     },
     {
@@ -142,6 +179,7 @@
         show: (values) =>
           values.orderSourceType === MesProWorkOrderSourceTypeEnum.ORDER,
       },
+      help: '濉啓涓婃父鍗曟嵁锛堝閿�鍞鍗曪級鐨勭紪鍙凤紝鐢ㄤ簬杩芥函璇ヨ鍗曠殑鏉ユ簮銆�',
     },
     {
       fieldName: 'type',
@@ -161,6 +199,11 @@
           }
         },
       },
+      help: (values: { type?: number }) =>
+        values.type === MesProWorkOrderTypeEnum.OUTSOURCE ||
+        values.type === MesProWorkOrderTypeEnum.PURCHASE
+          ? '宸查�夊澶�/閲囪喘鐢熶骇锛氶渶鎸囧畾渚涘簲鍟嗭紝濮斿鎶ュ伐涓庡叆搴撳皢鎸夎渚涘簲鍟嗙粨绠椼��'
+          : '鑷惀鐢熶骇鎸夋湰鍗曞伐搴忔帓浜э紱閫夈�屽澶栧姞宸ャ�嶆垨銆岄噰璐敓浜с�嶆椂闇�棰濆鎸囧畾渚涘簲鍟嗐��',
       rules: 'selectRequired',
     },
     {
@@ -171,6 +214,7 @@
         disabled: headerReadonly,
         placeholder: '璇烽�夋嫨浜у搧',
       },
+      help: '閫夋嫨浜у搧鍚庯紝宸ュ簭灏嗚嚜鍔ㄤ粠鍏跺伐鑹鸿矾绾垮甫鍑哄苟鎸夐渶璋冩暣锛涗骇鍝侀渶鍏堝湪銆屽伐鑹烘祦绋嬨�嶄腑閰嶇疆璺嚎涓庢姇鏂� BOM銆�',
       rules: 'selectRequired',
     },
     {
@@ -199,6 +243,7 @@
         show: (values) =>
           values.orderSourceType === MesProWorkOrderSourceTypeEnum.ORDER,
       },
+      help: '鍏宠仈瀹㈡埛鍚庯紝璁㈠崟鍙湪瀹㈡埛缁村害杩芥函骞跺鎺ュ悗缁粨绠椼��',
     },
     {
       fieldName: 'vendorId',
@@ -214,6 +259,7 @@
           values.type === MesProWorkOrderTypeEnum.OUTSOURCE ||
           values.type === MesProWorkOrderTypeEnum.PURCHASE,
       },
+      help: '濮斿/閲囪喘璁㈠崟闇�鎸囧畾渚涘簲鍟嗭紝濮斿鎶ュ伐涓庡叆搴撳潎浠ヨ渚涘簲鍟嗕负鍑嗐��',
     },
     {
       fieldName: 'batchCode',
@@ -235,6 +281,7 @@
         placeholder: '璇烽�夋嫨闇�姹傛棩鏈�',
         valueFormat: 'YYYY-MM-DD',
       },
+      help: '棰勮浜や粯/瀹屾垚鏃ユ湡锛岀敤浜庢帓浜с�佽繘搴﹁窡韪笌浜ゆ湡棰勮銆�',
       rules: 'required',
     },
     // {
@@ -262,6 +309,7 @@
         disabled: headerReadonly,
       },
       defaultValue: false,
+      help: '寮�鍚悗锛岀敓浜ф姤宸ユ彁浜ら渶缁忓鎵归�氳繃鎵嶈鍏ヤ骇閲忥紱鍏抽棴鍒欐姤宸ョ洿鎺ョ敓鏁堛��',
       rules: 'required',
     },
     {
@@ -285,6 +333,7 @@
           return undefined;
         },
       },
+      help: '閫夋嫨鎶ュ伐鎻愪氦鍚庤蛋鐨勫鎵规祦绋嬶紱娴佺▼闇�鍏堝湪绯荤粺銆屾祦绋嬬鐞嗐�嶄腑閮ㄧ讲锛屼粎銆屾姤宸ュ鎵广�嶇被娴佺▼鍙�夈��',
     },
 
     {
@@ -320,6 +369,32 @@
       componentProps: {
         allowClear: true,
         placeholder: '璇疯緭鍏ヨ鍗曞悕绉�',
+      },
+    },
+    {
+      fieldName: 'factoryId',
+      label: '宸ュ巶',
+      component: 'ApiSelect',
+      componentProps: {
+        allowClear: true,
+        api: getFactorySimpleList,
+        labelField: 'name',
+        placeholder: '璇烽�夋嫨宸ュ巶',
+        valueField: 'id',
+      },
+    },
+    {
+      fieldName: 'workshopId',
+      label: '杞﹂棿',
+      component: markRaw(MdWorkshopSelect),
+      componentProps: {
+        placeholder: '璇烽�夋嫨杞﹂棿',
+      },
+      dependencies: {
+        triggerFields: ['factoryId'],
+        componentProps: (values: { factoryId?: number }) => ({
+          factoryId: values.factoryId,
+        }),
       },
     },
     {
@@ -386,6 +461,16 @@
       minWidth: 150,
     },
     {
+      field: 'factoryName',
+      title: '宸ュ巶',
+      width: 120,
+    },
+    {
+      field: 'workshopName',
+      title: '杞﹂棿',
+      width: 120,
+    },
+    {
       field: 'type',
       title: '璁㈠崟绫诲瀷',
       width: 100,
@@ -439,11 +524,6 @@
       width: 100,
     },
     {
-      field: 'clientCode',
-      title: '瀹㈡埛缂栫爜',
-      width: 120,
-    },
-    {
       field: 'clientName',
       title: '瀹㈡埛鍚嶇О',
       width: 120,
@@ -451,6 +531,12 @@
     {
       field: 'requestDate',
       title: '闇�姹傛棩鏈�',
+      width: 180,
+      formatter: 'formatDate',
+    },
+    {
+      field: 'actualStartTime',
+      title: '瀹為檯寮�宸ユ椂闂�',
       width: 180,
       formatter: 'formatDate',
     },
@@ -464,13 +550,10 @@
       },
     },
     {
-      field: 'productionStatus',
-      title: '鐢熶骇鐘舵��',
+      field: 'started',
+      title: '寮�宸ョ姸鎬�',
       width: 100,
-      cellRender: {
-        name: 'CellDict',
-        props: { type: DICT_TYPE.ORDER_PRODUCTION_STATUS },
-      },
+      slots: { default: 'started' },
     },
     {
       field: 'processProgressList',
@@ -488,7 +571,7 @@
       field: 'createTime',
       title: '鍒涘缓鏃堕棿',
       width: 180,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       title: '鎿嶄綔',
@@ -606,11 +689,6 @@
       field: 'quantity',
       title: '璁㈠崟鏁伴噺',
       width: 100,
-    },
-    {
-      field: 'clientCode',
-      title: '瀹㈡埛缂栫爜',
-      width: 120,
     },
     {
       field: 'clientName',
@@ -763,6 +841,17 @@
       width: 160,
     },
     {
+      field: 'warehouseName',
+      title: '鎶ュ伐浠撳簱',
+      width: 130,
+      formatter: ({ cellValue, row }) => {
+        if (!cellValue) return '-';
+        return row.areaName
+          ? `${cellValue}/${row.locationName ?? ''}/${row.areaName}`
+          : cellValue;
+      },
+    },
+    {
       field: 'remark',
       title: '澶囨敞',
       minWidth: 120,

--
Gitblit v1.9.3