From c2cbdb583fe34643c5dfde10bd1d51573887fb8e Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期日, 16 十一月 2025 18:35:34 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs            |    8 +-
 项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue                               |   15 ++--
 项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js                          |  104 ++++++++++++++++++++++++++++++++--
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/MaterielGroupDTO.cs                  |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs |    2 
 项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js                            |   16 ++--
 项目代码/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue                             |   15 ++--
 7 files changed, 126 insertions(+), 36 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
index 51aa666..b052afb 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
@@ -113,19 +113,19 @@
     const getWarehouseList = async () => {
       isLoadingWarehouses.value = true;
       try {
-        const { data, status } = await http.post('/api/Warehouse/GetWarehouseTypes'); 
+        const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes'); 
         if (status && Array.isArray(data)) {
           // 鏍煎紡鍖栦粨搴撻�夐」锛氶�傞厤ElSelect鐨刲abel-value鏍煎紡
           warehouses.value = data.map(item => ({
-            label: item.warehouseTypeDesc,
-            value: item.warehouseType  
+            label: item.locationTypeDesc,
+            value: item.locationType  
           }));
         } else {
-          ElMessage.error('鑾峰彇浠撳簱鍒楄〃澶辫触');
+          ElMessage.error('鑾峰彇鍖哄煙鍒楄〃澶辫触');
           warehouses.value = [];
         }
       } catch (err) {
-        ElMessage.error('浠撳簱鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
+        ElMessage.error('鍖哄煙鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
         warehouses.value = [];
       } finally {
         isLoadingWarehouses.value = false;
@@ -202,19 +202,19 @@
             { required: true, message: '璇疯緭鍏ユ枡绠辩爜', trigger: ['blur', 'enter'] }
           ],
           warehouseCode:[
-            { required: true, message: '璇烽�夋嫨浠撳簱', trigger: ['change', 'blur'] }
+            { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
           ]
         },
         ref: 'batchInForm'
       }, [
         //浠撳簱鏁版嵁
-        h(ElFormItem, { label: '浠撳簱', prop: 'warehouseCode', required: true }, [
+        h(ElFormItem, { label: '鍖哄煙', prop: 'warehouseCode', required: true }, [
           h(ElSelect, {
             modelValue: formData.warehouseCode,
             'onUpdate:modelValue': (val) => {
               formData.warehouseCode = val;
             },
-            placeholder: '璇烽�夋嫨鍏ュ簱浠撳簱',
+            placeholder: '璇烽�夋嫨鍏ュ簱鍖哄煙',
             filterable: true, // 鏀寔鎼滅储浠撳簱
             loading: isLoadingWarehouses.value, // 鍔犺浇鐘舵��
             style: { width: '100%' }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
index 3c1e490..e868e4d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
@@ -1,7 +1,7 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 import http from '@/api/http.js'
-import { h,createVNode, render,reactive  } from 'vue';
+import { h,createVNode, render,reactive ,ref } from 'vue';
 import { ElDialog , ElForm, ElFormItem, ElInput, ElButton, ElMessage ,ElSelect, ElOption} from 'element-plus';
 
 import gridBody from './extend/outOrderDetail.vue'
@@ -55,13 +55,45 @@
       return { label: `绔欏彴${num}`, value: `1-2` };
     });
 
+    const quantityOptions = Array.from({ length: 6 }, (_, i) => ({
+      label: (i + 1).toString(), 
+      value: i + 1 
+    }));
+
+    const warehouseOptions = ref([]);
+    const isLoadingWarehouses = ref(false);
+
+    const getWarehouseList = async () => {
+      isLoadingWarehouses.value = true;
+      try {
+        const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes'); 
+        if (status && Array.isArray(data)) {
+          // 鏍煎紡鍖栦粨搴撻�夐」锛氶�傞厤ElSelect鐨刲abel-value鏍煎紡
+          warehouseOptions.value = data.map(item => ({
+            label: item.locationTypeDesc,
+            value: item.locationType  
+          }));
+        } else {
+          ElMessage.error('鑾峰彇鍖哄煙鍒楄〃澶辫触');
+          warehouseOptions.value = [];
+        }
+      } catch (err) {
+        ElMessage.error('鍖哄煙鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
+        warehouseOptions.value = [];
+      } finally {
+        isLoadingWarehouses.value = false;
+      }
+    };
+
     const mountNode = document.createElement('div');
     document.body.appendChild(mountNode);
 
     
     const formData = reactive({
+      warehouseCode:'',
       palletCode: '',
-      selectedPlatform: platformOptions[0].value 
+      selectedPlatform: platformOptions[0].value,
+      quantity:1 
     });
 
     const vnode = createVNode(ElDialog, {
@@ -69,6 +101,11 @@
       width: '500px', 
       modelValue: true,
       appendToBody: true,
+      onOpened: async () => {
+        await getWarehouseList();
+        const inputRef = vnode.component.refs.boxCodeInput;
+        inputRef?.focus();
+      },
       'onUpdate:modelValue': (isVisible) => {
         if (!isVisible) {
           render(null, mountNode);
@@ -83,20 +120,49 @@
       default: () => h(ElForm, {
         model: formData,
         rules: {
+          warehouseCode:[
+            { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
+          ],
           palletCode: [
             { type: 'string', message: '鏂欑鍙峰繀椤讳负瀛楃涓�', trigger: 'blur' }
           ],
           selectedPlatform: [
             { required: true, message: '璇烽�夋嫨鍑哄簱绔欏彴', trigger: 'change' }
-          ]
+          ],
+          quantity:[
+            { required: true, message: '璇烽�夋嫨绌虹鏁伴噺', trigger: 'change'}
+          ]                       
         },
         ref: 'batchOutForm',
         labelWidth: '100px', 
         style: {
           padding: '0 30px', 
         }
-      }, [
-        
+       }, 
+       [
+      //   h(ElFormItem, {
+      //     label: '浠撳簱鍖哄煙',
+      //     prop: 'warehouseCode',
+      //     style: {
+      //       marginBottom: '24px' 
+      //     }
+      //   }, [
+      //     h(ElSelect, {
+      //       placeholder: '璇烽�夋嫨浠撳簱鍖哄煙',
+      //       modelValue: formData.warehouseCode,
+      //       'onUpdate:modelValue': (val) => {
+      //         formData.warehouseCode = val;
+      //       },
+      //       style: {
+      //         width: '100%',
+      //         height: '40px', 
+      //         borderRadius: '4px',
+      //         borderColor: '#dcdfe6'
+      //       }
+      //     }, warehouseOptions.value.map(platform => 
+      //       h(ElOption, { label: platform.label, value: platform.value })
+      //     ))
+      //   ]),
         h(ElFormItem, {
           label: '鍑哄簱绔欏彴',
           prop: 'selectedPlatform',
@@ -120,7 +186,33 @@
             h(ElOption, { label: platform.label, value: platform.value })
           ))
         ]),
-        
+      //   h(ElFormItem,{
+      //     label:'鍑哄簱鏁伴噺',
+      //     prop:'quantity',
+      //     style:{
+      //       marginBottom:'24px'
+      //     }
+      //   },[h(ElSelect,{
+      //     placeholder:'璇烽�夋嫨绌虹鏁伴噺',
+      //     modelValue:formData.quantity,
+      //     'onUpdate:modelValue':(val)=>{
+      //       formData.quantity=val;
+      //     },
+      //     style:{
+      //       width:'100%',
+      //       height:'40px',
+      //       borderRadius:'4px',
+      //       borderColor:'#dcdfe6'
+      //     },
+      //     filterable:false
+      //   },
+      //   quantityOptions.map(option=>
+      //     h(ElOption,{
+      //       label:option.label,
+      //       value:option.value
+      //     })
+      //   )
+      // )]),                                 
         h(ElFormItem, {
           label: '鏂欑鍙�',
           prop: 'palletCode',
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
index ea17874..8dfd2f1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
@@ -142,14 +142,6 @@
         align: "left",
       },
       {
-          field: "warehouseId",
-          title: "浠撳簱",
-          type: "string",
-          width: 90,
-          align: "left",
-          bind:{key: "warehouses", data: []}
-      },
-      {
         field: "orderType",
         title: "鍗曟嵁绫诲瀷",
         type: "string",
@@ -182,6 +174,13 @@
         bind: { key: "createType", data: [] },
       },
       {
+        field: "factoryArea",
+        title: "鍘傚尯",
+        type: "string",
+        width: 120,
+        align: "left"
+      },
+      {
         field: "creater",
         title: "鍒涘缓浜�",
         type: "string",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 005b6d7..270d8d1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -147,14 +147,6 @@
         align: "left",
       },
       {
-        field: "warehouseId",
-        title: "浠撳簱",
-        type: "string",
-        width: 90,
-        align: "left",
-        bind:{key: "warehouses", data: []}
-      },
-      {
         field: "orderNo",
         title: "鍗曟嵁缂栧彿",
         type: "string",
@@ -202,6 +194,13 @@
         bind: { key: "createType", data: [] },
       },
       {
+        field: "factoryArea",
+        title: "鍘傚尯",
+        type: "string",
+        width: 120,
+        align: "left"
+      },
+      {
         field: "departmentCode",
         title: "淇敼鏃堕棿",
         type: "string",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/MaterielGroupDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/MaterielGroupDTO.cs"
index a00add4..85d33d3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/MaterielGroupDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/MaterielGroupDTO.cs"
@@ -46,6 +46,6 @@
         [PropertyValidate("鎵樼洏缂栧彿", NotNullAndEmpty = true)]
         public string PalletCode { get; set; }
 
-        public string WarehouseCode { get; set; }
+        public int WarehouseCode { get; set; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index b3faa42..d9e296f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -419,12 +419,12 @@
 
             WebResponseContent content = new WebResponseContent();
             try
-            {
+            {                                           
                 (bool, string, object?) result2 = ModelValidate.ValidateModelData(materielGroupDTO);
                 if (!result2.Item1) return content = WebResponseContent.Instance.Error(result2.Item2);
 
-                var code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().Where(x => x.Code == materielGroupDTO.WarehouseCode).Select(x => x.Code).First();
-                if (string.IsNullOrEmpty(code))
+                bool code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().Where(x => x.Id == materielGroupDTO.WarehouseCode).Any();
+                if (!code)
                 {
                     return content = WebResponseContent.Instance.Error($"浠撳簱涓病鏈夎{materielGroupDTO.WarehouseCode}缂栧彿銆�");
                 }
@@ -448,7 +448,7 @@
                 {
                     if (stockInfo == null)
                     {
-                        stockInfo = new Dt_StockInfo() { PalletType = PalletTypeEnum.Empty.ObjToInt(), StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(), PalletCode = materielGroupDTO.PalletCode,LocationType=1 };
+                        stockInfo = new Dt_StockInfo() { PalletType = PalletTypeEnum.Empty.ObjToInt(), StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(), PalletCode = materielGroupDTO.PalletCode,LocationType= materielGroupDTO.WarehouseCode.ObjToInt() };
                         stockInfo.Details = new List<Dt_StockInfoDetail>();
                     }
                     else
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 8b54df6..b145422 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -25,7 +25,7 @@
         }
 
 
-        [HttpPost, Route("PalletOutboundTask"), AllowAnonymous, MethodParamsValidate]
+        [HttpPost, Route("PalletOutboundTask"), AllowAnonymous, MethodParamsValidate]                           
         public async Task<WebResponseContent> PalletOutboundTask(string endStation, string palletCode = "")
         {
              

--
Gitblit v1.9.3