From 14b1756e21ba4401ce5916f035576804f4be5878 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期四, 20 三月 2025 17:25:34 +0800
Subject: [PATCH] 1.样式更新

---
 H5/Js/LLJ/Add.js |  178 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 158 insertions(+), 20 deletions(-)

diff --git a/H5/Js/LLJ/Add.js b/H5/Js/LLJ/Add.js
index a6621c6..0e60a53 100644
--- a/H5/Js/LLJ/Add.js
+++ b/H5/Js/LLJ/Add.js
@@ -28,6 +28,8 @@
             tableData: [],//杩斿洖鐨勬楠岄」鐩�
             jymxData: [],//灞曠ず鐨勬楠岄」鐩�
 
+            okNum:'',//鍚堟牸鏁�
+            ngNum: '',//涓嶅悎鏍兼暟
             ttrre: false,
             show: false,
             tableMxData: [],
@@ -35,8 +37,8 @@
             inputValue: '',//鐗瑰緛鍊艰緭鍏�
             resultValue: '',//妫�楠岀粨鏋滃綍鍏�
             showButton: false,//鍙充笂瑙掕彍鍗曡Е鍙�
-            okValue: '',
-            ngValue: ''
+            okValue: '',//OK-鏁伴噺
+            ngValue: ''//NG-鏁伴噺
         }
     },
     mounted() {
@@ -51,6 +53,23 @@
         this.init();
     },
     methods: {
+        // 杈撳叆杩囨护
+        handleNumberInput1(value) {
+            // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛�
+            this.okValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗�
+                .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0
+        },
+        handleNumberInput2(value) {
+            // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛�
+            this.ngValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗�
+                .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0
+        },
+        handleNumberInput3(value) {
+            this.inputValue = value.replace(/[^\d.]/g, '')  // 1. 鍘婚櫎闈炴暟瀛楀拰灏忔暟鐐�
+                .replace(/(\..*)\./g, '$1')               // 2. 绂佹澶氫釜灏忔暟鐐�
+                .replace(/^\./g, '');    
+        },
+
         togglePopup(index) {
             // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
             var that = this;
@@ -66,6 +85,15 @@
             }, true, 1).then(function (res1) {
                 if (res1.rtnCode == 1) {
                     that.tableMxData = res1.rtnData;
+                    // 缁熻鍚堟牸鏁板拰涓嶅悎鏍兼暟
+                    const list = res1.rtnData?.list || []; // 纭繚 list 鏄暟缁勶紝閬垮厤 undefined 閿欒
+                    const okNum = list.filter(item => item.fstand === '鈭�').length;
+                    const ngNum = list.length - okNum;
+
+                    // 灏嗙粨鏋滀繚瀛樺埌鎸囧畾鍙橀噺锛堝 that 鐨勬垚鍛樺睘鎬э級
+                    that.okNum = okNum;
+                    that.ngNum = ngNum;
+
                 } else {
                     that.$toast.fail(res1.rtnMsg);
                 }
@@ -77,11 +105,113 @@
 
         },
 
-        handleTabClick() {
-            console.log(this.tabActive)
-            this.togglePopup(this.tabActive)
+        getInputOK() {
+            var that = this;
+            var jys = that.tableData[that.tabActive].checkQyt;//妫�楠岄」鐩殑妫�楠屾暟
+            if (jys < that.okValue) {
+                that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
+                that.okValue = null;
+                //that.$refs.okValue.focus();
+                return;
+            }
+            // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+            var resultValue = "OK-" + this.okValue;
+            this.getInput(resultValue);
+            that.okValue = null;
+        },
+        getInputNG() {
+            var that = this;
+            var jys = that.tableData[that.tabActive].checkQyt;//妫�楠岄」鐩殑妫�楠屾暟
+            if (jys < that.ngValue) {
+                that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
+                that.ngValue = null;
+                //that.$refs.ngValue.focus();
+                return;
+            }
+            // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+            var resultValue = "NG-" + this.ngValue;
+            this.getInput(resultValue);
+            that.ngValue = null;
         },
 
+        getInput(resultValue) {
+            // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+            var that = this;
+            var guid1 = that.formData.guid;//涓昏〃id
+            var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+
+            console.log(that.formData);
+            var input = resultValue;//鎷兼帴妫�楠屽��
+            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EdtModel12', {
+                inOrderGuid1: guid1,
+                inOrderGuid5: mxguid,
+                inP1: input,//鎴栬��0k-19,鎴栬�卬g-19
+            }, true, 1).then(function (res1) {
+                if (res1.rtnCode == 1) {
+                    that.$notify({
+                        type: 'success', message: res1.rtnMsg
+                    });
+                    that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+                    //that.tableData = null;
+                    //that.$refs.inputValue.focus();
+                } else {
+                    that.$toast.fail(res1.rtnMsg);
+                }
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                console.log(error);
+            });
+        },
+
+        getInputTZZ() {
+            // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+            var that = this;
+            var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+            var input = that.inputValue;
+            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EditYangLi', {
+                dt05Guid: mxguid,
+                fSeq : "pda",
+                fVal : input,
+            }, true, 1).then(function (res1) {
+                if (res1.rtnData.outSum == 1) {
+                    that.$notify({
+                        type: 'success', message: res1.rtnMsg
+                    });
+                    that.okValue = null;
+                    that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+                    //that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
+                    //that.$refs.inputValue.focus();
+                    that.inputValue = null;
+                } else {
+                    that.$toast.fail(res1.rtnMsg);
+                    that.inputValue = null;
+                }
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.inputValue = null;
+            });
+        },
+
+        handleTabClick() {
+            console.log(this.tabActive)
+            this.togglePopup(this.tabActive);
+        },
+        //妫�楠屾槑缁嗗埛鏂�
+        refreshJYItem() {
+            const that = this;
+            return that.AxiosHttp("post", 'LLJ/getJYItem', {
+                releaseNo: that.formData.releaseNo
+            }, false).then(res1 => {
+                const tableData = res1.data.tbBillList || [];
+                that.tableData = tableData;
+                that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
+            }).catch(error => {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                console.error('Refresh error:', error);
+            });
+        },
+
+        //涓婚〉闈㈠姞杞�
         init() {
             
             //alert(this.Request("id"));
@@ -172,24 +302,32 @@
             });
         },
         removeXJ() {
+            const that = this;
 
-            var that = this;
+            // 娣诲姞纭寮圭獥
+            that.$dialog.confirm({
+                title: '鎿嶄綔纭',
+                message: '纭瑕侀噸鏂板姞杞芥楠岄」鐩悧锛�',
+                confirmButtonText: '纭',
+                cancelButtonText: '鍙栨秷'
+            }).then(() => {  // 纭鍥炶皟
+                that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', {
+                    guid: that.formData.guid
+                }, true, 1).then(res1 => {
+                    if (res1.rtnCode == 1) {
+                        that.$notify({ type: 'success', message: '閲嶆柊鍔犺浇鎴愬姛' });
+                        that.init();
+                    } else {
+                        that.$toast.fail(res1.rtnMsg);
+                    }
+                }).catch(error => {
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    console.error('Reload error:', error);
+                });
 
-
-            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', {
-                guid: that.formData.guid
-            }, true, 1).then(function (res1) {
-                if (res1.rtnCode == 1) {
-                    that.$notify({ type: 'success', message: '閲嶆柊鍔犺浇鎴愬姛' });
-                    that.init();
-                } else {
-                    that.$toast.fail(res1.rtnMsg);
-                }
-            }).catch(function (error) {
-                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                console.log(error);
+            }).catch(() => {  // 鍙栨秷鍥炶皟
+                that.$toast('宸插彇娑堟搷浣�');
             });
-
         },
         GetBack1() {
             window.history.back();

--
Gitblit v1.9.3