From c75027743ea7c3ecc2d0885f01d11d2ad78679a3 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 23 十月 2026 14:23:26 +0800
Subject: [PATCH] Merge branch 'yxh' of http://116.62.18.175:6699/r/~yxh/opo-web

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

diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index bd4b966..62443b8 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -9,7 +9,7 @@
               <el-date-picker
                 style="width: 100%"
                 v-model="form.applyTime"
-                type="date"
+                type="date" format="yyyy-MM-dd"
                 value-format="yyyy-MM-dd HH:mm:ss"
                 placeholder="鐢宠鏃ユ湡"
                 :disabled="true"
@@ -369,7 +369,7 @@
                   size="small"
                   style="width: 100%"
                   v-model="scope.row.starttime"
-                  type="date"
+                  type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="寮�濮嬫棩鏈�"
                   @blur="getdays(scope.row)"
@@ -401,7 +401,7 @@
                   size="small"
                   style="width: 100%"
                   v-model="scope.row.endtime"
-                  type="date"
+                  type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="缁撴潫鏃ユ湡"
                   @blur="getdays(scope.row)"
@@ -848,7 +848,7 @@
             <!--
             <el-table-column prop="paiddate" slot="" label="鎵撴鏃ユ湡" fixed align="center" width="150">
               <template slot-scope="scope">
-                <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date"
+                <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎵撴鏃ユ湡" :disabled="true">
                 </el-date-picker>
               </template>
@@ -1306,6 +1306,7 @@
 import { getToken } from "@/utils/auth";
 import debounce from "lodash/debounce";
 import { moneySum, moneyAdd, moneyRound } from "@/utils/money";
