From 3873d3c350c8c1edd7bfdc8afe08c9e78f56d968 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 22 十月 2026 23:24:20 +0800
Subject: [PATCH] 调整费用申请模式
---
src/views/project/fund/applyDetail/index.vue | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 101 insertions(+), 19 deletions(-)
diff --git a/src/views/project/fund/applyDetail/index.vue b/src/views/project/fund/applyDetail/index.vue
index 89b17e7..b4b6494 100644
--- a/src/views/project/fund/applyDetail/index.vue
+++ b/src/views/project/fund/applyDetail/index.vue
@@ -12,7 +12,7 @@
</el-col>
<el-col :span="5">
<el-form-item label="鐢宠鏃ユ湡" prop="applyTime">
- <el-date-picker clearable :disabled="true" style="width: 100%" v-model="form.applyTime" type="date"
+ <el-date-picker clearable :disabled="true" style="width: 100%" v-model="form.applyTime" type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="鏃� 鏈�">
</el-date-picker>
</el-form-item>
@@ -68,15 +68,7 @@
<el-form-item label="鎹愮尞妗堜緥" prop="name">
<el-input :disabled="true" v-model="form.donorname" placeholder="璇疯緭鍏ユ崘鐚�呭鍚�" />
</el-form-item>
- </el-col>
- <el-col :span="4">
- <div style="margin-left: 10px;">
- <dict-tag
- :options="dict.type.sys_DonationStatus"
- :value="form.invoicecount"
- />
- </div>
- </el-col>
+ </el-col>
<el-col :span="10">
<el-form-item label="鐢宠璇存槑" prop="remark">
<el-input v-model="form.remark" placeholder="鐢宠璇存槑" />
@@ -795,6 +787,7 @@
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
import { moneySum, moneyMul, moneySub, moneyRound } from "@/utils/money";
+import { checkFileName, checkDetails } from "@/utils/fileNameCheck";
import CustomImageViewer from "@/components/CustomImageViewer"; // 鏍规嵁浣犵殑璺緞璋冩暣
export default {
@@ -831,9 +824,10 @@
return callback();
}
const regex = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}([0-9]|X)$/;
- if (regex.test(value)) {
- } else {
- callback(new Error("韬唤璇佸彿鐮佹牸寮忛敊璇�"));
+ // 2026-10-19锛氭牸寮忎笉鍚堟硶绔嬪嵆鏃╅��銆傚師鏉ュ啓鎴� if/else 浣� else 閲屾病鏈� return锛�
+ // 浼氱户缁線涓嬭蛋寮傛鏌ラ噸锛屽鑷� callback 琚皟鐢ㄤ袱娆°��"韬唤璇佸彿鐮佹牸寮忛敊璇�"琚悗缁粨鏋滆鐩栥��
+ if (!regex.test(value)) {
+ return callback(new Error("韬唤璇佸彿鐮佹牸寮忛敊璇�"));
}
// 2. 璋冪敤鍚庣鎺ュ彛杩涜閲嶅鎬ф牎楠�
@@ -966,6 +960,10 @@
},
dialogrules: {
+ // 2026-10-19锛氳处鎴峰悕绉帮紙璐︽埛鏉ユ簮=浠庤处鎴峰簱 鏃剁殑涓嬫媺锛変篃鏄繀杈撻」
+ accountname: [
+ { required: true, message: "璇烽�夋嫨璐︽埛鍚嶇О", trigger: "change" }
+ ],
usertype: [
{ required: true, message: "璇疯緭鍏ヨ处鎴风被鍨�", trigger: "blur" }
],
@@ -975,6 +973,10 @@
unitTaxNo: [{ required: true, message: "璇疯緭鍏ョ◣鍙�", trigger: "blur" }],
idcardno: [
{
+ // 2026-10-19锛氬姞 required 鏍囪鍙负璁� el-form-item 鏍囧嚭蹇呰緭鏄熷彿锛圗lement 鐨� isRequired 鍙 rule.required锛夈��
+ // 鏈鍒欏甫 validator锛宎sync-validator 鐨� getValidationMethod 浼氱洿鎺ヨ繑鍥炶 validator銆佽烦杩囧唴寤� required 妫�鏌ワ紝
+ // 鎵�浠ユ牎楠岃涓轰笌鏀瑰姩鍓嶅畬鍏ㄤ竴鑷达紱鍙﹀**涓嶈兘鍔� message**锛屽惁鍒欎細瑕嗙洊涓嬮潰鑷畾涔� validator 鐨勬姤閿欐枃妗堛��
+ required: true,
// 璐︽埛绫诲瀷閫夋嫨"鍗曚綅鏈烘瀯"鏃朵笉闇�瑕佽韩浠借瘉鍙�
validator: (rule, value, callback) => {
if (this.hasUserType(this.accountselectform.usertype, "org")) {
@@ -1561,6 +1563,11 @@
},
/** 鎻愪氦鎸夐挳 */
submitForm: debounce(function () {
+ // 2026-10-15锛氫繚瀛樺墠闄勪欢鏂囦欢鍚嶈鑼冩牎楠岋紙浠呮柊澧炲崟鎹紱鑰佸崟鎹殑鍘嗗彶闄勪欢鐢卞悗绔寜"鍙牎楠屾湰娆″彉鏇�"鏀捐锛�
+ if (!this.checkDetailFileNames()) {
+ return;
+ }
+
if (!this.randomnumber) {
this.randomnumber = this.generateRandomString(9);
this.form.randomnumber = this.randomnumber;
@@ -2343,6 +2350,11 @@
},
// 鎺ュ彈鎻愰啋绔嬪埢淇濆瓨
Savenow() {
+ // 2026-10-15锛氫繚瀛樺墠闄勪欢鏂囦欢鍚嶈鑼冩牎楠岋紙浠呮柊澧炲崟鎹紱鑰佸崟鎹殑鍘嗗彶闄勪欢鐢卞悗绔寜"鍙牎楠屾湰娆″彉鏇�"鏀捐锛�
+ if (!this.checkDetailFileNames()) {
+ return;
+ }
+
if (!this.randomnumber) {
this.randomnumber = this.generateRandomString(9);
this.form.randomnumber = this.randomnumber;
@@ -2510,11 +2522,7 @@
} else {
this.$modal.closeLoading();
- if (res.msg) {
- this.$modal.msgError("鎿嶄綔澶辫");
- } else {
- this.$modal.msgError(res.msg);
- }
+ this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
}
});
}
@@ -2590,6 +2598,23 @@
});
this.batchdialogVisible = true;
},
+ /**
+ * 鏄庣粏琛屾槸鍚︿负銆岀┖璁板綍銆嶏細鏈嶅姟椤圭洰銆佷笓瀹躲�佷笓瀹舵墍鍦ㄥ崟浣� 鏄惁閮戒负绌�
+ * 鐢ㄤ簬鎵归噺褰曞叆涓撳鏃跺垽鏂�"澶嶇敤鏈�鍚庝竴琛�"杩樻槸"杩藉姞鏂拌"
+ */
+ isBlankDetailRow(row) {
+ if (!row) {
+ return false;
+ }
+ const isEmpty = v =>
+ v === null || v === undefined || String(v).trim() === "";
+ return (
+ isEmpty(row.itemid) &&
+ isEmpty(row.beneficiaryname) &&
+ isEmpty(row.unitno) &&
+ isEmpty(row.unitname)
+ );
+ },
/** 鎵归噺褰曞叆寮规锛氬鍚�/鍗曚綅/宸ュ彿/韬唤璇佸悗4浣� 鍛戒腑鍒ゆ柇 */
personMatchKeyword(item, kw) {
const idcard = String(item.idcrad || "");
@@ -2615,6 +2640,17 @@
existed[String(row.beneficiaryname).trim()] = true;
}
});
+
+ // 2026-10-22锛氫慨姝�"瀵煎叆鍚庤〃鏍煎鍑轰竴琛岀┖璁板綍"銆�
+ // 瑙勫垯锛氬厛鐪嬫渶鍚庝竴鏉¤褰曪紝鑻ュ畠鐨�"鏈嶅姟椤圭洰 / 涓撳 / 涓撳鎵�鍦ㄥ崟浣�"閮芥槸绌虹殑锛�
+ // 璇存槑鏄竴鏉$┖璁板綍锛屽氨浠庤繖涓�琛屽紑濮嬪~锛涘惁鍒欒拷鍔犳柊琛屻��
+ let writeIndex = this.rbDetails.length;
+ if (
+ writeIndex > 0 &&
+ this.isBlankDetailRow(this.rbDetails[writeIndex - 1])
+ ) {
+ writeIndex -= 1;
+ }
const duplicated = [];
this.checkedCities.forEach(item => {
@@ -2674,7 +2710,13 @@
annexfiles: null
};
- this.rbDetails.push(rowData);
+ if (writeIndex < this.rbDetails.length) {
+ // 澶嶇敤鏈�鍚庨偅鏉$┖璁板綍
+ this.rbDetails.splice(writeIndex, 1, rowData);
+ } else {
+ this.rbDetails.push(rowData);
+ }
+ writeIndex++;
});
for (let i = 0; i < this.rbDetails.length; i++) {
this.rbDetails[i].orderno = i + 1;
@@ -2931,7 +2973,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 }
@@ -3305,6 +3383,10 @@
//涓撳/鍖荤枟鏈烘瀯/璐圭敤鎶ラ攢鏈烘瀯閫夋嫨
confirmSelectionDialog() {
this.$refs["accountselectform"].validate(valid => {
+ // 2026-10-19锛氬師鏉ユ病鏈夊垽鏂� valid锛屾牎楠屽け璐ヤ篃鐓ф牱寰�涓嬭蛋銆佺収鏍蜂繚瀛橈紙鏄熷彿/绾㈠瓧褰㈠悓铏氳锛�
+ if (!valid) {
+ return;
+ }
let tempIndex = this.accountselectform.index;
if (this.selectionType == "account") {
if (this.accountfrom == "1") {
--
Gitblit v1.9.3