From dd004276162a2bf9d042ff0aaa569dc30a95d827 Mon Sep 17 00:00:00 2001
From: binxie <137736985@qq.com>
Date: 星期一, 26 六月 2023 14:23:26 +0800
Subject: [PATCH] newbackup0626

---
 force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js |   48 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js b/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js
index d16b48f..f3f1583 100644
--- a/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js
+++ b/force-app/main/default/lwc/customShipmentNumberComp/customShipmentNumberComp.js
@@ -11,16 +11,20 @@
     }
 
     shipmentNumberBlur(event) {
-        debugger
-        console.log('shipmentNumberBlur')
+        debugger;
+        console.log('shipmentNumberBlur');
         this.shipmentNumber = event.target.value;
         if (this.isConinvoice) {
             if (this.hasDecimals(this.shipmentNumber)) {
                 this.showMyToast('閿欒', '璇疯緭鍏ユ暣鏁�', 'Error');
                 this.shipmentNumber = 0;
-            }else{
-                if(this.esdInvoiceProNotCount < this.shipmentNumber){
-                    this.showMyToast('閿欒', '鍙戠エ鏁伴噺涓嶈兘瓒呰繃杩樻病鍙戠エ鏁伴噺锛�', 'Error');
+            } else {
+                if (this.esdInvoiceProNotCount < this.shipmentNumber) {
+                    this.showMyToast(
+                        '閿欒',
+                        '鍙戠エ鏁伴噺涓嶈兘瓒呰繃杩樻病鍙戠エ鏁伴噺锛�',
+                        'Error'
+                    );
                     this.shipmentNumber = 0;
                 }
             }
@@ -28,18 +32,23 @@
             //鍚戜笅鍙栨暣
             if (this.hasDecimals(this.shipmentNumber)) {
                 this.showMyToast('閿欒', '璇疯緭鍏ユ暣鏁�', 'Error');
-                this.shipmentNumber = Math.floor(this.shipmentNumber)
+                this.shipmentNumber = Math.floor(this.shipmentNumber);
             }
         }
         event.target.value = this.shipmentNumber;
-        this.dispatchEvent(new CustomEvent('shipmentnumber', {
-            composed: true,
-            bubbles: true,
-            cancelable: true,
-            detail: {
-                data: { shipmentnumber: this.shipmentNumber, recordId: this.recordId }
-            }
-        }));
+        this.dispatchEvent(
+            new CustomEvent('shipmentnumber', {
+                composed: true,
+                bubbles: true,
+                cancelable: true,
+                detail: {
+                    data: {
+                        shipmentnumber: this.shipmentNumber,
+                        recordId: this.recordId
+                    }
+                }
+            })
+        );
     }
 
     hasDecimals(num) {
@@ -61,10 +70,17 @@
             iconName = 'utility:error';
         }
         if (message != '') {
-            content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
+            content =
+                '<h2><strong>' +
+                title +
+                '<strong/></h2><h5>' +
+                message +
+                '</h5>';
         } else {
             content = '<h2><strong>' + title + '<strong/></h2>';
         }
-        this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
+        this.template
+            .querySelector('c-common-toast')
+            .showToast(variant, content, iconName, 10000);
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1