From 697c405ac874da346e74df40266763370355154d Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期六, 08 三月 2025 15:40:25 +0800
Subject: [PATCH] ASN单

---
 src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts |  136 ++++++++-------------------------------------
 1 files changed, 24 insertions(+), 112 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts
index 22dd283..fe8cd04 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts
@@ -7,25 +7,16 @@
  * @LastEditTime: 2024-10-23 20:48:14
  */
 
-import { Ref, h, ref, render, unref } from 'vue';
-import { GetEnum, SaveEntity, convertToTree, getEntity } from '/@/api/tigerapi/system';
+import { unref } from 'vue';
+import { GetEnum, getEntity } from '/@/api/tigerapi/system';
 import { useLocale } from '/@/locales/useLocale';
 import { useI18n } from '/@/hooks/web/useI18n';
-import { useMessage } from '/@/hooks/web/useMessage';
 import { useModal } from '/@/components/Modal';
 import { ActionItem, BasicColumn, FormSchema } from '/@/components/Table';
-import { useUserStore } from '/@/store/modules/user';
-import { buildUUID } from '/@/utils/uuid';
-import { SaveWoBatchInput } from '/@/api/tigerapi/model/mesModel';
-import { CustModalParams, FunctionType } from '/@/api/tigerapi/model/systemModel';
-import { SaveMesBatchWo } from '/@/api/tigerapi/mes/wo';
+import { CustModalParams } from '/@/api/tigerapi/model/systemModel';
 import { useForm } from '/@/components/Form/index';
-import { cloneDeep } from 'lodash-es';
-import { useProdRouteStore } from '/@/store/modules/prodRoute';
-import { Tag, Tooltip } from 'ant-design-vue';
 
 const { t } = useI18n();
-const { createErrorModal } = useMessage();
 const { getLocale } = useLocale();
 function _default() {
   const ActionColumn: BasicColumn = {
@@ -62,6 +53,9 @@
       });
       return data;
     },