+import { checkFileName, checkDetails } from "@/utils/fileNameCheck";
 export default {
   components: {
     Treeselect,
@@ -1690,7 +1691,43 @@
     },
 
     //鏂囦欢涓婁紶鎴愬姛鍥炶皟
+    /**
+     * 2026-10-15锛氫笂浼犳椂鏍¢獙闄勪欢鏂囦欢鍚嶏紙涓氬姟瑕佹眰锛氫笉鍚堟牸绔嬪嵆鎻愮ず涓斾笉鍔犲叆鍒楄〃锛夈��
+     * 瑙勫垯涓庡悗绔� AttachmentNameValidator 鍚屽彛寰勶細蹇呴』鍚腑鏂� / 鍘绘帀鎵╁睍鍚嶅悗涓诲共 鈮�20 瀛� /
+     * 涓嶅惈绌烘牸鍙� / \ : * ? " < > | # % 绛夌壒娈婂瓧绗︺��
+     */
+    checkUploadFileName(file) {
+      const raw = file && file.raw ? file.raw.name : file && file.name;
+      const r = checkFileName(raw);
+      if (!r.ok) {
+        this.$modal.msgError(r.msg);
+        return false;
+      }
+      return true;
+    },
+
+    /**
+     * 2026-10-15锛氫繚瀛樺墠鏍¢獙鏁村崟鏄庣粏闄勪欢鏂囦欢鍚嶏紙鍚悓涓�琛屽唴閲嶅悕锛夈��
+     * 鍙e緞锛堜笟鍔$‘璁わ級锛氬彧鏍¢獙"鏈鍙樻洿"鐨勯檮浠垛�斺�旇�佸崟鎹噷宸插瓨鍦ㄧ殑涓嶅悎瑙勯檮浠跺悕涓嶈兘鎶婁繚瀛樺崱姝�
+     * 锛堝惁鍒欒�佸崟鎹敼涓�涓噾棰濋兘瀛樹笉杩涘幓锛夈�傚悗绔寜 id 璇绘棫璁板綍鏀捐鍘嗗彶闄勪欢锛涘墠绔嬁涓嶅埌"鍝簺鏄巻鍙�"
+     * 鐨勬潈濞佷俊鎭紝鍥犳**浠呮柊澧炲崟鎹�**鍋氫繚瀛樺墠鎷︽埅锛岀紪杈戣�佸崟鎹椂鏂板鐨勪笉鍚堣闄勪欢鐢卞悗绔簩娆℃牎楠屾嫤涓嬨��
+     */
+    checkDetailFileNames() {
+      if (this.form && this.form.id) {
+        return true;
+      }
+      const c = checkDetails(this.rbDetails);
+      if (!c.ok) {
+        this.$modal.msgError(c.msg);
+        return false;
+      }
+      return true;
+    },
+
     uploadSccess(response, file, fileList) {
+      if (!this.checkUploadFileName(file)) {
+        return;
+      }
       this.rbDetails;
       const config = {
         headers: { Authorization: "Bearer " + this.ICDtoken }
@@ -1711,14 +1748,11 @@
                 name: file.name,
                 url: URL.createObjectURL(blob)
               });
-              // console.log(file.response.url);
-              // console.log(file);
-
-              this.pdfimgsrcList.push(file.response.url);
-              this.fileListto.push({
-                name: file.response.fileName,
-                url: file.response.url
-              });
+              // 2026-10-15锛氬垹闄よ繖閲岀殑绗簩娆� push銆傚師鏉ヤ竴娆′笂浼犱細鍚� fileListto / pdfimgsrcList
+              // 鍚勫啓涓ゆ潯锛屼笖绗簩鏉$殑 name 鍙栫殑鏄� file.response.fileName锛堝瓨鍌ㄨ矾寰勶級锛涜�� remove()
+              // 浼氭妸鏁翠釜 fileListto 鍥炲啓鍒� rbDetails[atpresent].annexfilesList锛屽鑷存槑缁嗛檮浠堕噷
+              // 娣峰叆璺緞褰㈡�佺殑 name锛岃闄勪欢鏂囦欢鍚嶆牎楠岃鎷︼紙鍓嶇娌℃湁"璺緞褰㈡�佽烦杩�"璞佸厤锛夛紝
+              // 鍚屾椂绁ㄦ嵁鍒楄〃浼氬鍑轰竴琛屻��
               console.log(URL.createObjectURL(blob), "ur杞崲");
             })
             .catch(error => {
@@ -2693,11 +2727,7 @@
           this.continueOrExit();
         } else {
           this.$modal.closeLoading();
-          if (res.msg) {
-            this.$modal.msgError("鎿嶄綔澶辫");
-          } else {
-            this.$modal.msgError(res.msg);
-          }
+          this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
         }
       });
     },
@@ -2764,6 +2794,11 @@
 
     /** 鎻愪氦淇濆瓨鎸夐挳 */
     submitForm: debounce(function (data) {
+      // 2026-10-15锛氫繚瀛樺墠闄勪欢鏂囦欢鍚嶈鑼冩牎楠岋紙浠呮柊澧炲崟鎹紱鑰佸崟鎹殑鍘嗗彶闄勪欢鐢卞悗绔寜"鍙牎楠屾湰娆″彉鏇�"鏀捐锛�
+      if (!this.checkDetailFileNames()) {
+        return;
+      }
+
       this.$refs["form"].validate(valid => {
         if (valid) {
           //绁ㄦ嵁鏂囦欢澶勭悊
@@ -2987,6 +3022,11 @@
     },
     // 鎺ュ彈鎻愰啋绔嬪埢淇濆瓨
     Savenow() {
+      // 2026-10-15锛氫繚瀛樺墠闄勪欢鏂囦欢鍚嶈鑼冩牎楠岋紙浠呮柊澧炲崟鎹紱鑰佸崟鎹殑鍘嗗彶闄勪欢鐢卞悗绔寜"鍙牎楠屾湰娆″彉鏇�"鏀捐锛�
+      if (!this.checkDetailFileNames()) {
+        return;
+      }
+
       this.Savereminder = false;
       this.Reminderquantity = 0;
       this.totalquantity = 0;

--
Gitblit v1.9.3