From 787ccc59ba89bacc075562a161ecf02bc76ebadc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 24 七月 2026 17:15:53 +0800
Subject: [PATCH] 银川 1.采购申请添加入库状态查询条件

---
 src/views/erp/sale/order/data.ts |  173 +++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 111 insertions(+), 62 deletions(-)

diff --git a/src/views/erp/sale/order/data.ts b/src/views/erp/sale/order/data.ts
index 8f0cdcc..254f22a 100644
--- a/src/views/erp/sale/order/data.ts
+++ b/src/views/erp/sale/order/data.ts
@@ -1,16 +1,16 @@
 import type { VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 
-import { DICT_TYPE } from '../../../../packages/constants/src';
-import { getDictOptions } from '../../../../packages/effects/hooks/src';
-import { erpPriceInputFormatter } from '../../../../packages/utils/src';
+import { erpPriceInputFormatter } from '@vben/utils';
 
 import { z } from '#/adapter/form';
 import { getAccountSimpleList } from '#/api/erp/finance/account';
-import { getProductSimpleList } from '#/api/erp/product/product';
-import { getCustomerSimpleList } from '#/api/erp/sale/customer';
+import { getItemPage } from '#/api/mdm/item';
 import { getSimpleUserList } from '#/api/system/user';
 import { getRangePickerDefaultProps } from '#/utils';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
+
+import { markRaw } from 'vue';
 
 /** 琛ㄥ崟绫诲瀷 */
 export type FormType = 'create' | 'detail' | 'edit';
@@ -36,6 +36,35 @@
       },
     },
     {
+      fieldName: 'productionStatus',
+      label: '鐢熶骇鐘舵��',
+      component: 'Input',
+      dependencies: {
+        triggerFields: ['needProduction', 'productionStatus'],
+        show: (values) => {
+          return formType === 'detail' && values.needProduction === 1;
+        },
+      },
+      componentProps: {
+        disabled: true,
+      },
+      slots: { default: 'productionStatus' },
+    },
+    {
+      fieldName: 'productionFinishTime',
+      label: '鐢熶骇瀹屾垚鏃堕棿',
+      component: 'Input',
+      dependencies: {
+        triggerFields: ['productionStatus'],
+        show: (values) => {
+          return formType === 'detail' && values.productionStatus === 1;
+        },
+      },
+      componentProps: {
+        disabled: true,
+      },
+    },
+    {
       fieldName: 'orderTime',
       label: '璁㈠崟鏃堕棿',
       component: 'DatePicker',
@@ -50,14 +79,10 @@
     {
       label: '瀹㈡埛',
       fieldName: 'customerId',
-      component: 'ApiSelect',
+      component: markRaw(CrmCustomerSelect),
       componentProps: {
         placeholder: '璇烽�夋嫨瀹㈡埛',
         allowClear: true,
-        showSearch: true,
-        api: getCustomerSimpleList,
-        labelField: 'name',
-        valueField: 'id',
       },
       rules: 'required',
     },
@@ -86,23 +111,13 @@
       formItemClass: 'col-span-2',
     },
     {
-      fieldName: 'fileUrl',
+      fieldName: 'blobIds',
       label: '闄勪欢',
       component: 'FileUpload',
       componentProps: {
-        maxNumber: 1,
-        maxSize: 10,
-        accept: [
-          'pdf',
-          'doc',
-          'docx',
-          'xls',
-          'xlsx',
-          'txt',
-          'jpg',
-          'jpeg',
-          'png',
-        ],
+        valueKey: 'id',
+        maxNumber: 10,
+        multiple: true,
         showDescription: formType !== 'detail',
         disabled: formType === 'detail',
       },
@@ -192,20 +207,36 @@
       slots: { default: 'productId' },
     },
     {
+      field: 'productSpecification',
+      title: '瑙勬牸鍨嬪彿',
+      minWidth: 120,
+    },
+    {
       field: 'stockCount',
       title: '搴撳瓨',
       minWidth: 80,
       formatter: 'formatAmount3',
     },
     {
-      field: 'productBarCode',
-      title: '鏉$爜',
-      minWidth: 120,
-    },
-    {
       field: 'productUnitName',
       title: '鍗曚綅',
       minWidth: 80,
+    },
+    {
+      field: 'productUnitName2',
+      title: '杈呭崟浣�1',
+      minWidth: 80,
+    },
+    {
+      field: 'productUnitName3',
+      title: '杈呭崟浣�2',
+      minWidth: 80,
+    },
+    {
+      field: 'needProduction',
+      title: '闇�瑕佺敓浜�',
+      minWidth: 100,
+      slots: { default: 'needProduction' },
     },
     {
       field: 'remark',
@@ -257,7 +288,7 @@
     },
     {
       title: '鎿嶄綔',
-      width: 50,
+      width: 80,
       fixed: 'right',
       slots: { default: 'actions' },
       visible: !disabled,
@@ -285,7 +316,10 @@
         placeholder: '璇烽�夋嫨浜у搧',
         allowClear: true,
         showSearch: true,
-        api: getProductSimpleList,
+        api: async () => {
+          const res = await getItemPage({ pageNo: 1, pageSize: 100, status: 0 });
+          return res.list || [];
+        },
         labelField: 'name',
         valueField: 'id',
       },
