From 3e049efc6eb3970bb200058e41468f0a38de1a7e Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 20 一月 2026 16:14:09 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI

---
 src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue |   93 +++++++++++++++++++++++++++++-----------------
 1 files changed, 58 insertions(+), 35 deletions(-)

diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
index 27e7491..587d8a0 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
@@ -3,7 +3,7 @@
         <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
             <el-button type="primary" @click="onClickMethod_BarCodeProduce" :disabled="disabledFlag_BarCodeProduce">鐢熸垚</el-button>
             <el-button type="primary" @click="get_PrintReport">鎵撳嵃</el-button>
-            <!-- <el-button type="primary" @click="close">閫� 鍑�</el-button> -->
+            <el-button type="primary" @click="get_BarCodeBillList">鏉$爜妗f</el-button>
         </div>
         <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">鏉$爜鐢熸垚</div>
         <el-form :model="initMainData" label-width="80px">
@@ -222,7 +222,8 @@
                 ,HReInspectionDate:null                                 //澶嶆鏃ユ湡
                 ,HPOOrderBillMTO:""                                     //閲囪喘璺熻釜鍙�
                 ,HSeOrderBillNo:""                                      //瀹㈡埛璁㈠崟鍙�
-                ,HCusModel:""                                       //浜у搧鍨嬪彿
+                ,HCusModel:""                                           //浜у搧鍨嬪彿
+                ,HMTONo:null                                            //璁″垝璺熻釜鍙�
                 
                 ,HOrganizationID:0                                      //缁勭粐ID
                 ,HOrganization:""                                       //缁勭粐鍚嶇О