+    /**
+     * @desc 鍒濆鍖栬〃鍗�
+     */
     GetUseForm: () => {
       return {
         forminfo: useForm({
@@ -108,8 +102,8 @@
       switch (param.cType) {
         case 'BIZ_MES_WO':
         case 'BIZ_MES_WO_Config':
-          return getWoFns[param.FnName](param) as Promise<any>;
-        // break;
+          //   return getWoFns[param.FnName](param) as Promise<any>;
+          break;
         default:
           return new Promise((resolve, reject) => {
             try {
@@ -266,101 +260,6 @@
   /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */
 
   /**
-   * @description: 鑷畾涔夋柟娉�
-   * @return {*}
-   */
-  const getWoFns: Record<string, FunctionType> = {
-    /**
-     * @description: 宸ュ崟閰嶇疆淇濆瓨鏂规硶
-     * @param {*} e
-     * @param {array} args
-     * @return {*}
-     */
-    SaveCofig: (param: CustModalParams) => {
-      return new Promise((resolve, reject) => {
-        try {
-          const form = param.values['prodinfo'];
-          const wo = param.values['mValues'];
-          const _wo = cloneDeep(wo);
-          _wo.ROUTE_STATUS = 1;
-          _wo.ROUTE_CODE = form.ROUTE_CODE;
-          SaveEntity(_wo, true, 'BIZ_MES_WO').then((action) => {
-            if (action.IsSuccessed) {
-              SP_MES_PROD2WO({ rotId: form.ROT_ID, wo: wo.ORDER_NO }).then((res) => {
-                if (!res.IsSuccessed) {
-                  SaveEntity(wo, true, 'BIZ_MES_WO');
-                }
-                resolve(res);
-              });
-            } else {
-              reject(action);
-            }
-          });
-        } catch {
-          reject(false);
-        }
-      });
-    },
-    /**
-     * @description: 宸ュ崟涓嬪彂淇濆瓨鏂规硶
-     * @param {CustModalParams} param
-     * @return {*}
-     */
-    SaveWoBatch: (param: CustModalParams) => {
-      return new Promise((resolve, reject) => {
-        try {
-          const form = param.values['forminfo'];
-          const wo = param.values['mValues'];
-          wo.STATUS = wo.STATUS == 3 ? wo.STATUS : 2;
-          let input: SaveWoBatchInput = {
-            Wo: wo,
-            WoBatch: {
-              ID: buildUUID(),
-              CREATE_TIME: new Date(),
-              CREATE_USER: useUserStore().getUserInfo.userId as string,
-              UPDATE_TIME: new Date(),
-              UPDATE_USER: useUserStore().getUserInfo.userId as string,
-              GHOST_ROW: false,
-              AUTH_ORG: useUserStore().getUserInfo.orgCode,
-              AUTH_PROD: useUserStore().getUserInfo.prodCode as string,
-              AUTH_WH: '',
-              ORDER_NO: wo.ORDER_NO,
-              STATUS: wo.STATUS,
-              ITEM_CODE: wo.ITEM_CODE,
-              CUST_CODE: wo.CUST_CODE,
-              FACTORY: wo.FACTORY,
-              WS_CODE: wo.WS_CODE,
-              ACT_LINE: form.ACT_LINE,
-              STD_WORKER_QTY: wo.STD_WORKER_QTY,
-              ACT_WORKER_QTY: wo.ACT_WORKER_QTY,
-              RELEASE_TIME: new Date(),
-              RELEASE_USER: useUserStore().getUserInfo.userId as string,
-              PLAN_QTY: form.RELEASE_QTY,
-              INPUT_QTY: wo.INPUT_QTY,
-              OUTPUT_QTY: wo.OUTPUT_QTY,
-              SCRAP_QTY: wo.SCRAP_QTY,
-              STOCK_IN_QTY: wo.STOCK_IN_QTY,
-              UPH: wo.UPH,
-              UPPH: wo.UPPH,
-              REMARK: wo.REMARK,
-              ACT_START_TIME: wo.ACT_START_TIME,
-              ACT_END_TIME: wo.ACT_END_TIME,
-              BATCH_NO: '',
-            },
-            IfToCust: form.IfToCust,
-          };
-          SaveMesBatchWo(input).then((action) => {
-            resolve(action);
-          });
-        } catch {
-          reject(false);
-        }
-      });
-    },
-    initRoute: () => {},
-  };
-
-  /**
    * @description: 璺宠浆鍒拌鎯呴〉闈㈡柟娉�
    * @param {Fn} go
    * @return {*}
@@ -374,6 +273,22 @@
       secondTabName: '閫佽揣鍗昐N', //'鏍囩杩囩▼鍙橀噺',
       firstTitle: '鏄庣粏',
       secondTitle: '', //'杩囩▼鍙橀噺',
+      Tabs: [
+        {
+          name: '閫佽揣鍗�(U9)',
+          tableTitle: '鏄庣粏',
+          entityName: 'BIZ_U9_ASN_DTL',
+          NeedInclude: true,
+          key: 'BIZ_U9_ASN_DTL',
+        },
+        {
+          name: '閫佽揣鍗昐N',
+          tableTitle: 'SN',
+          entityName: 'BIZ_U9_ASN_SN',
+          NeedInclude: true,
+          key: 'BIZ_U9_ASN_SN',
+        },
+      ],
       pageTitle: '閫佽揣鍗�(U9)璇︽儏', //璇︽儏椤甸潰鏍囬
       contentStr: '杩欓噷鏄�佽揣鍗�(U9)鏄庣粏绠$悊椤甸潰锛屽彲浠ユ樉绀洪�佽揣鍗�(U9)鐨勬墍鏈夋壒娆¤鎯�',
       detailName: `閫佽揣鍗昜${params['record'].ORDER_NO}]鎵规璇︽儏`,
@@ -387,9 +302,6 @@
     sessionStorage.setItem(`${id.SessionName}_params`, encodeURI(JSON.stringify(id)));
     go(`/BIZ_U9_ASN_DTL/${encodeURI(JSON.stringify({ sName: id.SessionName, Name: id.Name }))}`);
   }
-
- 
-
 
   const woformSchema: FormSchema[] = [
     {

--
Gitblit v1.9.3