Jelajahi Sumber

update: 半成品领料单出库增加分录号

xyh 2 tahun lalu
induk
melakukan
38cf3a97c6

+ 2 - 0
packages/app/src/models/request/semiManufactures.ts

@@ -91,6 +91,8 @@ export type SemiManufacturesOutParams = {
   wbs: string;
   /** 所属库位id */
   storageLocationCode: string;
+  /** 分录号 */
+  entryNumber: string;
 };
 
 /** 产成品/半成品出库物料列表 */

+ 11 - 5
packages/app/src/pages/semi-draw/table/put-out-modal/hooks.ts

@@ -38,9 +38,8 @@ function useData(id: string) {
           exact: false,
         },
       );
-      if (!data) {
+      if (!data)
         return void 0;
-      }
 
       return data.find(val => val.id === id);
     },
@@ -91,11 +90,17 @@ export function useFormState({
   const userId = useStore(userStore, state => String(state.id));
 
   const onSubmit = handleSubmit(function({location, outNum}) {
-    if (!data) {
+    if (!data)
       return message.error('未获取到领料单信息');
-    }
 
-    const {companyNumber, wbs, materialId, askGoodsId, materialCode} = data;
+    const {
+      companyNumber,
+      wbs,
+      materialId,
+      askGoodsId,
+      materialCode,
+      entryNumber,
+    } = data;
 
     mutate({
       companyNumber,
@@ -106,6 +111,7 @@ export function useFormState({
       wllbCode: materialCode,
       storageLocationCode: location,
       userId,
+      entryNumber,
     });
   });
 

+ 1 - 1
packages/app/src/utils/constants.ts

@@ -32,7 +32,7 @@ export const MODAL_PAGE_SIZE_LIST = ['5', ...PAGE_SIZE_LIST];
 /** 请求域名 */
 export const NETWORK_URL
   = process.env.NODE_ENV === 'development'
-    ? 'http://192.168.0.118:9560'
+    ? 'http://192.168.0.147:9560'
     : 'http://10.2.111.91:9560';
 export const E2E_NETWORK_URL = 'http://e2e.test.cn';
 /** 导出错误提示 */