@@ -302,14 +336,10 @@
     {
       fieldName: 'supplierId',
       label: '瀹㈡埛',
-      component: 'ApiSelect',
+      component: markRaw(CrmCustomerSelect),
       componentProps: {
         placeholder: '璇烽�夋嫨瀹㈡埛',
         allowClear: true,
-        showSearch: true,
-        api: getCustomerSimpleList,
-        labelField: 'name',
-        valueField: 'id',
       },
     },
     {
@@ -330,7 +360,11 @@
       label: '鐘舵��',
       component: 'Select',
       componentProps: {
-        options: getDictOptions(DICT_TYPE.ERP_AUDIT_STATUS, 'number'),
+        options: [
+          { label: '鏈鏍�', value: 10 },
+          { label: '宸插鏍�', value: 20 },
+          { label: '宸蹭綔搴�', value: 30 },
+        ],
         placeholder: '璇烽�夋嫨鐘舵��',
         allowClear: true,
       },
@@ -351,24 +385,25 @@
       componentProps: {
         options: [
           { label: '鏈嚭搴�', value: 0 },
-          { label: '閮ㄥ垎鍑哄簱', value: 1 },
-          { label: '鍏ㄩ儴鍑哄簱', value: 2 },
+          { label: '宸查鐣�', value: 1 },
+          { label: '閮ㄥ垎鍑哄簱', value: 2 },
+          { label: '鍏ㄩ儴鍑哄簱', value: 3 },
         ],
         placeholder: '璇烽�夋嫨鍑哄簱鐘舵��',
         allowClear: true,
       },
     },
     {
-      fieldName: 'returnStatus',
-      label: '閫�璐х姸鎬�',
+      fieldName: 'productionStatus',
+      label: '鐢熶骇鐘舵��',
       component: 'Select',
       componentProps: {
         options: [
-          { label: '鏈��璐�', value: 0 },
-          { label: '閮ㄥ垎閫�璐�', value: 1 },
-          { label: '鍏ㄩ儴閫�璐�', value: 2 },
+          { label: '鏃犻渶鐢熶骇', value: -1 },
+          { label: '鏈畬鎴�', value: 0 },
+          { label: '宸插畬鎴�', value: 1 },
         ],
-        placeholder: '璇烽�夋嫨閫�璐х姸鎬�',
+        placeholder: '璇烽�夋嫨鐢熶骇鐘舵��',
         allowClear: true,
       },
     },
@@ -388,6 +423,7 @@
       title: '璁㈠崟鍗曞彿',
       width: 200,
       fixed: 'left',
+      slots: { default: 'no' },
     },
     {
       field: 'productNames',
@@ -399,6 +435,12 @@
       field: 'customerName',
       title: '瀹㈡埛',
       minWidth: 120,
+    },
+    {
+      field: 'contractNo',
+      title: '鍏宠仈鍚堝悓',
+      minWidth: 150,
+      slots: { default: 'contractNo' },
     },
     {
       field: 'orderTime',
@@ -414,18 +456,6 @@
     {
       field: 'totalCount',
       title: '鎬绘暟閲�',
-      formatter: 'formatAmount3',
-      minWidth: 120,
-    },
-    {
-      field: 'outCount',
-      title: '鍑哄簱鏁伴噺',
-      formatter: 'formatAmount3',
-      minWidth: 120,
-    },
-    {
-      field: 'returnCount',
-      title: '閫�璐ф暟閲�',
       formatter: 'formatAmount3',
       minWidth: 120,
     },
@@ -448,13 +478,32 @@
       minWidth: 120,
     },
     {
+      field: 'outStatus',
+      title: '鍑哄簱鐘舵��',
+      minWidth: 100,
+      fixed: 'right',
+      slots: { default: 'outStatus' },
+    },
+    {
+      field: 'productionStatus',
+      title: '鐢熶骇鐘舵��',
+      minWidth: 100,
+      fixed: 'right',
+      slots: { default: 'productionStatus' },
+    },
+    {
       field: 'status',
       title: '鐘舵��',
-      minWidth: 120,
-      cellRender: {
-        name: 'CellDict',
-        props: { type: DICT_TYPE.ERP_AUDIT_STATUS },
-      },
+      minWidth: 100,
+      fixed: 'right',
+      slots: { default: 'status' },
+    },
+    {
+      field: 'needProduction',
+      title: '闇�瑕佺敓浜�',
+      minWidth: 100,
+      fixed: 'right',
+      slots: { default: 'needProduction' },
     },
     {
       title: '鎿嶄綔',

--
Gitblit v1.9.3