From ad0f326640b66b63e28dc52139f03ae4822f260a Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 15 四月 2024 10:36:59 +0800
Subject: [PATCH] 11

---
 src/views/project/travelexpenseapply/travelexpensedetail/index.vue |   64 ++++++++++++++++++++++++++++---
 1 files changed, 57 insertions(+), 7 deletions(-)

diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index 88a857f..051a438 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -1652,7 +1652,6 @@
       this.pdfVisible = true;
 
       if (this.rbDetails[index].annexfilesList) {
-
         const fetchPromises = this.rbDetails[index].annexfilesList.map(
           (value, indexson) => {
             const pdfimg = this.Networkheader + "/prod-api" + value.url;
@@ -1705,10 +1704,14 @@
         );
 
         Promise.all(fetchPromises).then(invoicefileListto => {
-          this.invoicefileListto = invoicefileListto.filter(item => item !== null);
+          this.invoicefileListto = invoicefileListto.filter(
+            item => item !== null
+          );
           this.invoicepdfimg = this.invoicefileListto[0].url;
           console.log(this.invoicepdfimg, "invoicepdfimg");
-          this.invoicepdfimgsrcList = this.invoicefileListto.map(item => item.url);
+          this.invoicepdfimgsrcList = this.invoicefileListto.map(
+            item => item.url
+          );
         });
 
         this.previewpdf = true;
@@ -1816,8 +1819,10 @@
         const index = this.getIndexInArray(this.fileListto, row);
         const item = this.fileListto.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
         this.fileListto.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
-     
-        const indexann = this.rbDetails[this.atpresent].annexfilesList.findIndex(item => item.name == row.name);
+
+        const indexann = this.rbDetails[
+          this.atpresent
+        ].annexfilesList.findIndex(item => item.name == row.name);
         const itemann = this.rbDetails[this.atpresent].annexfilesList.splice(
           indexann,
           1
@@ -1831,8 +1836,10 @@
         const index = this.getIndexInArray(this.invoicefileListto, row);
         const item = this.invoicefileListto.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
         this.invoicefileListto.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
-      
-        const indexinvo = this.rbDetails[this.atpresent].invoicefilesList.findIndex(item => item.name == row.name);
+
+        const indexinvo = this.rbDetails[
+          this.atpresent
+        ].invoicefilesList.findIndex(item => item.name == row.name);
         const iteminvo = this.rbDetails[this.atpresent].invoicefilesList.splice(
           indexinvo,
           1
@@ -2508,6 +2515,49 @@
 
           const rbDetails = [...this.rbDetails];
           const rbPayees = [...this.rbPayees];
+          //淇濆瓨鍓嶆牎楠屾暟鎹�
+          for (let k = 0; k < rbDetails.length; k++) {
+            let tempDetail = rbDetails[k];
+            console.log(tempDetail,'tem');
+            if (!tempDetail.persontype) {
+              this.$modal.msgWarning(
+                "鏄庣粏琛ㄤ腑锛岀" +
+                  (k + 1).toString() +
+                  "琛岀殑浜哄憳绫诲埆鏈�夋嫨锛岃鍏堥�夋嫨浜哄憳绫诲埆鍚庡啀鎻愪氦淇濆瓨锛�"
+              );
+              return;
+            }
+
+            
+              if (!tempDetail.personname) {
+                this.$modal.msgWarning(
+                  "鏄庣粏琛ㄤ腑锛岀" +
+                    (k + 1).toString() +
+                    "琛岀殑璐圭敤浜哄憳鏈�夋嫨,璇烽�夋嫨璐圭敤浜哄憳鍚庡啀鎻愪氦淇濆瓨锛�"
+                );
+                return;
+              }
+
+              if (!tempDetail.starttime) {
+                this.$modal.msgWarning(
+                  "鏄庣粏琛ㄤ腑锛岀" +
+                    (k + 1).toString() +
+                    "琛岀殑寮�濮嬫棩鏈熸湭閫夋嫨,璇烽�夋嫨寮�濮嬫棩鏈熷悗鍐嶆彁浜や繚瀛橈紒"
+                );
+                return;
+              }
+
+              if (!tempDetail.endtime) {
+                this.$modal.msgWarning(
+                  "鏄庣粏琛ㄤ腑锛岀" +
+                    (k + 1).toString() +
+                    "琛岀殑缁撴潫鏃ユ湡濮撳悕涓洪�夋嫨,璇烽�夋嫨缁撴潫鏃ユ湡鍚庡啀鎻愪氦淇濆瓨锛�"
+                );
+                return;
+              }
+            
+          }
+
           if (this.form.id != null) {
             console.log(this.form);
             updateReimbursement(this.form);

--
Gitblit v1.9.3