@@ -290,13 +291,13 @@
     },
     async created() {
         await this.loging();                                            //鑷姩鐧诲綍
-        this.judgeIsLoging();                                           //鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
+        await this.judgeIsLoging();                                           //鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
         await this.get_OrganizationList();                              //椤甸潰鍒濆鍖� 鑾峰彇缁勭粐涓嬫媺鍒楄〃鏁版嵁
         await this.initPageData();                                      //椤甸潰鍒濆鍖�
     },
     methods: {
         //#region 鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
-        judgeIsLoging(){
+        async judgeIsLoging(){
             if (sessionStorage["login"] != "login") {
                 this.$modal.msgError("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛侊紒");
                 this.$router.push({ path: "/" }).catch(() => { })
@@ -305,7 +306,7 @@
         //#endregion
 
         //#region 椤甸潰鍒濆鍖�
-        initPageData(){
+        async initPageData(){
             var params = this.get_UrlVars();
             var OperationType = params[params[0]];      //鎿嶄綔绫诲瀷
 
@@ -323,7 +324,7 @@
 
         //#region 鑾峰彇缁勭粐涓嬫媺鍒楄〃鏁版嵁
         async get_OrganizationList() {
-            axios.get(this.baseURL + '/Web/GetOrganizations',{async:false}).then(response => {
+            axios.get(this.$baseUrl + '/Web/GetOrganizations',{async:false}).then(response => {
                 let result = response.data
                 if (result.count == 1) {
                     var data = result.data;
@@ -428,6 +429,13 @@
                 return Result = false;
             }
 
+            var regex = /^\d{4}-\d{2}-\d{2}$/;                              //姝e垯琛ㄨ揪寮忥細鏍¢獙 yyyy-MM-dd
+            temp = this.initMainData.HInspectionDate;
+            if(!regex.test(temp)){
+                this.$modal.msgError("璇疯缃敓浜ф棩鏈燂紒锛侊紒");
+                return Result = false;
+            }
+
             // var HEndQty = this.initMainData.HEndQty;
             // if (HEndQty == "") {
             //     this.$modal.msgError("灏惧寘鏁伴噺涓嶈兘涓虹┖锛侊紒");
@@ -519,6 +527,7 @@
                     , "HReInspectionDate": this.initMainData.HReInspectionDate
                     , "HPOOrderBillMTO": this.initMainData.HPOOrderBillMTO
                     , "HSeOrderBillNo": this.initMainData.HSeOrderBillNo
+                    , "HMTONo": this.initMainData.HMTONo
                 }
             ]
 
@@ -553,6 +562,12 @@
         },
         //#endregion
 
+        //#region 鏉$爜妗f鎸夐挳鐐瑰嚮浜嬩欢
+        get_BarCodeBillList(){
+            this.$router.push({ path: "/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin" }).catch(() => { });
+        },
+        //#endregion
+
         //#region 鏉$爜鍒楄〃澶嶉�夋閫夋嫨鐘舵�佸彉鏇寸洃鍚簨浠�
         onSelectionChange_BarCode(selection){
             this.selectedData_BarCode = selection;
@@ -577,7 +592,7 @@
             var res = "none";
             var sql = "select * from h_v_IF_POInStockBillList_Source where 1=1 and HMainID = " + HSourceInterID + " and HSubID = " + HSourceEntryID;
             var ModRightNameCheck = "";
-            return axios.get(this.baseURL + '/CommonModel/searchMethod', {
+            return axios.get(this.$baseUrl + '/CommonModel/searchMethod', {
                 async:false,
                 params: {
                     "sql": sql
@@ -655,6 +670,7 @@
             this.initMainData.HPOOrderBillMTO = dataArray[0].閲囪喘璺熻釜鍙�;
             this.initMainData.HSeOrderBillNo = dataArray[0].瀹㈡埛璁㈠崟鍙�;
             this.initMainData.HCusModel = dataArray[0].浜у搧鍨嬪彿;
+            this.initMainData.HMTONo = dataArray[0].璁″垝璺熻釜鍙�;
             this.initMainData.HMinQty = 0;
             if(this.initMainData.HMinQty>0){
                 this.initMainData.HBQty = (this.initMainData.HQty_SourceBill / this.initMainData.HMinQty) + (this.initMainData.HQty_SourceBill%this.initMainData.HMinQty == 0?0:1);
@@ -671,7 +687,7 @@
         SaveBarCodeCreate(sMainSub, CampanyName) {
             axios({
                 method: 'post',
-                url: this.baseURL + "/Sc_BarCode/Sub_SaveBill_JinLong",
+                url: this.$baseUrl + "/Sc_BarCode/Sub_SaveBill_JinLong",
                 data: {
                     "msg": sMainSub, "CampanyName": CampanyName
                 },
@@ -710,7 +726,7 @@
             var HPwdWord = params[params[6]];               //鐧诲綍瀵嗙爜
             var HOrgID = params[params[7]];                 //缁勭粐id
             var HOrgName = "";
-
+            
             if (HOrgID == 0) {
                 //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
                 if (sessionStorage.login != "login") {
@@ -722,44 +738,50 @@
 
             var sql_getHOrgName = "select HName from Xt_Organizations where HItemID = " + HOrgID;
             var ModRightNameCheck = "";
-            axios.get(this.baseURL + "/CommonModel/searchMethod", {
+            try{
+            let response = await axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
                 params: { 
                     "sql": sql_getHOrgName
                     , "user": HUserName
                     , "ModRightNameCheck": ModRightNameCheck
                 }
-            }).then(response => {
-                var data1 = response.data
-                if (data1.count == 1) {
-                    if (data1.data.length > 0) {
-                        HOrgName = data1.data[0]["HName"];
-                    } else {
-                        this.$modal.msgError("鐧诲綍澶辫触锛侊紒缁勭粐涓嶅瓨鍦紝璇烽噸鏂扮櫥褰曪紒锛�");
-                        this.$router.push({ path: "/" }).catch(() => { })
-                    }
-                }
-                else {
-                    this.$modal.msgError(data1.code + data1.Message);
+            })
+            
+            var data1 = response.data
+            if (data1.count == 1) {
+                if (data1.data.length > 0) {
+                    HOrgName = data1.data[0]["HName"];
+                } else {
+                    this.$modal.msgError("鐧诲綍澶辫触锛侊紒缁勭粐涓嶅瓨鍦紝璇烽噸鏂扮櫥褰曪紒锛�");
                     this.$router.push({ path: "/" }).catch(() => { })
                 }
-            }).catch(error => {
+            }
+            else {
+                this.$modal.msgError(data1.code + data1.Message);
+                this.$router.push({ path: "/" }).catch(() => { })
+            }
+            }catch(error){
                 this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
                 this.$router.push({ path: "/" }).catch(() => { })
-            });
+            };
 
+
+            // 鍐欏叆sessionStorage 闇�瑕佹椂闂达紝鍚庣画鎿嶄綔闇�瑕佺瓑寰� 鍐欏叆sessionStorage瀹屾垚鍚庡啀鎵ц
             var sql_login = "select * from h_v_Gy_Czygl_Login where Czymc = '" + HUserName + "'";
-            axios.get(this.baseURL + "/CommonModel/searchMethod", {
-                params: { 
-                    "sql": sql_login
-                    , "user": HUserName
-                    , "ModRightNameCheck": ""
-                }
-            }).then(response => {
-                var data1 = response.data
+            try{
+                let res =  await axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
+                    params: { 
+                        "sql": sql_login
+                        , "user": HUserName
+                        , "ModRightNameCheck": ""
+                    }
+                })
+            
+            
+                var data1 = res.data
                 if (data1.count == 1) {
                     if (data1.data.length > 0) {
                         HUserName = data1.data[0]["Czybm"];
-
                         var result = data1;
                         sessionStorage["HCloudUserName"] = result.data[0].HCloudUserName;//閲戣澏浜戣处鍙�
                         sessionStorage["HCloudUserPsd"] = result.data[0].HCloudUserPsd;
@@ -803,6 +825,7 @@
                         sessionStorage["Organization"] = HOrgName;
                         sessionStorage["HTranSlate"] = "1";
                         sessionStorage["HAutoLogin"] = "1";
+
                     } else {
                         this.$modal.msgError("鍔犺浇澶辫触锛侊紒璐﹀彿涓嶅瓨鍦紝璇疯仈绯荤鐞嗗憳缁存姢璐﹀彿淇℃伅锛侊紒");
                         this.$router.push({ path: "/" }).catch(() => { });
@@ -811,10 +834,10 @@
                     this.$modal.msgError("鐧诲綍澶辫触!!"+result.Message);
                     this.$router.push({ path: "/" }).catch(() => { })
                 }
-            }).catch(error => {
+            }catch(error){
                 this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
                 this.$router.push({ path: "/" }).catch(() => { })
-            });
+            };
         },
         //#endregion
     }

--
Gitblit v1.9.1